UNPKG

@lottiefiles/dotlottie-react

Version:

React wrapper around the dotlottie-web library

6 lines 441 kB
import {useState,useRef,useEffect,useCallback}from'react';import {jsx}from'react/jsx-runtime';var t0=Object.defineProperty,e0=Object.defineProperties,i0=Object.getOwnPropertyDescriptors,N1=Object.getOwnPropertySymbols,e3=Object.prototype.hasOwnProperty,i3=Object.prototype.propertyIsEnumerable,L2=(d,i,n)=>i in d?t0(d,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):d[i]=n,O=(d,i)=>{for(var n in i||(i={}))e3.call(i,n)&&L2(d,n,i[n]);if(N1)for(var n of N1(i))i3.call(i,n)&&L2(d,n,i[n]);return d},N=(d,i)=>e0(d,i0(i)),n3=(d,i)=>{var n={};for(var h in d)e3.call(d,h)&&i.indexOf(h)<0&&(n[h]=d[h]);if(d!=null&&N1)for(var h of N1(d))i.indexOf(h)<0&&i3.call(d,h)&&(n[h]=d[h]);return n},p=(d,i,n)=>L2(d,typeof i!="symbol"?i+"":i,n),y=(d,i,n)=>new Promise((h,s)=>{var m=I=>{try{C(n.next(I));}catch(P){s(P);}},M=I=>{try{C(n.throw(I));}catch(P){s(P);}},C=I=>I.done?h(I.value):Promise.resolve(I.value).then(m,M);C((n=n.apply(d,i)).next());}),n0=class{requestAnimationFrame(d){return requestAnimationFrame(d)}cancelAnimationFrame(d){cancelAnimationFrame(d);}},r0=class{constructor(){p(this,"_lastHandleId",0),p(this,"_lastImmediate",null);}requestAnimationFrame(d){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{d(Date.now());}),this._lastHandleId}cancelAnimationFrame(d){this._lastImmediate&&clearImmediate(this._lastImmediate);}},a0=class{constructor(){p(this,"_strategy"),this._strategy=typeof requestAnimationFrame=="function"?new n0:new r0;}requestAnimationFrame(d){return this._strategy.requestAnimationFrame(d)}cancelAnimationFrame(d){this._strategy.cancelAnimationFrame(d);}},W=typeof window<"u"&&typeof window.document<"u",m2=new Uint8Array([80,75,3,4]),o0=["v","ip","op","layers","fr","w","h"],r3="0.42.0",a3="@lottiefiles/dotlottie-web",s0=.75,h0=(()=>{var d,i=typeof document<"u"?(d=document.currentScript)==null?void 0:d.src:void 0;return function(n={}){var h,s=n,m,M,C=new Promise((t,e)=>{m=t,M=e;}),I=Object.assign({},s),P="./this.program",A="",n1;typeof document<"u"&&document.currentScript&&(A=document.currentScript.src),i&&(A=i),A.startsWith("blob:")?A="":A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1),n1=t=>fetch(t,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url)));var q=s.print||console.log.bind(console),J=s.printErr||console.error.bind(console);Object.assign(s,I),I=null,s.thisProgram&&(P=s.thisProgram);var r1=s.wasmBinary,_1,l1=!1,s1,Z,S,t1,z,K,w,k,m1;function L1(){var t=_1.buffer;s.HEAP8=Z=new Int8Array(t),s.HEAP16=t1=new Int16Array(t),s.HEAPU8=S=new Uint8Array(t),s.HEAPU16=z=new Uint16Array(t),s.HEAP32=K=new Int32Array(t),s.HEAPU32=w=new Uint32Array(t),s.HEAPF32=k=new Float32Array(t),s.HEAPF64=m1=new Float64Array(t);}var d1=[],A1=[],X=[];function p1(){var t=s.preRun.shift();d1.unshift(t);}var u1=0,w1=null;function R1(t){var e;throw (e=s.onAbort)==null||e.call(s,t),t="Aborted("+t+")",J(t),l1=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),M(t),t}var C2=t=>t.startsWith("data:application/octet-stream;base64,"),O1;function M2(t){if(t==O1&&r1)return new Uint8Array(r1);throw "both async and sync fetching of the wasm failed"}function d3(t){return r1?Promise.resolve().then(()=>M2(t)):n1(t).then(e=>new Uint8Array(e),()=>M2(t))}function b2(t,e,r){return d3(t).then(a=>WebAssembly.instantiate(a,e)).then(r,a=>{J(`failed to asynchronously prepare wasm: ${a}`),R1(a);})}function u3(t,e){var r=O1;return r1||typeof WebAssembly.instantiateStreaming!="function"||C2(r)||typeof fetch!="function"?b2(r,t,e):fetch(r,{credentials:"same-origin"}).then(a=>WebAssembly.instantiateStreaming(a,t).then(e,function(o){return J(`wasm streaming compile failed: ${o}`),J("falling back to ArrayBuffer instantiation"),b2(r,t,e)}))}class I2{constructor(e){p(this,"name","ExitStatus"),this.message=`Program terminated with exit(${e})`,this.status=e;}}var X1=t=>{for(;0<t.length;)t.shift()(s);},Q1=s.noExitRuntime||!0,E2=typeof TextDecoder<"u"?new TextDecoder:void 0,C1=(t,e=0,r=NaN)=>{var a=e+r;for(r=e;t[r]&&!(r>=a);)++r;if(16<r-e&&t.buffer&&E2)return E2.decode(t.subarray(e,r));for(a="";e<r;){var o=t[e++];if(o&128){var l=t[e++]&63;if((o&224)==192)a+=String.fromCharCode((o&31)<<6|l);else {var c=t[e++]&63;o=(o&240)==224?(o&15)<<12|l<<6|c:(o&7)<<18|l<<12|c<<6|t[e++]&63,65536>o?a+=String.fromCharCode(o):(o-=65536,a+=String.fromCharCode(55296|o>>10,56320|o&1023));}}else a+=String.fromCharCode(o);}return a},g1=0;class D2{constructor(e){this.Ea=e-24;}}var c3=()=>{var t=[],e=g1;if(!e)return F1(0),0;var r=new D2(e);w[r.Ea+16>>2]=e;var a=w[r.Ea+4>>2];if(!a)return F1(0),e;for(var o of t){if(o===0||o===a)break;if(V2(o,a,r.Ea+16))return F1(o),e}return F1(a),e},M1=(t,e,r)=>{var a=S;if(0<r){r=e+r-1;for(var o=0;o<t.length;++o){var l=t.charCodeAt(o);if(55296<=l&&57343>=l){var c=t.charCodeAt(++o);l=65536+((l&1023)<<10)|c&1023;}if(127>=l){if(e>=r)break;a[e++]=l;}else {if(2047>=l){if(e+1>=r)break;a[e++]=192|l>>6;}else {if(65535>=l){if(e+2>=r)break;a[e++]=224|l>>12;}else {if(e+3>=r)break;a[e++]=240|l>>18,a[e++]=128|l>>12&63;}a[e++]=128|l>>6&63;}a[e++]=128|l&63;}}a[e]=0;}},x1={},Y1=t=>{for(;t.length;){var e=t.pop();t.pop()(e);}};function b1(t){return this.fromWireType(w[t>>2])}var y1={},c1={},W1={},I1,h1=(t,e,r)=>{function a(u){if(u=r(u),u.length!==t.length)throw new I1("Mismatched type converter count");for(var f=0;f<t.length;++f)Q(t[f],u[f]);}t.forEach(u=>W1[u]=e);var o=Array(e.length),l=[],c=0;e.forEach((u,f)=>{c1.hasOwnProperty(u)?o[f]=c1[u]:(l.push(u),y1.hasOwnProperty(u)||(y1[u]=[]),y1[u].push(()=>{o[f]=c1[u],++c,c===l.length&&a(o);}));}),l.length===0&&a(o);},P2,R=t=>{for(var e="";S[t];)e+=P2[S[t++]];return e},L;function f3(t,e,r={}){var a=e.name;if(!t)throw new L(`type "${a}" must have a positive integer typeid pointer`);if(c1.hasOwnProperty(t)){if(r.kb)return;throw new L(`Cannot register type '${a}' twice`)}c1[t]=e,delete W1[t],y1.hasOwnProperty(t)&&(e=y1[t],delete y1[t],e.forEach(o=>o()));}function Q(t,e,r={}){return f3(t,e,r)}var Z1=t=>{throw new L(t.Da.Ga.Fa.name+" instance already deleted")},t2=!1,S2=()=>{},F2=(t,e,r)=>e===r?t:r.Ja===void 0?null:(t=F2(t,e,r.Ja),t===null?null:r.cb(t)),k2={},v3={},_3=(t,e)=>{if(e===void 0)throw new L("ptr should not be undefined");for(;t.Ja;)e=t.Ta(e),t=t.Ja;return v3[e]},$1=(t,e)=>{if(!e.Ga||!e.Ea)throw new I1("makeClassHandle requires ptr and ptrType");if(!!e.Ka!=!!e.Ia)throw new I1("Both smartPtrType and smartPtr must be specified");return e.count={value:1},E1(Object.create(t,{Da:{value:e,writable:!0}}))},E1=t=>typeof FinalizationRegistry>"u"?(E1=e=>e,t):(t2=new FinalizationRegistry(e=>{e=e.Da,--e.count.value,e.count.value===0&&(e.Ia?e.Ka.Na(e.Ia):e.Ga.Fa.Na(e.Ea));}),E1=e=>{var r=e.Da;return r.Ia&&t2.register(e,{Da:r},e),e},S2=e=>{t2.unregister(e);},E1(t));function U1(){}var D1=(t,e)=>Object.defineProperty(e,"name",{value:t}),T2=(t,e,r)=>{if(t[e].Ha===void 0){var a=t[e];t[e]=function(...o){if(!t[e].Ha.hasOwnProperty(o.length))throw new L(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${t[e].Ha})!`);return t[e].Ha[o.length].apply(this,o)},t[e].Ha=[],t[e].Ha[a.Qa]=a;}},e2=(t,e,r)=>{if(s.hasOwnProperty(t)){if(r===void 0||s[t].Ha!==void 0&&s[t].Ha[r]!==void 0)throw new L(`Cannot register public name '${t}' twice`);if(T2(s,t,t),s[t].Ha.hasOwnProperty(r))throw new L(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);s[t].Ha[r]=e;}else s[t]=e,s[t].Qa=r;},m3=t=>{t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return 48<=e&&57>=e?`_${t}`:t};function p3(t,e,r,a,o,l,c,u){this.name=t,this.constructor=e,this.Pa=r,this.Na=a,this.Ja=o,this.fb=l,this.Ta=c,this.cb=u,this.mb=[];}var i2=(t,e,r)=>{for(;e!==r;){if(!e.Ta)throw new L(`Expected null or instance of ${r.name}, got an instance of ${e.name}`);t=e.Ta(t),e=e.Ja;}return t};function g3(t,e){if(e===null){if(this.Wa)throw new L(`null is not a valid ${this.name}`);return 0}if(!e.Da)throw new L(`Cannot pass "${l2(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);return i2(e.Da.Ea,e.Da.Ga.Fa,this.Fa)}function y3(t,e){if(e===null){if(this.Wa)throw new L(`null is not a valid ${this.name}`);if(this.Va){var r=this.Xa();return t!==null&&t.push(this.Na,r),r}return 0}if(!e||!e.Da)throw new L(`Cannot pass "${l2(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ua&&e.Da.Ga.Ua)throw new L(`Cannot convert argument of type ${e.Da.Ka?e.Da.Ka.name:e.Da.Ga.name} to parameter type ${this.name}`);if(r=i2(e.Da.Ea,e.Da.Ga.Fa,this.Fa),this.Va){if(e.Da.Ia===void 0)throw new L("Passing raw pointer to smart pointer is illegal");switch(this.rb){case 0:if(e.Da.Ka===this)r=e.Da.Ia;else throw new L(`Cannot convert argument of type ${e.Da.Ka?e.Da.Ka.name:e.Da.Ga.name} to parameter type ${this.name}`);break;case 1:r=e.Da.Ia;break;case 2:if(e.Da.Ka===this)r=e.Da.Ia;else {var a=e.clone();r=this.nb(r,j1(()=>a.delete())),t!==null&&t.push(this.Na,r);}break;default:throw new L("Unsupporting sharing policy")}}return r}function L3(t,e){if(e===null){if(this.Wa)throw new L(`null is not a valid ${this.name}`);return 0}if(!e.Da)throw new L(`Cannot pass "${l2(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);if(e.Da.Ga.Ua)throw new L(`Cannot convert argument of type ${e.Da.Ga.name} to parameter type ${this.name}`);return i2(e.Da.Ea,e.Da.Ga.Fa,this.Fa)}function P1(t,e,r,a,o,l,c,u,f,v,_){this.name=t,this.Fa=e,this.Wa=r,this.Ua=a,this.Va=o,this.lb=l,this.rb=c,this.ab=u,this.Xa=f,this.nb=v,this.Na=_,o||e.Ja!==void 0?this.toWireType=y3:(this.toWireType=a?g3:L3,this.Ma=null);}var A2=(t,e,r)=>{if(!s.hasOwnProperty(t))throw new I1("Replacing nonexistent public symbol");s[t].Ha!==void 0&&r!==void 0?s[t].Ha[r]=e:(s[t]=e,s[t].Qa=r);},$,w3=(t,e,r=[])=>(t.includes("j")?(t=t.replace(/p/g,"i"),e=(0, s["dynCall_"+t])(e,...r)):e=$.get(e)(...r),e),C3=(t,e)=>(...r)=>w3(t,e,r),U=(t,e)=>{t=R(t);var r=t.includes("j")?C3(t,e):$.get(e);if(typeof r!="function")throw new L(`unknown function pointer with signature ${t}: ${e}`);return r},R2,O2=t=>{t=N2(t);var e=R(t);return o1(t),e},z1=(t,e)=>{function r(l){o[l]||c1[l]||(W1[l]?W1[l].forEach(r):(a.push(l),o[l]=!0));}var a=[],o={};throw e.forEach(r),new R2(`${t}: `+a.map(O2).join([", "]))},n2=(t,e)=>{for(var r=[],a=0;a<t;a++)r.push(w[e+4*a>>2]);return r};function M3(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].Ma===void 0)return !0;return !1}function r2(t,e,r,a,o){var l=e.length;if(2>l)throw new L("argTypes array size mismatch! Must at least get return value and 'this' types!");var c=e[1]!==null&&r!==null,u=M3(e),f=e[0].name!=="void",v=l-2,_=Array(v),g=[],b=[];return D1(t,function(...V){if(b.length=0,g.length=c?2:1,g[0]=o,c){var F=e[1].toWireType(b,this);g[1]=F;}for(var T=0;T<v;++T)_[T]=e[T+2].toWireType(b,V[T]),g.push(_[T]);if(V=a(...g),u)Y1(b);else for(T=c?1:2;T<e.length;T++){var Y=T===1?F:_[T-2];e[T].Ma!==null&&e[T].Ma(Y);}return F=f?e[0].fromWireType(V):void 0,F})}var x2=t=>{t=t.trim();let e=t.indexOf("(");return e!==-1?t.substr(0,e):t},a2=[],a1=[],o2=t=>{9<t&&--a1[t+1]===0&&(a1[t]=void 0,a2.push(t));},s2=t=>{if(!t)throw new L("Cannot use deleted val. handle = "+t);return a1[t]},j1=t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let e=a2.pop()||a1.length;return a1[e]=t,a1[e+1]=1,e}},W2={name:"emscripten::val",fromWireType:t=>{var e=s2(t);return o2(t),e},toWireType:(t,e)=>j1(e),La:8,readValueFromPointer:b1,Ma:null},b3=(t,e,r)=>{switch(e){case 1:return r?function(a){return this.fromWireType(Z[a])}:function(a){return this.fromWireType(S[a])};case 2:return r?function(a){return this.fromWireType(t1[a>>1])}:function(a){return this.fromWireType(z[a>>1])};case 4:return r?function(a){return this.fromWireType(K[a>>2])}:function(a){return this.fromWireType(w[a>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},h2=(t,e)=>{var r=c1[t];if(r===void 0)throw t=`${e} has unknown type ${O2(t)}`,new L(t);return r},l2=t=>{if(t===null)return "null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},I3=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(k[r>>2])};case 8:return function(r){return this.fromWireType(m1[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},E3=(t,e,r)=>{switch(e){case 1:return r?a=>Z[a]:a=>S[a];case 2:return r?a=>t1[a>>1]:a=>z[a>>1];case 4:return r?a=>K[a>>2]:a=>w[a>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},D3=Object.assign({optional:!0},W2),$2=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,P3=(t,e)=>{for(var r=t>>1,a=r+e/2;!(r>=a)&&z[r];)++r;if(r<<=1,32<r-t&&$2)return $2.decode(S.subarray(t,r));for(r="",a=0;!(a>=e/2);++a){var o=t1[t+2*a>>1];if(o==0)break;r+=String.fromCharCode(o);}return r},S3=(t,e,r)=>{if(r!=null||(r=2147483647),2>r)return 0;r-=2;var a=e;r=r<2*t.length?r/2:t.length;for(var o=0;o<r;++o)t1[e>>1]=t.charCodeAt(o),e+=2;return t1[e>>1]=0,e-a},F3=t=>2*t.length,k3=(t,e)=>{for(var r=0,a="";!(r>=e/4);){var o=K[t+4*r>>2];if(o==0)break;++r,65536<=o?(o-=65536,a+=String.fromCharCode(55296|o>>10,56320|o&1023)):a+=String.fromCharCode(o);}return a},T3=(t,e,r)=>{if(r!=null||(r=2147483647),4>r)return 0;var a=e;r=a+r-4;for(var o=0;o<t.length;++o){var l=t.charCodeAt(o);if(55296<=l&&57343>=l){var c=t.charCodeAt(++o);l=65536+((l&1023)<<10)|c&1023;}if(K[e>>2]=l,e+=4,e+4>r)break}return K[e>>2]=0,e-a},A3=t=>{for(var e=0,r=0;r<t.length;++r){var a=t.charCodeAt(r);55296<=a&&57343>=a&&++r,e+=4;}return e},d2=0,u2=[],R3=t=>{var e=u2.length;return u2.push(t),e},O3=(t,e)=>{for(var r=Array(t),a=0;a<t;++a)r[a]=h2(w[e+4*a>>2],"parameter "+a);return r},x3=Reflect.construct,S1={},U2=t=>{if(!(t instanceof I2||t=="unwind"))throw t},z2=t=>{var e;throw s1=t,Q1||0<d2||((e=s.onExit)==null||e.call(s,t),l1=!0),new I2(t)},W3=t=>{if(!l1)try{if(t(),!(Q1||0<d2))try{s1=t=s1,z2(t);}catch(e){U2(e);}}catch(e){U2(e);}},c2={},j2=()=>{if(!f2){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:P||"./this.program"},e;for(e in c2)c2[e]===void 0?delete t[e]:t[e]=c2[e];var r=[];for(e in t)r.push(`${e}=${t[e]}`);f2=r;}return f2},f2,$3=[null,[],[]],U3=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return t=>crypto.getRandomValues(t);R1("initRandomDevice");},H2=t=>(H2=U3())(t);I1=s.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError";}};for(var B2=Array(256),H1=0;256>H1;++H1)B2[H1]=String.fromCharCode(H1);P2=B2,L=s.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError";}},Object.assign(U1.prototype,{isAliasOf:function(t){if(!(this instanceof U1&&t instanceof U1))return !1;var e=this.Da.Ga.Fa,r=this.Da.Ea;t.Da=t.Da;var a=t.Da.Ga.Fa;for(t=t.Da.Ea;e.Ja;)r=e.Ta(r),e=e.Ja;for(;a.Ja;)t=a.Ta(t),a=a.Ja;return e===a&&r===t},clone:function(){if(this.Da.Ea||Z1(this),this.Da.Sa)return this.Da.count.value+=1,this;var t=E1,e=Object,r=e.create,a=Object.getPrototypeOf(this),o=this.Da;return t=t(r.call(e,a,{Da:{value:{count:o.count,Ra:o.Ra,Sa:o.Sa,Ea:o.Ea,Ga:o.Ga,Ia:o.Ia,Ka:o.Ka}}})),t.Da.count.value+=1,t.Da.Ra=!1,t},delete(){if(this.Da.Ea||Z1(this),this.Da.Ra&&!this.Da.Sa)throw new L("Object already scheduled for deletion");S2(this);var t=this.Da;--t.count.value,t.count.value===0&&(t.Ia?t.Ka.Na(t.Ia):t.Ga.Fa.Na(t.Ea)),this.Da.Sa||(this.Da.Ia=void 0,this.Da.Ea=void 0);},isDeleted:function(){return !this.Da.Ea},deleteLater:function(){if(this.Da.Ea||Z1(this),this.Da.Ra&&!this.Da.Sa)throw new L("Object already scheduled for deletion");return this.Da.Ra=!0,this}}),Object.assign(P1.prototype,{gb(t){return this.ab&&(t=this.ab(t)),t},Za(t){var e;(e=this.Na)==null||e.call(this,t);},La:8,readValueFromPointer:b1,fromWireType:function(t){function e(){return this.Va?$1(this.Fa.Pa,{Ga:this.lb,Ea:r,Ka:this,Ia:t}):$1(this.Fa.Pa,{Ga:this,Ea:t})}var r=this.gb(t);if(!r)return this.Za(t),null;var a=_3(this.Fa,r);if(a!==void 0)return a.Da.count.value===0?(a.Da.Ea=r,a.Da.Ia=t,a.clone()):(a=a.clone(),this.Za(t),a);if(a=this.Fa.fb(r),a=k2[a],!a)return e.call(this);a=this.Ua?a.bb:a.pointerType;var o=F2(r,this.Fa,a.Fa);return o===null?e.call(this):this.Va?$1(a.Fa.Pa,{Ga:a,Ea:o,Ka:this,Ia:t}):$1(a.Fa.Pa,{Ga:a,Ea:o})}}),R2=s.UnboundTypeError=((t,e)=>{var r=D1(e,function(a){this.name=e,this.message=a,a=Error(a).stack,a!==void 0&&(this.stack=this.toString()+` `+a.replace(/^Error(:[^\n]*)?\n/,""));});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r})(Error,"UnboundTypeError"),a1.push(0,1,void 0,1,null,1,!0,1,!1,1),s.count_emval_handles=()=>a1.length/2-5-a2.length;var z3={c:(t,e,r,a)=>R1(`Assertion failed: ${t?C1(S,t):""}, at: `+[e?e?C1(S,e):"":"unknown filename",r,a?a?C1(S,a):"":"unknown function"]),d:()=>c3(),p:(t,e,r)=>{var a=new D2(t);throw w[a.Ea+16>>2]=0,w[a.Ea+4>>2]=e,w[a.Ea+8>>2]=r,g1=t,g1},g:t=>{throw g1||(g1=t),g1},R:()=>{},O:()=>{},P:()=>{},U:function(){},Q:()=>{},W:()=>R1(""),z:t=>{var e=x1[t];delete x1[t];var r=e.Xa,a=e.Na,o=e.$a,l=o.map(c=>c.jb).concat(o.map(c=>c.pb));h1([t],l,c=>{var u={};return o.forEach((f,v)=>{var _=c[v],g=f.hb,b=f.ib,V=c[v+o.length],F=f.ob,T=f.qb;u[f.eb]={read:Y=>_.fromWireType(g(b,Y)),write:(Y,k1)=>{var G=[];F(T,Y,V.toWireType(G,k1)),Y1(G);}};}),[{name:e.name,fromWireType:f=>{var v={},_;for(_ in u)v[_]=u[_].read(f);return a(f),v},toWireType:(f,v)=>{for(var _ in u)if(!(_ in v))throw new TypeError(`Missing field: "${_}"`);var g=r();for(_ in u)u[_].write(g,v[_]);return f!==null&&f.push(a,g),g},La:8,readValueFromPointer:b1,Ma:a}]});},H:()=>{},aa:(t,e,r,a)=>{e=R(e),Q(t,{name:e,fromWireType:function(o){return !!o},toWireType:function(o,l){return l?r:a},La:8,readValueFromPointer:function(o){return this.fromWireType(S[o])},Ma:null});},v:(t,e,r,a,o,l,c,u,f,v,_,g,b)=>{_=R(_),l=U(o,l),u&&(u=U(c,u)),v&&(v=U(f,v)),b=U(g,b);var V=m3(_);e2(V,function(){z1(`Cannot construct ${_} due to unbound types`,[a]);}),h1([t,e,r],a?[a]:[],F=>{if(F=F[0],a)var T=F.Fa,Y=T.Pa;else Y=U1.prototype;F=D1(_,function(..._2){if(Object.getPrototypeOf(this)!==k1)throw new L("Use 'new' to construct "+_);if(G.Oa===void 0)throw new L(_+" has no accessible constructor");var K2=G.Oa[_2.length];if(K2===void 0)throw new L(`Tried to invoke ctor of ${_} with invalid number of parameters (${_2.length}) - expected (${Object.keys(G.Oa).toString()}) parameters instead!`);return K2.apply(this,_2)});var k1=Object.create(Y,{constructor:{value:F}});F.prototype=k1;var G=new p3(_,F,k1,b,T,l,u,v);if(G.Ja){var T1;(T1=G.Ja).Ya!=null||(T1.Ya=[]),G.Ja.Ya.push(G);}return T=new P1(_,G,!0,!1,!1),T1=new P1(_+"*",G,!1,!1,!1),Y=new P1(_+" const*",G,!1,!0,!1),k2[t]={pointerType:T1,bb:Y},A2(V,F),[T,T1,Y]});},t:(t,e,r,a,o,l)=>{var c=n2(e,r);o=U(a,o),h1([],[t],u=>{u=u[0];var f=`constructor ${u.name}`;if(u.Fa.Oa===void 0&&(u.Fa.Oa=[]),u.Fa.Oa[e-1]!==void 0)throw new L(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.Fa.Oa[e-1]=()=>{z1(`Cannot construct ${u.name} due to unbound types`,c);},h1([],c,v=>(v.splice(1,0,null),u.Fa.Oa[e-1]=r2(f,v,null,o,l),[])),[]});},h:(t,e,r,a,o,l,c,u)=>{var f=n2(r,a);e=R(e),e=x2(e),l=U(o,l),h1([],[t],v=>{function _(){z1(`Cannot call ${g} due to unbound types`,f);}v=v[0];var g=`${v.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&v.Fa.mb.push(e);var b=v.Fa.Pa,V=b[e];return V===void 0||V.Ha===void 0&&V.className!==v.name&&V.Qa===r-2?(_.Qa=r-2,_.className=v.name,b[e]=_):(T2(b,e,g),b[e].Ha[r-2]=_),h1([],f,F=>(F=r2(g,F,v,l,c),b[e].Ha===void 0?(F.Qa=r-2,b[e]=F):b[e].Ha[r-2]=F,[])),[]});},$:t=>Q(t,W2),B:(t,e,r,a)=>{function o(){}e=R(e),o.values={},Q(t,{name:e,constructor:o,fromWireType:function(l){return this.constructor.values[l]},toWireType:(l,c)=>c.value,La:8,readValueFromPointer:b3(e,r,a),Ma:null}),e2(e,o);},n:(t,e,r)=>{var a=h2(t,"enum");e=R(e),t=a.constructor,a=Object.create(a.constructor.prototype,{value:{value:r},constructor:{value:D1(`${a.name}_${e}`,function(){})}}),t.values[r]=a,t[e]=a;},D:(t,e,r)=>{e=R(e),Q(t,{name:e,fromWireType:a=>a,toWireType:(a,o)=>o,La:8,readValueFromPointer:I3(e,r),Ma:null});},y:(t,e,r,a,o,l)=>{var c=n2(e,r);t=R(t),t=x2(t),o=U(a,o),e2(t,function(){z1(`Cannot call ${t} due to unbound types`,c);},e-1),h1([],c,u=>(A2(t,r2(t,[u[0],null].concat(u.slice(1)),null,o,l),e-1),[]));},o:(t,e,r,a,o)=>{if(e=R(e),o===-1&&(o=4294967295),o=u=>u,a===0){var l=32-8*r;o=u=>u<<l>>>l;}var c=e.includes("unsigned")?function(u,f){return f>>>0}:function(u,f){return f};Q(t,{name:e,fromWireType:o,toWireType:c,La:8,readValueFromPointer:E3(e,r,a!==0),Ma:null});},k:(t,e,r)=>{function a(l){return new o(Z.buffer,w[l+4>>2],w[l>>2])}var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];r=R(r),Q(t,{name:r,fromWireType:a,La:8,readValueFromPointer:a},{kb:!0});},x:t=>{Q(t,D3);},ga:(t,e,r,a,o,l,c,u,f,v,_,g)=>{r=R(r),l=U(o,l),u=U(c,u),v=U(f,v),g=U(_,g),h1([t],[e],b=>(b=b[0],[new P1(r,b.Fa,!1,!1,!0,b,a,l,u,v,g)]));},E:(t,e)=>{e=R(e);var r=e==="std::string";Q(t,{name:e,fromWireType:function(a){var o=w[a>>2],l=a+4;if(r)for(var c=l,u=0;u<=o;++u){var f=l+u;if(u==o||S[f]==0){if(c=c?C1(S,c,f-c):"",v===void 0)var v=c;else v+="\0",v+=c;c=f+1;}}else {for(v=Array(o),u=0;u<o;++u)v[u]=String.fromCharCode(S[l+u]);v=v.join("");}return o1(a),v},toWireType:function(a,o){o instanceof ArrayBuffer&&(o=new Uint8Array(o));var l,c=typeof o=="string";if(!(c||o instanceof Uint8Array||o instanceof Uint8ClampedArray||o instanceof Int8Array))throw new L("Cannot pass non-string to std::string");if(r&&c)for(var u=l=0;u<o.length;++u){var f=o.charCodeAt(u);127>=f?l++:2047>=f?l+=2:55296<=f&&57343>=f?(l+=4,++u):l+=3;}else l=o.length;if(u=v2(4+l+1),f=u+4,w[u>>2]=l,r&&c)M1(o,f,l+1);else if(c)for(c=0;c<l;++c){var v=o.charCodeAt(c);if(255<v)throw o1(f),new L("String has UTF-16 code units that do not fit in 8 bits");S[f+c]=v;}else for(c=0;c<l;++c)S[f+c]=o[c];return a!==null&&a.push(o1,u),u},La:8,readValueFromPointer:b1,Ma(a){o1(a);}});},w:(t,e,r)=>{if(r=R(r),e===2)var a=P3,o=S3,l=F3,c=u=>z[u>>1];else e===4&&(a=k3,o=T3,l=A3,c=u=>w[u>>2]);Q(t,{name:r,fromWireType:u=>{for(var f=w[u>>2],v,_=u+4,g=0;g<=f;++g){var b=u+4+g*e;(g==f||c(b)==0)&&(_=a(_,b-_),v===void 0?v=_:(v+="\0",v+=_),_=b+e);}return o1(u),v},toWireType:(u,f)=>{if(typeof f!="string")throw new L(`Cannot pass non-string to C++ string type ${r}`);var v=l(f),_=v2(4+v+e);return w[_>>2]=v/e,o(f,_+4,v+e),u!==null&&u.push(o1,_),_},La:8,readValueFromPointer:b1,Ma(u){o1(u);}});},A:(t,e,r,a,o,l)=>{x1[t]={name:R(e),Xa:U(r,a),Na:U(o,l),$a:[]};},m:(t,e,r,a,o,l,c,u,f,v)=>{x1[t].$a.push({eb:R(e),jb:r,hb:U(a,o),ib:l,pb:c,ob:U(u,f),qb:v});},ba:(t,e)=>{e=R(e),Q(t,{sb:!0,name:e,La:0,fromWireType:()=>{},toWireType:()=>{}});},M:()=>{Q1=!1,d2=0;},I:()=>{throw 1/0},ea:(t,e,r,a)=>(t=u2[t],e=s2(e),t(null,e,r,a)),F:o2,da:(t,e,r)=>{var a=O3(t,e),o=a.shift();t--;var l=Array(t);return e=`methodCaller<(${a.map(c=>c.name).join(", ")}) => ${o.name}>`,R3(D1(e,(c,u,f,v)=>{for(var _=0,g=0;g<t;++g)l[g]=a[g].readValueFromPointer(v+_),_+=a[g].La;return u=r===1?x3(u,l):u.apply(c,l),c=[],u=o.toWireType(c,u),c.length&&(w[f>>2]=j1(c)),u}))},fa:t=>{9<t&&(a1[t+1]+=1);},ca:t=>{var e=s2(t);Y1(e),o2(t);},r:(t,e)=>(t=h2(t,"_emval_take_value"),t=t.readValueFromPointer(e),j1(t)),J:(t,e)=>{if(S1[t]&&(clearTimeout(S1[t].id),delete S1[t]),!e)return 0;var r=setTimeout(()=>{delete S1[t],W3(()=>J2(t,performance.now()));},e);return S1[t]={id:r,tb:e},0},K:(t,e,r,a)=>{var o=new Date().getFullYear(),l=new Date(o,0,1).getTimezoneOffset();o=new Date(o,6,1).getTimezoneOffset(),w[t>>2]=60*Math.max(l,o),K[e>>2]=+(l!=o),e=c=>{var u=Math.abs(c);return `UTC${0<=c?"-":"+"}${String(Math.floor(u/60)).padStart(2,"0")}${String(u%60).padStart(2,"0")}`},t=e(l),e=e(o),o<l?(M1(t,r,17),M1(e,a,17)):(M1(t,a,17),M1(e,r,17));},ha:()=>performance.now(),L:t=>{var e=S.length;if(t>>>=0,2147483648<t)return !1;for(var r=1;4>=r;r*=2){var a=e*(1+.2/r);a=Math.min(a,t+100663296);t:{a=(Math.min(2147483648,65536*Math.ceil(Math.max(t,a)/65536))-_1.buffer.byteLength+65535)/65536|0;try{_1.grow(a),L1();var o=1;break t}catch{}o=void 0;}if(o)return !0}return !1},Y:(t,e)=>{var r=0;return j2().forEach((a,o)=>{var l=e+r;for(o=w[t+4*o>>2]=l,l=0;l<a.length;++l)Z[o++]=a.charCodeAt(l);Z[o]=0,r+=a.length+1;}),0},Z:(t,e)=>{var r=j2();w[t>>2]=r.length;var a=0;return r.forEach(o=>a+=o.length+1),w[e>>2]=a,0},V:()=>52,T:()=>52,S:(t,e,r,a)=>{for(var o=0,l=0;l<r;l++){var c=w[e>>2],u=w[e+4>>2];e+=8;for(var f=0;f<u;f++){var v=t,_=S[c+f],g=$3[v];_===0||_===10?((v===1?q:J)(C1(g)),g.length=0):g.push(_);}o+=u;}return w[a>>2]=o,0},j:V3,f:Q3,e:X3,_:H3,s:Y3,C:K3,u:J3,b:j3,a:B3,i:N3,l:q3,q:G3,G:Z3,X:z2,N:(t,e)=>(H2(S.subarray(t,t+e)),0)},E=function(){var t;function e(a){var o;return E=a.exports,_1=E.ia,L1(),$=E.na,A1.unshift(E.ja),u1--,(o=s.monitorRunDependencies)==null||o.call(s,u1),u1==0&&w1&&(a=w1,w1=null,a()),E}u1++,(t=s.monitorRunDependencies)==null||t.call(s,u1);var r={a:z3};if(s.instantiateWasm)try{return s.instantiateWasm(r,e)}catch(a){J(`Module.instantiateWasm callback failed with error: ${a}`),M(a);}return O1!=null||(O1=C2("DotLottiePlayer.wasm")?"DotLottiePlayer.wasm":s.locateFile?s.locateFile("DotLottiePlayer.wasm",A):A+"DotLottiePlayer.wasm"),u3(r,function(a){e(a.instance);}).catch(M),{}}(),v2=t=>(v2=E.ka)(t),N2=t=>(N2=E.la)(t),o1=t=>(o1=E.ma)(t),J2=(t,e)=>(J2=E.oa)(t,e),j=(t,e)=>(j=E.pa)(t,e),F1=t=>(F1=E.qa)(t),H=t=>(H=E.ra)(t),B=()=>(B=E.sa)(),V2=(t,e,r)=>(V2=E.ta)(t,e,r);s.dynCall_iijj=(t,e,r,a,o,l)=>(s.dynCall_iijj=E.ua)(t,e,r,a,o,l),s.dynCall_vijj=(t,e,r,a,o,l)=>(s.dynCall_vijj=E.va)(t,e,r,a,o,l),s.dynCall_jiii=(t,e,r,a)=>(s.dynCall_jiii=E.wa)(t,e,r,a);var G2=s.dynCall_vijjjj=(t,e,r,a,o,l,c,u,f,v)=>(G2=s.dynCall_vijjjj=E.xa)(t,e,r,a,o,l,c,u,f,v);s.dynCall_jii=(t,e,r)=>(s.dynCall_jii=E.ya)(t,e,r),s.dynCall_viijii=(t,e,r,a,o,l,c)=>(s.dynCall_viijii=E.za)(t,e,r,a,o,l,c),s.dynCall_iiiiij=(t,e,r,a,o,l,c)=>(s.dynCall_iiiiij=E.Aa)(t,e,r,a,o,l,c),s.dynCall_iiiiijj=(t,e,r,a,o,l,c,u,f)=>(s.dynCall_iiiiijj=E.Ba)(t,e,r,a,o,l,c,u,f),s.dynCall_iiiiiijj=(t,e,r,a,o,l,c,u,f,v)=>(s.dynCall_iiiiiijj=E.Ca)(t,e,r,a,o,l,c,u,f,v);function j3(t,e){var r=B();try{$.get(t)(e);}catch(a){if(H(r),a!==a+0)throw a;j(1,0);}}function H3(t,e,r,a,o){var l=B();try{return $.get(t)(e,r,a,o)}catch(c){if(H(l),c!==c+0)throw c;j(1,0);}}function B3(t,e,r){var a=B();try{$.get(t)(e,r);}catch(o){if(H(a),o!==o+0)throw o;j(1,0);}}function N3(t,e,r,a){var o=B();try{$.get(t)(e,r,a);}catch(l){if(H(o),l!==l+0)throw l;j(1,0);}}function J3(t){var e=B();try{$.get(t)();}catch(r){if(H(e),r!==r+0)throw r;j(1,0);}}function V3(t,e){var r=B();try{return $.get(t)(e)}catch(a){if(H(r),a!==a+0)throw a;j(1,0);}}function G3(t,e,r,a,o,l){var c=B();try{$.get(t)(e,r,a,o,l);}catch(u){if(H(c),u!==u+0)throw u;j(1,0);}}function q3(t,e,r,a,o){var l=B();try{$.get(t)(e,r,a,o);}catch(c){if(H(l),c!==c+0)throw c;j(1,0);}}function K3(t,e,r,a,o,l,c,u){var f=B();try{return $.get(t)(e,r,a,o,l,c,u)}catch(v){if(H(f),v!==v+0)throw v;j(1,0);}}function X3(t,e,r,a){var o=B();try{return $.get(t)(e,r,a)}catch(l){if(H(o),l!==l+0)throw l;j(1,0);}}function Q3(t,e,r){var a=B();try{return $.get(t)(e,r)}catch(o){if(H(a),o!==o+0)throw o;j(1,0);}}function Y3(t,e,r,a,o,l){var c=B();try{return $.get(t)(e,r,a,o,l)}catch(u){if(H(c),u!==u+0)throw u;j(1,0);}}function Z3(t,e,r,a,o,l,c,u,f,v){var _=B();try{G2(t,e,r,a,o,l,c,u,f,v);}catch(g){if(H(_),g!==g+0)throw g;j(1,0);}}var B1;w1=function t(){B1||q2(),B1||(w1=t);};function q2(){function t(){var e;if(!B1&&(B1=!0,s.calledRun=!0,!l1)){if(X1(A1),m(s),(e=s.onRuntimeInitialized)==null||e.call(s),s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;){var r=s.postRun.shift();X.unshift(r);}X1(X);}}if(!(0<u1)){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)p1();X1(d1),0<u1||(s.setStatus?(s.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>s.setStatus(""),1),t();},1)):t());}}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);0<s.preInit.length;)s.preInit.pop()();return q2(),h=C,h}})(),l0=h0,J1=class{constructor(){throw new Error("RendererLoader is a static class and cannot be instantiated.")}static _tryLoad(d){return y(this,null,function*(){return yield l0({locateFile:()=>d})})}static _loadWithBackup(){return y(this,null,function*(){return this._ModulePromise||(this._ModulePromise=this._tryLoad(this._wasmURL).catch(d=>y(this,null,function*(){let i=`https://unpkg.com/${a3}@${r3}/dist/dotlottie-player.wasm`;console.warn(`Primary WASM load failed from ${this._wasmURL}. Error: ${d.message}`),console.warn(`Attempting to load WASM from backup URL: ${i}`);try{return yield this._tryLoad(i)}catch(n){throw console.error(`Primary WASM URL failed: ${d.message}`),console.error(`Backup WASM URL failed: ${n.message}`),new Error("WASM loading failed from all sources.")}}))),this._ModulePromise})}static load(){return y(this,null,function*(){return this._loadWithBackup()})}static setWasmUrl(d){d!==this._wasmURL&&(this._wasmURL=d,this._ModulePromise=null);}};p(J1,"_ModulePromise",null),p(J1,"_wasmURL",`https://cdn.jsdelivr.net/npm/${a3}@${r3}/dist/dotlottie-player.wasm`);var o3=class{constructor(){p(this,"_eventListeners",new Map);}addEventListener(d,i){let n=this._eventListeners.get(d);n||(n=new Set,this._eventListeners.set(d,n)),n.add(i);}removeEventListener(d,i){let n=this._eventListeners.get(d);n&&(i?(n.delete(i),n.size===0&&this._eventListeners.delete(d)):this._eventListeners.delete(d));}dispatch(d){let i=this._eventListeners.get(d.type);i?.forEach(n=>n(d));}removeAllEventListeners(){this._eventListeners.clear();}},e1=class{static _initializeObserver(){if(this._observer)return;let d=i=>{i.forEach(n=>{let h=this._observedCanvases.get(n.target);h&&(n.isIntersecting?h.unfreeze():h.freeze());});};this._observer=new IntersectionObserver(d,{threshold:0});}static observe(d,i){var n;this._initializeObserver(),!this._observedCanvases.has(d)&&(this._observedCanvases.set(d,i),(n=this._observer)==null||n.observe(d));}static unobserve(d){var i,n;(i=this._observer)==null||i.unobserve(d),this._observedCanvases.delete(d),this._observedCanvases.size===0&&((n=this._observer)==null||n.disconnect(),this._observer=null);}};p(e1,"_observer",null),p(e1,"_observedCanvases",new Map);var i1=class{static _initializeObserver(){if(this._observer)return;let d=i=>{i.forEach(n=>{let h=this._observedCanvases.get(n.target);if(!h)return;let[s,m]=h;clearTimeout(m);let M=setTimeout(()=>{s.resize();},100);this._observedCanvases.set(n.target,[s,M]);});};this._observer=new ResizeObserver(d);}static observe(d,i){var n;this._initializeObserver(),!this._observedCanvases.has(d)&&(this._observedCanvases.set(d,[i,0]),(n=this._observer)==null||n.observe(d));}static unobserve(d){var i,n;(i=this._observer)==null||i.unobserve(d),this._observedCanvases.delete(d),this._observedCanvases.size===0&&((n=this._observer)==null||n.disconnect(),this._observer=null);}};p(i1,"_observer",null),p(i1,"_observedCanvases",new Map);function d0(d){return /^#([\da-f]{6}|[\da-f]{8})$/iu.test(d)}function u0(d){if(!d0(d))return 0;let i=d.replace("#","");return i=i.length===6?`${i}ff`:i,parseInt(i,16)}function X2(d){if(d.byteLength<4)return !1;let i=new Uint8Array(d.slice(0,m2.byteLength));for(let n=0;n<m2.length;n+=1)if(m2[n]!==i[n])return !1;return !0}function Q2(d){return o0.every(i=>Object.prototype.hasOwnProperty.call(d,i))}function Y2(d){if(typeof d=="string")try{return Q2(JSON.parse(d))}catch{return !1}else return Q2(d)}function v1(){return 1+((W?window.devicePixelRatio:1)-1)*s0}function s3(d){let i=d.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&i.right<=(window.innerWidth||document.documentElement.clientWidth)}var p2=(d,i)=>d==="reverse"?i.Mode.Reverse:d==="bounce"?i.Mode.Bounce:d==="reverse-bounce"?i.Mode.ReverseBounce:i.Mode.Forward,c0=(d,i)=>d==="contain"?i.Fit.Contain:d==="cover"?i.Fit.Cover:d==="fill"?i.Fit.Fill:d==="fit-height"?i.Fit.FitHeight:d==="fit-width"?i.Fit.FitWidth:i.Fit.None,f0=(d,i)=>{let n=new i.VectorFloat;return n.push_back(d[0]),n.push_back(d[1]),n},g2=(d,i)=>{let n=new i.VectorFloat;return d.length!==2||(n.push_back(d[0]),n.push_back(d[1])),n},y2=(d,i)=>{var n,h;return d?{align:f0((n=d.align)!=null?n:[.5,.5],i),fit:c0((h=d.fit)!=null?h:"contain",i)}:i.createDefaultLayout()},h3=class D{constructor(i){p(this,"_canvas"),p(this,"_context",null),p(this,"_eventManager"),p(this,"_animationFrameId",null),p(this,"_frameManager"),p(this,"_dotLottieCore",null),p(this,"_renderConfig",{}),p(this,"_isFrozen",!1),p(this,"_backgroundColor",null),p(this,"_pointerUpMethod"),p(this,"_pointerDownMethod"),p(this,"_pointerMoveMethod"),p(this,"_pointerEnterMethod"),p(this,"_pointerExitMethod");var n,h,s;this._canvas=i.canvas,this._context=this._canvas.getContext("2d"),this._eventManager=new o3,this._frameManager=new a0,this._renderConfig=N(O({},i.renderConfig),{devicePixelRatio:((n=i.renderConfig)==null?void 0:n.devicePixelRatio)||v1(),freezeOnOffscreen:(s=(h=i.renderConfig)==null?void 0:h.freezeOnOffscreen)!=null?s:!0}),J1.load().then(m=>{var M,C,I,P,A,n1,q,J;D._wasmModule=m,this._dotLottieCore=new m.DotLottiePlayer({themeId:(M=i.themeId)!=null?M:"",autoplay:(C=i.autoplay)!=null?C:!1,backgroundColor:0,loopAnimation:(I=i.loop)!=null?I:!1,mode:p2((P=i.mode)!=null?P:"forward",m),segment:g2((A=i.segment)!=null?A:[],m),speed:(n1=i.speed)!=null?n1:1,useFrameInterpolation:(q=i.useFrameInterpolation)!=null?q:!0,marker:(J=i.marker)!=null?J:"",layout:y2(i.layout,m)}),this._eventManager.dispatch({type:"ready"}),i.data?this._loadFromData(i.data):i.src&&this._loadFromSrc(i.src),i.backgroundColor&&this.setBackgroundColor(i.backgroundColor);}).catch(m=>{this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load wasm module: ${m}`)});}),this._pointerUpMethod=this._onPointerUp.bind(this),this._pointerDownMethod=this._onPointerDown.bind(this),this._pointerMoveMethod=this._onPointerMove.bind(this),this._pointerEnterMethod=this._onPointerEnter.bind(this),this._pointerExitMethod=this._onPointerLeave.bind(this);}_dispatchError(i){console.error(i),this._eventManager.dispatch({type:"loadError",error:new Error(i)});}_fetchData(i){return y(this,null,function*(){let n=yield fetch(i);if(!n.ok)throw new Error(`Failed to fetch animation data from URL: ${i}. ${n.status}: ${n.statusText}`);let h=yield n.arrayBuffer();return X2(h)?h:new TextDecoder().decode(h)})}_loadFromData(i){if(this._dotLottieCore===null)return;let n=this._canvas.width,h=this._canvas.height,s=!1;if(typeof i=="string"){if(!Y2(i)){this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");return}s=this._dotLottieCore.loadAnimationData(i,n,h);}else if(i instanceof ArrayBuffer){if(!X2(i)){this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");return}s=this._dotLottieCore.loadDotLottieData(i,n,h);}else if(typeof i=="object"){if(!Y2(i)){this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");return}s=this._dotLottieCore.loadAnimationData(JSON.stringify(i),n,h);}else {this._dispatchError(`Unsupported data type for animation data. Expected: - string (Lottie JSON), - ArrayBuffer (dotLottie), - object (Lottie JSON). Received: ${typeof i}`);return}s?(this._eventManager.dispatch({type:"load"}),W&&this.resize(),this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._render(),this._dotLottieCore.config().autoplay&&(this._dotLottieCore.play(),this._dotLottieCore.isPlaying()?(this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))):console.error("something went wrong, the animation was suppose to autoplay")),W&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&e1.observe(this._canvas,this),this._renderConfig.autoResize&&i1.observe(this._canvas,this))):this._dispatchError("Failed to load animation data");}_loadFromSrc(i){this._fetchData(i).then(n=>this._loadFromData(n)).catch(n=>this._dispatchError(`Failed to load animation data from URL: ${i}. ${n}`));}get activeAnimationId(){var i;return (i=this._dotLottieCore)==null?void 0:i.activeAnimationId()}get activeThemeId(){var i;return (i=this._dotLottieCore)==null?void 0:i.activeThemeId()}get layout(){var i;let n=(i=this._dotLottieCore)==null?void 0:i.config().layout;if(n)return {align:[n.align.get(0),n.align.get(1)],fit:(()=>{var h,s,m,M,C,I;switch(n.fit){case((h=D._wasmModule)==null?void 0:h.Fit.Contain):return "contain";case((s=D._wasmModule)==null?void 0:s.Fit.Cover):return "cover";case((m=D._wasmModule)==null?void 0:m.Fit.Fill):return "fill";case((M=D._wasmModule)==null?void 0:M.Fit.FitHeight):return "fit-height";case((C=D._wasmModule)==null?void 0:C.Fit.FitWidth):return "fit-width";case((I=D._wasmModule)==null?void 0:I.Fit.None):return "none";default:return "contain"}})()}}get marker(){var i;return (i=this._dotLottieCore)==null?void 0:i.config().marker}get manifest(){var i;try{let n=(i=this._dotLottieCore)==null?void 0:i.manifestString();if(this._dotLottieCore===null||!n)return null;let h=JSON.parse(n);return Object.keys(h).length===0?null:h}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){var i;let n=(i=this._dotLottieCore)==null?void 0:i.config().segment;if(n&&n.size()===2)return [n.get(0),n.get(1)]}get loop(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.config().loopAnimation)!=null?n:!1}get mode(){var i,n,h,s;let m=(i=this._dotLottieCore)==null?void 0:i.config().mode;return m===((n=D._wasmModule)==null?void 0:n.Mode.Reverse)?"reverse":m===((h=D._wasmModule)==null?void 0:h.Mode.Bounce)?"bounce":m===((s=D._wasmModule)==null?void 0:s.Mode.ReverseBounce)?"reverse-bounce":"forward"}get isFrozen(){return this._isFrozen}get backgroundColor(){var i;return (i=this._backgroundColor)!=null?i:""}get autoplay(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.config().autoplay)!=null?n:!1}get useFrameInterpolation(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.config().useFrameInterpolation)!=null?n:!1}get speed(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.config().speed)!=null?n:0}get isReady(){return this._dotLottieCore!==null}get isLoaded(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.isLoaded())!=null?n:!1}get isPlaying(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.isPlaying())!=null?n:!1}get isPaused(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.isPaused())!=null?n:!1}get isStopped(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.isStopped())!=null?n:!1}get currentFrame(){return this._dotLottieCore?Math.round(this._dotLottieCore.currentFrame()*100)/100:0}get loopCount(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.loopCount())!=null?n:0}get totalFrames(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.totalFrames())!=null?n:0}get duration(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.duration())!=null?n:0}get segmentDuration(){var i,n;return (n=(i=this._dotLottieCore)==null?void 0:i.segmentDuration())!=null?n:0}get canvas(){return this._canvas}load(i){var n,h,s,m,M,C,I,P,A;this._dotLottieCore===null||D._wasmModule===null||(this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),this._isFrozen=!1,this._dotLottieCore.setConfig({themeId:(n=i.themeId)!=null?n:"",autoplay:(h=i.autoplay)!=null?h:!1,backgroundColor:0,loopAnimation:(s=i.loop)!=null?s:!1,mode:p2((m=i.mode)!=null?m:"forward",D._wasmModule),segment:g2((M=i.segment)!=null?M:[],D._wasmModule),speed:(C=i.speed)!=null?C:1,useFrameInterpolation:(I=i.useFrameInterpolation)!=null?I:!0,marker:(P=i.marker)!=null?P:"",layout:y2(i.layout,D._wasmModule)}),i.data?this._loadFromData(i.data):i.src&&this._loadFromSrc(i.src),this.setBackgroundColor((A=i.backgroundColor)!=null?A:""));}_render(){if(this._dotLottieCore===null||this._context===null)return !1;if(this._dotLottieCore.render()){let i=this._dotLottieCore.buffer(),n=new Uint8ClampedArray(i,0,this._canvas.width*this._canvas.height*4),h=null;return typeof ImageData>"u"?(h=this._context.createImageData(this._canvas.width,this._canvas.height),h.data.set(n)):h=new ImageData(n,this._canvas.width,this._canvas.height),this._context.putImageData(h,0,0),this._eventManager.dispatch({type:"render",currentFrame:this.currentFrame}),!0}return !1}_draw(){if(!(this._dotLottieCore===null||this._context===null||!this._dotLottieCore.isPlaying()))try{let i=Math.round(this._dotLottieCore.requestFrame()*1e3)/1e3;if(this._dotLottieCore.setFrame(i)&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._render()&&this._dotLottieCore.isComplete()))if(this._dotLottieCore.config().loopAnimation)this._eventManager.dispatch({type:"loop",loopCount:this._dotLottieCore.loopCount()});else {this._eventManager.dispatch({type:"complete"});return}this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this));}catch(i){console.error("Error in animation frame:",i),this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null);}}play(){this._dotLottieCore!==null&&(this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),(this._dotLottieCore.play()||this._dotLottieCore.isPlaying())&&(this._isFrozen=!1,this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))),W&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!s3(this._canvas)&&this.freeze());}pause(){this._dotLottieCore!==null&&(this._dotLottieCore.pause()||this._dotLottieCore.isPaused())&&this._eventManager.dispatch({type:"pause"});}stop(){this._dotLottieCore!==null&&this._dotLottieCore.stop()&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._render(),this._eventManager.dispatch({type:"stop"}));}setFrame(i){this._dotLottieCore===null||i<0||i>this._dotLottieCore.totalFrames()||this._dotLottieCore.seek(i)&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._render());}setSpeed(i){this._dotLottieCore!==null&&this._dotLottieCore.setConfig(N(O({},this._dotLottieCore.config()),{speed:i}));}setBackgroundColor(i){this._dotLottieCore!==null&&(W&&this._canvas instanceof HTMLCanvasElement?this._canvas.style.backgroundColor=i:this._dotLottieCore.setConfig(N(O({},this._dotLottieCore.config()),{backgroundColor:u0(i)})),this._backgroundColor=i);}setLoop(i){this._dotLottieCore!==null&&this._dotLottieCore.setConfig(N(O({},this._dotLottieCore.config()),{loopAnimation:i}));}setUseFrameInterpolation(i){this._dotLottieCore!==null&&this._dotLottieCore.setConfig(N(O({},this._dotLottieCore.config()),{useFrameInterpolation:i}));}addEventListener(i,n){this._eventManager.addEventListener(i,n);}removeEventListener(i,n){this._eventManager.removeEventListener(i,n);}destroy(){var i;this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),W&&this._canvas instanceof HTMLCanvasElement&&(e1.unobserve(this._canvas),i1.unobserve(this._canvas)),(i=this._dotLottieCore)==null||i.delete(),this._dotLottieCore=null,this._context=null,this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners();}freeze(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null,this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}));}unfreeze(){this._animationFrameId===null&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this)),this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}));}resize(){if(!(!this._dotLottieCore||!this.isLoaded)){if(W&&this._canvas instanceof HTMLCanvasElement){let i=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:n,width:h}=this._canvas.getBoundingClientRect();n!==0&&h!==0&&(this._canvas.width=h*i,this._canvas.height=n*i);}this._dotLottieCore.resize(this._canvas.width,this._canvas.height)&&this._render();}}setSegment(i,n){this._dotLottieCore===null||D._wasmModule===null||this._dotLottieCore.setConfig(N(O({},this._dotLottieCore.config()),{segment:g2([i,n],D._wasmModule)}));}setMode(i){this._dotLottieCore===null||D._wasmModule===null||this._dotLottieCore.setConfig(N(O({},this._dotLottieCore.config()),{mode:p2(i,D._wasmModule)}));}setRenderConfig(i){let n=i,{devicePixelRatio:h,freezeOnOffscreen:s}=n,m=n3(n,["devicePixelRatio","freezeOnOffscreen"]);this._renderConfig=N(O(O({},this._renderConfig),m),{devicePixelRatio:h||v1(),freezeOnOffscreen:s??!0}),W&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?i1.observe(this._canvas,this):i1.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?e1.observe(this._canvas,this):(e1.unobserve(this._canvas),this._isFrozen&&this.unfreeze()));}loadAnimation(i){this._dotLottieCore===null||this._dotLottieCore.activeAnimationId()===i||(this._dotLottieCore.loadAnimation(i,this._canvas.width,this._canvas.height)?(this._eventManager.dispatch({type:"load"}),this.resize()):this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to animation :${i}`)}));}setMarker(i){this._dotLottieCore!==null&&this._dotLottieCore.setConfig(N(O({},this._dotLottieCore.config()),{marker:i}));}markers(){var i;let n=(i=this._dotLottieCore)==null?void 0:i.markers();if(n){let h=[];for(let s=0;s<n.size();s+=1){let m=n.get(s);h.push({name:m.name,time:m.time,duration:m.duration});}return h}return []}setTheme(i){if(this._dotLottieCore===null)return !1;let n=this._dotLottieCore.setTheme(i);return this._render(),n}resetTheme(){return this._dotLottieCore===null?!1:this._dotLottieCore.resetTheme()}setThemeData(i){if(this._dotLottieCore===null)return !1;let n=this._dotLottieCore.setThemeData(i);return this._render(),n}setSlots(i){this._dotLottieCore!==null&&this._dotLottieCore.setSlots(i);}setLayout(i){this._dotLottieCore===null||D._wasmModule===null||this._dotLottieCore.setConfig(N(O({},this._dotLottieCore.config()),{layout:y2(i,D._wasmModule)}));}setViewport(i,n,h,s){return this._dotLottieCore===null?!1:this._dotLottieCore.setViewport(i,n,h,s)}static setWasmUrl(i){J1.setWasmUrl(i);}loadStateMachine(i){var n,h;return (h=(n=this._dotLottieCore)==null?void 0:n.loadStateMachine(i))!=null?h:!1}startStateMachine(){var i,n;let h=(n=(i=this._dotLottieCore)==null?void 0:i.startStateMachine())!=null?n:!1;return h&&this._setupStateMachineListeners(),h}stopStateMachine(){var i,n;let h=(n=(i=this._dotLottieCore)==null?void 0:i.stopStateMachine())!=null?n:!1;return h&&this._cleanupStateMachineListeners(),h}_getPointerPosition(i){let n=this._canvas.getBoundingClientRect(),h=this._canvas.width/n.width,s=this._canvas.height/n.height,m=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,M=(i.clientX-n.left)*h/m,C=(i.clientY-n.top)*s/m;return {x:M,y:C}}_onPointerUp(i){let{x:n,y:h}=this._getPointerPosition(i);this.postPointerUpEvent(n,h);}_onPointerDown(i){let{x:n,y:h}=this._getPointerPosition(i);this.postPointerDownEvent(n,h);}_onPointerMove(i){let{x:n,y:h}=this._getPointerPosition(i);this.postPointerMoveEvent(n,h);}_onPointerEnter(i){let{x:n,y:h}=this._getPointerPosition(i);this.postPointerEnterEvent(n,h);}_onPointerLeave(i){let{x:n,y:h}=this._getPointerPosition(i);this.postPointerExitEvent(n,h);}postPointerUpEvent(i,n){var h;return (h=this._dotLottieCore)==null?void 0:h.postPointerUpEvent(i,n)}postPointerDownEvent(i,n){var h;return (h=this._dotLottieCore)==null?void 0:h.postPointerDownEvent(i,n)}postPointerMoveEvent(i,n){var h;return (h=this._dotLottieCore)==null?void 0:h.postPointerMoveEvent(i,n)}postPointerEnterEvent(i,n){var h;return (h=this._dotLottieCore)==null?void 0:h.postPointerEnterEvent(i,n)}postPointerExitEvent(i,n){var h;return (h=this._dotLottieCore)==null?void 0:h.postPointerExitEvent(i,n)}getStateMachineListeners(){if(!this._dotLottieCore)return [];let i=this._dotLottieCore.stateMachineFrameworkSetup(),n=[];for(let h=0;h<i.size();h+=1)n.push(i.get(h));return n}_setupStateMachineListeners(){if(W&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieCore!==null&&this.isLoaded){let i=this.getStateMachineListeners();i.includes("PointerUp")&&this._canvas.addEventListener("pointerup",this._pointerUpMethod),i.includes("PointerDown")&&this._canvas.addEventListener("pointerdown",this._pointerDownMethod),i.includes("PointerMove")&&this._canvas.addEventListener("pointermove",this._pointerMoveMethod),i.includes("PointerEnter")&&this._canvas.addEventListener("pointerenter",this._pointerEnterMethod),i.includes("PointerExit")&&this._canvas.addEventListener("pointerleave",this._pointerExitMethod);}}_cleanupStateMachineListeners(){W&&this._canvas instanceof HTMLCanvasElement&&(this._canvas.removeEventListener("pointerup",this._pointerUpMethod),this._canvas.removeEventListener("pointerdown",this._pointerDownMethod),this._canvas.removeEventListener("pointermove",this._pointerMoveMethod),this._canvas.removeEventListener("pointerenter",this._pointerEnterMethod),this._canvas.removeEventListener("pointerleave",this._pointerExitMethod));}loadStateMachineData(i){var n,h;return (h=(n=this._dotLottieCore)==null?void 0:n.loadStateMachineData