@aarsteinmedia/dotlottie-player 5.1.6 → 5.1.7
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/CHANGELOG.md +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -14
- package/dist/unpkg.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,12 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Changelog was only added since [3.2.3], so it's not exhaustive. [Please report any missing noteable changes to us](https://github.com/aarsteinmedia/dotlottie-player/issues), and we'll add them promptly.
|
|
9
9
|
|
|
10
|
-
## [5.1.
|
|
10
|
+
## [5.1.8] - 04-06-2025
|
|
11
11
|
|
|
12
12
|
### Changed
|
|
13
13
|
|
|
14
14
|
- Fixed issue with data handling in animation engine.
|
|
15
15
|
- Fixed issue with enums causing compiler errors in TypeScript
|
|
16
|
+
- Fixed bug preventing conversion to dotLottie in some cases
|
|
16
17
|
|
|
17
18
|
## [5.1.4] - 03-06-2025
|
|
18
19
|
|
package/dist/index.d.ts
CHANGED
|
@@ -181,7 +181,7 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
|
|
|
181
181
|
}>;
|
|
182
182
|
attributeChangedCallback(name: string, _oldValue: unknown, value: string): Promise<void>;
|
|
183
183
|
connectedCallback(): Promise<void>;
|
|
184
|
-
convert({ animations: animationsFromProps, fileName, manifest, shouldDownload, src: srcFromProps, typeCheck, }: ConvertParams): Promise<
|
|
184
|
+
convert({ animations: animationsFromProps, fileName, manifest, shouldDownload, src: srcFromProps, typeCheck, }: ConvertParams): Promise<string | ArrayBuffer | null>;
|
|
185
185
|
destroy(): void;
|
|
186
186
|
disconnectedCallback(): void;
|
|
187
187
|
getLottie(): AnimationItem | null;
|
package/dist/index.js
CHANGED
|
@@ -542,7 +542,7 @@ const unzip = async (resp)=>{
|
|
|
542
542
|
}
|
|
543
543
|
return buffer;
|
|
544
544
|
} catch (error) {
|
|
545
|
-
console.error(
|
|
545
|
+
console.error(handleErrors(error).message);
|
|
546
546
|
return null;
|
|
547
547
|
}
|
|
548
548
|
}, createJSON = ({ animation, fileName, shouldDownload })=>{
|
|
@@ -556,10 +556,12 @@ const unzip = async (resp)=>{
|
|
|
556
556
|
mimeType: 'application/json',
|
|
557
557
|
name
|
|
558
558
|
});
|
|
559
|
+
return null;
|
|
559
560
|
}
|
|
560
|
-
return;
|
|
561
|
+
return jsonString;
|
|
561
562
|
} catch (error) {
|
|
562
|
-
console.error(
|
|
563
|
+
console.error(handleErrors(error).message);
|
|
564
|
+
return null;
|
|
563
565
|
}
|
|
564
566
|
}, frameOutput = (frame)=>((frame ?? 0) + 1).toString().padStart(3, '0'), getAnimationData = async (input)=>{
|
|
565
567
|
try {
|
|
@@ -627,7 +629,7 @@ const unzip = async (resp)=>{
|
|
|
627
629
|
manifest
|
|
628
630
|
};
|
|
629
631
|
} catch (error) {
|
|
630
|
-
console.error(
|
|
632
|
+
console.error(handleErrors(error).message);
|
|
631
633
|
return {
|
|
632
634
|
animations: undefined,
|
|
633
635
|
isDotLottie: false,
|
|
@@ -1068,23 +1070,21 @@ const generator = '@aarsteinmedia/dotlottie-player';
|
|
|
1068
1070
|
}
|
|
1069
1071
|
async convert({ animations: animationsFromProps, fileName, manifest, shouldDownload = true, src: srcFromProps, typeCheck }) {
|
|
1070
1072
|
const src = srcFromProps || this.src || this.source;
|
|
1071
|
-
if (!src) {
|
|
1073
|
+
if (!src && !animationsFromProps?.length) {
|
|
1072
1074
|
throw new Error('No animation to convert');
|
|
1073
1075
|
}
|
|
1074
|
-
if (typeCheck || this._isDotLottie) {
|
|
1075
|
-
const animationData = await getAnimationData(src);
|
|
1076
|
-
createJSON({
|
|
1077
|
-
animation: animationData.animations?.[0],
|
|
1078
|
-
fileName: `${getFilename(fileName || src || 'converted')}.json`,
|
|
1079
|
-
shouldDownload
|
|
1080
|
-
});
|
|
1081
|
-
return;
|
|
1082
|
-
}
|
|
1083
1076
|
let animations = animationsFromProps;
|
|
1084
1077
|
if (!animations) {
|
|
1085
1078
|
const animationData = await getAnimationData(src);
|
|
1086
1079
|
animations = animationData.animations;
|
|
1087
1080
|
}
|
|
1081
|
+
if (typeCheck || this._isDotLottie) {
|
|
1082
|
+
return createJSON({
|
|
1083
|
+
animation: animations?.[0],
|
|
1084
|
+
fileName: `${getFilename(fileName || src || 'converted')}.json`,
|
|
1085
|
+
shouldDownload
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
1088
|
return createDotLottie({
|
|
1089
1089
|
animations,
|
|
1090
1090
|
fileName: `${getFilename(fileName || src || 'converted')}.lottie`,
|
package/dist/unpkg.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
`,t)}}createImage(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new s9(t,this.globalData,this)}createNull(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iK(t,this.globalData,this)}createShape(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iM(t,this.globalData,this)}createSolid(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new iQ(t,this.globalData,this)}createText(t){if(!this.globalData)throw Error(`${this.constructor.name}: Can't access globalData`);return new i1(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 i3 extends s6{constructor(t,e,s){super(),this.addPendingElement=i2.prototype.addPendingElement,this.appendElementInPos=i2.prototype.appendElementInPos,this.buildAllItems=i2.prototype.buildAllItems,this.buildElementParenting=i2.prototype.buildElementParenting,this.buildItem=i2.prototype.buildItem,this.checkLayers=i2.prototype.checkLayers,this.checkPendingElements=i2.prototype.checkPendingElements,this.configAnimation=i2.prototype.configAnimation,this.createAudio=i2.prototype.createAudio,this.createCamera=i2.prototype.createCamera,this.createFootage=i2.prototype.createFootage,this.createImage=i2.prototype.createImage,this.createItem=i2.prototype.createItem,this.createNull=i2.prototype.createNull,this.createShape=i2.prototype.createShape,this.createSolid=i2.prototype.createSolid,this.createText=i2.prototype.createText,this.currentFrame=0,this.destroy=s4.prototype.destroy,this.destroyElements=s4.prototype.destroyElements,this.findIndexByInd=i2.prototype.findIndexByInd,this.getElementById=i2.prototype.getElementById,this.getElementByPath=i2.prototype.getElementByPath,this.getElements=s4.prototype.getElements,this.hide=s4.prototype.hide,this.includeLayers=i2.prototype.includeLayers,this.initElement=s4.prototype.initElement,this.initItems=i2.prototype.initItems,this.prepareFrame=s4.prototype.prepareFrame,this.renderedFrame=-1,this.renderFrame=s4.prototype.renderFrame,this.renderInnerContent=s4.prototype.renderInnerContent,this.searchExtraCompositions=i2.prototype.searchExtraCompositions,this.setElements=s4.prototype.setElements,this.setProjectInterface=i2.prototype.setProjectInterface,this.setupGlobalData=i2.prototype.setupGlobalData,this.show=s4.prototype.show,this.updateContainerSize=i2.prototype.updateContainerSize,this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?eL(this.layers.length):[],this.initElement(t,e,s),this.tm=t.tm?sp.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 i3(t,this.globalData,this)}}class i5 extends i2{constructor(t,e){super(),this.animationItem=t,this.layers=[],this.renderedFrame=-1,this.svgElement=tT("svg");let s="";if(e?.title){let t=tT("title"),i=tA();t.id=i,t.textContent=e.title,this.svgElement.appendChild(t),s+=i}if(e?.description){let t=tT("desc"),i=tA();t.id=i,t.textContent=e.description,this.svgElement.appendChild(t),s+=` ${i}`}s&&this.svgElement.setAttribute("aria-labelledby",s);let i=tT("defs");this.svgElement.appendChild(i);let r=tT("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 i3(t,this.globalData,this)}}class i4 extends iZ{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=tI("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=eL(t.layers.length),this.updateContainerSize()}createImage(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new ik(t,this.globalData,this)}createShape(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new iD(t,this.globalData,this)}createSolid(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return new iT(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)}}i4.prototype.createNull=i5.prototype.createNull;class i6 extends s4{constructor(t,e,s){super(),this.addPendingElement=i4.prototype.addPendingElement,this.buildAllItems=i4.prototype.buildAllItems,this.buildElementParenting=i4.prototype.buildElementParenting,this.buildItem=i4.prototype.buildItem,this.checkLayers=i4.prototype.checkLayers,this.checkPendingElements=i4.prototype.checkPendingElements,this.clearCanvas=sR.prototype.clearCanvas,this.configAnimation=i4.prototype.configAnimation,this.createAudio=i4.prototype.createAudio,this.createCamera=i4.prototype.createCamera,this.createContainerElements=sR.prototype.createContainerElements,this.createContent=sR.prototype.createContent,this.createElements=sR.prototype.createElements,this.createFootage=i4.prototype.createFootage,this.createImage=i4.prototype.createImage,this.createItem=i4.prototype.createItem,this.createNull=i4.prototype.createNull,this.createRenderableComponents=sR.prototype.createRenderableComponents,this.createShape=i4.prototype.createShape,this.createSolid=i4.prototype.createSolid,this.createText=i4.prototype.createText,this.ctxFill=i4.prototype.ctxFill,this.ctxFillRect=i4.prototype.ctxFillRect,this.ctxFillStyle=i4.prototype.ctxFillStyle,this.ctxLineCap=i4.prototype.ctxLineCap,this.ctxLineJoin=i4.prototype.ctxLineJoin,this.ctxLineWidth=i4.prototype.ctxLineWidth,this.ctxMiterLimit=i4.prototype.ctxMiterLimit,this.ctxOpacity=i4.prototype.ctxOpacity,this.ctxStroke=i4.prototype.ctxStroke,this.ctxStrokeStyle=i4.prototype.ctxStrokeStyle,this.ctxTransform=i4.prototype.ctxTransform,this.exitLayer=sR.prototype.exitLayer,this.getElementById=i4.prototype.getElementById,this.getElementByPath=i4.prototype.getElementByPath,this.hide=sR.prototype.hide,this.hideElement=sR.prototype.hideElement,this.includeLayers=i4.prototype.includeLayers,this.initItems=i4.prototype.initItems,this.initRendererElement=sR.prototype.initRendererElement,this.prepareLayer=sR.prototype.prepareLayer,this.renderFrame=sR.prototype.renderFrame,this.reset=i4.prototype.reset,this.restore=i4.prototype.restore,this.save=i4.prototype.save,this.searchExtraCompositions=i4.prototype.searchExtraCompositions,this.setBlendMode=sR.prototype.setBlendMode,this.setProjectInterface=i4.prototype.setProjectInterface,this.setupGlobalData=i4.prototype.setupGlobalData,this.show=sR.prototype.show,this.showElement=sR.prototype.showElement,this.updateContainerSize=i4.prototype.updateContainerSize,this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=eL(this.layers.length),this.initElement(t,e,s),this.tm=t.tm?sp.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 i6(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 i9{constructor(){this.opacity=-1,this.transform=e$(I.Float32,16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}}class i8{constructor(){this.stack=[],this.stack=[],this.cArrPos=0,this.cTr=new eN;for(let t=0;t<15;t++){let e=new i9;this.stack[t]=e}this._length=15,this.nativeContext=null,this.transformMat=new eN,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 i9;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 i7{constructor(){let{getBaseElement:t}=s6.prototype,{buildElementParenting:e}=iZ.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 eG(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 sk(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=tI(this.data?.tg||"div"),this.data?.hasMask?(this.svgElement=tT("svg"),this.layerElement=tT("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,t1(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 rt extends s2{constructor(t,e,s){if(super(),this.initFrame(),this.initBaseData(t,e,s),this.initHierarchy(),this.pe=sp.getProp(this,t.pe,0,0,this),t.ks.p?.s?(this.px=sp.getProp(this,t.ks.p.x,1,0,this),this.py=sp.getProp(this,t.ks.p.y,1,0,this),this.pz=sp.getProp(this,t.ks.p.z,1,0,this)):this.p=sp.getProp(this,t.ks.p,1,0,this),t.ks.a&&(this.a=sp.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=sp.getProp(this,t.ks.or,1,ti,this),this.or.sh=!0,this.rx=sp.getProp(this,t.ks.rx,0,ti,this),this.ry=sp.getProp(this,t.ks.ry,0,ti,this),this.rz=sp.getProp(this,t.ks.rz,0,ti,this),this.mat=new eN,this._prevMat=new eN,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 re extends s5{constructor(t,e,s){super();let{addEffects:i,checkBlendMode:r,setMatte:a}=i7.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=tT("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=tI("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 rs extends re{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=tT("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 ri extends s3{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=tT("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=tT("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 rr extends iW{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=eL(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=tT("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=tI("div")).style.lineHeight="0",(o=tT("svg")).appendChild(a),t1(n)))):this.isMasked?a=this.textPaths[m]??tT("text"):this.textSpans[m]?(n=this.textSpans[m],a=this.textPaths[m]):(t1(n=tI("span")),t1(a=tI("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=tT("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 ra extends iZ{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}=i5.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=tI("div"),{wrapper:s}=this.animationItem,{classList:i,style:r}=e;r.width=`${t.w}px`,r.height=`${t.h}px`,this.resizerElem=e,t1(e),r.transformStyle="flat",this.renderConfig.className&&i.add(this.renderConfig.className),s?.appendChild(e),r.overflow="hidden";let a=tT("svg");a.setAttribute("width","1"),a.setAttribute("height","1"),t1(a),this.resizerElem.appendChild(a);let n=tT("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 rt(t,this.globalData,this),this.camera}createImage(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new rs(t,this.globalData,this):new s9(t,this.globalData,this)}createShape(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new ri(t,this.globalData,this):new iM(t,this.globalData,this)}createSolid(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new re(t,this.globalData,this):new iQ(t,this.globalData,this)}createText(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new rr(t,this.globalData,this):new i1(t,this.globalData,this)}createThreeDContainer(t,e){let s,i=tI("div");t1(i);let r=tI("div");t1(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=tI("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 rn extends s4{constructor(t,e,s){super(),this.threeDElements=[],this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=eL(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}=ra.prototype,{addEffects:y,checkBlendMode:b,createRenderableComponents:v,destroy:x,initRendererElement:w,renderElement:_,renderFrame:E,setMatte:C}=i7.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?sp.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 rn(t,this.globalData,this):new i3(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 ro={},rh=["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:rl}=rh;for(let t=0;t<rl;t+=1)ro[rh[t]]=Math[rh[t]];function rp(t,e){return e.i=t.i,e.j=t.j,e.S=[...t.S],e}function rm(t){return String.fromCharCode.apply(0,t)}ro.random=Math.random,ro.abs=t=>{if(tO(t)){let e=eL(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 rc={};!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 rm(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,rm(t)]:null===l?function(){try{let t=new Uint8Array(256);return(s.crypto||s.msCrypto).getRandomValues(t),rm(t)}catch(r){let e=s.navigator,i=e?.plugins;return[Date.now(),s,i,s.screen,rm(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(rm(f.S),t),(c.pass||m||function(t,s,r,a){return(a&&(a.S&&rp(a,f),t.state=function(){return rp(f,{})}),r)?(e[i]=t,s):t})(g,u,"global"in c?c.global:this==e,c.state)},h(e.random(),t)}([],ro);let rd=[0,0,0,0,0,0],ru=se(.333,0,.833,.833,"easeIn").get,rf=se(.33,0,.667,1,"easeInOut").get,rg=se(.167,.167,.667,1,"easeOut").get;function ry(t){let e=typeof t;if("number"===e||t instanceof Number||"boolean"===e)return-t;if(rM(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 rb(t,e,s,i){let r,a,{length:n}=t,o=sy.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 rv(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(rM(o)&&rM(h)){let t,e=o.length,s=e$(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 rx(t,e,s,i,r){return rv(rg,t,e,s,i,r)}function rw(t,e,s,i,r){return rv(ru,t,e,s,i,r)}function r_(t,e,s,i,r){return rv(rf,t,e,s,i,r)}function rE(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(0===o.length)return o+(h-o)*l;let{length:p}=o,m=e$(I.Float32,p);for(let t=0;t<p;t+=1)m[t]=o[t]+(h[t]-o[t])*l;return m}function rC(t){return rP(t,rD(t))}function rS(t,e){let s=t,i=e;if(void 0===i&&(void 0===s?(s=0,i=1):(i=s,s=void 0)),tO(i)){let{length:t}=i;s||(s=e$(I.Float32,t));let e=e$(I.Float32,t),r=ro.random();for(let a=0;a<t;a+=1)e[a]=s[a]+r*(i[a]-s[a]);return e}return(s=s??0)+ro.random()*(i-s)}function rM(t){return"object"==typeof t&&null!==t&&(t.constructor===Array||t.constructor===Float32Array)}function rk(t){return t*ti}function rP(t,e){let s,i,r,a=typeof t,n=typeof e;if(rA(a,t)&&rA(n,e))return Number(t)/Number(e);if(rM(t)&&rA(n,e)){for(i=0,r=t.length,s=e$(I.Float32,r);i<r;i+=1)s[i]=t[i]/Number(e);return s}if(rA(a,t)&&rM(e)){for(i=0,r=e.length,s=e$(I.Float32,r);i<r;i+=1)s[i]=Number(t)/e[i];return s}return 0}function rA(t,e){return"number"===t||e instanceof Number||"boolean"===t||"string"===t}function rD(t,e){let s,i=e;if("number"==typeof t||t instanceof Number)return i=i||0,ro.abs(Number(t)-Number(i));i||(i=rd);let r=ro.min(t.length,i.length),a=0;for(s=0;s<r;s+=1)a+=ro.pow(i[s]-t[s],2);return ro.sqrt(a)}function rT(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 rI(t,e){let s,i,r,a=typeof t,n=typeof e;if(rA(a,t)&&rA(n,e))return Number(t)*Number(e);if(rM(t)&&rA(n,e)){for(i=0,r=t.length,s=e$(I.Float32,r);i<r;i+=1)s[i]=t[i]*Number(e);return s}if(rA(a,t)&&rM(e)){for(i=0,r=e.length,s=e$(I.Float32,r);i<r;i++)s[i]=Number(t)*e[i];return s}return 0}function rF(t){return t}function r$(t){return t/ti}function rL(t,e){let s=t,i=e,r=typeof s,a=typeof i;if(rA(r,s)&&rA(a,i))return"string"===r&&(s=parseInt(s,10)),"string"===a&&(i=parseInt(i,10)),s-i;if(rM(s)&&rA(a,i))return s=[...s],s[0]-=Number(i),s;if(rA(r,s)&&rM(i))return(i=[...i])[0]=Number(s)-i[0],i;if(rM(s)&&rM(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 rN(t,e){let s=t,i=e,r=typeof s,a=typeof i;if(rA(r,s)&&rA(a,i)||"string"===r||"string"===a)return Number(s)+Number(i);if(rM(s)&&rA(a,i))return s=[...s],s[0]+=Number(i),s;if(rA(r,s)&&rM(i))return(i=[...i])[0]=s+i[0],i;if(rM(s)&&rM(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 rB={initiateExpression:function(t,e,s){if(!t.globalData?.renderConfig?.runExpressions)return rF;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,E=null,C,S=null,M,k=null,P=null,A=null,D=null,T=null,F=null,$,L=rF,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",`
|
|
6
6
|
${r}
|
|
7
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=tO(s)?s.length:1,r=e$(I.Float32,i),a=ro.floor(5*V),n=0;for(;n<a;){for(let t=0;t<i;t++)r[t]+=-e+2*e*ro.random();n++}let o=5*V,h=o-ro.floor(o),l=e$(I.Float32,i);if(i>1){for(let t=0;t<i;t++)l[t]=s[t]+r[t]+(-e+2*e*ro.random())*h;return l}return s+r[0]+(-e+2*e*ro.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 K=this.getValueAtTime.bind(this),Q=this.getVelocityAtTime.bind(this),{frameRate:tt,projectInterface:te}=t.comp.globalData;function ts(t,e){let s=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=ro.atan2(s[0],ro.sqrt(s[1]*s[1]+s[2]*s[2]))/ti;return[-ro.atan2(s[1],s[2])/ti,i,0]}function tr(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*=tt)<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/tt}}function ta(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/tt,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 tn(t,e){let s=e;return s||(s=tt),t/s}function to(t,e){let s=t,i=e;return s||0===s||(s=V),i||(i=tt),s*i}function th(t){ro.seedrandom(g+t)}function tl(){return t.sourceRectAtTime()}function tp(t,e){return"string"==typeof O?void 0===e?O.slice(ro.max(0,t)):O.slice(t,e):""}function tm(t,e){return"string"==typeof O?void 0===e?O.slice(t):O.slice(t,e):""}let tc=t.data.ind,td=!!t.hierarchy?.length,tu=null;g=ro.floor(1e6*ro.random());let{globalData:tf}=t;function tg(t){O=K(V=0===t?0:ro.floor(V*t)/t)}return function(e){return(O=e,this.frameExpressionId===tf.frameId&&this.propType!==R.TextSelector)?O:(this.propType===R.TextSelector&&(q=this.textIndex,j=this.textTotal,W=this.selectorValue),$||(G=t.layerInterface?.text,$=t.layerInterface,D=t.comp?.compInterface,F=$?.toWorld.bind($),E=$?.fromWorld.bind($),w=$?.fromComp.bind($),T=$?.toComp.bind($),P=$?.mask?$.mask.bind($):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&&!tu&&(tu=t.hierarchy?.[0].layerInterface??null),V=(this.comp?.renderedFrame??0)/(this.comp?.globalData?.frameRate??60),n&&th(g+V),a&&(z=Q(V)),B(rc,rP,rT,rI,ry,rL,rN,d,U,rN,x,tD,te,u,rb,r$,rk,rP,null,r_,rw,rx,f,null,null,tn,w,_,E,tf,p,tB,tc,b,ta,rD,rE,ts,S,k,C,X,M,Z,P,rT,rI,h,tr,rC,H,N,v,null,tg,Y,r$,r$,rS,g,tZ,null,null,th,W,A,tl,rL,tm,tp,G,q,j,D,$,s,V,to,T,F,y,O,K,z,m,J,null,null),this.frameExpressionId=tf.frameId,N.scoped_bm_rt?.propType===R.Shape?N.scoped_bm_rt.v:N.scoped_bm_rt)}},resetFrame:function(){rc={}}},rR={getSpeedAtTime:function(t){let e=this.getValueAtTime(t),s=this.getValueAtTime(t+-.01),i=0;if(tO(e)&&tO(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(tO(s)&&tO(i)){let{length:t}=s;e=e$(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=rB.initiateExpression,s.effectsSequence.push(s.initiateExpression(t,e,s).bind(s)))},setGroupProperty:function(t){this.propertyGroup=t}};class rV extends sC{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=e7.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=e7.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=eL(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=rR.getStaticValueAtTime,this.setGroupProperty=rR.setGroupProperty}}function rz(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(tO(p)&&tO(t)&&tO(e)&&tO(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(tO(p)&&tO(t)&&tO(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 rO(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(tO(c)&&tO(t)&&tO(e)&&tO(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(tO(c)&&tO(t)&&tO(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=tO(a)?e$(I.Float32,a.length):0;d<l;){if(s=this.getValueAtTime(m+d*c),tO(a)&&tO(f)&&tO(s)){for(u=0;u<a.length;u++)f[u]+=s[u];d++;continue}f+=s,d++}if(tO(a)&&tO(f)){for(u=0;u<a.length;u+=1)f[u]/=l;return f}return f/l}function rq(t){this._transformCachingAtTime=this._transformCachingAtTime??{v:new eN};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 rj(){return this.v.clone(new eN)}function rW(t,e){this._cachingAtTime=this._cachingAtTime??{lastIndex:0,lastTime:-999999,shapeValue:sy.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 rH{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:rY}=rB;class rU{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=e$(I.Float32,i),a=e$(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 rJ(t){return new rU().getInterface(t)}class rX{constructor(t,e){this.interfaceFunction=t,this.parentPropertyGroup=e}getInterface(t=1){return t<=0?this.interfaceFunction:this.parentPropertyGroup(t-1)}}class rZ{constructor(t,e){this._name=t,this.propertyGroup=e}getInterface(t){return t<=0?this:this.propertyGroup(t-1)}}class rK{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 rQ{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 r0{constructor(t,e){this.maskManager=t,this._masksInterfaces=eL(t.viewData.length);let{length:s}=t.viewData;for(let e=0;e<s;e++)this._masksInterfaces[e]=new rQ(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 r1{get anchorPoint(){return rJ(this.transform.a)}get opacity(){return rJ(this.transform.o)}get orientation(){return rJ(this.transform.or)}get position(){return this.transform.p?this._transformFactory?.():[this._px?.(),this._py?.(),this._pz?.()??0]}get rotation(){return rJ(this.transform.r??this.transform.rz)}get scale(){return rJ(this.transform.s)}get skew(){return rJ(this.transform.sk)}get skewAxis(){return rJ(this.transform.sa)}get xPosition(){return rJ(this.transform.px)}get xRotation(){return rJ(this.transform.rx)}get yPosition(){return rJ(this.transform.py)}get yRotation(){return rJ(this.transform.ry)}get zPosition(){return rJ(this.transform.pz)}get zRotation(){return rJ(this.transform.rz??this.transform.r)}constructor(t){this.transform=t,t.p?this._transformFactory=rJ(t.p):(this._px=rJ(t.px),this._py=rJ(t.py),t.pz&&(this._pz=rJ(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 r2{getInterface(t){throw Error("Method not implemented")}}class r3 extends r2{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 r5 extends r2{get position(){return rJ(this.prop?.p)}get size(){return rJ(this.prop?.s)}getInterface(t){return this.shape?.p?.ix===t?this.position:this.shape?.s?.ix===t?this.size:null}}class r4 extends r2{get color(){return rJ(this.c)}get opacity(){return rJ(this.o)}getInterface(t){return"Color"===t||"color"===t?this.color:"Opacity"===t||"opacity"===t?this.opacity:null}}class r6 extends r2{get endPoint(){return rJ(this.prop?.e)}get opacity(){return rJ(this.prop?.o)}get startPoint(){return rJ(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 r9 extends r2{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 r8 extends r2{get position(){return rJ(this.prop?.p)}get roundness(){return rJ(this.prop?.r)}get size(){return rJ(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 r7{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 rX(this,s);this.prop?.setGroupProperty(new rZ("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 at extends r2{get innerRadius(){return rJ(this.prop?.ir)}get innerRoundness(){return rJ(this.prop?.is)}get outerRadius(){return rJ(this.prop?.or)}get outerRoundness(){return rJ(this.prop?.os)}get points(){return rJ(this.prop?.pt)}get position(){return rJ(this.prop?.p)}get rotation(){return rJ(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 ae extends r2{get color(){return rJ(this.prop?.c)}get dash(){return this.dashOb}get opacity(){return rJ(this.prop?.o)}get strokeWidth(){return rJ(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 as extends r2{get anchorPoint(){return rJ(this.prop?.transform?.mProps.a)}get opacity(){return rJ(this.prop?.transform?.mProps.o)}get position(){return rJ(this.prop?.transform?.mProps.p)}get rotation(){return rJ(this.prop?.transform?.mProps.r)}get scale(){return rJ(this.prop?.transform?.mProps.s)}get skew(){return rJ(this.prop?.transform?.mProps.sk)}get skewAxis(){return rJ(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 ai extends r2{get end(){return rJ(this.prop?.e)}get offset(){return rJ(this.prop?.o)}get start(){return rJ(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}}class ar extends r2{get copies(){return rJ(this.prop?.c)}get offset(){return rJ(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 aa extends r2{get radius(){return rJ(this.prop?.rd)}getInterface(t){return this.shape?.r?.ix===t||"Round Corners 1"===t?this.radius:null}}let an={comp:rH,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 rK(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 rX(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=rJ(t.p);return t.p?.setGroupProperty(new rZ("",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 r1(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 eN;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 eN;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 r0(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 rX(this,this.parentGroupWrapper),this.interfaces=this.iterateElements(t,e,this.propertyGroup),this.numProperties=this.interfaces.length,this._name="Contents"}contentsInterfaceFactory(t,e,s){r3.prototype.propertyGroup=new rX(r3,s),this.interfaces=this.iterateElements(t.it??null,e.it,r3.prototype.propertyGroup),r3.prototype.numProperties=this.interfaces.length;let i=this.transformInterfaceFactory(t.it[t.it.length-1],e.it[e.it.length-1],r3.prototype.propertyGroup);return r3.prototype.transform=i,r3.prototype.propertyIndex=t.cix,r3.prototype._name=t.nm,r3.prototype.getInterface}defaultInterfaceFactory(){return this.noOp}ellipseInterfaceFactory(t,e,s){let i=new rX(r5,s);r5.prototype.shape=t,r5.prototype.propertyIndex=t.ix;let r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return r.s.setGroupProperty(new rZ("Size",i)),r.p?.setGroupProperty(new rZ("Position",i)),r5.prototype._name=t.nm,r5.prototype.prop=r,r5.prototype.mn=t.mn,r5.prototype.getInterface}fillInterfaceFactory(t,e,s){return r4.prototype._name=t.nm,r4.prototype.c=e.c,r4.prototype.mn=t.mn,r4.prototype.o=e.o,e.c?.setGroupProperty(new rZ("Color",s)),e.o?.setGroupProperty(new rZ("Opacity",s)),r4.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 r6.prototype._name=t.nm,r6.prototype.prop=e,r6.prototype.mn=t.mn,e.s?.setGroupProperty(new rZ("Start Point",s)),e.e?.setGroupProperty(new rZ("End Point",s)),e.o?.setGroupProperty(new rZ("Opacity",s)),r6.prototype.getInterface}groupInterfaceFactory(t,e,s){r9.prototype.propertyGroup=new rX(r9,s);let i=this.contentsInterfaceFactory(t,e,r9.prototype.propertyGroup),r=this.transformInterfaceFactory(t.it[t.it.length-1],e.it[e.it.length-1],r9.prototype.propertyGroup);return r9.prototype.content=i,r9.prototype.transform=r,r9.prototype.shape=t,r9.prototype.numProperties=t.np,r9.prototype.propertyIndex=t.ix,r9.prototype.nm=t.nm,r9.prototype.mn=t.mn,r9.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 r7(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){r8.prototype.shape=t;let i=new rX(r8,s),r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return r8.prototype.propertyIndex=t.ix,r.p?.setGroupProperty(new rZ("Position",i)),r.s.setGroupProperty(new rZ("Size",i)),r.r.setGroupProperty(new rZ("Rotation",i)),r8.prototype.prop=r,r8.prototype._name=t.nm,r8.prototype.mn=t.mn,r8.prototype.getInterface}repeaterInterfaceFactory(t,e,s){ar.prototype.shape=t,ar.prototype.propertyIndex=t.ix,ar.prototype._name=t.nm,ar.prototype.mn=t.mn;let i=new rX(ar,s);return ar.prototype.prop=e,e.c?.setGroupProperty(new rZ("Copies",i)),e.o?.setGroupProperty(new rZ("Offset",i)),ar.prototype.getInterface}roundedInterfaceFactory(t,e,s){aa.prototype.shape=t,aa.prototype._name=t.nm,aa.prototype.propertyIndex=t.ix,aa.prototype.mn=t.mn;let i=new rX(aa,s);return e.rd.setGroupProperty(new rZ("Radius",i)),aa.prototype.getInterface}starInterfaceFactory(t,e,s){at.prototype.shape=t;let i=new rX(at,s),r=e.sh?.ty===N.Trim?e.sh.prop:e.sh;return at.prototype.propertyIndex=t.ix,r.or.setGroupProperty(new rZ("Outer Radius",i)),r.os.setGroupProperty(new rZ("Outer Roundness",i)),r.pt.setGroupProperty(new rZ("Points",i)),r.p.setGroupProperty(new rZ("Position",i)),r.r.setGroupProperty(new rZ("Rotation",i)),t.ir&&(r.ir.setGroupProperty(new rZ("Inner Radius",i)),r.is.setGroupProperty(new rZ("Inner Roundness",i))),at.prototype._name=t.nm,at.prototype.prop=r,at.prototype.mn=t.mn,at.prototype.getInterface}strokeInterfaceFactory(t,e,s){let i={},r=new rX(ae,s),a=new rX(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:rJ(e.d.dataProps[o].p)}),e.d.dataProps[s].p.setGroupProperty(a)}return ae.prototype._name=t.nm,ae.prototype.mn=t.mn,ae.prototype.dashOb=i,ae.prototype.prop=e,e.c?.setGroupProperty(new rZ("Color",r)),e.o?.setGroupProperty(new rZ("Opacity",r)),e.w?.setGroupProperty(new rZ("Stroke Width",r)),ae.prototype.getInterface}transformInterfaceFactory(t,e,s){as.prototype.shape=t;let i=new rX(as,s);return e.transform?.mProps.o?.setGroupProperty(new rZ("Opacity",i)),e.transform?.mProps.p?.setGroupProperty(new rZ("Position",i)),e.transform?.mProps.a?.setGroupProperty(new rZ("Anchor Point",i)),e.transform?.mProps.s?.setGroupProperty(new rZ("Scale",i)),e.transform?.mProps.r?.setGroupProperty(new rZ("Rotation",i)),e.transform?.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(new rZ("Skew",i)),e.transform.mProps.sa?.setGroupProperty(new rZ("Skew Angle",i))),e.transform?.op.setGroupProperty(new rZ("Opacity",i)),as.prototype._name=t.nm,as.prototype.prop=e,as.prototype.ty=N.Transform,as.prototype.mn=t.mn,as.prototype.propertyGroup=s,as.prototype.getInterface}trimInterfaceFactory(t,e,s){ai.prototype.shape=t;let i=new rX(ai,s);return ai.prototype.propertyIndex=t.ix,e.s?.setGroupProperty(new rZ("Start",i)),e.e?.setGroupProperty(new rZ("End",i)),e.o?.setGroupProperty(new rZ("Offset",i)),ai.prototype.propertyIndex=t.ix,ai.prototype.propertyGroup=s,ai.prototype._name=t.nm,ai.prototype.prop=e,ai.prototype.mn=t.mn,ai.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}}};class ao extends si{addShape(t){if(this.closed)return;t.sh?.container?.addDynamicProperty(t.sh);let e={data:t,localShapeCollection:sv(),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=[]}}function ah(t,e,s,i,r,a,n){let o=tN(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;tK(t,e.v[s%e._length]||[0,0],o,n,i,c/((r+1)*2),m/((r+1)*2))}let al={loadAnimation:function(t){try{let e=new e_;return eI(e,null),e.setParams(t),e}catch(t){throw console.error("AnimationManager:\n",t),Error("Could not load animation")}}},ap=setInterval(function(){th()||"complete"===document.readyState&&(clearInterval(ap),function(){if(th())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<eS;){if(ek[s].elem===t&&null!==ek[s].elem)return ek[s].animation;s++}let i=new e_;eI(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 i4{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 i8,this.elements=[],this.pendingElements=[],this.transformMat=new eN,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 i6(t,this.globalData,this)}}),G(L.HTML,class extends ra{createComp(t){if(!this.globalData)throw Error(`${this.constructor.name}: globalData is not implemented`);return this.supports3d?new rn(t,this.globalData,this):new i3(t,this.globalData,this)}}),G(L.SVG,i5),iS(F.TrimModifier,class extends ao{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=su(),c=0,f=0),i&&u.push(i);for(let t=0;t<o;t++){if(!i)continue;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=e1(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=e1(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=su(),g=!0,i&&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=sp.getProp(t,e.s,0,.01,this),this.e=sp.getProp(t,e.e,0,.01,this),this.o=sp.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=e2(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++)eK.release(t[s]);return t.length=0,t}}),iS(F.PuckerAndBloatModifier,class extends ao{initModifierProperties(t,e){this.getValue=this.processKeys,this.amount=sp.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=su();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)}}),iS(F.RepeaterModifier,class extends ao{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=sp.getProp(t,e.c,0,null,this),this.o=sp.getProp(t,e.o,0,null,this),e.tr&&(this.tr=sQ.getTransformProperty(t,e.tr,this),this.so=sp.getProp(t,e.tr.so,0,.01,this),this.eo=sp.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 eN,this.rMatrix=new eN,this.sMatrix=new eN,this.tMatrix=new eN,this.matrix=new eN}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=[]}}),iS(F.RoundCornersModifier,class extends ao{initModifierProperties(t,e){this.getValue=this.processKeys,this.rd=sp.getProp(t,e.r,0,null,this),this._isAnimated=this.rd.effectsSequence.length>0}processPath(t,e){let s=su();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)}}),iS(F.ZigZagModifier,class extends ao{initModifierProperties(t,e){this.getValue=this.processKeys,this.amplitude=sp.getProp(t,e.s,0,null,this),this.frequency=sp.getProp(t,e.r,0,null,this),this.pointsType=sp.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=su();if(a.c=t.c,t.c||(r-=1),0===r)return a;let n=-1,o=ts(t,0);ah(a,t,0,e,s,i,n);for(let h=0;h<r;h++)n=function(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);tK(t,e.point(o),l,n,s,h/((i+1)*2),h/((i+1)*2)),n=-n}return n}(a,o,e,s,i,-n),o=h!==r-1||t.c?ts(t,(h+1)%r):null,ah(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)}}),iS(F.OffsetPathModifier,class extends ao{initModifierProperties(t,e){this.getValue=this.processKeys,this.amount=sp.getProp(t,e.a,0,null,this),this.miterLimit=sp.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=su();r.c=t.c;let a=t.length();t.c||(a-=1);let n,o=[];for(let s=0;s<a;s++)n=ts(t,s),o.push(tW(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 te(t.v[s],t.i[s],t.o[e],t.v[e],!0)}(t,s),o.push(tW(n,e));o=tY(o);let h=null,l=null,{length:p}=o;for(let t=0;t<p;t++){let e=o[t];l&&(h=tq(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&&tp(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&&tq(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)}}),ey.plugin={initExpressions:function(t){let e=0,s=[];if(!t.renderer.globalData)throw Error("Renderer -> GlobalData is not set");t.renderer.compInterface=new rH(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:rY},ey.interface=function(t){return an[t]},function(){let{getTransformProperty:t}=sQ;sQ.getTransformProperty=function(e,s,i){let r=t(e,s,i);return r.dynamicProperties.length>0?r.getValueAtTime=rq.bind(r):r.getValueAtTime=rj.bind(r),r.setGroupProperty=rR.setGroupProperty,r};let e=sp.getProp;sp.getProp=function(t,s,i,r,a){let n=e(t,s,i,r,a);n.kf?n.getValueAtTime=rR.getValueAtTime.bind(n):n.getValueAtTime=rR.getStaticValueAtTime.bind(n),n.setGroupProperty=rR.setGroupProperty,n.loopOut=rz,n.loopIn=rO,n.smooth=rG,n.getVelocityAtTime=rR.getVelocityAtTime.bind(n),n.getSpeedAtTime=rR.getSpeedAtTime.bind(n),n.numKeys=s?.a===1?s.k.length:0,n.propertyIndex=s?.ix;let o=0;return 0!==i&&(o=e$(I.Float32,s?.a===1?s.k[0].s.length:(s?.k).length)),n._cachingAtTime={lastFrame:-999999,lastIndex:0,value:o},rR.searchExpressions(t,s,n),n.k&&a?.addDynamicProperty(n),n};let s=sM.getConstructorFunction(),i=sM.getKeyframedConstructorFunction();t$([rV],s),t$([rV],i),i.prototype.getValueAtTime=rW,i.prototype.initiateExpression=rB.initiateExpression;let r=sM.getShapeProp;sM.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?rR.searchExpressions(t,e.pt,n):4===s&&rR.searchExpressions(t,e.ks,n),n.k&&t.addDynamicProperty(n)),n}}(),ij.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},ij.prototype.searchProperty=function(){let t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=!!(t||e),this.kf},ij.prototype.searchExpressions=function(){return this.data.d?.x?(this.calculateExpression=rB.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null},eJ(20,class extends eR{constructor(t,e,s,i,r){super(),this.filterManager=e;let a=tT("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",`${ez} 1 0`),this.linearFilter=a,a.setAttribute("result",`${i}_tint_1`),t.appendChild(a),(a=tT("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",`${ez} ${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),eJ(21,class{constructor(t,e,s,i){this.filterManager=e;let r=tT("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),eJ(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=tT("g");for(r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-dashoffset","1");e<s;e++)t=tT("path"),r.appendChild(t),this.paths.push({m:e,p:t});if(3===this.filterManager.effectElements[10].p.v){let t=tT("mask"),e=tA();t.id=e,t.setAttribute("mask-type","alpha"),t.appendChild(r),this.elem.globalData?.defs.appendChild(t);let s=tT("g");for(s.setAttribute("mask",`url(${K()}#${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),eJ(23,class{constructor(t,e,s,i){this.filterManager=e;let r=tT("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=tT("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",i),this.matrixFilter=a;let n=tT("feFuncR");n.setAttribute("type","table"),a.appendChild(n),this.feFuncR=n;let o=tT("feFuncG");o.setAttribute("type","table"),a.appendChild(o),this.feFuncG=o;let h=tT("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),eJ(24,class{constructor(t,e,s,i){this.filterManager=e;let{effectElements:r}=this.filterManager,a=tT("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=tT("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=tT(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=eL(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),eJ(25,class extends eR{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=tT("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",`${i}_drop_shadow_1`),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,t.appendChild(o);let h=tT("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=tT("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=tT("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",tX(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)*ti,s=t*Math.cos(e),i=t*Math.sin(e);this.feOffset.dx.baseVal=s,this.feOffset.dy.baseVal=i}}}},!0),eJ(28,class{constructor(t,e,s){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=s,s.matteElement=tT("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}=eV;for(;e<s;){if(eV[e]===t)return eV[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=tT("use");o.setAttribute("href",`#${e}`),s?i.insertBefore(o,s):i.appendChild(o)}setElementAsMask(t,e){if(!this.findSymbol(e)){let s=tA(),i=tT("mask");e.layerId&&(i.id=e.layerId),i.setAttribute("mask-type","alpha"),eV.push(e);let{defs:r}=t.globalData??{defs:null};r?.appendChild(i);let a=tT("symbol");a.id=s,this.replaceInParent(e,s),e.layerElement&&a.appendChild(e.layerElement),r?.appendChild(a);let n=tT("use");n.href.baseVal=`#${s}`,i.appendChild(n),e.data.hd=!1,e.show()}t.setMatte(e.layerId||"")}},!1),eJ(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=tT("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),eJ(35,class extends eB{constructor(t,e){super(),this.init(e)}},!1),f=class extends eB{constructor(t){super(),this.init(t)}},eO[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 n4.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,aI=aD.r;aT[28]=258,aI[258]=28;for(var aF=aA(ak,0),a$=aF.b,aL=aF.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 I=_.subarray(0,v),F=_.subarray(v);f=aH(I),g=aH(F),d=aV(I,f,1),u=aV(F,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 F=a$[q];if(q>3){var O=ak[q];F+=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<F){var W=a-F,H=Math.min(F,j);for(W+c<0&&aK(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?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,I=19;I>4&&!D[aP[I-1]];--I);var F=l+5<<3,$=a4(r,az)+a4(a,aO)+n,L=a4(r,g)+a4(a,v)+n+14+3*I+a4(k,D)+2*k[16]+3*k[17]+7*k[18];if(h>=0&&F<=$&&F<=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,I-4),p+=14;for(var P=0;P<I;++P)a0(e,p+3*P,D[aP[P]]);p+=3*I;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 I=n-S;if((E>7e3||M>24576)&&(I>423||!l)){p=a9(t,h,0,x,w,_,C,M,P,S-P,p),M=E=C=0,P=S;for(var F=0;F<286;++F)w[F]=0;for(var F=0;F<30;++F)_[F]=0}var $=2,L=0,N=d,B=D-T&32767;if(I>2&&A==v(S-B))for(var R=Math.min(c,I)-1,V=Math.min(32767,S),z=Math.min(258,I);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,F=0;F<G;++F){var j=S-B+F&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|aI[$]<<18|aL[L];var Y=31&aI[$],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,aI,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()};class nI extends Error{}let nF=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},n$=t=>{let e=t?.split("/").pop()?.lastIndexOf(".");return(e??0)>1&&t&&t.length-1>(e??0)},nL=t=>{if("string"==typeof t&&t&&n$(t))return t.split(".").pop()?.toLowerCase()},nN=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)})})},nB=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")))}),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""}},nV=t=>!("h"in t)&&!("w"in t)&&"p"in t&&"e"in t&&"u"in t&&"id"in t,nz=t=>"w"in t&&"h"in t&&!("xt"in t)&&"p"in t,nO=t=>t.slice(Math.max(0,t.indexOf(",")+1)),nG=t=>!!t&&/^(?:[0-9a-z+/]{4})*(?:[0-9a-z+/]{2}==|[0-9a-z+/]{3}=)?$/i.test(nO(t)),nq=async(t,e)=>{if(!Array.isArray(e))return;let s=[],{length:i}=e;for(let r=0;r<i;r++){if(!nV(e[r])&&!nz(e[r]))continue;let i=nz(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:")||nG(e[r].p)?e[r].p:`data:${nR(nL(e[r].p))};base64,${s}`,e[r].e=1,e[r].u="",t()}))}await Promise.all(s)},nj=t=>t.replaceAll(RegExp(/"""/,"g"),'""').replaceAll(/(["'])(.*?)\1/g,(t,e,s)=>{let i=s.replaceAll(/[^\w\s.#]/g,"");return`${e}${i}${e}`}),nW=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)}})},nH=async t=>{let e=await nN(t),s=nF(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(nj(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(nq(e,a.assets)),i.push(a)}return await Promise.all(r),{data:i,manifest:s}},nY=(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)},nU=(t,e)=>(nL(t),`${t.split("/").pop()?.replace(/\.[^.]*$/,"").replaceAll(/\W+/g,"-")}`),nJ=(t,e)=>{if(e)return nL(e)?nL(e)===t?e:`${nU(e)}.${t}`:`${e}.${t}`},nX=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}},nZ=t=>nC(a()?Buffer.from(nO(t),"base64").toString("binary"):atob(nO(t)),!0),nK=t=>t.split(":")[1].split(";")[0].split("/")[1].split("+")[0],nQ=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},n0=async({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=nJ("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||!nz(i)&&!nV(i))continue;let{p:r,u:o}=i;if(!r)continue;let h=n(),l=r.startsWith("data:"),p=l?nK(r):nL(r),m=l?r:await nW(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[`${nV(i)?"audio":"images"}/${h}.${p}`]=[nZ(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 nB(a);if(i)return nY(h,{mimeType:"application/zip",name:r}),null;return h}catch(t){return console.error(`❌ ${nQ(t).message}`),null}},n1=({animation:t,fileName:e,shouldDownload:s})=>{try{if(!t)throw Error("createJSON: Missing or malformed required parameter(s):\n - animation\n'");let i=nJ("json",e)||`${n()}.json`,r=JSON.stringify(t);s&&nY(r,{mimeType:"application/json",name:i});return}catch(t){console.error(`❌ ${nQ(t).message}`)}},n2=t=>((t??0)+1).toString().padStart(3,"0"),n3=async 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){let t=new nI(e.statusText);throw t.status=e.status,t}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 nH(e);return{animations:r,isDotLottie:!0,manifest:a}}catch(t){return console.error(`❌ ${nQ(t).message}`),{animations:void 0,isDotLottie:!1,manifest:null}}},n5="@aarsteinmedia/dotlottie-player";class n4 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 n3(this.src):{};try{if(!r)throw Error("Manifest is not set");r.generator=n5;let{length:a}=t;for(let e=0;e<a;e++){let{url:s}=t[e],{animations:a}=await n3(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 n0({animations:i,fileName:e,manifest:r,shouldDownload:s}),success:!0}}catch(t){return{error:nQ(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 n=r||this.src||this.source;if(!n)throw Error("No animation to convert");if(a||this._isDotLottie){let t=await n3(n);n1({animation:t.animations?.[0],fileName:`${nU(e||n||"converted")}.json`,shouldDownload:i});return}let o=t;return o||(o=(await n3(n)).animations),n0({animations:o,fileName:`${nU(e||n||"converted")}.lottie`,manifest:{...s??this._manifest,generator:n5},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 n3(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=nQ(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&&nY(i,{mimeType:"image/svg+xml",name:`${nU(this.src||e)}-${n2(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??nX(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=nQ(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 n4;let n6="dotlottie-player";a()||customElements.define(n6,n4),t.PlayMode=af,t.PlayerEvents=ag,t.PlayerState=au,t.default=n4,t.tagName=n6,Object.defineProperty(t,"__esModule",{value:!0})}(this["@aarsteinmedia/dotlottie-player"]=this["@aarsteinmedia/dotlottie-player"]||{});
|
|
8
|
+
${t.length>0?"- manifest\n":""} ${s?"- animations\n":""}`);let r=nJ("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||!nz(i)&&!nV(i))continue;let{p:r,u:o}=i;if(!r)continue;let h=n(),l=r.startsWith("data:"),p=l?nK(r):nL(r),m=l?r:await nW(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[`${nV(i)?"audio":"images"}/${h}.${p}`]=[nZ(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 nB(a);if(i)return nY(h,{mimeType:"application/zip",name:r}),null;return h}catch(t){return console.error(nQ(t).message),null}},n1=({animation:t,fileName:e,shouldDownload:s})=>{try{if(!t)throw Error("createJSON: Missing or malformed required parameter(s):\n - animation\n'");let i=nJ("json",e)||`${n()}.json`,r=JSON.stringify(t);if(s)return nY(r,{mimeType:"application/json",name:i}),null;return r}catch(t){return console.error(nQ(t).message),null}},n2=t=>((t??0)+1).toString().padStart(3,"0"),n3=async 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){let t=new nI(e.statusText);throw t.status=e.status,t}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 nH(e);return{animations:r,isDotLottie:!0,manifest:a}}catch(t){return console.error(nQ(t).message),{animations:void 0,isDotLottie:!1,manifest:null}}},n5="@aarsteinmedia/dotlottie-player";class n4 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 n3(this.src):{};try{if(!r)throw Error("Manifest is not set");r.generator=n5;let{length:a}=t;for(let e=0;e<a;e++){let{url:s}=t[e],{animations:a}=await n3(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 n0({animations:i,fileName:e,manifest:r,shouldDownload:s}),success:!0}}catch(t){return{error:nQ(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 n=r||this.src||this.source;if(!n&&!t?.length)throw Error("No animation to convert");let o=t;return(o||(o=(await n3(n)).animations),a||this._isDotLottie)?n1({animation:o?.[0],fileName:`${nU(e||n||"converted")}.json`,shouldDownload:i}):n0({animations:o,fileName:`${nU(e||n||"converted")}.lottie`,manifest:{...s??this._manifest,generator:n5},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 n3(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=nQ(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&&nY(i,{mimeType:"image/svg+xml",name:`${nU(this.src||e)}-${n2(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??nX(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=nQ(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 n4;let n6="dotlottie-player";a()||customElements.define(n6,n4),t.PlayMode=af,t.PlayerEvents=ag,t.PlayerState=au,t.default=n4,t.tagName=n6,Object.defineProperty(t,"__esModule",{value:!0})}(this["@aarsteinmedia/dotlottie-player"]=this["@aarsteinmedia/dotlottie-player"]||{});
|
package/package.json
CHANGED