@lottiefiles/dotlottie-web 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -122,7 +122,7 @@ The `DotLottie` constructor accepts a config object with the following propertie
122
122
  | `speed` | number | | 1 | Animation playback speed. 1 is regular speed. |
123
123
  | `data` | string \| ArrayBuffer | | undefined | Animation data provided either as a Lottie JSON string or as an ArrayBuffer for .lottie animations. |
124
124
  | `mode` | string | | "forward" | Animation play mode. Accepts "forward", "reverse", "bounce", "bounce-reverse". |
125
- | `backgroundColor` | string | | undefined | Background color of the canvas. e.g., "#000000", "rgba(0, 0, 0, 0.5)" or "transparent". |
125
+ | `backgroundColor` | string | | undefined | Background color of the canvas. Accepts 6-digit or 8-digit hex color string (e.g., "#000000", "#000000FF"), |
126
126
  | `segments` | \[number, number] | | \[0, totalFrames - 1] | Animation segments. Accepts an array of two numbers, where the first number is the start frame and the second number is the end frame. |
127
127
  | `renderConfig` | RenderConfig | | `{}` | Configuration for rendering the animation. |
128
128
 
@@ -154,6 +154,7 @@ The `renderConfig` object accepts the following properties:
154
154
  | `segments` | number | Reflects the frames range of the animations. where segments\[0] is the start frame and segments\[1] is the end frame. |
155
155
  | `backgroundColor` | string | Gets the background color of the canvas. |
156
156
  | `autoplay` | boolean | Indicates if the animation is set to auto-play. |
157
+ | `isFrozen` | boolean | Reflects whether the animation loop is stopped or not. |
157
158
 
158
159
  ### Methods
159
160
 
@@ -190,17 +191,19 @@ The `DotLottie` class exposes the following static methods:
190
191
 
191
192
  The `DotLottie` instance emits the following events that can be listened to via the `addEventListener` method:
192
193
 
193
- | Event | Description |
194
- | ----------- | ---------------------------------------------------- |
195
- | `load` | Emitted when the animation is loaded. |
196
- | `loadError` | Emitted when there's an error loading the animation. |
197
- | `play` | Emitted when the animation starts playing. |
198
- | `pause` | Emitted when the animation is paused. |
199
- | `stop` | Emitted when the animation is stopped. |
200
- | `loop` | Emitted when the animation completes a loop. |
201
- | `complete` | Emitted when the animation completes. |
202
- | `frame` | Emitted when the animation reaches a new frame. |
203
- | `destroy` | Emitted when the animation is destroyed. |
194
+ | Event | Description | Event Parameter (Type and Fields) |
195
+ | ----------- | ----------------------------------------------------------------------- | ---------------------------------------------------- |
196
+ | `load` | Emitted when the animation is loaded. | `LoadEvent { type: 'load' }` |
197
+ | `loadError` | Emitted when there's an error loading the animation. | `LoadErrorEvent { type: 'loadError', error: Error }` |
198
+ | `play` | Emitted when the animation starts playing. | `PlayEvent { type: 'play' }` |
199
+ | `pause` | Emitted when the animation is paused. | `PauseEvent { type: 'pause' }` |
200
+ | `stop` | Emitted when the animation is stopped. | `StopEvent { type: 'stop' }` |
201
+ | `loop` | Emitted when the animation completes a loop. | `LoopEvent { type: 'loop', loopCount: number }` |
202
+ | `complete` | Emitted when the animation completes. | `CompleteEvent { type: 'complete' }` |
203
+ | `frame` | Emitted when the animation reaches a new frame. | `FrameEvent { type: 'frame', currentFrame: number }` |
204
+ | `destroy` | Emitted when the animation is destroyed. | `DestroyEvent { type: 'destroy' }` |
205
+ | `freeze` | Emitted when the animation is freezed and the animation loop stops. | `FreezeEvent { type: 'freeze' }` |
206
+ | `unfreeze` | Emitted when the animation is unfreezed and the animation loop resumes. | `UnfreezeEvent { type: 'unfreeze' }` |
204
207
 
205
208
  ## Development
