"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var t="",e=!1,i=-999999,s=function(){return t};function r(t){return document.createElement(t)}function a(t,e){var i,s,r=t.length;for(i=0;i1?i[1]=1:i[1]<=0&&(i[1]=0),L(i[0],i[1],i[2])}function O(t,e){var i=R(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),L(i[0],i[1],i[2])}function z(t,e){var i=R(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),L(i[0],i[1],i[2])}!function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e}();var N=function(){return c},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,i,s=1,r=[],a={onmessage:function(){},postMessage:function(e){t({data:e})}},n={postMessage:function(t){a.onmessage({data:t})}};function o(i){if(window.Worker&&window.Blob&&e){var s=new Blob(["var _workerSelf = self; self.onmessage = ",i.toString()],{type:"text/javascript"}),r=URL.createObjectURL(s);return new Worker(r)}return t=i,a}function h(){i||(i=o((function(t){if(n.dataManager||(n.dataManager=function(){function t(r,a){var n,o,h,l,p,u,c=r.length;for(o=0;o=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)s(t[e].ks.k);else for(a=t[e].ks.k.length,r=0;ri[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,i,s,r=t.length;for(e=0;e=0;i-=1)if("sh"===t[i].ty)if(t[i].ks.k.i)t[i].ks.k.c=t[i].closed;else for(r=t[i].ks.k.length,s=0;s500)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}function n(t){var e={assetData:t},i=s(t,this.assetsPath,this.path);return W.loadData(i,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function o(){this._imageLoaded=e.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=n.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(t,e){var i;this.imagesLoadedCb=e;var s=t.length;for(i=0;ithis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,s=this.animationData.layers,r=s.length,a=t.layers,n=a.length;for(i=0;ithis.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,i=0;i=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},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 i=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},Z.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===U(t[0])){var i,s=t.length;for(i=0;i=0;i-=1)e[i].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,d()},t.setVolume=function(t,i){var r;for(r=0;r=.001?function(t,e,i,s){for(var r=0;r<4;++r){var a=h(e,i,s);if(0===a)return e;e-=(o(e,i,s)-t)/a}return e}(t,l,e,s):0===p?l:function(t,e,i,s,r){var a,n,h=0;do{(a=o(n=e+(i-e)/2,s,r)-t)>0?i=n:e=n}while(Math.abs(a)>1e-7&&++h<10);return n}(t,a,a+i,e,s)}},t}(),tt={double:function(t){return t.concat(p(t.length))}},et=function(t,e,i){var s=0,r=t,a=p(r);return{newElement:function(){return s?a[s-=1]:e()},release:function(t){s===r&&(a=tt.double(a),r*=2),i&&i(t),a[s]=t,s+=1}}},it=et(8,(function(){return{addedLength:0,percents:l("float32",B()),lengths:l("float32",B())}})),st=et(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,i=t.lengths.length;for(e=0;e-.001&&n<.001}var i=function(t,e,i,s){var r,a,n,o,h,l,p=B(),f=0,u=[],c=[],m=it.newElement();for(n=i.length,r=0;rn?-1:1,l=!0;l;)if(s[a]<=n&&s[a+1]>n?(o=(n-s[a])/(s[a+1]-s[a]),l=!1):a+=h,a<0||a>=r-1){if(a===r-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}var h=l("float32",8);return{getSegmentsLength:function(t){var e,s=st.newElement(),r=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=s.lengths,p=0;for(e=0;e1&&(a=1);var p,f=o(a,l),u=o(n=n>1?1:n,l),c=e.length,m=1-f,d=1-u,g=m*m*m,y=f*m*m*3,v=f*f*m*3,b=f*f*f,_=m*m*d,P=f*m*d+m*f*d+m*m*u,k=f*f*d+m*f*u+f*m*u,A=f*f*u,x=m*d*d,S=f*d*d+m*u*d+m*d*u,D=f*u*d+m*u*u+f*d*u,w=f*u*u,C=d*d*d,T=u*d*d+d*u*d+d*d*u,E=u*u*d+d*u*u+u*d*u,F=u*u*u;for(p=0;pc?u>m?u-c-m:m-c-u:m>c?m-c-u:c-u-m)>-1e-4&&f<1e-4}}}(),at=function(){var t=i,e=Math.abs;function s(t,e){var i,s=this.offsetTime;"multidimensional"===this.propType&&(i=l("float32",this.pv.length));for(var a,n,o,h,p,f,u,c,m,d=e.lastIndex,g=d,y=this.keyframes.length-1,v=!0;v;){if(a=this.keyframes[g],n=this.keyframes[g+1],g===y-1&&t>=n.t-s){a.h&&(a=n),d=0;break}if(n.t-s>t){d=g;break}g=E||t=E?M.points.length-1:0;for(p=M.points[I].point.length,h=0;h=V&&R=E)i[0]=b[0],i[1]=b[1],i[2]=b[2];else if(t<=F)i[0]=a.s[0],i[1]=a.s[1],i[2]=a.s[2];else{var G=r(a.s),q=r(b);_=i,P=function(t,e,i){var s,r,a,n,o,h=[],l=t[0],p=t[1],f=t[2],u=t[3],c=e[0],m=e[1],d=e[2],g=e[3];return(r=l*c+p*m+f*d+u*g)<0&&(r=-r,c=-c,m=-m,d=-d,g=-g),1-r>1e-6?(s=Math.acos(r),a=Math.sin(s),n=Math.sin((1-i)*s)/a,o=Math.sin(i*s)/a):(n=1-i,o=i),h[0]=n*l+o*c,h[1]=n*p+o*m,h[2]=n*f+o*d,h[3]=n*u+o*g,h}(G,q,(t-F)/(E-F)),A=P[0],x=P[1],S=P[2],D=P[3],w=Math.atan2(2*x*D-2*A*S,1-2*x*x-2*S*S),C=Math.asin(2*A*x+2*S*D),T=Math.atan2(2*A*D-2*x*S,1-2*A*A-2*S*S),_[0]=w/k,_[1]=C/k,_[2]=T/k}else for(g=0;g=E?f=1:t=s&&e>=s||this._caching.lastFrame=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function n(t){var i;if("unidimensional"===this.propType)i=t*this.mult,e(this.v-i)>1e-5&&(this.v=i,this._mdf=!0);else for(var s=0,r=this.v.length;s1e-5&&(this.v[s]=i,this._mdf=!0),s+=1}function o(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[s]||a[s]&&!r)&&(a[s]=ot.newElement()),a[s][0]=t,a[s][1]=e},ht.prototype.setTripleAt=function(t,e,i,s,r,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,s,"o",n,o),this.setXYAt(r,a,"i",n,o)},ht.prototype.reverse=function(){var t=new ht;t.setPathData(this.c,this._length);var e=this.v,i=this.o,s=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],s[0][0],s[0][1],i[0][0],i[0][1],0,!1),r=1);var a,n=this._length-1,o=this._length;for(a=r;a=c[c.length-1].t-this.offsetTime)s=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var m,d,g,y=u,v=c.length-1,b=!0;b&&(m=c[y],!((d=c[y+1]).t-this.offsetTime>t));)y=d.t-this.offsetTime)p=1;else if(ts&&e>s)||(this._caching.lastIndex=r0||t>-1e-6&&t<0?s(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+M(t[0])+","+M(t[1])+","+M(t[4])+","+M(t[5])+","+M(t[12])+","+M(t[13])+")"}return function(){this.reset=r,this.rotate=a,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=f,this.skewFromAxis=u,this.shear=p,this.scale=c,this.setTransform=m,this.translate=d,this.transform=g,this.applyToPoint=P,this.applyToX=k,this.applyToY=A,this.applyToZ=x,this.applyToPointArray=T,this.applyToTriplePoints=C,this.applyToPointStringified=E,this.toCSS=F,this.to2dCSS=I,this.clone=b,this.cloneFromProps=_,this.equals=v,this.inversePoints=w,this.inversePoint=D,this.getInverseMatrix=S,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){u=!!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?x(!1):x(!0)},_t.inBrowser=function(){return"undefined"!=typeof navigator},_t.installPlugin=function(t,e){"expressions"===t&&(c=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){m=t},_t.__getFactory=function(t){switch(t){case"propertyFactory":return at;case"shapePropertyFactory":return yt;case"matrix":return vt;default:return null}},_t.version="5.9.4";var kt="",At=document.getElementsByTagName("script"),xt=At[At.length-1]||{src:""};kt=xt.src?xt.src.replace(/^[^\?]+\??/,""):"",function(t){for(var e=kt.split("&"),i=0;i=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;ns+i))p=o.s*r<=s?0:(o.s*r-s)/i,f=o.e*r>=s+i?1:(o.e*r-s)/i,h.push([p,f])}return h.length||h.push([0,0]),h},Ct.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e1?1+a:this.s.v<0?0+a:this.s.v+a)>(i=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var n=e;e=i,i=n}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var o,h,l,p,f,u=this.shapes.length,c=0;if(i===e)for(r=0;r=0;r-=1)if((m=this.shapes[r]).shape._mdf){for((d=m.localShapeCollection).releaseShapes(),2===this.m&&u>1?(y=this.calculateShapeEdges(e,i,m.totalShapeLength,_,c),_+=m.totalShapeLength):y=[[v,b]],h=y.length,o=0;o=1?g.push({s:m.totalShapeLength*(v-1),e:m.totalShapeLength*(b-1)}):(g.push({s:m.totalShapeLength*v,e:m.totalShapeLength}),g.push({s:0,e:m.totalShapeLength*(b-1)}));var P=this.addShapes(m,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(m.shape.paths.shapes[m.shape.paths._length-1].c){var k=P.pop();this.addPaths(P,d),P=this.addShapes(m,g[1],k)}else this.addPaths(P,d),P=this.addShapes(m,g[1]);this.addPaths(P,d)}}m.shape.paths=d}}},Ct.prototype.addPaths=function(t,e){var i,s=t.length;for(i=0;ie.e){i.c=!1;break}e.s<=m&&e.e>=m+n.addedLength?(this.addSegment(u[s].v[r-1],u[s].o[r-1],u[s].i[r],u[s].v[r],i,o,g),g=!1):(l=rt.getNewSegment(u[s].v[r-1],u[s].v[r],u[s].o[r-1],u[s].i[r],(e.s-m)/n.addedLength,(e.e-m)/n.addedLength,h[r-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1),m+=n.addedLength,o+=1}if(u[s].c&&h.length){if(n=h[r-1],m<=e.e){var y=h[r-1].addedLength;e.s<=m&&e.e>=m+y?(this.addSegment(u[s].v[r-1],u[s].o[r-1],u[s].i[0],u[s].v[0],i,o,g),g=!1):(l=rt.getNewSegment(u[s].v[r-1],u[s].v[0],u[s].o[r-1],u[s].i[0],(e.s-m)/y,(e.e-m)/y,h[r-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1)}else i.c=!1;m+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),m>e.e)break;s=this.p.keyframes[this.p.keyframes.length-1].t?(s=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),r=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(s=this.p.pv,r=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){s=[],r=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(s[0]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),s[1]=n.getValueAtTime((n.keyframes[0].t+.01)/i,0),r[0]=a.getValueAtTime(a.keyframes[0].t/i,0),r[1]=n.getValueAtTime(n.keyframes[0].t/i,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(s[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),s[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/i,0),r[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0),r[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/i,0)):(s=[a.pv,n.pv],r[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime),r[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/i,n.offsetTime))}else s=r=t;this.v.rotate(-Math.atan2(s[1]-r[1],s[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},a([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,i,s){return new e(t,i,s)}}}();function Ft(){}function Mt(){}function It(t){for(var e=t.fStyle?t.fStyle.split(" "):[],i="normal",s="normal",r=e.length,a=0;a0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Ft.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e0?Math.floor(u):Math.ceil(u),d=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(u>0){for(;_m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),_-=c)}for(s=1===this.data.m?0:this._currentCopies-1,r=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(i=(e=this.elemsData[s].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(s/(this._currentCopies-1)),0!==_){for((0!==s&&1===r||s!==this._currentCopies-1&&-1===r)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),v=0;v0&&(f=!1),f){var u=r("style");u.setAttribute("f-forigin",s[i].fOrigin),u.setAttribute("f-origin",s[i].origin),u.setAttribute("f-family",s[i].fFamily),u.type="text/css",u.innerText="@font-face {font-family: "+s[i].fFamily+"; font-style: normal; src: url('"+s[i].fPath+"');}",e.appendChild(u)}}else if("g"===s[i].fOrigin||1===s[i].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),p=0;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("+s()+"#"+v+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}pe.prototype.prepareFrame=function(){},a([Rt,ae,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 i=this._volume*this._volumeMultiplier;this._previousVolume!==i&&(this._previousVolume=i,this.audio.volume(i))},a([Rt,ae,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(){},ue.prototype.checkLayers=function(t){var e,i,s=this.layers.length;for(this.completeLayers=!0,e=s-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e]).ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},ue.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)}},ue.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},ue.prototype.createAudio=function(t){return new fe(t,this.globalData,this)},ue.prototype.createFootage=function(t){return new pe(t,this.globalData,this)},ue.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t1&&(a+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==a){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute("d",n)),i.lastPath=a}},me.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var de=function(){var t={};return t.createFilter=function(t,e){var i=G("filter");i.setAttribute("id",t),!0!==e&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%"));return i},t.createAlphaToLuminanceFilter=function(){var t=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,i,r="SourceGraphic",a=t.data.ef?t.data.ef.length:0,n=I(),o=de.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,i=0,s=e.length;i.01)return!1;i+=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=s.transformers[d].mProps._mdf||h,m-=1,d-=1;if(h)for(m=y-s.styles[p].lvl,d=s.transformers.length-1;m>0;)c=s.transformers[d].mProps.v.props,u.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),m-=1,d-=1}else u=t;if(n=(f=s.sh.paths)._length,h){for(o="",a=0;a=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,i){var s=e.style,r=e.d;r&&(r._mdf||i)&&r.dashStr&&(s.pElem.setAttribute("stroke-dasharray",r.dashStr),s.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),e.c&&(e.c._mdf||i)&&s.pElem.setAttribute("stroke","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||i)&&s.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(s.pElem.setAttribute("stroke-width",e.w.v),s.msElem&&s.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return r;case"tr":return i;case"no":return s;default:return null}}}}();function Be(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function Ge(t,e,i,s,r,a){this.o=t,this.sw=e,this.sc=i,this.fc=s,this.m=r,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!s,m:!0,p:!0}}function qe(t,e){this._frameId=i,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}a([ae,ce,_e,Se,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,i,s,r=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(i=0;i1&&o&&this.setShapesAsAnimated(n)}},Be.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e=0;o-=1){if((u=this.searchProcessedElement(t[o]))?e[o]=i[u-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)u?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],r),t[o]._render&&e[o].style.pElem.parentNode!==s&&s.appendChild(e[o].style.pElem),d.push(e[o].style);else if("gr"===t[o].ty){if(u)for(l=e[o].it.length,h=0;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,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var s;this.lock=!0,this._mdf=!1;var r=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(s=0;se);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},qe.prototype.buildFinalText=function(t){for(var e,i,s=[],r=0,a=t.length,n=!1;r=55296&&e<=56319?(i=t.charCodeAt(r+1))>=56320&&i<=57343?(n||Lt.isModifier(e,i)?(s[s.length-1]+=t.substr(r,2),n=!1):s.push(t.substr(r,2)),r+=1):s.push(t.charAt(r)):e>56319?(i=t.charCodeAt(r+1),Lt.isZeroWidthJoiner(e,i)?(n=!0,s[s.length-1]+=t.substr(r,2),r+=1):s.push(t.charAt(r))):Lt.isZeroWidthJoiner(e)?(s[s.length-1]+=t.charAt(r),n=!0):s.push(t.charAt(r)),r+=1;return s},qe.prototype.completeTextData=function(t){t.__complete=!0;var e,i,s,r,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,u=l.m.g,c=0,m=0,d=0,g=[],y=0,v=0,b=h.getFontByName(t.f),_=0,P=It(b);t.fWeight=P.weight,t.fStyle=P.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var k,A=t.tr/1e3*t.finalSize;if(t.sz)for(var x,S,D=!0,w=t.sz[0],C=t.sz[1];D;){x=0,y=0,i=(S=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var T=-1;for(e=0;ew&&" "!==S[e]?(-1===T?i+=1:e=T,x+=t.finalLineHeight||1.2*t.finalSize,S.splice(e,T===e?1:0,"\r"),T=-1,y=0):(y+=_,y+=A);x+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Cv?y:v,y=-2*A,r="",s=!0,d+=1):r=E,h.chars?(o=h.getCharData(E,b.fStyle,h.getFontByName(t.f).fFamily),_=s?0:o.w*t.finalSize/100):_=h.measureText(r,t.f,t.finalSize)," "===E?F+=_+A:(y+=_+A+F,F=0),p.push({l:_,an:_,add:c,n:s,anIndexes:[],val:r,line:d,animatorJustifyOffset:0}),2==u){if(c+=_,""===r||" "===r||e===i-1){for(""!==r&&" "!==r||(c-=_);m<=e;)p[m].an=c,p[m].ind=f,p[m].extra=_,m+=1;f+=1,c=0}}else if(3==u){if(c+=_,""===r||e===i-1){for(""===r&&(c-=_);m<=e;)p[m].an=c,p[m].ind=f,p[m].extra=_,m+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=y>v?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var M,I,L,R,V=l.a;n=V.length;var O=[];for(a=0;a0?r=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=$.getBezierEasing(r,a,n,o).get,l=0,p=this.finalS,f=this.finalE,u=this.data.sh;if(2===u)l=h(l=f===p?s>=f?1:0:t(0,e(.5/(f-p)+(s-p)/(f-p),1)));else if(3===u)l=h(l=f===p?s>=f?0:1:1-t(0,e(.5/(f-p)+(s-p)/(f-p),1)));else if(4===u)f===p?l=0:(l=t(0,e(.5/(f-p)+(s-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===u){if(f===p)l=0;else{var c=f-p,m=-c/2+(s=e(t(0,s+.5-p),f-p)),d=c/2;l=Math.sqrt(1-m*m/(d*d))}l=h(l)}else 6===u?(f===p?l=0:(s=e(t(0,s+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*s/(f-p)))/2),l=h(l)):(s>=i(p)&&(l=t(0,e(s-p<0?e(f,1)-(p-s):f-s,1))),l=h(l));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;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,i=this.o.v/e,s=this.s.v/e+i,r=this.e.v/e+i;if(s>r){var a=s;s=r,r=a}this.finalS=s,this.finalE=r}},a([nt],s),{getTextSelectorProp:function(t,e,i){return new s(t,e,i)}}}();function Xe(t,e,i){var s={propType:!1},r=at.getProp,a=e.a;this.a={r:a.r?r(t,a.r,0,k,i):s,rx:a.rx?r(t,a.rx,0,k,i):s,ry:a.ry?r(t,a.ry,0,k,i):s,sk:a.sk?r(t,a.sk,0,k,i):s,sa:a.sa?r(t,a.sa,0,k,i):s,s:a.s?r(t,a.s,1,.01,i):s,a:a.a?r(t,a.a,1,0,i):s,o:a.o?r(t,a.o,0,.01,i):s,p:a.p?r(t,a.p,1,0,i):s,sw:a.sw?r(t,a.sw,0,0,i):s,sc:a.sc?r(t,a.sc,1,0,i):s,fc:a.fc?r(t,a.fc,1,0,i):s,fh:a.fh?r(t,a.fh,0,0,i):s,fs:a.fs?r(t,a.fs,0,.01,i):s,fb:a.fb?r(t,a.fb,0,.01,i):s,t:a.t?r(t,a.t,0,0,i):s},this.s=We.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function Ye(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=p(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function He(){}Ye.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,s=at.getProp;for(t=0;t=o+ft||!m?(v=(o+ft-l)/h.partialLength,B=c.point[0]+(h.point[0]-c.point[0])*v,G=c.point[1]+(h.point[1]-c.point[1])*v,x.translate(-P[0]*w[r].an*.005,-P[1]*R*.01),p=!1):m&&(l+=h.partialLength,(f+=1)>=m.length&&(f=0,d[u+=1]?m=d[u].points:_.v.c?(f=0,m=d[u=0].points):(l-=h.partialLength,m=null)),m&&(c=h,g=(h=m[f]).partialLength));j=w[r].an/2-w[r].add,x.translate(-j,0,0)}else j=w[r].an/2-w[r].add,x.translate(-j,0,0),x.translate(-P[0]*w[r].an*.005,-P[1]*R*.01,0);for(F=0;Ft?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&&(u=-d,c+=i.yOffset,c+=m?1:0,m=!1),this.applyTextPropertiesToMatrix(i,l,o[t].line,u,c),u+=o[t].l||0,u+=d),h){var b;if(1===(g=this.globalData.fontManager.getCharData(i.finalText[t],s.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily)).t)b=new ei(g.data,this.globalData,this);else{var _=Je;g.data&&g.data.shapes&&(_=this.buildShapeData(g.data,i.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("+i.finalSize/100+","+i.finalSize/100+")")}else f&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}f&&n&&n.setAttribute("d","")}else{var k=this.textContainer,A="start";switch(i.j){case 1:A="end";break;case 2:A="middle";break;default:A="start"}k.setAttribute("text-anchor",A),k.setAttribute("letter-spacing",d);var x=this.buildTextContents(i.finalText);for(e=x.length,c=i.ps?i.ps[1]+i.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;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ti.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t