import{aU as createNamespace,d as defineComponent,by as useChildren,w as watch,bZ as useCustomFieldValue,f as createVNode,bl as numericProp,bO as unknownProp,aX as withInstall,bj as extend,bm as makeRequiredProp,bw as truthProp,l as ref,e as computed,I as Icon,bJ as addUnit,bp as useParent,bC as pick,bD as mergeProps,b_ as commonjsGlobal,b8 as getDefaultExportFromCjs,c as onMounted,b$ as openBlock,c0 as createElementBlock,c1 as normalizeStyle}from"./index-6fcf3ff4.js";const[name$1,bem$1]=createNamespace("radio-group"),radioGroupProps={shape:String,disabled:Boolean,iconSize:numericProp,direction:String,modelValue:unknownProp,checkedColor:String},RADIO_KEY=Symbol(name$1);var stdin_default$2=defineComponent({name:name$1,props:radioGroupProps,emits:["change","update:modelValue"],setup(t,{emit:e,slots:r}){const{linkChildren:i}=useChildren(RADIO_KEY),s=a=>e("update:modelValue",a);return watch(()=>t.modelValue,a=>e("change",a)),i({props:t,updateValue:s}),useCustomFieldValue(()=>t.modelValue),()=>{var a;return createVNode("div",{class:bem$1([t.direction]),role:"radiogroup"},[(a=r.default)==null?void 0:a.call(r)])}}});const RadioGroup=withInstall(stdin_default$2),checkerProps={name:unknownProp,disabled:Boolean,iconSize:numericProp,modelValue:unknownProp,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var stdin_default$1=defineComponent({props:extend({},checkerProps,{bem:makeRequiredProp(Function),role:String,shape:String,parent:Object,checked:Boolean,bindGroup:truthProp,indeterminate:{type:Boolean,default:null}}),emits:["click","toggle"],setup(t,{emit:e,slots:r}){const i=ref(),s=h=>{if(t.parent&&t.bindGroup)return t.parent.props[h]},a=computed(()=>{if(t.parent&&t.bindGroup){const h=s("disabled")||t.disabled;if(t.role==="checkbox"){const b=s("modelValue").length,y=s("max"),u=y&&b>=+y;return h||u&&!t.checked}return h}return t.disabled}),n=computed(()=>s("direction")),l=computed(()=>{const h=t.checkedColor||s("checkedColor");if(h&&t.checked&&!a.value)return{borderColor:h,backgroundColor:h}}),o=computed(()=>t.shape||s("shape")||"round"),f=h=>{const{target:b}=h,y=i.value,u=y===b||(y==null?void 0:y.contains(b));!a.value&&(u||!t.labelDisabled)&&e("toggle"),e("click",h)},m=()=>{var h,b;const{bem:y,checked:u,indeterminate:C}=t,c=t.iconSize||s("iconSize");return createVNode("div",{ref:i,class:y("icon",[o.value,{disabled:a.value,checked:u,indeterminate:C}]),style:o.value!=="dot"?{fontSize:addUnit(c)}:{width:addUnit(c),height:addUnit(c),borderColor:(h=l.value)==null?void 0:h.borderColor}},[r.icon?r.icon({checked:u,disabled:a.value}):o.value!=="dot"?createVNode(Icon,{name:C?"minus":"success",style:l.value},null):createVNode("div",{class:y("icon--dot__icon"),style:{backgroundColor:(b=l.value)==null?void 0:b.backgroundColor}},null)])},P=()=>{if(r.default)return createVNode("span",{class:t.bem("label",[t.labelPosition,{disabled:a.value}])},[r.default()])};return()=>{const h=t.labelPosition==="left"?[P(),m()]:[m(),P()];return createVNode("div",{role:t.role,class:t.bem([{disabled:a.value,"label-disabled":t.labelDisabled},n.value]),tabindex:a.value?void 0:0,"aria-checked":t.checked,onClick:f},[h])}}});const radioProps=extend({},checkerProps,{shape:String}),[name,bem]=createNamespace("radio");var stdin_default=defineComponent({name,props:radioProps,emits:["update:modelValue"],setup(t,{emit:e,slots:r}){const{parent:i}=useParent(RADIO_KEY),s=()=>(i?i.props.modelValue:t.modelValue)===t.name,a=()=>{i?i.updateValue(t.name):e("update:modelValue",t.name)};return()=>createVNode(stdin_default$1,mergeProps({bem,role:"radio",parent:i,checked:s(),onToggle:a},t),pick(r,["default","icon"]))}});const Radio=withInstall(stdin_default);var lottie={exports:{}};(function(module,exports){typeof navigator<"u"&&function(t,e){module.exports=e()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i=t.length,s;for(r=0;r1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t=[],e,r;for(e=0;e<256;e+=1)r=e.toString(16),t[e]=r.length===1?"0"+r:r;return function(i,s,a){return i<0&&(i=0),s<0&&(s=0),a<0&&(a=0),"#"+t[i]+t[s]+t[a]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(t)}var dataManager=function(){var t=1,e=[],r,i,s={onmessage:function(){},postMessage:function(b){r({data:b})}},a={postMessage:function(b){s.onmessage({data:b})}};function n(h){if(window.Worker&&window.Blob&&getWebWorker()){var b=new Blob(["var _workerSelf = self; self.onmessage = ",h.toString()],{type:"text/javascript"}),y=URL.createObjectURL(b);return new Worker(y)}return r=h,s}function l(){i||(i=n(function(b){function y(){function C(L,_){var M,g,S=L.length,w,F,B,G;for(g=0;g=0;_-=1)if(L[_].ty==="sh")if(L[_].ks.k.i)E(L[_].ks.k);else for(S=L[_].ks.k.length,g=0;gM[0]?!0:M[0]>L[0]?!1:L[1]>M[1]?!0:M[1]>L[1]?!1:L[2]>M[2]?!0:M[2]>L[2]?!1:null}var A=function(){var L=[4,4,14];function _(g){var S=g.t.d;g.t.d={k:[{s:S,t:0}]}}function M(g){var S,w=g.length;for(S=0;S=0;S-=1)if(g[S].ty==="sh")if(g[S].ks.k.i)g[S].ks.k.c=g[S].closed;else for(B=g[S].ks.k.length,F=0;F500)&&(this._imageLoaded(),clearInterval(p)),d+=1}).bind(this),50)}function a(c){var d=i(c,this.assetsPath,this.path),p=createNS("image");isSafari?this.testImageLoaded(p):p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",(function(){v.img=t,this._imageLoaded()}).bind(this),!1),p.setAttributeNS("http://www.w3.org/1999/xlink","href",d),this._elementHelper.append?this._elementHelper.append(p):this._elementHelper.appendChild(p);var v={img:p,assetData:c};return v}function n(c){var d=i(c,this.assetsPath,this.path),p=createTag("img");p.crossOrigin="anonymous",p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",(function(){v.img=t,this._imageLoaded()}).bind(this),!1),p.src=d;var v={img:p,assetData:c};return v}function l(c){var d={assetData:c},p=i(c,this.assetsPath,this.path);return dataManager.loadData(p,(function(v){d.img=v,this._footageLoaded()}).bind(this),(function(){d.img={},this._footageLoaded()}).bind(this)),d}function o(c,d){this.imagesLoadedCb=d;var p,v=c.length;for(p=0;pthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e=this.animationData.layers,r,i=e.length,s=t.layers,a,n=s.length;for(a=0;athis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):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):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,e=0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.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")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),_typeof$4(t[0])==="object"){var r,i=t.length;for(r=0;r=0;M-=1)e[M].animation.destroy(_)}function x(_,M,g){var S=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),w,F=S.length;for(w=0;w0?v=x:p=x;while(Math.abs(A)>a&&++k=s?C(p,V,v,E):I===0?V:u(p,A,A+o,v,E)}},t}(),pooling=function(){function t(e){return e.concat(createSizedArray(e.length))}return{double:t}}(),poolFactory=function(){return function(t,e,r){var i=0,s=t,a=createSizedArray(s),n={newElement:l,release:o};function l(){var f;return i?(i-=1,f=a[i]):f=e(),f}function o(f){i===s&&(a=pooling.double(a),s*=2),r&&r(f),a[i]=f,i+=1}return n}}(),bezierLengthPool=function(){function t(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,t)}(),segmentsLengthPool=function(){function t(){return{lengths:[],totalLength:0}}function e(r){var i,s=r.lengths.length;for(i=0;i-.001&&d<.001}function r(h,b,y,u,C,c,d,p,v){if(y===0&&c===0&&v===0)return e(h,b,u,C,d,p);var E=t.sqrt(t.pow(u-h,2)+t.pow(C-b,2)+t.pow(c-y,2)),T=t.sqrt(t.pow(d-h,2)+t.pow(p-b,2)+t.pow(v-y,2)),A=t.sqrt(t.pow(d-u,2)+t.pow(p-C,2)+t.pow(v-c,2)),x;return E>T?E>A?x=E-T-A:x=A-T-E:A>T?x=A-T-E:x=T-E-A,x>-1e-4&&x<1e-4}var i=function(){return function(h,b,y,u){var C=getDefaultCurveSegments(),c,d,p,v,E,T=0,A,x=[],k=[],R=bezierLengthPool.newElement();for(p=y.length,c=0;cd?-1:1,E=!0;E;)if(u[c]<=d&&u[c+1]>d?(p=(d-u[c])/(u[c+1]-u[c]),E=!1):c+=v,c<0||c>=C-1){if(c===C-1)return y[c];E=!1}return y[c]+(y[c+1]-y[c])*p}function f(h,b,y,u,C,c){var d=o(C,c),p=1-d,v=t.round((p*p*p*h[0]+(d*p*p+p*d*p+p*p*d)*y[0]+(d*d*p+p*d*d+d*p*d)*u[0]+d*d*d*b[0])*1e3)/1e3,E=t.round((p*p*p*h[1]+(d*p*p+p*d*p+p*p*d)*y[1]+(d*d*p+p*d*d+d*p*d)*u[1]+d*d*d*b[1])*1e3)/1e3;return[v,E]}var m=createTypedArray("float32",8);function P(h,b,y,u,C,c,d){C<0?C=0:C>1&&(C=1);var p=o(C,d);c=c>1?1:c;var v=o(c,d),E,T=h.length,A=1-p,x=1-v,k=A*A*A,R=p*A*A*3,V=p*p*A*3,I=p*p*p,D=A*A*x,O=p*A*x+A*p*x+A*A*v,L=p*p*x+A*p*v+p*A*v,_=p*p*v,M=A*x*x,g=p*x*x+A*v*x+A*x*v,S=p*v*x+A*v*v+p*x*v,w=p*v*v,F=x*x*x,B=v*x*x+x*v*x+x*x*v,G=v*v*x+x*v*v+v*x*v,z=v*v*v;for(E=0;E=f.t-r){o.h&&(o=f),s=0;break}if(f.t-r>t){s=a;break}a=c||t=c?v.points.length-1:0;for(h=v.points[E].point.length,P=0;P=x&&T=c)i[0]=p[0],i[1]=p[1],i[2]=p[2];else if(t<=d)i[0]=o.s[0],i[1]=o.s[1],i[2]=o.s[2];else{var O=createQuaternion(o.s),L=createQuaternion(p),_=(t-d)/(c-d);quaternionToEuler(i,slerp(O,L,_))}else for(a=0;a=c?b=1:t1e-6?(h=Math.acos(b),y=Math.sin(h),u=Math.sin((1-r)*h)/y,C=Math.sin(r*h)/y):(u=1-r,C=r),i[0]=u*s+C*o,i[1]=u*a+C*f,i[2]=u*n+C*m,i[3]=u*l+C*P,i}function quaternionToEuler(t,e){var r=e[0],i=e[1],s=e[2],a=e[3],n=Math.atan2(2*i*a-2*r*s,1-2*i*i-2*s*s),l=Math.asin(2*r*i+2*s*a),o=Math.atan2(2*r*a-2*i*s,1-2*r*r-2*s*s);t[0]=n/degToRads,t[1]=l/degToRads,t[2]=o/degToRads}function createQuaternion(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),l=Math.sin(e/2),o=Math.sin(r/2),f=Math.sin(i/2),m=s*a*n-l*o*f,P=l*o*n+s*a*f,h=l*a*n+s*o*f,b=s*o*n-l*a*f;return[P,h,b,m]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&t>=r||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if(this.propType==="unidimensional")e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r1e-5&&(this.v[r]=e,this._mdf=!0),r+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var t,e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,l){this.setXYAt(t,e,"v",n,l),this.setXYAt(r,i,"o",n,l),this.setXYAt(s,a,"i",n,l)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a=this._length-1,n=this._length,l;for(l=s;l=O[O.length-1].t-this.offsetTime)E=O[O.length-1].s?O[O.length-1].s[0]:O[O.length-2].e[0],A=!0;else{for(var L=v,_=O.length-1,M=!0,g,S,w;M&&(g=O[L],S=O[L+1],!(S.t-this.offsetTime>c));)L<_-1?L+=1:M=!1;if(w=this.keyframesMetadata[L]||{},A=g.h===1,v=L,!A){if(c>=S.t-this.offsetTime)I=1;else if(cp&&c>p)||(this._caching.lastIndex=v0||g>-1e-6&&g<0?i(g*S)/S:g}function M(){var g=this.props,S=_(g[0]),w=_(g[1]),F=_(g[4]),B=_(g[5]),G=_(g[12]),z=_(g[13]);return"matrix("+S+","+w+","+F+","+B+","+G+","+z+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=l,this.rotateZ=o,this.skew=m,this.skewFromAxis=P,this.shear=f,this.scale=h,this.setTransform=b,this.translate=y,this.transform=u,this.multiply=C,this.applyToPoint=E,this.applyToX=T,this.applyToY=A,this.applyToZ=x,this.applyToPointArray=D,this.applyToTriplePoints=I,this.applyToPointStringified=O,this.toCSS=L,this.to2dCSS=M,this.clone=p,this.cloneFromProps=v,this.equals=d,this.inversePoints=V,this.inversePoint=R,this.getInverseMatrix=k,this._t=this.transform,this.isIdentity=c,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(r){return typeof r}:_typeof$3=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$3(t)}var lottie={};function setLocation(t){setLocationHref(t)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return animationManager.loadAnimation(t)}function setQuality(t){if(typeof t=="string")switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t)}function inBrowser(){return typeof navigator<"u"}function installPlugin(t,e){t==="expressions"&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n=[],l,o=a.length,f;for(l=0;li+r)){var m,P;f.s*s<=i?m=0:m=(f.s*s-i)/r,f.e*s>=i+r?P=1:P=(f.e*s-i)/r,n.push([m,P])}return n.length||n.push([0,0]),n},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e1?e=1+i:this.s.v<0?e=0+i:e=this.s.v+i,this.e.v>1?r=1+i:this.e.v<0?r=0+i:r=this.e.v+i,e>r){var s=e;e=r,r=s}e=Math.round(e*1e4)*1e-4,r=Math.round(r*1e4)*1e-4,this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var a,n,l=this.shapes.length,o,f,m,P,h,b=0;if(r===e)for(n=0;n=0;n-=1)if(u=this.shapes[n],u.shape._mdf){for(C=u.localShapeCollection,C.releaseShapes(),this.m===2&&l>1?(v=this.calculateShapeEdges(e,r,u.totalShapeLength,p,b),p+=u.totalShapeLength):v=[[c,d]],f=v.length,o=0;o=1?y.push({s:u.totalShapeLength*(c-1),e:u.totalShapeLength*(d-1)}):(y.push({s:u.totalShapeLength*c,e:u.totalShapeLength}),y.push({s:0,e:u.totalShapeLength*(d-1)}));var E=this.addShapes(u,y[0]);if(y[0].s!==y[0].e){if(y.length>1){var T=u.shape.paths.shapes[u.shape.paths._length-1];if(T.c){var A=E.pop();this.addPaths(E,C),E=this.addShapes(u,y[1],A)}else this.addPaths(E,C),E=this.addShapes(u,y[1])}this.addPaths(E,C)}}u.shape.paths=C}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;re.e){r.c=!1;break}else e.s<=f&&e.e>=f+m.addedLength?(this.addSegment(s[a].v[l-1],s[a].o[l-1],s[a].i[l],s[a].v[l],r,P,C),C=!1):(b=bez.getNewSegment(s[a].v[l-1],s[a].v[l],s[a].o[l-1],s[a].i[l],(e.s-f)/m.addedLength,(e.e-f)/m.addedLength,h[l-1]),this.addSegmentFromArray(b,r,P,C),C=!1,r.c=!1),f+=m.addedLength,P+=1;if(s[a].c&&h.length){if(m=h[l-1],f<=e.e){var c=h[l-1].addedLength;e.s<=f&&e.e>=f+c?(this.addSegment(s[a].v[l-1],s[a].o[l-1],s[a].i[0],s[a].v[0],r,P,C),C=!1):(b=bez.getNewSegment(s[a].v[l-1],s[a].v[0],s[a].o[l-1],s[a].i[0],(e.s-f)/c,(e.e-f)/c,h[l-1]),this.addSegmentFromArray(b,r,P,C),C=!1,r.c=!1)}else r.c=!1;f+=m.addedLength,P+=1}if(r._length&&(r.setXYAt(r.v[u][0],r.v[u][1],"i",u),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),f>e.e)break;a=this.p.keyframes[this.p.keyframes.length-1].t?(m=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/f,0),P=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/f,0)):(m=this.p.pv,P=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/f,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){m=[],P=[];var h=this.px,b=this.py;h._caching.lastFrame+h.offsetTime<=h.keyframes[0].t?(m[0]=h.getValueAtTime((h.keyframes[0].t+.01)/f,0),m[1]=b.getValueAtTime((b.keyframes[0].t+.01)/f,0),P[0]=h.getValueAtTime(h.keyframes[0].t/f,0),P[1]=b.getValueAtTime(b.keyframes[0].t/f,0)):h._caching.lastFrame+h.offsetTime>=h.keyframes[h.keyframes.length-1].t?(m[0]=h.getValueAtTime(h.keyframes[h.keyframes.length-1].t/f,0),m[1]=b.getValueAtTime(b.keyframes[b.keyframes.length-1].t/f,0),P[0]=h.getValueAtTime((h.keyframes[h.keyframes.length-1].t-.01)/f,0),P[1]=b.getValueAtTime((b.keyframes[b.keyframes.length-1].t-.01)/f,0)):(m=[h.pv,b.pv],P[0]=h.getValueAtTime((h._caching.lastFrame+h.offsetTime-.01)/f,h.offsetTime),P[1]=b.getValueAtTime((b._caching.lastFrame+b.offsetTime-.01)/f,b.offsetTime))}else P=t,m=P;this.v.rotate(-Math.atan2(m[1]-P[1],m[0]-P[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}}function i(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;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)}function s(){}function a(o){this._addDynamicProperty(o),this.elem.addDynamicProperty(o),this._isDirty=!0}function n(o,f,m){if(this.elem=o,this.frameId=-1,this.propType="transform",this.data=f,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(m||o),f.p&&f.p.s?(this.px=PropertyFactory.getProp(o,f.p.x,0,0,this),this.py=PropertyFactory.getProp(o,f.p.y,0,0,this),f.p.z&&(this.pz=PropertyFactory.getProp(o,f.p.z,0,0,this))):this.p=PropertyFactory.getProp(o,f.p||{k:[0,0,0]},1,0,this),f.rx){if(this.rx=PropertyFactory.getProp(o,f.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(o,f.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(o,f.rz,0,degToRads,this),f.or.k[0].ti){var P,h=f.or.k.length;for(P=0;P0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e0?Math.floor(h):Math.ceil(h),u=this.pMatrix.props,C=this.rMatrix.props,c=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var d=0;if(h>0){for(;dy;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),d-=1;b&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-b,!0),d-=b)}i=this.data.m===1?0:this._currentCopies-1,s=this.data.m===1?1:-1,a=this._currentCopies;for(var p,v;a;){if(e=this.elemsData[i].it,r=e[e.length-1].transform.mProps.v.props,v=r.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._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),d!==0){for((i!==0&&s===1||i!==this._currentCopies-1&&s===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),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]),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]),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]),p=0;p0&&i<1?[e]:[]:[e-i,e+i].filter(function(s){return s>0&&s<1})},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),r=lerpPoint(this.points[1],this.points[2],t),i=lerpPoint(this.points[2],this.points[3],t),s=lerpPoint(e,r,t),a=lerpPoint(r,i,t),n=lerpPoint(s,a,t);return[new PolynomialBezier(this.points[0],e,s,n,!0),new PolynomialBezier(n,a,i,this.points[3],!0)]};function extrema(t,e){var r=t.points[0][e],i=t.points[t.points.length-1][e];if(r>i){var s=i;i=r,r=s}for(var a=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),n=0;n0&&a[n]<1){var l=t.point(a[n])[e];li&&(i=l)}return{min:r,max:i}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}};function intersectData(t,e,r){var i=t.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:t,t:(e+r)/2,t1:e,t2:r}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return Math.abs(t.cx-e.cx)*2=a||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i){s.push([t.t,e.t]);return}var n=splitData(t),l=splitData(e);intersectsImpl(n[0],l[0],r+1,i,s,a),intersectsImpl(n[0],l[1],r+1,i,s,a),intersectsImpl(n[1],l[0],r+1,i,s,a),intersectsImpl(n[1],l[1],r+1,i,s,a)}}PolynomialBezier.prototype.intersections=function(t,e,r){e===void 0&&(e=2),r===void 0&&(r=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,i,r),i},PolynomialBezier.shapeSegment=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[r],t.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[r],t.i[r],t.o[e],t.v[e],!0)};function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,r,i){var s=[t[0],t[1],1],a=[e[0],e[1],1],n=[r[0],r[1],1],l=[i[0],i[1],1],o=crossProduct(crossProduct(s,a),crossProduct(n,l));return floatZero(o[2])?null:[o[0]/o[2],o[1]/o[2]]}function polarOffset(t,e,r){return[t[0]+Math.cos(e)*r,t[1]-Math.sin(e)*r]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(t,e,r,i,s,a,n){var l=r-Math.PI/2,o=r+Math.PI/2,f=e[0]+Math.cos(r)*i*s,m=e[1]-Math.sin(r)*i*s;t.setTripleAt(f,m,f+Math.cos(l)*a,m-Math.sin(l)*a,f+Math.cos(o)*n,m-Math.sin(o)*n,t.length())}function getPerpendicularVector(t,e){var r=[e[0]-t[0],e[1]-t[1]],i=-Math.PI*.5,s=[Math.cos(i)*r[0]-Math.sin(i)*r[1],Math.sin(i)*r[0]+Math.cos(i)*r[1]];return s}function getProjectingAngle(t,e){var r=e===0?t.length()-1:e-1,i=(e+1)%t.length(),s=t.v[r],a=t.v[i],n=getPerpendicularVector(s,a);return Math.atan2(0,1)-Math.atan2(n[1],n[0])}function zigZagCorner(t,e,r,i,s,a,n){var l=getProjectingAngle(e,r),o=e.v[r%e._length],f=e.v[r===0?e._length-1:r-1],m=e.v[(r+1)%e._length],P=a===2?Math.sqrt(Math.pow(o[0]-f[0],2)+Math.pow(o[1]-f[1],2)):0,h=a===2?Math.sqrt(Math.pow(o[0]-m[0],2)+Math.pow(o[1]-m[1],2)):0;setPoint(t,e.v[r%e._length],l,n,i,h/((s+1)*2),P/((s+1)*2))}function zigZagSegment(t,e,r,i,s,a){for(var n=0;n1&&e.length>1&&(s=getIntersection(t[0],e[e.length-1]),s)?[[t[0].split(s[0])[0]],[e[e.length-1].split(s[1])[1]]]:[r,i]}function pruneIntersections(t){for(var e,r=1;r1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var r=t.inflectionPoints(),i,s,a,n;if(r.length===0)return[offsetSegment(t,e)];if(r.length===1||floatEqual(r[1],1))return a=t.split(r[0]),i=a[0],s=a[1],[offsetSegment(i,e),offsetSegment(s,e)];a=t.split(r[0]),i=a[0];var l=(r[1]-r[0])/(1-r[0]);return a=a[1].split(l),n=a[0],s=a[1],[offsetSegment(i,e),offsetSegment(n,e),offsetSegment(s,e)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(t,e,r,i){var s=shapePool.newElement();s.c=t.c;var a=t.length();t.c||(a-=1);var n,l,o,f=[];for(n=0;n=0;n-=1)o=PolynomialBezier.shapeSegmentInverted(t,n),f.push(offsetSegmentSplit(o,e));f=pruneIntersections(f);var m=null,P=null;for(n=0;n0&&(B=!1),B){var N=createTag("style");N.setAttribute("f-forigin",g[S].fOrigin),N.setAttribute("f-origin",g[S].origin),N.setAttribute("f-family",g[S].fFamily),N.type="text/css",N.innerText="@font-face {font-family: "+g[S].fFamily+"; font-style: normal; src: url('"+g[S].fPath+"');}",M.appendChild(N)}}else if(g[S].fOrigin==="g"||g[S].origin===1){for(G=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),z=0;z=55296&&g<=56319){var S=_.charCodeAt(1);S>=56320&&S<=57343&&(M=(g-55296)*1024+S-56320+65536)}return M}function T(_,M){var g=_.toString(16)+M.toString(16);return P.indexOf(g)!==-1}function A(_){return _===o}function x(_){return _===l}function k(_){var M=E(_);return M>=f&&M<=m}function R(_){return k(_.substr(0,2))&&k(_.substr(2,2))}function V(_){return r.indexOf(_)!==-1}function I(_,M){var g=E(_.substr(M,2));if(g!==i)return!1;var S=0;for(M+=2;S<5;){if(g=E(_.substr(M,2)),gn)return!1;S+=1,M+=2}return E(_.substr(M,2))===s}function D(){this.isLoaded=!0}var O=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};O.isModifier=T,O.isZeroWidthJoiner=A,O.isFlagEmoji=R,O.isRegionalCode=k,O.isCombinedCharacter=V,O.isRegionalFlag=I,O.isVariationSelector=x,O.BLACK_FLAG_CODE_POINT=i;var L={addChars:c,addFonts:C,getCharData:d,getFontByName:v,measureText:p,checkLoadedFonts:y,setIsLoaded:D};return O.prototype=L,O}();function SlotManager(t){this.animationData=t}SlotManager.prototype.getProp=function(t){return this.animationData.slots&&this.animationData.slots[t.sid]?Object.assign(t,this.animationData.slots[t.sid].p):t};function slotFactory(t){return new SlotManager(t)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},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(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,r=this.renderableComponents.length;for(e=0;e.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(t){var e,r=this.layers.length,i;for(this.completeLayers=!0,e=r-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e],i.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:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t0&&(this.maskElement.setAttribute("id",h),this.element.maskedElement.setAttribute(d,"url("+getLocationHref()+"#"+h+")"),i.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e=this.element.finalTransform.mat,r,i=this.masksProperties.length;for(r=0;r1&&(i+=" 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]),r.lastPath!==i){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+i:i),r.elem.setAttribute("d",n)),r.lastPath=i}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};t.createFilter=e,t.createAlphaToLuminanceFilter=r;function e(i,s){var a=createNS("filter");return a.setAttribute("id",i),s!==!0&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a}function r(){var i=createNS("feColorMatrix");return i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),i}return t}(),featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};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),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,r="SourceGraphic",i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;this.filters=[];var l;for(e=0;e=0&&(i=this.shapeModifiers[e].processShapes(this._isFirstFrame),!i);e-=1);}},searchProcessedElement:function(e){for(var r=this.processedElements,i=0,s=r.length;i.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0;)c=h.transformers[k].mProps._mdf||c,x-=1,k-=1;if(c)for(x=E-h.styles[p].lvl,k=h.transformers.length-1;x>0;)A.multiply(h.transformers[k].mProps.v),x-=1,k-=1}else A=t;if(T=h.sh.paths,u=T._length,c){for(C="",y=0;y=1?D=.99:D<=-1&&(D=-.99);var O=V*D,L=Math.cos(I+h.a.v)*O+C[0],_=Math.sin(I+h.a.v)*O+C[1];y.setAttribute("fx",L),y.setAttribute("fy",_),u&&!h.g._collapsable&&(h.of.setAttribute("fx",L),h.of.setAttribute("fy",_))}}}function m(P,h,b){var y=h.style,u=h.d;u&&(u._mdf||b)&&u.dashStr&&(y.pElem.setAttribute("stroke-dasharray",u.dashStr),y.pElem.setAttribute("stroke-dashoffset",u.dashoffset[0])),h.c&&(h.c._mdf||b)&&y.pElem.setAttribute("stroke","rgb("+bmFloor(h.c.v[0])+","+bmFloor(h.c.v[1])+","+bmFloor(h.c.v[2])+")"),(h.o._mdf||b)&&y.pElem.setAttribute("stroke-opacity",h.o.v),(h.w._mdf||b)&&(y.pElem.setAttribute("stroke-width",h.w.v),y.msElem&&y.msElem.setAttribute("stroke-width",h.w.v))}return r}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e=this.shapes.length,r,i,s=this.stylesList.length,a,n=[],l=!1;for(i=0;i1&&l&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e=0;o-=1){if(C=this.searchProcessedElement(t[o]),C?e[o]=r[C-1]:t[o]._render=n,t[o].ty==="fl"||t[o].ty==="st"||t[o].ty==="gf"||t[o].ty==="gs"||t[o].ty==="no")C?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),h.push(e[o].style);else if(t[o].ty==="gr"){if(!C)e[o]=this.createGroupElement(t[o]);else for(P=e[o].it.length,m=0;m1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!t)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var i,s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;ie);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e=[],r=0,i=t.length,s,a,n=!1,l=!1,o="";r=55296&&s<=56319?FontManager.isRegionalFlag(t,r)?o=t.substr(r,14):(a=t.charCodeAt(r+1),a>=56320&&a<=57343&&(FontManager.isModifier(s,a)?(o=t.substr(r,2),n=!0):FontManager.isFlagEmoji(t.substr(r,4))?o=t.substr(r,4):o=t.substr(r,2))):s>56319?(a=t.charCodeAt(r+1),FontManager.isVariationSelector(s)&&(n=!0)):FontManager.isZeroWidthJoiner(s)&&(n=!0,l=!0),n?(e[e.length-1]+=o,n=!1):e.push(o),r+=o.length;return e},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e=this.elem.globalData.fontManager,r=this.data,i=[],s,a,n,l=0,o,f=r.m.g,m=0,P=0,h=0,b=[],y=0,u=0,C,c,d=e.getFontByName(t.f),p,v=0,E=getFontProperties(d);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),a=t.finalText.length,t.finalLineHeight=t.lh;var T=t.tr/1e3*t.finalSize,A;if(t.sz)for(var x=!0,k=t.sz[0],R=t.sz[1],V,I;x;){I=this.buildFinalText(t.t),V=0,y=0,a=I.length,T=t.tr/1e3*t.finalSize;var D=-1;for(s=0;sk&&I[s]!==" "?(D===-1?a+=1:s=D,V+=t.finalLineHeight||t.finalSize*1.2,I.splice(s,D===s?1:0,"\r"),D=-1,y=0):(y+=v,y+=T);V+=d.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Ru?y:u,y=-2*T,o="",n=!0,h+=1):o=L,e.chars?(p=e.getCharData(L,d.fStyle,e.getFontByName(t.f).fFamily),v=n?0:p.w*t.finalSize/100):v=e.measureText(o,t.f,t.finalSize),L===" "?O+=v+T:(y+=v+T+O,O=0),i.push({l:v,an:v,add:m,n,anIndexes:[],val:o,line:h,animatorJustifyOffset:0}),f==2){if(m+=v,o===""||o===" "||s===a-1){for((o===""||o===" ")&&(m-=v);P<=s;)i[P].an=m,i[P].ind=l,i[P].extra=v,P+=1;l+=1,m=0}}else if(f==3){if(m+=v,o===""||s===a-1){for(o===""&&(m-=v);P<=s;)i[P].an=m,i[P].ind=l,i[P].extra=v,P+=1;m=0,l+=1}}else i[l].ind=l,i[l].extra=0,l+=1;if(t.l=i,u=y>u?y:u,b.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=u,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=b;var _=r.a,M,g;c=_.length;var S,w,F=[];for(C=0;C0?l=this.ne.v/100:o=-this.ne.v/100,this.xe.v>0?f=1-this.xe.v/100:m=1+this.xe.v/100;var P=BezierFactory.getBezierEasing(l,o,f,m).get,h=0,b=this.finalS,y=this.finalE,u=this.data.sh;if(u===2)y===b?h=n>=y?1:0:h=t(0,e(.5/(y-b)+(n-b)/(y-b),1)),h=P(h);else if(u===3)y===b?h=n>=y?0:1:h=1-t(0,e(.5/(y-b)+(n-b)/(y-b),1)),h=P(h);else if(u===4)y===b?h=0:(h=t(0,e(.5/(y-b)+(n-b)/(y-b),1)),h<.5?h*=2:h=1-2*(h-.5)),h=P(h);else if(u===5){if(y===b)h=0;else{var C=y-b;n=e(t(0,n+.5-b),y-b);var c=-C/2+n,d=C/2;h=Math.sqrt(1-c*c/(d*d))}h=P(h)}else u===6?(y===b?h=0:(n=e(t(0,n+.5-b),y-b),h=(1+Math.cos(Math.PI+Math.PI*2*n/(y-b)))/2),h=P(h)):(n>=r(b)&&(n-b<0?h=t(0,e(e(y,1)-(b-n),1)):h=t(0,e(y-n,1))),h=P(h));if(this.sm.v!==100){var p=this.sm.v*.01;p===0&&(p=1e-8);var v=.5-p*.5;h1&&(h=1))}return h*this.a.v},getValue:function(n){this.iterateDynamicProperties(),this._mdf=n||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,n&&this.data.r===2&&(this.e.v=this._currentTextLength);var l=this.data.r===2?1:100/this.data.totalChars,o=this.o.v/l,f=this.s.v/l+o,m=this.e.v/l+o;if(f>m){var P=f;f=m,m=P}this.finalS=f,this.finalE=m}},extendPrototype([DynamicPropertyContainer],i);function s(a,n,l){return new i(a,n)}return{getTextSelectorProp:s}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e=this._textData.a.length,r,i=PropertyFactory.getProp;for(t=0;t=y+J||!E?(k=(y+J-C)/u.partialLength,z=v.point[0]+(u.point[0]-v.point[0])*k,N=v.point[1]+(u.point[1]-v.point[1])*k,a.translate(-r[0]*h[m].an*.005,-(r[1]*O)*.01),c=!1):E&&(C+=u.partialLength,d+=1,d>=E.length&&(d=0,p+=1,T[p]?E=T[p].points:V.v.c?(d=0,p=0,E=T[p].points):(C-=u.partialLength,E=null)),E&&(v=u,u=E[d],A=u.partialLength));G=h[m].an/2-h[m].add,a.translate(-G,0,0)}else G=h[m].an/2-h[m].add,a.translate(-G,0,0),a.translate(-r[0]*h[m].an*.005,-r[1]*O*.01,0);for(g=0;gt?this.textSpans[t].span:createNS(l?"g":"text"),p<=t){if(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=o,l){var E=createNS("g");o.appendChild(E),this.textSpans[t].childSpan=E}this.textSpans[t].span=o,this.layerElement.appendChild(o)}o.style.display="inherit"}if(f.reset(),P&&(n[t].n&&(h=-u,b+=r.yOffset,b+=y?1:0,y=!1),this.applyTextPropertiesToMatrix(r,f,n[t].line,h,b),h+=n[t].l||0,h+=u),l){v=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var T;if(v.t===1)T=new SVGCompElement(v.data,this.globalData,this);else{var A=emptyShapeData;v.data&&v.data.shapes&&(A=this.buildShapeData(v.data,r.finalSize)),T=new SVGShapeElement(A,this.globalData,this)}if(this.textSpans[t].glyph){var x=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(x.layerElement),x.destroy()}this.textSpans[t].glyph=T,T._debug=!0,T.prepareFrame(0),T.renderFrame(),this.textSpans[t].childSpan.appendChild(T.layerElement),v.t===1&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else P&&o.setAttribute("transform","translate("+f.props[12]+","+f.props[13]+")"),o.textContent=n[t].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}P&&o&&o.setAttribute("d",m)}for(;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;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;i-=1)e.finalTransform.multiply(e.transforms[i].transform.mProps.v);e._mdf=a},processSequences:function(e){var r,i=this.sequenceList.length;for(r=0;r=1){this.buffers=[];var e=this.globalData.canvasContext,r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r);var i=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(i),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var r=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=r}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},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)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var i=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(i.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var s=assetLoader.getLumaCanvas(this.canvasContext.canvas),a=s.getContext("2d");a.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(s,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var r=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(r),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(r),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s=4;e.ty==="rc"?s=5:e.ty==="el"?s=6:e.ty==="sr"&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var a,n=r.length,l;for(a=0;a=0;a-=1){if(P=this.searchProcessedElement(t[a]),P?e[a]=r[P-1]:t[a]._shouldRender=i,t[a].ty==="fl"||t[a].ty==="st"||t[a].ty==="gf"||t[a].ty==="gs")P?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],y),f.push(e[a].style);else if(t[a].ty==="gr"){if(!P)e[a]=this.createGroupElement(t[a]);else for(o=e[a].it.length,l=0;l=0;s-=1)e[s].ty==="tr"?(n=r[s].transform,this.renderShapeTransform(t,n)):e[s].ty==="sh"||e[s].ty==="el"||e[s].ty==="rc"||e[s].ty==="sr"?this.renderPath(e[s],r[s]):e[s].ty==="fl"?this.renderFill(e[s],r[s],n):e[s].ty==="st"?this.renderStroke(e[s],r[s],n):e[s].ty==="gf"||e[s].ty==="gs"?this.renderGradientFill(e[s],r[s],n):e[s].ty==="gr"?this.renderShape(n,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r=t.trNodes,i=e.paths,s,a,n,l=i._length;r.length=0;var o=t.transforms.finalTransform;for(n=0;n=1?m=.99:m<=-1&&(m=-.99);var P=o*m,h=Math.cos(f+e.a.v)*P+n[0],b=Math.sin(f+e.a.v)*P+n[1];s=a.createRadialGradient(h,b,0,n[0],n[1],o)}var y,u=t.g.p,C=e.g.c,c=1;for(y=0;ya&&o==="xMidYMid slice"||ss&&l==="meet"||as&&l==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:f==="xMax"&&(as&&l==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,m==="YMid"&&(a>s&&l==="meet"||as&&l==="meet"||a=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if(!(this.renderedFrame===t&&this.renderConfig.clearCanvas===!0&&!e||this.destroyed||t===-1)){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 r,i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!(e[t]||this.layers[t].ty===99)){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var t,e=15;for(t=0;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:e&&e.clearCanvas!==void 0?e.clearCanvas:!0,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var r=this.finalTransform.mat.toCSS();e.transform=r,e.webkitTransform=r}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(t,e,r){this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?(t=createNS("rect"),t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(t=createTag("div"),t.style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)};function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r0&&o<1&&s[h].push(this.calculateF(o,t,e,r,i,h))):(f=n*n-4*l*a,f>=0&&(m=(-n+bmSqrt(f))/(2*a),m>0&&m<1&&s[h].push(this.calculateF(m,t,e,r,i,h)),P=(-n-bmSqrt(f))/(2*a),P>0&&P<1&&s[h].push(this.calculateF(P,t,e,r,i,h)))));this.shapeBoundingBox.left=bmMin.apply(null,s[0]),this.shapeBoundingBox.top=bmMin.apply(null,s[1]),this.shapeBoundingBox.right=bmMax.apply(null,s[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,s[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;rr&&(r=s)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax=0;e-=1){var i=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;this.p?s=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:s=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],l=Math.sqrt(n[2]*n[2]+n[0]*n[0]),o=Math.atan2(n[1],l),f=Math.atan2(n[0],-n[2]);this.mat.rotateY(f).rotateX(-o)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var m=!this._prevMat.equals(this.mat);if((m||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var P,h,b;for(e=0;e=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r=createTag("div"),i,s;styleDiv(r);var a=createTag("div");if(styleDiv(a),e==="3d"){i=r.style,i.width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var n="50% 50%";i.webkitTransformOrigin=n,i.mozTransformOrigin=n,i.transformOrigin=n,s=a.style;var l="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.transform=l,s.webkitTransform=l}r.appendChild(a);var o={container:a,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(o),o},HybridRendererBase.prototype.build3dContainers=function(){var t,e=this.layers.length,r,i="";for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;rr?(s=t/this.globalData.compSize.w,a=t/this.globalData.compSize.w,n=0,l=(e-this.globalData.compSize.h*(t/this.globalData.compSize.w))/2):(s=e/this.globalData.compSize.h,a=e/this.globalData.compSize.h,n=(t-this.globalData.compSize.w*(e/this.globalData.compSize.h))/2,l=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+s+",0,0,0,0,"+a+",0,0,0,0,1,0,"+n+","+l+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t=this.globalData.compSize.w,e=this.globalData.compSize.h,r,i=this.threeDElements.length;for(r=0;r=f;)V/=2,I/=2,D>>>=1;return(V+D)/I};return k.int32=function(){return x.g(4)|0},k.quick=function(){return x.g(4)/4294967296},k.double=k,C(d(x.S),t),(v.pass||E||function(R,V,I,D){return D&&(D.S&&y(D,x),R.state=function(){return y(x,{})}),I?(e[n]=R,V):R})(k,A,"global"in v?v.global:this==e,v.state)}e["seed"+n]=h;function b(p){var v,E=p.length,T=this,A=0,x=T.i=T.j=0,k=T.S=[];for(E||(p=[E++]);Ar){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if(typeof t=="number"||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var r,i=Math.min(t.length,e.length),s=0;for(r=0;r.5?f/(2-s-a):f/(s+a),s){case e:n=(r-i)/f+(r1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e=t[0],r=t[1],i=t[2],s,a,n;if(r===0)s=i,n=i,a=i;else{var l=i<.5?i*(1+r):i+r-i*r,o=2*i-l;s=hue2rgb(o,l,e+1/3),a=hue2rgb(o,l,e),n=hue2rgb(o,l,e-1/3)}return[s,a,n,t[3]]}function linear(t,e,r,i,s){if((i===void 0||s===void 0)&&(i=e,s=r,e=0,r=1),r=r)return s;var n=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*n;var l,o=i.length,f=createTypedArray("float32",o);for(l=0;l1){for(s=0;s1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var l,o=s.length,f=createTypedArray("float32",o);for(l=0;ldata.k[e].t&&tdata.k[e+1].t-t?(i=e+2,s=data.k[e+1].t):(i=e+1,s=data.k[e].t);break}i===-1&&(i=e+1,s=data.k[e].t)}var a={};return a.index=i,a.time=s/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;rC.length-1)&&(b=C.length-1),p=C[C.length-1-b].t,d=c-p);var v,E,T;if(h==="pingpong"){var A=Math.floor((u-p)/d);if(A%2!==0)return this.getValueAtTime((d-(u-p)%d+p)/this.comp.globalData.frameRate,0)}else if(h==="offset"){var x=this.getValueAtTime(p/this.comp.globalData.frameRate,0),k=this.getValueAtTime(c/this.comp.globalData.frameRate,0),R=this.getValueAtTime(((u-p)%d+p)/this.comp.globalData.frameRate,0),V=Math.floor((u-p)/d);if(this.pv.length){for(T=new Array(x.length),E=T.length,v=0;v=c)return this.pv;var d,p;y?(b?d=Math.abs(this.elem.comp.globalData.frameRate*b):d=Math.max(0,this.elem.data.op-c),p=c+d):((!b||b>C.length-1)&&(b=C.length-1),p=C[b].t,d=p-c);var v,E,T;if(h==="pingpong"){var A=Math.floor((c-u)/d);if(A%2===0)return this.getValueAtTime(((c-u)%d+c)/this.comp.globalData.frameRate,0)}else if(h==="offset"){var x=this.getValueAtTime(c/this.comp.globalData.frameRate,0),k=this.getValueAtTime(p/this.comp.globalData.frameRate,0),R=this.getValueAtTime((d-(c-u)%d+c)/this.comp.globalData.frameRate,0),V=Math.floor((c-u)/d)+1;if(this.pv.length){for(T=new Array(x.length),E=T.length,v=0;v1?(C-u)/(b-1):1,d=0,p=0,v;this.pv.length?v=createTypedArray("float32",this.pv.length):v=0;for(var E;dd){var A=p,x=u.c&&p===v-1?0:p+1,k=(d-E)/c[p].addedLength;T=bez.getPointInSegment(u.v[A],u.v[x],u.o[A],u.i[x],k,c[p]);break}else E+=c[p].addedLength;p+=1}return T||(T=u.c?[u.v[0][0],u.v[0][1]]:[u.v[u._length-1][0],u.v[u._length-1][1]]),T},vectorOnPath:function(b,y,u){b==1?b=this.v.c:b==0&&(b=.999);var C=this.pointOnPath(b,y),c=this.pointOnPath(b+.001,y),d=c[0]-C[0],p=c[1]-C[1],v=Math.sqrt(Math.pow(d,2)+Math.pow(p,2));if(v===0)return[0,0];var E=u==="tangent"?[d/v,p/v]:[-p/v,d/v];return E},tangentOnPath:function(b,y){return this.vectorOnPath(b,y,"tangent")},normalOnPath:function(b,y){return this.vectorOnPath(b,y,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([m],o),extendPrototype([m],f),f.prototype.getValueAtTime=l,f.prototype.initiateExpression=ExpressionManager.initiateExpression;var P=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(h,b,y,u,C){var c=P(h,b,y,u,C);return c.propertyIndex=b.ix,c.lock=!1,y===3?expressionHelpers.searchExpressions(h,b.pt,c):y===4&&expressionHelpers.searchExpressions(h,b.ks,c),c.k&&h.addDynamicProperty(c),c}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function t(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(e,r){var i=this.calculateExpression(r);if(e.t!==i){var s={};return this.copyData(s,e),s.t=i.toString(),s.__complete=!1,s}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),r=this.searchExpressions();return this.kf=e||r,this.kf},TextProperty.prototype.searchExpressions=t}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function t(e,r){var i=createNS("feMerge");i.setAttribute("result",e);var s,a;for(a=0;a=f?P=y<0?i:s:P=i+b*Math.pow((l-t)/y,1/r),m[h]=P,h+=1,a+=256/(n-1);return m.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}};function SVGDropShadowEffect(t,e,r,i,s){var a=e.container.globalData.renderConfig.filterSize,n=e.data.fs||a;t.setAttribute("x",n.x||a.x),t.setAttribute("y",n.y||a.y),t.setAttribute("width",n.width||a.width),t.setAttribute("height",n.height||a.height),this.filterManager=e;var l=createNS("feGaussianBlur");l.setAttribute("in","SourceAlpha"),l.setAttribute("result",i+"_drop_shadow_1"),l.setAttribute("stdDeviation","0"),this.feGaussianBlur=l,t.appendChild(l);var o=createNS("feOffset");o.setAttribute("dx","25"),o.setAttribute("dy","0"),o.setAttribute("in",i+"_drop_shadow_1"),o.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=o,t.appendChild(o);var f=createNS("feFlood");f.setAttribute("flood-color","#00ff00"),f.setAttribute("flood-opacity","1"),f.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=f,t.appendChild(f);var m=createNS("feComposite");m.setAttribute("in",i+"_drop_shadow_3"),m.setAttribute("in2",i+"_drop_shadow_2"),m.setAttribute("operator","in"),m.setAttribute("result",i+"_drop_shadow_4"),t.appendChild(m);var P=this.createMergeNode(i,[i+"_drop_shadow_4",s]);t.appendChild(P)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(e[0]*255),Math.round(e[1]*255),Math.round(e[2]*255)))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e-1&&t%1==0&&t-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}var objectProto$a=Object.prototype;function isPrototype(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||objectProto$a;return t===r}function baseTimes(t,e){for(var r=-1,i=Array(t);++r-1}function listCacheSet(t,e){var r=this.__data__,i=assocIndexOf(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function ListCache(t){var e=-1,r=t==null?0:t.length;for(this.clear();++el))return!1;var f=a.get(t),m=a.get(e);if(f&&m)return f==e&&m==t;var P=-1,h=!0,b=r&COMPARE_UNORDERED_FLAG$1?new SetCache:void 0;for(a.set(t,e),a.set(e,t);++P{const r=t.__vccOpts||t;for(const[i,s]of e)r[i]=s;return r};const _sfc_main=defineComponent({props:{animationData:{type:Object,default:()=>({})},animationLink:{type:String,default:""},loop:{type:[Boolean,Number],default:!0},autoPlay:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},speed:{type:Number,default:1},delay:{type:Number,default:0},direction:{type:String,default:"forward"},pauseOnHover:{type:Boolean,default:!1},playOnHover:{type:Boolean,default:!1},backgroundColor:{type:String,default:"transparent"},pauseAnimation:{type:Boolean,default:!1},renderer:{type:String,default:"svg"},rendererSettings:{type:Object,default:()=>({})},assetsPath:{type:String,default:""}},emits:{onComplete:null,onLoopComplete:null,onEnterFrame:null,onSegmentStart:null,onAnimationLoaded:null},setup(t,{emit:e}){let r=ref(null);const i=ref("");let s=1;const a=x=>document.querySelector('[data-id="'.concat(x,'"]'))!==null,n=async x=>{let k=t.autoPlay;t.playOnHover&&(k=!1);let R={};if(isEqual(t.animationData,{})===!1&&(R=cloneDeep(t.animationData)),t.animationLink!="")try{R=await(await fetch(t.animationLink)).json()}catch(D){console.error(D);return}let V=t.loop;typeof V=="number"&&V>0&&(V=V-1),t.delay>0&&(k=!1);const I={container:x,renderer:t.renderer,loop:V,autoplay:k,animationData:R,assetsPath:t.assetsPath};isEqual(t.rendererSettings,{})===!1&&(I.rendererSettings=t.rendererSettings),r=Lottie.loadAnimation(I),setTimeout(()=>{k=t.autoPlay,t.playOnHover?r.pause():k?r.play():r.pause(),e("onAnimationLoaded")},t.delay),r.setSpeed(t.speed),t.direction==="reverse"&&r.setDirection(-1),t.direction==="normal"&&r.setDirection(1),(t.pauseAnimation||t.playOnHover)&&r.pause(),r.addEventListener("loopComplete",()=>{t.direction==="alternate"&&(r.stop(),s=s*-1,r.setDirection(s),r.play()),e("onLoopComplete")}),r.addEventListener("complete",()=>{e("onComplete")}),r.addEventListener("enterFrame",()=>{e("onEnterFrame")}),r.addEventListener("segmentStart",()=>{e("onSegmentStart")})},l=computed(()=>{let x=t.width,k=t.height;return typeof t.width=="number"&&(x="".concat(t.width,"px")),typeof t.height=="number"&&(k="".concat(t.height,"px")),{"--lottie-animation-container-width":x,"--lottie-animation-container-height":k,"--lottie-animation-container-background-color":t.backgroundColor}}),o=()=>{r&&t.pauseOnHover&&r.pause(),r&&t.playOnHover&&r.play()},f=()=>{r&&t.pauseOnHover&&r.play(),r&&t.playOnHover&&r.pause()};watch(()=>t.pauseAnimation,()=>{if((t.pauseOnHover||t.playOnHover)&&t.pauseAnimation){console.error("If you are using pauseAnimation prop for Vue3-Lottie, please remove the props pauseOnHover and playOnHover");return}r&&(t.pauseAnimation?r.pause():r.play())});const m=()=>{r&&r.play()},P=()=>{r&&r.pause()},h=()=>{r&&r.stop()},b=()=>{r&&r.destroy()},y=(x=1)=>{if(x<=0)throw new Error("Speed must be greater than 0");r&&r.setSpeed(x)},u=x=>{r&&(x==="forward"?r.setDirection(1):x==="reverse"&&r.setDirection(-1))},C=(x,k=!0)=>{r&&r.goToAndStop(x,k)},c=(x,k=!0)=>{r&&r.goToAndPlay(x,k)},d=(x,k=!1)=>{r&&r.playSegments(x,k)},p=(x=!0)=>{r&&r.setSubframe(x)},v=(x=!0)=>{if(r)return r.getDuration(x)},E=(x,k=0)=>{r&&r.renderer.elements[k].updateDocumentData(x)},T=x=>{for(var k="",R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",V=R.length,I=0;I{if(t.pauseOnHover&&t.playOnHover)throw new Error("You cannot set pauseOnHover and playOnHover for Vue3-Lottie at the same time.");if(t.animationLink===""&&isEqual(t.animationData,{}))throw new Error("You must provide either animationLink or animationData");const k=setInterval(()=>{if(a(x)){clearInterval(k);const R=document.querySelector('[data-id="'.concat(x,'" ]'));R&&n(R)}},0)};return onMounted(async()=>{i.value=T(20),A(i.value)}),{elementid:i,hoverEnded:f,hoverStarted:o,getCurrentStyle:l,play:m,pause:P,stop:h,destroy:b,setSpeed:y,setDirection:u,goToAndStop:C,goToAndPlay:c,playSegments:d,setSubFrame:p,getDuration:v,updateDocumentData:E}}}),_hoisted_1=["data-id"];function _sfc_render(t,e,r,i,s,a){return openBlock(),createElementBlock("div",{"data-id":t.elementid,class:"lottie-animation-container",style:normalizeStyle(t.getCurrentStyle),onMouseenter:e[0]||(e[0]=(...n)=>t.hoverStarted&&t.hoverStarted(...n)),onMouseleave:e[1]||(e[1]=(...n)=>t.hoverEnded&&t.hoverEnded(...n))},null,44,_hoisted_1)}var Vue3Lottie=_export_sfc(_sfc_main,[["render",_sfc_render]]);export{RadioGroup as R,Vue3Lottie as V,Radio as a};