@aarsteinmedia/dotlottie-player 5.1.13 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/unpkg.js CHANGED
@@ -1,8 +1,8 @@
1
- !function(t){"use strict";let e,s,i,r=()=>"",a=()=>!("undefined"!=typeof window&&document),n=(s=0,()=>(s++,`${r()}__lottie_element_${s}`));var o,h,l,p,m,c,d,u,f,g,y,b,v,x,w,_=((o={}).Contain="xMidYMid meet",o.Cover="xMidYMid slice",o.Initial="none",o.None="xMinYMin slice",o);class E{constructor(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1}}class C{constructor(t,e){this.type=t,this.direction=e<0?-1:1}}class S{constructor(t,e,s,i){this.type=t,this.direction=s,this.currentTime=e,this.totalTime=i}}class M{constructor(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1}}class k{constructor(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}}class P{constructor(t,e){this.type=t,this.target=e}}class A{constructor(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}}class D{constructor(t,e){this.type="configError",this.nativeError=t}}class T{addEventListener(t,e){return this._cbs[t]=this._cbs[t]??[],this._cbs[t].push(e),()=>{this.removeEventListener(t,e)}}removeEventListener(t,e){if(!e){this._cbs[t]=null;return}if(this._cbs[t]){let s=0,{length:i}=this._cbs[t];for(;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s--,i--),s++;0===this._cbs[t].length&&(this._cbs[t]=null)}}triggerEvent(t,e){if(!this._cbs[t])return;let{length:s}=this._cbs[t];for(let i=0;i<s;i++)this._cbs[t][i](e)}constructor(){this._cbs={}}}var F=((h={}).Float32="float32",h.Int16="int16",h.Int32="int32",h.Uint8="uint8",h.Uint8c="uint8c",h),I=((l={}).MouseModifier="ms",l.OffsetPathModifier="op",l.PuckerAndBloatModifier="pb",l.RepeaterModifier="rp",l.RoundCornersModifier="rd",l.TrimModifier="tm",l.ZigZagModifier="zz",l),$=((p={}).Contain="xMidYMid meet",p.Cover="xMidYMid slice",p.Initial="none",p.None="xMinYMin slice",p),L=((m={}).Canvas="canvas",m.HTML="html",m.SVG="svg",m),N=((c={}).Ellipse="el",c.Fill="fl",c.GradientFill="gf",c.GradientStroke="gs",c.Group="gr",c.Merge="mm",c.NoStyle="no",c.OffsetPath="op",c.Path="sh",c.PolygonStar="sr",c.PuckerBloat="pb",c.Rectangle="rc",c.Repeater="rp",c.RoundedCorners="rd",c.Stroke="st",c.Transform="tr",c.Trim="tm",c.Twist="tw",c.Unknown="ms",c.ZigZag="zz",c),B=((d={}).TransformEffect="transformEffect",d),R=((u={}).MultiDimensional="multidimensiional",u.Shape="shape",u.TextSelector="textSelector",u.Transform="transform",u.UniDimensional="unidimensional",u);let V={1:"butt",2:"round",3:"square"},z={1:"miter",2:"round",3:"bevel"},O={},G=(t,e)=>{O[t]=e},q=t=>{if(!O[t])throw Error("Could not get renderer");return O[t]},j=()=>{if(O.canvas)return L.Canvas;let t=Object.keys(O),{length:e}=t;for(let s=0;s<e;s++)if(O[t[s]])return t[s];return L.SVG},W="",H=()=>W,Y=(t,e)=>1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e)),U=t=>1e-5>=Math.abs(t),J=()=>!("undefined"!=typeof window&&document),X=(t,e)=>Y(t[0],e[0])&&Y(t[1],e[1]),Z=(i=0,()=>(i++,`${H()}__lottie_element_${i}`)),K=(t,e=0,s=100)=>{let i=e,r=s;if(i>r){let t=r;r=i,i=t}return Math.min(Math.max(t,i),r)},Q=()=>"undefined"!=typeof navigator,tt=t=>Symbol.iterator in Object(t)&&t.length>0,te=t=>tt(t)&&"number"==typeof t[0],ts=t=>!(!t||tt(t))&&"ShapePath"===t.constructor.name,ti=()=>!!Q()&&/^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent),tr=(t,e,s)=>{let i,r=[];for(let t=0;t<256;t++)i=t.toString(16),r[t]=1===i.length?`0${i}`:i;let a=t,n=e,o=s;return t<0&&(a=0),e<0&&(n=0),s<0&&(o=0),`#${r[a]}${r[n]}${r[o]}`},ta=t=>{t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.display="block",t.style.transformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.transformStyle="preserve-3d"};class tn{constructor(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}addAudio(t){this.audios.push(t)}createAudio(t){return this.audioFactory?this.audioFactory(t):!J()&&"Howl"in window?new window.Howl({src:[t]}):{isPlaying:!1,play:()=>{this.isPlaying=!0},playing:()=>{throw Error(`${this.constructor.name}: Method playing is not implemented`)},rate:()=>{throw Error(`${this.constructor.name}: Method rate is not implemented`)},seek:()=>{this.isPlaying=!1},setVolume:()=>{throw Error(`${this.constructor.name}: Method setVolume is not implemented`)}}}getVolume(){return this._volume}mute(){this._isMuted=!0,this._updateVolume()}pause(){for(let t of this.audios)t.pause()}resume(){for(let t of this.audios)t.resume()}setAudioFactory(t){this.audioFactory=t}setRate(t){for(let e of this.audios)e.setRate(t)}setVolume(t){this._volume=t,this._updateVolume()}unmute(){this._isMuted=!1,this._updateVolume()}_updateVolume(){let{length:t}=this.audios;for(let e=0;e<t;e++)this.audios[e].volume(!this._isMuted*this._volume)}}function to(t,e,s,i){let r,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=()=>{if(4===a.readyState){if(200===a.status)return void s(r=th(a));try{r=th(a),s(r)}catch(t){i?.(t)}}};try{a.open("GET",t,!0)}catch(s){a.open("GET",`${e}/${t}`,!0)}a.send()}function th(t){let e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&e.includes("json")||t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}function tl(t,e){let s,{length:i}=t;for(let a=0;a<i;a++)if("ks"in(s=t[a])&&!s.completed){if(s.completed=!0,s.hasMask){let t=s.masksProperties,{length:e}=t??[];for(let s=0;s<e;s++){let e=t?.[s].pt?.k;if(!e)continue;if(!tt(e)){tc(e);continue}let{length:i}=e;for(let t=0;t<i;t++){let s=e[t].e,i=e[t].s;s&&tc(s[0]),i&&tc(i[0])}}}switch(s.ty){case 0:s.layers=tp(s.refId,e),tl(s.layers,e);break;case 4:tm(s.shapes);break;case 5:var r;r=s,r.t?.a?.length===0&&r.t.p}}}function tp(t,e){if(!t||!e)return;let s=function(t,e){let s=0,{length:i}=e;for(;s<i;){if(e[s].id===t)return e[s];s++}return null}(t,e);return s?.layers?s.layers.__used?JSON.parse(JSON.stringify(s.layers)):(s.layers.__used=!0,s.layers):null}function tm(t=[]){let{length:e}=t;for(let s=e-1;s>=0;s--){if(t[s].ty===N.Group){tm(t[s].it);continue}if(t[s].ty===N.Path){let e=t[s].ks?.k;if(!tt(e)){tc(e);continue}let{length:i}=e;for(let t=0;t<i;t++){let s=e[t].e,i=e[t].s;s&&tc(s[0]),i&&tc(i[0])}}}}function tc(t){if(!t)return;let{length:e}=t.i;for(let s=0;s<e;s++)t.i[s][0]+=t.v[s][0],t.i[s][1]+=t.v[s][1],t.o[s][0]+=t.v[s][0],t.o[s][1]+=t.v[s][1]}function td(t,e){let s=e?e.split(".").map(Number):[100,100,100];return t[0]>s[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&null))}let tu=(t,e,s)=>{let{length:i}=t;for(let r=0;r<i;r++)t[r].ty===s&&e(t[r])},tf=(()=>{let t=[4,4,14],e=t=>{let e=t.t?.d;t.t&&e&&(t.t.d={k:[{s:e,t:0}]})};return s=>{if(!td(t,s.v))return;tu(s.layers,e,5);let{length:i}=s.assets;for(let t=0;t<i;t++)s.assets[t].layers&&tu(s.assets[t].layers,e,5)}})(),tg=(()=>{let t=[4,7,99];return e=>{if(!e.chars||td(t,e.v))return;let{length:s}=e.chars;for(let t=0;t<s;t++){let s=e.chars[t];s.data?.shapes&&(tm(s.data.shapes),s.data.ip=0,s.data.op=99999,s.data.st=0,s.data.sr=1,s.data.ks={a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]}},e.chars[t].t||(s.data.shapes.push({ty:N.NoStyle}),s.data.shapes[0].it?.push({a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sa:{a:0,k:0},sk:{a:0,k:0},ty:N.Transform})))}}})(),ty=(()=>{let t=[5,7,15],e=t=>{let e=t.t?.p;e&&("number"==typeof e.a&&(e.a={a:0,k:e.a}),"number"==typeof e.p&&(e.p={a:0,k:e.p}),"number"==typeof e.r&&(e.r={a:0,k:e.r}))};return s=>{if(!td(t,s.v))return;tu(s.layers,e,5);let{length:i}=s.assets;for(let t=0;t<i;t++)s.assets[t].layers&&tu(s.assets[t].layers,e,5)}})(),tb=(()=>{let t=[4,1,9],e=t=>{let{length:s}=t;for(let i=0;i<s;i++){if(t[i].ty===N.Group){e(t[i].it??[]);continue}if(t[i].ty!==N.Fill&&t[i].ty!==N.Stroke)continue;let s=t[i].c?.k;if(!s||"number"==typeof s)continue;if(tt(s)&&te(s)){s[0]/=255,s[1]/=255,s[2]/=255,s[3]/=255;continue}let{length:r}=s;for(let t=0;t<r;t+=1)s[t].s[0]/=255,s[t].s[1]/=255,s[t].s[2]/=255,s[t].s[3]/=255,s[t].e[0]/=255,s[t].e[1]/=255,s[t].e[2]/=255,s[t].e[3]/=255}},s=t=>{let{length:s}=t;for(let i=0;i<s;i++)4===t[i].ty&&e(t[i].shapes)};return e=>{if(!td(t,e.v))return;s(e.layers);let{length:i}=e.assets;for(let t=0;t<i;t++)e.assets[t].layers&&s(e.assets[t].layers)}})(),tv=(()=>{let t=[4,4,18],e=t=>{let{length:s}=t;for(let i=s-1;i>=0;i--){if(t[i].ty===N.Group){e(t[i].it??[]);continue}if(t[i].ty!==N.Path)continue;let s=t[i].ks?.k;if(!s)continue;let r=!!t[i].closed;if(!tt(s)){s.c=r;continue}let{length:a}=s;for(let t=0;t<a;t+=1){let e=s[t].e,i=s[t].s;e&&(e[0].c=r),i&&(i[0].c=r)}}},s=t=>{let s,{length:i}=t;for(let r=0;r<i;r++){if((s=t[r]).hasMask){let t=s.masksProperties,{length:e}=t??[];for(let s=0;s<e;s++){let e=t?.[s].pt?.k;if(!e)continue;let i=!!t[s].cl;if(!tt(e)){e.c=i;continue}let{length:r}=e;for(let t=0;t<r;t++){let s=e[t].e,r=e[t].s;s&&(s[0].c=i),r&&(r[0].c=i)}}}4===s.ty&&e(s.shapes)}};return e=>{if(!td(t,e.v))return;s(e.layers);let{length:i}=e.assets;for(let t=0;t<i;t++)e.assets[t].layers&&s(e.assets[t].layers)}})(),tx={checkChars:tg,checkColors:tb,checkPathProperties:ty,checkShapes:tv,completeData:function(t){t.__complete||(tb(t),tf(t),tg(t),ty(t),tv(t),tl(t.layers,t.assets),function(t,e){if(!t)return;let{length:s}=t;for(let i=0;i<s;i++){if(1!==t[i].t)continue;let{data:s}=t[i];s&&(s.layers=tp(s.refId,e)),tl(t[i].data?.layers??[],e)}}(t.chars,t.assets),t.__complete=!0)},completeLayers:tl},tw=!1,t_=()=>tw,tE=1,tC,tS="Function not implemented.",tM={addEventListener:(t,e,s)=>{throw Error(tS)},dispatchEvent:t=>{throw Error(tS)},onerror:null,onmessage:t=>{throw Error("workerProxy: Method onmessage not implemented")},onmessageerror:null,postMessage:t=>{tC({data:t})},removeEventListener:(t,e,s)=>{throw Error(tS)},terminate:()=>{throw Error(tS)}},tk={postMessage:t=>{tM.onmessage&&tM.onmessage({AT_TARGET:2,bubbles:!1,BUBBLING_PHASE:3,cancelable:!1,cancelBubble:!1,CAPTURING_PHASE:1,composed:!1,composedPath:()=>{throw Error(tS)},currentTarget:null,data:t,defaultPrevented:!1,eventPhase:0,initEvent:(t,e,s)=>{throw Error(tS)},initMessageEvent:(t,e,s,i,r,a,n,o)=>{throw Error(tS)},isTrusted:!1,lastEventId:"",NONE:0,origin:"",ports:[],preventDefault:()=>{throw Error(tS)},returnValue:!1,source:null,srcElement:null,stopImmediatePropagation:()=>{throw Error(tS)},stopPropagation:()=>{throw Error(tS)},target:null,timeStamp:0,type:""})}},tP={};function tA(){e||((e=function(t){if(!J()&&t_()){let e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"});return new Worker(URL.createObjectURL(e))}return tC=t,tM}(t=>{if(tk.dataManager=tk.dataManager??tx,"loadAnimation"===t.data.type)return void to(t.data.path,t.data.fullPath,e=>{e&&tx.completeData(e),tk.postMessage({id:t.data.id,payload:e,status:"success"})},()=>{tk.postMessage({id:t.data.id,status:"error"})});if("complete"===t.data.type){let{animation:e,id:s}=t.data;tx.completeData(e),tk.postMessage({id:s,payload:e,status:"success"});return}"loadData"===t.data.type&&to(t.data.path,t.data.fullPath,e=>{tk.postMessage({id:t.data.id,payload:e,status:"success"})},()=>{tk.postMessage({id:t.data.id,status:"error"})})})).onmessage=({data:t})=>{let{id:e,payload:s,status:i}=t,r=tP[e];if(tP[e]=null,"success"===i)return void r.onComplete(s);r.onError&&r.onError()})}function tD(t,e){tE++;let s=`processId_${tE}`;try{return tP[s]={onComplete:t,onError:e},s}catch(t){throw console.error("DataManager}:\n",t),Error("Could not create animation proccess")}}function tT(t,s,i){tA();let r=tD(s,i);e?.postMessage({fullPath:J()?t:window.location.origin+window.location.pathname,id:r,path:t,type:"loadData"})}function tF(t,s,i){tA();let r=tD(s,i);e?.postMessage({animation:t,id:r,type:"complete"})}let tI={interface:null,plugin:null},t$=()=>tI.plugin,tL=()=>tI.interface;class tN{getComposition(t){let e=0,{length:s}=this.compositions;for(;e<s;){if(this.compositions[e].data&&this.compositions[e].data?.nm===t)return this.compositions[e].data?.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e++}return null}registerComposition(t){this.compositions.push(t)}constructor(){this.compositions=[],this.currentFrame=0}}let tB={current:!0},tR=()=>tB.current;function tV(t){return J()?null:document.createElement(t)}function tz(t){return J()?null:document.createElementNS("http://www.w3.org/2000/svg",t)}class tO{constructor(){this._imageLoaded=this.imageLoaded.bind(this),this._footageLoaded=this.footageLoaded.bind(this),this.testImageLoaded=this.testImageLoaded.bind(this),this.createFootageData=this.createFootageData.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[],this.proxyImage=this._createProxyImage()}createFootageData(t){let e={assetData:t,img:null};return tT(this.getAssetsPath(t,this.assetsPath,this.path),t=>{t&&(e.img=t),this._footageLoaded()},()=>{this._footageLoaded()}),e}createImageData(t){let e=this.getAssetsPath(t,this.assetsPath,this.path),s=tz("image"),i={assetData:t,img:s};return ti()?this.testImageLoaded(s):s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",()=>{this.proxyImage&&(i.img=this.proxyImage),this._imageLoaded()},!1),s.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper?.append?this._elementHelper.append(s):this._elementHelper?.appendChild(s),i}destroy(){this.imagesLoadedCb=null,this.images.length=0}footageLoaded(){this.loadedFootagesCount++,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}getAsset(t){let e=0,{length:s}=this.images;for(;e<s;){if(this.images[e].assetData===t)return this.images[e].img;e++}return null}imageLoaded(){this.loadedAssets++,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}loadAssets(t,e){this.imagesLoadedCb=e;let{length:s}=t;for(let e=0;e<s;e++)if(!t[e].layers){if((!t[e].t||"seq"===t[e].t)&&this._createImageData){this.totalImages++;let s=this._createImageData(t[e]);s&&this.images.push(s);continue}3===Number(t[e].t)&&(this.totalFootages++,this.images.push(this.createFootageData(t[e])))}}loadedFootages(){return this.totalFootages===this.loadedFootagesCount}loadedImages(){return this.totalImages===this.loadedAssets}setAssetsPath(t){this.assetsPath=t||""}setCacheType(t,e){t===L.SVG?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}setPath(t){this.path=t||""}_createProxyImage(){if(J())return null;let t=tV(L.Canvas);t.width=1,t.height=1;let e=t.getContext("2d");return e&&(e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1)),t}createImgData(t){let e=this.getAssetsPath(t,this.assetsPath,this.path),s=tV("img"),i={assetData:t,img:s};return s.crossOrigin="anonymous",s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",()=>{this.proxyImage&&(i.img=this.proxyImage),this._imageLoaded()},!1),s.src=e,i}getAssetsPath(t,e,s){if(t.e)return t.p||"";if(e){let s=t.p;return s?.indexOf("images/")!==-1&&(s=s?.split("/")[1]),`${e}${s||""}`}let i=s;return i+=t.u??"",i+=t.p??""}testImageLoaded(t){if(J())return;let e=0,s=setInterval(()=>{(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(s)),e++},50)}}let tG=t=>{let e=t.split("\r\n"),s={},{length:i}=e,r=0;for(let t=0;t<i;t++){let i=e[t].split(":");2===i.length&&(s[i[0]]=i[1].trim(),r++)}if(0===r)throw Error("Could not parse markers");return s};class tq extends T{constructor(){super(),this.wrapper=null,this.autoloadSegments=!1,this.onComplete=null,this.onDestroy=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onSegmentStart=null,this._cbs={},this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=60,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.frameModifier=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=Z(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=tR(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=new tN,this.imagePreloader=new tO,this.audioController=new tn(void 0),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new E("drawnFrame",0,0,0),this.expressionsPlugin=t$()}adjustSegment(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")}advanceTime(t){if(this.isPaused||!this.isLoaded)return;let e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount++,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&!0!==this.loop)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(s=!0,e=0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}checkLoaded(){if(this.isLoaded||!this.renderer.globalData?.fontManager?.isLoaded||!this.imagePreloader?.loadedImages()&&this.renderer.rendererType===L.Canvas||!this.imagePreloader?.loadedFootages())return;this.isLoaded=!0;let t=t$();t?.initExpressions(this),this.renderer.initItems(),setTimeout(()=>{this.trigger("DOMLoaded")},0),this.gotoFrame(),this.autoplay&&this.play()}checkSegments(t){return this.segments.length>0&&(this.adjustSegment(this.segments.shift()??[0,0],t),!0)}configAnimation(t){try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor((this.animationData.op||1)-(this.animationData.ip||0)),this.firstFrame=Math.round(this.animationData.ip||0)),this.renderer.configAnimation(t),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,void 0!==this.animationData.fr&&(this.frameMult=this.animationData.fr/1e3),this.renderer.searchExtraCompositions(t.assets),this.markers=function(t){let e=[],{length:s}=t;for(let i=0;i<s;i++){if("duration"in t[i]){e.push(t[i]);continue}let s={duration:t[i].dr,time:t[i].tm};try{s.payload=JSON.parse(t[i].cm)}catch(e){try{s.payload=tG(t[i].cm)}catch(e){s.payload={name:t[i].cm}}}e.push(s)}return e}(t.markers??[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}}destroy(t){t&&this.name!==t||(this.renderer.destroy(),this.imagePreloader?.destroy(),this.trigger("destroy"),this._cbs={},this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)}getAssetData(t){let e=0,{length:s}=this.assets;for(;e<s;){if(t===this.assets[e].id)return this.assets[e];e++}return null}getAssetsPath(t){let e;if(!t)return"";if(t.e)e=t.p||"";else if(this.assetsPath){let s=t.p;s?.indexOf("images/")!==-1&&(s=s?.split("/")[1]),e=this.assetsPath+(s||"")}else e=this.path+(t.u??"")+(t.p??"");return e}getDuration(t){return t?this.totalFrames:this.totalFrames/this.frameRate}getMarkerData(t){for(let e=0;e<this.markers.length;e++)if(this.markers[e].payload?.name===t)return this.markers[e];return null}getPath(){return this.path}getVolume(){return this.audioController.getVolume()}goToAndPlay(t,e,s){if(s&&this.name!==s)return;let i=Number(t);if(isNaN(i)){let e=this.getMarkerData(t);e&&(e.duration?this.playSegments([e.time,e.time+e.duration],!0):this.goToAndStop(e.time,!0))}else this.goToAndStop(i,e,s);this.play()}goToAndStop(t,e,s){if(!s||this.name===s){if(isNaN(Number(t))){let e=this.getMarkerData(t);e&&this.goToAndStop(e.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}}gotoFrame(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")}hide(){this.renderer.hide()}imagesLoaded(){this.trigger("loaded_images"),this.checkLoaded()}includeLayers(t){this.animationData.op&&t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-(this.animationData.ip||0)));let{assets:e,layers:s}=this.animationData,i,{length:r}=s,a=t.layers,{length:n}=a;for(let t=0;t<n;t++)for(i=0;i<r;){if(s[i].id===a[t].id){s[i]=a[t];break}i++}for((t.chars||t.fonts)&&(this.renderer.globalData?.fontManager?.addChars(t.chars),this.renderer.globalData?.fontManager?.addFonts(t.fonts,this.renderer.globalData.defs)),r=t.assets.length,i=0;i<r;i++)e.push(t.assets[i]);this.animationData.__complete=!1,tF(this.animationData,this.onSegmentComplete)}loadNextSegment(){let{segments:t}=this.animationData;if(!t||0===t.length||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}let e=t.shift();this.timeCompleted=Number(e?.time)*this.frameRate;let s=`${this.path+(this.fileName||"")}_${this.segmentPos}.json`;this.segmentPos++,tT(s,this.includeLayers.bind(this),()=>{this.trigger("data_failed")})}loadSegments(){let{segments:t}=this.animationData;t||(this.timeCompleted=this.totalFrames),this.loadNextSegment()}mute(t){t&&this.name!==t||this.audioController.mute()}onSegmentComplete(t){this.animationData=t;let e=t$();e?.initExpressions(this),this.loadNextSegment()}onSetupError(){this.trigger("data_failed")}pause(t){(!t||this.name===t)&&(this.isPaused||(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause()))}play(t){(!t||this.name===t)&&this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))}playSegments(t,e){if(e&&(this.segments.length=0),Array.isArray(t[0])){let{length:e}=t;for(let s=0;s<e;s++)this.segments.push(t[s])}else this.segments.push(t);this.segments.length>0&&e&&this.adjustSegment(this.segments.shift()??[0,0],0),this.isPaused&&this.play()}preloadImages(){this.imagePreloader&&(this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this)))}renderFrame(t){if(this.isLoaded)try{this.expressionsPlugin?.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}}resetSegments(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)}resize(t,e){this.renderer.updateContainerSize("number"==typeof t?t:void 0,"number"==typeof e?e:void 0)}setCurrentRawFrameValue(t){this.currentRawFrame=t,this.gotoFrame()}setData(t,e){try{let s=e;s&&"object"!=typeof s&&(s=JSON.parse(s));let i={animationData:s,wrapper:t},r=t.attributes;i.path=r.getNamedItem("data-animation-path")?.value??r.getNamedItem("data-bm-path")?.value??r.getNamedItem("bm-path")?.value??"";let a=r.getNamedItem("data-anim-type")?.value??r.getNamedItem("data-bm-type")?.value??r.getNamedItem("bm-type")?.value??r.getNamedItem("data-bm-renderer")?.value??r.getNamedItem("bm-renderer")?.value??j();Object.values(L).includes(a)?i.animType=a:i.animType=L.Canvas;let n=r.getNamedItem("data-anim-loop")?.value??r.getNamedItem("data-bm-loop")?.value??r.getNamedItem("bm-loop")?.value??"";"false"===n?i.loop=!1:"true"===n?i.loop=!0:""!==n&&(i.loop=parseInt(n,10));let o=r.getNamedItem("data-anim-autoplay")?.value??r.getNamedItem("data-bm-autoplay")?.value??r.getNamedItem("bm-autoplay")?.value??!0;i.autoplay="false"!==o,i.name=r.getNamedItem("data-name")?.value??r.getNamedItem("data-bm-name")?.value??r.getNamedItem("bm-name")?.value??"";let h=r.getNamedItem("data-anim-prerender")?.value??r.getNamedItem("data-bm-prerender")?.value??r.getNamedItem("bm-prerender")?.value??"";"false"===h&&(i.prerender=!1),i.path?this.setParams(i):this.trigger("destroy")}catch(t){throw console.error(`${this.constructor.name}:
2
- `,t),Error(`${this.constructor.name}: Could not set data`)}}setDirection(t,e){e&&this.name!==e||(this.playDirection=t<0?-1:1,this.updaFrameModifier())}setLoop(t){this.loop=t}setParams(t){try{(t.wrapper||t.container)&&(this.wrapper=t.wrapper??t.container??null);let s=L.SVG;t.animType?s=t.animType:t.renderer&&(s=t.renderer);let i=q(s);this.renderer=new i(this,t.rendererSettings),this.imagePreloader?.setCacheType(s,this.renderer.globalData?.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=s,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(`${t.loop}`,10),this.autoplay=!!(!("autoplay"in t)||t.autoplay),this.name=t.name??"",this.autoloadSegments=!!(!Object.hasOwn(t,"autoloadSegments")||t.autoloadSegments),this.assetsPath=t.assetsPath??this.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(t.path.includes("\\")?this.path=t.path.slice(0,Math.max(0,t.path.lastIndexOf("\\")+1)):this.path=t.path.slice(0,Math.max(0,t.path.lastIndexOf("/")+1)),this.fileName=t.path.slice(Math.max(0,t.path.lastIndexOf("/")+1)),this.fileName=this.fileName.slice(0,Math.max(0,this.fileName.lastIndexOf(".json"))),function(t,s,i){tA();let r=tD(s,i);e?.postMessage({fullPath:J()?t:window.location.origin+window.location.pathname,id:r,path:t,type:"loadAnimation"})}(t.path,this.configAnimation,this.onSetupError))}catch(t){throw console.error(`${this.constructor.name}:
3
- `,t),Error(`${this.constructor.name}: Could not set params`)}}setSegment(t,e){let s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==s&&this.goToAndStop(s,!0)}setSpeed(t,e){e&&this.name!==e||(this.playSpeed=t,this.updaFrameModifier())}setSubframe(t){this.isSubframeEnabled=!!t}setupAnimation(t){tF(t,this.configAnimation)}setVolume(t,e){e&&this.name!==e||this.audioController.setVolume(t)}show(){this.renderer.show()}stop(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))}togglePause(t){t&&this.name!==t||(this.isPaused?this.play():this.pause())}trigger(t){try{if(!this._cbs[t])return;switch(t){case"enterFrame":this.triggerEvent(t,new E(t,this.currentFrame,this.totalFrames,this.frameModifier)),this.onEnterFrame?.(new E(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"drawnFrame":this.triggerEvent(t,new S(t,this.currentFrame,this.frameModifier,this.totalFrames));break;case"loopComplete":this.triggerEvent(t,new M(t,Number(this.loop),this.playCount,this.frameMult)),this.onLoopComplete?.(new M(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new C(t,this.frameMult)),this.onComplete?.(new C(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new k(t,this.firstFrame,this.totalFrames)),this.onSegmentStart?.(new k(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new P(t,this)),this.onDestroy?.(new P(t,this));break;default:this.triggerEvent(t)}}catch(t){console.error(`${this.constructor.name}:
4
- `,t)}}triggerConfigError(t){let e=new D(t,this.currentFrame);this.triggerEvent("error",e),this.onError?.(e)}triggerRenderFrameError(t){let e=new A(t,this.currentFrame);this.triggerEvent("error",e),this.onError?.(e)}unmute(t){t&&this.name!==t||this.audioController.unmute()}updaFrameModifier(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)}updateDocumentData(t,e,s){try{let i=this.renderer.getElementByPath(t);i?.updateDocumentData([],e,s)}catch(t){console.error(this.constructor.name,t)}}waitForFontsLoaded(){if(this.renderer.globalData?.fontManager?.isLoaded)return void this.checkLoaded();setTimeout(this.waitForFontsLoaded.bind(this),20)}}let tj=!0,tW=0,tH=0,tY=0,tU=[];function tJ(){tY++,!tY||!tj||J()||(window.requestAnimationFrame(tX),tj=!1)}function tX(t){tW=t,J()||window.requestAnimationFrame(tK)}function tZ({target:t}){let e=0;if(!t)throw Error("No animation to remove");for(;e<tH;)tU[e].animation===t&&(tU.splice(e,1),e--,tH-=1,t.isPaused||t0()),e++}function tK(t){let e=t-tW;for(let t=0;t<tH;t++)tU[t].animation.advanceTime(e);tW=t,tY&&1?J()||window.requestAnimationFrame(tK):tj=!0}function tQ(t,e){t.addEventListener("destroy",tZ),t.addEventListener("_active",tJ),t.addEventListener("_idle",t0),tU.push({animation:t,elem:e}),tH++}function t0(){tY--}let t1=Math.PI/180,t2=(()=>{function t(t,e){let s,i=[];switch(t){case F.Int16:case F.Uint8c:s=1;break;case F.Float32:case F.Int32:case F.Uint8:default:s=1.1}for(let t=0;t<e;t++)i.push(s);return i}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,s){return e===F.Float32?new Float32Array(s):e===F.Int16?new Int16Array(s):e===F.Uint8c?new Uint8ClampedArray(s):t(e,s)}:t})();function t3(t){return Array.from({length:t})}class t5{constructor(){this.props=t2(F.Float32,16),this._identity=!0,this._identityCalculated=!1,this.reset()}applyToPoint(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}applyToPointArray(t,e,s){return this.isIdentity()?[t,e,s]:[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}applyToPointStringified(t,e){if(this.isIdentity())return`${t},${e}`;let s=this.props;return`${Math.round((t*s[0]+e*s[4]+s[12])*100)/100},${Math.round((t*s[1]+e*s[5]+s[13])*100)/100}`}applyToTriplePoints(t,e,s){let i=t2(F.Float32,6);if(this.isIdentity())i.set([t[0],t[1],e[0],e[1],s[0],s[1]]);else{let r=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i.set([t[0]*r+t[1]*n+h,t[0]*a+t[1]*o+l,e[0]*r+e[1]*n+h,e[0]*a+e[1]*o+l,s[0]*r+s[1]*n+h,s[0]*a+s[1]*o+l])}return i}applyToX(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}applyToY(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}applyToZ(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}clone(t){return t.props.set(this.props),t}cloneFromProps(t){return this.props.set(t),this}equals(t){return this.props.every((e,s)=>e===t?.props[s])}getInverseMatrix(){let t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,s=-this.props[1]/t,i=-this.props[4]/t,r=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new t5;return o.setTransform(e,s,0,0,i,r,0,0,0,0,1,0,a,n,0,1),o}inversePoint(t){return this.getInverseMatrix().applyToPoint(t[0],t[1],t[2]||0)}inversePoints(t){return t.map(t=>this.inversePoint(t))}isIdentity(){return this._identityCalculated||(this._identity=1===this.props[0]&&0===this.props[1]&&0===this.props[2]&&0===this.props[3]&&0===this.props[4]&&1===this.props[5]&&0===this.props[6]&&0===this.props[7]&&0===this.props[8]&&0===this.props[9]&&1===this.props[10]&&0===this.props[11]&&0===this.props[12]&&0===this.props[13]&&0===this.props[14]&&1===this.props[15],this._identityCalculated=!0),this._identity}multiply(t){return this.transform(...t.props)}reset(){return this.props.set([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this}rotate(t){if(!t)return this;let e=Math.cos(t),s=Math.sin(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}rotateX(t){if(!t)return this;let e=Math.cos(t),s=Math.sin(t);return this._t(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1)}rotateY(t){if(!t)return this;let e=Math.cos(t),s=Math.sin(t);return this._t(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1)}rotateZ(t){return this.rotate(t)}scale(t,e,s=1){return 1===t&&1===e&&1===s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}setTransform(t,e,s,i,r,a,n,o,h,l,p,m,c,d,u,f){return this.props.set([t,e,s,i,r,a,n,o,h,l,p,m,c,d,u,f]),this}shear(t,e){return this._t(1,e,t,1,0,0)}skew(t,e){return this.shear(Math.tan(t),Math.tan(e))}skewFromAxis(t,e){let s=Math.cos(e),i=Math.sin(e);return this._t(s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,Math.tan(t),1,0,0,0,0,1,0,0,0,0,1)._t(s,-i,0,0,i,s,0,0,0,0,1,0,0,0,0,1)}to2dCSS(){let t=this.roundMatrixProperty(this.props[0]),e=this.roundMatrixProperty(this.props[1]),s=this.roundMatrixProperty(this.props[4]),i=this.roundMatrixProperty(this.props[5]),r=this.roundMatrixProperty(this.props[12]),a=this.roundMatrixProperty(this.props[13]);return`matrix(${t},${e},${s},${i},${r},${a})`}toCSS(){let t="matrix3d(";for(let e=0;e<16;e++)t+=`${Math.round(1e4*this.props[e])/1e4}`+(15===e?")":",");return t}transform(t,e,s,i,r,a,n,o,h,l,p,m,c,d,u,f){let g=this.props;if(1===t&&0===e&&0===s&&0===i&&0===r&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return g[12]=g[12]*t+g[15]*c,g[13]=g[13]*a+g[15]*d,g[14]=g[14]*p+g[15]*u,g[15]*=f,this._identityCalculated=!1,this;let y=g[0],b=g[1],v=g[2],x=g[3],w=g[4],_=g[5],E=g[6],C=g[7],S=g[8],M=g[9],k=g[10],P=g[11],A=g[12],D=g[13],T=g[14],F=g[15];return g[0]=y*t+b*r+v*h+x*c,g[1]=y*e+b*a+v*l+x*d,g[2]=y*s+b*n+v*p+x*u,g[3]=y*i+b*o+v*m+x*f,g[4]=w*t+_*r+E*h+C*c,g[5]=w*e+_*a+E*l+C*d,g[6]=w*s+_*n+E*p+C*u,g[7]=w*i+_*o+E*m+C*f,g[8]=S*t+M*r+k*h+P*c,g[9]=S*e+M*a+k*l+P*d,g[10]=S*s+M*n+k*p+P*u,g[11]=S*i+M*o+k*m+P*f,g[12]=A*t+D*r+T*h+F*c,g[13]=A*e+D*a+T*l+F*d,g[14]=A*s+D*n+T*p+F*u,g[15]=A*i+D*o+T*m+F*f,this._identityCalculated=!1,this}translate(t,e,s){let i=s||0;return 0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}_t(...t){return this.transform(...t)}roundMatrixProperty(t){return t<1e-6&&t>0||t>-1e-6&&t<0?Math.round(1e4*t)/1e4:t}}class t4{init(t){this.effectsManager=t,this.type=B.TransformEffect,this.matrix=new t5,this.opacity=-1,this._mdf=!1,this._opMdf=!1}renderFrame(t){if(this._opMdf=!1,this._mdf=!1,!t&&!this.effectsManager?._mdf)return;let e=this.effectsManager?.effectElements??[],s=e[0].p.v,i=e[1].p.v,r=1===e[2].p.v,a=e[3].p.v,n=r?a:e[4].p.v,o=e[5].p.v,h=e[6].p.v,l=e[7].p.v;this.matrix?.reset(),this.matrix?.translate(-s[0],-s[1],s[2]),this.matrix?.scale(.01*n,.01*a,1),this.matrix?.rotate(-l*t1),this.matrix?.skewFromAxis(-o*t1,(h+90)*t1),this.matrix?.translate(i[0],i[1],0),this._mdf=!0,this.opacity!==e[8].p.v&&(this.opacity=e[8].p.v,this._opMdf=!0)}constructor(){this.opacity=1}}class t6{createMergeNode(t,e){let s,i=tz("feMerge");i.setAttribute("result",t);let{length:r}=e;for(let t=0;t<r;t++)(s=tz("feMergeNode")).setAttribute("in",e[t]),i.appendChild(s),i.appendChild(s);return i}}let t9=[],t8="",t7=()=>t8,et="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0",ee={};class es{constructor(t){let e,{length:s}=t.data.ef??[];this.filters=[];for(let i=0;i<s;i++){e=null;let s=t.data.ef?.[i].ty;s&&ee[s]&&(e=new ee[s].effect(t.effectsManager?.effectElements[i],t)),e&&this.filters.push(e)}this.filters.length>0&&t.addRenderableComponent(this)}getEffects(t){let{length:e}=this.filters,s=[];for(let i=0;i<e;i++)this.filters[i].type===t&&s.push(this.filters[i]);return s}renderFrame(t){let{length:e}=this.filters;for(let s=0;s<e;s++)this.filters[s].renderFrame(t)}}let ei={createAlphaToLuminanceFilter:function(){let t=tz("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},createFilter:function(t,e){let s=tz("filter");return s.id=t,e||(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%")),s}},er="filter_result_",ea={};class en{constructor(t){let e,s="SourceGraphic",i=Z(),r=ei.createFilter(i,!0),a=0;this.filters=[];let{length:n}=t.data.ef??[];for(let i=0;i<n;i++){e=null;let{ty:n}=t.data.ef?.[i]??{ty:null},o=null!==n&&ea[n]?ea[n].effect:null;o&&n&&t.effectsManager&&(e=new o(r,t.effectsManager.effectElements[i],t,`${er}${a}`,s),s=`${er}${a}`,ea[n]?.countsAsEffect&&a++),e&&this.filters.push(e)}a&&(t.globalData.defs.appendChild(r),t.layerElement?.setAttribute("filter",`url(${t7()}#${i})`)),this.filters.length>0&&t.addRenderableComponent(this)}getEffects(t){let{length:e}=this.filters,s=[];for(let i=0;i<e;i++)this.filters[i].type===t&&s.push(this.filters[i]);return s}renderFrame(t){let{length:e}=this.filters;for(let s=0;s<e;s++)this.filters[s].renderFrame(t)}}let eo=(t,e,s)=>{ea[t]={countsAsEffect:s,effect:e}},eh={default:150},el=()=>eh.default;class ep{constructor(t,e,s){this._length=0,this._maxLength=t,this._create=e,this._release=s,this.pool=t3(this._maxLength),this.newElement=this.newElement.bind(this),this.release=this.release.bind(this)}newElement(){let t;return this._length?(this._length-=1,t=this.pool[this._length]):t=this._create(),t}release(t){if(this._length===this._maxLength){var e;this.pool=[...e=this.pool,...t3(e.length)],this._maxLength*=2}this._release&&this._release(t),this.pool[this._length]=t,this._length++}}let em=new ep(8,()=>({addedLength:0,lengths:t2(F.Float32,el()),percents:t2(F.Float32,el())})),ec=new ep(8,()=>({lengths:[],totalLength:0}),t=>{if(!ts(t))return;let{length:e}=t.lengths;for(let s=0;s<e;s++)em.release(t.lengths[s]);t.lengths.length=0}),ed=t2(F.Float32,8);function eu(t,e,s,i){let r={},a=`${t[0]}_${t[1]}_${e[0]}_${e[1]}_${s[0]}_${s[1]}_${i[0]}_${i[1]}`.replaceAll(".","p");if(!r[a]){let n=el(),o,h,l=0,p,m,c=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&ey(t[0],t[1],e[0],e[1],t[0]+s[0],t[1]+s[1])&&ey(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(n=2);let d=new ew(n),{length:u}=s;for(let r=0;r<n;r++){m=t3(u),h=r/(n-1),p=0;for(let r=0;r<u;r++)o=Math.pow(1-h,3)*t[r]+3*Math.pow(1-h,2)*h*(t[r]+s[r])+3*(1-h)*Math.pow(h,2)*(e[r]+i[r])+Math.pow(h,3)*e[r],m[r]=o,null!==c&&(p+=Math.pow(Number(m[r])-Number(c[r]),2));l+=p=Math.sqrt(p),d.points[r]=new e_(p,m),c=m}d.segmentLength=l,r[a]=d}return r[a]}function ef(t,e,s,i,r,a,n){let o=r,h=a;o<0?o=0:o>1&&(o=1);let l=ex(o,n),p=ex(h=h>1?1:h,n),m=1-l,c=1-p,d=m*m*m,u=l*m*m*3,f=l*l*m*3,g=l*l*l,y=m*m*c,b=l*m*c+m*l*c+m*m*p,v=l*l*c+m*l*p+l*m*p,x=l*l*p,w=m*c*c,_=l*c*c+m*p*c+m*c*p,E=l*p*c+m*p*p+l*c*p,C=l*p*p,S=c*c*c,M=p*c*c+c*p*c+c*c*p,k=p*p*c+c*p*p+p*c*p,P=p*p*p,{length:A}=t;for(let r=0;r<A;r++)ed[4*r]=Math.round((d*t[r]+u*s[r]+f*i[r]+g*e[r])*1e3)/1e3,ed[4*r+1]=Math.round((y*t[r]+b*s[r]+v*i[r]+x*e[r])*1e3)/1e3,ed[4*r+2]=Math.round((w*t[r]+_*s[r]+E*i[r]+C*e[r])*1e3)/1e3,ed[4*r+3]=Math.round((S*t[r]+M*s[r]+k*i[r]+P*e[r])*1e3)/1e3;return ed}function eg(t){let e,s=ec.newElement(),i=t.c,r=t.v,a=t.o,n=t.i,o=t._length||0,{lengths:h}=s,l=0;for(e=0;e<o-1;e++)h[e]=ev(r[e],r[e+1],a[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=ev(r[e],r[0],a[e],n[0]),l+=h[e].addedLength),s.totalLength=l,s}function ey(t,e,s,i,r,a){let n=t*i+e*r+s*a-r*i-a*t-s*e;return n>-.001&&n<.001}function eb(t,e,s,i,r,a,n,o,h){let l;if(0===s&&0===a&&0===h)return ey(t,e,i,r,n,o);let p=Math.sqrt(Math.pow(i-t,2)+Math.pow(r-e,2)+Math.pow(a-s,2)),m=Math.sqrt(Math.pow(n-t,2)+Math.pow(o-e,2)+Math.pow(h-s,2)),c=Math.sqrt(Math.pow(n-i,2)+Math.pow(o-r,2)+Math.pow(h-a,2));return(l=p>m?p>c?p-m-c:c-m-p:c>m?c-m-p:m-p-c)>-1e-4&&l<1e-4}function ev(t,e,s,i){let r=el(),a,n,o=0,h,l=[],p=[],m=em.newElement(),c=s.length;for(let d=0;d<r;d++){n=d/(r-1),h=0;for(let r=0;r<c;r++)a=Math.pow(1-n,3)*t[r]+3*Math.pow(1-n,2)*n*s[r]+3*(1-n)*Math.pow(n,2)*i[r]+Math.pow(n,3)*e[r],l[r]=a,"number"==typeof p[r]&&(h+=Math.pow(l[r]-p[r],2)),p[r]=l[r];h&&(o+=h=Math.sqrt(h)),m.percents[d]=n,m.lengths[d]=o}return m.addedLength=o,m}function ex(t,{addedLength:e,lengths:s,percents:i}){let{length:r}=i,a=Math.floor((r-1)*t),n=t*e,o=0;if(a===r-1||0===a||n===s[a])return i[a];let h=s[a]>n?-1:1,l=!0;for(;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}class ew{constructor(t){this.segmentLength=0,this.points=Array.from({length:t})}}class e_{constructor(t,e){this.partialLength=t,this.point=e}}let eE={getPointInSegment:function(t,e,s,i,r,a){let n=ex(r,a),o=1-n;return[Math.round((o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*s[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0])*1e3)/1e3,Math.round((o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*s[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1])*1e3)/1e3]},getSegmentsLength:eg},eC={};function eS(t,e,s,i,r){let a=r||`bez_${t}_${e}_${s}_${i}`.replaceAll(".","p");if(eC[a])return eC[a];let n=new eM([t,e,s,i]);return eC[a]=n,n}class eM{constructor(t){this.float32ArraySupported="function"==typeof Float32Array,this.kSplineTableSize=11,this.kSampleStepSize=1/(this.kSplineTableSize-1),this.NEWTON_ITERATIONS=4,this.NEWTON_MIN_SLOPE=.001,this.SUBDIVISION_MAX_ITERATIONS=10,this.SUBDIVISION_PRECISION=1e-7,this._p=t,this._mSampleValues=this.float32ArraySupported?new Float32Array(this.kSplineTableSize):Array.from({length:this.kSplineTableSize}),this._precomputed=!1,this.get=this.get.bind(this)}_calcSampleValues(){let t=this._p[0],e=this._p[2];for(let s=0;s<this.kSplineTableSize;++s)this._mSampleValues[s]=this.calcBezier(s*this.kSampleStepSize,t,e)}_getTForX(t){let e=this._p[0],s=this._p[2],i=this._mSampleValues,r=0,a=1,n=this.kSplineTableSize-1;for(;a!==n&&Number(i[a])<=t;++a)r+=this.kSampleStepSize;let o=r+(t-Number(i[--a]))/(Number(i[a+1])-Number(i[a]))*this.kSampleStepSize,h=this.getSlope(o,e,s);return h>=this.NEWTON_MIN_SLOPE?this.newtonRaphsonIterate(t,o,e,s):0===h?o:this.binarySubdivide(t,r,r+this.kSampleStepSize,e,s)}_precompute(){let t=this._p[0],e=this._p[1],s=this._p[2],i=this._p[3];this._precomputed=!0,(t!==e||s!==i)&&this._calcSampleValues()}get(t){let e=this._p[0],s=this._p[1],i=this._p[2],r=this._p[3];return(this._precomputed||this._precompute(),e===s&&i===r)?t:0===t?0:1===t?1:this.calcBezier(this._getTForX(t),s,r)}A(t,e){return 1-3*e+3*t}B(t,e){return 3*e-6*t}binarySubdivide(t,e,s,i,r){let a=e,n=s,o,h,l=0;do h=a+(n-a)/2,(o=this.calcBezier(h,i,r)-t)>0?n=h:a=h;while(Math.abs(o)>this.SUBDIVISION_PRECISION&&++l<this.SUBDIVISION_MAX_ITERATIONS);return h}C(t){return 3*t}calcBezier(t,e,s){return((this.A(e,s)*t+this.B(e,s))*t+this.C(e))*t}getSlope(t,e,s){return 3*this.A(e,s)*t*t+2*this.B(e,s)*t+this.C(e)}newtonRaphsonIterate(t,e,s,i){let r=e;for(let e=0;e<this.NEWTON_ITERATIONS;++e){let e=this.getSlope(r,s,i);if(0===e)break;let a=this.calcBezier(r,s,i)-t;r-=a/e}return r}}class ek{addDynamicProperty(t){this.dynamicProperties.includes(t)||(this.dynamicProperties.push(t),this.container?.addDynamicProperty(this),this._isAnimated=!0)}getValue(t){throw Error(`${this.constructor.name}: Method getValue is not implemented`)}initDynamicPropertyContainer(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}iterateDynamicProperties(){this._mdf=!1;let{length:t}=this.dynamicProperties;for(let e=0;e<t;e++)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0);return 0}setGroupProperty(t){}constructor(){this.dynamicProperties=[]}}let eP=(t,e)=>{let s=e[0],i=e[1],r=e[2],a=e[3],n=Math.atan2(2*i*a-2*s*r,1-2*i*i-2*r*r),o=Math.asin(2*s*i+2*r*a),h=Math.atan2(2*s*a-2*i*r,1-2*s*s-2*r*r);t[0]=n/t1,t[1]=o/t1,t[2]=h/t1},eA=t=>{let e=t[0]*t1,s=t[1]*t1,i=t[2]*t1,r=Math.cos(e/2),a=Math.cos(s/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(s/2),l=Math.sin(i/2);return[o*h*n+r*a*l,o*a*n+r*h*l,r*h*n-o*a*l,r*a*n-o*h*l]},eD=(t,e,s)=>{let i=[0,0,0,0],r=t[0],a=t[1],n=t[2],o=t[3],h=e[0],l=e[1],p=e[2],m=e[3],c,d,u,f,g;return(d=r*h+a*l+n*p+o*m)<0&&(d=-d,h=-h,l=-l,p=-p,m=-m),1-d>1e-6?(u=Math.sin(c=Math.acos(d)),f=Math.sin((1-s)*c)/u,g=Math.sin(s*c)/u):(f=1-s,g=s),i[0]=f*r+g*h,i[1]=f*a+g*l,i[2]=f*n+g*p,i[3]=f*o+g*m,i};class eT extends ek{addEffect(t){this.effectsSequence.push(t),this.container?.addDynamicProperty(this)}getSpeedAtTime(t){throw Error(`${this.constructor.name}: Method getSpeedAtTime is not implemented`)}getValueAtCurrentTime(){if(this._caching=this._caching??{},!this.keyframes)return;let t=Number(this.offsetTime),e=Number(this.comp?.renderedFrame)-t,s=this.keyframes[0].t-t,i=this.keyframes.length-1,r=this.keyframes[i].t-t,a=Number(this._caching.lastFrame);if(!(e===a||-999999!==a&&(a>=r&&e>=r||a<s&&e<s))){a>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);let t=this.interpolateValue(e,this._caching);this.pv=t}return this._caching.lastFrame=e,this.pv}getValueAtTime(t,e){throw Error(`${this.constructor.name}: Method getValueAtTime is not implemented`)}getVelocityAtTime(t){throw Error(`${this.constructor.name}: Method getVelocityAtTime is not implemented`)}initiateExpression(t,e,s){throw Error("Method not implemented")}interpolateValue(t,e={}){let s,i=Number(this.offsetTime),r=[0,0,0];this.propType===R.MultiDimensional&&this.pv&&(r=t2(F.Float32,this.pv.length));let{keyframes:a=[],keyframesMetadata:n,propType:o}=this,h=e.lastIndex||0,l=h,p=a.length-1,m=!0,c=a[0],d=a[1];for(;m;){if(c=a[l],d=a[l+1],l===p-1&&t>=d.t-i){c.h&&(c=d),h=0;break}if(d.t-i>t){h=l;break}l<p-1?l++:(h=0,m=!1)}let u=n[l]??{},f,g,y,b,v=null,x=d.t-i,w=c.t-i;if(c.to&&c.s){u.bezierData=u.bezierData??eu(c.s,d.s??c.e,c.to,c.ti);let{__fnct:s,bezierData:i}=u;if(t>=x||t<w){let e=t>=x?i.points.length-1:0;f=i.points[e].point.length;for(let t=0;t<f;t++)r[t]=i.points[e].point[t]}else{s?v=s:u.__fnct=v=eS(c.o.x,c.o.y,c.i.x,c.i.y,c.n).get,g=v((t-w)/(x-w));let a=i.segmentLength*g,n,o=Number(e.lastFrame)<t&&e._lastKeyframeIndex===l?e._lastAddedLength:0;for(b=Number(e.lastFrame)<t&&e._lastKeyframeIndex===l?e._lastPoint:0,m=!0,y=i.points.length;m;){if(o+=i.points[b].partialLength,0===a||0===g||b===i.points.length-1){f=i.points[b].point.length;for(let t=0;t<f;t++)r[t]=i.points[b].point[t];break}if(a>=o&&a<o+i.points[b+1].partialLength){n=(a-o)/i.points[b+1].partialLength,f=i.points[b].point.length;for(let t=0;t<f;t++)r[t]=i.points[b].point[t]+(i.points[b+1].point[t]-i.points[b].point[t])*n;break}b<y-1?b++:m=!1}e._lastPoint=b,e._lastAddedLength=o-i.points[b].partialLength,e._lastKeyframeIndex=l}}else{let e,i,a,n,h;if(p=c.s?.length||0,s=d.s??c.e,this.sh&&1!==c.h)t>=x?(r[0]=s[0],r[1]=s[1],r[2]=s[2]):t<=w&&c.s?(r[0]=c.s[0],r[1]=c.s[1],r[2]=c.s[2]):eP(r,eD(eA(c.s),eA(s),(t-w)/(x-w)));else for(l=0;l<p;l++)1!==c.h&&(t>=x?g=1:t<w?g=0:(c.o.x.constructor===Array?(u.__fnct=u.__fnct??[],u.__fnct[l]?v=u.__fnct[l]:Array.isArray(c.o.y)&&Array.isArray(c.i.y)&&Array.isArray(c.i.x)&&(e=c.o.x[l]??c.o.x[0],i=c.o.y[l]??c.o.y[0],v=eS(e,i,a=c.i.x[l]??c.i.x[0],c.i.y[l]??c.i.y[0]).get,u.__fnct[l]=v)):u.__fnct?v=u.__fnct:(e=c.o.x,i=c.o.y,v=eS(e,i,a=c.i.x,c.i.y).get,c.keyframeMetadata=v),g=v?.((t-w)/(x-w)))),s=d.s??c.e,void 0!==(h=1===c.h?c.s?.[l]:Number(c.s?.[l])+(s[l]-Number(c.s?.[l]))*Number(g))&&(o===R.MultiDimensional?r[l]=h:r=h)}return e.lastIndex=h,r}processEffectsSequence(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.elem)throw Error(`${this.constructor.name}: elem (ElementInterface) is not implemented`);if(this.elem.globalData?.frameId===this.frameId)return 0;if(0===this.effectsSequence.length)return this._mdf=!1,0;if(this.lock&&this.pv)return this.setVValue(this.pv),0;this.lock=!0,this._mdf=!!this._isFirstFrame;let t=this.effectsSequence.length,e=this.kf?this.pv:this.data.k;for(let s=0;s<t;s++)e=this.effectsSequence[s](e);return this.setVValue(e),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData?.frameId,0}setVValue(t){let e;if("number"==typeof t&&this.propType===R.UniDimensional){e=t*Number(this.mult),Math.abs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);return}let s=0,{length:i}=this.v;for(;s<i;)e=t[s]*Number(this.mult),Math.abs(this.v[s]-e)>1e-5&&(this.v[s]=e,this._mdf=!0),s++}speedAtTime(t){throw Error("Method is not implemented")}valueAtTime(t,e){throw Error(`${this.constructor.name}: Method valueAtTime is not implemented`)}velocityAtTime(t){throw Error("Method is not implemented")}constructor(...t){super(...t),this.effectsSequence=[],this.initFrame=-999999,this.keyframesMetadata=[],this.offsetTime=0}}class eF extends eT{constructor(t,e,s=null,i=null){let r,a,n,o;super(),this.propType=R.MultiDimensional;let{length:h}=e.k;for(let t=0;t<h-1;t++)e.k[t].to&&e.k[t].s&&e.k[t+1]?.s&&(r=e.k[t].s,a=e.k[t+1].s,n=e.k[t].to,o=e.k[t].ti,(2===r.length&&(r[0]!==a[0]||r[1]!==a[1])&&ey(r[0],r[1],a[0],a[1],r[0]+n[0],r[1]+n[1])&&ey(r[0],r[1],a[0],a[1],a[0]+o[0],a[1]+o[1])||3===r.length&&(r[0]!==a[0]||r[1]!==a[1]||r[2]!==a[2])&&eb(r[0],r[1],r[2],a[0],a[1],a[2],r[0]+n[0],r[1]+n[1],r[2]+n[2])&&eb(r[0],r[1],r[2],a[0],a[1],a[2],a[0]+o[0],a[1]+o[1],a[2]+o[2]))&&(e.k[t].to=null,e.k[t].ti=null),(r[0]===a[0]&&r[1]===a[1]&&0===n[0]&&0===n[1]&&0===o[0]&&0===o[1]&&2===r.length||r[2]===a[2]&&0===n[2]&&0===o[2])&&(e.k[t].to=null,e.k[t].ti=null));this.effectsSequence=[this.getValueAtCurrentTime.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=this.processEffectsSequence,this.frameId=-1;let l=e.k[0].s?.length||0;this.v=t2(F.Float32,l),this.pv=t2(F.Float32,l);for(let t=0;t<l;t++)this.v[t]=this.initFrame,this.pv[t]=this.initFrame;this._caching={lastFrame:this.initFrame,lastIndex:0,value:t2(F.Float32,l)}}}class eI extends eT{constructor(t,e,s=null,i=null){super(),this.propType=R.UniDimensional,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={_lastKeyframeIndex:-1,lastFrame:this.initFrame,lastIndex:0,value:0},this.k=!0,this.kf=!0,this.data=e,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=this.initFrame,this.pv=this.initFrame,this._isFirstFrame=!0,this.getValue=this.processEffectsSequence,this.effectsSequence=[this.getValueAtCurrentTime.bind(this)]}}class e$ extends eT{constructor(t,e,s=null,i=null){super(),this.propType=R.MultiDimensional,this.mult=s||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;let{length:r}=e.k;this.v=t2(F.Float32,r),this.pv=t2(F.Float32,r),this.vel=t2(F.Float32,r);for(let t=0;t<r;t++)this.v[t]=e.k[t]*this.mult,this.pv[t]=e.k[t];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=this.processEffectsSequence}}class eL extends eT{constructor(){super(),this.propType=!1}}class eN extends eT{constructor(t,e,s=null,i=null){super(),this.propType=R.UniDimensional,this.mult=s||1,this.data=e,this.v=e.k*(s||1),this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=this.processEffectsSequence}}let eB={getProp:function(t,e,s,i,r){let a,n=e;if(n&&"sid"in n&&n.sid&&(n=t.globalData?.slotManager?.getProp(n)),n?.k?.length)if("number"==typeof(n?.k)[0])a=new e$(t,n,i,r);else switch(s){case 0:a=new eI(t,n,i,r);break;case 1:a=new eF(t,n,i,r)}else a=new eN(t,n,i,r);return(a=a??new eL).effectsSequence.length>0&&r?.addDynamicProperty(a),a}},eR=new ep(8,()=>t2(F.Float32,2));class eV{constructor(){this.lengths=[],this.c=!1,this._length=0,this._maxLength=8,this.v=t3(this._maxLength),this.o=t3(this._maxLength),this.i=t3(this._maxLength)}doubleArrayLength(){this.v=[...this.v,...t3(this._maxLength)],this.i=[...this.i,...t3(this._maxLength)],this.o=[...this.o,...t3(this._maxLength)],this._maxLength*=2}length(){return this._length}reverse(){let t=new eV;t.setPathData(this.c,this._length);let e=this.v,s=this.o,i=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),r=1);let{_length:a}=this,n=a-1;for(let o=r;o<a;o++)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],s[n][0],s[n][1],o,!1),n-=1;return t}setLength(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t}setPathData(t,e){this.c=t,this.setLength(e);let s=0;for(;s<e;)this.v[s]=eR.newElement(),this.o[s]=eR.newElement(),this.i[s]=eR.newElement(),s++}setTripleAt(t,e,s,i,r,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(s,i,"o",n,o),this.setXYAt(r,a,"i",n,o)}setXYAt(t,e,s,i,r){let a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}a[i]&&(!a[i]||r)||(a[i]=eR.newElement()),a[i][0]=t,a[i][1]=e}}let ez=new ep(4,function(){return new eV},function(t){if(!ts(t))return;let e=t._length;for(let s=0;s<e;s++)eR.release(t.v[s]),eR.release(t.i[s]),eR.release(t.o[s]),t.v[s]=null,t.i[s]=null,t.o[s]=null;t._length=0,t.c=!1}),{newElement:eO}=ez,{release:eG}=ez;function eq(t){let e=eO(),s=t._length??t.v.length;e.setLength(s),e.c=t.c;for(let i=0;i<s;i++)e.setTripleAt(t.v[i][0],t.v[i][1],t.o[i][0],t.o[i][1],t.i[i][0],t.i[i][1],i);return e}let ej={clone:eq,newElement:eO};class eW{constructor(){this._length=0,this._maxLength=4,this.shapes=t3(this._maxLength)}addShape(t){this._length===this._maxLength&&(this.shapes=[...this.shapes,...t3(this._maxLength)],this._maxLength*=2),this.shapes[this._length]=t,this._length++}releaseShapes(){for(let t=0;t<this._length;t++)eG(this.shapes[t]);this._length=0}}function eH(){return new eW}t3(4);class eY extends ek{getValueAtTime(t,e){throw Error(`${this.constructor.name}: Method getShapeValueAtTime is not implemented`)}initiateExpression(t,e,s){throw Error(`${this.constructor.name}: Method initiateExpression is not implemented`)}interpolateShape(t,e,s={}){let i=s.lastIndex||0,r,a,n,o=0,h,l=this.keyframes??[];if(t<l[0].t-this.offsetTime)r=l[0].s?.[0],n=!0,i=0;else if(t>=l[l.length-1].t-this.offsetTime)r=l[l.length-1].s?l[l.length-1].s?.[0]:l[l.length-2].e[0],n=!0;else{let e,s,h=i,p=l.length-1,m=!0;for(;m&&(e=l[h],!((s=l[h+1]).t-this.offsetTime>t));)h<p-1?h++:m=!1;if(!e||!s)throw Error(`${this.constructor.name}: Could not set keyframe data`);let c=this.keyframesMetadata[h]||{};if(n=1===e.h,i=h,!n){if(t>=s.t-this.offsetTime)o=1;else if(t<e.t-this.offsetTime)o=0;else{let i;c.__fnct?i=c.__fnct:"number"==typeof e.o.x&&"number"==typeof e.o.y&&"number"==typeof e.i.x&&"number"==typeof e.i.y&&(c.__fnct=i=eS(e.o.x,e.o.y,e.i.x,e.i.y).get),o=i?.((t-(e.t-this.offsetTime))/(s.t-this.offsetTime-(e.t-this.offsetTime)))||0}a=s.s?s.s[0]:e.e[0]}r=e.s?.[0]}if(!r||"number"==typeof r||tt(r)||"number"==typeof a)return;let p=e._length,m=r.i[0].length;s.lastIndex=i;for(let t=0;t<p;t++)for(let s=0;s<m;s++)h=n?r.i[t][s]:r.i[t][s]+((a?.i[t][s]??0)-r.i[t][s])*o,e.i[t][s]=h,h=n?r.o[t][s]:r.o[t][s]+((a?.o[t][s]??0)-r.o[t][s])*o,e.o[t][s]=h,h=n?r.v[t][s]:r.v[t][s]+((a?.v[t][s]??0)-r.v[t][s])*o,e.v[t][s]=h}interpolateShapeCurrentTime(){if(!this.pv)throw Error(`${this.constructor.name}: Cannot parse ShapePath v value`);if(!this.keyframes)return;this._caching=this._caching??{};let t=Number(this.comp?.renderedFrame)-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=Number(this._caching.lastFrame);return -999999!==i&&(i<e&&t<e||i>s&&t>s)||(this._caching.lastIndex=i<t?Number(this._caching.lastIndex):0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}processEffectsSequence(t){let e,s;if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);if(this.elem?.globalData?.frameId===this.frameId)return 0;if(0===this.effectsSequence.length)return this._mdf=!1,0;if(this.lock&&this.pv)return this.setVValue(this.pv),0;this.lock=!0,this._mdf=!1,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt?.k;let i=this.effectsSequence.length;for(s=0;s<i;s++)e=this.effectsSequence[s](e);return this.setVValue(e),this.lock=!1,this.frameId=this.elem?.globalData?.frameId||0,0}reset(){this.paths=this.localShapeCollection}setVValue(t){if(!this.v||!t)throw Error(`${this.constructor.name}: ShapePath is not set`);if(!this.localShapeCollection)throw Error(`${this.constructor.name}: localShapeCollection is not set`);this.shapesEqual(this.v,t)||(this.v=eq(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}shapesEqual(t,e){if(t._length!==e._length||t.c!==e.c)return!1;let s=t._length||0;for(let i=0;i<s;i++)if(t.v[i]?.[0]!==e.v[i]?.[0]||t.v[i]?.[1]!==e.v[i]?.[1]||t.o[i]?.[0]!==e.o[i]?.[0]||t.o[i]?.[1]!==e.o[i]?.[1]||t.i[i]?.[0]!==e.i[i]?.[0]||t.i[i]?.[1]!==e.i[i]?.[1])return!1;return!0}constructor(...t){super(...t),this.effectsSequence=[],this.keyframesMetadata=[],this.offsetTime=0}}class eU extends eY{constructor(t,e){super(),this._cPoint=.5519,this.v=eO(),this.v.setPathData(!0,4),this.localShapeCollection=eH(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=eB.getProp(t,e.p,1,0,this),this.s=eB.getProp(t,e.s,1,0,this),this.dynamicProperties.length>0?this.k=!0:(this.k=!1,this.convertEllToPath())}convertEllToPath(){if(!this.p)return;let t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,r=3!==this.d,a=this.v;if(!a)throw Error(`${this.constructor.name}: Could not get value of ellipse`);a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=r?t+s:t-s,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=r?t-s:t+s,a.v[3][1]=e,a.i[0][0]=r?t-s*this._cPoint:t+s*this._cPoint,a.i[0][1]=e-i,a.i[1][0]=r?t+s:t-s,a.i[1][1]=e-i*this._cPoint,a.i[2][0]=r?t+s*this._cPoint:t-s*this._cPoint,a.i[2][1]=e+i,a.i[3][0]=r?t-s:t+s,a.i[3][1]=e+i*this._cPoint,a.o[0][0]=r?t+s*this._cPoint:t-s*this._cPoint,a.o[0][1]=e-i,a.o[1][0]=r?t+s:t-s,a.o[1][1]=e+i*this._cPoint,a.o[2][0]=r?t-s*this._cPoint:t+s*this._cPoint,a.o[2][1]=e+i,a.o[3][0]=r?t-s:t+s,a.o[3][1]=e-i*this._cPoint}getValue(t){return this.elem?.globalData?.frameId===this.frameId||(this.frameId=this.elem?.globalData?.frameId||0,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath()),0}}class eJ extends eY{constructor(t,e){super(),this.v=eO(),this.v.c=!0,this.localShapeCollection=eH(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=eB.getProp(t,e.p,1,0,this),this.s=eB.getProp(t,e.s,1,0,this),this.r=eB.getProp(t,e.r,0,0,this),this.dynamicProperties.length>0?this.k=!0:(this.k=!1,this.convertRectToPath())}convertRectToPath(){if(!this.p)throw Error(`${this.constructor.name}: p value is not implemented`);let t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,r=Math.min(s,i,this.r.v),a=.44810000000000005*r;this.v&&(this.v._length=0),2===this.d||1===this.d?(this.v?.setTripleAt(t+s,e-i+r,t+s,e-i+r,t+s,e-i+a,0,!0),this.v?.setTripleAt(t+s,e+i-r,t+s,e+i-a,t+s,e+i-r,1,!0),0===r?(this.v?.setTripleAt(t-s,e+i,t-s+a,e+i,t-s,e+i,2),this.v?.setTripleAt(t-s,e-i,t-s,e-i+a,t-s,e-i,3)):(this.v?.setTripleAt(t+s-r,e+i,t+s-r,e+i,t+s-a,e+i,2,!0),this.v?.setTripleAt(t-s+r,e+i,t-s+a,e+i,t-s+r,e+i,3,!0),this.v?.setTripleAt(t-s,e+i-r,t-s,e+i-r,t-s,e+i-a,4,!0),this.v?.setTripleAt(t-s,e-i+r,t-s,e-i+a,t-s,e-i+r,5,!0),this.v?.setTripleAt(t-s+r,e-i,t-s+r,e-i,t-s+a,e-i,6,!0),this.v?.setTripleAt(t+s-r,e-i,t+s-a,e-i,t+s-r,e-i,7,!0))):(this.v?.setTripleAt(t+s,e-i+r,t+s,e-i+a,t+s,e-i+r,0,!0),0===r?(this.v?.setTripleAt(t-s,e-i,t-s+a,e-i,t-s,e-i,1,!0),this.v?.setTripleAt(t-s,e+i,t-s,e+i-a,t-s,e+i,2,!0),this.v?.setTripleAt(t+s,e+i,t+s-a,e+i,t+s,e+i,3,!0)):(this.v?.setTripleAt(t+s-r,e-i,t+s-r,e-i,t+s-a,e-i,1,!0),this.v?.setTripleAt(t-s+r,e-i,t-s+a,e-i,t-s+r,e-i,2,!0),this.v?.setTripleAt(t-s,e-i+r,t-s,e-i+r,t-s,e-i+a,3,!0),this.v?.setTripleAt(t-s,e+i-r,t-s,e+i-a,t-s,e+i-r,4,!0),this.v?.setTripleAt(t-s+r,e+i,t-s+r,e+i,t-s+a,e+i,5,!0),this.v?.setTripleAt(t+s-r,e+i,t+s-a,e+i,t+s-r,e+i,6,!0),this.v?.setTripleAt(t+s,e+i-r,t+s,e+i-r,t+s,e+i-a,7,!0)))}getValue(){return this.elem?.globalData?.frameId===this.frameId||(this.elem?.globalData?.frameId&&(this.frameId=this.elem.globalData.frameId),this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath()),0}}class eX extends eY{constructor(t,e,s){super(),this.propType=R.Shape,this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;let i=3===s?e.pt?.k:e.ks?.k;if(!i)throw Error(`${this.constructor.name}: Could now get Path Data`);this.v=eq(i),this.pv=eq(this.v),this.localShapeCollection=eH(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.effectsSequence=[],this.getValue=this.processEffectsSequence}}class eZ extends eY{constructor(t,e,s){super(),this.data=e,this.propType=R.Shape,this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data?.st||0,this.keyframes=3===s?e.pt?.k:e.ks?.k??[],this.keyframesMetadata=[],this.k=!0,this.kf=!0;let i=this.keyframes[0].s,{length:r}=i?.[0].i??[];this.v=eO(),this.v.setPathData(!!i?.[0].c,r),this.pv=eq(this.v),this.localShapeCollection=eH(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=-999999,this._caching={lastFrame:-999999,lastIndex:0},this.effectsSequence=[this.interpolateShapeCurrentTime.bind(this)],this.getValue=this.processEffectsSequence}}class eK extends eY{constructor(t,e){super(),this.v=eO(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=eB.getProp(t,e.ir,0,0,this),this.is=eB.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=eB.getProp(t,e.pt,0,0,this),this.p=eB.getProp(t,e.p,1,0,this),this.r=eB.getProp(t,e.r,0,t1,this),this.or=eB.getProp(t,e.or,0,0,this),this.os=eB.getProp(t,e.os,0,.01,this),this.localShapeCollection=eH(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length>0?this.k=!0:(this.k=!1,this.convertToPath())}convertPolygonToPath(){if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);if(!this.p)throw Error(`${this.constructor.name}: p value is not implemented`);let t=Math.floor(this.pt.v),e=2*Math.PI/t,s=this.or.v,i=this.os.v,r=2*Math.PI*s/(4*t),a=-(.5*Math.PI),n=3===this.data.d?-1:1;a+=this.r.v,this.v&&(this.v._length=0);for(let o=0;o<t;o++){let t=s*Math.cos(a),h=s*Math.sin(a),l=0===t&&0===h?0:h/Math.sqrt(t*t+h*h),p=0===t&&0===h?0:-t/Math.sqrt(t*t+h*h);t+=Number(this.p.v[0]),h+=Number(this.p.v[1]),this.v?.setTripleAt(t,h,t-l*r*i*n,h-p*r*i*n,t+l*r*i*n,h+p*r*i*n,o,!0),a+=e*n}this.paths.length=0,this.paths[0]=this.v}convertStarToPath(){if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);if(!this.v)throw Error(`${this.constructor.name}: v (ShapePath) is not implemented`);let t=2*Math.floor(this.pt.v),e=2*Math.PI/t,s=!0,i=this.or.v,r=Number(this.ir?.v),a=this.os.v,n=Number(this.is?.v),o=2*Math.PI*i/(2*t),h=2*Math.PI*r/(2*t),l,p,m,c=-Math.PI/2;c+=this.r.v;let d=3===this.data.d?-1:1;this.v._length=0;for(let u=0;u<t;u++){l=s?i:r,p=s?a:n,m=s?o:h;let t=l*Math.cos(c),f=l*Math.sin(c),g=0===t&&0===f?0:f/Math.sqrt(t*t+f*f),y=0===t&&0===f?0:-t/Math.sqrt(t*t+f*f);t+=Number(this.p?.v[0]),f+=Number(this.p?.v[1]),this.v.setTripleAt(t,f,t-g*m*p*d,f-y*m*p*d,t+g*m*p*d,f+y*m*p*d,u,!0),s=!s,c+=e*d}}convertToPath(){throw Error(`${this.constructor.name}: Method convertToPath is not implemented`)}getValue(t){return this.elem?.globalData?.frameId===this.frameId||(this.frameId=this.elem?.globalData?.frameId||0,this.iterateDynamicProperties(),this._mdf&&this.convertToPath()),0}}let eQ={getConstructorFunction:function(){return eX},getKeyframedConstructorFunction:function(){return eZ},getShapeProp:function(t,e,s,i,r){let a=null;switch(s){case 3:case 4:{let i=3===s?e.pt:e.ks,r=i?.k;if(r?.length){a=new eZ(t,e,s);break}a=new eX(t,e,s);break}case 5:a=new eJ(t,e);break;case 6:a=new eU(t,e);break;case 7:a=new eK(t,e)}return a?.k&&t.addDynamicProperty(a),a}};class e0{constructor(t,e,s){this.masksProperties=[],this.data=t,this.element=e,this.globalData=s,this.storedData=[],this.masksProperties=this.data.masksProperties??[],this.maskElement=null;let{defs:i}=this.globalData,{length:r}=this.masksProperties;this.viewData=t3(r),this.solidPath="";let a=this.masksProperties,n=0,o=[],h=Z(),l,p,m,c="clipPath",d="clip-path";for(let t=0;t<r;t++){let e;("a"!==a[t].mode&&"n"!==a[t].mode||a[t].inv||a[t].o?.k!==100||a[t].o?.x)&&(c="mask",d="mask"),("s"===a[t].mode||"i"===a[t].mode)&&0===n?((l=tz("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",`${Number(this.element.comp?.data?.w)}`),l.setAttribute("height",`${Number(this.element.comp?.data?.h)}`),o.push(l)):l=null;let s=tz("path");if("n"===a[t].mode){this.viewData[t]={elem:s,lastPath:"",op:eB.getProp(this.element,a[t].o,0,.01,this.element),prop:eQ.getShapeProp(this.element,a[t],3)},i.appendChild(s);continue}if(n++,s.setAttribute("fill","s"===a[t].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),a[t].x?.k===0)p=null,m=null;else{c="mask",d="mask",m=eB.getProp(this.element,a[t].x,0,null,this.element),e=Z();let r=tz("filter");r.id=e,(p=tz("feMorphology")).setAttribute("operator","erode"),p.setAttribute("in","SourceGraphic"),p.setAttribute("radius","0"),r.appendChild(p),i.appendChild(r),s.setAttribute("stroke","s"===a[t].mode?"#000000":"#ffffff")}if(this.storedData[t]={elem:s,expan:p,filterId:e,lastOperator:"",lastPath:"",lastRadius:0,x:m},"i"===a[t].mode){let{length:t}=o,e=tz("g");for(let s=0;s<t;s++)e.appendChild(o[s]);let r=tz("mask");r.setAttribute("mask-type","alpha"),r.id=`${h}_${n}`,r.appendChild(s),i.appendChild(r),e.setAttribute("mask",`url(${t7()}#${h}_${n})`),o.length=0,o.push(e)}else o.push(s);a[t].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[t]={elem:s,invRect:l,lastPath:"",op:eB.getProp(this.element,a[t].o,0,.01,this.element),prop:eQ.getShapeProp(this.element,a[t],3)};let r=this.viewData[t].prop?.v;!this.viewData[t].prop?.k&&r&&this.drawPath(a[t],r,this.viewData[t])}this.maskElement=tz(c);let{length:u}=o;for(let t=0;t<u;t++)this.maskElement.appendChild(o[t]);n>0&&(this.maskElement.id=h,this.element.maskedElement?.setAttribute(d,`url(${t7()}#${h})`),i.appendChild(this.maskElement)),this.viewData.length>0&&this.element.addRenderableComponent(this)}createLayerSolidPath(){let t="M0,0 ";return t+` h${this.globalData.compSize?.w||0} v${this.globalData.compSize?.h||0} h-${this.globalData.compSize?.w||0} v-${this.globalData.compSize?.h||0} `}destroy(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null}drawPath(t,e,s){let i,r=` M${e.v[0]?.[0]},${e.v[0]?.[1]}`,a=e._length||0;for(i=1;i<a;i++)r+=` C${e.o[i-1]?.[0]},${e.o[i-1]?.[1]} ${e.i[i]?.[0]},${e.i[i]?.[1]} ${e.v[i]?.[0]},${e.v[i]?.[1]}`;if(e.c&&a>1&&(r+=` C${e.o[i-1]?.[0]},${e.o[i-1]?.[1]} ${e.i[0]?.[0]},${e.i[0]?.[1]} ${e.v[0]?.[0]},${e.v[0]?.[1]}`),s.lastPath!==r){let i="";s.elem&&(e.c&&(i=t?.inv?this.solidPath+r:r),s.elem.setAttribute("d",i)),s.lastPath=r}}getMaskelement(){return this.maskElement}getMaskProperty(t){return this.viewData[t].prop}renderFrame(t){let e=this.element.finalTransform?.mat,{length:s}=this.masksProperties;for(let i=0;i<s;i++){let s=this.viewData[i].prop?.v;if(s&&(this.viewData[i].prop?._mdf||t)&&this.drawPath(this.masksProperties[i]||null,s,this.viewData[i]),(this.viewData[i].op._mdf||t)&&this.viewData[i].elem.setAttribute("fill-opacity",`${this.viewData[i].op.v}`),"n"===this.masksProperties[i].mode||(this.viewData[i].invRect&&(this.element.finalTransform?.mProp._mdf||t)&&this.viewData[i].invRect?.setAttribute("transform",`${e?.getInverseMatrix().to2dCSS()}`),!this.storedData[i]?.x||!(this.storedData[i].x?._mdf||t)))continue;let r=this.storedData[i].expan;if(0>Number(this.storedData[i].x?.v)){"erode"!==this.storedData[i].lastOperator&&(this.storedData[i].lastOperator="erode",this.storedData[i].elem.setAttribute("filter",`url(${t7()}#${this.storedData[i].filterId})`)),r?.setAttribute("radius",`${-Number(this.storedData[i].x?.v)}`);continue}"dilate"!==this.storedData[i].lastOperator&&(this.storedData[i].lastOperator="dilate",this.storedData[i].elem.removeAttribute("filter")),this.storedData[i].elem.setAttribute("stroke-width",`${2*Number(this.storedData[i].x?.v)}`)}}}class e1{constructor(t,e){this.data=t,this.element=e,this.masksProperties=this.data.masksProperties??[],this.viewData=t3(this.masksProperties.length);let{length:s}=this.masksProperties,i=!1;for(let t=0;t<s;t++)"n"!==this.masksProperties[t].mode&&(i=!0),this.viewData[t]=eQ.getShapeProp(this.element,this.masksProperties[t],3);this.hasMasks=i,i&&this.element.addRenderableComponent(this),this.getMaskProperty=e0.prototype.getMaskProperty}destroy(){this.element=null}getMaskProperty(t){throw Error(`${this.constructor.name}: Method getMaskProperty is not implemented`)}renderFrame(t){let e,s;if(!this.element.globalData?.compSize)throw Error(`${this.constructor.name}: element->globalData->compSize is not implemented`);if(!this.hasMasks)return;let i=this.element.finalTransform?.mat,r=this.element.canvasContext,{length:a}=this.masksProperties;r?.beginPath();for(let t=0;t<a;t++)if("n"!==this.masksProperties[t].mode){this.masksProperties[t].inv&&(r?.moveTo(0,0),r?.lineTo(this.element.globalData.compSize.w,0),r?.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),r?.lineTo(0,this.element.globalData.compSize.h),r?.lineTo(0,0));let a=this.viewData[t].v;if(!a)throw Error(`${this.constructor.name}: Could not access ShapePath`);let n=i?.applyToPointArray(a.v[0][0],a.v[0][1],0)??[];r?.moveTo(n[0],n[1]);let o=a._length;for(e=1;e<o;e++)s=i?.applyToTriplePoints(a.o[e-1],a.i[e],a.v[e])??[],r?.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);s=i?.applyToTriplePoints(a.o[e-1],a.i[0],a.v[0])??[],r?.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}this.element.globalData.renderer.save(!0),r?.clip()}}let e2=new class{constructor(){if(this.maskType=!0,this.offscreenCanvas="undefined"!=typeof OffscreenCanvas,this.svgLumaHidden=!0,!Q())return;this.maskType=!/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),this.svgLumaHidden=!/firefox/i.test(navigator.userAgent)}},e3="__lottie_element_luma_buffer",e5=null,e4=null,e6=null;function e9(){(!e5||!e4)&&(e6=function(){let t=tz("svg"),e=tz("filter"),s=tz("feColorMatrix");return e.id=e3,s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),e.appendChild(s),t.appendChild(e),t.id=`${e3}_svg`,e2.svgLumaHidden&&(t.style.display="none"),t}(),document.body.appendChild(e6),(e4=(e5=tV("canvas")).getContext("2d"))&&(e4.filter=`url(#${e3})`,e4.fillStyle="rgba(0,0,0,0)",e4.fillRect(0,0,1,1)))}let e8={createCanvas:function(t,e){if(e2.offscreenCanvas)return new OffscreenCanvas(t,e);let s=tV("canvas");return s.width=t,s.height=e,s},getLumaCanvas:function(t){if(e5&&e4||e9(),!e5||!e4)throw Error("Could not create Canvas Element");return e5.width=t.width,e5.height=t.height,e4.filter=`url(#${e3})`,e5},loadLumaCanvas:e9};function e7(t=16){return({0:"source-over",1:"multiply",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light"})[t]||""}let st={1:"source-in",2:"source-out",3:"source-in",4:"source-out"},se="Method is not implemented";class ss{clearCanvas(t){if(!this.transformCanvas)throw Error(`${this.constructor.name}: transformCanvas is not implemented`);t?.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)}createContainerElements(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.globalData.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented in globalData`);if(this.data.tt&&this.data.tt>=1){this.buffers=[];let{canvasContext:t}=this.globalData,e=e8.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);let s=e8.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(s),this.data.tt>=3&&!document._isProxy&&e8.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new es(this),this.searchEffectTransforms()}createContent(){}createElements(){throw Error(`${this.constructor.name}: createElements is not implemented`)}createRenderableComponents(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);this.maskManager=new e1(this.data,this),this.renderableEffectsManager&&(this.transformEffects=this.renderableEffectsManager.getEffects(B.TransformEffect))}destroy(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager?.destroy()}exitLayer(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);let t=this.data.tt||0;if(t<1)return;let e=this.buffers[1],s=e.getContext("2d");this.clearCanvas(s),s.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);let i=Number(this.data.ind)-1;"tp"in this.data&&void 0!==this.data.tp&&(i=this.data.tp);let r=this.comp?.getElementById(i);if(r?.renderFrame(1),this.canvasContext.setTransform(1,0,0,1,0,0),t>=3&&!document._isProxy){let t=e8.getLumaCanvas(this.canvasContext.canvas),e=t.getContext("2d");e?.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(t,0,0)}this.canvasContext.globalCompositeOperation=st[t],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"}hide(){throw Error(se)}hideElement(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)}initRendererElement(){}prepareLayer(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);if(1>(this.data.tt||0))return;let t=this.buffers[0].getContext("2d");this.clearCanvas(t),t.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)}renderFrame(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(this.hidden||this.data.hd||1===this.data.td&&!t)return;this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();let e=0===this.data.ty;this.prepareLayer();let{renderer:s}=this.globalData;s.save(e),s.ctxTransform(this.finalTransform?.localMat.props),s.ctxOpacity(this.finalTransform?.localOpacity),this.renderInnerContent(),s.restore(e),this.exitLayer(),this.maskManager?.hasMasks&&s.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}renderInnerContent(){throw Error(se)}renderLocalTransform(){}renderRenderable(){}renderTransform(){throw Error(se)}searchEffectTransforms(){}setBlendMode(){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let{data:t,globalData:e}=this;if(!e.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented in globalData`);if(e.blendMode!==t.bm){e.blendMode=t.bm;let s=e7(t.bm);e.canvasContext.globalCompositeOperation=s}}show(){throw Error(se)}showElement(){if(!this.maskManager)throw Error(`${this.constructor.name}: Method maskManager is not implemented`);this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)}constructor(){this.buffers=[],this.mHelper=new t5,this.transformEffects=[]}}ss.prototype.hide=ss.prototype.hideElement,ss.prototype.show=ss.prototype.showElement;class si{constructor(t,e,s){this.p=eB.getProp(e,t.v,0,0,s)}}class sr{constructor(t,e,s){this.p=eB.getProp(e,t.v,1,0,s)}}class sa extends si{}class sn extends si{}class so extends sr{}class sh extends sr{}class sl extends si{}class sp extends si{}class sm extends si{}class sc{constructor(){this.p={}}}class sd extends ek{constructor(t,e,s){super(),this.effectElements=[],this.getValue=this.iterateDynamicProperties,this.init(t,e,s)}init(t,e,s){let i;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);let r=this.data.ef,{length:a}=r;for(let t=0;t<a;t++){switch(r[t].ty){case 0:i=new sa(r[t],e,this);break;case 1:i=new sn(r[t],e,this);break;case 2:i=new so(r[t],e,this);break;case 3:i=new sh(r[t],e,this);break;case 4:case 7:i=new sm(r[t],e,this);break;case 10:i=new sl(r[t],e,this);break;case 11:i=new sp(r[t],e,this);break;case 5:i=new su(s,e);break;default:i=new sc}this.effectElements.push(i)}}renderFrame(t){throw Error(`${this.constructor.name}: Method renderFrame is not implemented yet`)}}class su{constructor(t,e,s){let i=t.ef??[];this.effectElements=[];let{length:r}=i;for(let s=0;s<r;s++){let r=new sd(i[s],e,t);this.effectElements.push(r)}}}class sf{buildAllItems(){throw Error(`${this.constructor.name}: Method buildAllItems is not implemented`)}checkLayers(t){throw Error(`${this.constructor.name}: Method checkLayers is not implemented`)}checkMasks(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not initialized`);if(!this.data.hasMask)return!1;let t=0,{length:e}=this.data.masksProperties??[];for(;t<e;){if(this.data.masksProperties?.[t].mode!=="n"&&this.data.masksProperties?.[t].cl!==!1)return!0;t++}return!1}destroy(){}destroyBaseElement(){throw Error(`${this.constructor.name}: Method destroyBaseElement is not implemented`)}getBaseElement(){throw Error(`${this.constructor.name}: Method getBaseElement is not implemented`)}getType(){return this.type}initBaseData(t,e,s){this.globalData=e,this.comp=s,this.data=t,this.layerId=Z(),this.data.sr||(this.data.sr=1),this.effectsManager=new su(this.data,this,this.dynamicProperties)}initExpressions(){try{if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let t=tL();if(!t)return;let e=t("layer"),s=t("effects"),i=t("shape"),r=t("text"),a=t("comp");this.layerInterface=new e(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);let n=new s().createEffectsInterface(this,this.layerInterface);if(this.layerInterface.registerEffectsInterface(n),0===this.data.ty||this.data.xt){this.compInterface=new a(this);return}if(4===this.data.ty){this.layerInterface.shapeInterface=new i(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface;return}5===this.data.ty&&(this.layerInterface.textInterface=new r(this),this.layerInterface.text=this.layerInterface.textInterface)}catch(t){console.error(this.constructor.name,t)}}setBlendMode(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let t=e7(this.data.bm),e=this.baseElement??this.layerElement;if(!e)throw Error(`${this.constructor.name}: Both baseElement and layerElement are not implemented`);e.style.mixBlendMode=t}sourceRectAtTime(){throw Error(`${this.constructor.name}: Method sourceRectAtTime is not implemented`)}constructor(){this.dynamicProperties=[],this.frameDuration=1,this.itemsData=[],this.layerInterface=null,this.shapesData=[]}}class sg extends eT{constructor(t,e,s){if(super(),this.defaultVector=[0,0],this.elem=t,this.frameId=-1,this.propType=R.Transform,this.data=e,this.v=new t5,this.pre=new t5,this.appliedTransformations=0,this.initDynamicPropertyContainer(s??t),e.p&&"s"in e.p?(this.px=eB.getProp(t,e.p.x,0,0,this),this.py=eB.getProp(t,e.p.y,0,0,this),"z"in e.p&&(this.pz=eB.getProp(t,e.p.z,0,0,this))):this.p=eB.getProp(t,e.p??{k:[0,0,0]},1,0,this),"rx"in e){if(this.rx=eB.getProp(t,e.rx,0,t1,this),this.ry=eB.getProp(t,e.ry,0,t1,this),this.rz=eB.getProp(t,e.rz,0,t1,this),e.or?.k[0].ti){let{length:t}=e.or.k;for(let s=0;s<t;s++)e.or.k[s].to=null,e.or.k[s].ti=null}this.or=eB.getProp(t,e.or,1,t1,this),this.or.sh=!0}else this.r=eB.getProp(t,e.r??{k:0},0,t1,this);e.sk&&(this.sk=eB.getProp(t,e.sk,0,t1,this),this.sa=eB.getProp(t,e.sa,0,t1,this)),this.a=eB.getProp(t,e.a??{k:[0,0,0]},1,0,this),this.s=eB.getProp(t,e.s??{k:[100,100,100]},1,.01,this),e.o?this.o=eB.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,0===this.dynamicProperties.length&&this.getValue(!0)}addDynamicProperty(t){super.addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0}applyToMatrix(t){if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);this.iterateDynamicProperties(),this._mdf=!!this._mdf,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,Number(this.sa?.v)),this.r?t.rotate(-Number(this.r.v)):t.rotateZ(-Number(this.rz?.v)).rotateY(Number(this.ry?.v)).rotateX(Number(this.rx?.v)).rotateZ(-Number(this.or?.v[2])).rotateY(Number(this.or?.v[1])).rotateX(Number(this.or?.v[0])),this.data.p&&"s"in this.data.p?"z"in this.data.p?t.translate(Number(this.px?.v),Number(this.py?.v),-Number(this.pz?.v)):t.translate(Number(this.px?.v),Number(this.py?.v),0):t.translate(Number(this.p?.v[0]),Number(this.p?.v[1]),-Number(this.p?.v[2]))}autoOrient(){throw Error(`${this.constructor.name}: Method autoOrient not implemented`)}getValue(t){if(this.elem.globalData?.frameId===this.frameId)return 0;if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,Number(this.sa?.v)),this.r&&this.appliedTransformations<4?this.v.rotate(-Number(this.r.v)):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-Number(this.rz?.v)).rotateY(Number(this.ry?.v)).rotateX(Number(this.rx?.v)).rotateZ(-Number(this.or?.v[2])).rotateY(Number(this.or?.v[1])).rotateX(Number(this.or?.v[0])),this.autoOriented){let t,e,{frameRate:s}=this.elem.globalData??{frameRate:60};if(this.p?.keyframes)Number(this.p._caching?.lastFrame)+Number(this.p.offsetTime)<=this.p.keyframes[0].t?(t=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/s,0),e=this.p.getValueAtTime(Number(this.p.keyframes[0].t)/s,0)):Number(this.p._caching?.lastFrame)+Number(this.p.offsetTime)>=this.p.keyframes[this.p.keyframes.length-1].t?(t=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/s,0),e=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/s,0)):(t=this.p.pv,e=this.p.getValueAtTime((Number(this.p._caching?.lastFrame)+Number(this.p.offsetTime)-.01)/s,Number(this.p.offsetTime)));else if(this.px?.keyframes&&this.py?.keyframes){t=[0,0],e=[0,0];let{px:i,py:r}=this,{keyframes:a=[]}=i,{keyframes:n=[]}=r;Number(i._caching?.lastFrame)+Number(i.offsetTime)<=a[0].t?(t[0]=i.getValueAtTime((a[0].t+.01)/s,0),t[1]=r.getValueAtTime((n[0].t+.01)/s,0),e[0]=i.getValueAtTime(a[0].t/s,0),e[1]=r.getValueAtTime(Number(n[0]?.t)/s,0)):Number(i._caching?.lastFrame)+i.offsetTime>=a[a.length-1].t?(t[0]=i.getValueAtTime(a[a.length-1].t/s,0),t[1]=r.getValueAtTime(n[n.length-1].t/s,0),e[0]=i.getValueAtTime((a[a.length-1].t-.01)/s,0),e[1]=r.getValueAtTime((n[n.length-1].t-.01)/s,0)):(t=[i.pv,r.pv],e[0]=i.getValueAtTime((Number(i._caching?.lastFrame)+i.offsetTime-.01)/s,i.offsetTime),e[1]=r.getValueAtTime((Number(r._caching?.lastFrame)+r.offsetTime-.01)/s,r.offsetTime))}else t=e=this.defaultVector;this.v.rotate(-Math.atan2(t[1]-e[1],t[0]-e[0]))}this.data.p&&"s"in this.data.p?"z"in this.data.p?this.v.translate(Number(this.px?.v),Number(this.py?.v),-Number(this.pz?.v)):this.v.translate(Number(this.px?.v),Number(this.py?.v),0):this.p&&this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}return this.frameId=this.elem.globalData?.frameId,0}precalculateMatrix(){if(this.appliedTransformations=0,this.pre.reset(),!this.a?.effectsSequence.length){if(!this.a)throw Error(`${this.constructor.name}: Cannot read 'a' value`);if(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s?.effectsSequence.length){if(!this.s)throw Error(`${this.constructor.name}: Cannot read 's' value`);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>0||this.sa?.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,Number(this.sa?.v)),this.appliedTransformations=3}if(this.r){0===this.r.effectsSequence.length&&(this.pre.rotate(-Number(this.r.v)),this.appliedTransformations=4);return}this.rz?.effectsSequence.length||this.ry?.effectsSequence.length||this.rx?.effectsSequence.length||this.or?.effectsSequence.length||(this.pre.rotateZ(-Number(this.rz?.v)).rotateY(Number(this.ry?.v)).rotateX(Number(this.rx?.v)).rotateZ(-Number(this.or?.v[2])).rotateY(this.or?.v[1]).rotateX(this.or?.v[0]),this.appliedTransformations=4)}}}}let sy={getTransformProperty:(t,e,s)=>new sg(t,e,s)};class sb extends sf{globalToLocal(t){let e,s=t,i=[];i.push(this.finalTransform);let r=!0,{comp:a}=this;for(;r;)a?.finalTransform?(a.data?.hasMask&&i.splice(0,0,a.finalTransform),a=a.comp):r=!1;let{length:n}=i;for(let t=0;t<n;t++)e=i[t]?.mat.applyToPointArray(0,0,0),s=[s[0]-Number(e?.[0]),s[1]-Number(e?.[1]),0];return s}initTransform(){if(!this.data)throw Error(`${this.constructor.name}: LottiePlayer is not initialized`);let t=new t5;this.finalTransform={_localMatMdf:!1,_matMdf:!1,_opMdf:!1,localMat:t,localOpacity:1,mat:t,mProp:this.data.ks?sy.getTransformProperty(this,this.data.ks,this):{o:0}},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0)}renderLocalTransform(){if(!this.localTransforms)return;if(!this.finalTransform)throw Error(`${this.constructor.name}: finalTransform is not initialized`);let t=0,{length:e}=this.localTransforms;if(this.finalTransform._localMatMdf=!!this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;t<e;)this.localTransforms[t]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[t]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=Number(this.finalTransform.mProp.o?.v),this.finalTransform._opMdf=!0),t++;if(this.finalTransform._localMatMdf){let{localMat:s,mat:i}=this.finalTransform;for(this.localTransforms[0].matrix?.clone(s),t=1;t<e;t++){let e=this.localTransforms[t].matrix;e&&s.multiply(e)}s.multiply(i)}if(this.finalTransform._opMdf){let s=this.finalTransform.localOpacity;for(t=0;t<e;t++)s*=.01*this.localTransforms[t].opacity;this.finalTransform.localOpacity=s}}renderTransform(){if(!this.finalTransform)throw Error(`${this.constructor.name}: finalTransform is not initialized`);if(this.finalTransform._opMdf=!!(this.finalTransform.mProp.o?._mdf||this._isFirstFrame),this.finalTransform._matMdf=!!(this.finalTransform.mProp._mdf||this._isFirstFrame),this.hierarchy){let t=this.finalTransform.mat,e=0,{length:s}=this.hierarchy;if(!this.finalTransform._matMdf)for(;e<s;){if(this.hierarchy[e].finalTransform?.mProp._mdf){this.finalTransform._matMdf=!0;break}e++}if(this.finalTransform._matMdf){let i=this.finalTransform.mProp.v.props;for(t.cloneFromProps(i),e=0;e<s;e++)if(this.hierarchy[e].finalTransform?.mProp.v){let{v:s}=this.hierarchy[e].finalTransform?.mProp??{v:null};s&&t.multiply(s)}}}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=Number(this.finalTransform.mProp.o?.v))}searchEffectTransforms(){if(!this.renderableEffectsManager)return;let t=this.renderableEffectsManager.getEffects(B.TransformEffect);if(0===t.length)return;this.localTransforms=[],this.finalTransform&&(this.finalTransform.localMat=new t5);let{length:e}=t;for(let s=0;s<e;s++)this.localTransforms.push(t[s])}constructor(...t){super(...t),this.mHelper=new t5}}class sv extends sb{checkParenting(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.comp)throw Error(`${this.constructor.name}: comp (ElementInterface) is not implemented`);void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}initHierarchy(){this.hierarchy=[],this._isParent=!1,this.checkParenting()}setAsParent(){this._isParent=!0}setHierarchy(t){this.hierarchy=t}}class sx extends sv{addDynamicProperty(t){this.dynamicProperties.includes(t)||this.dynamicProperties.push(t)}initFrame(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1}prepareProperties(t,e){let{length:s}=this.dynamicProperties;for(let t=0;t<s;t++)(e||this._isParent&&this.dynamicProperties[t].propType===R.Transform)&&(this.dynamicProperties[t].getValue(),this.globalData&&this.dynamicProperties[t]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))}constructor(...t){super(...t),this.displayStartTime=0}}class sw extends sx{addRenderableComponent(t){this.renderableComponents.includes(t)||this.renderableComponents.push(t)}checkLayerLimits(t){this.data&&this.globalData&&(this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide()))}checkTransparency(){if(!this.finalTransform)throw Error(`${this.constructor.name}: finalTransform is not implemented`);if(0>=Number(this.finalTransform.mProp.o?.v)){!this.isTransparent&&(this.globalData?.renderConfig).hideOnTransparent&&(this.isTransparent=!0,this.hide());return}this.isTransparent&&(this.isTransparent=!1,this.show())}getLayerSize(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);return 5===this.data.ty?{h:Number(this.data.textData?.height),w:Number(this.data.textData?.width)}:{h:Number(this.data.height),w:Number(this.data.width)}}hide(){}initRenderable(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]}prepareRenderableFrame(t,e){this.checkLayerLimits(t)}removeRenderableComponent(t){this.renderableComponents.includes(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)}renderRenderable(){let{length:t}=this.renderableComponents;for(let e=0;e<t;e++)this.renderableComponents[e].renderFrame(Number(this._isFirstFrame))}show(){throw Error(`${this.constructor.name}: Method show is not implemented`)}sourceRectAtTime(){return{height:100,left:0,top:0,width:100}}constructor(...t){super(...t),this.renderableComponents=[]}}class s_ extends sw{createContainerElements(){throw Error(`${this.constructor.name}: Method createContainerElements is not implemented`)}createContent(){throw Error(`${this.constructor.name}: Method createContent is not implemented`)}createRenderableComponents(){throw Error(`${this.constructor.name}: Method createRenderableComponents is not implemented`)}destroy(){this.innerElem=null,this.destroyBaseElement()}hide(){if(this.hidden||this.isInRange&&!this.isTransparent)return;let t=this.baseElement??this.layerElement;t&&(t.style.display="none"),this.hidden=!0}initElement(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()}initRendererElement(){throw Error(`${this.constructor.name}: Method initRendererElement is not implemented`)}prepareFrame(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()}renderElement(){throw Error(`${this.constructor.name}: Method renderElement is not implemented`)}renderFrame(t){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))}renderInnerContent(){throw Error(`${this.constructor.name}: Method renderInnerContent is not implemented`)}show(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(this.isInRange||!this.isTransparent){if(!this.data.hd){let t=this.baseElement??this.layerElement;if(!t)throw Error(`${this.constructor.name}: Neither baseElement or layerElement is implemented`);t.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}}}class sE extends s_{destroy(){this.destroyElements(),this.destroyBaseElement()}destroyElements(){let{length:t}=this.layers;for(let e=0;e<t;e++)this.elements[e]?.destroy()}getElements(){return this.elements}initElement(t,e,s){if(this.initFrame(),this.initBaseData(t,e,s),this.initTransform(),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);(this.data.xt||!e.progressiveLoad)&&this.buildAllItems(),this.hide()}prepareFrame(t){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),!this.isInRange&&!this.data.xt)return;if(this.tm?._placeholder)this.renderedFrame=t/Number(this.data.sr);else{let t=this.tm?.v||0;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}let{length:e}=this.elements;this.completeLayers||this.checkLayers(this.renderedFrame);for(let t=e-1;t>=0;t--)(this.completeLayers||this.elements[t])&&(this.elements[t].prepareFrame(this.renderedFrame-this.layers[t].st),this.elements[t]?._mdf&&(this._mdf=!0))}renderInnerContent(){let{length:t}=this.layers;for(let e=0;e<t;e++)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}setElements(t){this.elements=t}constructor(...t){super(...t),this.currentFrame=0,this.elements=[],this.layers=[]}}class sC extends s_{createContainerElements(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);this.matteElement=tz("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;let t=null;if(this.data.td){this.matteMasks={};let e=tz("g");this.layerId&&(e.id=this.layerId),e.appendChild(this.layerElement),t=e,this.globalData.defs.appendChild(e)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&(this.layerElement.id=this.data.ln),this.data.cl&&this.layerElement.classList.add(this.data.cl),0===this.data.ty&&!this.data.hd){let e=tz("clipPath"),s=tz("path");s.setAttribute("d",`M0,0 L${this.data.w},0 L${this.data.w},${this.data.h} L0,${this.data.h}z`);let i=Z();if(e.id=i,e.appendChild(s),this.globalData.defs.appendChild(e),this.checkMasks()){let e=tz("g");e.setAttribute("clip-path",`url(${t7()}#${i})`),e.appendChild(this.layerElement),this.transformedElement=e,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path",`url(${t7()}#${i})`)}0!==this.data.bm&&this.setBlendMode()}createRenderableComponents(){if(!this.data)throw Error(`${this.constructor.name}: layerData is not initialized`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not initialized`);this.maskManager=new e0(this.data,this,this.globalData),this.renderableEffectsManager=new en(this),this.searchEffectTransforms()}destroyBaseElement(){this.layerElement=null,this.matteElement=null,this.maskManager?.destroy()}getBaseElement(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);return this.data.hd?null:this.baseElement??null}getMatte(t=1){let e,s,i,r;if(this.matteMasks=this.matteMasks??{},this.matteMasks[t])return this.matteMasks[t];let a=`${this.layerId}_${t}`;switch(t){case 1:case 3:{let n=tz("mask");if(n.id=a,n.setAttribute("mask-type",3===t?"luminance":"alpha"),(i=tz("use")).setAttributeNS("http://www.w3.org/1999/xlink","href",`#${this.layerId}`),n.appendChild(i),this.globalData?.defs.appendChild(n),e2.maskType||1!==t)break;n.setAttribute("mask-type","luminance"),e=Z(),s=ei.createFilter(e),this.globalData?.defs.appendChild(s),s.appendChild(ei.createAlphaToLuminanceFilter()),(r=tz("g")).appendChild(i),n.appendChild(r),r.setAttribute("filter",`url(${t7()}#${e})`)}break;case 2:{let t=tz("mask");t.id=a,t.setAttribute("mask-type","alpha");let n=tz("g");t.appendChild(n),e=Z(),s=ei.createFilter(e);let o=tz("feComponentTransfer");o.setAttribute("in","SourceGraphic"),s.appendChild(o);let h=tz("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData?.defs.appendChild(s);let l=tz("rect");l.setAttribute("width",`${Number(this.comp?.data?.w)}`),l.setAttribute("height",`${Number(this.comp?.data?.h)}`),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter",`url(${t7()}#${e})`),n.appendChild(l),(i=tz("use")).setAttributeNS("http://www.w3.org/1999/xlink","href",`#${this.layerId}`),n.appendChild(i),e2.maskType||(t.setAttribute("mask-type","luminance"),s.appendChild(ei.createAlphaToLuminanceFilter()),r=tz("g"),n.appendChild(l),this.layerElement&&r.appendChild(this.layerElement),n.appendChild(r)),this.globalData?.defs.appendChild(t)}}return this.matteMasks[t]=a,this.matteMasks[t]}initRendererElement(){this.layerElement=tz("g")}renderElement(){if(!this.finalTransform)throw Error(`${this.constructor.name}: finalTransform is not implemented`);this.finalTransform._localMatMdf&&this.transformedElement?.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement?.setAttribute("opacity",`${this.finalTransform.localOpacity}`)}setMatte(t){this.matteElement&&this.matteElement.setAttribute("mask",`url(${t7()}#${t})`)}}class sS extends sC{constructor(t,e,s){super(),this.layers=[],t.refId&&(this.assetData=e.getAssetData(t.refId)),this.assetData?.sid&&(this.assetData=e.slotManager?.getProp(this.assetData)||null),this.initElement(t,e,s),this.sourceRect={height:Number(this.assetData?.h),left:0,top:0,width:Number(this.assetData?.w)}}createContent(){let t="";this.assetData&&this.globalData?.getAssetsPath&&(t=this.globalData.getAssetsPath(this.assetData)),this.assetData&&(this.innerElem=tz("image"),this.innerElem.setAttribute("width",`${this.assetData.w}px`),this.innerElem.setAttribute("height",`${this.assetData.h}px`),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData?.renderConfig?.imagePreserveAspectRatio||""),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement?.appendChild(this.innerElem))}renderInnerContent(){}sourceRectAtTime(){return this.sourceRect}}class sM{constructor(){this.it=[],this.prevViewData=[],this.gr=tz("g")}}function sk(t,e,s,i){if(0===e)return"";let r=t.o,a=t.i,n=t.v,o,h=` M${i.applyToPointStringified(n[0][0],n[0][1])}`;for(o=1;o<e;o++)h+=` C${i.applyToPointStringified(r[o-1][0],r[o-1][1])} ${i.applyToPointStringified(a[o][0],a[o][1])} ${i.applyToPointStringified(n[o][0],n[o][1])}`;return s&&e&&(h+=` C${i.applyToPointStringified(r[o-1][0],r[o-1][1])} ${i.applyToPointStringified(a[0][0],a[0][1])} ${i.applyToPointStringified(n[0][0],n[0][1])}z`),h}let sP=new t5,sA=new t5;function sD(t,e,s){if(!e)throw Error("SVGElementsRenderer: Method renderContetTransform is missing data");(s||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",`${e.transform.op.v}`),(s||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function sT(t,e,s){if(!e)throw Error("SVGElementsRenderer: Method renderFill is missing data");let i=e.style;e.c?.v&&(e.c._mdf||s)&&i.pElem.setAttribute("fill",`rgb(${Math.floor(e.c.v[0])},${Math.floor(e.c.v[1])},${e.c.v[2]})`),(e.o?._mdf||s)&&i.pElem.setAttribute("fill-opacity",`${e.o?.v}`)}function sF(t,e,s){let i,r;if(!e)throw Error("SVGElementsRenderer: Method renderGradient is missing data");let a=e.gf,n=e.g?._hasOpacity,o=e.s?.v??[0,0],h=e.e?.v??[0,0];if(e.o?._mdf||s){let s=t.ty===N.GradientFill?"fill-opacity":"stroke-opacity";e.style?.pElem.setAttribute(s,`${e.o?.v}`)}if(e.s?._mdf||s){let s=1===t.t?"x1":"cx",i="x1"===s?"y1":"cy";a?.setAttribute(s,`${o[0]}`),a?.setAttribute(i,`${o[1]}`),n&&!e.g?._collapsable&&(e.of?.setAttribute(s,`${o[0]}`),e.of?.setAttribute(i,`${o[1]}`))}if(e.g&&(e.g._cmdf||s)){i=e.cst;let t=e.g.c,{length:s}=i;for(let e=0;e<s;e++)(r=i[e]).setAttribute("offset",`${t[4*e]}%`),r.setAttribute("stop-color",`rgb(${t[4*e+1]},${t[4*e+2]},${t[4*e+3]})`)}if(n&&e.g&&(e.g._omdf||s)){let t=e.g.o,{length:s}=i=e.g._collapsable?e.cst:e.ost;for(let a=0;a<s;a++)r=i[a],e.g._collapsable||r.setAttribute("offset",`${t[2*a]}%`),r.setAttribute("stop-opacity",`${t[2*a+1]}`)}if(1===t.t)(e.e?._mdf||s)&&(a?.setAttribute("x2",`${h[0]}`),a?.setAttribute("y2",`${h[1]}`),n&&!e.g?._collapsable&&(e.of?.setAttribute("x2",`${h[0]}`),e.of?.setAttribute("y2",`${h[1]}`)));else{let t=0;if((e.s?._mdf||e.e?._mdf||s)&&(t=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),a?.setAttribute("r",`${t}`),n&&!e.g?._collapsable&&e.of?.setAttribute("r",`${t}`)),e.e?._mdf||e.h?._mdf||e.a?._mdf||s){t||(t=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)));let s=Math.atan2(h[1]-o[1],h[0]-o[0]),i=Number(e.h?.v);i>=1?i=.99:i<=-1&&(i=-.99);let r=t*i,l=Math.cos(s+Number(e.a?.v))*r+o[0],p=Math.sin(s+Number(e.a?.v))*r+o[1];a?.setAttribute("fx",`${l}`),a?.setAttribute("fy",`${p}`),n&&!e.g?._collapsable&&(e.of?.setAttribute("fx",`${l}`),e.of?.setAttribute("fy",`${p}`))}}}function sI(t,e,s){sF(t,e,s),sN(t,e,s)}function s$(t){}function sL(t,e,s){let i,r,a,n,o,h,l;if(!e)throw Error("SVGElementsRenderer: Method renderPath is missing data");let{caches:p,lvl:m,sh:c,styles:d,transformers:u}=e,{length:f}=d;for(let e=0;e<f;e++){if(r=c?._mdf||!!s,d[e].lvl<m){for(o=sA.reset(),h=m-d[e].lvl,l=u.length-1;!r&&h>0;)r=u[l].mProps._mdf||r,h--,l--;if(r)for(h=m-d[e].lvl,l=u.length-1;h>0;)o.multiply(u[l].mProps.v),h--,l--}else o=sP;n=c?.paths;let f=n?._length||0;if(r){i="";for(let t=0;t<f;t++)a=n?.shapes[t],a?._length&&(i+=sk(a,a._length,!!a.c,o));p[e]=i}else i=p[e];d[e].d+=!0===t.hd?"":i,d[e]._mdf=r||d[e]._mdf}}function sN(t,e,s){if(!e)throw Error("SVGElementsRenderer: Method renderStroke is missing data");let{c:i,d:r,o:a,style:n,w:o}=e;r&&(r._mdf||s)&&r.dashStr&&(n?.pElem.setAttribute("stroke-dasharray",r.dashStr),n?.pElem.setAttribute("stroke-dashoffset",`${r.dashoffset[0]}`)),i&&(i._mdf||s)&&n?.pElem.setAttribute("stroke",`rgb(${Math.floor(i.v[0])},${Math.floor(i.v[1])},${Math.floor(i.v[2])})`),(a?._mdf||s)&&n?.pElem.setAttribute("stroke-opacity",`${a?.v??1}`),(o?._mdf||s)&&(n?.pElem.setAttribute("stroke-width",`${o?.v||0}`),n?.msElem&&n.msElem.setAttribute("stroke-width",`${o?.v||0}`))}class sB extends ek{constructor(t,e,s){super(),this.it=[],this.prevViewData=[],this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=eB.getProp(t,e.o,0,.01,this),this.c=eB.getProp(t,e.c,1,255,this),this.style=s}}class sR extends ek{constructor(t,e,s){super(),this.data=e,this.c=t2(F.Uint8c,4*e.p);let i=e.k.k?.[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=t2(F.Float32,i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(s),this.prop=eB.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}checkCollapsable(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k?.[0].s){let t=0,e=this.data.k.k.length;for(;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t++}}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0}comparePoints(t,e){let s=0,i=this.o.length/2;for(;s<i;){if(Math.abs(t[4*s]-t[4*e+2*s])>.01)return!1;s++}return!0}getValue(t){let e,s;if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,!this.prop._mdf&&!t||!te(this.prop.v))return 0;let i=4*this.data.p;for(let r=0;r<i;r++)e=r%4==0?100:255,s=Math.round(this.prop.v[r]*e),this.c[r]!==s&&(this.c[r]=s,this._cmdf=!t);if(this.o.length>0){let{length:e}=this.prop.v;for(let i=4*this.data.p;i<e;i++)s=i%2==0?Math.round(100*this.prop.v[i]):this.prop.v[i],this.o[i-4*this.data.p]!==s&&(this.o[i-4*this.data.p]=s,this._omdf=!t)}return this._mdf=!t,0}}class sV extends ek{constructor(t,e,s){super(),this.cst=[],this.it=[],this.ost=[],this.prevViewData=[],this.stops=[],this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,s)}initGradientData(t,e,s){this.o=eB.getProp(t,e.o,0,.01,this),this.s=eB.getProp(t,e.s,1,null,this),this.e=eB.getProp(t,e.e,1,null,this),this.h=eB.getProp(t,e.h??{k:0},0,.01,this),this.a=eB.getProp(t,e.a??{k:0},0,t1,this),this.g=new sR(t,e.g,this),this.style=s,this.stops=[],this.setGradientData(s.pElem,e),this.setGradientOpacity(e,s),this._isAnimated=!!this._isAnimated}setGradientData(t,e){let s,i=Z(),r=tz(1===e.t?"linearGradient":"radialGradient");r.id=i,r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");let a=[],n=4*(e.g?.p||1);for(let t=0;t<n;t+=4)s=tz("stop"),r.appendChild(s),a.push(s);t.setAttribute(e.ty===N.GradientFill?"fill":"stroke",`url(${t7()}#${i})`),this.gf=r,this.cst=a}setGradientOpacity(t,e){let s;if(!this.g?._hasOpacity||this.g._collapsable)return;let i=tz("mask"),r=tz("path");i.appendChild(r);let a=Z(),n=Z();i.id=n;let o=tz(1===t.t?"linearGradient":"radialGradient");o.id=a,o.setAttribute("spreadMethod","pad"),o.setAttribute("gradientUnits","userSpaceOnUse");let h=(t.g?.k.k?.[0].s?(t.g?.k.k)[0].s.length:t.g?.k.k.length)||0,{stops:l}=this;for(let e=4*(t.g?.p||1);e<h;e+=2)(s=tz("stop")).setAttribute("stop-color","rgb(255,255,255)"),o.appendChild(s),l.push(s);r.setAttribute(t.ty===N.GradientFill?"fill":"stroke",`url(${t7()}#${a})`),t.ty===N.GradientStroke&&(r.setAttribute("stroke-linecap",V[t.lc||2]),r.setAttribute("stroke-linejoin",z[t.lj||2]),1===t.lj&&r.setAttribute("stroke-miterlimit",`${Number(t.ml)}`)),this.of=o,this.ms=i,this.ost=l,this.maskId=n,e.msElem=r}}class sz extends ek{constructor(t,e,s,i){let r;super(),this.elem=t,this.frameId=-1,this.dataProps=t3(e.length),this.renderer=s,this.k=!1,this.dashStr="",this.dashArray=t2(F.Float32,e.length>0?e.length-1:0),this.dashoffset=t2(F.Float32,1),this.initDynamicPropertyContainer(i);let a=e.length||0;for(let s=0;s<a;s++)r=eB.getProp(t,e[s].v,0,0,this),this.k=r.k||this.k,this.dataProps[s]={n:e[s].n,p:r};this.k||this.getValue(!0),this._isAnimated=this.k}getValue(t){if(this.elem.globalData?.frameId===this.frameId&&!t||(this.elem.globalData?.frameId&&(this.frameId=this.elem.globalData.frameId),this.iterateDynamicProperties(),this._mdf=this._mdf||!!t,!this._mdf))return 0;let e=this.dataProps.length;this.renderer===L.SVG&&(this.dashStr="");for(let t=0;t<e;t++){if("o"===this.dataProps[t].n){this.dashoffset[0]=this.dataProps[t].p.v;continue}if(this.renderer===L.SVG){this.dashStr+=` ${this.dataProps[t].p.v}`;continue}this.dashArray[t]=this.dataProps[t].p.v}return 0}}class sO extends sV{constructor(t,e,s){super(t,e,s),this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=eB.getProp(t,e.w,0,null,this),this.d=new sz(t,e.d||[],L.SVG,this),this.initGradientData(t,e,s),this._isAnimated=!!this._isAnimated}}class sG extends ek{constructor(t,e,s){super(),this.it=[],this.prevViewData=[],this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=s}}class sq{setAsAnimated(){this._isAnimated=!0}constructor(){this.caches=[],this.it=[],this.lStr="",this.lvl=0,this.pathsData=[],this.prevViewData=[],this.sh=null,this.styledShapes=[],this.styles=[],this.tr=[],this.transformers=[],this.trNodes=[]}}class sj extends sq{constructor(t,e,s){super(),this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=s,this.lvl=e,this._isAnimated=!!s.k;let i=0,{length:r}=t;for(;i<r;){if(t[i].mProps.dynamicProperties.length>0){this._isAnimated=!0;break}i++}}}class sW extends sB{constructor(t,e,s){super(t,e,s),this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=eB.getProp(t,e.o,0,.01,this),this.w=eB.getProp(t,e.w,0,null,this),this.d=new sz(t,e.d||[],L.SVG,this),this.c=eB.getProp(t,e.c,1,255,this),this.style=s,this._isAnimated=!!this._isAnimated}}class sH{constructor(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=tz("path"),this.msElem=null}reset(){this.d="",this._mdf=!1}}class sY{constructor(t,e,s){this.transform={container:s,mProps:t,op:e},this.elements=[],this._isAnimated=!!(this.transform.mProps.dynamicProperties.length>0||this.transform.op.effectsSequence.length>0)}}class sU{constructor(t,e){this.elem=t,this.pos=e}}class sJ extends s_{addProcessedElement(t,e){let{processedElements:s}=this,i=s.length;for(;i;)if(s[--i].elem===t){s[i].pos=e;return}s.push(new sU(t,e))}addShapeToModifiers(t){let{length:e}=this.shapeModifiers;for(let s=0;s<e;s++)this.shapeModifiers[s].addShape(t)}isShapeInAnimatedModifiers(t){let e=0,{length:s}=this.shapeModifiers;for(;e<s;){if(this.shapeModifiers[e].isAnimatedWithShape(t))return!0;e++}return!1}prepareFrame(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}renderModifiers(){if(0===this.shapeModifiers.length)return;let{length:t}=this.shapes;for(let e=0;e<t;e++)this.shapes[e].sh?.reset();let{length:e}=this.shapeModifiers;for(let t=e-1;t>=0&&!this.shapeModifiers[t].processShapes(!!this._isFirstFrame);t--);}searchProcessedElement(t){let{processedElements:e}=this,{length:s}=e,i=0;for(;i<s;){if(e[i].elem===t)return e[i].pos;i++}return 0}constructor(...t){super(...t),this.processedElements=[],this.shapeModifiers=[],this.shapes=[]}}let sX={};function sZ(t,e,s){if(!sX[t])throw Error("Invalid modifier");return new sX[t]}function sK(t,e){sX[t]=sX[t]??e}class sQ extends sJ{constructor(t,e,s){super(),this.createContainerElements=sC.prototype.createContainerElements,this.createRenderableComponents=sC.prototype.createRenderableComponents,this.destroyBaseElement=sC.prototype.destroyBaseElement,this.getBaseElement=sC.prototype.getBaseElement,this.getMatte=sC.prototype.getMatte,this.identityMatrix=new t5,this.initRendererElement=sC.prototype.initRendererElement,this.renderElement=sC.prototype.renderElement,this.setMatte=sC.prototype.setMatte,this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,s),this.prevViewData=[]}addToAnimatedContents(t,e){let s=0,{length:i}=this.animatedContents;for(;s<i;){if(this.animatedContents[s].element===e)return;s++}this.animatedContents.push({data:t,element:e,fn:function(t){switch(t.ty){case N.Fill:return sT;case N.GradientFill:return sF;case N.GradientStroke:return sI;case N.Stroke:return sN;case N.Path:case N.Ellipse:case N.Rectangle:case N.PolygonStar:return sL;case N.Transform:return sD;case N.NoStyle:return s$;default:return null}}(t)})}buildExpressionInterface(){}createContent(){if(!this.layerElement)throw Error(`${this.constructor.name}: Could not access Layer`);this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()}createGroupElement(t){let e=new sM;return t.ln&&(e.gr.id=t.ln),t.cl&&e.gr.classList.add(t.cl),t.bm&&(e.gr.style.mixBlendMode=e7(t.bm)),e}createShapeElement(t,e,s){let i=4;switch(t.ty){case N.Rectangle:i=5;break;case N.Ellipse:i=6;break;case N.PolygonStar:i=7}let r=new sj(e,s,eQ.getShapeProp(this,t,i));return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(t,r),r}createStyleElement(t,e){let s=null,i=new sH(t,e),r=i.pElem;switch(t.ty){case N.Stroke:s=new sW(this,t,i);break;case N.Fill:s=new sB(this,t,i);break;case N.GradientFill:case N.GradientStroke:(s=new(t.ty===N.GradientFill?sV:sO)(this,t,i)).gf&&this.globalData?.defs.appendChild(s.gf),s.maskId&&s.ms&&s.of&&(this.globalData?.defs.appendChild(s.ms),this.globalData?.defs.appendChild(s.of),r.setAttribute("mask",`url(${t7()}#${s.maskId})`));break;case N.NoStyle:s=new sG(this,t,i)}return(t.ty===N.Stroke||t.ty===N.GradientStroke)&&(r.setAttribute("stroke-linecap",V[t.lc||2]),r.setAttribute("stroke-linejoin",z[t.lj||2]),r.setAttribute("fill-opacity","0"),1===t.lj&&t.ml&&r.setAttribute("stroke-miterlimit",`${t.ml}`)),2===t.r&&r.setAttribute("fill-rule","evenodd"),t.ln&&(r.id=t.ln),t.cl&&r.classList.add(t.cl),t.bm&&(r.style.mixBlendMode=e7(t.bm)),this.stylesList.push(i),s&&this.addToAnimatedContents(t,s),s}createTransformElement(t,e){let s=sy.getTransformProperty(this,t,this);if(!s.o)throw Error(`${this.constructor.name}: Missing required data in TransformProperty`);let i=new sY(s,s.o,e);return this.addToAnimatedContents(t,i),i}destroy(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null}filterUniqueShapes(){let t,e,{length:s}=this.shapes,i=this.stylesList.length,r=[];for(let a=0;a<i;a++){t=this.stylesList[a],e=!1,r.length=0;for(let i=0;i<s;i++)this.shapes[i].styles.includes(t)&&(r.push(this.shapes[i]),e=this.shapes[i]._isAnimated||e);r.length>1&&e&&this.setShapesAsAnimated(r)}}initSecondaryElement(){}reloadShapes(){if(!this.layerElement)throw Error(`${this.constructor.name}: Could not access layerElement`);this._isFirstFrame=!0;let{length:t}=this.itemsData;for(let e=0;e<t;e++)this.prevViewData[e]=this.itemsData[e];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes();let{length:e}=this.dynamicProperties;for(let t=0;t<e;t++)this.dynamicProperties[t].getValue();this.renderModifiers()}renderInnerContent(){this.renderModifiers();let{length:t}=this.stylesList;for(let e=0;e<t;e++)this.stylesList[e].reset();this.renderShape();for(let e=0;e<t;e++)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem?.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d=`M0 0${this.stylesList[e].d}`),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))}renderShape(){let{length:t}=this.animatedContents;for(let e=0;e<t;e++)(this._isFirstFrame||this.animatedContents[e].element._isAnimated)&&!0!==this.animatedContents[e].data&&this.animatedContents[e].fn&&this.animatedContents[e].fn?.(this.animatedContents[e].data,this.animatedContents[e].element,this._isFirstFrame)}searchShapes(t,e,s,i,r,a,n){let o,h,l=n,p=[...a],m=[],c=[],{length:d}=t;for(let a=d-1;a>=0;a--){let n=this.searchProcessedElement(t[a]);switch(n?e[a]=s[n-1]:t[a]._render=l,t[a].ty){case N.Fill:case N.Stroke:case N.GradientFill:case N.GradientStroke:case N.NoStyle:if(n){let{style:t}=e[a]??{style:null};t&&(t.closed=!1)}else e[a]=this.createStyleElement(t[a],r);if(t[a]._render&&e[a]?.style?.pElem.parentNode!==i){let{pElem:t}=e[a].style??{pElem:null};t&&i.appendChild(t)}m.push(e[a]?.style);break;case N.Group:if(n){let{length:t}=e[a]?.it??[];for(let s=0;s<t;s++){let{it:t,prevViewData:i}=e[a]??{it:null,prevViewData:null};i&&t&&(i[s]=t[s])}}else e[a]=this.createGroupElement(t[a]);if(this.searchShapes(t[a].it,e[a]?.it??[],e[a]?.prevViewData??[],e[a].gr,r+1,p,l),t[a]._render&&e[a]?.gr?.parentNode!==i){let{gr:t}=e[a];t&&i.appendChild(t)}break;case N.Transform:n||(e[a]=this.createTransformElement(t[a],i)),(o=e[a]?.transform)&&p.push(o);break;case N.Path:case N.Rectangle:case N.Ellipse:case N.PolygonStar:n||(e[a]=this.createShapeElement(t[a],p,r)),this.setElementStyles(e[a]);break;case N.Trim:case N.RoundedCorners:case N.Unknown:case N.PuckerBloat:case N.ZigZag:case N.OffsetPath:n?(h=e[a]).closed=!1:((h=sZ(t[a].ty)).init(this,t[a]),e[a]=h,this.shapeModifiers.push(h)),c.push(h);break;case N.Repeater:if(n){(h=e[a]).closed=!0,c.push(h);break}h=sZ(t[a].ty),e[a]=h,h.init(this,t,a,e),this.shapeModifiers.push(h),l=!1,c.push(h)}this.addProcessedElement(t[a],a+1)}let{length:u}=m;for(let t=0;t<u;t++){let e=m[t];e&&(e.closed=!0)}let{length:f}=c;for(let t=0;t<f;t++)c[t].closed=!0}setElementStyles(t){let{length:e}=this.stylesList;for(let s=0;s<e;s++)this.stylesList[s].closed||t.styles.push(this.stylesList[s])}setShapesAsAnimated(t){let{length:e}=t;for(let s=0;s<e;s++)t[s].setAsAnimated()}}class s0 extends sw{constructor(t,e,s){if(super(),this.clearCanvas=ss.prototype.clearCanvas,this.createContainerElements=ss.prototype.createContainerElements,this.createElements=ss.prototype.createElements,this.createRenderableComponents=ss.prototype.createRenderableComponents,this.exitLayer=ss.prototype.exitLayer,this.hideElement=ss.prototype.hideElement,this.initElement=sQ.prototype.initElement,this.initRendererElement=ss.prototype.initRendererElement,this.prepareFrame=sS.prototype.prepareFrame,this.prepareLayer=ss.prototype.prepareLayer,this.renderFrame=ss.prototype.renderFrame,this.setBlendMode=ss.prototype.setBlendMode,this.show=ss.prototype.show,this.showElement=ss.prototype.showElement,this.assetData=e.getAssetData(t.refId),!e.imageLoader)throw Error(`${this.constructor.name} imageLoader is not implemented in globalData`);this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,s)}createContent(){let t,e;if(!this.assetData)throw Error(`${this.constructor.name}: assetData is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.img.width||this.assetData.w===this.img.width&&this.assetData.h===this.img.height)return;let s=tV("canvas");s.width=Number(this.assetData.w),s.height=Number(this.assetData.h);let i=s.getContext("2d"),r=this.img.width,a=this.img.height,n=r/a,o=Number(this.assetData.w)/Number(this.assetData.h),h=this.assetData.pr||this.globalData.renderConfig?.imagePreserveAspectRatio;n>o&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?t=(e=a)*o:e=(t=r)/o,i?.drawImage(this.img,(r-t)/2,(a-e)/2,t,e,0,0,Number(this.assetData.w),Number(this.assetData.h)),this.img=s}destroy(){this.img=null}renderInnerContent(){this.canvasContext?.drawImage(this.img,0,0)}}class s1 extends sq{constructor(t,e,s,i){let r,a;switch(super(),this.styledShapes=[],this.tr=[0,0,0,0,0,0],e.ty){case N.Rectangle:r=5;break;case N.Ellipse:r=6;break;case N.PolygonStar:r=7;break;default:r=4}this.sh=eQ.getShapeProp(t,e,r);let{length:n}=s;for(let t=0;t<n;t++)s[t].closed||(a={transforms:i.addTransformSequence(s[t].transforms),trNodes:[]},this.styledShapes.push(a),s[t].elements.push(a))}}class s2{constructor(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}addTransformSequence(t){let{length:e}=t,s="_";for(let i=0;i<e;i++)s+=`${t[i].transform.key}_`;let i=this.sequences[s];return i||(i={_mdf:!1,finalTransform:new t5,transforms:[...t]},this.sequences[s]=i,this.sequenceList.push(i)),i}getNewKey(){return this.transform_key_count++,`_${this.transform_key_count}`}processSequence(t,e){let s=0,{length:i}=t.transforms??[],r=e;if(!e)for(;s<i;){if(t.transforms?.[s].transform.mProps._mdf){r=!0;break}s++}if(r)for(t.finalTransform?.reset(),s=i-1;s>=0;s-=1){let{v:e}=t.transforms?.[s].transform.mProps??{v:null};e&&t.finalTransform?.multiply(e)}t._mdf=r}processSequences(t){let{length:e}=this.sequenceList;for(let s=0;s<e;s++)this.processSequence(this.sequenceList[s],t)}}class s3 extends sJ{constructor(t,e,s){super(),this.clearCanvas=ss.prototype.clearCanvas,this.createContainerElements=ss.prototype.createContainerElements,this.createRenderableComponents=ss.prototype.createRenderableComponents,this.dashResetter=[],this.exitLayer=ss.prototype.exitLayer,this.hide=ss.prototype.hide,this.initRendererElement=ss.prototype.initRendererElement,this.prepareLayer=ss.prototype.prepareLayer,this.renderFrame=ss.prototype.renderFrame,this.setBlendMode=ss.prototype.setBlendMode,this.show=ss.prototype.show,this.transformHelper={_opMdf:!1,opacity:1},this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new s2,this.initElement(t,e,s)}addTransformToStyleList(t){let{length:e}=this.stylesList;for(let s=0;s<e;s++)this.stylesList[s].closed||this.stylesList[s].transforms.push(t)}closeStyles(t){let{length:e}=t;for(let s=0;s<e;s++)t[s].closed=!0}createContent(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])}createGroupElement(t){return{it:[],prevViewData:[]}}createShapeElement(t){let e=new s1(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e}createStyleElement(t,e){let s={closed:!0===t.hd,data:t,elements:[],preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],type:t.ty},i={};switch(t.ty){case N.Fill:case N.Stroke:i.c=eB.getProp(this,t.c,1,255,this),i.c.k||(s.co=`rgb(${Math.floor(i.c.v[0])},${Math.floor(i.c.v[1])},${Math.floor(i.c.v[2])})`);break;case N.GradientFill:case N.GradientStroke:i.s=eB.getProp(this,t.s,1,null,this),i.e=eB.getProp(this,t.e,1,null,this),i.h=eB.getProp(this,t.h??{k:0},0,.01,this),i.a=eB.getProp(this,t.a??{k:0},0,t1,this),t.g&&(i.g=new sR(this,t.g,this))}return i.o=eB.getProp(this,t.o,0,.01,this),t.ty===N.Stroke||t.ty===N.GradientStroke?(s.lc=V[t.lc||2],s.lj=z[t.lj||2],1===t.lj&&(s.ml=t.ml),i.w=eB.getProp(this,t.w,0,null,this),i.w.k||(s.wi=i.w.v),t.d&&"object"==typeof t.d&&(i.d=new sz(this,t.d,L.Canvas,this),i.d.k||(s.da=i.d.dashArray,s.do=i.d.dashoffset[0]))):s.r=2===t.r?"evenodd":"nonzero",this.stylesList.push(s),i.style=s,i}createTransformElement(t){return{transform:{_opMdf:!1,key:this.transformsManager.getNewKey(),mProps:sy.getTransformProperty(this,t,this),op:eB.getProp(this,t.o,0,.01,this),opacity:1}}}destroy(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0}drawLayer(){let t;if(!this.globalData)throw Error(`${this.constructor.name} globalData is not implemented`);if(!this.globalData.renderer)throw Error(`${this.constructor.name} renderer is not implemented`);let{length:e}=this.stylesList,{renderer:s}=this.globalData,i=this.globalData.canvasContext;for(let r=0;r<e;r++){let{co:e,coOp:a,da:n,data:o,elements:h,grd:l,lc:p,lj:m,ml:c,preTransforms:d,type:u,wi:f}=t=this.stylesList[r],g=u===N.Stroke||u===N.GradientStroke;if(g&&0===f||!o._shouldRender||0===a||0===this.globalData.currentGlobalAlpha)continue;s.save(),g?(s.ctxStrokeStyle(u===N.Stroke?e:l),s.ctxLineWidth(f||0),p&&s.ctxLineCap(p),m&&s.ctxLineJoin(m),s.ctxMiterLimit(c||0)):s.ctxFillStyle(u===N.Fill?e:l),s.ctxOpacity(a),u!==N.Stroke&&u!==N.GradientStroke&&i?.beginPath(),s.ctxTransform(d.finalTransform.props);let{length:y}=h;for(let e=0;e<y;e++){(u===N.Stroke||u===N.GradientStroke)&&(i?.beginPath(),i&&n&&(i.setLineDash(n),i.lineDashOffset=t.do||0));let r=h[e].trNodes,{length:a}=r;for(let t=0;t<a;t++)"m"===r[t].t?i?.moveTo(r[t].p[0],r[t].p[1]):"c"===r[t].t?i?.bezierCurveTo(r[t].pts[0],r[t].pts[1],r[t].pts[2],r[t].pts[3],r[t].pts[4],r[t].pts[5]):i?.closePath();g&&(s.ctxStroke(),n&&i?.setLineDash(this.dashResetter))}g||this.globalData.renderer.ctxFill(t.r),s.restore()}}reloadShapes(){this._isFirstFrame=!0;let{length:t}=this.itemsData;for(let e=0;e<t;e++)this.prevViewData[e]=this.itemsData[e];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]);let{length:e}=this.dynamicProperties;for(let t=0;t<e;t++)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)}removeTransformFromStyleList(){let{length:t}=this.stylesList;for(let e=0;e<t;e++)this.stylesList[e].closed||this.stylesList[e].transforms.pop()}renderFill(t,e,s){let i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co=`rgb(${Math.floor(e.c.v[0])},${Math.floor(e.c.v[1])},${Math.floor(e.c.v[2])})`),(e.o._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*s.opacity)}renderGradientFill(t,e,s){let i;if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);let r=e.style;if(!r.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){let s=this.globalData.canvasContext,a=e.s.v,n=e.e.v;if(1===t.t)i=s?.createLinearGradient(a[0],a[1],n[0],n[1]);else{let t=Math.sqrt(Math.pow(a[0]-n[0],2)+Math.pow(a[1]-n[1],2)),r=Math.atan2(n[1]-a[1],n[0]-a[0]),o=e.h.v;o>=1?o=.99:o<=-1&&(o=-.99);let h=t*o,l=Math.cos(r+e.a.v)*h+a[0],p=Math.sin(r+e.a.v)*h+a[1];i=s?.createRadialGradient(l,p,0,a[0],a[1],t)}let o=t.g.p,h=e.g.c,l=1;for(let t=0;t<o;t++)e.g._hasOpacity&&e.g._collapsable&&(l=e.g.o[2*t+1]),i?.addColorStop(h[4*t]/100,`rgba(${h[4*t+1]},${h[4*t+2]},${h[4*t+3]},${l})`);r.grd=i}r.coOp=e.o.v*s.opacity}renderInnerContent(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)}renderPath(t,e){if(!0===t.hd||!t._shouldRender||!e.sh)return;let{length:s}=e.styledShapes;for(let t=0;t<s;t++)this.renderStyledShape(e.styledShapes[t],e.sh)}renderShape(t,e,s,i){let r,a=e.length-1;r=t;for(let i=a;i>=0;i--)switch(e[i].ty){case N.Transform:r=s[i].transform,this.renderShapeTransform(t,r);break;case N.Path:case N.Ellipse:case N.Rectangle:case N.PolygonStar:this.renderPath(e[i],s[i]);break;case N.Fill:this.renderFill(e[i],s[i],r);break;case N.Stroke:this.renderStroke(e[i],s[i],r);break;case N.GradientFill:case N.GradientStroke:this.renderGradientFill(e[i],s[i],r);break;case N.Group:this.renderShape(r,e[i].it??[],s[i].it);case N.Trim:}i&&this.drawLayer()}renderShapeTransform(t,e){(t._opMdf||e.op?._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op?.v||1,e._opMdf=!0)}renderStroke(t,e,s){let i=e.style,{c:r,d:a,o:n,w:o}=e;a&&(a._mdf||this._isFirstFrame)&&(i.da=a.dashArray,i.do=a.dashoffset[0]),(r._mdf||this._isFirstFrame)&&(i.co=`rgb(${Math.floor(r.v[0])},${Math.floor(r.v[1])},${Math.floor(r.v[2])})`),(n._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=n.v*s.opacity),(o._mdf||this._isFirstFrame)&&(i.wi=o.v)}renderStyledShape(t,e){let s,i,r;if(!this._isFirstFrame&&!e._mdf&&!t.transforms._mdf)return;let{transforms:a,trNodes:n}=t,{paths:o}=e,h=o?._length||0;n.length=0;let l=a?.finalTransform;for(r=0;r<h;r++){let t=o?.shapes[r];if(t?.v){for(s=1,i=t._length;s<i;s++)1===s&&n.push({p:l.applyToPointArray(t.v[0][0],t.v[0][1],0),t:"m"}),n.push({pts:l.applyToTriplePoints(t.o[s-1],t.i[s],t.v[s]),t:"c"});1===i&&n.push({p:l.applyToPointArray(t.v[0][0],t.v[0][1],0),t:"m"}),t.c&&i&&n.push({pts:l.applyToTriplePoints(t.o[s-1],t.i[0],t.v[0]),t:"c"},{t:"z"})}}t.trNodes=n}searchShapes(t,e,s,i,r){let a,n,o=i,h=t.length-1,l=[],p=[],m=[...r];for(let i=h;i>=0;i--){let r=this.searchProcessedElement(t[i]);switch(r?e[i]=s[r-1]:t[i]._shouldRender=o,t[i].ty){case N.Fill:case N.Stroke:case N.GradientFill:case N.GradientStroke:r?e[i].style.closed=!1:e[i]=this.createStyleElement(t[i],m),l.push(e[i].style);break;case N.Group:if(r){let{length:t}=e[i].it;for(let s=0;s<t;s++)e[i].prevViewData[s]=e[i].it[s]}else e[i]=this.createGroupElement(t[i]);this.searchShapes(t[i].it??[],e[i].it,e[i].prevViewData,o,m);break;case N.Transform:r||(n=this.createTransformElement(t[i]),e[i]=n),m.push(e[i]),this.addTransformToStyleList(e[i]);break;case N.Path:case N.Rectangle:case N.Ellipse:case N.PolygonStar:r||(e[i]=this.createShapeElement(t[i]));break;case N.Trim:case N.RoundedCorners:case N.PuckerBloat:case N.ZigZag:case N.OffsetPath:r?(a=e[i]).closed=!1:((a=sZ(t[i].ty)).init(this,t[i]),e[i]=a,this.shapeModifiers.push(a)),p.push(a);break;case N.Repeater:r?(a=e[i]).closed=!0:(a=sZ(t[i].ty),e[i]=a,a.init(this,t,i,e),this.shapeModifiers.push(a),o=!1),p.push(a)}this.addProcessedElement(t[i],i+1)}this.removeTransformFromStyleList(),this.closeStyles(l);let{length:c}=p;for(let t=0;t<c;t++)p[t].closed=!0}}class s5 extends sw{constructor(t,e,s){super(),this.initElement=sQ.prototype.initElement,this.prepareFrame=sS.prototype.prepareFrame,this.initElement(t,e,s)}renderInnerContent(){if(!this.globalData)throw Error(`${this.constructor.name}: globalData it not implemented`);if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) it not implemented`);if(!this.globalData.renderer)throw Error(`${this.constructor.name}: globalData.renderer it not implemented`);this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw||0,this.data.sh||0)}}class s4{constructor(t,e,s,i,r,a){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=r,this.p=a,this._mdf={fc:!!i,m:!0,o:!0,p:!0,sc:!!s,sw:!!e}}update(t,e,s,i,r,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;let n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==s&&(this.sc=s,this._mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,n=!0),this.m!==r&&(this.m=r,this._mdf.m=!0,n=!0),Array.isArray(a)&&a.length>0&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13])&&(this.p=a,this._mdf.p=!0,n=!0),n}}class s6 extends eT{constructor(t,e){super(),this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=eB.getProp(t,e.s??{a:0,k:0},0,0,this),"e"in e?this.e=eB.getProp(t,e.e,0,0,this):this.e={v:100},this.o=eB.getProp(t,e.o??{a:0,k:0},0,0,this),this.xe=eB.getProp(t,e.xe??{a:0,k:0},0,0,this),this.ne=eB.getProp(t,e.ne??{a:0,k:0},0,0,this),this.sm=eB.getProp(t,e.sm??{a:0,k:100},0,0,this),this.a=eB.getProp(t,e.a,0,.01,this),0===this.dynamicProperties.length&&this.getValue()}getMult(t,e){let s=t;this._currentTextLength!==this.elem.textProperty?.currentData.l.length&&this.getValue();let i=0,r=0,a=1,n=1;this.ne.v>0?i=this.ne.v/100:r=-this.ne.v/100,this.xe.v>0?a=1-this.xe.v/100:n=1+this.xe.v/100;let o=eS(i,r,a,n).get,h=0,l=this.finalS,p=this.finalE;switch(this.data.sh){case 2:h=o(h=p===l?+(s>=p):Math.max(0,Math.min(.5/(p-l)+(s-l)/(p-l),1)));break;case 3:h=o(h=p===l?s>=p?0:1:1-Math.max(0,Math.min(.5/(p-l)+(s-l)/(p-l),1)));break;case 4:p===l?h=0:(h=Math.max(0,Math.min(.5/(p-l)+(s-l)/(p-l),1)))<.5?h*=2:h=1-2*(h-.5),h=o(h);break;case 5:if(p===l)h=0;else{let t=p-l,e=-t/2+(s=Math.min(Math.max(0,s+.5-l),p-l)),i=t/2;h=Math.sqrt(1-e*e/(i*i))}h=o(h);break;case 6:h=o(h=p===l?0:(1+Math.cos(Math.PI+2*Math.PI*(s=Math.min(Math.max(0,s+.5-l),p-l))/(p-l)))/2);break;default:s>=Math.floor(l)&&(h=s-l<0?Math.max(0,Math.min(Math.min(p,1)-(l-s),1)):Math.max(0,Math.min(p-s,1))),h=o(h)}if(100!==this.sm.v){let t=.01*this.sm.v;0===t&&(t=1e-8);let e=.5-.5*t;h<e?h=0:(h=(h-e)/t)>1&&(h=1)}return h*Number(this.a.v)}getTextSelectorProp(t,e,s){throw Error("Method not implemented")}getValue(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.e.v=this._currentTextLength);let e=2===this.data.r?1:100/this.data.totalChars,s=Number(this.o.v)/e,i=Number(this.s?.v)/e+s,r=Number(this.e.v)/e+s;if(i>r){let t=i;i=r,r=t}return this.finalS=i,this.finalE=r,0}}class s9{constructor(t,e,s){let i={propType:!1},r=e?.a;this.a={a:r?.a?eB.getProp(t,r.a,1,0,s):i,fb:r?.fb?eB.getProp(t,r.fb,0,.01,s):i,fc:r?.fc?eB.getProp(t,r.fc,1,0,s):i,fh:r?.fh?eB.getProp(t,r.fh,0,0,s):i,fs:r?.fs?eB.getProp(t,r.fs,0,.01,s):i,o:r?.o?eB.getProp(t,r.o,0,.01,s):i,p:r?.p?eB.getProp(t,r.p,1,0,s):i,r:r?.r?eB.getProp(t,r.r,0,t1,s):i,rx:r?.rx?eB.getProp(t,r.rx,0,t1,s):i,ry:r?.ry?eB.getProp(t,r.ry,0,t1,s):i,s:r?.s?eB.getProp(t,r.s,1,.01,s):i,sa:r?.sa?eB.getProp(t,r.sa,0,t1,s):i,sc:r?.sc?eB.getProp(t,r.sc,1,0,s):i,sk:r?.sk?eB.getProp(t,r.sk,0,t1,s):i,sw:r?.sw?eB.getProp(t,r.sw,0,0,s):i,t:r?.t?eB.getProp(t,r.t,0,0,s):i},this.s=new s6(t,e?.s),this.s.t=e?.s?.t}}let s8=(t,e,s)=>{let i=Math.max(t,e,s),r=Math.min(t,e,s),a=i-r,n=0;switch(i){case r:n=0;break;case t:n=(e-s+6*(e<s)*a)/(6*a);break;case e:n=(s-t+2*a)/(6*a);break;case s:n=(t-e+4*a)/(6*a)}return[n,0===i?0:a/i,i/255]},s7=(t,e,s)=>{let i=0,r=0,a=0,n=Math.floor(6*t),o=6*t-n,h=s*(1-e),l=s*(1-o*e),p=s*(1-(1-o)*e);switch(n%6){case 0:i=s,r=p,a=h;break;case 1:i=l,r=s,a=h;break;case 2:i=h,r=s,a=p;break;case 3:i=h,r=l,a=s;break;case 4:i=p,r=h,a=s;break;case 5:i=s,r=h,a=l}return[i,r,a]},it=(t,e)=>{let s=s8(255*t[0],255*t[1],255*t[2]);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),s7(s[0],s[1],s[2])},ie=(t,e)=>{let s=s8(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&s[0]++,s7(s[0],s[1],s[2])},is=(t,e)=>{let s=s8(255*t[0],255*t[1],255*t[2]);return s[1]+=e,s[1]>1?s[1]=1:s[1]<=0&&(s[1]=0),s7(s[0],s[1],s[2])};class ii extends ek{constructor(t,e,s){super(),this.defaultPropsArray=[],this.mHelper=new t5,this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=t3(Number(this._textData.a?.length)),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}getMeasures(t,e){let s,i,r,a;if(this.lettersChangedFlag=!!e,!this._mdf&&!this._isFirstFrame&&!e&&(!this._hasMaskedPath||!this._pathData.m?._mdf))return;this._isFirstFrame=!1;let n=this._moreOptions.alignment.v,o=this._animatorsData,h=this._textData,l=this.mHelper,p=this._renderType,m=this.renderedLetters.length,c,d,u,f,g=t.l,y,b=0,v,x=0,w,_=0,E=0,C,S=null,M,k=0,P=0,A,D,T;if(this._hasMaskedPath){if(T=this._pathData.m,!this._pathData.n||this._pathData._mdf){let t,e=T?.v??[];for(this._pathData.r?.v&&(e=e.reverse()),y={segments:[],tLength:0},f=Number(e._length)-1,P=0,u=0;u<f;u++)t=eu(e.v[u],e.v[u+1],[e.o[u][0]-e.v[u][0],e.o[u][1]-e.v[u][1]],[e.i[u+1][0]-e.v[u+1][0],e.i[u+1][1]-e.v[u+1][1]]),y.tLength+=t.segmentLength,y.segments.push(t),P+=t.segmentLength;u=f,T.v.c&&(t=eu(e.v[u],e.v[0],[e.o[u][0]-e.v[u][0],e.o[u][1]-e.v[u][1]],[e.i[0][0]-e.v[0][0],e.i[0][1]-e.v[0][1]]),y.tLength+=t.segmentLength,y.segments.push(t),P+=t.segmentLength),this._pathData.pi=y}if(y=this._pathData.pi,b=this._pathData.f.v,E=0,_=1,x=0,M=y.segments,b<0&&T.v.c)for(y.tLength<Math.abs(b)&&(b=-Math.abs(b)%y.tLength),E=M.length-1,_=(S=M[E].points).length-1;b<0;)b+=S[_]?.partialLength,(_-=1)<0&&(E-=1,_=(S=M[E].points).length-1);C=(S=M[E].points)[_-1],k=(v=S[_]).partialLength}f=g.length||0,c=0,d=0;let F=1.2*(t.finalSize||0)*.714,I=!0,$=o.length,N,B=-1,R,V,z,O=b,G=E,q=_,j=-1,W,H=[0,0,0],Y=0,U=[0,0,0],J,X,Z,K,Q="",tt=this.defaultPropsArray,te;if(2===t.j||1===t.j){let e=0,a=0,n=2===t.j?-.5:-1,l=0,p=!0;for(u=0;u<f;u++){if(g[u].n){for(e&&(e+=a);l<u;)g[l].animatorJustifyOffset=e,l++;e=0,p=!0;continue}for(r=0;r<$;r++)s=o[r].a,s?.t.propType&&(p&&2===t.j&&(a+=Number(s.t.v)*n),i=o[r].s,Array.isArray(N=i?.getMult(g[u].anIndexes[r],h.a?.[r].s?.totalChars))?e+=Number(s.t.v)*N[0]*n:e+=Number(s.t.v)*Number(N)*n);p=!1}for(e&&(e+=a);l<u;)g[l].animatorJustifyOffset=e,l++}for(u=0;u<f;u++){if(l.reset(),W=1,g[u].n)c=0,d+=t.yOffset||0,d+=+!!I,b=O,I=!1,this._hasMaskedPath&&(E=G||0,_=q||0,C=(S=M?.[E]?.points??[])[_-1],k=(v=S[_]).partialLength,x=0),Q="",K="",X="",te="",tt=this.defaultPropsArray;else{if(this._hasMaskedPath){if(j!==g[u].line){switch(t.j){case 1:b+=P-t.lineWidths[g[u].line];break;case 2:b+=(P-t.lineWidths[g[u].line])/2}j=g[u].line||0}B!==g[u].ind&&(g[B]&&(b+=Number(g[B].extra)),b+=(g[u].an||0)/2,B=g[u].ind||0),b+=n[0]*(g[u].an||0)*.005;let e=0;for(r=0;r<$;r++){if(s=o[r].a,s?.p.propType){if(i=o[r].s,!(N=i?.getMult(g[u].anIndexes[r],h.a?.[r].s?.totalChars)))continue;Array.isArray(s.p.v)&&(Array.isArray(N)?e+=s.p.v[0]*N[0]:e+=s.p.v[0]*N)}if(s?.a.propType){if((i=o[r].s,N=i?.getMult(Number(g[u].anIndexes[r]),h.a?.[r].s?.totalChars))&&Array.isArray(s.a.v)){if(Array.isArray(N)){e+=s.a.v[0]*N[0];continue}e+=s.a.v[0]*N}}}for(w=!0,this._pathData.a?.v&&(b=.5*(g[0].an||0)+(P-Number(this._pathData.f?.v)-.5*(g[0].an||0)-.5*g[g.length-1].an)*B/(f-1)+Number(this._pathData.f?.v));w;)x+k>=b+e||!S?(A=(b+e-x)/(v?.partialLength||0),V=Number(C?.point[0])+(Number(v?.point[0])-Number(C?.point[0]))*A,z=Number(C?.point[1])+(Number(v?.point[1])-Number(C?.point[1]))*A,l.translate(-n[0]*Number(g[u].an)*.005,-(.01*(n[1]*F))),w=!1):S.length>0&&(x+=Number(v?.partialLength),++_>=S.length&&(_=0,E++,M?.[E]?S=M[E].points:T?.v.c?(_=0,E=0,S=M?.[E].points??[]):(x-=Number(v?.partialLength),S=null)),S&&(C=v,k=(v=S[_]).partialLength));R=g[u].an/2-g[u].add,l.translate(-R,0,0)}else R=g[u].an/2-g[u].add,l.translate(-R,0,0),l.translate(-n[0]*g[u].an*.005,-n[1]*F*.01,0);for(r=0;r<$;r++)if(s=o[r].a,s?.t.propType&&(i=o[r].s,N=i?.getMult(Number(g[u].anIndexes[r]),h.a?.[r].s?.totalChars),0!==c||0!==t.j)){if(this._hasMaskedPath){Array.isArray(N)?b+=Number(s.t.v)*N[0]:b+=Number(s.t.v)*Number(N);continue}if(Array.isArray(N)){c+=Number(s.t.v)*N[0];continue}c+=Number(s.t.v)*Number(N)}for(t.strokeWidthAnim&&(Y=t.sw||0),t.strokeColorAnim&&(H=t.sc?[Number(t.sc[0]),Number(t.sc[1]),Number(t.sc[2])]:[0,0,0]),t.fillColorAnim&&t.fc&&(U=[Number(t.fc[0]),Number(t.fc[1]),Number(t.fc[2])]),r=0;r<$;r++)if(s=o[r].a,s?.a.propType){if(i=o[r].s,!(N=i?.getMult(g[u].anIndexes[r],h.a?.[r].s?.totalChars))||!Array.isArray(s.a.v))continue;if(Array.isArray(N)){l.translate(-s.a.v[0]*N[0],-s.a.v[1]*N[1],s.a.v[2]*N[2]);continue}l.translate(-s.a.v[0]*N,-s.a.v[1]*N,s.a.v[2]*N)}for(r=0;r<$;r++)if(s=o[r].a,s?.s.propType){if(i=o[r].s,!(N=i?.getMult(g[u].anIndexes[r],h.a?.[r].s?.totalChars))||!Array.isArray(s.s.v))continue;if(Array.isArray(N)){l.scale(1+(s.s.v[0]-1)*N[0],1+(s.s.v[1]-1)*N[1],1);continue}l.scale(1+(s.s.v[0]-1)*N,1+(s.s.v[1]-1)*N,1)}for(r=0;r<$;r++)if(s=o[r].a,i=o[r].s,N=i?.getMult(g[u].anIndexes[r],h.a?.[r].s?.totalChars)){if(s?.sk.propType&&(Array.isArray(N)?l.skewFromAxis(-Number(s.sk.v)*N[0],Number(s.sa.v)*N[1]):l.skewFromAxis(-Number(s.sk.v)*N,Number(s.sa.v)*N)),s?.r.propType&&(Array.isArray(N)?l.rotateZ(-Number(s.r.v)*N[2]):l.rotateZ(-Number(s.r.v)*N)),s?.ry.propType&&(Array.isArray(N)?l.rotateY(Number(s.ry.v)*N[1]):l.rotateY(Number(s.ry.v)*N)),s?.rx.propType&&(Array.isArray(N)?l.rotateX(Number(s.rx.v)*N[0]):l.rotateX(Number(s.rx.v)*N)),s?.o.propType&&(Array.isArray(N)?W+=(Number(s.o.v)*N[0]-W)*N[0]:W+=(Number(s.o.v)*N-W)*N),t.strokeWidthAnim&&s?.sw.propType&&(Array.isArray(N)?Y+=Number(s.sw.v)*N[0]:Y+=Number(s.sw.v)*N),t.strokeColorAnim&&s?.sc.propType&&Array.isArray(s.sc.v))for(J=0;J<3;J++)Array.isArray(N)?H[J]+=(s.sc.v[J]-H[J])*N[0]:H[J]+=(s.sc.v[J]-H[J])*N;if(t.fillColorAnim&&t.fc){if(s?.fc.propType)for(J=0;J<3;J++)Array.isArray(s.fc.v)&&(Array.isArray(N)?U[J]+=(s.fc.v[J]-U[J])*N[0]:U[J]+=(s.fc.v[J]-U[J])*N);s?.fh.propType&&(U=Array.isArray(N)?ie(U,Number(s.fh.v)*N[0]):ie(U,Number(s.fh.v)*N)),s?.fs.propType&&(U=Array.isArray(N)?is(U,Number(s.fs.v)*N[0]):is(U,Number(s.fs.v)*N)),s?.fb.propType&&(U=Array.isArray(N)?it(U,Number(s.fb.v)*N[0]):it(U,Number(s.fb.v)*N))}}for(r=0;r<$;r++)if(s=o[r].a,s?.p.propType){if(i=o[r].s,!(N=i?.getMult(g[u].anIndexes[r],h.a?.[r].s?.totalChars))||!Array.isArray(s.p.v))continue;this._hasMaskedPath?Array.isArray(N)?l.translate(0,s.p.v[1]*N[0],-s.p.v[2]*N[1]):l.translate(0,s.p.v[1]*N,-s.p.v[2]*N):Array.isArray(N)?l.translate(s.p.v[0]*N[0],s.p.v[1]*N[1],-s.p.v[2]*N[2]):l.translate(s.p.v[0]*N,s.p.v[1]*N,-s.p.v[2]*N)}if(t.strokeWidthAnim&&(X=Y<0?0:Y),t.strokeColorAnim&&(Z=`rgb(${Math.round(255*H[0])},${Math.round(255*H[1])},${Math.round(255*H[2])})`),t.fillColorAnim&&t.fc&&(K=`rgb(${Math.round(255*U[0])},${Math.round(255*U[1])},${Math.round(255*U[2])})`),this._hasMaskedPath){if(l.translate(0,-Number(t.ls)),l.translate(0,n[1]*F*.01+d,0),this._pathData.p?.v){let t=180*Math.atan(D=(Number(v?.point[1])-Number(C?.point[1]))/(Number(v?.point[0])-Number(C?.point[0])))/Math.PI;Number(v?.point[0])<Number(C?.point[0])&&(t+=180),l.rotate(-t*Math.PI/180)}l.translate(Number(V),Number(z),0),b-=n[0]*g[u].an*.005,g[u+1]&&B!==g[u+1].ind&&(b+=g[u].an/2,b+=.001*t.tr*Number(t.finalSize))}else{switch(l.translate(c,d,0),t.ps&&l.translate(t.ps[0],t.ps[1]+Number(t.ascent),0),t.j){case 1:l.translate(g[u].animatorJustifyOffset+Number(t.justifyOffset)+(Number(t.boxWidth)-Number(t.lineWidths[g[u].line])),0,0);break;case 2:l.translate(g[u].animatorJustifyOffset+Number(t.justifyOffset)+(Number(t.boxWidth)-Number(t.lineWidths[g[u].line]))/2,0,0)}l.translate(0,-Number(t.ls)),l.translate(R,0,0),l.translate(n[0]*Number(g[u].an)*.005,n[1]*F*.01,0),c+=g[u].l+.001*t.tr*Number(t.finalSize)}p===L.HTML?Q=l.toCSS():p===L.SVG?Q=l.to2dCSS():tt=[l.props[0],l.props[1],l.props[2],l.props[3],l.props[4],l.props[5],l.props[6],l.props[7],l.props[8],l.props[9],l.props[10],l.props[11],l.props[12],l.props[13],l.props[14],l.props[15]],te=W}if(m<=u){a=new s4(Number(te),Number(X),Z,K,Q,tt),this.renderedLetters.push(a),m++,this.lettersChangedFlag=!0;continue}a=this.renderedLetters[u],this.lettersChangedFlag=a.update(Number(te),Number(X),Z,K,Q,tt)||this.lettersChangedFlag}}getValue(){return this._elem.globalData?.frameId===this._frameId||(this._frameId=this._elem.globalData?.frameId??0,this.iterateDynamicProperties()),0}searchProperties(t){let{length:e}=this._textData.a??[],{getProp:s}=eB;for(let t=0;t<e;t++)this._animatorsData[t]=new s9(this._elem,this._textData.a?.[t],this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:s(this._elem,this._textData.p.a,0,0,this),f:s(this._elem,this._textData.p.f,0,0,this),l:s(this._elem,this._textData.p.l,0,0,this),m:this._elem.maskManager?.getMaskProperty(this._textData.p.m),p:s(this._elem,this._textData.p.p,0,0,this),r:s(this._elem,this._textData.p.r,0,0,this)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=s(this._elem,this._textData.m?.a,1,0,this)}}function ir(t){let e=t.fStyle?t.fStyle.split(" "):[],s="normal",i="normal",{length:r}=e;for(let t=0;t<r;t++)switch(e[t].toLowerCase()){case"italic":i="italic";break;case"bold":s="700";break;case"black":s="900";break;case"medium":s="500";break;case"regular":case"normal":s="400";break;case"light":case"thin":s="200"}return{style:i,weight:t.fWeight||s}}let ia=[2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403],io={data:{shapes:[]},shapes:[],size:0,w:0},ih=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function il(t){let e=ip(t);return e>=127462&&e<=127487}function ip(t){let e=0,s=t.charCodeAt(0);if(s>=55296&&s<=56319){let i=t.charCodeAt(1);i>=56320&&i<=57343&&(e=(s-55296)*1024+i-56320+65536)}return e}function im(t,e){if(J())return;let s=tV("span");s.setAttribute("aria-hidden","true"),s.style.fontFamily=e;let i=tV("span");i.innerText="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(i),document.body.appendChild(s);let r=i.offsetWidth;return i.style.fontFamily=`${function(t){let e=t.split(","),{length:s}=e,i=[];for(let t=0;t<s;t++)"sans-serif"!==e[t]&&"monospace"!==e[t]&&i.push(e[t]);return i.join(",")}(t)}, ${e}`,{node:i,parent:s,w:r}}class ic{constructor(){this.chars=null,this.fonts=[],this.isLoaded=!1,this.typekitLoaded=0,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)}addChars(t){if(!t)return;this.chars=this.chars??[];let{length:e}=t,s,{length:i}=this.chars,r;for(let a=0;a<e;a++){for(s=0,r=!1;s<i;)this.chars[s].style===t[a].style&&this.chars[s].fFamily===t[a].fFamily&&this.chars[s].ch===t[a].ch&&(r=!0),s++;!r&&(this.chars.push(t[a]),i++)}}addFonts(t,e){if(!t){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=t.list;return}let{length:s}=t.list;if(!J()){this.isLoaded=!0;for(let e=0;e<s;e++)t.list[e].helper=this.createHelper(t.list[e]),t.list[e].cache={};this.fonts=t.list;return}let i=s;for(let s=0;s<i;s++){let r=!0,a;if(t.list[s].loaded=!1,t.list[s].monoCase=im(t.list[s].fFamily,"monospace"),t.list[s].sansCase=im(t.list[s].fFamily,"sans-serif"),t.list[s].fPath){if(J()||"p"!==t.list[s].fOrigin&&3!==t.list[s].origin)if(J()||"g"!==t.list[s].fOrigin&&1!==t.list[s].origin){if(!J()&&("t"===t.list[s].fOrigin||2===t.list[s].origin)){let{length:i}=a=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');for(s=0;s<i;s++)t.list[s].fPath===a[s].src&&(r=!1);if(r){let i=tV("link");i.setAttribute("f-forigin",t.list[s].fOrigin),i.setAttribute("f-origin",`${t.list[s].origin}`),i.rel="stylesheet",i.href=t.list[s].fPath,e?.appendChild(i)}}}else{let{length:e}=a=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');for(s=0;s<e;s++)a[s].href.includes(t.list[s].fPath)&&(r=!1);if(r&&!J()){let e=tV("link");e.setAttribute("f-forigin",t.list[s].fOrigin),e.setAttribute("f-origin",`${t.list[s].origin}`),e.type="text/css",e.rel="stylesheet",e.href=t.list[s].fPath,document.body.appendChild(e)}}else if((a=document.querySelectorAll(`style[f-forigin="p"][f-family="${t.list[s].fFamily}"], style[f-origin="3"][f-family="${t.list[s].fFamily}"]`)).length>0&&(r=!1),r){let i=tV("style");i.setAttribute("f-forigin",t.list[s].fOrigin),i.setAttribute("f-origin",`${t.list[s].origin}`),i.setAttribute("f-family",t.list[s].fFamily),i.innerText=`@font-face {font-family: ${t.list[s].fFamily}; font-style: normal; src: url('${t.list[s].fPath}');}`,e?.appendChild(i)}}else t.list[s].loaded=!0,i-=1;t.list[s].helper=this.createHelper(t.list[s],e),t.list[s].cache={},this.fonts.push(t.list[s])}0===i?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}getCharData(t,e,s){let i=0,{length:r}=this.chars??[];for(;i<r;){if(this.chars?.[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i++}return("string"!=typeof t||13===t.charCodeAt(0))&&t||this._warned||(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,s)),io}getFontByName(t){let e=0,{length:s}=this.fonts;for(;e<s;){if(this.fonts[e].fName===t)return this.fonts[e];e++}return this.fonts[0]}measureText(t,e,s){let i=this.getFontByName(e);if(i.cache&&!i.cache[t]){let e=i.helper;if(" "===t){let s=Number(e?.measureText(`|${t}|`)),r=Number(e?.measureText("||"));i.cache[t]=(s-r)/100}else i.cache[t]=Number(e?.measureText(t))/100}return Number(i.cache?.[t])*Number(s)}checkLoadedFonts(){let t,e,s=this.fonts.length;for(let i=0;i<s;i++){if(this.fonts[i].loaded){s-=1;continue}if("n"===this.fonts[i].fOrigin||0===this.fonts[i].origin){this.fonts[i].loaded=!0;continue}if(t=this.fonts[i].monoCase?.node,e=this.fonts[i].monoCase?.w||0,t?.offsetWidth===e?(t=this.fonts[i].sansCase?.node,e=this.fonts[i].sansCase?.w||0,t?.offsetWidth!==e&&(s-=1,this.fonts[i].loaded=!0)):(s-=1,this.fonts[i].loaded=!0),!this.fonts[i].loaded)continue;let{monoCase:r,sansCase:a}=this.fonts[i];a&&this.fonts[i].sansCase?.parent.parentNode?.removeChild(a.parent),r&&this.fonts[i].monoCase?.parent.parentNode?.removeChild(r.parent)}if(0!==s&&Date.now()-this.initTime<5e3)return void setTimeout(this.checkLoadedFontsBinded,20);setTimeout(this.setIsLoadedBinded,10)}createHelper(t,e){let s;if(J())return;let i=e?L.SVG:L.Canvas,r=ir(t);if(i===L.SVG){let i=tz("text");i.style.fontSize="100px",i.setAttribute("font-family",t.fFamily),i.setAttribute("font-style",r.style),i.setAttribute("font-weight",r.weight),i.textContent="1",t.fClass?(i.style.fontFamily="inherit",i.classList.add(t.fClass)):i.style.fontFamily=t.fFamily,e?.appendChild(i),s=i}else{let e=new OffscreenCanvas(500,500).getContext("2d");e&&(e.font=`${r.style} ${r.weight} 100px ${t.fFamily}`,s=e)}return{measureText:t=>i===L.SVG?(s.textContent=t,s.getComputedTextLength()):s.measureText(t).width}}setIsLoaded(){this.isLoaded=!0}}class id extends eT{constructor(t,e){super(),this.defaultBoxWidth=[0,0],this._frameId=-999999,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d?.sid&&(e.d=t.globalData?.slotManager?.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={__complete:!1,ascent:0,boxWidth:this.defaultBoxWidth,f:"",fc:"",fillColorAnim:!1,finalLineHeight:0,finalSize:0,finalText:[],fStyle:"",fWeight:"",justifyOffset:0,l:[],lh:0,lineWidths:[],ls:0,of:"",ps:null,s:0,sc:"",strokeColorAnim:!1,strokeWidthAnim:!1,sw:0,t:0,tr:0,yOffset:0};let s=this.data.d?.k[0].s;s&&this.copyData(this.currentData,s),this.searchProperty()||this.completeTextData(this.currentData)}addEffect(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)}buildFinalText(t){let e=[],s=0,i=t.length,r,a,n,o=!1,h;for(;s<i;){var l;(n=o,o=!1,r=t.charCodeAt(s),h=t.charAt(s),ia.includes(r))?n=!0:r>=55296&&r<=56319?function(t,e){let s=e,i=ip(t.slice(s,2));if(127988!==i)return!1;let r=0;for(s+=2;r<5;){if((i=ip(t.slice(s,2)))<917601||i>917626)return!1;r++,s+=2}return 917631===ip(t.slice(s,2))}(t,s)?h=t.slice(s,14):(a=t.charCodeAt(s+1))>=56320&&a<=57343&&(function(t,e){let s=t.toString(16)+e.toString(16);return ih.includes(s)}(r,a)?(h=t.slice(s,2),n=!0):h=il((l=t.slice(s,4)).slice(0,2))&&il(l.slice(2,2))?t.slice(s,4):t.slice(s,2)):r>56319?65039===r&&(n=!0):8205===r&&(n=!0,o=!0),n?e[e.length-1]+=h:e.push(h),s+=h.length}return e}calculateExpression(t){throw Error(`${this.constructor.name}: Method calculateExpression is not implemented`)}canResizeFont(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)}completeTextData(t){let e,s,i,r,a,n,o;t.__complete=!0;let{fontManager:h}=this.elem.globalData??{};if(!h)throw Error(`${this.constructor.name}: FontManager not loaded to globalData`);let{canResize:l,data:p,minimumFontSize:m}=this,c=[],d,u,f=0,g,y=p.m?.g,b=0,v=0,x=0,w=[],_,E=0,C=h.getFontByName(t.f),S=ir(C);t.fWeight=S.weight,t.fStyle=S.style,t.finalSize=t.s,t.finalText=this.buildFinalText(`${t.t}`),d=t.finalText.length||0,t.finalLineHeight=t.lh;let M=t.tr/1e3*t.finalSize;if(t.sz){let r,a,n=!0,[o,p]=t.sz;for(;n;){a=this.buildFinalText(`${t.t}`),r=0,_=0,d=a.length,M=t.tr/1e3*t.finalSize;let c=-1;for(let n=0;n<d;n++)i=a[n].charCodeAt(0),u=!1," "===a[n]?c=n:(13===i||3===i)&&(_=0,u=!0,r+=t.finalLineHeight||1.2*t.finalSize),h.chars?(e=h.getCharData(a[n],C.fStyle,C.fFamily),s=u?0:e.w*t.finalSize/100):s=h.measureText(a[n],t.f,t.finalSize)||0,_+s>o&&" "!==a[n]?(-1===c?d++:n=c,r+=t.finalLineHeight||1.2*t.finalSize,a.splice(n,+(c===n),"\r"),c=-1,_=0):(_+=s,_+=M);r+=Number(C.ascent)*t.finalSize/100,l&&t.finalSize>m&&p<r?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=a,d=t.finalText.length,n=!1)}}_=-M;let k=0,P;for(let r=0;r<d;r++)if(u=!1,13===(i=(P=t.finalText[r]).charCodeAt(0))||3===i?(k=0,w.push(_),E=_>E?_:E,_=-2*M,g="",u=!0,x++):g=P,h.chars?(e=h.getCharData(P,C.fStyle,h.getFontByName(t.f).fFamily),s=u?0:e.w*t.finalSize/100):s=h.measureText(g,t.f,t.finalSize)," "===P?k+=s+M:(_+=s+M+k,k=0),c.push({add:b,an:s,animatorJustifyOffset:0,anIndexes:[],l:s,line:x,n:u,val:g}),2===y){if(b+=s,""===g||" "===g||r===d-1){for((""===g||" "===g)&&(b-=s);v<=r;)c[v].an=b,c[v].ind=f,c[v].extra=s,v++;f++,b=0}}else if(3===y){if(b+=s,""===g||r===d-1){for(""===g&&(b-=s);v<=r;)c[v].an=b,c[v].ind=f,c[v].extra=s,v++;b=0,f++}}else c[f].ind=f,c[f].extra=0,f++;if(t.l=c,E=_>E?_:E,w.push(_),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=E,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=w;let A=p.a,{length:D}=A??[],T=[];for(let e=0;e<D;e++){if(!(r=A?.[e]))continue;r.a?.sc&&(t.strokeColorAnim=!0),r.a?.sw&&(t.strokeWidthAnim=!0),(r.a?.fc||r.a?.fh||r.a?.fs||r.a?.fb)&&(t.fillColorAnim=!0),o=0,n=Number(r.s?.b);for(let t=0;t<d;t++)(a=c[t]).anIndexes[e]=o,(1===n&&""!==a.val||2===n&&""!==a.val&&" "!==a.val||3===n&&(a.n||" "===a.val||t===d-1)||4===n&&(a.n||t===d-1))&&(1===Number(r.s?.rn)&&T.push(o),o++);let s=p.a?.[e].s;s&&(s.totalChars=o);let i=-1,h;if(r.s?.rn===1)for(let t=0;t<d;t++)i!==Number((a=c[t]).anIndexes[e])&&(i=a.anIndexes[e],h=T.splice(Math.floor(Math.random()*T.length),1)[0]),h&&(a.anIndexes[e]=h)}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=Number(C.ascent)*t.finalSize/100}copyData(t,e){let s=Object.keys(e),{length:i}=s;for(let r=0;r<i;r++)Object.hasOwn(e,s[r])&&(t[s[r]]=e[s[r]]);return t}getExpressionValue(t,e){throw Error(`${this.constructor.name}: Method getExpressionValue is not implemented`)}getKeyframeValue(){let t=this.data.d?.k??[],e=Number(this.elem.comp?.renderedFrame),s=0,i=t.length;for(;s<=i-1&&!(s===i-1||Number(t[s+1].t)>e);)s++;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d?.k[this.keysIndex].s}getValue(t){if((this.elem.globalData?.frameId===this.frameId||0===this.effectsSequence.length)&&!t)return 0;let e=this.data.d?.k[this.keysIndex].s.t;e&&(this.currentData.t=e);let s=this.currentData,i=this.keysIndex;if(this.lock)return this.setCurrentData(this.currentData),0;this.lock=!0,this._mdf=!1;let{length:r}=this.effectsSequence,a=t??this.data.d?.k[this.keysIndex].s;for(let t=0;t<r;t++)a=i===this.keysIndex?this.effectsSequence[t](this.currentData,a?.t):this.effectsSequence[t](a,a?.t);return s!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData?.frameId,0}recalculate(t){if(!this.data.d)throw Error(`${this.constructor.name}: data.k (TextData -> DocumentData) is not implemented`);let e=this.data.d.k[t].s;e&&(e.__complete=!1),this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)}searchExpressions(){throw Error(`${this.constructor.name}: Method searchExpressions is not implemented`)}searchKeyframes(){if(!this.data.d)throw Error(`${this.constructor.name}: data.k (TextData -> DocumentData) is not implemented`);return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf}searchProperty(){return this.searchKeyframes()}setCurrentData(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0}setMinimumFontSize(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)}updateDocumentData(t,e){if(!this.data.d)throw Error(`${this.constructor.name}: data.k (TextData -> DocumentData) is not implemented`);let s=e;s=s??this.keysIndex;let i=this.copyData({},this.data.d.k[s].s);i=this.copyData(i,t),this.data.d.k[s].s=i,this.recalculate(s),this.setCurrentData(i),this.elem.addDynamicProperty(this)}}class iu extends s_{applyTextPropertiesToMatrix(t,e,s,i,r){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+Number(t.ascent),0),e.translate(0,-Number(t.ls),0),t.j){case 1:e.translate(Number(t.justifyOffset)+(Number(t.boxWidth)-Number(t.lineWidths[s])),0,0);break;case 2:e.translate(Number(t.justifyOffset)+(Number(t.boxWidth)-Number(t.lineWidths[s]))/2,0,0)}e.translate(i,r,0)}buildColor(t){return`rgb(${Math.round(255*t[0])},${Math.round(255*t[1])},${Math.round(255*t[2])})`}buildNewText(){throw Error(`${this.constructor.name}: Method buildNewText is not implemented`)}canResizeFont(t){this.textProperty?.canResizeFont(t)}createPathShape(t,e){let s,i="",{length:r}=e;for(let a=0;a<r;a++)e[a].ty===N.Path&&e[a].ks?.k&&(i+=sk(s=e[a].ks?.k,s.i.length,!0,t));return i}initElement(t,e,s){if(!t.t)throw Error(`${this.constructor.name}: data.t (LottieLayer -> TextData) can't be undefined`);this.emptyProp=new s4,this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textProperty=new id(this,t.t),this.textAnimator=new ii(t.t,this.renderType||L.SVG,this),this.initTransform(),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)}prepareFrame(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}setMinimumFontSize(t){this.textProperty?.setMinimumFontSize(t)}updateDocumentData(t,e){this.textProperty?.updateDocumentData(t,e)}validateText(){(this.textProperty?._mdf||this.textProperty?._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)}}let ig="rgba(0,0,0,0)";class iy extends iu{constructor(t,e,s){super(),this.clearCanvas=ss.prototype.clearCanvas,this.createContainerElements=ss.prototype.createContainerElements,this.createContent=ss.prototype.createContent,this.createElements=ss.prototype.createElements,this.createRenderableComponents=ss.prototype.createRenderableComponents,this.destroy=ss.prototype.destroy,this.exitLayer=ss.prototype.exitLayer,this.hide=ss.prototype.hide,this.hideElement=ss.prototype.hideElement,this.initRendererElement=ss.prototype.initRendererElement,this.prepareLayer=ss.prototype.prepareLayer,this.renderedLetters=[],this.renderFrame=ss.prototype.renderFrame,this.renderLocalTransform=ss.prototype.renderLocalTransform,this.renderRenderable=ss.prototype.renderRenderable,this.searchEffectTransforms=ss.prototype.searchEffectTransforms,this.setBlendMode=ss.prototype.setBlendMode,this.show=ss.prototype.show,this.showElement=ss.prototype.showElement,this.tHelper=tV("canvas").getContext("2d"),this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType=L.Canvas,this.values={fill:ig,fValue:"",stroke:ig,sWidth:0},this.initElement(t,e,s)}buildNewText(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.globalData.fontManager)throw Error(`${this.constructor.name}: fontManager is not implemented in globalData`);if(!this.textProperty)throw Error(`${this.constructor.name}: textProperty is not implemented`);let t=this.textProperty.currentData;this.renderedLetters=t3(t.l.length||0);let e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;let s=!1;t.sc&&(s=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=Number(t.sw));let i=this.globalData.fontManager.getFontByName(t.f),r=t.l,a=this.mHelper;this.stroke=s,this.values.fValue=`${t.finalSize}px ${this.globalData.fontManager.getFontByName(t.f).fFamily}`;let{singleShape:n}=this.data,o=.001*t.tr*Number(t.finalSize),h,l=0,p=0,m=!0,c=0,{length:d}=t.finalText;for(let e=0;e<d;e++){let s=this.globalData.fontManager.getCharData(t.finalText[e],i.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily).data??{};a.reset(),n&&r[e].n&&(l=-o,p+=Number(t.yOffset),p+=+!!m,m=!1);let d=s.shapes?.[0].it??[];a.scale(Number(t.finalSize)/100,Number(t.finalSize)/100),n&&this.applyTextPropertiesToMatrix(t,a,r[e].line,l,p);let{length:u}=d,f=t3(u-1),g=0;for(let t=0;t<u;t++){if(d[t].ty!==N.Path)continue;let{length:e}=(d[t].ks?.k).i,s=d[t].ks?.k,i=[];for(h=1;h<e;h++)1===h&&i.push(a.applyToX(s.v[0][0],s.v[0][1],0),a.applyToY(s.v[0][0],s.v[0][1],0)),i.push(a.applyToX(s.o[h-1][0],s.o[h-1][1],0),a.applyToY(s.o[h-1][0],s.o[h-1][1],0),a.applyToX(s.i[h][0],s.i[h][1],0),a.applyToY(s.i[h][0],s.i[h][1],0),a.applyToX(s.v[h][0],s.v[h][1],0),a.applyToY(s.v[h][0],s.v[h][1],0));i.push(a.applyToX(s.o[h-1][0],s.o[h-1][1],0),a.applyToY(s.o[h-1][0],s.o[h-1][1],0),a.applyToX(s.i[0][0],s.i[0][1],0),a.applyToY(s.i[0][0],s.i[0][1],0),a.applyToX(s.v[0][0],s.v[0][1],0),a.applyToY(s.v[0][0],s.v[0][1],0)),f[g]=i,g++}n&&(l+=r[e].l,l+=o),this.textSpans[c]?this.textSpans[c].elem=f:this.textSpans[c]={elem:f},c++}}renderInnerContent(){let t,e,s,i;if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.textAnimator)throw Error(`${this.constructor.name}: textAnimator is not implemented`);if(!this.textProperty)throw Error(`${this.constructor.name}: textProperty is not implemented`);if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer?.ctxLineCap("butt"),this.globalData.renderer?.ctxLineJoin("miter"),this.globalData.renderer?.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);let{renderedLetters:r}=this.textAnimator,a=this.textProperty.currentData.l,n,o=null,h=null,l=null,p,m,c=this.globalData.renderer,{length:d}=a;for(let u=0;u<d;u++)if(!a[u].n){if(n=r[u],c.save(),c.ctxTransform(n.p),c.ctxOpacity(n.o),this.fill){n.fc?o!==n.fc&&(c.ctxFillStyle(n.fc),o=n.fc):o!==this.values.fill&&(o=this.values.fill,c.ctxFillStyle(this.values.fill));let{length:e}=p=this.textSpans[u].elem??[];for(this.globalData.canvasContext?.beginPath(),t=0;t<e;t++){let{length:e}=m=p[t]||[];for(this.globalData.canvasContext?.moveTo(m[0],m[1]),s=2;s<e;s+=6)this.globalData.canvasContext?.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5])}this.globalData.canvasContext?.closePath(),c.ctxFill()}if(this.stroke){for(n.sw?l!==n.sw&&(l=n.sw,c.ctxLineWidth(n.sw)):l!==this.values.sWidth&&(l=this.values.sWidth,c.ctxLineWidth(this.values.sWidth)),n.sc?h!==n.sc&&(h=n.sc,c.ctxStrokeStyle(n.sc)):h!==this.values.stroke&&(h=this.values.stroke,c.ctxStrokeStyle(this.values.stroke)),e=(p=this.textSpans[u].elem??[]).length,this.globalData.canvasContext?.beginPath(),t=0;t<e;t++)for(i=(m=p[t]).length,this.globalData.canvasContext?.moveTo(m[0],m[1]),s=2;s<i;s+=6)this.globalData.canvasContext?.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5]);this.globalData.canvasContext?.closePath(),c.ctxStroke()}this.globalData.renderer?.restore()}}}class ib extends sw{constructor(t,e,s){super(),this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId)??null,this.initBaseData(t,e,s),this._isPlaying=!1,this._canPlay=!1;let i=this.globalData?.getAssetsPath(this.assetData);this.audio=this.globalData?.audioController?.createAudio(i),this._currentTime=0,this.globalData?.audioController?.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=t.tm?eB.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this.lv=eB.getProp(this,t.au?.lv??{k:[100]},1,.01,this)}getBaseElement(){return null}hide(){this.audio.pause(),this._isPlaying=!1}initExpressions(){}pause(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1}prepareFrame(t){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder?this._currentTime=t/Number(this.data.sr):this._currentTime=this.tm.v,this._volume=Number(this.lv.v[0]);let e=this._volume*Number(this._volumeMultiplier);this._previousVolume!==e&&(this._previousVolume=e,this.audio.volume(e))}renderFrame(t){if(this.isInRange&&this._canPlay){if(!this._isPlaying){this.audio.play(),this.audio.seek(this._currentTime/Number(this.globalData?.frameRate)),this._isPlaying=!0;return}(!this.audio.playing()||Math.abs(this._currentTime/Number(this.globalData?.frameRate)-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/Number(this.globalData?.frameRate))}}resume(){this._canPlay=!0}setRate(t){this.audio.rate(t)}show(){}sourceRectAtTime(){return null}volume(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)}}class iv extends sw{constructor(t,e,s){if(super(),this.assetData=null,this.initFrame(),this.initRenderable(),t.refId&&(this.assetData=e.getAssetData(t.refId)),!e.imageLoader)throw Error(`${this.constructor.name}: imageLoader is not implemented in globalData`);this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,s)}getBaseElement(){return null}getFootageData(){return this.footageData}initExpressions(){let t=tL();if(!t)return;let e=t("footage");this.layerInterface=new e(this)}prepareFrame(){}renderFrame(){}}class ix{constructor(t){this.animationData=t}getProp(t){let{sid:e}=t;return e&&this.animationData.slots?.[e]?Object.assign(t,this.animationData.slots[e].p):t}}class iw extends sx{addPendingElement(t){this.pendingElements.push(t)}buildAllItems(){let{length:t}=this.layers;for(let e=0;e<t;e++)this.buildItem(e);this.checkPendingElements()}buildElementParenting(t,e,s=[]){let{elements:i,layers:r}=this,{length:a}=r,n=0;for(;n<a;){if(r[n].ind!==e){n++;continue}if(!i[n]||!0===i[n]){this.buildItem(n),this.addPendingElement(t),n++;continue}if(s.push(i[n]),i[n].setAsParent(),void 0===r[n].parent){t.setHierarchy(s),n++;continue}this.buildElementParenting(t,r[n].parent,s),n++}}buildItem(t){throw Error(`${this.constructor.name}: Method buildItem not yet implemented`)}checkLayers(t){this.completeLayers=!0;let{length:e}=this.layers;for(let s=e-1;s>=0;s--)!this.elements[s]&&this.layers[s].ip-this.layers[s].st<=Number(t)-this.layers[s].st&&this.layers[s].op-this.layers[s].st>Number(t)-this.layers[s].st&&this.buildItem(s),this.completeLayers=!!this.elements[s]&&this.completeLayers;this.checkPendingElements()}checkPendingElements(){throw Error(`${this.constructor.name}: Method checkPendingElements not yet implemented`)}createAudio(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new ib(t,this.globalData,this)}createCamera(t){throw Error("You're using a 3d camera. Try the html renderer.")}createComp(t,e,s,i){throw Error(`${this.constructor.name}: Method createComp not yet implemented`)}createFootage(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iv(t,this.globalData,this)}createImage(t){throw Error(`${this.constructor.name}: Method createImage is not implemented`)}createItem(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)}}createNull(t){throw Error(`${this.constructor.name}: Method createNull not implemented`)}createShape(t){throw Error(`${this.constructor.name}: Method createShape not implemented`)}createSolid(t){throw Error(`${this.constructor.name}: Method createSolid not implemented`)}createText(t){throw Error(`${this.constructor.name}: Method createText not implemented`)}getElementById(t){let{length:e}=this.elements;for(let s=0;s<e;s++)if(this.elements[s].data.ind===t)return this.elements[s];return null}getElementByPath(t){let e,s=t.shift();if("number"==typeof s)e=this.elements[s];else{let{length:t}=this.elements;for(let i=0;i<t;i++)if(this.elements[i].data.nm===s){e=this.elements[i];break}}return 0===t.length?e:e?.getElementByPath(t)}includeLayers(t){this.completeLayers=!1;let{length:e}=t,{length:s}=this.layers;for(let i=0;i<e;i++){let e=0;for(;e<s;){if(this.layers[e].id===t[i].id){this.layers[e]=t[i];break}e++}}}initItems(){this.globalData?.progressiveLoad||this.buildAllItems()}prepareFrame(t){throw Error(`${this.constructor.name}: Method prepareFrame not yet implemented`)}searchExtraCompositions(t){let{length:e}=t;for(let s=0;s<e;s++)if(t[s].xt){let e=this.createComp(t[s]);e.initExpressions(),this.globalData?.projectInterface.registerComposition(e)}}setProjectInterface(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);t&&(this.globalData.projectInterface=t)}setupGlobalData(t,e){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);this.globalData.fontManager=new ic,this.globalData.slotManager=new ix(t),this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr||60,this.globalData.nm=t.nm,this.globalData.compSize={h:Number(t.h),w:Number(t.w)}}constructor(...t){super(...t),this.currentFrame=0,this.elements=[],this.layers=[],this.pendingElements=[],this.renderedFrame=-1}}class i_ extends sx{constructor(t,e,s){super(),this.initFrame(),this.initBaseData(t,e,s),this.initTransform(),this.initHierarchy()}getBaseElement(){return null}prepareFrame(t){this.prepareProperties(t,!0)}renderFrame(t){return null}}class iE extends sS{constructor(t,e,s){super(t,e,s),this.initElement(t,e,s)}createContent(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let t=tz("rect");t.width.baseVal.value=Number(this.data.sw),t.height.baseVal.value=Number(this.data.sh),this.data.sc&&t.setAttribute("fill",this.data.sc),this.layerElement?.appendChild(t)}}let iC={shapes:[]};class iS extends iu{constructor(t,e,s){super(),this.createContainerElements=sC.prototype.createContainerElements,this.createRenderableComponents=sC.prototype.createRenderableComponents,this.destroyBaseElement=sC.prototype.destroyBaseElement,this.getBaseElement=sC.prototype.getBaseElement,this.getMatte=sC.prototype.getMatte,this.initRendererElement=sC.prototype.initRendererElement,this.renderedLetters=[],this.renderElement=sC.prototype.renderElement,this.setMatte=sC.prototype.setMatte,this.textSpans=[],this.renderType=L.SVG,this.initElement(t,e,s)}buildNewText(){let t,e;if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);if(!this.textProperty?.currentData)throw Error(`${this.constructor.name}: DocumentData is not implemented`);this.addDynamicProperty(this);let s=this.textProperty.currentData;this.renderedLetters=t3(s.l.length||0),s.fc?this.layerElement.setAttribute("fill",this.buildColor(s.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),s.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(s.sc)),this.layerElement.setAttribute("stroke-width",`${s.sw||0}`)),this.layerElement.setAttribute("font-size",`${s.finalSize||0}`);let i=this.globalData.fontManager?.getFontByName(s.f);if(i?.fClass)this.layerElement.classList.add(i.fClass);else{i?.fFamily&&this.layerElement.setAttribute("font-family",i.fFamily);let{fWeight:t}=s,{fStyle:e}=s;this.layerElement.setAttribute("font-style",e),this.layerElement.setAttribute("font-weight",t)}this.layerElement.setAttribute("aria-label",`${s.t}`);let r=s.l,a=!!this.globalData.fontManager?.chars;e=r.length;let n=null,o=this.mHelper,{singleShape:h}=this.data,l=0,p=0,m=!0,c=.001*s.tr*Number(s.finalSize);if(!h||a||s.sz){let d,u=this.textSpans.length;for(t=0;t<e;t++){if(this.textSpans[t]||(this.textSpans[t]={childSpan:null,glyph:null,span:null}),!a||!h||0===t){if(n=u>t?this.textSpans[t]?.span:tz(a?"g":"text"),u<=t){if(n?.setAttribute("stroke-linecap","butt"),n?.setAttribute("stroke-linejoin","round"),n?.setAttribute("stroke-miterlimit","4"),this.textSpans[t]&&(this.textSpans[t].span=n),a){let e=tz("g");n?.appendChild(e),this.textSpans[t]&&(this.textSpans[t].childSpan=e)}this.textSpans[t]&&(this.textSpans[t].span=n),n&&this.layerElement.appendChild(n)}n&&(n.style.display="inherit")}if(o.reset(),h&&(r[t].n&&(l=-c,p+=Number(s.yOffset),p+=+!!m,m=!1),this.applyTextPropertiesToMatrix(s,o,r[t].line,l,p),l+=r[t].l||0,l+=c),a){let e;if(d=this.globalData.fontManager?.getCharData(s.finalText[t],i?.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily),d?.t===1)e=new ik(d.data,this.globalData,this);else{let t=iC;d?.data?.shapes&&(t=this.buildShapeData(d.data,Number(s.finalSize))),e=new sQ(t,this.globalData,this)}if(this.textSpans[t]){let{glyph:s}=this.textSpans[t];s&&(s.layerElement&&this.textSpans[t]?.childSpan?.removeChild(s.layerElement),s.destroy()),this.textSpans[t].glyph=e}e._debug=!0,e.prepareFrame(0),e.renderFrame(),e.layerElement&&this.textSpans[t]?.childSpan?.appendChild(e.layerElement),d?.t===1&&this.textSpans[t]?.childSpan?.setAttribute("transform",`scale(${Number(s.finalSize)/100},${Number(s.finalSize)/100})`);continue}h&&n?.setAttribute("transform",`translate(${o.props[12]},${o.props[13]})`),n&&(n.textContent=r[t].val),n?.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}h&&n?.setAttribute("d","")}else{let i,r=this.textContainer;switch(s.j){case 1:i="end";break;case 2:i="middle";break;default:i="start"}r?.setAttribute("text-anchor",i),r?.setAttribute("letter-spacing",`${c}`);let a=this.buildTextContents(s.finalText);for(t=0,e=a.length,p=s.ps?s.ps[1]+Number(s.ascent):0;t<e;t++)(n=this.textSpans[t]?.span??tz("tspan")).textContent=a[t],n.setAttribute("x","0"),n.setAttribute("y",`${p}`),n.style.display="inherit",r?.appendChild(n),this.textSpans[t]||(this.textSpans[t]={glyph:null,span:null}),this.textSpans[t].span=n,p+=Number(s.finalLineHeight);r&&this.layerElement.appendChild(r)}let d=this.textSpans[t]?.span;if(d)for(;t<this.textSpans.length;)d.style.display="none",t++;this._sizeChanged=!0}buildShapeData(t,e){if(t.shapes.length>0){let s=t.shapes[0];if(s.it){let t=s.it[s.it.length-1];t.s&&(t.s.k[0]=e,t.s.k[1]=e)}}return t}buildTextContents(t){let e=0,{length:s}=t,i=[],r="";for(;e<s;)"\r"===t[e]||"\x03"===t[e]?(i.push(r),r=""):r+=t[e],e++;return i.push(r),i}createContent(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);this.data.singleShape&&!this.globalData.fontManager?.chars&&(this.textContainer=tz("text"))}getValue(){let t;if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let{length:e}=this.textSpans;this.renderedFrame=this.comp?.renderedFrame;for(let s=0;s<e;s++)(t=this.textSpans[s].glyph)&&(t.prepareFrame(Number(this.comp?.renderedFrame)-Number(this.data.st)),t._mdf&&(this._mdf=!0))}renderInnerContent(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(this.validateText(),!this.data.singleShape||this._mdf){if(!this.textProperty)throw Error(`${this.constructor.name}: textProperty is not initialized`);if(this.textAnimator?.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator?.lettersChangedFlag){let t,e,s;this._sizeChanged=!0;let i=this.textAnimator?.renderedLetters,r=this.textProperty.currentData.l,{length:a}=r;for(let n=0;n<a;n++)!r[n].n&&(t=i?.[n],e=this.textSpans[n].span,(s=this.textSpans[n].glyph)&&s.renderFrame(),t?._mdf.m&&e?.setAttribute("transform",t.m),t?._mdf.o&&e?.setAttribute("opacity",`${t.o??1}`),t?._mdf.sw&&e?.setAttribute("stroke-width",`${t.sw||0}`),t?._mdf.sc&&e?.setAttribute("stroke",t.sc),t?._mdf.fc&&e?.setAttribute("fill",t.fc))}}}sourceRectAtTime(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.comp)throw Error(`${this.constructor.name}: comp (ElementInterface) is not implemented`);if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);if(this.prepareFrame(Number(this.comp.renderedFrame)-Number(this.data.st)),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;let t=this.layerElement.getBBox();return this.bbox={height:t.height,left:t.x,top:t.y,width:t.width},this.bbox}return null}}class iM extends iw{appendElementInPos(t,e){let s=t.getBaseElement();if(!s)return;let i=0,r;for(;i<e;)this.elements[i]&&!0!==this.elements[i]&&this.elements[i].getBaseElement()&&(r=this.elements[i].getBaseElement()),i++;r?this.layerElement?.insertBefore(s,r):this.layerElement?.appendChild(s)}buildItem(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData it not implemented`);let{elements:e,globalData:s,layers:i}=this;if(e[t]||99===i[t].ty)return;e[t]=!0;let r=this.createItem(i[t]);if(e[t]=r,t$()&&(0===i[t].ty&&s.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),i[t].tt){let s="tp"in i[t]?this.findIndexByInd(i[t].tp):t-1;if(-1===s)return;if(!e[s]||!0===e[s]){this.buildItem(s),this.addPendingElement(r);return}let a=e[s].getMatte(i[t].tt);r.setMatte(a)}}checkPendingElements(){for(;this.pendingElements.length>0;){let t=this.pendingElements.pop();if(t?.checkParenting(),t?.data.tt){let e=0,{length:s}=this.elements;for(;e<s;){if(this.elements[e]!==t){e++;continue}let s="tp"in t.data?this.findIndexByInd(t.data.tp):e-1,i=this.elements[s].getMatte(this.layers[e].tt);t.setMatte(i);break}}}}configAnimation(t){try{if(!this.animationItem)throw Error(`${this.constructor.name}: Can't access animationItem`);if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);if(!this.renderConfig)throw Error(`${this.constructor.name}: Can't access renderConfig`);if(!this.svgElement)throw Error(`${this.constructor.name}: Can't access svgElement`);this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox",`0 0 ${t.w} ${t.h}`),!this.renderConfig.viewBoxOnly&&(this.svgElement.setAttribute("width",`${t.w}`),this.svgElement.setAttribute("height",`${t.h}`),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.renderConfig.contentVisibility&&(this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility)),this.renderConfig.width&&this.svgElement.setAttribute("width",`${this.renderConfig.width}`),this.renderConfig.height&&this.svgElement.setAttribute("height",`${this.renderConfig.height}`),this.renderConfig.className&&this.svgElement.classList.add(this.renderConfig.className),this.renderConfig.id&&(this.svgElement.id=this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",`${this.renderConfig.focusable}`),this.renderConfig.preserveAspectRatio&&this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper?.appendChild(this.svgElement);let{defs:e}=this.globalData;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;let s=tz("clipPath"),i=tz("rect");i.setAttribute("width",`${t.w}`),i.setAttribute("height",`${t.h}`),i.setAttribute("x","0"),i.setAttribute("y","0");let r=Z();s.id=r,s.appendChild(i),this.layerElement?.setAttribute("clip-path",`url(${t7()}#${r})`),e.appendChild(s),this.layers=t.layers,this.elements=t3(t.layers.length)}catch(t){console.error(`${this.constructor.name}:
5
- `,t)}}createImage(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new sS(t,this.globalData,this)}createNull(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new i_(t,this.globalData,this)}createShape(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new sQ(t,this.globalData,this)}createSolid(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iE(t,this.globalData,this)}createText(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iS(t,this.globalData,this)}destroy(){if(!this.animationItem)throw Error(`${this.constructor.name}: Can't access animationItem`);if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;let{length:t}=this.layers;for(let e=0;e<t;e++)this.elements[e]?.destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null}findIndexByInd(t){let{length:e}=this.layers;for(let s=0;s<e;s++)if(this.layers[s].ind===t)return s;return -1}hide(){if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);this.layerElement.style.display="none"}renderFrame(t){try{if(!this.globalData||this.renderedFrame===t||this.destroyed)return;let e=t;null===e?e=this.renderedFrame:this.renderedFrame=Number(e),this.globalData.frameNum=e,this.globalData.frameId++,this.globalData.projectInterface.currentFrame=e||0,this.globalData._mdf=!1;let{length:s}=this.layers;this.completeLayers||this.checkLayers(e);for(let t=s-1;t>=0;t--)"boolean"!=typeof this.elements[t]&&(this.completeLayers||this.elements[t])&&this.elements[t]?.prepareFrame(Number(e)-this.layers[t].st);if(this.globalData._mdf)for(let t=0;t<s;t++)"boolean"!=typeof this.elements[t]&&(this.completeLayers||this.elements[t])&&this.elements[t]?.renderFrame()}catch(t){console.error(this.constructor.name,t)}}show(){if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);this.layerElement.style.display="block"}updateContainerSize(t,e){throw Error(`${this.constructor.name}: Method updateContainerSize is not implemented`)}}class ik extends sC{constructor(t,e,s){super(),this.addPendingElement=iM.prototype.addPendingElement,this.appendElementInPos=iM.prototype.appendElementInPos,this.buildAllItems=iM.prototype.buildAllItems,this.buildElementParenting=iM.prototype.buildElementParenting,this.buildItem=iM.prototype.buildItem,this.checkLayers=iM.prototype.checkLayers,this.checkPendingElements=iM.prototype.checkPendingElements,this.configAnimation=iM.prototype.configAnimation,this.createAudio=iM.prototype.createAudio,this.createCamera=iM.prototype.createCamera,this.createFootage=iM.prototype.createFootage,this.createImage=iM.prototype.createImage,this.createItem=iM.prototype.createItem,this.createNull=iM.prototype.createNull,this.createShape=iM.prototype.createShape,this.createSolid=iM.prototype.createSolid,this.createText=iM.prototype.createText,this.currentFrame=0,this.destroy=sE.prototype.destroy,this.destroyElements=sE.prototype.destroyElements,this.findIndexByInd=iM.prototype.findIndexByInd,this.getElementById=iM.prototype.getElementById,this.getElementByPath=iM.prototype.getElementByPath,this.getElements=sE.prototype.getElements,this.hide=sE.prototype.hide,this.includeLayers=iM.prototype.includeLayers,this.initElement=sE.prototype.initElement,this.initItems=iM.prototype.initItems,this.prepareFrame=sE.prototype.prepareFrame,this.renderedFrame=-1,this.renderFrame=sE.prototype.renderFrame,this.renderInnerContent=sE.prototype.renderInnerContent,this.searchExtraCompositions=iM.prototype.searchExtraCompositions,this.setElements=sE.prototype.setElements,this.setProjectInterface=iM.prototype.setProjectInterface,this.setupGlobalData=iM.prototype.setupGlobalData,this.show=sE.prototype.show,this.updateContainerSize=iM.prototype.updateContainerSize,this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?t3(this.layers.length):[],this.initElement(t,e,s),this.tm=t.tm?eB.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: Cannot access global data`);return new ik(t,this.globalData,this)}}class iP extends iM{constructor(t,e){super(),this.animationItem=t,this.layers=[],this.renderedFrame=-1,this.svgElement=tz("svg");let s="";if(e?.title){let t=tz("title"),i=Z();t.id=i,t.textContent=e.title,this.svgElement.appendChild(t),s+=i}if(e?.description){let t=tz("desc"),i=Z();t.id=i,t.textContent=e.description,this.svgElement.appendChild(t),s+=` ${i}`}s&&this.svgElement.setAttribute("aria-labelledby",s);let i=tz("defs");this.svgElement.appendChild(i);let r=tz("g");this.svgElement.appendChild(r),this.layerElement=r,this.renderConfig={className:e?.className||"",contentVisibility:e?.contentVisibility||"visible",filterSize:{height:e?.filterSize?.height||"100%",width:e?.filterSize?.width||"100%",x:e?.filterSize?.x||"0%",y:e?.filterSize?.y||"0%"},focusable:e?.focusable,height:e?.height,hideOnTransparent:e?.hideOnTransparent!==!1,id:e?.id||"",imagePreserveAspectRatio:e?.imagePreserveAspectRatio||"xMidYMid slice",preserveAspectRatio:e?.preserveAspectRatio||"xMidYMid meet",progressiveLoad:e?.progressiveLoad||!1,runExpressions:!e||void 0===e.runExpressions||e.runExpressions,viewBoxOnly:e?.viewBoxOnly||!1,viewBoxSize:e?.viewBoxSize||!1,width:e?.width},this.globalData={_mdf:!1,defs:i,frameNum:-1,frameRate:60,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType=L.SVG}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new ik(t,this.globalData,this)}}class iA extends iw{buildItem(t){let{elements:e,layers:s}=this;if(e[t]||99===s[t].ty)return;let i=this.createItem(s[t]);e[t]=i,i.initExpressions()}checkPendingElements(){for(;this.pendingElements.length>0;){let t=this.pendingElements.pop();t?.checkParenting()}}configAnimation(t){if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);if(!this.renderConfig)throw Error(`${this.constructor.name}: renderConfig is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(this.animationItem.wrapper){this.animationItem.container=tV("canvas");let t=this.animationItem.container.style;t.width="100%",t.height="100%",t.transformOrigin="0px 0px 0px",t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&(this.animationItem.container.className=this.renderConfig.className),this.renderConfig.id&&(this.animationItem.container.id=this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData?.setContext(this.canvasContext),this.data=t,this.layers=t.layers,this.transformCanvas={h:t.h,sx:0,sy:0,tx:0,ty:0,w:t.w},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=t3(t.layers.length),this.updateContainerSize()}createImage(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new s0(t,this.globalData,this)}createShape(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new s3(t,this.globalData,this)}createSolid(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new s5(t,this.globalData,this)}createText(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new iy(t,this.globalData,this)}ctxFill(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.fill(t)}ctxFillRect(t,e,s,i){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.fillRect(t,e,s,i)}ctxFillStyle(t=""){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.fillStyle=t}ctxLineCap(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.lineCap=t}ctxLineJoin(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.lineJoin=t}ctxLineWidth(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.lineWidth=t}ctxMiterLimit(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.miterLimit=t}ctxOpacity(t=1){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.globalAlpha*=t<0?0:t}ctxStroke(){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.stroke()}ctxStrokeStyle(t=""){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.strokeStyle=t}ctxTransform(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])&&this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])}destroy(){if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);this.renderConfig?.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");let{length:t}=this.layers;for(let e=t-1;e>=0;e-=1)this.elements[e]?.destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0}hide(){if(!this.animationItem?.container)throw Error(`${this.constructor.name}: animationItem -> container is not implemented`);this.animationItem.container.style.display="none"}renderFrame(t,e){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);if(this.renderedFrame===t&&this.renderConfig?.clearCanvas===!0&&!e||this.destroyed||-1===t)return;this.renderedFrame=t,this.globalData.frameNum=t-Number(this.animationItem._isFirstFrame),this.globalData.frameId++,this.globalData._mdf=!this.renderConfig?.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;let{length:s}=this.layers;this.completeLayers||this.checkLayers(t);for(let e=s-1;e>=0;e--)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf){this.renderConfig?.clearCanvas===!0?this.canvasContext?.clearRect(0,0,this.transformCanvas?.w||0,this.transformCanvas?.h||0):this.save();for(let t=s-1;t>=0;t--)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame();this.renderConfig?.clearCanvas!==!0&&this.restore()}}reset(){if(!this.renderConfig?.clearCanvas)return void this.canvasContext?.restore();this.contextData?.reset()}restore(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.renderConfig?.clearCanvas)return void this.canvasContext?.restore();t&&(this.globalData.blendMode="source-over"),this.contextData?.restore(t)}save(t){this.canvasContext?.save()}show(){if(!this.animationItem?.container)throw Error(`${this.constructor.name}: animationItem -> container is not implemented`);this.animationItem.container.style.display="block"}updateContainerSize(t,e){let s,i,r,a;if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);if(!this.renderConfig?.dpr)throw Error(`${this.constructor.name}: renderConfig -> dpr is not implemented`);if(!this.transformCanvas)throw Error(`${this.constructor.name}: transformCanvas is not implemented`);if(this.reset(),t?(s=t,i=Number(e),this.canvasContext.canvas.width=s,this.canvasContext.canvas.height=i):(this.animationItem.wrapper&&this.animationItem.container?(s=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight):(s=this.canvasContext.canvas.width,i=this.canvasContext.canvas.height),this.canvasContext.canvas.width=s*this.renderConfig.dpr,this.canvasContext.canvas.height=i*this.renderConfig.dpr),this.renderConfig.preserveAspectRatio.includes("meet")||this.renderConfig.preserveAspectRatio.includes("slice")){let t=this.renderConfig.preserveAspectRatio.split(" "),e=t[1]||"meet",n=t[0]||"xMidYMid",o=n.slice(0,4),h=n.slice(4);r=s/i,(a=this.transformCanvas.w/this.transformCanvas.h)>r&&"meet"===e||a<r&&"slice"===e?(this.transformCanvas.sx=s/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=s/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)),"xMid"===o&&(a<r&&"meet"===e||a>r&&"slice"===e)?this.transformCanvas.tx=(s-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(a<r&&"meet"===e||a>r&&"slice"===e)?this.transformCanvas.tx=(s-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,"YMid"===h&&(a>r&&"meet"===e||a<r&&"slice"===e)?this.transformCanvas.ty=(i-this.transformCanvas.h*(s/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(a>r&&"meet"===e||a<r&&"slice"===e)?this.transformCanvas.ty=(i-this.transformCanvas.h*(s/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio===$.Initial?(this.transformCanvas.sx=s/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)}}iA.prototype.createNull=iP.prototype.createNull;class iD extends sE{constructor(t,e,s){super(),this.addPendingElement=iA.prototype.addPendingElement,this.buildAllItems=iA.prototype.buildAllItems,this.buildElementParenting=iA.prototype.buildElementParenting,this.buildItem=iA.prototype.buildItem,this.checkLayers=iA.prototype.checkLayers,this.checkPendingElements=iA.prototype.checkPendingElements,this.clearCanvas=ss.prototype.clearCanvas,this.configAnimation=iA.prototype.configAnimation,this.createAudio=iA.prototype.createAudio,this.createCamera=iA.prototype.createCamera,this.createContainerElements=ss.prototype.createContainerElements,this.createContent=ss.prototype.createContent,this.createElements=ss.prototype.createElements,this.createFootage=iA.prototype.createFootage,this.createImage=iA.prototype.createImage,this.createItem=iA.prototype.createItem,this.createNull=iA.prototype.createNull,this.createRenderableComponents=ss.prototype.createRenderableComponents,this.createShape=iA.prototype.createShape,this.createSolid=iA.prototype.createSolid,this.createText=iA.prototype.createText,this.ctxFill=iA.prototype.ctxFill,this.ctxFillRect=iA.prototype.ctxFillRect,this.ctxFillStyle=iA.prototype.ctxFillStyle,this.ctxLineCap=iA.prototype.ctxLineCap,this.ctxLineJoin=iA.prototype.ctxLineJoin,this.ctxLineWidth=iA.prototype.ctxLineWidth,this.ctxMiterLimit=iA.prototype.ctxMiterLimit,this.ctxOpacity=iA.prototype.ctxOpacity,this.ctxStroke=iA.prototype.ctxStroke,this.ctxStrokeStyle=iA.prototype.ctxStrokeStyle,this.ctxTransform=iA.prototype.ctxTransform,this.exitLayer=ss.prototype.exitLayer,this.getElementById=iA.prototype.getElementById,this.getElementByPath=iA.prototype.getElementByPath,this.hide=ss.prototype.hide,this.hideElement=ss.prototype.hideElement,this.includeLayers=iA.prototype.includeLayers,this.initItems=iA.prototype.initItems,this.initRendererElement=ss.prototype.initRendererElement,this.prepareLayer=ss.prototype.prepareLayer,this.renderFrame=ss.prototype.renderFrame,this.reset=iA.prototype.reset,this.restore=iA.prototype.restore,this.save=iA.prototype.save,this.searchExtraCompositions=iA.prototype.searchExtraCompositions,this.setBlendMode=ss.prototype.setBlendMode,this.setProjectInterface=iA.prototype.setProjectInterface,this.setupGlobalData=iA.prototype.setupGlobalData,this.show=ss.prototype.show,this.showElement=ss.prototype.showElement,this.updateContainerSize=iA.prototype.updateContainerSize,this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=t3(this.layers.length),this.initElement(t,e,s),this.tm=t.tm?eB.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new iD(t,this.globalData,this)}destroy(){let{length:t}=this.layers;for(let e=t-1;e>=0;e--)this.elements[e]?.destroy();this.layers=null,this.elements=null}renderInnerContent(){if(!this.data?.w||!this.data.h)throw Error(`${this.constructor.name} data (LottieLayer) is not implemented`);let{canvasContext:t,completeLayers:e,data:s,elements:i,layers:r}=this;if(!t)throw Error(`${this.constructor.name}: canvasContext is not implemented`);t.beginPath(),t.moveTo(0,0),t.lineTo(s.w||0,0),t.lineTo(s.w||0,s.h||0),t.lineTo(0,s.h||0),t.lineTo(0,0),t.clip();let{length:a}=r;for(let t=a-1;t>=0;t--)(e||i[t])&&i[t].renderFrame()}}class iT{constructor(){this.opacity=-1,this.transform=t2(F.Float32,16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}}class iF{constructor(){this.stack=[],this.stack=[],this.cArrPos=0,this.cTr=new t5;for(let t=0;t<15;t++){let e=new iT;this.stack[t]=e}this._length=15,this.nativeContext=null,this.transformMat=new t5,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}duplicate(){let t=2*this._length;for(let e=this._length;e<t;e++)this.stack[e]=new iT;this._length=t}fill(t){this.nativeContext&&this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext?.fill(t)}fillRect(t,e,s,i){this.nativeContext&&this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext?.fillRect(t,e,s,i)}fillStyle(t){this.stack[this.cArrPos].fillStyle!==t&&(this.currentFillStyle=t,this.stack[this.cArrPos].fillStyle=t)}lineCap(t){this.stack[this.cArrPos].lineCap!==t&&(this.currentLineCap=t,this.stack[this.cArrPos].lineCap=t)}lineJoin(t){this.stack[this.cArrPos].lineJoin!==t&&(this.currentLineJoin=t,this.stack[this.cArrPos].lineJoin=t)}lineWidth(t){this.stack[this.cArrPos].lineWidth!==t&&(this.currentLineWidth=t,this.stack[this.cArrPos].lineWidth=t)}miterLimit(t){this.stack[this.cArrPos].miterLimit!==t&&(this.currentMiterLimit=t,this.stack[this.cArrPos].miterLimit=t)}opacity(t){let e=this.stack[this.cArrPos].opacity;e*=t<0?0:t,this.stack[this.cArrPos].opacity!==e&&(this.nativeContext&&this.currentOpacity!==t&&(this.nativeContext.globalAlpha=t,this.currentOpacity=t),this.stack[this.cArrPos].opacity=e)}reset(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1}restore(t){this.cArrPos-=1;let{fillStyle:e,lineCap:s,lineJoin:i,lineWidth:r,miterLimit:a,opacity:n,strokeStyle:o,transform:h}=this.stack[this.cArrPos],l=this.cTr.props;for(let t=0;t<16;t++)l[t]=h[t];if(t){this.nativeContext?.restore();let t=this.stack[this.cArrPos+1];this.appliedFillStyle=t.fillStyle,this.appliedStrokeStyle=t.strokeStyle,this.appliedLineWidth=t.lineWidth,this.appliedLineCap=t.lineCap,this.appliedLineJoin=t.lineJoin,this.appliedMiterLimit=t.miterLimit}this.nativeContext?.setTransform(h[0],h[1],h[4],h[5],h[12],h[13]),this.nativeContext&&(t||-1!==n&&this.currentOpacity!==n)&&(this.nativeContext.globalAlpha=n,this.currentOpacity=n),this.currentFillStyle=e,this.currentStrokeStyle=o,this.currentLineWidth=r,this.currentLineCap=s,this.currentLineJoin=i,this.currentMiterLimit=a}save(t){let e;t&&this.nativeContext?.save();let{props:s}=this.cTr;this._length<=this.cArrPos&&this.duplicate();let i=this.stack[this.cArrPos];for(e=0;e<16;e++)i.transform[e]=s[e];this.cArrPos++;let r=this.stack[this.cArrPos];r.opacity=i.opacity,r.fillStyle=i.fillStyle,r.strokeStyle=i.strokeStyle,r.lineWidth=i.lineWidth,r.lineCap=i.lineCap,r.lineJoin=i.lineJoin,r.miterLimit=i.miterLimit}setContext(t){this.nativeContext=t}setOpacity(t){this.stack[this.cArrPos].opacity=t}stroke(){if(!this.nativeContext)throw Error(`${this.constructor.name}: nativeContext is not implemented`);this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=Number(this.appliedLineWidth)),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=Number(this.appliedMiterLimit)),this.nativeContext.stroke()}strokeStyle(t){this.stack[this.cArrPos].strokeStyle!==t&&(this.currentStrokeStyle=t,this.stack[this.cArrPos].strokeStyle=t)}transform(t){this.transformMat.cloneFromProps(t);let e=this.cTr;this.transformMat.multiply(e),e.cloneFromProps(this.transformMat.props);let s=e.props;this.nativeContext?.setTransform(s[0],s[1],s[4],s[5],s[12],s[13])}}class iI{constructor(){let{getBaseElement:t}=sC.prototype,{buildElementParenting:e}=iw.prototype;this.getBaseElement=t,this.destroyBaseElement=this.destroy,this.buildElementParenting=e}addEffects(){}buildElementParenting(t,e,s){throw Error(`${this.constructor.name}: Method buildElementParenting is not implemented`)}checkBlendMode(){}createContainerElements(){this.renderableEffectsManager=new es(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()}createRenderableComponents(){if(!this.data||!this.globalData)throw Error(`${this.constructor.name}: data or globalData is not implemented`);this.maskManager=new e0(this.data,this,this.globalData)}destroy(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)}destroyBaseElement(){throw Error(`${this.constructor.name}: Method destroyBaseElement is not implemented`)}getBaseElement(){throw Error(`${this.constructor.name}: Method getBaseElement is not implemented`)}initRendererElement(){this.baseElement=tV(this.data?.tg||"div"),this.data?.hasMask?(this.svgElement=tz("svg"),this.layerElement=tz("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,ta(this.baseElement)}renderElement(){let t=this.transformedElement?this.transformedElement.style:{};this.finalTransform?._matMdf&&(t.transform=this.finalTransform.mat.toCSS()),this.finalTransform?._opMdf&&(t.opacity=`${this.finalTransform.mProp.o?.v}`)}renderFrame(t){this.data?.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))}renderInnerContent(){throw Error(`${this.constructor.name}: Method renderInnerContent is not implemented`)}renderRenderable(){throw Error(`${this.constructor.name}: Method renderRenderable is not implemented`)}renderTransform(){throw Error(`${this.constructor.name}: Method renderTransform is not implemented`)}setBlendMode(){throw Error(`${this.constructor.name}: Method setBlendMode is not implemented`)}setMatte(){}}class i$ extends sx{constructor(t,e,s){if(super(),this.initFrame(),this.initBaseData(t,e,s),this.initHierarchy(),this.pe=eB.getProp(this,t.pe,0,0,this),t.ks.p?.s?(this.px=eB.getProp(this,t.ks.p.x,1,0,this),this.py=eB.getProp(this,t.ks.p.y,1,0,this),this.pz=eB.getProp(this,t.ks.p.z,1,0,this)):this.p=eB.getProp(this,t.ks.p,1,0,this),t.ks.a&&(this.a=eB.getProp(this,t.ks.a,1,0,this)),t.ks.or?.k.length&&t.ks.or.k[0].to){let{length:e}=t.ks.or.k;for(let s=0;s<e;s++)t.ks.or.k[s].to=null,t.ks.or.k[s].ti=null}this.or=eB.getProp(this,t.ks.or,1,t1,this),this.or.sh=!0,this.rx=eB.getProp(this,t.ks.rx,0,t1,this),this.ry=eB.getProp(this,t.ks.ry,0,t1,this),this.rz=eB.getProp(this,t.ks.rz,0,t1,this),this.mat=new t5,this._prevMat=new t5,this._isFirstFrame=!0,this.finalTransform={mProp:this}}createElements(){}getBaseElement(){return null}hide(){}prepareFrame(t){this.prepareProperties(t,!0)}renderFrame(t){if(!this.globalData?.compSize)throw Error(`${this.constructor.name}: globalData->compSize is not implemented`);let e=this._isFirstFrame;if(this.hierarchy){let{length:t}=this.hierarchy;for(let s=0;s<t;s++)e=this.hierarchy[s].finalTransform?.mProp._mdf||e}if(e||this.pe?._mdf||this.p?._mdf||this.px&&(this.px._mdf||this.py?._mdf||this.pz?._mdf)||this.rx?._mdf||this.ry?._mdf||this.rz?._mdf||this.or?._mdf||this.a?._mdf){if(this.mat?.reset(),this.hierarchy){let t=this.hierarchy.length-1;for(let e=t;e>=0;e--){let t=this.hierarchy[e].finalTransform?.mProp;t?.p&&t.or&&t.rx&&t.ry&&t.rz&&t.s&&t.a&&(this.mat?.translate(-t.p.v[0],-t.p.v[1],t.p.v[2]),this.mat?.rotateX(-t.or.v[0]).rotateY(-t.or.v[1]).rotateZ(t.or.v[2]),this.mat?.rotateX(-t.rx.v).rotateY(-t.ry.v).rotateZ(t.rz.v),this.mat?.scale(1/t.s.v[0],1/t.s.v[1],1/t.s.v[2]),this.mat?.translate(t.a.v[0],t.a.v[1],t.a.v[2]))}}if(this.p?this.mat?.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.px&&this.py&&this.pz&&this.mat?.translate(-this.px.v,-this.py.v,this.pz.v),this.a){let t=[];this.p?t=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:this.px&&this.py&&this.pz&&(t=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]]);let e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)),s=[t[0]/e,t[1]/e,t[2]/e],i=Math.sqrt(s[2]*s[2]+s[0]*s[0]),r=Math.atan2(s[1],i),a=Math.atan2(s[0],-s[2]);this.mat?.rotateY(a).rotateX(-r)}this.rx&&this.ry&&this.rz&&this.mat?.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.or&&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);let t=!this._prevMat.equals(this.mat);if((t||this.pe?._mdf)&&this.comp?.threeDElements){let e,s,{length:i}=this.comp.threeDElements;for(let r=0;r<i;r++)if(e=this.comp.threeDElements[r],e?.type==="3d"){if(t){let t=this.mat?.toCSS();s=e.container.style,t&&(s.transform=t)}this.pe?._mdf&&(e.perspectiveElem.style.perspective=`${this.pe.v}px`)}this.mat?.clone(this._prevMat)}}this._isFirstFrame=!1}setup(){let{length:t}=this.comp?.threeDElements??[];for(let e=0;e<t;e++){let t=this.comp?.threeDElements[e];if(t?.type==="3d"){let e=t.perspectiveElem.style,s=t.container.style;e.perspective=`${this.pe?.v}px`,s.transformOrigin="0px 0px 0px",e.transform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"}}}}class iL extends s_{constructor(t,e,s){super();let{addEffects:i,checkBlendMode:r,setMatte:a}=iI.prototype;this.addEffects=i,this.checkBlendMode=r,this.setMatte=a,this.initElement(t,e,s)}addEffects(){throw Error(`${this.constructor.name}: Method addEffects is not implemented`)}checkBlendMode(){throw Error(`${this.constructor.name}: Method checkBlendMode is not implemented`)}createContent(){let t;if(!this.data)throw Error(`${this.constructor.name}: data (LottierLayer) is not implemented`);this.data.hasMask?((t=tz("rect")).setAttribute("width",`${this.data.sw}`),t.setAttribute("height",`${this.data.sh}`),t.setAttribute("fill",`${this.data.sc}`),this.svgElement?.setAttribute("width",`${this.data.sw}`),this.svgElement?.setAttribute("height",`${this.data.sh}`)):((t=tV("div")).style.width=`${this.data.sw}px`,t.style.height=`${this.data.sh}px`,this.data.sc&&(t.style.backgroundColor=this.data.sc)),this.layerElement?.appendChild(t)}setMatte(){throw Error(`${this.constructor.name}: Method setMatte is not implemented`)}}class iN extends iL{constructor(t,e,s){super(t,e,s),this.assetData=e.getAssetData(t.refId),this.initElement(t,e,s)}createContent(){if(!this.assetData)throw Error(`${this.constructor.name}: assetData is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);let t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data?.hasMask?(this.imageElem=tz("image"),this.imageElem.setAttribute("width",`${this.assetData.w}px`),this.imageElem.setAttribute("height",`${this.assetData.h}px`),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement?.appendChild(this.imageElem),this.baseElement?.setAttribute("width",`${this.assetData.w}`),this.baseElement?.setAttribute("height",`${this.assetData.h}`)):this.layerElement?.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data?.ln&&this.baseElement?.setAttribute("id",this.data.ln)}}class iB extends sw{constructor(t,e,s){super(),this.shapeBoundingBox={bottom:0,left:0,right:0,top:0},this.tempBoundingBox={height:0,width:0,x:0,xMax:0,y:0,yMax:0},this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=tz("g"),this.initElement(t,e,s),this.prevViewData=[],this.currentBBox={h:0,w:0,x:999999,y:-999999},this._renderShapeFrame=this.renderInnerContent}_renderShapeFrame(){throw Error(`${this.constructor.name}: Method _renderShapeFrame is not implemented`)}calculateBoundingBox(t,e){let{length:s}=t;for(let i=0;i<s;i++)this.calculateShapeBoundingBox(t[i],e)}calculateF(t,e,s,i,r,a){return Math.pow(1-t,3)*e[a]+3*Math.pow(1-t,2)*t*s[a]+3*(1-t)*Math.pow(t,2)*i[a]+Math.pow(t,3)*r[a]}calculateShapeBoundingBox(t,e){let s,i,r,a,n,o=t.sh.v,{transformers:h}=t,l=o._length;if(!(l<=1)){for(s=0;s<l-1;s++)i=this.getTransformedPoint(h,o.v[s]),r=this.getTransformedPoint(h,o.o[s]),a=this.getTransformedPoint(h,o.i[s+1]),n=this.getTransformedPoint(h,o.v[s+1]),this.checkBounds(i,r,a,n,e);o.c&&(i=this.getTransformedPoint(h,o.v[s]),r=this.getTransformedPoint(h,o.o[s]),a=this.getTransformedPoint(h,o.i[0]),n=this.getTransformedPoint(h,o.v[0]),this.checkBounds(i,r,a,n,e))}}checkBounds(t,e,s,i,r){this.getBoundsOfCurve(t,e,s,i);let a=this.shapeBoundingBox;r.x=Math.min(a.left,r.x),r.xMax=Math.max(a.right,r.xMax),r.y=Math.min(a.top,r.y),r.yMax=Math.max(a.bottom,r.yMax)}createContent(){let t;if(!this.baseElement)throw Error(`${this.constructor.name}: baseElement is not implemented`);if(this.baseElement.style.fontSize="0",this.data?.hasMask)this.layerElement?.appendChild(this.shapesContainer),t=this.svgElement;else{t=tz("svg");let e=this.comp?.data??this.globalData?.compSize;e&&(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}currentBoxContains(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}expandStrokeBoundingBox(t,e){let s=0;if(t.keyframes){for(let e=0;e<t.keyframes.length;e++){let i=t.keyframes[e].s;i>s&&(s=i)}s*=t.mult??1}else s=t.v*(t.mult??1);e.x-=s,e.xMax+=s,e.y-=s,e.yMax+=s}filterUniqueShapes(){throw Error(`${this.constructor.name}: Method filterUniqueShapes is not implemented`)}getBoundsOfCurve(t,e,s,i){let r=[[t[0],i[0]],[t[1],i[1]]];for(let a,n,o,h,l,p,m,c=0;c<2;++c)n=6*t[c]-12*e[c]+6*s[c],a=-3*t[c]+9*e[c]-9*s[c]+3*i[c],o=3*e[c]-3*t[c],n|=0,o|=0,0==(a|=0)&&0===n||(0===a?(h=-o/n)>0&&h<1&&r[c].push(this.calculateF(h,t,e,s,i,c)):(l=n*n-4*o*a)>=0&&((p=(-n+Math.sqrt(l))/(2*a))>0&&p<1&&r[c].push(this.calculateF(p,t,e,s,i,c)),(m=(-n-Math.sqrt(l))/(2*a))>0&&m<1&&r[c].push(this.calculateF(m,t,e,s,i,c))));this.shapeBoundingBox.left=Math.min.apply(null,r[0]),this.shapeBoundingBox.top=Math.min.apply(null,r[1]),this.shapeBoundingBox.right=Math.max.apply(null,r[0]),this.shapeBoundingBox.bottom=Math.max.apply(null,r[1])}getTransformedPoint(t,e){let s=e,{length:i}=t;for(let e=0;e<i;e++)s=t[e].mProps.v.applyToPointArray(s[0],s[1],0);return s}initElement(t,e,s){throw Error(`${this.constructor.name}: Method initElement is not implemented`)}renderInnerContent(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){if(!this.shapeCont)throw Error(`${this.constructor.name}: shapeCont is not implemented`);let{currentBBox:t,itemsData:e,shapeCont:s,tempBoundingBox:i}=this;if(i.x=999999,i.xMax=-999999,i.y=999999,i.yMax=-999999,this.calculateBoundingBox(e,i),i.width=i.xMax<i.x?0:i.xMax-i.x,i.height=i.yMax<i.y?0:i.yMax-i.y,this.currentBoxContains(i))return;let r=!1;t.w!==i.width&&(t.w=i.width,s.setAttribute("width",`${i.width}`),r=!0),t.h!==i.height&&(t.h=i.height,s.setAttribute("height",`${i.height}`),r=!0),(r||t.x!==i.x||t.y!==i.y)&&(t.w=i.width,t.h=i.height,t.x=i.x,t.y=i.y,s.setAttribute("viewBox",`${t.x} ${t.y} ${t.w} ${t.h}`),s.style.transform=`translate(${t.x}px,${t.y}px)`)}}searchShapes(t,e,s,i,r,a,n){throw Error(`${this.constructor.name}: Method searchShapes is not implemented`)}}class iR extends iu{constructor(t,e,s){super(),this.renderedLetters=[],this.textSpans=[],this.textPaths=[],this.currentBBox={h:0,w:0,x:999999,y:-999999},this.renderType=L.SVG,this.isMasked=!1,this.initElement(t,e,s)}buildNewText(){let t=this.textProperty?.currentData;this.renderedLetters=t3(t?.l.length||0);let e=this.innerElem?.style,s=t?.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e&&(e.fill=s,e.color=s,t?.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=`${t.sw}px`));let i=this.globalData?.fontManager?.getFontByName(t?.f);if(e&&!this.globalData?.fontManager?.chars){if(e.fontSize=`${t?.finalSize||0}px`,e.lineHeight=`${t?.finalSize||0}px`,this.innerElem&&i?.fClass)this.innerElem.className=i.fClass;else if(i&&(e.fontFamily=i.fFamily),t){let{fWeight:s}=t,{fStyle:i}=t;e.fontStyle=i,e.fontWeight=s}}let r=t?.l??[],a,n=null,o=null,h=this.mHelper,l,p,m=0,{length:c}=r;for(let e=0;e<c;e++){if(this.globalData?.fontManager?.chars?(this.textPaths[m]?a=this.textPaths[m]:((a=tz("path")).setAttribute("stroke-linecap",V[1]),a.setAttribute("stroke-linejoin",z[2]),a.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[m]?o=(n=this.textSpans[m]).children[0]:((n=tV("div")).style.lineHeight="0",(o=tz("svg")).appendChild(a),ta(n)))):this.isMasked?a=this.textPaths[m]??tz("text"):this.textSpans[m]?(n=this.textSpans[m],a=this.textPaths[m]):(ta(n=tV("span")),ta(a=tV("span")),n.appendChild(a)),this.globalData?.fontManager?.chars){let s,m=this.globalData.fontManager.getCharData(t?.finalText[e],i?.fStyle,this.globalData.fontManager.getFontByName(t?.f).fFamily);if(s=m?m.data:null,h.reset(),s?.shapes&&s.shapes.length>0&&(l=s.shapes[0].it??[],h.scale((t?.finalSize||0)/100,(t?.finalSize||0)/100),p=this.createPathShape(h,l),a.setAttribute("d",p)),this.isMasked)this.innerElem?.appendChild(a);else if(n&&o){if(this.innerElem?.appendChild(n),s?.shapes){document.body.appendChild(o);let t=o.getBBox();o.setAttribute("width",`${t.width+2}`),o.setAttribute("height",`${t.height+2}`),o.setAttribute("viewBox",`${t.x-1} ${t.y-1} ${t.width+2} ${t.height+2}`),o.style.transform=`translate(${t.x-1}px,${t.y-1}px)`,r[e].yOffset=t.y-1}else o.setAttribute("width","1"),o.setAttribute("height","1");n.appendChild(o)}}else(a.textContent=r[e].val,a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)?this.innerElem?.appendChild(a):(n&&this.innerElem?.appendChild(n),a.style.transform=`translate3d(0,${-(t?.finalSize||0)/1.2}px,0)`);this.isMasked?this.textSpans[m]=a:this.textSpans[m]=n,this.textSpans[m].style.display="block",this.textPaths[m]=a,m++}for(;m<this.textSpans.length;)this.textSpans[m].style.display="none",m++}createContent(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType=L.SVG,this.compW=this.comp?.data?.w,this.compH=this.comp?.data?.h,this.svgElement?.setAttribute("width",`${this.compW}`),this.svgElement?.setAttribute("height",`${this.compH}`);let t=tz("g");this.maskedElement?.appendChild(t),this.innerElem=t}else this.renderType=L.HTML,this.innerElem=this.layerElement;this.checkParenting()}renderInnerContent(){let t,e,s,i;if(this.validateText(),this.data?.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform?._matMdf){this.svgElement?.setAttribute("viewBox",`${-(this.finalTransform.mProp.p?.v)[0]} ${-(this.finalTransform.mProp.p?.v)[1].v[1]} ${this.compW} ${this.compH}`),t=this.svgElement?.style;let e=`translate(${-this.finalTransform.mProp.p?.v[0]}px,${-this.finalTransform.mProp.p?.v[1]}px)`;t&&(t.transform=e)}}if(this.textAnimator?.getMeasures(this.textProperty?.currentData,this.lettersChangedFlag),!this.lettersChangedFlag&&!this.textAnimator?.lettersChangedFlag)return;let r=0,a=this.textAnimator?.renderedLetters??[],n=this.textProperty?.currentData.l??[],{length:o}=n;for(let t=0;t<o;t++){if(n[t].n){r++;continue}s=this.textSpans[t],i=this.textPaths[t],e=a[r],r++,e._mdf.m&&(this.isMasked?s.setAttribute("transform",e.m):s.style.transform=e.m),s.style.opacity=`${e.o??1}`,e.sw&&e._mdf.sw&&i.setAttribute("stroke-width",`${e.sw}`),e.sc&&e._mdf.sc&&i.setAttribute("stroke",e.sc),e.fc&&e._mdf.fc&&(i.setAttribute("fill",e.fc),i.style.color=e.fc)}if(this.innerElem?.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){let e=this.innerElem.getBBox();if(this.currentBBox&&this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.svgElement?.setAttribute("width",`${e.width}`)),this.currentBBox&&this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.svgElement?.setAttribute("height",`${e.height}`)),this.currentBBox&&(this.currentBBox.w!==e.width+2||this.currentBBox.h!==e.height+2||this.currentBBox.x!==e.x-1||this.currentBBox.y!==e.y-1)&&(this.currentBBox.w=e.width+2,this.currentBBox.h=e.height+2,this.currentBBox.x=e.x-1,this.currentBBox.y=e.y-1,this.svgElement?.setAttribute("viewBox",`${this.currentBBox.x} ${this.currentBBox.y} ${this.currentBBox.w} ${this.currentBBox.h}`),this.svgElement)){t=this.svgElement.style;let e=`translate(${this.currentBBox.x}px,${this.currentBBox.y}px)`;t.transform=e}}}}class iV extends iw{constructor(t,e){super(),this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",filterSize:{height:e?.filterSize?.height||"400%",width:e?.filterSize?.width||"400%",x:e?.filterSize?.x||"-100%",y:e?.filterSize?.y||"-100%"},hideOnTransparent:!(e&&!1===e.hideOnTransparent),imagePreserveAspectRatio:e?.imagePreserveAspectRatio||"xMidYMid slice"},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType=L.HTML;let{buildItem:s,createNull:i,renderFrame:r}=iP.prototype;this.buildItem=s,this.createNull=i,this.renderFrame=r}addTo3dContainer(t,e){let s=0,{length:i}=this.threeDElements;for(;s<i;){if(e<=this.threeDElements[s].endPos){let i=this.threeDElements[s].startPos,r;for(;i<e;)r=this.elements[i]?.getBaseElement?.(),i++;r?this.threeDElements[s].container.insertBefore(t,r):this.threeDElements[s].container.appendChild(t);break}s++}}appendElementInPos(t,e){let s=t.getBaseElement();if(!s)return;let i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(s,e);else if(this.threeDElements.length>0)this.addTo3dContainer(s,e);else{let t=0,r,a;for(;t<e;)!0!==this.elements[t]&&this.elements[t].getBaseElement&&(a=this.elements[t],r=(this.layers[t].ddd?this.getThreeDContainerByPos(t):a.getBaseElement())??r),t++;r?i.ddd&&this.supports3d||this.layerElement?.insertBefore(s,r):i.ddd&&this.supports3d||this.layerElement?.appendChild(s)}}build3dContainers(){let t,{length:e}=this.layers,s="";for(let i=0;i<e;i++)if(this.layers[i].ddd&&3!==this.layers[i].ty){if("3d"!==s&&(s="3d",t=this.createThreeDContainer(i,"3d")),!t)continue;t.endPos=Math.max(t.endPos,i)}else{if("2d"!==s&&(s="2d",t=this.createThreeDContainer(i,"2d")),!t)continue;t.endPos=Math.max(t.endPos,i)}let{length:i}=this.threeDElements;for(let t=i-1;t>=0;t--)this.resizerElem?.appendChild(this.threeDElements[t].perspectiveElem)}checkPendingElements(){for(;this.pendingElements.length>0;){let t=this.pendingElements.pop();t?.checkParenting()}}configAnimation(t){if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);let e=tV("div"),{wrapper:s}=this.animationItem,{classList:i,style:r}=e;r.width=`${t.w}px`,r.height=`${t.h}px`,this.resizerElem=e,ta(e),r.transformStyle="flat",this.renderConfig.className&&i.add(this.renderConfig.className),s?.appendChild(e),r.overflow="hidden";let a=tz("svg");a.setAttribute("width","1"),a.setAttribute("height","1"),ta(a),this.resizerElem.appendChild(a);let n=tz("defs");a.appendChild(n),this.data=t,this.setupGlobalData(t,a),this.globalData.defs=n,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()}createCamera(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.camera=new i$(t,this.globalData,this),this.camera}createImage(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new iN(t,this.globalData,this):new sS(t,this.globalData,this)}createShape(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new iB(t,this.globalData,this):new sQ(t,this.globalData,this)}createSolid(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new iL(t,this.globalData,this):new iE(t,this.globalData,this)}createText(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new iR(t,this.globalData,this):new iS(t,this.globalData,this)}createThreeDContainer(t,e){let s,i=tV("div");ta(i);let r=tV("div");ta(r),"3d"===e&&((s=i.style).width=`${this.globalData?.compSize?.w}px`,s.height=`${this.globalData?.compSize?.h}px`,s.transformOrigin="50% 50%",r.style.transform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"),i.appendChild(r);let a={container:r,endPos:t,perspectiveElem:i,startPos:t,type:e};return this.threeDElements.push(a),a}destroy(){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;let{length:t}=this.layers;for(let e=0;e<t;e++)this.elements[e]?.destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null}getThreeDContainerByPos(t){let e=0,{length:s}=this.threeDElements;for(;e<s;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e++}return null}hide(){if(!this.resizerElem)throw Error(`${this.constructor.name}: resizerElem is not implemented`);this.resizerElem.style.display="none"}initItems(){if(this.buildAllItems(),this.camera)this.camera.setup();else{if(!this.globalData?.compSize)throw Error(`${this.constructor.name}: globalData->compSize is not implemented`);let t=this.globalData.compSize.w,e=this.globalData.compSize.h,{length:s}=this.threeDElements;for(let i=0;i<s;i++){let{style:s}=this.threeDElements[i].perspectiveElem;s.perspective=`${Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}px`}}}renderFrame(t){throw Error(`${this.constructor.name}: Method renderFrame is not implemented`)}searchExtraCompositions(t){if(!this.globalData?.comp)throw Error(`${this.constructor.name}: globalData->comp is not implemented`);let{length:e}=t,s=tV("div");for(let i=0;i<e;i++)if(t[i].xt){let e=this.createComp(t[i],s,this.globalData.comp,null);e.initExpressions(),this.globalData.projectInterface.registerComposition(e)}}show(){if(!this.resizerElem)throw Error(`${this.constructor.name}: resizerElem is not implemented`);this.resizerElem.style.display="block"}updateContainerSize(){let t,e,s,i;if(!this.globalData?.compSize)throw Error(`${this.constructor.name}: compSize is not implemented in globalData`);if(!this.animationItem?.wrapper)throw Error(`${this.constructor.name}: wrapper is not implemented in animationItem`);let r=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight;if(this.globalData.compSize.w/this.globalData.compSize.h>r/a?(t=r/this.globalData.compSize.w,e=r/this.globalData.compSize.w,s=0,i=(a-this.globalData.compSize.h*(r/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,s=(r-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,i=0),this.resizerElem){let{style:r}=this.resizerElem;r.transform=`matrix3d(${t},0,0,0,0,${e},0,0,0,0,1,0,${s},${i},0,1)`}}}class iz extends sE{constructor(t,e,s){super(),this.threeDElements=[],this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=t3(this.layers.length);let{appendElementInPos:i,build3dContainers:r,checkPendingElements:a,configAnimation:n,createCamera:o,createImage:h,createShape:l,createSolid:p,createText:m,createThreeDContainer:c,getThreeDContainerByPos:d,initItems:u,searchExtraCompositions:f,updateContainerSize:g}=iV.prototype,{addEffects:y,checkBlendMode:b,createRenderableComponents:v,destroy:x,initRendererElement:w,renderElement:_,renderFrame:E,setMatte:C}=iI.prototype;this.addEffects=y,this.appendElementInPos=i,this.build3dContainers=r,this.checkBlendMode=b,this.checkPendingElements=a,this.configAnimation=n,this.createCamera=o,this.createImage=h,this.createRenderableComponents=v,this.createShape=l,this.createSolid=p,this.createText=m,this.createThreeDContainer=c,this.destroy=x,this.getThreeDContainerByPos=d,this.initItems=u,this.initRendererElement=w,this.renderElement=_,this.renderFrame=E,this.searchExtraCompositions=f,this.setMatte=C,this.updateContainerSize=g,this.initElement(t,e,s),this.tm=t.tm?eB.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this._createBaseContainerElements=this.createContainerElements}_createBaseContainerElements(){throw Error(`${this.constructor.name}: Method _createBaseContainerElements is not implemented`)}addEffects(){throw Error(`${this.constructor.name}: Method addEffects is not implemented`)}addTo3dContainer(t,e){let s=0,i;for(;s<e;)i=this.elements[s].getBaseElement(),s++;i?this.layerElement?.insertBefore(t,i):this.layerElement?.appendChild(t)}appendElementInPos(t,e){throw Error(`${this.constructor.name}: Method appendElementInPos is not implemented`)}build3dContainers(){throw Error(`${this.constructor.name}: Method build3dContainers is not implemented`)}buildElementParenting(t,e,s=[]){throw Error(`${this.constructor.name}: Method buildElementParenting is not implemented`)}checkBlendMode(){throw Error(`${this.constructor.name}: Method checkBlendMode is not implemented`)}checkPendingElements(){throw Error(`${this.constructor.name}: Method checkPendingElements is not implemented`)}configAnimation(t){throw Error(`${this.constructor.name}: Method configAnimation is not implemented`)}createCamera(t){throw Error(`${this.constructor.name}: Method createCamera is not implemented`)}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new iz(t,this.globalData,this):new ik(t,this.globalData,this)}createContainerElements(){this._createBaseContainerElements(),this.data?.hasMask?(this.svgElement?.setAttribute("width",`${this.data.w}`),this.svgElement?.setAttribute("height",`${this.data.h}`),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement}createImage(t){throw Error(`${this.constructor.name}: Method createImage is not implemented`)}createShape(t){throw Error(`${this.constructor.name}: Method createShape is not implemented`)}createSolid(t){throw Error(`${this.constructor.name}: Method createSolid is not implemented`)}createText(t){throw Error(`${this.constructor.name}: Method createText is not implemented`)}createThreeDContainer(t,e){throw Error(`${this.constructor.name}: Method createThreeDContainer is not implemented`)}getThreeDContainerByPos(t){throw Error(`${this.constructor.name}: Method getThreeDContainerByPos is not implemented`)}initItems(){throw Error(`${this.constructor.name}: Method initItems is not implemented`)}searchExtraCompositions(t){throw Error(`${this.constructor.name}: Method searchExtraCompositions is not implemented`)}setMatte(){throw Error(`${this.constructor.name}: Method setMatte is not implemented`)}updateContainerSize(){throw Error(`${this.constructor.name}: Method updateContainerSize is not implemented`)}}let iO={},iG=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],{length:iq}=iG;for(let t=0;t<iq;t+=1)iO[iG[t]]=Math[iG[t]];function ij(t,e){return e.i=t.i,e.j=t.j,e.S=[...t.S],e}function iW(t){return String.fromCharCode.apply(0,t)}iO.random=Math.random,iO.abs=t=>{if(te(t)){let e=t3(t.length),{length:s}=t;for(let i=0;i<s;i++)e[i]=Math.abs(t[i]);return e}return Math.abs(t)};let iH={};!function(t,e){let s=this,i="random",r=e.pow(256,6),a=e.pow(2,52),n=2*a;function o(t){let e,s=t.length,i=this,r=0,a=i.i=i.j=0,n=i.S=[];for(s||(t=[s++]);r<256;)n[r]=r++;for(r=0;r<256;r++)n[r]=n[a=255&a+t[r%s]+(e=n[r])],n[a]=e;i.g=function(t){let e,s=0,{i:r}=i,{j:a}=i,n=i.S;for(;t--;)e=n[r=255&r+1],s=256*s+n[255&(n[r]=n[a=255&a+e])+(n[a]=e)];return i.i=r,i.j=a,s}}function h(t,e){let s=`${t}`,i,r=0;for(;r<s.length;)e[255&r]=255&(i^=19*e[255&r])+s.charCodeAt(r++);return iW(e)}e[`seed${i}`]=function(l,p,m){let c=p,d=[],u=h(function t(e,s){let i=[],r=typeof e,a;if(s&&"object"==r)for(a in e)try{i.push(t(e[a],s-1))}catch(t){}return i.length>0?i:"string"==r?e:`${e}\0`}((c=!0===c?{entropy:!0}:c||{}).entropy?[l,iW(t)]:null===l?function(){try{let t=new Uint8Array(256);return(s.crypto||s.msCrypto).getRandomValues(t),iW(t)}catch(r){let e=s.navigator,i=e?.plugins;return[Date.now(),s,i,s.screen,iW(t)]}}():l,3),d),f=new o(d),g=function(){let t=f.g(6),e=r,s=0;for(;t<a;)t=(t+s)*256,e*=256,s=f.g(1);for(;t>=n;)t/=2,e/=2,s>>>=1;return(t+s)/e};return g.int32=function(){return 0|f.g(4)},g.quick=function(){return f.g(4)/0x100000000},g.double=g,h(iW(f.S),t),(c.pass||m||function(t,s,r,a){return(a&&(a.S&&ij(a,f),t.state=function(){return ij(f,{})}),r)?(e[i]=t,s):t})(g,u,"global"in c?c.global:this==e,c.state)},h(e.random(),t)}([],iO);let iY=[0,0,0,0,0,0],iU=eS(.333,0,.833,.833,"easeIn").get,iJ=eS(.33,0,.667,1,"easeInOut").get,iX=eS(.167,.167,.667,1,"easeOut").get,iZ=(t,e,s)=>{let i=s;return(i<0&&i++,i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},iK=t=>{let e,s,i,r=t[0],a=t[1],n=t[2];if(0===a)e=n,i=n,s=n;else{let t=n<.5?n*(1+a):n+a-n*a,o=2*n-t;e=iZ(o,t,r+1/3),s=iZ(o,t,r),i=iZ(o,t,r-1/3)}return[e,s,i,t[3]]},iQ=t=>{let e=t[0],s=t[1],i=t[2],r=iO.max(e,s,i),a=iO.min(e,s,i),n=0,o,h=(r+a)/2;if(r===a)n=0,o=0;else{let t=r-a;switch(o=h>.5?t/(2-r-a):t/(r+a),r){case e:n=(s-i)/t+6*(s<i);break;case s:n=(i-e)/t+2;break;case i:n=(e-s)/t+4}n/=6}return[n,o,h,t[3]]};function i0(t){let e=typeof t;if("number"===e||t instanceof Number||"boolean"===e)return-t;if(i7(t)){let{length:e}=t,s=[];for(let i=0;i<e;i++)s[i]=-t[i];return s}return t.propType?t.v:-t}function i1(t,e,s,i){let r,a,{length:n}=t,o=ej.newElement();o.setPathData(!!i,n);let h=[0,0];for(let i=0;i<n;i++)r=e[i]??h,a=s[i]??h,o.setTripleAt(t[i][0],t[i][1],a[0]+t[i][0],a[1]+t[i][1],r[0]+t[i][0],r[1]+t[i][1],i,!0);return o}function i2(t,e,s,i,r,a){let n=e,o=r,h=a;void 0===o?(o=s,h=i):n=(n-s)/(i-s),n>1?n=1:n<0&&(n=0);let l=t(n);if(i7(o)&&i7(h)){let t,e=o.length,s=t2(F.Float32,e);for(t=0;t<e;t+=1)s[t]=(h[t]-o[t])*l+o[t];return s}return(h-o)*l+o}function i3(t,e,s,i,r){return i2(iX,t,e,s,i,r)}function i5(t,e,s,i,r){return i2(iU,t,e,s,i,r)}function i4(t,e,s,i,r){return i2(iJ,t,e,s,i,r)}function i6(t,e,s,i,r){let a=e,n=s,o=i,h=r;if((void 0===o||void 0===h)&&(o=a,h=n,a=0,n=1),n<a){let t=n;n=a,a=t}if(t<=a)return o;if(t>=n)return h;let l=n===a?0:(t-a)/(n-a);if(!tt(o)&&!tt(h))return o+(h-o)*l;if(tt(o)&&tt(h)){let{length:t}=o,e=t2(F.Float32,t);for(let s=0;s<t;s+=1)e[s]=o[s]+(h[s]-o[s])*l;return e}return 0}function i9(t){return re(t,ri(t))}function i8(t,e){let s=t,i=e;if(void 0===i&&(void 0===s?(s=0,i=1):(i=s,s=void 0)),te(i)){let{length:t}=i;s||(s=t2(F.Float32,t));let e=t2(F.Float32,t),r=iO.random();for(let a=0;a<t;a+=1)e[a]=s[a]+r*(i[a]-s[a]);return e}return(s=s??0)+iO.random()*(i-s)}function i7(t){return"object"==typeof t&&null!==t&&(t.constructor===Array||t.constructor===Float32Array)}function rt(t){return t*t1}function re(t,e){let s,i,r,a=typeof t,n=typeof e;if(rs(a,t)&&rs(n,e))return Number(t)/Number(e);if(i7(t)&&rs(n,e)){for(i=0,r=t.length,s=t2(F.Float32,r);i<r;i+=1)s[i]=t[i]/Number(e);return s}if(rs(a,t)&&i7(e)){for(i=0,r=e.length,s=t2(F.Float32,r);i<r;i+=1)s[i]=Number(t)/e[i];return s}return 0}function rs(t,e){return"number"===t||e instanceof Number||"boolean"===t||"string"===t}function ri(t,e){let s,i=e;if("number"==typeof t||t instanceof Number)return i=i||0,iO.abs(Number(t)-Number(i));i||(i=iY);let r=iO.min(t.length,i.length),a=0;for(s=0;s<r;s+=1)a+=iO.pow(i[s]-t[s],2);return iO.sqrt(a)}function rr(t,e){let s=t,i=e;return"string"==typeof s&&(s=parseInt(s,10)),"string"==typeof i&&(i=parseInt(i,10)),s%i}function ra(t,e){let s,i,r,a=typeof t,n=typeof e;if(rs(a,t)&&rs(n,e))return Number(t)*Number(e);if(i7(t)&&rs(n,e)){for(i=0,r=t.length,s=t2(F.Float32,r);i<r;i+=1)s[i]=t[i]*Number(e);return s}if(rs(a,t)&&i7(e)){for(i=0,r=e.length,s=t2(F.Float32,r);i<r;i++)s[i]=Number(t)*e[i];return s}return 0}function rn(t){return t}function ro(t){return t/t1}function rh(t,e){let s=t,i=e,r=typeof s,a=typeof i;if(rs(r,s)&&rs(a,i))return"string"===r&&(s=parseInt(s,10)),"string"===a&&(i=parseInt(i,10)),s-i;if(i7(s)&&rs(a,i))return s=[...s],s[0]-=Number(i),s;if(rs(r,s)&&i7(i))return(i=[...i])[0]=Number(s)-i[0],i;if(i7(s)&&i7(i)){let t=0,e=s.length,r=i.length,a=[];for(;t<e||t<r;){if(("number"==typeof s[t]||s[t]instanceof Number)&&("number"==typeof i[t]||i[t]instanceof Number)){a[t]=s[t]-i[t],t++;continue}a[t]=void 0===i[t]?s[t]:s[t]||i[t],t++}return a}return 0}function rl(t,e){let s=t,i=e,r=typeof s,a=typeof i;if(rs(r,s)&&rs(a,i)||"string"===r||"string"===a)return Number(s)+Number(i);if(i7(s)&&rs(a,i))return s=[...s],s[0]+=Number(i),s;if(rs(r,s)&&i7(i))return(i=[...i])[0]=s+i[0],i;if(i7(s)&&i7(i)){let t=0,{length:e}=s,{length:r}=i,a=[];for(;t<e||t<r;){if(("number"==typeof s[t]||s[t]instanceof Number)&&("number"==typeof i[t]||i[t]instanceof Number)){a[t]=s[t]+i[t],t++;continue}a[t]=void 0===i[t]?s[t]:s[t]||i[t],t++}return a}return 0}let rp={initiateExpression:function(t,e,s){if(!t.globalData?.renderConfig?.runExpressions)return rn;if(!t.comp?.globalData)throw Error("CompElement is not implemented");let{k:i,x:r}=e,a=/velocity\b/.test(r),n=r.includes("random"),{ip:o,nm:h,op:l,sh:p=0,sw:m=0,ty:c}=t.data,d,u,f,g=0,y;s._name=h,s.valueAtTime=s.getValueAtTime,Object.defineProperty(s,"value",{get:()=>s.v}),t.comp.frameDuration=1/t.comp.globalData.frameRate,t.comp.displayStartTime=0;let b=o/t.comp.globalData.frameRate,v=l/t.comp.globalData.frameRate,x=null,w=null,_=null,E=null,C,S=null,M,k=null,P=null,A=null,D=null,T=null,I=null,$,L=rn,N={},B=Function("_lottieGlobal","$bm_div","$bm_mod","$bm_mul","$bm_neg","$bm_sub","$bm_sum","$bm_transform","active","add","anchorPoint","clamp","comp","content","createPath","degrees_to_radians","degreesToRadians","div","document","ease","easeIn","easeOut","effect","fetch","frames","framesToTime","fromComp","fromCompToSurface","fromWorld","globalData","height","hslToRgb","index","inPoint","key","length","linear","lookAt","loop_in","loop_out","loopIn","loopInDuration","loopOut","loopOutDuration","mask","mod","mul","name","nearestKey","normalize","numKeys","obj","outPoint","position","posterizeTime","propertyIndex","radians_to_degrees","radiansToDegrees","random","randSeed","rgbToHsl","rotation","scale","seedRandom","selectorValue","smooth","sourceRectAtTime","sub","substr","substring","text","textIndex","textTotal","thisComp","thisLayer","thisProperty","time","timeToFrames","toComp","toWorld","transform","value","valueAtTime","velocity","width","wiggle","window","XMLHttpRequest",`
1
+ !function(t){"use strict";let e,s,i,r=()=>"",a=()=>!("undefined"!=typeof window&&document),n=(s=0,()=>(s++,`${r()}__lottie_element_${s}`));var o,h,l,p,m,c,d,u,f,g,y,v,b,_,x,w=((o={}).Contain="xMidYMid meet",o.Cover="xMidYMid slice",o.Initial="none",o.None="xMinYMin slice",o);class E{constructor(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1}}class C{constructor(t,e){this.type=t,this.direction=e<0?-1:1}}class S{constructor(t,e,s,i){this.type=t,this.direction=s,this.currentTime=e,this.totalTime=i}}class k{constructor(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1}}class M{constructor(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}}class P{constructor(t,e){this.type=t,this.target=e}}class A{constructor(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}}class T{constructor(t,e){this.type="configError",this.nativeError=t}}class D{addEventListener(t,e){return this._cbs[t]=this._cbs[t]??[],this._cbs[t].push(e),()=>{this.removeEventListener(t,e)}}removeEventListener(t,e){if(!e){this._cbs[t]=null;return}if(this._cbs[t]){let s=0,{length:i}=this._cbs[t];for(;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s--,i--),s++;0===this._cbs[t].length&&(this._cbs[t]=null)}}triggerEvent(t,e){if(!this._cbs[t])return;let{length:s}=this._cbs[t];for(let i=0;i<s;i++)this._cbs[t][i](e)}constructor(){this._cbs={}}}var I=((h={}).Float32="float32",h.Int16="int16",h.Int32="int32",h.Uint8="uint8",h.Uint8c="uint8c",h),F=((l={}).MouseModifier="ms",l.OffsetPathModifier="op",l.PuckerAndBloatModifier="pb",l.RepeaterModifier="rp",l.RoundCornersModifier="rd",l.TrimModifier="tm",l.ZigZagModifier="zz",l),L=((p={}).Contain="xMidYMid meet",p.Cover="xMidYMid slice",p.Initial="none",p.None="xMinYMin slice",p),$=((m={}).Canvas="canvas",m.HTML="html",m.SVG="svg",m),N=((c={}).Ellipse="el",c.Fill="fl",c.GradientFill="gf",c.GradientStroke="gs",c.Group="gr",c.Merge="mm",c.NoStyle="no",c.OffsetPath="op",c.Path="sh",c.PolygonStar="sr",c.PuckerBloat="pb",c.Rectangle="rc",c.Repeater="rp",c.RoundedCorners="rd",c.Stroke="st",c.Transform="tr",c.Trim="tm",c.Twist="tw",c.Unknown="ms",c.ZigZag="zz",c),V=((d={}).TransformEffect="transformEffect",d),R=((u={}).MultiDimensional="multidimensiional",u.Shape="shape",u.TextSelector="textSelector",u.Transform="transform",u.UniDimensional="unidimensional",u);let O={1:"butt",2:"round",3:"square"},z={1:"miter",2:"round",3:"bevel"},B={},G=(t,e)=>{B[t]=e},q=t=>{if(!B[t])throw Error("Could not get renderer");return B[t]},j=()=>{if(B.canvas)return $.Canvas;let t=Object.keys(B),{length:e}=t;for(let s=0;s<e;s++)if(B[t[s]])return t[s];return $.SVG},W="",H=()=>W,Y=(t,e)=>1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e)),U=t=>1e-5>=Math.abs(t),J=()=>!("undefined"!=typeof window&&document),X=(t,e)=>Y(t[0],e[0])&&Y(t[1],e[1]),K=(i=0,()=>(i++,`${H()}__lottie_element_${i}`)),Z=(t,e=0,s=100)=>{let i=e,r=s;if(i>r){let t=r;r=i,i=t}return Math.min(Math.max(t,i),r)},Q=()=>"undefined"!=typeof navigator,tt=t=>Symbol.iterator in Object(t)&&t.length>0,te=t=>tt(t)&&"number"==typeof t[0],ts=t=>!(!t||tt(t))&&"ShapePath"===t.constructor.name,ti=()=>!!Q()&&/^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent),tr=(t,e,s)=>{let i,r=[];for(let t=0;t<256;t++)i=t.toString(16),r[t]=1===i.length?`0${i}`:i;let a=t,n=e,o=s;return t<0&&(a=0),e<0&&(n=0),s<0&&(o=0),`#${r[a]}${r[n]}${r[o]}`};class ta{constructor(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}addAudio(t){this.audios.push(t)}createAudio(t){return this.audioFactory?this.audioFactory(t):!J()&&"Howl"in window?new window.Howl({src:[t]}):{isPlaying:!1,play:()=>{this.isPlaying=!0},playing:()=>{throw Error(`${this.constructor.name}: Method playing is not implemented`)},rate:()=>{throw Error(`${this.constructor.name}: Method rate is not implemented`)},seek:()=>{this.isPlaying=!1},setVolume:()=>{throw Error(`${this.constructor.name}: Method setVolume is not implemented`)}}}getVolume(){return this._volume}mute(){this._isMuted=!0,this._updateVolume()}pause(){for(let t of this.audios)t.pause()}resume(){for(let t of this.audios)t.resume()}setAudioFactory(t){this.audioFactory=t}setRate(t){for(let e of this.audios)e.setRate(t)}setVolume(t){this._volume=t,this._updateVolume()}unmute(){this._isMuted=!1,this._updateVolume()}_updateVolume(){let{length:t}=this.audios;for(let e=0;e<t;e++)this.audios[e].volume(!this._isMuted*this._volume)}}function tn(t,e,s,i){let r,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=()=>{if(4===a.readyState){if(200===a.status)return void s(r=to(a));try{r=to(a),s(r)}catch(t){i?.(t)}}};try{a.open("GET",t,!0)}catch(s){a.open("GET",`${e}/${t}`,!0)}a.send()}function to(t){let e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&e.includes("json")||t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}function th(t,e){let s,{length:i}=t;for(let a=0;a<i;a++)if("ks"in(s=t[a])&&!s.completed){if(s.completed=!0,s.hasMask){let t=s.masksProperties,{length:e}=t??[];for(let s=0;s<e;s++){let e=t?.[s].pt?.k;if(!e)continue;if(!tt(e)){tm(e);continue}let{length:i}=e;for(let t=0;t<i;t++){let s=e[t].e,i=e[t].s;s&&tm(s[0]),i&&tm(i[0])}}}switch(s.ty){case 0:s.layers=tl(s.refId,e),th(s.layers,e);break;case 4:tp(s.shapes);break;case 5:var r;r=s,r.t?.a?.length===0&&r.t.p}}}function tl(t,e){if(!t||!e)return;let s=function(t,e){let s=0,{length:i}=e;for(;s<i;){if(e[s].id===t)return e[s];s++}return null}(t,e);return s?.layers?s.layers.__used?JSON.parse(JSON.stringify(s.layers)):(s.layers.__used=!0,s.layers):null}function tp(t=[]){let{length:e}=t;for(let s=e-1;s>=0;s--){if(t[s].ty===N.Group){tp(t[s].it);continue}if(t[s].ty===N.Path){let e=t[s].ks?.k;if(!tt(e)){tm(e);continue}let{length:i}=e;for(let t=0;t<i;t++){let s=e[t].e,i=e[t].s;s&&tm(s[0]),i&&tm(i[0])}}}}function tm(t){if(!t)return;let{length:e}=t.i;for(let s=0;s<e;s++)t.i[s][0]+=t.v[s][0],t.i[s][1]+=t.v[s][1],t.o[s][0]+=t.v[s][0],t.o[s][1]+=t.v[s][1]}function tc(t,e){let s=e?e.split(".").map(Number):[100,100,100];return t[0]>s[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&null))}let td=(t,e,s)=>{let{length:i}=t;for(let r=0;r<i;r++)t[r].ty===s&&e(t[r])},tu=(()=>{let t=[4,4,14],e=t=>{let e=t.t?.d;t.t&&e&&(t.t.d={k:[{s:e,t:0}]})};return s=>{if(!tc(t,s.v))return;td(s.layers,e,5);let{length:i}=s.assets;for(let t=0;t<i;t++)s.assets[t].layers&&td(s.assets[t].layers,e,5)}})(),tf=(()=>{let t=[4,7,99];return e=>{if(!e.chars||tc(t,e.v))return;let{length:s}=e.chars;for(let t=0;t<s;t++){let s=e.chars[t];s.data?.shapes&&(tp(s.data.shapes),s.data.ip=0,s.data.op=99999,s.data.st=0,s.data.sr=1,s.data.ks={a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]}},e.chars[t].t||(s.data.shapes.push({ty:N.NoStyle}),s.data.shapes[0].it?.push({a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sa:{a:0,k:0},sk:{a:0,k:0},ty:N.Transform})))}}})(),tg=(()=>{let t=[5,7,15],e=t=>{let e=t.t?.p;e&&("number"==typeof e.a&&(e.a={a:0,k:e.a}),"number"==typeof e.p&&(e.p={a:0,k:e.p}),"number"==typeof e.r&&(e.r={a:0,k:e.r}))};return s=>{if(!tc(t,s.v))return;td(s.layers,e,5);let{length:i}=s.assets;for(let t=0;t<i;t++)s.assets[t].layers&&td(s.assets[t].layers,e,5)}})(),ty=(()=>{let t=[4,1,9],e=t=>{let{length:s}=t;for(let i=0;i<s;i++){if(t[i].ty===N.Group){e(t[i].it??[]);continue}if(t[i].ty!==N.Fill&&t[i].ty!==N.Stroke)continue;let s=t[i].c?.k;if(!s||"number"==typeof s)continue;if(tt(s)&&te(s)){s[0]/=255,s[1]/=255,s[2]/=255,s[3]/=255;continue}let{length:r}=s;for(let t=0;t<r;t+=1)s[t].s[0]/=255,s[t].s[1]/=255,s[t].s[2]/=255,s[t].s[3]/=255,s[t].e[0]/=255,s[t].e[1]/=255,s[t].e[2]/=255,s[t].e[3]/=255}},s=t=>{let{length:s}=t;for(let i=0;i<s;i++)4===t[i].ty&&e(t[i].shapes)};return e=>{if(!tc(t,e.v))return;s(e.layers);let{length:i}=e.assets;for(let t=0;t<i;t++)e.assets[t].layers&&s(e.assets[t].layers)}})(),tv=(()=>{let t=[4,4,18],e=t=>{let{length:s}=t;for(let i=s-1;i>=0;i--){if(t[i].ty===N.Group){e(t[i].it??[]);continue}if(t[i].ty!==N.Path)continue;let s=t[i].ks?.k;if(!s)continue;let r=!!t[i].closed;if(!tt(s)){s.c=r;continue}let{length:a}=s;for(let t=0;t<a;t+=1){let e=s[t].e,i=s[t].s;e&&(e[0].c=r),i&&(i[0].c=r)}}},s=t=>{let s,{length:i}=t;for(let r=0;r<i;r++){if((s=t[r]).hasMask){let t=s.masksProperties,{length:e}=t??[];for(let s=0;s<e;s++){let e=t?.[s].pt?.k;if(!e)continue;let i=!!t[s].cl;if(!tt(e)){e.c=i;continue}let{length:r}=e;for(let t=0;t<r;t++){let s=e[t].e,r=e[t].s;s&&(s[0].c=i),r&&(r[0].c=i)}}}4===s.ty&&e(s.shapes)}};return e=>{if(!tc(t,e.v))return;s(e.layers);let{length:i}=e.assets;for(let t=0;t<i;t++)e.assets[t].layers&&s(e.assets[t].layers)}})(),tb={checkChars:tf,checkColors:ty,checkPathProperties:tg,checkShapes:tv,completeData:function(t){t.__complete||(ty(t),tu(t),tf(t),tg(t),tv(t),th(t.layers,t.assets),function(t,e){if(!t)return;let{length:s}=t;for(let i=0;i<s;i++){if(1!==t[i].t)continue;let{data:s}=t[i];s&&(s.layers=tl(s.refId,e)),th(t[i].data?.layers??[],e)}}(t.chars,t.assets),t.__complete=!0)},completeLayers:th},t_=!1,tx=()=>t_,tw=1,tE,tC="Function not implemented.",tS={addEventListener:(t,e,s)=>{throw Error(tC)},dispatchEvent:t=>{throw Error(tC)},onerror:null,onmessage:t=>{throw Error("workerProxy: Method onmessage not implemented")},onmessageerror:null,postMessage:t=>{tE({data:t})},removeEventListener:(t,e,s)=>{throw Error(tC)},terminate:()=>{throw Error(tC)}},tk={postMessage:t=>{tS.onmessage&&tS.onmessage({AT_TARGET:2,bubbles:!1,BUBBLING_PHASE:3,cancelable:!1,cancelBubble:!1,CAPTURING_PHASE:1,composed:!1,composedPath:()=>{throw Error(tC)},currentTarget:null,data:t,defaultPrevented:!1,eventPhase:0,initEvent:(t,e,s)=>{throw Error(tC)},initMessageEvent:(t,e,s,i,r,a,n,o)=>{throw Error(tC)},isTrusted:!1,lastEventId:"",NONE:0,origin:"",ports:[],preventDefault:()=>{throw Error(tC)},returnValue:!1,source:null,srcElement:null,stopImmediatePropagation:()=>{throw Error(tC)},stopPropagation:()=>{throw Error(tC)},target:null,timeStamp:0,type:""})}},tM={};function tP(){e||((e=function(t){if(!J()&&tx()){let e=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"});return new Worker(URL.createObjectURL(e))}return tE=t,tS}(t=>{if(tk.dataManager=tk.dataManager??tb,"loadAnimation"===t.data.type)return void tn(t.data.path,t.data.fullPath,e=>{e&&tb.completeData(e),tk.postMessage({id:t.data.id,payload:e,status:"success"})},()=>{tk.postMessage({id:t.data.id,status:"error"})});if("complete"===t.data.type){let{animation:e,id:s}=t.data;tb.completeData(e),tk.postMessage({id:s,payload:e,status:"success"});return}"loadData"===t.data.type&&tn(t.data.path,t.data.fullPath,e=>{tk.postMessage({id:t.data.id,payload:e,status:"success"})},()=>{tk.postMessage({id:t.data.id,status:"error"})})})).onmessage=({data:t})=>{let{id:e,payload:s,status:i}=t,r=tM[e];if(tM[e]=null,"success"===i)return void r.onComplete(s);r.onError&&r.onError()})}function tA(t,e){tw++;let s=`processId_${tw}`;try{return tM[s]={onComplete:t,onError:e},s}catch(t){throw console.error("DataManager}:\n",t),Error("Could not create animation proccess")}}function tT(t,s,i){tP();let r=tA(s,i);e?.postMessage({fullPath:J()?t:window.location.origin+window.location.pathname,id:r,path:t,type:"loadData"})}function tD(t,s,i){tP();let r=tA(s,i);e?.postMessage({animation:t,id:r,type:"complete"})}let tI={interface:null,plugin:null},tF=()=>tI.plugin,tL=()=>tI.interface;class t${getComposition(t){let e=0,{length:s}=this.compositions;for(;e<s;){if(this.compositions[e].data&&this.compositions[e].data?.nm===t)return this.compositions[e].data?.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e++}return null}registerComposition(t){this.compositions.push(t)}constructor(){this.compositions=[],this.currentFrame=0}}let tN={current:!0},tV=()=>tN.current;function tR(t){return J()?null:document.createElement(t)}function tO(t){return J()?null:document.createElementNS("http://www.w3.org/2000/svg",t)}class tz{constructor(){this._imageLoaded=this.imageLoaded.bind(this),this._footageLoaded=this.footageLoaded.bind(this),this.testImageLoaded=this.testImageLoaded.bind(this),this.createFootageData=this.createFootageData.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[],this.proxyImage=this._createProxyImage()}createFootageData(t){let e={assetData:t,img:null};return tT(this.getAssetsPath(t,this.assetsPath,this.path),t=>{t&&(e.img=t),this._footageLoaded()},()=>{this._footageLoaded()}),e}createImageData(t){let e=this.getAssetsPath(t,this.assetsPath,this.path),s=tO("image"),i={assetData:t,img:s};return ti()?this.testImageLoaded(s):s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",()=>{this.proxyImage&&(i.img=this.proxyImage),this._imageLoaded()},!1),s.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper?.append?this._elementHelper.append(s):this._elementHelper?.appendChild(s),i}destroy(){this.imagesLoadedCb=null,this.images.length=0}footageLoaded(){this.loadedFootagesCount++,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}getAsset(t){let e=0,{length:s}=this.images;for(;e<s;){if(this.images[e].assetData===t)return this.images[e].img;e++}return null}imageLoaded(){this.loadedAssets++,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}loadAssets(t,e){this.imagesLoadedCb=e;let{length:s}=t;for(let e=0;e<s;e++)if(!t[e].layers){if((!t[e].t||"seq"===t[e].t)&&this._createImageData){this.totalImages++;let s=this._createImageData(t[e]);s&&this.images.push(s);continue}3===Number(t[e].t)&&(this.totalFootages++,this.images.push(this.createFootageData(t[e])))}}loadedFootages(){return this.totalFootages===this.loadedFootagesCount}loadedImages(){return this.totalImages===this.loadedAssets}setAssetsPath(t){this.assetsPath=t||""}setCacheType(t,e){t===$.SVG?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}setPath(t){this.path=t||""}_createProxyImage(){if(J())return null;let t=tR($.Canvas);t.width=1,t.height=1;let e=t.getContext("2d");return e&&(e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1)),t}createImgData(t){let e=this.getAssetsPath(t,this.assetsPath,this.path),s=tR("img"),i={assetData:t,img:s};return s.crossOrigin="anonymous",s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",()=>{this.proxyImage&&(i.img=this.proxyImage),this._imageLoaded()},!1),s.src=e,i}getAssetsPath(t,e,s){if(t.e)return t.p||"";if(e){let s=t.p;return s?.indexOf("images/")!==-1&&(s=s?.split("/")[1]),`${e}${s||""}`}let i=s;return i+=t.u??"",i+=t.p??""}testImageLoaded(t){if(J())return;let e=0,s=setInterval(()=>{(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(s)),e++},50)}}let tB=t=>{let e=t.split("\r\n"),s={},{length:i}=e,r=0;for(let t=0;t<i;t++){let i=e[t].split(":");2===i.length&&(s[i[0]]=i[1].trim(),r++)}if(0===r)throw Error("Could not parse markers");return s};class tG extends D{constructor(){super(),this.wrapper=null,this.autoloadSegments=!1,this.onComplete=null,this.onDestroy=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onSegmentStart=null,this._cbs={},this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=60,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.frameModifier=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=K(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=tV(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=new t$,this.imagePreloader=new tz,this.audioController=new ta(void 0),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new E("drawnFrame",0,0,0),this.expressionsPlugin=tF()}adjustSegment(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")}advanceTime(t){if(this.isPaused||!this.isLoaded)return;let e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount++,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&!0!==this.loop)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(s=!0,e=0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}checkLoaded(){if(this.isLoaded||!this.renderer.globalData?.fontManager?.isLoaded||!this.imagePreloader?.loadedImages()&&this.renderer.rendererType===$.Canvas||!this.imagePreloader?.loadedFootages())return;this.isLoaded=!0;let t=tF();t?.initExpressions(this),this.renderer.initItems(),setTimeout(()=>{this.trigger("DOMLoaded")},0),this.gotoFrame(),this.autoplay&&this.play()}checkSegments(t){return this.segments.length>0&&(this.adjustSegment(this.segments.shift()??[0,0],t),!0)}configAnimation(t){try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor((this.animationData.op||1)-(this.animationData.ip||0)),this.firstFrame=Math.round(this.animationData.ip||0)),this.renderer.configAnimation(t),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,void 0!==this.animationData.fr&&(this.frameMult=this.animationData.fr/1e3),this.renderer.searchExtraCompositions(t.assets),this.markers=function(t){let e=[],{length:s}=t;for(let i=0;i<s;i++){if("duration"in t[i]){e.push(t[i]);continue}let s={duration:t[i].dr,time:t[i].tm};try{s.payload=JSON.parse(t[i].cm)}catch(e){try{s.payload=tB(t[i].cm)}catch(e){s.payload={name:t[i].cm}}}e.push(s)}return e}(t.markers??[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}}destroy(t){t&&this.name!==t||(this.renderer.destroy(),this.imagePreloader?.destroy(),this.trigger("destroy"),this._cbs={},this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)}getAssetData(t){let e=0,{length:s}=this.assets;for(;e<s;){if(t===this.assets[e].id)return this.assets[e];e++}return null}getAssetsPath(t){let e;if(!t)return"";if(t.e)e=t.p||"";else if(this.assetsPath){let s=t.p;s?.indexOf("images/")!==-1&&(s=s?.split("/")[1]),e=this.assetsPath+(s||"")}else e=this.path+(t.u??"")+(t.p??"");return e}getDuration(t){return t?this.totalFrames:this.totalFrames/this.frameRate}getMarkerData(t){for(let e=0;e<this.markers.length;e++)if(this.markers[e].payload?.name===t)return this.markers[e];return null}getPath(){return this.path}getVolume(){return this.audioController.getVolume()}goToAndPlay(t,e,s){if(s&&this.name!==s)return;let i=Number(t);if(isNaN(i)){let e=this.getMarkerData(t);e&&(e.duration?this.playSegments([e.time,e.time+e.duration],!0):this.goToAndStop(e.time,!0))}else this.goToAndStop(i,e,s);this.play()}goToAndStop(t,e,s){if(!s||this.name===s){if(isNaN(Number(t))){let e=this.getMarkerData(t);e&&this.goToAndStop(e.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}}gotoFrame(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")}hide(){this.renderer.hide()}imagesLoaded(){this.trigger("loaded_images"),this.checkLoaded()}includeLayers(t){this.animationData.op&&t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-(this.animationData.ip||0)));let{assets:e,layers:s}=this.animationData,i,{length:r}=s,a=t.layers,{length:n}=a;for(let t=0;t<n;t++)for(i=0;i<r;){if(s[i].id===a[t].id){s[i]=a[t];break}i++}for((t.chars||t.fonts)&&(this.renderer.globalData?.fontManager?.addChars(t.chars),this.renderer.globalData?.fontManager?.addFonts(t.fonts,this.renderer.globalData.defs)),r=t.assets.length,i=0;i<r;i++)e.push(t.assets[i]);this.animationData.__complete=!1,tD(this.animationData,this.onSegmentComplete)}loadNextSegment(){let{segments:t}=this.animationData;if(!t||0===t.length||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}let e=t.shift();this.timeCompleted=Number(e?.time)*this.frameRate;let s=`${this.path+(this.fileName||"")}_${this.segmentPos}.json`;this.segmentPos++,tT(s,this.includeLayers.bind(this),()=>{this.trigger("data_failed")})}loadSegments(){let{segments:t}=this.animationData;t||(this.timeCompleted=this.totalFrames),this.loadNextSegment()}mute(t){t&&this.name!==t||this.audioController.mute()}onSegmentComplete(t){this.animationData=t;let e=tF();e?.initExpressions(this),this.loadNextSegment()}onSetupError(){this.trigger("data_failed")}pause(t){(!t||this.name===t)&&(this.isPaused||(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause()))}play(t){(!t||this.name===t)&&this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))}playSegments(t,e){if(e&&(this.segments.length=0),tt(t[0])){let{length:e}=t;for(let s=0;s<e;s++)this.segments.push(t[s])}else this.segments.push(t);this.segments.length>0&&e&&this.adjustSegment(this.segments.shift()??[0,0],0),this.isPaused&&this.play()}preloadImages(){this.imagePreloader&&(this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this)))}renderFrame(t){if(this.isLoaded)try{this.expressionsPlugin?.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}}resetSegments(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)}resize(t,e){this.renderer.updateContainerSize("number"==typeof t?t:void 0,"number"==typeof e?e:void 0)}setCurrentRawFrameValue(t){this.currentRawFrame=t,this.gotoFrame()}setData(t,e){try{let s=e;s&&"object"!=typeof s&&(s=JSON.parse(s));let i={animationData:s,wrapper:t},r=t.attributes;i.path=r.getNamedItem("data-animation-path")?.value??r.getNamedItem("data-bm-path")?.value??r.getNamedItem("bm-path")?.value??"";let a=r.getNamedItem("data-anim-type")?.value??r.getNamedItem("data-bm-type")?.value??r.getNamedItem("bm-type")?.value??r.getNamedItem("data-bm-renderer")?.value??r.getNamedItem("bm-renderer")?.value??j();Object.values($).includes(a)?i.animType=a:i.animType=$.Canvas;let n=r.getNamedItem("data-anim-loop")?.value??r.getNamedItem("data-bm-loop")?.value??r.getNamedItem("bm-loop")?.value??"";"false"===n?i.loop=!1:"true"===n?i.loop=!0:""!==n&&(i.loop=parseInt(n,10));let o=r.getNamedItem("data-anim-autoplay")?.value??r.getNamedItem("data-bm-autoplay")?.value??r.getNamedItem("bm-autoplay")?.value??!0;i.autoplay="false"!==o,i.name=r.getNamedItem("data-name")?.value??r.getNamedItem("data-bm-name")?.value??r.getNamedItem("bm-name")?.value??"";let h=r.getNamedItem("data-anim-prerender")?.value??r.getNamedItem("data-bm-prerender")?.value??r.getNamedItem("bm-prerender")?.value??"";"false"===h&&(i.prerender=!1),i.path?this.setParams(i):this.trigger("destroy")}catch(t){throw console.error(`${this.constructor.name}:
2
+ `,t),Error(`${this.constructor.name}: Could not set data`)}}setDirection(t,e){e&&this.name!==e||(this.playDirection=t<0?-1:1,this.updaFrameModifier())}setLoop(t){this.loop=t}setParams(t){try{(t.wrapper||t.container)&&(this.wrapper=t.wrapper??t.container??null);let s=$.SVG;t.animType?s=t.animType:t.renderer&&(s=t.renderer);let i=q(s);this.renderer=new i(this,t.rendererSettings),this.imagePreloader?.setCacheType(s,this.renderer.globalData?.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=s,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(`${t.loop}`,10),this.autoplay=!!(!("autoplay"in t)||t.autoplay),this.name=t.name??"",this.autoloadSegments=!!(!Object.hasOwn(t,"autoloadSegments")||t.autoloadSegments),this.assetsPath=t.assetsPath??this.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(t.path.includes("\\")?this.path=t.path.slice(0,Math.max(0,t.path.lastIndexOf("\\")+1)):this.path=t.path.slice(0,Math.max(0,t.path.lastIndexOf("/")+1)),this.fileName=t.path.slice(Math.max(0,t.path.lastIndexOf("/")+1)),this.fileName=this.fileName.slice(0,Math.max(0,this.fileName.lastIndexOf(".json"))),function(t,s,i){tP();let r=tA(s,i);e?.postMessage({fullPath:J()?t:window.location.origin+window.location.pathname,id:r,path:t,type:"loadAnimation"})}(t.path,this.configAnimation,this.onSetupError))}catch(t){throw console.error(`${this.constructor.name}:
3
+ `,t),Error(`${this.constructor.name}: Could not set params`)}}setSegment(t,e){let s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==s&&this.goToAndStop(s,!0)}setSpeed(t,e){e&&this.name!==e||(this.playSpeed=t,this.updaFrameModifier())}setSubframe(t){this.isSubframeEnabled=!!t}setupAnimation(t){tD(t,this.configAnimation)}setVolume(t,e){e&&this.name!==e||this.audioController.setVolume(t)}show(){this.renderer.show()}stop(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))}togglePause(t){t&&this.name!==t||(this.isPaused?this.play():this.pause())}trigger(t){try{if(!this._cbs[t])return;switch(t){case"enterFrame":this.triggerEvent(t,new E(t,this.currentFrame,this.totalFrames,this.frameModifier)),this.onEnterFrame?.(new E(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"drawnFrame":this.triggerEvent(t,new S(t,this.currentFrame,this.frameModifier,this.totalFrames));break;case"loopComplete":this.triggerEvent(t,new k(t,Number(this.loop),this.playCount,this.frameMult)),this.onLoopComplete?.(new k(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new C(t,this.frameMult)),this.onComplete?.(new C(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new M(t,this.firstFrame,this.totalFrames)),this.onSegmentStart?.(new M(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new P(t,this)),this.onDestroy?.(new P(t,this));break;default:this.triggerEvent(t)}}catch(t){console.error(`${this.constructor.name}:
4
+ `,t)}}triggerConfigError(t){let e=new T(t,this.currentFrame);this.triggerEvent("error",e),this.onError?.(e)}triggerRenderFrameError(t){let e=new A(t,this.currentFrame);this.triggerEvent("error",e),this.onError?.(e)}unmute(t){t&&this.name!==t||this.audioController.unmute()}updaFrameModifier(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)}updateDocumentData(t,e,s){try{let i=this.renderer.getElementByPath(t);i?.updateDocumentData([],e,s)}catch(t){console.error(this.constructor.name,t)}}waitForFontsLoaded(){if(this.renderer.globalData?.fontManager?.isLoaded)return void this.checkLoaded();setTimeout(this.waitForFontsLoaded.bind(this),20)}}let tq=!0,tj=0,tW=0,tH=0,tY=[];function tU(){tH++,!tH||!tq||J()||(window.requestAnimationFrame(tJ),tq=!1)}function tJ(t){tj=t,J()||window.requestAnimationFrame(tK)}function tX({target:t}){let e=0;if(!t)throw Error("No animation to remove");for(;e<tW;)tY[e].animation===t&&(tY.splice(e,1),e--,tW-=1,t.isPaused||tQ()),e++}function tK(t){let e=t-tj;for(let t=0;t<tW;t++)tY[t].animation.advanceTime(e);tj=t,tH&&1?J()||window.requestAnimationFrame(tK):tq=!0}function tZ(t,e){t.addEventListener("destroy",tX),t.addEventListener("_active",tU),t.addEventListener("_idle",tQ),tY.push({animation:t,elem:e}),tW++}function tQ(){tH--}let t0=Math.PI/180,t1=(()=>{function t(t,e){let s,i=[];switch(t){case I.Int16:case I.Uint8c:s=1;break;case I.Float32:case I.Int32:case I.Uint8:default:s=1.1}for(let t=0;t<e;t++)i.push(s);return i}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,s){return e===I.Float32?new Float32Array(s):e===I.Int16?new Int16Array(s):e===I.Uint8c?new Uint8ClampedArray(s):t(e,s)}:t})();function t2(t){return Array.from({length:t})}class t3{constructor(){this.props=t1(I.Float32,16),this._identity=!0,this._identityCalculated=!1,this.reset()}applyToPoint(t,e,s){return{x:t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}}applyToPointArray(t,e,s){return this.isIdentity()?[t,e,s]:[t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]]}applyToPointStringified(t,e){if(this.isIdentity())return`${t},${e}`;let s=this.props;return`${Math.round((t*s[0]+e*s[4]+s[12])*100)/100},${Math.round((t*s[1]+e*s[5]+s[13])*100)/100}`}applyToTriplePoints(t,e,s){let i=t1(I.Float32,6);if(this.isIdentity())i.set([t[0],t[1],e[0],e[1],s[0],s[1]]);else{let r=this.props[0],a=this.props[1],n=this.props[4],o=this.props[5],h=this.props[12],l=this.props[13];i.set([t[0]*r+t[1]*n+h,t[0]*a+t[1]*o+l,e[0]*r+e[1]*n+h,e[0]*a+e[1]*o+l,s[0]*r+s[1]*n+h,s[0]*a+s[1]*o+l])}return i}applyToX(t,e,s){return t*this.props[0]+e*this.props[4]+s*this.props[8]+this.props[12]}applyToY(t,e,s){return t*this.props[1]+e*this.props[5]+s*this.props[9]+this.props[13]}applyToZ(t,e,s){return t*this.props[2]+e*this.props[6]+s*this.props[10]+this.props[14]}clone(t){return t.props.set(this.props),t}cloneFromProps(t){return this.props.set(t),this}equals(t){return this.props.every((e,s)=>e===t?.props[s])}getInverseMatrix(){let t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,s=-this.props[1]/t,i=-this.props[4]/t,r=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,n=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new t3;return o.setTransform(e,s,0,0,i,r,0,0,0,0,1,0,a,n,0,1),o}inversePoint(t){return this.getInverseMatrix().applyToPoint(t[0],t[1],t[2]||0)}inversePoints(t){return t.map(t=>this.inversePoint(t))}isIdentity(){return this._identityCalculated||(this._identity=1===this.props[0]&&0===this.props[1]&&0===this.props[2]&&0===this.props[3]&&0===this.props[4]&&1===this.props[5]&&0===this.props[6]&&0===this.props[7]&&0===this.props[8]&&0===this.props[9]&&1===this.props[10]&&0===this.props[11]&&0===this.props[12]&&0===this.props[13]&&0===this.props[14]&&1===this.props[15],this._identityCalculated=!0),this._identity}multiply(t){return this.transform(...t.props)}reset(){return this.props.set([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this}rotate(t){if(!t)return this;let e=Math.cos(t),s=Math.sin(t);return this._t(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1)}rotateX(t){if(!t)return this;let e=Math.cos(t),s=Math.sin(t);return this._t(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1)}rotateY(t){if(!t)return this;let e=Math.cos(t),s=Math.sin(t);return this._t(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1)}rotateZ(t){return this.rotate(t)}scale(t,e,s=1){return 1===t&&1===e&&1===s?this:this._t(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1)}setTransform(t,e,s,i,r,a,n,o,h,l,p,m,c,d,u,f){return this.props.set([t,e,s,i,r,a,n,o,h,l,p,m,c,d,u,f]),this}shear(t,e){return this._t(1,e,t,1,0,0)}skew(t,e){return this.shear(Math.tan(t),Math.tan(e))}skewFromAxis(t,e){let s=Math.cos(e),i=Math.sin(e);return this._t(s,i,0,0,-i,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,Math.tan(t),1,0,0,0,0,1,0,0,0,0,1)._t(s,-i,0,0,i,s,0,0,0,0,1,0,0,0,0,1)}to2dCSS(){let t=this.roundMatrixProperty(this.props[0]),e=this.roundMatrixProperty(this.props[1]),s=this.roundMatrixProperty(this.props[4]),i=this.roundMatrixProperty(this.props[5]),r=this.roundMatrixProperty(this.props[12]),a=this.roundMatrixProperty(this.props[13]);return`matrix(${t},${e},${s},${i},${r},${a})`}toCSS(){let t="matrix3d(";for(let e=0;e<16;e++)t+=`${Math.round(1e4*this.props[e])/1e4}`+(15===e?")":",");return t}transform(t,e,s,i,r,a,n,o,h,l,p,m,c,d,u,f){let g=this.props;if(1===t&&0===e&&0===s&&0===i&&0===r&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return g[12]=g[12]*t+g[15]*c,g[13]=g[13]*a+g[15]*d,g[14]=g[14]*p+g[15]*u,g[15]*=f,this._identityCalculated=!1,this;let y=g[0],v=g[1],b=g[2],_=g[3],x=g[4],w=g[5],E=g[6],C=g[7],S=g[8],k=g[9],M=g[10],P=g[11],A=g[12],T=g[13],D=g[14],I=g[15];return g[0]=y*t+v*r+b*h+_*c,g[1]=y*e+v*a+b*l+_*d,g[2]=y*s+v*n+b*p+_*u,g[3]=y*i+v*o+b*m+_*f,g[4]=x*t+w*r+E*h+C*c,g[5]=x*e+w*a+E*l+C*d,g[6]=x*s+w*n+E*p+C*u,g[7]=x*i+w*o+E*m+C*f,g[8]=S*t+k*r+M*h+P*c,g[9]=S*e+k*a+M*l+P*d,g[10]=S*s+k*n+M*p+P*u,g[11]=S*i+k*o+M*m+P*f,g[12]=A*t+T*r+D*h+I*c,g[13]=A*e+T*a+D*l+I*d,g[14]=A*s+T*n+D*p+I*u,g[15]=A*i+T*o+D*m+I*f,this._identityCalculated=!1,this}translate(t,e,s){let i=s||0;return 0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}_t(...t){return this.transform(...t)}roundMatrixProperty(t){return t<1e-6&&t>0||t>-1e-6&&t<0?Math.round(1e4*t)/1e4:t}}class t5{init(t){this.effectsManager=t,this.type=V.TransformEffect,this.matrix=new t3,this.opacity=-1,this._mdf=!1,this._opMdf=!1}renderFrame(t){if(this._opMdf=!1,this._mdf=!1,!t&&!this.effectsManager?._mdf)return;let e=this.effectsManager?.effectElements??[],s=e[0].p.v,i=e[1].p.v,r=1===e[2].p.v,a=e[3].p.v,n=r?a:e[4].p.v,o=e[5].p.v,h=e[6].p.v,l=e[7].p.v;this.matrix?.reset(),this.matrix?.translate(-s[0],-s[1],s[2]),this.matrix?.scale(.01*n,.01*a,1),this.matrix?.rotate(-l*t0),this.matrix?.skewFromAxis(-o*t0,(h+90)*t0),this.matrix?.translate(i[0],i[1],0),this._mdf=!0,this.opacity!==e[8].p.v&&(this.opacity=e[8].p.v,this._opMdf=!0)}constructor(){this.opacity=1}}class t4{createMergeNode(t,e){let s,i=tO("feMerge");i.setAttribute("result",t);let{length:r}=e;for(let t=0;t<r;t++)(s=tO("feMergeNode")).setAttribute("in",e[t]),i.appendChild(s),i.appendChild(s);return i}}let t6=[],t8="",t9=()=>t8,t7="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0",et={};class ee{constructor(t){let e,{length:s}=t.data.ef??[];this.filters=[];for(let i=0;i<s;i++){e=null;let s=t.data.ef?.[i].ty;s&&et[s]&&(e=new et[s].effect(t.effectsManager?.effectElements[i],t)),e&&this.filters.push(e)}this.filters.length>0&&t.addRenderableComponent(this)}getEffects(t){let{length:e}=this.filters,s=[];for(let i=0;i<e;i++)this.filters[i].type===t&&s.push(this.filters[i]);return s}renderFrame(t){let{length:e}=this.filters;for(let s=0;s<e;s++)this.filters[s].renderFrame(t)}}let es={createAlphaToLuminanceFilter:function(){let t=tO("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},createFilter:function(t,e){let s=tO("filter");return s.id=t,e||(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%")),s}},ei="filter_result_",er={};class ea{constructor(t){let e,s="SourceGraphic",i=K(),r=es.createFilter(i,!0),a=0;this.filters=[];let{length:n}=t.data.ef??[];for(let i=0;i<n;i++){e=null;let{ty:n}=t.data.ef?.[i]??{ty:null},o=null!==n&&er[n]?er[n].effect:null;o&&n&&t.effectsManager&&(e=new o(r,t.effectsManager.effectElements[i],t,`${ei}${a}`,s),s=`${ei}${a}`,er[n]?.countsAsEffect&&a++),e&&this.filters.push(e)}a&&(t.globalData?.defs.appendChild(r),t.layerElement?.setAttribute("filter",`url(${t9()}#${i})`)),this.filters.length>0&&t.addRenderableComponent(this)}getEffects(t){let{length:e}=this.filters,s=[];for(let i=0;i<e;i++)this.filters[i].type===t&&s.push(this.filters[i]);return s}renderFrame(t){let{length:e}=this.filters;for(let s=0;s<e;s++)this.filters[s].renderFrame(t)}}let en=(t,e,s)=>{er[t]={countsAsEffect:s,effect:e}};class eo{constructor(t,e,s){this._length=0,this._maxLength=t,this._create=e,this._release=s,this.pool=t2(this._maxLength),this.newElement=this.newElement.bind(this),this.release=this.release.bind(this)}newElement(){let t;return this._length?(this._length-=1,t=this.pool[this._length]):t=this._create(),t}release(t){if(this._length===this._maxLength){var e;this.pool=[...e=this.pool,...t2(e.length)],this._maxLength*=2}this._release&&this._release(t),this.pool[this._length]=t,this._length++}}let eh=new eo(8,()=>t1(I.Float32,2));class el{constructor(){this.lengths=[],this.c=!1,this._length=0,this._maxLength=8,this.v=t2(this._maxLength),this.o=t2(this._maxLength),this.i=t2(this._maxLength)}doubleArrayLength(){this.v=[...this.v,...t2(this._maxLength)],this.i=[...this.i,...t2(this._maxLength)],this.o=[...this.o,...t2(this._maxLength)],this._maxLength*=2}length(){return this._length}reverse(){let t=new el;t.setPathData(this.c,this._length);let e=this.v,s=this.o,i=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),r=1);let{_length:a}=this,n=a-1;for(let o=r;o<a;o++)t.setTripleAt(e[n][0],e[n][1],i[n][0],i[n][1],s[n][0],s[n][1],o,!1),n-=1;return t}setLength(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t}setPathData(t,e){this.c=t,this.setLength(e);let s=0;for(;s<e;)this.v[s]=eh.newElement(),this.o[s]=eh.newElement(),this.i[s]=eh.newElement(),s++}setTripleAt(t,e,s,i,r,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(s,i,"o",n,o),this.setXYAt(r,a,"i",n,o)}setXYAt(t,e,s,i,r){let a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}a[i]&&(!a[i]||r)||(a[i]=eh.newElement()),a[i][0]=t,a[i][1]=e}}let ep=new eo(4,function(){return new el},function(t){if(!ts(t))return;let e=t._length;for(let s=0;s<e;s++)eh.release(t.v[s]),eh.release(t.i[s]),eh.release(t.o[s]),t.v[s]=null,t.i[s]=null,t.o[s]=null;t._length=0,t.c=!1}),{newElement:em}=ep,{release:ec}=ep;function ed(t){let e=em(),s=t._length??t.v.length;e.setLength(s),e.c=t.c;for(let i=0;i<s;i++)e.setTripleAt(t.v[i][0],t.v[i][1],t.o[i][0],t.o[i][1],t.i[i][0],t.i[i][1],i);return e}let eu={clone:ed,newElement:em};class ef{constructor(){this._length=0,this._maxLength=4,this.shapes=t2(this._maxLength)}addShape(t){this._length===this._maxLength&&(this.shapes=[...this.shapes,...t2(this._maxLength)],this._maxLength*=2),this.shapes[this._length]=t,this._length++}releaseShapes(){for(let t=0;t<this._length;t++)ec(this.shapes[t]);this._length=0}}function eg(){return new ef}t2(4);let ey={default:150},ev=()=>ey.default,eb=new eo(8,()=>({addedLength:0,lengths:t1(I.Float32,ev()),percents:t1(I.Float32,ev())})),e_=new eo(8,()=>({lengths:[],totalLength:0}),t=>{if(!ts(t))return;let{length:e}=t.lengths;for(let s=0;s<e;s++)eb.release(t.lengths[s]);t.lengths.length=0}),ex=t1(I.Float32,8);function ew(t,e,s,i){let r={},a=`${t[0]}_${t[1]}_${e[0]}_${e[1]}_${s[0]}_${s[1]}_${i[0]}_${i[1]}`.replaceAll(".","p");if(!r[a]){let n=ev(),o,h,l=0,p,m,c=null;2===t.length&&(t[0]!==e[0]||t[1]!==e[1])&&eS(t[0],t[1],e[0],e[1],t[0]+s[0],t[1]+s[1])&&eS(t[0],t[1],e[0],e[1],e[0]+i[0],e[1]+i[1])&&(n=2);let d=new eA(n),{length:u}=s;for(let r=0;r<n;r++){m=t2(u),h=r/(n-1),p=0;for(let r=0;r<u;r++)o=Math.pow(1-h,3)*t[r]+3*Math.pow(1-h,2)*h*(t[r]+s[r])+3*(1-h)*Math.pow(h,2)*(e[r]+i[r])+Math.pow(h,3)*e[r],m[r]=o,null!==c&&(p+=Math.pow(Number(m[r])-Number(c[r]),2));l+=p=Math.sqrt(p),d.points[r]=new eT(p,m),c=m}d.segmentLength=l,r[a]=d}return r[a]}function eE(t,e,s,i,r,a,n){let o=r,h=a;o<0?o=0:o>1&&(o=1);let l=eP(o,n),p=eP(h=h>1?1:h,n),m=1-l,c=1-p,d=m*m*m,u=l*m*m*3,f=l*l*m*3,g=l*l*l,y=m*m*c,v=l*m*c+m*l*c+m*m*p,b=l*l*c+m*l*p+l*m*p,_=l*l*p,x=m*c*c,w=l*c*c+m*p*c+m*c*p,E=l*p*c+m*p*p+l*c*p,C=l*p*p,S=c*c*c,k=p*c*c+c*p*c+c*c*p,M=p*p*c+c*p*p+p*c*p,P=p*p*p,{length:A}=t;for(let r=0;r<A;r++)ex[4*r]=Math.round((d*t[r]+u*s[r]+f*i[r]+g*e[r])*1e3)/1e3,ex[4*r+1]=Math.round((y*t[r]+v*s[r]+b*i[r]+_*e[r])*1e3)/1e3,ex[4*r+2]=Math.round((x*t[r]+w*s[r]+E*i[r]+C*e[r])*1e3)/1e3,ex[4*r+3]=Math.round((S*t[r]+k*s[r]+M*i[r]+P*e[r])*1e3)/1e3;return ex}function eC(t){let e,s=e_.newElement(),i=t.c,r=t.v,a=t.o,n=t.i,o=t._length||0,{lengths:h}=s,l=0;for(e=0;e<o-1;e++)h[e]=eM(r[e],r[e+1],a[e],n[e+1]),l+=h[e].addedLength;return i&&o&&(h[e]=eM(r[e],r[0],a[e],n[0]),l+=h[e].addedLength),s.totalLength=l,s}function eS(t,e,s,i,r,a){let n=t*i+e*r+s*a-r*i-a*t-s*e;return n>-.001&&n<.001}function ek(t,e,s,i,r,a,n,o,h){let l;if(0===s&&0===a&&0===h)return eS(t,e,i,r,n,o);let p=Math.sqrt(Math.pow(i-t,2)+Math.pow(r-e,2)+Math.pow(a-s,2)),m=Math.sqrt(Math.pow(n-t,2)+Math.pow(o-e,2)+Math.pow(h-s,2)),c=Math.sqrt(Math.pow(n-i,2)+Math.pow(o-r,2)+Math.pow(h-a,2));return(l=p>m?p>c?p-m-c:c-m-p:c>m?c-m-p:m-p-c)>-1e-4&&l<1e-4}function eM(t,e,s,i){let r=ev(),a,n,o=0,h,l=[],p=[],m=eb.newElement(),c=s.length;for(let d=0;d<r;d++){n=d/(r-1),h=0;for(let r=0;r<c;r++)a=Math.pow(1-n,3)*t[r]+3*Math.pow(1-n,2)*n*s[r]+3*(1-n)*Math.pow(n,2)*i[r]+Math.pow(n,3)*e[r],l[r]=a,"number"==typeof p[r]&&(h+=Math.pow(l[r]-p[r],2)),p[r]=l[r];h&&(o+=h=Math.sqrt(h)),m.percents[d]=n,m.lengths[d]=o}return m.addedLength=o,m}function eP(t,{addedLength:e,lengths:s,percents:i}){let{length:r}=i,a=Math.floor((r-1)*t),n=t*e,o=0;if(a===r-1||0===a||n===s[a])return i[a];let h=s[a]>n?-1:1,l=!0;for(;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}class eA{constructor(t){this.segmentLength=0,this.points=Array.from({length:t})}}class eT{constructor(t,e){this.partialLength=t,this.point=e}}let eD={getPointInSegment:function(t,e,s,i,r,a){let n=eP(r,a),o=1-n;return[Math.round((o*o*o*t[0]+(n*o*o+o*n*o+o*o*n)*s[0]+(n*n*o+o*n*n+n*o*n)*i[0]+n*n*n*e[0])*1e3)/1e3,Math.round((o*o*o*t[1]+(n*o*o+o*n*o+o*o*n)*s[1]+(n*n*o+o*n*n+n*o*n)*i[1]+n*n*n*e[1])*1e3)/1e3]},getSegmentsLength:eC},eI={};function eF(t,e,s,i,r){let a=r||`bez_${t}_${e}_${s}_${i}`.replaceAll(".","p");if(eI[a])return eI[a];let n=new eL([t,e,s,i]);return eI[a]=n,n}class eL{constructor(t){this.float32ArraySupported="function"==typeof Float32Array,this.kSplineTableSize=11,this.kSampleStepSize=1/(this.kSplineTableSize-1),this.NEWTON_ITERATIONS=4,this.NEWTON_MIN_SLOPE=.001,this.SUBDIVISION_MAX_ITERATIONS=10,this.SUBDIVISION_PRECISION=1e-7,this._p=t,this._mSampleValues=this.float32ArraySupported?new Float32Array(this.kSplineTableSize):Array.from({length:this.kSplineTableSize}),this._precomputed=!1,this.get=this.get.bind(this)}_calcSampleValues(){let t=this._p[0],e=this._p[2];for(let s=0;s<this.kSplineTableSize;++s)this._mSampleValues[s]=this.calcBezier(s*this.kSampleStepSize,t,e)}_getTForX(t){let e=this._p[0],s=this._p[2],i=this._mSampleValues,r=0,a=1,n=this.kSplineTableSize-1;for(;a!==n&&Number(i[a])<=t;++a)r+=this.kSampleStepSize;let o=r+(t-Number(i[--a]))/(Number(i[a+1])-Number(i[a]))*this.kSampleStepSize,h=this.getSlope(o,e,s);return h>=this.NEWTON_MIN_SLOPE?this.newtonRaphsonIterate(t,o,e,s):0===h?o:this.binarySubdivide(t,r,r+this.kSampleStepSize,e,s)}_precompute(){let t=this._p[0],e=this._p[1],s=this._p[2],i=this._p[3];this._precomputed=!0,(t!==e||s!==i)&&this._calcSampleValues()}get(t){let e=this._p[0],s=this._p[1],i=this._p[2],r=this._p[3];return(this._precomputed||this._precompute(),e===s&&i===r)?t:0===t?0:1===t?1:this.calcBezier(this._getTForX(t),s,r)}A(t,e){return 1-3*e+3*t}B(t,e){return 3*e-6*t}binarySubdivide(t,e,s,i,r){let a=e,n=s,o,h,l=0;do h=a+(n-a)/2,(o=this.calcBezier(h,i,r)-t)>0?n=h:a=h;while(Math.abs(o)>this.SUBDIVISION_PRECISION&&++l<this.SUBDIVISION_MAX_ITERATIONS);return h}C(t){return 3*t}calcBezier(t,e,s){return((this.A(e,s)*t+this.B(e,s))*t+this.C(e))*t}getSlope(t,e,s){return 3*this.A(e,s)*t*t+2*this.B(e,s)*t+this.C(e)}newtonRaphsonIterate(t,e,s,i){let r=e;for(let e=0;e<this.NEWTON_ITERATIONS;++e){let e=this.getSlope(r,s,i);if(0===e)break;let a=this.calcBezier(r,s,i)-t;r-=a/e}return r}}class e${addDynamicProperty(t){this.dynamicProperties.includes(t)||(this.dynamicProperties.push(t),this.container?.addDynamicProperty(this),this._isAnimated=!0)}getValue(t){throw Error(`${this.constructor.name}: Method getValue is not implemented`)}initDynamicPropertyContainer(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}iterateDynamicProperties(){this._mdf=!1;let{length:t}=this.dynamicProperties;for(let e=0;e<t;e++)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0);return 0}setGroupProperty(t){}constructor(){this.dynamicProperties=[]}}let eN=(t,e)=>{let s=e[0],i=e[1],r=e[2],a=e[3],n=Math.atan2(2*i*a-2*s*r,1-2*i*i-2*r*r),o=Math.asin(2*s*i+2*r*a),h=Math.atan2(2*s*a-2*i*r,1-2*s*s-2*r*r);t[0]=n/t0,t[1]=o/t0,t[2]=h/t0},eV=t=>{let e=t[0]*t0,s=t[1]*t0,i=t[2]*t0,r=Math.cos(e/2),a=Math.cos(s/2),n=Math.cos(i/2),o=Math.sin(e/2),h=Math.sin(s/2),l=Math.sin(i/2);return[o*h*n+r*a*l,o*a*n+r*h*l,r*h*n-o*a*l,r*a*n-o*h*l]},eR=(t,e,s)=>{let i=[0,0,0,0],r=t[0],a=t[1],n=t[2],o=t[3],h=e[0],l=e[1],p=e[2],m=e[3],c,d,u,f,g;return(d=r*h+a*l+n*p+o*m)<0&&(d=-d,h=-h,l=-l,p=-p,m=-m),1-d>1e-6?(u=Math.sin(c=Math.acos(d)),f=Math.sin((1-s)*c)/u,g=Math.sin(s*c)/u):(f=1-s,g=s),i[0]=f*r+g*h,i[1]=f*a+g*l,i[2]=f*n+g*p,i[3]=f*o+g*m,i};class eO extends e${addEffect(t){this.effectsSequence.push(t),this.container?.addDynamicProperty(this)}getSpeedAtTime(t){throw Error(`${this.constructor.name}: Method getSpeedAtTime is not implemented`)}getValueAtCurrentTime(){if(this._caching=this._caching??{},!this.keyframes)return;let t=Number(this.offsetTime),e=Number(this.comp?.renderedFrame)-t,s=this.keyframes[0].t-t,i=this.keyframes.length-1,r=this.keyframes[i].t-t,a=Number(this._caching.lastFrame);if(!(e===a||-999999!==a&&(a>=r&&e>=r||a<s&&e<s))){a>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);let t=this.interpolateValue(e,this._caching);this.pv=t}return this._caching.lastFrame=e,this.pv}getValueAtTime(t,e){throw Error(`${this.constructor.name}: Method getValueAtTime is not implemented`)}getVelocityAtTime(t){throw Error(`${this.constructor.name}: Method getVelocityAtTime is not implemented`)}initiateExpression(t,e,s){throw Error("Method not implemented")}interpolateValue(t,e={}){let s,i=Number(this.offsetTime),r=[0,0,0];this.propType===R.MultiDimensional&&this.pv&&(r=t1(I.Float32,this.pv.length));let{keyframes:a=[],keyframesMetadata:n,propType:o}=this,h=e.lastIndex||0,l=h,p=a.length-1,m=!0,c=a[0],d=a[1];for(;m;){if(c=a[l],d=a[l+1],l===p-1&&t>=d.t-i){c.h&&(c=d),h=0;break}if(d.t-i>t){h=l;break}l<p-1?l++:(h=0,m=!1)}let u=n[l]??{},f,g,y,v,b=null,_=d.t-i,x=c.t-i;if(c.to&&c.s){u.bezierData=u.bezierData??ew(c.s,d.s??c.e,c.to,c.ti);let{__fnct:s,bezierData:i}=u;if(t>=_||t<x){let e=t>=_?i.points.length-1:0;f=i.points[e].point.length;for(let t=0;t<f;t++)r[t]=i.points[e].point[t]}else{s?b=s:u.__fnct=b=eF(c.o.x,c.o.y,c.i.x,c.i.y,c.n).get,g=b((t-x)/(_-x));let a=i.segmentLength*g,n,o=Number(e.lastFrame)<t&&e._lastKeyframeIndex===l?e._lastAddedLength:0;for(v=Number(e.lastFrame)<t&&e._lastKeyframeIndex===l?e._lastPoint:0,m=!0,y=i.points.length;m;){if(o+=i.points[v].partialLength,0===a||0===g||v===i.points.length-1){f=i.points[v].point.length;for(let t=0;t<f;t++)r[t]=i.points[v].point[t];break}if(a>=o&&a<o+i.points[v+1].partialLength){n=(a-o)/i.points[v+1].partialLength,f=i.points[v].point.length;for(let t=0;t<f;t++)r[t]=i.points[v].point[t]+(i.points[v+1].point[t]-i.points[v].point[t])*n;break}v<y-1?v++:m=!1}e._lastPoint=v,e._lastAddedLength=o-i.points[v].partialLength,e._lastKeyframeIndex=l}}else{let e,i,a,n,h;if(p=c.s?.length||0,s=d.s??c.e,this.sh&&1!==c.h)t>=_?(r[0]=s[0],r[1]=s[1],r[2]=s[2]):t<=x&&c.s?(r[0]=c.s[0],r[1]=c.s[1],r[2]=c.s[2]):eN(r,eR(eV(c.s),eV(s),(t-x)/(_-x)));else for(l=0;l<p;l++)1!==c.h&&(t>=_?g=1:t<x?g=0:(c.o.x.constructor===Array?(u.__fnct=u.__fnct??[],u.__fnct[l]?b=u.__fnct[l]:tt(c.o.y)&&tt(c.i.y)&&tt(c.i.x)&&(e=c.o.x[l]??c.o.x[0],i=c.o.y[l]??c.o.y[0],b=eF(e,i,a=c.i.x[l]??c.i.x[0],c.i.y[l]??c.i.y[0]).get,u.__fnct[l]=b)):u.__fnct?b=u.__fnct:(e=c.o.x,i=c.o.y,b=eF(e,i,a=c.i.x,c.i.y).get,c.keyframeMetadata=b),g=b?.((t-x)/(_-x)))),s=d.s??c.e,void 0!==(h=1===c.h?c.s?.[l]:Number(c.s?.[l])+(s[l]-Number(c.s?.[l]))*Number(g))&&(o===R.MultiDimensional?r[l]=h:r=h)}return e.lastIndex=h,r}processEffectsSequence(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.elem)throw Error(`${this.constructor.name}: elem (ElementInterface) is not implemented`);if(this.elem.globalData?.frameId===this.frameId)return 0;if(0===this.effectsSequence.length)return this._mdf=!1,0;if(this.lock&&this.pv)return this.setVValue(this.pv),0;this.lock=!0,this._mdf=!!this._isFirstFrame;let t=this.effectsSequence.length,e=this.kf?this.pv:this.data.k;for(let s=0;s<t;s++)e=this.effectsSequence[s](e);return this.setVValue(e),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData?.frameId,0}setVValue(t){let e;if("number"==typeof t&&this.propType===R.UniDimensional){e=t*Number(this.mult),Math.abs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);return}let s=0,{length:i}=this.v;for(;s<i;)e=t[s]*Number(this.mult),Math.abs(this.v[s]-e)>1e-5&&(this.v[s]=e,this._mdf=!0),s++}speedAtTime(t){throw Error("Method is not implemented")}valueAtTime(t,e){throw Error(`${this.constructor.name}: Method valueAtTime is not implemented`)}velocityAtTime(t){throw Error("Method is not implemented")}constructor(...t){super(...t),this.effectsSequence=[],this.initFrame=-999999,this.keyframesMetadata=[],this.offsetTime=0}}class ez extends eO{constructor(t,e,s=null,i=null){let r,a,n,o;super(),this.propType=R.MultiDimensional;let{length:h}=e.k;for(let t=0;t<h-1;t++)e.k[t].to&&e.k[t].s&&e.k[t+1]?.s&&(r=e.k[t].s,a=e.k[t+1].s,n=e.k[t].to,o=e.k[t].ti,(2===r.length&&(r[0]!==a[0]||r[1]!==a[1])&&eS(r[0],r[1],a[0],a[1],r[0]+n[0],r[1]+n[1])&&eS(r[0],r[1],a[0],a[1],a[0]+o[0],a[1]+o[1])||3===r.length&&(r[0]!==a[0]||r[1]!==a[1]||r[2]!==a[2])&&ek(r[0],r[1],r[2],a[0],a[1],a[2],r[0]+n[0],r[1]+n[1],r[2]+n[2])&&ek(r[0],r[1],r[2],a[0],a[1],a[2],a[0]+o[0],a[1]+o[1],a[2]+o[2]))&&(e.k[t].to=null,e.k[t].ti=null),(r[0]===a[0]&&r[1]===a[1]&&0===n[0]&&0===n[1]&&0===o[0]&&0===o[1]&&2===r.length||r[2]===a[2]&&0===n[2]&&0===o[2])&&(e.k[t].to=null,e.k[t].ti=null));this.effectsSequence=[this.getValueAtCurrentTime.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=this.processEffectsSequence,this.frameId=-1;let l=e.k[0].s?.length||0;this.v=t1(I.Float32,l),this.pv=t1(I.Float32,l);for(let t=0;t<l;t++)this.v[t]=this.initFrame,this.pv[t]=this.initFrame;this._caching={lastFrame:this.initFrame,lastIndex:0,value:t1(I.Float32,l)}}}class eB extends eO{constructor(t,e,s=null,i=null){super(),this.propType=R.UniDimensional,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={_lastKeyframeIndex:-1,lastFrame:this.initFrame,lastIndex:0,value:0},this.k=!0,this.kf=!0,this.data=e,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=this.initFrame,this.pv=this.initFrame,this._isFirstFrame=!0,this.getValue=this.processEffectsSequence,this.effectsSequence=[this.getValueAtCurrentTime.bind(this)]}}class eG extends eO{constructor(t,e,s=null,i=null){super(),this.propType=R.MultiDimensional,this.mult=s||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;let{length:r}=e.k;this.v=t1(I.Float32,r),this.pv=t1(I.Float32,r),this.vel=t1(I.Float32,r);for(let t=0;t<r;t++)this.v[t]=e.k[t]*this.mult,this.pv[t]=e.k[t];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=this.processEffectsSequence}}class eq extends eO{constructor(){super(),this.propType=!1}}class ej extends eO{constructor(t,e,s=null,i=null){super(),this.propType=R.UniDimensional,this.mult=s||1,this.data=e,this.v=e.k*(s||1),this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=this.processEffectsSequence}}let eW={getProp:function(t,e,s,i,r){let a,n=e;if(n&&"sid"in n&&n.sid&&(n=t.globalData?.slotManager?.getProp(n)),n?.k?.length)if("number"==typeof(n?.k)[0])a=new eG(t,n,i,r);else switch(s){case 0:a=new eB(t,n,i,r);break;case 1:a=new ez(t,n,i,r)}else a=new ej(t,n,i,r);return(a=a??new eq).effectsSequence.length>0&&r?.addDynamicProperty(a),a}};class eH extends e${getValueAtTime(t,e){throw Error(`${this.constructor.name}: Method getShapeValueAtTime is not implemented`)}initiateExpression(t,e,s){throw Error(`${this.constructor.name}: Method initiateExpression is not implemented`)}interpolateShape(t,e,s={}){let i=s.lastIndex||0,r,a,n,o=0,h,l=this.keyframes??[];if(t<l[0].t-this.offsetTime)r=l[0].s?.[0],n=!0,i=0;else if(t>=l[l.length-1].t-this.offsetTime)r=l[l.length-1].s?l[l.length-1].s?.[0]:l[l.length-2].e[0],n=!0;else{let e,s,h=i,p=l.length-1,m=!0;for(;m&&(e=l[h],!((s=l[h+1]).t-this.offsetTime>t));)h<p-1?h++:m=!1;if(!e||!s)throw Error(`${this.constructor.name}: Could not set keyframe data`);let c=this.keyframesMetadata[h]||{};if(n=1===e.h,i=h,!n){if(t>=s.t-this.offsetTime)o=1;else if(t<e.t-this.offsetTime)o=0;else{let i;c.__fnct?i=c.__fnct:"number"==typeof e.o.x&&"number"==typeof e.o.y&&"number"==typeof e.i.x&&"number"==typeof e.i.y&&(c.__fnct=i=eF(e.o.x,e.o.y,e.i.x,e.i.y).get),o=i?.((t-(e.t-this.offsetTime))/(s.t-this.offsetTime-(e.t-this.offsetTime)))||0}a=s.s?s.s[0]:e.e[0]}r=e.s?.[0]}if(!r||"number"==typeof r||tt(r)||"number"==typeof a)return;let p=e._length,m=r.i[0].length;s.lastIndex=i;for(let t=0;t<p;t++)for(let s=0;s<m;s++)h=n?r.i[t][s]:r.i[t][s]+((a?.i[t][s]??0)-r.i[t][s])*o,e.i[t][s]=h,h=n?r.o[t][s]:r.o[t][s]+((a?.o[t][s]??0)-r.o[t][s])*o,e.o[t][s]=h,h=n?r.v[t][s]:r.v[t][s]+((a?.v[t][s]??0)-r.v[t][s])*o,e.v[t][s]=h}interpolateShapeCurrentTime(){if(!this.pv)throw Error(`${this.constructor.name}: Cannot parse ShapePath v value`);if(!this.keyframes)return;this._caching=this._caching??{};let t=Number(this.comp?.renderedFrame)-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=Number(this._caching.lastFrame);return -999999!==i&&(i<e&&t<e||i>s&&t>s)||(this._caching.lastIndex=i<t?Number(this._caching.lastIndex):0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}processEffectsSequence(t){let e,s;if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);if(this.elem?.globalData?.frameId===this.frameId)return 0;if(0===this.effectsSequence.length)return this._mdf=!1,0;if(this.lock&&this.pv)return this.setVValue(this.pv),0;this.lock=!0,this._mdf=!1,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt?.k;let i=this.effectsSequence.length;for(s=0;s<i;s++)e=this.effectsSequence[s](e);return this.setVValue(e),this.lock=!1,this.frameId=this.elem?.globalData?.frameId||0,0}reset(){this.paths=this.localShapeCollection}setVValue(t){if(!this.v||!t)throw Error(`${this.constructor.name}: ShapePath is not set`);if(!this.localShapeCollection)throw Error(`${this.constructor.name}: localShapeCollection is not set`);this.shapesEqual(this.v,t)||(this.v=ed(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}shapesEqual(t,e){if(t._length!==e._length||t.c!==e.c)return!1;let s=t._length||0;for(let i=0;i<s;i++)if(t.v[i]?.[0]!==e.v[i]?.[0]||t.v[i]?.[1]!==e.v[i]?.[1]||t.o[i]?.[0]!==e.o[i]?.[0]||t.o[i]?.[1]!==e.o[i]?.[1]||t.i[i]?.[0]!==e.i[i]?.[0]||t.i[i]?.[1]!==e.i[i]?.[1])return!1;return!0}constructor(...t){super(...t),this.effectsSequence=[],this.keyframesMetadata=[],this.offsetTime=0}}class eY extends eH{constructor(t,e){super(),this._cPoint=.5519,this.v=em(),this.v.setPathData(!0,4),this.localShapeCollection=eg(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=eW.getProp(t,e.p,1,0,this),this.s=eW.getProp(t,e.s,1,0,this),this.dynamicProperties.length>0?this.k=!0:(this.k=!1,this.convertEllToPath())}convertEllToPath(){if(!this.p)return;let t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,r=3!==this.d,a=this.v;if(!a)throw Error(`${this.constructor.name}: Could not get value of ellipse`);a.v[0][0]=t,a.v[0][1]=e-i,a.v[1][0]=r?t+s:t-s,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+i,a.v[3][0]=r?t-s:t+s,a.v[3][1]=e,a.i[0][0]=r?t-s*this._cPoint:t+s*this._cPoint,a.i[0][1]=e-i,a.i[1][0]=r?t+s:t-s,a.i[1][1]=e-i*this._cPoint,a.i[2][0]=r?t+s*this._cPoint:t-s*this._cPoint,a.i[2][1]=e+i,a.i[3][0]=r?t-s:t+s,a.i[3][1]=e+i*this._cPoint,a.o[0][0]=r?t+s*this._cPoint:t-s*this._cPoint,a.o[0][1]=e-i,a.o[1][0]=r?t+s:t-s,a.o[1][1]=e+i*this._cPoint,a.o[2][0]=r?t-s*this._cPoint:t+s*this._cPoint,a.o[2][1]=e+i,a.o[3][0]=r?t-s:t+s,a.o[3][1]=e-i*this._cPoint}getValue(t){return this.elem?.globalData?.frameId===this.frameId||(this.frameId=this.elem?.globalData?.frameId||0,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath()),0}}class eU extends eH{constructor(t,e){super(),this.v=em(),this.v.c=!0,this.localShapeCollection=eg(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=eW.getProp(t,e.p,1,0,this),this.s=eW.getProp(t,e.s,1,0,this),this.r=eW.getProp(t,e.r,0,0,this),this.dynamicProperties.length>0?this.k=!0:(this.k=!1,this.convertRectToPath())}convertRectToPath(){if(!this.p)throw Error(`${this.constructor.name}: p value is not implemented`);let t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2,r=Math.min(s,i,this.r.v),a=.44810000000000005*r;this.v&&(this.v._length=0),2===this.d||1===this.d?(this.v?.setTripleAt(t+s,e-i+r,t+s,e-i+r,t+s,e-i+a,0,!0),this.v?.setTripleAt(t+s,e+i-r,t+s,e+i-a,t+s,e+i-r,1,!0),0===r?(this.v?.setTripleAt(t-s,e+i,t-s+a,e+i,t-s,e+i,2),this.v?.setTripleAt(t-s,e-i,t-s,e-i+a,t-s,e-i,3)):(this.v?.setTripleAt(t+s-r,e+i,t+s-r,e+i,t+s-a,e+i,2,!0),this.v?.setTripleAt(t-s+r,e+i,t-s+a,e+i,t-s+r,e+i,3,!0),this.v?.setTripleAt(t-s,e+i-r,t-s,e+i-r,t-s,e+i-a,4,!0),this.v?.setTripleAt(t-s,e-i+r,t-s,e-i+a,t-s,e-i+r,5,!0),this.v?.setTripleAt(t-s+r,e-i,t-s+r,e-i,t-s+a,e-i,6,!0),this.v?.setTripleAt(t+s-r,e-i,t+s-a,e-i,t+s-r,e-i,7,!0))):(this.v?.setTripleAt(t+s,e-i+r,t+s,e-i+a,t+s,e-i+r,0,!0),0===r?(this.v?.setTripleAt(t-s,e-i,t-s+a,e-i,t-s,e-i,1,!0),this.v?.setTripleAt(t-s,e+i,t-s,e+i-a,t-s,e+i,2,!0),this.v?.setTripleAt(t+s,e+i,t+s-a,e+i,t+s,e+i,3,!0)):(this.v?.setTripleAt(t+s-r,e-i,t+s-r,e-i,t+s-a,e-i,1,!0),this.v?.setTripleAt(t-s+r,e-i,t-s+a,e-i,t-s+r,e-i,2,!0),this.v?.setTripleAt(t-s,e-i+r,t-s,e-i+r,t-s,e-i+a,3,!0),this.v?.setTripleAt(t-s,e+i-r,t-s,e+i-a,t-s,e+i-r,4,!0),this.v?.setTripleAt(t-s+r,e+i,t-s+r,e+i,t-s+a,e+i,5,!0),this.v?.setTripleAt(t+s-r,e+i,t+s-a,e+i,t+s-r,e+i,6,!0),this.v?.setTripleAt(t+s,e+i-r,t+s,e+i-r,t+s,e+i-a,7,!0)))}getValue(){return this.elem?.globalData?.frameId===this.frameId||(this.elem?.globalData?.frameId&&(this.frameId=this.elem.globalData.frameId),this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath()),0}}class eJ extends eH{constructor(t,e,s){super(),this.propType=R.Shape,this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;let i=3===s?e.pt?.k:e.ks?.k;if(!i)throw Error(`${this.constructor.name}: Could now get Path Data`);this.v=ed(i),this.pv=ed(this.v),this.localShapeCollection=eg(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.effectsSequence=[],this.getValue=this.processEffectsSequence}}class eX extends eH{constructor(t,e,s){super(),this.data=e,this.propType=R.Shape,this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data?.st||0,this.keyframes=3===s?e.pt?.k:e.ks?.k??[],this.keyframesMetadata=[],this.k=!0,this.kf=!0;let i=this.keyframes[0].s,{length:r}=i?.[0].i??[];this.v=em(),this.v.setPathData(!!i?.[0].c,r),this.pv=ed(this.v),this.localShapeCollection=eg(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=-999999,this._caching={lastFrame:-999999,lastIndex:0},this.effectsSequence=[this.interpolateShapeCurrentTime.bind(this)],this.getValue=this.processEffectsSequence}}class eK extends eH{constructor(t,e){super(),this.v=em(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=eW.getProp(t,e.ir,0,0,this),this.is=eW.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=eW.getProp(t,e.pt,0,0,this),this.p=eW.getProp(t,e.p,1,0,this),this.r=eW.getProp(t,e.r,0,t0,this),this.or=eW.getProp(t,e.or,0,0,this),this.os=eW.getProp(t,e.os,0,.01,this),this.localShapeCollection=eg(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length>0?this.k=!0:(this.k=!1,this.convertToPath())}convertPolygonToPath(){if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);if(!this.p)throw Error(`${this.constructor.name}: p value is not implemented`);let t=Math.floor(this.pt.v),e=2*Math.PI/t,s=this.or.v,i=this.os.v,r=2*Math.PI*s/(4*t),a=-(.5*Math.PI),n=3===this.data.d?-1:1;a+=this.r.v,this.v&&(this.v._length=0);for(let o=0;o<t;o++){let t=s*Math.cos(a),h=s*Math.sin(a),l=0===t&&0===h?0:h/Math.sqrt(t*t+h*h),p=0===t&&0===h?0:-t/Math.sqrt(t*t+h*h);t+=Number(this.p.v[0]),h+=Number(this.p.v[1]),this.v?.setTripleAt(t,h,t-l*r*i*n,h-p*r*i*n,t+l*r*i*n,h+p*r*i*n,o,!0),a+=e*n}this.paths.length=0,this.paths[0]=this.v}convertStarToPath(){if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);if(!this.v)throw Error(`${this.constructor.name}: v (ShapePath) is not implemented`);let t=2*Math.floor(this.pt.v),e=2*Math.PI/t,s=!0,i=this.or.v,r=Number(this.ir?.v),a=this.os.v,n=Number(this.is?.v),o=2*Math.PI*i/(2*t),h=2*Math.PI*r/(2*t),l,p,m,c=-Math.PI/2;c+=this.r.v;let d=3===this.data.d?-1:1;this.v._length=0;for(let u=0;u<t;u++){l=s?i:r,p=s?a:n,m=s?o:h;let t=l*Math.cos(c),f=l*Math.sin(c),g=0===t&&0===f?0:f/Math.sqrt(t*t+f*f),y=0===t&&0===f?0:-t/Math.sqrt(t*t+f*f);t+=Number(this.p?.v[0]),f+=Number(this.p?.v[1]),this.v.setTripleAt(t,f,t-g*m*p*d,f-y*m*p*d,t+g*m*p*d,f+y*m*p*d,u,!0),s=!s,c+=e*d}}convertToPath(){throw Error(`${this.constructor.name}: Method convertToPath is not implemented`)}getValue(t){return this.elem?.globalData?.frameId===this.frameId||(this.frameId=this.elem?.globalData?.frameId||0,this.iterateDynamicProperties(),this._mdf&&this.convertToPath()),0}}let eZ={getConstructorFunction:function(){return eJ},getKeyframedConstructorFunction:function(){return eX},getShapeProp:function(t,e,s,i,r){let a=null;switch(s){case 3:case 4:{let i=3===s?e.pt:e.ks,r=i?.k;if(r?.length){a=new eX(t,e,s);break}a=new eJ(t,e,s);break}case 5:a=new eU(t,e);break;case 6:a=new eY(t,e);break;case 7:a=new eK(t,e)}return a?.k&&t.addDynamicProperty(a),a}};class eQ{constructor(t,e){this.data=t,this.element=e,this.masksProperties=this.data.masksProperties??[],this.viewData=t2(this.masksProperties.length);let{length:s}=this.masksProperties,i=!1;for(let t=0;t<s;t++)"n"!==this.masksProperties[t].mode&&(i=!0),this.viewData[t]=eZ.getShapeProp(this.element,this.masksProperties[t],3);this.hasMasks=i,i&&this.element.addRenderableComponent(this)}destroy(){this.element=null}getMaskProperty(t){return this.viewData[t]}renderFrame(t){let e,s;if(!this.element.globalData?.compSize)throw Error(`${this.constructor.name}: element->globalData->compSize is not implemented`);if(!this.hasMasks)return;let i=this.element.finalTransform?.mat,r=this.element.canvasContext,{length:a}=this.masksProperties;r?.beginPath();for(let t=0;t<a;t++)if("n"!==this.masksProperties[t].mode){this.masksProperties[t].inv&&(r?.moveTo(0,0),r?.lineTo(this.element.globalData.compSize.w,0),r?.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),r?.lineTo(0,this.element.globalData.compSize.h),r?.lineTo(0,0));let a=this.viewData[t].v;if(!a)throw Error(`${this.constructor.name}: Could not access ShapePath`);let n=i?.applyToPointArray(a.v[0][0],a.v[0][1],0)??[];r?.moveTo(n[0],n[1]);let o=a._length;for(e=1;e<o;e++)s=i?.applyToTriplePoints(a.o[e-1],a.i[e],a.v[e])??[],r?.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);s=i?.applyToTriplePoints(a.o[e-1],a.i[0],a.v[0])??[],r?.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}this.element.globalData.renderer.save(!0),r?.clip()}}class e0{constructor(t,e,s){this.p=eW.getProp(e,t.v,0,0,s)}}class e1{constructor(t,e,s){this.p=eW.getProp(e,t.v,1,0,s)}}class e2 extends e0{}class e3 extends e0{}class e5 extends e1{}class e4 extends e1{}class e6 extends e0{}class e8 extends e0{}class e9 extends e0{}class e7{constructor(){this.p={}}}class st extends e${constructor(t,e,s){super(),this.effectElements=[],this.getValue=this.iterateDynamicProperties,this.init(t,e,s)}init(t,e,s){let i;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);let r=this.data.ef,{length:a}=r;for(let t=0;t<a;t++){switch(r[t].ty){case 0:i=new e2(r[t],e,this);break;case 1:i=new e3(r[t],e,this);break;case 2:i=new e5(r[t],e,this);break;case 3:i=new e4(r[t],e,this);break;case 4:case 7:i=new e9(r[t],e,this);break;case 10:i=new e6(r[t],e,this);break;case 11:i=new e8(r[t],e,this);break;case 5:i=new se(s,e);break;default:i=new e7}this.effectElements.push(i)}}renderFrame(t){throw Error(`${this.constructor.name}: Method renderFrame is not implemented yet`)}}class se{constructor(t,e,s){let i=t.ef??[];this.effectElements=[];let{length:r}=i;for(let s=0;s<r;s++){let r=new st(i[s],e,t);this.effectElements.push(r)}}}function ss(t=16){return({0:"source-over",1:"multiply",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light"})[t]||""}class si{buildAllItems(){throw Error(`${this.constructor.name}: Method buildAllItems is not implemented`)}checkLayers(t){throw Error(`${this.constructor.name}: Method checkLayers is not implemented`)}checkMasks(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not initialized`);if(!this.data.hasMask)return!1;let t=0,{length:e}=this.data.masksProperties??[];for(;t<e;){if(this.data.masksProperties?.[t].mode!=="n"&&this.data.masksProperties?.[t].cl!==!1)return!0;t++}return!1}destroy(){}destroyBaseElement(){throw Error(`${this.constructor.name}: Method destroyBaseElement is not implemented`)}getBaseElement(){throw Error(`${this.constructor.name}: Method getBaseElement is not implemented`)}getType(){return this.type}initBaseData(t,e,s){this.globalData=e,this.comp=s,this.data=t,this.layerId=K(),this.data.sr||(this.data.sr=1),this.effectsManager=new se(this.data,this,this.dynamicProperties)}initExpressions(){try{if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let t=tL();if(!t)return;let e=t("layer"),s=t("effects"),i=t("shape"),r=t("text"),a=t("comp");this.layerInterface=new e(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);let n=new s().createEffectsInterface(this,this.layerInterface);if(this.layerInterface.registerEffectsInterface(n),0===this.data.ty||this.data.xt){this.compInterface=new a(this);return}if(4===this.data.ty){this.layerInterface.shapeInterface=new i(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface;return}5===this.data.ty&&(this.layerInterface.textInterface=new r(this),this.layerInterface.text=this.layerInterface.textInterface)}catch(t){console.error(this.constructor.name,t)}}setBlendMode(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let t=ss(this.data.bm),e=this.baseElement??this.layerElement;if(!e)throw Error(`${this.constructor.name}: Both baseElement and layerElement are not implemented`);e.style.mixBlendMode=t}sourceRectAtTime(){throw Error(`${this.constructor.name}: Method sourceRectAtTime is not implemented`)}constructor(){this.dynamicProperties=[],this.frameDuration=1,this.itemsData=[],this.layerInterface=null,this.shapesData=[]}}class sr extends eO{constructor(t,e,s){if(super(),this.defaultVector=[0,0],this.elem=t,this.frameId=-1,this.propType=R.Transform,this.data=e,this.v=new t3,this.pre=new t3,this.appliedTransformations=0,this.initDynamicPropertyContainer(s??t),e.p&&"s"in e.p?(this.px=eW.getProp(t,e.p.x,0,0,this),this.py=eW.getProp(t,e.p.y,0,0,this),"z"in e.p&&(this.pz=eW.getProp(t,e.p.z,0,0,this))):this.p=eW.getProp(t,e.p??{k:[0,0,0]},1,0,this),"rx"in e){if(this.rx=eW.getProp(t,e.rx,0,t0,this),this.ry=eW.getProp(t,e.ry,0,t0,this),this.rz=eW.getProp(t,e.rz,0,t0,this),e.or?.k[0].ti){let{length:t}=e.or.k;for(let s=0;s<t;s++)e.or.k[s].to=null,e.or.k[s].ti=null}this.or=eW.getProp(t,e.or,1,t0,this),this.or.sh=!0}else this.r=eW.getProp(t,e.r??{k:0},0,t0,this);e.sk&&(this.sk=eW.getProp(t,e.sk,0,t0,this),this.sa=eW.getProp(t,e.sa,0,t0,this)),this.a=eW.getProp(t,e.a??{k:[0,0,0]},1,0,this),this.s=eW.getProp(t,e.s??{k:[100,100,100]},1,.01,this),e.o?this.o=eW.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,0===this.dynamicProperties.length&&this.getValue(!0)}addDynamicProperty(t){super.addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0}applyToMatrix(t){if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);this.iterateDynamicProperties(),this._mdf=!!this._mdf,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,Number(this.sa?.v)),this.r?t.rotate(-Number(this.r.v)):t.rotateZ(-Number(this.rz?.v)).rotateY(Number(this.ry?.v)).rotateX(Number(this.rx?.v)).rotateZ(-Number(this.or?.v[2])).rotateY(Number(this.or?.v[1])).rotateX(Number(this.or?.v[0])),this.data.p&&"s"in this.data.p?"z"in this.data.p?t.translate(Number(this.px?.v),Number(this.py?.v),-Number(this.pz?.v)):t.translate(Number(this.px?.v),Number(this.py?.v),0):t.translate(Number(this.p?.v[0]),Number(this.p?.v[1]),-Number(this.p?.v[2]))}autoOrient(){throw Error(`${this.constructor.name}: Method autoOrient not implemented`)}getValue(t){if(this.elem.globalData?.frameId===this.frameId)return 0;if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,Number(this.sa?.v)),this.r&&this.appliedTransformations<4?this.v.rotate(-Number(this.r.v)):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-Number(this.rz?.v)).rotateY(Number(this.ry?.v)).rotateX(Number(this.rx?.v)).rotateZ(-Number(this.or?.v[2])).rotateY(Number(this.or?.v[1])).rotateX(Number(this.or?.v[0])),this.autoOriented){let t,e,{frameRate:s}=this.elem.globalData??{frameRate:60};if(this.p?.keyframes)Number(this.p._caching?.lastFrame)+Number(this.p.offsetTime)<=this.p.keyframes[0].t?(t=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/s,0),e=this.p.getValueAtTime(Number(this.p.keyframes[0].t)/s,0)):Number(this.p._caching?.lastFrame)+Number(this.p.offsetTime)>=this.p.keyframes[this.p.keyframes.length-1].t?(t=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/s,0),e=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/s,0)):(t=this.p.pv,e=this.p.getValueAtTime((Number(this.p._caching?.lastFrame)+Number(this.p.offsetTime)-.01)/s,Number(this.p.offsetTime)));else if(this.px?.keyframes&&this.py?.keyframes){t=[0,0],e=[0,0];let{px:i,py:r}=this,{keyframes:a=[]}=i,{keyframes:n=[]}=r;Number(i._caching?.lastFrame)+Number(i.offsetTime)<=a[0].t?(t[0]=i.getValueAtTime((a[0].t+.01)/s,0),t[1]=r.getValueAtTime((n[0].t+.01)/s,0),e[0]=i.getValueAtTime(a[0].t/s,0),e[1]=r.getValueAtTime(Number(n[0]?.t)/s,0)):Number(i._caching?.lastFrame)+i.offsetTime>=a[a.length-1].t?(t[0]=i.getValueAtTime(a[a.length-1].t/s,0),t[1]=r.getValueAtTime(n[n.length-1].t/s,0),e[0]=i.getValueAtTime((a[a.length-1].t-.01)/s,0),e[1]=r.getValueAtTime((n[n.length-1].t-.01)/s,0)):(t=[i.pv,r.pv],e[0]=i.getValueAtTime((Number(i._caching?.lastFrame)+i.offsetTime-.01)/s,i.offsetTime),e[1]=r.getValueAtTime((Number(r._caching?.lastFrame)+r.offsetTime-.01)/s,r.offsetTime))}else t=e=this.defaultVector;this.v.rotate(-Math.atan2(t[1]-e[1],t[0]-e[0]))}this.data.p&&"s"in this.data.p?"z"in this.data.p?this.v.translate(Number(this.px?.v),Number(this.py?.v),-Number(this.pz?.v)):this.v.translate(Number(this.px?.v),Number(this.py?.v),0):this.p&&this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}return this.frameId=this.elem.globalData?.frameId,0}precalculateMatrix(){if(this.appliedTransformations=0,this.pre.reset(),!this.a?.effectsSequence.length){if(!this.a)throw Error(`${this.constructor.name}: Cannot read 'a' value`);if(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s?.effectsSequence.length){if(!this.s)throw Error(`${this.constructor.name}: Cannot read 's' value`);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>0||this.sa?.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,Number(this.sa?.v)),this.appliedTransformations=3}if(this.r){0===this.r.effectsSequence.length&&(this.pre.rotate(-Number(this.r.v)),this.appliedTransformations=4);return}this.rz?.effectsSequence.length||this.ry?.effectsSequence.length||this.rx?.effectsSequence.length||this.or?.effectsSequence.length||(this.pre.rotateZ(-Number(this.rz?.v)).rotateY(Number(this.ry?.v)).rotateX(Number(this.rx?.v)).rotateZ(-Number(this.or?.v[2])).rotateY(this.or?.v[1]).rotateX(this.or?.v[0]),this.appliedTransformations=4)}}}}let sa={getTransformProperty:(t,e,s)=>new sr(t,e,s)};class sn extends si{globalToLocal(t){let e,s=t,i=[];i.push(this.finalTransform);let r=!0,{comp:a}=this;for(;r;)a?.finalTransform?(a.data?.hasMask&&i.splice(0,0,a.finalTransform),a=a.comp):r=!1;let{length:n}=i;for(let t=0;t<n;t++)e=i[t]?.mat.applyToPointArray(0,0,0),s=[s[0]-Number(e?.[0]),s[1]-Number(e?.[1]),0];return s}initTransform(){if(!this.data)throw Error(`${this.constructor.name}: LottiePlayer is not initialized`);let t=new t3;this.finalTransform={_localMatMdf:!1,_matMdf:!1,_opMdf:!1,localMat:t,localOpacity:1,mat:t,mProp:this.data.ks?sa.getTransformProperty(this,this.data.ks,this):{o:0}},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0)}renderLocalTransform(){if(!this.localTransforms)return;if(!this.finalTransform)throw Error(`${this.constructor.name}: finalTransform is not initialized`);let t=0,{length:e}=this.localTransforms;if(this.finalTransform._localMatMdf=!!this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;t<e;)this.localTransforms[t]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[t]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=Number(this.finalTransform.mProp.o?.v),this.finalTransform._opMdf=!0),t++;if(this.finalTransform._localMatMdf){let{localMat:s,mat:i}=this.finalTransform;for(this.localTransforms[0].matrix?.clone(s),t=1;t<e;t++){let e=this.localTransforms[t].matrix;e&&s.multiply(e)}s.multiply(i)}if(this.finalTransform._opMdf){let s=this.finalTransform.localOpacity;for(t=0;t<e;t++)s*=.01*this.localTransforms[t].opacity;this.finalTransform.localOpacity=s}}renderTransform(){if(!this.finalTransform)throw Error(`${this.constructor.name}: finalTransform is not initialized`);if(this.finalTransform._opMdf=!!(this.finalTransform.mProp.o?._mdf||this._isFirstFrame),this.finalTransform._matMdf=!!(this.finalTransform.mProp._mdf||this._isFirstFrame),this.hierarchy){let t=this.finalTransform.mat,e=0,{length:s}=this.hierarchy;if(!this.finalTransform._matMdf)for(;e<s;){if(this.hierarchy[e].finalTransform?.mProp._mdf){this.finalTransform._matMdf=!0;break}e++}if(this.finalTransform._matMdf){let i=this.finalTransform.mProp.v.props;for(t.cloneFromProps(i),e=0;e<s;e++)if(this.hierarchy[e].finalTransform?.mProp.v){let{v:s}=this.hierarchy[e].finalTransform?.mProp??{v:null};s&&t.multiply(s)}}}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=Number(this.finalTransform.mProp.o?.v))}searchEffectTransforms(){if(!this.renderableEffectsManager)return;let t=this.renderableEffectsManager.getEffects(V.TransformEffect);if(0===t.length)return;this.localTransforms=[],this.finalTransform&&(this.finalTransform.localMat=new t3);let{length:e}=t;for(let s=0;s<e;s++)this.localTransforms.push(t[s])}constructor(...t){super(...t),this.mHelper=new t3}}class so extends sn{checkParenting(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.comp)throw Error(`${this.constructor.name}: comp (ElementInterface) is not implemented`);void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}initHierarchy(){this.hierarchy=[],this._isParent=!1,this.checkParenting()}setAsParent(){this._isParent=!0}setHierarchy(t){this.hierarchy=t}}class sh extends so{addDynamicProperty(t){this.dynamicProperties.includes(t)||this.dynamicProperties.push(t)}initFrame(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1}prepareProperties(t,e){let{length:s}=this.dynamicProperties;for(let t=0;t<s;t++)(e||this._isParent&&this.dynamicProperties[t].propType===R.Transform)&&(this.dynamicProperties[t].getValue(),this.globalData&&this.dynamicProperties[t]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))}constructor(...t){super(...t),this.displayStartTime=0}}class sl extends sh{addRenderableComponent(t){this.renderableComponents.includes(t)||this.renderableComponents.push(t)}checkLayerLimits(t){this.data&&this.globalData&&(this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide()))}checkTransparency(){if(!this.finalTransform)throw Error(`${this.constructor.name}: finalTransform is not implemented`);if(0>=Number(this.finalTransform.mProp.o?.v)){!this.isTransparent&&(this.globalData?.renderConfig).hideOnTransparent&&(this.isTransparent=!0,this.hide());return}this.isTransparent&&(this.isTransparent=!1,this.show())}getLayerSize(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);return 5===this.data.ty?{h:Number(this.data.textData?.height),w:Number(this.data.textData?.width)}:{h:Number(this.data.height),w:Number(this.data.width)}}hide(){}initRenderable(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]}prepareRenderableFrame(t,e){this.checkLayerLimits(t)}removeRenderableComponent(t){this.renderableComponents.includes(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)}renderRenderable(){let{length:t}=this.renderableComponents;for(let e=0;e<t;e++)this.renderableComponents[e].renderFrame(Number(this._isFirstFrame))}show(){throw Error(`${this.constructor.name}: Method show is not implemented`)}sourceRectAtTime(){return{height:100,left:0,top:0,width:100}}constructor(...t){super(...t),this.renderableComponents=[]}}let sp=new class{constructor(){if(this.maskType=!0,this.offscreenCanvas="undefined"!=typeof OffscreenCanvas,this.svgLumaHidden=!0,!Q())return;this.maskType=!/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),this.svgLumaHidden=!/firefox/i.test(navigator.userAgent)}},sm="__lottie_element_luma_buffer",sc=null,sd=null,su=null;function sf(){(!sc||!sd)&&(su=function(){let t=tO("svg"),e=tO("filter"),s=tO("feColorMatrix");return e.id=sm,s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),e.appendChild(s),t.appendChild(e),t.id=`${sm}_svg`,sp.svgLumaHidden&&(t.style.display="none"),t}(),document.body.appendChild(su),(sd=(sc=tR("canvas")).getContext("2d"))&&(sd.filter=`url(#${sm})`,sd.fillStyle="rgba(0,0,0,0)",sd.fillRect(0,0,1,1)))}let sg={createCanvas:function(t,e){if(sp.offscreenCanvas)return new OffscreenCanvas(t,e);let s=tR("canvas");return s.width=t,s.height=e,s},getLumaCanvas:function(t){if(sc&&sd||sf(),!sc||!sd)throw Error("Could not create Canvas Element");return sc.width=t.width,sc.height=t.height,sd.filter=`url(#${sm})`,sc},loadLumaCanvas:sf},sy={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};class sv extends sl{clearCanvas(t){if(!this.transformCanvas)throw Error(`${this.constructor.name}: transformCanvas is not implemented`);t?.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)}createContainerElements(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.globalData.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented in globalData`);if(this.data.tt&&this.data.tt>=1){this.buffers=[];let{canvasContext:t}=this.globalData,e=sg.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);let s=sg.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(s),this.data.tt>=3&&!document._isProxy&&sg.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new ee(this),this.searchEffectTransforms()}createContent(){}createElements(){throw Error(`${this.constructor.name}: createElements is not implemented`)}createRenderableComponents(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);this.maskManager=new eQ(this.data,this),this.renderableEffectsManager&&(this.transformEffects=this.renderableEffectsManager.getEffects(V.TransformEffect))}destroy(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager?.destroy()}exitLayer(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);let t=this.data.tt||0;if(t<1)return;let e=this.buffers[1],s=e.getContext("2d");this.clearCanvas(s),s.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);let i=Number(this.data.ind)-1;"tp"in this.data&&void 0!==this.data.tp&&(i=this.data.tp);let r=this.comp?.getElementById(i);if(r?.renderFrame(1),this.canvasContext.setTransform(1,0,0,1,0,0),t>=3&&!document._isProxy){let t=sg.getLumaCanvas(this.canvasContext.canvas),e=t.getContext("2d");e?.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(t,0,0)}this.canvasContext.globalCompositeOperation=sy[t],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"}hideElement(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)}initRendererElement(){}prepareLayer(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);if(1>(this.data.tt||0))return;let t=this.buffers[0].getContext("2d");this.clearCanvas(t),t.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)}renderFrame(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(this.hidden||this.data.hd||1===this.data.td&&!t)return;this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();let e=0===this.data.ty;this.prepareLayer();let{renderer:s}=this.globalData;s.save(e),s.ctxTransform(this.finalTransform?.localMat.props),s.ctxOpacity(this.finalTransform?.localOpacity),this.renderInnerContent(),s.restore(e),this.exitLayer(),this.maskManager?.hasMasks&&s.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}renderInnerContent(){throw Error("Method is not implemented")}setBlendMode(){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let{data:t,globalData:e}=this;if(!e.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented in globalData`);if(e.blendMode!==t.bm){e.blendMode=t.bm;let s=ss(t.bm);e.canvasContext.globalCompositeOperation=s}}showElement(){if(!this.maskManager)throw Error(`${this.constructor.name}: Method maskManager is not implemented`);this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)}constructor(...t){super(...t),this.buffers=[],this.transformEffects=[]}}sv.prototype.hide=sv.prototype.hideElement,sv.prototype.show=sv.prototype.showElement;class sb extends sl{createContainerElements(){throw Error(`${this.constructor.name}: Method createContainerElements is not implemented`)}createContent(){throw Error(`${this.constructor.name}: Method createContent is not implemented`)}createRenderableComponents(){throw Error(`${this.constructor.name}: Method createRenderableComponents is not implemented`)}destroy(){this.innerElem=null,this.destroyBaseElement()}hide(){if(this.hidden||this.isInRange&&!this.isTransparent)return;let t=this.baseElement??this.layerElement;t&&(t.style.display="none"),this.hidden=!0}initElement(t,e,s){this.initFrame(),this.initBaseData(t,e,s),this.initTransform(),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()}initRendererElement(){throw Error(`${this.constructor.name}: Method initRendererElement is not implemented`)}prepareFrame(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()}renderElement(){throw Error(`${this.constructor.name}: Method renderElement is not implemented`)}renderFrame(t){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))}renderInnerContent(){throw Error(`${this.constructor.name}: Method renderInnerContent is not implemented`)}show(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(this.isInRange||!this.isTransparent){if(!this.data.hd){let t=this.baseElement??this.layerElement;if(!t)throw Error(`${this.constructor.name}: Neither baseElement or layerElement is implemented`);t.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}}}class s_ extends sb{destroy(){this.destroyElements(),this.destroyBaseElement()}destroyElements(){let{length:t}=this.layers;for(let e=0;e<t;e++)this.elements[e]?.destroy()}getElements(){return this.elements}initElement(t,e,s){if(this.initFrame(),this.initBaseData(t,e,s),this.initTransform(),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);(this.data.xt||!e.progressiveLoad)&&this.buildAllItems(),this.hide()}prepareFrame(t){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),!this.isInRange&&!this.data.xt)return;if(this.tm?._placeholder)this.renderedFrame=t/Number(this.data.sr);else{let t=this.tm?.v||0;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}let{length:e}=this.elements;this.completeLayers||this.checkLayers(this.renderedFrame);for(let t=e-1;t>=0;t--)(this.completeLayers||this.elements[t])&&(this.elements[t]?.prepareFrame(this.renderedFrame-this.layers[t].st),this.elements[t]?._mdf&&(this._mdf=!0))}renderInnerContent(){let{length:t}=this.layers;for(let e=0;e<t;e++)(this.completeLayers||this.elements[e])&&this.elements[e]?.renderFrame()}setElements(t){this.elements=t}constructor(...t){super(...t),this.currentFrame=0,this.elements=[],this.layers=[]}}class sx{constructor(t,e,s){this.masksProperties=[],this.data=t,this.element=e,this.globalData=s,this.storedData=[],this.masksProperties=this.data.masksProperties??[],this.maskElement=null;let{defs:i}=this.globalData,{length:r}=this.masksProperties;this.viewData=t2(r),this.solidPath="";let a=this.masksProperties,n=0,o=[],h=K(),l,p,m,c="clipPath",d="clip-path";for(let t=0;t<r;t++){let e;("a"!==a[t].mode&&"n"!==a[t].mode||a[t].inv||a[t].o?.k!==100||a[t].o?.x)&&(c="mask",d="mask"),("s"===a[t].mode||"i"===a[t].mode)&&0===n?((l=tO("rect")).setAttribute("fill","#ffffff"),l.setAttribute("width",`${Number(this.element.comp?.data?.w)}`),l.setAttribute("height",`${Number(this.element.comp?.data?.h)}`),o.push(l)):l=null;let s=tO("path");if("n"===a[t].mode){this.viewData[t]={elem:s,lastPath:"",op:eW.getProp(this.element,a[t].o,0,.01,this.element),prop:eZ.getShapeProp(this.element,a[t],3)},i.appendChild(s);continue}if(n++,s.setAttribute("fill","s"===a[t].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),a[t].x?.k===0)p=null,m=null;else{c="mask",d="mask",m=eW.getProp(this.element,a[t].x,0,null,this.element),e=K();let r=tO("filter");r.id=e,(p=tO("feMorphology")).setAttribute("operator","erode"),p.setAttribute("in","SourceGraphic"),p.setAttribute("radius","0"),r.appendChild(p),i.appendChild(r),s.setAttribute("stroke","s"===a[t].mode?"#000000":"#ffffff")}if(this.storedData[t]={elem:s,expan:p,filterId:e,lastOperator:"",lastPath:"",lastRadius:0,x:m},"i"===a[t].mode){let{length:t}=o,e=tO("g");for(let s=0;s<t;s++)e.appendChild(o[s]);let r=tO("mask");r.setAttribute("mask-type","alpha"),r.id=`${h}_${n}`,r.appendChild(s),i.appendChild(r),e.setAttribute("mask",`url(${t9()}#${h}_${n})`),o.length=0,o.push(e)}else o.push(s);a[t].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[t]={elem:s,invRect:l,lastPath:"",op:eW.getProp(this.element,a[t].o,0,.01,this.element),prop:eZ.getShapeProp(this.element,a[t],3)};let r=this.viewData[t].prop?.v;!this.viewData[t].prop?.k&&r&&this.drawPath(a[t],r,this.viewData[t])}this.maskElement=tO(c);let{length:u}=o;for(let t=0;t<u;t++)this.maskElement.appendChild(o[t]);n>0&&(this.maskElement.id=h,this.element.maskedElement?.setAttribute(d,`url(${t9()}#${h})`),i.appendChild(this.maskElement)),this.viewData.length>0&&this.element.addRenderableComponent(this)}createLayerSolidPath(){let t="M0,0 ";return t+` h${this.globalData.compSize?.w||0} v${this.globalData.compSize?.h||0} h-${this.globalData.compSize?.w||0} v-${this.globalData.compSize?.h||0} `}destroy(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null}drawPath(t,e,s){let i,r=` M${e.v[0]?.[0]},${e.v[0]?.[1]}`,a=e._length||0;for(i=1;i<a;i++)r+=` C${e.o[i-1]?.[0]},${e.o[i-1]?.[1]} ${e.i[i]?.[0]},${e.i[i]?.[1]} ${e.v[i]?.[0]},${e.v[i]?.[1]}`;if(e.c&&a>1&&(r+=` C${e.o[i-1]?.[0]},${e.o[i-1]?.[1]} ${e.i[0]?.[0]},${e.i[0]?.[1]} ${e.v[0]?.[0]},${e.v[0]?.[1]}`),s.lastPath!==r){let i="";s.elem&&(e.c&&(i=t?.inv?this.solidPath+r:r),s.elem.setAttribute("d",i)),s.lastPath=r}}getMaskelement(){return this.maskElement}getMaskProperty(t){return this.viewData[t].prop}renderFrame(t){let e=this.element.finalTransform?.mat,{length:s}=this.masksProperties;for(let i=0;i<s;i++){let s=this.viewData[i].prop?.v;if(s&&(this.viewData[i].prop?._mdf||t)&&this.drawPath(this.masksProperties[i]||null,s,this.viewData[i]),(this.viewData[i].op._mdf||t)&&this.viewData[i].elem.setAttribute("fill-opacity",`${this.viewData[i].op.v}`),"n"===this.masksProperties[i].mode||(this.viewData[i].invRect&&(this.element.finalTransform?.mProp._mdf||t)&&this.viewData[i].invRect?.setAttribute("transform",`${e?.getInverseMatrix().to2dCSS()}`),!this.storedData[i]?.x||!(this.storedData[i].x?._mdf||t)))continue;let r=this.storedData[i].expan;if(0>Number(this.storedData[i].x?.v)){"erode"!==this.storedData[i].lastOperator&&(this.storedData[i].lastOperator="erode",this.storedData[i].elem.setAttribute("filter",`url(${t9()}#${this.storedData[i].filterId})`)),r?.setAttribute("radius",`${-Number(this.storedData[i].x?.v)}`);continue}"dilate"!==this.storedData[i].lastOperator&&(this.storedData[i].lastOperator="dilate",this.storedData[i].elem.removeAttribute("filter")),this.storedData[i].elem.setAttribute("stroke-width",`${2*Number(this.storedData[i].x?.v)}`)}}}class sw extends sb{createContainerElements(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);this.matteElement=tO("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;let t=null;if(this.data.td){this.matteMasks={};let e=tO("g");this.layerId&&(e.id=this.layerId),e.appendChild(this.layerElement),t=e,this.globalData.defs.appendChild(e)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&(this.layerElement.id=this.data.ln),this.data.cl&&this.layerElement.classList.add(this.data.cl),0===this.data.ty&&!this.data.hd){let e=tO("clipPath"),s=tO("path");s.setAttribute("d",`M0,0 L${this.data.w},0 L${this.data.w},${this.data.h} L0,${this.data.h}z`);let i=K();if(e.id=i,e.appendChild(s),this.globalData.defs.appendChild(e),this.checkMasks()){let e=tO("g");e.setAttribute("clip-path",`url(${t9()}#${i})`),e.appendChild(this.layerElement),this.transformedElement=e,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path",`url(${t9()}#${i})`)}0!==this.data.bm&&this.setBlendMode()}createRenderableComponents(){if(!this.data)throw Error(`${this.constructor.name}: layerData is not initialized`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not initialized`);this.maskManager=new sx(this.data,this,this.globalData),this.renderableEffectsManager=new ea(this),this.searchEffectTransforms()}destroyBaseElement(){this.layerElement=null,this.matteElement=null,this.maskManager?.destroy()}getBaseElement(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);return this.data.hd?null:this.baseElement??null}getMatte(t=1){let e,s,i,r;if(this.matteMasks=this.matteMasks??{},this.matteMasks[t])return this.matteMasks[t];let a=`${this.layerId}_${t}`;switch(t){case 1:case 3:{let n=tO("mask");if(n.id=a,n.setAttribute("mask-type",3===t?"luminance":"alpha"),(i=tO("use")).setAttributeNS("http://www.w3.org/1999/xlink","href",`#${this.layerId}`),n.appendChild(i),this.globalData?.defs.appendChild(n),sp.maskType||1!==t)break;n.setAttribute("mask-type","luminance"),e=K(),s=es.createFilter(e),this.globalData?.defs.appendChild(s),s.appendChild(es.createAlphaToLuminanceFilter()),(r=tO("g")).appendChild(i),n.appendChild(r),r.setAttribute("filter",`url(${t9()}#${e})`)}break;case 2:{let t=tO("mask");t.id=a,t.setAttribute("mask-type","alpha");let n=tO("g");t.appendChild(n),e=K(),s=es.createFilter(e);let o=tO("feComponentTransfer");o.setAttribute("in","SourceGraphic"),s.appendChild(o);let h=tO("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),o.appendChild(h),this.globalData?.defs.appendChild(s);let l=tO("rect");l.setAttribute("width",`${Number(this.comp?.data?.w)}`),l.setAttribute("height",`${Number(this.comp?.data?.h)}`),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("fill","#ffffff"),l.setAttribute("opacity","0"),n.setAttribute("filter",`url(${t9()}#${e})`),n.appendChild(l),(i=tO("use")).setAttributeNS("http://www.w3.org/1999/xlink","href",`#${this.layerId}`),n.appendChild(i),sp.maskType||(t.setAttribute("mask-type","luminance"),s.appendChild(es.createAlphaToLuminanceFilter()),r=tO("g"),n.appendChild(l),this.layerElement&&r.appendChild(this.layerElement),n.appendChild(r)),this.globalData?.defs.appendChild(t)}}return this.matteMasks[t]=a,this.matteMasks[t]}initRendererElement(){this.layerElement=tO("g")}renderElement(){if(!this.finalTransform)throw Error(`${this.constructor.name}: finalTransform is not implemented`);this.finalTransform._localMatMdf&&this.transformedElement?.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement?.setAttribute("opacity",`${this.finalTransform.localOpacity}`)}setMatte(t){this.matteElement&&this.matteElement.setAttribute("mask",`url(${t9()}#${t})`)}}class sE extends sw{constructor(t,e,s){super(),this.layers=[],t.refId&&(this.assetData=e.getAssetData(t.refId)),this.assetData?.sid&&(this.assetData=e.slotManager?.getProp(this.assetData)||null),this.initElement(t,e,s),this.sourceRect={height:Number(this.assetData?.h),left:0,top:0,width:Number(this.assetData?.w)}}createContent(){let t="";this.assetData&&this.globalData?.getAssetsPath&&(t=this.globalData.getAssetsPath(this.assetData)),this.assetData&&(this.innerElem=tO("image"),this.innerElem.setAttribute("width",`${this.assetData.w}px`),this.innerElem.setAttribute("height",`${this.assetData.h}px`),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData?.renderConfig?.imagePreserveAspectRatio||""),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement?.appendChild(this.innerElem))}renderInnerContent(){}sourceRectAtTime(){return this.sourceRect}}class sC{constructor(){this.it=[],this.prevViewData=[],this.gr=tO("g")}}function sS(t,e,s,i){if(0===e)return"";let r=t.o,a=t.i,n=t.v,o,h=` M${i.applyToPointStringified(n[0][0],n[0][1])}`;for(o=1;o<e;o++)h+=` C${i.applyToPointStringified(r[o-1][0],r[o-1][1])} ${i.applyToPointStringified(a[o][0],a[o][1])} ${i.applyToPointStringified(n[o][0],n[o][1])}`;return s&&e&&(h+=` C${i.applyToPointStringified(r[o-1][0],r[o-1][1])} ${i.applyToPointStringified(a[0][0],a[0][1])} ${i.applyToPointStringified(n[0][0],n[0][1])}z`),h}let sk=new t3,sM=new t3;function sP(t,e,s){if(!e)throw Error("SVGElementsRenderer: Method renderContetTransform is missing data");(s||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",`${e.transform.op.v}`),(s||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function sA(t,e,s){if(!e)throw Error("SVGElementsRenderer: Method renderFill is missing data");let i=e.style;e.c?.v&&(e.c._mdf||s)&&i.pElem.setAttribute("fill",`rgb(${Math.floor(e.c.v[0])},${Math.floor(e.c.v[1])},${e.c.v[2]})`),(e.o?._mdf||s)&&i.pElem.setAttribute("fill-opacity",`${e.o?.v}`)}function sT(t,e,s){let i,r;if(!e)throw Error("SVGElementsRenderer: Method renderGradient is missing data");let a=e.gf,n=e.g?._hasOpacity,o=e.s?.v??[0,0],h=e.e?.v??[0,0];if(e.o?._mdf||s){let s=t.ty===N.GradientFill?"fill-opacity":"stroke-opacity";e.style?.pElem.setAttribute(s,`${e.o?.v}`)}if(e.s?._mdf||s){let s=1===t.t?"x1":"cx",i="x1"===s?"y1":"cy";a?.setAttribute(s,`${o[0]}`),a?.setAttribute(i,`${o[1]}`),n&&!e.g?._collapsable&&(e.of?.setAttribute(s,`${o[0]}`),e.of?.setAttribute(i,`${o[1]}`))}if(e.g&&(e.g._cmdf||s)){i=e.cst;let t=e.g.c,{length:s}=i;for(let e=0;e<s;e++)(r=i[e]).setAttribute("offset",`${t[4*e]}%`),r.setAttribute("stop-color",`rgb(${t[4*e+1]},${t[4*e+2]},${t[4*e+3]})`)}if(n&&e.g&&(e.g._omdf||s)){let t=e.g.o,{length:s}=i=e.g._collapsable?e.cst:e.ost;for(let a=0;a<s;a++)r=i[a],e.g._collapsable||r.setAttribute("offset",`${t[2*a]}%`),r.setAttribute("stop-opacity",`${t[2*a+1]}`)}if(1===t.t)(e.e?._mdf||s)&&(a?.setAttribute("x2",`${h[0]}`),a?.setAttribute("y2",`${h[1]}`),n&&!e.g?._collapsable&&(e.of?.setAttribute("x2",`${h[0]}`),e.of?.setAttribute("y2",`${h[1]}`)));else{let t=0;if((e.s?._mdf||e.e?._mdf||s)&&(t=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)),a?.setAttribute("r",`${t}`),n&&!e.g?._collapsable&&e.of?.setAttribute("r",`${t}`)),e.e?._mdf||e.h?._mdf||e.a?._mdf||s){t||(t=Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)));let s=Math.atan2(h[1]-o[1],h[0]-o[0]),i=Number(e.h?.v);i>=1?i=.99:i<=-1&&(i=-.99);let r=t*i,l=Math.cos(s+Number(e.a?.v))*r+o[0],p=Math.sin(s+Number(e.a?.v))*r+o[1];a?.setAttribute("fx",`${l}`),a?.setAttribute("fy",`${p}`),n&&!e.g?._collapsable&&(e.of?.setAttribute("fx",`${l}`),e.of?.setAttribute("fy",`${p}`))}}}function sD(t,e,s){sT(t,e,s),sL(t,e,s)}function sI(t){}function sF(t,e,s){let i,r,a,n,o,h,l;if(!e)throw Error("SVGElementsRenderer: Method renderPath is missing data");let{caches:p,lvl:m,sh:c,styles:d,transformers:u}=e,{length:f}=d;for(let e=0;e<f;e++){if(r=c?._mdf||!!s,d[e].lvl<m){for(o=sM.reset(),h=m-d[e].lvl,l=u.length-1;!r&&h>0;)r=u[l].mProps._mdf||r,h--,l--;if(r)for(h=m-d[e].lvl,l=u.length-1;h>0;)o.multiply(u[l].mProps.v),h--,l--}else o=sk;n=c?.paths;let f=n?._length||0;if(r){i="";for(let t=0;t<f;t++)a=n?.shapes[t],a?._length&&(i+=sS(a,a._length,!!a.c,o));p[e]=i}else i=p[e];d[e].d+=!0===t.hd?"":i,d[e]._mdf=r||d[e]._mdf}}function sL(t,e,s){if(!e)throw Error("SVGElementsRenderer: Method renderStroke is missing data");let{c:i,d:r,o:a,style:n,w:o}=e;r&&(r._mdf||s)&&r.dashStr&&(n?.pElem.setAttribute("stroke-dasharray",r.dashStr),n?.pElem.setAttribute("stroke-dashoffset",`${r.dashoffset[0]}`)),i&&(i._mdf||s)&&n?.pElem.setAttribute("stroke",`rgb(${Math.floor(i.v[0])},${Math.floor(i.v[1])},${Math.floor(i.v[2])})`),(a?._mdf||s)&&n?.pElem.setAttribute("stroke-opacity",`${a?.v??1}`),(o?._mdf||s)&&(n?.pElem.setAttribute("stroke-width",`${o?.v||0}`),n?.msElem&&n.msElem.setAttribute("stroke-width",`${o?.v||0}`))}class s$ extends e${constructor(t,e,s){super(),this.it=[],this.prevViewData=[],this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=eW.getProp(t,e.o,0,.01,this),this.c=eW.getProp(t,e.c,1,255,this),this.style=s}}class sN extends e${constructor(t,e,s){super(),this.data=e,this.c=t1(I.Uint8c,4*e.p);let i=e.k.k?.[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=t1(I.Float32,i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(s),this.prop=eW.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}checkCollapsable(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k?.[0].s){let t=0,e=this.data.k.k.length;for(;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t++}}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0}comparePoints(t,e){let s=0,i=this.o.length/2;for(;s<i;){if(Math.abs(t[4*s]-t[4*e+2*s])>.01)return!1;s++}return!0}getValue(t){let e,s;if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,!this.prop._mdf&&!t||!te(this.prop.v))return 0;let i=4*this.data.p;for(let r=0;r<i;r++)e=r%4==0?100:255,s=Math.round(this.prop.v[r]*e),this.c[r]!==s&&(this.c[r]=s,this._cmdf=!t);if(this.o.length>0){let{length:e}=this.prop.v;for(let i=4*this.data.p;i<e;i++)s=i%2==0?Math.round(100*this.prop.v[i]):this.prop.v[i],this.o[i-4*this.data.p]!==s&&(this.o[i-4*this.data.p]=s,this._omdf=!t)}return this._mdf=!t,0}}class sV extends e${constructor(t,e,s){super(),this.cst=[],this.it=[],this.ost=[],this.prevViewData=[],this.stops=[],this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,s)}initGradientData(t,e,s){this.o=eW.getProp(t,e.o,0,.01,this),this.s=eW.getProp(t,e.s,1,null,this),this.e=eW.getProp(t,e.e,1,null,this),this.h=eW.getProp(t,e.h??{k:0},0,.01,this),this.a=eW.getProp(t,e.a??{k:0},0,t0,this),this.g=new sN(t,e.g,this),this.style=s,this.stops=[],this.setGradientData(s.pElem,e),this.setGradientOpacity(e,s),this._isAnimated=!!this._isAnimated}setGradientData(t,e){let s,i=K(),r=tO(1===e.t?"linearGradient":"radialGradient");r.id=i,r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");let a=[],n=4*(e.g?.p||1);for(let t=0;t<n;t+=4)s=tO("stop"),r.appendChild(s),a.push(s);t.setAttribute(e.ty===N.GradientFill?"fill":"stroke",`url(${t9()}#${i})`),this.gf=r,this.cst=a}setGradientOpacity(t,e){let s;if(!this.g?._hasOpacity||this.g._collapsable)return;let i=tO("mask"),r=tO("path");i.appendChild(r);let a=K(),n=K();i.id=n;let o=tO(1===t.t?"linearGradient":"radialGradient");o.id=a,o.setAttribute("spreadMethod","pad"),o.setAttribute("gradientUnits","userSpaceOnUse");let h=(t.g?.k.k?.[0].s?(t.g?.k.k)[0].s.length:t.g?.k.k.length)||0,{stops:l}=this;for(let e=4*(t.g?.p||1);e<h;e+=2)(s=tO("stop")).setAttribute("stop-color","rgb(255,255,255)"),o.appendChild(s),l.push(s);r.setAttribute(t.ty===N.GradientFill?"fill":"stroke",`url(${t9()}#${a})`),t.ty===N.GradientStroke&&(r.setAttribute("stroke-linecap",O[t.lc||2]),r.setAttribute("stroke-linejoin",z[t.lj||2]),1===t.lj&&r.setAttribute("stroke-miterlimit",`${Number(t.ml)}`)),this.of=o,this.ms=i,this.ost=l,this.maskId=n,e.msElem=r}}class sR extends e${constructor(t,e,s,i){let r;super(),this.elem=t,this.frameId=-1,this.dataProps=t2(e.length),this.renderer=s,this.k=!1,this.dashStr="",this.dashArray=t1(I.Float32,e.length>0?e.length-1:0),this.dashoffset=t1(I.Float32,1),this.initDynamicPropertyContainer(i);let a=e.length||0;for(let s=0;s<a;s++)r=eW.getProp(t,e[s].v,0,0,this),this.k=r.k||this.k,this.dataProps[s]={n:e[s].n,p:r};this.k||this.getValue(!0),this._isAnimated=this.k}getValue(t){if(this.elem.globalData?.frameId===this.frameId&&!t||(this.elem.globalData?.frameId&&(this.frameId=this.elem.globalData.frameId),this.iterateDynamicProperties(),this._mdf=this._mdf||!!t,!this._mdf))return 0;let e=this.dataProps.length;this.renderer===$.SVG&&(this.dashStr="");for(let t=0;t<e;t++){if("o"===this.dataProps[t].n){this.dashoffset[0]=this.dataProps[t].p.v;continue}if(this.renderer===$.SVG){this.dashStr+=` ${this.dataProps[t].p.v}`;continue}this.dashArray[t]=this.dataProps[t].p.v}return 0}}class sO extends sV{constructor(t,e,s){super(t,e,s),this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=eW.getProp(t,e.w,0,null,this),this.d=new sR(t,e.d||[],$.SVG,this),this.initGradientData(t,e,s),this._isAnimated=!!this._isAnimated}}class sz extends e${constructor(t,e,s){super(),this.it=[],this.prevViewData=[],this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=s}}class sB{setAsAnimated(){this._isAnimated=!0}constructor(){this.caches=[],this.it=[],this.lStr="",this.lvl=0,this.pathsData=[],this.prevViewData=[],this.sh=null,this.styledShapes=[],this.styles=[],this.tr=[],this.transformers=[],this.trNodes=[]}}class sG extends sB{constructor(t,e,s){super(),this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=s,this.lvl=e,this._isAnimated=!!s.k;let i=0,{length:r}=t;for(;i<r;){if(t[i].mProps.dynamicProperties.length>0){this._isAnimated=!0;break}i++}}}class sq extends s${constructor(t,e,s){super(t,e,s),this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=eW.getProp(t,e.o,0,.01,this),this.w=eW.getProp(t,e.w,0,null,this),this.d=new sR(t,e.d||[],$.SVG,this),this.c=eW.getProp(t,e.c,1,255,this),this.style=s,this._isAnimated=!!this._isAnimated}}class sj{constructor(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=tO("path"),this.msElem=null}reset(){this.d="",this._mdf=!1}}class sW{constructor(t,e,s){this.transform={container:s,mProps:t,op:e},this.elements=[],this._isAnimated=!!(this.transform.mProps.dynamicProperties.length>0||this.transform.op.effectsSequence.length>0)}}class sH{constructor(t,e){this.elem=t,this.pos=e}}class sY extends sb{addProcessedElement(t,e){let{processedElements:s}=this,i=s.length;for(;i;)if(s[--i].elem===t){s[i].pos=e;return}s.push(new sH(t,e))}addShapeToModifiers(t){let{length:e}=this.shapeModifiers;for(let s=0;s<e;s++)this.shapeModifiers[s].addShape(t)}isShapeInAnimatedModifiers(t){let e=0,{length:s}=this.shapeModifiers;for(;e<s;){if(this.shapeModifiers[e].isAnimatedWithShape(t))return!0;e++}return!1}prepareFrame(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}renderModifiers(){if(0===this.shapeModifiers.length)return;let{length:t}=this.shapes;for(let e=0;e<t;e++)this.shapes[e].sh?.reset();let{length:e}=this.shapeModifiers;for(let t=e-1;t>=0&&!this.shapeModifiers[t].processShapes(!!this._isFirstFrame);t--);}searchProcessedElement(t){let{processedElements:e}=this,{length:s}=e,i=0;for(;i<s;){if(e[i].elem===t)return e[i].pos;i++}return 0}constructor(...t){super(...t),this.processedElements=[],this.shapeModifiers=[],this.shapes=[]}}let sU={};function sJ(t,e,s){if(!sU[t])throw Error("Invalid modifier");return new sU[t]}function sX(t,e){sU[t]=sU[t]??e}class sK extends sY{constructor(t,e,s){super(),this.createContainerElements=sw.prototype.createContainerElements,this.createRenderableComponents=sw.prototype.createRenderableComponents,this.destroyBaseElement=sw.prototype.destroyBaseElement,this.getBaseElement=sw.prototype.getBaseElement,this.getMatte=sw.prototype.getMatte,this.identityMatrix=new t3,this.initRendererElement=sw.prototype.initRendererElement,this.renderElement=sw.prototype.renderElement,this.setMatte=sw.prototype.setMatte,this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,s),this.prevViewData=[]}addToAnimatedContents(t,e){let s=0,{length:i}=this.animatedContents;for(;s<i;){if(this.animatedContents[s].element===e)return;s++}this.animatedContents.push({data:t,element:e,fn:function(t){switch(t.ty){case N.Fill:return sA;case N.GradientFill:return sT;case N.GradientStroke:return sD;case N.Stroke:return sL;case N.Path:case N.Ellipse:case N.Rectangle:case N.PolygonStar:return sF;case N.Transform:return sP;case N.NoStyle:return sI;default:return null}}(t)})}buildExpressionInterface(){}createContent(){if(!this.layerElement)throw Error(`${this.constructor.name}: Could not access Layer`);this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()}createGroupElement(t){let e=new sC;return t.ln&&(e.gr.id=t.ln),t.cl&&e.gr.classList.add(t.cl),t.bm&&(e.gr.style.mixBlendMode=ss(t.bm)),e}createShapeElement(t,e,s){let i=4;switch(t.ty){case N.Rectangle:i=5;break;case N.Ellipse:i=6;break;case N.PolygonStar:i=7}let r=new sG(e,s,eZ.getShapeProp(this,t,i));return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(t,r),r}createStyleElement(t,e){let s=null,i=new sj(t,e),r=i.pElem;switch(t.ty){case N.Stroke:s=new sq(this,t,i);break;case N.Fill:s=new s$(this,t,i);break;case N.GradientFill:case N.GradientStroke:(s=new(t.ty===N.GradientFill?sV:sO)(this,t,i)).gf&&this.globalData?.defs.appendChild(s.gf),s.maskId&&s.ms&&s.of&&(this.globalData?.defs.appendChild(s.ms),this.globalData?.defs.appendChild(s.of),r.setAttribute("mask",`url(${t9()}#${s.maskId})`));break;case N.NoStyle:s=new sz(this,t,i)}return(t.ty===N.Stroke||t.ty===N.GradientStroke)&&(r.setAttribute("stroke-linecap",O[t.lc||2]),r.setAttribute("stroke-linejoin",z[t.lj||2]),r.setAttribute("fill-opacity","0"),1===t.lj&&t.ml&&r.setAttribute("stroke-miterlimit",`${t.ml}`)),2===t.r&&r.setAttribute("fill-rule","evenodd"),t.ln&&(r.id=t.ln),t.cl&&r.classList.add(t.cl),t.bm&&(r.style.mixBlendMode=ss(t.bm)),this.stylesList.push(i),s&&this.addToAnimatedContents(t,s),s}createTransformElement(t,e){let s=sa.getTransformProperty(this,t,this);if(!s.o)throw Error(`${this.constructor.name}: Missing required data in TransformProperty`);let i=new sW(s,s.o,e);return this.addToAnimatedContents(t,i),i}destroy(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null}filterUniqueShapes(){let t,e,{length:s}=this.shapes,i=this.stylesList.length,r=[];for(let a=0;a<i;a++){t=this.stylesList[a],e=!1,r.length=0;for(let i=0;i<s;i++)this.shapes[i].styles.includes(t)&&(r.push(this.shapes[i]),e=this.shapes[i]._isAnimated||e);r.length>1&&e&&this.setShapesAsAnimated(r)}}initSecondaryElement(){}reloadShapes(){if(!this.layerElement)throw Error(`${this.constructor.name}: Could not access layerElement`);this._isFirstFrame=!0;let{length:t}=this.itemsData;for(let e=0;e<t;e++)this.prevViewData[e]=this.itemsData[e];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes();let{length:e}=this.dynamicProperties;for(let t=0;t<e;t++)this.dynamicProperties[t].getValue();this.renderModifiers()}renderInnerContent(){this.renderModifiers();let{length:t}=this.stylesList;for(let e=0;e<t;e++)this.stylesList[e].reset();this.renderShape();for(let e=0;e<t;e++)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem?.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d=`M0 0${this.stylesList[e].d}`),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))}renderShape(){let{length:t}=this.animatedContents;for(let e=0;e<t;e++)(this._isFirstFrame||this.animatedContents[e].element._isAnimated)&&!0!==this.animatedContents[e].data&&this.animatedContents[e].fn&&this.animatedContents[e].fn?.(this.animatedContents[e].data,this.animatedContents[e].element,this._isFirstFrame)}searchShapes(t,e,s,i,r,a,n){let o,h,l=n,p=[...a],m=[],c=[],{length:d}=t;for(let a=d-1;a>=0;a--){let n=this.searchProcessedElement(t[a]);switch(n?e[a]=s[n-1]:t[a]._render=l,t[a].ty){case N.Fill:case N.Stroke:case N.GradientFill:case N.GradientStroke:case N.NoStyle:if(n){let{style:t}=e[a]??{style:null};t&&(t.closed=!1)}else e[a]=this.createStyleElement(t[a],r);if(t[a]._render&&e[a]?.style?.pElem.parentNode!==i){let{pElem:t}=e[a].style??{pElem:null};t&&i.appendChild(t)}m.push(e[a]?.style);break;case N.Group:if(n){let{length:t}=e[a]?.it??[];for(let s=0;s<t;s++){let{it:t,prevViewData:i}=e[a]??{it:null,prevViewData:null};i&&t&&(i[s]=t[s])}}else e[a]=this.createGroupElement(t[a]);if(this.searchShapes(t[a].it,e[a]?.it??[],e[a]?.prevViewData??[],e[a].gr,r+1,p,l),t[a]._render&&e[a]?.gr?.parentNode!==i){let{gr:t}=e[a];t&&i.appendChild(t)}break;case N.Transform:n||(e[a]=this.createTransformElement(t[a],i)),(o=e[a]?.transform)&&p.push(o);break;case N.Path:case N.Rectangle:case N.Ellipse:case N.PolygonStar:n||(e[a]=this.createShapeElement(t[a],p,r)),this.setElementStyles(e[a]);break;case N.Trim:case N.RoundedCorners:case N.Unknown:case N.PuckerBloat:case N.ZigZag:case N.OffsetPath:n?(h=e[a]).closed=!1:((h=sJ(t[a].ty)).init(this,t[a]),e[a]=h,this.shapeModifiers.push(h)),c.push(h);break;case N.Repeater:if(n){(h=e[a]).closed=!0,c.push(h);break}h=sJ(t[a].ty),e[a]=h,h.init(this,t,a,e),this.shapeModifiers.push(h),l=!1,c.push(h)}this.addProcessedElement(t[a],a+1)}let{length:u}=m;for(let t=0;t<u;t++){let e=m[t];e&&(e.closed=!0)}let{length:f}=c;for(let t=0;t<f;t++)c[t].closed=!0}setElementStyles(t){let{length:e}=this.stylesList;for(let s=0;s<e;s++)this.stylesList[s].closed||t.styles.push(this.stylesList[s])}setShapesAsAnimated(t){let{length:e}=t;for(let s=0;s<e;s++)t[s].setAsAnimated()}}class sZ extends sv{constructor(t,e,s){if(super(),this.initElement=sK.prototype.initElement,this.prepareFrame=sE.prototype.prepareFrame,this.assetData=e.getAssetData(t.refId),!e.imageLoader)throw Error(`${this.constructor.name} imageLoader is not implemented in globalData`);this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,s)}createContent(){let t,e;if(!this.assetData)throw Error(`${this.constructor.name}: assetData is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.img.width||this.assetData.w===this.img.width&&this.assetData.h===this.img.height)return;let s=tR("canvas");s.width=Number(this.assetData.w),s.height=Number(this.assetData.h);let i=s.getContext("2d"),r=this.img.width,a=this.img.height,n=r/a,o=Number(this.assetData.w)/Number(this.assetData.h),h=this.assetData.pr||this.globalData.renderConfig?.imagePreserveAspectRatio;n>o&&"xMidYMid slice"===h||n<o&&"xMidYMid slice"!==h?t=(e=a)*o:e=(t=r)/o,i?.drawImage(this.img,(r-t)/2,(a-e)/2,t,e,0,0,Number(this.assetData.w),Number(this.assetData.h)),this.img=s}destroy(){this.img=null}renderInnerContent(){this.canvasContext?.drawImage(this.img,0,0)}}class sQ extends sB{constructor(t,e,s,i){let r,a;switch(super(),this.styledShapes=[],this.tr=[0,0,0,0,0,0],e.ty){case N.Rectangle:r=5;break;case N.Ellipse:r=6;break;case N.PolygonStar:r=7;break;default:r=4}this.sh=eZ.getShapeProp(t,e,r);let{length:n}=s;for(let t=0;t<n;t++)s[t].closed||(a={transforms:i.addTransformSequence(s[t].transforms),trNodes:[]},this.styledShapes.push(a),s[t].elements.push(a))}}class s0{constructor(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}addTransformSequence(t){let{length:e}=t,s="_";for(let i=0;i<e;i++)s+=`${t[i].transform.key}_`;let i=this.sequences[s];return i||(i={_mdf:!1,finalTransform:new t3,transforms:[...t]},this.sequences[s]=i,this.sequenceList.push(i)),i}getNewKey(){return this.transform_key_count++,`_${this.transform_key_count}`}processSequence(t,e){let s=0,{length:i}=t.transforms??[],r=e;if(!e)for(;s<i;){if(t.transforms?.[s].transform.mProps._mdf){r=!0;break}s++}if(r)for(t.finalTransform?.reset(),s=i-1;s>=0;s-=1){let{v:e}=t.transforms?.[s].transform.mProps??{v:null};e&&t.finalTransform?.multiply(e)}t._mdf=r}processSequences(t){let{length:e}=this.sequenceList;for(let s=0;s<e;s++)this.processSequence(this.sequenceList[s],t)}}class s1 extends sY{constructor(t,e,s){super(),this.clearCanvas=sv.prototype.clearCanvas,this.createContainerElements=sv.prototype.createContainerElements,this.createRenderableComponents=sv.prototype.createRenderableComponents,this.dashResetter=[],this.exitLayer=sv.prototype.exitLayer,this.hide=sv.prototype.hide,this.initRendererElement=sv.prototype.initRendererElement,this.prepareLayer=sv.prototype.prepareLayer,this.renderFrame=sv.prototype.renderFrame,this.setBlendMode=sv.prototype.setBlendMode,this.show=sv.prototype.show,this.transformHelper={_opMdf:!1,opacity:1},this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new s0,this.initElement(t,e,s)}addTransformToStyleList(t){let{length:e}=this.stylesList;for(let s=0;s<e;s++)this.stylesList[s].closed||this.stylesList[s].transforms.push(t)}closeStyles(t){let{length:e}=t;for(let s=0;s<e;s++)t[s].closed=!0}createContent(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])}createGroupElement(t){return{it:[],prevViewData:[]}}createShapeElement(t){let e=new sQ(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e}createStyleElement(t,e){let s={closed:!0===t.hd,data:t,elements:[],preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],type:t.ty},i={};switch(t.ty){case N.Fill:case N.Stroke:i.c=eW.getProp(this,t.c,1,255,this),i.c.k||(s.co=`rgb(${Math.floor(i.c.v[0])},${Math.floor(i.c.v[1])},${Math.floor(i.c.v[2])})`);break;case N.GradientFill:case N.GradientStroke:i.s=eW.getProp(this,t.s,1,null,this),i.e=eW.getProp(this,t.e,1,null,this),i.h=eW.getProp(this,t.h??{k:0},0,.01,this),i.a=eW.getProp(this,t.a??{k:0},0,t0,this),t.g&&(i.g=new sN(this,t.g,this))}return i.o=eW.getProp(this,t.o,0,.01,this),t.ty===N.Stroke||t.ty===N.GradientStroke?(s.lc=O[t.lc||2],s.lj=z[t.lj||2],1===t.lj&&(s.ml=t.ml),i.w=eW.getProp(this,t.w,0,null,this),i.w.k||(s.wi=i.w.v),t.d&&"object"==typeof t.d&&(i.d=new sR(this,t.d,$.Canvas,this),i.d.k||(s.da=i.d.dashArray,s.do=i.d.dashoffset[0]))):s.r=2===t.r?"evenodd":"nonzero",this.stylesList.push(s),i.style=s,i}createTransformElement(t){return{transform:{_opMdf:!1,key:this.transformsManager.getNewKey(),mProps:sa.getTransformProperty(this,t,this),op:eW.getProp(this,t.o,0,.01,this),opacity:1}}}destroy(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0}drawLayer(){try{let t;if(!this.globalData)throw Error(`${this.constructor.name} globalData is not implemented`);if(!this.globalData.renderer)throw Error(`${this.constructor.name} renderer is not implemented`);let{length:e}=this.stylesList,{renderer:s}=this.globalData,i=this.globalData.canvasContext;for(let r=0;r<e;r++){let{co:e,coOp:a,da:n,data:o,elements:h,grd:l,lc:p,lj:m,ml:c,preTransforms:d,r:u,type:f,wi:g}=t=this.stylesList[r],y=f===N.Stroke||f===N.GradientStroke;if(y&&0===g||!o._shouldRender||0===a||0===this.globalData.currentGlobalAlpha)continue;s.save(),y?(s.ctxStrokeStyle(f===N.Stroke?e:l),s.ctxLineWidth(g||0),p&&s.ctxLineCap(p),m&&s.ctxLineJoin(m),s.ctxMiterLimit(c||0)):s.ctxFillStyle(f===N.Fill?e:l),s.ctxOpacity(a),f!==N.Stroke&&f!==N.GradientStroke&&i?.beginPath(),s.ctxTransform(d.finalTransform?.props);let{length:v}=h;for(let e=0;e<v;e++){(f===N.Stroke||f===N.GradientStroke)&&(i?.beginPath(),i&&n&&(i.setLineDash(n),i.lineDashOffset=t.do||0));let r=h[e].trNodes,{length:a}=r;for(let t=0;t<a;t++){let{p:e=[],pts:s=[]}=r[t];"m"===r[t].t?i?.moveTo(e[0],e[1]):"c"===r[t].t?i?.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]):i?.closePath()}y&&(s.ctxStroke(),n&&i?.setLineDash(this.dashResetter))}y||this.globalData.renderer.ctxFill(u),s.restore()}}catch(t){console.error(this.constructor.name,t)}}reloadShapes(){this._isFirstFrame=!0;let{length:t}=this.itemsData;for(let e=0;e<t;e++)this.prevViewData[e]=this.itemsData[e];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]);let{length:e}=this.dynamicProperties;for(let t=0;t<e;t++)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)}removeTransformFromStyleList(){let{length:t}=this.stylesList;for(let e=0;e<t;e++)this.stylesList[e].closed||this.stylesList[e].transforms.pop()}renderFill(t,e,s){let i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co=`rgb(${Math.floor(e.c.v[0])},${Math.floor(e.c.v[1])},${Math.floor(e.c.v[2])})`),(e.o._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*s.opacity)}renderGradientFill(t,e,s){let i;if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);let r=e.style;if(!r?.grd||e.g?._mdf||e.s?._mdf||e.e?._mdf||1!==t.t&&(e.h?._mdf||e.a?._mdf)){let s=this.globalData.canvasContext,a=e.s?.v??[0,0],n=e.e?.v??[0,0];if(1===t.t)i=s?.createLinearGradient(a[0],a[1],n[0],n[1]);else{let t=Math.sqrt(Math.pow(a[0]-n[0],2)+Math.pow(a[1]-n[1],2)),r=Math.atan2(n[1]-a[1],n[0]-a[0]),o=e.h?.v??0;o>=1?o=.99:o<=-1&&(o=-.99);let h=t*o,l=e.a?.v??0,p=Math.cos(r+l)*h+a[0],m=Math.sin(r+l)*h+a[1];i=s?.createRadialGradient(p,m,0,a[0],a[1],t)}let o=t.g?.p??0,h=e.g?.c??[],l=1;for(let t=0;t<o;t++)e.g?._hasOpacity&&e.g._collapsable&&(l=e.g.o[2*t+1]),i?.addColorStop(h[4*t]/100,`rgba(${h[4*t+1]},${h[4*t+2]},${h[4*t+3]},${l})`);r&&(r.grd=i)}r&&(r.coOp=(e.o?.v??0)*s.opacity)}renderInnerContent(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)}renderPath(t,e){if(!0===t.hd||!t._shouldRender||!e.sh)return;let{length:s}=e.styledShapes;for(let t=0;t<s;t++)this.renderStyledShape(e.styledShapes[t],e.sh)}renderShape(t,e,s,i){try{let r,a=e.length-1;r=t;for(let i=a;i>=0;i--)switch(e[i].ty){case N.Transform:(r=s[i].transform)&&this.renderShapeTransform(t,r);break;case N.Path:case N.Ellipse:case N.Rectangle:case N.PolygonStar:this.renderPath(e[i],s[i]);break;case N.Fill:this.renderFill(e[i],s[i],r);break;case N.Stroke:this.renderStroke(e[i],s[i],r);break;case N.GradientFill:case N.GradientStroke:this.renderGradientFill(e[i],s[i],r);break;case N.Group:this.renderShape(r,e[i].it??[],s[i].it);case N.Trim:}i&&this.drawLayer()}catch(t){console.error(this.constructor.name,t)}}renderShapeTransform(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)}renderStroke(t,e,s){let i=e.style,{c:r,d:a,o:n,w:o}=e;a&&(a._mdf||this._isFirstFrame)&&(i.da=a.dashArray,i.do=a.dashoffset[0]),(r._mdf||this._isFirstFrame)&&(i.co=`rgb(${Math.floor(r.v[0])},${Math.floor(r.v[1])},${Math.floor(r.v[2])})`),(n._mdf||s._opMdf||this._isFirstFrame)&&(i.coOp=n.v*s.opacity),(o._mdf||this._isFirstFrame)&&(i.wi=o.v)}renderStyledShape(t,e){let s,i,r;if(!this._isFirstFrame&&!e._mdf&&!t.transforms._mdf)return;let{transforms:a,trNodes:n}=t,{paths:o}=e,h=o?._length||0;n.length=0;let l=a?.finalTransform;for(r=0;r<h;r++){let t=o?.shapes[r];if(t?.v){for(s=1,i=t._length;s<i;s++)1===s&&n.push({p:l?.applyToPointArray(t.v[0][0],t.v[0][1],0),t:"m"}),n.push({pts:l?.applyToTriplePoints(t.o[s-1],t.i[s],t.v[s]),t:"c"});1===i&&n.push({p:l?.applyToPointArray(t.v[0][0],t.v[0][1],0),t:"m"}),t.c&&i&&n.push({pts:l?.applyToTriplePoints(t.o[s-1],t.i[0],t.v[0]),t:"c"},{t:"z"})}}t.trNodes=n}searchShapes(t,e,s,i,r){let a,n,o=i,h=t.length-1,l=[],p=[],m=[...r];for(let i=h;i>=0;i--){let r=this.searchProcessedElement(t[i]);switch(r?e[i]=s[r-1]:t[i]._shouldRender=o,t[i].ty){case N.Fill:case N.Stroke:case N.GradientFill:case N.GradientStroke:r?e[i].style.closed=!1:e[i]=this.createStyleElement(t[i],m),l.push(e[i].style);break;case N.Group:if(r){let{length:t}=e[i].it;for(let s=0;s<t;s++)e[i].prevViewData[s]=e[i].it[s]}else e[i]=this.createGroupElement(t[i]);this.searchShapes(t[i].it??[],e[i].it,e[i].prevViewData,o,m);break;case N.Transform:r||(n=this.createTransformElement(t[i]),e[i]=n),m.push(e[i]),this.addTransformToStyleList(e[i]);break;case N.Path:case N.Rectangle:case N.Ellipse:case N.PolygonStar:r||(e[i]=this.createShapeElement(t[i]));break;case N.Trim:case N.RoundedCorners:case N.PuckerBloat:case N.ZigZag:case N.OffsetPath:r?(a=e[i]).closed=!1:((a=sJ(t[i].ty)).init(this,t[i]),e[i]=a,this.shapeModifiers.push(a)),p.push(a);break;case N.Repeater:r?(a=e[i]).closed=!0:(a=sJ(t[i].ty),e[i]=a,a.init(this,t,i,e),this.shapeModifiers.push(a),o=!1),p.push(a)}this.addProcessedElement(t[i],i+1)}this.removeTransformFromStyleList(),this.closeStyles(l);let{length:c}=p;for(let t=0;t<c;t++)p[t].closed=!0}}class s2 extends sv{constructor(t,e,s){super(),this.initElement=sK.prototype.initElement,this.prepareFrame=sE.prototype.prepareFrame,this.initElement(t,e,s)}renderInnerContent(){if(!this.globalData)throw Error(`${this.constructor.name}: globalData it not implemented`);if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) it not implemented`);if(!this.globalData.renderer)throw Error(`${this.constructor.name}: globalData.renderer it not implemented`);this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw||0,this.data.sh||0)}}class s3{constructor(t,e,s,i,r,a){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=r,this.p=a,this._mdf={fc:!!i,m:!0,o:!0,p:!0,sc:!!s,sw:!!e}}update(t,e,s,i,r,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;let n=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,n=!0),this.sc!==s&&(this.sc=s,this._mdf.sc=!0,n=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,n=!0),this.m!==r&&(this.m=r,this._mdf.m=!0,n=!0),a&&a.length>0&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13])&&(this.p=a,this._mdf.p=!0,n=!0),n}}class s5 extends eO{constructor(t,e){super(),this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=eW.getProp(t,e.s??{a:0,k:0},0,0,this),"e"in e?this.e=eW.getProp(t,e.e,0,0,this):this.e={v:100},this.o=eW.getProp(t,e.o??{a:0,k:0},0,0,this),this.xe=eW.getProp(t,e.xe??{a:0,k:0},0,0,this),this.ne=eW.getProp(t,e.ne??{a:0,k:0},0,0,this),this.sm=eW.getProp(t,e.sm??{a:0,k:100},0,0,this),this.a=eW.getProp(t,e.a,0,.01,this),0===this.dynamicProperties.length&&this.getValue()}getMult(t,e){let s=t;this._currentTextLength!==this.elem.textProperty?.currentData.l.length&&this.getValue();let i=0,r=0,a=1,n=1;this.ne.v>0?i=this.ne.v/100:r=-this.ne.v/100,this.xe.v>0?a=1-this.xe.v/100:n=1+this.xe.v/100;let o=eF(i,r,a,n).get,h=0,l=this.finalS,p=this.finalE;switch(this.data.sh){case 2:h=o(h=p===l?+(s>=p):Math.max(0,Math.min(.5/(p-l)+(s-l)/(p-l),1)));break;case 3:h=o(h=p===l?s>=p?0:1:1-Math.max(0,Math.min(.5/(p-l)+(s-l)/(p-l),1)));break;case 4:p===l?h=0:(h=Math.max(0,Math.min(.5/(p-l)+(s-l)/(p-l),1)))<.5?h*=2:h=1-2*(h-.5),h=o(h);break;case 5:if(p===l)h=0;else{let t=p-l,e=-t/2+(s=Math.min(Math.max(0,s+.5-l),p-l)),i=t/2;h=Math.sqrt(1-e*e/(i*i))}h=o(h);break;case 6:h=o(h=p===l?0:(1+Math.cos(Math.PI+2*Math.PI*(s=Math.min(Math.max(0,s+.5-l),p-l))/(p-l)))/2);break;default:s>=Math.floor(l)&&(h=s-l<0?Math.max(0,Math.min(Math.min(p,1)-(l-s),1)):Math.max(0,Math.min(p-s,1))),h=o(h)}if(100!==this.sm.v){let t=.01*this.sm.v;0===t&&(t=1e-8);let e=.5-.5*t;h<e?h=0:(h=(h-e)/t)>1&&(h=1)}return h*Number(this.a.v)}getTextSelectorProp(t,e,s){throw Error("Method not implemented")}getValue(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.e.v=this._currentTextLength);let e=2===this.data.r?1:100/this.data.totalChars,s=Number(this.o.v)/e,i=Number(this.s?.v)/e+s,r=Number(this.e.v)/e+s;if(i>r){let t=i;i=r,r=t}return this.finalS=i,this.finalE=r,0}}class s4{constructor(t,e,s){let i={propType:!1},r=e?.a;this.a={a:r?.a?eW.getProp(t,r.a,1,0,s):i,fb:r?.fb?eW.getProp(t,r.fb,0,.01,s):i,fc:r?.fc?eW.getProp(t,r.fc,1,0,s):i,fh:r?.fh?eW.getProp(t,r.fh,0,0,s):i,fs:r?.fs?eW.getProp(t,r.fs,0,.01,s):i,o:r?.o?eW.getProp(t,r.o,0,.01,s):i,p:r?.p?eW.getProp(t,r.p,1,0,s):i,r:r?.r?eW.getProp(t,r.r,0,t0,s):i,rx:r?.rx?eW.getProp(t,r.rx,0,t0,s):i,ry:r?.ry?eW.getProp(t,r.ry,0,t0,s):i,s:r?.s?eW.getProp(t,r.s,1,.01,s):i,sa:r?.sa?eW.getProp(t,r.sa,0,t0,s):i,sc:r?.sc?eW.getProp(t,r.sc,1,0,s):i,sk:r?.sk?eW.getProp(t,r.sk,0,t0,s):i,sw:r?.sw?eW.getProp(t,r.sw,0,0,s):i,t:r?.t?eW.getProp(t,r.t,0,0,s):i},this.s=new s5(t,e?.s),this.s.t=e?.s?.t}}let s6=(t,e,s)=>{let i=Math.max(t,e,s),r=Math.min(t,e,s),a=i-r,n=0;switch(i){case r:n=0;break;case t:n=(e-s+6*(e<s)*a)/(6*a);break;case e:n=(s-t+2*a)/(6*a);break;case s:n=(t-e+4*a)/(6*a)}return[n,0===i?0:a/i,i/255]},s8=(t,e,s)=>{let i=0,r=0,a=0,n=Math.floor(6*t),o=6*t-n,h=s*(1-e),l=s*(1-o*e),p=s*(1-(1-o)*e);switch(n%6){case 0:i=s,r=p,a=h;break;case 1:i=l,r=s,a=h;break;case 2:i=h,r=s,a=p;break;case 3:i=h,r=l,a=s;break;case 4:i=p,r=h,a=s;break;case 5:i=s,r=h,a=l}return[i,r,a]},s9=(t,e)=>{let s=s6(255*t[0],255*t[1],255*t[2]);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),s8(s[0],s[1],s[2])},s7=(t,e)=>{let s=s6(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&s[0]++,s8(s[0],s[1],s[2])},it=(t,e)=>{let s=s6(255*t[0],255*t[1],255*t[2]);return s[1]+=e,s[1]>1?s[1]=1:s[1]<=0&&(s[1]=0),s8(s[0],s[1],s[2])};class ie extends e${constructor(t,e,s){super(),this.defaultPropsArray=[],this.mHelper=new t3,this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=t2(Number(this._textData.a?.length)),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}getMeasures(t,e){try{if(this.lettersChangedFlag=!!e,!this._mdf&&!this._isFirstFrame&&!e&&(!this._hasMaskedPath||!this._pathData.m?._mdf))return;this._isFirstFrame=!1;let s=this._moreOptions.alignment.v,i=this._animatorsData,r=this._textData,a=this.mHelper,n=this._renderType,o=this.renderedLetters.length,h,l,p,m,c=t.l,d,u=0,f,g=0,y,v=0,b=0,_,x=null,w=[],E=0,C=0,S,k,M=null;if(this._hasMaskedPath&&this._pathData.m){if(M=this._pathData.m,!this._pathData.n||this._pathData._mdf){let t=M.v;if(t){let e;for(this._pathData.r?.v&&(t=t.reverse()),d={segments:[],tLength:0},m=Number(t._length)-1,C=0,p=0;p<m;p++)tt(t)||(e=ew(t.v[p],t.v[p+1],[t.o[p][0]-t.v[p][0],t.o[p][1]-t.v[p][1]],[t.i[p+1][0]-t.v[p+1][0],t.i[p+1][1]-t.v[p+1][1]]),d.tLength+=e.segmentLength,d.segments.push(e),C+=e.segmentLength);p=m,M.v?.c&&!tt(t)&&(e=ew(t.v[p],t.v[0],[t.o[p][0]-t.v[p][0],t.o[p][1]-t.v[p][1]],[t.i[0][0]-t.v[0][0],t.i[0][1]-t.v[0][1]]),d.tLength+=e.segmentLength,d.segments.push(e),C+=e.segmentLength),this._pathData.pi=d}}if(d=this._pathData.pi,u=this._pathData.f?.v??0,b=0,v=1,g=0,w=d?.segments??[],u>0&&M.v?.c)for((d?.tLength??0<Math.abs(u))&&(u=-Math.abs(u)%(d?.tLength??0)),b=w.length-1,v=(x=w[b].points).length-1;u<0;)u+=x[v]?.partialLength,(v-=1)<0&&(b-=1,v=(x=w[b].points).length-1);_=(x=w[b]?.points??[])[v-1],E=(f=x[v]).partialLength}m=c.length||0,h=0,l=0;let P=1.2*(t.finalSize||0)*.714,A=!0,T,D,I,F,L=i.length,N,V=-1,R,O=0,z=0,B=u,G=b,q=v,j=-1,W,H=[0,0,0],Y=0,U=[0,0,0],J,X,K,Z,Q="",te=this.defaultPropsArray,ts;if(2===t.j||1===t.j){let e=0,s=0,a=2===t.j?-.5:-1,n=0,o=!0;for(p=0;p<m;p++){if(c[p].n){for(e&&(e+=s);n<p;)c[n].animatorJustifyOffset=e,n++;e=0,o=!0;continue}for(I=0;I<L;I++){if(T=i[I].a,!T?.t.propType)continue;let{v:n}=T.t;"number"==typeof n&&(o&&2===t.j&&(s+=n*a),D=i[I].s,N=D?.getMult(c[p].anIndexes[I],r.a?.[I].s?.totalChars),void 0!==N&&(tt(N)?e+=n*N[0]*a:e+=n*N*a))}o=!1}for(e&&(e+=s);n<p;)c[n].animatorJustifyOffset=e,n++}for(p=0;p<m;p++){if(a.reset(),W=1,c[p].n)h=0,l+=t.yOffset||0,l+=+!!A,u=B,A=!1,this._hasMaskedPath&&(b=G||0,v=q||0,_=(x=w[b]?.points??[])[v-1],E=(f=x[v]).partialLength,g=0),Q="",Z="",X="",ts="",te=this.defaultPropsArray;else{if(this._hasMaskedPath){if(j!==c[p].line){switch(t.j){case 1:u+=C-t.lineWidths[c[p].line];break;case 2:u+=(C-t.lineWidths[c[p].line])/2}j=c[p].line||0}V!==c[p].ind&&(c[V]&&(u+=Number(c[V].extra)),u+=(c[p].an||0)/2,V=c[p].ind||0),u+=s[0]*(c[p].an||0)*.005;let e=0;for(I=0;I<L;I++){if(T=i[I].a,T?.p.propType){if(D=i[I].s,!(N=D?.getMult(c[p].anIndexes[I],r.a?.[I].s?.totalChars)))continue;tt(T.p.v)&&(tt(N)?e+=T.p.v[0]*N[0]:e+=T.p.v[0]*N)}if(T?.a.propType){if((D=i[I].s,N=D?.getMult(Number(c[p].anIndexes[I]),r.a?.[I].s?.totalChars))&&tt(T.a.v)){if(tt(N)){e+=T.a.v[0]*N[0];continue}e+=T.a.v[0]*N}}}for(y=!0,this._pathData.a?.v&&(u=.5*(c[0].an||0)+(C-Number(this._pathData.f?.v)-.5*(c[0].an||0)-.5*c[c.length-1].an)*V/(m-1)+Number(this._pathData.f?.v));y;)g+E>=u+e||!x?(S=(u+e-g)/(f?.partialLength||0),O=Number(_?.point[0])+(Number(f?.point[0])-Number(_?.point[0]))*S,z=Number(_?.point[1])+(Number(f?.point[1])-Number(_?.point[1]))*S,a.translate(-s[0]*c[p].an*.005,-(.01*(s[1]*P))),y=!1):x.length>0&&(g+=Number(f?.partialLength),++v>=x.length&&(v=0,w[++b]?x=w[b].points:M?.v?.c?(v=0,x=w[b=0].points):(g-=Number(f?.partialLength),x=null)),x&&(_=f,E=(f=x[v]).partialLength));R=c[p].an/2-c[p].add,a.translate(-R,0,0)}else R=c[p].an/2-c[p].add,a.translate(-R,0,0),a.translate(-s[0]*c[p].an*.005,-s[1]*P*.01,0);for(I=0;I<L;I++)if(T=i[I].a,T?.t.propType&&(D=i[I].s,N=D?.getMult(Number(c[p].anIndexes[I]),r.a?.[I].s?.totalChars),0!==h||0!==t.j)){if(this._hasMaskedPath){tt(N)?u+=Number(T.t.v)*N[0]:u+=Number(T.t.v)*Number(N);continue}if(tt(N)){h+=Number(T.t.v)*N[0];continue}h+=Number(T.t.v)*Number(N)}for(t.strokeWidthAnim&&(Y=t.sw||0),t.strokeColorAnim&&(H=t.sc?[Number(t.sc[0]),Number(t.sc[1]),Number(t.sc[2])]:[0,0,0]),t.fillColorAnim&&t.fc&&(U=[Number(t.fc[0]),Number(t.fc[1]),Number(t.fc[2])]),I=0;I<L;I++)if(T=i[I].a,T?.a.propType){if(D=i[I].s,!(N=D?.getMult(c[p].anIndexes[I],r.a?.[I].s?.totalChars))||!tt(T.a.v))continue;if(tt(N)){a.translate(-T.a.v[0]*N[0],-T.a.v[1]*N[1],T.a.v[2]*N[2]);continue}a.translate(-T.a.v[0]*N,-T.a.v[1]*N,T.a.v[2]*N)}for(I=0;I<L;I++)if(T=i[I].a,T?.s.propType){if(D=i[I].s,!(N=D?.getMult(c[p].anIndexes[I],r.a?.[I].s?.totalChars))||!tt(T.s.v))continue;if(tt(N)){a.scale(1+(T.s.v[0]-1)*N[0],1+(T.s.v[1]-1)*N[1],1);continue}a.scale(1+(T.s.v[0]-1)*N,1+(T.s.v[1]-1)*N,1)}for(I=0;I<L;I++)if(T=i[I].a,D=i[I].s,N=D?.getMult(c[p].anIndexes[I],r.a?.[I].s?.totalChars)){if(T?.sk.propType&&(tt(N)?a.skewFromAxis(-Number(T.sk.v)*N[0],Number(T.sa.v)*N[1]):a.skewFromAxis(-Number(T.sk.v)*N,Number(T.sa.v)*N)),T?.r.propType&&(tt(N)?a.rotateZ(-Number(T.r.v)*N[2]):a.rotateZ(-Number(T.r.v)*N)),T?.ry.propType&&(tt(N)?a.rotateY(Number(T.ry.v)*N[1]):a.rotateY(Number(T.ry.v)*N)),T?.rx.propType&&(tt(N)?a.rotateX(Number(T.rx.v)*N[0]):a.rotateX(Number(T.rx.v)*N)),T?.o.propType&&(tt(N)?W+=(Number(T.o.v)*N[0]-W)*N[0]:W+=(Number(T.o.v)*N-W)*N),t.strokeWidthAnim&&T?.sw.propType&&(tt(N)?Y+=Number(T.sw.v)*N[0]:Y+=Number(T.sw.v)*N),t.strokeColorAnim&&T?.sc.propType&&tt(T.sc.v))for(J=0;J<3;J++)tt(N)?H[J]+=(T.sc.v[J]-H[J])*N[0]:H[J]+=(T.sc.v[J]-H[J])*N;if(t.fillColorAnim&&t.fc){if(T?.fc.propType)for(J=0;J<3;J++)tt(T.fc.v)&&(tt(N)?U[J]+=(T.fc.v[J]-U[J])*N[0]:U[J]+=(T.fc.v[J]-U[J])*N);T?.fh.propType&&(U=tt(N)?s7(U,Number(T.fh.v)*N[0]):s7(U,Number(T.fh.v)*N)),T?.fs.propType&&(U=tt(N)?it(U,Number(T.fs.v)*N[0]):it(U,Number(T.fs.v)*N)),T?.fb.propType&&(U=tt(N)?s9(U,Number(T.fb.v)*N[0]):s9(U,Number(T.fb.v)*N))}}for(I=0;I<L;I++)if(T=i[I].a,T?.p.propType){if(D=i[I].s,!(N=D?.getMult(c[p].anIndexes[I],r.a?.[I].s?.totalChars))||!tt(T.p.v))continue;this._hasMaskedPath?tt(N)?a.translate(0,T.p.v[1]*N[0],-T.p.v[2]*N[1]):a.translate(0,T.p.v[1]*N,-T.p.v[2]*N):tt(N)?a.translate(T.p.v[0]*N[0],T.p.v[1]*N[1],-T.p.v[2]*N[2]):a.translate(T.p.v[0]*N,T.p.v[1]*N,-T.p.v[2]*N)}if(t.strokeWidthAnim&&(X=Y<0?0:Y),t.strokeColorAnim&&(K=`rgb(${Math.round(255*H[0])},${Math.round(255*H[1])},${Math.round(255*H[2])})`),t.fillColorAnim&&t.fc&&(Z=`rgb(${Math.round(255*U[0])},${Math.round(255*U[1])},${Math.round(255*U[2])})`),this._hasMaskedPath){if(a.translate(0,-Number(t.ls)),a.translate(0,s[1]*P*.01+l,0),this._pathData.p?.v){k=(Number(f?.point[1])-Number(_?.point[1]))/(Number(f?.point[0])-Number(_?.point[0]));let t=180*Math.atan(k)/Math.PI;Number(f?.point[0])<Number(_?.point[0])&&(t+=180),a.rotate(-t*Math.PI/180)}a.translate(O,z,0),u-=s[0]*c[p].an*.005,c[p+1]&&V!==c[p+1].ind&&(u+=c[p].an/2,u+=.001*t.tr*Number(t.finalSize))}else{switch(a.translate(h,l,0),t.ps&&a.translate(t.ps[0],t.ps[1]+Number(t.ascent),0),t.j){case 1:a.translate(c[p].animatorJustifyOffset+Number(t.justifyOffset)+(Number(t.boxWidth)-Number(t.lineWidths[c[p].line])),0,0);break;case 2:a.translate(c[p].animatorJustifyOffset+Number(t.justifyOffset)+(Number(t.boxWidth)-Number(t.lineWidths[c[p].line]))/2,0,0)}a.translate(0,-Number(t.ls)),a.translate(R,0,0),a.translate(s[0]*Number(c[p].an)*.005,s[1]*P*.01,0),h+=c[p].l+.001*t.tr*Number(t.finalSize)}n===$.HTML?Q=a.toCSS():n===$.SVG?Q=a.to2dCSS():te=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5],a.props[6],a.props[7],a.props[8],a.props[9],a.props[10],a.props[11],a.props[12],a.props[13],a.props[14],a.props[15]],ts=W}if(o<=p){F=new s3(Number(ts),Number(X),K,Z,Q,te),this.renderedLetters.push(F),o++,this.lettersChangedFlag=!0;continue}F=this.renderedLetters[p],this.lettersChangedFlag=F.update(Number(ts),Number(X),K,Z,Q,te)||this.lettersChangedFlag}}catch(t){console.error(this.constructor.name,t)}}getValue(){return this._elem.globalData?.frameId===this._frameId||(this._frameId=this._elem.globalData?.frameId??0,this.iterateDynamicProperties()),0}searchProperties(t){let{length:e}=this._textData.a??[],{getProp:s}=eW;for(let t=0;t<e;t++)this._animatorsData[t]=new s4(this._elem,this._textData.a?.[t],this);this._textData.p&&"m"in this._textData.p&&this._elem.maskManager?(this._pathData={a:s(this._elem,this._textData.p.a,0,0,this),f:s(this._elem,this._textData.p.f,0,0,this),l:s(this._elem,this._textData.p.l,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m),p:s(this._elem,this._textData.p.p,0,0,this),r:s(this._elem,this._textData.p.r,0,0,this)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=s(this._elem,this._textData.m?.a,1,0,this)}}function is(t){let e=t.fStyle?t.fStyle.split(" "):[],s="normal",i="normal",{length:r}=e;for(let t=0;t<r;t++)switch(e[t].toLowerCase()){case"italic":i="italic";break;case"bold":s="700";break;case"black":s="900";break;case"medium":s="500";break;case"regular":case"normal":s="400";break;case"light":case"thin":s="200"}return{style:i,weight:t.fWeight||s}}let ii=[2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403],ir={data:{shapes:[]},shapes:[],size:0,w:0},ia=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function io(t){let e=ih(t);return e>=127462&&e<=127487}function ih(t){let e=0,s=t.charCodeAt(0);if(s>=55296&&s<=56319){let i=t.charCodeAt(1);i>=56320&&i<=57343&&(e=(s-55296)*1024+i-56320+65536)}return e}function il(t,e){if(J())return;let s=tR("span");s.setAttribute("aria-hidden","true"),s.style.fontFamily=e;let i=tR("span");i.innerText="giItT1WQy@!-/#",s.style.position="absolute",s.style.left="-10000px",s.style.top="-10000px",s.style.fontSize="300px",s.style.fontVariant="normal",s.style.fontStyle="normal",s.style.fontWeight="normal",s.style.letterSpacing="0",s.appendChild(i),document.body.appendChild(s);let r=i.offsetWidth;return i.style.fontFamily=`${function(t){let e=t.split(","),{length:s}=e,i=[];for(let t=0;t<s;t++)"sans-serif"!==e[t]&&"monospace"!==e[t]&&i.push(e[t]);return i.join(",")}(t)}, ${e}`,{node:i,parent:s,w:r}}class ip{constructor(){this.chars=null,this.fonts=[],this.isLoaded=!1,this.typekitLoaded=0,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)}addChars(t){if(!t)return;this.chars=this.chars??[];let{length:e}=t,s,{length:i}=this.chars,r;for(let a=0;a<e;a++){for(s=0,r=!1;s<i;)this.chars[s].style===t[a].style&&this.chars[s].fFamily===t[a].fFamily&&this.chars[s].ch===t[a].ch&&(r=!0),s++;!r&&(this.chars.push(t[a]),i++)}}addFonts(t,e){if(!t){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=t.list;return}let{length:s}=t.list;if(!J()){this.isLoaded=!0;for(let e=0;e<s;e++)t.list[e].helper=this.createHelper(t.list[e]),t.list[e].cache={};this.fonts=t.list;return}let i=s;for(let s=0;s<i;s++){let r=!0,a;if(t.list[s].loaded=!1,t.list[s].monoCase=il(t.list[s].fFamily,"monospace"),t.list[s].sansCase=il(t.list[s].fFamily,"sans-serif"),t.list[s].fPath){if(J()||"p"!==t.list[s].fOrigin&&3!==t.list[s].origin)if(J()||"g"!==t.list[s].fOrigin&&1!==t.list[s].origin){if(!J()&&("t"===t.list[s].fOrigin||2===t.list[s].origin)){let{length:i}=a=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');for(s=0;s<i;s++)t.list[s].fPath===a[s].src&&(r=!1);if(r){let i=tR("link");i.setAttribute("f-forigin",t.list[s].fOrigin),i.setAttribute("f-origin",`${t.list[s].origin}`),i.rel="stylesheet",i.href=t.list[s].fPath,e?.appendChild(i)}}}else{let{length:e}=a=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');for(s=0;s<e;s++)a[s].href.includes(t.list[s].fPath)&&(r=!1);if(r&&!J()){let e=tR("link");e.setAttribute("f-forigin",t.list[s].fOrigin),e.setAttribute("f-origin",`${t.list[s].origin}`),e.type="text/css",e.rel="stylesheet",e.href=t.list[s].fPath,document.body.appendChild(e)}}else if((a=document.querySelectorAll(`style[f-forigin="p"][f-family="${t.list[s].fFamily}"], style[f-origin="3"][f-family="${t.list[s].fFamily}"]`)).length>0&&(r=!1),r){let i=tR("style");i.setAttribute("f-forigin",t.list[s].fOrigin),i.setAttribute("f-origin",`${t.list[s].origin}`),i.setAttribute("f-family",t.list[s].fFamily),i.innerText=`@font-face {font-family: ${t.list[s].fFamily}; font-style: normal; src: url('${t.list[s].fPath}');}`,e?.appendChild(i)}}else t.list[s].loaded=!0,i-=1;t.list[s].helper=this.createHelper(t.list[s],e),t.list[s].cache={},this.fonts.push(t.list[s])}0===i?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}getCharData(t,e,s){let i=0,{length:r}=this.chars??[];for(;i<r;){if(this.chars?.[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i++}return("string"!=typeof t||13===t.charCodeAt(0))&&t||this._warned||(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,s)),ir}getFontByName(t){let e=0,{length:s}=this.fonts;for(;e<s;){if(this.fonts[e].fName===t)return this.fonts[e];e++}return this.fonts[0]}measureText(t,e,s){let i=this.getFontByName(e);if(i.cache&&!i.cache[t]){let e=i.helper;if(" "===t){let s=Number(e?.measureText(`|${t}|`)),r=Number(e?.measureText("||"));i.cache[t]=(s-r)/100}else i.cache[t]=Number(e?.measureText(t))/100}return Number(i.cache?.[t])*Number(s)}checkLoadedFonts(){let t,e,s=this.fonts.length;for(let i=0;i<s;i++){if(this.fonts[i].loaded){s-=1;continue}if("n"===this.fonts[i].fOrigin||0===this.fonts[i].origin){this.fonts[i].loaded=!0;continue}if(t=this.fonts[i].monoCase?.node,e=this.fonts[i].monoCase?.w||0,t?.offsetWidth===e?(t=this.fonts[i].sansCase?.node,e=this.fonts[i].sansCase?.w||0,t?.offsetWidth!==e&&(s-=1,this.fonts[i].loaded=!0)):(s-=1,this.fonts[i].loaded=!0),!this.fonts[i].loaded)continue;let{monoCase:r,sansCase:a}=this.fonts[i];a&&this.fonts[i].sansCase?.parent.parentNode?.removeChild(a.parent),r&&this.fonts[i].monoCase?.parent.parentNode?.removeChild(r.parent)}if(0!==s&&Date.now()-this.initTime<5e3)return void setTimeout(this.checkLoadedFontsBinded,20);setTimeout(this.setIsLoadedBinded,10)}createHelper(t,e){let s;if(J())return;let i=e?$.SVG:$.Canvas,r=is(t);if(i===$.SVG){let i=tO("text");i.style.fontSize="100px",i.setAttribute("font-family",t.fFamily),i.setAttribute("font-style",r.style),i.setAttribute("font-weight",r.weight),i.textContent="1",t.fClass?(i.style.fontFamily="inherit",i.classList.add(t.fClass)):i.style.fontFamily=t.fFamily,e?.appendChild(i),s=i}else{let e=new OffscreenCanvas(500,500).getContext("2d");e&&(e.font=`${r.style} ${r.weight} 100px ${t.fFamily}`,s=e)}return{measureText:t=>i===$.SVG?(s.textContent=t,s.getComputedTextLength()):s.measureText(t).width}}setIsLoaded(){this.isLoaded=!0}}class im extends eO{constructor(t,e){super(),this.defaultBoxWidth=[0,0],this._frameId=-999999,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d?.sid&&(e.d=t.globalData?.slotManager?.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={__complete:!1,ascent:0,boxWidth:this.defaultBoxWidth,f:"",fc:"",fillColorAnim:!1,finalLineHeight:0,finalSize:0,finalText:[],fStyle:"",fWeight:"",justifyOffset:0,l:[],lh:0,lineWidths:[],ls:0,of:"",ps:null,s:0,sc:"",strokeColorAnim:!1,strokeWidthAnim:!1,sw:0,t:0,tr:0,yOffset:0};let s=this.data.d?.k[0].s;s&&this.copyData(this.currentData,s),this.searchProperty()||this.completeTextData(this.currentData)}addEffect(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)}buildFinalText(t){let e=[],s=0,i=t.length,r,a,n,o=!1,h;for(;s<i;){var l;(n=o,o=!1,r=t.charCodeAt(s),h=t.charAt(s),ii.includes(r))?n=!0:r>=55296&&r<=56319?function(t,e){let s=e,i=ih(t.slice(s,2));if(127988!==i)return!1;let r=0;for(s+=2;r<5;){if((i=ih(t.slice(s,2)))<917601||i>917626)return!1;r++,s+=2}return 917631===ih(t.slice(s,2))}(t,s)?h=t.slice(s,14):(a=t.charCodeAt(s+1))>=56320&&a<=57343&&(function(t,e){let s=t.toString(16)+e.toString(16);return ia.includes(s)}(r,a)?(h=t.slice(s,2),n=!0):h=io((l=t.slice(s,4)).slice(0,2))&&io(l.slice(2,2))?t.slice(s,4):t.slice(s,2)):r>56319?65039===r&&(n=!0):8205===r&&(n=!0,o=!0),n?e[e.length-1]+=h:e.push(h),s+=h.length}return e}calculateExpression(t){throw Error(`${this.constructor.name}: Method calculateExpression is not implemented`)}canResizeFont(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)}completeTextData(t){let e,s,i,r,a,n,o;t.__complete=!0;let{fontManager:h}=this.elem.globalData??{};if(!h)throw Error(`${this.constructor.name}: FontManager not loaded to globalData`);let{canResize:l,data:p,minimumFontSize:m}=this,c=[],d,u,f=0,g,y=p.m?.g,v=0,b=0,_=0,x=[],w,E=0,C=h.getFontByName(t.f),S=is(C);t.fWeight=S.weight,t.fStyle=S.style,t.finalSize=t.s,t.finalText=this.buildFinalText(`${t.t}`),d=t.finalText.length||0,t.finalLineHeight=t.lh;let k=t.tr/1e3*t.finalSize;if(t.sz){let r,a,n=!0,[o,p]=t.sz;for(;n;){a=this.buildFinalText(`${t.t}`),r=0,w=0,d=a.length,k=t.tr/1e3*t.finalSize;let c=-1;for(let n=0;n<d;n++)i=a[n].charCodeAt(0),u=!1," "===a[n]?c=n:(13===i||3===i)&&(w=0,u=!0,r+=t.finalLineHeight||1.2*t.finalSize),h.chars?(e=h.getCharData(a[n],C.fStyle,C.fFamily),s=u?0:e.w*t.finalSize/100):s=h.measureText(a[n],t.f,t.finalSize)||0,w+s>o&&" "!==a[n]?(-1===c?d++:n=c,r+=t.finalLineHeight||1.2*t.finalSize,a.splice(n,+(c===n),"\r"),c=-1,w=0):(w+=s,w+=k);r+=Number(C.ascent)*t.finalSize/100,l&&t.finalSize>m&&p<r?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=a,d=t.finalText.length,n=!1)}}w=-k;let M=0,P;for(let r=0;r<d;r++)if(u=!1,13===(i=(P=t.finalText[r]).charCodeAt(0))||3===i?(M=0,x.push(w),E=w>E?w:E,w=-2*k,g="",u=!0,_++):g=P,h.chars?(e=h.getCharData(P,C.fStyle,h.getFontByName(t.f).fFamily),s=u?0:e.w*t.finalSize/100):s=h.measureText(g,t.f,t.finalSize)," "===P?M+=s+k:(w+=s+k+M,M=0),c.push({add:v,an:s,animatorJustifyOffset:0,anIndexes:[],l:s,line:_,n:u,val:g}),2===y){if(v+=s,""===g||" "===g||r===d-1){for((""===g||" "===g)&&(v-=s);b<=r;)c[b].an=v,c[b].ind=f,c[b].extra=s,b++;f++,v=0}}else if(3===y){if(v+=s,""===g||r===d-1){for(""===g&&(v-=s);b<=r;)c[b].an=v,c[b].ind=f,c[b].extra=s,b++;v=0,f++}}else c[f].ind=f,c[f].extra=0,f++;if(t.l=c,E=w>E?w:E,x.push(w),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=E,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=x;let A=p.a,{length:T}=A??[],D=[];for(let e=0;e<T;e++){if(!(r=A?.[e]))continue;r.a?.sc&&(t.strokeColorAnim=!0),r.a?.sw&&(t.strokeWidthAnim=!0),(r.a?.fc||r.a?.fh||r.a?.fs||r.a?.fb)&&(t.fillColorAnim=!0),o=0,n=Number(r.s?.b);for(let t=0;t<d;t++)(a=c[t]).anIndexes[e]=o,(1===n&&""!==a.val||2===n&&""!==a.val&&" "!==a.val||3===n&&(a.n||" "===a.val||t===d-1)||4===n&&(a.n||t===d-1))&&(1===Number(r.s?.rn)&&D.push(o),o++);let s=p.a?.[e].s;s&&(s.totalChars=o);let i=-1,h;if(r.s?.rn===1)for(let t=0;t<d;t++)i!==Number((a=c[t]).anIndexes[e])&&(i=a.anIndexes[e],h=D.splice(Math.floor(Math.random()*D.length),1)[0]),h&&(a.anIndexes[e]=h)}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=Number(C.ascent)*t.finalSize/100}copyData(t,e){let s=Object.keys(e),{length:i}=s;for(let r=0;r<i;r++)Object.hasOwn(e,s[r])&&(t[s[r]]=e[s[r]]);return t}getExpressionValue(t,e){throw Error(`${this.constructor.name}: Method getExpressionValue is not implemented`)}getKeyframeValue(){let t=this.data.d?.k??[],e=Number(this.elem.comp?.renderedFrame),s=0,i=t.length;for(;s<=i-1&&!(s===i-1||Number(t[s+1].t)>e);)s++;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d?.k[this.keysIndex].s}getValue(t){if((this.elem.globalData?.frameId===this.frameId||0===this.effectsSequence.length)&&!t)return 0;let e=this.data.d?.k[this.keysIndex].s.t;e&&(this.currentData.t=e);let s=this.currentData,i=this.keysIndex;if(this.lock)return this.setCurrentData(this.currentData),0;this.lock=!0,this._mdf=!1;let{length:r}=this.effectsSequence,a=t??this.data.d?.k[this.keysIndex].s;for(let t=0;t<r;t++)a=i===this.keysIndex?this.effectsSequence[t](this.currentData,a?.t):this.effectsSequence[t](a,a?.t);return s!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData?.frameId,0}recalculate(t){if(!this.data.d)throw Error(`${this.constructor.name}: data.k (TextData -> DocumentData) is not implemented`);let e=this.data.d.k[t].s;e&&(e.__complete=!1),this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)}searchExpressions(){throw Error(`${this.constructor.name}: Method searchExpressions is not implemented`)}searchKeyframes(){if(!this.data.d)throw Error(`${this.constructor.name}: data.k (TextData -> DocumentData) is not implemented`);return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf}searchProperty(){return this.searchKeyframes()}setCurrentData(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0}setMinimumFontSize(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)}updateDocumentData(t,e){if(!this.data.d)throw Error(`${this.constructor.name}: data.k (TextData -> DocumentData) is not implemented`);let s=e;s=s??this.keysIndex;let i=this.copyData({},this.data.d.k[s].s);i=this.copyData(i,t),this.data.d.k[s].s=i,this.recalculate(s),this.setCurrentData(i),this.elem.addDynamicProperty(this)}}class ic extends sb{applyTextPropertiesToMatrix(t,e,s,i,r){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+Number(t.ascent),0),e.translate(0,-Number(t.ls),0),t.j){case 1:e.translate(Number(t.justifyOffset)+(Number(t.boxWidth)-Number(t.lineWidths[s])),0,0);break;case 2:e.translate(Number(t.justifyOffset)+(Number(t.boxWidth)-Number(t.lineWidths[s]))/2,0,0)}e.translate(i,r,0)}buildColor(t){return`rgb(${Math.round(255*t[0])},${Math.round(255*t[1])},${Math.round(255*t[2])})`}buildNewText(){throw Error(`${this.constructor.name}: Method buildNewText is not implemented`)}canResizeFont(t){this.textProperty?.canResizeFont(t)}createPathShape(t,e){let s,i="",{length:r}=e;for(let a=0;a<r;a++)e[a].ty===N.Path&&e[a].ks?.k&&(i+=sS(s=e[a].ks?.k,s.i.length,!0,t));return i}initElement(t,e,s){if(!t.t)throw Error(`${this.constructor.name}: data.t (LottieLayer -> TextData) can't be undefined`);this.emptyProp=new s3,this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,s),this.textProperty=new im(this,t.t),this.textAnimator=new ie(t.t,this.renderType||$.SVG,this),this.initTransform(),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)}prepareFrame(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}setMinimumFontSize(t){this.textProperty?.setMinimumFontSize(t)}updateDocumentData(t,e){this.textProperty?.updateDocumentData(t,e)}validateText(){(this.textProperty?._mdf||this.textProperty?._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)}}let id="rgba(0,0,0,0)";class iu extends ic{constructor(t,e,s){super(),this.clearCanvas=sv.prototype.clearCanvas,this.createContainerElements=sv.prototype.createContainerElements,this.createContent=sv.prototype.createContent,this.createElements=sv.prototype.createElements,this.createRenderableComponents=sv.prototype.createRenderableComponents,this.destroy=sv.prototype.destroy,this.exitLayer=sv.prototype.exitLayer,this.hide=sv.prototype.hide,this.hideElement=sv.prototype.hideElement,this.initRendererElement=sv.prototype.initRendererElement,this.prepareLayer=sv.prototype.prepareLayer,this.renderedLetters=[],this.renderFrame=sv.prototype.renderFrame,this.renderLocalTransform=sv.prototype.renderLocalTransform,this.renderRenderable=sv.prototype.renderRenderable,this.searchEffectTransforms=sv.prototype.searchEffectTransforms,this.setBlendMode=sv.prototype.setBlendMode,this.show=sv.prototype.show,this.showElement=sv.prototype.showElement,this.tHelper=tR("canvas").getContext("2d"),this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType=$.Canvas,this.values={fill:id,fValue:"",stroke:id,sWidth:0},this.initElement(t,e,s)}buildNewText(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.globalData.fontManager)throw Error(`${this.constructor.name}: fontManager is not implemented in globalData`);if(!this.textProperty)throw Error(`${this.constructor.name}: textProperty is not implemented`);let t=this.textProperty.currentData;this.renderedLetters=t2(t.l.length||0);let e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;let s=!1;t.sc&&(s=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=Number(t.sw));let i=this.globalData.fontManager.getFontByName(t.f),r=t.l,a=this.mHelper;this.stroke=s,this.values.fValue=`${t.finalSize}px ${this.globalData.fontManager.getFontByName(t.f).fFamily}`;let{singleShape:n}=this.data,o=.001*t.tr*Number(t.finalSize),h,l=0,p=0,m=!0,c=0,{length:d}=t.finalText;for(let e=0;e<d;e++){let s=this.globalData.fontManager.getCharData(t.finalText[e],i.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily).data??{};a.reset(),n&&r[e].n&&(l=-o,p+=Number(t.yOffset),p+=+!!m,m=!1);let d=s.shapes?.[0].it??[];a.scale(Number(t.finalSize)/100,Number(t.finalSize)/100),n&&this.applyTextPropertiesToMatrix(t,a,r[e].line,l,p);let{length:u}=d,f=t2(u-1),g=0;for(let t=0;t<u;t++){if(d[t].ty!==N.Path)continue;let{length:e}=(d[t].ks?.k).i,s=d[t].ks?.k,i=[];for(h=1;h<e;h++)1===h&&i.push(a.applyToX(s.v[0][0],s.v[0][1],0),a.applyToY(s.v[0][0],s.v[0][1],0)),i.push(a.applyToX(s.o[h-1][0],s.o[h-1][1],0),a.applyToY(s.o[h-1][0],s.o[h-1][1],0),a.applyToX(s.i[h][0],s.i[h][1],0),a.applyToY(s.i[h][0],s.i[h][1],0),a.applyToX(s.v[h][0],s.v[h][1],0),a.applyToY(s.v[h][0],s.v[h][1],0));i.push(a.applyToX(s.o[h-1][0],s.o[h-1][1],0),a.applyToY(s.o[h-1][0],s.o[h-1][1],0),a.applyToX(s.i[0][0],s.i[0][1],0),a.applyToY(s.i[0][0],s.i[0][1],0),a.applyToX(s.v[0][0],s.v[0][1],0),a.applyToY(s.v[0][0],s.v[0][1],0)),f[g]=i,g++}n&&(l+=r[e].l,l+=o),this.textSpans[c]?this.textSpans[c].elem=f:this.textSpans[c]={elem:f},c++}}renderInnerContent(){let t,e,s,i;if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.textAnimator)throw Error(`${this.constructor.name}: textAnimator is not implemented`);if(!this.textProperty)throw Error(`${this.constructor.name}: textProperty is not implemented`);if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer?.ctxLineCap("butt"),this.globalData.renderer?.ctxLineJoin("miter"),this.globalData.renderer?.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);let{renderedLetters:r}=this.textAnimator,a=this.textProperty.currentData.l,n,o=null,h=null,l=null,p,m,c=this.globalData.renderer,{length:d}=a;for(let u=0;u<d;u++)if(!a[u].n){if(n=r[u],c.save(),c.ctxTransform(n.p),c.ctxOpacity(n.o),this.fill){n.fc?o!==n.fc&&(c.ctxFillStyle(n.fc),o=n.fc):o!==this.values.fill&&(o=this.values.fill,c.ctxFillStyle(this.values.fill));let{length:e}=p=this.textSpans[u].elem??[];for(this.globalData.canvasContext?.beginPath(),t=0;t<e;t++){let{length:e}=m=p[t]||[];for(this.globalData.canvasContext?.moveTo(m[0],m[1]),s=2;s<e;s+=6)this.globalData.canvasContext?.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5])}this.globalData.canvasContext?.closePath(),c.ctxFill()}if(this.stroke){for(n.sw?l!==n.sw&&(l=n.sw,c.ctxLineWidth(n.sw)):l!==this.values.sWidth&&(l=this.values.sWidth,c.ctxLineWidth(this.values.sWidth)),n.sc?h!==n.sc&&(h=n.sc,c.ctxStrokeStyle(n.sc)):h!==this.values.stroke&&(h=this.values.stroke,c.ctxStrokeStyle(this.values.stroke)),e=(p=this.textSpans[u].elem??[]).length,this.globalData.canvasContext?.beginPath(),t=0;t<e;t++)for(i=(m=p[t]).length,this.globalData.canvasContext?.moveTo(m[0],m[1]),s=2;s<i;s+=6)this.globalData.canvasContext?.bezierCurveTo(m[s],m[s+1],m[s+2],m[s+3],m[s+4],m[s+5]);this.globalData.canvasContext?.closePath(),c.ctxStroke()}this.globalData.renderer?.restore()}}}class ig extends sl{constructor(t,e,s){super(),this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId)??null,this.initBaseData(t,e,s),this._isPlaying=!1,this._canPlay=!1;let i=this.globalData?.getAssetsPath(this.assetData);this.audio=this.globalData?.audioController?.createAudio(i),this._currentTime=0,this.globalData?.audioController?.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=t.tm?eW.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this.lv=eW.getProp(this,t.au?.lv??{k:[100]},1,.01,this)}getBaseElement(){return null}hide(){this.audio.pause(),this._isPlaying=!1}initExpressions(){}pause(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1}prepareFrame(t){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder?this._currentTime=t/Number(this.data.sr):this._currentTime=this.tm.v,this._volume=Number(this.lv.v[0]);let e=this._volume*Number(this._volumeMultiplier);this._previousVolume!==e&&(this._previousVolume=e,this.audio.volume(e))}renderFrame(t){if(this.isInRange&&this._canPlay){if(!this._isPlaying){this.audio.play(),this.audio.seek(this._currentTime/Number(this.globalData?.frameRate)),this._isPlaying=!0;return}(!this.audio.playing()||Math.abs(this._currentTime/Number(this.globalData?.frameRate)-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/Number(this.globalData?.frameRate))}}resume(){this._canPlay=!0}setRate(t){this.audio.rate(t)}show(){}sourceRectAtTime(){return null}volume(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)}}class iy extends sl{constructor(t,e,s){if(super(),this.assetData=null,this.initFrame(),this.initRenderable(),t.refId&&(this.assetData=e.getAssetData(t.refId)),!e.imageLoader)throw Error(`${this.constructor.name}: imageLoader is not implemented in globalData`);this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,s)}getBaseElement(){return null}getFootageData(){return this.footageData}initExpressions(){let t=tL();if(!t)return;let e=t("footage");this.layerInterface=new e(this)}prepareFrame(){}renderFrame(){}}class iv{constructor(t){this.animationData=t}getProp(t){let{sid:e}=t;return e&&this.animationData.slots?.[e]?Object.assign(t,this.animationData.slots[e].p):t}}class ib extends sh{addPendingElement(t){this.pendingElements.push(t)}buildAllItems(){let{length:t}=this.layers;for(let e=0;e<t;e++)this.buildItem(e);this.checkPendingElements()}buildElementParenting(t,e,s=[]){let{elements:i,layers:r}=this,{length:a}=r,n=0;for(;n<a;){if(r[n].ind!==e){n++;continue}if(!i[n]||!0===i[n]){this.buildItem(n),this.addPendingElement(t),n++;continue}if(s.push(i[n]),i[n].setAsParent(),void 0===r[n].parent){t.setHierarchy(s),n++;continue}this.buildElementParenting(t,r[n].parent,s),n++}}buildItem(t){throw Error(`${this.constructor.name}: Method buildItem not yet implemented`)}checkLayers(t){this.completeLayers=!0;let{length:e}=this.layers;for(let s=e-1;s>=0;s--)!this.elements[s]&&this.layers[s].ip-this.layers[s].st<=Number(t)-this.layers[s].st&&this.layers[s].op-this.layers[s].st>Number(t)-this.layers[s].st&&this.buildItem(s),this.completeLayers=!!this.elements[s]&&this.completeLayers;this.checkPendingElements()}checkPendingElements(){throw Error(`${this.constructor.name}: Method checkPendingElements not yet implemented`)}createAudio(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new ig(t,this.globalData,this)}createCamera(t){throw Error("You're using a 3d camera. Try the html renderer.")}createComp(t,e,s,i){throw Error(`${this.constructor.name}: Method createComp not yet implemented`)}createFootage(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iy(t,this.globalData,this)}createImage(t){throw Error(`${this.constructor.name}: Method createImage is not implemented`)}createItem(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)}}createNull(t){throw Error(`${this.constructor.name}: Method createNull not implemented`)}createShape(t){throw Error(`${this.constructor.name}: Method createShape not implemented`)}createSolid(t){throw Error(`${this.constructor.name}: Method createSolid not implemented`)}createText(t){throw Error(`${this.constructor.name}: Method createText not implemented`)}getElementById(t){let{length:e}=this.elements;for(let s=0;s<e;s++)if(this.elements[s]?.data.ind===t)return this.elements[s];return null}getElementByPath(t){let e,s=t.shift();if("number"==typeof s)e=this.elements[s];else{let{length:t}=this.elements;for(let i=0;i<t;i++)if(this.elements[i]?.data.nm===s){e=this.elements[i];break}}return 0===t.length?e:e?.getElementByPath(t)}includeLayers(t){this.completeLayers=!1;let{length:e}=t,{length:s}=this.layers;for(let i=0;i<e;i++){let e=0;for(;e<s;){if(this.layers[e].id===t[i].id){this.layers[e]=t[i];break}e++}}}initItems(){this.globalData?.progressiveLoad||this.buildAllItems()}prepareFrame(t){throw Error(`${this.constructor.name}: Method prepareFrame not yet implemented`)}searchExtraCompositions(t){let{length:e}=t;for(let s=0;s<e;s++)if(t[s].xt){let e=this.createComp(t[s]);e.initExpressions(),this.globalData?.projectInterface.registerComposition(e)}}setProjectInterface(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);t&&(this.globalData.projectInterface=t)}setupGlobalData(t,e){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);this.globalData.fontManager=new ip,this.globalData.slotManager=new iv(t),this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr||60,this.globalData.nm=t.nm,this.globalData.compSize={h:Number(t.h),w:Number(t.w)}}constructor(...t){super(...t),this.currentFrame=0,this.elements=[],this.layers=[],this.pendingElements=[],this.renderedFrame=-1}}class i_ extends sh{constructor(t,e,s){super(),this.initFrame(),this.initBaseData(t,e,s),this.initTransform(),this.initHierarchy()}getBaseElement(){return null}prepareFrame(t){this.prepareProperties(t,!0)}renderFrame(t){return null}}class ix extends sE{constructor(t,e,s){super(t,e,s),this.initElement(t,e,s)}createContent(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let t=tO("rect");t.width.baseVal.value=Number(this.data.sw),t.height.baseVal.value=Number(this.data.sh),this.data.sc&&t.setAttribute("fill",this.data.sc),this.layerElement?.appendChild(t)}}let iw={shapes:[]};class iE extends ic{constructor(t,e,s){super(),this.createContainerElements=sw.prototype.createContainerElements,this.createRenderableComponents=sw.prototype.createRenderableComponents,this.destroyBaseElement=sw.prototype.destroyBaseElement,this.getBaseElement=sw.prototype.getBaseElement,this.getMatte=sw.prototype.getMatte,this.initRendererElement=sw.prototype.initRendererElement,this.renderedLetters=[],this.renderElement=sw.prototype.renderElement,this.setMatte=sw.prototype.setMatte,this.textSpans=[],this.renderType=$.SVG,this.initElement(t,e,s)}buildNewText(){let t,e;if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);if(!this.textProperty?.currentData)throw Error(`${this.constructor.name}: DocumentData is not implemented`);this.addDynamicProperty(this);let s=this.textProperty.currentData;this.renderedLetters=t2(s.l.length||0),s.fc?this.layerElement.setAttribute("fill",this.buildColor(s.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),s.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(s.sc)),this.layerElement.setAttribute("stroke-width",`${s.sw||0}`)),this.layerElement.setAttribute("font-size",`${s.finalSize||0}`);let i=this.globalData.fontManager?.getFontByName(s.f);if(i?.fClass)this.layerElement.classList.add(i.fClass);else{i?.fFamily&&this.layerElement.setAttribute("font-family",i.fFamily);let{fWeight:t}=s,{fStyle:e}=s;this.layerElement.setAttribute("font-style",e),this.layerElement.setAttribute("font-weight",t)}this.layerElement.setAttribute("aria-label",`${s.t}`);let r=s.l,a=!!this.globalData.fontManager?.chars;e=r.length;let n=null,o=this.mHelper,{singleShape:h}=this.data,l=0,p=0,m=!0,c=.001*s.tr*Number(s.finalSize);if(!h||a||s.sz){let d,u=this.textSpans.length;for(t=0;t<e;t++){if(this.textSpans[t]||(this.textSpans[t]={childSpan:null,glyph:null,span:null}),!a||!h||0===t){if(n=u>t?this.textSpans[t]?.span:tO(a?"g":"text"),u<=t){if(n?.setAttribute("stroke-linecap","butt"),n?.setAttribute("stroke-linejoin","round"),n?.setAttribute("stroke-miterlimit","4"),this.textSpans[t]&&(this.textSpans[t].span=n),a){let e=tO("g");n?.appendChild(e),this.textSpans[t]&&(this.textSpans[t].childSpan=e)}this.textSpans[t]&&(this.textSpans[t].span=n),n&&this.layerElement.appendChild(n)}n&&(n.style.display="inherit")}if(o.reset(),h&&(r[t].n&&(l=-c,p+=Number(s.yOffset),p+=+!!m,m=!1),this.applyTextPropertiesToMatrix(s,o,r[t].line,l,p),l+=r[t].l||0,l+=c),a){let e;if(d=this.globalData.fontManager?.getCharData(s.finalText[t],i?.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily),d?.t===1)e=new iS(d.data,this.globalData,this);else{let t=iw;d?.data?.shapes&&(t=this.buildShapeData(d.data,Number(s.finalSize))),e=new sK(t,this.globalData,this)}if(this.textSpans[t]){let{glyph:s}=this.textSpans[t];s&&(s.layerElement&&this.textSpans[t]?.childSpan?.removeChild(s.layerElement),s.destroy()),this.textSpans[t].glyph=e}e._debug=!0,e.prepareFrame(0),e.renderFrame(),e.layerElement&&this.textSpans[t]?.childSpan?.appendChild(e.layerElement),d?.t===1&&this.textSpans[t]?.childSpan?.setAttribute("transform",`scale(${Number(s.finalSize)/100},${Number(s.finalSize)/100})`);continue}h&&n?.setAttribute("transform",`translate(${o.props[12]},${o.props[13]})`),n&&(n.textContent=r[t].val),n?.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}h&&n?.setAttribute("d","")}else{let i,r=this.textContainer;switch(s.j){case 1:i="end";break;case 2:i="middle";break;default:i="start"}r?.setAttribute("text-anchor",i),r?.setAttribute("letter-spacing",`${c}`);let a=this.buildTextContents(s.finalText);for(t=0,e=a.length,p=s.ps?s.ps[1]+Number(s.ascent):0;t<e;t++)(n=this.textSpans[t]?.span??tO("tspan")).textContent=a[t],n.setAttribute("x","0"),n.setAttribute("y",`${p}`),n.style.display="inherit",r?.appendChild(n),this.textSpans[t]||(this.textSpans[t]={glyph:null,span:null}),this.textSpans[t].span=n,p+=Number(s.finalLineHeight);r&&this.layerElement.appendChild(r)}let d=this.textSpans[t]?.span;if(d)for(;t<this.textSpans.length;)d.style.display="none",t++;this._sizeChanged=!0}buildShapeData(t,e){if(t.shapes.length>0){let s=t.shapes[0];if(s.it){let t=s.it[s.it.length-1];t.s&&(t.s.k[0]=e,t.s.k[1]=e)}}return t}buildTextContents(t){let e=0,{length:s}=t,i=[],r="";for(;e<s;)"\r"===t[e]||"\x03"===t[e]?(i.push(r),r=""):r+=t[e],e++;return i.push(r),i}createContent(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);this.data.singleShape&&!this.globalData.fontManager?.chars&&(this.textContainer=tO("text"))}getValue(){let t;if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);let{length:e}=this.textSpans;this.renderedFrame=this.comp?.renderedFrame;for(let s=0;s<e;s++)(t=this.textSpans[s].glyph)&&(t.prepareFrame(Number(this.comp?.renderedFrame)-Number(this.data.st)),t._mdf&&(this._mdf=!0))}renderInnerContent(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(this.validateText(),!this.data.singleShape||this._mdf){if(!this.textProperty)throw Error(`${this.constructor.name}: textProperty is not initialized`);if(this.textAnimator?.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator?.lettersChangedFlag){let t,e,s;this._sizeChanged=!0;let i=this.textAnimator?.renderedLetters,r=this.textProperty.currentData.l,{length:a}=r;for(let n=0;n<a;n++)!r[n].n&&(t=i?.[n],e=this.textSpans[n].span,(s=this.textSpans[n].glyph)&&s.renderFrame(),t?._mdf.m&&e?.setAttribute("transform",t.m),t?._mdf.o&&e?.setAttribute("opacity",`${t.o??1}`),t?._mdf.sw&&e?.setAttribute("stroke-width",`${t.sw||0}`),t?._mdf.sc&&e?.setAttribute("stroke",t.sc),t?._mdf.fc&&e?.setAttribute("fill",t.fc))}}}sourceRectAtTime(){if(!this.data)throw Error(`${this.constructor.name}: data (LottieLayer) is not implemented`);if(!this.comp)throw Error(`${this.constructor.name}: comp (ElementInterface) is not implemented`);if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);if(this.prepareFrame(Number(this.comp.renderedFrame)-Number(this.data.st)),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;let t=this.layerElement.getBBox();return this.bbox={height:t.height,left:t.x,top:t.y,width:t.width},this.bbox}return null}}class iC extends ib{appendElementInPos(t,e){let s=t.getBaseElement();if(!s)return;let i=0,r;for(;i<e;)r=this.elements[i]?.getBaseElement?.(),i++;r?this.layerElement?.insertBefore(s,r):this.layerElement?.appendChild(s)}buildItem(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData it not implemented`);let{elements:e,globalData:s,layers:i}=this;if(e[t]||99===i[t].ty)return;e[t]=!0;let r=this.createItem(i[t]);if(e[t]=r,tF()&&(0===i[t].ty&&s.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),i[t].tt){let s="tp"in i[t]?this.findIndexByInd(i[t].tp):t-1;if(-1===s)return;if(!e[s]||!0===e[s]){this.buildItem(s),this.addPendingElement(r);return}let a=e[s].getMatte(i[t].tt);r.setMatte(a)}}checkPendingElements(){for(;this.pendingElements.length>0;){let t=this.pendingElements.pop();if(t?.checkParenting(),t?.data.tt){let e=0,{length:s}=this.elements;for(;e<s;){if(this.elements[e]!==t){e++;continue}let s="tp"in t.data?this.findIndexByInd(t.data.tp):e-1,i=this.elements[s].getMatte(this.layers[e].tt);t.setMatte(i);break}}}}configAnimation(t){try{if(!this.animationItem)throw Error(`${this.constructor.name}: Can't access animationItem`);if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);if(!this.renderConfig)throw Error(`${this.constructor.name}: Can't access renderConfig`);if(!this.svgElement)throw Error(`${this.constructor.name}: Can't access svgElement`);this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox",`0 0 ${t.w} ${t.h}`),!this.renderConfig.viewBoxOnly&&(this.svgElement.setAttribute("width",`${t.w}`),this.svgElement.setAttribute("height",`${t.h}`),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.renderConfig.contentVisibility&&(this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility)),this.renderConfig.width&&this.svgElement.setAttribute("width",`${this.renderConfig.width}`),this.renderConfig.height&&this.svgElement.setAttribute("height",`${this.renderConfig.height}`),this.renderConfig.className&&this.svgElement.classList.add(this.renderConfig.className),this.renderConfig.id&&(this.svgElement.id=this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",`${this.renderConfig.focusable}`),this.renderConfig.preserveAspectRatio&&this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper?.appendChild(this.svgElement);let{defs:e}=this.globalData;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;let s=tO("clipPath"),i=tO("rect");i.setAttribute("width",`${t.w}`),i.setAttribute("height",`${t.h}`),i.setAttribute("x","0"),i.setAttribute("y","0");let r=K();s.id=r,s.appendChild(i),this.layerElement?.setAttribute("clip-path",`url(${t9()}#${r})`),e.appendChild(s),this.layers=t.layers,this.elements=t2(t.layers.length)}catch(t){console.error(`${this.constructor.name}:
5
+ `,t)}}createImage(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new sE(t,this.globalData,this)}createNull(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new i_(t,this.globalData,this)}createShape(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new sK(t,this.globalData,this)}createSolid(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new ix(t,this.globalData,this)}createText(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iE(t,this.globalData,this)}destroy(){if(!this.animationItem)throw Error(`${this.constructor.name}: Can't access animationItem`);if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;let{length:t}=this.layers;for(let e=0;e<t;e++)this.elements[e]?.destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null}findIndexByInd(t){let{length:e}=this.layers;for(let s=0;s<e;s++)if(this.layers[s].ind===t)return s;return -1}hide(){if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);this.layerElement.style.display="none"}renderFrame(t){try{if(!this.globalData||this.renderedFrame===t||this.destroyed)return;let e=t;null===e?e=this.renderedFrame:this.renderedFrame=Number(e),this.globalData.frameNum=e,this.globalData.frameId++,this.globalData.projectInterface.currentFrame=e||0,this.globalData._mdf=!1;let{length:s}=this.layers;this.completeLayers||this.checkLayers(e);for(let t=s-1;t>=0;t--)"boolean"!=typeof this.elements[t]&&(this.completeLayers||this.elements[t])&&this.elements[t]?.prepareFrame(Number(e)-this.layers[t].st);if(this.globalData._mdf)for(let t=0;t<s;t++)"boolean"!=typeof this.elements[t]&&(this.completeLayers||this.elements[t])&&this.elements[t]?.renderFrame()}catch(t){console.error(this.constructor.name,t)}}show(){if(!this.layerElement)throw Error(`${this.constructor.name}: layerElement is not implemented`);this.layerElement.style.display="block"}updateContainerSize(t,e){throw Error(`${this.constructor.name}: Method updateContainerSize is not implemented`)}}class iS extends sw{constructor(t,e,s){super(),this.addPendingElement=iC.prototype.addPendingElement,this.appendElementInPos=iC.prototype.appendElementInPos,this.buildAllItems=iC.prototype.buildAllItems,this.buildElementParenting=iC.prototype.buildElementParenting,this.buildItem=iC.prototype.buildItem,this.checkLayers=iC.prototype.checkLayers,this.checkPendingElements=iC.prototype.checkPendingElements,this.configAnimation=iC.prototype.configAnimation,this.createAudio=iC.prototype.createAudio,this.createCamera=iC.prototype.createCamera,this.createFootage=iC.prototype.createFootage,this.createImage=iC.prototype.createImage,this.createItem=iC.prototype.createItem,this.createNull=iC.prototype.createNull,this.createShape=iC.prototype.createShape,this.createSolid=iC.prototype.createSolid,this.createText=iC.prototype.createText,this.currentFrame=0,this.destroy=s_.prototype.destroy,this.destroyElements=s_.prototype.destroyElements,this.findIndexByInd=iC.prototype.findIndexByInd,this.getElementById=iC.prototype.getElementById,this.getElementByPath=iC.prototype.getElementByPath,this.getElements=s_.prototype.getElements,this.hide=s_.prototype.hide,this.includeLayers=iC.prototype.includeLayers,this.initElement=s_.prototype.initElement,this.initItems=iC.prototype.initItems,this.prepareFrame=s_.prototype.prepareFrame,this.renderedFrame=-1,this.renderFrame=s_.prototype.renderFrame,this.renderInnerContent=s_.prototype.renderInnerContent,this.searchExtraCompositions=iC.prototype.searchExtraCompositions,this.setElements=s_.prototype.setElements,this.setProjectInterface=iC.prototype.setProjectInterface,this.setupGlobalData=iC.prototype.setupGlobalData,this.show=s_.prototype.show,this.updateContainerSize=iC.prototype.updateContainerSize,this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?t2(this.layers.length):[],this.initElement(t,e,s),this.tm=t.tm?eW.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: Cannot access global data`);return new iS(t,this.globalData,this)}}class ik extends iC{constructor(t,e){super(),this.animationItem=t,this.layers=[],this.renderedFrame=-1,this.svgElement=tO("svg");let s="";if(e?.title){let t=tO("title"),i=K();t.id=i,t.textContent=e.title,this.svgElement.appendChild(t),s+=i}if(e?.description){let t=tO("desc"),i=K();t.id=i,t.textContent=e.description,this.svgElement.appendChild(t),s+=` ${i}`}s&&this.svgElement.setAttribute("aria-labelledby",s);let i=tO("defs");this.svgElement.appendChild(i);let r=tO("g");this.svgElement.appendChild(r),this.layerElement=r,this.renderConfig={className:e?.className||"",contentVisibility:e?.contentVisibility||"visible",filterSize:{height:e?.filterSize?.height||"100%",width:e?.filterSize?.width||"100%",x:e?.filterSize?.x||"0%",y:e?.filterSize?.y||"0%"},focusable:e?.focusable,height:e?.height,hideOnTransparent:e?.hideOnTransparent!==!1,id:e?.id||"",imagePreserveAspectRatio:e?.imagePreserveAspectRatio||"xMidYMid slice",preserveAspectRatio:e?.preserveAspectRatio||"xMidYMid meet",progressiveLoad:e?.progressiveLoad||!1,runExpressions:!e||void 0===e.runExpressions||e.runExpressions,viewBoxOnly:e?.viewBoxOnly||!1,viewBoxSize:e?.viewBoxSize||!1,width:e?.width},this.globalData={_mdf:!1,defs:i,frameNum:-1,frameRate:60,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType=$.SVG}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iS(t,this.globalData,this)}}class iM extends ib{buildItem(t){let{elements:e,layers:s}=this;if(e[t]||99===s[t].ty)return;let i=this.createItem(s[t]);e[t]=i,i.initExpressions()}checkPendingElements(){for(;this.pendingElements.length>0;){let t=this.pendingElements.pop();t?.checkParenting()}}configAnimation(t){if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);if(!this.renderConfig)throw Error(`${this.constructor.name}: renderConfig is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(this.animationItem.wrapper){this.animationItem.container=tR("canvas");let t=this.animationItem.container.style;t.width="100%",t.height="100%",t.transformOrigin="0px 0px 0px",t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&(this.animationItem.container.className=this.renderConfig.className),this.renderConfig.id&&(this.animationItem.container.id=this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData?.setContext(this.canvasContext),this.data=t,this.layers=t.layers,this.transformCanvas={h:t.h,sx:0,sy:0,tx:0,ty:0,w:t.w},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=t2(t.layers.length),this.updateContainerSize()}createImage(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new sZ(t,this.globalData,this)}createShape(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new s1(t,this.globalData,this)}createSolid(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new s2(t,this.globalData,this)}createText(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new iu(t,this.globalData,this)}ctxFill(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.fill(t)}ctxFillRect(t,e,s,i){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.fillRect(t,e,s,i)}ctxFillStyle(t=""){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.fillStyle=t}ctxLineCap(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.lineCap=t}ctxLineJoin(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.lineJoin=t}ctxLineWidth(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.lineWidth=t}ctxMiterLimit(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.miterLimit=t}ctxOpacity(t=1){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.globalAlpha*=t<0?0:t}ctxStroke(){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.stroke()}ctxStrokeStyle(t=""){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);this.canvasContext.strokeStyle=t}ctxTransform(t){if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13])&&this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])}destroy(){if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);this.renderConfig?.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");let{length:t}=this.layers;for(let e=t-1;e>=0;e-=1)this.elements[e]?.destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0}hide(){if(!this.animationItem?.container)throw Error(`${this.constructor.name}: animationItem -> container is not implemented`);this.animationItem.container.style.display="none"}renderFrame(t,e){try{if(!this.globalData)throw Error("globalData is not implemented");if(!this.animationItem)throw Error("animationItem is not implemented");if(this.renderedFrame===t&&this.renderConfig?.clearCanvas===!0&&!e||this.destroyed||-1===t)return;this.renderedFrame=t,this.globalData.frameNum=t-Number(this.animationItem._isFirstFrame),this.globalData.frameId++,this.globalData._mdf=!this.renderConfig?.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;let{length:s}=this.layers;this.completeLayers||this.checkLayers(t);for(let e=s-1;e>=0;e--)(this.completeLayers||this.elements[e])&&this.elements[e]?.prepareFrame(t-this.layers[e].st);if(this.globalData._mdf){this.renderConfig?.clearCanvas===!0?this.canvasContext?.clearRect(0,0,this.transformCanvas?.w||0,this.transformCanvas?.h||0):this.save();for(let t=s-1;t>=0;t--)(this.completeLayers||this.elements[t])&&this.elements[t]?.renderFrame();this.renderConfig?.clearCanvas!==!0&&this.restore()}}catch(t){console.error(this.constructor.name,t)}}reset(){if(!this.renderConfig?.clearCanvas)return void this.canvasContext?.restore();this.contextData?.reset()}restore(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);if(!this.renderConfig?.clearCanvas)return void this.canvasContext?.restore();t&&(this.globalData.blendMode="source-over"),this.contextData?.restore(t)}save(t){this.canvasContext?.save()}show(){if(!this.animationItem?.container)throw Error(`${this.constructor.name}: animationItem -> container is not implemented`);this.animationItem.container.style.display="block"}updateContainerSize(t,e){let s,i,r,a;if(!this.animationItem)throw Error(`${this.constructor.name}: animationItem is not implemented`);if(!this.canvasContext)throw Error(`${this.constructor.name}: canvasContext is not implemented`);if(!this.renderConfig?.dpr)throw Error(`${this.constructor.name}: renderConfig -> dpr is not implemented`);if(!this.transformCanvas)throw Error(`${this.constructor.name}: transformCanvas is not implemented`);if(this.reset(),t?(s=t,i=Number(e),this.canvasContext.canvas.width=s,this.canvasContext.canvas.height=i):(this.animationItem.wrapper&&this.animationItem.container?(s=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight):(s=this.canvasContext.canvas.width,i=this.canvasContext.canvas.height),this.canvasContext.canvas.width=s*this.renderConfig.dpr,this.canvasContext.canvas.height=i*this.renderConfig.dpr),this.renderConfig.preserveAspectRatio.includes("meet")||this.renderConfig.preserveAspectRatio.includes("slice")){let t=this.renderConfig.preserveAspectRatio.split(" "),e=t[1]||"meet",n=t[0]||"xMidYMid",o=n.slice(0,4),h=n.slice(4);r=s/i,(a=this.transformCanvas.w/this.transformCanvas.h)>r&&"meet"===e||a<r&&"slice"===e?(this.transformCanvas.sx=s/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=s/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)),"xMid"===o&&(a<r&&"meet"===e||a>r&&"slice"===e)?this.transformCanvas.tx=(s-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(a<r&&"meet"===e||a>r&&"slice"===e)?this.transformCanvas.tx=(s-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,"YMid"===h&&(a>r&&"meet"===e||a<r&&"slice"===e)?this.transformCanvas.ty=(i-this.transformCanvas.h*(s/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(a>r&&"meet"===e||a<r&&"slice"===e)?this.transformCanvas.ty=(i-this.transformCanvas.h*(s/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio===L.Initial?(this.transformCanvas.sx=s/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)}}iM.prototype.createNull=ik.prototype.createNull;class iP extends s_{constructor(t,e,s){super(),this.addPendingElement=iM.prototype.addPendingElement,this.buildAllItems=iM.prototype.buildAllItems,this.buildElementParenting=iM.prototype.buildElementParenting,this.buildItem=iM.prototype.buildItem,this.checkLayers=iM.prototype.checkLayers,this.checkPendingElements=iM.prototype.checkPendingElements,this.clearCanvas=sv.prototype.clearCanvas,this.configAnimation=iM.prototype.configAnimation,this.createAudio=iM.prototype.createAudio,this.createCamera=iM.prototype.createCamera,this.createContainerElements=sv.prototype.createContainerElements,this.createContent=sv.prototype.createContent,this.createElements=sv.prototype.createElements,this.createFootage=iM.prototype.createFootage,this.createImage=iM.prototype.createImage,this.createItem=iM.prototype.createItem,this.createNull=iM.prototype.createNull,this.createRenderableComponents=sv.prototype.createRenderableComponents,this.createShape=iM.prototype.createShape,this.createSolid=iM.prototype.createSolid,this.createText=iM.prototype.createText,this.ctxFill=iM.prototype.ctxFill,this.ctxFillRect=iM.prototype.ctxFillRect,this.ctxFillStyle=iM.prototype.ctxFillStyle,this.ctxLineCap=iM.prototype.ctxLineCap,this.ctxLineJoin=iM.prototype.ctxLineJoin,this.ctxLineWidth=iM.prototype.ctxLineWidth,this.ctxMiterLimit=iM.prototype.ctxMiterLimit,this.ctxOpacity=iM.prototype.ctxOpacity,this.ctxStroke=iM.prototype.ctxStroke,this.ctxStrokeStyle=iM.prototype.ctxStrokeStyle,this.ctxTransform=iM.prototype.ctxTransform,this.exitLayer=sv.prototype.exitLayer,this.getElementById=iM.prototype.getElementById,this.getElementByPath=iM.prototype.getElementByPath,this.hide=sv.prototype.hide,this.hideElement=sv.prototype.hideElement,this.includeLayers=iM.prototype.includeLayers,this.initItems=iM.prototype.initItems,this.initRendererElement=sv.prototype.initRendererElement,this.prepareLayer=sv.prototype.prepareLayer,this.renderFrame=sv.prototype.renderFrame,this.reset=iM.prototype.reset,this.restore=iM.prototype.restore,this.save=iM.prototype.save,this.searchExtraCompositions=iM.prototype.searchExtraCompositions,this.setBlendMode=sv.prototype.setBlendMode,this.setProjectInterface=iM.prototype.setProjectInterface,this.setupGlobalData=iM.prototype.setupGlobalData,this.show=sv.prototype.show,this.showElement=sv.prototype.showElement,this.updateContainerSize=iM.prototype.updateContainerSize,this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=t2(this.layers.length),this.initElement(t,e,s),this.tm=t.tm?eW.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new iP(t,this.globalData,this)}destroy(){let{length:t}=this.layers;for(let e=t-1;e>=0;e--)this.elements[e]?.destroy();this.layers=null,this.elements=null}renderInnerContent(){if(!this.data?.w||!this.data.h)throw Error(`${this.constructor.name} data (LottieLayer) is not implemented`);let{canvasContext:t,completeLayers:e,data:s,elements:i,layers:r}=this;if(!t)throw Error(`${this.constructor.name}: canvasContext is not implemented`);t.beginPath(),t.moveTo(0,0),t.lineTo(s.w||0,0),t.lineTo(s.w||0,s.h||0),t.lineTo(0,s.h||0),t.lineTo(0,0),t.clip();let{length:a}=r;for(let t=a-1;t>=0;t--)(e||i[t])&&i[t].renderFrame()}}class iA{constructor(){this.opacity=-1,this.transform=t1(I.Float32,16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}}class iT{constructor(){this.stack=[],this.stack=[],this.cArrPos=0,this.cTr=new t3;for(let t=0;t<15;t++){let e=new iA;this.stack[t]=e}this._length=15,this.nativeContext=null,this.transformMat=new t3,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}duplicate(){let t=2*this._length;for(let e=this._length;e<t;e++)this.stack[e]=new iA;this._length=t}fill(t){this.nativeContext&&this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext?.fill(t)}fillRect(t,e,s,i){this.nativeContext&&this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext?.fillRect(t,e,s,i)}fillStyle(t){this.stack[this.cArrPos].fillStyle!==t&&(this.currentFillStyle=t,this.stack[this.cArrPos].fillStyle=t)}lineCap(t){this.stack[this.cArrPos].lineCap!==t&&(this.currentLineCap=t,this.stack[this.cArrPos].lineCap=t)}lineJoin(t){this.stack[this.cArrPos].lineJoin!==t&&(this.currentLineJoin=t,this.stack[this.cArrPos].lineJoin=t)}lineWidth(t){this.stack[this.cArrPos].lineWidth!==t&&(this.currentLineWidth=t,this.stack[this.cArrPos].lineWidth=t)}miterLimit(t){this.stack[this.cArrPos].miterLimit!==t&&(this.currentMiterLimit=t,this.stack[this.cArrPos].miterLimit=t)}opacity(t){let e=this.stack[this.cArrPos].opacity;e*=t<0?0:t,this.stack[this.cArrPos].opacity!==e&&(this.nativeContext&&this.currentOpacity!==t&&(this.nativeContext.globalAlpha=t,this.currentOpacity=t),this.stack[this.cArrPos].opacity=e)}reset(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1}restore(t){this.cArrPos-=1;let{fillStyle:e,lineCap:s,lineJoin:i,lineWidth:r,miterLimit:a,opacity:n,strokeStyle:o,transform:h}=this.stack[this.cArrPos],l=this.cTr.props;for(let t=0;t<16;t++)l[t]=h[t];if(t){this.nativeContext?.restore();let t=this.stack[this.cArrPos+1];this.appliedFillStyle=t.fillStyle,this.appliedStrokeStyle=t.strokeStyle,this.appliedLineWidth=t.lineWidth,this.appliedLineCap=t.lineCap,this.appliedLineJoin=t.lineJoin,this.appliedMiterLimit=t.miterLimit}this.nativeContext?.setTransform(h[0],h[1],h[4],h[5],h[12],h[13]),this.nativeContext&&(t||-1!==n&&this.currentOpacity!==n)&&(this.nativeContext.globalAlpha=n,this.currentOpacity=n),this.currentFillStyle=e,this.currentStrokeStyle=o,this.currentLineWidth=r,this.currentLineCap=s,this.currentLineJoin=i,this.currentMiterLimit=a}save(t){let e;t&&this.nativeContext?.save();let{props:s}=this.cTr;this._length<=this.cArrPos&&this.duplicate();let i=this.stack[this.cArrPos];for(e=0;e<16;e++)i.transform[e]=s[e];this.cArrPos++;let r=this.stack[this.cArrPos];r.opacity=i.opacity,r.fillStyle=i.fillStyle,r.strokeStyle=i.strokeStyle,r.lineWidth=i.lineWidth,r.lineCap=i.lineCap,r.lineJoin=i.lineJoin,r.miterLimit=i.miterLimit}setContext(t){this.nativeContext=t}setOpacity(t){this.stack[this.cArrPos].opacity=t}stroke(){if(!this.nativeContext)throw Error(`${this.constructor.name}: nativeContext is not implemented`);this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=Number(this.appliedLineWidth)),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=Number(this.appliedMiterLimit)),this.nativeContext.stroke()}strokeStyle(t){this.stack[this.cArrPos].strokeStyle!==t&&(this.currentStrokeStyle=t,this.stack[this.cArrPos].strokeStyle=t)}transform(t){this.transformMat.cloneFromProps(t);let e=this.cTr;this.transformMat.multiply(e),e.cloneFromProps(this.transformMat.props);let s=e.props;this.nativeContext?.setTransform(s[0],s[1],s[4],s[5],s[12],s[13])}}let iD={},iI=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],{length:iF}=iI;for(let t=0;t<iF;t+=1)iD[iI[t]]=Math[iI[t]];function iL(t,e){return e.i=t.i,e.j=t.j,e.S=[...t.S],e}function i$(t){return String.fromCharCode.apply(0,t)}iD.random=Math.random,iD.abs=t=>{if(te(t)){let e=t2(t.length),{length:s}=t;for(let i=0;i<s;i++)e[i]=Math.abs(t[i]);return e}return Math.abs(t)};let iN={};!function(t,e){let s=this,i="random",r=e.pow(256,6),a=e.pow(2,52),n=2*a;function o(t){let e,s=t.length,i=this,r=0,a=i.i=i.j=0,n=i.S=[];for(s||(t=[s++]);r<256;)n[r]=r++;for(r=0;r<256;r++)n[r]=n[a=255&a+t[r%s]+(e=n[r])],n[a]=e;i.g=function(t){let e,s=0,{i:r}=i,{j:a}=i,n=i.S;for(;t--;)e=n[r=255&r+1],s=256*s+n[255&(n[r]=n[a=255&a+e])+(n[a]=e)];return i.i=r,i.j=a,s}}function h(t,e){let s=`${t}`,i,r=0;for(;r<s.length;)e[255&r]=255&(i^=19*e[255&r])+s.charCodeAt(r++);return i$(e)}e[`seed${i}`]=function(l,p,m){let c=p,d=[],u=h(function t(e,s){let i=[],r=typeof e,a;if(s&&"object"==r)for(a in e)try{i.push(t(e[a],s-1))}catch(t){}return i.length>0?i:"string"==r?e:`${e}\0`}((c=!0===c?{entropy:!0}:c||{}).entropy?[l,i$(t)]:null===l?function(){try{let t=new Uint8Array(256);return(s.crypto||s.msCrypto).getRandomValues(t),i$(t)}catch(r){let e=s.navigator,i=e?.plugins;return[Date.now(),s,i,s.screen,i$(t)]}}():l,3),d),f=new o(d),g=function(){let t=f.g(6),e=r,s=0;for(;t<a;)t=(t+s)*256,e*=256,s=f.g(1);for(;t>=n;)t/=2,e/=2,s>>>=1;return(t+s)/e};return g.int32=function(){return 0|f.g(4)},g.quick=function(){return f.g(4)/0x100000000},g.double=g,h(i$(f.S),t),(c.pass||m||function(t,s,r,a){return(a&&(a.S&&iL(a,f),t.state=function(){return iL(f,{})}),r)?(e[i]=t,s):t})(g,u,"global"in c?c.global:this==e,c.state)},h(e.random(),t)}([],iD);let iV=[0,0,0,0,0,0],iR=eF(.333,0,.833,.833,"easeIn").get,iO=eF(.33,0,.667,1,"easeInOut").get,iz=eF(.167,.167,.667,1,"easeOut").get,iB=(t,e,s)=>{let i=s;return(i<0&&i++,i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},iG=t=>{let e,s,i,r=t[0],a=t[1],n=t[2];if(0===a)e=n,i=n,s=n;else{let t=n<.5?n*(1+a):n+a-n*a,o=2*n-t;e=iB(o,t,r+1/3),s=iB(o,t,r),i=iB(o,t,r-1/3)}return[e,s,i,t[3]]},iq=t=>{let e=t[0],s=t[1],i=t[2],r=iD.max(e,s,i),a=iD.min(e,s,i),n=0,o,h=(r+a)/2;if(r===a)n=0,o=0;else{let t=r-a;switch(o=h>.5?t/(2-r-a):t/(r+a),r){case e:n=(s-i)/t+6*(s<i);break;case s:n=(i-e)/t+2;break;case i:n=(e-s)/t+4}n/=6}return[n,o,h,t[3]]};function ij(t){let e=typeof t;if("number"===e||t instanceof Number||"boolean"===e)return-t;if(iQ(t)){let{length:e}=t,s=[];for(let i=0;i<e;i++)s[i]=-t[i];return s}return t.propType?t.v:-t}function iW(t,e,s,i){let r,a,{length:n}=t,o=eu.newElement();o.setPathData(!!i,n);let h=[0,0];for(let i=0;i<n;i++)r=e[i]??h,a=s[i]??h,o.setTripleAt(t[i][0],t[i][1],a[0]+t[i][0],a[1]+t[i][1],r[0]+t[i][0],r[1]+t[i][1],i,!0);return o}function iH(t,e,s,i,r,a){let n=e,o=r,h=a;void 0===o?(o=s,h=i):n=(n-s)/(i-s),n>1?n=1:n<0&&(n=0);let l=t(n);if(iQ(o)&&iQ(h)){let t,e=o.length,s=t1(I.Float32,e);for(t=0;t<e;t+=1)s[t]=(h[t]-o[t])*l+o[t];return s}return(h-o)*l+o}function iY(t,e,s,i,r){return iH(iz,t,e,s,i,r)}function iU(t,e,s,i,r){return iH(iR,t,e,s,i,r)}function iJ(t,e,s,i,r){return iH(iO,t,e,s,i,r)}function iX(t,e,s,i,r){let a=e,n=s,o=i,h=r;if((void 0===o||void 0===h)&&(o=a,h=n,a=0,n=1),n<a){let t=n;n=a,a=t}if(t<=a)return o;if(t>=n)return h;let l=n===a?0:(t-a)/(n-a);if(!tt(o)&&!tt(h))return o+(h-o)*l;if(tt(o)&&tt(h)){let{length:t}=o,e=t1(I.Float32,t);for(let s=0;s<t;s+=1)e[s]=o[s]+(h[s]-o[s])*l;return e}return 0}function iK(t){return i1(t,i3(t))}function iZ(t,e){let s=t,i=e;if(void 0===i&&(void 0===s?(s=0,i=1):(i=s,s=void 0)),te(i)){let{length:t}=i;s||(s=t1(I.Float32,t));let e=t1(I.Float32,t),r=iD.random();for(let a=0;a<t;a+=1)e[a]=s[a]+r*(i[a]-s[a]);return e}return(s=s??0)+iD.random()*(i-s)}function iQ(t){return"object"==typeof t&&null!==t&&(t.constructor===Array||t.constructor===Float32Array)}function i0(t){return t*t0}function i1(t,e){let s,i,r,a=typeof t,n=typeof e;if(i2(a,t)&&i2(n,e))return Number(t)/Number(e);if(iQ(t)&&i2(n,e)){for(i=0,r=t.length,s=t1(I.Float32,r);i<r;i+=1)s[i]=t[i]/Number(e);return s}if(i2(a,t)&&iQ(e)){for(i=0,r=e.length,s=t1(I.Float32,r);i<r;i+=1)s[i]=Number(t)/e[i];return s}return 0}function i2(t,e){return"number"===t||e instanceof Number||"boolean"===t||"string"===t}function i3(t,e){let s,i=e;if("number"==typeof t||t instanceof Number)return i=i||0,iD.abs(Number(t)-Number(i));i||(i=iV);let r=iD.min(t.length,i.length),a=0;for(s=0;s<r;s+=1)a+=iD.pow(i[s]-t[s],2);return iD.sqrt(a)}function i5(t,e){let s=t,i=e;return"string"==typeof s&&(s=parseInt(s,10)),"string"==typeof i&&(i=parseInt(i,10)),s%i}function i4(t,e){let s,i,r,a=typeof t,n=typeof e;if(i2(a,t)&&i2(n,e))return Number(t)*Number(e);if(iQ(t)&&i2(n,e)){for(i=0,r=t.length,s=t1(I.Float32,r);i<r;i+=1)s[i]=t[i]*Number(e);return s}if(i2(a,t)&&iQ(e)){for(i=0,r=e.length,s=t1(I.Float32,r);i<r;i++)s[i]=Number(t)*e[i];return s}return 0}function i6(t){return t}function i8(t){return t/t0}function i9(t,e){let s=t,i=e,r=typeof s,a=typeof i;if(i2(r,s)&&i2(a,i))return"string"===r&&(s=parseInt(s,10)),"string"===a&&(i=parseInt(i,10)),s-i;if(iQ(s)&&i2(a,i))return s=[...s],s[0]-=Number(i),s;if(i2(r,s)&&iQ(i))return(i=[...i])[0]=Number(s)-i[0],i;if(iQ(s)&&iQ(i)){let t=0,e=s.length,r=i.length,a=[];for(;t<e||t<r;){if(("number"==typeof s[t]||s[t]instanceof Number)&&("number"==typeof i[t]||i[t]instanceof Number)){a[t]=s[t]-i[t],t++;continue}a[t]=void 0===i[t]?s[t]:s[t]||i[t],t++}return a}return 0}function i7(t,e){let s=t,i=e,r=typeof s,a=typeof i;if(i2(r,s)&&i2(a,i)||"string"===r||"string"===a)return Number(s)+Number(i);if(iQ(s)&&i2(a,i))return s=[...s],s[0]+=Number(i),s;if(i2(r,s)&&iQ(i))return(i=[...i])[0]=s+i[0],i;if(iQ(s)&&iQ(i)){let t=0,{length:e}=s,{length:r}=i,a=[];for(;t<e||t<r;){if(("number"==typeof s[t]||s[t]instanceof Number)&&("number"==typeof i[t]||i[t]instanceof Number)){a[t]=s[t]+i[t],t++;continue}a[t]=void 0===i[t]?s[t]:s[t]||i[t],t++}return a}return 0}let rt={initiateExpression:function(t,e,s){if(!t.globalData?.renderConfig?.runExpressions)return i6;if(!t.comp?.globalData)throw Error("CompElement is not implemented");let{k:i,x:r}=e,a=/velocity\b/.test(r),n=r.includes("random"),{ip:o,nm:h,op:l,sh:p=0,sw:m=0,ty:c}=t.data,d,u,f,g=0,y;s._name=h,s.valueAtTime=s.getValueAtTime,Object.defineProperty(s,"value",{get:()=>s.v}),t.comp.frameDuration=1/t.comp.globalData.frameRate,t.comp.displayStartTime=0;let v=o/t.comp.globalData.frameRate,b=l/t.comp.globalData.frameRate,_=null,x=null,w=null,E=null,C,S=null,k,M=null,P=null,A=null,T=null,D=null,F=null,L,$=i6,N={},V=Function("_lottieGlobal","$bm_div","$bm_mod","$bm_mul","$bm_neg","$bm_sub","$bm_sum","$bm_transform","active","add","anchorPoint","clamp","comp","content","createPath","degrees_to_radians","degreesToRadians","div","document","ease","easeIn","easeOut","effect","fetch","frames","framesToTime","fromComp","fromCompToSurface","fromWorld","globalData","height","hslToRgb","index","inPoint","key","length","linear","lookAt","loop_in","loop_out","loopIn","loopInDuration","loopOut","loopOutDuration","mask","mod","mul","name","nearestKey","normalize","numKeys","obj","outPoint","position","posterizeTime","propertyIndex","radians_to_degrees","radiansToDegrees","random","randSeed","rgbToHsl","rotation","scale","seedRandom","selectorValue","smooth","sourceRectAtTime","sub","substr","substring","text","textIndex","textTotal","thisComp","thisLayer","thisProperty","time","timeToFrames","toComp","toWorld","transform","value","valueAtTime","velocity","width","wiggle","window","XMLHttpRequest",`
6
6
  ${r}
7
- obj.scoped_bm_rt = $bm_rt;`),V=0,z,O=null,G,q,j,W,H=s.kf?i.length:0,Y=e.ix,U=!this.data||!0!==this.data.hd,J=(t,e)=>{let{pv:s}=this,i=te(s)?s.length:1,r=t2(F.Float32,i),a=iO.floor(5*V),n=0;for(;n<a;){for(let t=0;t<i;t++)r[t]+=-e+2*e*iO.random();n++}let o=5*V,h=o-iO.floor(o),l=t2(F.Float32,i);if(i>1){for(let t=0;t<i;t++)l[t]=s[t]+r[t]+(-e+2*e*iO.random())*h;return l}return s+r[0]+(-e+2*e*iO.random())*h};function X(t,e){C(t,e,!0)}function Z(t,e){M(t,e,!0)}s.loopIn&&(S=C=s.loopIn.bind(s)),s.loopOut&&(k=M=s.loopOut.bind(s)),s.smooth&&(A=s.smooth.bind(s));let Q=this.getValueAtTime.bind(this),tt=this.getVelocityAtTime.bind(this),{frameRate:ts,projectInterface:ti}=t.comp.globalData;function tr(t,e){let s=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=iO.atan2(s[0],iO.sqrt(s[1]*s[1]+s[2]*s[2]))/t1;return[-iO.atan2(s[1],s[2])/t1,i,0]}function ta(t){let s,r,a=t,n,o=i.length;if(0===i.length||"number"==typeof i[0])s=0,r=0;else if(s=-1,(a*=ts)<i[0].t)s=1,r=i[0].t;else{for(n=0;n<o-1;n+=1)if(a===i[n].t){s=n+1,r=i[n].t;break}else if(a>i[n].t&&a<i[n+1].t){a-i[n].t>i[n+1].t-a?(s=n+2,r=i[n+1].t):(s=n+1,r=i[n].t);break}-1===s&&(s=n+1,r=e.k[n].t)}return{index:s,time:r||0/ts}}function tn(t){let s=t;if(0===e.k.length||"number"==typeof e.k[0])throw Error(`The property has no keyframe at index ${s}`);s-=1;let i={time:e.k[s].t/ts,value:[]},r=Object.hasOwn(e.k[s],"s")?e.k[s].s:e.k[s-1].e,{length:a}=r??[];for(let t=0;t<a;t+=1)i[t]=r?.[t],i.value[t]=r?.[t];return i}function to(t,e){let s=e;return s||(s=ts),t/s}function th(t,e){let s=t,i=e;return s||0===s||(s=V),i||(i=ts),s*i}function tl(t){iO.seedrandom(g+t)}function tp(){return t.sourceRectAtTime()}function tm(t,e){return"string"==typeof O?void 0===e?O.slice(iO.max(0,t)):O.slice(t,e):""}function tc(t,e){return"string"==typeof O?void 0===e?O.slice(t):O.slice(t,e):""}let td=t.data.ind,tu=!!t.hierarchy?.length,tf=null;g=iO.floor(1e6*iO.random());let{globalData:tg}=t;function ty(t){O=Q(V=0===t?0:iO.floor(V*t)/t)}return function(e){return(O=e,this.frameExpressionId===tg.frameId&&this.propType!==R.TextSelector)?O:(this.propType===R.TextSelector&&(q=this.textIndex??0,j=this.textTotal??0,W=this.selectorValue),$||(G=t.layerInterface?.text,$=t.layerInterface,D=t.comp?.compInterface??null,I=$?.toWorld.bind($)??null,E=$?.fromWorld.bind($)??null,w=$?.fromComp.bind($)??null,T=$?.toComp.bind($)??null,P=$?.mask??null,_=w),!y&&(d=y=t.layerInterface?.getInterface("ADBE Transform Group"),y&&(x=y.anchorPoint)),4!==c||u||(u=$?.getInterface("ADBE Root Vectors Group")),f=f??$?.getInterface(4),t.hierarchy?.length&&!tf&&(tf=t.hierarchy?.[0].layerInterface??null),V=(this.comp?.renderedFrame??0)/(this.comp?.globalData?.frameRate??60),n&&tl(g+V),a&&(z=tt(V)),B(iH,re,rr,ra,i0,rh,rl,d,U,rl,x,K,ti,u,i1,ro,rt,re,null,i4,i5,i3,f,null,null,to,w,_,E,tg,p,iK,td,b,tn,ri,i6,tr,S,k,C,X,M,Z,P,rr,ra,h,ta,i9,H,N,v,null,ty,Y,ro,ro,i8,g,iQ,null,null,tl,W,A,tp,rh,tc,tm,G,q,j,D,$,s,V,th,T,I,y,O,Q,z,m,J,null,null),this.frameExpressionId=tg.frameId,N.scoped_bm_rt?.propType===R.Shape?N.scoped_bm_rt.v:N.scoped_bm_rt)}},resetFrame:function(){iH={}}},rm={getSpeedAtTime:function(t){let e=this.getValueAtTime(t),s=this.getValueAtTime(t+-.01),i=0;if(te(e)&&te(s)){let{length:t}=e;for(let r=0;r<t;r++)i+=Math.pow(s[r]-e[r],2);i=100*Math.sqrt(i)}else i=0;return i},getStaticValueAtTime:function(t,e){return this.pv},getValueAtTime:function(t){let e=t;return e*=this.elem?.globalData?.frameRate??60,e-=this.offsetTime,this._cachingAtTime&&e!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime?.value},getVelocityAtTime:function(t){let e;if(void 0!==this.vel)return this.vel;let s=this.getValueAtTime(t),i=this.getValueAtTime(t+-.001);if(te(s)&&te(i)){let{length:t}=s;e=t2(F.Float32,t);for(let r=0;r<t;r++)e[r]=-((i[r]-s[r])/.001);return e}return-((i-s)/.001)},searchExpressions:function(t,e,s){e?.x&&s&&(s.k=!0,s.x=!0,s.initiateExpression=rp.initiateExpression,s.effectsSequence.push(s.initiateExpression(t,e,s).bind(s)))},setGroupProperty:function(t){this.propertyGroup=t}};class rc extends eX{inTangents(t){return this.vertices("i",t)}isClosed(){return!!this.v?.c}normalOnPath(t,e){return this.vectorOnPath(t,e,"normal")}outTangents(t){return this.vertices("o",t)}pointOnPath(t,e){let s,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0)),!this._segmentsLength&&i&&(this._segmentsLength=eE.getSegmentsLength(i));let r=this._segmentsLength,{lengths:a}=r??{lengths:[]},n=(r?.totalLength??0)*t,o=0,h=a.length,l=0;for(;o<h;){if(l+a[o].addedLength>n){let t=o,e=i?.c&&o===h-1?0:o+1,r=(n-l)/a[o].addedLength;i&&(s=eE.getPointInSegment(i.v[t],i.v[e],i.o[t],i.i[e],r,a[o]));break}l+=a[o].addedLength,o++}return i&&(s=s??(i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]])),s}points(t){return this.vertices("v",t)}tangentOnPath(t,e){return this.vectorOnPath(t,e,"tangent")}vectorOnPath(t,e,s){let i=t;1==i?i=Number(this.v?.c):0==i&&(i=.999);let r=this.pointOnPath(i,e)??[],a=this.pointOnPath(i+.001,e)??[],n=a[0]-r[0],o=a[1]-r[1],h=Math.sqrt(Math.pow(n,2)+Math.pow(o,2));return 0===h?[0,0]:"tangent"===s?[n/h,o/h]:[-o/h,n/h]}vertices(t,e){this.k&&this.getValue();let s=this.v;void 0!==e&&(s=this.getValueAtTime(e,0));let i=s?._length??0,r=s?.[t],a=s?.v,n=t3(i);for(let e=0;e<i;e+=1)"i"===t||"o"===t?n[e]=[r[e][0]-a[e][0],r[e][1]-a[e][1]]:n[e]=[r[e][0],r[e][1]];return n}constructor(...t){super(...t),this.getValueAtTime=rm.getStaticValueAtTime,this.setGroupProperty=rm.setGroupProperty}}let rd=(t,e)=>{let s,{length:i}=t;for(let r=0;r<i;r++){let i=Object.getOwnPropertyNames(s=t[r].prototype),{length:a}=i;for(let t=0;t<a;t++)"constructor"!==i[t]&&Object.hasOwn(s,i[t])&&(e.prototype[i[t]]=s[i[t]])}};function ru(t,e,s){let i,r,a;if(!this.k||this.keyframes?.length===0)return this.pv;let n=e,{comp:o,elem:h,keyframes:l=[],pv:p}=this;if(!h?.comp)throw Error("Element is not implemented");if(!o)throw Error("Comp is not implemented");let m=t?t.toLowerCase():"",c=o.renderedFrame??0,d=l[l.length-1].t,{frameRate:u}=h.comp.globalData??{frameRate:60};if(c<=d)return p;let f,g=0;switch(s?f=n?Math.abs(d-u*n):Math.max(0,d-h.data.ip):((!n||n>l.length-1)&&(n=l.length-1),f=d-(g=l[l.length-1-n].t)),m){case"pingpong":if(Math.floor((c-g)/f)%2!=0)return this.getValueAtTime((f-(c-g)%f+g)/u,0);break;case"offset":{let t=this.getValueAtTime(g/u,0),e=this.getValueAtTime(d/u,0),s=this.getValueAtTime(((c-g)%f+g)/u,0),n=Math.floor((c-g)/f);if(te(p)&&te(t)&&te(e)&&te(s)){for(i=0,r=(a=Array.from({length:t.length})).length;i<r;i++)a[i]=(e[i]-t[i])*n+s[i];return a}return(e-t)*n+s}case"continue":{let t=this.getValueAtTime(d/u,0),e=this.getValueAtTime((d-.001)/u,0);if(te(p)&&te(t)&&te(e)){for(i=0,r=(a=Array.from({length:t.length})).length;i<r;i+=1)a[i]=t[i]+(t[i]-e[i])*((c-d)/u)/5e-4;return a}return t+(c-d)/.001*(t-e)}}return this.getValueAtTime(((c-g)%f+g)/u,0)}function rf(t,e,s){let i,r,a,n,o;if(!this.k)return this.pv;let h=e,{comp:l,elem:p,keyframes:m=[],pv:c}=this;if(!p?.comp)throw Error("Element is not implemented");if(!l)throw Error("Comp is not implemented");let{frameRate:d}=p.comp.globalData??{frameRate:60},u=t?t.toLowerCase():"",f=l.renderedFrame??0,g=m[0].t;if(f>=g)return c;switch(s?(i=h?Math.abs(d*h):Math.max(0,p.data.op-g),r=g+i):((!h||h>m.length-1)&&(h=m.length-1),i=(r=m[h].t)-g),u){case"pingpong":if(Math.floor((g-f)/i)%2==0)return this.getValueAtTime(((g-f)%i+g)/d,0);break;case"offset":{let t=this.getValueAtTime(g/d,0),e=this.getValueAtTime(r/d,0),s=this.getValueAtTime((i-(g-f)%i+g)/d,0),h=Math.floor((g-f)/i)+1;if(te(c)&&te(t)&&te(e)&&te(s)){for(a=0,n=(o=Array.from({length:t.length})).length;a<n;a+=1)o[a]=s[a]-(e[a]-t[a])*h;return o}return s-(e-t)*h}case"continue":{let t=this.getValueAtTime(g/d,0),e=this.getValueAtTime((g+.001)/d,0);if(te(c)&&te(t)&&te(e)){for(a=0,n=(o=Array.from({length:t.length})).length;a<n;a+=1)o[a]=t[a]+(t[a]-e[a])*(g-f)/.001;return o}return t+(t-e)*(g-f)/.001}}return this.getValueAtTime((i-((g-f)%i+g))/d,0)}function rg(t,e){let s,{comp:i,k:r,pv:a}=this;if(!r)return a;let{renderedFrame:n=0}=i??{renderedFrame:0},{frameRate:o}=i?.globalData??{frameRate:60},h=.5*(t||.4),l=Math.floor(e||5);if(l<=1)return a;let p=n/o,m=p-h,c=l>1?(p+h-m)/(l-1):1,d=0,u,f;for(f=te(a)?t2(F.Float32,a.length):0;d<l;){if(s=this.getValueAtTime(m+d*c),te(a)&&te(f)&&te(s)){for(u=0;u<a.length;u++)f[u]+=s[u];d++;continue}f+=s,d++}if(te(a)&&te(f)){for(u=0;u<a.length;u+=1)f[u]/=l;return f}return f/l}function ry(t){this._transformCachingAtTime=this._transformCachingAtTime??{v:new t5};let{v:e}=this._transformCachingAtTime,{mult:s=1}=this.a??{mult:1},{mult:i=1}=this.s??{mult:1};if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){let i=this.a?.getValueAtTime(t)??[0,0,0];e.translate(-i[0]*s,-i[1]*s,i[2]*s)}if(this.appliedTransformations<2){let s=this.s?.getValueAtTime(t)??[0,0,0];e.scale(s[0]*i,s[1]*i,s[2]*i)}if(this.sk&&this.appliedTransformations<3){let s=this.sk.getValueAtTime(t),i=this.sa?.getValueAtTime(t)??0;e.skewFromAxis(-s*(this.sk.mult??1),i*(this.sa?.mult??1))}if(this.r&&this.appliedTransformations<4){let s=this.r.getValueAtTime(t);e.rotate(-s*(this.r.mult??1))}else if(!this.r&&this.appliedTransformations<4){let s=Number(this.rz?.getValueAtTime(t)),i=Number(this.ry?.getValueAtTime(t)),r=Number(this.rx?.getValueAtTime(t)),a=this.or?.getValueAtTime(t)??[];e.rotateZ(-s*(this.rz?.mult??1)).rotateY(i*(this.ry?.mult??1)).rotateX(r*(this.rx?.mult??1)).rotateZ(-a[2]*(this.or?.mult??1)).rotateY(a[1]*(this.or?.mult??1)).rotateX(a[0]*(this.or?.mult??1))}if(this.data.p?.s){let s=this.px?.getValueAtTime(t),i=this.py?.getValueAtTime(t);if(this.data.p.z){let r=this.pz?.getValueAtTime(t);e.translate(s*(this.px?.mult??1),i*(this.py?.mult??1),-r*(this.pz?.mult??1))}else e.translate(s*(this.px?.mult??1),i*(this.py?.mult??1),0)}else{let s=this.p?.getValueAtTime(t)??[0,0,0];e.translate(s[0]*(this.p?.mult??1),s[1]*(this.p?.mult??1),-s[2]*(this.p?.mult??1))}return e}function rb(){return this.v.clone(new t5)}function rv(t,e){this._cachingAtTime=this._cachingAtTime??{lastIndex:0,lastTime:-999999,shapeValue:ej.clone(this.pv)};let s=t;return s*=this.elem?.globalData?.frameRate??60,(s-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<s?this._caching?.lastIndex??0:0,this._cachingAtTime.lastTime=s,this.interpolateShape(s,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}class rx{constructor(t){this.comp=t,this._name=t.data?.nm,this.layer=this,this.height=t.data?.h||t.globalData?.compSize?.h,this.width=t.data?.w||t.globalData?.compSize?.w,this.pixelAspect=1,this.frameDuration=1/(t.globalData?.frameRate??60),this.displayStartTime=0,this.numLayers=t.layers?.length}getInterface(t){let e=0,{length:s}=this.comp.layers??[];for(;e<s;){if(this.comp.layers?.[e].nm===t||this.comp.layers?.[e].ind===t)return this.comp.elements[e].layerInterface;e++}return null}}let{resetFrame:rw}=rp;class r_{completeProperty(t,e,s){Object.defineProperty(t,"velocity",{get:()=>e.getVelocityAtTime(e.comp?.currentFrame??0)}),t.numKeys=e.keyframes?.length??0,t.key=function(i){let r;if(!t.numKeys)return 0;e.keyframes&&(r="s"in e.keyframes[i-1]?e.keyframes[i-1].s:"e"in e.keyframes[i-2]?e.keyframes[i-2].e:e.keyframes[i-2].s);let a=s===R.UniDimensional?new Number(r):{...r};return a.time=Number(e.keyframes?.[i-1].t)/(e.elem?.comp?.globalData?.frameRate??60),a.value=s===R.UniDimensional?r[0]:r,a},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}defaultGetter(){return this.defaultUnidimensionalValue}getInterface(t){return t?t.propType===R.UniDimensional?this.UnidimensionalPropertyInterface(t):this.MultidimensionalPropertyInterface(t):this.defaultGetter}MultidimensionalPropertyInterface(t){let e=t;e&&"pv"in e||(e=this.defaultMultidimensionalValue);let s=1/e?.mult,i=e.data?.l??e.pv.length,r=t2(F.Float32,i),a=t2(F.Float32,i);return r.value=a,this.completeProperty(r,e,"multidimensional"),function(){e.k&&e.getValue();for(let t=0;t<i;t+=1)a[t]=e.v[t]*s,r[t]=a[t];return r}}UnidimensionalPropertyInterface(t){let e=t;e&&"pv"in e||(e=this.defaultUnidimensionalValue);let s=1/e.mult,i=e.pv*s,r=new Number(i);return r.value=i,this.completeProperty(r,e,R.UniDimensional),()=>(e.k&&e.getValue(),i=e.v*s,r.value!==i&&((r=new Number(i)).value=i,r[0]=i,this.completeProperty(r,e,R.UniDimensional)),r)}constructor(){this.defaultMultidimensionalValue={mult:1,pv:[0,0,0],v:[0,0,0]},this.defaultUnidimensionalValue={mult:1,pv:0,v:0}}}function rE(t){return new r_().getInterface(t)}class rC{constructor(t,e){this.interfaceFunction=t,this.parentPropertyGroup=e}getInterface(t=1){return t<=0?this.interfaceFunction:this.parentPropertyGroup(t-1)}}class rS{constructor(t,e){this._name=t,this.propertyGroup=e}getInterface(t){return t<=0?this:this.propertyGroup(t-1)}}class rM{get numProperties(){return this.effects.length}constructor(t,e){this.effects=t,this.effectElements=e}getInterface(t){let e=0,{length:s}=this.effects;for(;e<s;){if(t===this.effects[e].nm||t===this.effects[e].mn||t===this.effects[e].ix)return this.effectElements[e];e++}return null}}class rk{get maskOpacity(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}get maskPath(){return this._mask.prop?.k&&this._mask.prop.getValue(),this._mask.prop}constructor(t,e){this._mask=t,this._data=e}}class rP{constructor(t,e){this.maskManager=t,this._masksInterfaces=t3(t.viewData.length);let{length:s}=t.viewData;for(let e=0;e<s;e++)this._masksInterfaces[e]=new rk(t.viewData[e],t.masksProperties[e])}getInterface(t){let e=0;for(;e<length;){if(this.maskManager.masksProperties[e].nm===t)return this._masksInterfaces[e];e++}return null}}class rA{get anchorPoint(){return rE(this.transform.a)}get opacity(){return rE(this.transform.o)}get orientation(){return rE(this.transform.or)}get position(){return this.transform.p?this._transformFactory?.():[this._px?.(),this._py?.(),this._pz?.()??0]}get rotation(){return rE(this.transform.r??this.transform.rz)}get scale(){return rE(this.transform.s)}get skew(){return rE(this.transform.sk)}get skewAxis(){return rE(this.transform.sa)}get xPosition(){return rE(this.transform.px)}get xRotation(){return rE(this.transform.rx)}get yPosition(){return rE(this.transform.py)}get yRotation(){return rE(this.transform.ry)}get zPosition(){return rE(this.transform.pz)}get zRotation(){return rE(this.transform.rz??this.transform.r)}constructor(t){this.transform=t,t.p?this._transformFactory=rE(t.p):(this._px=rE(t.px),this._py=rE(t.py),t.pz&&(this._pz=rE(t.pz)))}getInterface(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return this.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return this.rotation;case"ADBE Rotate X":return this.xRotation;case"ADBE Rotate Y":return this.yRotation;case"position":case"Position":case"ADBE Position":case 2:return this.position;case"ADBE Position_0":return this.xPosition;case"ADBE Position_1":return this.yPosition;case"ADBE Position_2":return this.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return this.anchorPoint;case"opacity":case"Opacity":case 11:return this.opacity;default:return null}}}class rD{getInterface(t){throw Error("Method not implemented")}}class rT extends rD{getInterface(t){let e=0,{length:s}=this.interfaces;for(;e<s;){if(this.interfaces[e]._name===t||this.interfaces[e].mn===t||this.interfaces[e].propertyIndex===t||this.interfaces[e].ix===t||this.interfaces[e].ind===t)return this.interfaces[e];e++}return"number"==typeof t?this.interfaces[t-1]:null}constructor(...t){super(...t),this.interfaces=[]}}class rF extends rD{get position(){return rE(this.prop?.p)}get size(){return rE(this.prop?.s)}getInterface(t){return this.shape?.p?.ix===t?this.position:this.shape?.s?.ix===t?this.size:null}}class rI extends rD{get color(){return rE(this.c)}get opacity(){return rE(this.o)}getInterface(t){return"Color"===t||"color"===t?this.color:"Opacity"===t||"opacity"===t?this.opacity:null}}class r$ extends rD{get endPoint(){return rE(this.prop?.e)}get opacity(){return rE(this.prop?.o)}get startPoint(){return rE(this.prop?.s)}get type(){return"a"}getInterface(t){return"Start Point"===t||"start point"===t?this.startPoint:"End Point"===t||"end point"===t?this.endPoint:"Opacity"===t||"opacity"===t?this.opacity:null}}class rL extends rD{get _name(){return this.shape?.nm}getInterface(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return this.content;default:return this.transform}}}class rN extends rD{get position(){return rE(this.prop?.p)}get roundness(){return rE(this.prop?.r)}get size(){return rE(this.prop?.s)}getInterface(t){return this.shape?.p?.ix===t?this.position:this.shape?.r?.ix===t?this.roundness:this.shape?.s?.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?this.size:null}}class rB extends rD{get copies(){return rE(this.prop?.c)}get offset(){return rE(this.prop?.o)}getInterface(t){return this.shape?.c?.ix===t||"Copies"===t?this.copies:this.shape?.o?.ix===t||"Offset"===t?this.offset:null}}class rR extends rD{get radius(){return rE(this.prop?.rd)}getInterface(t){return this.shape?.r?.ix===t||"Round Corners 1"===t?this.radius:null}}class rV{get path(){return this.prop?.k&&this.prop.getValue(),this.prop}get shape(){return this.path}constructor(t,e,s){this.prop=e.sh;let i=new rC(this,s);this.prop?.setGroupProperty(new rS("Path",i)),this._name=t.nm,this.ix=t.ix,this.mn=t.mn,this.propertyGroup=s,this.propertyIndex=t.ix}getInterface(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?this.path:null}}class rz extends rD{get innerRadius(){return rE(this.prop?.ir)}get innerRoundness(){return rE(this.prop?.is)}get outerRadius(){return rE(this.prop?.or)}get outerRoundness(){return rE(this.prop?.os)}get points(){return rE(this.prop?.pt)}get position(){return rE(this.prop?.p)}get rotation(){return rE(this.prop?.r)}getInterface(t){return this.shape?.p?.ix===t?this.position:this.shape?.r?.ix===t?this.rotation:this.shape?.pt?.ix===t?this.points:this.shape?.or?.ix===t||"ADBE Vector Star Outer Radius"===t?this.outerRadius:this.shape?.os?.ix===t?this.outerRoundness:this.shape?.ir?.ix===t||"ADBE Vector Star Inner Radius"===t?this.innerRadius:this.shape?.is?.ix===t?this.innerRoundness:null}}class rO extends rD{get color(){return rE(this.prop?.c)}get dash(){return this.dashOb}get opacity(){return rE(this.prop?.o)}get strokeWidth(){return rE(this.prop?.w)}getInterface(t){return"Color"===t||"color"===t?this.color:"Opacity"===t||"opacity"===t?this.opacity:"Stroke Width"===t||"stroke width"===t?this.strokeWidth:null}}class rG extends rD{get anchorPoint(){return rE(this.prop?.transform?.mProps.a)}get opacity(){return rE(this.prop?.transform?.mProps.o)}get position(){return rE(this.prop?.transform?.mProps.p)}get rotation(){return rE(this.prop?.transform?.mProps.r)}get scale(){return rE(this.prop?.transform?.mProps.s)}get skew(){return rE(this.prop?.transform?.mProps.sk)}get skewAxis(){return rE(this.prop?.transform?.mProps.sa)}getInterface(t){return this.shape?.a?.ix===t||"Anchor Point"===t?this.anchorPoint:this.shape?.o?.ix===t||"Opacity"===t?this.opacity:this.shape?.p?.ix===t||"Position"===t?this.position:this.shape?.r?.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?this.rotation:this.shape?.s?.ix===t||"Scale"===t?this.scale:this.shape?.sk&&this.shape.sk.ix===t||"Skew"===t?this.skew:this.shape?.sa&&this.shape.sa.ix===t||"Skew Axis"===t?this.skewAxis:null}}class rq extends rD{get end(){return rE(this.prop?.e)}get offset(){return rE(this.prop?.o)}get start(){return rE(this.prop?.s)}getInterface(t){return t===this.shape?.e?.ix||"End"===t||"end"===t?this.end:t===this.shape?.s?.ix?this.start:t===this.shape?.o?.ix?this.offset:null}}let rj={comp:rx,effects:class{createEffectsInterface(t,e){if(t.effectsManager){this.effectsData=t.data?.ef??[];let{length:s}=t.effectsManager.effectElements;for(let i=0;i<s;i++)this.effectElements.push(this.createGroupInterface(this.effectsData[i],t.effectsManager.effectElements[i],e,t));return this.effects=t.data?.ef??[],new rM(this.effects,this.effectElements)}return null}createGroupInterface(t,e,s,i){let r=e=>{let s=t.ef??[],i=0,{length:r}=s;for(;i<r;){if(e===s[i].nm||e===s[i].mn||e===s[i].ix){if(5===s[i].ty)return this.effectElements[i];return this.effectElements[i]()}i++}throw Error()},a=new rC(r,s),{length:n}=t.ef??[];for(let s=0;s<n;s+=1)t.ef?.[s].ty===5?this.effectElements.push(this.createGroupInterface(t.ef[s],e.effectElements[s],e.effectElements[s].propertyGroup,i)):this.effectElements.push(this.createValueInterface(e.effectElements[s],t.ef[s].ty,i,a));return"ADBE Color Control"===t.mn&&Object.defineProperty(r,"color",{get(){return this.effectElements[0]()}}),Object.defineProperties(r,{_name:{value:t.nm},numProperties:{get:()=>t.np},propertyGroup:{value:a}}),r.enabled=0!==t.en,r.active=r.enabled,r}createValueInterface(t,e,s,i){let r=rE(t.p);return t.p?.setGroupProperty(new rS("",i)),function(){return 10===e?s.comp?.compInterface?.getInterface(t.p?.v):r()}}constructor(){this.effectElements=[],this.effects=[],this.effectsData=[]}},footage:class{constructor(t){this.currentPropertyName="",this.elem=t,this._name="Data",this.dataInterface=this.dataInterfaceFactory(t)}dataInterfaceFactory(t){return this._name="Outline",this.outlineInterface=this.outlineInterfaceFactory(t),this}getInterface(t){return"Data"===t?this.dataInterface:"Outline"===t?void this.outlineInterface():null}init(){return this.currentPropertyName="",this.currentProperty=this.elem.getFootageData(),this.searchProperty}outlineInterface(t){throw Error("Method is not implemented")}outlineInterfaceFactory(t){return this.currentPropertyName="",this.currentProperty=t.getFootageData(),this.elem=t,this.init}searchProperty(t){if(this.currentProperty?.[t])return(this.currentPropertyName=t,this.currentProperty=this.currentProperty[t],"object"==typeof this.currentProperty)?this.searchProperty:this.currentProperty;let e=t.indexOf(this.currentPropertyName);if(-1!==e){let s=parseInt(t.slice(e+this.currentPropertyName.length),10);return(this.currentProperty=this.currentProperty?.[s],"object"==typeof this.currentProperty)?this.searchProperty:this.currentProperty}return""}},layer:class{get active(){return this._elem.isInRange}get hasParent(){return!!this._elem.hierarchy?.length}get parent(){return this._elem.hierarchy?.[0].layerInterface}get transform(){return this.transformInterface}constructor(t){if(this.sourceRectAtTime=t.sourceRectAtTime.bind(t),this._elem=t,!t.finalTransform)throw Error(`FinalTransform is not iplemented in ${t.constructor.name}`);this.transformInterface=new rA(t.finalTransform.mProp);let{anchorPoint:e,opacity:s,position:i,rotation:r,scale:a}=this.transformInterface;this.anchor_point=e,this.anchorPoint=e,this.opacity=s,this.position=i,this.rotation=r,this.scale=a,this.toComp=this.toWorld;let{frameRate:n}=t.comp?.globalData??{frameRate:60};this.startTime=t.data.st,this.index=t.data.ind,this.source=t.data.refId,this.height=0===t.data.ty?t.data.h:100,this.width=0===t.data.ty?t.data.w:100,this.inPoint=t.data.ip/n,this.outPoint=t.data.op/n,this._name=t.data.nm}applyPoint(t,e){if(this._elem.hierarchy?.length){let{length:e}=this._elem.hierarchy;for(let s=0;s<e;s++)this._elem.hierarchy[s].finalTransform?.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}fromComp(t){let e=new t5;if(e.reset(),this._elem.finalTransform?.mProp.applyToMatrix(e),this._elem.hierarchy?.length){let t,s=this._elem.hierarchy.length;for(t=0;t<s;t+=1)this._elem.hierarchy[t].finalTransform?.mProp.applyToMatrix(e)}return e.inversePoint(t)}fromWorld(t,e){let s=this.getMatrix(e);return this.invertPoint(s,t)}fromWorldVec(t,e){let s=this.getMatrix(e);return s.props[12]=0,s.props[13]=0,s.props[14]=0,this.invertPoint(s,t)}getInterface(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return this.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return this.transformInterface;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return this.effect;case"ADBE Text Properties":return this.textInterface;default:return null}}getMatrix(t){let e=new t5;if(void 0===t){let t=this._elem.finalTransform?.mProp;t?.applyToMatrix(e)}else(this._elem.finalTransform?.mProp.getValueAtTime(t)).clone(e);return e}invertPoint(t,e){if(this._elem.hierarchy?.length){let{length:e}=this._elem.hierarchy;for(let s=0;s<e;s++)this._elem.hierarchy[s].finalTransform?.mProp.applyToMatrix(t)}return t.inversePoint(e)}registerEffectsInterface(t){this.effect=t}registerMaskInterface(t){this.mask=new rP(t,this._elem)}sampleImage(){return[1,1,1,1]}toComp(t,e){throw Error("Method is not implemented")}toWorld(t,e){let s=this.getMatrix(e);return this.applyPoint(s,t)}toWorldVec(t,e){let s=this.getMatrix(e);return s.props[12]=0,s.props[13]=0,s.props[14]=0,this.applyPoint(s,t)}},shape:class{constructor(t,e,s){this.arr=[],this.parentGroup=s,this.propertyGroup=new rC(this,this.parentGroupWrapper),this.interfaces=this.iterateElements(t,e,this.propertyGroup),this.numProperties=this.interfaces.length,this._name="Contents"}contentsInterfaceFactory(t,e,s){rT.prototype.propertyGroup=new rC(rT,s),this.interfaces=this.iterateElements(t.it??null,e.it,rT.prototype.propertyGroup),rT.prototype.numProperties=this.interfaces.length;let i=this.transformInterfaceFactory(t.it[t.it.length-1],e.it[e.it.length-1],rT.prototype.propertyGroup);return rT.prototype.transform=i,rT.prototype.propertyIndex=t.cix,rT.prototype._name=t.nm,rT.prototype.getInterface}defaultInterfaceFactory(){return this.noOp}ellipseInterfaceFactory(t,e,s){let i=new rC(rF,s);rF.prototype.shape=t,rF.prototype.propertyIndex=t.ix;let r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return r.s.setGroupProperty(new rS("Size",i)),r.p?.setGroupProperty(new rS("Position",i)),rF.prototype._name=t.nm,rF.prototype.prop=r,rF.prototype.mn=t.mn,rF.prototype.getInterface}fillInterfaceFactory(t,e,s){return rI.prototype._name=t.nm,rI.prototype.c=e.c,rI.prototype.mn=t.mn,rI.prototype.o=e.o,e.c?.setGroupProperty(new rS("Color",s)),e.o?.setGroupProperty(new rS("Opacity",s)),rI.prototype.getInterface}getInterface(t){let e=t;if("number"==typeof e)return 0===(e=t??1)?propertyGroup:this.interfaces[e-1];let s=0,{length:i}=this.interfaces;for(;s<i;){if(this.interfaces[s]._name===e)return this.interfaces[s];s++}return null}gradientFillInterfaceFactory(t,e,s){return r$.prototype._name=t.nm,r$.prototype.prop=e,r$.prototype.mn=t.mn,e.s?.setGroupProperty(new rS("Start Point",s)),e.e?.setGroupProperty(new rS("End Point",s)),e.o?.setGroupProperty(new rS("Opacity",s)),r$.prototype.getInterface}groupInterfaceFactory(t,e,s){rL.prototype.propertyGroup=new rC(rL,s);let i=this.contentsInterfaceFactory(t,e,rL.prototype.propertyGroup),r=this.transformInterfaceFactory(t.it[t.it.length-1],e.it[e.it.length-1],rL.prototype.propertyGroup);return rL.prototype.content=i,rL.prototype.transform=r,rL.prototype.shape=t,rL.prototype.numProperties=t.np,rL.prototype.propertyIndex=t.ix,rL.prototype.nm=t.nm,rL.prototype.mn=t.mn,rL.prototype.getInterface}iterateElements(t,e,s){let i=[],{length:r}=t??[];for(let a=0;a<r;a++)if(t)switch(t[a].ty){case N.Group:i.push(this.groupInterfaceFactory(t[a],e[a],s));break;case N.Fill:i.push(this.fillInterfaceFactory(t[a],e[a],s));break;case N.Stroke:i.push(this.strokeInterfaceFactory(t[a],e[a],s));break;case N.Trim:i.push(this.trimInterfaceFactory(t[a],e[a],s));break;case N.Transform:break;case N.Ellipse:i.push(this.ellipseInterfaceFactory(t[a],e[a],s));break;case N.PolygonStar:i.push(this.starInterfaceFactory(t[a],e[a],s));break;case N.Path:i.push(new rV(t[a],e[a],s));break;case N.Rectangle:i.push(this.rectInterfaceFactory(t[a],e[a],s));break;case N.RoundedCorners:i.push(this.roundedInterfaceFactory(t[a],e[a],s));break;case N.Repeater:i.push(this.repeaterInterfaceFactory(t[a],e[a],s));break;case N.GradientFill:i.push(this.gradientFillInterfaceFactory(t[a],e[a],s));break;default:i.push(this.defaultInterfaceFactory(t[a],e[a],s))}return i}parentGroupWrapper(){return this.parentGroup}rectInterfaceFactory(t,e,s){rN.prototype.shape=t;let i=new rC(rN,s),r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return rN.prototype.propertyIndex=t.ix,r.p?.setGroupProperty(new rS("Position",i)),r.s.setGroupProperty(new rS("Size",i)),r.r.setGroupProperty(new rS("Rotation",i)),rN.prototype.prop=r,rN.prototype._name=t.nm,rN.prototype.mn=t.mn,rN.prototype.getInterface}repeaterInterfaceFactory(t,e,s){rB.prototype.shape=t,rB.prototype.propertyIndex=t.ix,rB.prototype._name=t.nm,rB.prototype.mn=t.mn;let i=new rC(rB,s);return rB.prototype.prop=e,e.c?.setGroupProperty(new rS("Copies",i)),e.o?.setGroupProperty(new rS("Offset",i)),rB.prototype.getInterface}roundedInterfaceFactory(t,e,s){rR.prototype.shape=t,rR.prototype._name=t.nm,rR.prototype.propertyIndex=t.ix,rR.prototype.mn=t.mn;let i=new rC(rR,s);return e.rd.setGroupProperty(new rS("Radius",i)),rR.prototype.getInterface}starInterfaceFactory(t,e,s){rz.prototype.shape=t;let i=new rC(rz,s),r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return rz.prototype.propertyIndex=t.ix,r.or.setGroupProperty(new rS("Outer Radius",i)),r.os.setGroupProperty(new rS("Outer Roundness",i)),r.pt.setGroupProperty(new rS("Points",i)),r.p.setGroupProperty(new rS("Position",i)),r.r.setGroupProperty(new rS("Rotation",i)),t.ir&&(r.ir.setGroupProperty(new rS("Inner Radius",i)),r.is.setGroupProperty(new rS("Inner Roundness",i))),rz.prototype._name=t.nm,rz.prototype.prop=r,rz.prototype.mn=t.mn,rz.prototype.getInterface}strokeInterfaceFactory(t,e,s){let i={},r=new rC(rO,s),a=new rC(i,r),{length:n}=t.d??[];for(let s=0;s<n;s++){var o;o=s,Object.defineProperty(i,t.d?.[o].nm,{get:rE(e.d.dataProps[o].p)}),e.d.dataProps[s].p.setGroupProperty(a)}return rO.prototype._name=t.nm,rO.prototype.mn=t.mn,rO.prototype.dashOb=i,rO.prototype.prop=e,e.c?.setGroupProperty(new rS("Color",r)),e.o?.setGroupProperty(new rS("Opacity",r)),e.w?.setGroupProperty(new rS("Stroke Width",r)),rO.prototype.getInterface}transformInterfaceFactory(t,e,s){rG.prototype.shape=t;let i=new rC(rG,s);return e.transform?.mProps.o?.setGroupProperty(new rS("Opacity",i)),e.transform?.mProps.p?.setGroupProperty(new rS("Position",i)),e.transform?.mProps.a?.setGroupProperty(new rS("Anchor Point",i)),e.transform?.mProps.s?.setGroupProperty(new rS("Scale",i)),e.transform?.mProps.r?.setGroupProperty(new rS("Rotation",i)),e.transform?.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(new rS("Skew",i)),e.transform.mProps.sa?.setGroupProperty(new rS("Skew Angle",i))),e.transform?.op.setGroupProperty(new rS("Opacity",i)),rG.prototype._name=t.nm,rG.prototype.prop=e,rG.prototype.ty=N.Transform,rG.prototype.mn=t.mn,rG.prototype.propertyGroup=s,rG.prototype.getInterface}trimInterfaceFactory(t,e,s){rq.prototype.shape=t;let i=new rC(rq,s);return rq.prototype.propertyIndex=t.ix,e.s?.setGroupProperty(new rS("Start",i)),e.e?.setGroupProperty(new rS("End",i)),e.o?.setGroupProperty(new rS("Offset",i)),rq.prototype.propertyIndex=t.ix,rq.prototype.propertyGroup=s,rq.prototype._name=t.nm,rq.prototype.prop=e,rq.prototype.mn=t.mn,rq.prototype.getInterface}noOp(){return null}},text:class{get sourceText(){this.elem.textProperty?.getValue();let t=this.elem.textProperty?.currentData.t;return this._sourceText&&t===this._sourceText.value||(this._sourceText=new String(t),this._sourceText.value=t||new String(t),Object.defineProperty(this._sourceText,"style",{get(){return{fillColor:this.elem.textProperty.currentData.fc}}})),this._sourceText}constructor(t){this.elem=t}getInterface(t){return"ADBE Text Document"===t?this.sourceText:null}}},rW=(t,e,s)=>{if(0===t)return[];let i=e*e-4*t*s;if(i<0)return[];let r=-e/(2*t);if(0===i)return[r];let a=Math.sqrt(i)/(2*t);return[r-a,r+a]},rH=(t,e,s,i)=>[-t+3*e-3*s+i,3*t-6*e+3*s,-3*t+3*e,t],rY=(t,e,s)=>t*(1-s)+e*s,rU=(t,e,s)=>[rY(t[0],e[0],s),rY(t[1],e[1],s)],rJ=(t,e)=>2*Math.abs(t.cx-e.cx)<t.width+e.width&&2*Math.abs(t.cy-e.cy)<t.height+e.height,rX=(t,e,s)=>{let i=t.boundingBox();return{bez:t,cx:i.cx,cy:i.cy,height:i.height,t:(e+s)/2,t1:e,t2:s,width:i.width}},rZ=t=>{let e=t.bez.split(.5);return[rX(e[0],t.t1,t.t),rX(e[1],t.t,t.t2)]},rK=(t,e,s,i,r,a)=>{if(!rJ(t,e))return;if(s>=a||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i)return void r.push([t.t,e.t]);let n=rZ(t),o=rZ(e);rK(n[0],o[0],s+1,i,r,a),rK(n[0],o[1],s+1,i,r,a),rK(n[1],o[0],s+1,i,r,a),rK(n[1],o[1],s+1,i,r,a)},rQ=t=>new r0(t,t,t,t,!1);class r0{constructor(t,e,s,i,r){let a=e,n=s;r&&X(t,a)&&(a=rU(t,i,1/3)),r&&X(n,i)&&(n=rU(t,i,2/3));let o=rH(t[0],a[0],n[0],i[0]),h=rH(t[1],a[1],n[1],i[1]);this.a=[o[0],h[0]],this.b=[o[1],h[1]],this.c=[o[2],h[2]],this.d=[o[3],h[3]],this.points=[t,a,n,i]}boundingBox(){let t=this.bounds();return{bottom:t.y.max,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2,height:t.y.max-t.y.min,left:t.x.min,right:t.x.max,top:t.y.min,width:t.x.max-t.x.min}}bounds(){return{x:this._extrema(this,0),y:this._extrema(this,1)}}derivative(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]}inflectionPoints(){let t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(U(t))return[];let e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,s=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(s<0)return[];let i=Math.sqrt(s);return U(i)?i>0&&i<1?[e]:[]:[e-i,e+i].filter(t=>t>0&&t<1)}intersections(t,e,s){let i=e,r=s;i=i??2,r=r??7;let a=[];return rK(rX(this,0,1),rX(t,0,1),0,i,a,r),a}normalAngle(t){let e=this.derivative(t);return Math.atan2(e[0],e[1])}point(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]}split(t){if(t<=0)return[rQ(this.points[0]),this];if(t>=1)return[this,rQ(this.points[this.points.length-1])];let e=rU(this.points[0],this.points[1],t),s=rU(this.points[1],this.points[2],t),i=rU(this.points[2],this.points[3],t),r=rU(e,s,t),a=rU(s,i,t),n=rU(r,a,t);return[new r0(this.points[0],e,r,n,!0),new r0(n,a,i,this.points[3],!0)]}tangentAngle(t){let e=this.derivative(t);return Math.atan2(e[1],e[0])}_extrema(t,e){let s=t.points[0][e],i=t.points[t.points.length-1][e];if(s>i){let t=i;i=s,s=t}let r=rW(3*t.a[e],2*t.b[e],t.c[e]),{length:a}=r;for(let n=0;n<a;n++){if(r[n]<=0||r[n]>=1)continue;let a=t.point(r[n])[e];if(a<s){s=a;continue}a>i&&(i=a)}return{max:i,min:s}}}function r1(t,e){let s=(e+1)%t.length();return new r0(t.v[e],t.o[e],t.i[s],t.v[s],!0)}class r2 extends ek{addShape(t){if(this.closed)return;t.sh?.container?.addDynamicProperty(t.sh);let e={data:t,localShapeCollection:eH(),shape:t.sh};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}addShapeToModifier(t){}init(t,e,s,i){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=-999999,this.closed=!1,this.k=!1,this.dynamicProperties.length>0?this.k=!0:this.getValue(!0)}initModifierProperties(t,e){throw Error(`${this.constructor.name}: Method initModifierProperties is not implemented`)}isAnimatedWithShape(t){throw Error(`${this.constructor.name}: Method isAnimatedWithShape is not implemented`)}processKeys(){return this.elem?.globalData?.frameId===this.frameId||(this.frameId=this.elem?.globalData?.frameId,this.iterateDynamicProperties()),0}constructor(...t){super(...t),this.shapes=[]}}let r3=(t,e)=>[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]],r5=(t,e,s)=>[t[0]+Math.cos(e)*s,t[1]-Math.sin(e)*s],r4=(t,e,s)=>{let i=Math.atan2(e[0]-t[0],e[1]-t[1]);return[r5(t,i,s),r5(e,i,s)]},r6=(t,e,s,i)=>{let r=[t[0],t[1],1],a=[e[0],e[1],1],n=[s[0],s[1],1],o=[i[0],i[1],1],h=r3(r3(r,a),r3(n,o));return U(h[2])?null:[h[0]/h[2],h[1]/h[2]]},r9=(t,e)=>Math.hypot(t[0]-e[0],t[1]-e[1]),r8=(t,e,s,i,r)=>{let a=e.points[3],n=s.points[0];if(3===i||X(a,n))return a;if(2===i){let i=-e.tangentAngle(1),r=-s.tangentAngle(0)+Math.PI,o=r6(a,r5(a,i+Math.PI/2,100),n,r5(n,i+Math.PI/2,100)),h=o?r9(o,a):r9(a,n)/2,l=r5(a,i,2*h*.5519);return t.setXYAt(l[0],l[1],"o",t.length()-1),l=r5(n,r,2*h*.5519),t.setTripleAt(n[0],n[1],n[0],n[1],l[0],l[1],t.length()),n}let o=X(a,e.points[2])?e.points[0]:e.points[2],h=X(n,s.points[1])?s.points[3]:s.points[1],l=r6(o,a,n,h);return l&&r9(l,a)<r?(t.setTripleAt(l[0],l[1],l[0],l[1],l[0],l[1],t.length()),l):a},r7=(t,e)=>{let s,i=(s=r4(t.points[0],t.points[1],e))[0],r=s[1],a=(s=r4(t.points[1],t.points[2],e))[0],n=s[1],o=(s=r4(t.points[2],t.points[3],e))[0],h=s[1],l=r6(i,r,a,n);l=l??r;let p=r6(o,h,a,n);return new r0(i,l,p=p??o,h)},at=(t,e)=>{let s,i,r,a=t.inflectionPoints();if(0===a.length)return[r7(t,e)];if(1===a.length||Y(a[1],1))return s=(r=t.split(a[0]))[0],i=r[1],[r7(s,e),r7(i,e)];s=(r=t.split(a[0]))[0];let n=(a[1]-a[0])/(1-a[0]),o=(r=r[1].split(n))[0];return i=r[1],[r7(s,e),r7(o,e),r7(i,e)]},ae=(t,e)=>{let s=t.intersections(e);return(s.length>0&&Y(s[0][0],1)&&s.shift(),s.length>0)?s[0]:null},as=(t,e)=>{let s=[...t],i=[...e],r=ae(t[t.length-1],e[0]);return(r&&(s[t.length-1]=t[t.length-1].split(r[0])[0],i[0]=e[0].split(r[1])[1]),t.length>1&&e.length>1&&(r=ae(t[0],e[e.length-1])))?[[t[0].split(r[0])[0]],[e[e.length-1].split(r[1])[1]]]:[s,i]},ai=t=>{let e;for(let s=1;s<t.length;s++)e=as(t[s-1],t[s]),t[s-1]=e[0],t[s]=e[1];return t.length>1&&(e=as(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t},ar=(t,e)=>{let s=[e[0]-t[0],e[1]-t[1]],i=-(.5*Math.PI);return[Math.cos(i)*s[0]-Math.sin(i)*s[1],Math.sin(i)*s[0]+Math.cos(i)*s[1]]},aa=(t,e)=>{let s=0===e?t.length()-1:e-1,i=(e+1)%t.length(),r=ar(t.v[s],t.v[i]);return Math.atan2(0,1)-Math.atan2(r[1],r[0])},an=(t,e,s,i,r,a,n)=>{let o=s-Math.PI/2,h=s+Math.PI/2,l=e[0]+Math.cos(s)*i*r,p=e[1]-Math.sin(s)*i*r;t.setTripleAt(l,p,l+Math.cos(o)*a,p-Math.sin(o)*a,l+Math.cos(h)*n,p-Math.sin(h)*n,t.length())},ao=(t,e,s,i,r,a,n)=>{let o=aa(e,s),h=e.v[s%e._length],l=e.v[0===s?e._length-1:s-1],p=e.v[(s+1)%e._length],m=2===a?Math.sqrt(Math.pow(h[0]-l[0],2)+Math.pow(h[1]-l[1],2)):0,c=2===a?Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)):0;an(t,e.v[s%e._length]||[0,0],o,n,i,c/((r+1)*2),m/((r+1)*2))},ah=(t,e,s,i,r,a)=>{let n=a;for(let a=0;a<i;a++){let o=(a+1)/(i+1),h=2===r?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,l=e.normalAngle(o);an(t,e.point(o),l,n,s,h/((i+1)*2),h/((i+1)*2)),n=-n}return n},al={loadAnimation:function(t){try{let e=new tq;return tQ(e,null),e.setParams(t),e}catch(t){throw console.error("AnimationManager:\n",t),Error("Could not load animation")}}},ap=setInterval(function(){J()||"complete"===document.readyState&&(clearInterval(ap),function(){if(J())return;let t=[...document.getElementsByClassName("lottie"),...document.getElementsByClassName("bodymovin")],{length:e}=t;for(let s=0;s<e;s++)!function(t,e){try{if(!t)return null;let s=0;for(;s<tH;){if(tU[s].elem===t&&null!==tU[s].elem)return tU[s].animation;s++}let i=new tq;tQ(i,t),i.setData(t,e)}catch(t){throw console.error("AnimationManager:\n",t),Error("Could not register animation")}}(t[s],void 0)}())},100);G(L.Canvas,class extends iA{constructor(t,e){super(),this.animationItem=t,this.renderConfig={className:e?.className||"",clearCanvas:e?.clearCanvas??!0,contentVisibility:e?.contentVisibility||"visible",context:e?.context??null,dpr:e?.dpr??1,id:e?.id||"",imagePreserveAspectRatio:e?.imagePreserveAspectRatio||$.Cover,preserveAspectRatio:e?.preserveAspectRatio||$.Contain,progressiveLoad:!!e?.progressiveLoad,runExpressions:e?.runExpressions??!0},this.animationItem.wrapper&&(this.renderConfig.dpr=e?.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={_mdf:!1,currentGlobalAlpha:-1,frameNum:-1,renderConfig:this.renderConfig},this.contextData=new iF,this.elements=[],this.pendingElements=[],this.transformMat=new t5,this.completeLayers=!1,this.rendererType=L.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))}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new iD(t,this.globalData,this)}}),G(L.HTML,class extends iV{createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new iz(t,this.globalData,this):new ik(t,this.globalData,this)}}),G(L.SVG,iP),sK(I.TrimModifier,class extends r2{addPaths(t,e){let{length:s}=t;for(let i=0;i<s;i++)e.addShape(t[i])}addSegment(t,e,s,i,r,a,n){r.setXYAt(e[0],e[1],"o",a),r.setXYAt(s[0],s[1],"i",a+1),n&&r.setXYAt(t[0],t[1],"v",a),r.setXYAt(i[0],i[1],"v",a+1)}addSegmentFromArray(t,e,s,i){e.setXYAt(t[1],t[5],"o",s),e.setXYAt(t[2],t[6],"i",s+1),i&&e.setXYAt(t[0],t[4],"v",s),e.setXYAt(t[3],t[7],"v",s+1)}addShapes(t,e,s){let i=s,{pathsData:r=[],shape:a}=t,n=a?.paths?.shapes??[],o=a?.paths?._length||0,h,l,p=0,m,c,d,u=[],f,g=!0;i?(c=i._length,f=i._length):(i=eO(),c=0,f=0),u.push(i);for(let t=0;t<o;t++){let{lengths:s}=r[t];for(h=1,i.c=n[t].c,l=n[t].c?s.length:s.length+1;h<l;h++){if(p+(m=s[h-1]).addedLength<e.s){p+=m.addedLength,i.c=!1;continue}if(p>e.e){i.c=!1;break}e.s<=p&&e.e>=p+m.addedLength?(this.addSegment(n[t].v[h-1],n[t].o[h-1],n[t].i[h],n[t].v[h],i,c,g),g=!1):(d=ef(n[t].v[h-1],n[t].v[h],n[t].o[h-1],n[t].i[h],(e.s-p)/m.addedLength,(e.e-p)/m.addedLength,s[h-1]),this.addSegmentFromArray(d,i,c,g),g=!1,i.c=!1),p+=m.addedLength,c++}if(n[t].c&&s.length>0){if(m=s[h-1],p<=e.e){let r=s[h-1].addedLength;e.s<=p&&e.e>=p+r?(this.addSegment(n[t].v[h-1],n[t].o[h-1],n[t].i[0],n[t].v[0],i,c,g),g=!1):(d=ef(n[t].v[h-1],n[t].v[0],n[t].o[h-1],n[t].i[0],(e.s-p)/r,(e.e-p)/r,s[h-1]),this.addSegmentFromArray(d,i,c,g),g=!1,i.c=!1)}else i.c=!1;p+=m.addedLength,c++}if(i._length&&(i.setXYAt(i.v[f][0],i.v[f][1],"i",f),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),p>e.e)break;t<o-1&&(i=eO(),g=!0,u.push(i),c=0)}return u}addShapeToModifier(t){t.pathsData=[]}calculateShapeEdges(t,e,s,i,r){let a=[];e<=1?a.push({e,s:t}):t>=1?a.push({e:e-1,s:t-1}):a.push({e:1,s:t},{e:e-1,s:0});let n=[],{length:o}=a;for(let t=0;t<o;t++)if(!(a[t].e*r<i||a[t].s*r>i+s)){let e,o;e=a[t].s*r<=i?0:(a[t].s*r-i)/s,o=a[t].e*r>=i+s?1:(a[t].e*r-i)/s,n.push([e,o])}return 0===n.length&&n.push([0,0]),n}initModifierProperties(t,e){this.s=eB.getProp(t,e.s,0,.01,this),this.e=eB.getProp(t,e.e,0,.01,this),this.o=eB.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=this.s.effectsSequence.length>0||this.e.effectsSequence.length>0||this.o.effectsSequence.length>0}processShapes(t){let e,s;if(this._mdf||t){let t=Number(this.o?.v)%360/360;if(t<0&&t++,(e=Number(this.s?.v)>1?1+t:0>Number(this.s?.v)?0+t:Number(this.s?.v)+t)>(s=Number(this.e?.v)>1?1+t:0>Number(this.e?.v)?0+t:Number(this.e?.v)+t)){let t=e;e=s,s=t}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue||0,s=this.eValue||0;let i,r,a,n,o,h,l=0,{length:p}=this.shapes;if(s===e)for(let t=0;t<p;t++){this.shapes[t].localShapeCollection?.releaseShapes();let{shape:e}=this.shapes[t];e&&(e._mdf=!0,e.paths=this.shapes[t].localShapeCollection),this._mdf&&(this.shapes[t].pathsData.length=0)}else if((1!==s||0!==e)&&(0!==s||1!==e)){let m,c,d=[];for(let e=0;e<p;e++)if(m=this.shapes[e],m.shape?._mdf||this._mdf||t||2===this.m){if(i=m.shape?.paths,a=i?._length||0,h=0,!m.shape?._mdf&&m.pathsData?.length)h=m.totalShapeLength;else{for(r=0,n=this.releasePathsData(m.pathsData);r<a;r++)i&&(o=eg(i.shapes[r]),n.push(o),h+=o.totalLength);m.totalShapeLength=h,m.pathsData=n}l+=Number(h),m.shape&&(m.shape._mdf=!0)}else m.shape&&(m.shape.paths=m.localShapeCollection);let u=e,f=s,g=0,y;for(let t=p-1;t>=0;t--)if(m=this.shapes[t],m.shape?._mdf){if(!(c=m.localShapeCollection))throw Error(`${this.constructor.name}: Could not set localShapeCollection`);for(c.releaseShapes(),2===this.m&&p>1?(y=this.calculateShapeEdges(e,s,m.totalShapeLength||0,g,l),g+=Number(m.totalShapeLength)):y=[[u,f]],a=y.length,r=0;r<a;r++){u=y[r][0],f=y[r][1],d.length=0,f<=1?d.push({e:Number(m.totalShapeLength)*f,s:Number(m.totalShapeLength)*u}):u>=1?d.push({e:Number(m.totalShapeLength)*(f-1),s:Number(m.totalShapeLength)*(u-1)}):d.push({e:Number(m.totalShapeLength),s:Number(m.totalShapeLength)*u},{e:Number(m.totalShapeLength)*(f-1),s:0});let t=this.addShapes(m,d[0]);if(d[0].s!==d[0].e){if(d.length>1){let e=m.shape.paths?.shapes[m.shape.paths._length-1];if(e?.c){let e=t.pop();this.addPaths(t,c),t=this.addShapes(m,d[1],e)}else this.addPaths(t,c),t=this.addShapes(m,d[1])}this.addPaths(t,c)}}m.shape.paths=c}}else if(this._mdf)for(let t=0;t<p;t++){this.shapes[t].pathsData.length=0;let{shape:e}=this.shapes[t];e&&(e._mdf=!0)}}releasePathsData(t){let{length:e}=t;for(let s=0;s<e;s++)ec.release(t[s]);return t.length=0,t}}),sK(I.PuckerAndBloatModifier,class extends r2{initModifierProperties(t,e){this.getValue=this.processKeys,this.amount=eB.getProp(t,e.a,0,null,this),this._isAnimated=this.amount.effectsSequence.length>0}processPath(t,e){let s,i,r,a,n,o,h,l=e/100,p=[0,0],m=t._length;for(s=0;s<m;s++)p[0]+=t.v[s][0],p[1]+=t.v[s][1];p[0]/=m,p[1]/=m;let c=eO();for(s=0,c.c=t.c;s<m;s++)i=t.v[s][0]+(p[0]-t.v[s][0])*l,r=t.v[s][1]+(p[1]-t.v[s][1])*l,a=t.o[s][0]+-((p[0]-t.o[s][0])*l),n=t.o[s][1]+-((p[1]-t.o[s][1])*l),o=t.i[s][0]+-((p[0]-t.i[s][0])*l),h=t.i[s][1]+-((p[1]-t.i[s][1])*l),c.setTripleAt(i,r,a,n,o,h,s);return c}processShapes(t){let{length:e}=this.shapes,s=this.amount?.v;if(0!==s){let i,r,a;for(let n=0;n<e;n++){if(a=(r=this.shapes[n]).localShapeCollection,!(!r.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),r.shape&&(r.shape._mdf=!0),i=r.shape?.paths?.shapes;let t=r.shape?.paths?._length||0;for(let e=0;e<t;e++){let t=i?.[e];t&&a?.addShape(this.processPath(t,s||0))}}r.localShapeCollection&&r.shape&&(r.shape.paths=r.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}),sK(I.RepeaterModifier,class extends r2{addShapeToModifier(t){t.pathsData=[]}applyTransforms(t,e,s,i,r,a){if(!i.s||!i.p||!i.a||!i.r)throw Error(`${this.constructor.name}: Missing required data from Transform`);let n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-r),h=i.s.v[1]+(1-i.s.v[1])*(1-r);t.translate(i.p.v[0]*n*r,i.p.v[1]*n*r,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*r),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),s.scale(a?1/o:o,a?1/h:h),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])}changeGroupRender(t,e){let{length:s}=t;for(let i=0;i<s;i++)t[i]._render=e,t[i].ty===N.Group&&this.changeGroupRender(t[i].it,e)}cloneElements(t){let e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e}init(t,e,s,i=[]){if(!Array.isArray(e))throw TypeError(`${this.constructor.name}: Method init, param arr must be array`);let r=Number(s);for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r--,this._elements.unshift(e[r]);if(this.dynamicProperties.length>0){this.k=!0;return}this.getValue(!0)}initModifierProperties(t,e){this.getValue=this.processKeys,this.c=eB.getProp(t,e.c,0,null,this),this.o=eB.getProp(t,e.o,0,null,this),e.tr&&(this.tr=sy.getTransformProperty(t,e.tr,this),this.so=eB.getProp(t,e.tr.so,0,.01,this),this.eo=eB.getProp(t,e.tr.eo,0,.01,this)),this.data=e,0===this.dynamicProperties.length&&this.getValue(!0),this._isAnimated=this.dynamicProperties.length>0,this.pMatrix=new t5,this.rMatrix=new t5,this.sMatrix=new t5,this.tMatrix=new t5,this.matrix=new t5}processShapes(t){let e,s;if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);let i,r,a,n,o,h=!1;if(!this._mdf&&!t){for(o=Number(this._currentCopies),a=0,n=1;o;)(i=this.elemsData[a].it)[i.length-1].transform.mProps._mdf=!1,i[i.length-1].transform.op._mdf=!1,o--,a+=n;return h}let l=Math.ceil(Number(this.c?.v));if(this._groups.length<l){for(;this._groups.length<l;){let t={it:this.cloneElements(this._elements),ty:"gr"};t.it?.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{e:0,s:0,t:0},{e:0,s:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:N.Transform}),this.arr.splice(0,0,t),this._groups.splice(0,0,t),this._currentCopies?this._currentCopies++:this._currentCopies=1}this.elem?.reloadShapes(),h=!0}o=0;let p=this._groups.length-1;for(a=0;a<=p-1;a++){if(e=o<l,this._groups[a]&&(this._groups[a]._render=e),this.changeGroupRender(this._groups[a].it??[],e),!e){let t=this.elemsData[a].it,e=t[t.length-1];0===e.transform.op.v?e.transform.op._mdf=!1:(e.transform.op._mdf=!0,e.transform.op.v=0)}o++}if(this._currentCopies=l,!this.matrix||!this.pMatrix||!this.rMatrix||!this.sMatrix||!this.tMatrix)throw Error(`${this.constructor.name}: Could not set Matrix`);if(!this.tr)throw Error(`${this.constructor.name}: Transformproperty is not set`);let m=Number(this.o?.v),c=m%1,d=m>0?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,f=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();let y=0;if(m>0){for(;y<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),y++;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),y+=c)}else if(m<0){for(;y>d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),y--;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),y-=c)}for(a=1===this.data.m?0:this._currentCopies-1,n=1===this.data.m?1:-1,o=this._currentCopies;o;){let{length:t}=r=(i=this.elemsData[a].it)[i.length-1].transform.mProps.v.props;if(i[i.length-1].transform.mProps._mdf=!0,i[i.length-1].transform.op._mdf=!0,i[i.length-1].transform.op.v=1===this._currentCopies?Number(this.so?.v):Number(this.so?.v)+(Number(this.eo?.v)-Number(this.so?.v))*(a/(this._currentCopies-1)),0===y)for(this.matrix.reset(),s=0;s<t;s++)r[s]=this.matrix.props[s];else{for((0!==a&&1===n||a!==this._currentCopies-1&&-1===n)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),s=0;s<t;s++)r[s]=this.matrix.props[s];this.matrix.reset()}y++,o--,a+=n}return h}resetElements(t){let{length:e}=t;for(let s=0;s<e;s++){t[s]._processed=!1;let{it:e}=t[s];t[s].ty===N.Group&&e&&this.resetElements(e)}}constructor(...t){super(...t),this.arr=[],this.elemsData=[],this._elements=[],this._groups=[]}}),sK(I.RoundCornersModifier,class extends r2{initModifierProperties(t,e){this.getValue=this.processKeys,this.rd=eB.getProp(t,e.r,0,null,this),this._isAnimated=this.rd.effectsSequence.length>0}processPath(t,e){let s=eO();s.c=t.c;let i=t._length,r,a,n,o,h,l,p=0,m,c,d,u,f,g;for(let y=0;y<i;y++)r=t.v[y],n=t.o[y],a=t.i[y],r[0]===n[0]&&r[1]===n[1]&&r[0]===a[0]&&r[1]===a[1]?0!==y&&y!==i-1||t.c?(o=0===y?t.v[i-1]:t.v[y-1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,m=f=r[0]+(o[0]-r[0])*l,c=g=r[1]-(r[1]-o[1])*l,d=m-(m-r[0])*.5519,u=c-(c-r[1])*.5519,s.setTripleAt(m,c,d,u,f,g,p),p++,o=y===i-1?t.v[0]:t.v[y+1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,m=d=r[0]+(o[0]-r[0])*l,c=u=r[1]+(o[1]-r[1])*l,f=m-(m-r[0])*.5519,g=c-(c-r[1])*.5519,s.setTripleAt(m,c,d,u,f,g,p)):s.setTripleAt(r[0],r[1],n[0],n[1],a[0],a[1],p):s.setTripleAt(t.v[y][0],t.v[y][1],t.o[y][0],t.o[y][1],t.i[y][0],t.i[y][1],p),p++;return s}processShapes(t){let{length:e}=this.shapes,s=this.rd?.v;if(0!==s){let i,r,a;for(let n=0;n<e;n++){if(a=(i=this.shapes[n]).localShapeCollection,!(!i.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),i.shape&&(i.shape._mdf=!0),r=i.shape?.paths?.shapes??[];let t=i.shape?.paths?._length||0;for(let e=0;e<t;e++)a?.addShape(this.processPath(r[e],s))}i.shape&&(i.shape.paths=i.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}),sK(I.ZigZagModifier,class extends r2{initModifierProperties(t,e){this.getValue=this.processKeys,this.amplitude=eB.getProp(t,e.s,0,null,this),this.frequency=eB.getProp(t,e.r,0,null,this),this.pointsType=eB.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length>0||this.frequency.effectsSequence.length>0||this.pointsType.effectsSequence.length>0}processPath(t,e,s,i){let r=t._length,a=eO();if(a.c=t.c,t.c||(r-=1),0===r)return a;let n=-1,o=r1(t,0);ao(a,t,0,e,s,i,n);for(let h=0;h<r;h++)n=ah(a,o,e,s,i,-n),o=h!==r-1||t.c?r1(t,(h+1)%r):null,ao(a,t,h+1,e,s,i,n);return a}processShapes(t){let e=Number(this.amplitude?.v),s=Math.max(0,Math.round(Number(this.frequency?.v))),i=Number(this.pointsType?.v);if(0!==e){let r,a,n,{length:o}=this.shapes;for(let h=0;h<o;h++){if(a=(r=this.shapes[h]).localShapeCollection,!(!r.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),r.shape&&(r.shape._mdf=!0),n=r.shape?.paths?.shapes??[];let{_length:t}=r.shape?.paths??{_length:0};for(let r=0;r<t;r++)a?.addShape(this.processPath(n[r],e,s,i))}r.shape&&(r.shape.paths=r.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}),sK(I.OffsetPathModifier,class extends r2{initModifierProperties(t,e){this.getValue=this.processKeys,this.amount=eB.getProp(t,e.a,0,null,this),this.miterLimit=eB.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length>0}processPath(t,e,s,i){let r=eO();r.c=t.c;let a=t.length();t.c||(a-=1);let n,o=[];for(let s=0;s<a;s++)n=r1(t,s),o.push(at(n,e));if(!t.c)for(let s=a-1;s>=0;s--)n=function(t,e){let s=(e+1)%t.length();return new r0(t.v[s],t.i[s],t.o[e],t.v[e],!0)}(t,s),o.push(at(n,e));o=ai(o);let h=null,l=null,{length:p}=o;for(let t=0;t<p;t++){let e=o[t];l&&(h=r8(r,l,e[0],s,i)),l=e[e.length-1];let{length:a}=e;for(let t=0;t<a;t++)n=e[t],h&&X(n.points[0],h)?r.setXYAt(n.points[1][0],n.points[1][1],"o",r.length()-1):r.setTripleAt(n.points[0][0],n.points[0][1],n.points[1][0],n.points[1][1],n.points[0][0],n.points[0][1],r.length()),r.setTripleAt(n.points[3][0],n.points[3][1],n.points[3][0],n.points[3][1],n.points[2][0],n.points[2][1],r.length()),h=n.points[3]}return p>0&&l&&r8(r,l,o[0][0],s,i),r}processShapes(t){let{length:e}=this.shapes,s=Number(this.amount?.v),i=Number(this.miterLimit?.v),r=Number(this.lineJoin);if(0!==s){let a,n,o;for(let h=0;h<e;h++){if(o=(n=this.shapes[h]).localShapeCollection,!(!n.shape?._mdf&&!this._mdf&&!t)){o?.releaseShapes(),n.shape&&(n.shape._mdf=!0),a=n.shape?.paths?.shapes;let t=n.shape?.paths?._length||0;for(let e=0;e<t;e++){let t=a?.[e];t&&o?.addShape(this.processPath(t,s,r,i))}}n.shape&&(n.shape.paths=n.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}),tI.plugin={initExpressions:function(t){let e=0,s=[];if(!t.renderer.globalData)throw Error("Renderer -> GlobalData is not set");t.renderer.compInterface=new rx(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e++},t.renderer.globalData.popExpression=function(){0==--e&&function(){let{length:t}=s;for(let e=0;e<t;e++)s[e].release?.();s.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){s.includes(t)||s.push(t)}},resetFrame:rw},tI.interface=function(t){return rj[t]},function(){let{getTransformProperty:t}=sy;sy.getTransformProperty=function(e,s,i){let r=t(e,s,i);return r.dynamicProperties.length>0?r.getValueAtTime=ry.bind(r):r.getValueAtTime=rb.bind(r),r.setGroupProperty=rm.setGroupProperty,r};let e=eB.getProp;eB.getProp=function(t,s,i,r,a){let n=e(t,s,i,r,a);n.kf?n.getValueAtTime=rm.getValueAtTime.bind(n):n.getValueAtTime=rm.getStaticValueAtTime.bind(n),n.setGroupProperty=rm.setGroupProperty,n.loopOut=ru,n.loopIn=rf,n.smooth=rg,n.getVelocityAtTime=rm.getVelocityAtTime.bind(n),n.getSpeedAtTime=rm.getSpeedAtTime.bind(n),n.numKeys=s?.a===1?s.k.length:0,n.propertyIndex=s?.ix;let o=0;return 0!==i&&(o=t2(F.Float32,s?.a===1?s.k[0].s.length:(s?.k).length)),n._cachingAtTime={lastFrame:-999999,lastIndex:0,value:o},rm.searchExpressions(t,s,n),n.k&&a?.addDynamicProperty(n),n};let s=eQ.getConstructorFunction(),i=eQ.getKeyframedConstructorFunction();rd([rc],s),rd([rc],i),i.prototype.getValueAtTime=rv,i.prototype.initiateExpression=rp.initiateExpression;let r=eQ.getShapeProp;eQ.getShapeProp=function(t,e,s,i,a){let n=r(t,e,s,i,a);return n&&(n.propertyIndex=e.ix,n.lock=!1,3===s?rm.searchExpressions(t,e.pt,n):4===s&&rm.searchExpressions(t,e.ks,n),n.k&&t.addDynamicProperty(n)),n}}(),id.prototype.getExpressionValue=function(t,e){let s=this.calculateExpression(e);if(t.t!==s){let e={};return this.copyData(e,t),e.t=s.toString(),e.__complete=!1,e}return t},id.prototype.searchProperty=function(){let t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=!!(t||e),this.kf},id.prototype.searchExpressions=function(){return this.data.d?.x?(this.calculateExpression=rp.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null},eo(20,class extends t6{constructor(t,e,s,i,r){super(),this.filterManager=e;let a=tz("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",`${et} 1 0`),this.linearFilter=a,a.setAttribute("result",`${i}_tint_1`),t.appendChild(a),(a=tz("feColorMatrix")).setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",`${i}_tint_2`),t.appendChild(a),this.matrixFilter=a;let n=this.createMergeNode(i,[r,`${i}_tint_1`,`${i}_tint_2`]);t.appendChild(n)}renderFrame(t){if(!t&&!this.filterManager._mdf)return;let e=this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",`${et} ${i} 0`),this.matrixFilter.setAttribute("values",`${s[0]-e[0]} 0 0 0 ${e[0]} ${s[1]-e[1]} 0 0 0 ${e[1]} ${s[2]-e[2]} 0 0 0 ${e[2]} 0 0 0 1 0`)}},!0),eo(21,class{constructor(t,e,s,i){this.filterManager=e;let r=tz("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",i),t.appendChild(r),this.matrixFilter=r}renderFrame(t){if(!t&&!this.filterManager._mdf)return;let e=this.filterManager.effectElements[2].p.v,s=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values",`0 0 0 0 ${e[0]} 0 0 0 0 ${e[1]} 0 0 0 0 ${e[2]} 0 0 0 ${s} 0`)}},!0),eo(22,class{constructor(t,e,s){this.initialized=!1,this.filterManager=e,this.elem=s,this.paths=[]}initialize(){let t,e,s,i=[...this.elem.layerElement?.children??this.elem.layerElement?.childNodes??[]];1===this.filterManager.effectElements[1].p.v?(s=this.elem.maskManager?.masksProperties.length||0,e=0):s=(e=this.filterManager.effectElements[0].p.v-1)+1;let r=tz("g");for(r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-dashoffset","1");e<s;e++)t=tz("path"),r.appendChild(t),this.paths.push({m:e,p:t});if(3===this.filterManager.effectElements[10].p.v){let t=tz("mask"),e=Z();t.id=e,t.setAttribute("mask-type","alpha"),t.appendChild(r),this.elem.globalData?.defs.appendChild(t);let s=tz("g");for(s.setAttribute("mask",`url(${t7()}#${e})`);i[0];)s.appendChild(i[0]);this.elem.layerElement?.appendChild(s),this.masker=t,r.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(i=[...this.elem.layerElement?.children??this.elem.layerElement?.childNodes??[]];i.length>0;)this.elem.layerElement?.removeChild(i[0]);this.elem.layerElement?.appendChild(r),this.elem.layerElement?.removeAttribute("mask"),r.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=r}renderFrame(t){let e,s;this.initialized||this.initialize();let{length:i}=this.paths;for(let r=0;r<i;r++)if(-1!==this.paths[r].m&&(e=this.elem.maskManager?.viewData[this.paths[r].m],s=this.paths[r].p,e&&(t||this.filterManager._mdf||e.prop?._mdf)&&s.setAttribute("d",e.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||e?.prop?._mdf)){let t;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){let e=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),i=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),r=s.getTotalLength();t=`0 0 0 ${r*e} `;let a=Math.floor(r*(i-e)/(1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01));for(let e=0;e<a;e++)t+=`1 ${2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01} `;t+=`0 ${10*r} 0 0`}else t=`1 ${2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01}`;s.setAttribute("stroke-dasharray",t)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker?.setAttribute("stroke-width",`${2*this.filterManager.effectElements[4].p.v}`),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker?.setAttribute("opacity",`${Number(this.filterManager.effectElements[6].p.v)}`),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){let t=this.filterManager.effectElements[3].p.v;this.pathMasker?.setAttribute("stroke",`rgb(${Math.floor(255*t[0])},${Math.floor(255*t[1])},${255*t[2]})`)}}},!1),eo(23,class{constructor(t,e,s,i){this.filterManager=e;let r=tz("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),t.appendChild(r);let a=tz("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",i),this.matrixFilter=a;let n=tz("feFuncR");n.setAttribute("type","table"),a.appendChild(n),this.feFuncR=n;let o=tz("feFuncG");o.setAttribute("type","table"),a.appendChild(o),this.feFuncG=o;let h=tz("feFuncB");h.setAttribute("type","table"),a.appendChild(h),this.feFuncB=h,t.appendChild(a)}renderFrame(t){if(!t&&!this.filterManager._mdf)return;let e=this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,r=`${i[0]} ${s[0]} ${e[0]}`,a=`${i[1]} ${s[1]} ${e[1]}`,n=`${i[2]} ${s[2]} ${e[2]}`;this.feFuncR.setAttribute("tableValues",r),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},!0),eo(24,class{constructor(t,e,s,i){this.filterManager=e;let{effectElements:r}=this.filterManager,a=tz("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",a)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",a)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",a)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",a)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(a.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(a)),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&((a=tz("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",i),t.appendChild(a),this.feFuncRComposed=this.createFeFunc("feFuncR",a),this.feFuncGComposed=this.createFeFunc("feFuncG",a),this.feFuncBComposed=this.createFeFunc("feFuncB",a))}createFeFunc(t,e){let s=tz(t);return s.setAttribute("type","table"),e.appendChild(s),s}getTableValue(t,e,s,i,r){let a,n=0,o=Math.min(t,e),h=Math.max(t,e),l=t3(256),p,m=0,c=r-i,d=e-t;for(;n<=256;)p=(a=n/256)<=o?d<0?r:i:a>=h?d<0?i:r:i+c*Math.pow((a-t)/d,1/s),l[m]=p,m++,n+=256/255;return l.join(" ")}renderFrame(t){let e;if(!t&&!this.filterManager._mdf)return;let{effectElements:s}=this.filterManager;this.feFuncRComposed&&(t||s[3].p._mdf||s[4].p._mdf||s[5].p._mdf||s[6].p._mdf||s[7].p._mdf)&&(e=this.getTableValue(s[3].p.v,s[4].p.v,s[5].p.v,s[6].p.v,s[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed?.setAttribute("tableValues",e),this.feFuncBComposed?.setAttribute("tableValues",e)),this.feFuncR&&(t||s[10].p._mdf||s[11].p._mdf||s[12].p._mdf||s[13].p._mdf||s[14].p._mdf)&&(e=this.getTableValue(s[10].p.v,s[11].p.v,s[12].p.v,s[13].p.v,s[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||s[17].p._mdf||s[18].p._mdf||s[19].p._mdf||s[20].p._mdf||s[21].p._mdf)&&(e=this.getTableValue(s[17].p.v,s[18].p.v,s[19].p.v,s[20].p.v,s[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||s[24].p._mdf||s[25].p._mdf||s[26].p._mdf||s[27].p._mdf||s[28].p._mdf)&&(e=this.getTableValue(s[24].p.v,s[25].p.v,s[26].p.v,s[27].p.v,s[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||s[31].p._mdf||s[32].p._mdf||s[33].p._mdf||s[34].p._mdf||s[35].p._mdf)&&(e=this.getTableValue(s[31].p.v,s[32].p.v,s[33].p.v,s[34].p.v,s[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},!0),eo(25,class extends t6{constructor(t,e,s,i,r){super();let a=(e.container?.globalData?.renderConfig).filterSize,n=e.data?.fs??a??{height:"100%",width:"100%",x:"0%",y:"0%"};t.setAttribute("x",n.x),t.setAttribute("y",n.y),t.setAttribute("width",n.width),t.setAttribute("height",n.height),this.filterManager=e;let o=tz("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",`${i}_drop_shadow_1`),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,t.appendChild(o);let h=tz("feOffset");h.dx.baseVal=25,h.dy.baseVal=0,h.setAttribute("in",`${i}_drop_shadow_1`),h.setAttribute("result",`${i}_drop_shadow_2`),this.feOffset=h,t.appendChild(h);let l=tz("feFlood");l.setAttribute("flood-color","#00ff00"),l.setAttribute("flood-opacity","1"),l.setAttribute("result",`${i}_drop_shadow_3`),this.feFlood=l,t.appendChild(l);let p=tz("feComposite");p.setAttribute("in",`${i}_drop_shadow_3`),p.in2.baseVal=`${i}_drop_shadow_2`,p.setAttribute("operator","in"),p.result.baseVal=`${i}_drop_shadow_4`,t.appendChild(p);let m=this.createMergeNode(i,[`${i}_drop_shadow_4`,r]);t.appendChild(m)}renderFrame(t){if(t||this.filterManager._mdf){if(t||this.filterManager.effectElements[4].p._mdf){let t=this.filterManager.effectElements[4].p.v/4;this.feGaussianBlur.setStdDeviation(t,t)}if(t||this.filterManager.effectElements[0].p._mdf){let t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",tr(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",`${this.filterManager.effectElements[1].p.v/255}`),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){let t=this.filterManager.effectElements[3].p.v,e=(this.filterManager.effectElements[2].p.v-90)*t1,s=t*Math.cos(e),i=t*Math.sin(e);this.feOffset.dx.baseVal=s,this.feOffset.dy.baseVal=i}}}},!0),eo(28,class{constructor(t,e,s){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=s,s.matteElement=tz("g"),s.layerElement&&s.matteElement.appendChild(s.layerElement),s.transformedElement&&s.matteElement.appendChild(s.transformedElement),s.baseElement=s.matteElement}findSymbol(t){let e=0,{length:s}=t9;for(;e<s;){if(t9[e]===t)return t9[e];e++}return null}initialize(){let t=this.filterManager.effectElements[0].p.v,e=this.elem.comp?.elements??[],s=0,{length:i}=e;for(;s<i;)e[s]&&e[s].data.ind===t&&this.setElementAsMask(this.elem,e[s]),s++;this.initialized=!0}renderFrame(t){this.initialized||this.initialize()}replaceInParent(t,e){let s,i=t.layerElement?.parentNode;if(!i)return;let{children:r}=i,a=0,{length:n}=r;for(;a<n&&r[a]!==t.layerElement;)a++;a<=n-2&&(s=r[a+1]);let o=tz("use");o.setAttribute("href",`#${e}`),s?i.insertBefore(o,s):i.appendChild(o)}setElementAsMask(t,e){if(!this.findSymbol(e)){let s=Z(),i=tz("mask");e.layerId&&(i.id=e.layerId),i.setAttribute("mask-type","alpha"),t9.push(e);let{defs:r}=t.globalData??{defs:null};r?.appendChild(i);let a=tz("symbol");a.id=s,this.replaceInParent(e,s),e.layerElement&&a.appendChild(e.layerElement),r?.appendChild(a);let n=tz("use");n.href.baseVal=`#${s}`,i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId||"")}},!1),eo(29,class{constructor(t,e,s,i){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;let r=tz("feGaussianBlur");r.setAttribute("result",i),t.appendChild(r),this.feGaussianBlur=r}renderFrame(t){if(!t&&!this.filterManager._mdf)return;let e=.3*this.filterManager.effectElements[0].p.v,s=Number(this.filterManager.effectElements[1].p.v);this.feGaussianBlur.setAttribute("stdDeviation",`${3===s?0:e} ${2===s?0:e}`);let i=1===Number(this.filterManager.effectElements[2].p.v)?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",i)}},!0),eo(35,class extends t4{constructor(t,e){super(),this.init(e)}},!1),f=class extends t4{constructor(t){super(),this.init(t)}},ee[35]={countsAsEffect:void 0,effect:f};let am=Symbol("UPDATE_ON_CONNECTED");a()&&(global.HTMLElement=class{});class ac extends HTMLElement{constructor(){super(),am in this&&(this[am]=[]);let{observedProperties:t=[]}=this.constructor,{length:e}=t;for(let s=0;s<e;s++){let e=this[t[s]],i=Symbol(t[s]);this[i]=e,Object.defineProperty(this,t[s],{get(){return this[i]},set(e){let r=this[i];this[i]=e,this.propertyChangedCallback(t[s],r,e)}}),void 0!==e&&am in this&&Array.isArray(this[am])&&this[am].push(t[s])}}async connectedCallback(){let t=[];am in this&&Array.isArray(this[am])&&(t=this[am]);let{length:e}=t;for(let s=0;s<e;s++)"propertyChangedCallback"in this&&"function"==typeof this.propertyChangedCallback&&t[s]in this&&this.propertyChangedCallback(t[s],void 0,this[t[s]])}propertyChangedCallback(t,e,s){throw Error(`${this.constructor.name}: Method propertyChangedCallback is not implemented`)}}var ad=((g={}).Contain="contain",g.Cover="cover",g.Fill="fill",g.None="none",g.ScaleDown="scale-down",g),au=((y={}).Completed="completed",y.Destroyed="destroyed",y.Error="error",y.Frozen="frozen",y.Loading="loading",y.Paused="paused",y.Playing="playing",y.Stopped="stopped",y),af=((b={}).Bounce="bounce",b.Normal="normal",b),ag=((v={}).Complete="complete",v.Destroyed="destroyed",v.Error="error",v.Frame="frame",v.Freeze="freeze",v.Load="load",v.Loop="loop",v.Next="next",v.Pause="pause",v.Play="play",v.Previous="previous",v.Ready="ready",v.Rendered="rendered",v.Stop="stop",v),ay=((x={}).Contain="xMidYMid meet",x.Cover="xMidYMid slice",x.Initial="none",x.None="xMinYMin slice",x),ab=((w={}).Canvas="canvas",w.HTML="html",w.SVG="svg",w);function av(){if(!this.shadow)throw Error("No Shadow Element");let t=this.shadow.querySelector("slot[name=controls]");if(!t)return;if(!this.controls){t.innerHTML="";return}t.innerHTML=`<div class="lottie-controls toolbar ${this.playerState===au.Error?"has-error":""}" aria-label="Lottie Animation controls"><button class="togglePlay" data-active="false" aria-label="Toggle Play/Pause"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M8.016 5.016L18.985 12 8.016 18.984V5.015z"/></svg></button> <button class="stop" data-active="true" aria-label="Stop"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M6 6h12v12H6V6z"/></svg></button> <button class="prev" aria-label="Previous animation" hidden><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.9 18.2 8.1 12l9.8-6.2v12.4zm-10.3 0H6.1V5.8h1.5v12.4z"/></svg></button> <button class="next" aria-label="Next animation" hidden><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="m6.1 5.8 9.8 6.2-9.8 6.2V5.8zM16.4 5.8h1.5v12.4h-1.5z"/></svg></button><form class="progress-container${this.simple?" simple":""}"><input class="seeker" type="range" min="0" max="100" step="1" value="${this._seeker.toString()}" aria-valuemin="0" aria-valuemax="100" role="slider" aria-valuenow="${this._seeker.toString()}" tabindex="0" aria-label="Slider for search"><progress max="100" value="${this._seeker}"></progress></form>${this.simple?"":`<button class="toggleLoop" data-active="${this.loop}" tabindex="0" aria-label="Toggle loop"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"/></svg></button> <button class="toggleBoomerang" data-active="${this.mode===af.Bounce}" aria-label="Toggle boomerang" tabindex="0"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="m11.8 13.2-.3.3c-.5.5-1.1 1.1-1.7 1.5-.5.4-1 .6-1.5.8-.5.2-1.1.3-1.6.3s-1-.1-1.5-.3c-.6-.2-1-.5-1.4-1-.5-.6-.8-1.2-.9-1.9-.2-.9-.1-1.8.3-2.6.3-.7.8-1.2 1.3-1.6.3-.2.6-.4 1-.5.2-.2.5-.2.8-.3.3 0 .7-.1 1 0 .3 0 .6.1.9.2.9.3 1.7.9 2.4 1.5.4.4.8.7 1.1 1.1l.1.1.4-.4c.6-.6 1.2-1.2 1.9-1.6.5-.3 1-.6 1.5-.7.4-.1.7-.2 1-.2h.9c1 .1 1.9.5 2.6 1.4.4.5.7 1.1.8 1.8.2.9.1 1.7-.2 2.5-.4.9-1 1.5-1.8 2-.4.2-.7.4-1.1.4-.4.1-.8.1-1.2.1-.5 0-.9-.1-1.3-.3-.8-.3-1.5-.9-2.1-1.5-.4-.4-.8-.7-1.1-1.1h-.3zm-1.1-1.1c-.1-.1-.1-.1 0 0-.3-.3-.6-.6-.8-.9-.5-.5-1-.9-1.6-1.2-.4-.3-.8-.4-1.3-.4-.4 0-.8 0-1.1.2-.5.2-.9.6-1.1 1-.2.3-.3.7-.3 1.1 0 .3 0 .6.1.9.1.5.4.9.8 1.2.5.4 1.1.5 1.7.5.5 0 1-.2 1.5-.5.6-.4 1.1-.8 1.6-1.3.1-.3.3-.5.5-.6zM13 12c.5.5 1 1 1.5 1.4.5.5 1.1.9 1.9 1 .4.1.8 0 1.2-.1.3-.1.6-.3.9-.5.4-.4.7-.9.8-1.4.1-.5 0-.9-.1-1.4-.3-.8-.8-1.2-1.7-1.4-.4-.1-.8-.1-1.2 0-.5.1-1 .4-1.4.7-.5.4-1 .8-1.4 1.2-.2.2-.4.3-.5.5z"/></svg></button> <button class="toggleSettings" aria-label="Settings" aria-haspopup="true" aria-expanded="${!!this._isSettingsOpen}" aria-controls="${this._identifier}-settings"><svg width="24" height="24" aria-hidden="true" focusable="false"><circle cx="12" cy="5.4" r="2.5"/><circle cx="12" cy="12" r="2.5"/><circle cx="12" cy="18.6" r="2.5"/></svg></button><div id="${this._identifier}-settings" class="popover" hidden><button class="convert" aria-label="Convert JSON animation to dotLottie format" hidden><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"/></svg> Convert to dotLottie</button> <button class="snapshot" aria-label="Download still image"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M16.8 10.8 12 15.6l-4.8-4.8h3V3.6h3.6v7.2h3zM12 15.6H3v4.8h18v-4.8h-9zm7.8 2.4h-2.4v-1.2h2.4V18z"/></svg> Download still image</button></div>`}</div>`;let e=this.shadow.querySelector(".togglePlay");e instanceof HTMLButtonElement&&(e.onclick=this.togglePlay);let s=this.shadow.querySelector(".stop");s instanceof HTMLButtonElement&&(s.onclick=this.stop);let i=this.shadow.querySelector(".prev");i instanceof HTMLButtonElement&&(i.onclick=this.prev);let r=this.shadow.querySelector(".next");r instanceof HTMLButtonElement&&(r.onclick=this.next);let a=this.shadow.querySelector(".seeker");if(a instanceof HTMLInputElement&&(a.onchange=this._handleSeekChange,a.onmousedown=this._freeze),!this.simple){let t=this.shadow.querySelector(".toggleLoop");t instanceof HTMLButtonElement&&(t.onclick=this.toggleLoop);let e=this.shadow.querySelector(".toggleBoomerang");e instanceof HTMLButtonElement&&(e.onclick=this.toggleBoomerang);let s=this.shadow.querySelector(".convert");s instanceof HTMLButtonElement&&(s.onclick=this.convert);let i=this.shadow.querySelector(".snapshot");i instanceof HTMLButtonElement&&(i.onclick=()=>this.snapshot(!0));let r=this.shadow.querySelector(".toggleSettings");r instanceof HTMLButtonElement&&(r.onclick=this._handleSettingsClick,r.onblur=this._handleBlur)}}async function ax(){if(!this.shadow)throw Error("No Shadow Element");this.template.innerHTML=`<div class="animation-container main" data-controls="${this.controls??!1}" lang="${this.description?document.documentElement.lang:"en"}" aria-label="${this.description??"Lottie animation"}" data-loaded="${this._playerState.loaded}"><figure class="animation" style="background:${this.background}">${this.playerState===au.Error?`<div class="error"><svg preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="1920" height="1080" viewBox="0 0 1920 1080"><path fill="#fff" d="M0 0h1920v1080H0z"/><path fill="#3a6d8b" d="M1190.2 531 1007 212.4c-22-38.2-77.2-38-98.8.5L729.5 531.3c-21.3 37.9 6.1 84.6 49.5 84.6l361.9.3c43.7 0 71.1-47.3 49.3-85.2zM937.3 288.7c.2-7.5 3.3-23.9 23.2-23.9 16.3 0 23 16.1 23 23.5 0 55.3-10.7 197.2-12.2 214.5-.1 1-.9 1.7-1.9 1.7h-18.3c-1 0-1.8-.7-1.9-1.7-1.4-17.5-13.4-162.9-11.9-214.1zm24.2 283.8c-13.1 0-23.7-10.6-23.7-23.7s10.6-23.7 23.7-23.7 23.7 10.6 23.7 23.7-10.6 23.7-23.7 23.7zM722.1 644h112.6v34.4h-70.4V698h58.8v31.7h-58.8v22.6h72.4v36.2H722.1V644zm162 57.1h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6zm78.9 0h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5H963v15.6zm39.5 36.2c0-31.3 22.2-54.8 56.6-54.8 34.4 0 56.2 23.5 56.2 54.8s-21.8 54.6-56.2 54.6c-34.4-.1-56.6-23.3-56.6-54.6zm74 0c0-17.4-6.1-29.1-17.8-29.1-11.7 0-17.4 11.7-17.4 29.1 0 17.4 5.7 29.1 17.4 29.1s17.8-11.8 17.8-29.1zm83.1-36.2h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6z"/><path fill="none" d="M718.9 807.7h645v285.4h-645z"/><text fill="#3a6d8b" style="text-align:center;position:absolute;left:100%;font-size:47px;font-family:system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',sans-serif" x="50%" y="848.017" text-anchor="middle">${this._errorMessage}</text></svg></div>`:""}</figure><slot name="controls"></slot></div>`,this.shadow.adoptedStyleSheets=[await n3.styles()],this.shadow.appendChild(this.template.content.cloneNode(!0))}var aw={},a_=function(t,e,s,i,r){var a=new Worker(aw[e]||(aw[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(t){var e=t.data,s=e.$e$;if(s){var i=Error(s[0]);i.code=s[1],i.stack=s[2],r(i,null)}else r(null,e)},a.postMessage(s,i),a},aE=Uint8Array,aC=Uint16Array,aS=Int32Array,aM=new aE([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ak=new aE([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),aP=new aE([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),aA=function(t,e){for(var s=new aC(31),i=0;i<31;++i)s[i]=e+=1<<t[i-1];for(var r=new aS(s[30]),i=1;i<30;++i)for(var a=s[i];a<s[i+1];++a)r[a]=a-s[i]<<5|i;return{b:s,r:r}},aD=aA(aM,2),aT=aD.b,aF=aD.r;aT[28]=258,aF[258]=28;for(var aI=aA(ak,0),a$=aI.b,aL=aI.r,aN=new aC(32768),aB=0;aB<32768;++aB){var aR=(43690&aB)>>1|(21845&aB)<<1;aR=(61680&(aR=(52428&aR)>>2|(13107&aR)<<2))>>4|(3855&aR)<<4,aN[aB]=((65280&aR)>>8|(255&aR)<<8)>>1}for(var aV=function(t,e,s){for(var i,r=t.length,a=0,n=new aC(e);a<r;++a)t[a]&&++n[t[a]-1];var o=new aC(e);for(a=1;a<e;++a)o[a]=o[a-1]+n[a-1]<<1;if(s){i=new aC(1<<e);var h=15-e;for(a=0;a<r;++a)if(t[a])for(var l=a<<4|t[a],p=e-t[a],m=o[t[a]-1]++<<p,c=m|(1<<p)-1;m<=c;++m)i[aN[m]>>h]=l}else for(a=0,i=new aC(r);a<r;++a)t[a]&&(i[a]=aN[o[t[a]-1]++]>>15-t[a]);return i},az=new aE(288),aB=0;aB<144;++aB)az[aB]=8;for(var aB=144;aB<256;++aB)az[aB]=9;for(var aB=256;aB<280;++aB)az[aB]=7;for(var aB=280;aB<288;++aB)az[aB]=8;for(var aO=new aE(32),aB=0;aB<32;++aB)aO[aB]=5;var aG=aV(az,9,0),aq=aV(az,9,1),aj=aV(aO,5,0),aW=aV(aO,5,1),aH=function(t){for(var e=t[0],s=1;s<t.length;++s)t[s]>e&&(e=t[s]);return e},aY=function(t,e,s){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(7&e)&s},aU=function(t,e){var s=e/8|0;return(t[s]|t[s+1]<<8|t[s+2]<<16)>>(7&e)},aJ=function(t){return(t+7)/8|0},aX=function(t,e,s){return(null==e||e<0)&&(e=0),(null==s||s>t.length)&&(s=t.length),new aE(t.subarray(e,s))},aZ=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],aK=function(t,e,s){var i=Error(e||aZ[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,aK),!s)throw i;return i},aQ=function(t,e,s,i){var r=t.length,a=i?i.length:0;if(!r||e.f&&!e.l)return s||new aE(0);var n=!s,o=n||2!=e.i,h=e.i;n&&(s=new aE(3*r));var l=function(t){var e=s.length;if(t>e){var i=new aE(Math.max(2*e,t));i.set(s),s=i}},p=e.f||0,m=e.p||0,c=e.b||0,d=e.l,u=e.d,f=e.m,g=e.n,y=8*r;do{if(!d){p=aY(t,m,1);var b=aY(t,m+1,3);if(m+=3,b)if(1==b)d=aq,u=aW,f=9,g=5;else if(2==b){var v=aY(t,m,31)+257,x=aY(t,m+10,15)+4,w=v+aY(t,m+5,31)+1;m+=14;for(var _=new aE(w),E=new aE(19),C=0;C<x;++C)E[aP[C]]=aY(t,m+3*C,7);m+=3*x;for(var S=aH(E),M=(1<<S)-1,k=aV(E,S,1),C=0;C<w;){var P=k[aY(t,m,M)];m+=15&P;var A=P>>4;if(A<16)_[C++]=A;else{var D=0,T=0;for(16==A?(T=3+aY(t,m,3),m+=2,D=_[C-1]):17==A?(T=3+aY(t,m,7),m+=3):18==A&&(T=11+aY(t,m,127),m+=7);T--;)_[C++]=D}}var F=_.subarray(0,v),I=_.subarray(v);f=aH(F),g=aH(I),d=aV(F,f,1),u=aV(I,g,1)}else aK(1);else{var A=aJ(m)+4,$=t[A-4]|t[A-3]<<8,L=A+$;if(L>r){h&&aK(0);break}o&&l(c+$),s.set(t.subarray(A,L),c),e.b=c+=$,e.p=m=8*L,e.f=p;continue}if(m>y){h&&aK(0);break}}o&&l(c+131072);for(var N=(1<<f)-1,B=(1<<g)-1,R=m;;R=m){var D=d[aU(t,m)&N],V=D>>4;if((m+=15&D)>y){h&&aK(0);break}if(D||aK(2),V<256)s[c++]=V;else if(256==V){R=m,d=null;break}else{var z=V-254;if(V>264){var C=V-257,O=aM[C];z=aY(t,m,(1<<O)-1)+aT[C],m+=O}var G=u[aU(t,m)&B],q=G>>4;G||aK(3),m+=15&G;var I=a$[q];if(q>3){var O=ak[q];I+=aU(t,m)&(1<<O)-1,m+=O}if(m>y){h&&aK(0);break}o&&l(c+131072);var j=c+z;if(c<I){var W=a-I,H=Math.min(I,j);for(W+c<0&&aK(3);c<H;++c)s[c]=i[W+c]}for(;c<j;++c)s[c]=s[c-I]}}e.l=d,e.p=R,e.b=c,e.f=p,d&&(p=1,e.m=f,e.d=u,e.n=g)}while(!p);return c!=s.length&&n?aX(s,0,c):s.subarray(0,c)},a0=function(t,e,s){s<<=7&e;var i=e/8|0;t[i]|=s,t[i+1]|=s>>8},a1=function(t,e,s){s<<=7&e;var i=e/8|0;t[i]|=s,t[i+1]|=s>>8,t[i+2]|=s>>16},a2=function(t,e){for(var s=[],i=0;i<t.length;++i)t[i]&&s.push({s:i,f:t[i]});var r=s.length,a=s.slice();if(!r)return{t:a7,l:0};if(1==r){var n=new aE(s[0].s+1);return n[s[0].s]=1,{t:n,l:1}}s.sort(function(t,e){return t.f-e.f}),s.push({s:-1,f:25001});var o=s[0],h=s[1],l=0,p=1,m=2;for(s[0]={s:-1,f:o.f+h.f,l:o,r:h};p!=r-1;)o=s[s[l].f<s[m].f?l++:m++],h=s[l!=p&&s[l].f<s[m].f?l++:m++],s[p++]={s:-1,f:o.f+h.f,l:o,r:h};for(var c=a[0].s,i=1;i<r;++i)a[i].s>c&&(c=a[i].s);var d=new aC(c+1),u=a3(s[p-1],d,0);if(u>e){var i=0,f=0,g=u-e,y=1<<g;for(a.sort(function(t,e){return d[e.s]-d[t.s]||t.f-e.f});i<r;++i){var b=a[i].s;if(d[b]>e)f+=y-(1<<u-d[b]),d[b]=e;else break}for(f>>=g;f>0;){var v=a[i].s;d[v]<e?f-=1<<e-d[v]++-1:++i}for(;i>=0&&f;--i){var x=a[i].s;d[x]==e&&(--d[x],++f)}u=e}return{t:new aE(d),l:u}},a3=function(t,e,s){return -1==t.s?Math.max(a3(t.l,e,s+1),a3(t.r,e,s+1)):e[t.s]=s},a5=function(t){for(var e=t.length;e&&!t[--e];);for(var s=new aC(++e),i=0,r=t[0],a=1,n=function(t){s[i++]=t},o=1;o<=e;++o)if(t[o]==r&&o!=e)++a;else{if(!r&&a>2){for(;a>138;a-=138)n(32754);a>2&&(n(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(n(r),--a;a>6;a-=6)n(8304);a>2&&(n(a-3<<5|8208),a=0)}for(;a--;)n(r);a=1,r=t[o]}return{c:s.subarray(0,i),n:e}},a4=function(t,e){for(var s=0,i=0;i<e.length;++i)s+=t[i]*e[i];return s},a6=function(t,e,s){var i=s.length,r=aJ(e+2);t[r]=255&i,t[r+1]=i>>8,t[r+2]=255^t[r],t[r+3]=255^t[r+1];for(var a=0;a<i;++a)t[r+a+4]=s[a];return(r+4+i)*8},a9=function(t,e,s,i,r,a,n,o,h,l,p){a0(e,p++,s),++r[256];for(var m,c,d,u,f=a2(r,15),g=f.t,y=f.l,b=a2(a,15),v=b.t,x=b.l,w=a5(g),_=w.c,E=w.n,C=a5(v),S=C.c,M=C.n,k=new aC(19),P=0;P<_.length;++P)++k[31&_[P]];for(var P=0;P<S.length;++P)++k[31&S[P]];for(var A=a2(k,7),D=A.t,T=A.l,F=19;F>4&&!D[aP[F-1]];--F);var I=l+5<<3,$=a4(r,az)+a4(a,aO)+n,L=a4(r,g)+a4(a,v)+n+14+3*F+a4(k,D)+2*k[16]+3*k[17]+7*k[18];if(h>=0&&I<=$&&I<=L)return a6(e,p,t.subarray(h,h+l));if(a0(e,p,1+(L<$)),p+=2,L<$){m=aV(g,y,0),c=g,d=aV(v,x,0),u=v;var N=aV(D,T,0);a0(e,p,E-257),a0(e,p+5,M-1),a0(e,p+10,F-4),p+=14;for(var P=0;P<F;++P)a0(e,p+3*P,D[aP[P]]);p+=3*F;for(var B=[_,S],R=0;R<2;++R)for(var V=B[R],P=0;P<V.length;++P){var z=31&V[P];a0(e,p,N[z]),p+=D[z],z>15&&(a0(e,p,V[P]>>5&127),p+=V[P]>>12)}}else m=aG,c=az,d=aj,u=aO;for(var P=0;P<o;++P){var O=i[P];if(O>255){var z=O>>18&31;a1(e,p,m[z+257]),p+=c[z+257],z>7&&(a0(e,p,O>>23&31),p+=aM[z]);var G=31&O;a1(e,p,d[G]),p+=u[G],G>3&&(a1(e,p,O>>5&8191),p+=ak[G])}else a1(e,p,m[O]),p+=c[O]}return a1(e,p,m[256]),p+c[256]},a8=new aS([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),a7=new aE(0),nt=function(t,e,s,i,r,a){var n=a.z||t.length,o=new aE(i+n+5*(1+Math.ceil(n/7e3))+r),h=o.subarray(i,o.length-r),l=a.l,p=7&(a.r||0);if(e){p&&(h[0]=a.r>>3);for(var m=a8[e-1],c=m>>13,d=8191&m,u=(1<<s)-1,f=a.p||new aC(32768),g=a.h||new aC(u+1),y=Math.ceil(s/3),b=2*y,v=function(e){return(t[e]^t[e+1]<<y^t[e+2]<<b)&u},x=new aS(25e3),w=new aC(288),_=new aC(32),E=0,C=0,S=a.i||0,M=0,k=a.w||0,P=0;S+2<n;++S){var A=v(S),D=32767&S,T=g[A];if(f[D]=T,g[A]=D,k<=S){var F=n-S;if((E>7e3||M>24576)&&(F>423||!l)){p=a9(t,h,0,x,w,_,C,M,P,S-P,p),M=E=C=0,P=S;for(var I=0;I<286;++I)w[I]=0;for(var I=0;I<30;++I)_[I]=0}var $=2,L=0,N=d,B=D-T&32767;if(F>2&&A==v(S-B))for(var R=Math.min(c,F)-1,V=Math.min(32767,S),z=Math.min(258,F);B<=V&&--N&&D!=T;){if(t[S+$]==t[S+$-B]){for(var O=0;O<z&&t[S+O]==t[S+O-B];++O);if(O>$){if($=O,L=B,O>R)break;for(var G=Math.min(B,O-2),q=0,I=0;I<G;++I){var j=S-B+I&32767,W=f[j],H=j-W&32767;H>q&&(q=H,T=j)}}}T=f[D=T],B+=D-T&32767}if(L){x[M++]=0x10000000|aF[$]<<18|aL[L];var Y=31&aF[$],U=31&aL[L];C+=aM[Y]+ak[U],++w[257+Y],++_[U],k=S+$,++E}else x[M++]=t[S],++w[t[S]]}}for(S=Math.max(S,k);S<n;++S)x[M++]=t[S],++w[t[S]];p=a9(t,h,l,x,w,_,C,M,P,S-P,p),l||(a.r=7&p|h[p/8|0]<<3,p-=7,a.h=g,a.p=f,a.i=S,a.w=k)}else{for(var S=a.w||0;S<n+l;S+=65535){var J=S+65535;J>=n&&(h[p/8|0]=l,J=n),p=a6(h,p+1,t.subarray(S,J))}a.i=n}return aX(o,0,i+aJ(p)+r)},ne=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var s=e,i=9;--i;)s=(1&s&&-0x12477ce0)^s>>>1;t[e]=s}return t}(),ns=function(){var t=-1;return{p:function(e){for(var s=t,i=0;i<e.length;++i)s=ne[255&s^e[i]]^s>>>8;t=s},d:function(){return~t}}},ni=function(t,e,s,i,r){if(!r&&(r={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),n=new aE(a.length+t.length);n.set(a),n.set(t,a.length),t=n,r.w=a.length}return nt(t,null==e.level?6:e.level,null==e.mem?r.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,s,i,r)},nr=function(t,e){var s={};for(var i in t)s[i]=t[i];for(var i in e)s[i]=e[i];return s},na=function(t,e,s){for(var i=t(),r=t.toString(),a=r.slice(r.indexOf("[")+1,r.lastIndexOf("]")).replace(/\s+/g,"").split(","),n=0;n<i.length;++n){var o=i[n],h=a[n];if("function"==typeof o){e+=";"+h+"=";var l=o.toString();if(o.prototype)if(-1!=l.indexOf("[native code]")){var p=l.indexOf(" ",8)+1;e+=l.slice(p,l.indexOf("(",p))}else for(var m in e+=l,o.prototype)e+=";"+h+".prototype."+m+"="+o.prototype[m].toString();else e+=l}else s[h]=o}return e},nn=[],no=function(t){var e=[];for(var s in t)t[s].buffer&&e.push((t[s]=new t[s].constructor(t[s])).buffer);return e},nh=function(t,e,s,i){if(!nn[s]){for(var r="",a={},n=t.length-1,o=0;o<n;++o)r=na(t[o],r,a);nn[s]={c:na(t[n],r,a),e:a}}var h=nr({},nn[s].e);return a_(nn[s].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",s,h,no(h),i)},nl=function(){return[aE,aC,aS,aM,ak,aP,aT,a$,aq,aW,aN,aZ,aV,aH,aY,aU,aJ,aX,aK,aQ,nv,nm,nc]},np=function(){return[aE,aC,aS,aM,ak,aP,aF,aL,aG,az,aj,aO,aN,a8,a7,aV,a0,a1,a2,a3,a5,a4,a6,a9,aJ,aX,nt,ni,nb,nm]},nm=function(t){return postMessage(t,[t.buffer])},nc=function(t){return t&&{out:t.size&&new aE(t.size),dictionary:t.dictionary}},nd=function(t,e,s,i,r,a){var n=nh(s,i,r,function(t,e){n.terminate(),a(t,e)});return n.postMessage([t,e],e.consume?[t.buffer]:[]),function(){n.terminate()}},nu=function(t,e){return t[e]|t[e+1]<<8},nf=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},ng=function(t,e){return nf(t,e)+0x100000000*nf(t,e+4)},ny=function(t,e,s){for(;s;++e)t[e]=s,s>>>=8};function nb(t,e){return ni(t,e||{},0,0)}function nv(t,e){return aQ(t,{i:2},e&&e.out,e&&e.dictionary)}var nx=function(t,e,s,i){for(var r in t){var a=t[r],n=e+r,o=i;Array.isArray(a)&&(o=nr(i,a[1]),a=a[0]),a instanceof aE?s[n]=[a,o]:(s[n+="/"]=[new aE(0),o],nx(a,n,s,i))}},nw="undefined"!=typeof TextEncoder&&new TextEncoder,n_="undefined"!=typeof TextDecoder&&new TextDecoder;try{n_.decode(a7,{stream:!0})}catch(t){}var nE=function(t){for(var e="",s=0;;){var i=t[s++],r=(i>127)+(i>223)+(i>239);if(s+r>t.length)return{s:e,r:aX(t,s-1)};r?3==r?e+=String.fromCharCode(55296|(i=((15&i)<<18|(63&t[s++])<<12|(63&t[s++])<<6|63&t[s++])-65536)>>10,56320|1023&i):1&r?e+=String.fromCharCode((31&i)<<6|63&t[s++]):e+=String.fromCharCode((15&i)<<12|(63&t[s++])<<6|63&t[s++]):e+=String.fromCharCode(i)}};function nC(t,e){if(e){for(var s=new aE(t.length),i=0;i<t.length;++i)s[i]=t.charCodeAt(i);return s}if(nw)return nw.encode(t);for(var r=t.length,a=new aE(t.length+(t.length>>1)),n=0,o=function(t){a[n++]=t},i=0;i<r;++i){if(n+5>a.length){var h=new aE(n+8+(r-i<<1));h.set(a),a=h}var l=t.charCodeAt(i);l<128||e?o(l):(l<2048?o(192|l>>6):(l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++i))>>18),o(128|l>>12&63)):o(224|l>>12),o(128|l>>6&63)),o(128|63&l))}return aX(a,0,n)}function nS(t,e){if(e){for(var s="",i=0;i<t.length;i+=16384)s+=String.fromCharCode.apply(null,t.subarray(i,i+16384));return s}if(n_)return n_.decode(t);var r=nE(t),a=r.s,s=r.r;return s.length&&aK(8),a}var nM=function(t,e,s){var i=nu(t,e+28),r=nS(t.subarray(e+46,e+46+i),!(2048&nu(t,e+8))),a=e+46+i,n=nf(t,e+20),o=s&&0xffffffff==n?nk(t,a):[n,nf(t,e+24),nf(t,e+42)],h=o[0],l=o[1],p=o[2];return[nu(t,e+10),h,l,r,a+nu(t,e+30)+nu(t,e+32),p]},nk=function(t,e){for(;1!=nu(t,e);e+=4+nu(t,e+2));return[ng(t,e+12),ng(t,e+4),ng(t,e+20)]},nP=function(t){var e=0;if(t)for(var s in t){var i=t[s].length;i>65535&&aK(9),e+=i+4}return e},nA=function(t,e,s,i,r,a,n,o){var h=i.length,l=s.extra,p=o&&o.length,m=nP(l);ny(t,e,null!=n?0x2014b50:0x4034b50),e+=4,null!=n&&(t[e++]=20,t[e++]=s.os),t[e]=20,e+=2,t[e++]=s.flag<<1|(a<0&&8),t[e++]=r&&8,t[e++]=255&s.compression,t[e++]=s.compression>>8;var c=new Date(null==s.mtime?Date.now():s.mtime),d=c.getFullYear()-1980;if((d<0||d>119)&&aK(10),ny(t,e,d<<25|c.getMonth()+1<<21|c.getDate()<<16|c.getHours()<<11|c.getMinutes()<<5|c.getSeconds()>>1),e+=4,-1!=a&&(ny(t,e,s.crc),ny(t,e+4,a<0?-a-2:a),ny(t,e+8,s.size)),ny(t,e+12,h),ny(t,e+14,m),e+=16,null!=n&&(ny(t,e,p),ny(t,e+6,s.attrs),ny(t,e+10,n),e+=14),t.set(i,e),e+=h,m)for(var u in l){var f=l[u],g=f.length;ny(t,e,+u),ny(t,e+2,g),t.set(f,e+4),e+=4+g}return p&&(t.set(o,e),e+=p),e},nD=function(t,e,s,i,r){ny(t,e,0x6054b50),ny(t,e+8,s),ny(t,e+10,s),ny(t,e+12,i),ny(t,e+16,r)},nT="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(t){t()};let nF=t=>{let e=t?.split("/").pop()?.lastIndexOf(".");return(e??0)>1&&t&&t.length-1>(e??0)},nI=t=>{switch(t){case ad.Contain:case ad.ScaleDown:return _.Contain;case ad.Cover:return _.Cover;case ad.Fill:return _.Initial;case ad.None:return _.None;default:return _.Contain}},n$=(t,e)=>{let s=new Blob([t],{type:e?.mimeType}),i=e?.name||n(),r=URL.createObjectURL(s),a=document.createElement("a");a.href=r,a.download=i,a.hidden=!0,document.body.appendChild(a),a.click(),setTimeout(()=>{a.remove(),URL.revokeObjectURL(r)},1e3)},nL=t=>{if("string"==typeof t&&t&&nF(t))return t.split(".").pop()?.toLowerCase()},nN=(t,e)=>(nL(t),`${t.split("/").pop()?.replace(/\.[^.]*$/,"").replaceAll(/\W+/g,"-")}`),nB=(t,e)=>{if(e)return nL(e)?nL(e)===t?e:`${nN(e)}.${t}`:`${e}.${t}`},nR=t=>t.slice(Math.max(0,t.indexOf(",")+1)),nV=t=>nC(a()?Buffer.from(nR(t),"base64").toString("binary"):atob(nR(t)),!0),nz=t=>t.split(":")[1].split(";")[0].split("/")[1].split("+")[0],nO=t=>{let e={message:"Unknown error",status:a()?500:400};return t&&"object"==typeof t&&("message"in t&&"string"==typeof t.message&&(e.message=t.message),"status"in t&&(e.status=Number(t.status))),e},nG=t=>!("h"in t)&&!("w"in t)&&"p"in t&&"e"in t&&"u"in t&&"id"in t,nq=t=>"w"in t&&"h"in t&&!("xt"in t)&&"p"in t,nj=t=>((t??0)+1).toString().padStart(3,"0"),nW=async t=>await new Promise((e,s)=>{!function(t,e,s){s||(s=e,e={}),"function"!=typeof s&&aK(7);var i={};nx(t,"",i,e);var r=Object.keys(i),a=r.length,n=0,o=0,h=a,l=Array(a),p=[],m=function(){for(var t=0;t<p.length;++t)p[t]()},c=function(t,e){nT(function(){s(t,e)})};nT(function(){c=s});var d=function(){var t=new aE(o+22),e=n,s=o-n;o=0;for(var i=0;i<h;++i){var r=l[i];try{var a=r.c.length;nA(t,o,r,r.f,r.u,a);var p=30+r.f.length+nP(r.extra),m=o+p;t.set(r.c,m),nA(t,n,r,r.f,r.u,a,o,r.m),n+=16+p+(r.m?r.m.length:0),o=m+a}catch(t){return c(t,null)}}nD(t,n,l.length,s,e),c(null,t)};a||d();for(var u=function(t){var e,s,h=r[t],u=i[h],f=u[0],g=u[1],y=ns(),b=f.length;y.p(f);var v=nC(h),x=v.length,w=g.comment,_=w&&nC(w),E=_&&_.length,C=nP(g.extra),S=8*(0!=g.level),M=function(e,s){if(e)m(),c(e,null);else{var i=s.length;l[t]=nr(g,{size:b,crc:y.d(),c:s,f:v,m:_,u:x!=h.length||_&&w.length!=E,compression:S}),n+=30+x+C+i,o+=76+2*(x+C)+(E||0)+i,--a||d()}};if(x>65535&&M(aK(11,0,1),null),S)if(b<16e4)try{M(null,nb(f,g))}catch(t){M(t,null)}else p.push((e=g,(s=M)||(s=e,e={}),"function"!=typeof s&&aK(7),nd(f,e,[np],function(t){return nm(nb(t.data[0],t.data[1]))},0,s)));else M(null,f)},f=0;f<h;++f)u(f)}(t,{level:9},(t,i)=>t?void s(t):i.buffer instanceof ArrayBuffer?void e(i.buffer):void s(Error("Data is not transferable")))}),nH=async t=>{let e=await fetch(t),s=await e.blob();return new Promise((t,e)=>{try{let i=new FileReader;i.onload=()=>{if("string"==typeof i.result)return void t(i.result);e(Error("Could not create bas64"))},i.readAsDataURL(s)}catch(t){e(t)}})};async function nY({animations:t=[],fileName:e,manifest:s,shouldDownload:i=!0}){try{if(0===t.length||!s)throw Error(`Missing or malformed required parameter(s):
8
- ${t.length>0?"- manifest\n":""} ${s?"- animations\n":""}`);let r=nB("lottie",e)||`${n()}.lottie`,a={"manifest.json":[nC(JSON.stringify(s),!0),{level:0}]},{length:o}=t;for(let e=0;e<o;e++){let{length:i}=t[e].assets;for(let s=0;s<i;s++){let i=t[e].assets[s];if(!i.p||!nq(i)&&!nG(i))continue;let{p:r,u:o}=i;if(!r)continue;let h=n(),l=r.startsWith("data:"),p=l?nz(r):nL(r),m=l?r:await nH(o?o.endsWith("/")&&`${o}${r}`||`${o}/${r}`:r);t[e].assets[s].e=1,t[e].assets[s].p=`${h}.${p}`,t[e].assets[s].u="",a[`${nG(i)?"audio":"images"}/${h}.${p}`]=[nV(m),{level:9}]}let{length:r}=t[e].layers;for(let s=0;s<r;s++){let{ks:i}=t[e].layers[s],r=Object.keys(i),{length:a}=r;for(let n=0;n<a;n++){let{x:a}=i[r[n]];a&&(t[e].layers[s].ks[r[n]].x=btoa(a),t[e].layers[s].ks[r[n]].e=1)}}a[`a/${s.animations[e].id}.json`]=[nC(JSON.stringify(t[e]),!0),{level:9}]}let h=await nW(a);if(i)return n$(h,{mimeType:"application/zip",name:r}),null;return h}catch(t){return console.error(nO(t).message),null}}let nU=t=>{switch(t){case"svg":case"svg+xml":return"image/svg+xml";case"jpg":case"jpeg":return"image/jpeg";case"png":case"gif":case"webp":case"avif":return`image/${t}`;case"mp3":case"mpeg":case"wav":return`audio/${t}`;default:return""}},nJ=t=>!!t&&/^(?:[0-9a-z+/]{4})*(?:[0-9a-z+/]{2}==|[0-9a-z+/]{3}=)?$/i.test(nR(t));async function nX(t,e){if(!Array.isArray(e))return;let s=[],{length:i}=e;for(let r=0;r<i;r++){if(!nG(e[r])&&!nq(e[r]))continue;let i=nq(e[r])?"images":"audio",n=t?.[`${i}/${e[r].p}`];n&&s.push(new Promise(t=>{let s;if(a())s=Buffer.from(n).toString("base64");else{let t="",{length:e}=n;for(let s=0;s<e;s++)t+=String.fromCharCode(n[s]);s=btoa(t)}e[r].p=e[r].p?.startsWith("data:")||nJ(e[r].p)?e[r].p:`data:${nU(nL(e[r].p))};base64,${s}`,e[r].e=1,e[r].u="",t()}))}await Promise.all(s)}let nZ=async t=>{let e=new Uint8Array(await t.arrayBuffer());return await new Promise((t,s)=>{!function(t,e,s){s||(s=e,e={}),"function"!=typeof s&&aK(7);var i=[],r=function(){for(var t=0;t<i.length;++t)i[t]()},a={},n=function(t,e){nT(function(){s(t,e)})};nT(function(){n=s});for(var o=t.length-22;0x6054b50!=nf(t,o);--o)if(!o||t.length-o>65558)return n(aK(13,0,1),null),r;var h=nu(t,o+8);if(h){var l=h,p=nf(t,o+16),m=0xffffffff==p||65535==l;if(m){var c=nf(t,o-12);(m=0x6064b50==nf(t,c))&&(l=h=nf(t,c+32),p=nf(t,c+48))}for(var d=e&&e.filter,u=0;u<l;++u)!function(e){var s=nM(t,p,m),o=s[0],l=s[1],c=s[2],u=s[3],f=s[4],g=s[5],y=g+30+nu(t,g+26)+nu(t,g+28);p=f;var b=function(t,e){t?(r(),n(t,null)):(e&&(a[u]=e),--h||n(null,a))};if(!d||d({name:u,size:l,originalSize:c,compression:o}))if(o)if(8==o){var v,x,w=t.subarray(y,y+l);if(c<524288||l>.8*c)try{b(null,nv(w,{out:new aE(c)}))}catch(t){b(t,null)}else i.push((v={size:c},(x=b)||(x=v,v={}),"function"!=typeof x&&aK(7),nd(w,v,[nl],function(t){return nm(nv(t.data[0],nc(t.data[1])))},1,x)))}else b(aK(14,"unknown compression type "+o,1),null);else b(null,aX(t,y,y+l));else b(null,null)}(0)}else n(null,{})}(e,(e,i)=>{e&&s(e),t(i)})})},nK=t=>{let e=JSON.parse(nS(t["manifest.json"],!1));if(!("animations"in e))throw Error("Manifest not found");if(0===e.animations.length)throw Error("No animations listed in manifest");return e},nQ=t=>t.replaceAll(RegExp(/"""/,"g"),'""').replaceAll(/(["'])(.*?)\1/g,(t,e,s)=>`${e}${s}${e}`);async function n0(t){let e=await nZ(t),s=nK(e),i=[],r=[],{length:a}=s.animations,n="animations";e[`a/${s.animations[0].id}.json`]&&(n="a");for(let t=0;t<a;t++){let a=JSON.parse(nQ(nS(e[`${n}/${s.animations[t].id}.json`]))),{length:o}=a.layers;for(let t=0;t<o;t++){let{ks:e}=a.layers[t],s=Object.keys(e),{length:i}=s;for(let r=0;r<i;r++){let{e:i,x:n}=e[s[r]];n&&i&&(a.layers[t].ks[s[r]].x=atob(n))}}r.push(nX(e,a.assets)),i.push(a)}return await Promise.all(r),{data:i,manifest:s}}async function n1(t){try{if(!t||"string"!=typeof t&&"object"!=typeof t)throw Error("Broken file or invalid file format");if("string"!=typeof t)return{animations:Array.isArray(t)?t:[t],isDotLottie:!1,manifest:null};let e=await fetch(t,{headers:{"Content-Type":"application/json; charset=UTF-8"}});if(!e.ok)throw Error(e.statusText);let s=!0,i=e.headers.get("content-type");if("application/zip+dotlottie"===i&&(s=!1),s){let s=nL(t);if("json"===s)return{animations:[await e.json()],isDotLottie:!1,manifest:null};let i=await e.clone().text();try{return{animations:[JSON.parse(i)],isDotLottie:!1,manifest:null}}catch(t){}}let{data:r,manifest:a}=await n0(e);return{animations:r,isDotLottie:!0,manifest:a}}catch(t){return console.error(nO(t).message),{animations:void 0,isDotLottie:!1,manifest:null}}}let n2="@aarsteinmedia/dotlottie-player";class n3 extends ac{static get observedAttributes(){return["animateOnScroll","autoplay","controls","direction","hover","loop","mode","speed","src","subframe"]}static get observedProperties(){return["playerState","_isSettingsOpen","_seeker","_currentAnimation","_animations"]}static get styles(){return async()=>{let t=new CSSStyleSheet;return await t.replace("* {\n box-sizing: border-box;\n}\n\n:host {\n --lottie-player-toolbar-height: 35px;\n --lottie-player-toolbar-background-color: #fff;\n --lottie-player-toolbar-icon-color: #000;\n --lottie-player-toolbar-icon-hover-color: #000;\n --lottie-player-toolbar-icon-active-color: #4285f4;\n --lottie-player-seeker-track-color: rgb(0 0 0 / 20%);\n --lottie-player-seeker-thumb-color: #4285f4;\n --lottie-player-seeker-display: block;\n\n width: 100%;\n height: 100%;\n\n &:not([hidden]) {\n display: block;\n }\n\n .main {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n }\n\n .animation {\n width: 100%;\n height: 100%;\n display: flex;\n margin: 0;\n padding: 0;\n }\n\n [data-controls='true'] .animation {\n height: calc(100% - 35px);\n }\n\n .animation-container {\n position: relative;\n }\n\n .popover {\n position: absolute;\n right: 5px;\n bottom: 40px;\n background-color: var(--lottie-player-toolbar-background-color);\n border-radius: 5px;\n padding: 10px 15px;\n border: solid 2px var(--lottie-player-toolbar-icon-color);\n animation: fade-in 0.2s ease-in-out;\n\n &::before {\n content: '';\n right: 10px;\n border: 7px solid transparent;\n margin-right: -7px;\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n top: 100%;\n border-top-color: var(--lottie-player-toolbar-icon-color);\n }\n }\n\n .error {\n display: flex;\n margin: auto;\n justify-content: center;\n height: 100%;\n align-items: center;\n\n & svg {\n width: 100%;\n height: auto;\n }\n }\n\n .toolbar {\n display: flex;\n place-items: center center;\n background: var(--lottie-player-toolbar-background-color);\n margin: 0;\n height: 35px;\n padding: 5px;\n border-radius: 5px;\n gap: 5px;\n\n &.has-error {\n pointer-events: none;\n opacity: 0.5;\n }\n\n & button {\n cursor: pointer;\n fill: var(--lottie-player-toolbar-icon-color);\n color: var(--lottie-player-toolbar-icon-color);\n background: none;\n border: 0;\n padding: 0;\n outline: 0;\n height: 100%;\n margin: 0;\n align-items: center;\n gap: 5px;\n opacity: 0.9;\n\n &:not([hidden]) {\n display: flex;\n }\n\n &:hover {\n opacity: 1;\n }\n\n &[data-active='true'] {\n opacity: 1;\n fill: var(--lottie-player-toolbar-icon-active-color);\n }\n\n &:disabled {\n opacity: 0.5;\n }\n\n &:focus {\n outline: 0;\n }\n\n & svg {\n pointer-events: none;\n\n & > * {\n fill: inherit;\n }\n }\n\n &.disabled svg {\n display: none;\n }\n }\n }\n\n .progress-container {\n position: relative;\n width: 100%;\n\n &.simple {\n margin-right: 12px;\n }\n }\n\n .seeker {\n appearance: none;\n outline: none;\n width: 100%;\n height: 20px;\n border-radius: 3px;\n border: 0;\n cursor: pointer;\n background-color: transparent;\n\n display: var(--lottie-player-seeker-display);\n color: var(--lottie-player-seeker-thumb-color);\n margin: 0;\n padding: 7.5px 0;\n position: relative;\n z-index: 1;\n\n &::-webkit-slider-runnable-track,\n &::-webkit-slider-thumb {\n appearance: none;\n outline: none;\n }\n\n &::-webkit-slider-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n border: 0;\n background-color: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -webkit-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-webkit-slider-thumb,\n &:focus::-webkit-slider-thumb {\n transform: scale(1);\n }\n\n &::-moz-range-progress {\n background-color: var(--lottie-player-seeker-thumb-color);\n height: 5px;\n border-radius: 3px;\n }\n\n &::-moz-range-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: var(--lottie-player-seeker-thumb-color);\n border: 0;\n cursor: pointer;\n -moz-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-moz-range-thumb,\n &:focus::-moz-range-thumb {\n transform: scale(1);\n }\n\n &::-ms-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n }\n\n &::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n\n &::-ms-fill-lower {\n background-color: var(--lottie-player-seeker-thumb-color);\n border-radius: 3px;\n }\n\n &::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -ms-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-ms-thumb {\n transform: scale(1);\n }\n\n &:focus {\n &::-ms-thumb {\n transform: scale(1);\n }\n\n &::-ms-fill-lower,\n &::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n }\n }\n }\n\n & progress {\n appearance: none;\n outline: none;\n position: absolute;\n width: 100%;\n height: 5px;\n border-radius: 3px;\n border: 0;\n top: 0;\n left: 0;\n margin: 7.5px 0;\n background-color: var(--lottie-player-seeker-track-color);\n pointer-events: none;\n\n &::-webkit-progress-inner-element {\n border-radius: 3px;\n overflow: hidden;\n }\n\n &::-webkit-slider-runnable-track {\n background-color: transparent;\n }\n\n &::-webkit-progress-value {\n background-color: var(--lottie-player-seeker-thumb-color);\n }\n }\n\n & *::-moz-progress-bar {\n background-color: var(--lottie-player-seeker-thumb-color);\n }\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n :host {\n --lottie-player-toolbar-background-color: #000;\n --lottie-player-toolbar-icon-color: #fff;\n --lottie-player-toolbar-icon-hover-color: #fff;\n --lottie-player-seeker-track-color: rgb(255 255 255 / 60%);\n }\n}\n"),t}}set animateOnScroll(t){this.setAttribute("animateOnScroll",(!!t).toString())}get animateOnScroll(){let t=this.getAttribute("animateOnScroll");return"true"===t||""===t||"1"===t}set autoplay(t){this.setAttribute("autoplay",(!!t).toString())}get autoplay(){let t=this.getAttribute("autoplay");return"true"===t||""===t||"1"===t}set background(t){this.setAttribute("background",t)}get background(){return this.getAttribute("background")||"transparent"}set controls(t){this.setAttribute("controls",(!!t).toString())}get controls(){let t=this.getAttribute("controls");return"true"===t||""===t||"1"===t}set count(t){this.setAttribute("count",t.toString())}get count(){let t=this.getAttribute("count");return t?Number(t):0}set description(t){t&&this.setAttribute("description",t)}get description(){return this.getAttribute("description")}set direction(t){this.setAttribute("direction",t.toString())}get direction(){let t=Number(this.getAttribute("direction"));return -1===t?t:1}set hover(t){this.setAttribute("hover",t.toString())}get hover(){let t=this.getAttribute("hover");return"true"===t||""===t||"1"===t}set intermission(t){this.setAttribute("intermission",t.toString())}get intermission(){let t=Number(this.getAttribute("intermission"));return isNaN(t)?0:t}set loop(t){this.setAttribute("loop",(!!t).toString())}get loop(){let t=this.getAttribute("loop");return"true"===t||""===t||"1"===t}set mode(t){this.setAttribute("mode",t.toString())}get mode(){let t=this.getAttribute("mode");return t===af.Bounce?t:af.Normal}set objectfit(t){this.setAttribute("objectfit",t)}get objectfit(){let t=this.getAttribute("objectfit");return t&&Object.values(ad).includes(t)?t:ad.Contain}set preserveAspectRatio(t){this.setAttribute("preserveAspectRatio",t||ay.Contain)}get preserveAspectRatio(){let t=this.getAttribute("preserveAspectRatio");return t&&Object.values(ay).includes(t)?t:null}set renderer(t){this.setAttribute("renderer",t)}get renderer(){let t=this.getAttribute("renderer");return t===ab.Canvas||t===ab.HTML?t:ab.SVG}set simple(t){this.setAttribute("simple",t.toString())}get simple(){let t=this.getAttribute("simple");return"true"===t||""===t||"1"===t}set speed(t){this.setAttribute("speed",t.toString())}get speed(){let t=this.getAttribute("speed");return null===t||isNaN(Number(t))?1:Number(t)}set src(t){this.setAttribute("src",t||"")}get src(){return this.getAttribute("src")}set subframe(t){this.setAttribute("subframe",(!!t).toString())}get subframe(){let t=this.getAttribute("subframe");return"true"===t||""===t||"1"===t}constructor(){super(),this.playerState=au.Loading,this._container=null,this._errorMessage="Something went wrong",this._identifier=this.id||n(),this._isSettingsOpen=!1,this._playerState={count:0,loaded:!1,prev:au.Loading,scrollTimeout:null,scrollY:0,visible:!1},this._render=ax,this._renderControls=av,this._seeker=0,this._animations=[],this._currentAnimation=0,this._isBounce=!1,this._isDotLottie=!1,this._lottieInstance=null,this._multiAnimationSettings=[],this._handleSettingsClick=({target:t})=>{this._toggleSettings(),t instanceof HTMLElement&&t.focus()},this._complete=this._complete.bind(this),this._dataFailed=this._dataFailed.bind(this),this._dataReady=this._dataReady.bind(this),this._DOMLoaded=this._DOMLoaded.bind(this),this._enterFrame=this._enterFrame.bind(this),this._freeze=this._freeze.bind(this),this._handleBlur=this._handleBlur.bind(this),this._handleScroll=this._handleScroll.bind(this),this._handleSeekChange=this._handleSeekChange.bind(this),this._handleWindowBlur=this._handleWindowBlur.bind(this),this._loopComplete=this._loopComplete.bind(this),this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._switchInstance=this._switchInstance.bind(this),this.togglePlay=this.togglePlay.bind(this),this.stop=this.stop.bind(this),this.prev=this.prev.bind(this),this.next=this.next.bind(this),this._renderControls=this._renderControls.bind(this),this.snapshot=this.snapshot.bind(this),this.toggleLoop=this.toggleLoop.bind(this),this.toggleBoomerang=this.toggleBoomerang.bind(this),this.convert=this.convert.bind(this),this.destroy=this.destroy.bind(this),this.template=document.createElement("template"),this.shadow=this.attachShadow({mode:"open"})}async addAnimation(t,e,s=!0){let{animations:i=[],manifest:r={animations:this.src?[{id:this._identifier}]:[]}}=this.src?await n1(this.src):{};try{if(!r)throw Error("Manifest is not set");r.generator=n2;let{length:a}=t;for(let e=0;e<a;e++){let{url:s}=t[e],{animations:a}=await n1(s);if(!a)throw Error("No animation loaded");if(r.animations.some(({id:s})=>s===t[e].id))throw Error("Duplicate id for animation");r.animations=[...r.animations,{id:t[e].id}],i.push(...a)}return{result:await nY({animations:i,fileName:e,manifest:r,shouldDownload:s}),success:!0}}catch(t){return{error:nO(t).message,success:!1}}}async attributeChangedCallback(t,e,s){if(this._lottieInstance&&this.shadow){if("animateOnScroll"===t){if(""===s||s){this._lottieInstance.autoplay=!1,addEventListener("scroll",this._handleScroll,{capture:!0,passive:!0});return}removeEventListener("scroll",this._handleScroll,!0)}if("autoplay"===t){if(this.animateOnScroll)return;if(""===s||s)return void this.play();this.stop()}if("controls"===t&&this._renderControls(),"direction"===t){if(-1===Number(s))return void this.setDirection(-1);this.setDirection(1)}if("hover"===t&&this._container){if(""===s||s){this._container.addEventListener("mouseenter",this._mouseEnter),this._container.addEventListener("mouseleave",this._mouseLeave);return}this._container.removeEventListener("mouseenter",this._mouseEnter),this._container.removeEventListener("mouseleave",this._mouseLeave)}if("loop"===t){let t=this.shadow.querySelector(".toggleLoop");t instanceof HTMLButtonElement&&(t.dataset.active=s),this.setLoop(""===s||!!s)}if("mode"===t){let t=this.shadow.querySelector(".toggleBoomerang");t instanceof HTMLButtonElement&&(t.dataset.active=(s===af.Bounce).toString()),this._isBounce=s===af.Bounce}if("speed"===t){let t=Number(s);t&&!isNaN(t)&&this.setSpeed(t)}"src"===t&&await this.load(s),"subframe"===t&&this.setSubframe(""===s||!!s)}}async connectedCallback(){if(await super.connectedCallback(),await this._render(),!this.shadow)throw Error("Missing Shadow element");this._container=this.shadow.querySelector(".animation"),this._renderControls(),void 0!==document.hidden&&document.addEventListener("visibilitychange",this._onVisibilityChange),this._addIntersectionObserver(),await this.load(this.src),this.dispatchEvent(new CustomEvent(ag.Rendered))}async convert({animations:t,fileName:e,manifest:s,shouldDownload:i=!0,src:r,typeCheck:a}){let o=r||this.src||this.source;if(!o&&!t?.length)throw Error("No animation to convert");let h=t;return(h||(h=(await n1(o)).animations),a||this._isDotLottie)?function({animation:t,fileName:e,shouldDownload:s}){try{if(!t)throw Error("createJSON: Missing or malformed required parameter(s):\n - animation\n'");let i=nB("json",e)||`${n()}.json`,r=JSON.stringify(t);if(s)return n$(r,{mimeType:"application/json",name:i}),null;return r}catch(t){return console.error(nO(t).message),null}}({animation:h?.[0],fileName:`${nN(e||o||"converted")}.json`,shouldDownload:i}):nY({animations:h,fileName:`${nN(e||o||"converted")}.lottie`,manifest:{...s??this._manifest,generator:n2},shouldDownload:i})}destroy(){this._lottieInstance?.destroy&&(this.playerState=au.Destroyed,this._lottieInstance.destroy(),this._lottieInstance=null,this.dispatchEvent(new CustomEvent(ag.Destroyed)),this.remove(),document.removeEventListener("visibilitychange",this._onVisibilityChange))}disconnectedCallback(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0),document.removeEventListener("visibilitychange",this._onVisibilityChange),this.destroy()}getLottie(){return this._lottieInstance}getManifest(){return this._manifest}getMultiAnimationSettings(){return this._multiAnimationSettings}getSegment(){return this._segment}async load(t){if(!this.shadowRoot||!t)return;this.source=t;try{let{animations:e,isDotLottie:s,manifest:i}=await n1(t);if(!e||e.some(t=>!this._isLottie(t)))throw Error("Broken or corrupted file");this._isBounce=this.mode===af.Bounce,this._multiAnimationSettings.length>0&&this._multiAnimationSettings[this._currentAnimation]?.mode&&(this._isBounce=this._multiAnimationSettings[this._currentAnimation].mode===af.Bounce),i?.animations.length===1&&(i.animations[0].autoplay=this.autoplay,i.animations[0].loop=this.loop),this._isDotLottie=!!s,this._animations=e,this._manifest=i??{animations:[{autoplay:!this.animateOnScroll&&this.autoplay,direction:this.direction,id:n(),loop:this.loop,mode:this.mode,speed:this.speed}]},this._lottieInstance?.destroy(),this.playerState=au.Stopped,!this.animateOnScroll&&(this.autoplay||this._multiAnimationSettings[this._currentAnimation]?.autoplay)&&(this.playerState=au.Playing),this._lottieInstance=al.loadAnimation({...this._getOptions(),animationData:e[this._currentAnimation]})}catch(t){this._errorMessage=nO(t).message,this.playerState=au.Error,this.dispatchEvent(new CustomEvent(ag.Error));return}this._addEventListeners();let e=this._multiAnimationSettings[this._currentAnimation]?.speed??this.speed,s=this._multiAnimationSettings[this._currentAnimation]?.direction??this.direction;this._lottieInstance.setSpeed(e),this._lottieInstance.setDirection(s),this._lottieInstance.setSubframe(!!this.subframe),(this.autoplay||this.animateOnScroll)&&(-1===this.direction&&this.seek("99%"),"IntersectionObserver"in window||(this.animateOnScroll||this.play(),this._playerState.visible=!0),this._addIntersectionObserver())}next(){this._currentAnimation++,this._switchInstance()}pause(){if(this._lottieInstance){this._playerState.prev=this.playerState;try{this._lottieInstance.pause(),this.dispatchEvent(new CustomEvent(ag.Pause))}finally{this.playerState=au.Paused}}}play(){if(this._lottieInstance){this._playerState.prev=this.playerState;try{this._lottieInstance.play(),this.dispatchEvent(new CustomEvent(ag.Play))}finally{this.playerState=au.Playing}}}prev(){this._currentAnimation--,this._switchInstance(!0)}propertyChangedCallback(t,e,s){if(!this.shadow)return;let i=this.shadow.querySelector(".togglePlay"),r=this.shadow.querySelector(".stop"),a=this.shadow.querySelector(".prev"),n=this.shadow.querySelector(".next"),o=this.shadow.querySelector(".seeker"),h=this.shadow.querySelector("progress"),l=this.shadow.querySelector(".popover"),p=this.shadow.querySelector(".convert"),m=this.shadow.querySelector(".snapshot");i instanceof HTMLButtonElement&&r instanceof HTMLButtonElement&&n instanceof HTMLButtonElement&&a instanceof HTMLButtonElement&&o instanceof HTMLInputElement&&h instanceof HTMLProgressElement&&("playerState"===t&&(i.dataset.active=(s===au.Playing||s===au.Paused).toString(),r.dataset.active=(s===au.Stopped).toString(),s===au.Playing?i.innerHTML='<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z"/></svg>':i.innerHTML='<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M8.016 5.016L18.985 12 8.016 18.984V5.015z"/></svg>'),"_seeker"===t&&"number"==typeof s&&(o.value=s.toString(),o.ariaValueNow=s.toString(),h.value=s),"_animations"===t&&Array.isArray(s)&&this._currentAnimation+1<s.length&&(n.hidden=!1),"_currentAnimation"===t&&"number"==typeof s&&(n.hidden=s+1>=this._animations.length,a.hidden=!s),"_isSettingsOpen"===t&&"boolean"==typeof s&&l instanceof HTMLDivElement&&p instanceof HTMLButtonElement&&m instanceof HTMLButtonElement&&(l.hidden=!s,p.hidden=!1,m.hidden=this.renderer!==ab.SVG,this._isDotLottie?(p.ariaLabel="Convert dotLottie to JSON",p.innerHTML=p.innerHTML.replace("dotLottie","JSON")):(p.ariaLabel="Convert JSON animation to dotLottie format",p.innerHTML=p.innerHTML.replace("JSON","dotLottie"))))}async reload(){this._lottieInstance&&this.src&&(this._lottieInstance.destroy(),await this.load(this.src))}seek(t){if(!this._lottieInstance)return;let e=t.toString().match(/^(\d+)(%?)$/);if(!e)return;let s=Math.round("%"===e[2]?this._lottieInstance.totalFrames*Number(e[1])/100:Number(e[1]));if(this._seeker=s,this.playerState===au.Playing||this.playerState===au.Frozen&&this._playerState.prev===au.Playing){this._lottieInstance.goToAndPlay(s,!0),this.playerState=au.Playing;return}this._lottieInstance.goToAndStop(s,!0),this._lottieInstance.pause()}setCount(t){this.count=t}setDirection(t){this._lottieInstance&&this._lottieInstance.setDirection(t)}setLoop(t){this._lottieInstance&&this._lottieInstance.setLoop(t)}setMultiAnimationSettings(t){this._multiAnimationSettings=t}setSegment(t){this._segment=t}setSpeed(t=1){this._lottieInstance&&this._lottieInstance.setSpeed(t)}setSubframe(t){this._lottieInstance&&this._lottieInstance.setSubframe(t)}snapshot(t=!0,e="AM Lottie"){try{if(!this.shadowRoot)throw Error("Unknown error");let s=this.shadowRoot.querySelector(".animation svg");if(!s)throw Error("Could not retrieve animation from DOM");let i=s instanceof Node?new XMLSerializer().serializeToString(s):null;if(!i)throw Error("Could not serialize SVG element");return t&&n$(i,{mimeType:"image/svg+xml",name:`${nN(this.src||e)}-${nj(this._seeker)}.svg`}),i}catch(t){return console.error(t),null}}stop(){if(this._lottieInstance){this._playerState.prev=this.playerState,this._playerState.count=0;try{this._lottieInstance.stop(),this.dispatchEvent(new CustomEvent(ag.Stop))}finally{this.playerState=au.Stopped}}}toggleBoomerang(){let t=this._multiAnimationSettings[this._currentAnimation];if(void 0!==t.mode){if(t.mode===af.Normal){t.mode=af.Bounce,this._isBounce=!0;return}t.mode=af.Normal,this._isBounce=!1;return}if(this.mode===af.Normal){this.mode=af.Bounce,this._isBounce=!0;return}this.mode=af.Normal,this._isBounce=!1}toggleLoop(){let t=!this.loop;this.loop=t,this.setLoop(t)}togglePlay(){if(!this._lottieInstance)return;let{currentFrame:t,playDirection:e,totalFrames:s}=this._lottieInstance;if(this.playerState===au.Playing)return void this.pause();if(this.playerState!==au.Completed)return void this.play();if(this.playerState=au.Playing,this._isBounce){this.setDirection(-1*e),this._lottieInstance.goToAndPlay(t,!0);return}if(-1===e)return void this._lottieInstance.goToAndPlay(s,!0);this._lottieInstance.goToAndPlay(0,!0)}_freeze(){if(this._lottieInstance){this._playerState.prev=this.playerState;try{this._lottieInstance.pause(),this.dispatchEvent(new CustomEvent(ag.Freeze))}finally{this.playerState=au.Frozen}}}_handleBlur(){setTimeout(()=>{this._toggleSettings(!1)},200)}_handleSeekChange({target:t}){!(!(t instanceof HTMLInputElement)||!this._lottieInstance||isNaN(Number(t.value)))&&this.seek(Math.round(Number(t.value)/100*this._lottieInstance.totalFrames))}_addEventListeners(){this._toggleEventListeners("add")}_addIntersectionObserver(){this._container&&!this._intersectionObserver&&"IntersectionObserver"in window&&(this._intersectionObserver=new IntersectionObserver(t=>{let{length:e}=t;for(let s=0;s<e;s++){if(!t[s].isIntersecting||document.hidden){this.playerState===au.Playing&&this._freeze(),this._playerState.visible=!1;continue}this.animateOnScroll||this.playerState!==au.Frozen||this.play(),this._playerState.scrollY||(this._playerState.scrollY=scrollY),this._playerState.visible=!0}}),this._intersectionObserver.observe(this._container))}_complete(){if(!this._lottieInstance)return;if(this._animations.length>1){if(this._multiAnimationSettings[this._currentAnimation+1]?.autoplay)return void this.next();if(this.loop&&this._currentAnimation===this._animations.length-1){this._currentAnimation=0,this._switchInstance();return}}let{currentFrame:t,totalFrames:e}=this._lottieInstance;this._seeker=Math.round(t/e*100),this.playerState=au.Completed,this.dispatchEvent(new CustomEvent(ag.Complete,{detail:{frame:t,seeker:this._seeker}}))}_dataFailed(){this.playerState=au.Error,this.dispatchEvent(new CustomEvent(ag.Error))}_dataReady(){this.dispatchEvent(new CustomEvent(ag.Load))}_DOMLoaded(){this._playerState.loaded=!0,this.dispatchEvent(new CustomEvent(ag.Ready))}_enterFrame(){if(!this._lottieInstance)return;let{currentFrame:t,totalFrames:e}=this._lottieInstance;this._seeker=Math.round(t/e*100),this.dispatchEvent(new CustomEvent(ag.Frame,{detail:{frame:t,seeker:this._seeker}}))}_getOptions(){if(!this._container)throw Error("Container not rendered");let t=this.preserveAspectRatio??nI(this.objectfit),e=this._multiAnimationSettings.length>0?this._multiAnimationSettings[this._currentAnimation]:void 0,s=this._manifest?.animations[this._currentAnimation],i=!!this.loop;s?.loop!==void 0&&(i=!!s.loop),e?.loop!==void 0&&(i=!!e.loop);let r=!!this.autoplay;s?.autoplay!==void 0&&(r=!!s.autoplay),e?.autoplay!==void 0&&(r=!!e.autoplay),this.animateOnScroll&&(r=!1);let a=this._segment;this._segment?.every(t=>t>0)&&(a=[this._segment[0]-1,this._segment[1]-1]),this._segment?.some(t=>t<0)&&(a=void 0);let n={autoplay:r,container:this._container,initialSegment:a,loop:i,renderer:this.renderer,rendererSettings:{imagePreserveAspectRatio:t}};switch(this.renderer){case ab.SVG:n.rendererSettings={...n.rendererSettings,hideOnTransparent:!0,preserveAspectRatio:t,progressiveLoad:!0};break;case ab.Canvas:n.rendererSettings={...n.rendererSettings,clearCanvas:!0,preserveAspectRatio:t,progressiveLoad:!0};break;case ab.HTML:n.rendererSettings={...n.rendererSettings,hideOnTransparent:!0}}return n}_handleScroll(){if(this.animateOnScroll&&this._lottieInstance){if(a())return void console.warn("DotLottie: Scroll animations might not work properly in a Server Side Rendering context. Try to wrap this in a client component.");if(this._playerState.visible){this._playerState.scrollTimeout&&clearTimeout(this._playerState.scrollTimeout),this._playerState.scrollTimeout=setTimeout(()=>{this.playerState=au.Paused},400);let t=Math.min(Math.max((scrollY>this._playerState.scrollY?scrollY-this._playerState.scrollY:this._playerState.scrollY-scrollY)/3,1),3*this._lottieInstance.totalFrames)/3;requestAnimationFrame(()=>{t<(this._lottieInstance?.totalFrames??0)?(this.playerState=au.Playing,this._lottieInstance?.goToAndStop(t,!0)):this.playerState=au.Paused})}}}_handleWindowBlur({type:t}){this.playerState===au.Playing&&"blur"===t&&this._freeze(),this.playerState===au.Frozen&&"focus"===t&&this.play()}_isLottie(t){return["v","ip","op","layers","fr","w","h"].every(e=>Object.hasOwn(t,e))}_loopComplete(){if(!this._lottieInstance)return;let{playDirection:t,totalFrames:e}=this._lottieInstance,s=this._segment?this._segment[0]:0,i=this._segment?this._segment[0]:e;if(this.count&&(this._isBounce?this._playerState.count+=.5:this._playerState.count+=1,this._playerState.count>=this.count)){this.setLoop(!1),this.playerState=au.Completed,this.dispatchEvent(new CustomEvent(ag.Complete));return}return(this.dispatchEvent(new CustomEvent(ag.Loop)),this._isBounce)?(this._lottieInstance.goToAndStop(-1===t?s:.99*i,!0),this._lottieInstance.setDirection(-1*t),setTimeout(()=>{this.animateOnScroll||this._lottieInstance?.play()},this.intermission)):(this._lottieInstance.goToAndStop(-1===t?.99*i:s,!0),setTimeout(()=>{this.animateOnScroll||this._lottieInstance?.play()},this.intermission))}_mouseEnter(){this.hover&&this.playerState!==au.Playing&&this.play()}_mouseLeave(){this.hover&&this.playerState===au.Playing&&this.stop()}_onVisibilityChange(){if(document.hidden&&this.playerState===au.Playing)return void this._freeze();this.playerState===au.Frozen&&this.play()}_removeEventListeners(){this._toggleEventListeners("remove")}_switchInstance(t=!1){if(this._animations[this._currentAnimation])try{if(this._lottieInstance&&this._lottieInstance.destroy(),this._lottieInstance=al.loadAnimation({...this._getOptions(),animationData:this._animations[this._currentAnimation]}),this._multiAnimationSettings[this._currentAnimation]?.mode&&(this._isBounce=this._multiAnimationSettings[this._currentAnimation].mode===af.Bounce),this._removeEventListeners(),this._addEventListeners(),this.dispatchEvent(new CustomEvent(t?ag.Previous:ag.Next)),this._multiAnimationSettings[this._currentAnimation]?.autoplay??this.autoplay){if(this.animateOnScroll){this._lottieInstance.goToAndStop(0,!0),this.playerState=au.Paused;return}this._lottieInstance.goToAndPlay(0,!0),this.playerState=au.Playing;return}this._lottieInstance.goToAndStop(0,!0),this.playerState=au.Stopped}catch(t){this._errorMessage=nO(t).message,this.playerState=au.Error,this.dispatchEvent(new CustomEvent(ag.Error))}}_toggleEventListeners(t){let e="add"===t?"addEventListener":"removeEventListener";this._lottieInstance&&(this._lottieInstance[e]("enterFrame",this._enterFrame),this._lottieInstance[e]("complete",this._complete),this._lottieInstance[e]("loopComplete",this._loopComplete),this._lottieInstance[e]("DOMLoaded",this._DOMLoaded),this._lottieInstance[e]("data_ready",this._dataReady),this._lottieInstance[e]("data_failed",this._dataFailed)),this._container&&this.hover&&(this._container[e]("mouseenter",this._mouseEnter),this._container[e]("mouseleave",this._mouseLeave)),window[e]("focus",this._handleWindowBlur,{capture:!1,passive:!0}),window[e]("blur",this._handleWindowBlur,{capture:!1,passive:!0}),this.animateOnScroll&&window[e]("scroll",this._handleScroll,{capture:!0,passive:!0})}_toggleSettings(t){if(void 0===t){this._isSettingsOpen=!this._isSettingsOpen;return}this._isSettingsOpen=t}}globalThis.dotLottiePlayer=()=>new n3;let n5="dotlottie-player";a()||customElements.define(n5,n3),t.PlayMode=af,t.PlayerEvents=ag,t.PlayerState=au,t.default=n3,t.tagName=n5,Object.defineProperty(t,"__esModule",{value:!0})}(this["@aarsteinmedia/dotlottie-player"]=this["@aarsteinmedia/dotlottie-player"]||{});
7
+ obj.scoped_bm_rt = $bm_rt;`),O=0,z,B=null,G,q,j,W,H=s.kf?i.length:0,Y=e.ix,U=!this.data||!0!==this.data.hd,J=(t,e)=>{let{pv:s}=this,i=te(s)?s.length:1,r=t1(I.Float32,i),a=iD.floor(5*O),n=0;for(;n<a;){for(let t=0;t<i;t++)r[t]+=-e+2*e*iD.random();n++}let o=5*O,h=o-iD.floor(o),l=t1(I.Float32,i);if(i>1){for(let t=0;t<i;t++)l[t]=s[t]+r[t]+(-e+2*e*iD.random())*h;return l}return s+r[0]+(-e+2*e*iD.random())*h};function X(t,e){C(t,e,!0)}function K(t,e){k(t,e,!0)}s.loopIn&&(S=C=s.loopIn.bind(s)),s.loopOut&&(M=k=s.loopOut.bind(s)),s.smooth&&(A=s.smooth.bind(s));let Q=this.getValueAtTime.bind(this),tt=this.getVelocityAtTime.bind(this),{frameRate:ts,projectInterface:ti}=t.comp.globalData;function tr(t,e){let s=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=iD.atan2(s[0],iD.sqrt(s[1]*s[1]+s[2]*s[2]))/t0;return[-iD.atan2(s[1],s[2])/t0,i,0]}function ta(t){let s,r,a=t,n,o=i.length;if(0===i.length||"number"==typeof i[0])s=0,r=0;else if(s=-1,(a*=ts)<i[0].t)s=1,r=i[0].t;else{for(n=0;n<o-1;n+=1)if(a===i[n].t){s=n+1,r=i[n].t;break}else if(a>i[n].t&&a<i[n+1].t){a-i[n].t>i[n+1].t-a?(s=n+2,r=i[n+1].t):(s=n+1,r=i[n].t);break}-1===s&&(s=n+1,r=e.k[n].t)}return{index:s,time:r||0/ts}}function tn(t){let s=t;if(0===e.k.length||"number"==typeof e.k[0])throw Error(`The property has no keyframe at index ${s}`);s-=1;let i={time:e.k[s].t/ts,value:[]},r=Object.hasOwn(e.k[s],"s")?e.k[s].s:e.k[s-1].e,{length:a}=r??[];for(let t=0;t<a;t+=1)i[t]=r?.[t],i.value[t]=r?.[t];return i}function to(t,e){let s=e;return s||(s=ts),t/s}function th(t,e){let s=t,i=e;return s||0===s||(s=O),i||(i=ts),s*i}function tl(t){iD.seedrandom(g+t)}function tp(){return t.sourceRectAtTime()}function tm(t,e){return"string"==typeof B?void 0===e?B.slice(iD.max(0,t)):B.slice(t,e):""}function tc(t,e){return"string"==typeof B?void 0===e?B.slice(t):B.slice(t,e):""}let td=t.data.ind,tu=!!t.hierarchy?.length,tf=null;g=iD.floor(1e6*iD.random());let{globalData:tg}=t;function ty(t){B=Q(O=0===t?0:iD.floor(O*t)/t)}return function(e){return(B=e,this.frameExpressionId===tg.frameId&&this.propType!==R.TextSelector)?B:(this.propType===R.TextSelector&&(q=this.textIndex??0,j=this.textTotal??0,W=this.selectorValue),L||(G=t.layerInterface?.text,L=t.layerInterface,T=t.comp?.compInterface??null,F=L?.toWorld.bind(L)??null,E=L?.fromWorld.bind(L)??null,x=L?.fromComp.bind(L)??null,D=L?.toComp.bind(L)??null,P=L?.mask??null,w=x),!y&&(d=y=t.layerInterface?.getInterface("ADBE Transform Group"),y&&(_=y.anchorPoint)),4!==c||u||(u=L?.getInterface("ADBE Root Vectors Group")),f=f??L?.getInterface(4),t.hierarchy?.length&&!tf&&(tf=t.hierarchy?.[0].layerInterface??null),O=(this.comp?.renderedFrame??0)/(this.comp?.globalData?.frameRate??60),n&&tl(g+O),a&&(z=tt(O)),V(iN,i1,i5,i4,ij,i9,i7,d,U,i7,_,Z,ti,u,iW,i8,i0,i1,null,iJ,iU,iY,f,null,null,to,x,w,E,tg,p,iG,td,v,tn,i3,iX,tr,S,M,C,X,k,K,P,i5,i4,h,ta,iK,H,N,b,null,ty,Y,i8,i8,iZ,g,iq,null,null,tl,W,A,tp,i9,tc,tm,G,q,j,T,L,s,O,th,D,F,y,B,Q,z,m,J,null,null),this.frameExpressionId=tg.frameId,N.scoped_bm_rt?.propType===R.Shape?N.scoped_bm_rt.v:N.scoped_bm_rt)}},resetFrame:function(){iN={}}},re={getSpeedAtTime:function(t){let e=this.getValueAtTime(t),s=this.getValueAtTime(t+-.01),i=0;if(te(e)&&te(s)){let{length:t}=e;for(let r=0;r<t;r++)i+=Math.pow(s[r]-e[r],2);i=100*Math.sqrt(i)}else i=0;return i},getStaticValueAtTime:function(t,e){return this.pv},getValueAtTime:function(t){let e=t;return e*=this.elem?.globalData?.frameRate??60,e-=this.offsetTime,this._cachingAtTime&&e!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime?.value},getVelocityAtTime:function(t){let e;if(void 0!==this.vel)return this.vel;let s=this.getValueAtTime(t),i=this.getValueAtTime(t+-.001);if(te(s)&&te(i)){let{length:t}=s;e=t1(I.Float32,t);for(let r=0;r<t;r++)e[r]=-((i[r]-s[r])/.001);return e}return-((i-s)/.001)},searchExpressions:function(t,e,s){e?.x&&s&&(s.k=!0,s.x=!0,s.initiateExpression=rt.initiateExpression,s.effectsSequence.push(s.initiateExpression(t,e,s).bind(s)))},setGroupProperty:function(t){this.propertyGroup=t}};class rs extends eJ{inTangents(t){return this.vertices("i",t)}isClosed(){return!!this.v?.c}normalOnPath(t,e){return this.vectorOnPath(t,e,"normal")}outTangents(t){return this.vertices("o",t)}pointOnPath(t,e){let s,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0)),!this._segmentsLength&&i&&(this._segmentsLength=eD.getSegmentsLength(i));let r=this._segmentsLength,{lengths:a}=r??{lengths:[]},n=(r?.totalLength??0)*t,o=0,h=a.length,l=0;for(;o<h;){if(l+a[o].addedLength>n){let t=o,e=i?.c&&o===h-1?0:o+1,r=(n-l)/a[o].addedLength;i&&(s=eD.getPointInSegment(i.v[t],i.v[e],i.o[t],i.i[e],r,a[o]));break}l+=a[o].addedLength,o++}return i&&(s=s??(i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]])),s}points(t){return this.vertices("v",t)}tangentOnPath(t,e){return this.vectorOnPath(t,e,"tangent")}vectorOnPath(t,e,s){let i=t;1==i?i=Number(this.v?.c):0==i&&(i=.999);let r=this.pointOnPath(i,e)??[],a=this.pointOnPath(i+.001,e)??[],n=a[0]-r[0],o=a[1]-r[1],h=Math.sqrt(Math.pow(n,2)+Math.pow(o,2));return 0===h?[0,0]:"tangent"===s?[n/h,o/h]:[-o/h,n/h]}vertices(t,e){this.k&&this.getValue();let s=this.v;void 0!==e&&(s=this.getValueAtTime(e,0));let i=s?._length??0,r=s?.[t],a=s?.v,n=t2(i);for(let e=0;e<i;e+=1)"i"===t||"o"===t?n[e]=[r[e][0]-a[e][0],r[e][1]-a[e][1]]:n[e]=[r[e][0],r[e][1]];return n}constructor(...t){super(...t),this.getValueAtTime=re.getStaticValueAtTime,this.setGroupProperty=re.setGroupProperty}}let ri=(t,e)=>{let s,{length:i}=t;for(let r=0;r<i;r++){let i=Object.getOwnPropertyNames(s=t[r].prototype),{length:a}=i;for(let t=0;t<a;t++)"constructor"!==i[t]&&Object.hasOwn(s,i[t])&&(e.prototype[i[t]]=s[i[t]])}};function rr(t,e,s){let i,r,a;if(!this.k||this.keyframes?.length===0)return this.pv;let n=e,{comp:o,elem:h,keyframes:l=[],pv:p}=this;if(!h?.comp)throw Error("Element is not implemented");if(!o)throw Error("Comp is not implemented");let m=t?t.toLowerCase():"",c=o.renderedFrame??0,d=l[l.length-1].t,{frameRate:u}=h.comp.globalData??{frameRate:60};if(c<=d)return p;let f,g=0;switch(s?f=n?Math.abs(d-u*n):Math.max(0,d-h.data.ip):((!n||n>l.length-1)&&(n=l.length-1),f=d-(g=l[l.length-1-n].t)),m){case"pingpong":if(Math.floor((c-g)/f)%2!=0)return this.getValueAtTime((f-(c-g)%f+g)/u,0);break;case"offset":{let t=this.getValueAtTime(g/u,0),e=this.getValueAtTime(d/u,0),s=this.getValueAtTime(((c-g)%f+g)/u,0),n=Math.floor((c-g)/f);if(te(p)&&te(t)&&te(e)&&te(s)){for(i=0,r=(a=Array.from({length:t.length})).length;i<r;i++)a[i]=(e[i]-t[i])*n+s[i];return a}return(e-t)*n+s}case"continue":{let t=this.getValueAtTime(d/u,0),e=this.getValueAtTime((d-.001)/u,0);if(te(p)&&te(t)&&te(e)){for(i=0,r=(a=Array.from({length:t.length})).length;i<r;i+=1)a[i]=t[i]+(t[i]-e[i])*((c-d)/u)/5e-4;return a}return t+(c-d)/.001*(t-e)}}return this.getValueAtTime(((c-g)%f+g)/u,0)}function ra(t,e,s){let i,r,a,n,o;if(!this.k)return this.pv;let h=e,{comp:l,elem:p,keyframes:m=[],pv:c}=this;if(!p?.comp)throw Error("Element is not implemented");if(!l)throw Error("Comp is not implemented");let{frameRate:d}=p.comp.globalData??{frameRate:60},u=t?t.toLowerCase():"",f=l.renderedFrame??0,g=m[0].t;if(f>=g)return c;switch(s?(i=h?Math.abs(d*h):Math.max(0,p.data.op-g),r=g+i):((!h||h>m.length-1)&&(h=m.length-1),i=(r=m[h].t)-g),u){case"pingpong":if(Math.floor((g-f)/i)%2==0)return this.getValueAtTime(((g-f)%i+g)/d,0);break;case"offset":{let t=this.getValueAtTime(g/d,0),e=this.getValueAtTime(r/d,0),s=this.getValueAtTime((i-(g-f)%i+g)/d,0),h=Math.floor((g-f)/i)+1;if(te(c)&&te(t)&&te(e)&&te(s)){for(a=0,n=(o=Array.from({length:t.length})).length;a<n;a+=1)o[a]=s[a]-(e[a]-t[a])*h;return o}return s-(e-t)*h}case"continue":{let t=this.getValueAtTime(g/d,0),e=this.getValueAtTime((g+.001)/d,0);if(te(c)&&te(t)&&te(e)){for(a=0,n=(o=Array.from({length:t.length})).length;a<n;a+=1)o[a]=t[a]+(t[a]-e[a])*(g-f)/.001;return o}return t+(t-e)*(g-f)/.001}}return this.getValueAtTime((i-((g-f)%i+g))/d,0)}function rn(t,e){let s,{comp:i,k:r,pv:a}=this;if(!r)return a;let{renderedFrame:n=0}=i??{renderedFrame:0},{frameRate:o}=i?.globalData??{frameRate:60},h=.5*(t||.4),l=Math.floor(e||5);if(l<=1)return a;let p=n/o,m=p-h,c=l>1?(p+h-m)/(l-1):1,d=0,u,f;for(f=te(a)?t1(I.Float32,a.length):0;d<l;){if(s=this.getValueAtTime(m+d*c),te(a)&&te(f)&&te(s)){for(u=0;u<a.length;u++)f[u]+=s[u];d++;continue}f+=s,d++}if(te(a)&&te(f)){for(u=0;u<a.length;u+=1)f[u]/=l;return f}return f/l}function ro(t){this._transformCachingAtTime=this._transformCachingAtTime??{v:new t3};let{v:e}=this._transformCachingAtTime,{mult:s=1}=this.a??{mult:1},{mult:i=1}=this.s??{mult:1};if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){let i=this.a?.getValueAtTime(t)??[0,0,0];e.translate(-i[0]*s,-i[1]*s,i[2]*s)}if(this.appliedTransformations<2){let s=this.s?.getValueAtTime(t)??[0,0,0];e.scale(s[0]*i,s[1]*i,s[2]*i)}if(this.sk&&this.appliedTransformations<3){let s=this.sk.getValueAtTime(t),i=this.sa?.getValueAtTime(t)??0;e.skewFromAxis(-s*(this.sk.mult??1),i*(this.sa?.mult??1))}if(this.r&&this.appliedTransformations<4){let s=this.r.getValueAtTime(t);e.rotate(-s*(this.r.mult??1))}else if(!this.r&&this.appliedTransformations<4){let s=Number(this.rz?.getValueAtTime(t)),i=Number(this.ry?.getValueAtTime(t)),r=Number(this.rx?.getValueAtTime(t)),a=this.or?.getValueAtTime(t)??[];e.rotateZ(-s*(this.rz?.mult??1)).rotateY(i*(this.ry?.mult??1)).rotateX(r*(this.rx?.mult??1)).rotateZ(-a[2]*(this.or?.mult??1)).rotateY(a[1]*(this.or?.mult??1)).rotateX(a[0]*(this.or?.mult??1))}if(this.data.p?.s){let s=this.px?.getValueAtTime(t),i=this.py?.getValueAtTime(t);if(this.data.p.z){let r=this.pz?.getValueAtTime(t);e.translate(s*(this.px?.mult??1),i*(this.py?.mult??1),-r*(this.pz?.mult??1))}else e.translate(s*(this.px?.mult??1),i*(this.py?.mult??1),0)}else{let s=this.p?.getValueAtTime(t)??[0,0,0];e.translate(s[0]*(this.p?.mult??1),s[1]*(this.p?.mult??1),-s[2]*(this.p?.mult??1))}return e}function rh(){return this.v.clone(new t3)}function rl(t,e){this._cachingAtTime=this._cachingAtTime??{lastIndex:0,lastTime:-999999,shapeValue:eu.clone(this.pv)};let s=t;return s*=this.elem?.globalData?.frameRate??60,(s-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<s?this._caching?.lastIndex??0:0,this._cachingAtTime.lastTime=s,this.interpolateShape(s,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}class rp{constructor(t){this.comp=t,this._name=t.data?.nm,this.layer=this,this.height=t.data?.h||t.globalData?.compSize?.h,this.width=t.data?.w||t.globalData?.compSize?.w,this.pixelAspect=1,this.frameDuration=1/(t.globalData?.frameRate??60),this.displayStartTime=0,this.numLayers=t.layers?.length}getInterface(t){let e=0,{length:s}=this.comp.layers??[];for(;e<s;){if(this.comp.layers?.[e].nm===t||this.comp.layers?.[e].ind===t)return this.comp.elements[e].layerInterface;e++}return null}}let{resetFrame:rm}=rt;class rc{completeProperty(t,e,s){Object.defineProperty(t,"velocity",{get:()=>e.getVelocityAtTime(e.comp?.currentFrame??0)}),t.numKeys=e.keyframes?.length??0,t.key=function(i){let r;if(!t.numKeys)return 0;e.keyframes&&(r="s"in e.keyframes[i-1]?e.keyframes[i-1].s:"e"in e.keyframes[i-2]?e.keyframes[i-2].e:e.keyframes[i-2].s);let a=s===R.UniDimensional?new Number(r):{...r};return a.time=Number(e.keyframes?.[i-1].t)/(e.elem?.comp?.globalData?.frameRate??60),a.value=s===R.UniDimensional?r[0]:r,a},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}defaultGetter(){return this.defaultUnidimensionalValue}getInterface(t){return t?t.propType===R.UniDimensional?this.UnidimensionalPropertyInterface(t):this.MultidimensionalPropertyInterface(t):this.defaultGetter}MultidimensionalPropertyInterface(t){let e=t;e&&"pv"in e||(e=this.defaultMultidimensionalValue);let s=1/e?.mult,i=e.data?.l??e.pv.length,r=t1(I.Float32,i),a=t1(I.Float32,i);return r.value=a,this.completeProperty(r,e,"multidimensional"),function(){e.k&&e.getValue();for(let t=0;t<i;t+=1)a[t]=e.v[t]*s,r[t]=a[t];return r}}UnidimensionalPropertyInterface(t){let e=t;e&&"pv"in e||(e=this.defaultUnidimensionalValue);let s=1/e.mult,i=e.pv*s,r=new Number(i);return r.value=i,this.completeProperty(r,e,R.UniDimensional),()=>(e.k&&e.getValue(),i=e.v*s,r.value!==i&&((r=new Number(i)).value=i,r[0]=i,this.completeProperty(r,e,R.UniDimensional)),r)}constructor(){this.defaultMultidimensionalValue={mult:1,pv:[0,0,0],v:[0,0,0]},this.defaultUnidimensionalValue={mult:1,pv:0,v:0}}}function rd(t){return new rc().getInterface(t)}class ru{constructor(t,e){this.interfaceFunction=t,this.parentPropertyGroup=e}getInterface(t=1){return t<=0?this.interfaceFunction:this.parentPropertyGroup(t-1)}}class rf{constructor(t,e){this._name=t,this.propertyGroup=e}getInterface(t){return t<=0?this:this.propertyGroup(t-1)}}class rg{get numProperties(){return this.effects.length}constructor(t,e){this.effects=t,this.effectElements=e}getInterface(t){let e=0,{length:s}=this.effects;for(;e<s;){if(t===this.effects[e].nm||t===this.effects[e].mn||t===this.effects[e].ix)return this.effectElements[e];e++}return null}}class ry{get maskOpacity(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}get maskPath(){return this._mask.prop?.k&&this._mask.prop.getValue(),this._mask.prop}constructor(t,e){this._mask=t,this._data=e}}class rv{constructor(t,e){this.maskManager=t,this._masksInterfaces=t2(t.viewData.length);let{length:s}=t.viewData;for(let e=0;e<s;e++)this._masksInterfaces[e]=new ry(t.viewData[e],t.masksProperties[e])}getInterface(t){let e=0;for(;e<length;){if(this.maskManager.masksProperties[e].nm===t)return this._masksInterfaces[e];e++}return null}}class rb{get anchorPoint(){return rd(this.transform.a)}get opacity(){return rd(this.transform.o)}get orientation(){return rd(this.transform.or)}get position(){return this.transform.p?this._transformFactory?.():[this._px?.(),this._py?.(),this._pz?.()??0]}get rotation(){return rd(this.transform.r??this.transform.rz)}get scale(){return rd(this.transform.s)}get skew(){return rd(this.transform.sk)}get skewAxis(){return rd(this.transform.sa)}get xPosition(){return rd(this.transform.px)}get xRotation(){return rd(this.transform.rx)}get yPosition(){return rd(this.transform.py)}get yRotation(){return rd(this.transform.ry)}get zPosition(){return rd(this.transform.pz)}get zRotation(){return rd(this.transform.rz??this.transform.r)}constructor(t){this.transform=t,t.p?this._transformFactory=rd(t.p):(this._px=rd(t.px),this._py=rd(t.py),t.pz&&(this._pz=rd(t.pz)))}getInterface(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return this.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return this.rotation;case"ADBE Rotate X":return this.xRotation;case"ADBE Rotate Y":return this.yRotation;case"position":case"Position":case"ADBE Position":case 2:return this.position;case"ADBE Position_0":return this.xPosition;case"ADBE Position_1":return this.yPosition;case"ADBE Position_2":return this.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return this.anchorPoint;case"opacity":case"Opacity":case 11:return this.opacity;default:return null}}}class r_{getInterface(t){throw Error("Method not implemented")}}class rx extends r_{getInterface(t){let e=0,{length:s}=this.interfaces;for(;e<s;){if(this.interfaces[e]._name===t||this.interfaces[e].mn===t||this.interfaces[e].propertyIndex===t||this.interfaces[e].ix===t||this.interfaces[e].ind===t)return this.interfaces[e];e++}return"number"==typeof t?this.interfaces[t-1]:null}constructor(...t){super(...t),this.interfaces=[]}}class rw extends r_{get position(){return rd(this.prop?.p)}get size(){return rd(this.prop?.s)}getInterface(t){return this.shape?.p?.ix===t?this.position:this.shape?.s?.ix===t?this.size:null}}class rE extends r_{get color(){return rd(this.c)}get opacity(){return rd(this.o)}getInterface(t){return"Color"===t||"color"===t?this.color:"Opacity"===t||"opacity"===t?this.opacity:null}}class rC extends r_{get endPoint(){return rd(this.prop?.e)}get opacity(){return rd(this.prop?.o)}get startPoint(){return rd(this.prop?.s)}get type(){return"a"}getInterface(t){return"Start Point"===t||"start point"===t?this.startPoint:"End Point"===t||"end point"===t?this.endPoint:"Opacity"===t||"opacity"===t?this.opacity:null}}class rS extends r_{get _name(){return this.shape?.nm}getInterface(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return this.content;default:return this.transform}}}class rk extends r_{get position(){return rd(this.prop?.p)}get roundness(){return rd(this.prop?.r)}get size(){return rd(this.prop?.s)}getInterface(t){return this.shape?.p?.ix===t?this.position:this.shape?.r?.ix===t?this.roundness:this.shape?.s?.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?this.size:null}}class rM extends r_{get copies(){return rd(this.prop?.c)}get offset(){return rd(this.prop?.o)}getInterface(t){return this.shape?.c?.ix===t||"Copies"===t?this.copies:this.shape?.o?.ix===t||"Offset"===t?this.offset:null}}class rP extends r_{get radius(){return rd(this.prop?.rd)}getInterface(t){return this.shape?.r?.ix===t||"Round Corners 1"===t?this.radius:null}}class rA{get path(){return this.prop?.k&&this.prop.getValue(),this.prop}get shape(){return this.path}constructor(t,e,s){this.prop=e.sh;let i=new ru(this,s);this.prop?.setGroupProperty(new rf("Path",i)),this._name=t.nm,this.ix=t.ix,this.mn=t.mn,this.propertyGroup=s,this.propertyIndex=t.ix}getInterface(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?this.path:null}}class rT extends r_{get innerRadius(){return rd(this.prop?.ir)}get innerRoundness(){return rd(this.prop?.is)}get outerRadius(){return rd(this.prop?.or)}get outerRoundness(){return rd(this.prop?.os)}get points(){return rd(this.prop?.pt)}get position(){return rd(this.prop?.p)}get rotation(){return rd(this.prop?.r)}getInterface(t){return this.shape?.p?.ix===t?this.position:this.shape?.r?.ix===t?this.rotation:this.shape?.pt?.ix===t?this.points:this.shape?.or?.ix===t||"ADBE Vector Star Outer Radius"===t?this.outerRadius:this.shape?.os?.ix===t?this.outerRoundness:this.shape?.ir?.ix===t||"ADBE Vector Star Inner Radius"===t?this.innerRadius:this.shape?.is?.ix===t?this.innerRoundness:null}}class rD extends r_{get color(){return rd(this.prop?.c)}get dash(){return this.dashOb}get opacity(){return rd(this.prop?.o)}get strokeWidth(){return rd(this.prop?.w)}getInterface(t){return"Color"===t||"color"===t?this.color:"Opacity"===t||"opacity"===t?this.opacity:"Stroke Width"===t||"stroke width"===t?this.strokeWidth:null}}class rI extends r_{get anchorPoint(){return rd(this.prop?.transform?.mProps.a)}get opacity(){return rd(this.prop?.transform?.mProps.o)}get position(){return rd(this.prop?.transform?.mProps.p)}get rotation(){return rd(this.prop?.transform?.mProps.r)}get scale(){return rd(this.prop?.transform?.mProps.s)}get skew(){return rd(this.prop?.transform?.mProps.sk)}get skewAxis(){return rd(this.prop?.transform?.mProps.sa)}getInterface(t){return this.shape?.a?.ix===t||"Anchor Point"===t?this.anchorPoint:this.shape?.o?.ix===t||"Opacity"===t?this.opacity:this.shape?.p?.ix===t||"Position"===t?this.position:this.shape?.r?.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?this.rotation:this.shape?.s?.ix===t||"Scale"===t?this.scale:this.shape?.sk&&this.shape.sk.ix===t||"Skew"===t?this.skew:this.shape?.sa&&this.shape.sa.ix===t||"Skew Axis"===t?this.skewAxis:null}}class rF extends r_{get end(){return rd(this.prop?.e)}get offset(){return rd(this.prop?.o)}get start(){return rd(this.prop?.s)}getInterface(t){return t===this.shape?.e?.ix||"End"===t||"end"===t?this.end:t===this.shape?.s?.ix?this.start:t===this.shape?.o?.ix?this.offset:null}}let rL={comp:rp,effects:class{createEffectsInterface(t,e){if(t.effectsManager){this.effectsData=t.data?.ef??[];let{length:s}=t.effectsManager.effectElements;for(let i=0;i<s;i++)this.effectElements.push(this.createGroupInterface(this.effectsData[i],t.effectsManager.effectElements[i],e,t));return this.effects=t.data?.ef??[],new rg(this.effects,this.effectElements)}return null}createGroupInterface(t,e,s,i){let r=e=>{let s=t.ef??[],i=0,{length:r}=s;for(;i<r;){if(e===s[i].nm||e===s[i].mn||e===s[i].ix){if(5===s[i].ty)return this.effectElements[i];return this.effectElements[i]()}i++}throw Error()},a=new ru(r,s),{length:n}=t.ef??[];for(let s=0;s<n;s+=1)t.ef?.[s].ty===5?this.effectElements.push(this.createGroupInterface(t.ef[s],e.effectElements[s],e.effectElements[s].propertyGroup,i)):this.effectElements.push(this.createValueInterface(e.effectElements[s],t.ef[s].ty,i,a));return"ADBE Color Control"===t.mn&&Object.defineProperty(r,"color",{get(){return this.effectElements[0]()}}),Object.defineProperties(r,{_name:{value:t.nm},numProperties:{get:()=>t.np},propertyGroup:{value:a}}),r.enabled=0!==t.en,r.active=r.enabled,r}createValueInterface(t,e,s,i){let r=rd(t.p);return t.p?.setGroupProperty(new rf("",i)),function(){return 10===e?s.comp?.compInterface?.getInterface(t.p?.v):r()}}constructor(){this.effectElements=[],this.effects=[],this.effectsData=[]}},footage:class{constructor(t){this.currentPropertyName="",this.elem=t,this._name="Data",this.dataInterface=this.dataInterfaceFactory(t)}dataInterfaceFactory(t){return this._name="Outline",this.outlineInterface=this.outlineInterfaceFactory(t),this}getInterface(t){return"Data"===t?this.dataInterface:"Outline"===t?void this.outlineInterface():null}init(){return this.currentPropertyName="",this.currentProperty=this.elem.getFootageData(),this.searchProperty}outlineInterface(t){throw Error("Method is not implemented")}outlineInterfaceFactory(t){return this.currentPropertyName="",this.currentProperty=t.getFootageData(),this.elem=t,this.init}searchProperty(t){if(this.currentProperty?.[t])return(this.currentPropertyName=t,this.currentProperty=this.currentProperty[t],"object"==typeof this.currentProperty)?this.searchProperty:this.currentProperty;let e=t.indexOf(this.currentPropertyName);if(-1!==e){let s=parseInt(t.slice(e+this.currentPropertyName.length),10);return(this.currentProperty=this.currentProperty?.[s],"object"==typeof this.currentProperty)?this.searchProperty:this.currentProperty}return""}},layer:class{get active(){return this._elem.isInRange}get hasParent(){return!!this._elem.hierarchy?.length}get parent(){return this._elem.hierarchy?.[0].layerInterface}get transform(){return this.transformInterface}constructor(t){if(this.sourceRectAtTime=t.sourceRectAtTime.bind(t),this._elem=t,!t.finalTransform)throw Error(`FinalTransform is not iplemented in ${t.constructor.name}`);this.transformInterface=new rb(t.finalTransform.mProp);let{anchorPoint:e,opacity:s,position:i,rotation:r,scale:a}=this.transformInterface;this.anchor_point=e,this.anchorPoint=e,this.opacity=s,this.position=i,this.rotation=r,this.scale=a,this.toComp=this.toWorld;let{frameRate:n}=t.comp?.globalData??{frameRate:60};this.startTime=t.data.st,this.index=t.data.ind,this.source=t.data.refId,this.height=0===t.data.ty?t.data.h:100,this.width=0===t.data.ty?t.data.w:100,this.inPoint=t.data.ip/n,this.outPoint=t.data.op/n,this._name=t.data.nm}applyPoint(t,e){if(this._elem.hierarchy?.length){let{length:e}=this._elem.hierarchy;for(let s=0;s<e;s++)this._elem.hierarchy[s].finalTransform?.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}fromComp(t){let e=new t3;if(e.reset(),this._elem.finalTransform?.mProp.applyToMatrix(e),this._elem.hierarchy?.length){let t,s=this._elem.hierarchy.length;for(t=0;t<s;t+=1)this._elem.hierarchy[t].finalTransform?.mProp.applyToMatrix(e)}return e.inversePoint(t)}fromWorld(t,e){let s=this.getMatrix(e);return this.invertPoint(s,t)}fromWorldVec(t,e){let s=this.getMatrix(e);return s.props[12]=0,s.props[13]=0,s.props[14]=0,this.invertPoint(s,t)}getInterface(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return this.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return this.transformInterface;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return this.effect;case"ADBE Text Properties":return this.textInterface;default:return null}}getMatrix(t){let e=new t3;if(void 0===t){let t=this._elem.finalTransform?.mProp;t?.applyToMatrix(e)}else(this._elem.finalTransform?.mProp.getValueAtTime(t)).clone(e);return e}invertPoint(t,e){if(this._elem.hierarchy?.length){let{length:e}=this._elem.hierarchy;for(let s=0;s<e;s++)this._elem.hierarchy[s].finalTransform?.mProp.applyToMatrix(t)}return t.inversePoint(e)}registerEffectsInterface(t){this.effect=t}registerMaskInterface(t){this.mask=new rv(t,this._elem)}sampleImage(){return[1,1,1,1]}toComp(t,e){throw Error("Method is not implemented")}toWorld(t,e){let s=this.getMatrix(e);return this.applyPoint(s,t)}toWorldVec(t,e){let s=this.getMatrix(e);return s.props[12]=0,s.props[13]=0,s.props[14]=0,this.applyPoint(s,t)}},shape:class{constructor(t,e,s){this.arr=[],this.parentGroup=s,this.propertyGroup=new ru(this,this.parentGroupWrapper),this.interfaces=this.iterateElements(t,e,this.propertyGroup),this.numProperties=this.interfaces.length,this._name="Contents"}contentsInterfaceFactory(t,e,s){rx.prototype.propertyGroup=new ru(rx,s),this.interfaces=this.iterateElements(t.it??null,e.it,rx.prototype.propertyGroup),rx.prototype.numProperties=this.interfaces.length;let i=this.transformInterfaceFactory(t.it[t.it.length-1],e.it[e.it.length-1],rx.prototype.propertyGroup);return rx.prototype.transform=i,rx.prototype.propertyIndex=t.cix,rx.prototype._name=t.nm,rx.prototype.getInterface}defaultInterfaceFactory(){return this.noOp}ellipseInterfaceFactory(t,e,s){let i=new ru(rw,s);rw.prototype.shape=t,rw.prototype.propertyIndex=t.ix;let r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return r.s.setGroupProperty(new rf("Size",i)),r.p?.setGroupProperty(new rf("Position",i)),rw.prototype._name=t.nm,rw.prototype.prop=r,rw.prototype.mn=t.mn,rw.prototype.getInterface}fillInterfaceFactory(t,e,s){return rE.prototype._name=t.nm,rE.prototype.c=e.c,rE.prototype.mn=t.mn,rE.prototype.o=e.o,e.c?.setGroupProperty(new rf("Color",s)),e.o?.setGroupProperty(new rf("Opacity",s)),rE.prototype.getInterface}getInterface(t){let e=t;if("number"==typeof e)return 0===(e=t??1)?propertyGroup:this.interfaces[e-1];let s=0,{length:i}=this.interfaces;for(;s<i;){if(this.interfaces[s]._name===e)return this.interfaces[s];s++}return null}gradientFillInterfaceFactory(t,e,s){return rC.prototype._name=t.nm,rC.prototype.prop=e,rC.prototype.mn=t.mn,e.s?.setGroupProperty(new rf("Start Point",s)),e.e?.setGroupProperty(new rf("End Point",s)),e.o?.setGroupProperty(new rf("Opacity",s)),rC.prototype.getInterface}groupInterfaceFactory(t,e,s){rS.prototype.propertyGroup=new ru(rS,s);let i=this.contentsInterfaceFactory(t,e,rS.prototype.propertyGroup),r=this.transformInterfaceFactory(t.it[t.it.length-1],e.it[e.it.length-1],rS.prototype.propertyGroup);return rS.prototype.content=i,rS.prototype.transform=r,rS.prototype.shape=t,rS.prototype.numProperties=t.np,rS.prototype.propertyIndex=t.ix,rS.prototype.nm=t.nm,rS.prototype.mn=t.mn,rS.prototype.getInterface}iterateElements(t,e,s){let i=[],{length:r}=t??[];for(let a=0;a<r;a++)if(t)switch(t[a].ty){case N.Group:i.push(this.groupInterfaceFactory(t[a],e[a],s));break;case N.Fill:i.push(this.fillInterfaceFactory(t[a],e[a],s));break;case N.Stroke:i.push(this.strokeInterfaceFactory(t[a],e[a],s));break;case N.Trim:i.push(this.trimInterfaceFactory(t[a],e[a],s));break;case N.Transform:break;case N.Ellipse:i.push(this.ellipseInterfaceFactory(t[a],e[a],s));break;case N.PolygonStar:i.push(this.starInterfaceFactory(t[a],e[a],s));break;case N.Path:i.push(new rA(t[a],e[a],s));break;case N.Rectangle:i.push(this.rectInterfaceFactory(t[a],e[a],s));break;case N.RoundedCorners:i.push(this.roundedInterfaceFactory(t[a],e[a],s));break;case N.Repeater:i.push(this.repeaterInterfaceFactory(t[a],e[a],s));break;case N.GradientFill:i.push(this.gradientFillInterfaceFactory(t[a],e[a],s));break;default:i.push(this.defaultInterfaceFactory(t[a],e[a],s))}return i}parentGroupWrapper(){return this.parentGroup}rectInterfaceFactory(t,e,s){rk.prototype.shape=t;let i=new ru(rk,s),r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return rk.prototype.propertyIndex=t.ix,r.p?.setGroupProperty(new rf("Position",i)),r.s.setGroupProperty(new rf("Size",i)),r.r.setGroupProperty(new rf("Rotation",i)),rk.prototype.prop=r,rk.prototype._name=t.nm,rk.prototype.mn=t.mn,rk.prototype.getInterface}repeaterInterfaceFactory(t,e,s){rM.prototype.shape=t,rM.prototype.propertyIndex=t.ix,rM.prototype._name=t.nm,rM.prototype.mn=t.mn;let i=new ru(rM,s);return rM.prototype.prop=e,e.c?.setGroupProperty(new rf("Copies",i)),e.o?.setGroupProperty(new rf("Offset",i)),rM.prototype.getInterface}roundedInterfaceFactory(t,e,s){rP.prototype.shape=t,rP.prototype._name=t.nm,rP.prototype.propertyIndex=t.ix,rP.prototype.mn=t.mn;let i=new ru(rP,s);return e.rd.setGroupProperty(new rf("Radius",i)),rP.prototype.getInterface}starInterfaceFactory(t,e,s){rT.prototype.shape=t;let i=new ru(rT,s),r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return rT.prototype.propertyIndex=t.ix,r.or.setGroupProperty(new rf("Outer Radius",i)),r.os.setGroupProperty(new rf("Outer Roundness",i)),r.pt.setGroupProperty(new rf("Points",i)),r.p.setGroupProperty(new rf("Position",i)),r.r.setGroupProperty(new rf("Rotation",i)),t.ir&&(r.ir.setGroupProperty(new rf("Inner Radius",i)),r.is.setGroupProperty(new rf("Inner Roundness",i))),rT.prototype._name=t.nm,rT.prototype.prop=r,rT.prototype.mn=t.mn,rT.prototype.getInterface}strokeInterfaceFactory(t,e,s){let i={},r=new ru(rD,s),a=new ru(i,r),{length:n}=t.d??[];for(let s=0;s<n;s++){var o;o=s,Object.defineProperty(i,t.d?.[o].nm,{get:rd(e.d.dataProps[o].p)}),e.d.dataProps[s].p.setGroupProperty(a)}return rD.prototype._name=t.nm,rD.prototype.mn=t.mn,rD.prototype.dashOb=i,rD.prototype.prop=e,e.c?.setGroupProperty(new rf("Color",r)),e.o?.setGroupProperty(new rf("Opacity",r)),e.w?.setGroupProperty(new rf("Stroke Width",r)),rD.prototype.getInterface}transformInterfaceFactory(t,e,s){rI.prototype.shape=t;let i=new ru(rI,s);return e.transform?.mProps.o?.setGroupProperty(new rf("Opacity",i)),e.transform?.mProps.p?.setGroupProperty(new rf("Position",i)),e.transform?.mProps.a?.setGroupProperty(new rf("Anchor Point",i)),e.transform?.mProps.s?.setGroupProperty(new rf("Scale",i)),e.transform?.mProps.r?.setGroupProperty(new rf("Rotation",i)),e.transform?.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(new rf("Skew",i)),e.transform.mProps.sa?.setGroupProperty(new rf("Skew Angle",i))),e.transform?.op.setGroupProperty(new rf("Opacity",i)),rI.prototype._name=t.nm,rI.prototype.prop=e,rI.prototype.ty=N.Transform,rI.prototype.mn=t.mn,rI.prototype.propertyGroup=s,rI.prototype.getInterface}trimInterfaceFactory(t,e,s){rF.prototype.shape=t;let i=new ru(rF,s);return rF.prototype.propertyIndex=t.ix,e.s?.setGroupProperty(new rf("Start",i)),e.e?.setGroupProperty(new rf("End",i)),e.o?.setGroupProperty(new rf("Offset",i)),rF.prototype.propertyIndex=t.ix,rF.prototype.propertyGroup=s,rF.prototype._name=t.nm,rF.prototype.prop=e,rF.prototype.mn=t.mn,rF.prototype.getInterface}noOp(){return null}},text:class{get sourceText(){this.elem.textProperty?.getValue();let t=this.elem.textProperty?.currentData.t;return this._sourceText&&t===this._sourceText.value||(this._sourceText=new String(t),this._sourceText.value=t||new String(t),Object.defineProperty(this._sourceText,"style",{get(){return{fillColor:this.elem.textProperty.currentData.fc}}})),this._sourceText}constructor(t){this.elem=t}getInterface(t){return"ADBE Text Document"===t?this.sourceText:null}}},r$=(t,e,s)=>{if(0===t)return[];let i=e*e-4*t*s;if(i<0)return[];let r=-e/(2*t);if(0===i)return[r];let a=Math.sqrt(i)/(2*t);return[r-a,r+a]},rN=(t,e,s,i)=>[-t+3*e-3*s+i,3*t-6*e+3*s,-3*t+3*e,t],rV=(t,e,s)=>t*(1-s)+e*s,rR=(t,e,s)=>[rV(t[0],e[0],s),rV(t[1],e[1],s)],rO=(t,e)=>2*Math.abs(t.cx-e.cx)<t.width+e.width&&2*Math.abs(t.cy-e.cy)<t.height+e.height,rz=(t,e,s)=>{let i=t.boundingBox();return{bez:t,cx:i.cx,cy:i.cy,height:i.height,t:(e+s)/2,t1:e,t2:s,width:i.width}},rB=t=>{let e=t.bez.split(.5);return[rz(e[0],t.t1,t.t),rz(e[1],t.t,t.t2)]},rG=(t,e,s,i,r,a)=>{if(!rO(t,e))return;if(s>=a||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i)return void r.push([t.t,e.t]);let n=rB(t),o=rB(e);rG(n[0],o[0],s+1,i,r,a),rG(n[0],o[1],s+1,i,r,a),rG(n[1],o[0],s+1,i,r,a),rG(n[1],o[1],s+1,i,r,a)},rq=t=>new rj(t,t,t,t,!1);class rj{constructor(t,e,s,i,r){let a=e,n=s;r&&X(t,a)&&(a=rR(t,i,1/3)),r&&X(n,i)&&(n=rR(t,i,2/3));let o=rN(t[0],a[0],n[0],i[0]),h=rN(t[1],a[1],n[1],i[1]);this.a=[o[0],h[0]],this.b=[o[1],h[1]],this.c=[o[2],h[2]],this.d=[o[3],h[3]],this.points=[t,a,n,i]}boundingBox(){let t=this.bounds();return{bottom:t.y.max,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2,height:t.y.max-t.y.min,left:t.x.min,right:t.x.max,top:t.y.min,width:t.x.max-t.x.min}}bounds(){return{x:this._extrema(this,0),y:this._extrema(this,1)}}derivative(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]}inflectionPoints(){let t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(U(t))return[];let e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,s=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(s<0)return[];let i=Math.sqrt(s);return U(i)?i>0&&i<1?[e]:[]:[e-i,e+i].filter(t=>t>0&&t<1)}intersections(t,e,s){let i=e,r=s;i=i??2,r=r??7;let a=[];return rG(rz(this,0,1),rz(t,0,1),0,i,a,r),a}normalAngle(t){let e=this.derivative(t);return Math.atan2(e[0],e[1])}point(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]}split(t){if(t<=0)return[rq(this.points[0]),this];if(t>=1)return[this,rq(this.points[this.points.length-1])];let e=rR(this.points[0],this.points[1],t),s=rR(this.points[1],this.points[2],t),i=rR(this.points[2],this.points[3],t),r=rR(e,s,t),a=rR(s,i,t),n=rR(r,a,t);return[new rj(this.points[0],e,r,n,!0),new rj(n,a,i,this.points[3],!0)]}tangentAngle(t){let e=this.derivative(t);return Math.atan2(e[1],e[0])}_extrema(t,e){let s=t.points[0][e],i=t.points[t.points.length-1][e];if(s>i){let t=i;i=s,s=t}let r=r$(3*t.a[e],2*t.b[e],t.c[e]),{length:a}=r;for(let n=0;n<a;n++){if(r[n]<=0||r[n]>=1)continue;let a=t.point(r[n])[e];if(a<s){s=a;continue}a>i&&(i=a)}return{max:i,min:s}}}function rW(t,e){let s=(e+1)%t.length();return new rj(t.v[e],t.o[e],t.i[s],t.v[s],!0)}class rH extends e${addShape(t){if(this.closed)return;t.sh?.container?.addDynamicProperty(t.sh);let e={data:t,localShapeCollection:eg(),shape:t.sh};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}addShapeToModifier(t){}init(t,e,s,i){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=-999999,this.closed=!1,this.k=!1,this.dynamicProperties.length>0?this.k=!0:this.getValue(!0)}initModifierProperties(t,e){throw Error(`${this.constructor.name}: Method initModifierProperties is not implemented`)}isAnimatedWithShape(t){throw Error(`${this.constructor.name}: Method isAnimatedWithShape is not implemented`)}processKeys(){return this.elem?.globalData?.frameId===this.frameId||(this.frameId=this.elem?.globalData?.frameId,this.iterateDynamicProperties()),0}constructor(...t){super(...t),this.shapes=[]}}let rY=(t,e)=>[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]],rU=(t,e,s)=>[t[0]+Math.cos(e)*s,t[1]-Math.sin(e)*s],rJ=(t,e,s)=>{let i=Math.atan2(e[0]-t[0],e[1]-t[1]);return[rU(t,i,s),rU(e,i,s)]},rX=(t,e,s,i)=>{let r=[t[0],t[1],1],a=[e[0],e[1],1],n=[s[0],s[1],1],o=[i[0],i[1],1],h=rY(rY(r,a),rY(n,o));return U(h[2])?null:[h[0]/h[2],h[1]/h[2]]},rK=(t,e)=>Math.hypot(t[0]-e[0],t[1]-e[1]),rZ=(t,e,s,i,r)=>{let a=e.points[3],n=s.points[0];if(3===i||X(a,n))return a;if(2===i){let i=-e.tangentAngle(1),r=-s.tangentAngle(0)+Math.PI,o=rX(a,rU(a,i+Math.PI/2,100),n,rU(n,i+Math.PI/2,100)),h=o?rK(o,a):rK(a,n)/2,l=rU(a,i,2*h*.5519);return t.setXYAt(l[0],l[1],"o",t.length()-1),l=rU(n,r,2*h*.5519),t.setTripleAt(n[0],n[1],n[0],n[1],l[0],l[1],t.length()),n}let o=X(a,e.points[2])?e.points[0]:e.points[2],h=X(n,s.points[1])?s.points[3]:s.points[1],l=rX(o,a,n,h);return l&&rK(l,a)<r?(t.setTripleAt(l[0],l[1],l[0],l[1],l[0],l[1],t.length()),l):a},rQ=(t,e)=>{let s,i=(s=rJ(t.points[0],t.points[1],e))[0],r=s[1],a=(s=rJ(t.points[1],t.points[2],e))[0],n=s[1],o=(s=rJ(t.points[2],t.points[3],e))[0],h=s[1],l=rX(i,r,a,n);l=l??r;let p=rX(o,h,a,n);return new rj(i,l,p=p??o,h)},r0=(t,e)=>{let s,i,r,a=t.inflectionPoints();if(0===a.length)return[rQ(t,e)];if(1===a.length||Y(a[1],1))return s=(r=t.split(a[0]))[0],i=r[1],[rQ(s,e),rQ(i,e)];s=(r=t.split(a[0]))[0];let n=(a[1]-a[0])/(1-a[0]),o=(r=r[1].split(n))[0];return i=r[1],[rQ(s,e),rQ(o,e),rQ(i,e)]},r1=(t,e)=>{let s=t.intersections(e);return(s.length>0&&Y(s[0][0],1)&&s.shift(),s.length>0)?s[0]:null},r2=(t,e)=>{let s=[...t],i=[...e],r=r1(t[t.length-1],e[0]);return(r&&(s[t.length-1]=t[t.length-1].split(r[0])[0],i[0]=e[0].split(r[1])[1]),t.length>1&&e.length>1&&(r=r1(t[0],e[e.length-1])))?[[t[0].split(r[0])[0]],[e[e.length-1].split(r[1])[1]]]:[s,i]},r3=t=>{let e;for(let s=1;s<t.length;s++)e=r2(t[s-1],t[s]),t[s-1]=e[0],t[s]=e[1];return t.length>1&&(e=r2(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t},r5=(t,e)=>{let s=[e[0]-t[0],e[1]-t[1]],i=-(.5*Math.PI);return[Math.cos(i)*s[0]-Math.sin(i)*s[1],Math.sin(i)*s[0]+Math.cos(i)*s[1]]},r4=(t,e)=>{let s=0===e?t.length()-1:e-1,i=(e+1)%t.length(),r=r5(t.v[s],t.v[i]);return Math.atan2(0,1)-Math.atan2(r[1],r[0])},r6=(t,e,s,i,r,a,n)=>{let o=s-Math.PI/2,h=s+Math.PI/2,l=e[0]+Math.cos(s)*i*r,p=e[1]-Math.sin(s)*i*r;t.setTripleAt(l,p,l+Math.cos(o)*a,p-Math.sin(o)*a,l+Math.cos(h)*n,p-Math.sin(h)*n,t.length())},r8=(t,e,s,i,r,a,n)=>{let o=r4(e,s),h=e.v[s%e._length],l=e.v[0===s?e._length-1:s-1],p=e.v[(s+1)%e._length],m=2===a?Math.sqrt(Math.pow(h[0]-l[0],2)+Math.pow(h[1]-l[1],2)):0,c=2===a?Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)):0;r6(t,e.v[s%e._length]||[0,0],o,n,i,c/((r+1)*2),m/((r+1)*2))},r9=(t,e,s,i,r,a)=>{let n=a;for(let a=0;a<i;a++){let o=(a+1)/(i+1),h=2===r?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,l=e.normalAngle(o);r6(t,e.point(o),l,n,s,h/((i+1)*2),h/((i+1)*2)),n=-n}return n},r7={loadAnimation:function(t){try{let e=new tG;return tZ(e,null),e.setParams(t),e}catch(t){throw console.error("AnimationManager:\n",t),Error("Could not load animation")}}},at=setInterval(function(){J()||"complete"===document.readyState&&(clearInterval(at),function(){if(J())return;let t=[...document.getElementsByClassName("lottie"),...document.getElementsByClassName("bodymovin")],{length:e}=t;for(let s=0;s<e;s++)!function(t,e){try{if(!t)return null;let s=0;for(;s<tW;){if(tY[s].elem===t&&null!==tY[s].elem)return tY[s].animation;s++}let i=new tG;tZ(i,t),i.setData(t,e)}catch(t){throw console.error("AnimationManager:\n",t),Error("Could not register animation")}}(t[s],void 0)}())},100);G($.Canvas,class extends iM{constructor(t,e){super(),this.animationItem=t,this.renderConfig={className:e?.className||"",clearCanvas:e?.clearCanvas??!0,contentVisibility:e?.contentVisibility||"visible",context:e?.context??null,dpr:e?.dpr??1,id:e?.id||"",imagePreserveAspectRatio:e?.imagePreserveAspectRatio||L.Cover,preserveAspectRatio:e?.preserveAspectRatio||L.Contain,progressiveLoad:!!e?.progressiveLoad,runExpressions:e?.runExpressions??!0},this.animationItem.wrapper&&(this.renderConfig.dpr=e?.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={_mdf:!1,currentGlobalAlpha:-1,frameNum:-1,renderConfig:this.renderConfig},this.contextData=new iT,this.elements=[],this.pendingElements=[],this.transformMat=new t3,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))}createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new iP(t,this.globalData,this)}}),G($.SVG,ik),sX(F.TrimModifier,class extends rH{addPaths(t,e){let{length:s}=t;for(let i=0;i<s;i++)e.addShape(t[i])}addSegment(t,e,s,i,r,a,n){r.setXYAt(e[0],e[1],"o",a),r.setXYAt(s[0],s[1],"i",a+1),n&&r.setXYAt(t[0],t[1],"v",a),r.setXYAt(i[0],i[1],"v",a+1)}addSegmentFromArray(t,e,s,i){e.setXYAt(t[1],t[5],"o",s),e.setXYAt(t[2],t[6],"i",s+1),i&&e.setXYAt(t[0],t[4],"v",s),e.setXYAt(t[3],t[7],"v",s+1)}addShapes(t,e,s){let i=s,{pathsData:r=[],shape:a}=t,n=a?.paths?.shapes??[],o=a?.paths?._length||0,h,l,p=0,m,c,d,u=[],f,g=!0;i?(c=i._length,f=i._length):(i=em(),c=0,f=0),u.push(i);for(let t=0;t<o;t++){let{lengths:s}=r[t];for(h=1,i.c=n[t].c,l=n[t].c?s.length:s.length+1;h<l;h++){if(p+(m=s[h-1]).addedLength<e.s){p+=m.addedLength,i.c=!1;continue}if(p>e.e){i.c=!1;break}e.s<=p&&e.e>=p+m.addedLength?(this.addSegment(n[t].v[h-1],n[t].o[h-1],n[t].i[h],n[t].v[h],i,c,g),g=!1):(d=eE(n[t].v[h-1],n[t].v[h],n[t].o[h-1],n[t].i[h],(e.s-p)/m.addedLength,(e.e-p)/m.addedLength,s[h-1]),this.addSegmentFromArray(d,i,c,g),g=!1,i.c=!1),p+=m.addedLength,c++}if(n[t].c&&s.length>0){if(m=s[h-1],p<=e.e){let r=s[h-1].addedLength;e.s<=p&&e.e>=p+r?(this.addSegment(n[t].v[h-1],n[t].o[h-1],n[t].i[0],n[t].v[0],i,c,g),g=!1):(d=eE(n[t].v[h-1],n[t].v[0],n[t].o[h-1],n[t].i[0],(e.s-p)/r,(e.e-p)/r,s[h-1]),this.addSegmentFromArray(d,i,c,g),g=!1,i.c=!1)}else i.c=!1;p+=m.addedLength,c++}if(i._length&&(i.setXYAt(i.v[f][0],i.v[f][1],"i",f),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),p>e.e)break;t<o-1&&(i=em(),g=!0,u.push(i),c=0)}return u}addShapeToModifier(t){t.pathsData=[]}calculateShapeEdges(t,e,s,i,r){let a=[];e<=1?a.push({e,s:t}):t>=1?a.push({e:e-1,s:t-1}):a.push({e:1,s:t},{e:e-1,s:0});let n=[],{length:o}=a;for(let t=0;t<o;t++)if(!(a[t].e*r<i||a[t].s*r>i+s)){let e,o;e=a[t].s*r<=i?0:(a[t].s*r-i)/s,o=a[t].e*r>=i+s?1:(a[t].e*r-i)/s,n.push([e,o])}return 0===n.length&&n.push([0,0]),n}initModifierProperties(t,e){this.s=eW.getProp(t,e.s,0,.01,this),this.e=eW.getProp(t,e.e,0,.01,this),this.o=eW.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=this.s.effectsSequence.length>0||this.e.effectsSequence.length>0||this.o.effectsSequence.length>0}processShapes(t){let e,s;if(this._mdf||t){let t=Number(this.o?.v)%360/360;if(t<0&&t++,(e=Number(this.s?.v)>1?1+t:0>Number(this.s?.v)?0+t:Number(this.s?.v)+t)>(s=Number(this.e?.v)>1?1+t:0>Number(this.e?.v)?0+t:Number(this.e?.v)+t)){let t=e;e=s,s=t}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue||0,s=this.eValue||0;let i,r,a,n,o,h,l=0,{length:p}=this.shapes;if(s===e)for(let t=0;t<p;t++){this.shapes[t].localShapeCollection?.releaseShapes();let{shape:e}=this.shapes[t];e&&(e._mdf=!0,e.paths=this.shapes[t].localShapeCollection),this._mdf&&(this.shapes[t].pathsData.length=0)}else if((1!==s||0!==e)&&(0!==s||1!==e)){let m,c,d=[];for(let e=0;e<p;e++)if(m=this.shapes[e],m.shape?._mdf||this._mdf||t||2===this.m){if(i=m.shape?.paths,a=i?._length||0,h=0,!m.shape?._mdf&&m.pathsData?.length)h=m.totalShapeLength;else{for(r=0,n=this.releasePathsData(m.pathsData);r<a;r++)i&&(o=eC(i.shapes[r]),n.push(o),h+=o.totalLength);m.totalShapeLength=h,m.pathsData=n}l+=Number(h),m.shape&&(m.shape._mdf=!0)}else m.shape&&(m.shape.paths=m.localShapeCollection);let u=e,f=s,g=0,y;for(let t=p-1;t>=0;t--)if(m=this.shapes[t],m.shape?._mdf){if(!(c=m.localShapeCollection))throw Error(`${this.constructor.name}: Could not set localShapeCollection`);for(c.releaseShapes(),2===this.m&&p>1?(y=this.calculateShapeEdges(e,s,m.totalShapeLength||0,g,l),g+=Number(m.totalShapeLength)):y=[[u,f]],a=y.length,r=0;r<a;r++){u=y[r][0],f=y[r][1],d.length=0,f<=1?d.push({e:Number(m.totalShapeLength)*f,s:Number(m.totalShapeLength)*u}):u>=1?d.push({e:Number(m.totalShapeLength)*(f-1),s:Number(m.totalShapeLength)*(u-1)}):d.push({e:Number(m.totalShapeLength),s:Number(m.totalShapeLength)*u},{e:Number(m.totalShapeLength)*(f-1),s:0});let t=this.addShapes(m,d[0]);if(d[0].s!==d[0].e){if(d.length>1){let e=m.shape.paths?.shapes[m.shape.paths._length-1];if(e?.c){let e=t.pop();this.addPaths(t,c),t=this.addShapes(m,d[1],e)}else this.addPaths(t,c),t=this.addShapes(m,d[1])}this.addPaths(t,c)}}m.shape.paths=c}}else if(this._mdf)for(let t=0;t<p;t++){this.shapes[t].pathsData.length=0;let{shape:e}=this.shapes[t];e&&(e._mdf=!0)}}releasePathsData(t){let{length:e}=t;for(let s=0;s<e;s++)e_.release(t[s]);return t.length=0,t}}),sX(F.PuckerAndBloatModifier,class extends rH{initModifierProperties(t,e){this.getValue=this.processKeys,this.amount=eW.getProp(t,e.a,0,null,this),this._isAnimated=this.amount.effectsSequence.length>0}processPath(t,e){let s,i,r,a,n,o,h,l=e/100,p=[0,0],m=t._length;for(s=0;s<m;s++)p[0]+=t.v[s][0],p[1]+=t.v[s][1];p[0]/=m,p[1]/=m;let c=em();for(s=0,c.c=t.c;s<m;s++)i=t.v[s][0]+(p[0]-t.v[s][0])*l,r=t.v[s][1]+(p[1]-t.v[s][1])*l,a=t.o[s][0]+-((p[0]-t.o[s][0])*l),n=t.o[s][1]+-((p[1]-t.o[s][1])*l),o=t.i[s][0]+-((p[0]-t.i[s][0])*l),h=t.i[s][1]+-((p[1]-t.i[s][1])*l),c.setTripleAt(i,r,a,n,o,h,s);return c}processShapes(t){let{length:e}=this.shapes,s=this.amount?.v;if(0!==s){let i,r,a;for(let n=0;n<e;n++){if(a=(r=this.shapes[n]).localShapeCollection,!(!r.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),r.shape&&(r.shape._mdf=!0),i=r.shape?.paths?.shapes;let t=r.shape?.paths?._length||0;for(let e=0;e<t;e++){let t=i?.[e];t&&a?.addShape(this.processPath(t,s||0))}}r.localShapeCollection&&r.shape&&(r.shape.paths=r.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}),sX(F.RepeaterModifier,class extends rH{addShapeToModifier(t){t.pathsData=[]}applyTransforms(t,e,s,i,r,a){if(!i.s||!i.p||!i.a||!i.r)throw Error(`${this.constructor.name}: Missing required data from Transform`);let n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-r),h=i.s.v[1]+(1-i.s.v[1])*(1-r);t.translate(i.p.v[0]*n*r,i.p.v[1]*n*r,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*r),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),s.scale(a?1/o:o,a?1/h:h),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])}changeGroupRender(t,e){let{length:s}=t;for(let i=0;i<s;i++)t[i]._render=e,t[i].ty===N.Group&&this.changeGroupRender(t[i].it,e)}cloneElements(t){let e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e}init(t,e,s,i=[]){if(!tt(e))throw TypeError(`${this.constructor.name}: Method init, param arr must be array`);let r=Number(s);for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r--,this._elements.unshift(e[r]);if(this.dynamicProperties.length>0){this.k=!0;return}this.getValue(!0)}initModifierProperties(t,e){this.getValue=this.processKeys,this.c=eW.getProp(t,e.c,0,null,this),this.o=eW.getProp(t,e.o,0,null,this),e.tr&&(this.tr=sa.getTransformProperty(t,e.tr,this),this.so=eW.getProp(t,e.tr.so,0,.01,this),this.eo=eW.getProp(t,e.tr.eo,0,.01,this)),this.data=e,0===this.dynamicProperties.length&&this.getValue(!0),this._isAnimated=this.dynamicProperties.length>0,this.pMatrix=new t3,this.rMatrix=new t3,this.sMatrix=new t3,this.tMatrix=new t3,this.matrix=new t3}processShapes(t){let e,s;if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);let i,r,a,n,o,h=!1;if(!this._mdf&&!t){for(o=Number(this._currentCopies),a=0,n=1;o;)(i=this.elemsData[a].it)[i.length-1].transform.mProps._mdf=!1,i[i.length-1].transform.op._mdf=!1,o--,a+=n;return h}let l=Math.ceil(Number(this.c?.v));if(this._groups.length<l){for(;this._groups.length<l;){let t={it:this.cloneElements(this._elements),ty:"gr"};t.it?.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{e:0,s:0,t:0},{e:0,s:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:N.Transform}),this.arr.splice(0,0,t),this._groups.splice(0,0,t),this._currentCopies?this._currentCopies++:this._currentCopies=1}this.elem?.reloadShapes(),h=!0}o=0;let p=this._groups.length-1;for(a=0;a<=p-1;a++){if(e=o<l,this._groups[a]&&(this._groups[a]._render=e),this.changeGroupRender(this._groups[a].it??[],e),!e){let t=this.elemsData[a].it,e=t[t.length-1];0===e.transform.op.v?e.transform.op._mdf=!1:(e.transform.op._mdf=!0,e.transform.op.v=0)}o++}if(this._currentCopies=l,!this.matrix||!this.pMatrix||!this.rMatrix||!this.sMatrix||!this.tMatrix)throw Error(`${this.constructor.name}: Could not set Matrix`);if(!this.tr)throw Error(`${this.constructor.name}: Transformproperty is not set`);let m=Number(this.o?.v),c=m%1,d=m>0?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,f=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();let y=0;if(m>0){for(;y<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),y++;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),y+=c)}else if(m<0){for(;y>d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),y--;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),y-=c)}for(a=1===this.data.m?0:this._currentCopies-1,n=1===this.data.m?1:-1,o=this._currentCopies;o;){let{length:t}=r=(i=this.elemsData[a].it)[i.length-1].transform.mProps.v.props;if(i[i.length-1].transform.mProps._mdf=!0,i[i.length-1].transform.op._mdf=!0,i[i.length-1].transform.op.v=1===this._currentCopies?Number(this.so?.v):Number(this.so?.v)+(Number(this.eo?.v)-Number(this.so?.v))*(a/(this._currentCopies-1)),0===y)for(this.matrix.reset(),s=0;s<t;s++)r[s]=this.matrix.props[s];else{for((0!==a&&1===n||a!==this._currentCopies-1&&-1===n)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),s=0;s<t;s++)r[s]=this.matrix.props[s];this.matrix.reset()}y++,o--,a+=n}return h}resetElements(t){let{length:e}=t;for(let s=0;s<e;s++){t[s]._processed=!1;let{it:e}=t[s];t[s].ty===N.Group&&e&&this.resetElements(e)}}constructor(...t){super(...t),this.arr=[],this.elemsData=[],this._elements=[],this._groups=[]}}),sX(F.RoundCornersModifier,class extends rH{initModifierProperties(t,e){this.getValue=this.processKeys,this.rd=eW.getProp(t,e.r,0,null,this),this._isAnimated=this.rd.effectsSequence.length>0}processPath(t,e){let s=em();s.c=t.c;let i=t._length,r,a,n,o,h,l,p=0,m,c,d,u,f,g;for(let y=0;y<i;y++)r=t.v[y],n=t.o[y],a=t.i[y],r[0]===n[0]&&r[1]===n[1]&&r[0]===a[0]&&r[1]===a[1]?0!==y&&y!==i-1||t.c?(o=0===y?t.v[i-1]:t.v[y-1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,m=f=r[0]+(o[0]-r[0])*l,c=g=r[1]-(r[1]-o[1])*l,d=m-(m-r[0])*.5519,u=c-(c-r[1])*.5519,s.setTripleAt(m,c,d,u,f,g,p),p++,o=y===i-1?t.v[0]:t.v[y+1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,m=d=r[0]+(o[0]-r[0])*l,c=u=r[1]+(o[1]-r[1])*l,f=m-(m-r[0])*.5519,g=c-(c-r[1])*.5519,s.setTripleAt(m,c,d,u,f,g,p)):s.setTripleAt(r[0],r[1],n[0],n[1],a[0],a[1],p):s.setTripleAt(t.v[y][0],t.v[y][1],t.o[y][0],t.o[y][1],t.i[y][0],t.i[y][1],p),p++;return s}processShapes(t){let{length:e}=this.shapes,s=this.rd?.v;if(0!==s){let i,r,a;for(let n=0;n<e;n++){if(a=(i=this.shapes[n]).localShapeCollection,!(!i.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),i.shape&&(i.shape._mdf=!0),r=i.shape?.paths?.shapes??[];let t=i.shape?.paths?._length||0;for(let e=0;e<t;e++)a?.addShape(this.processPath(r[e],s))}i.shape&&(i.shape.paths=i.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}),sX(F.ZigZagModifier,class extends rH{initModifierProperties(t,e){this.getValue=this.processKeys,this.amplitude=eW.getProp(t,e.s,0,null,this),this.frequency=eW.getProp(t,e.r,0,null,this),this.pointsType=eW.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length>0||this.frequency.effectsSequence.length>0||this.pointsType.effectsSequence.length>0}processPath(t,e,s,i){let r=t._length,a=em();if(a.c=t.c,t.c||(r-=1),0===r)return a;let n=-1,o=rW(t,0);r8(a,t,0,e,s,i,n);for(let h=0;h<r;h++)n=r9(a,o,e,s,i,-n),o=h!==r-1||t.c?rW(t,(h+1)%r):null,r8(a,t,h+1,e,s,i,n);return a}processShapes(t){let e=Number(this.amplitude?.v),s=Math.max(0,Math.round(Number(this.frequency?.v))),i=Number(this.pointsType?.v);if(0!==e){let r,a,n,{length:o}=this.shapes;for(let h=0;h<o;h++){if(a=(r=this.shapes[h]).localShapeCollection,!(!r.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),r.shape&&(r.shape._mdf=!0),n=r.shape?.paths?.shapes??[];let{_length:t}=r.shape?.paths??{_length:0};for(let r=0;r<t;r++)a?.addShape(this.processPath(n[r],e,s,i))}r.shape&&(r.shape.paths=r.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}),sX(F.OffsetPathModifier,class extends rH{initModifierProperties(t,e){this.getValue=this.processKeys,this.amount=eW.getProp(t,e.a,0,null,this),this.miterLimit=eW.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length>0}processPath(t,e,s,i){let r=em();r.c=t.c;let a=t.length();t.c||(a-=1);let n,o=[];for(let s=0;s<a;s++)n=rW(t,s),o.push(r0(n,e));if(!t.c)for(let s=a-1;s>=0;s--)n=function(t,e){let s=(e+1)%t.length();return new rj(t.v[s],t.i[s],t.o[e],t.v[e],!0)}(t,s),o.push(r0(n,e));o=r3(o);let h=null,l=null,{length:p}=o;for(let t=0;t<p;t++){let e=o[t];l&&(h=rZ(r,l,e[0],s,i)),l=e[e.length-1];let{length:a}=e;for(let t=0;t<a;t++)n=e[t],h&&X(n.points[0],h)?r.setXYAt(n.points[1][0],n.points[1][1],"o",r.length()-1):r.setTripleAt(n.points[0][0],n.points[0][1],n.points[1][0],n.points[1][1],n.points[0][0],n.points[0][1],r.length()),r.setTripleAt(n.points[3][0],n.points[3][1],n.points[3][0],n.points[3][1],n.points[2][0],n.points[2][1],r.length()),h=n.points[3]}return p>0&&l&&rZ(r,l,o[0][0],s,i),r}processShapes(t){let{length:e}=this.shapes,s=Number(this.amount?.v),i=Number(this.miterLimit?.v),r=Number(this.lineJoin);if(0!==s){let a,n,o;for(let h=0;h<e;h++){if(o=(n=this.shapes[h]).localShapeCollection,!(!n.shape?._mdf&&!this._mdf&&!t)){o?.releaseShapes(),n.shape&&(n.shape._mdf=!0),a=n.shape?.paths?.shapes;let t=n.shape?.paths?._length||0;for(let e=0;e<t;e++){let t=a?.[e];t&&o?.addShape(this.processPath(t,s,r,i))}}n.shape&&(n.shape.paths=n.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}),tI.plugin={initExpressions:function(t){let e=0,s=[];if(!t.renderer.globalData)throw Error("Renderer -> GlobalData is not set");t.renderer.compInterface=new rp(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e++},t.renderer.globalData.popExpression=function(){0==--e&&function(){let{length:t}=s;for(let e=0;e<t;e++)s[e].release?.();s.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){s.includes(t)||s.push(t)}},resetFrame:rm},tI.interface=function(t){return rL[t]},function(){let{getTransformProperty:t}=sa;sa.getTransformProperty=function(e,s,i){let r=t(e,s,i);return r.dynamicProperties.length>0?r.getValueAtTime=ro.bind(r):r.getValueAtTime=rh.bind(r),r.setGroupProperty=re.setGroupProperty,r};let e=eW.getProp;eW.getProp=function(t,s,i,r,a){let n=e(t,s,i,r,a);n.kf?n.getValueAtTime=re.getValueAtTime.bind(n):n.getValueAtTime=re.getStaticValueAtTime.bind(n),n.setGroupProperty=re.setGroupProperty,n.loopOut=rr,n.loopIn=ra,n.smooth=rn,n.getVelocityAtTime=re.getVelocityAtTime.bind(n),n.getSpeedAtTime=re.getSpeedAtTime.bind(n),n.numKeys=s?.a===1?s.k.length:0,n.propertyIndex=s?.ix;let o=0;return 0!==i&&(o=t1(I.Float32,s?.a===1?s.k[0].s.length:(s?.k).length)),n._cachingAtTime={lastFrame:-999999,lastIndex:0,value:o},re.searchExpressions(t,s,n),n.k&&a?.addDynamicProperty(n),n};let s=eZ.getConstructorFunction(),i=eZ.getKeyframedConstructorFunction();ri([rs],s),ri([rs],i),i.prototype.getValueAtTime=rl,i.prototype.initiateExpression=rt.initiateExpression;let r=eZ.getShapeProp;eZ.getShapeProp=function(t,e,s,i,a){let n=r(t,e,s,i,a);return n&&(n.propertyIndex=e.ix,n.lock=!1,3===s?re.searchExpressions(t,e.pt,n):4===s&&re.searchExpressions(t,e.ks,n),n.k&&t.addDynamicProperty(n)),n}}(),im.prototype.getExpressionValue=function(t,e){let s=this.calculateExpression(e);if(t.t!==s){let e={};return this.copyData(e,t),e.t=s.toString(),e.__complete=!1,e}return t},im.prototype.searchProperty=function(){let t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=!!(t||e),this.kf},im.prototype.searchExpressions=function(){return this.data.d?.x?(this.calculateExpression=rt.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null},en(20,class extends t4{constructor(t,e,s,i,r){super(),this.filterManager=e;let a=tO("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",`${t7} 1 0`),this.linearFilter=a,a.setAttribute("result",`${i}_tint_1`),t.appendChild(a),(a=tO("feColorMatrix")).setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",`${i}_tint_2`),t.appendChild(a),this.matrixFilter=a;let n=this.createMergeNode(i,[r,`${i}_tint_1`,`${i}_tint_2`]);t.appendChild(n)}renderFrame(t){if(!t&&!this.filterManager._mdf)return;let e=this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",`${t7} ${i} 0`),this.matrixFilter.setAttribute("values",`${s[0]-e[0]} 0 0 0 ${e[0]} ${s[1]-e[1]} 0 0 0 ${e[1]} ${s[2]-e[2]} 0 0 0 ${e[2]} 0 0 0 1 0`)}},!0),en(21,class{constructor(t,e,s,i){this.filterManager=e;let r=tO("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",i),t.appendChild(r),this.matrixFilter=r}renderFrame(t){if(!t&&!this.filterManager._mdf)return;let e=this.filterManager.effectElements[2].p.v,s=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values",`0 0 0 0 ${e[0]} 0 0 0 0 ${e[1]} 0 0 0 0 ${e[2]} 0 0 0 ${s} 0`)}},!0),en(22,class{constructor(t,e,s){this.initialized=!1,this.filterManager=e,this.elem=s,this.paths=[]}initialize(){let t,e,s,i=[...this.elem.layerElement?.children??this.elem.layerElement?.childNodes??[]];1===this.filterManager.effectElements[1].p.v?(s=this.elem.maskManager?.masksProperties.length||0,e=0):s=(e=this.filterManager.effectElements[0].p.v-1)+1;let r=tO("g");for(r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-dashoffset","1");e<s;e++)t=tO("path"),r.appendChild(t),this.paths.push({m:e,p:t});if(3===this.filterManager.effectElements[10].p.v){let t=tO("mask"),e=K();t.id=e,t.setAttribute("mask-type","alpha"),t.appendChild(r),this.elem.globalData?.defs.appendChild(t);let s=tO("g");for(s.setAttribute("mask",`url(${t9()}#${e})`);i[0];)s.appendChild(i[0]);this.elem.layerElement?.appendChild(s),this.masker=t,r.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(i=[...this.elem.layerElement?.children??this.elem.layerElement?.childNodes??[]];i.length>0;)this.elem.layerElement?.removeChild(i[0]);this.elem.layerElement?.appendChild(r),this.elem.layerElement?.removeAttribute("mask"),r.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=r}renderFrame(t){let e,s;this.initialized||this.initialize();let{length:i}=this.paths;for(let r=0;r<i;r++)if(-1!==this.paths[r].m&&(e=this.elem.maskManager?.viewData[this.paths[r].m],s=this.paths[r].p,e&&(t||this.filterManager._mdf||e.prop?._mdf)&&s.setAttribute("d",e.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||e?.prop?._mdf)){let t;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){let e=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),i=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),r=s.getTotalLength();t=`0 0 0 ${r*e} `;let a=Math.floor(r*(i-e)/(1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01));for(let e=0;e<a;e++)t+=`1 ${2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01} `;t+=`0 ${10*r} 0 0`}else t=`1 ${2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01}`;s.setAttribute("stroke-dasharray",t)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker?.setAttribute("stroke-width",`${2*this.filterManager.effectElements[4].p.v}`),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker?.setAttribute("opacity",`${Number(this.filterManager.effectElements[6].p.v)}`),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){let t=this.filterManager.effectElements[3].p.v;this.pathMasker?.setAttribute("stroke",`rgb(${Math.floor(255*t[0])},${Math.floor(255*t[1])},${255*t[2]})`)}}},!1),en(23,class{constructor(t,e,s,i){this.filterManager=e;let r=tO("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),t.appendChild(r);let a=tO("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",i),this.matrixFilter=a;let n=tO("feFuncR");n.setAttribute("type","table"),a.appendChild(n),this.feFuncR=n;let o=tO("feFuncG");o.setAttribute("type","table"),a.appendChild(o),this.feFuncG=o;let h=tO("feFuncB");h.setAttribute("type","table"),a.appendChild(h),this.feFuncB=h,t.appendChild(a)}renderFrame(t){if(!t&&!this.filterManager._mdf)return;let e=this.filterManager.effectElements[0].p.v,s=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,r=`${i[0]} ${s[0]} ${e[0]}`,a=`${i[1]} ${s[1]} ${e[1]}`,n=`${i[2]} ${s[2]} ${e[2]}`;this.feFuncR.setAttribute("tableValues",r),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},!0),en(24,class{constructor(t,e,s,i){this.filterManager=e;let{effectElements:r}=this.filterManager,a=tO("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",a)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",a)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",a)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",a)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(a.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(a)),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&((a=tO("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",i),t.appendChild(a),this.feFuncRComposed=this.createFeFunc("feFuncR",a),this.feFuncGComposed=this.createFeFunc("feFuncG",a),this.feFuncBComposed=this.createFeFunc("feFuncB",a))}createFeFunc(t,e){let s=tO(t);return s.setAttribute("type","table"),e.appendChild(s),s}getTableValue(t,e,s,i,r){let a,n=0,o=Math.min(t,e),h=Math.max(t,e),l=t2(256),p,m=0,c=r-i,d=e-t;for(;n<=256;)p=(a=n/256)<=o?d<0?r:i:a>=h?d<0?i:r:i+c*Math.pow((a-t)/d,1/s),l[m]=p,m++,n+=256/255;return l.join(" ")}renderFrame(t){let e;if(!t&&!this.filterManager._mdf)return;let{effectElements:s}=this.filterManager;this.feFuncRComposed&&(t||s[3].p._mdf||s[4].p._mdf||s[5].p._mdf||s[6].p._mdf||s[7].p._mdf)&&(e=this.getTableValue(s[3].p.v,s[4].p.v,s[5].p.v,s[6].p.v,s[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed?.setAttribute("tableValues",e),this.feFuncBComposed?.setAttribute("tableValues",e)),this.feFuncR&&(t||s[10].p._mdf||s[11].p._mdf||s[12].p._mdf||s[13].p._mdf||s[14].p._mdf)&&(e=this.getTableValue(s[10].p.v,s[11].p.v,s[12].p.v,s[13].p.v,s[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||s[17].p._mdf||s[18].p._mdf||s[19].p._mdf||s[20].p._mdf||s[21].p._mdf)&&(e=this.getTableValue(s[17].p.v,s[18].p.v,s[19].p.v,s[20].p.v,s[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||s[24].p._mdf||s[25].p._mdf||s[26].p._mdf||s[27].p._mdf||s[28].p._mdf)&&(e=this.getTableValue(s[24].p.v,s[25].p.v,s[26].p.v,s[27].p.v,s[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||s[31].p._mdf||s[32].p._mdf||s[33].p._mdf||s[34].p._mdf||s[35].p._mdf)&&(e=this.getTableValue(s[31].p.v,s[32].p.v,s[33].p.v,s[34].p.v,s[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},!0),en(25,class extends t4{constructor(t,e,s,i,r){super();let a=(e.container?.globalData?.renderConfig).filterSize,n=e.data?.fs??a??{height:"100%",width:"100%",x:"0%",y:"0%"};t.setAttribute("x",n.x),t.setAttribute("y",n.y),t.setAttribute("width",n.width),t.setAttribute("height",n.height),this.filterManager=e;let o=tO("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",`${i}_drop_shadow_1`),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,t.appendChild(o);let h=tO("feOffset");h.dx.baseVal=25,h.dy.baseVal=0,h.setAttribute("in",`${i}_drop_shadow_1`),h.setAttribute("result",`${i}_drop_shadow_2`),this.feOffset=h,t.appendChild(h);let l=tO("feFlood");l.setAttribute("flood-color","#00ff00"),l.setAttribute("flood-opacity","1"),l.setAttribute("result",`${i}_drop_shadow_3`),this.feFlood=l,t.appendChild(l);let p=tO("feComposite");p.setAttribute("in",`${i}_drop_shadow_3`),p.in2.baseVal=`${i}_drop_shadow_2`,p.setAttribute("operator","in"),p.result.baseVal=`${i}_drop_shadow_4`,t.appendChild(p);let m=this.createMergeNode(i,[`${i}_drop_shadow_4`,r]);t.appendChild(m)}renderFrame(t){if(t||this.filterManager._mdf){if(t||this.filterManager.effectElements[4].p._mdf){let t=this.filterManager.effectElements[4].p.v/4;this.feGaussianBlur.setStdDeviation(t,t)}if(t||this.filterManager.effectElements[0].p._mdf){let t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",tr(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",`${this.filterManager.effectElements[1].p.v/255}`),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){let t=this.filterManager.effectElements[3].p.v,e=(this.filterManager.effectElements[2].p.v-90)*t0,s=t*Math.cos(e),i=t*Math.sin(e);this.feOffset.dx.baseVal=s,this.feOffset.dy.baseVal=i}}}},!0),en(28,class{constructor(t,e,s){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=s,s.matteElement=tO("g"),s.layerElement&&s.matteElement.appendChild(s.layerElement),s.transformedElement&&s.matteElement.appendChild(s.transformedElement),s.baseElement=s.matteElement}findSymbol(t){let e=0,{length:s}=t6;for(;e<s;){if(t6[e]===t)return t6[e];e++}return null}initialize(){let t=this.filterManager.effectElements[0].p.v,e=this.elem.comp?.elements??[],s=0,{length:i}=e;for(;s<i;)e[s]&&e[s].data.ind===t&&this.setElementAsMask(this.elem,e[s]),s++;this.initialized=!0}renderFrame(t){this.initialized||this.initialize()}replaceInParent(t,e){let s,i=t.layerElement?.parentNode;if(!i)return;let{children:r}=i,a=0,{length:n}=r;for(;a<n&&r[a]!==t.layerElement;)a++;a<=n-2&&(s=r[a+1]);let o=tO("use");o.setAttribute("href",`#${e}`),s?i.insertBefore(o,s):i.appendChild(o)}setElementAsMask(t,e){if(!this.findSymbol(e)){let s=K(),i=tO("mask");e.layerId&&(i.id=e.layerId),i.setAttribute("mask-type","alpha"),t6.push(e);let{defs:r}=t.globalData??{defs:null};r?.appendChild(i);let a=tO("symbol");a.id=s,this.replaceInParent(e,s),e.layerElement&&a.appendChild(e.layerElement),r?.appendChild(a);let n=tO("use");n.href.baseVal=`#${s}`,i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId||"")}},!1),en(29,class{constructor(t,e,s,i){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;let r=tO("feGaussianBlur");r.setAttribute("result",i),t.appendChild(r),this.feGaussianBlur=r}renderFrame(t){if(!t&&!this.filterManager._mdf)return;let e=.3*this.filterManager.effectElements[0].p.v,s=Number(this.filterManager.effectElements[1].p.v);this.feGaussianBlur.setAttribute("stdDeviation",`${3===s?0:e} ${2===s?0:e}`);let i=1===Number(this.filterManager.effectElements[2].p.v)?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",i)}},!0),en(35,class extends t5{constructor(t,e){super(),this.init(e)}},!1),f=class extends t5{constructor(t){super(),this.init(t)}},et[35]={countsAsEffect:void 0,effect:f};let ae=Symbol("UPDATE_ON_CONNECTED");a()&&(global.HTMLElement=class{});class as extends HTMLElement{constructor(){super(),ae in this&&(this[ae]=[]);let{observedProperties:t=[]}=this.constructor,{length:e}=t;for(let s=0;s<e;s++){let e=this[t[s]],i=Symbol(t[s]);this[i]=e,Object.defineProperty(this,t[s],{get(){return this[i]},set(e){let r=this[i];this[i]=e,this.propertyChangedCallback(t[s],r,e)}}),void 0!==e&&ae in this&&Array.isArray(this[ae])&&this[ae].push(t[s])}}async connectedCallback(){let t=[];ae in this&&Array.isArray(this[ae])&&(t=this[ae]);let{length:e}=t;for(let s=0;s<e;s++)"propertyChangedCallback"in this&&"function"==typeof this.propertyChangedCallback&&t[s]in this&&this.propertyChangedCallback(t[s],void 0,this[t[s]])}propertyChangedCallback(t,e,s){throw Error(`${this.constructor.name}: Method propertyChangedCallback is not implemented`)}}var ai=((g={}).Contain="contain",g.Cover="cover",g.Fill="fill",g.None="none",g.ScaleDown="scale-down",g),ar=((y={}).Completed="completed",y.Destroyed="destroyed",y.Error="error",y.Frozen="frozen",y.Loading="loading",y.Paused="paused",y.Playing="playing",y.Stopped="stopped",y),aa=((v={}).Bounce="bounce",v.Normal="normal",v),an=((b={}).Complete="complete",b.Destroyed="destroyed",b.Error="error",b.Frame="frame",b.Freeze="freeze",b.Load="load",b.Loop="loop",b.Next="next",b.Pause="pause",b.Play="play",b.Previous="previous",b.Ready="ready",b.Rendered="rendered",b.Stop="stop",b),ao=((_={}).Contain="xMidYMid meet",_.Cover="xMidYMid slice",_.Initial="none",_.None="xMinYMin slice",_),ah=((x={}).Canvas="canvas",x.HTML="html",x.SVG="svg",x);function al(){if(!this.shadow)throw Error("No Shadow Element");let t=this.shadow.querySelector("slot[name=controls]");if(!t)return;if(!this.controls){t.innerHTML="";return}t.innerHTML=`<div class="lottie-controls toolbar ${this.playerState===ar.Error?"has-error":""}" aria-label="Lottie Animation controls"><button class="togglePlay" data-active="false" aria-label="Toggle Play/Pause"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M8.016 5.016L18.985 12 8.016 18.984V5.015z"/></svg></button> <button class="stop" data-active="true" aria-label="Stop"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M6 6h12v12H6V6z"/></svg></button> <button class="prev" aria-label="Previous animation" hidden><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.9 18.2 8.1 12l9.8-6.2v12.4zm-10.3 0H6.1V5.8h1.5v12.4z"/></svg></button> <button class="next" aria-label="Next animation" hidden><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="m6.1 5.8 9.8 6.2-9.8 6.2V5.8zM16.4 5.8h1.5v12.4h-1.5z"/></svg></button><form class="progress-container${this.simple?" simple":""}"><input class="seeker" type="range" min="0" max="100" step="1" value="${this._seeker.toString()}" aria-valuemin="0" aria-valuemax="100" role="slider" aria-valuenow="${this._seeker.toString()}" tabindex="0" aria-label="Slider for search"><progress max="100" value="${this._seeker}"></progress></form>${this.simple?"":`<button class="toggleLoop" data-active="${this.loop}" tabindex="0" aria-label="Toggle loop"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"/></svg></button> <button class="toggleBoomerang" data-active="${this.mode===aa.Bounce}" aria-label="Toggle boomerang" tabindex="0"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="m11.8 13.2-.3.3c-.5.5-1.1 1.1-1.7 1.5-.5.4-1 .6-1.5.8-.5.2-1.1.3-1.6.3s-1-.1-1.5-.3c-.6-.2-1-.5-1.4-1-.5-.6-.8-1.2-.9-1.9-.2-.9-.1-1.8.3-2.6.3-.7.8-1.2 1.3-1.6.3-.2.6-.4 1-.5.2-.2.5-.2.8-.3.3 0 .7-.1 1 0 .3 0 .6.1.9.2.9.3 1.7.9 2.4 1.5.4.4.8.7 1.1 1.1l.1.1.4-.4c.6-.6 1.2-1.2 1.9-1.6.5-.3 1-.6 1.5-.7.4-.1.7-.2 1-.2h.9c1 .1 1.9.5 2.6 1.4.4.5.7 1.1.8 1.8.2.9.1 1.7-.2 2.5-.4.9-1 1.5-1.8 2-.4.2-.7.4-1.1.4-.4.1-.8.1-1.2.1-.5 0-.9-.1-1.3-.3-.8-.3-1.5-.9-2.1-1.5-.4-.4-.8-.7-1.1-1.1h-.3zm-1.1-1.1c-.1-.1-.1-.1 0 0-.3-.3-.6-.6-.8-.9-.5-.5-1-.9-1.6-1.2-.4-.3-.8-.4-1.3-.4-.4 0-.8 0-1.1.2-.5.2-.9.6-1.1 1-.2.3-.3.7-.3 1.1 0 .3 0 .6.1.9.1.5.4.9.8 1.2.5.4 1.1.5 1.7.5.5 0 1-.2 1.5-.5.6-.4 1.1-.8 1.6-1.3.1-.3.3-.5.5-.6zM13 12c.5.5 1 1 1.5 1.4.5.5 1.1.9 1.9 1 .4.1.8 0 1.2-.1.3-.1.6-.3.9-.5.4-.4.7-.9.8-1.4.1-.5 0-.9-.1-1.4-.3-.8-.8-1.2-1.7-1.4-.4-.1-.8-.1-1.2 0-.5.1-1 .4-1.4.7-.5.4-1 .8-1.4 1.2-.2.2-.4.3-.5.5z"/></svg></button> <button class="toggleSettings" aria-label="Settings" aria-haspopup="true" aria-expanded="${!!this._isSettingsOpen}" aria-controls="${this._identifier}-settings"><svg width="24" height="24" aria-hidden="true" focusable="false"><circle cx="12" cy="5.4" r="2.5"/><circle cx="12" cy="12" r="2.5"/><circle cx="12" cy="18.6" r="2.5"/></svg></button><div id="${this._identifier}-settings" class="popover" hidden><button class="convert" aria-label="Convert JSON animation to dotLottie format" hidden><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"/></svg> Convert to dotLottie</button> <button class="snapshot" aria-label="Download still image"><svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M16.8 10.8 12 15.6l-4.8-4.8h3V3.6h3.6v7.2h3zM12 15.6H3v4.8h18v-4.8h-9zm7.8 2.4h-2.4v-1.2h2.4V18z"/></svg> Download still image</button></div>`}</div>`;let e=this.shadow.querySelector(".togglePlay");e instanceof HTMLButtonElement&&(e.onclick=this.togglePlay);let s=this.shadow.querySelector(".stop");s instanceof HTMLButtonElement&&(s.onclick=this.stop);let i=this.shadow.querySelector(".prev");i instanceof HTMLButtonElement&&(i.onclick=this.prev);let r=this.shadow.querySelector(".next");r instanceof HTMLButtonElement&&(r.onclick=this.next);let a=this.shadow.querySelector(".seeker");if(a instanceof HTMLInputElement&&(a.onchange=this._handleSeekChange,a.onmousedown=this._freeze),!this.simple){let t=this.shadow.querySelector(".toggleLoop");t instanceof HTMLButtonElement&&(t.onclick=this.toggleLoop);let e=this.shadow.querySelector(".toggleBoomerang");e instanceof HTMLButtonElement&&(e.onclick=this.toggleBoomerang);let s=this.shadow.querySelector(".convert");s instanceof HTMLButtonElement&&(s.onclick=this.convert);let i=this.shadow.querySelector(".snapshot");i instanceof HTMLButtonElement&&(i.onclick=()=>this.snapshot(!0));let r=this.shadow.querySelector(".toggleSettings");r instanceof HTMLButtonElement&&(r.onclick=this._handleSettingsClick,r.onblur=this._handleBlur)}}async function ap(){if(!this.shadow)throw Error("No Shadow Element");this.template.innerHTML=`<div class="animation-container main" data-controls="${this.controls??!1}" lang="${this.description?document.documentElement.lang:"en"}" aria-label="${this.description??"Lottie animation"}" data-loaded="${this._playerState.loaded}"><figure class="animation" style="background:${this.background}">${this.playerState===ar.Error?`<div class="error"><svg preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="1920" height="1080" viewBox="0 0 1920 1080"><path fill="#fff" d="M0 0h1920v1080H0z"/><path fill="#3a6d8b" d="M1190.2 531 1007 212.4c-22-38.2-77.2-38-98.8.5L729.5 531.3c-21.3 37.9 6.1 84.6 49.5 84.6l361.9.3c43.7 0 71.1-47.3 49.3-85.2zM937.3 288.7c.2-7.5 3.3-23.9 23.2-23.9 16.3 0 23 16.1 23 23.5 0 55.3-10.7 197.2-12.2 214.5-.1 1-.9 1.7-1.9 1.7h-18.3c-1 0-1.8-.7-1.9-1.7-1.4-17.5-13.4-162.9-11.9-214.1zm24.2 283.8c-13.1 0-23.7-10.6-23.7-23.7s10.6-23.7 23.7-23.7 23.7 10.6 23.7 23.7-10.6 23.7-23.7 23.7zM722.1 644h112.6v34.4h-70.4V698h58.8v31.7h-58.8v22.6h72.4v36.2H722.1V644zm162 57.1h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6zm78.9 0h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5H963v15.6zm39.5 36.2c0-31.3 22.2-54.8 56.6-54.8 34.4 0 56.2 23.5 56.2 54.8s-21.8 54.6-56.2 54.6c-34.4-.1-56.6-23.3-56.6-54.6zm74 0c0-17.4-6.1-29.1-17.8-29.1-11.7 0-17.4 11.7-17.4 29.1 0 17.4 5.7 29.1 17.4 29.1s17.8-11.8 17.8-29.1zm83.1-36.2h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6z"/><path fill="none" d="M718.9 807.7h645v285.4h-645z"/><text fill="#3a6d8b" style="text-align:center;position:absolute;left:100%;font-size:47px;font-family:system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',sans-serif" x="50%" y="848.017" text-anchor="middle">${this._errorMessage}</text></svg></div>`:""}</figure><slot name="controls"></slot></div>`,this.shadow.adoptedStyleSheets=[await nY.styles()],this.shadow.appendChild(this.template.content.cloneNode(!0))}var am={},ac=function(t,e,s,i,r){var a=new Worker(am[e]||(am[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(t){var e=t.data,s=e.$e$;if(s){var i=Error(s[0]);i.code=s[1],i.stack=s[2],r(i,null)}else r(null,e)},a.postMessage(s,i),a},ad=Uint8Array,au=Uint16Array,af=Int32Array,ag=new ad([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ay=new ad([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),av=new ad([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ab=function(t,e){for(var s=new au(31),i=0;i<31;++i)s[i]=e+=1<<t[i-1];for(var r=new af(s[30]),i=1;i<30;++i)for(var a=s[i];a<s[i+1];++a)r[a]=a-s[i]<<5|i;return{b:s,r:r}},a_=ab(ag,2),ax=a_.b,aw=a_.r;ax[28]=258,aw[258]=28;for(var aE=ab(ay,0),aC=aE.b,aS=aE.r,ak=new au(32768),aM=0;aM<32768;++aM){var aP=(43690&aM)>>1|(21845&aM)<<1;aP=(61680&(aP=(52428&aP)>>2|(13107&aP)<<2))>>4|(3855&aP)<<4,ak[aM]=((65280&aP)>>8|(255&aP)<<8)>>1}for(var aA=function(t,e,s){for(var i,r=t.length,a=0,n=new au(e);a<r;++a)t[a]&&++n[t[a]-1];var o=new au(e);for(a=1;a<e;++a)o[a]=o[a-1]+n[a-1]<<1;if(s){i=new au(1<<e);var h=15-e;for(a=0;a<r;++a)if(t[a])for(var l=a<<4|t[a],p=e-t[a],m=o[t[a]-1]++<<p,c=m|(1<<p)-1;m<=c;++m)i[ak[m]>>h]=l}else for(a=0,i=new au(r);a<r;++a)t[a]&&(i[a]=ak[o[t[a]-1]++]>>15-t[a]);return i},aT=new ad(288),aM=0;aM<144;++aM)aT[aM]=8;for(var aM=144;aM<256;++aM)aT[aM]=9;for(var aM=256;aM<280;++aM)aT[aM]=7;for(var aM=280;aM<288;++aM)aT[aM]=8;for(var aD=new ad(32),aM=0;aM<32;++aM)aD[aM]=5;var aI=aA(aT,9,0),aF=aA(aT,9,1),aL=aA(aD,5,0),a$=aA(aD,5,1),aN=function(t){for(var e=t[0],s=1;s<t.length;++s)t[s]>e&&(e=t[s]);return e},aV=function(t,e,s){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(7&e)&s},aR=function(t,e){var s=e/8|0;return(t[s]|t[s+1]<<8|t[s+2]<<16)>>(7&e)},aO=function(t){return(t+7)/8|0},az=function(t,e,s){return(null==e||e<0)&&(e=0),(null==s||s>t.length)&&(s=t.length),new ad(t.subarray(e,s))},aB=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],aG=function(t,e,s){var i=Error(e||aB[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,aG),!s)throw i;return i},aq=function(t,e,s,i){var r=t.length,a=i?i.length:0;if(!r||e.f&&!e.l)return s||new ad(0);var n=!s,o=n||2!=e.i,h=e.i;n&&(s=new ad(3*r));var l=function(t){var e=s.length;if(t>e){var i=new ad(Math.max(2*e,t));i.set(s),s=i}},p=e.f||0,m=e.p||0,c=e.b||0,d=e.l,u=e.d,f=e.m,g=e.n,y=8*r;do{if(!d){p=aV(t,m,1);var v=aV(t,m+1,3);if(m+=3,v)if(1==v)d=aF,u=a$,f=9,g=5;else if(2==v){var b=aV(t,m,31)+257,_=aV(t,m+10,15)+4,x=b+aV(t,m+5,31)+1;m+=14;for(var w=new ad(x),E=new ad(19),C=0;C<_;++C)E[av[C]]=aV(t,m+3*C,7);m+=3*_;for(var S=aN(E),k=(1<<S)-1,M=aA(E,S,1),C=0;C<x;){var P=M[aV(t,m,k)];m+=15&P;var A=P>>4;if(A<16)w[C++]=A;else{var T=0,D=0;for(16==A?(D=3+aV(t,m,3),m+=2,T=w[C-1]):17==A?(D=3+aV(t,m,7),m+=3):18==A&&(D=11+aV(t,m,127),m+=7);D--;)w[C++]=T}}var I=w.subarray(0,b),F=w.subarray(b);f=aN(I),g=aN(F),d=aA(I,f,1),u=aA(F,g,1)}else aG(1);else{var A=aO(m)+4,L=t[A-4]|t[A-3]<<8,$=A+L;if($>r){h&&aG(0);break}o&&l(c+L),s.set(t.subarray(A,$),c),e.b=c+=L,e.p=m=8*$,e.f=p;continue}if(m>y){h&&aG(0);break}}o&&l(c+131072);for(var N=(1<<f)-1,V=(1<<g)-1,R=m;;R=m){var T=d[aR(t,m)&N],O=T>>4;if((m+=15&T)>y){h&&aG(0);break}if(T||aG(2),O<256)s[c++]=O;else if(256==O){R=m,d=null;break}else{var z=O-254;if(O>264){var C=O-257,B=ag[C];z=aV(t,m,(1<<B)-1)+ax[C],m+=B}var G=u[aR(t,m)&V],q=G>>4;G||aG(3),m+=15&G;var F=aC[q];if(q>3){var B=ay[q];F+=aR(t,m)&(1<<B)-1,m+=B}if(m>y){h&&aG(0);break}o&&l(c+131072);var j=c+z;if(c<F){var W=a-F,H=Math.min(F,j);for(W+c<0&&aG(3);c<H;++c)s[c]=i[W+c]}for(;c<j;++c)s[c]=s[c-F]}}e.l=d,e.p=R,e.b=c,e.f=p,d&&(p=1,e.m=f,e.d=u,e.n=g)}while(!p);return c!=s.length&&n?az(s,0,c):s.subarray(0,c)},aj=function(t,e,s){s<<=7&e;var i=e/8|0;t[i]|=s,t[i+1]|=s>>8},aW=function(t,e,s){s<<=7&e;var i=e/8|0;t[i]|=s,t[i+1]|=s>>8,t[i+2]|=s>>16},aH=function(t,e){for(var s=[],i=0;i<t.length;++i)t[i]&&s.push({s:i,f:t[i]});var r=s.length,a=s.slice();if(!r)return{t:aQ,l:0};if(1==r){var n=new ad(s[0].s+1);return n[s[0].s]=1,{t:n,l:1}}s.sort(function(t,e){return t.f-e.f}),s.push({s:-1,f:25001});var o=s[0],h=s[1],l=0,p=1,m=2;for(s[0]={s:-1,f:o.f+h.f,l:o,r:h};p!=r-1;)o=s[s[l].f<s[m].f?l++:m++],h=s[l!=p&&s[l].f<s[m].f?l++:m++],s[p++]={s:-1,f:o.f+h.f,l:o,r:h};for(var c=a[0].s,i=1;i<r;++i)a[i].s>c&&(c=a[i].s);var d=new au(c+1),u=aY(s[p-1],d,0);if(u>e){var i=0,f=0,g=u-e,y=1<<g;for(a.sort(function(t,e){return d[e.s]-d[t.s]||t.f-e.f});i<r;++i){var v=a[i].s;if(d[v]>e)f+=y-(1<<u-d[v]),d[v]=e;else break}for(f>>=g;f>0;){var b=a[i].s;d[b]<e?f-=1<<e-d[b]++-1:++i}for(;i>=0&&f;--i){var _=a[i].s;d[_]==e&&(--d[_],++f)}u=e}return{t:new ad(d),l:u}},aY=function(t,e,s){return -1==t.s?Math.max(aY(t.l,e,s+1),aY(t.r,e,s+1)):e[t.s]=s},aU=function(t){for(var e=t.length;e&&!t[--e];);for(var s=new au(++e),i=0,r=t[0],a=1,n=function(t){s[i++]=t},o=1;o<=e;++o)if(t[o]==r&&o!=e)++a;else{if(!r&&a>2){for(;a>138;a-=138)n(32754);a>2&&(n(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(n(r),--a;a>6;a-=6)n(8304);a>2&&(n(a-3<<5|8208),a=0)}for(;a--;)n(r);a=1,r=t[o]}return{c:s.subarray(0,i),n:e}},aJ=function(t,e){for(var s=0,i=0;i<e.length;++i)s+=t[i]*e[i];return s},aX=function(t,e,s){var i=s.length,r=aO(e+2);t[r]=255&i,t[r+1]=i>>8,t[r+2]=255^t[r],t[r+3]=255^t[r+1];for(var a=0;a<i;++a)t[r+a+4]=s[a];return(r+4+i)*8},aK=function(t,e,s,i,r,a,n,o,h,l,p){aj(e,p++,s),++r[256];for(var m,c,d,u,f=aH(r,15),g=f.t,y=f.l,v=aH(a,15),b=v.t,_=v.l,x=aU(g),w=x.c,E=x.n,C=aU(b),S=C.c,k=C.n,M=new au(19),P=0;P<w.length;++P)++M[31&w[P]];for(var P=0;P<S.length;++P)++M[31&S[P]];for(var A=aH(M,7),T=A.t,D=A.l,I=19;I>4&&!T[av[I-1]];--I);var F=l+5<<3,L=aJ(r,aT)+aJ(a,aD)+n,$=aJ(r,g)+aJ(a,b)+n+14+3*I+aJ(M,T)+2*M[16]+3*M[17]+7*M[18];if(h>=0&&F<=L&&F<=$)return aX(e,p,t.subarray(h,h+l));if(aj(e,p,1+($<L)),p+=2,$<L){m=aA(g,y,0),c=g,d=aA(b,_,0),u=b;var N=aA(T,D,0);aj(e,p,E-257),aj(e,p+5,k-1),aj(e,p+10,I-4),p+=14;for(var P=0;P<I;++P)aj(e,p+3*P,T[av[P]]);p+=3*I;for(var V=[w,S],R=0;R<2;++R)for(var O=V[R],P=0;P<O.length;++P){var z=31&O[P];aj(e,p,N[z]),p+=T[z],z>15&&(aj(e,p,O[P]>>5&127),p+=O[P]>>12)}}else m=aI,c=aT,d=aL,u=aD;for(var P=0;P<o;++P){var B=i[P];if(B>255){var z=B>>18&31;aW(e,p,m[z+257]),p+=c[z+257],z>7&&(aj(e,p,B>>23&31),p+=ag[z]);var G=31&B;aW(e,p,d[G]),p+=u[G],G>3&&(aW(e,p,B>>5&8191),p+=ay[G])}else aW(e,p,m[B]),p+=c[B]}return aW(e,p,m[256]),p+c[256]},aZ=new af([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),aQ=new ad(0),a0=function(t,e,s,i,r,a){var n=a.z||t.length,o=new ad(i+n+5*(1+Math.ceil(n/7e3))+r),h=o.subarray(i,o.length-r),l=a.l,p=7&(a.r||0);if(e){p&&(h[0]=a.r>>3);for(var m=aZ[e-1],c=m>>13,d=8191&m,u=(1<<s)-1,f=a.p||new au(32768),g=a.h||new au(u+1),y=Math.ceil(s/3),v=2*y,b=function(e){return(t[e]^t[e+1]<<y^t[e+2]<<v)&u},_=new af(25e3),x=new au(288),w=new au(32),E=0,C=0,S=a.i||0,k=0,M=a.w||0,P=0;S+2<n;++S){var A=b(S),T=32767&S,D=g[A];if(f[T]=D,g[A]=T,M<=S){var I=n-S;if((E>7e3||k>24576)&&(I>423||!l)){p=aK(t,h,0,_,x,w,C,k,P,S-P,p),k=E=C=0,P=S;for(var F=0;F<286;++F)x[F]=0;for(var F=0;F<30;++F)w[F]=0}var L=2,$=0,N=d,V=T-D&32767;if(I>2&&A==b(S-V))for(var R=Math.min(c,I)-1,O=Math.min(32767,S),z=Math.min(258,I);V<=O&&--N&&T!=D;){if(t[S+L]==t[S+L-V]){for(var B=0;B<z&&t[S+B]==t[S+B-V];++B);if(B>L){if(L=B,$=V,B>R)break;for(var G=Math.min(V,B-2),q=0,F=0;F<G;++F){var j=S-V+F&32767,W=f[j],H=j-W&32767;H>q&&(q=H,D=j)}}}D=f[T=D],V+=T-D&32767}if($){_[k++]=0x10000000|aw[L]<<18|aS[$];var Y=31&aw[L],U=31&aS[$];C+=ag[Y]+ay[U],++x[257+Y],++w[U],M=S+L,++E}else _[k++]=t[S],++x[t[S]]}}for(S=Math.max(S,M);S<n;++S)_[k++]=t[S],++x[t[S]];p=aK(t,h,l,_,x,w,C,k,P,S-P,p),l||(a.r=7&p|h[p/8|0]<<3,p-=7,a.h=g,a.p=f,a.i=S,a.w=M)}else{for(var S=a.w||0;S<n+l;S+=65535){var J=S+65535;J>=n&&(h[p/8|0]=l,J=n),p=aX(h,p+1,t.subarray(S,J))}a.i=n}return az(o,0,i+aO(p)+r)},a1=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var s=e,i=9;--i;)s=(1&s&&-0x12477ce0)^s>>>1;t[e]=s}return t}(),a2=function(){var t=-1;return{p:function(e){for(var s=t,i=0;i<e.length;++i)s=a1[255&s^e[i]]^s>>>8;t=s},d:function(){return~t}}},a3=function(t,e,s,i,r){if(!r&&(r={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),n=new ad(a.length+t.length);n.set(a),n.set(t,a.length),t=n,r.w=a.length}return a0(t,null==e.level?6:e.level,null==e.mem?r.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,s,i,r)},a5=function(t,e){var s={};for(var i in t)s[i]=t[i];for(var i in e)s[i]=e[i];return s},a4=function(t,e,s){for(var i=t(),r=t.toString(),a=r.slice(r.indexOf("[")+1,r.lastIndexOf("]")).replace(/\s+/g,"").split(","),n=0;n<i.length;++n){var o=i[n],h=a[n];if("function"==typeof o){e+=";"+h+"=";var l=o.toString();if(o.prototype)if(-1!=l.indexOf("[native code]")){var p=l.indexOf(" ",8)+1;e+=l.slice(p,l.indexOf("(",p))}else for(var m in e+=l,o.prototype)e+=";"+h+".prototype."+m+"="+o.prototype[m].toString();else e+=l}else s[h]=o}return e},a6=[],a8=function(t){var e=[];for(var s in t)t[s].buffer&&e.push((t[s]=new t[s].constructor(t[s])).buffer);return e},a9=function(t,e,s,i){if(!a6[s]){for(var r="",a={},n=t.length-1,o=0;o<n;++o)r=a4(t[o],r,a);a6[s]={c:a4(t[n],r,a),e:a}}var h=a5({},a6[s].e);return ac(a6[s].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",s,h,a8(h),i)},a7=function(){return[ad,au,af,ag,ay,av,ax,aC,aF,a$,ak,aB,aA,aN,aV,aR,aO,az,aG,aq,nl,ne,ns]},nt=function(){return[ad,au,af,ag,ay,av,aw,aS,aI,aT,aL,aD,ak,aZ,aQ,aA,aj,aW,aH,aY,aU,aJ,aX,aK,aO,az,a0,a3,nh,ne]},ne=function(t){return postMessage(t,[t.buffer])},ns=function(t){return t&&{out:t.size&&new ad(t.size),dictionary:t.dictionary}},ni=function(t,e,s,i,r,a){var n=a9(s,i,r,function(t,e){n.terminate(),a(t,e)});return n.postMessage([t,e],e.consume?[t.buffer]:[]),function(){n.terminate()}},nr=function(t,e){return t[e]|t[e+1]<<8},na=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},nn=function(t,e){return na(t,e)+0x100000000*na(t,e+4)},no=function(t,e,s){for(;s;++e)t[e]=s,s>>>=8};function nh(t,e){return a3(t,e||{},0,0)}function nl(t,e){return aq(t,{i:2},e&&e.out,e&&e.dictionary)}var np=function(t,e,s,i){for(var r in t){var a=t[r],n=e+r,o=i;Array.isArray(a)&&(o=a5(i,a[1]),a=a[0]),a instanceof ad?s[n]=[a,o]:(s[n+="/"]=[new ad(0),o],np(a,n,s,i))}},nm="undefined"!=typeof TextEncoder&&new TextEncoder,nc="undefined"!=typeof TextDecoder&&new TextDecoder;try{nc.decode(aQ,{stream:!0})}catch(t){}var nd=function(t){for(var e="",s=0;;){var i=t[s++],r=(i>127)+(i>223)+(i>239);if(s+r>t.length)return{s:e,r:az(t,s-1)};r?3==r?e+=String.fromCharCode(55296|(i=((15&i)<<18|(63&t[s++])<<12|(63&t[s++])<<6|63&t[s++])-65536)>>10,56320|1023&i):1&r?e+=String.fromCharCode((31&i)<<6|63&t[s++]):e+=String.fromCharCode((15&i)<<12|(63&t[s++])<<6|63&t[s++]):e+=String.fromCharCode(i)}};function nu(t,e){if(e){for(var s=new ad(t.length),i=0;i<t.length;++i)s[i]=t.charCodeAt(i);return s}if(nm)return nm.encode(t);for(var r=t.length,a=new ad(t.length+(t.length>>1)),n=0,o=function(t){a[n++]=t},i=0;i<r;++i){if(n+5>a.length){var h=new ad(n+8+(r-i<<1));h.set(a),a=h}var l=t.charCodeAt(i);l<128||e?o(l):(l<2048?o(192|l>>6):(l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++i))>>18),o(128|l>>12&63)):o(224|l>>12),o(128|l>>6&63)),o(128|63&l))}return az(a,0,n)}function nf(t,e){if(e){for(var s="",i=0;i<t.length;i+=16384)s+=String.fromCharCode.apply(null,t.subarray(i,i+16384));return s}if(nc)return nc.decode(t);var r=nd(t),a=r.s,s=r.r;return s.length&&aG(8),a}var ng=function(t,e,s){var i=nr(t,e+28),r=nf(t.subarray(e+46,e+46+i),!(2048&nr(t,e+8))),a=e+46+i,n=na(t,e+20),o=s&&0xffffffff==n?ny(t,a):[n,na(t,e+24),na(t,e+42)],h=o[0],l=o[1],p=o[2];return[nr(t,e+10),h,l,r,a+nr(t,e+30)+nr(t,e+32),p]},ny=function(t,e){for(;1!=nr(t,e);e+=4+nr(t,e+2));return[nn(t,e+12),nn(t,e+4),nn(t,e+20)]},nv=function(t){var e=0;if(t)for(var s in t){var i=t[s].length;i>65535&&aG(9),e+=i+4}return e},nb=function(t,e,s,i,r,a,n,o){var h=i.length,l=s.extra,p=o&&o.length,m=nv(l);no(t,e,null!=n?0x2014b50:0x4034b50),e+=4,null!=n&&(t[e++]=20,t[e++]=s.os),t[e]=20,e+=2,t[e++]=s.flag<<1|(a<0&&8),t[e++]=r&&8,t[e++]=255&s.compression,t[e++]=s.compression>>8;var c=new Date(null==s.mtime?Date.now():s.mtime),d=c.getFullYear()-1980;if((d<0||d>119)&&aG(10),no(t,e,d<<25|c.getMonth()+1<<21|c.getDate()<<16|c.getHours()<<11|c.getMinutes()<<5|c.getSeconds()>>1),e+=4,-1!=a&&(no(t,e,s.crc),no(t,e+4,a<0?-a-2:a),no(t,e+8,s.size)),no(t,e+12,h),no(t,e+14,m),e+=16,null!=n&&(no(t,e,p),no(t,e+6,s.attrs),no(t,e+10,n),e+=14),t.set(i,e),e+=h,m)for(var u in l){var f=l[u],g=f.length;no(t,e,+u),no(t,e+2,g),t.set(f,e+4),e+=4+g}return p&&(t.set(o,e),e+=p),e},n_=function(t,e,s,i,r){no(t,e,0x6054b50),no(t,e+8,s),no(t,e+10,s),no(t,e+12,i),no(t,e+16,r)},nx="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(t){t()};let nw=t=>{let e=t?.split("/").pop()?.lastIndexOf(".");return(e??0)>1&&t&&t.length-1>(e??0)},nE=t=>{switch(t){case ai.Contain:case ai.ScaleDown:return w.Contain;case ai.Cover:return w.Cover;case ai.Fill:return w.Initial;case ai.None:return w.None;default:return w.Contain}},nC=(t,e)=>{let s=new Blob([t],{type:e?.mimeType}),i=e?.name||n(),r=URL.createObjectURL(s),a=document.createElement("a");a.href=r,a.download=i,a.hidden=!0,document.body.appendChild(a),a.click(),setTimeout(()=>{a.remove(),URL.revokeObjectURL(r)},1e3)},nS=t=>{if("string"==typeof t&&t&&nw(t))return t.split(".").pop()?.toLowerCase()},nk=(t,e)=>(nS(t),`${t.split("/").pop()?.replace(/\.[^.]*$/,"").replaceAll(/\W+/g,"-")}`),nM=(t,e)=>{if(e)return nS(e)?nS(e)===t?e:`${nk(e)}.${t}`:`${e}.${t}`},nP=t=>t.slice(Math.max(0,t.indexOf(",")+1)),nA=t=>nu(a()?Buffer.from(nP(t),"base64").toString("binary"):atob(nP(t)),!0),nT=t=>t.split(":")[1].split(";")[0].split("/")[1].split("+")[0],nD=t=>{let e={message:"Unknown error",status:a()?500:400};return t&&"object"==typeof t&&("message"in t&&"string"==typeof t.message&&(e.message=t.message),"status"in t&&(e.status=Number(t.status))),e},nI=t=>!("h"in t)&&!("w"in t)&&"p"in t&&"e"in t&&"u"in t&&"id"in t,nF=t=>"w"in t&&"h"in t&&!("xt"in t)&&"p"in t,nL=t=>((t??0)+1).toString().padStart(3,"0"),n$=async t=>await new Promise((e,s)=>{!function(t,e,s){s||(s=e,e={}),"function"!=typeof s&&aG(7);var i={};np(t,"",i,e);var r=Object.keys(i),a=r.length,n=0,o=0,h=a,l=Array(a),p=[],m=function(){for(var t=0;t<p.length;++t)p[t]()},c=function(t,e){nx(function(){s(t,e)})};nx(function(){c=s});var d=function(){var t=new ad(o+22),e=n,s=o-n;o=0;for(var i=0;i<h;++i){var r=l[i];try{var a=r.c.length;nb(t,o,r,r.f,r.u,a);var p=30+r.f.length+nv(r.extra),m=o+p;t.set(r.c,m),nb(t,n,r,r.f,r.u,a,o,r.m),n+=16+p+(r.m?r.m.length:0),o=m+a}catch(t){return c(t,null)}}n_(t,n,l.length,s,e),c(null,t)};a||d();for(var u=function(t){var e,s,h=r[t],u=i[h],f=u[0],g=u[1],y=a2(),v=f.length;y.p(f);var b=nu(h),_=b.length,x=g.comment,w=x&&nu(x),E=w&&w.length,C=nv(g.extra),S=8*(0!=g.level),k=function(e,s){if(e)m(),c(e,null);else{var i=s.length;l[t]=a5(g,{size:v,crc:y.d(),c:s,f:b,m:w,u:_!=h.length||w&&x.length!=E,compression:S}),n+=30+_+C+i,o+=76+2*(_+C)+(E||0)+i,--a||d()}};if(_>65535&&k(aG(11,0,1),null),S)if(v<16e4)try{k(null,nh(f,g))}catch(t){k(t,null)}else p.push((e=g,(s=k)||(s=e,e={}),"function"!=typeof s&&aG(7),ni(f,e,[nt],function(t){return ne(nh(t.data[0],t.data[1]))},0,s)));else k(null,f)},f=0;f<h;++f)u(f)}(t,{level:9},(t,i)=>t?void s(t):i.buffer instanceof ArrayBuffer?void e(i.buffer):void s(Error("Data is not transferable")))}),nN=async t=>{let e=await fetch(t),s=await e.blob();return new Promise((t,e)=>{try{let i=new FileReader;i.onload=()=>{if("string"==typeof i.result)return void t(i.result);e(Error("Could not create bas64"))},i.readAsDataURL(s)}catch(t){e(t)}})};async function nV({animations:t=[],fileName:e,manifest:s,shouldDownload:i=!0}){try{if(0===t.length||!s)throw Error(`Missing or malformed required parameter(s):
8
+ ${t.length>0?"- manifest\n":""} ${s?"- animations\n":""}`);let r=nM("lottie",e)||`${n()}.lottie`,a={"manifest.json":[nu(JSON.stringify(s),!0),{level:0}]},{length:o}=t;for(let e=0;e<o;e++){let{length:i}=t[e].assets;for(let s=0;s<i;s++){let i=t[e].assets[s];if(!i.p||!nF(i)&&!nI(i))continue;let{p:r,u:o}=i;if(!r)continue;let h=n(),l=r.startsWith("data:"),p=l?nT(r):nS(r),m=l?r:await nN(o?o.endsWith("/")&&`${o}${r}`||`${o}/${r}`:r);t[e].assets[s].e=1,t[e].assets[s].p=`${h}.${p}`,t[e].assets[s].u="",a[`${nI(i)?"audio":"images"}/${h}.${p}`]=[nA(m),{level:9}]}let{length:r}=t[e].layers;for(let s=0;s<r;s++){let{ks:i}=t[e].layers[s],r=Object.keys(i),{length:a}=r;for(let n=0;n<a;n++){let{x:a}=i[r[n]];a&&(t[e].layers[s].ks[r[n]].x=btoa(a),t[e].layers[s].ks[r[n]].e=1)}}a[`a/${s.animations[e].id}.json`]=[nu(JSON.stringify(t[e]),!0),{level:9}]}let h=await n$(a);if(i)return nC(h,{mimeType:"application/zip",name:r}),null;return h}catch(t){return console.error(nD(t).message),null}}let nR=t=>{switch(t){case"svg":case"svg+xml":return"image/svg+xml";case"jpg":case"jpeg":return"image/jpeg";case"png":case"gif":case"webp":case"avif":return`image/${t}`;case"mp3":case"mpeg":case"wav":return`audio/${t}`;default:return""}},nO=t=>!!t&&/^(?:[0-9a-z+/]{4})*(?:[0-9a-z+/]{2}==|[0-9a-z+/]{3}=)?$/i.test(nP(t));async function nz(t,e){if(!Array.isArray(e))return;let s=[],{length:i}=e;for(let r=0;r<i;r++){if(!nI(e[r])&&!nF(e[r]))continue;let i=nF(e[r])?"images":"audio",n=t?.[`${i}/${e[r].p}`];n&&s.push(new Promise(t=>{let s;if(a())s=Buffer.from(n).toString("base64");else{let t="",{length:e}=n;for(let s=0;s<e;s++)t+=String.fromCharCode(n[s]);s=btoa(t)}e[r].p=e[r].p?.startsWith("data:")||nO(e[r].p)?e[r].p:`data:${nR(nS(e[r].p))};base64,${s}`,e[r].e=1,e[r].u="",t()}))}await Promise.all(s)}let nB=async t=>{let e=new Uint8Array(await t.arrayBuffer());return await new Promise((t,s)=>{!function(t,e,s){s||(s=e,e={}),"function"!=typeof s&&aG(7);var i=[],r=function(){for(var t=0;t<i.length;++t)i[t]()},a={},n=function(t,e){nx(function(){s(t,e)})};nx(function(){n=s});for(var o=t.length-22;0x6054b50!=na(t,o);--o)if(!o||t.length-o>65558)return n(aG(13,0,1),null),r;var h=nr(t,o+8);if(h){var l=h,p=na(t,o+16),m=0xffffffff==p||65535==l;if(m){var c=na(t,o-12);(m=0x6064b50==na(t,c))&&(l=h=na(t,c+32),p=na(t,c+48))}for(var d=e&&e.filter,u=0;u<l;++u)!function(e){var s=ng(t,p,m),o=s[0],l=s[1],c=s[2],u=s[3],f=s[4],g=s[5],y=g+30+nr(t,g+26)+nr(t,g+28);p=f;var v=function(t,e){t?(r(),n(t,null)):(e&&(a[u]=e),--h||n(null,a))};if(!d||d({name:u,size:l,originalSize:c,compression:o}))if(o)if(8==o){var b,_,x=t.subarray(y,y+l);if(c<524288||l>.8*c)try{v(null,nl(x,{out:new ad(c)}))}catch(t){v(t,null)}else i.push((b={size:c},(_=v)||(_=b,b={}),"function"!=typeof _&&aG(7),ni(x,b,[a7],function(t){return ne(nl(t.data[0],ns(t.data[1])))},1,_)))}else v(aG(14,"unknown compression type "+o,1),null);else v(null,az(t,y,y+l));else v(null,null)}(0)}else n(null,{})}(e,(e,i)=>{e&&s(e),t(i)})})},nG=t=>{let e=JSON.parse(nf(t["manifest.json"],!1));if(!("animations"in e))throw Error("Manifest not found");if(0===e.animations.length)throw Error("No animations listed in manifest");return e},nq=t=>t.replaceAll(RegExp(/"""/,"g"),'""').replaceAll(/(["'])(.*?)\1/g,(t,e,s)=>`${e}${s}${e}`);async function nj(t){let e=await nB(t),s=nG(e),i=[],r=[],{length:a}=s.animations,n="animations";e[`a/${s.animations[0].id}.json`]&&(n="a");for(let t=0;t<a;t++){let a=JSON.parse(nq(nf(e[`${n}/${s.animations[t].id}.json`]))),{length:o}=a.layers;for(let t=0;t<o;t++){let{ks:e}=a.layers[t],s=Object.keys(e),{length:i}=s;for(let r=0;r<i;r++){let{e:i,x:n}=e[s[r]];n&&i&&(a.layers[t].ks[s[r]].x=atob(n))}}r.push(nz(e,a.assets)),i.push(a)}return await Promise.all(r),{data:i,manifest:s}}async function nW(t){try{if(!t||"string"!=typeof t&&"object"!=typeof t)throw Error("Broken file or invalid file format");if("string"!=typeof t)return{animations:Array.isArray(t)?t:[t],isDotLottie:!1,manifest:null};let e=await fetch(t,{headers:{"Content-Type":"application/json; charset=UTF-8"}});if(!e.ok)throw Error(e.statusText);let s=!0,i=e.headers.get("content-type");if("application/zip+dotlottie"===i&&(s=!1),s){let s=nS(t);if("json"===s)return{animations:[await e.json()],isDotLottie:!1,manifest:null};let i=await e.clone().text();try{return{animations:[JSON.parse(i)],isDotLottie:!1,manifest:null}}catch(t){}}let{data:r,manifest:a}=await nj(e);return{animations:r,isDotLottie:!0,manifest:a}}catch(t){return console.error(nD(t).message),{animations:void 0,isDotLottie:!1,manifest:null}}}let nH="@aarsteinmedia/dotlottie-player";class nY extends as{static get observedAttributes(){return["animateOnScroll","autoplay","controls","direction","hover","loop","mode","speed","src","subframe"]}static get observedProperties(){return["playerState","_isSettingsOpen","_seeker","_currentAnimation","_animations"]}static get styles(){return async()=>{let t=new CSSStyleSheet;return await t.replace("* {\n box-sizing: border-box;\n}\n\n:host {\n --lottie-player-toolbar-height: 35px;\n --lottie-player-toolbar-background-color: #fff;\n --lottie-player-toolbar-icon-color: #000;\n --lottie-player-toolbar-icon-hover-color: #000;\n --lottie-player-toolbar-icon-active-color: #4285f4;\n --lottie-player-seeker-track-color: rgb(0 0 0 / 20%);\n --lottie-player-seeker-thumb-color: #4285f4;\n --lottie-player-seeker-display: block;\n\n width: 100%;\n height: 100%;\n\n &:not([hidden]) {\n display: block;\n }\n\n .main {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n }\n\n .animation {\n width: 100%;\n height: 100%;\n display: flex;\n margin: 0;\n padding: 0;\n }\n\n [data-controls='true'] .animation {\n height: calc(100% - 35px);\n }\n\n .animation-container {\n position: relative;\n }\n\n .popover {\n position: absolute;\n right: 5px;\n bottom: 40px;\n background-color: var(--lottie-player-toolbar-background-color);\n border-radius: 5px;\n padding: 10px 15px;\n border: solid 2px var(--lottie-player-toolbar-icon-color);\n animation: fade-in 0.2s ease-in-out;\n\n &::before {\n content: '';\n right: 10px;\n border: 7px solid transparent;\n margin-right: -7px;\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n top: 100%;\n border-top-color: var(--lottie-player-toolbar-icon-color);\n }\n }\n\n .error {\n display: flex;\n margin: auto;\n justify-content: center;\n height: 100%;\n align-items: center;\n\n & svg {\n width: 100%;\n height: auto;\n }\n }\n\n .toolbar {\n display: flex;\n place-items: center center;\n background: var(--lottie-player-toolbar-background-color);\n margin: 0;\n height: 35px;\n padding: 5px;\n border-radius: 5px;\n gap: 5px;\n\n &.has-error {\n pointer-events: none;\n opacity: 0.5;\n }\n\n & button {\n cursor: pointer;\n fill: var(--lottie-player-toolbar-icon-color);\n color: var(--lottie-player-toolbar-icon-color);\n background: none;\n border: 0;\n padding: 0;\n outline: 0;\n height: 100%;\n margin: 0;\n align-items: center;\n gap: 5px;\n opacity: 0.9;\n\n &:not([hidden]) {\n display: flex;\n }\n\n &:hover {\n opacity: 1;\n }\n\n &[data-active='true'] {\n opacity: 1;\n fill: var(--lottie-player-toolbar-icon-active-color);\n }\n\n &:disabled {\n opacity: 0.5;\n }\n\n &:focus {\n outline: 0;\n }\n\n & svg {\n pointer-events: none;\n\n & > * {\n fill: inherit;\n }\n }\n\n &.disabled svg {\n display: none;\n }\n }\n }\n\n .progress-container {\n position: relative;\n width: 100%;\n\n &.simple {\n margin-right: 12px;\n }\n }\n\n .seeker {\n appearance: none;\n outline: none;\n width: 100%;\n height: 20px;\n border-radius: 3px;\n border: 0;\n cursor: pointer;\n background-color: transparent;\n\n display: var(--lottie-player-seeker-display);\n color: var(--lottie-player-seeker-thumb-color);\n margin: 0;\n padding: 7.5px 0;\n position: relative;\n z-index: 1;\n\n &::-webkit-slider-runnable-track,\n &::-webkit-slider-thumb {\n appearance: none;\n outline: none;\n }\n\n &::-webkit-slider-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n border: 0;\n background-color: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -webkit-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-webkit-slider-thumb,\n &:focus::-webkit-slider-thumb {\n transform: scale(1);\n }\n\n &::-moz-range-progress {\n background-color: var(--lottie-player-seeker-thumb-color);\n height: 5px;\n border-radius: 3px;\n }\n\n &::-moz-range-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: var(--lottie-player-seeker-thumb-color);\n border: 0;\n cursor: pointer;\n -moz-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-moz-range-thumb,\n &:focus::-moz-range-thumb {\n transform: scale(1);\n }\n\n &::-ms-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n }\n\n &::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n\n &::-ms-fill-lower {\n background-color: var(--lottie-player-seeker-thumb-color);\n border-radius: 3px;\n }\n\n &::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -ms-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-ms-thumb {\n transform: scale(1);\n }\n\n &:focus {\n &::-ms-thumb {\n transform: scale(1);\n }\n\n &::-ms-fill-lower,\n &::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n }\n }\n }\n\n & progress {\n appearance: none;\n outline: none;\n position: absolute;\n width: 100%;\n height: 5px;\n border-radius: 3px;\n border: 0;\n top: 0;\n left: 0;\n margin: 7.5px 0;\n background-color: var(--lottie-player-seeker-track-color);\n pointer-events: none;\n\n &::-webkit-progress-inner-element {\n border-radius: 3px;\n overflow: hidden;\n }\n\n &::-webkit-slider-runnable-track {\n background-color: transparent;\n }\n\n &::-webkit-progress-value {\n background-color: var(--lottie-player-seeker-thumb-color);\n }\n }\n\n & *::-moz-progress-bar {\n background-color: var(--lottie-player-seeker-thumb-color);\n }\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n :host {\n --lottie-player-toolbar-background-color: #000;\n --lottie-player-toolbar-icon-color: #fff;\n --lottie-player-toolbar-icon-hover-color: #fff;\n --lottie-player-seeker-track-color: rgb(255 255 255 / 60%);\n }\n}\n"),t}}set animateOnScroll(t){this.setAttribute("animateOnScroll",(!!t).toString())}get animateOnScroll(){let t=this.getAttribute("animateOnScroll");return"true"===t||""===t||"1"===t}set autoplay(t){this.setAttribute("autoplay",(!!t).toString())}get autoplay(){let t=this.getAttribute("autoplay");return"true"===t||""===t||"1"===t}set background(t){this.setAttribute("background",t)}get background(){return this.getAttribute("background")||"transparent"}set controls(t){this.setAttribute("controls",(!!t).toString())}get controls(){let t=this.getAttribute("controls");return"true"===t||""===t||"1"===t}set count(t){this.setAttribute("count",t.toString())}get count(){let t=this.getAttribute("count");return t?Number(t):0}set description(t){t&&this.setAttribute("description",t)}get description(){return this.getAttribute("description")}set direction(t){this.setAttribute("direction",t.toString())}get direction(){let t=Number(this.getAttribute("direction"));return -1===t?t:1}set hover(t){this.setAttribute("hover",t.toString())}get hover(){let t=this.getAttribute("hover");return"true"===t||""===t||"1"===t}set intermission(t){this.setAttribute("intermission",t.toString())}get intermission(){let t=Number(this.getAttribute("intermission"));return isNaN(t)?0:t}set loop(t){this.setAttribute("loop",(!!t).toString())}get loop(){let t=this.getAttribute("loop");return"true"===t||""===t||"1"===t}set mode(t){this.setAttribute("mode",t.toString())}get mode(){let t=this.getAttribute("mode");return t===aa.Bounce?t:aa.Normal}set objectfit(t){this.setAttribute("objectfit",t)}get objectfit(){let t=this.getAttribute("objectfit");return t&&Object.values(ai).includes(t)?t:ai.Contain}set preserveAspectRatio(t){this.setAttribute("preserveAspectRatio",t||ao.Contain)}get preserveAspectRatio(){let t=this.getAttribute("preserveAspectRatio");return t&&Object.values(ao).includes(t)?t:null}set renderer(t){this.setAttribute("renderer",t)}get renderer(){let t=this.getAttribute("renderer");return t===ah.Canvas||t===ah.HTML?t:ah.SVG}set simple(t){this.setAttribute("simple",t.toString())}get simple(){let t=this.getAttribute("simple");return"true"===t||""===t||"1"===t}set speed(t){this.setAttribute("speed",t.toString())}get speed(){let t=this.getAttribute("speed");return null===t||isNaN(Number(t))?1:Number(t)}set src(t){this.setAttribute("src",t||"")}get src(){return this.getAttribute("src")}set subframe(t){this.setAttribute("subframe",(!!t).toString())}get subframe(){let t=this.getAttribute("subframe");return"true"===t||""===t||"1"===t}constructor(){super(),this.playerState=ar.Loading,this._container=null,this._errorMessage="Something went wrong",this._identifier=this.id||n(),this._isSettingsOpen=!1,this._playerState={count:0,loaded:!1,prev:ar.Loading,scrollTimeout:null,scrollY:0,visible:!1},this._render=ap,this._renderControls=al,this._seeker=0,this._animations=[],this._currentAnimation=0,this._isBounce=!1,this._isDotLottie=!1,this._lottieInstance=null,this._multiAnimationSettings=[],this._handleSettingsClick=({target:t})=>{this._toggleSettings(),t instanceof HTMLElement&&t.focus()},this._complete=this._complete.bind(this),this._dataFailed=this._dataFailed.bind(this),this._dataReady=this._dataReady.bind(this),this._DOMLoaded=this._DOMLoaded.bind(this),this._enterFrame=this._enterFrame.bind(this),this._freeze=this._freeze.bind(this),this._handleBlur=this._handleBlur.bind(this),this._handleScroll=this._handleScroll.bind(this),this._handleSeekChange=this._handleSeekChange.bind(this),this._handleWindowBlur=this._handleWindowBlur.bind(this),this._loopComplete=this._loopComplete.bind(this),this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._switchInstance=this._switchInstance.bind(this),this.togglePlay=this.togglePlay.bind(this),this.stop=this.stop.bind(this),this.prev=this.prev.bind(this),this.next=this.next.bind(this),this._renderControls=this._renderControls.bind(this),this.snapshot=this.snapshot.bind(this),this.toggleLoop=this.toggleLoop.bind(this),this.toggleBoomerang=this.toggleBoomerang.bind(this),this.convert=this.convert.bind(this),this.destroy=this.destroy.bind(this),this.template=document.createElement("template"),this.shadow=this.attachShadow({mode:"open"})}async addAnimation(t,e,s=!0){let{animations:i=[],manifest:r={animations:this.src?[{id:this._identifier}]:[]}}=this.src?await nW(this.src):{};try{if(!r)throw Error("Manifest is not set");r.generator=nH;let{length:a}=t;for(let e=0;e<a;e++){let{url:s}=t[e],{animations:a}=await nW(s);if(!a)throw Error("No animation loaded");if(r.animations.some(({id:s})=>s===t[e].id))throw Error("Duplicate id for animation");r.animations=[...r.animations,{id:t[e].id}],i.push(...a)}return{result:await nV({animations:i,fileName:e,manifest:r,shouldDownload:s}),success:!0}}catch(t){return{error:nD(t).message,success:!1}}}async attributeChangedCallback(t,e,s){if(this._lottieInstance&&this.shadow){if("animateOnScroll"===t){if(""===s||s){this._lottieInstance.autoplay=!1,addEventListener("scroll",this._handleScroll,{capture:!0,passive:!0});return}removeEventListener("scroll",this._handleScroll,!0)}if("autoplay"===t){if(this.animateOnScroll)return;if(""===s||s)return void this.play();this.stop()}if("controls"===t&&this._renderControls(),"direction"===t){if(-1===Number(s))return void this.setDirection(-1);this.setDirection(1)}if("hover"===t&&this._container){if(""===s||s){this._container.addEventListener("mouseenter",this._mouseEnter),this._container.addEventListener("mouseleave",this._mouseLeave);return}this._container.removeEventListener("mouseenter",this._mouseEnter),this._container.removeEventListener("mouseleave",this._mouseLeave)}if("loop"===t){let t=this.shadow.querySelector(".toggleLoop");t instanceof HTMLButtonElement&&(t.dataset.active=s),this.setLoop(""===s||!!s)}if("mode"===t){let t=this.shadow.querySelector(".toggleBoomerang");t instanceof HTMLButtonElement&&(t.dataset.active=(s===aa.Bounce).toString()),this._isBounce=s===aa.Bounce}if("speed"===t){let t=Number(s);t&&!isNaN(t)&&this.setSpeed(t)}"src"===t&&await this.load(s),"subframe"===t&&this.setSubframe(""===s||!!s)}}async connectedCallback(){if(await super.connectedCallback(),await this._render(),!this.shadow)throw Error("Missing Shadow element");this._container=this.shadow.querySelector(".animation"),this._renderControls(),void 0!==document.hidden&&document.addEventListener("visibilitychange",this._onVisibilityChange),this._addIntersectionObserver(),await this.load(this.src),this.dispatchEvent(new CustomEvent(an.Rendered))}async convert({animations:t,fileName:e,manifest:s,shouldDownload:i=!0,src:r,typeCheck:a}){let o=r||this.src||this.source;if(!o&&!t?.length)throw Error("No animation to convert");let h=t;return(h||(h=(await nW(o)).animations),a||this._isDotLottie)?function({animation:t,fileName:e,shouldDownload:s}){try{if(!t)throw Error("createJSON: Missing or malformed required parameter(s):\n - animation\n'");let i=nM("json",e)||`${n()}.json`,r=JSON.stringify(t);if(s)return nC(r,{mimeType:"application/json",name:i}),null;return r}catch(t){return console.error(nD(t).message),null}}({animation:h?.[0],fileName:`${nk(e||o||"converted")}.json`,shouldDownload:i}):nV({animations:h,fileName:`${nk(e||o||"converted")}.lottie`,manifest:{...s??this._manifest,generator:nH},shouldDownload:i})}destroy(){this._lottieInstance?.destroy&&(this.playerState=ar.Destroyed,this._lottieInstance.destroy(),this._lottieInstance=null,this.dispatchEvent(new CustomEvent(an.Destroyed)),this.remove(),document.removeEventListener("visibilitychange",this._onVisibilityChange))}disconnectedCallback(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0),document.removeEventListener("visibilitychange",this._onVisibilityChange),this.destroy()}getLottie(){return this._lottieInstance}getManifest(){return this._manifest}getMultiAnimationSettings(){return this._multiAnimationSettings}getSegment(){return this._segment}async load(t){if(!this.shadowRoot||!t)return;this.source=t;try{let{animations:e,isDotLottie:s,manifest:i}=await nW(t);if(!e||e.some(t=>!this._isLottie(t)))throw Error("Broken or corrupted file");this._isBounce=this.mode===aa.Bounce,this._multiAnimationSettings.length>0&&this._multiAnimationSettings[this._currentAnimation]?.mode&&(this._isBounce=this._multiAnimationSettings[this._currentAnimation].mode===aa.Bounce),i?.animations.length===1&&(i.animations[0].autoplay=this.autoplay,i.animations[0].loop=this.loop),this._isDotLottie=!!s,this._animations=e,this._manifest=i??{animations:[{autoplay:!this.animateOnScroll&&this.autoplay,direction:this.direction,id:n(),loop:this.loop,mode:this.mode,speed:this.speed}]},this._lottieInstance?.destroy(),this.playerState=ar.Stopped,!this.animateOnScroll&&(this.autoplay||this._multiAnimationSettings[this._currentAnimation]?.autoplay)&&(this.playerState=ar.Playing),this._lottieInstance=r7.loadAnimation({...this._getOptions(),animationData:e[this._currentAnimation]})}catch(t){this._errorMessage=nD(t).message,this.playerState=ar.Error,this.dispatchEvent(new CustomEvent(an.Error));return}this._addEventListeners();let e=this._multiAnimationSettings[this._currentAnimation]?.speed??this.speed,s=this._multiAnimationSettings[this._currentAnimation]?.direction??this.direction;this._lottieInstance.setSpeed(e),this._lottieInstance.setDirection(s),this._lottieInstance.setSubframe(!!this.subframe),(this.autoplay||this.animateOnScroll)&&(-1===this.direction&&this.seek("99%"),"IntersectionObserver"in window||(this.animateOnScroll||this.play(),this._playerState.visible=!0),this._addIntersectionObserver())}next(){this._currentAnimation++,this._switchInstance()}pause(){if(this._lottieInstance){this._playerState.prev=this.playerState;try{this._lottieInstance.pause(),this.dispatchEvent(new CustomEvent(an.Pause))}finally{this.playerState=ar.Paused}}}play(){if(this._lottieInstance){this._playerState.prev=this.playerState;try{this._lottieInstance.play(),this.dispatchEvent(new CustomEvent(an.Play))}finally{this.playerState=ar.Playing}}}prev(){this._currentAnimation--,this._switchInstance(!0)}propertyChangedCallback(t,e,s){if(!this.shadow)return;let i=this.shadow.querySelector(".togglePlay"),r=this.shadow.querySelector(".stop"),a=this.shadow.querySelector(".prev"),n=this.shadow.querySelector(".next"),o=this.shadow.querySelector(".seeker"),h=this.shadow.querySelector("progress"),l=this.shadow.querySelector(".popover"),p=this.shadow.querySelector(".convert"),m=this.shadow.querySelector(".snapshot");i instanceof HTMLButtonElement&&r instanceof HTMLButtonElement&&n instanceof HTMLButtonElement&&a instanceof HTMLButtonElement&&o instanceof HTMLInputElement&&h instanceof HTMLProgressElement&&("playerState"===t&&(i.dataset.active=(s===ar.Playing||s===ar.Paused).toString(),r.dataset.active=(s===ar.Stopped).toString(),s===ar.Playing?i.innerHTML='<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z"/></svg>':i.innerHTML='<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M8.016 5.016L18.985 12 8.016 18.984V5.015z"/></svg>'),"_seeker"===t&&"number"==typeof s&&(o.value=s.toString(),o.ariaValueNow=s.toString(),h.value=s),"_animations"===t&&Array.isArray(s)&&this._currentAnimation+1<s.length&&(n.hidden=!1),"_currentAnimation"===t&&"number"==typeof s&&(n.hidden=s+1>=this._animations.length,a.hidden=!s),"_isSettingsOpen"===t&&"boolean"==typeof s&&l instanceof HTMLDivElement&&p instanceof HTMLButtonElement&&m instanceof HTMLButtonElement&&(l.hidden=!s,p.hidden=!1,m.hidden=this.renderer!==ah.SVG,this._isDotLottie?(p.ariaLabel="Convert dotLottie to JSON",p.innerHTML=p.innerHTML.replace("dotLottie","JSON")):(p.ariaLabel="Convert JSON animation to dotLottie format",p.innerHTML=p.innerHTML.replace("JSON","dotLottie"))))}async reload(){this._lottieInstance&&this.src&&(this._lottieInstance.destroy(),await this.load(this.src))}seek(t){if(!this._lottieInstance)return;let e=t.toString().match(/^(\d+)(%?)$/);if(!e)return;let s=Math.round("%"===e[2]?this._lottieInstance.totalFrames*Number(e[1])/100:Number(e[1]));if(this._seeker=s,this.playerState===ar.Playing||this.playerState===ar.Frozen&&this._playerState.prev===ar.Playing){this._lottieInstance.goToAndPlay(s,!0),this.playerState=ar.Playing;return}this._lottieInstance.goToAndStop(s,!0),this._lottieInstance.pause()}setCount(t){this.count=t}setDirection(t){this._lottieInstance&&this._lottieInstance.setDirection(t)}setLoop(t){this._lottieInstance&&this._lottieInstance.setLoop(t)}setMultiAnimationSettings(t){this._multiAnimationSettings=t}setSegment(t){this._segment=t}setSpeed(t=1){this._lottieInstance&&this._lottieInstance.setSpeed(t)}setSubframe(t){this._lottieInstance&&this._lottieInstance.setSubframe(t)}snapshot(t=!0,e="AM Lottie"){try{if(!this.shadowRoot)throw Error("Unknown error");let s=this.shadowRoot.querySelector(".animation svg");if(!s)throw Error("Could not retrieve animation from DOM");let i=s instanceof Node?new XMLSerializer().serializeToString(s):null;if(!i)throw Error("Could not serialize SVG element");return t&&nC(i,{mimeType:"image/svg+xml",name:`${nk(this.src||e)}-${nL(this._seeker)}.svg`}),i}catch(t){return console.error(t),null}}stop(){if(this._lottieInstance){this._playerState.prev=this.playerState,this._playerState.count=0;try{this._lottieInstance.stop(),this.dispatchEvent(new CustomEvent(an.Stop))}finally{this.playerState=ar.Stopped}}}toggleBoomerang(){let t=this._multiAnimationSettings[this._currentAnimation];if(void 0!==t.mode){if(t.mode===aa.Normal){t.mode=aa.Bounce,this._isBounce=!0;return}t.mode=aa.Normal,this._isBounce=!1;return}if(this.mode===aa.Normal){this.mode=aa.Bounce,this._isBounce=!0;return}this.mode=aa.Normal,this._isBounce=!1}toggleLoop(){let t=!this.loop;this.loop=t,this.setLoop(t)}togglePlay(){if(!this._lottieInstance)return;let{currentFrame:t,playDirection:e,totalFrames:s}=this._lottieInstance;if(this.playerState===ar.Playing)return void this.pause();if(this.playerState!==ar.Completed)return void this.play();if(this.playerState=ar.Playing,this._isBounce){this.setDirection(-1*e),this._lottieInstance.goToAndPlay(t,!0);return}if(-1===e)return void this._lottieInstance.goToAndPlay(s,!0);this._lottieInstance.goToAndPlay(0,!0)}_freeze(){if(this._lottieInstance){this._playerState.prev=this.playerState;try{this._lottieInstance.pause(),this.dispatchEvent(new CustomEvent(an.Freeze))}finally{this.playerState=ar.Frozen}}}_handleBlur(){setTimeout(()=>{this._toggleSettings(!1)},200)}_handleSeekChange({target:t}){!(!(t instanceof HTMLInputElement)||!this._lottieInstance||isNaN(Number(t.value)))&&this.seek(Math.round(Number(t.value)/100*this._lottieInstance.totalFrames))}_addEventListeners(){this._toggleEventListeners("add")}_addIntersectionObserver(){this._container&&!this._intersectionObserver&&"IntersectionObserver"in window&&(this._intersectionObserver=new IntersectionObserver(t=>{let{length:e}=t;for(let s=0;s<e;s++){if(!t[s].isIntersecting||document.hidden){this.playerState===ar.Playing&&this._freeze(),this._playerState.visible=!1;continue}this.animateOnScroll||this.playerState!==ar.Frozen||this.play(),this._playerState.scrollY||(this._playerState.scrollY=scrollY),this._playerState.visible=!0}}),this._intersectionObserver.observe(this._container))}_complete(){if(!this._lottieInstance)return;if(this._animations.length>1){if(this._multiAnimationSettings[this._currentAnimation+1]?.autoplay)return void this.next();if(this.loop&&this._currentAnimation===this._animations.length-1){this._currentAnimation=0,this._switchInstance();return}}let{currentFrame:t,totalFrames:e}=this._lottieInstance;this._seeker=Math.round(t/e*100),this.playerState=ar.Completed,this.dispatchEvent(new CustomEvent(an.Complete,{detail:{frame:t,seeker:this._seeker}}))}_dataFailed(){this.playerState=ar.Error,this.dispatchEvent(new CustomEvent(an.Error))}_dataReady(){this.dispatchEvent(new CustomEvent(an.Load))}_DOMLoaded(){this._playerState.loaded=!0,this.dispatchEvent(new CustomEvent(an.Ready))}_enterFrame(){if(!this._lottieInstance)return;let{currentFrame:t,totalFrames:e}=this._lottieInstance;this._seeker=Math.round(t/e*100),this.dispatchEvent(new CustomEvent(an.Frame,{detail:{frame:t,seeker:this._seeker}}))}_getOptions(){if(!this._container)throw Error("Container not rendered");let t=this.preserveAspectRatio??nE(this.objectfit),e=this._multiAnimationSettings.length>0?this._multiAnimationSettings[this._currentAnimation]:void 0,s=this._manifest?.animations[this._currentAnimation],i=!!this.loop;s?.loop!==void 0&&(i=!!s.loop),e?.loop!==void 0&&(i=!!e.loop);let r=!!this.autoplay;s?.autoplay!==void 0&&(r=!!s.autoplay),e?.autoplay!==void 0&&(r=!!e.autoplay),this.animateOnScroll&&(r=!1);let a=this._segment;this._segment?.every(t=>t>0)&&(a=[this._segment[0]-1,this._segment[1]-1]),this._segment?.some(t=>t<0)&&(a=void 0);let n={autoplay:r,container:this._container,initialSegment:a,loop:i,renderer:this.renderer,rendererSettings:{imagePreserveAspectRatio:t}};switch(this.renderer){case ah.SVG:n.rendererSettings={...n.rendererSettings,hideOnTransparent:!0,preserveAspectRatio:t,progressiveLoad:!0};break;case ah.Canvas:n.rendererSettings={...n.rendererSettings,clearCanvas:!0,preserveAspectRatio:t,progressiveLoad:!0};break;case ah.HTML:n.rendererSettings={...n.rendererSettings,hideOnTransparent:!0}}return n}_handleScroll(){if(this.animateOnScroll&&this._lottieInstance){if(a())return void console.warn("DotLottie: Scroll animations might not work properly in a Server Side Rendering context. Try to wrap this in a client component.");if(this._playerState.visible){this._playerState.scrollTimeout&&clearTimeout(this._playerState.scrollTimeout),this._playerState.scrollTimeout=setTimeout(()=>{this.playerState=ar.Paused},400);let t=Math.min(Math.max((scrollY>this._playerState.scrollY?scrollY-this._playerState.scrollY:this._playerState.scrollY-scrollY)/3,1),3*this._lottieInstance.totalFrames)/3;requestAnimationFrame(()=>{t<(this._lottieInstance?.totalFrames??0)?(this.playerState=ar.Playing,this._lottieInstance?.goToAndStop(t,!0)):this.playerState=ar.Paused})}}}_handleWindowBlur({type:t}){this.playerState===ar.Playing&&"blur"===t&&this._freeze(),this.playerState===ar.Frozen&&"focus"===t&&this.play()}_isLottie(t){return["v","ip","op","layers","fr","w","h"].every(e=>Object.hasOwn(t,e))}_loopComplete(){if(!this._lottieInstance)return;let{playDirection:t,totalFrames:e}=this._lottieInstance,s=this._segment?this._segment[0]:0,i=this._segment?this._segment[0]:e;if(this.count&&(this._isBounce?this._playerState.count+=.5:this._playerState.count+=1,this._playerState.count>=this.count)){this.setLoop(!1),this.playerState=ar.Completed,this.dispatchEvent(new CustomEvent(an.Complete));return}return(this.dispatchEvent(new CustomEvent(an.Loop)),this._isBounce)?(this._lottieInstance.goToAndStop(-1===t?s:.99*i,!0),this._lottieInstance.setDirection(-1*t),setTimeout(()=>{this.animateOnScroll||this._lottieInstance?.play()},this.intermission)):(this._lottieInstance.goToAndStop(-1===t?.99*i:s,!0),setTimeout(()=>{this.animateOnScroll||this._lottieInstance?.play()},this.intermission))}_mouseEnter(){this.hover&&this.playerState!==ar.Playing&&this.play()}_mouseLeave(){this.hover&&this.playerState===ar.Playing&&this.stop()}_onVisibilityChange(){if(document.hidden&&this.playerState===ar.Playing)return void this._freeze();this.playerState===ar.Frozen&&this.play()}_removeEventListeners(){this._toggleEventListeners("remove")}_switchInstance(t=!1){if(this._animations[this._currentAnimation])try{if(this._lottieInstance&&this._lottieInstance.destroy(),this._lottieInstance=r7.loadAnimation({...this._getOptions(),animationData:this._animations[this._currentAnimation]}),this._multiAnimationSettings[this._currentAnimation]?.mode&&(this._isBounce=this._multiAnimationSettings[this._currentAnimation].mode===aa.Bounce),this._removeEventListeners(),this._addEventListeners(),this.dispatchEvent(new CustomEvent(t?an.Previous:an.Next)),this._multiAnimationSettings[this._currentAnimation]?.autoplay??this.autoplay){if(this.animateOnScroll){this._lottieInstance.goToAndStop(0,!0),this.playerState=ar.Paused;return}this._lottieInstance.goToAndPlay(0,!0),this.playerState=ar.Playing;return}this._lottieInstance.goToAndStop(0,!0),this.playerState=ar.Stopped}catch(t){this._errorMessage=nD(t).message,this.playerState=ar.Error,this.dispatchEvent(new CustomEvent(an.Error))}}_toggleEventListeners(t){let e="add"===t?"addEventListener":"removeEventListener";this._lottieInstance&&(this._lottieInstance[e]("enterFrame",this._enterFrame),this._lottieInstance[e]("complete",this._complete),this._lottieInstance[e]("loopComplete",this._loopComplete),this._lottieInstance[e]("DOMLoaded",this._DOMLoaded),this._lottieInstance[e]("data_ready",this._dataReady),this._lottieInstance[e]("data_failed",this._dataFailed)),this._container&&this.hover&&(this._container[e]("mouseenter",this._mouseEnter),this._container[e]("mouseleave",this._mouseLeave)),window[e]("focus",this._handleWindowBlur,{capture:!1,passive:!0}),window[e]("blur",this._handleWindowBlur,{capture:!1,passive:!0}),this.animateOnScroll&&window[e]("scroll",this._handleScroll,{capture:!0,passive:!0})}_toggleSettings(t){if(void 0===t){this._isSettingsOpen=!this._isSettingsOpen;return}this._isSettingsOpen=t}}globalThis.dotLottiePlayer=()=>new nY;let nU="dotlottie-player";a()||customElements.define(nU,nY),t.PlayMode=aa,t.PlayerEvents=an,t.PlayerState=ar,t.default=nY,t.tagName=nU,Object.defineProperty(t,"__esModule",{value:!0})}(this["@aarsteinmedia/dotlottie-player"]=this["@aarsteinmedia/dotlottie-player"]||{});