"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var t="",e=!1,s=-999999,i=function(){return t};function a(t){return document.createElement(t)}function r(t,e){var s,i,a=t.length;for(s=0;s1?s[1]=1:s[1]<=0&&(s[1]=0),L(s[0],s[1],s[2])}function V(t,e){var s=R(255*t[0],255*t[1],255*t[2]);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),L(s[0],s[1],s[2])}function z(t,e){var s=R(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&(s[0]+=1),L(s[0],s[1],s[2])}!function(){var t,e,s=[];for(t=0;t<256;t+=1)e=t.toString(16),s[t]=1===e.length?"0"+e:e}();var N=function(){return m},j=function(t){P=t},B=function(){return P};function G(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function q(t){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}var W=function(){var t,s,i=1,a=[],r={onmessage:function(){},postMessage:function(e){t({data:e})}},n={postMessage:function(t){r.onmessage({data:t})}};function o(s){if(window.Worker&&window.Blob&&e){var i=new Blob(["var _workerSelf = self; self.onmessage = ",s.toString()],{type:"text/javascript"}),a=URL.createObjectURL(i);return new Worker(a)}return t=s,r}function h(){s||(s=o((function(t){if(n.dataManager||(n.dataManager=function(){function t(a,r){var n,o,h,l,p,c,m=a.length;for(o=0;o=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;as[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&null))}var r,n=function(){var t=[4,4,14];function e(t){var e,s,i,a=t.length;for(e=0;e=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;i500)&&(this._imageLoaded(),clearInterval(s)),e+=1}.bind(this),50)}function n(t){var e={assetData:t},s=i(t,this.assetsPath,this.path);return W.loadData(s,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function o(){this._imageLoaded=e.bind(this),this._footageLoaded=s.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=n.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(t,e){var s;this.imagesLoadedCb=e;var i=t.length;for(s=0;sthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;sthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},Z.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},Z.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},Z.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},Z.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},Z.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},Z.prototype.getMarkerData=function(t){for(var e,s=0;s=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"))}},Z.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},Z.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==s&&this.goToAndStop(s,!0)},Z.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===U(t[0])){var s,i=t.length;for(s=0;s=0;s-=1)e[s].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,u()},t.setVolume=function(t,s){var a;for(a=0;a=.001?function(t,e,s,i){for(var a=0;a<4;++a){var r=h(e,s,i);if(0===r)return e;e-=(o(e,s,i)-t)/r}return e}(t,l,e,i):0===p?l:function(t,e,s,i,a){var r,n,h=0;do{(r=o(n=e+(s-e)/2,i,a)-t)>0?s=n:e=n}while(Math.abs(r)>1e-7&&++h<10);return n}(t,r,r+s,e,i)}},t}(),tt={double:function(t){return t.concat(p(t.length))}},et=function(t,e,s){var i=0,a=t,r=p(a);return{newElement:function(){return i?r[i-=1]:e()},release:function(t){i===a&&(r=tt.double(r),a*=2),s&&s(t),r[i]=t,i+=1}}},st=et(8,(function(){return{addedLength:0,percents:l("float32",B()),lengths:l("float32",B())}})),it=et(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,s=t.lengths.length;for(e=0;e-.001&&n<.001}var s=function(t,e,s,i){var a,r,n,o,h,l,p=B(),f=0,c=[],m=[],d=st.newElement();for(n=s.length,a=0;an?-1:1,l=!0;l;)if(i[r]<=n&&i[r+1]>n?(o=(n-i[r])/(i[r+1]-i[r]),l=!1):r+=h,r<0||r>=a-1){if(r===a-1)return s[r];l=!1}return s[r]+(s[r+1]-s[r])*o}var h=l("float32",8);return{getSegmentsLength:function(t){var e,i=it.newElement(),a=t.c,r=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;e1&&(r=1);var p,f=o(r,l),c=o(n=n>1?1:n,l),m=e.length,d=1-f,u=1-c,g=d*d*d,y=f*d*d*3,v=f*f*d*3,b=f*f*f,_=d*d*u,P=f*d*u+d*f*u+d*d*c,k=f*f*u+d*f*c+f*d*c,x=f*f*c,C=d*u*u,D=f*u*u+d*c*u+d*u*c,A=f*c*u+d*c*c+f*u*c,w=f*c*c,S=u*u*u,T=c*u*u+u*c*u+u*u*c,F=c*c*u+u*c*c+c*u*c,M=c*c*c;for(p=0;pm?c>d?c-m-d:d-m-c:d>m?d-m-c:m-c-d)>-1e-4&&f<1e-4}}}(),rt=function(){var t=s,e=Math.abs;function i(t,e){var s,i=this.offsetTime;"multidimensional"===this.propType&&(s=l("float32",this.pv.length));for(var r,n,o,h,p,f,c,m,d,u=e.lastIndex,g=u,y=this.keyframes.length-1,v=!0;v;){if(r=this.keyframes[g],n=this.keyframes[g+1],g===y-1&&t>=n.t-i){r.h&&(r=n),u=0;break}if(n.t-i>t){u=g;break}g=F||t=F?E.points.length-1:0;for(p=E.points[I].point.length,h=0;h=O&&R=F)s[0]=b[0],s[1]=b[1],s[2]=b[2];else if(t<=M)s[0]=r.s[0],s[1]=r.s[1],s[2]=r.s[2];else{var G=a(r.s),q=a(b);_=s,P=function(t,e,s){var i,a,r,n,o,h=[],l=t[0],p=t[1],f=t[2],c=t[3],m=e[0],d=e[1],u=e[2],g=e[3];return(a=l*m+p*d+f*u+c*g)<0&&(a=-a,m=-m,d=-d,u=-u,g=-g),1-a>1e-6?(i=Math.acos(a),r=Math.sin(i),n=Math.sin((1-s)*i)/r,o=Math.sin(s*i)/r):(n=1-s,o=s),h[0]=n*l+o*m,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*c+o*g,h}(G,q,(t-M)/(F-M)),x=P[0],C=P[1],D=P[2],A=P[3],w=Math.atan2(2*C*A-2*x*D,1-2*C*C-2*D*D),S=Math.asin(2*x*C+2*D*A),T=Math.atan2(2*x*A-2*C*D,1-2*x*x-2*D*D),_[0]=w/k,_[1]=S/k,_[2]=T/k}else for(g=0;g=F?f=1:t=i&&e>=i||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;i1e-5&&(this.v[i]=s,this._mdf=!0),i+=1}function o(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,s=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[i]||r[i]&&!a)&&(r[i]=ot.newElement()),r[i][0]=t,r[i][1]=e},ht.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)},ht.prototype.reverse=function(){var t=new ht;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=m[m.length-1].t-this.offsetTime)i=m[m.length-1].s?m[m.length-1].s[0]:m[m.length-2].e[0],r=!0;else{for(var d,u,g,y=c,v=m.length-1,b=!0;b&&(d=m[y],!((u=m[y+1]).t-this.offsetTime>t));)y=u.t-this.offsetTime)p=1;else if(ti&&e>i)||(this._caching.lastIndex=a0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+E(t[0])+","+E(t[1])+","+E(t[4])+","+E(t[5])+","+E(t[12])+","+E(t[13])+")"}return function(){this.reset=a,this.rotate=r,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=f,this.skewFromAxis=c,this.shear=p,this.scale=m,this.setTransform=d,this.translate=u,this.transform=g,this.applyToPoint=P,this.applyToX=k,this.applyToY=x,this.applyToZ=C,this.applyToPointArray=T,this.applyToTriplePoints=S,this.applyToPointStringified=F,this.toCSS=M,this.to2dCSS=I,this.clone=b,this.cloneFromProps=_,this.equals=v,this.inversePoints=w,this.inversePoint=A,this.getInverseMatrix=D,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=l("float32",16),this.reset()}}();function bt(t){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(t)}var _t={};function Pt(){Q.searchAnimations()}_t.play=Q.play,_t.pause=Q.pause,_t.setLocationHref=function(e){t=e},_t.togglePause=Q.togglePause,_t.setSpeed=Q.setSpeed,_t.setDirection=Q.setDirection,_t.stop=Q.stop,_t.searchAnimations=Pt,_t.registerAnimation=Q.registerAnimation,_t.loadAnimation=function(t){return Q.loadAnimation(t)},_t.setSubframeRendering=function(t){!function(t){c=!!t}(t)},_t.resize=Q.resize,_t.goToAndStop=Q.goToAndStop,_t.destroy=Q.destroy,_t.setQuality=function(t){if("string"==typeof t)switch(t){case"high":j(200);break;default:case"medium":j(50);break;case"low":j(10)}else!isNaN(t)&&t>1&&j(t);B()>=50?C(!1):C(!0)},_t.inBrowser=function(){return"undefined"!=typeof navigator},_t.installPlugin=function(t,e){"expressions"===t&&(m=e)},_t.freeze=Q.freeze,_t.unfreeze=Q.unfreeze,_t.setVolume=Q.setVolume,_t.mute=Q.mute,_t.unmute=Q.unmute,_t.getRegisteredAnimations=Q.getRegisteredAnimations,_t.useWebWorker=function(t){e=!!t},_t.setIDPrefix=function(t){d=t},_t.__getFactory=function(t){switch(t){case"propertyFactory":return rt;case"shapePropertyFactory":return yt;case"matrix":return vt;default:return null}},_t.version="5.9.4";var kt="",xt=document.getElementsByTagName("script"),Ct=xt[xt.length-1]||{src:""};kt=Ct.src?Ct.src.replace(/^[^\?]+\??/,""):"",function(t){for(var e=kt.split("&"),s=0;s=1?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var n,o,h=[],l=r.length;for(n=0;ni+s))p=o.s*a<=i?0:(o.s*a-i)/s,f=o.e*a>=i+s?1:(o.e*a-i)/s,h.push([p,f])}return h.length||h.push([0,0]),h},St.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e1?1+r:this.s.v<0?0+r:this.s.v+r)>(s=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r)){var n=e;e=s,s=n}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue,s=this.eValue;var o,h,l,p,f,c=this.shapes.length,m=0;if(s===e)for(a=0;a=0;a-=1)if((d=this.shapes[a]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&c>1?(y=this.calculateShapeEdges(e,s,d.totalShapeLength,_,m),_+=d.totalShapeLength):y=[[v,b]],h=y.length,o=0;o=1?g.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(g.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),g.push({s:0,e:d.totalShapeLength*(b-1)}));var P=this.addShapes(d,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var k=P.pop();this.addPaths(P,u),P=this.addShapes(d,g[1],k)}else this.addPaths(P,u),P=this.addShapes(d,g[1]);this.addPaths(P,u)}}d.shape.paths=u}}},St.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;se.e){s.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(c[i].v[a-1],c[i].o[a-1],c[i].i[a],c[i].v[a],s,o,g),g=!1):(l=at.getNewSegment(c[i].v[a-1],c[i].v[a],c[i].o[a-1],c[i].i[a],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[a-1]),this.addSegmentFromArray(l,s,o,g),g=!1,s.c=!1),d+=n.addedLength,o+=1}if(c[i].c&&h.length){if(n=h[a-1],d<=e.e){var y=h[a-1].addedLength;e.s<=d&&e.e>=d+y?(this.addSegment(c[i].v[a-1],c[i].o[a-1],c[i].i[0],c[i].v[0],s,o,g),g=!1):(l=at.getNewSegment(c[i].v[a-1],c[i].v[0],c[i].o[a-1],c[i].i[0],(e.s-d)/y,(e.e-d)/y,h[a-1]),this.addSegmentFromArray(l,s,o,g),g=!1,s.c=!1)}else s.c=!1;d+=n.addedLength,o+=1}if(s._length&&(s.setXYAt(s.v[p][0],s.v[p][1],"i",p),s.setXYAt(s.v[s._length-1][0],s.v[s._length-1][1],"o",s._length-1)),d>e.e)break;i=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/s,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/s,0)):(i=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/s,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],a=[];var r=this.px,n=this.py;r._caching.lastFrame+r.offsetTime<=r.keyframes[0].t?(i[0]=r.getValueAtTime((r.keyframes[0].t+.01)/s,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/s,0),a[0]=r.getValueAtTime(r.keyframes[0].t/s,0),a[1]=n.getValueAtTime(n.keyframes[0].t/s,0)):r._caching.lastFrame+r.offsetTime>=r.keyframes[r.keyframes.length-1].t?(i[0]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/s,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/s,0),a[0]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/s,0),a[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/s,0)):(i=[r.pv,n.pv],a[0]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/s,r.offsetTime),a[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/s,n.offsetTime))}else i=a=t;this.v.rotate(-Math.atan2(i[1]-a[1],i[0]-a[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},r([nt],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=nt.prototype.addDynamicProperty,{getTransformProperty:function(t,s,i){return new e(t,s,i)}}}();function Mt(){}function Et(){}function It(t){for(var e=t.fStyle?t.fStyle.split(" "):[],s="normal",i="normal",a=e.length,r=0;r0;)s-=1,this._elements.unshift(e[s]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Mt.prototype.resetElements=function(t){var e,s=t.length;for(e=0;e0?Math.floor(c):Math.ceil(c),u=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(c>0){for(;_d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-m,!0),_-=m)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,r=this._currentCopies;r;){if(b=(s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==_){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v0&&(f=!1),f){var c=a("style");c.setAttribute("f-forigin",i[s].fOrigin),c.setAttribute("f-origin",i[s].origin),c.setAttribute("f-family",i[s].fFamily),c.type="text/css",c.innerText="@font-face {font-family: "+i[s].fFamily+"; font-style: normal; src: url('"+i[s].fPath+"');}",e.appendChild(c)}}else if("g"===i[s].fOrigin||1===i[s].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),p=0;pt?!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;t0&&(this.maskElement.setAttribute("id",v),this.element.maskedElement.setAttribute(_,"url("+i()+"#"+v+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}pe.prototype.prepareFrame=function(){},r([Rt,re,ne],pe),pe.prototype.getBaseElement=function(){return null},pe.prototype.renderFrame=function(){},pe.prototype.destroy=function(){},pe.prototype.initExpressions=function(){this.layerInterface=le(this)},pe.prototype.getFootageData=function(){return this.footageData},fe.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var s=this._volume*this._volumeMultiplier;this._previousVolume!==s&&(this._previousVolume=s,this.audio.volume(s))},r([Rt,re,ne],fe),fe.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},fe.prototype.show=function(){},fe.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},fe.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},fe.prototype.resume=function(){this._canPlay=!0},fe.prototype.setRate=function(t){this.audio.rate(t)},fe.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},fe.prototype.getBaseElement=function(){return null},fe.prototype.destroy=function(){},fe.prototype.sourceRectAtTime=function(){},fe.prototype.initExpressions=function(){},ce.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(s=this.layers[e]).ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},ce.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},ce.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},ce.prototype.createAudio=function(t){return new fe(t,this.globalData,this)},ce.prototype.createFootage=function(t){return new pe(t,this.globalData,this)},ce.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t1&&(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}},de.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var ue=function(){var t={};return t.createFilter=function(t,e){var s=G("filter");s.setAttribute("id",t),!0!==e&&(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%"));return s},t.createAlphaToLuminanceFilter=function(){var t=G("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}(),ge=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}(),ye={},ve="filter_result_";function be(t){var e,s,a="SourceGraphic",r=t.data.ef?t.data.ef.length:0,n=I(),o=ue.createFilter(n,!0),h=0;for(this.filters=[],e=0;e=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,s=0,i=e.length;s.01)return!1;s+=1}return!0},Le.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;t0;)h=i.transformers[u].mProps._mdf||h,d-=1,u-=1;if(h)for(d=y-i.styles[p].lvl,u=i.transformers.length-1;d>0;)m=i.transformers[u].mProps.v.props,c.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),d-=1,u-=1}else c=t;if(n=(f=i.sh.paths)._length,h){for(o="",r=0;r=1?v=.99:v<=-1&&(v=-.99);var b=o*v,_=Math.cos(y+e.a.v)*b+p[0],P=Math.sin(y+e.a.v)*b+p[1];h.setAttribute("fx",_),h.setAttribute("fy",P),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",P))}}function h(t,e,s){var i=e.style,a=e.d;a&&(a._mdf||s)&&a.dashStr&&(i.pElem.setAttribute("stroke-dasharray",a.dashStr),i.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||s)&&i.pElem.setAttribute("stroke","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||s)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||s)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return r;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return a;case"tr":return s;case"no":return i;default:return null}}}}();function Be(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 Ge(t,e,s,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.p=r,this._mdf={o:!0,sw:!!e,sc:!!s,fc:!!i,m:!0,p:!0}}function qe(t,e){this._frameId=s,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}r([re,me,_e,De,Pe,ne,ke],Be),Be.prototype.initSecondaryElement=function(){},Be.prototype.identityMatrix=new vt,Be.prototype.buildExpressionInterface=function(){},Be.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},Be.prototype.filterUniqueShapes=function(){var t,e,s,i,a=this.shapes.length,r=this.stylesList.length,n=[],o=!1;for(s=0;s1&&o&&this.setShapesAsAnimated(n)}},Be.prototype.setShapesAsAnimated=function(t){var e,s=t.length;for(e=0;e=0;o-=1){if((c=this.searchProcessedElement(t[o]))?e[o]=s[c-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)c?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],a),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(c)for(l=e[o].it.length,h=0;h1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},qe.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},qe.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,s=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,r=t||this.data.d.k[this.keysIndex].s;for(i=0;ie);)s+=1;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d.k[this.keysIndex].s},qe.prototype.buildFinalText=function(t){for(var e,s,i=[],a=0,r=t.length,n=!1;a=55296&&e<=56319?(s=t.charCodeAt(a+1))>=56320&&s<=57343?(n||Lt.isModifier(e,s)?(i[i.length-1]+=t.substr(a,2),n=!1):i.push(t.substr(a,2)),a+=1):i.push(t.charAt(a)):e>56319?(s=t.charCodeAt(a+1),Lt.isZeroWidthJoiner(e,s)?(n=!0,i[i.length-1]+=t.substr(a,2),a+=1):i.push(t.charAt(a))):Lt.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(a),n=!0):i.push(t.charAt(a)),a+=1;return i},qe.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,c=l.m.g,m=0,d=0,u=0,g=[],y=0,v=0,b=h.getFontByName(t.f),_=0,P=It(b);t.fWeight=P.weight,t.fStyle=P.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),s=t.finalText.length,t.finalLineHeight=t.lh;var k,x=t.tr/1e3*t.finalSize;if(t.sz)for(var C,D,A=!0,w=t.sz[0],S=t.sz[1];A;){C=0,y=0,s=(D=this.buildFinalText(t.t)).length,x=t.tr/1e3*t.finalSize;var T=-1;for(e=0;ew&&" "!==D[e]?(-1===T?s+=1:e=T,C+=t.finalLineHeight||1.2*t.finalSize,D.splice(e,T===e?1:0,"\r"),T=-1,y=0):(y+=_,y+=x);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Sv?y:v,y=-2*x,a="",i=!0,u+=1):a=F,h.chars?(o=h.getCharData(F,b.fStyle,h.getFontByName(t.f).fFamily),_=i?0:o.w*t.finalSize/100):_=h.measureText(a,t.f,t.finalSize)," "===F?M+=_+x:(y+=_+x+M,M=0),p.push({l:_,an:_,add:m,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==c){if(m+=_,""===a||" "===a||e===s-1){for(""!==a&&" "!==a||(m-=_);d<=e;)p[d].an=m,p[d].ind=f,p[d].extra=_,d+=1;f+=1,m=0}}else if(3==c){if(m+=_,""===a||e===s-1){for(""===a&&(m-=_);d<=e;)p[d].an=m,p[d].ind=f,p[d].extra=_,d+=1;m=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=y>v?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var E,I,L,R,O=l.a;n=O.length;var V=[];for(r=0;r0?a=this.ne.v/100:r=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=$.getBezierEasing(a,r,n,o).get,l=0,p=this.finalS,f=this.finalE,c=this.data.sh;if(2===c)l=h(l=f===p?i>=f?1:0:t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(3===c)l=h(l=f===p?i>=f?0:1:1-t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(4===c)f===p?l=0:(l=t(0,e(.5/(f-p)+(i-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===c){if(f===p)l=0;else{var m=f-p,d=-m/2+(i=e(t(0,i+.5-p),f-p)),u=m/2;l=Math.sqrt(1-d*d/(u*u))}l=h(l)}else 6===c?(f===p?l=0:(i=e(t(0,i+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(f-p)))/2),l=h(l)):(i>=s(p)&&(l=t(0,e(i-p<0?e(f,1)-(p-i):f-i,1))),l=h(l));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;l1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,s=this.o.v/e,i=this.s.v/e+s,a=this.e.v/e+s;if(i>a){var r=i;i=a,a=r}this.finalS=i,this.finalE=a}},r([nt],i),{getTextSelectorProp:function(t,e,s){return new i(t,e,s)}}}();function Ye(t,e,s){var i={propType:!1},a=rt.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,k,s):i,rx:r.rx?a(t,r.rx,0,k,s):i,ry:r.ry?a(t,r.ry,0,k,s):i,sk:r.sk?a(t,r.sk,0,k,s):i,sa:r.sa?a(t,r.sa,0,k,s):i,s:r.s?a(t,r.s,1,.01,s):i,a:r.a?a(t,r.a,1,0,s):i,o:r.o?a(t,r.o,0,.01,s):i,p:r.p?a(t,r.p,1,0,s):i,sw:r.sw?a(t,r.sw,0,0,s):i,sc:r.sc?a(t,r.sc,1,0,s):i,fc:r.fc?a(t,r.fc,1,0,s):i,fh:r.fh?a(t,r.fh,0,0,s):i,fs:r.fs?a(t,r.fs,0,.01,s):i,fb:r.fb?a(t,r.fb,0,.01,s):i,t:r.t?a(t,r.t,0,0,s):i},this.s=We.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function Xe(t,e,s){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=p(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}function He(){}Xe.prototype.searchProperties=function(){var t,e,s=this._textData.a.length,i=rt.getProp;for(t=0;t=o+ft||!d?(v=(o+ft-l)/h.partialLength,B=m.point[0]+(h.point[0]-m.point[0])*v,G=m.point[1]+(h.point[1]-m.point[1])*v,C.translate(-P[0]*w[a].an*.005,-P[1]*R*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,u[c+=1]?d=u[c].points:_.v.c?(f=0,d=u[c=0].points):(l-=h.partialLength,d=null)),d&&(m=h,g=(h=d[f]).partialLength));j=w[a].an/2-w[a].add,C.translate(-j,0,0)}else j=w[a].an/2-w[a].add,C.translate(-j,0,0),C.translate(-P[0]*w[a].an*.005,-P[1]*R*.01,0);for(M=0;Mt?this.textSpans[t].span:G(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var v=G("g");n.appendChild(v),this.textSpans[t].childSpan=v}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),f&&(o[t].n&&(c=-u,m+=s.yOffset,m+=d?1:0,d=!1),this.applyTextPropertiesToMatrix(s,l,o[t].line,c,m),c+=o[t].l||0,c+=u),h){var b;if(1===(g=this.globalData.fontManager.getCharData(s.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily)).t)b=new es(g.data,this.globalData,this);else{var _=Je;g.data&&g.data.shapes&&(_=this.buildShapeData(g.data,s.finalSize)),b=new Be(_,this.globalData,this)}if(this.textSpans[t].glyph){var P=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(P.layerElement),P.destroy()}this.textSpans[t].glyph=b,b._debug=!0,b.prepareFrame(0),b.renderFrame(),this.textSpans[t].childSpan.appendChild(b.layerElement),1===g.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+s.finalSize/100+","+s.finalSize/100+")")}else f&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}f&&n&&n.setAttribute("d","")}else{var k=this.textContainer,x="start";switch(s.j){case 1:x="end";break;case 2:x="middle";break;default:x="start"}k.setAttribute("text-anchor",x),k.setAttribute("letter-spacing",u);var C=this.buildTextContents(s.finalText);for(e=C.length,m=s.ps?s.ps[1]+s.ascent:0,t=0;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=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))}},ts.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=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=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=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()},ls.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=1?f=.99:f<=-1&&(f=-.99);var c=l*f,m=Math.cos(p+e.a.v)*c+o[0],d=Math.sin(p+e.a.v)*c+o[1];i=n.createRadialGradient(m,d,0,o[0],o[1],l)}var u=t.g.p,g=e.g.c,y=1;for(r=0;rh&&"xMidYMid slice"===l||os&&"meet"===r||is&&"slice"===r)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(is&&"slice"===r)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(i>s&&"meet"===r||is&&"meet"===r||i=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},ms.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var s;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),s=0;s=0;s-=1)(this.completeLayers||this.elements[s])&&this.elements[s].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},ms.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()}},ms.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},ms.prototype.hide=function(){this.animationItem.container.style.display="none"},ms.prototype.show=function(){this.animationItem.container.style.display="block"},r([ms,ts,os],ds),ds.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ds.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},ds.prototype.createComp=function(t){return new ds(t,this.globalData,this)},r([ms],us),us.prototype.createComp=function(t){return new ds(t,this.globalData,this)},Ke=us,J["canvas"]=Ke,At.registerModifier("tm",St),At.registerModifier("pb",Tt),At.registerModifier("rp",Mt),At.registerModifier("rd",Et),_t}));