Internal change

PiperOrigin-RevId: 508241532
Change-Id: Iaca5b87fe1835a83195f0de4f164d389fb994084
diff --git a/lottie_renderer/README.md b/lottie_renderer/README.md
new file mode 100644
index 0000000..fd6cc6a
--- /dev/null
+++ b/lottie_renderer/README.md
@@ -0,0 +1,22 @@
+# Lottie Renderer and Worker
+
+See: go/cros-lottie-renderer
+
+The `cros-lottie-renderer` component uses an offscreen canvas controlled by
+a WebWorker thread in order to move Lottie rendering off the main thread, in
+order to provide better performance and sandboxing.
+
+This directory contains the `lottie_worker.js` script, which is basically a copy
+of https://github.com/airbnb/lottie-web, modified to run on a worker thread
+so that it doesn't rely on a DOM node for the canvas. This functionality has
+been adopted into the official Lottie project, but is currently unavailable in
+//google3/third_party/javascript/lottie, as we are lagging multiple versions
+behind. Work to update the Lottie library is underway, and when complete the
+`lottie_worker.js` script in this directory will be removed and replaced with
+the official script.
+
+In the interim, some extra modifications have been made to this library in order
+to bypass JSC security exceptions. These changes can be found in the
+`lottie_worker.DIFF` file if they need to be rolled back. The original file
+can be found in [Chromium](https://crsrc.org/c/third_party/lottie/lottie_worker.js?q=lottie_worker.js). The file has been minified using the `minify_lottie.py`
+script.
diff --git a/lottie_renderer/lottie_worker.DIFF b/lottie_renderer/lottie_worker.DIFF
new file mode 100644
index 0000000..f0c9b0f
--- /dev/null
+++ b/lottie_renderer/lottie_worker.DIFF
@@ -0,0 +1,57 @@
+diff --git a/google3/third_party/javascript/cros_components/lottie_renderer/lottie_worker.js b/google3/third_party/javascript/cros_components/lottie_renderer/lottie_worker.js
+--- a/google3/third_party/javascript/cros_components/lottie_renderer/lottie_worker.js
++++ b/google3/third_party/javascript/cros_components/lottie_renderer/lottie_worker.js
+@@ -1896,7 +1896,6 @@ var FontManager = (function(){
+                     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){
+@@ -1913,8 +1912,6 @@ var FontManager = (function(){
+                     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);
+                 }
+             }
+@@ -6463,7 +6460,11 @@ function MaskElement(data,element,global
+ 
+     if(count > 0){
+         this.maskElement.setAttribute('id', layerId);
+-        this.element.maskedElement.setAttribute(maskRef, "url(" + locationHref + "#" + layerId + ")");
++        if (maskRef == 'clip-path') {
++          this.element.maskedElement.style.clipPath = "url(" + locationHref + "#" + layerId + ")";
++        } else if (maskRef == 'mask') {
++          this.element.maskedElement.style.mask = "url(" + locationHref + "#" + layerId + ")";
++        }
+         defs.appendChild(this.maskElement);
+     }
+     if (this.viewData.length) {
+@@ -7507,7 +7508,6 @@ IImageElement.prototype.createContent = 
+     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);
+ };
+@@ -9826,15 +9826,8 @@ var ExpressionManager = (function(){
+         var loopIn, loop_in, loopOut, loop_out, smooth;
+         var toWorld,fromWorld,fromComp,toComp,fromCompToSurface, position, rotation, anchorPoint, scale, thisLayer,thisComp,mask,valueAtTime,velocityAtTime;
+         var __expression_functions = [];
+-        if(data.xf) {
+-            var i, len = data.xf.length;
+-            for(i = 0; i < len; i += 1) {
+-                // __expression_functions[i] = eval('(function(){ return ' + data.xf[i] + '}())');
+-            }
+-        }
+ 
+         var scoped_bm_rt;
+-        // var expression_function = eval('[function _expression_function(){' + val+';scoped_bm_rt=$bm_rt}' + ']')[0];
+         var numKeys = property.kf ? data.k.length : 0;
+ 
+         var active = !this.data || this.data.hd !== true;
diff --git a/lottie_renderer/lottie_worker.js b/lottie_renderer/lottie_worker.js
new file mode 100644
index 0000000..df26a6b
--- /dev/null
+++ b/lottie_renderer/lottie_worker.js
@@ -0,0 +1,6 @@
+/**
+ * @license
+ * Copyright 2023 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var lottiejs=function(t){"use strict";var e,s=-999999,i=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Math.round,Math.pow),a=Math.sqrt,r=(Math.abs,Math.floor),n=(Math.max,Math.min),o={};function h(){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"],s=e.length;for(t=0;t<s;t+=1)o[e[t]]=Math[e[t]]}(),o.random=Math.random,o.abs=function(t){if("object"===typeof t&&t.length){var e,s=T(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,l=Math.PI/180,f=.5519;function c(t){t?Math.round:function(t){return t}}function m(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 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}c(!1);var v,b=(v=0,function(){return"__lottie_element_"+ ++v});function P(t,e,s){var i,a,r,n,o,h,p,l;switch(h=s*(1-e),p=s*(1-(o=6*t-(n=Math.floor(6*t)))*e),l=s*(1-(1-o)*e),n%6){case 0:i=s,a=l,r=h;break;case 1:i=p,a=s,r=h;break;case 2:i=h,a=s,r=l;break;case 3:i=h,a=p,r=s;break;case 4:i=l,a=h,r=s;break;case 5:i=s,a=h,r=p}return[i,a,r]}function _(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 k(t,e){var s=_(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),P(s[0],s[1],s[2])}function x(t,e){var s=_(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),P(s[0],s[1],s[2])}function D(t,e){var s=_(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),P(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 A(){}A.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var s=this._cbs[t].length,i=0;i<s;i++)this._cbs[t][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 C="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):void 0}:function(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};function T(t){return Array.apply(null,{length:t})}function S(t){return document.createElement(t)}function w(){}w.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var t,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 M,I=(M={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 M[t]||""}),E=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 l(t,e){return this.shear(s(t),s(e))}function f(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 c(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,p,l,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]=p,this.props[10]=l,this.props[11]=f,this.props[12]=c,this.props[13]=m,this.props[14]=d,this.props[15]=u,this}function d(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,p,l,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===p&&1===l&&0===f)return g[12]=g[12]*t+g[15]*c,g[13]=g[13]*r+g[15]*m,g[14]=g[14]*l+g[15]*d,g[15]=g[15]*u,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],P=g[3],_=g[4],k=g[5],x=g[6],D=g[7],A=g[8],C=g[9],T=g[10],S=g[11],w=g[12],M=g[13],I=g[14],E=g[15];return g[0]=y*t+v*a+b*h+P*c,g[1]=y*e+v*r+b*p+P*m,g[2]=y*s+v*n+b*l+P*d,g[3]=y*i+v*o+b*f+P*u,g[4]=_*t+k*a+x*h+D*c,g[5]=_*e+k*r+x*p+D*m,g[6]=_*s+k*n+x*l+D*d,g[7]=_*i+k*o+x*f+D*u,g[8]=A*t+C*a+T*h+S*c,g[9]=A*e+C*r+T*p+S*m,g[10]=A*s+C*n+T*l+S*d,g[11]=A*i+C*o+T*f+S*u,g[12]=w*t+M*a+I*h+E*c,g[13]=w*e+M*r+I*p+E*m,g[14]=w*s+M*n+I*l+E*d,g[15]=w*i+M*o+I*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]}function b(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 _(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}function k(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 D(t){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],s=this.props[5]/e,i=-this.props[1]/e,a=-this.props[4]/e,r=this.props[0]/e,n=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e;return[t[0]*s+t[1]*a+n,t[0]*i+t[1]*r+o,0]}function A(t){var e,s=t.length,i=[];for(e=0;e<s;e+=1)i[e]=D(t[e]);return i}function T(t,e,s){var i=C("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 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 w(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 M(){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 I(t){return t<1e-6&&t>0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function E(){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=r,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=l,this.skewFromAxis=f,this.shear=p,this.scale=c,this.setTransform=m,this.translate=d,this.transform=u,this.applyToPoint=P,this.applyToX=_,this.applyToY=k,this.applyToZ=x,this.applyToPointArray=S,this.applyToTriplePoints=T,this.applyToPointStringified=w,this.toCSS=M,this.to2dCSS=E,this.clone=v,this.cloneFromProps=b,this.equals=y,this.inversePoints=A,this.inversePoint=D,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=C("float32",16),this.reset()}}();!function(t,e){var s,i=this,a=256,r=e.pow(a,6),n=e.pow(2,52),o=2*n,h=255;function p(t){var e,s=t.length,i=this,r=0,n=i.i=i.j=0,o=i.S=[];for(s||(t=[s++]);r<a;)o[r]=r++;for(r=0;r<a;r++)o[r]=o[n=h&n+t[r%s]+(e=o[r])],o[n]=e;i.g=function(t){for(var e,s=0,r=i.i,n=i.j,o=i.S;t--;)e=o[r=h&r+1],s=s*a+o[h&(o[r]=o[n=h&n+e])+(o[n]=e)];return i.i=r,i.j=n,s}}function l(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function f(t,e){var s,i=[],a=typeof t;if(e&&"object"==a)for(s in t)try{i.push(f(t[s],e-1))}catch(t){}return i.length?i:"string"==a?t:t+"\0"}function c(t,e){for(var s,i=t+"",a=0;a<i.length;)e[h&a]=h&(s^=19*e[h&a])+i.charCodeAt(a++);return m(e)}function m(t){return String.fromCharCode.apply(0,t)}e.seedrandom=function(h,d,u){var g=[],y=c(f((d=!0===d?{entropy:!0}:d||{}).entropy?[h,m(t)]:null===h?function(){try{s;var e=new Uint8Array(a);return(i.crypto||i.msCrypto).getRandomValues(e),m(e)}catch(e){var r=i.navigator,n=r&&r.plugins;return[+new Date,i,n,i.screen,m(t)]}}():h,3),g),v=new p(g),b=function(){for(var t=v.g(6),e=r,s=0;t<n;)t=(t+s)*a,e*=a,s=v.g(1);for(;t>=o;)t/=2,e/=2,s>>>=1;return(t+s)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,c(m(v.S),t),(d.pass||u||function(t,s,i,a){return a&&(a.S&&l(a,v),t.state=function(){return l(v,{})}),i?(e.random=t,s):t})(b,y,"global"in d?d.global:this==e,d.state)},c(e.random(),t)}([],o);var F=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 p([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 p(t){this._p=t,this._mSampleValues=i?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return p.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 p=r+(t-a[--n])/(a[n+1]-a[n])*s,l=h(p,e,i);return l>=.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,p,e,i):0===l?p: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}();function L(t,e){var s,i,a=t.length;for(s=0;s<a;s+=1)for(var r in i=t[s].prototype)i.hasOwnProperty(r)&&(e.prototype[r]=i[r])}function V(t,e){return Object.getOwnPropertyDescriptor(t,e)}function R(t){function e(){}return e.prototype=t,e}!function(){for(var e=0,s=["ms","moz","webkit","o"],i=0;i<s.length&&!t.requestAnimationFrame;++i)t.requestAnimationFrame=t[s[i]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[s[i]+"CancelAnimationFrame"]||t[s[i]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(t,s){var i=(new Date).getTime(),a=Math.max(0,16-(i-e)),r=setTimeout((function(){t(i+a)}),a);return e=i+a,r}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}();var O=function(){function t(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}Math;var e=function(t,e,s,r){var n,o,h,l,f,c,m=p,d=0,u=[],g=[],y=ut.newElement();for(h=s.length,n=0;n<m;n+=1){for(f=n/(m-1),c=0,o=0;o<h;o+=1)l=i(1-f,3)*t[o]+3*i(1-f,2)*f*s[o]+3*(1-f)*i(f,2)*r[o]+i(f,3)*e[o],u[o]=l,null!==g[o]&&(c+=i(u[o]-g[o],2)),g[o]=u[o];c&&(d+=c=a(c)),y.percents[n]=f,y.lengths[n]=d}return y.addedLength=d,y};function s(t){this.segmentLength=0,this.points=new Array(t)}function n(t,e){this.partialLength=t,this.point=e}var o,h=(o={},function(e,r,h,l){var f=(e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+h[0]+"_"+h[1]+"_"+l[0]+"_"+l[1]).replace(/\./g,"p");if(!o[f]){var c,m,d,u,g,y,v,b=p,P=0,_=null;2===e.length&&(e[0]!=r[0]||e[1]!=r[1])&&t(e[0],e[1],r[0],r[1],e[0]+h[0],e[1]+h[1])&&t(e[0],e[1],r[0],r[1],r[0]+l[0],r[1]+l[1])&&(b=2);var k=new s(b);for(d=h.length,c=0;c<b;c+=1){for(v=T(d),g=c/(b-1),y=0,m=0;m<d;m+=1)u=i(1-g,3)*e[m]+3*i(1-g,2)*g*(e[m]+h[m])+3*(1-g)*i(g,2)*(r[m]+l[m])+i(g,3)*r[m],v[m]=u,null!==_&&(y+=i(v[m]-_[m],2));P+=y=a(y),k.points[c]=new n(y,v),_=v}k.segmentLength=P,o[f]=k}return o[f]});function l(t,e){var s=e.percents,i=e.lengths,a=s.length,n=r((a-1)*t),o=t*e.addedLength,h=0;if(n===a-1||0===n||o===i[n])return s[n];for(var p=i[n]>o?-1:1,l=!0;l;)if(i[n]<=o&&i[n+1]>o?(h=(o-i[n])/(i[n+1]-i[n]),l=!1):n+=p,n<0||n>=a-1){if(n===a-1)return s[n];l=!1}return s[n]+(s[n+1]-s[n])*h}var f=C("float32",8);return{getSegmentsLength:function(t){var s,i=dt.newElement(),a=t.c,r=t.v,n=t.o,o=t.i,h=t._length,p=i.lengths,l=0;for(s=0;s<h-1;s+=1)p[s]=e(r[s],r[s+1],n[s],o[s+1]),l+=p[s].addedLength;return a&&h&&(p[s]=e(r[s],r[0],n[s],o[0]),l+=p[s].addedLength),i.totalLength=l,i},getNewSegment:function(t,e,s,i,a,r,n){var o,h=l(a=a<0?0:a>1?1:a,n),p=l(r=r>1?1:r,n),c=t.length,m=1-h,d=1-p,u=m*m*m,g=h*m*m*3,y=h*h*m*3,v=h*h*h,b=m*m*d,P=h*m*d+m*h*d+m*m*p,_=h*h*d+m*h*p+h*m*p,k=h*h*p,x=m*d*d,D=h*d*d+m*p*d+m*d*p,A=h*p*d+m*p*p+h*d*p,C=h*p*p,T=d*d*d,S=p*d*d+d*p*d+d*d*p,w=p*p*d+d*p*p+p*d*p,M=p*p*p;for(o=0;o<c;o+=1)f[4*o]=Math.round(1e3*(u*t[o]+g*s[o]+y*i[o]+v*e[o]))/1e3,f[4*o+1]=Math.round(1e3*(b*t[o]+P*s[o]+_*i[o]+k*e[o]))/1e3,f[4*o+2]=Math.round(1e3*(x*t[o]+D*s[o]+A*i[o]+C*e[o]))/1e3,f[4*o+3]=Math.round(1e3*(T*t[o]+S*s[o]+w*i[o]+M*e[o]))/1e3;return f},getPointInSegment:function(t,e,s,i,a,r){var n=l(a,r),o=1-n;return[Math.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,Math.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:h,pointOnLine2D:t,pointOnLine3D:function(e,s,i,a,r,n,o,h,p){if(0===i&&0===n&&0===p)return t(e,s,a,r,o,h);var l,f=Math.sqrt(Math.pow(a-e,2)+Math.pow(r-s,2)+Math.pow(n-i,2)),c=Math.sqrt(Math.pow(o-e,2)+Math.pow(h-s,2)+Math.pow(p-i,2)),m=Math.sqrt(Math.pow(o-a,2)+Math.pow(h-r,2)+Math.pow(p-n,2));return(l=f>c?f>m?f-c-m:m-c-f:m>c?m-c-f:c-f-m)>-1e-4&&l<1e-4}}}();var z=function(){function t(a,r,n){var o,h,p,f,c,m,d=a.length;for(h=0;h<d;h+=1)if("ks"in(o=a[h])&&!o.completed){if(o.completed=!0,o.tt&&(a[h-1].td=o.tt),[],-1,o.hasMask){var u=o.masksProperties;for(f=u.length,p=0;p<f;p+=1)if(u[p].pt.k.i)i(u[p].pt.k);else for(m=u[p].pt.k.length,c=0;c<m;c+=1)u[p].pt.k[c].s&&i(u[p].pt.k[c].s[0]),u[p].pt.k[c].e&&i(u[p].pt.k[c].e[0])}0===o.ty?(o.layers=e(o.refId,r),t(o.layers,r,n)):4===o.ty?s(o.shapes):5==o.ty&&l(o,n)}}function e(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}}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]);!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])&&void 0))}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&&(s=t[e],i=void 0,i=s.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,s,n,o,h,p=t.chars.length;for(e=0;e<p;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(n=(h=t.chars[e].data.shapes[0].it).length,s=0;s<n;s+=1)(o=h[s].ks.k).__converted||(i(h[s].ks.k),o.__converted=!0)}}),h=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);!0}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 p=s.masksProperties;for(r=p.length,a=0;a<r;a+=1)if(p[a].pt.k.i)p[a].pt.k.c=p[a].cl;else for(o=p[a].pt.k.length,n=0;n<o;n+=1)p[a].pt.k[n].s&&(p[a].pt.k[n].s[0].c=p[a].cl),p[a].pt.k[n].e&&(p[a].pt.k[n].e[0].c=p[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 l(t,e){0!==t.t.a.length||"m"in t.t.p||(t.singleShape=!0)}var f={completeData:function(e,s){e.__complete||(h(e),n(e),o(e),p(e),t(e.layers,e.assets,s),e.__complete=!0)}};return f.checkColors=h,f.checkChars=o,f.checkShapes=p,f.completeLayers=t,f}();z.completeData=function(t,e){t.__complete||(this.checkColors(t),this.checkChars(t),this.checkShapes(t),this.completeLayers(t.layers,t.assets,e),t.__complete=!0)};var N=function(){var t={w:0,size:0,shapes:[]},e=[];function s(t,e){var s=S("span");s.style.fontFamily=e;var i=S("span");i.textContent="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=t+", "+e,{node:i,w:a,parent:s}}function i(t,e){var s=createNS("text");return s.style.fontSize="100px",s.setAttribute("font-family",e.fFamily),s.setAttribute("font-style",e.fStyle),s.setAttribute("font-weight",e.fWeight),s.textContent="1",e.fClass?(s.style.fontFamily="inherit",s.setAttribute("class",e.fClass)):s.style.fontFamily=e.fFamily,t.appendChild(s),S("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,s}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 a=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this.initTime=Date.now()};return a.getCombinedCharacterCodes=function(){return e},a.prototype.addChars=function(t){if(t){this.chars||(this.chars=[]);var e,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)}}},a.prototype.addFonts=function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var a,r=t.list,n=r.length,o=n;for(a=0;a<n;a+=1){var h,p,l=!0;if(r[a].loaded=!1,r[a].monoCase=s(r[a].fFamily,"monospace"),r[a].sansCase=s(r[a].fFamily,"sans-serif"),r[a].fPath){if("p"===r[a].fOrigin||3===r[a].origin){if((h=document.querySelectorAll('style[f-forigin="p"][f-family="'+r[a].fFamily+'"], style[f-origin="3"][f-family="'+r[a].fFamily+'"]')).length>0&&(l=!1),l){var f=S("style");f.setAttribute("f-forigin",r[a].fOrigin),f.setAttribute("f-origin",r[a].origin),f.setAttribute("f-family",r[a].fFamily),f.type="text/css",f.textContent="@font-face {font-family: "+r[a].fFamily+"; font-style: normal; src: url('"+r[a].fPath+"');}",e.appendChild(f)}}else if("g"===r[a].fOrigin||1===r[a].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),p=0;p<h.length;p++)-1!==h[p].href.indexOf(r[a].fPath)&&(l=!1);if(l){var c=S("link");c.setAttribute("f-forigin",r[a].fOrigin),c.setAttribute("f-origin",r[a].origin),c.type="text/css",c.rel="stylesheet",document.body.appendChild(c)}}else if("t"===r[a].fOrigin||2===r[a].origin){for(h=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),p=0;p<h.length;p++)r[a].fPath===h[p].src&&(l=!1);if(l){var m=S("link");m.setAttribute("f-forigin",r[a].fOrigin),m.setAttribute("f-origin",r[a].origin),e.appendChild(m)}}}else r[a].loaded=!0,o-=1;r[a].helper=i(e,r[a]),r[a].cache={},this.fonts.push(r[a])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},a.prototype.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 console&&console.warn&&console.warn("Missing character from exported characters list: ",e,s,i),t},a.prototype.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]},a.prototype.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},a.prototype.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.checkLoadedFonts.bind(this),20):setTimeout(function(){this.isLoaded=!0}.bind(this),0)},a.prototype.loaded=function(){return this.isLoaded},a}();N=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this.initTime=Date.now()};var G=function(){var t=s,e=Math.abs;function i(t,e){var s,i=this.offsetTime;"multidimensional"===this.propType&&(s=C("float32",this.pv.length));for(var r,n,o,h,p,f,c,m,d=e.lastIndex,u=d,g=this.keyframes.length-1,y=!0;y;){if(r=this.keyframes[u],n=this.keyframes[u+1],u===g-1&&t>=n.t-i){r.h&&(r=n),d=0;break}if(n.t-i>t){d=u;break}u<g-1?u+=1:(d=0,y=!1)}var v,b,P,_,k,x,D,A,T,S,w=n.t-i,M=r.t-i;if(r.to){r.bezierData||(r.bezierData=O.buildBezierData(r.s,n.s||r.e,r.to,r.ti));var I=r.bezierData;if(t>=w||t<M){var E=t>=w?I.points.length-1:0;for(h=I.points[E].point.length,o=0;o<h;o+=1)s[o]=I.points[E].point[o]}else{r.__fnct?m=r.__fnct:(m=F.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y,r.n).get,r.__fnct=m),p=m((t-M)/(w-M));var L,V=I.segmentLength*p,R=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastAddedLength:0;for(c=e.lastFrame<t&&e._lastKeyframeIndex===u?e._lastPoint:0,y=!0,f=I.points.length;y;){if(R+=I.points[c].partialLength,0===V||0===p||c===I.points.length-1){for(h=I.points[c].point.length,o=0;o<h;o+=1)s[o]=I.points[c].point[o];break}if(V>=R&&V<R+I.points[c+1].partialLength){for(L=(V-R)/I.points[c+1].partialLength,h=I.points[c].point.length,o=0;o<h;o+=1)s[o]=I.points[c].point[o]+(I.points[c+1].point[o]-I.points[c].point[o])*L;break}c<f-1?c+=1:y=!1}e._lastPoint=c,e._lastAddedLength=R-I.points[c].partialLength,e._lastKeyframeIndex=u}}else{var z,N,G,j,q;if(g=r.s.length,v=n.s||r.e,this.sh&&1!==r.h)if(t>=w)s[0]=v[0],s[1]=v[1],s[2]=v[2];else if(t<=M)s[0]=r.s[0],s[1]=r.s[1],s[2]=r.s[2];else{var B=a(r.s),W=a(v);b=s,P=function(t,e,s){var i,a,r,n,o,h=[],p=t[0],l=t[1],f=t[2],c=t[3],m=e[0],d=e[1],u=e[2],g=e[3];return(a=p*m+l*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*p+o*m,h[1]=n*l+o*d,h[2]=n*f+o*u,h[3]=n*c+o*g,h}(B,W,(t-M)/(w-M)),_=P[0],k=P[1],x=P[2],D=P[3],A=Math.atan2(2*k*D-2*_*x,1-2*k*k-2*x*x),T=Math.asin(2*_*k+2*x*D),S=Math.atan2(2*_*D-2*k*x,1-2*_*_-2*x*x),b[0]=A/l,b[1]=T/l,b[2]=S/l}else for(u=0;u<g;u+=1)1!==r.h&&(t>=w?p=1:t<M?p=0:(r.o.x.constructor===Array?(r.__fnct||(r.__fnct=[]),r.__fnct[u]?m=r.__fnct[u]:(z=void 0===r.o.x[u]?r.o.x[0]:r.o.x[u],N=void 0===r.o.y[u]?r.o.y[0]:r.o.y[u],G=void 0===r.i.x[u]?r.i.x[0]:r.i.x[u],j=void 0===r.i.y[u]?r.i.y[0]:r.i.y[u],m=F.getBezierEasing(z,N,G,j).get,r.__fnct[u]=m)):r.__fnct?m=r.__fnct:(z=r.o.x,N=r.o.y,G=r.i.x,j=r.i.y,m=F.getBezierEasing(z,N,G,j).get,r.__fnct=m),p=m((t-M)/(w-M)))),v=n.s||r.e,q=1===r.h?r.s[u]:r.s[u]+(v[u]-r.s[u])*p,1===g?s=q:s[u]=q}return e.lastIndex=d,s}function a(t){var e=t[0]*l,s=t[1]*l,i=t[2]*l,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),p=Math.sin(i/2);return[o*h*n+a*r*p,o*r*n+a*h*p,a*h*n-o*r*p,a*r*n-o*h*p]}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{this.lock=!0,this._mdf=this._isFirstFrame;var t,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){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 a,r=e.k.length;this.v=C("float32",r),this.pv=C("float32",r);C("float32",r);for(this.vel=C("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,p){this.propType="unidimensional",this.keyframes=s.k,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=p,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){this.propType="multidimensional";var l,f,c,m,d,u=s.k.length;for(l=0;l<u-1;l+=1)s.k[l].to&&s.k[l].s&&s.k[l].e&&(f=s.k[l].s,c=s.k[l].e,m=s.k[l].to,d=s.k[l].ti,(2===f.length&&(f[0]!==c[0]||f[1]!==c[1])&&O.pointOnLine2D(f[0],f[1],c[0],c[1],f[0]+m[0],f[1]+m[1])&&O.pointOnLine2D(f[0],f[1],c[0],c[1],c[0]+d[0],c[1]+d[1])||3===f.length&&(f[0]!==c[0]||f[1]!==c[1]||f[2]!==c[2])&&O.pointOnLine3D(f[0],f[1],f[2],c[0],c[1],c[2],f[0]+m[0],f[1]+m[1],f[2]+m[2])&&O.pointOnLine3D(f[0],f[1],f[2],c[0],c[1],c[2],c[0]+d[0],c[1]+d[1],c[2]+d[2]))&&(s.k[l].to=null,s.k[l].ti=null),f[0]===c[0]&&f[1]===c[1]&&0===m[0]&&0===m[1]&&0===d[0]&&0===d[1]&&(2===f.length||f[2]===c[2]&&0===m[2]&&0===d[2])&&(s.k[l].to=null,s.k[l].ti=null));this.effectsSequence=[r.bind(this)],this.keyframes=s.k,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 g=s.k[0].s.length;for(this.v=C("float32",g),this.pv=C("float32",g),l=0;l<g;l+=1)this.v[l]=t,this.pv[l]=t;this._caching={lastFrame:t,lastIndex:0,value:C("float32",g)},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}}}(),j=function(){function t(t,e,s){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new E,this.pre=new E,this.appliedTransformations=0,this.initDynamicPropertyContainer(s||t),e.p&&e.p.s?(this.px=G.getProp(t,e.p.x,0,0,this),this.py=G.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=G.getProp(t,e.p.z,0,0,this))):this.p=G.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=G.getProp(t,e.rx,0,l,this),this.ry=G.getProp(t,e.ry,0,l,this),this.rz=G.getProp(t,e.rz,0,l,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=e.or.k[i].ti=null}this.or=G.getProp(t,e.or,1,l,this),this.or.sh=!0}else this.r=G.getProp(t,e.r||{k:0},0,l,this);e.sk&&(this.sk=G.getProp(t,e.sk,0,l,this),this.sa=G.getProp(t,e.sa,0,l,this)),this.a=G.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=G.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=G.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return t.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){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 e,s,i=this.elem.globalData.frameRate;if(this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(e=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),s=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?(e=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.01)/i,0)):(e=this.p.pv,s=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){e=[],s=[];var a=this.px,r=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(e[0]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),e[1]=r.getValueAtTime((r.keyframes[0].t+.01)/i,0),s[0]=a.getValueAtTime(a.keyframes[0].t/i,0),s[1]=r.getValueAtTime(r.keyframes[0].t/i,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(e[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),e[1]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/i,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0),s[1]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/i,0)):(e=[a.pv,r.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime),s[1]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/i,r.offsetTime))}this.v.rotate(-Math.atan2(e[1]-s[1],e[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}if(this.r){if(this.r.effectsSequence.length)return;this.pre.rotate(-this.r.v),this.appliedTransformations=4}else 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(){}},L([w],t),t.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},t.prototype._addDynamicProperty=w.prototype.addDynamicProperty,{getTransformProperty:function(e,s,i){return new t(e,s,i)}}}();function q(){this.c=!1,this._length=0,this._maxLength=8,this.v=T(this._maxLength),this.o=T(this._maxLength),this.i=T(this._maxLength)}q.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=ft.newElement(),this.o[s]=ft.newElement(),this.i[s]=ft.newElement(),s+=1},q.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},q.prototype.doubleArrayLength=function(){this.v=this.v.concat(T(this._maxLength)),this.i=this.i.concat(T(this._maxLength)),this.o=this.o.concat(T(this._maxLength)),this._maxLength*=2},q.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}(!r[i]||r[i]&&!a)&&(r[i]=ft.newElement()),r[i][0]=t,r[i][1]=e},q.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)},q.prototype.reverse=function(){var t=new q;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 B=function(){var t=-999999;function e(t,e,s){var i,a,r,n,o,h,p,l,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=c,y=m.length-1,v=!0;v&&(d=m[g],!((u=m[g+1]).t-this.offsetTime>t));)g<y-1?g+=1:v=!1;if(c=g,!(r=1===d.h)){if(t>=u.t-this.offsetTime)l=1;else if(t<d.t-this.offsetTime)l=0;else{var b;d.__fnct?b=d.__fnct:(b=F.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y).get,d.__fnct=b),l=b((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,p=i.i[0].length,s.lastIndex=c,n=0;n<h;n+=1)for(o=0;o<p;o+=1)f=r?i.i[n][o]:i.i[n][o]+(a.i[n][o]-i.i[n][o])*l,e.i[n][o]=f,f=r?i.o[n][o]:i.o[n][o]+(a.o[n][o]-i.o[n][o])*l,e.o[n][o]=f,f=r?i.v[n][o]:i.v[n][o]+(a.v[n][o]-i.v[n][o])*l,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=ct.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&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{this.lock=!0,this._mdf=!1;var t,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k,s=this.effectsSequence.length;for(t=0;t<s;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}}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=ct.clone(a),this.pv=ct.clone(this.v),this.localShapeCollection=mt.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 p(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.k=!0,this.kf=!0;var n=this.keyframes[0].s[0].i.length;this.keyframes[0].s[0].i[0].length;this.v=ct.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,n),this.pv=ct.clone(this.v),this.localShapeCollection=mt.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=r,o.prototype.setVValue=a,o.prototype.addEffect=h,p.prototype.getValue=r,p.prototype.interpolateShape=e,p.prototype.setVValue=a,p.prototype.addEffect=h;var c=function(){var t=f;function e(t,e){this.v=ct.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=mt.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=G.getProp(t,e.p,1,0,this),this.s=G.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}},L([w],e),e}(),m=function(){function t(t,e){this.v=ct.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=G.getProp(t,e.ir,0,0,this),this.is=G.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=G.getProp(t,e.pt,0,0,this),this.p=G.getProp(t,e.p,1,0,this),this.r=G.getProp(t,e.r,0,l,this),this.or=G.getProp(t,e.or,0,0,this),this.os=G.getProp(t,e.os,0,.01,this),this.localShapeCollection=mt.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,p=this.os.v,l=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?p:l,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=-Math.PI/2,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),p=i*Math.sin(n),l=0===h&&0===p?0:p/Math.sqrt(h*h+p*p),f=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*r*a*o,p-f*r*a*o,h+l*r*a*o,p+f*r*a*o,t,!0),n+=s*o}this.paths.length=0,this.paths[0]=this.v}},L([w],t),t}(),d=function(){function t(t,e){this.v=ct.newElement(),this.v.c=!0,this.localShapeCollection=mt.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=G.getProp(t,e.p,1,0,this),this.s=G.getProp(t,e.s,1,0,this),this.r=G.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=n(s,i,this.r.v),r=a*(1-f);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(t){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},L([w],t),t}();var u={getShapeProp:function(t,e,s){var i;return 3===s||4===s?i=(3===s?e.pt:e.ks).k.length?new p(t,e,s):new o(t,e,s):5===s?i=new d(t,e):6===s?i=new c(t,e):7===s&&(i=new m(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return o},getKeyframedConstructorFunction:function(){return p}};return u}(),W=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 Y(){}function X(){}function H(){}function K(){}function Z(){this._length=0,this._maxLength=4,this.shapes=T(this._maxLength)}function J(t,e,s,i){this.elem=t,this.frameId=-1,this.dataProps=T(e.length),this.renderer=s,this.k=!1,this.dashStr="",this.dashArray=C("float32",e.length?e.length-1:0),this.dashoffset=C("float32",1),this.initDynamicPropertyContainer(i);var a,r,n=e.length||0;for(a=0;a<n;a+=1)r=G.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 U(t,e,s){this.data=e,this.c=C("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=C("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(s),this.prop=G.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}Y.prototype.initModifierProperties=function(){},Y.prototype.addShapeToModifier=function(){},Y.prototype.addShape=function(t){if(!this.closed){var e={shape:t.sh,data:t,localShapeCollection:mt.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},Y.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)},Y.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},L([w],Y),L([Y],X),X.prototype.initModifierProperties=function(t,e){this.s=G.getProp(t,e.s,0,.01,this),this.e=G.getProp(t,e.e,0,.01,this),this.o=G.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},X.prototype.addShapeToModifier=function(t){t.pathsData=[]},X.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=[],p=r.length;for(n=0;n<p;n+=1){var l,f;if((o=r[n]).e*a<i||o.s*a>i+s);else l=o.s*a<=i?0:(o.s*a-i)/s,f=o.e*a>=i+s?1:(o.e*a-i)/s,h.push([l,f])}return h.length||h.push([0,0]),h},X.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e<s;e+=1)dt.release(t[e]);return t.length=0,t},X.prototype.processShapes=function(t){var e,s,i;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),(e=(this.s.v>1?1:this.s.v<0?0:this.s.v)+a)>(s=(this.e.v>1?1:this.e.v<0?0:this.e.v)+a)){var r=e;e=s,s=r}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 n,o,h,p,l,f,c=this.shapes.length,m=0;if(s===e)for(n=0;n<c;n+=1)this.shapes[n].localShapeCollection.releaseShapes(),this.shapes[n].shape._mdf=!0,this.shapes[n].shape.paths=this.shapes[n].localShapeCollection;else if(1===s&&0===e||0===s&&1===e){if(this._mdf)for(n=0;n<c;n+=1)this.shapes[n].pathsData.length=0,this.shapes[n].shape._mdf=!0}else{var d,u,g=[];for(n=0;n<c;n+=1)if((d=this.shapes[n]).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(p=this.releasePathsData(d.pathsData),o=0;o<h;o+=1)l=O.getSegmentsLength(i.shapes[o]),p.push(l),f+=l.totalLength;d.totalShapeLength=f,d.pathsData=p}m+=f,d.shape._mdf=!0}else d.shape.paths=d.localShapeCollection;var y,v=e,b=s,P=0;for(n=c-1;n>=0;n-=1)if((d=this.shapes[n]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&c>1?(y=this.calculateShapeEdges(e,s,d.totalShapeLength,P,m),P+=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 _=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=_.pop();this.addPaths(_,u),_=this.addShapes(d,g[1],k)}else this.addPaths(_,u),_=this.addShapes(d,g[1]);this.addPaths(_,u)}}d.shape.paths=u}}},X.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;s<i;s+=1)e.addShape(t[s])},X.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)},X.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)},X.prototype.addShapes=function(t,e,s){var i,a,r,n,o,h,p,l,f=t.pathsData,c=t.shape.paths.shapes,m=t.shape.paths._length,d=0,u=[],g=!0;for(s?(o=s._length,l=s._length):(s=ct.newElement(),o=0,l=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):(p=O.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(p,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):(p=O.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(p,s,o,g),g=!1,s.c=!1)}else s.c=!1;d+=n.addedLength,o+=1}if(s._length&&(s.setXYAt(s.v[l][0],s.v[l][1],"i",l),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=ct.newElement(),g=!0,u.push(s),o=0)}return u},W.registerModifier("tm",X),L([Y],H),H.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=G.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},H.prototype.processPath=function(t,e){var s=ct.newElement();s.c=t.c;var i,a,r,n,o,h,p,l,c,m,d,u,g,y=t._length,v=0;for(i=0;i<y;i+=1)a=t.v[i],n=t.o[i],r=t.i[i],a[0]===n[0]&&a[1]===n[1]&&a[0]===r[0]&&a[1]===r[1]?0!==i&&i!==y-1||t.c?(o=0===i?t.v[y-1]:t.v[i-1],p=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,l=u=a[0]+(o[0]-a[0])*p,c=g=a[1]-(a[1]-o[1])*p,m=l-(l-a[0])*f,d=c-(c-a[1])*f,s.setTripleAt(l,c,m,d,u,g,v),v+=1,o=i===y-1?t.v[0]:t.v[i+1],p=(h=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(h/2,e)/h:0,l=m=a[0]+(o[0]-a[0])*p,c=d=a[1]+(o[1]-a[1])*p,u=l-(l-a[0])*f,g=c-(c-a[1])*f,s.setTripleAt(l,c,m,d,u,g,v),v+=1):(s.setTripleAt(a[0],a[1],n[0],n[1],r[0],r[1],v),v+=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],v),v+=1);return s},H.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((r=this.shapes[s]).shape.paths,n=r.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)},W.registerModifier("rd",H),L([Y],K),K.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=G.getProp(t,e.c,0,null,this),this.o=G.getProp(t,e.o,0,null,this),this.tr=j.getTransformProperty(t,e.tr,this),this.so=G.getProp(t,e.tr.so,0,.01,this),this.eo=G.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 E,this.rMatrix=new E,this.sMatrix=new E,this.tMatrix=new E,this.matrix=new E},K.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])},K.prototype.init=function(t,e,s,i){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]);for(;s>0;)s-=1,this._elements.unshift(e[s]),1;this.dynamicProperties.length?this.k=!0:this.getValue(!0)},K.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)},K.prototype.cloneElements=function(t){t.length;var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},K.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)},K.prototype.processShapes=function(t){var e,s,i,a,r;if(this._mdf||t){var n,o=Math.ceil(this.c.v);if(this._groups.length<o){for(;this._groups.length<o;){var h={it:this.cloneElements(this._elements),ty:"gr"};h.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,h),this._groups.splice(0,0,h),this._currentCopies+=1}this.elem.reloadShapes()}for(r=0,i=0;i<=this._groups.length-1;i+=1)n=r<o,this._groups[i]._render=n,this.changeGroupRender(this._groups[i].it,n),r+=1;this._currentCopies=o;var p=this.o.v,l=p%1,f=p>0?Math.floor(p):Math.ceil(p),c=(this.tr.v.props,this.pMatrix.props),m=this.rMatrix.props,d=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var u,g,y=0;if(p>0){for(;y<f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),y+=1;l&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,l,!1),y+=l)}else if(p<0){for(;y>f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),y-=1;l&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-l,!0),y-=l)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,r=this._currentCopies;r;){if(g=(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=this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==y){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(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]),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]),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]),u=0;u<g;u+=1)s[u]=this.matrix.props[u];this.matrix.reset()}else for(this.matrix.reset(),u=0;u<g;u+=1)s[u]=this.matrix.props[u];y+=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},K.prototype.addShape=function(){},W.registerModifier("rp",K),Z.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(T(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},Z.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)ct.release(this.shapes[t]);this._length=0},J.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}},L([w],J),U.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},U.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},U.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}},L([w],U);var Q=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},tt=function(){},et=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}(),st=function(){var t={};return t.createFilter=function(t){var e=createNS("filter");return e.setAttribute("id",t),e.setAttribute("filterUnits","objectBoundingBox"),e.setAttribute("x","0%"),e.setAttribute("y","0%"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e},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}();!function(){function t(t){return t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):void 0}}();function it(t,e,s){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=T(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}function at(t,e,s){var i={propType:!1},a=G.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,l,s):i,rx:r.rx?a(t,r.rx,0,l,s):i,ry:r.ry?a(t,r.ry,0,l,s):i,sk:r.sk?a(t,r.sk,0,l,s):i,sa:r.sa?a(t,r.sa,0,l,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=ht.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function rt(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 nt(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)}it.prototype.searchProperties=function(){var t,e,s=this._textData.a.length,i=G.getProp;for(t=0;t<s;t+=1)e=this._textData.a[t],this._animatorsData[t]=new at(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:this._textData.p.r,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)},it.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,p,l,f,c,m,d,u,g,y,v,b,P,_=this._moreOptions.alignment.v,A=this._animatorsData,C=this._textData,T=this.mHelper,S=this._renderType,w=this.renderedLetters.length,M=(this.data,t.l);if(this._hasMaskedPath){if(P=this._pathData.m,!this._pathData.n||this._pathData._mdf){var I,E=P.v;for(this._pathData.r&&(E=E.reverse()),n={tLength:0,segments:[]},r=E._length-1,y=0,a=0;a<r;a+=1)I=O.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+=I.segmentLength,n.segments.push(I),y+=I.segmentLength;a=r,P.v.c&&(I=O.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+=I.segmentLength,n.segments.push(I),y+=I.segmentLength),this._pathData.pi=n}if(n=this._pathData.pi,o=this._pathData.f.v,c=0,f=1,p=0,l=!0,u=n.segments,o<0&&P.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=M.length,s=0,i=0;var F,L,V,R,z=1.2*t.finalSize*.714,N=!0;V=A.length;var G,j,q,B,W,Y,X,H,K,Z,J,U,Q,tt=-1,et=o,st=c,it=f,at=-1,nt="",ot=this.defaultPropsArray;if(2===t.j||1===t.j){var ht=0,pt=0,lt=2===t.j?-.5:-1,ft=0,ct=!0;for(a=0;a<r;a+=1)if(M[a].n){for(ht&&(ht+=pt);ft<a;)M[ft].animatorJustifyOffset=ht,ft+=1;ht=0,ct=!0}else{for(L=0;L<V;L+=1)(F=A[L].a).t.propType&&(ct&&2===t.j&&(pt+=F.t.v*lt),(G=A[L].s.getMult(M[a].anIndexes[L],C.a[L].s.totalChars)).length?ht+=F.t.v*G[0]*lt:ht+=F.t.v*G*lt);ct=!1}for(ht&&(ht+=pt);ft<a;)M[ft].animatorJustifyOffset=ht,ft+=1}for(a=0;a<r;a+=1){if(T.reset(),W=1,M[a].n)s=0,i+=t.yOffset,i+=N?1:0,o=et,N=!1,0,this._hasMaskedPath&&(f=it,m=(d=u[c=st].points)[f-1],g=(h=d[f]).partialLength,p=0),Q=Z=U=nt="",ot=this.defaultPropsArray;else{if(this._hasMaskedPath){if(at!==M[a].line){switch(t.j){case 1:o+=y-t.lineWidths[M[a].line];break;case 2:o+=(y-t.lineWidths[M[a].line])/2}at=M[a].line}tt!==M[a].ind&&(M[tt]&&(o+=M[tt].extra),o+=M[a].an/2,tt=M[a].ind),o+=_[0]*M[a].an/200;var mt=0;for(L=0;L<V;L+=1)(F=A[L].a).p.propType&&((G=A[L].s.getMult(M[a].anIndexes[L],C.a[L].s.totalChars)).length?mt+=F.p.v[0]*G[0]:mt+=F.p.v[0]*G),F.a.propType&&((G=A[L].s.getMult(M[a].anIndexes[L],C.a[L].s.totalChars)).length?mt+=F.a.v[0]*G[0]:mt+=F.a.v[0]*G);for(l=!0;l;)p+g>=o+mt||!d?(v=(o+mt-p)/h.partialLength,q=m.point[0]+(h.point[0]-m.point[0])*v,B=m.point[1]+(h.point[1]-m.point[1])*v,T.translate(-_[0]*M[a].an/200,-_[1]*z/100),l=!1):d&&(p+=h.partialLength,(f+=1)>=d.length&&(f=0,u[c+=1]?d=u[c].points:P.v.c?(f=0,d=u[c=0].points):(p-=h.partialLength,d=null)),d&&(m=h,g=(h=d[f]).partialLength));j=M[a].an/2-M[a].add,T.translate(-j,0,0)}else j=M[a].an/2-M[a].add,T.translate(-j,0,0),T.translate(-_[0]*M[a].an/200,-_[1]*z/100,0);for(M[a].l/2,L=0;L<V;L+=1)(F=A[L].a).t.propType&&(G=A[L].s.getMult(M[a].anIndexes[L],C.a[L].s.totalChars),0===s&&0===t.j||(this._hasMaskedPath?G.length?o+=F.t.v*G[0]:o+=F.t.v*G:G.length?s+=F.t.v*G[0]:s+=F.t.v*G));for(M[a].l/2,t.strokeWidthAnim&&(X=t.sw||0),t.strokeColorAnim&&(Y=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]]),L=0;L<V;L+=1)(F=A[L].a).a.propType&&((G=A[L].s.getMult(M[a].anIndexes[L],C.a[L].s.totalChars)).length?T.translate(-F.a.v[0]*G[0],-F.a.v[1]*G[1],F.a.v[2]*G[2]):T.translate(-F.a.v[0]*G,-F.a.v[1]*G,F.a.v[2]*G));for(L=0;L<V;L+=1)(F=A[L].a).s.propType&&((G=A[L].s.getMult(M[a].anIndexes[L],C.a[L].s.totalChars)).length?T.scale(1+(F.s.v[0]-1)*G[0],1+(F.s.v[1]-1)*G[1],1):T.scale(1+(F.s.v[0]-1)*G,1+(F.s.v[1]-1)*G,1));for(L=0;L<V;L+=1){if(F=A[L].a,G=A[L].s.getMult(M[a].anIndexes[L],C.a[L].s.totalChars),F.sk.propType&&(G.length?T.skewFromAxis(-F.sk.v*G[0],F.sa.v*G[1]):T.skewFromAxis(-F.sk.v*G,F.sa.v*G)),F.r.propType&&(G.length?T.rotateZ(-F.r.v*G[2]):T.rotateZ(-F.r.v*G)),F.ry.propType&&(G.length?T.rotateY(F.ry.v*G[1]):T.rotateY(F.ry.v*G)),F.rx.propType&&(G.length?T.rotateX(F.rx.v*G[0]):T.rotateX(F.rx.v*G)),F.o.propType&&(G.length?W+=(F.o.v*G[0]-W)*G[0]:W+=(F.o.v*G-W)*G),t.strokeWidthAnim&&F.sw.propType&&(G.length?X+=F.sw.v*G[0]:X+=F.sw.v*G),t.strokeColorAnim&&F.sc.propType)for(K=0;K<3;K+=1)G.length?Y[K]=Y[K]+(F.sc.v[K]-Y[K])*G[0]:Y[K]=Y[K]+(F.sc.v[K]-Y[K])*G;if(t.fillColorAnim&&t.fc){if(F.fc.propType)for(K=0;K<3;K+=1)G.length?H[K]=H[K]+(F.fc.v[K]-H[K])*G[0]:H[K]=H[K]+(F.fc.v[K]-H[K])*G;F.fh.propType&&(H=G.length?D(H,F.fh.v*G[0]):D(H,F.fh.v*G)),F.fs.propType&&(H=G.length?k(H,F.fs.v*G[0]):k(H,F.fs.v*G)),F.fb.propType&&(H=G.length?x(H,F.fb.v*G[0]):x(H,F.fb.v*G))}}for(L=0;L<V;L+=1)(F=A[L].a).p.propType&&(G=A[L].s.getMult(M[a].anIndexes[L],C.a[L].s.totalChars),this._hasMaskedPath?G.length?T.translate(0,F.p.v[1]*G[0],-F.p.v[2]*G[1]):T.translate(0,F.p.v[1]*G,-F.p.v[2]*G):G.length?T.translate(F.p.v[0]*G[0],F.p.v[1]*G[1],-F.p.v[2]*G[2]):T.translate(F.p.v[0]*G,F.p.v[1]*G,-F.p.v[2]*G));if(t.strokeWidthAnim&&(Z=X<0?0:X),t.strokeColorAnim&&(J="rgb("+Math.round(255*Y[0])+","+Math.round(255*Y[1])+","+Math.round(255*Y[2])+")"),t.fillColorAnim&&t.fc&&(U="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),this._hasMaskedPath){if(T.translate(0,-t.ls),T.translate(0,_[1]*z/100+i,0),C.p.p){b=(h.point[1]-m.point[1])/(h.point[0]-m.point[0]);var dt=180*Math.atan(b)/Math.PI;h.point[0]<m.point[0]&&(dt+=180),T.rotate(-dt*Math.PI/180)}T.translate(q,B,0),o-=_[0]*M[a].an/200,M[a+1]&&tt!==M[a+1].ind&&(o+=M[a].an/2,o+=t.tr/1e3*t.finalSize)}else{switch(T.translate(s,i,0),t.ps&&T.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:T.translate(M[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[M[a].line]),0,0);break;case 2:T.translate(M[a].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[M[a].line])/2,0,0)}T.translate(0,-t.ls),T.translate(j,0,0),T.translate(_[0]*M[a].an/200,_[1]*z/100,0),s+=M[a].l+t.tr/1e3*t.finalSize}"html"===S?nt=T.toCSS():"svg"===S?nt=T.to2dCSS():ot=[T.props[0],T.props[1],T.props[2],T.props[3],T.props[4],T.props[5],T.props[6],T.props[7],T.props[8],T.props[9],T.props[10],T.props[11],T.props[12],T.props[13],T.props[14],T.props[15]],Q=W}w<=a?(R=new rt(Q,Z,J,U,nt,ot),this.renderedLetters.push(R),w+=1,this.lettersChangedFlag=!0):(R=this.renderedLetters[a],this.lettersChangedFlag=R.update(Q,Z,J,U,nt,ot)||this.lettersChangedFlag)}}},it.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},it.prototype.mHelper=new E,it.prototype.defaultPropsArray=[],L([w],it),rt.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},nt.prototype.defaultBoxWidth=[0,0],nt.prototype.copyData=function(t,e){for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t},nt.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},nt.prototype.searchProperty=function(){return this.searchKeyframes()},nt.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},nt.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},nt.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{this.lock=!0,this._mdf=!1;var i,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.pv=this.v=this.currentData,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},nt.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,s=0,i=t.length;s<=i-1&&(t[s].s,!(s===i-1||t[s+1].t>e));)s+=1;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d.k[this.keysIndex].s},nt.prototype.buildFinalText=function(t){for(var e=N.getCombinedCharacterCodes(),s=[],i=0,a=t.length;i<a;)-1!==e.indexOf(t.charCodeAt(i))?s[s.length-1]+=t.charAt(i):s.push(t.charAt(i)),i+=1;return s},nt.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,o,h=this.elem.globalData.fontManager,p=this.data,l=[],f=0,c=p.m.g,m=0,d=0,u=0,g=[],y=0,v=0,b=h.getFontByName(t.f),P=0,_=b.fStyle?b.fStyle.split(" "):[],k="normal",x="normal";for(s=_.length,e=0;e<s;e+=1)switch(_[e].toLowerCase()){case"italic":x="italic";break;case"bold":k="700";break;case"black":k="900";break;case"medium":k="500";break;case"regular":case"normal":k="400";break;case"light":case"thin":k="200"}t.fWeight=b.fWeight||k,t.fStyle=x,s=t.t.length,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),t.finalLineHeight=t.lh;var D,A=t.tr/1e3*t.finalSize;if(t.sz)for(var C,T,S=!0,w=t.sz[0],M=t.sz[1];S;){C=0,y=0,s=(T=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var I=-1;for(e=0;e<s;e+=1)D=T[e].charCodeAt(0),i=!1," "===T[e]?I=e:13!==D&&3!==D||(y=0,i=!0,C+=t.finalLineHeight||1.2*t.finalSize),h.chars?(o=h.getCharData(T[e],b.fStyle,b.fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(T[e],t.f,t.finalSize),y+P>w&&" "!==T[e]?(-1===I?s+=1:e=I,C+=t.finalLineHeight||1.2*t.finalSize,T.splice(e,I===e?1:0,"\r"),I=-1,y=0):(y+=P,y+=A);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&M<C?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=T,s=t.finalText.length,S=!1)}y=-A,P=0;var E,F=0;for(e=0;e<s;e+=1)if(i=!1,D=(E=t.finalText[e]).charCodeAt(0)," "===E?a=" ":13===D||3===D?(F=0,g.push(y),v=y>v?y:v,y=-2*A,a="",i=!0,u+=1):a=t.finalText[e],h.chars?(o=h.getCharData(E,b.fStyle,h.getFontByName(t.f).fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(a,t.f,t.finalSize)," "===E?F+=P+A:(y+=P+A+F,F=0),l.push({l:P,an:P,add:m,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==c){if(m+=P,""===a||" "===a||e===s-1){for(""!==a&&" "!==a||(m-=P);d<=e;)l[d].an=m,l[d].ind=f,l[d].extra=P,d+=1;f+=1,m=0}}else if(3==c){if(m+=P,""===a||e===s-1){for(""===a&&(m-=P);d<=e;)l[d].an=m,l[d].ind=f,l[d].extra=P,d+=1;m=0,f+=1}}else l[f].ind=f,l[f].extra=0,f+=1;if(t.l=l,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 L,V,R=p.a;n=R.length;var O,z,N=[];for(r=0;r<n;r+=1){for((L=R[r]).a.sc&&(t.strokeColorAnim=!0),L.a.sw&&(t.strokeWidthAnim=!0),(L.a.fc||L.a.fh||L.a.fs||L.a.fb)&&(t.fillColorAnim=!0),z=0,O=L.s.b,e=0;e<s;e+=1)(V=l[e]).anIndexes[r]=z,(1==O&&""!==V.val||2==O&&""!==V.val&&" "!==V.val||3==O&&(V.n||" "==V.val||e==s-1)||4==O&&(V.n||e==s-1))&&(1===L.s.rn&&N.push(z),z+=1);p.a[r].s.totalChars=z;var G,j=-1;if(1===L.s.rn)for(e=0;e<s;e+=1)j!=(V=l[e]).anIndexes[r]&&(j=V.anIndexes[r],G=N.splice(Math.floor(Math.random()*N.length),1)[0]),V.anIndexes[r]=G}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},nt.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)},nt.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},nt.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},nt.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var ot,ht=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=G.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?G.getProp(t,e.e,0,0,this):{v:100},this.o=G.getProp(t,e.o||{k:0},0,0,this),this.xe=G.getProp(t,e.xe||{k:0},0,0,this),this.ne=G.getProp(t,e.ne||{k:0},0,0,this),this.a=G.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=F.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get,r=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)r=a(r=o===n?i>=o?1:0:t(0,e(.5/(o-n)+(i-n)/(o-n),1)));else if(3==h)r=a(r=o===n?i>=o?0:1:1-t(0,e(.5/(o-n)+(i-n)/(o-n),1)));else if(4==h)o===n?r=0:(r=t(0,e(.5/(o-n)+(i-n)/(o-n),1)))<.5?r*=2:r=1-2*(r-.5),r=a(r);else if(5==h){if(o===n)r=0;else{var p=o-n,l=-p/2+(i=e(t(0,i+.5-n),o-n)),f=p/2;r=Math.sqrt(1-l*l/(f*f))}r=a(r)}else 6==h?(o===n?r=0:(i=e(t(0,i+.5-n),o-n),r=(1+Math.cos(Math.PI+2*Math.PI*i/(o-n)))/2),r=a(r)):(i>=s(n)&&(r=i-n<0?1-(n-i):t(0,e(o-i,1))),r=a(r));return r*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}},L([w],i),{getTextSelectorProp:function(t,e,s){return new i(t,e,s)}}}(),pt=function(t,e,s,i){var a=0,r=t,n=T(r);function o(){return a?n[a-=1]:e()}return{newElement:o,release:function(t){a===r&&(n=lt.double(n),r*=2),s&&s(t),n[a]=t,a+=1}}},lt={double:function(t){return t.concat(T(t.length))}},ft=pt(8,(function(){return C("float32",2)})),ct=((ot=pt(4,(function(){return new q}),(function(t){var e,s=t._length;for(e=0;e<s;e+=1)ft.release(t.v[e]),ft.release(t.i[e]),ft.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=ot.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},ot),mt=function(){var t={newShapeCollection:function(){var t;t=e?i[e-=1]:new Z;return t},release:function(t){var a,r=t._length;for(a=0;a<r;a+=1)ct.release(t.shapes[a]);t._length=0,e===s&&(i=lt.double(i),s*=2);i[e]=t,e+=1}},e=0,s=4,i=T(s);return t}(),dt=pt(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,s=t.lengths.length;for(e=0;e<s;e+=1)ut.release(t.lengths[e]);t.lengths.length=0})),ut=pt(8,(function(){return{addedLength:0,percents:C("float32",p),lengths:C("float32",p)}}));function gt(){}function yt(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=b();i.setAttribute("id",a),i.textContent=e.title,this.svgElement.appendChild(i),s+=a}if(e&&e.description){var r=createNS("desc"),n=b();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",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!e||!1!==e.hideOnTransparent,viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||""},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function vt(e,s){this.animationItem=e,this.renderConfig={clearCanvas:!s||void 0===s.clearCanvas||s.clearCanvas,context:s&&s.context||null,progressiveLoad:s&&s.progressiveLoad||!1,preserveAspectRatio:s&&s.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:s&&s.imagePreserveAspectRatio||"xMidYMid slice",className:s&&s.className||""},this.renderConfig.dpr=s&&s.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=s&&s.dpr||t.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new Nt,this.elements=[],this.pendingElements=[],this.transformMat=new E,this.completeLayers=!1,this.rendererType="canvas"}function bt(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=this.globalData.defs,r=this.masksProperties?this.masksProperties.length:0;this.viewData=T(r),this.solidPath="";var n,o,h,p,l,f,c,m=this.masksProperties,d=0,u=[],g=b(),y="clipPath",v="clip-path";for(i=0;i<r;i++)if(("a"!==m[i].mode&&"n"!==m[i].mode||m[i].inv||100!==m[i].o.k)&&(y="mask",v="mask"),"s"!=m[i].mode&&"i"!=m[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)),n=createNS("path"),"n"!=m[i].mode){var P;if(d+=1,n.setAttribute("fill","s"===m[i].mode?"#000000":"#ffffff"),n.setAttribute("clip-rule","nonzero"),0!==m[i].x.k?(y="mask",v="mask",c=G.getProp(this.element,m[i].x,0,null,this.element),P=b(),(l=createNS("filter")).setAttribute("id",P),(f=createNS("feMorphology")).setAttribute("operator","erode"),f.setAttribute("in","SourceGraphic"),f.setAttribute("radius","0"),l.appendChild(f),a.appendChild(l),n.setAttribute("stroke","s"===m[i].mode?"#000000":"#ffffff")):(f=null,c=null),this.storedData[i]={elem:n,x:c,expan:f,lastPath:"",lastOperator:"",filterId:P,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+"_"+d),k.appendChild(n),a.appendChild(k),_.setAttribute("mask","url(#"+g+"_"+d+")"),u.length=0,u.push(_)}else u.push(n);m[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:n,lastPath:"",op:G.getProp(this.element,m[i].o,0,.01,this.element),prop:B.getShapeProp(this.element,m[i],3),invRect:p},this.viewData[i].prop.k||this.drawPath(m[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={op:G.getProp(this.element,m[i].o,0,.01,this.element),prop:B.getShapeProp(this.element,m[i],3),elem:n,lastPath:""},a.appendChild(n);for(this.maskElement=createNS(y),r=u.length,i=0;i<r;i+=1)this.maskElement.appendChild(u[i]);d>0&&(this.maskElement.setAttribute("id",g),"clip-path"==v?this.element.maskedElement.style.clipPath="url(#"+g+")":"mask"==v&&(this.element.maskedElement.style.mask="url(#"+g+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function Pt(){}function _t(){}function kt(){}function xt(){}function Dt(){}function At(t,e){this.elem=t,this.pos=e}function Ct(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 Tt(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function St(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function wt(t,e,s,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var a=4;"rc"==e.ty?a=5:"el"==e.ty?a=6:"sr"==e.ty&&(a=7),this.sh=B.getShapeProp(t,e,a,t);var r,n,o=s.length;for(r=0;r<o;r+=1)s[r].closed||(n={transforms:i.addTransformSequence(s[r].transforms),trNodes:[]},this.styledShapes.push(n),s[r].elements.push(n))}function Mt(){}function It(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initFrame(),this.initTransform(t,e,s),this.initHierarchy()}function Et(){}function Ft(){}function Lt(){}function Vt(){}function Rt(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 Ot(t,e,s){this.initElement(t,e,s)}function zt(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 Nt(){this.saved=[],this.cArrPos=0,this.cTr=new E,this.cO=1;var t;for(this.savedOp=C("float32",15),t=0;t<15;t+=1)this.saved[t]=C("float32",16);this._length=15}function Gt(){}function jt(t,e,s){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=T(this.layers.length),this.initElement(t,e,s),this.tm=t.tm?G.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function qt(t,e){this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=T(this.masksProperties.length);var s,i=this.masksProperties.length,a=!1;for(s=0;s<i;s++)"n"!==this.masksProperties[s].mode&&(a=!0),this.viewData[s]=B.getShapeProp(this.element,this.masksProperties[s],3);this.hasMasks=a,a&&this.element.addRenderableComponent(this)}function Bt(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new St,this.initElement(t,e,s)}function Wt(t,e,s){this.initElement(t,e,s)}function Yt(){}gt.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e--)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()},gt.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 13:return this.createCamera(t)}return this.createNull(t)},gt.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},gt.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},gt.prototype.includeLayers=function(t){this.completeLayers=!1;var e,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}},gt.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},gt.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},gt.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},gt.prototype.addPendingElement=function(t){this.pendingElements.push(t)},gt.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)}},gt.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new N,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.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},L([gt],yt),yt.prototype.createNull=function(t){return new It(t,this.globalData,this)},yt.prototype.createShape=function(t){return new zt(t,this.globalData,this)},yt.prototype.createText=function(t){return new SVGTextElement(t,this.globalData,this)},yt.prototype.createImage=function(t){return new Rt(t,this.globalData,this)},yt.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},yt.prototype.createSolid=function(t){return new Ot(t,this.globalData,this)},yt.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.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),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=b();s.setAttribute("id",a),s.appendChild(i),this.layerElement.setAttribute("clip-path","url(#"+a+")"),e.appendChild(s),this.layers=t.layers,this.elements=T(t.layers.length)},yt.prototype.destroy=function(){this.animationItem.wrapper.replaceChildren(),this.layerElement=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t++)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},yt.prototype.updateContainerSize=function(){},yt.prototype.buildItem=function(t){var s=this.elements;if(!s[t]&&99!=this.layers[t].ty){s[t]=!0;var i=this.createItem(this.layers[t]);s[t]=i,e&&(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(s[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(i)))}},yt.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}}},yt.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){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 e,s=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=s-1;e>=0;e--)(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()}},yt.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)}},yt.prototype.hide=function(){this.layerElement.style.display="none"},yt.prototype.show=function(){this.layerElement.style.display="block"},L([gt],vt),vt.prototype.createShape=function(t){return new Bt(t,this.globalData,this)},vt.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},vt.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},vt.prototype.createComp=function(t){return new jt(t,this.globalData,this)},vt.prototype.createSolid=function(t){return new Wt(t,this.globalData,this)},vt.prototype.createNull=yt.prototype.createNull,vt.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])},vt.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)},vt.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},vt.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var s,i=this.contextData.saved[this.contextData.cArrPos];for(s=0;s<16;s+=1)i[s]=e[s];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},vt.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()},vt.prototype.configAnimation=function(t){this.animationItem.wrapper?(this.animationItem.container=S("canvas"),this.animationItem.container.style.width="100%",this.animationItem.container.style.height="100%",this.animationItem.container.style.transformOrigin=this.animationItem.container.style.mozTransformOrigin=this.animationItem.container.style.webkitTransformOrigin=this.animationItem.container.style["-webkit-transform"]="0px 0px 0px",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.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=T(t.layers.length),this.updateContainerSize()},vt.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)},vt.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper.replaceChildren(),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},vt.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){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 s,i=this.layers.length;for(this.completeLayers||this.checkLayers(t),s=0;s<i;s++)(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()}}},vt.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()}},vt.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},vt.prototype.hide=function(){this.animationItem.container.style.display="none"},vt.prototype.show=function(){this.animationItem.container.style.display="block"},vt.prototype.configAnimation=function(t){this.animationItem.wrapper?(this.animationItem.container=S("canvas"),this.animationItem.container.style.width="100%",this.animationItem.container.style.height="100%",this.animationItem.container.style.transformOrigin=this.animationItem.container.style.mozTransformOrigin=this.animationItem.container.style.webkitTransformOrigin=this.animationItem.container.style["-webkit-transform"]="0px 0px 0px",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.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.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h},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=T(t.layers.length),this.updateContainerSize()},bt.prototype.getMaskProperty=function(t){return this.viewData[t].prop},bt.prototype.renderFrame=function(t){var e,s=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e++)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("x",-s.props[12]),this.viewData[e].invRect.setAttribute("y",-s.props[13])),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(#"+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))}},bt.prototype.getMaskelement=function(){return this.maskElement},bt.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+" "},bt.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}},bt.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},Pt.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,[])}},_t.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)}},kt.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?j.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new E},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=!0,i=this.comp;s;)i.finalTransform?(i.data.hasMask&&e.splice(0,0,i.finalTransform),i=i.comp):s=!1;var a,r,n=e.length;for(a=0;a<n;a+=1)r=e[a].mat.applyToPointArray(0,0,0),t=[t[0]-r[0],t[1]-r[1],0];return t},mHelper:new E},xt.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}}},L([xt,R({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()}})],Dt),Ct.prototype.setAsAnimated=function(){this._isAnimated=!0},St.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 E,_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++}},wt.prototype.setAsAnimated=Ct.prototype.setAsAnimated,Mt.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=ee(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=ae.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=se(this):4===this.data.ty?(this.layerInterface.shapeInterface=$t(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=te(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=b(),this.data.sr||(this.data.sr=1),this.effectsManager=new ue(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},It.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},It.prototype.renderFrame=function(){},It.prototype.getBaseElement=function(){return null},It.prototype.destroy=function(){},It.prototype.sourceRectAtTime=function(){},It.prototype.hide=function(){},L([Mt,kt,Pt,_t],It),Et.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),et.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=b(),e=st.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(st.createAlphaToLuminanceFilter()),(s=createNS("g")).appendChild(this.layerElement),i=s,a.appendChild(s),s.setAttribute("filter","url(#"+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=b(),e=st.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(#"+t+")"),n.appendChild(p),n.appendChild(this.layerElement),i=n,et.maskType||(r.setAttribute("mask-type","luminance"),e.appendChild(st.createAlphaToLuminanceFilter()),s=createNS("g"),n.appendChild(p),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 l=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 c=b();if(l.setAttribute("id",c),l.appendChild(f),this.globalData.defs.appendChild(l),this.checkMasks()){var m=createNS("g");m.setAttribute("clip-path","url(#"+c+")"),m.appendChild(this.layerElement),this.transformedElement=m,i?i.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url(#"+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 bt(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")}},Ft.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;t-=1)this.shapeModifiers[t].processShapes(this._isFirstFrame)}},lcEnum:{1:"butt",2:"round",3:"square"},ljEnum:{1:"miter",2:"round",3:"bevel"},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 At(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},Lt.prototype.initElement=function(t,e,s){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textProperty=new nt(this,t.t,this.dynamicProperties),this.textAnimator=new it(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)},Lt.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)},Lt.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+=Q(i,i.i.length,!0,t);return r},Lt.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},Lt.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},Lt.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},Lt.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)},Lt.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},Lt.prototype.emptyProp=new rt,Lt.prototype.destroy=function(){},L([Mt,kt,Pt,_t,Dt],Vt),Vt.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()},Vt.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))}},Vt.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()},Vt.prototype.setElements=function(t){this.elements=t},Vt.prototype.getElements=function(){return this.elements},Vt.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},Vt.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},L([Mt,kt,Et,Pt,_t,Dt],Rt),Rt.prototype.createContent=function(){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.layerElement.appendChild(this.innerElem)},Rt.prototype.sourceRectAtTime=function(){return this.sourceRect},L([Rt],Ot),Ot.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)},L([Mt,kt,Et,Ft,Pt,_t,Dt],zt),zt.prototype.initSecondaryElement=function(){},zt.prototype.identityMatrix=new E,zt.prototype.buildExpressionInterface=function(){},zt.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},zt.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)}},zt.prototype.setShapesAsAnimated=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e].setAsAnimated()},zt.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(#"+s.maskId+")"))}return"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",this.lcEnum[t.lc]||"round"),a.setAttribute("stroke-linejoin",this.ljEnum[t.lj]||"round"),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},zt.prototype.createGroupElement=function(t){var e=new Tt;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},zt.prototype.createTransformElement=function(t,e){var s=j.getTransformProperty(this,t,this),i=new SVGTransformData(s,s.o,e);return this.addToAnimatedContents(t,i),i},zt.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 Ct(e,s,B.getShapeProp(this,t,i,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(t,a),a},zt.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})},zt.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])},zt.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,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()},zt.prototype.searchShapes=function(t,e,s,i,a,r,n){var o,h,p,l,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)c?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],a),t[o]._render&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"==t[o].ty){if(c)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,a+1,m,n),t[o]._render&&i.appendChild(e[o].gr)}else"tr"==t[o].ty?(c||(e[o]=this.createTransformElement(t[o],i)),l=e[o].transform,m.push(l)):"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?(c?(f=e[o]).closed=!1:((f=W.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=W.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},zt.prototype.renderInnerContent=function(){this.renderModifiers();var t,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"))},zt.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)},zt.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},Nt.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=C("float32",t),this.savedOp.set(e);var s=0;for(s=this._length;s<t;s+=1)this.saved[s]=C("float32",16);this._length=t},Nt.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},Gt.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new Yt(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=I(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new qt(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(){this.hidden||this.data.hd||(this.renderTransform(),this.renderRenderable(),this.setBlendMode(),this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(),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 E},Gt.prototype.hide=Gt.prototype.hideElement,Gt.prototype.show=Gt.prototype.showElement,L([vt,Vt,Gt],jt),jt.prototype.renderInnerContent=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},jt.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},qt.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++)if("n"!==this.masksProperties[t].mode){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 o,h=i._length;for(o=1;o<h;o++)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()}},qt.prototype.getMaskProperty=bt.prototype.getMaskProperty,qt.prototype.destroy=function(){this.element=null},L([Mt,kt,Gt,Ft,Pt,_t,xt],Bt),Bt.prototype.initElement=Dt.prototype.initElement,Bt.prototype.transformHelper={opacity:1,_opMdf:!1},Bt.prototype.dashResetter=[],Bt.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},Bt.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=G.getProp(this,t.c,1,255,this),i.c.k||(s.co="rgb("+r(i.c.v[0])+","+r(i.c.v[1])+","+r(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=G.getProp(this,t.s,1,null,this),i.e=G.getProp(this,t.e,1,null,this),i.h=G.getProp(this,t.h||{k:0},0,.01,this),i.a=G.getProp(this,t.a||{k:0},0,l,this),i.g=new U(this,t.g,this)),i.o=G.getProp(this,t.o,0,.01,this),"st"==t.ty||"gs"==t.ty){if(s.lc=this.lcEnum[t.lc]||"round",s.lj=this.ljEnum[t.lj]||"round",1==t.lj&&(s.ml=t.ml),i.w=G.getProp(this,t.w,0,null,this),i.w.k||(s.wi=i.w.v),t.d){var a=new J(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},Bt.prototype.createGroupElement=function(t){return{it:[],prevViewData:[]}},Bt.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:G.getProp(this,t.o,0,.01,this),mProps:j.getTransformProperty(this,t,this)}}},Bt.prototype.createShapeElement=function(t){var e=new wt(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},Bt.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,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)},Bt.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)},Bt.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()},Bt.prototype.closeStyles=function(t){var e,s=t.length;for(e=0;e<s;e+=1)t[e].closed=!0},Bt.prototype.searchShapes=function(t,e,s,i,a){var r,n,o,h,p,l,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||(l=this.createTransformElement(t[r]),e[r]=l),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?(h?(p=e[r]).closed=!1:((p=W.getModifier(t[r].ty)).init(this,t[r]),e[r]=p,this.shapeModifiers.push(p)),m.push(p)):"rp"==t[r].ty&&(h?(p=e[r]).closed=!0:(p=W.getModifier(t[r].ty),e[r]=p,p.init(this,t,r,e),this.shapeModifiers.push(p),i=!1),m.push(p));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},Bt.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)},Bt.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},Bt.prototype.drawLayer=function(){var t,e,s,i,a,r,n,o,h,p=this.stylesList.length,l=this.globalData.renderer,f=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(),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,l.ctxOpacity(h.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),l.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),l.restore()}},Bt.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()},Bt.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 p=n.shapes[a];if(p&&p.v){for(i=p._length,s=1;s<i;s+=1)1===s&&r.push({t:"m",p:h.applyToPointArray(p.v[0][0],p.v[0][1],0)}),r.push({t:"c",pts:h.applyToTriplePoints(p.o[s-1],p.i[s],p.v[s])});1===i&&r.push({t:"m",p:h.applyToPointArray(p.v[0][0],p.v[0][1],0)}),p.c&&i&&(r.push({t:"c",pts:h.applyToTriplePoints(p.o[s-1],p.i[0],p.v[0])}),r.push({t:"z"}))}}t.trNodes=r}},Bt.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)}},Bt.prototype.renderFill=function(t,e,s){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+r(e.c.v[0])+","+r(e.c.v[1])+","+r(e.c.v[2])+")"),(e.o._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*s.opacity)},Bt.prototype.renderGradientFill=function(t,e,s){var i=e.style;if(!i.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a=this.globalData.canvasContext,r=e.s.v,n=e.e.v;if(1===t.t)c=a.createLinearGradient(r[0],r[1],n[0],n[1]);else var o=Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2)),h=Math.atan2(n[1]-r[1],n[0]-r[0]),p=o*(e.h.v>=1?.99:e.h.v<=-1?-.99:e.h.v),l=Math.cos(h+e.a.v)*p+r[0],f=Math.sin(h+e.a.v)*p+r[1],c=a.createRadialGradient(l,f,0,r[0],r[1],o);var m,d=t.g.p,u=e.g.c,g=1;for(m=0;m<d;m+=1)e.g._hasOpacity&&e.g._collapsable&&(g=e.g.o[2*m+1]),c.addColorStop(u[4*m]/100,"rgba("+u[4*m+1]+","+u[4*m+2]+","+u[4*m+3]+","+g+")");i.grd=c}i.coOp=e.o.v*s.opacity},Bt.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("+r(e.c.v[0])+","+r(e.c.v[1])+","+r(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)},Bt.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},L([Mt,kt,Gt,Pt,_t,xt],Wt),Wt.prototype.initElement=zt.prototype.initElement,Wt.prototype.prepareFrame=Rt.prototype.prepareFrame,Wt.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},Yt.prototype.renderFrame=function(){};var Xt=function(){var t={},e=[],s=0,i=0,a=0,r=!0,n=!1;function o(t){for(var s=0,a=t.target;s<i;)e[s].animation===a&&(e.splice(s,1),s-=1,i-=1,a.isPaused||p()),s+=1}function h(){a+=1,m()}function p(){a-=1}function l(t,s){t.addEventListener("destroy",o),t.addEventListener("_active",h),t.addEventListener("_idle",p),e.push({elem:s,animation:t}),i+=1}function f(t){var o,h=t-s;for(o=0;o<i;o+=1)e[o].animation.advanceTime(h);s=t,a&&!n?requestAnimationFrame(f):r=!0}function c(t){s=t,requestAnimationFrame(f)}function m(){!n&&a&&r&&(requestAnimationFrame(c),r=!1)}return t.registerAnimation=function(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 Ht;return l(r,t),r.setData(t,s),r},t.loadAnimation=function(t){var e=new Ht;return l(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){throw new Error("Cannot access DOM from worker thread")},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(){n=!0},t.unfreeze=function(){n=!1,m()},t.getRegisteredAnimations=function(){var t,s=e.length,i=[];for(t=0;t<s;t+=1)i.push(e[t].animation);return i},t}(),Ht=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=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=b(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.subframeEnabled=true,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=h(),this.imagePreloader=new tt};L([A],Ht),Ht.prototype.setParams=function(t){t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e=t.animType?t.animType:t.renderer?t.renderer:"svg";switch(e){case"canvas":this.renderer=new vt(this,t.rendererSettings);break;case"svg":this.renderer=new yt(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||(!1===t.loop?this.loop=!1:!0===t.loop?this.loop=!0:this.loop=parseInt(t.loop)),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!t.hasOwnProperty("autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,t.animationData?this.configAnimation(t.animationData):t.path&&("json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json"),-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")),null.load(t.path,this.configAnimation.bind(this),function(){this.trigger("data_failed")}.bind(this)))},Ht.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?"object"==typeof e?e:JSON.parse(e):null},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:"";""===a||(s.loop="false"!==a&&("true"===a||parseInt(a)));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)},Ht.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var s,i,a=this.animationData.layers,r=a.length,n=t.layers,o=n.length;for(i=0;i<o;i+=1)for(s=0;s<r;){if(a[s].id==n[i].id){a[s]=n[i];break}s+=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,s=0;s<r;s+=1)this.animationData.assets.push(t.assets[s]);this.animationData.__complete=!1,z.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),e&&e.initExpressions(this),this.loadNextSegment()},Ht.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,null.load(s,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},Ht.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},Ht.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},Ht.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},Ht.prototype.configAnimation=function(t){this.renderer&&(this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.renderer.searchExtraCompositions(t.assets),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded())},Ht.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.loaded()?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},Ht.prototype.checkLoaded=function(){this.isLoaded||!this.renderer.globalData.fontManager.loaded()||!this.imagePreloader.loaded()&&"canvas"===this.renderer.rendererType||(this.isLoaded=!0,z.completeData(this.animationData,this.renderer.globalData.fontManager),e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},Ht.prototype.resize=function(){this.renderer.updateContainerSize()},Ht.prototype.setSubframe=function(t){this.subframeEnabled=!!t},Ht.prototype.gotoFrame=function(){this.currentFrame=this.subframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},Ht.prototype.renderFrame=function(){!1!==this.isLoaded&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},Ht.prototype.play=function(t){t&&this.name!=t||!0===this.isPaused&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.trigger("_active")))},Ht.prototype.pause=function(t){t&&this.name!=t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"))},Ht.prototype.togglePause=function(t){t&&this.name!=t||(!0===this.isPaused?this.play():this.pause())},Ht.prototype.stop=function(t){t&&this.name!=t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},Ht.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())},Ht.prototype.goToAndPlay=function(t,e,s){this.goToAndStop(t,e,s),this.play()},Ht.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"))}},Ht.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.timeCompleted=this.totalFrames=t[0]-t[1],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.timeCompleted=this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},Ht.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.timeCompleted=this.totalFrames=e-t,-1!==s&&this.goToAndStop(s,!0)},Ht.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()},Ht.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},Ht.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},Ht.prototype.destroy=function(t){t&&this.name!=t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=this.onLoopComplete=this.onComplete=this.onSegmentStart=this.onDestroy=null,this.renderer=null)},Ht.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},Ht.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},Ht.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},Ht.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},Ht.prototype.getPath=function(){return this.path},Ht.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},Ht.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}},Ht.prototype.hide=function(){this.renderer.hide()},Ht.prototype.show=function(){this.renderer.show()},Ht.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},Ht.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new m(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 d(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 m(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 d(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))},Ht.prototype.setParams=function(t){t.context&&(this.context=t.context);var e=t.animType?t.animType:t.renderer?t.renderer:"svg";switch(e){case"canvas":this.renderer=new vt(this,t.rendererSettings);break;default:throw new Error("Only canvas renderer is supported when using worker.")}if(this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||(!1===t.loop?this.loop=!1:!0===t.loop?this.loop=!0:this.loop=parseInt(t.loop)),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!t.hasOwnProperty("autoloadSegments")||t.autoloadSegments,this.assetsPath=null,t.animationData)this.configAnimation(t.animationData);else if(t.path)throw new Error("Canvas worker renderer cannot load animation from url")},Ht.prototype.setData=function(t,e){throw new Error("Cannot set data on wrapper for canvas worker renderer")},Ht.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var s,i,a=this.animationData.layers,r=a.length,n=t.layers,o=n.length;for(i=0;i<o;i+=1)for(s=0;s<r;){if(a[s].id==n[i].id){a[s]=n[i];break}s+=1}this.animationData.__complete=!1,z.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),e&&e.initExpressions(this),this.loadNextSegment()},Ht.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(t&&0!==t.length&&this.autoloadSegments)throw new Error("Cannot load multiple segments in worker.");this.timeCompleted=this.totalFrames},Ht.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},Ht.prototype.imagesLoaded=null,Ht.prototype.preloadImages=null,Ht.prototype.configAnimation=function(t){this.renderer&&(this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.renderer.searchExtraCompositions(t.assets),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.loadSegments(),this.updaFrameModifier(),this.checkLoaded())},Ht.prototype.waitForFontsLoaded=null,Ht.prototype.checkLoaded=function(){this.isLoaded||(this.isLoaded=!0,z.completeData(this.animationData,null),e&&e.initExpressions(this),this.renderer.initItems(),this.gotoFrame())},Ht.prototype.destroy=function(t){t&&this.name!=t||!this.renderer||(this.renderer.destroy(),this._cbs=null,this.onEnterFrame=this.onLoopComplete=this.onComplete=this.onSegmentStart=this.onDestroy=null,this.renderer=null)},Ht.prototype.getPath=null;var Kt=function(){var t={};return t.initExpressions=function(t){var e=0,s=[];t.renderer.compInterface=se(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=s.length;for(t=0;t<e;t+=1)s[t].release();s.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){-1===s.indexOf(t)&&s.push(t)}},t}();e=Kt;var Zt=function(){var t={},e=o;F.getBezierEasing(.333,0,.833,.833,"easeIn").get,F.getBezierEasing(.167,.167,.667,1,"easeOut").get,F.getBezierEasing(.33,0,.667,1,"easeInOut").get;return t.initiateExpression=function(t,s,i){var a,r,n,h,p,l,f,c,m,d=s.x,u=/velocity(?![\w\d])/.test(d),g=-1!==d.indexOf("random"),y=t.data.ty,v=i;v.valueAtTime=v.getValueAtTime,Object.defineProperty(v,"value",{get:function(){return v.v}}),t.comp.frameDuration=1/t.comp.globalData.frameRate,t.comp.displayStartTime=0,t.data.ip,t.comp.globalData.frameRate,t.data.op,t.comp.globalData.frameRate,t.data.sw&&t.data.sw,t.data.sh&&t.data.sh,t.data.nm,i.kf&&s.k.length,!this.data||this.data.hd,function(t,s){var i,a,r=this.pv.length?this.pv.length:1,n=C("float32",r);var h=e.floor(5*c);for(i=0,a=0;i<h;){for(a=0;a<r;a+=1)n[a]+=-s+2*s*o.random();i+=1}var p=5*c,l=p-e.floor(p),f=C("float32",r);if(r>1){for(a=0;a<r;a+=1)f[a]=this.pv[a]+n[a]+(-s+2*s*o.random())*l;return f}return this.pv+n[0]+(-s+2*s*o.random())*l}.bind(this),v.loopIn&&v.loopIn.bind(v),v.loopOut&&v.loopOut.bind(v),v.smooth&&v.smooth.bind(v),this.getValueAtTime&&this.getValueAtTime.bind(this),this.getVelocityAtTime&&(l=this.getVelocityAtTime.bind(this)),t.comp.globalData.projectInterface.bind(t.comp.globalData.projectInterface),t.data.ind,!t.hierarchy||t.hierarchy.length;var b,P=e.floor(1e6*e.random());return t.globalData,function(e){var s;return m=e,g&&(s=P,o.seedrandom(P+s)),this.frameExpressionId===t.globalData.frameId&&"textSelector"!==this.propType?m:("textSelector"===this.propType&&(this.textIndex,this.textTotal,this.selectorValue),p||(t.layerInterface.text,p=t.layerInterface,t.comp.compInterface,p.toWorld.bind(p),p.fromWorld.bind(p),h=p.fromComp.bind(p),p.toComp.bind(p),p.mask?p.mask.bind(p):null,h),a||(a=t.layerInterface("ADBE Transform Group"),a,a&&a.anchorPoint),4!==y||r||(r=p("ADBE Root Vectors Group")),n||(n=p(4)),!(!t.hierarchy||!t.hierarchy.length)&&!b&&(b=t.hierarchy[0].layerInterface),c=this.comp.renderedFrame/this.comp.globalData.frameRate,u&&l(c),this.frameExpressionId=t.globalData.frameId,"shape"===f.propType&&(f=f.v),f)}},t}(),Jt={searchExpressions:function(t,e,s){e.x&&(s.k=!0,s.x=!0,s.initiateExpression=Zt.initiateExpression,s.effectsSequence.push(s.initiateExpression(t,e,s).bind(s)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),s=this.getValueAtTime(t+-.01),i=0;if(e.length){var a;for(a=0;a<e.length;a+=1)i+=Math.pow(s[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,s,i=-.001,a=this.getValueAtTime(t),r=this.getValueAtTime(t+i);if(a.length)for(e=C("float32",a.length),s=0;s<a.length;s+=1)e[s]=(r[s]-a[s])/i;else e=(r-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(){function t(t,e,s){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,a,r,n,o,h=this.comp.renderedFrame,p=this.keyframes,l=p[p.length-1].t;if(h<=l)return this.pv;if(s?a=l-(i=e?Math.abs(l-elem.comp.globalData.frameRate*e):Math.max(0,l-this.elem.data.ip)):((!e||e>p.length-1)&&(e=p.length-1),i=l-(a=p[p.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),c=this.getValueAtTime(l/this.comp.globalData.frameRate,0),m=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,r=0;r<n;r+=1)o[r]=(c[r]-f[r])*d+m[r];return o}return(c-f)*d+m}if("continue"===t){var u=this.getValueAtTime(l/this.comp.globalData.frameRate,0),g=this.getValueAtTime((l-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,r=0;r<n;r+=1)o[r]=u[r]+(u[r]-g[r])*((h-l)/this.comp.globalData.frameRate)/5e-4;return o}return u+(h-l)/.001*(u-g)}}return this.getValueAtTime(((h-a)%i+a)/this.comp.globalData.frameRate,0)}function e(t,e,s){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,a,r,n,o,h=this.comp.renderedFrame,p=this.keyframes,l=p[0].t;if(h>=l)return this.pv;if(s?a=l+(i=e?Math.abs(elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-l)):((!e||e>p.length-1)&&(e=p.length-1),i=(a=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 f=this.getValueAtTime(l/this.comp.globalData.frameRate,0),c=this.getValueAtTime(a/this.comp.globalData.frameRate,0),m=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(f.length)).length,r=0;r<n;r+=1)o[r]=m[r]-(c[r]-f[r])*d;return o}return m-(c-f)*d}if("continue"===t){var u=this.getValueAtTime(l/this.comp.globalData.frameRate,0),g=this.getValueAtTime((l+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(n=(o=new Array(u.length)).length,r=0;r<n;r+=1)o[r]=u[r]+(u[r]-g[r])*(l-h)/.001;return o}return u+(u-g)*(l-h)/.001}}return this.getValueAtTime((i-(l-h)%i+l)/this.comp.globalData.frameRate,0)}function i(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var s,i,a=this.comp.renderedFrame/this.comp.globalData.frameRate,r=a-t,n=e>1?(a+t-r)/(e-1):1,o=0,h=0;for(s=this.pv.length?C("float32",this.pv.length):0;o<e;){if(i=this.getValueAtTime(r+o*n),this.pv.length)for(h=0;h<this.pv.length;h+=1)s[h]+=i[h];else s+=i;o+=1}if(this.pv.length)for(h=0;h<this.pv.length;h+=1)s[h]/=e;else s/=e;return s}function a(t){console.warn("Transform at time not supported")}function r(t){}var n=j.getTransformProperty;j.getTransformProperty=function(t,e,s){var i=n(t,e,s);return i.dynamicProperties.length?i.getValueAtTime=a.bind(i):i.getValueAtTime=r.bind(i),i.setGroupProperty=Jt.setGroupProperty,i};var o=G.getProp;G.getProp=function(a,r,n,h,p){var l=o(a,r,n,h,p);l.kf?l.getValueAtTime=Jt.getValueAtTime.bind(l):l.getValueAtTime=Jt.getStaticValueAtTime.bind(l),l.setGroupProperty=Jt.setGroupProperty,l.loopOut=t,l.loopIn=e,l.smooth=i,l.getVelocityAtTime=Jt.getVelocityAtTime.bind(l),l.getSpeedAtTime=Jt.getSpeedAtTime.bind(l),l.numKeys=1===r.a?r.k.length:0,l.propertyIndex=r.ix;var f=0;return 0!==n&&(f=C("float32",1===r.a?r.k[0].s.length:r.k.length)),l._cachingAtTime={lastFrame:s,lastIndex:0,value:f},Jt.searchExpressions(a,r,l),l.k&&p.addDynamicProperty(l),l};var h=B.getConstructorFunction(),p=B.getKeyframedConstructorFunction();function l(){}l.prototype={vertices:function(t,e){this.k&&this.getValue();var s=this.v;void 0!==e&&(s=this.getValueAtTime(e,0));var i,a=s._length,r=s[t],n=s.v,o=T(a);for(i=0;i<a;i+=1)o[i]="i"===t||"o"===t?[r[i][0]-n[i][0],r[i][1]-n[i][1]]:[r[i][0],r[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 s=this.v;void 0!==e&&(s=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=O.getSegmentsLength(s));for(var i,a=this._segmentsLength,r=a.lengths,n=a.totalLength*t,o=0,h=r.length,p=0;o<h;){if(p+r[o].addedLength>n){var l=o,f=s.c&&o===h-1?0:o+1,c=(n-p)/r[o].addedLength;i=O.getPointInSegment(s.v[l],s.v[f],s.o[l],s.i[f],c,r[o]);break}p+=r[o].addedLength,o+=1}return i||(i=s.c?[s.v[0][0],s.v[0][1]]:[s.v[s._length-1][0],s.v[s._length-1][1]]),i},vectorOnPath:function(t,e,s){t=1==t?this.v.c?0:.999:t;var i=this.pointOnPath(t,e),a=this.pointOnPath(t+.001,e),r=a[0]-i[0],n=a[1]-i[1],o=Math.sqrt(Math.pow(r,2)+Math.pow(n,2));return"tangent"===s?[r/o,n/o]:[-n/o,r/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:Jt.setGroupProperty,getValueAtTime:Jt.getStaticValueAtTime},L([l],h),L([l],p),p.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:ct.clone(this.pv),lastIndex:0,lastTime:s}),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},p.prototype.initiateExpression=Zt.initiateExpression;var f=B.getShapeProp;B.getShapeProp=function(t,e,s,i,a){var r=f(t,e,s,i,a);return r.propertyIndex=e.ix,r.lock=!1,3===s?Jt.searchExpressions(t,e.pt,r):4===s&&Jt.searchExpressions(t,e.ks,r),r.k&&t.addDynamicProperty(r),r}}(),nt.prototype.getExpressionValue=function(t,e){var s=this.calculateExpression(e);if(t.t!==s){var i={};return this.copyData(i,t),i.t=s.toString(),i.__complete=!1,i}return t},nt.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},nt.prototype.searchExpressions=function(){if(this.data.d.x)return this.calculateExpression=Zt.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0};var Ut,Qt,$t=function(){function t(t,f,c){var m,d=[],u=t?t.length:0;for(m=0;m<u;m+=1)"gr"==t[m].ty?d.push(e(t[m],f[m],c)):"fl"==t[m].ty?d.push(s(t[m],f[m],c)):"st"==t[m].ty?d.push(i(t[m],f[m],c)):"tm"==t[m].ty?d.push(a(t[m],f[m],c)):"tr"==t[m].ty||("el"==t[m].ty?d.push(r(t[m],f[m],c)):"sr"==t[m].ty?d.push(n(t[m],f[m],c)):"sh"==t[m].ty?d.push(l(t[m],f[m],c)):"rc"==t[m].ty?d.push(o(t[m],f[m],c)):"rd"==t[m].ty?d.push(h(t[m],f[m],c)):"rp"==t[m].ty&&d.push(p(t[m],f[m],c)));return d}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=function(t){return 1===t?a:i(t-1)};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}if("number"==typeof t)return a[t-1]};return r.propertyGroup=function(t){return 1===t?r:i(t-1)},a=t(e.it,s.it,r.propertyGroup),r.numProperties=a.length,r.propertyIndex=e.cix,r._name=e.nm,r}(e,s,a.propertyGroup),n=function(t,e,s){function i(t){return 1==t?a:s(--t)}e.transform.mProps.o.setGroupProperty(i),e.transform.mProps.p.setGroupProperty(i),e.transform.mProps.a.setGroupProperty(i),e.transform.mProps.s.setGroupProperty(i),e.transform.mProps.r.setGroupProperty(i),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(i),e.transform.mProps.sa.setGroupProperty(i));function a(e){return t.a.ix===e||"Anchor Point"===e?a.anchorPoint:t.o.ix===e||"Opacity"===e?a.opacity:t.p.ix===e||"Position"===e?a.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?a.rotation:t.s.ix===e||"Scale"===e?a.scale:t.sk&&t.sk.ix===e||"Skew"===e?a.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?a.skewAxis:void 0}return e.transform.op.setGroupProperty(i),Object.defineProperties(a,{opacity:{get:ne(e.transform.mProps.o)},position:{get:ne(e.transform.mProps.p)},anchorPoint:{get:ne(e.transform.mProps.a)},scale:{get:ne(e.transform.mProps.s)},rotation:{get:ne(e.transform.mProps.r)},skew:{get:ne(e.transform.mProps.sk)},skewAxis:{get:ne(e.transform.mProps.sa)},_name:{value:t.nm}}),a.ty="tr",a.mn=t.mn,a.propertyGroup=s,a}(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:void 0}return Object.defineProperties(i,{color:{get:ne(e.c)},opacity:{get:ne(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(s),e.o.setGroupProperty(s),i}function i(t,e,s){function i(t){return 1===t?ob:s(t-1)}function a(t){return 1===t?h:i(t-1)}function r(s){Object.defineProperty(h,t.d[s].nm,{get:ne(e.d.dataProps[s].p)})}var n,o=t.d?t.d.length:0,h={};for(n=0;n<o;n+=1)r(n),e.d.dataProps[n].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:void 0}return Object.defineProperties(p,{color:{get:ne(e.c)},opacity:{get:ne(e.o)},strokeWidth:{get:ne(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(i),e.o.setGroupProperty(i),e.w.setGroupProperty(i),p}function a(t,e,s){function i(t){return 1==t?a:s(--t)}function a(e){return e===t.e.ix||"End"===e||"end"===e?a.end:e===t.s.ix?a.start:e===t.o.ix?a.offset:void 0}return a.propertyIndex=t.ix,e.s.setGroupProperty(i),e.e.setGroupProperty(i),e.o.setGroupProperty(i),a.propertyIndex=t.ix,a.propertyGroup=s,Object.defineProperties(a,{start:{get:ne(e.s)},end:{get:ne(e.e)},offset:{get:ne(e.o)},_name:{value:t.nm}}),a.mn=t.mn,a}function r(t,e,s){function i(t){return 1==t?r:s(--t)}r.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;function r(e){return t.p.ix===e?r.position:t.s.ix===e?r.size:void 0}return a.s.setGroupProperty(i),a.p.setGroupProperty(i),Object.defineProperties(r,{size:{get:ne(a.s)},position:{get:ne(a.p)},_name:{value:t.nm}}),r.mn=t.mn,r}function n(t,e,s){function i(t){return 1==t?r:s(--t)}var a="tm"===e.sh.ty?e.sh.prop:e.sh;function r(e){return t.p.ix===e?r.position:t.r.ix===e?r.rotation:t.pt.ix===e?r.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?r.outerRadius:t.os.ix===e?r.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?r.innerRoundness:void 0:r.innerRadius}return r.propertyIndex=t.ix,a.or.setGroupProperty(i),a.os.setGroupProperty(i),a.pt.setGroupProperty(i),a.p.setGroupProperty(i),a.r.setGroupProperty(i),t.ir&&(a.ir.setGroupProperty(i),a.is.setGroupProperty(i)),Object.defineProperties(r,{position:{get:ne(a.p)},rotation:{get:ne(a.r)},points:{get:ne(a.pt)},outerRadius:{get:ne(a.or)},outerRoundness:{get:ne(a.os)},innerRadius:{get:ne(a.ir)},innerRoundness:{get:ne(a.is)},_name:{value:t.nm}}),r.mn=t.mn,r}function o(t,e,s){function i(t){return 1==t?r:s(--t)}var a="tm"===e.sh.ty?e.sh.prop:e.sh;function r(e){return t.p.ix===e?r.position:t.r.ix===e?r.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?r.size:void 0}return r.propertyIndex=t.ix,a.p.setGroupProperty(i),a.s.setGroupProperty(i),a.r.setGroupProperty(i),Object.defineProperties(r,{position:{get:ne(a.p)},roundness:{get:ne(a.r)},size:{get:ne(a.s)},_name:{value:t.nm}}),r.mn=t.mn,r}function h(t,e,s){var i=e;function a(e){if(t.r.ix===e||"Round Corners 1"===e)return a.radius}return a.propertyIndex=t.ix,i.rd.setGroupProperty((function(t){return 1==t?a:s(--t)})),Object.defineProperties(a,{radius:{get:ne(i.rd)},_name:{value:t.nm}}),a.mn=t.mn,a}function p(t,e,s){function i(t){return 1==t?r:s(--t)}var a=e;function r(e){return t.c.ix===e||"Copies"===e?r.copies:t.o.ix===e||"Offset"===e?r.offset:void 0}return r.propertyIndex=t.ix,a.c.setGroupProperty(i),a.o.setGroupProperty(i),Object.defineProperties(r,{copies:{get:ne(a.c)},offset:{get:ne(a.o)},_name:{value:t.nm}}),r.mn=t.mn,r}function l(t,e,s){var i=e.sh;function a(t){if("Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t)return a.path}return i.setGroupProperty((function(t){return 1==t?a:s(--t)})),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},mn:{value:t.mn}}),a}return function(e,s,i){var a;function r(t){if("number"==typeof t)return a[t-1];for(var e=0,s=a.length;e<s;){if(a[e]._name===t)return a[e];e+=1}}return r.propertyGroup=i,a=t(e,s,r),r.numProperties=a.length,r}}(),te=function(t){var e,s;function i(){}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},ee=function(){function t(t,e){var s=new E;if(s.reset(),this._elem.finalTransform.mProp.applyToMatrix(s),this._elem.hierarchy&&this._elem.hierarchy.length){var i,a=this._elem.hierarchy.length;for(i=0;i<a;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(s);return s.applyToPointArray(t[0],t[1],t[2]||0)}return s.applyToPointArray(t[0],t[1],t[2]||0)}function e(t,e){var s=new E;if(s.reset(),this._elem.finalTransform.mProp.applyToMatrix(s),this._elem.hierarchy&&this._elem.hierarchy.length){var i,a=this._elem.hierarchy.length;for(i=0;i<a;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(s);return s.inversePoint(t)}return s.inversePoint(t)}function s(t){var e=new E;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 i(){return[1,1,1,1]}return function(a){var r;function n(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return n.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 n.effect}}n.toWorld=t,n.fromWorld=e,n.toComp=t,n.fromComp=s,n.sampleImage=i,n.sourceRectAtTime=a.sourceRectAtTime.bind(a),n._elem=a;var o=V(r=ie(a.finalTransform.mProp),"anchorPoint");return Object.defineProperties(n,{hasParent:{get:function(){return a.hierarchy.length}},parent:{get:function(){return a.hierarchy[0].layerInterface}},rotation:V(r,"rotation"),scale:V(r,"scale"),position:V(r,"position"),opacity:V(r,"opacity"),anchorPoint:o,anchor_point:o,transform:{get:function(){return r}},active:{get:function(){return a.isInRange}}}),n.startTime=a.data.st,n.index=a.data.ind,n.source=a.data.refId,n.height=0===a.data.ty?a.data.h:100,n.width=0===a.data.ty?a.data.w:100,n.inPoint=a.data.ip/a.comp.globalData.frameRate,n.outPoint=a.data.op/a.comp.globalData.frameRate,n._name=a.data.nm,n.registerMaskInterface=function(t){n.mask=new re(t,a)},n.registerEffectsInterface=function(t){n.effect=t},n}}(),se=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},ie=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}}if(Object.defineProperty(e,"rotation",{get:ne(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ne(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ne(t.rx)}),Object.defineProperty(e,"yRotation",{get:ne(t.ry)}),Object.defineProperty(e,"scale",{get:ne(t.s)}),t.p)var s=ne(t.p);return Object.defineProperty(e,"position",{get:function(){return t.p?s():[t.px.v,t.py.v,t.pz?t.pz.v:0]}}),Object.defineProperty(e,"xPosition",{get:ne(t.px)}),Object.defineProperty(e,"yPosition",{get:ne(t.py)}),Object.defineProperty(e,"zPosition",{get:ne(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ne(t.a)}),Object.defineProperty(e,"opacity",{get:ne(t.o)}),Object.defineProperty(e,"skew",{get:ne(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ne(t.sa)}),Object.defineProperty(e,"orientation",{get:ne(t.or)}),e},h=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 e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),ae=function(){function t(s,i,a,r){var n,o=[],h=s.ef.length;for(n=0;n<h;n+=1)5===s.ef[n].ty?o.push(t(s.ef[n],i.effectElements[n],i.effectElements[n].propertyGroup,r)):o.push(e(i.effectElements[n],s.ef[n].ty,r,p));function p(t){return 1===t?l:a(t-1)}var l=function(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?o[i]:o[i]();i+=1}return o[0]()};return l.propertyGroup=p,"ADBE Color Control"===s.mn&&Object.defineProperty(l,"color",{get:function(){return o[0]()}}),Object.defineProperty(l,"numProperties",{get:function(){return s.np}}),l.active=l.enabled=0!==s.en,l}function e(t,e,s,i){var a=ne(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(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));return function(t){for(var s=e.data.ef||[],i=0,r=s.length;i<r;){if(t===s[i].nm||t===s[i].mn||t===s[i].ix)return a[i];i+=1}}}}}}(),re=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}});return function(e,s){var i,a=T(e.viewData.length),r=e.viewData.length;for(i=0;i<r;i+=1)a[i]=new t(e.viewData[i],e.masksProperties[i]);return function(t){for(i=0;i<r;){if(e.masksProperties[i].nm===t)return a[i];i+=1}}}}(),ne=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){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}return 0},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.pv.length,r=C("float32",a),n=C("float32",a);return r.value=n,s(r,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<a;e+=1)r[e]=n[e]=t.v[e]*i;return r}}(a):i}}();function oe(t,e,s){this.p=G.getProp(e,t.v,0,0,s)}function he(t,e,s){this.p=G.getProp(e,t.v,0,0,s)}function pe(t,e,s){this.p=G.getProp(e,t.v,1,0,s)}function le(t,e,s){this.p=G.getProp(e,t.v,1,0,s)}function fe(t,e,s){this.p=G.getProp(e,t.v,0,0,s)}function ce(t,e,s){this.p=G.getProp(e,t.v,0,0,s)}function me(t,e,s){this.p=G.getProp(e,t.v,0,0,s)}function de(){this.p={}}function ue(t,e){var s=t.ef||[];this.effectElements=[];var i,a,r=s.length;for(i=0;i<r;i++)a=new ge(s[i],e),this.effectElements.push(a)}function ge(t,e){this.init(t,e)}Ut=function(){function t(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(e,s){this.pv=1,this.comp=e.comp,this.elem=e,this.mult=.01,this.propType="textSelector",this.textTotal=s.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=Zt.initiateExpression.bind(this)(e,s,this),this.getMult=t,this.getVelocityAtTime=Jt.getVelocityAtTime,this.kf?this.getValueAtTime=Jt.getValueAtTime.bind(this):this.getValueAtTime=Jt.getStaticValueAtTime.bind(this),this.setGroupProperty=Jt.setGroupProperty}}(),Qt=ht.getTextSelectorProp,ht.getTextSelectorProp=function(t,e,s){return 1===e.t?new Ut(t,e,s):Qt(t,e,s)},L([w],ge),ge.prototype.getValue=ge.prototype.iterateDynamicProperties,ge.prototype.init=function(t,e){this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var s,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 oe(r[s],e,this);break;case 1:i=new he(r[s],e,this);break;case 2:i=new pe(r[s],e,this);break;case 3:i=new le(r[s],e,this);break;case 4:case 7:i=new me(r[s],e,this);break;case 10:i=new fe(r[s],e,this);break;case 11:i=new ce(r[s],e,this);break;case 5:i=new ue(r[s],e,this);break;default:i=new de(r[s],e,this)}i&&this.effectElements.push(i)}};var ye={};ye.play=Xt.play,ye.pause=Xt.pause,ye.togglePause=Xt.togglePause,ye.setSpeed=Xt.setSpeed,ye.setDirection=Xt.setDirection,ye.stop=Xt.stop,ye.registerAnimation=Xt.registerAnimation,ye.loadAnimation=function(t){return Xt.loadAnimation(t)},ye.resize=Xt.resize,ye.goToAndStop=Xt.goToAndStop,ye.destroy=Xt.destroy,ye.setQuality=function(t){if("string"==typeof t)switch(t){case"high":p=200;break;case"medium":p=50;break;case"low":p=10}else!isNaN(t)&&t>1&&(p=t);c(!(p>=50))},ye.freeze=Xt.freeze,ye.unfreeze=Xt.unfreeze,ye.getRegisteredAnimations=Xt.getRegisteredAnimations,ye.version="5.5.2";return ye}({}),currentAnimation=null,events={INITIALIZED:"initialized",RESIZED:"resized",PLAYING:"playing",PAUSED:"paused",STOPPED:"stopped"};function getCurrentCanvasSize(){var t=currentAnimation.renderer.canvasContext.canvas;return{height:t.height,width:t.width}}function sendResizeEvent(){currentAnimation.renderer.canvasContext.canvas;postMessage({name:events.RESIZED,size:getCurrentCanvasSize()})}function sendPlayEvent(){postMessage({name:events.PLAYING})}function sendPauseEvent(){postMessage({name:events.PAUSED})}function sendStopEvent(){postMessage({name:events.STOPPED})}function sendInitializedEvent(){currentAnimation.renderer.canvasContext.canvas;postMessage({name:events.INITIALIZED,success:currentAnimation.isLoaded})}function initAnimation(t,e,s){if(t&&e){var i=s.getContext("2d");currentAnimation=lottiejs.loadAnimation({renderer:"canvas",loop:e.loop,autoplay:e.autoplay,animationData:t,rendererSettings:{context:i,scaleMode:"noScale",clearCanvas:!0}}),sendInitializedEvent(),e.autoplay&&currentAnimation.play(),currentAnimation.isLoaded&&!currentAnimation.isPaused&&sendPlayEvent()}}function updateCanvasSize(t,e){e&&t&&(e.height>0&&e.width>0&&(t.height=e.height,t.width=e.width),currentAnimation&&(currentAnimation.resize(),sendResizeEvent()))}function updateAnimationState(t,e){if(t&&currentAnimation)return t.stop?(currentAnimation.stop(),e.getContext("2d").clearRect(0,0,e.width,e.height),void sendStopEvent()):void(t.play&&currentAnimation.isPaused?(currentAnimation.play(),sendPlayEvent()):t.play||currentAnimation.isPaused||(currentAnimation.pause(),sendPauseEvent()))}onmessage=function(t){if(t&&t.data){var e=null;if(currentAnimation)e=currentAnimation.renderer.canvasContext.canvas;else{if(!t.data.canvas)return;e=t.data.canvas}currentAnimation&&t.data.animationData&&(currentAnimation.stop(),currentAnimation=null),updateCanvasSize(e,t.data.drawSize),initAnimation(t.data.animationData,t.data.params,e),updateAnimationState(t.data.control,e)}};