206
209
 
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright 2023 Design Barn Inc.
3
+ */
4
+ declare class AnimationFrameManager {
5
+ private readonly _strategy;
6
+ constructor();
7
+ requestAnimationFrame(callback: (time: number) => void): number;
8
+ cancelAnimationFrame(id: number): void;
9
+ }
10
+
11
+ export { AnimationFrameManager };
@@ -0,0 +1,5 @@
1
+ var l=Object.defineProperty;var o=(t,e,i)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var n=(t,e,i)=>(o(t,typeof e!="symbol"?e+"":e,i),i);var r=typeof window<"u";var a=class{requestAnimationFrame(e){return window.requestAnimationFrame(e)}cancelAnimationFrame(e){window.cancelAnimationFrame(e);}},m=class{constructor(){n(this,"_lastHandleId",0);n(this,"_lastImmediate",null);}requestAnimationFrame(e){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(Date.now());}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate);}},s=class{constructor(){n(this,"_strategy");this._strategy=r?new a:new m;}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e);}};
2
+
3
+ export { s as AnimationFrameManager };
4
+ //# sourceMappingURL=out.js.map
5
+ //# sourceMappingURL=animation-frame-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants.ts","../src/animation-frame-manager.ts"],"names":["IS_BROWSER","WebAnimationFrameStrategy","callback","id","NodeAnimationFrameStrategy","__publicField","_id","AnimationFrameManager"],"mappings":"wKAIO,IAAMA,EAAa,OAAO,OAAW,ICS5C,IAAMC,EAAN,KAAkE,CACzD,sBAAsBC,EAA0C,CACrE,OAAO,OAAO,sBAAsBA,CAAQ,CAC9C,CAEO,qBAAqBC,EAAkB,CAC5C,OAAO,qBAAqBA,CAAE,CAChC,CACF,EAEMC,EAAN,KAAmE,CAAnE,cACEC,EAAA,KAAQ,gBAAwB,GAEhCA,EAAA,KAAQ,iBAA0C,MAE3C,sBAAsBH,EAA0C,CACrE,OAAI,KAAK,eAAiB,OAAO,mBAC/B,KAAK,cAAgB,GAGvB,KAAK,eAAiB,EAEtB,KAAK,eAAiB,aAAa,IAAM,CACvCA,EAAS,KAAK,IAAI,CAAC,CACrB,CAAC,EAEM,KAAK,aACd,CAEO,qBAAqBI,EAAmB,CACzC,KAAK,gBACP,eAAe,KAAK,cAAc,CAEtC,CACF,EAEaC,EAAN,KAA4B,CAG1B,aAAc,CAFrBF,EAAA,KAAiB,aAGf,KAAK,UAAYL,EAAa,IAAIC,EAA8B,IAAIG,CACtE,CAEO,sBAAsBF,EAA0C,CACrE,OAAO,KAAK,UAAU,sBAAsBA,CAAQ,CACtD,CAEO,qBAAqBC,EAAkB,CAC5C,KAAK,UAAU,qBAAqBA,CAAE,CACxC,CACF","sourcesContent":["/**\n * Copyright 2023 Design Barn Inc.\n */\n\nexport const IS_BROWSER = typeof window !== 'undefined';\nexport const MS_TO_SEC_FACTOR = 1000;\nexport const DEFAULT_BG_COLOR = '#00000000';\n","/**\n * Copyright 2023 Design Barn Inc.\n */\n\n/* eslint-disable max-classes-per-file */\n\nimport { IS_BROWSER } from './constants';\n\ninterface AnimationFrameStrategy {\n cancelAnimationFrame(id: number): void;\n requestAnimationFrame(callback: (time: number) => void): number;\n}\n\nclass WebAnimationFrameStrategy implements AnimationFrameStrategy {\n public requestAnimationFrame(callback: (time: number) => void): number {\n return window.requestAnimationFrame(callback);\n }\n\n public cancelAnimationFrame(id: number): void {\n window.cancelAnimationFrame(id);\n }\n}\n\nclass NodeAnimationFrameStrategy implements AnimationFrameStrategy {\n private _lastHandleId: number = 0;\n\n private _lastImmediate: NodeJS.Immediate | null = null;\n\n public requestAnimationFrame(callback: (time: number) => void): number {\n if (this._lastHandleId >= Number.MAX_SAFE_INTEGER) {\n this._lastHandleId = 0;\n }\n\n this._lastHandleId += 1;\n\n this._lastImmediate = setImmediate(() => {\n callback(Date.now());\n });\n\n return this._lastHandleId;\n }\n\n public cancelAnimationFrame(_id: number): void {\n if (this._lastImmediate) {\n clearImmediate(this._lastImmediate);\n }\n }\n}\n\nexport class AnimationFrameManager {\n private readonly _strategy: AnimationFrameStrategy;\n\n public constructor() {\n this._strategy = IS_BROWSER ? new WebAnimationFrameStrategy() : new NodeAnimationFrameStrategy();\n }\n\n public requestAnimationFrame(callback: (time: number) => void): number {\n return this._strategy.requestAnimationFrame(callback);\n }\n\n public cancelAnimationFrame(id: number): void {\n this._strategy.cancelAnimationFrame(id);\n }\n}\n"]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright 2023 Design Barn Inc.
3
+ */
4
+ declare const IS_BROWSER: boolean;
5
+ declare const MS_TO_SEC_FACTOR = 1000;
6
+ declare const DEFAULT_BG_COLOR = "#00000000";
7
+
8
+ export { DEFAULT_BG_COLOR, IS_BROWSER, MS_TO_SEC_FACTOR };
@@ -0,0 +1,5 @@
1
+ var o=typeof window<"u",t=1e3,e="#00000000";
2
+
3
+ export { e as DEFAULT_BG_COLOR, o as IS_BROWSER, t as MS_TO_SEC_FACTOR };
4
+ //# sourceMappingURL=out.js.map
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants.ts"],"names":["IS_BROWSER","MS_TO_SEC_FACTOR","DEFAULT_BG_COLOR"],"mappings":"AAIO,IAAMA,EAAa,OAAO,OAAW,IAC/BC,EAAmB,IACnBC,EAAmB","sourcesContent":["/**\n * Copyright 2023 Design Barn Inc.\n */\n\nexport const IS_BROWSER = typeof window !== 'undefined';\nexport const MS_TO_SEC_FACTOR = 1000;\nexport const DEFAULT_BG_COLOR = '#00000000';\n"]}
@@ -20,6 +20,8 @@ interface Config {
20
20
  autoplay?: boolean;
21
21
  /**
22
22
  * Animation canvas background color.
23
+ *
24
+ * Default is #00000000.
23
25
  */
24
26
  backgroundColor?: string;
25
27
  /**
@@ -94,6 +96,8 @@ declare class DotLottie {
94
96
  private _playbackState;
95
97
  private _backgroundColor;
96
98
  private _renderConfig;
99
+ private _isFrozen;
100
+ private readonly _animationFrameManager;
97
101
  constructor(config: Config);
98
102
  /**
99
103
  * Gets the autoplay status of the animation.
@@ -158,6 +162,7 @@ declare class DotLottie {
158
162
  get isPlaying(): boolean;
159
163
  get isPaused(): boolean;
160
164
  get isStopped(): boolean;
165
+ get isFrozen(): boolean;
161
166
  /**
162
167
  * Loads and initializes the animation from a given URL.
163
168
  *
package/dist/dotlottie.js CHANGED
@@ -1,6 +1,6 @@
1
- export { b as DotLottie } from './chunk-YUMEQPLC.js';
2
- import './chunk-STWLHF3O.js';
3
- import './chunk-SMXCTWPA.js';
4
- import './chunk-7Q3PPTBP.js';
1
+ var Yi=Object.defineProperty;var Qi=(n,e,t)=>e in n?Yi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var P=(n,e,t)=>(Qi(n,typeof e!="symbol"?e+"":e,t),t);var mt=typeof window<"u",Se=1e3,vt="#00000000";var Bt=class{requestAnimationFrame(e){return window.requestAnimationFrame(e)}cancelAnimationFrame(e){window.cancelAnimationFrame(e);}},Nt=class{constructor(){P(this,"_lastHandleId",0);P(this,"_lastImmediate",null);}requestAnimationFrame(e){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(Date.now());}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate);}},yt=class{constructor(){P(this,"_strategy");this._strategy=mt?new Bt:new Nt;}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e);}};var gt=class{constructor(){P(this,"_eventListeners",new Map);}addEventListener(e,t){let a=this._eventListeners.get(e);a||(a=new Set,this._eventListeners.set(e,a)),a.add(t);}removeEventListener(e,t){let a=this._eventListeners.get(e);a&&(t?(a.delete(t),a.size===0&&this._eventListeners.delete(e)):this._eventListeners.delete(e));}dispatch(e){this._eventListeners.get(e.type)?.forEach(a=>a(e));}removeAllEventListeners(){this._eventListeners.clear();}};var tt={name:"@lottiefiles/dotlottie-web",version:"0.9.0",type:"module",description:"Lottie and DotLottie player for the web",repository:{type:"git",url:"git+https://github.com/LottieFiles/dotlottie-web.git",directory:"packages/web"},homepage:"https://github.com/LottieFiles/dotlottie-web#readme",bugs:"https://github.com/LottieFiles/dotlottie-web/issues",author:"LottieFiles",contributors:["Abdelrahman Ashraf <a.theashraf@gmail.com>"],license:"MIT",engines:{node:">=18"},main:"dist/index.js",module:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:["dotlottie","lottie","player","animation","web","canvas","javascript"],scripts:{build:"tsup","build:wasm":"./build_wasm.sh","build:wasm:docker":"./docker_build_wasm.sh",dev:"tsup --watch",lint:"eslint --fix .","size:why":"size-limit --why --clean-dir --save-bundle ./tmp","stats:eslint":"cross-env TIMING=1 eslint .","stats:ts":"tsc -p tsconfig.build.json --extendedDiagnostics",test:"vitest --watch=false","test:coverage":"vitest --coverage --watch=false","test:watch":"vitest --watch","type-check":"tsc --noEmit"},dependencies:{"@dotlottie/dotlottie-js":"^0.6.0"},devDependencies:{"@types/node":"^20.10.2","@vitest/coverage-v8":"^1.0.1","cross-env":"7.0.3",tsup:"7.2.0",typescript:"5.0.4",vitest:"^1.0.1"},publishConfig:{access:"public"}};var ta=(()=>{var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(e={}){var t=e,a,o;t.ready=new Promise((r,i)=>{a=r,o=i;});var u=Object.assign({},t),f=!0,v="";function b(r){return t.locateFile?t.locateFile(r,v):v+r}(typeof document<"u"&&document.currentScript&&(v=document.currentScript.src),n&&(v=n),v.indexOf("blob:")!==0?v=v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):v="",(r,i,s)=>{var l=new XMLHttpRequest;l.open("GET",r,!0),l.responseType="arraybuffer",l.onload=()=>{if(l.status==200||l.status==0&&l.response){i(l.response);return}s();},l.onerror=s,l.send(null);});var S=t.print||console.log.bind(console),T=t.printErr||console.error.bind(console);Object.assign(t,u),u=null,t.arguments&&(t.arguments),t.thisProgram&&(t.thisProgram),t.quit&&(t.quit);var C;t.wasmBinary&&(C=t.wasmBinary),typeof WebAssembly!="object"&&we("no native wasm support detected");var D,G=!1;function fe(r,i){r||we(i);}var X,L,N,U,R,k,ze,ye;function q(){var r=D.buffer;t.HEAP8=X=new Int8Array(r),t.HEAP16=N=new Int16Array(r),t.HEAPU8=L=new Uint8Array(r),t.HEAPU16=U=new Uint16Array(r),t.HEAP32=R=new Int32Array(r),t.HEAPU32=k=new Uint32Array(r),t.HEAPF32=ze=new Float32Array(r),t.HEAPF64=ye=new Float64Array(r);}var te=[],We=[],ee=[];function Dt(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)it(t.preRun.shift());$t(te);}function He(){$t(We);}function ge(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Je(t.postRun.shift());$t(ee);}function it(r){te.unshift(r);}function Ce(r){We.unshift(r);}function Je(r){ee.unshift(r);}var oe=0,_e=null;function Mt(r){oe++,t.monitorRunDependencies&&t.monitorRunDependencies(oe);}function at(r){if(oe--,t.monitorRunDependencies&&t.monitorRunDependencies(oe),oe==0&&(_e)){var i=_e;_e=null,i();}}function we(r){t.onAbort&&t.onAbort(r),r="Aborted("+r+")",T(r),G=!0,r+=". Build with -sASSERTIONS for more info.";var i=new WebAssembly.RuntimeError(r);throw o(i),i}var st="data:application/octet-stream;base64,",rr=r=>r.startsWith(st),Le;Le="renderer.wasm",rr(Le)||(Le=b(Le));function nr(r){if(r==Le&&C)return new Uint8Array(C);throw "both async and sync fetching of the wasm failed"}function vn(r){return !C&&(f)&&typeof fetch=="function"?fetch(r,{credentials:"same-origin"}).then(i=>{if(!i.ok)throw "failed to load wasm binary file at '"+r+"'";return i.arrayBuffer()}).catch(()=>nr(r)):Promise.resolve().then(()=>nr(r))}function ir(r,i,s){return vn(r).then(l=>WebAssembly.instantiate(l,i)).then(l=>l).then(s,l=>{T(`failed to asynchronously prepare wasm: ${l}`),we(l);})}function yn(r,i,s,l){return !r&&typeof WebAssembly.instantiateStreaming=="function"&&!rr(i)&&typeof fetch=="function"?fetch(i,{credentials:"same-origin"}).then(d=>{var g=WebAssembly.instantiateStreaming(d,s);return g.then(l,function(_){return T(`wasm streaming compile failed: ${_}`),T("falling back to ArrayBuffer instantiation"),ir(i,s,l)})}):ir(i,s,l)}function gn(){var r={a:Ui};function i(l,d){return W=l.exports,D=W.I,q(),yr=W.O,Ce(W.J),at(),W}Mt();function s(l){i(l.instance);}if(t.instantiateWasm)try{return t.instantiateWasm(r,i)}catch(l){T(`Module.instantiateWasm callback failed with error: ${l}`),o(l);}return yn(C,Le,r,s).catch(o),{}}var $t=r=>{for(;r.length>0;)r.shift()(t);};t.noExitRuntime||!0;var ar=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,sr=(r,i,s)=>{for(var l=i+s,d=i;r[d]&&!(d>=l);)++d;if(d-i>16&&r.buffer&&ar)return ar.decode(r.subarray(i,d));for(var g="";i<d;){var _=r[i++];if(!(_&128)){g+=String.fromCharCode(_);continue}var y=r[i++]&63;if((_&224)==192){g+=String.fromCharCode((_&31)<<6|y);continue}var A=r[i++]&63;if((_&240)==224?_=(_&15)<<12|y<<6|A:_=(_&7)<<18|y<<12|A<<6|r[i++]&63,_<65536)g+=String.fromCharCode(_);else {var E=_-65536;g+=String.fromCharCode(55296|E>>10,56320|E&1023);}}return g},Ge=(r,i)=>r?sr(L,r,i):"",_n=(r,i,s,l)=>{we(`Assertion failed: ${Ge(r)}, at: `+[i?Ge(i):"unknown filename",s,l?Ge(l):"unknown function"]);};function wn(r,i,s){return 0}function bn(r,i,s){return 0}function An(r,i,s,l){}var In=(r,i,s,l,d)=>{},En=()=>{for(var r=new Array(256),i=0;i<256;++i)r[i]=String.fromCharCode(i);or=r;},or,ne=r=>{for(var i="",s=r;L[s];)i+=or[L[s++]];return i},Ue={},De={},ot={},Re,M=r=>{throw new Re(r)},ur,ut=r=>{throw new ur(r)},Ze=(r,i,s)=>{r.forEach(function(y){ot[y]=i;});function l(y){var A=s(y);A.length!==r.length&&ut("Mismatched type converter count");for(var E=0;E<r.length;++E)pe(r[E],A[E]);}var d=new Array(i.length),g=[],_=0;i.forEach((y,A)=>{De.hasOwnProperty(y)?d[A]=De[y]:(g.push(y),Ue.hasOwnProperty(y)||(Ue[y]=[]),Ue[y].push(()=>{d[A]=De[y],++_,_===g.length&&l(d);}));}),g.length===0&&l(d);};function Tn(r,i,s={}){var l=i.name;if(r||M(`type "${l}" must have a positive integer typeid pointer`),De.hasOwnProperty(r)){if(s.ignoreDuplicateRegistrations)return;M(`Cannot register type '${l}' twice`);}if(De[r]=i,delete ot[r],Ue.hasOwnProperty(r)){var d=Ue[r];delete Ue[r],d.forEach(g=>g());}}function pe(r,i,s={}){if(!("argPackAdvance"in i))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Tn(r,i,s)}var be=8,Fn=(r,i,s,l)=>{i=ne(i),pe(r,{name:i,fromWireType:function(d){return !!d},toWireType:function(d,g){return g?s:l},argPackAdvance:be,readValueFromPointer:function(d){return this.fromWireType(L[d])},destructorFunction:null});},Sn=r=>({count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType}),Ot=r=>{function i(s){return s.$$.ptrType.registeredClass.name}M(i(r)+" instance already deleted");},zt=!1,lr=r=>{},xn=r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr);},cr=r=>{r.count.value-=1;var i=r.count.value===0;i&&xn(r);},fr=(r,i,s)=>{if(i===s)return r;if(s.baseClass===void 0)return null;var l=fr(r,i,s.baseClass);return l===null?null:s.downcast(l)},hr={},Cn=()=>Object.keys(Ye).length,Pn=()=>{var r=[];for(var i in Ye)Ye.hasOwnProperty(i)&&r.push(Ye[i]);return r},Xe=[],Lt=()=>{for(;Xe.length;){var r=Xe.pop();r.$$.deleteScheduled=!1,r.delete();}},Ke,Dn=r=>{Ke=r,Xe.length&&Ke&&Ke(Lt);},Mn=()=>{t.getInheritedInstanceCount=Cn,t.getLiveInheritedInstances=Pn,t.flushPendingDeletes=Lt,t.setDelayFunction=Dn;},Ye={},$n=(r,i)=>{for(i===void 0&&M("ptr should not be undefined");r.baseClass;)i=r.upcast(i),r=r.baseClass;return i},On=(r,i)=>(i=$n(r,i),Ye[i]),lt=(r,i)=>{(!i.ptrType||!i.ptr)&&ut("makeClassHandle requires ptr and ptrType");var s=!!i.smartPtrType,l=!!i.smartPtr;return s!==l&&ut("Both smartPtrType and smartPtr must be specified"),i.count={value:1},Qe(Object.create(r,{$$:{value:i}}))};function zn(r){var i=this.getPointee(r);if(!i)return this.destructor(r),null;var s=On(this.registeredClass,i);if(s!==void 0){if(s.$$.count.value===0)return s.$$.ptr=i,s.$$.smartPtr=r,s.clone();var l=s.clone();return this.destructor(r),l}function d(){return this.isSmartPointer?lt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:i,smartPtrType:this,smartPtr:r}):lt(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var g=this.registeredClass.getActualType(i),_=hr[g];if(!_)return d.call(this);var y;this.isConst?y=_.constPointerType:y=_.pointerType;var A=fr(i,this.registeredClass,y.registeredClass);return A===null?d.call(this):this.isSmartPointer?lt(y.registeredClass.instancePrototype,{ptrType:y,ptr:A,smartPtrType:this,smartPtr:r}):lt(y.registeredClass.instancePrototype,{ptrType:y,ptr:A})}var Qe=r=>typeof FinalizationRegistry>"u"?(Qe=i=>i,r):(zt=new FinalizationRegistry(i=>{cr(i.$$);}),Qe=i=>{var s=i.$$,l=!!s.smartPtr;if(l){var d={$$:s};zt.register(i,d,i);}return i},lr=i=>zt.unregister(i),Qe(r)),Ln=()=>{Object.assign(ct.prototype,{isAliasOf(r){if(!(this instanceof ct)||!(r instanceof ct))return !1;var i=this.$$.ptrType.registeredClass,s=this.$$.ptr;r.$$=r.$$;for(var l=r.$$.ptrType.registeredClass,d=r.$$.ptr;i.baseClass;)s=i.upcast(s),i=i.baseClass;for(;l.baseClass;)d=l.upcast(d),l=l.baseClass;return i===l&&s===d},clone(){if(this.$$.ptr||Ot(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=Qe(Object.create(Object.getPrototypeOf(this),{$$:{value:Sn(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Ot(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&M("Object already scheduled for deletion"),lr(this),cr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0);},isDeleted(){return !this.$$.ptr},deleteLater(){return this.$$.ptr||Ot(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&M("Object already scheduled for deletion"),Xe.push(this),Xe.length===1&&Ke&&Ke(Lt),this.$$.deleteScheduled=!0,this}});};function ct(){}var kn=48,Un=57,dr=r=>{if(r===void 0)return "_unknown";r=r.replace(/[^a-zA-Z0-9_]/g,"$");var i=r.charCodeAt(0);return i>=kn&&i<=Un?`_${r}`:r};function pr(r,i){return r=dr(r),{[r]:function(){return i.apply(this,arguments)}}[r]}var mr=(r,i,s)=>{if(r[i].overloadTable===void 0){var l=r[i];r[i]=function(){return r[i].overloadTable.hasOwnProperty(arguments.length)||M(`Function '${s}' called with an invalid number of arguments (${arguments.length}) - expects one of (${r[i].overloadTable})!`),r[i].overloadTable[arguments.length].apply(this,arguments)},r[i].overloadTable=[],r[i].overloadTable[l.argCount]=l;}},Rn=(r,i,s)=>{t.hasOwnProperty(r)?((s===void 0||t[r].overloadTable!==void 0&&t[r].overloadTable[s]!==void 0)&&M(`Cannot register public name '${r}' twice`),mr(t,r,r),t.hasOwnProperty(s)&&M(`Cannot register multiple overloads of a function with the same number of arguments (${s})!`),t[r].overloadTable[s]=i):(t[r]=i,s!==void 0&&(t[r].numArguments=s));};function jn(r,i,s,l,d,g,_,y){this.name=r,this.constructor=i,this.instancePrototype=s,this.rawDestructor=l,this.baseClass=d,this.getActualType=g,this.upcast=_,this.downcast=y,this.pureVirtualFunctions=[];}var kt=(r,i,s)=>{for(;i!==s;)i.upcast||M(`Expected null or instance of ${s.name}, got an instance of ${i.name}`),r=i.upcast(r),i=i.baseClass;return r};function Bn(r,i){if(i===null)return this.isReference&&M(`null is not a valid ${this.name}`),0;i.$$||M(`Cannot pass "${Rt(i)}" as a ${this.name}`),i.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`);var s=i.$$.ptrType.registeredClass,l=kt(i.$$.ptr,s,this.registeredClass);return l}function Nn(r,i){var s;if(i===null)return this.isReference&&M(`null is not a valid ${this.name}`),this.isSmartPointer?(s=this.rawConstructor(),r!==null&&r.push(this.rawDestructor,s),s):0;i.$$||M(`Cannot pass "${Rt(i)}" as a ${this.name}`),i.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&i.$$.ptrType.isConst&&M(`Cannot convert argument of type ${i.$$.smartPtrType?i.$$.smartPtrType.name:i.$$.ptrType.name} to parameter type ${this.name}`);var l=i.$$.ptrType.registeredClass;if(s=kt(i.$$.ptr,l,this.registeredClass),this.isSmartPointer)switch(i.$$.smartPtr===void 0&&M("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:i.$$.smartPtrType===this?s=i.$$.smartPtr:M(`Cannot convert argument of type ${i.$$.smartPtrType?i.$$.smartPtrType.name:i.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:s=i.$$.smartPtr;break;case 2:if(i.$$.smartPtrType===this)s=i.$$.smartPtr;else {var d=i.clone();s=this.rawShare(s,ht.toHandle(()=>d.delete())),r!==null&&r.push(this.rawDestructor,s);}break;default:M("Unsupporting sharing policy");}return s}function Vn(r,i){if(i===null)return this.isReference&&M(`null is not a valid ${this.name}`),0;i.$$||M(`Cannot pass "${Rt(i)}" as a ${this.name}`),i.$$.ptr||M(`Cannot pass deleted object as a pointer of type ${this.name}`),i.$$.ptrType.isConst&&M(`Cannot convert argument of type ${i.$$.ptrType.name} to parameter type ${this.name}`);var s=i.$$.ptrType.registeredClass,l=kt(i.$$.ptr,s,this.registeredClass);return l}function vr(r){return this.fromWireType(k[r>>2])}var qn=()=>{Object.assign(ft.prototype,{getPointee(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r},destructor(r){this.rawDestructor&&this.rawDestructor(r);},argPackAdvance:be,readValueFromPointer:vr,deleteObject(r){r!==null&&r.delete();},fromWireType:zn});};function ft(r,i,s,l,d,g,_,y,A,E,x){this.name=r,this.registeredClass=i,this.isReference=s,this.isConst=l,this.isSmartPointer=d,this.pointeeType=g,this.sharingPolicy=_,this.rawGetPointee=y,this.rawConstructor=A,this.rawShare=E,this.rawDestructor=x,!d&&i.baseClass===void 0?l?(this.toWireType=Bn,this.destructorFunction=null):(this.toWireType=Vn,this.destructorFunction=null):this.toWireType=Nn;}var Wn=(r,i,s)=>{t.hasOwnProperty(r)||ut("Replacing nonexistant public symbol"),t[r].overloadTable!==void 0&&s!==void 0?t[r].overloadTable[s]=i:(t[r]=i,t[r].argCount=s);},Hn=(r,i,s)=>{var l=t["dynCall_"+r];return s&&s.length?l.apply(null,[i].concat(s)):l.call(null,i)},yr,Ae=r=>yr.get(r),Jn=(r,i,s)=>{if(r.includes("j"))return Hn(r,i,s);var l=Ae(i).apply(null,s);return l},Gn=(r,i)=>{var s=[];return function(){return s.length=0,Object.assign(s,arguments),Jn(r,i,s)}},je=(r,i)=>{r=ne(r);function s(){return r.includes("j")?Gn(r,i):Ae(i)}var l=s();return typeof l!="function"&&M(`unknown function pointer with signature ${r}: ${i}`),l},Zn=(r,i)=>{var s=pr(i,function(l){this.name=i,this.message=l;var d=new Error(l).stack;d!==void 0&&(this.stack=this.toString()+`
2
+ `+d.replace(/^Error(:[^\n]*)?\n/,""));});return s.prototype=Object.create(r.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},s},gr,_r=r=>{var i=Fr(r),s=ne(i);return me(i),s},Ut=(r,i)=>{var s=[],l={};function d(g){if(!l[g]&&!De[g]){if(ot[g]){ot[g].forEach(d);return}s.push(g),l[g]=!0;}}throw i.forEach(d),new gr(`${r}: `+s.map(_r).join([", "]))},Xn=(r,i,s,l,d,g,_,y,A,E,x,$,V)=>{x=ne(x),g=je(d,g),y&&(y=je(_,y)),E&&(E=je(A,E)),V=je($,V);var j=dr(x);Rn(j,function(){Ut(`Cannot construct ${x} due to unbound types`,[l]);}),Ze([r,i,s],l?[l]:[],function(H){H=H[0];var ue,J;l?(ue=H.registeredClass,J=ue.instancePrototype):J=ct.prototype;var Be=pr(j,function(){if(Object.getPrototypeOf(this)!==et)throw new Re("Use 'new' to construct "+x);if(re.constructor_body===void 0)throw new Re(x+" has no accessible constructor");var Pr=re.constructor_body[arguments.length];if(Pr===void 0)throw new Re(`Tried to invoke ctor of ${x} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(re.constructor_body).toString()}) parameters instead!`);return Pr.apply(this,arguments)}),et=Object.create(J,{constructor:{value:Be}});Be.prototype=et;var re=new jn(x,Be,et,V,ue,g,y,E);re.baseClass&&(re.baseClass.__derivedClasses===void 0&&(re.baseClass.__derivedClasses=[]),re.baseClass.__derivedClasses.push(re));var Fe=new ft(x,re,!0,!1,!1),pt=new ft(x+"*",re,!1,!1,!1),Cr=new ft(x+" const*",re,!1,!0,!1);return hr[r]={pointerType:pt,constPointerType:Cr},Wn(j,Be),[Fe,pt,Cr]});},wr=(r,i)=>{for(var s=[],l=0;l<r;l++)s.push(k[i+l*4>>2]);return s},Kn=r=>{for(;r.length;){var i=r.pop(),s=r.pop();s(i);}};function br(r,i,s,l,d,g){var _=i.length;_<2&&M("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var y=i[1]!==null&&s!==null,A=!1,E=1;E<i.length;++E)if(i[E]!==null&&i[E].destructorFunction===void 0){A=!0;break}var x=i[0].name!=="void",$=_-2,V=new Array($),j=[],H=[];return function(){arguments.length!==$&&M(`function ${r} called with ${arguments.length} arguments, expected ${$}`),H.length=0;var ue;j.length=y?2:1,j[0]=d,y&&(ue=i[1].toWireType(H,this),j[1]=ue);for(var J=0;J<$;++J)V[J]=i[J+2].toWireType(H,arguments[J]),j.push(V[J]);var Be=l.apply(null,j);function et(re){if(A)Kn(H);else for(var Fe=y?1:2;Fe<i.length;Fe++){var pt=Fe===1?ue:V[Fe-2];i[Fe].destructorFunction!==null&&i[Fe].destructorFunction(pt);}if(x)return i[0].fromWireType(re)}return et(Be)}}var Yn=(r,i,s,l,d,g)=>{var _=wr(i,s);d=je(l,d),Ze([],[r],function(y){y=y[0];var A=`constructor ${y.name}`;if(y.registeredClass.constructor_body===void 0&&(y.registeredClass.constructor_body=[]),y.registeredClass.constructor_body[i-1]!==void 0)throw new Re(`Cannot register multiple constructors with identical number of parameters (${i-1}) for class '${y.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return y.registeredClass.constructor_body[i-1]=()=>{Ut(`Cannot construct ${y.name} due to unbound types`,_);},Ze([],_,E=>(E.splice(1,0,null),y.registeredClass.constructor_body[i-1]=br(A,E,null,d,g),[])),[]});},Qn=r=>{r=r.trim();let i=r.indexOf("(");return i!==-1?(fe(r[r.length-1]==")","Parentheses for argument names should match."),r.substr(0,i)):r},ei=(r,i,s,l,d,g,_,y,A)=>{var E=wr(s,l);i=ne(i),i=Qn(i),g=je(d,g),Ze([],[r],function(x){x=x[0];var $=`${x.name}.${i}`;i.startsWith("@@")&&(i=Symbol[i.substring(2)]),y&&x.registeredClass.pureVirtualFunctions.push(i);function V(){Ut(`Cannot call ${$} due to unbound types`,E);}var j=x.registeredClass.instancePrototype,H=j[i];return H===void 0||H.overloadTable===void 0&&H.className!==x.name&&H.argCount===s-2?(V.argCount=s-2,V.className=x.name,j[i]=V):(mr(j,i,$),j[i].overloadTable[s-2]=V),Ze([],E,function(ue){var J=br($,ue,x,g,_);return j[i].overloadTable===void 0?(J.argCount=s-2,j[i]=J):j[i].overloadTable[s-2]=J,[]}),[]});};function ti(){Object.assign(Ar.prototype,{get(r){return this.allocated[r]},has(r){return this.allocated[r]!==void 0},allocate(r){var i=this.freelist.pop()||this.allocated.length;return this.allocated[i]=r,i},free(r){this.allocated[r]=void 0,this.freelist.push(r);}});}function Ar(){this.allocated=[void 0],this.freelist=[];}var ie=new Ar,Ir=r=>{r>=ie.reserved&&--ie.get(r).refcount===0&&ie.free(r);},ri=()=>{for(var r=0,i=ie.reserved;i<ie.allocated.length;++i)ie.allocated[i]!==void 0&&++r;return r},ni=()=>{ie.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),ie.reserved=ie.allocated.length,t.count_emval_handles=ri;},ht={toValue:r=>(r||M("Cannot use deleted val. handle = "+r),ie.get(r).value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return ie.allocate({refcount:1,value:r})}}};function Er(r){return this.fromWireType(R[r>>2])}var ii=(r,i)=>{i=ne(i),pe(r,{name:i,fromWireType:s=>{var l=ht.toValue(s);return Ir(s),l},toWireType:(s,l)=>ht.toHandle(l),argPackAdvance:be,readValueFromPointer:Er,destructorFunction:null});},Rt=r=>{if(r===null)return "null";var i=typeof r;return i==="object"||i==="array"||i==="function"?r.toString():""+r},ai=(r,i)=>{switch(i){case 4:return function(s){return this.fromWireType(ze[s>>2])};case 8:return function(s){return this.fromWireType(ye[s>>3])};default:throw new TypeError(`invalid float width (${i}): ${r}`)}},si=(r,i,s)=>{i=ne(i),pe(r,{name:i,fromWireType:l=>l,toWireType:(l,d)=>d,argPackAdvance:be,readValueFromPointer:ai(i,s),destructorFunction:null});},oi=(r,i,s)=>{switch(i){case 1:return s?l=>X[l>>0]:l=>L[l>>0];case 2:return s?l=>N[l>>1]:l=>U[l>>1];case 4:return s?l=>R[l>>2]:l=>k[l>>2];default:throw new TypeError(`invalid integer width (${i}): ${r}`)}},ui=(r,i,s,l,d)=>{i=ne(i);var g=x=>x;if(l===0){var _=32-8*s;g=x=>x<<_>>>_;}var y=i.includes("unsigned"),A=(x,$)=>{},E;y?E=function(x,$){return A($,this.name),$>>>0}:E=function(x,$){return A($,this.name),$},pe(r,{name:i,fromWireType:g,toWireType:E,argPackAdvance:be,readValueFromPointer:oi(i,s,l!==0),destructorFunction:null});},li=(r,i,s)=>{var l=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],d=l[i];function g(_){var y=k[_>>2],A=k[_+4>>2];return new d(X.buffer,A,y)}s=ne(s),pe(r,{name:s,fromWireType:g,argPackAdvance:be,readValueFromPointer:g},{ignoreDuplicateRegistrations:!0});},ci=(r,i,s,l)=>{if(!(l>0))return 0;for(var d=s,g=s+l-1,_=0;_<r.length;++_){var y=r.charCodeAt(_);if(y>=55296&&y<=57343){var A=r.charCodeAt(++_);y=65536+((y&1023)<<10)|A&1023;}if(y<=127){if(s>=g)break;i[s++]=y;}else if(y<=2047){if(s+1>=g)break;i[s++]=192|y>>6,i[s++]=128|y&63;}else if(y<=65535){if(s+2>=g)break;i[s++]=224|y>>12,i[s++]=128|y>>6&63,i[s++]=128|y&63;}else {if(s+3>=g)break;i[s++]=240|y>>18,i[s++]=128|y>>12&63,i[s++]=128|y>>6&63,i[s++]=128|y&63;}}return i[s]=0,s-d},fi=(r,i,s)=>ci(r,L,i,s),hi=r=>{for(var i=0,s=0;s<r.length;++s){var l=r.charCodeAt(s);l<=127?i++:l<=2047?i+=2:l>=55296&&l<=57343?(i+=4,++s):i+=3;}return i},di=(r,i)=>{i=ne(i);var s=i==="std::string";pe(r,{name:i,fromWireType(l){var d=k[l>>2],g=l+4,_;if(s)for(var y=g,A=0;A<=d;++A){var E=g+A;if(A==d||L[E]==0){var x=E-y,$=Ge(y,x);_===void 0?_=$:(_+=String.fromCharCode(0),_+=$),y=E+1;}}else {for(var V=new Array(d),A=0;A<d;++A)V[A]=String.fromCharCode(L[g+A]);_=V.join("");}return me(l),_},toWireType(l,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var g,_=typeof d=="string";_||d instanceof Uint8Array||d instanceof Uint8ClampedArray||d instanceof Int8Array||M("Cannot pass non-string to std::string"),s&&_?g=hi(d):g=d.length;var y=jt(4+g+1),A=y+4;if(k[y>>2]=g,s&&_)fi(d,A,g+1);else if(_)for(var E=0;E<g;++E){var x=d.charCodeAt(E);x>255&&(me(A),M("String has UTF-16 code units that do not fit in 8 bits")),L[A+E]=x;}else for(var E=0;E<g;++E)L[A+E]=d[E];return l!==null&&l.push(me,y),y},argPackAdvance:be,readValueFromPointer:vr,destructorFunction(l){me(l);}});},Tr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,pi=(r,i)=>{for(var s=r,l=s>>1,d=l+i/2;!(l>=d)&&U[l];)++l;if(s=l<<1,s-r>32&&Tr)return Tr.decode(L.subarray(r,s));for(var g="",_=0;!(_>=i/2);++_){var y=N[r+_*2>>1];if(y==0)break;g+=String.fromCharCode(y);}return g},mi=(r,i,s)=>{if(s===void 0&&(s=2147483647),s<2)return 0;s-=2;for(var l=i,d=s<r.length*2?s/2:r.length,g=0;g<d;++g){var _=r.charCodeAt(g);N[i>>1]=_,i+=2;}return N[i>>1]=0,i-l},vi=r=>r.length*2,yi=(r,i)=>{for(var s=0,l="";!(s>=i/4);){var d=R[r+s*4>>2];if(d==0)break;if(++s,d>=65536){var g=d-65536;l+=String.fromCharCode(55296|g>>10,56320|g&1023);}else l+=String.fromCharCode(d);}return l},gi=(r,i,s)=>{if(s===void 0&&(s=2147483647),s<4)return 0;for(var l=i,d=l+s-4,g=0;g<r.length;++g){var _=r.charCodeAt(g);if(_>=55296&&_<=57343){var y=r.charCodeAt(++g);_=65536+((_&1023)<<10)|y&1023;}if(R[i>>2]=_,i+=4,i+4>d)break}return R[i>>2]=0,i-l},_i=r=>{for(var i=0,s=0;s<r.length;++s){var l=r.charCodeAt(s);l>=55296&&l<=57343&&++s,i+=4;}return i},wi=(r,i,s)=>{s=ne(s);var l,d,g,_,y;i===2?(l=pi,d=mi,_=vi,g=()=>U,y=1):i===4&&(l=yi,d=gi,_=_i,g=()=>k,y=2),pe(r,{name:s,fromWireType:A=>{for(var E=k[A>>2],x=g(),$,V=A+4,j=0;j<=E;++j){var H=A+4+j*i;if(j==E||x[H>>y]==0){var ue=H-V,J=l(V,ue);$===void 0?$=J:($+=String.fromCharCode(0),$+=J),V=H+i;}}return me(A),$},toWireType:(A,E)=>{typeof E!="string"&&M(`Cannot pass non-string to C++ string type ${s}`);var x=_(E),$=jt(4+x+i);return k[$>>2]=x>>y,d(E,$+4,x+i),A!==null&&A.push(me,$),$},argPackAdvance:be,readValueFromPointer:Er,destructorFunction(A){me(A);}});},bi=(r,i)=>{i=ne(i),pe(r,{isVoid:!0,name:i,argPackAdvance:0,fromWireType:()=>{},toWireType:(s,l)=>{}});},Ai=()=>{throw 1/0},Ii=r=>{r>4&&(ie.get(r).refcount+=1);},Ei=(r,i)=>{var s=De[r];return s===void 0&&M(i+" has unknown type "+_r(r)),s},Ti=(r,i)=>{r=Ei(r,"_emval_take_value");var s=r.readValueFromPointer(i);return ht.toHandle(s)},Fi=()=>{we("");},Si=(r,i,s)=>L.copyWithin(r,i,i+s),xi=()=>2147483648,Ci=r=>{var i=D.buffer,s=(r-i.byteLength+65535)/65536;try{return D.grow(s),q(),1}catch{}},Pi=r=>{var i=L.length;r>>>=0;var s=xi();if(r>s)return !1;for(var l=(A,E)=>A+(E-A%E)%E,d=1;d<=4;d*=2){var g=i*(1+.2/d);g=Math.min(g,r+100663296);var _=Math.min(s,l(Math.max(r,g),65536)),y=Ci(_);if(y)return !0}return !1},Di=r=>52,Mi=(r,i,s,l)=>52;function Oi(r,i,s,l,d){return 70}var zi=[null,[],[]],Li=(r,i)=>{var s=zi[r];i===0||i===10?((r===1?S:T)(sr(s,0)),s.length=0):s.push(i);},ki=(r,i,s,l)=>{for(var d=0,g=0;g<s;g++){var _=k[i>>2],y=k[i+4>>2];i+=8;for(var A=0;A<y;A++)Li(r,L[_+A]);d+=y;}return k[l>>2]=d,0};En(),Re=t.BindingError=class extends Error{constructor(i){super(i),this.name="BindingError";}},ur=t.InternalError=class extends Error{constructor(i){super(i),this.name="InternalError";}},Ln(),Mn(),qn(),gr=t.UnboundTypeError=Zn(Error,"UnboundTypeError"),ti(),ni();var Ui={b:_n,n:wn,D:bn,E:An,w:In,q:Fn,H:Xn,G:Yn,e:ei,F:ii,o:si,f:ui,d:li,p:di,k:wi,r:bi,y:Ai,s:Ir,t:Ii,g:Ti,h:Fi,A:Si,z:Pi,m:Di,C:Mi,v:Oi,B:ki,j:Ji,i:Gi,l:Zi,a:Wi,c:Hi,x:Xi,u:Ki},W=gn(),me=r=>(me=W.K)(r),jt=r=>(jt=W.L)(r),Fr=r=>(Fr=W.M)(r);t.__embind_initialize_bindings=()=>(t.__embind_initialize_bindings=W.N)();var Ie=(r,i)=>(Ie=W.P)(r,i),Ee=()=>(Ee=W.Q)(),Te=r=>(Te=W.R)(r),Sr=t.dynCall_viiij=(r,i,s,l,d,g)=>(Sr=t.dynCall_viiij=W.S)(r,i,s,l,d,g);t.dynCall_jiji=(r,i,s,l,d)=>(t.dynCall_jiji=W.T)(r,i,s,l,d);function Wi(r,i){var s=Ee();try{Ae(r)(i);}catch(l){if(Te(s),l!==l+0)throw l;Ie(1,0);}}function Hi(r,i,s){var l=Ee();try{Ae(r)(i,s);}catch(d){if(Te(l),d!==d+0)throw d;Ie(1,0);}}function Ji(r,i){var s=Ee();try{return Ae(r)(i)}catch(l){if(Te(s),l!==l+0)throw l;Ie(1,0);}}function Gi(r,i,s,l){var d=Ee();try{return Ae(r)(i,s,l)}catch(g){if(Te(d),g!==g+0)throw g;Ie(1,0);}}function Zi(r,i,s,l,d,g){var _=Ee();try{return Ae(r)(i,s,l,d,g)}catch(y){if(Te(_),y!==y+0)throw y;Ie(1,0);}}function Xi(r,i,s,l,d){var g=Ee();try{Ae(r)(i,s,l,d);}catch(_){if(Te(g),_!==_+0)throw _;Ie(1,0);}}function Ki(r,i,s,l,d,g){var _=Ee();try{Sr(r,i,s,l,d,g);}catch(y){if(Te(_),y!==y+0)throw y;Ie(1,0);}}var dt;_e=function r(){dt||xr(),dt||(_e=r);};function xr(){if(oe>0||(Dt(),oe>0))return;function r(){dt||(dt=!0,t.calledRun=!0,!G&&(He(),a(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),ge()));}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("");},1),r();},1)):r();}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return xr(),e.ready}})(),Dr=ta;var Me=class{constructor(){throw new Error("WasmLoader is a static class and cannot be instantiated.")}static async _tryLoad(e){return await Dr({locateFile:()=>e})}static async _loadWithBackup(){return this._ModulePromise||(this._ModulePromise=this._tryLoad(this._wasmURL).catch(async e=>{let t=`https://cdn.jsdelivr.net/npm/${tt.name}@${tt.version}/dist/renderer.wasm`;console.warn(`Trying backup URL for WASM loading: ${t}`);try{return await this._tryLoad(t)}catch(a){throw console.error(`Both primary and backup WASM URLs failed. Primary error: ${e.message}, Backup error: ${a.message}`),new Error("WASM loading failed from all sources.")}})),this._ModulePromise}static async load(){return this._loadWithBackup()}static setWasmUrl(e){this._wasmURL=e,this._ModulePromise=null;}};P(Me,"_ModulePromise",null),P(Me,"_wasmURL",`https://unpkg.com/${tt.name}@${tt.version}/dist/renderer.wasm`);var Mr={},ra=function(n,e,t,a,o){var u=new Worker(Mr[e]||(Mr[e]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return u.onmessage=function(c){var h=c.data,m=h.$e$;if(m){var f=new Error(m[0]);f.code=m[1],f.stack=m[2],o(f,null);}else o(null,h);},u.postMessage(t,a),u},Y=Uint8Array,$e=Uint16Array,zr=Int32Array,Wt=new Y([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]),Ht=new Y([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]),Lr=new Y([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),kr=function(n,e){for(var t=new $e(31),a=0;a<31;++a)t[a]=e+=1<<n[a-1];for(var o=new zr(t[30]),a=1;a<30;++a)for(var u=t[a];u<t[a+1];++u)o[u]=u-t[a]<<5|a;return {b:t,r:o}},Ur=kr(Wt,2),Jt=Ur.b,na=Ur.r;Jt[28]=258,na[258]=28;var Rr=kr(Ht,0),jr=Rr.b,At=new $e(32768);for(O=0;O<32768;++O)ve=(O&43690)>>1|(O&21845)<<1,ve=(ve&52428)>>2|(ve&13107)<<2,ve=(ve&61680)>>4|(ve&3855)<<4,At[O]=((ve&65280)>>8|(ve&255)<<8)>>1;var ve,O,Ne=function(n,e,t){for(var a=n.length,o=0,u=new $e(e);o<a;++o)n[o]&&++u[n[o]-1];var c=new $e(e);for(o=1;o<e;++o)c[o]=c[o-1]+u[o-1]<<1;var h;if(t){h=new $e(1<<e);var m=15-e;for(o=0;o<a;++o)if(n[o])for(var f=o<<4|n[o],p=e-n[o],v=c[n[o]-1]++<<p,b=v|(1<<p)-1;v<=b;++v)h[At[v]>>m]=f;}else for(h=new $e(a),o=0;o<a;++o)n[o]&&(h[o]=At[c[n[o]-1]++]>>15-n[o]);return h},rt=new Y(288);for(O=0;O<144;++O)rt[O]=8;var O;for(O=144;O<256;++O)rt[O]=9;var O;for(O=256;O<280;++O)rt[O]=7;var O;for(O=280;O<288;++O)rt[O]=8;var O,Br=new Y(32);for(O=0;O<32;++O)Br[O]=5;var O;var Nr=Ne(rt,9,1);var Vr=Ne(Br,5,1),wt=function(n){for(var e=n[0],t=1;t<n.length;++t)n[t]>e&&(e=n[t]);return e},ae=function(n,e,t){var a=e/8|0;return (n[a]|n[a+1]<<8)>>(e&7)&t},bt=function(n,e){var t=e/8|0;return (n[t]|n[t+1]<<8|n[t+2]<<16)>>(e&7)},qr=function(n){return (n+7)/8|0},It=function(n,e,t){(e==null||e<0)&&(e=0),(t==null||t>n.length)&&(t=n.length);var a=new Y(t-e);return a.set(n.subarray(e,t)),a};var Wr=["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"],K=function(n,e,t){var a=new Error(e||Wr[n]);if(a.code=n,Error.captureStackTrace&&Error.captureStackTrace(a,K),!t)throw a;return a},Hr=function(n,e,t,a){var o=n.length,u=a?a.length:0;if(!o||e.f&&!e.l)return t||new Y(0);var c=!t||e.i!=2,h=e.i;t||(t=new Y(o*3));var m=function(at){var we=t.length;if(at>we){var st=new Y(Math.max(we*2,at));st.set(t),t=st;}},f=e.f||0,p=e.p||0,v=e.b||0,b=e.l,I=e.d,F=e.m,w=e.n,S=o*8;do{if(!b){f=ae(n,p,1);var T=ae(n,p+1,3);if(p+=3,T)if(T==1)b=Nr,I=Vr,F=9,w=5;else if(T==2){var Z=ae(n,p,31)+257,fe=ae(n,p+10,15)+4,X=Z+ae(n,p+5,31)+1;p+=14;for(var L=new Y(X),N=new Y(19),U=0;U<fe;++U)N[Lr[U]]=ae(n,p+U*3,7);p+=fe*3;for(var R=wt(N),k=(1<<R)-1,ze=Ne(N,R,1),U=0;U<X;){var ye=ze[ae(n,p,k)];p+=ye&15;var C=ye>>4;if(C<16)L[U++]=C;else {var q=0,te=0;for(C==16?(te=3+ae(n,p,3),p+=2,q=L[U-1]):C==17?(te=3+ae(n,p,7),p+=3):C==18&&(te=11+ae(n,p,127),p+=7);te--;)L[U++]=q;}}var We=L.subarray(0,Z),ee=L.subarray(Z);F=wt(We),w=wt(ee),b=Ne(We,F,1),I=Ne(ee,w,1);}else K(1);else {var C=qr(p)+4,D=n[C-4]|n[C-3]<<8,G=C+D;if(G>o){h&&K(0);break}c&&m(v+D),t.set(n.subarray(C,G),v),e.b=v+=D,e.p=p=G*8,e.f=f;continue}if(p>S){h&&K(0);break}}c&&m(v+131072);for(var Pt=(1<<F)-1,Dt=(1<<w)-1,He=p;;He=p){var q=b[bt(n,p)&Pt],ge=q>>4;if(p+=q&15,p>S){h&&K(0);break}if(q||K(2),ge<256)t[v++]=ge;else if(ge==256){He=p,b=null;break}else {var it=ge-254;if(ge>264){var U=ge-257,Ce=Wt[U];it=ae(n,p,(1<<Ce)-1)+Jt[U],p+=Ce;}var Je=I[bt(n,p)&Dt],oe=Je>>4;Je||K(3),p+=Je&15;var ee=jr[oe];if(oe>3){var Ce=Ht[oe];ee+=bt(n,p)&(1<<Ce)-1,p+=Ce;}if(p>S){h&&K(0);break}c&&m(v+131072);var Pe=v+it;if(v<ee){var _e=u-ee,Mt=Math.min(ee,Pe);for(_e+v<0&&K(3);v<Mt;++v)t[v]=a[_e+v];}for(;v<Pe;v+=4)t[v]=t[v-ee],t[v+1]=t[v+1-ee],t[v+2]=t[v+2-ee],t[v+3]=t[v+3-ee];v=Pe;}}e.l=b,e.p=He,e.b=v,e.f=f,b&&(f=1,e.m=F,e.d=I,e.n=w);}while(!f);return v==t.length?t:It(t,0,v)};var ia=new Y(0);var aa=function(n,e){var t={};for(var a in n)t[a]=n[a];for(var a in e)t[a]=e[a];return t},$r=function(n,e,t){for(var a=n(),o=n.toString(),u=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),c=0;c<a.length;++c){var h=a[c],m=u[c];if(typeof h=="function"){e+=";"+m+"=";var f=h.toString();if(h.prototype)if(f.indexOf("[native code]")!=-1){var p=f.indexOf(" ",8)+1;e+=f.slice(p,f.indexOf("(",p));}else {e+=f;for(var v in h.prototype)e+=";"+m+".prototype."+v+"="+h.prototype[v].toString();}else e+=f;}else t[m]=h;}return e},_t=[],sa=function(n){var e=[];for(var t in n)n[t].buffer&&e.push((n[t]=new n[t].constructor(n[t])).buffer);return e},oa=function(n,e,t,a){if(!_t[t]){for(var o="",u={},c=n.length-1,h=0;h<c;++h)o=$r(n[h],o,u);_t[t]={c:$r(n[c],o,u),e:u};}var m=aa({},_t[t].e);return ra(_t[t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",t,m,sa(m),a)},ua=function(){return [Y,$e,zr,Wt,Ht,Lr,Jt,jr,Nr,Vr,At,Wr,Ne,wt,ae,bt,qr,It,K,Hr,Gt,Jr,Gr]};var Jr=function(n){return postMessage(n,[n.buffer])},Gr=function(n){return n&&{out:n.size&&new Y(n.size),dictionary:n.dictionary}},la=function(n,e,t,a,o,u){var c=oa(t,a,o,function(h,m){c.terminate(),u(h,m);});return c.postMessage([n,e],e.consume?[n.buffer]:[]),function(){c.terminate();}};var he=function(n,e){return n[e]|n[e+1]<<8},le=function(n,e){return (n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24)>>>0},Vt=function(n,e){return le(n,e)+le(n,e+4)*4294967296};function ca(n,e,t){return t||(t=e,e={}),typeof t!="function"&&K(7),la(n,e,[ua],function(a){return Jr(Gt(a.data[0],Gr(a.data[1])))},1,t)}function Gt(n,e){return Hr(n,{i:2},e&&e.out,e&&e.dictionary)}var qt=typeof TextDecoder<"u"&&new TextDecoder,fa=0;try{qt.decode(ia,{stream:!0}),fa=1;}catch{}var ha=function(n){for(var e="",t=0;;){var a=n[t++],o=(a>127)+(a>223)+(a>239);if(t+o>n.length)return {s:e,r:It(n,t-1)};o?o==3?(a=((a&15)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):o&1?e+=String.fromCharCode((a&31)<<6|n[t++]&63):e+=String.fromCharCode((a&15)<<12|(n[t++]&63)<<6|n[t++]&63):e+=String.fromCharCode(a);}};function Et(n,e){if(e){for(var t="",a=0;a<n.length;a+=16384)t+=String.fromCharCode.apply(null,n.subarray(a,a+16384));return t}else {if(qt)return qt.decode(n);var o=ha(n),u=o.s,t=o.r;return t.length&&K(8),u}}var da=function(n,e){return e+30+he(n,e+26)+he(n,e+28)},pa=function(n,e,t){var a=he(n,e+28),o=Et(n.subarray(e+46,e+46+a),!(he(n,e+8)&2048)),u=e+46+a,c=le(n,e+20),h=t&&c==4294967295?ma(n,u):[c,le(n,e+24),le(n,e+42)],m=h[0],f=h[1],p=h[2];return [he(n,e+10),m,f,o,u+he(n,e+30)+he(n,e+32),p]},ma=function(n,e){for(;he(n,e)!=1;e+=4+he(n,e+2));return [Vt(n,e+12),Vt(n,e+4),Vt(n,e+20)]};var Or=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(n){n();};function Zr(n,e,t){t||(t=e,e={}),typeof t!="function"&&K(7);var a=[],o=function(){for(var S=0;S<a.length;++S)a[S]();},u={},c=function(S,T){Or(function(){t(S,T);});};Or(function(){c=t;});for(var h=n.length-22;le(n,h)!=101010256;--h)if(!h||n.length-h>65558)return c(K(13,0,1),null),o;var m=he(n,h+8);if(m){var f=m,p=le(n,h+16),v=p==4294967295||f==65535;if(v){var b=le(n,h-12);v=le(n,b)==101075792,v&&(f=m=le(n,b+32),p=le(n,b+48));}for(var I=e&&e.filter,F=function(S){var T=pa(n,p,v),C=T[0],D=T[1],G=T[2],Z=T[3],fe=T[4],X=T[5],L=da(n,X);p=fe;var N=function(R,k){R?(o(),c(R,null)):(k&&(u[Z]=k),--m||c(null,u));};if(!I||I({name:Z,size:D,originalSize:G,compression:C}))if(!C)N(null,It(n,L,L+D));else if(C==8){var U=n.subarray(L,L+D);if(D<32e4)try{N(null,Gt(U,{out:new Y(G)}));}catch(R){N(R,null);}else a.push(ca(U,{size:G},N));}else N(K(14,"unknown compression type "+C,1),null);else N(null,null);},w=0;w<f;++w)F(w);}else c(null,{});return o}function Xr(n){return (Array.isArray(n)?n:n.issues).reduce((e,t)=>{if(t.path){let a=t.path.map(({key:o})=>o).join(".");e.nested[a]=[...e.nested[a]||[],t.message];}else e.root=[...e.root||[],t.message];return e},{nested:{}})}var va=class extends Error{constructor(e){super(e[0].message);P(this,"issues");this.name="ValiError",this.issues=e;}};function ya(n,e){return {reason:n?.reason,validation:e.validation,origin:n?.origin||"value",message:e.message,input:e.input,abortEarly:n?.abortEarly,abortPipeEarly:n?.abortPipeEarly}}function ga(n,e){return {reason:e,origin:n?.origin,abortEarly:n?.abortEarly,abortPipeEarly:n?.abortPipeEarly}}function xe(n,e,t,a){if(!e||!e.length)return {output:n};let o,u,c=n;for(let h of e){let m=h(c);if(m.issue){o=o||ga(t,a);let f=ya(o,m.issue);if(u?u.push(f):u=[f],o.abortEarly||o.abortPipeEarly)break}else c=m.output;}return u?{issues:u}:{output:c}}function ce(n,e){return !n||typeof n=="string"?[n,e]:[void 0,n]}function de(n,e,t,a,o,u){return {issues:[{reason:e,validation:t,origin:n?.origin||"value",message:a,input:o,issues:u,abortEarly:n?.abortEarly,abortPipeEarly:n?.abortPipeEarly}]}}function Kr(n=[]){return {schema:"any",async:!1,_parse(e,t){return xe(e,n,t,"any")}}}function Ve(n,e,t){let[a,o]=ce(e,t);return {schema:"array",array:{item:n},async:!1,_parse(u,c){if(!Array.isArray(u))return de(c,"type","array",a||"Invalid type",u);let h,m=[];for(let f=0;f<u.length;f++){let p=u[f],v=n._parse(p,c);if(v.issues){let b={schema:"array",input:u,key:f,value:p};for(let I of v.issues)I.path?I.path.unshift(b):I.path=[b],h?.push(I);if(h||(h=v.issues),c?.abortEarly)break}else m.push(v.output);}return h?{issues:h}:xe(m,o,c,"array")}}}function Tt(n,e){let[t,a]=ce(n,e);return {schema:"boolean",async:!1,_parse(o,u){return typeof o!="boolean"?de(u,"type","boolean",t||"Invalid type",o):xe(o,a,u,"boolean")}}}function Zt(n,e){return {schema:"literal",literal:n,async:!1,_parse(t,a){return t!==n?de(a,"type","literal",e||"Invalid type",t):{output:t}}}}function Yr(n,e){return {schema:"native_enum",nativeEnum:n,async:!1,_parse(t,a){return Object.values(n).includes(t)?{output:t}:de(a,"type","native_enum",e||"Invalid type",t)}}}function se(n,e){let[t,a]=ce(n,e);return {schema:"number",async:!1,_parse(o,u){return typeof o!="number"?de(u,"type","number",t||"Invalid type",o):xe(o,a,u,"number")}}}function Q(n,e,t){let[a,o]=ce(e,t),u;return {schema:"object",object:n,async:!1,_parse(c,h){if(!c||typeof c!="object")return de(h,"type","object",a||"Invalid type",c);u=u||Object.entries(n);let m,f={};for(let[p,v]of u){let b=c[p],I=v._parse(b,h);if(I.issues){let F={schema:"object",input:c,key:p,value:b};for(let w of I.issues)w.path?w.path.unshift(F):w.path=[F],m?.push(w);if(m||(m=I.issues),h?.abortEarly)break}else f[p]=I.output;}return m?{issues:m}:xe(f,o,h,"object")}}}function z(n){return {schema:"optional",wrapped:n,async:!1,_parse(e,t){return e===void 0?{output:e}:n._parse(e,t)}}}function B(n,e){let[t,a]=ce(n,e);return {schema:"string",async:!1,_parse(o,u){return typeof o!="string"?de(u,"type","string",t||"Invalid type",o):xe(o,a,u,"string")}}}function _a(n,e,t,a){if(typeof e=="object"&&!Array.isArray(e)){let[c,h]=ce(t,a);return [n,e,c,h]}let[o,u]=ce(e,t);return [B(),n,o,u]}var wa=["__proto__","prototype","constructor"];function Xt(n,e,t,a){let[o,u,c,h]=_a(n,e,t,a);return {schema:"record",record:{key:o,value:u},async:!1,_parse(m,f){if(!m||typeof m!="object")return de(f,"type","record",c||"Invalid type",m);let p,v={};for(let[b,I]of Object.entries(m))if(!wa.includes(b)){let F,w=o._parse(b,{origin:"key",abortEarly:f?.abortEarly,abortPipeEarly:f?.abortPipeEarly});if(w.issues){F={schema:"record",input:m,key:b,value:I};for(let T of w.issues)T.path=[F],p?.push(T);if(p||(p=w.issues),f?.abortEarly)break}let S=u._parse(I,f);if(S.issues){F=F||{schema:"record",input:m,key:b,value:I};for(let T of S.issues)T.path?T.path.unshift(F):T.path=[F],p?.push(T);if(p||(p=S.issues),f?.abortEarly)break}!w.issues&&!S.issues&&(v[w.output]=S.output);}return p?{issues:p}:xe(v,h,f,"record")}}}function ba(n,e,t){if(typeof n=="object"&&!Array.isArray(n)){let[u,c]=ce(e,t);return [n,u,c]}let[a,o]=ce(n,e);return [void 0,a,o]}function Kt(n,e,t,a){let[o,u,c]=ba(e,t,a);return {schema:"tuple",tuple:{items:n,rest:o},async:!1,_parse(h,m){if(!Array.isArray(h)||!o&&n.length!==h.length||o&&n.length>h.length)return de(m,"type","tuple",u||"Invalid type",h);let f,p=[];for(let v=0;v<n.length;v++){let b=h[v],I=n[v]._parse(b,m);if(I.issues){let F={schema:"tuple",input:h,key:v,value:b};for(let w of I.issues)w.path?w.path.unshift(F):w.path=[F],f?.push(w);if(f||(f=I.issues),m?.abortEarly)break}else p[v]=I.output;}if(o)for(let v=n.length;v<h.length;v++){let b=h[v],I=o._parse(b,m);if(I.issues){let F={schema:"tuple",input:h,key:v,value:b};for(let w of I.issues)w.path?w.path.unshift(F):w.path=[F],f?.push(w);if(f||(f=I.issues),m?.abortEarly)break}else p[v]=I.output;}return f?{issues:f}:xe(p,c,m,"tuple")}}}function Ft(n,e){return {schema:"union",union:n,async:!1,_parse(t,a){let o,u;for(let c of n){let h=c._parse(t,a);if(h.issues)if(o)for(let m of h.issues)o.push(m);else o=h.issues;else {u=[h.output];break}}return u?{output:u[0]}:de(a,"type","union",e||"Invalid type",t,o)}}}function qe(n,e,t){let[a,o]=ce(e,t);return Q(n.reduce((u,c)=>({...u,...c.object}),{}),a,o)}function Qr(n,e,t,a){let[o,u]=ce(t,a);return Q(Object.entries(n.object).reduce((c,[h,m])=>e.includes(h)?c:{...c,[h]:m},{}),o,u)}function en(n,e,t){let a=n._parse(e,t);return a.issues?{success:!1,error:new va(a.issues),issues:a.issues}:{success:!0,data:a.output,output:a.output}}function St(n,e){return t=>t>n?{issue:{validation:"max_value",message:e||"Invalid value",input:t}}:{output:t}}function xt(n,e){return t=>t<n?{issue:{validation:"min_value",message:e||"Invalid value",input:t}}:{output:t}}var Aa=Object.create,Yt=Object.defineProperty,Ia=Object.getOwnPropertyDescriptor,on=Object.getOwnPropertyNames,Ea=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty,Fa=(n,e,t)=>e in n?Yt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,nt=(n,e)=>function(){return e||(0, n[on(n)[0]])((e={exports:{}}).exports,e),e.exports},Sa=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of on(e))!Ta.call(n,o)&&o!==t&&Yt(n,o,{get:()=>e[o],enumerable:!(a=Ia(e,o))||a.enumerable});return n},xa=(n,e,t)=>(t=n!=null?Aa(Ea(n)):{},Sa(e||!n||!n.__esModule?Yt(t,"default",{value:n,enumerable:!0}):t,n)),Ca=(n,e,t)=>(Fa(n,typeof e!="symbol"?e+"":e,t),t),Pa=nt({"../../node_modules/.pnpm/@rgba-image+copy@0.1.3/node_modules/@rgba-image/copy/dist/index.js"(n){Object.defineProperty(n,"__esModule",{value:!0}),n.copy=void 0;var e=(t,a,o=0,u=0,c=t.width-o,h=t.height-u,m=0,f=0)=>{if(o=o|0,u=u|0,c=c|0,h=h|0,m=m|0,f=f|0,c<=0||h<=0)return;let p=new Uint32Array(t.data.buffer),v=new Uint32Array(a.data.buffer);for(let b=0;b<h;b++){let I=u+b;if(I<0||I>=t.height)continue;let F=f+b;if(!(F<0||F>=a.height))for(let w=0;w<c;w++){let S=o+w;if(S<0||S>=t.width)continue;let T=m+w;if(T<0||T>=a.width)continue;let C=I*t.width+S,D=F*a.width+T;v[D]=p[C];}}};n.copy=e;}}),Da=nt({"../../node_modules/.pnpm/@rgba-image+create-image@0.1.1/node_modules/@rgba-image/create-image/dist/index.js"(n){Object.defineProperty(n,"__esModule",{value:!0}),n.CreateImageFactory=(e=[0,0,0,0],t=4)=>{if(t=Math.floor(t),isNaN(t)||t<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in e)||e.length<t)throw TypeError(`fill should be iterable with at least ${t} members`);e=new Uint8ClampedArray(e).slice(0,t);let a=e.every(u=>u===0);return (u,c,h)=>{if(u===void 0||c===void 0)throw TypeError("Not enough arguments");if(u=Math.floor(u),c=Math.floor(c),isNaN(u)||u<1||isNaN(c)||c<1)throw TypeError("Index or size is negative or greater than the allowed amount");let m=u*c*t;if(h===void 0&&(h=new Uint8ClampedArray(m)),h instanceof Uint8ClampedArray){if(h.length!==m)throw TypeError("Index or size is negative or greater than the allowed amount");if(!a)for(let f=0;f<c;f++)for(let p=0;p<u;p++){let v=(f*u+p)*t;for(let b=0;b<t;b++)h[v+b]=e[b];}return {get width(){return u},get height(){return c},get data(){return h}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},n.createImage=n.CreateImageFactory();}}),Ma=nt({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/filters.js"(n){Object.defineProperty(n,"__esModule",{value:!0}),n.filters=void 0;var e=14,t=(u,c)=>{if(u<=-c||u>=c||u==0)return 0;let h=u*Math.PI;return Math.sin(h)/h*Math.sin(h/c)/(h/c)},a=u=>Math.round(u*((1<<e)-1)),o=(u,c,h,m,f)=>{let p=f?2:3,v=1/h,b=Math.min(1,h),I=p/b,F=Math.floor((I+1)*2),w=new Int16Array((F+2)*c),S=0;for(let T=0;T<c;T++){let C=(T+.5)*v+m,D=Math.max(0,Math.floor(C-I)),G=Math.min(u-1,Math.ceil(C+I)),Z=G-D+1,fe=new Float32Array(Z),X=new Int16Array(Z),L=0,N=0;for(let q=D;q<=G;q++){let te=t((q+.5-C)*b,p);L+=te,fe[N]=te,N++;}let U=0;for(let q=0;q<fe.length;q++){let te=fe[q]/L;U+=te,X[q]=a(te);}X[c>>1]+=a(1-U);let R=0;for(;R<X.length&&X[R]===0;)R++;let k=X.length-1;for(;k>0&&X[k]===0;)k--;let ze=D+R,ye=k-R+1;w[S++]=ze,w[S++]=ye,w.set(X.subarray(R,k+1),S),S+=ye;}return w};n.filters=o;}}),$a=nt({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/convolve.js"(n){Object.defineProperty(n,"__esModule",{value:!0}),n.convolve=void 0;var e=14,t=(a,o,u,c,h,m)=>{let f=0,p=0;for(let v=0;v<c;v++){let b=0;for(let I=0;I<h;I++){let F=m[b++],w=f+F*4|0,S=0,T=0,C=0,D=0;for(let G=m[b++];G>0;G--){let Z=m[b++];S=S+Z*a[w]|0,T=T+Z*a[w+1]|0,C=C+Z*a[w+2]|0,D=D+Z*a[w+3]|0,w=w+4|0;}o[p]=S+8192>>e,o[p+1]=T+8192>>e,o[p+2]=C+8192>>e,o[p+3]=D+8192>>e,p=p+c*4|0;}p=(v+1)*4|0,f=(v+1)*u*4|0;}};n.convolve=t;}}),Oa=nt({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/index.js"(n){Object.defineProperty(n,"__esModule",{value:!0}),n.lanczos2=n.lanczos=void 0;var e=Pa(),t=Da(),a=Ma(),o=$a(),u=(m,f,p=!1)=>{let v=f.width/m.width,b=f.height/m.height,I=a.filters(m.width,f.width,v,0,p),F=a.filters(m.height,f.height,b,0,p),w=new Uint8ClampedArray(f.width*m.height*4);o.convolve(m.data,w,m.width,m.height,f.width,I),o.convolve(w,f.data,m.height,f.width,f.height,F);},c=(m,f,p=0,v=0,b=m.width-p,I=m.height-v,F=0,w=0,S=f.width-F,T=f.height-w)=>{if(p=p|0,v=v|0,b=b|0,I=I|0,F=F|0,w=w|0,S=S|0,T=T|0,b<=0||I<=0||S<=0||T<=0)return;if(p===0&&v===0&&b===m.width&&I===m.height&&F===0&&w===0&&S===f.width&&T===f.height){u(m,f);return}let C=t.createImage(b,I),D=t.createImage(S,T);e.copy(m,C,p,v),u(C,D),e.copy(D,f,0,0,D.width,D.height,F,w);};n.lanczos=c;var h=(m,f,p=0,v=0,b=m.width-p,I=m.height-v,F=0,w=0,S=f.width-F,T=f.height-w)=>{if(p=p|0,v=v|0,b=b|0,I=I|0,F=F|0,w=w|0,S=S|0,T=T|0,b<=0||I<=0||S<=0||T<=0)return;if(p===0&&v===0&&b===m.width&&I===m.height&&F===0&&w===0&&S===f.width&&T===f.height){u(m,f,!0);return}let C=t.createImage(b,I),D=t.createImage(S,T);e.copy(m,C,p,v),u(C,D,!0),e.copy(D,f,0,0,D.width,D.height,F,w);};n.lanczos2=h;}});var un=(n=>(n.Bounce="bounce",n.Normal="normal",n))(un||{}),za=Yr(un),ln=Q({autoplay:z(Tt()),defaultTheme:z(B()),direction:z(Ft([Zt(1),Zt(-1)])),hover:z(Tt()),id:B(),intermission:z(se()),loop:z(Ft([Tt(),se()])),playMode:z(za),speed:z(se()),themeColor:z(B())}),La=Q({animations:Ve(B()),id:B()}),ka=Q({activeAnimationId:z(B()),animations:Ve(ln),author:z(B()),custom:z(Xt(B(),Kr())),description:z(B()),generator:z(B()),keywords:z(B()),revision:z(se()),themes:z(Ve(La)),states:z(Ve(B())),version:z(B())}),Ua=Qr(ln,["id"]),Oe=Q({state:B()}),Ra=Oe,ja=qe([Oe,Q({ms:se()})]),Ba=qe([Oe,Q({count:se()})]),Na=Oe,Va=Oe,qa=Oe,Wa=qe([Oe,Q({threshold:z(Ve(se([xt(0),St(1)])))})]),Ha=Q({onAfter:z(ja),onClick:z(Ra),onComplete:z(qa),onEnter:z(Ba),onMouseEnter:z(Na),onMouseLeave:z(Va),onShow:z(Wa)}),Ja=qe([Ua,Q({playOnScroll:z(Kt([se([xt(0),St(1)]),se([xt(0),St(1)])])),segments:z(Ft([Kt([se(),se()]),B()]))})]);qe([Ha,Q({animationId:z(B()),playbackSettings:Ja})]);var Ka={jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",mpeg:"audio/mpeg",mp3:"audio/mp3"},tn={jpeg:[255,216,255],png:[137,80,78,71,13,10,26,10],gif:[71,73,70],bmp:[66,77],webp:[82,73,70,70,87,69,66,80],svg:[60,63,120],mp3:[73,68,51,3,0,0,0,0],mpeg:[73,68,51,3,0,0,0,0]};var Ya=n=>{let e=null,t=[];if(!n)return null;let a=n.substring(n.indexOf(",")+1);typeof window>"u"?e=Buffer.from(a,"base64").toString("binary"):e=atob(a);let o=new Uint8Array(e.length);for(let u=0;u<e.length;u+=1)o[u]=e.charCodeAt(u);t=Array.from(o.subarray(0,8));for(let u in tn){let c=tn[u];if(c&&t.every((h,m)=>h===c[m]))return Ka[u]}return null};var Qt=class extends Error{constructor(n,e){super(n),Ca(this,"code"),this.name="[dotlottie-js]",this.code=e;}};function cn(n){let e;if(typeof window>"u")e=Buffer.from(n).toString("base64");else {let a=Array.prototype.map.call(n,o=>String.fromCharCode(o)).join("");e=window.btoa(a);}return `data:${Ya(e)};base64,${e}`}function rn(n){return "w"in n&&"h"in n&&!("xt"in n)&&"p"in n}function nn(n){return !("h"in n)&&!("w"in n)&&"p"in n&&"e"in n&&"u"in n&&"id"in n}async function Ct(n,e=()=>!0){if(!(n instanceof Uint8Array))throw new Qt("DotLottie not found","INVALID_DOTLOTTIE");return await new Promise((a,o)=>{Zr(n,{filter:e},(u,c)=>{u&&o(u),a(c);});})}async function Qa(n,e,t){if(!(n instanceof Uint8Array))throw new Qt("DotLottie not found","INVALID_DOTLOTTIE");return (await Ct(n,o=>o.name===e&&(!t||t(o))))[e]}async function er(n){let e="manifest.json",a=(await Ct(n,o=>o.name===e))[e];if(!(typeof a>"u"))return JSON.parse(Et(a,!1))}async function es(n){if(!(n instanceof Uint8Array))return {success:!1,error:"DotLottie not found"};let e=await er(n);if(typeof e>"u")return {success:!1,error:"Invalid .lottie file, manifest.json is missing"};let t=en(ka,e);return t.success?{success:!0}:{success:!1,error:`Invalid .lottie file, manifest.json structure is invalid, ${JSON.stringify(Xr(t.error).nested,null,2)}`}}async function fn(n){let e=new Uint8Array(n),t=await es(e);if(t.error)throw new Qt(t.error,"INVALID_DOTLOTTIE");return e}async function ts(n,e){let t=await Ct(n,o=>{let u=o.name.replace("audio/","");return o.name.startsWith("audio/")&&(!e||e({...o,name:u}))}),a={};for(let o in t){let u=t[o];if(u instanceof Uint8Array){let c=o.replace("audio/","");a[c]=cn(u);}}return a}async function rs(n,e){let t=new Map;for(let[o,u]of Object.entries(e))for(let c of u.assets||[])if(nn(c)){let h=c.p;t.has(h)||t.set(h,new Set),t.get(h)?.add(o);}let a=await ts(n,o=>t.has(o.name));for(let[o,u]of t){let c=a[o];if(c)for(let h of u){let m=e[h];for(let f of m?.assets||[])nn(f)&&f.p===o&&(f.p=c,f.u="",f.e=1);}}}async function ns(n,e){let t=await Ct(n,o=>{let u=o.name.replace("images/","");return o.name.startsWith("images/")&&(!e||e({...o,name:u}))}),a={};for(let o in t){let u=t[o];if(u instanceof Uint8Array){let c=o.replace("images/","");a[c]=cn(u);}}return a}async function is(n,e){let t=new Map;for(let[o,u]of Object.entries(e))for(let c of u.assets||[])if(rn(c)){let h=c.p;t.has(h)||t.set(h,new Set),t.get(h)?.add(o);}let a=await ns(n,o=>t.has(o.name));for(let[o,u]of t){let c=a[o];if(c)for(let h of u){let m=e[h];for(let f of m?.assets||[])rn(f)&&f.p===o&&(f.p=c,f.u="",f.e=1);}}}async function hn(n,e,{inlineAssets:t}={},a){let o=`animations/${e}.json`,u=await Qa(n,o,a);if(typeof u>"u")return;let c=JSON.parse(Et(u,!1));if(!t)return c;let h={[e]:c};return await is(n,h),await rs(n,h),c}xa(Oa());async function tr(n){let e=await fn(n),t=await er(e),a=t?.activeAnimationId||t?.animations[0]?.id||"";if(!a)throw new Error("Unable to determine the active animation ID from the .lottie manifest.");let o=await hn(e,a,{inlineAssets:!0});return JSON.stringify(o)}async function dn(n){try{let e=await fetch(n);if(!e.ok)throw new Error(`Failed to fetch the animation data from URL: ${n}. ${e.status}: ${e.statusText}`);let t=e.headers.get("content-type"),a;if(t?.includes("application/json"))a=await e.text();else {let o=await e.arrayBuffer();a=await tr(o);}return a}catch(e){throw new Error(`Failed to load animation data from URL: ${n}. ${e}`)}}function Es(n){return /^#([\da-f]{6}|[\da-f]{8})$/iu.test(n)}function pn(n){if(!Es(n))return 0;let e=n.replace("#","");return e=e.length===6?`${e}ff`:e,parseInt(e,16)}var mn=class{constructor(e){P(this,"_canvas");P(this,"_context");P(this,"_eventManager",new gt);P(this,"_renderer",null);P(this,"_beginTime",0);P(this,"_elapsedTime",0);P(this,"_totalFrames",0);P(this,"_loop",!1);P(this,"_speed",1);P(this,"_currentFrame",0);P(this,"_duration",0);P(this,"_loopCount",0);P(this,"_autoplay",!1);P(this,"_mode","forward");P(this,"_direction",1);P(this,"_bounceCount",0);P(this,"_animationFrameId",null);P(this,"_segments",null);P(this,"_playbackState","stopped");P(this,"_backgroundColor",vt);P(this,"_renderConfig",{});P(this,"_isFrozen",!1);P(this,"_animationFrameManager",new yt);if(this._animationLoop=this._animationLoop.bind(this),this._canvas=e.canvas,this._context=this._canvas.getContext("2d"),!this._context)throw new Error("2D context not supported or canvas already initialized with another context type.");this._loop=e.loop??!1,this._speed=e.speed??1,this._autoplay=e.autoplay??!1,this._mode=e.mode??"forward",this._segments=e.segments??null,this._backgroundColor=e.backgroundColor??vt,this._renderConfig=e.renderConfig??{},Me.load().then(t=>{this._renderer=new t.Renderer,this.setBackgroundColor(this._backgroundColor),e.src?this._loadAnimationFromURL(e.src):e.data&&this._initializeAnimationFromData(e.data);}).catch(t=>{this._eventManager.dispatch({type:"loadError",error:t});});}get autoplay(){return this._autoplay}get backgroundColor(){return this._backgroundColor}get direction(){return this._direction}get currentFrame(){return this._currentFrame}get duration(){return this._duration}get totalFrames(){return this._totalFrames}get loop(){return this._loop}get speed(){return this._speed}get loopCount(){return this._loopCount}get segments(){return this._segments}get isPlaying(){return this._playbackState==="playing"}get isPaused(){return this._playbackState==="paused"}get isStopped(){return this._playbackState==="stopped"}get isFrozen(){return this._isFrozen}_loadAnimationFromURL(e){dn(e).then(t=>{this._initializeAnimationFromData(t);}).catch(t=>{this._eventManager.dispatch({type:"loadError",error:t});});}_initializeAnimationFromData(e){let t=a=>{try{this._renderer?.load(a,this._canvas.width,this._canvas.height)?(this._setupAnimationDetails(),this._eventManager.dispatch({type:"load"}),this.resize(),this._autoplay?this.play():(this._currentFrame=this._mode.includes("reverse")?this._getEffectiveEndFrame():this._getEffectiveStartFrame(),this.setFrame(this._currentFrame))):this._eventManager.dispatch({type:"loadError",error:new Error("Error encountered while initializing animation from data.")});}catch(o){this._eventManager.dispatch({type:"loadError",error:o});}};typeof e=="string"?t(e):e instanceof ArrayBuffer?tr(e).then(t).catch(a=>{this._eventManager.dispatch({type:"loadError",error:a});}):console.error("Unsupported data type for animation data. Expected a string or ArrayBuffer.");}_setupAnimationDetails(){this._renderer&&(this._totalFrames=this._renderer.totalFrames(),this._duration=this._renderer.duration(),this._segments=[Math.max(0,this._segments?.[0]??0),Math.min(this._totalFrames-1,this.segments?.[1]??this._totalFrames-1)]);}_render(){if(!this._context||!this._renderer)return;let e=this._canvas.width,t=this._canvas.height;if(this._renderer.resize(e,t),this._renderer.update()){let a=this._renderer.render();if(a.length===0){console.warn("Empty buffer received from renderer.");return}let o=new Uint8ClampedArray(a),u=this._context.createImageData(e,t);u.data.set(o),this._context.putImageData(u,0,0);}}_update(){if(this._duration===0||this._totalFrames===0)return !1;let e=this._getEffectiveStartFrame(),t=this._getEffectiveEndFrame(),o=this._getEffectiveDuration()/(t-e);this._elapsedTime=(Date.now()/Se-this._beginTime)*this._speed;let u=this._elapsedTime/o;this._mode==="forward"||this._mode==="reverse"?this._currentFrame=this._mode==="forward"?e+u:t-u:this._direction===1?(this._currentFrame=e+u,this._currentFrame>=t&&(this._currentFrame=t,this._direction=-1,this._beginTime=Date.now()/Se)):(this._currentFrame=t-u,this._currentFrame<=e&&(this._currentFrame=e,this._direction=1,this._beginTime=Date.now()/Se)),this._currentFrame=Math.max(e,Math.min(this._currentFrame,t));let c=!1;return this._renderer?.frame(this._currentFrame)&&(this._eventManager.dispatch({type:"frame",currentFrame:this._currentFrame}),c=!0),this._mode==="forward"||this._mode==="reverse"?(this._currentFrame>=t||this._currentFrame<=e)&&this._handleLoopOrCompletion():(this._currentFrame<=e||this._currentFrame>=t)&&(this._bounceCount+=1,this._bounceCount%2===0&&(this._bounceCount=0,this._handleLoopOrCompletion())),c}_handleLoopOrCompletion(){this._loop?(this._loopCount+=1,this._eventManager.dispatch({type:"loop",loopCount:this._loopCount}),this._beginTime=Date.now()/Se):(this._playbackState="stopped",this._eventManager.dispatch({type:"complete"}));}_animationLoop(){this.isPlaying&&this._update()&&(this._render(),this._animationFrameId=this._animationFrameManager.requestAnimationFrame(this._animationLoop));}_stopAnimationLoop(){this._animationFrameId&&(this._animationFrameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null);}_startAnimationLoop(){this._animationFrameId||(this._animationFrameId=this._animationFrameManager.requestAnimationFrame(this._animationLoop));}_getEffectiveStartFrame(){return this._segments?this._segments[0]:0}_getEffectiveEndFrame(){return this._segments?this._segments[1]:this._totalFrames-1}_getEffectiveTotalFrames(){return this._segments?this._segments[1]-this._segments[0]:this._totalFrames}_getEffectiveDuration(){return this._segments?this._duration*((this._segments[1]-this._segments[0])/this._totalFrames):this._duration}_synchronizeAnimationTiming(e){let t=this._getEffectiveDuration(),a=this._getEffectiveTotalFrames(),o=t/a,u=(e-this._getEffectiveStartFrame())*o;this._direction===-1&&(u=t-u),this._beginTime=Date.now()/Se-u/this._speed;}play(){if(this._totalFrames===0){console.error("Animation is not loaded yet.");return}let e=this._getEffectiveStartFrame(),t=this._getEffectiveEndFrame();this._playbackState!=="paused"?(this._currentFrame=this._mode==="reverse"||this._mode==="bounce-reverse"?t:e,this._beginTime=Date.now()/Se):this._synchronizeAnimationTiming(this._currentFrame),this.isPlaying||(this._playbackState="playing",this._eventManager.dispatch({type:"play"}),this._isFrozen=!1,this._animationFrameId=this._animationFrameManager.requestAnimationFrame(this._animationLoop));}stop(){this.isStopped||(this._stopAnimationLoop(),this._playbackState="stopped",this._bounceCount=0,this._mode==="reverse"||this._mode==="bounce-reverse"?(this._currentFrame=this._getEffectiveEndFrame(),this._direction=-1):(this._currentFrame=this._getEffectiveStartFrame(),this._direction=1),this.setFrame(this._currentFrame),this._render(),this._eventManager.dispatch({type:"stop"}));}pause(){this.isPaused||(this._stopAnimationLoop(),this._playbackState="paused",this._eventManager.dispatch({type:"pause"}));}setSpeed(e){if(e<=0){console.error("Speed must be a positive number.");return}if(this._speed!==e){if(this.isPlaying){let t=Date.now()/Se;this._beginTime=t-this._elapsedTime/e;}this._speed=e;}}setLoop(e){this._loop=e;}setFrame(e){let t=this._getEffectiveStartFrame(),a=this._getEffectiveEndFrame();if(e<t||e>a){console.error(`Invalid frame number: ${e}. It should be between ${t} and ${a}.`);return}this._currentFrame=e,this.isPlaying&&this._synchronizeAnimationTiming(e),this._renderer?.frame(this._currentFrame)&&(this._render(),this._eventManager.dispatch({type:"frame",currentFrame:this._currentFrame}));}setMode(e){this._mode!==e&&(this._mode=e,this._bounceCount=0,this._direction=e.includes("reverse")?-1:1,this.isPlaying&&this._synchronizeAnimationTiming(this._currentFrame));}load(e){if(!this._renderer||!this._context)return;if(!e.src&&!e.data){console.error('Either "src" or "data" must be provided.');return}this._stopAnimationLoop(),this._playbackState="stopped",this._loop=e.loop??!1,this._speed=e.speed??1,this._autoplay=e.autoplay??!1,this._mode=e.mode??"forward",this._segments=e.segments??null,this._loopCount=0,this._bounceCount=0,this._direction=this._mode.includes("reverse")?-1:1,this._renderConfig=e.renderConfig??{};let t=this._getEffectiveStartFrame(),a=this._getEffectiveEndFrame();this._currentFrame=this._mode==="reverse"||this._mode==="bounce-reverse"?a:t,this._beginTime=0,this._totalFrames=0,this._duration=0,this._backgroundColor=e.backgroundColor??vt,this.setBackgroundColor(this._backgroundColor),this._context.clearRect(0,0,this._canvas.width,this._canvas.height),e.src?this._loadAnimationFromURL(e.src):e.data&&this._initializeAnimationFromData(e.data);}setSegments(e,t){if(!this._renderer){console.error("Animation not initialized.");return}if(e<0||t>=this._totalFrames||e>t){console.error("Invalid frame range.");return}this._segments=[e,t],(this._currentFrame<e||this._currentFrame>t)&&(this._currentFrame=this._direction===1?e:t,this._renderer.frame(this._currentFrame)&&(this._render(),this._eventManager.dispatch({type:"frame",currentFrame:this._currentFrame}))),this.isPlaying&&this._synchronizeAnimationTiming(this._currentFrame);}addEventListener(e,t){this._eventManager.addEventListener(e,t);}removeEventListener(e,t){this._eventManager.removeEventListener(e,t);}static setWasmUrl(e){Me.setWasmUrl(e);}destroy(){this._stopAnimationLoop(),this._playbackState="stopped",this._context=null,this._renderer=null,this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners();}freeze(){this._isFrozen||(this._stopAnimationLoop(),this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}));}unfreeze(){this.isFrozen&&(this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}),this.isPlaying&&(this._synchronizeAnimationTiming(this._currentFrame),this._startAnimationLoop()));}setBackgroundColor(e){this._backgroundColor=e;let t=pn(e);this._renderer?.setBgColor(t);}resize(){if(!mt)return;let{height:e,width:t}=this._canvas.getBoundingClientRect(),a=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1;this._canvas.width=t*a,this._canvas.height=e*a,this._render();}};
3
+
4
+ export { mn as DotLottie };
5
5
  //# sourceMappingURL=out.js.map
6
6
  //# sourceMappingURL=dotlottie.js.map