PageSourceSearch

https://www.slikk.club/_next/static/chunks/4d3f3674.29079db872c4cfb0.js

js slikk.club collected 2026-10-01 14:19:16 UTC 164,588 bytes, 5 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5085],{97848:function(t,e,n){let r;function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e,n){var r;return(r=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==i(r)?r:r+"")in t)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{J:function(){return Q},P:function(){return tl}});var a=class{requestAnimationFrame(t){return requestAnimationFrame(t)}cancelAnimationFrame(t){cancelAnimationFrame(t)}},o=class{constructor(){s(this,"_lastHandleId",0),s(this,"_lastImmediate",null)}requestAnimationFrame(t){return this._lastHandleId>=9007199254740992-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{t(performance.now())}),this._lastHandleId}cancelAnimationFrame(t){this._lastImmediate&&clearImmediate(this._lastImmediate)}},_=class{constructor(){s(this,"_strategy",void 0),this._strategy="function"==typeof requestAnimationFrame?new a:new o}requestAnimationFrame(t){return this._strategy.requestAnimationFrame(t)}cancelAnimationFrame(t){this._strategy.cancelAnimationFrame(t)}};let d="u">typeof window&&void 0!==window.document,l=new Uint8Array([80,75,3,4]),h=["v","ip","op","layers","fr","w","h"],c=Array(128).fill(void 0);c.push(void 0,null,!0,!1);let u=c.length;function p(t){u===c.length&&c.push(c.length+1);let e=u;return u=c[e],c[e]=t,e}function g(t,e){try{return t.apply(this,e)}catch(t){r.__wbindgen_export_0(p(t))}}function m(t){return null==t}let w="u">typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"u">typeof TextDecoder&&w.decode();let f=null;function b(){return(null===f||0===f.byteLength)&&(f=new Uint8Array(r.memory.buffer)),f}function v(t,e){return t>>>=0,w.decode(b().subarray(t,t+e))}let y=0,L="u">typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},C="function"==typeof L.encodeInto?function(t,e){return L.encodeInto(t,e)}:function(t,e){let n=L.encode(t);return e.set(n),{read:t.length,written:n.length}};function I(t,e,n){if(void 0===n){let n=L.encode(t),r=e(n.length,1)>>>0;return b().subarray(r,r+n.length).set(n),y=n.length,r}let r=t.length,i=e(r,1)>>>0,s=b(),a=0;for(;a<r;a++){let e=t.charCodeAt(a);if(e>127)break;s[i+a]=e}if(a!==r){0!==a&&(t=t.slice(a)),i=n(i,r,r=a+3*t.length,1)>>>0;let e=C(t,b().subarray(i+a,i+r));a+=e.written,i=n(i,r,a,1)>>>0}return y=a,i}let M=null;function S(){return(null===M||!0===M.buffer.detached||void 0===M.buffer.detached&&M.buffer!==r.memory.buffer)&&(M=new DataView(r.memory.buffer)),M}function E(t,e){let n=e(1*t.length,1)>>>0;return b().set(t,n/1),y=t.length,n}function x(t){let e=c[t];return t<132||(c[t]=u,u=t),e}let k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{r.__wbindgen_export_4.get(t.dtor)(t.a,t.b)}),P=null,O=Object.freeze({Forward:0,0:"Forward",Reverse:1,1:"Reverse",Bounce:2,2:"Bounce",ReverseBounce:3,3:"ReverseBounce"}),A=Object.freeze({Idle:0,0:"Idle",Playing:1,1:"Playing",Paused:2,2:"Paused",Stopped:3,3:"Stopped",Tweening:4,4:"Tweening"}),F=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>r.__wbg_dotlottieplayerwasm_free(t>>>0,1));var R=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),t}free(){let t=this.__destroy_into_raw();r.__wbg_dotlottieplayerwasm_free(t,0)}clear_slot(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,e,n)}layout_fit(){let t,e;try{let s=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_layout_fit(s,this.__wbg_ptr);var n=S().getInt32(s+0,!0),i=S().getInt32(s+4,!0);return t=n,e=i,v(n,i)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export_3(t,e,1)}}loop_count(){return r.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return x(r.dotlottieplayerwasm_poll_event(this.__wbg_ptr))}reset_slot(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,e,n)}set_layout(t,e,n){let i=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),s=y;return 0!==r.dotlottieplayerwasm_set_layout(this.__wbg_ptr,i,s,e,n)}set_marker(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;r.dotlottieplayerwasm_set_marker(this.__wbg_ptr,e,n)}clear_slots(){return 0!==r.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)}is_complete(){return 0!==r.dotlottieplayerwasm_is_complete(this.__wbg_ptr)}reset_slots(){return 0!==r.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)}reset_theme(){return 0!==r.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)}segment_end(){return r.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(t){return 0!==r.dotlottieplayerwasm_set_quality(this.__wbg_ptr,t)}set_segment(t,e){return 0!==r.dotlottieplayerwasm_set_segment(this.__wbg_ptr,t,e)}sm_set_seed(t){return 0!==r.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,t)}static unload_font(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_unload_font(e,n)}animation_id(){try{let n,i=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_animation_id(i,this.__wbg_ptr);var t=S().getInt32(i+0,!0),e=S().getInt32(i+4,!0);return 0!==t&&(n=v(t,e).slice(),r.__wbindgen_export_3(t,1*e,1)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}audio_volume(){return r.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return r.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return r.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return r.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return r.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){r.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){r.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return x(r.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr))}get_slot_str(t){try{let i,s=r.__wbindgen_add_to_stack_pointer(-16),a=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),o=y;r.dotlottieplayerwasm_get_slot_str(s,this.__wbg_ptr,a,o);var e=S().getInt32(s+0,!0),n=S().getInt32(s+4,!0);return 0!==e&&(i=v(e,n).slice(),r.__wbindgen_export_3(e,1*n,1)),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}marker_names(){return x(r.dotlottieplayerwasm_marker_names(this.__wbg_ptr))}set_autoplay(t){r.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,t)}set_slot_str(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y,s=I(e,r.__wbindgen_export_1,r.__wbindgen_export_2),a=y;return 0!==r.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,i,s,a)}set_viewport(t,e,n,i){return 0!==r.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,t,e,n,i)}total_frames(){return r.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return 0!==r.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)}current_frame(){return r.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(t){try{let i,s=r.__wbindgen_add_to_stack_pointer(-16),a=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),o=y;r.dotlottieplayerwasm_get_slot_type(s,this.__wbg_ptr,a,o);var e=S().getInt32(s+0,!0),n=S().getInt32(s+4,!0);return 0!==e&&(i=v(e,n).slice(),r.__wbindgen_export_3(e,1*n,1)),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}get_slots_str(){let t,e;try{let s=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_get_slots_str(s,this.__wbg_ptr);var n=S().getInt32(s+0,!0),i=S().getInt32(s+4,!0);return t=n,e=i,v(n,i)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export_3(t,e,1)}}get_transform(){return x(r.dotlottieplayerwasm_get_transform(this.__wbg_ptr))}segment_start(){return r.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,e,n)}set_text_slot(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y,s=I(e,r.__wbindgen_export_1,r.__wbindgen_export_2),a=y;return 0!==r.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,i,s,a)}set_transform(t){let e;let n=(e=(0,r.__wbindgen_export_1)(4*t.length,4)>>>
10,((null===P||0===P.byteLength)&&(P=new Float32Array(r.memory.buffer)),P).set(t,e/4),y=t.length,e),i=y;return 0!==r.dotlottieplayerwasm_set_transform(this.__wbg_ptr,n,i)}sm_get_inputs(){return x(r.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr))}sm_poll_event(){return x(r.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr))}sm_post_click(t,e){r.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,t,e)}animation_size(){return x(r.dotlottieplayerwasm_animation_size(this.__wbg_ptr))}current_marker(){try{let n,i=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_current_marker(i,this.__wbg_ptr);var t=S().getInt32(i+0,!0),e=S().getInt32(i+4,!0);return 0!==t&&(n=v(t,e).slice(),r.__wbindgen_export_3(t,1*e,1)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}layout_align_x(){return r.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return r.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_load_animation(this.__wbg_ptr,e,n)}loop_animation(){return 0!==r.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)}set_background(t,e,n,i){return 0!==r.dotlottieplayerwasm_set_background(this.__wbg_ptr,t,e,n,i)}set_color_slot(t,e,n,i){let s=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),a=y;return 0!==r.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,s,a,e,n,i)}set_image_slot(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y,s=I(e,r.__wbindgen_export_1,r.__wbindgen_export_2),a=y;return 0!==r.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,n,i,s,a)}set_loop_count(t){r.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,t)}set_theme_data(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,e,n)}sm_reset_input(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;r.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,e,n)}manifest_string(){let t,e;try{let s=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_manifest_string(s,this.__wbg_ptr);var n=S().getInt32(s+0,!0),i=S().getInt32(s+4,!0);return t=n,e=i,v(n,i)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export_3(t,e,1)}}set_scalar_slot(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y;return 0!==r.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,i,e)}set_vector_slot(t,e,n){let i=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),s=y;return 0!==r.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,i,s,e,n)}setup_sw_target(t,e){return 0!==r.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,t,e)}get_pixel_buffer(){return x(r.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr))}set_audio_volume(t){r.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,t)}sm_current_state(){let t,e;try{let s=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_sm_current_state(s,this.__wbg_ptr);var n=S().getInt32(s+0,!0),i=S().getInt32(s+4,!0);return t=n,e=i,v(n,i)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export_3(t,e,1)}}state_machine_id(){try{let n,i=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_state_machine_id(i,this.__wbg_ptr);var t=S().getInt32(i+0,!0),e=S().getInt32(i+4,!0);return 0!==t&&(n=v(t,e).slice(),r.__wbindgen_export_3(t,1*e,1)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}get_state_machine(t){try{let i,s=r.__wbindgen_add_to_stack_pointer(-16),a=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),o=y;r.dotlottieplayerwasm_get_state_machine(s,this.__wbg_ptr,a,o);var e=S().getInt32(s+0,!0),n=S().getInt32(s+4,!0);return 0!==e&&(i=v(e,n).slice(),r.__wbindgen_export_3(e,1*n,1)),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}set_position_slot(t,e,n){let i=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),s=y;return 0!==r.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,i,s,e,n)}current_loop_count(){return r.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}set_asset_resolver(t){r.dotlottieplayerwasm_set_asset_resolver(this.__wbg_ptr,m(t)?0:p(t))}sm_framework_setup(){return x(r.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr))}sm_post_pointer_up(t,e){r.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,t,e)}state_machine_load(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,e,n)}load_dotlottie_data(t){let e=E(t,r.__wbindgen_export_1),n=y;return 0!==r.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,e,n)}sm_get_string_input(t){try{let i,s=r.__wbindgen_add_to_stack_pointer(-16),a=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),o=y;r.dotlottieplayerwasm_sm_get_string_input(s,this.__wbg_ptr,a,o);var e=S().getInt32(s+0,!0),n=S().getInt32(s+4,!0);return 0!==e&&(i=v(e,n).slice(),r.__wbindgen_export_3(e,1*n,1)),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}sm_set_string_input(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y,s=I(e,r.__wbindgen_export_1,r.__wbindgen_export_2),a=y;return 0!==r.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,i,s,a)}sm_get_boolean_input(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y,i=r.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,e,n);return 16777215===i?void 0:0!==i}sm_get_numeric_input(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y,i=r.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,e,n);return 4294967297===i?void 0:i}sm_post_pointer_down(t,e){r.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,t,e)}sm_post_pointer_exit(t,e){r.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,t,e)}sm_post_pointer_move(t,e){r.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,t,e)}sm_set_boolean_input(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y;return 0!==r.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,i,e)}sm_set_numeric_input(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y;return 0!==r.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,i,e)}state_machine_unload(){r.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(t,e){r.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,t,e)}load_animation_from_id(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,e,n)}sm_poll_internal_event(){return x(r.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr))}use_frame_interpolation(){return 0!==r.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)}reset_current_loop_count(){r.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y;return 0!==r.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,i,e)}state_machine_load_from_id(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,e,n)}set_use_frame_interpolation(t){r.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,t)}constructor(){let t=r.dotlottieplayerwasm_new();return this.__wbg_ptr=t>>>0,F.register(this,this.__wbg_ptr,this),this}mode(){return r.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return 0!==r.dotlottieplayerwasm_play(this.__wbg_ptr)}stop(){return 0!==r.dotlottieplayerwasm_stop(this.__wbg_ptr)}tick(t){return 0!==r.dotlottieplayerwasm_tick(this.__wbg_ptr,t)}pause(){return 0!==r.dotlottieplayerwasm_pause(this.__wbg_ptr)}speed(){return r.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return r.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return r.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return 0!==r.dotlottieplayerwasm_render(this.__wbg_ptr)}status(){return r.dotlottieplayerwasm_status(this.__wbg_ptr)}markers(){return x(r.dotlottieplayerwasm_markers(this.__wbg_ptr))}sm_fire(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,e,n)}sm_stop(){return 0!==r.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)}sm_tick(t){return 0!==r.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,t)}autoplay(){return 0!==r.dotlottieplayerwasm_autoplay(this.__wbg_ptr)}duration(){return r.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(t){r.dotlottieplayerwasm_set_loop(this.__wbg_ptr,t)}set_mode(t){r.dotlottieplayerwasm_set_mode(this.__wbg_ptr,t)}sm_start(t,e){let n=function(t,e){let n=e(4*t.length,4)>>>0,r=S();for(let e=0;e<t.length;e++)r.setUint32(n+4*e,p(t[e]),!0);return y=t.length,n}(e,r.__wbindgen_export_1),i=y;return 0!==r.dotlottieplayerwasm_sm_start(this.__wbg_ptr,t,n,i)}theme_id(){try{let n,i=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_theme_id(i,this.__wbg_ptr);var t=S().getInt32(i+0,!0),e=S().getInt32(i+4,!0);return 0!==t&&(n=v(t,e).slice(),r.__wbindgen_export_3(t,1*e,1)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}load_font(t,e){let n=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y,s=E(e,r.__wbindgen_export_1),a=y;return 0!==r.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,i,s,a)}set_frame(t){return 0!==r.dotlottieplayerwasm_set_frame(this.__wbg_ptr,t)}set_speed(t){r.dotlottieplayerwasm_set_speed(this.__wbg_ptr,t)}set_theme(t){let e=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),n=y;return 0!==r.dotlottieplayerwasm_set_theme(this.__wbg_ptr,e,n)}sm_status(){let t,e;try{let s=r.__wbindgen_add_to_stack_pointer(-16);r.dotlottieplayerwasm_sm_status(s,this.__wbg_ptr);var n=S().getInt32(s+0,!0),i=S().getInt32(s+4,!0);return t=n,e=i,v(n,i)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_export_3(t,e,1)}}};async function T(t,e){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,e)}catch(e){if("application/wasm"!=t.headers.get("Content-Type"))console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e);else throw e}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}async function D(t){let e;if(void 0!==r)return r;if(void 0!==t&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===t)throw Error("WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().");let n=((e={}).wbg={},e.wbg.__wbg_appendChild_8204974b7328bf98=function(){return g(function(t,e){return p(c[t].appendChild(c[e]))},arguments)},e.wbg.__wbg_body_942ea927546a04ba=function(t){let e=c[t].body;return m(e)?0:p(e)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return p(c[t].buffer)}
1,e.wbg.__wbg_call_672a4d21634d4a24=function(){return g(function(t,e){return p(c[t].call(c[e]))},arguments)},e.wbg.__wbg_call_7cccdd69e0791ae2=function(){return g(function(t,e,n){return p(c[t].call(c[e],c[n]))},arguments)},e.wbg.__wbg_catch_a6e601879b2610e9=function(t,e){return p(c[t].catch(c[e]))},e.wbg.__wbg_createElement_8c9931a732ee2fea=function(){return g(function(t,e,n){return p(c[t].createElement(v(e,n)))},arguments)},e.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return g(function(t,e){let n=I(URL.createObjectURL(c[e]),r.__wbindgen_export_1,r.__wbindgen_export_2),i=y;S().setInt32(t+4,i,!0),S().setInt32(t+0,n,!0)},arguments)},e.wbg.__wbg_currentTime_7940fe39798a1ca0=function(t){return c[t].currentTime},e.wbg.__wbg_data_d1ed736c1e42b10e=function(t,e){let n=E(c[e].data,r.__wbindgen_export_1),i=y;S().setInt32(t+4,i,!0),S().setInt32(t+0,n,!0)},e.wbg.__wbg_document_d249400bd7bd996d=function(t){let e=c[t].document;return m(e)?0:p(e)},e.wbg.__wbg_drawImage_803dcc46897223c9=function(){return g(function(t,e,n,r){c[t].drawImage(c[e],n,r)},arguments)},e.wbg.__wbg_duration_4d32c501d87796c1=function(t){return c[t].duration},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let n,i;try{n=t,i=e,console.error(v(t,e))}finally{r.__wbindgen_export_3(n,i,1)}},e.wbg.__wbg_getContext_e9cf379449413580=function(){return g(function(t,e,n){let r=c[t].getContext(v(e,n));return m(r)?0:p(r)},arguments)},e.wbg.__wbg_getImageData_c02374a30b126dab=function(){return g(function(t,e,n,r,i){return p(c[t].getImageData(e,n,r,i))},arguments)},e.wbg.__wbg_instanceof_CanvasRenderingContext2d_df82a4d3437bf1cc=function(t){let e;try{e=c[t]instanceof CanvasRenderingContext2D}catch{e=!1}return e},e.wbg.__wbg_instanceof_HtmlCanvasElement_2ea67072a7624ac5=function(t){let e;try{e=c[t]instanceof HTMLCanvasElement}catch{e=!1}return e},e.wbg.__wbg_instanceof_HtmlVideoElement_7f414b32f362e317=function(t){let e;try{e=c[t]instanceof HTMLVideoElement}catch{e=!1}return e},e.wbg.__wbg_instanceof_Window_def73ea0955fc569=function(t){let e;try{e=c[t]instanceof Window}catch{e=!1}return e},e.wbg.__wbg_length_a446193dc22c12f8=function(t){return c[t].length},e.wbg.__wbg_load_2671477a3293aadb=function(t){c[t].load()},e.wbg.__wbg_new_405e22f390576ce2=function(){return p({})},e.wbg.__wbg_new_78feb108b6472713=function(){return p([])},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return p(Error())},e.wbg.__wbg_new_a12002a7f91c75be=function(t){return p(new Uint8Array(c[t]))},e.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return p(Function(v(t,e)))},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,n){return p(new Uint8Array(c[t],e>>>0,n>>>0))},e.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(t){return p(new Float32Array(t>>>0))},e.wbg.__wbg_newwithsrc_20307ca7e8762a81=function(){return g(function(t,e){return p(new Audio(v(t,e)))},arguments)},e.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return g(function(t,e){return p(new Blob(c[t],c[e]))},arguments)},e.wbg.__wbg_pause_b74c96d69f769518=function(){return g(function(t){c[t].pause()},arguments)},e.wbg.__wbg_paused_9b2affc0a8a62e86=function(t){return c[t].paused},e.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return g(function(t){return p(c[t].play())},arguments)},e.wbg.__wbg_push_737cfc8c1432c2c6=function(t,e){return c[t].push(c[e])},e.wbg.__wbg_readyState_017c08aa5e73517e=function(t){return c[t].readyState},e.wbg.__wbg_remove_e2d2659f3128c045=function(t){c[t].remove()},e.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return g(function(t,e){URL.revokeObjectURL(v(t,e))},arguments)},e.wbg.__wbg_seeking_c0427be38e698dcd=function(t){return c[t].seeking},e.wbg.__wbg_setAttribute_2704501201f15687=function(){return g(function(t,e,n,r,i){c[t].setAttribute(v(e,n),v(r,i))},arguments)},e.wbg.__wbg_set_65595bdd868b3009=function(t,e,n){c[t].set(c[e],n>>>0)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return g(function(t,e,n){return Reflect.set(c[t],c[e],c[n])},arguments)},e.wbg.__wbg_setcssText_e018c236104b0233=function(t,e,n){c[t].cssText=v(e,n)},e.wbg.__wbg_setcurrentTime_64727eddd3966512=function(t,e){c[t].currentTime=e},e.wbg.__wbg_setheight_da683a33fa99843c=function(t,e){c[t].height=e>>>0},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(t,e,n){c[t][e>>>0]=n},e.wbg.__wbg_setmuted_e93fc48340c43e67=function(t,e){c[t].muted=0!==e},e.wbg.__wbg_setplaybackRate_f5c3b8896f82425e=function(t,e){c[t].playbackRate=e},e.wbg.__wbg_setpreload_d2fb02758e3f8e3a=function(t,e,n){c[t].preload=v(e,n)},e.wbg.__wbg_setsrc_3a759736e2659904=function(t,e,n){c[t].src=v(e,n)},e.wbg.__wbg_settype_39ed370d3edd403c=function(t,e,n){c[t].type=v(e,n)},e.wbg.__wbg_setvolume_3895e06a030ca4f7=function(t,e){c[t].volume=e},e.wbg.__wbg_setwidth_c5fed9f5e7f0b406=function(t,e){c[t].width=e>>>0},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){let n=I(c[e].stack,r.__wbindgen_export_1,r.__wbindgen_export_2),i=y;S().setInt32(t+4,i,!0),S().setInt32(t+0,n,!0)},e.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let t=typeof global>"u"?null:global;return m(t)?0:p(t)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let t=typeof globalThis>"u"?null:globalThis;return m(t)?0:p(t)},e.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let t=typeof self>"u"?null:self;return m(t)?0:p(t)},e.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let t=typeof window>"u"?null:window;return m(t)?0:p(t)},e.wbg.__wbg_style_fb30c14e5815805c=function(t){return p(c[t].style)},e.wbg.__wbg_videoHeight_3a43327a766c1f03=function(t){return c[t].videoHeight},e.wbg.__wbg_videoWidth_4b400cf6f4744a4d=function(t){return c[t].videoWidth},e.wbg.__wbindgen_cb_drop=function(t){let e=x(t).original;return 1==e.cnt--&&(e.a=0,!0)},e.wbg.__wbindgen_closure_wrapper109=function(t,e,n){let i,s;return p((i={a:t,b:e,cnt:1,dtor:7},(s=(...t)=>{i.cnt++;let e=i.a;i.a=0;try{return function(t,e,n){r.__wbindgen_export_5(t,e,p(n))}(e,i.b,...t)}finally{0==--i.cnt?(r.__wbindgen_export_4.get(i.dtor)(e,i.b),k.unregister(i)):i.a=e}}).original=i,k.register(s,i,i),s))},e.wbg.__wbindgen_is_null=function(t){return null===c[t]},e.wbg.__wbindgen_is_undefined=function(t){return void 0===c[t]},e.wbg.__wbindgen_memory=function(){return p(r.memory)},e.wbg.__wbindgen_number_new=function(t){return p(t)},e.wbg.__wbindgen_object_clone_ref=function(t){return p(c[t])},e.wbg.__wbindgen_object_drop_ref=function(t){x(t)},e.wbg.__wbindgen_string_get=function(t,e){let n=c[e],i="string"==typeof n?n:void 0;var s=m(i)?0:I(i,r.__wbindgen_export_1,r.__wbindgen_export_2),a=y;S().setInt32(t+4,a,!0),S().setInt32(t+0,s,!0)},e.wbg.__wbindgen_string_new=function(t,e){return p(v(t,e))},e.wbg.__wbindgen_throw=function(t,e){throw Error(v(t,e))},e);("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t));let{instance:i,module:s}=await T(await t,n);return r=i.exports,D.__wbindgen_wasm_module=s,M=null,P=null,f=null,r}var z=class{constructor(){s(this,"_eventListeners",new Map)}addEventListener(t,e){let n=this._eventListeners.get(t);n||(n=new Set,this._eventListeners.set(t,n)),n.add(e)}removeEventListener(t,e){let n=this._eventListeners.get(t);n&&(e?(n.delete(e),0===n.size&&this._eventListeners.delete(t)):this._eventListeners.delete(t))}
1dispatch(t){this._eventListeners.get(t.type)?.forEach(e=>e(t))}removeAllEventListeners(){this._eventListeners.clear()}},$=class t{static _initializeObserver(){t._observer||(t._observer=new IntersectionObserver(e=>{e.forEach(e=>{let n=t._observedCanvases.get(e.target);n&&(e.isIntersecting?n.unfreeze():n.freeze())})},{threshold:0}))}static observe(e,n){t._initializeObserver(),t._observedCanvases.has(e)||(t._observedCanvases.set(e,n),t._observer?.observe(e))}static unobserve(e){t._observer?.unobserve(e),t._observedCanvases.delete(e),0===t._observedCanvases.size&&(t._observer?.disconnect(),t._observer=null)}};s($,"_observer",null),s($,"_observedCanvases",new Map);var U=class t{static _initializeObserver(){t._observer||(t._observer=new ResizeObserver(e=>{e.forEach(e=>{let n=t._observedCanvases.get(e.target);if(!n)return;let[r,i]=n;clearTimeout(i);let s=setTimeout(()=>{r.resize()},100);t._observedCanvases.set(e.target,[r,s])})}))}static observe(e,n){t._initializeObserver(),t._observedCanvases.has(e)||(t._observedCanvases.set(e,[n,0]),t._observer?.observe(e))}static unobserve(e){let n=t._observedCanvases.get(e);if(n){let t=n[1];t&&clearTimeout(t)}t._observer?.unobserve(e),t._observedCanvases.delete(e),!t._observedCanvases.size&&t._observer&&(t._observer.disconnect(),t._observer=null)}};function B(t){if(t.byteLength<4)return!1;let e=new Uint8Array(t.slice(0,l.byteLength));for(let t=0;t<l.length;t+=1)if(l[t]!==e[t])return!1;return!0}function W(t){return"string"==typeof t?/^\s*\{/u.test(t)&&/\}\s*$/u.test(t):h.every(e=>Object.hasOwn(t,e))}function N(){return 1+((d?window.devicePixelRatio:1)-1)*.75}function H(t){let e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return!(e.bottom<0||e.top>n||e.right<0||e.left>r)}function G(t){let e=t.target;if(e instanceof HTMLCanvasElement){let n=e.getBoundingClientRect();if(0===n.width||0===n.height||0===e.width||0===e.height)return null;let r=e.width/n.width,i=e.height/n.height,s=(t.clientX-n.left)*r,a=(t.clientY-n.top)*i;return!Number.isFinite(s)||!Number.isFinite(a)||Number.isNaN(s)||Number.isNaN(a)?null:{x:s,y:a}}return null}async function q(t){var e;if(!/^https?:\/\//i.test(t))return t;let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch image slot source from URL: ${t}. ${n.status}: ${n.statusText}`);return e=await n.blob(),new Promise((t,n)=>{let r=new FileReader;r.onerror=()=>n(r.error??Error("Failed to read image slot source")),r.onload=()=>t(r.result),r.readAsDataURL(e)})}function V(t){let e=t.replace("OpenUrl: ",""),n=e.indexOf(" | Target: "),r,i;-1===n?(r=e,i="_blank"):(r=e.substring(0,n),i=e.substring(n+11)),window.open(r,i)}s(U,"_observer",null),s(U,"_observedCanvases",new Map);let j=null;function J(){return j??(j=function(t,e,n){let r=null,i=e,s=n;async function a(e){await t({module_or_path:e})}async function o(e){let n=await fetch(e);if(!n.ok)throw Error(`fetch ${e} responded with ${n.status} ${n.statusText}`);await t({module_or_path:await n.arrayBuffer()})}async function _(t,e){try{return await t(e),null}catch(t){return t}}return{load(){if(!r){let t=i,e=null;r=e=(async()=>{let n=await _(a,t);if(!n)return;console.warn(`Primary WASM load failed from ${t}: ${n.message}`);let i=null;if(null!==s){if(console.warn(`Attempting to load WASM from backup URL: ${s}`),!(i=await _(a,s)))return;console.warn(`Backup WASM load failed from ${s}: ${i.message}`)}console.warn("Retrying WASM load with buffered instantiation");let d=await _(o,t);if(d&&(console.warn(`Buffered WASM load from ${t} failed: ${d.message}`),!(null!==s&&!(d=await _(o,s)))))throw console.error(`Primary WASM URL failed: ${n.message}`),i&&console.error(`Backup WASM URL failed: ${i.message}`),console.error(`Buffered fallback failed: ${d.message}`),r===e&&(r=null),Error("WASM loading failed from all sources.")})()}return r},setWasmUrl(t){if("string"!=typeof t||""===t.trim())throw TypeError("setWasmUrl() expects a non-empty URL string");s=null,t!==i&&(i=t,r=null)}}}(D,"https://cdn.jsdelivr.net/npm/@lottiefiles/[email protected]/dist/dotlottie-player.wasm","https://unpkg.com/@lottiefiles/[email protected]/dist/dotlottie-player.wasm")),j}let K=t=>{switch(t){case"reverse":return O.Reverse;case"bounce":return O.Bounce;case"reverse-bounce":return O.ReverseBounce;default:return O.Forward}},X=t=>{switch(t){case O.Reverse:return"reverse";case O.Bounce:return"bounce";case O.ReverseBounce:return"reverse-bounce";default:return"forward"}},Y=t=>{switch(t){case"contain":default:return"contain";case"cover":return"cover";case"fill":return"fill";case"fit-height":return"fit-height";case"fit-width":return"fit-width";case"none":return"none"}};var Q=class{constructor(t){s(this,"_canvas",null),s(this,"_pendingLoad",null),s(this,"_srcFetchAbort",null),s(this,"_context",null),s(this,"_eventManager",void 0),s(this,"_animationFrameId",null),s(this,"_frameManager",void 0),s(this,"_boundAnimationLoop",void 0),s(this,"_dotLottieCore",null),s(this,"_stateMachineId",""),s(this,"_stateMachineConfig",null),s(this,"_isStateMachineRunning",!1),s(this,"_renderConfig",{}),s(this,"_isFrozen",!1),s(this,"_backgroundColor",null),s(this,"_lastFrameTime",null),s(this,"_boundOnClick",null),s(this,"_boundOnPointerUp",null),s(this,"_boundOnPointerDown",null),s(this,"_boundOnPointerMove",null),s(this,"_boundOnPointerEnter",null),s(this,"_boundOnPointerLeave",null),s(this,"_bufferMismatchCount",0),s(this,"_lastExpectedBufferSize",0),s(this,"_cachedImageData",null),s(this,"_cachedImageDataBuffer",null),s(this,"_cachedImageDataByteOffset",0),s(this,"_marker",""),s(this,"_segment",null),this._canvas=t.canvas??null,this._eventManager=new z,this._frameManager=new _,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||N(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0};let e=null;t.src&&!t.data&&(this._srcFetchAbort=new AbortController,(e=this._fetchData(t.src,this._srcFetchAbort.signal)).catch(()=>{})),this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(K(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&2===t.segment.length&&(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])),this._marker=t.marker??"",this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._applyAssetResolver(t.assetResolver??null),this._stateMachineId=t.stateMachineId??"",this._stateMachineConfig=t.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:"ready"}
1),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src,e):this._pendingLoad={src:t.src,dataPromise:e}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)}).catch(t=>{this._srcFetchAbort?.abort(),console.error("[dotlottie-web] Initialization failed:",t),this._eventManager.dispatch({type:"loadError",error:Error(`Failed to load wasm module: ${t}`)})})}async _initWasm(){return J().load()}_createCore(){return new R}_onCoreCreated(){}_setupTarget(t,e){return!!this._dotLottieCore&&this._dotLottieCore.setup_sw_target(t,e)}_drainPlayerEvents({skipFrame:t=!1}={}){if(this._dotLottieCore)for(;;){let e=this._dotLottieCore.poll_event();if(null==e)break;switch(e.type){case"Load":setTimeout(()=>this._eventManager.dispatch({type:"load"}),0);break;case"LoadError":setTimeout(()=>this._eventManager.dispatch({type:"loadError",error:Error("failed to load")}),0);break;case"Play":queueMicrotask(()=>this._eventManager.dispatch({type:"play"}));break;case"Pause":queueMicrotask(()=>this._eventManager.dispatch({type:"pause"}));break;case"Stop":queueMicrotask(()=>this._eventManager.dispatch({type:"stop"}));break;case"Frame":{let n=e.frameNo??0;t||queueMicrotask(()=>this._eventManager.dispatch({type:"frame",currentFrame:n}));break}case"Render":{let n=e.frameNo??0;t||queueMicrotask(()=>this._eventManager.dispatch({type:"render",currentFrame:n}));break}case"Loop":{let t=e.loopCount??0;queueMicrotask(()=>this._eventManager.dispatch({type:"loop",loopCount:t}));break}case"Complete":queueMicrotask(()=>this._eventManager.dispatch({type:"complete"}))}}}_discardPlayerEvents(){for(;this._dotLottieCore?.poll_event()!=null;);}_drainSmEvents(){if(this._dotLottieCore){for(;;){let t=this._dotLottieCore.sm_poll_event();if(null==t)break;switch(t.type){case"Start":queueMicrotask(()=>{this._isStateMachineRunning=!0,this._eventManager.dispatch({type:"stateMachineStart"}),this._startAnimationLoop()});break;case"Stop":queueMicrotask(()=>{this._isStateMachineRunning=!1,this._eventManager.dispatch({type:"stateMachineStop"}),this._dotLottieCore?.status()!==A.Playing&&this._stopAnimationLoop()});break;case"CustomEvent":this._eventManager.dispatch({type:"stateMachineCustomEvent",eventName:t.message??""});break;case"BooleanInputChange":this._eventManager.dispatch({type:"stateMachineBooleanInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"NumericInputChange":this._eventManager.dispatch({type:"stateMachineNumericInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"StringInputChange":this._eventManager.dispatch({type:"stateMachineStringInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"InputFired":this._eventManager.dispatch({type:"stateMachineInputFired",inputName:t.name??""});break;case"Transition":this._eventManager.dispatch({type:"stateMachineTransition",fromState:t.previousState??"",toState:t.newState??""});break;case"StateEntered":this._eventManager.dispatch({type:"stateMachineStateEntered",state:t.state??""});break;case"StateExit":this._eventManager.dispatch({type:"stateMachineStateExit",state:t.state??""});break;case"Error":this._eventManager.dispatch({type:"stateMachineError",error:t.message??""})}}for(;;){let t=this._dotLottieCore.sm_poll_internal_event();if(null==t)break;if("Message"===t.type){let e=t.message??"";d&&e.startsWith("OpenUrl: ")?V(e):this._eventManager.dispatch({type:"stateMachineInternalMessage",message:e})}}}}_dispatchError(t){console.error(t),this._eventManager.dispatch({type:"loadError",error:Error(t)})}async _fetchData(t,e=null){let n=await fetch(t,{signal:e});if(!n.ok)throw Error(`Failed to fetch animation data from URL: ${t}. ${n.status}: ${n.statusText}`);let r=await n.arrayBuffer();return B(r)?r:new TextDecoder().decode(r)}_loadFromData(t){if(null===this._dotLottieCore)return;if(!this._canvas){console.warn("[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.");return}this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height);let e=!1;if("string"==typeof t){if(!(e=this._dotLottieCore.load_animation(t))&&!W(t)){this._discardPlayerEvents(),this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");return}}else if(t instanceof ArrayBuffer){if(!B(t)){this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");return}e=this._dotLottieCore.load_dotlottie_data(new Uint8Array(t))}else if("object"==typeof t){if(!W(t)){this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");return}e=this._dotLottieCore.load_animation(JSON.stringify(t))}else{this._dispatchError(`Unsupported data type for animation data. Expected:
2          - string (Lottie JSON),
3          - ArrayBuffer (dotLottie),
4          - object (Lottie JSON).
5          Received: ${typeof t}`);return}if(e){if(void 0!==this._renderConfig.quality&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents({ski
5pFrame:!!this._marker||!!this._segment}),this._marker&&this._dotLottieCore.set_marker(this._marker),this._segment){this._dotLottieCore.set_segment(this._segment[0],this._segment[1]);let t=X(this._dotLottieCore.mode()),e="reverse"===t||"reverse-bounce"===t?this._segment[1]:this._segment[0];this._dotLottieCore.set_frame(e)}setTimeout(()=>{this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame})},0),this._dotLottieCore.render(),this._drainPlayerEvents(),this._draw(),this._stateMachineId?this.stateMachineLoad(this._stateMachineId)&&this.stateMachineStart()&&this._startAnimationLoop():this._dotLottieCore.status()===A.Playing&&this._startAnimationLoop(),d&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&($.observe(this._canvas,this),H(this._canvas)||this.freeze()),this._renderConfig.autoResize&&U.observe(this._canvas,this))}else this._drainPlayerEvents()}_loadFromSrc(t,e){(e??this._fetchData(t)).then(t=>this._loadFromData(t)).catch(e=>this._dispatchError(`Failed to load animation data from URL: ${t}. ${e}`))}get buffer(){return this._dotLottieCore?this._dotLottieCore.get_pixel_buffer():null}get activeAnimationId(){return this._dotLottieCore?.animation_id()??void 0}get activeThemeId(){return this._dotLottieCore?.theme_id()??void 0}get layout(){if(this._dotLottieCore)return{align:[this._dotLottieCore.layout_align_x(),this._dotLottieCore.layout_align_y()],fit:Y(this._dotLottieCore.layout_fit())}}get marker(){return this._dotLottieCore?.current_marker()??""}get manifest(){try{let t=this._dotLottieCore?.manifest_string();if(null===this._dotLottieCore||!t)return null;let e=JSON.parse(t);return 0===Object.keys(e).length?null:e}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){if(this._dotLottieCore)return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?X(this._dotLottieCore.mode()):"forward"}get isFrozen(){return this._isFrozen}get isStateMachineRunning(){return this._isStateMachineRunning}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.autoplay()??!1}get useFrameInterpolation(){return this._dotLottieCore?.use_frame_interpolation()??!1}get speed(){return this._dotLottieCore?.speed()??0}get isReady(){return null!==this._dotLottieCore}get isLoaded(){return(this._dotLottieCore?.status()??A.Idle)!==A.Idle}get isPlaying(){return this._dotLottieCore?.status()===A.Playing}get isPaused(){return this._dotLottieCore?.status()===A.Paused}get isStopped(){return this._dotLottieCore?.status()===A.Stopped}get currentFrame(){return this._dotLottieCore?Math.round(100*this._dotLottieCore.current_frame())/100:0}get loopCount(){return this._dotLottieCore?.current_loop_count()??0}get totalFrames(){return this._dotLottieCore?.total_frames()??0}get duration(){return(this._dotLottieCore?.duration()??0)/1e3}get canvas(){return this._canvas}load(t){null!==this._dotLottieCore&&(this._stopAnimationLoop(),this._cleanupCanvas(),this._isFrozen=!1,this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(K(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&2===t.segment.length?(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])):(this._segment=null,this._dotLottieCore.clear_segment()),this._marker=t.marker??"",this._marker?this._dotLottieCore.set_marker(this._marker):this._dotLottieCore.clear_marker(),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._applyAssetResolver(t.assetResolver??null),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src):this._pendingLoad={src:t.src}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor))}_draw(){if(null===this._dotLottieCore||null===this._canvas||(!this._context&&"getContext"in this._canvas&&"function"==typeof this._canvas.getContext&&(!d||"u">typeof HTMLCanvasElement&&this._canvas instanceof HTMLCanvasElement||"u">typeof OffscreenCanvas&&this._canvas instanceof OffscreenCanvas)&&(this._context=this._canvas.getContext("2d")),!this._context))return;let t=this._dotLottieCore.get_pixel_buffer(),e=this._canvas.width,n=this._canvas.height,r=e*n*4;if(t.byteLength!==r){this._lastExpectedBufferSize===r?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=r),
510===this._bufferMismatchCount&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${r} bytes for canvas ${e}x${n}, but got ${t.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`);return}this._bufferMismatchCount=0,this._lastExpectedBufferSize=r;let i=this._cachedImageData;if(!(null!==i&&i.width===e&&i.height===n&&i.data.byteLength===r&&this._cachedImageDataBuffer===t.buffer&&this._cachedImageDataByteOffset===t.byteOffset)){if(typeof ImageData>"u")this._cachedImageData=this._context.createImageData(e,n);else{let r=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData=new ImageData(r,e,n)}this._cachedImageDataBuffer=t.buffer,this._cachedImageDataByteOffset=t.byteOffset}if(typeof ImageData>"u"){let e=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData.data.set(e)}this._context.putImageData(this._cachedImageData,0,0)}_cleanupCanvas(){this._canvas&&d&&this._canvas instanceof HTMLCanvasElement&&($.unobserve(this._canvas),U.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&d&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&($.observe(this._canvas,this),H(this._canvas)||this.freeze()),this._renderConfig.autoResize&&U.observe(this._canvas,this),this._isStateMachineRunning&&this._setupStateMachineListeners()),this._canvas&&this._dotLottieCore&&this.isLoaded&&this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}_setupRendererOnCanvas(){this._context=null}_stopAnimationLoop(){null!==this._animationFrameId&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),this._lastFrameTime=null}_startAnimationLoop(){null===this._animationFrameId&&this._dotLottieCore&&!this._isFrozen&&(this._dotLottieCore.status()===A.Playing||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop))}_animationLoop(t){if(null===this._dotLottieCore||this._dotLottieCore.status()!==A.Playing&&!this._isStateMachineRunning){this._stopAnimationLoop();return}try{let e=null===this._lastFrameTime?0:t-this._lastFrameTime;this._lastFrameTime=t;let n=this._isStateMachineRunning?this._dotLottieCore.sm_tick(e):this._dotLottieCore.tick(e);this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),n&&this._draw(),this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop)}catch(t){console.error("Error in animation frame:",t),this._eventManager.dispatch({type:"renderError",error:t}),t instanceof WebAssembly.RuntimeError&&this.destroy()}}play(){if(null===this._dotLottieCore||!this.isLoaded)return;this._stopAnimationLoop();let t=this._dotLottieCore.play();this._drainPlayerEvents(),(t||this._dotLottieCore.status()===A.Playing)&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&d&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!H(this._canvas)&&this.freeze()}pause(){null!==this._dotLottieCore&&(this._dotLottieCore.pause(),this._drainPlayerEvents(),this._stopAnimationLoop())}stop(){if(null===this._dotLottieCore)return;let t=this._dotLottieCore.stop();this._drainPlayerEvents(),this._stopAnimationLoop(),t&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._dotLottieCore.render(),this._draw())}setFrame(t){if(null!==this._dotLottieCore&&this._dotLottieCore.set_frame(t)){let t=this._dotLottieCore.render();this._drainPlayerEvents(),t&&this._draw()}}setSpeed(t){null!==this._dotLottieCore&&this._dotLottieCore.set_speed(t)}setBackgroundColor(t){if(null!==this._dotLottieCore){if(d&&this._canvas instanceof HTMLCanvasElement)this._canvas.style.backgroundColor=t;else{let[e,n,r,i]=function(t){if(!/^#([\da-f]{6}|[\da-f]{8})$/iu.test(t))return[0,0,0,0];let e=t.replace("#","");return[parseInt((e=6===e.length?`${e}ff`:e).slice(0,2),16)/255,parseInt(e.slice(2,4),16)/255,parseInt(e.slice(4,6),16)/255,parseInt(e.slice(6,8),16)/255]}(t);this._dotLottieCore.set_background(e,n,r,i)}this._backgroundColor=t}}setLoop(t){null!==this._dotLottieCore&&this._dotLottieCore.set_loop(t)}setLoopCount(t){null!==this._dotLottieCore&&this._dotLottieCore.set_loop_count(t)}setUseFrameInterpolation(t){null!==this._dotLottieCore&&this._dotLottieCore.set_use_frame_interpolation(t)}_applyAssetResolver(t){if(null!==this._dotLottieCore){if(null===t){this._dotLottieCore.set_asset_resolver(null);return}this._dotLottieCore.set_asset_resolver(e=>{try{return t(e)??null}catch(t){return console.error(`[dotlottie-web] assetResolver threw for "${e}":`,t),null}})}}addEventListener(t,e){this._eventManager.addEventListener(t,e)}removeEventListener(t,e){this._eventManager.removeEventListener(t,e)}destroy(){this._stopAnimationLoop(),this._isStateMachineRunning=!1,this._cleanupCanvas(),this._srcFetchAbort?.abort(),this._srcFetchAbort=null,this._pendingLoad=null;let t=this._dotLottieCore;if(this._dotLottieCore=null,this._context=null,t)try{t.free()}catch(t){console.warn("[dotlottie-web] Error freeing wasm core during destroy:",t)}this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners()}freeze(){null!==this._animationFrameId&&(this._stopAnimationLoop(),this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}))}unfreeze(){null===this._animationFrameId&&(this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}),this._startAnimationLoop())}_syncCanvasSize(){if(!(d&&this._canvas instanceof HTMLCanvasElement))return;let t=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:e,width:n}=this._canvas.getBoundingClientRect();0!==e&&0!==n&&(this._canvas.width=n*t,this._canvas.height=e*t)}resize(){this._dotLottieCore&&this.isLoaded&&this._canvas&&(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw()))}setCanvas(t){if(!(!t||this._canvas===t)&&(this._canvas&&this._cleanupCanvas(),this._canvas=t,this._initializeCanvas(),this._pendingLoad)){let t=this._pe
5ndingLoad;this._pendingLoad=null,t.data?this._loadFromData(t.data):t.src&&this._loadFromSrc(t.src,t.dataPromise)}}setTransform(t){if(!this._dotLottieCore)return!1;let e=this._dotLottieCore.set_transform(new Float32Array(t));return e&&this._dotLottieCore.render()&&this._draw(),e}getTransform(){if(this._dotLottieCore)return Array.from(this._dotLottieCore.get_transform())}setSegment(t,e){null!==this._dotLottieCore&&(this._segment=[t,e],this._dotLottieCore.set_segment(t,e))}resetSegment(){null!==this._dotLottieCore&&(this._segment=null,this._dotLottieCore.clear_segment())}setMode(t){null!==this._dotLottieCore&&this._dotLottieCore.set_mode(K(t))}setRenderConfig(t){let{devicePixelRatio:e,freezeOnOffscreen:n,quality:r,...i}=t;this._renderConfig={...this._renderConfig,...i,devicePixelRatio:e||N(),freezeOnOffscreen:n??!0,...void 0!==r&&{quality:r}},void 0!==r&&this._dotLottieCore&&this._dotLottieCore.set_quality(r),d&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?U.observe(this._canvas,this):U.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?($.observe(this._canvas,this),H(this._canvas)||this.freeze()):($.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(t){null!==this._dotLottieCore&&this._dotLottieCore.animation_id()!==t&&this._canvas&&(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height),this._dotLottieCore.load_animation_from_id(t)?(void 0!==this._renderConfig.quality&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents(),this._dotLottieCore.render(),this._draw()):this._dispatchError(`Failed to load animation with id: ${t}`))}setMarker(t){null!==this._dotLottieCore&&(this.markers().some(e=>e.name===t)?(this._marker=t,this._dotLottieCore.set_marker(t)):(this._marker="",this._segment=null,this._dotLottieCore.clear_marker(),this._dotLottieCore.clear_segment()))}markers(){let t=this._dotLottieCore?.markers();return t&&Array.isArray(t)?t:[]}setTheme(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.set_theme(t);return e&&(this._dotLottieCore.render(),this._draw()),e}resetTheme(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.reset_theme();return t&&(this._dotLottieCore.render(),this._draw()),t}setThemeData(t){if(null===this._dotLottieCore)return!1;let e="string"==typeof t?t:JSON.stringify(t),n=this._dotLottieCore.set_theme_data(e);return n&&(this._dotLottieCore.render(),this._draw()),n}setSlots(t){null!==this._dotLottieCore&&this._dotLottieCore.set_slots_str(JSON.stringify(t))&&(this._dotLottieCore.render(),this._draw())}_isKeyframeArray(t){return Array.isArray(t)&&t.length>0&&"object"==typeof t[0]&&null!==t[0]&&"t"in t[0]&&"s"in t[0]}getSlotIds(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.get_slot_ids();return Array.isArray(t)?t:[]}getSlotType(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_type(t);if(e)return e}getSlot(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_str(t);if(e)try{return JSON.parse(e)}catch{return}}getSlots(){if(!this._dotLottieCore)return{};try{return JSON.parse(this._dotLottieCore.get_slots_str())}catch{return{}}}setColorSlot(t,e){if(null===this._dotLottieCore)return!1;let n=JSON.stringify({a:+!!this._isKeyframeArray(e),k:e}),r=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),r}setScalarSlot(t,e){if(null===this._dotLottieCore)return!1;let n=JSON.stringify({a:"number"==typeof e?0:1,k:e}),r=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),r}setVectorSlot(t,e){if(null===this._dotLottieCore)return!1;let n=JSON.stringify({a:+!!this._isKeyframeArray(e),k:e}),r=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),r}setGradientSlot(t,e,n){if(null===this._dotLottieCore)return!1;let r=JSON.stringify({k:{a:+!!this._isKeyframeArray(e),k:e},p:n}),i=this._dotLottieCore.set_slot_str(t,r);return this._dotLottieCore.render(),this._draw(),i}setTextSlot(t,e){if(null===this._dotLottieCore)return!1;let n=this._dotLottieCore.get_slot_str(t),r=e;if(n){let t=JSON.parse(n);if(t&&"k"in t&&Array.isArray(t.k)){let n=t.k[0];"s"in n&&"object"==typeof n.s&&(r={...n.s,...e})}}let i=JSON.stringify({a:0,k:[{t:0,s:r}]}),s=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),s}async setImageSlot(t,e){if(null===this._dotLottieCore)return!1;let n=await q(e);
5if(null===this._dotLottieCore)return!1;let r=this._dotLottieCore.set_image_slot(t,n);return this._dotLottieCore.render(),this._draw(),r}resetSlot(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.reset_slot(t);return this._dotLottieCore.render(),this._draw(),e}clearSlot(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.clear_slot(t);return this._dotLottieCore.render(),this._draw(),e}resetSlots(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.reset_slots();return this._dotLottieCore.render(),this._draw(),t}clearSlots(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.clear_slots();return this._dotLottieCore.render(),this._draw(),t}setLayout(t){null!==this._dotLottieCore&&this._dotLottieCore.set_layout(t.fit??"contain",t.align?.[0]??.5,t.align?.[1]??.5)}setViewport(t,e,n,r){return null!==this._dotLottieCore&&this._dotLottieCore.set_viewport(t,e,n,r)}static setWasmUrl(t){J().setWasmUrl(t)}static preload(){return J().load()}static async registerFont(t,e){try{var n;let i,s,a,o,_;if(await J().load(),"string"==typeof e){let t=await fetch(e);if(!t.ok)return console.error(`Failed to fetch font from URL: ${e}. Status: ${t.status}`),!1;i=new Uint8Array(await t.arrayBuffer())}else i=e instanceof Uint8Array?e:new Uint8Array(e);let d=(n=i,s=I(t,r.__wbindgen_export_1,r.__wbindgen_export_2),a=y,o=E(n,r.__wbindgen_export_1),_=y,0!==r.register_font(s,a,o,_));return d||console.error(`Failed to register font "${t}". Font data may be invalid.`),d}catch(e){return console.error(`Error registering font "${t}":`,e),!1}}animationSize(){let t=this._dotLottieCore?.animation_size();return{width:t?.[0]??0,height:t?.[1]??0}}stateMachineLoad(t){return!!this._dotLottieCore&&this._dotLottieCore.state_machine_load_from_id(t)}stateMachineLoadData(t){return!!this._dotLottieCore&&this._dotLottieCore.state_machine_load(t)}stateMachineSetConfig(t){this._stateMachineConfig=t}stateMachineStart(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction??!0,this._stateMachineConfig?.openUrlPolicy?.whitelist??[]);return this._drainSmEvents(),t&&(this._isStateMachineRunning=!0,this._setupStateMachineListeners(),this._startAnimationLoop()),t}stateMachineStop(){if(!this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_stop();return this._drainSmEvents(),t&&(this._isStateMachineRunning=!1,this._cleanupStateMachineListeners(),this._dotLottieCore.status()!==A.Playing&&this._stopAnimationLoop()),t}stateMachineGetStatus(){return this._dotLottieCore?.sm_status()??""}stateMachineGetCurrentState(){return this._dotLottieCore?.sm_current_state()??""}stateMachineGetActiveId(){return this._dotLottieCore?.state_machine_id()??""}stateMachineOverrideState(t,e=!1){return this._dotLottieCore?.sm_override_current_state(t,e)??!1}stateMachineSetSeed(t){return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(t)))??!1}stateMachineGet(t){return this._dotLottieCore?.get_state_machine(t)??""}stateMachineGetListeners(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_framework_setup();return Array.isArray(t)?t:[]}stateMachineSetBooleanInput(t,e){return this._dotLottieCore?.sm_set_boolean_input(t,e)??!1}stateMachineSetNumericInput(t,e){return this._dotLottieCore?.sm_set_numeric_input(t,e)??!1}stateMachineSetStringInput(t,e){return this._dotLottieCore?.sm_set_string_input(t,e)??!1}stateMachineGetBooleanInput(t){return this._dotLottieCore?.sm_get_boolean_input(t)??void 0}stateMachineGetNumericInput(t){return this._dotLottieCore?.sm_get_numeric_input(t)??void 0}stateMachineGetStringInput(t){return this._dotLottieCore?.sm_get_string_input(t)??void 0}stateMachineGetInputs(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_get_inputs();return Array.isArray(t)?t:[]}stateMachineFireEvent(t){this._dotLottieCore?.sm_fire(t)}stateMachinePostClickEvent(t,e){this._dotLottieCore?.sm_post_click(t,e)}stateMachinePostPointerUpEvent(t,e){this._dotLottieCore?.sm_post_pointer_up(t,e)}stateMachinePostPointerDownEvent(t,e){this._dotLottieCore?.sm_post_pointer_down(t,e)}stateMachinePostPointerMoveEvent(t,e){this._dotLottieCore?.sm_post_pointer_move(t,e)}stateMachinePostPointerEnterEvent(t,e){this._dotLottieCore?.sm_post_pointer_enter(t,e)}stateMachinePostPointerExitEvent(t,e){this._dotLottieCore?.sm_post_pointer_exit(t,e)}_onClick(t){let e=G(t);e&&this.stateMachinePostClickEvent(e.x,e.y)}_onPointerUp(t){let e=G(t);e&&this.stateMachinePostPointerUpEvent(e.x,e.y)}_onPointerDown(t){let e=G(t);e&&this.stateMachinePostPointerDownEvent(e.x,e.y)}_onPointerMove(t){let e=G(t);e&&this.stateMachinePostPointerMoveEvent(e.x,e.y)}_onPointerEnter(t){let e=G(t);e&&this.stateMachinePostPointerEnterEvent(e.x,e.y)}_onPointerLeave(t){let e=G(t);e&&this.stateMachinePostPointerExitEvent(e.x,e.y)}_setupStateMachineListeners(){if(d&&this._canvas instanceof HTMLCanvasElement&&null!==this._dotLottieCore&&this.isLoaded){let t=this.stateMachineGetListeners();this._cleanupStateMachineListeners(),t.includes("Click")&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener("click",this._boundOnClick)),t.includes("PointerUp")&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener("pointerup",this._boundOnPointerUp)),t.includes("PointerDown")&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener("pointerdown",this._boundOnPointerDown)),t.includes("PointerMove")&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener("pointermove",this._boundOnPointerMove)),t.includes("PointerEnter")&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener("pointerenter",this._boundOnPointerEnter)),t.includes("PointerExit")&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener("pointerleave",this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){d&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&(this._canvas.removeEventListener("click",this._boundOnClick),this._boundOnClick=null),this._boundOnPointerUp&&(this._canvas.removeEventListener("pointerup",this._boundOnPointerUp),this._boundOnPointerUp=null),this._boundOnPointerDown&&(this._canvas.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerDown=null),this._boundOnPointerMove&&(this._canvas.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerMove=null),this._boundOnPointerEnter&&(this._canvas.removeEventListener("pointerenter",this._boundOnPointerEnter),this._boundOnPointerEnter=null),this._boundOnPointerLeave&&(this._canvas.removeEventListener("pointerleave",this._boundOnPointerLeave),this._boundOnPointerLeave=null))}},Z=class{constructor(){if(typeof Worker>"u")throw Error("Worker is not supported in this environment.");let t
vendor: 77,791 bytes, line 5
5=new Blob(['"use strict";(()=>{var bt=Object.defineProperty;var vt=(n,t,e)=>t in n?bt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var u=(n,t,e)=>vt(n,typeof t!="symbol"?t+"":t,e);var Y=class{requestAnimationFrame(t){return requestAnimationFrame(t)}cancelAnimationFrame(t){cancelAnimationFrame(t)}},X=class{constructor(){u(this,"_lastHandleId",0);u(this,"_lastImmediate",null)}requestAnimationFrame(t){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{t(performance.now())}),this._lastHandleId}cancelAnimationFrame(t){this._lastImmediate&&clearImmediate(this._lastImmediate)}},N=class{constructor(){u(this,"_strategy");this._strategy=typeof requestAnimationFrame=="function"?new Y:new X}requestAnimationFrame(t){return this._strategy.requestAnimationFrame(t)}cancelAnimationFrame(t){this._strategy.cancelAnimationFrame(t)}};var E=typeof window<"u"&&typeof window.document<"u";var W=new Uint8Array([80,75,3,4]),st=["v","ip","op","layers","fr","w","h"],Z="0.80.0",Q="@lottiefiles/dotlottie-web",ot=.75,it=4;var o,S=new Array(128).fill(void 0);S.push(void 0,null,!0,!1);function _(n){return S[n]}var z=S.length;function m(n){z===S.length&&S.push(S.length+1);let t=z;return z=S[t],S[t]=n,t}function v(n,t){try{return n.apply(this,t)}catch(e){o.__wbindgen_export_0(m(e))}}function L(n){return n==null}var ct=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&ct.decode();var D=null;function V(){return(D===null||D.byteLength===0)&&(D=new Uint8Array(o.memory.buffer)),D}function g(n,t){return n=n>>>0,ct.decode(V().subarray(n,n+t))}var d=0,G=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},yt=typeof G.encodeInto=="function"?function(n,t){return G.encodeInto(n,t)}:function(n,t){let e=G.encode(n);return t.set(e),{read:n.length,written:e.length}};function p(n,t,e){if(e===void 0){let l=G.encode(n),y=t(l.length,1)>>>0;return V().subarray(y,y+l.length).set(l),d=l.length,y}let r=n.length,s=t(r,1)>>>0,i=V(),c=0;for(;c<r;c++){let l=n.charCodeAt(c);if(l>127)break;i[s+c]=l}if(c!==r){c!==0&&(n=n.slice(c)),s=e(s,r,r=c+n.length*3,1)>>>0;let l=V().subarray(s+c,s+r),y=yt(n,l);c+=y.written,s=e(s,r,c,1)>>>0}return d=c,s}var T=null;function h(){return(T===null||T.buffer.detached===!0||T.buffer.detached===void 0&&T.buffer!==o.memory.buffer)&&(T=new DataView(o.memory.buffer)),T}function H(n,t){let e=t(n.length*1,1)>>>0;return V().set(n,e/1),d=n.length,e}function Et(n){n<132||(S[n]=z,z=n)}function M(n){let t=_(n);return Et(n),t}var at=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>{o.__wbindgen_export_4.get(n.dtor)(n.a,n.b)});function Mt(n,t,e,r){let s={a:n,b:t,cnt:1,dtor:e},i=(...c)=>{s.cnt++;let l=s.a;s.a=0;try{return r(l,s.b,...c)}finally{--s.cnt===0?(o.__wbindgen_export_4.get(s.dtor)(l,s.b),at.unregister(s)):s.a=l}};return i.original=s,at.register(i,s,s),i}function dt(n,t){let e=p(n,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d,s=H(t,o.__wbindgen_export_1),i=d;return o.register_font(e,r,s,i)!==0}var $=null;function Ct(){return($===null||$.byteLength===0)&&($=new Float32Array(o.memory.buffer)),$}function It(n,t){let e=t(n.length*4,4)>>>0;return Ct().set(n,e/4),d=n.length,e}function Lt(n,t){let e=t(n.length*4,4)>>>0,r=h();for(let s=0;s<n.length;s++)r.setUint32(e+4*s,m(n[s]),!0);return d=n.length,e}function St(n,t,e){o.__wbindgen_export_5(n,t,m(e))}var x=Object.freeze({Forward:0,0:"Forward",Reverse:1,1:"Reverse",Bounce:2,2:"Bounce",ReverseBounce:3,3:"ReverseBounce"}),C=Object.freeze({Idle:0,0:"Idle",Playing:1,1:"Playing",Paused:2,2:"Paused",Stopped:3,3:"Stopped",Tweening:4,4:"Tweening"}),_t=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbg_dotlottieplayerwasm_free(n>>>0,1)),j=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,_t.unregister(this),t}free(){let t=this.__destroy_into_raw();o.__wbg_dotlottieplayerwasm_free(t,0)}clear_slot(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,e,r)!==0}layout_fit(){let t,e;try{let i=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_layout_fit(i,this.__wbg_ptr);var r=h().getInt32(i+0,!0),s=h().getInt32(i+4,!0);return t=r,e=s,g(r,s)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_3(t,e,1)}}loop_count(){return o.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){let t=o.dotlottieplayerwasm_poll_event(this.__wbg_ptr);return M(t)}reset_slot(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,e,r)!==0}set_layout(t,e,r){let s=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),i=d;return o.dotlottieplayerwasm_set_layout(this.__wbg_ptr,s,i,e,r)!==0}set_marker(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;o.dotlottieplayerwasm_set_marker(this.__wbg_ptr,e,r)}clear_slots(){return o.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}is_complete(){return o.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}reset_slots(){return o.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}reset_theme(){return o.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}segment_end(){return o.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(t){return o.dotlottieplayerwasm_set_quality(this.__wbg_ptr,t)!==0}set_segment(t,e){return o.dotlottieplayerwasm_set_segment(this.__wbg_ptr,t,e)!==0}sm_set_seed(t){return o.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,t)!==0}static unload_font(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_unload_font(e,r)!==0}animation_id(){try{let r=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_animation_id(r,this.__wbg_ptr);var t=h().getInt32(r+0,!0),e=h().getInt32(r+4,!0);let s;return t!==0&&(s=g(t,e).slice(),o.__wbindgen_export_3(t,e*1,1)),s}finally{o.__wbindgen_add_to_stack_pointer(16)}}audio_volume(){return o.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return o.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return o.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return o.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return o.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){o.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){o.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){let t=o.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr);return M(t)}get_slot_str(t){try{let s=o.__wbindgen_add_to_stack_pointer(-16),i=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;o.dotlottieplayerwasm_get_slot_str(s,this.__wbg_ptr,i,c);var e=h().getInt32(s+0,!0),r=h().getInt32(s+4,!0);let l;return e!==0&&(l=g(e,r).slice(),o.__wbindgen_export_3(e,r*1,1)),l}finally{o.__wbindgen_add_to_stack_pointer(16)}}marker_names(){let t=o.dotlottieplayerwasm_marker_names(this.__wbg_ptr);return M(t)}set_autoplay(t){o.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,t)}set_slot_str(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d,i=p(e,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;return o.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,r,s,i,c)!==0}set_viewport(t,e,r,s){return o.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,t,e,r,s)!==0}total_frames(){return o.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return o.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}current_frame(){return o.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(t){try{let s=o.__wbindgen_add_to_stack_pointer(-16),i=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;o.dotlottieplayerwasm_get_slot_type(s,this.__wbg_ptr,i,c);var e=h().getInt32(s+0,!0),r=h().getInt32(s+4,!0);let l;return e!==0&&(l=g(e,r).slice(),o.__wbindgen_export_3(e,r*1,1)),l}finally{o.__wbindgen_add_to_stack_pointer(16)}}get_slots_str(){let t,e;try{let i=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_get_slots_str(i,this.__wbg_ptr);var r=h().getInt32(i+0,!0),s=h().getInt32(i+4,!0);return t=r,e=s,g(r,s)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_3(t,e,1)}}get_transform(){let t=o.dotlottieplayerwasm_get_transform(this.__wbg_ptr);return M(t)}segment_start(){return o.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,e,r)!==0}set_text_slot(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d,i=p(e,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;return o.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,r,s,i,c)!==0}set_transform(t){let e=It(t,o.__wbindgen_export_1),r=d;return o.dotlottieplayerwasm_set_transform(this.__wbg_ptr,e,r)!==0}sm_get_inputs(){let t=o.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr);return M(t)}sm_poll_event(){let t=o.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr);return M(t)}sm_post_click(t,e){o.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,t,e)}animation_size(){let t=o.dotlottieplayerwasm_animation_size(this.__wbg_ptr);return M(t)}current_marker(){try{let r=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_current_marker(r,this.__wbg_ptr);var t=h().getInt32(r+0,!0),e=h().getInt32(r+4,!0);let s;return t!==0&&(s=g(t,e).slice(),o.__wbindgen_export_3(t,e*1,1)),s}finally{o.__wbindgen_add_to_stack_pointer(16)}}layout_align_x(){return o.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return o.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_load_animation(this.__wbg_ptr,e,r)!==0}loop_animation(){return o.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_background(t,e,r,s){return o.dotlottieplayerwasm_set_background(this.__wbg_ptr,t,e,r,s)!==0}set_color_slot(t,e,r,s){let i=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;return o.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,c,e,r,s)!==0}set_image_slot(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d,i=p(e,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;return o.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,r,s,i,c)!==0}set_loop_count(t){o.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,t)}set_theme_data(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,e,r)!==0}sm_reset_input(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;o.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,e,r)}manifest_string(){let t,e;try{let i=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_manifest_string(i,this.__wbg_ptr);var r=h().getInt32(i+0,!0),s=h().getInt32(i+4,!0);return t=r,e=s,g(r,s)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_3(t,e,1)}}set_scalar_slot(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d;return o.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,r,s,e)!==0}set_vector_slot(t,e,r){let s=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),i=d;return o.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,s,i,e,r)!==0}setup_sw_target(t,e){return o.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,t,e)!==0}get_pixel_buffer(){let t=o.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr);return M(t)}set_audio_volume(t){o.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,t)}sm_current_state(){let t,e;try{let i=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_sm_current_state(i,this.__wbg_ptr);var r=h().getInt32(i+0,!0),s=h().getInt32(i+4,!0);return t=r,e=s,g(r,s)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_3(t,e,1)}}state_machine_id(){try{let r=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_state_machine_id(r,this.__wbg_ptr);var t=h().getInt32(r+0,!0),e=h().getInt32(r+4,!0);let s;return t!==0&&(s=g(t,e).slice(),o.__wbindgen_export_3(t,e*1,1)),s}finally{o.__wbindgen_add_to_stack_pointer(16)}}get_state_machine(t){try{let s=o.__wbindgen_add_to_stack_pointer(-16),i=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;o.dotlottieplayerwasm_get_state_machine(s,this.__wbg_ptr,i,c);var e=h().getInt32(s+0,!0),r=h().getInt32(s+4,!0);let l;return e!==0&&(l=g(e,r).slice(),o.__wbindgen_export_3(e,r*1,1)),l}finally{o.__wbindgen_add_to_stack_pointer(16)}}set_position_slot(t,e,r){let s=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),i=d;return o.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,s,i,e,r)!==0}current_loop_count(){return o.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}set_asset_resolver(t){o.dotlottieplayerwasm_set_asset_resolver(this.__wbg_ptr,L(t)?0:m(t))}sm_framework_setup(){let t=o.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr);return M(t)}sm_post_pointer_up(t,e){o.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,t,e)}state_machine_load(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,e,r)!==0}load_dotlottie_data(t){let e=H(t,o.__wbindgen_export_1),r=d;return o.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,e,r)!==0}sm_get_string_input(t){try{let s=o.__wbindgen_add_to_stack_pointer(-16),i=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;o.dotlottieplayerwasm_sm_get_string_input(s,this.__wbg_ptr,i,c);var e=h().getInt32(s+0,!0),r=h().getInt32(s+4,!0);let l;return e!==0&&(l=g(e,r).slice(),o.__wbindgen_export_3(e,r*1,1)),l}finally{o.__wbindgen_add_to_stack_pointer(16)}}sm_set_string_input(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d,i=p(e,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;return o.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,r,s,i,c)!==0}sm_get_boolean_input(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d,s=o.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,e,r);return s===16777215?void 0:s!==0}sm_get_numeric_input(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d,s=o.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,e,r);return s===4294967297?void 0:s}sm_post_pointer_down(t,e){o.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,t,e)}sm_post_pointer_exit(t,e){o.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,t,e)}sm_post_pointer_move(t,e){o.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,t,e)}sm_set_boolean_input(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d;return o.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,r,s,e)!==0}sm_set_numeric_input(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d;return o.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,r,s,e)!==0}state_machine_unload(){o.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(t,e){o.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,t,e)}load_animation_from_id(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,e,r)!==0}sm_poll_internal_event(){let t=o.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr);return M(t)}use_frame_interpolation(){return o.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}reset_current_loop_count(){o.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d;return o.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,r,s,e)!==0}state_machine_load_from_id(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,e,r)!==0}set_use_frame_interpolation(t){o.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,t)}constructor(){let t=o.dotlottieplayerwasm_new();return this.__wbg_ptr=t>>>0,_t.register(this,this.__wbg_ptr,this),this}mode(){return o.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return o.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}stop(){return o.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}tick(t){return o.dotlottieplayerwasm_tick(this.__wbg_ptr,t)!==0}pause(){return o.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}speed(){return o.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return o.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return o.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return o.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}status(){return o.dotlottieplayerwasm_status(this.__wbg_ptr)}markers(){let t=o.dotlottieplayerwasm_markers(this.__wbg_ptr);return M(t)}sm_fire(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,e,r)!==0}sm_stop(){return o.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_tick(t){return o.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,t)!==0}autoplay(){return o.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}duration(){return o.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(t){o.dotlottieplayerwasm_set_loop(this.__wbg_ptr,t)}set_mode(t){o.dotlottieplayerwasm_set_mode(this.__wbg_ptr,t)}sm_start(t,e){let r=Lt(e,o.__wbindgen_export_1),s=d;return o.dotlottieplayerwasm_sm_start(this.__wbg_ptr,t,r,s)!==0}theme_id(){try{let r=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_theme_id(r,this.__wbg_ptr);var t=h().getInt32(r+0,!0),e=h().getInt32(r+4,!0);let s;return t!==0&&(s=g(t,e).slice(),o.__wbindgen_export_3(t,e*1,1)),s}finally{o.__wbindgen_add_to_stack_pointer(16)}}load_font(t,e){let r=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),s=d,i=H(e,o.__wbindgen_export_1),c=d;return o.dotlottieplayerwasm_load_font(this.__wbg_ptr,r,s,i,c)!==0}set_frame(t){return o.dotlottieplayerwasm_set_frame(this.__wbg_ptr,t)!==0}set_speed(t){o.dotlottieplayerwasm_set_speed(this.__wbg_ptr,t)}set_theme(t){let e=p(t,o.__wbindgen_export_1,o.__wbindgen_export_2),r=d;return o.dotlottieplayerwasm_set_theme(this.__wbg_ptr,e,r)!==0}sm_status(){let t,e;try{let i=o.__wbindgen_add_to_stack_pointer(-16);o.dotlottieplayerwasm_sm_status(i,this.__wbg_ptr);var r=h().getInt32(i+0,!0),s=h().getInt32(i+4,!0);return t=r,e=s,g(r,s)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_3(t,e,1)}}};async function xt(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n",r);else throw r}let e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{let e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function Rt(){let n={};return n.wbg={},n.wbg.__wbg_appendChild_8204974b7328bf98=function(){return v(function(t,e){let r=_(t).appendChild(_(e));return m(r)},arguments)},n.wbg.__wbg_body_942ea927546a04ba=function(t){let e=_(t).body;return L(e)?0:m(e)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){let e=_(t).buffer;return m(e)},n.wbg.__wbg_call_672a4d21634d4a24=function(){return v(function(t,e){let r=_(t).call(_(e));return m(r)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return v(function(t,e,r){let s=_(t).call(_(e),_(r));return m(s)},arguments)},n.wbg.__wbg_catch_a6e601879b2610e9=function(t,e){let r=_(t).catch(_(e));return m(r)},n.wbg.__wbg_createElement_8c9931a732ee2fea=function(){return v(function(t,e,r){let s=_(t).createElement(g(e,r));return m(s)},arguments)},n.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return v(function(t,e){let r=URL.createObjectURL(_(e)),s=p(r,o.__wbindgen_export_1,o.__wbindgen_export_2),i=d;h().setInt32(t+4,i,!0),h().setInt32(t+0,s,!0)},arguments)},n.wbg.__wbg_currentTime_7940fe39798a1ca0=function(t){return _(t).currentTime},n.wbg.__wbg_data_d1ed736c1e42b10e=function(t,e){let r=_(e).data,s=H(r,o.__wbindgen_export_1),i=d;h().setInt32(t+4,i,!0),h().setInt32(t+0,s,!0)},n.wbg.__wbg_document_d249400bd7bd996d=function(t){let e=_(t).document;return L(e)?0:m(e)},n.wbg.__wbg_drawImage_803dcc46897223c9=function(){return v(function(t,e,r,s){_(t).drawImage(_(e),r,s)},arguments)},n.wbg.__wbg_duration_4d32c501d87796c1=function(t){return _(t).duration},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,s;try{r=t,s=e,console.error(g(t,e))}finally{o.__wbindgen_export_3(r,s,1)}},n.wbg.__wbg_getContext_e9cf379449413580=function(){return v(function(t,e,r){let s=_(t).getContext(g(e,r));return L(s)?0:m(s)},arguments)},n.wbg.__wbg_getImageData_c02374a30b126dab=function(){return v(function(t,e,r,s,i){let c=_(t).getImageData(e,r,s,i);return m(c)},arguments)},n.wbg.__wbg_instanceof_CanvasRenderingContext2d_df82a4d3437bf1cc=function(t){let e;try{e=_(t)instanceof CanvasRenderingContext2D}catch{e=!1}return e},n.wbg.__wbg_instanceof_HtmlCanvasElement_2ea67072a7624ac5=function(t){let e;try{e=_(t)instanceof HTMLCanvasElement}catch{e=!1}return e},n.wbg.__wbg_instanceof_HtmlVideoElement_7f414b32f362e317=function(t){let e;try{e=_(t)instanceof HTMLVideoElement}catch{e=!1}return e},n.wbg.__wbg_instanceof_Window_def73ea0955fc569=function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},n.wbg.__wbg_length_a446193dc22c12f8=function(t){return _(t).length},n.wbg.__wbg_load_2671477a3293aadb=function(t){_(t).load()},n.wbg.__wbg_new_405e22f390576ce2=function(){let t=new Object;return m(t)},n.wbg.__wbg_new_78feb108b6472713=function(){let t=new Array;return m(t)},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){let t=new Error;return m(t)},n.wbg.__wbg_new_a12002a7f91c75be=function(t){let e=new Uint8Array(_(t));return m(e)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){let r=new Function(g(t,e));return m(r)},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){let s=new Uint8Array(_(t),e>>>0,r>>>0);return m(s)},n.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(t){let e=new Float32Array(t>>>0);return m(e)},n.wbg.__wbg_newwithsrc_20307ca7e8762a81=function(){return v(function(t,e){let r=new Audio(g(t,e));return m(r)},arguments)},n.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return v(function(t,e){let r=new Blob(_(t),_(e));return m(r)},arguments)},n.wbg.__wbg_pause_b74c96d69f769518=function(){return v(function(t){_(t).pause()},arguments)},n.wbg.__wbg_paused_9b2affc0a8a62e86=function(t){return _(t).paused},n.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return v(function(t){let e=_(t).play();return m(e)},arguments)},n.wbg.__wbg_push_737cfc8c1432c2c6=function(t,e){return _(t).push(_(e))},n.wbg.__wbg_readyState_017c08aa5e73517e=function(t){return _(t).readyState},n.wbg.__wbg_remove_e2d2659f3128c045=function(t){_(t).remove()},n.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return v(function(t,e){URL.revokeObjectURL(g(t,e))},arguments)},n.wbg.__wbg_seeking_c0427be38e698dcd=function(t){return _(t).seeking},n.wbg.__wbg_setAttribute_2704501201f15687=function(){return v(function(t,e,r,s,i){_(t).setAttribute(g(e,r),g(s,i))},arguments)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){_(t).set(_(e),r>>>0)},n.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return v(function(t,e,r){return Reflect.set(_(t),_(e),_(r))},arguments)},n.wbg.__wbg_setcssText_e018c236104b0233=function(t,e,r){_(t).cssText=g(e,r)},n.wbg.__wbg_setcurrentTime_64727eddd3966512=function(t,e){_(t).currentTime=e},n.wbg.__wbg_setheight_da683a33fa99843c=function(t,e){_(t).height=e>>>0},n.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(t,e,r){_(t)[e>>>0]=r},n.wbg.__wbg_setmuted_e93fc48340c43e67=function(t,e){_(t).muted=e!==0},n.wbg.__wbg_setplaybackRate_f5c3b8896f82425e=function(t,e){_(t).playbackRate=e},n.wbg.__wbg_setpreload_d2fb02758e3f8e3a=function(t,e,r){_(t).preload=g(e,r)},n.wbg.__wbg_setsrc_3a759736e2659904=function(t,e,r){_(t).src=g(e,r)},n.wbg.__wbg_settype_39ed370d3edd403c=function(t,e,r){_(t).type=g(e,r)},n.wbg.__wbg_setvolume_3895e06a030ca4f7=function(t,e){_(t).volume=e},n.wbg.__wbg_setwidth_c5fed9f5e7f0b406=function(t,e){_(t).width=e>>>0},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){let r=_(e).stack,s=p(r,o.__wbindgen_export_1,o.__wbindgen_export_2),i=d;h().setInt32(t+4,i,!0),h().setInt32(t+0,s,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let t=typeof global>"u"?null:global;return L(t)?0:m(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let t=typeof globalThis>"u"?null:globalThis;return L(t)?0:m(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let t=typeof self>"u"?null:self;return L(t)?0:m(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let t=typeof window>"u"?null:window;return L(t)?0:m(t)},n.wbg.__wbg_style_fb30c14e5815805c=function(t){let e=_(t).style;return m(e)},n.wbg.__wbg_videoHeight_3a43327a766c1f03=function(t){return _(t).videoHeight},n.wbg.__wbg_videoWidth_4b400cf6f4744a4d=function(t){return _(t).videoWidth},n.wbg.__wbindgen_cb_drop=function(t){let e=M(t).original;return e.cnt--==1?(e.a=0,!0):!1},n.wbg.__wbindgen_closure_wrapper109=function(t,e,r){let s=Mt(t,e,7,St);return m(s)},n.wbg.__wbindgen_is_null=function(t){return _(t)===null},n.wbg.__wbindgen_is_undefined=function(t){return _(t)===void 0},n.wbg.__wbindgen_memory=function(){let t=o.memory;return m(t)},n.wbg.__wbindgen_number_new=function(t){return m(t)},n.wbg.__wbindgen_object_clone_ref=function(t){let e=_(t);return m(e)},n.wbg.__wbindgen_object_drop_ref=function(t){M(t)},n.wbg.__wbindgen_string_get=function(t,e){let r=_(e),s=typeof r=="string"?r:void 0;var i=L(s)?0:p(s,o.__wbindgen_export_1,o.__wbindgen_export_2),c=d;h().setInt32(t+4,c,!0),h().setInt32(t+0,i,!0)},n.wbg.__wbindgen_string_new=function(t,e){let r=g(t,e);return m(r)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(g(t,e))},n}function kt(n,t){return o=n.exports,lt.__wbindgen_wasm_module=t,T=null,$=null,D=null,o}async function lt(n){if(o!==void 0)return o;if(typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u")throw new Error("WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().");let t=Rt();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await xt(await n,t);return kt(e,r)}var ut=lt;var J=class{constructor(){u(this,"_eventListeners",new Map)}addEventListener(t,e){let r=this._eventListeners.get(t);r||(r=new Set,this._eventListeners.set(t,r)),r.add(e)}removeEventListener(t,e){let r=this._eventListeners.get(t);r&&(e?(r.delete(e),r.size===0&&this._eventListeners.delete(t)):this._eventListeners.delete(t))}dispatch(t){this._eventListeners.get(t.type)?.forEach(r=>r(t))}removeAllEventListeners(){this._eventListeners.clear()}};var b=class b{static _initializeObserver(){if(b._observer)return;let t=e=>{e.forEach(r=>{let s=b._observedCanvases.get(r.target);s&&(r.isIntersecting?s.unfreeze():s.freeze())})};b._observer=new IntersectionObserver(t,{threshold:0})}static observe(t,e){b._initializeObserver(),!b._observedCanvases.has(t)&&(b._observedCanvases.set(t,e),b._observer?.observe(t))}static unobserve(t){b._observer?.unobserve(t),b._observedCanvases.delete(t),b._observedCanvases.size===0&&(b._observer?.disconnect(),b._observer=null)}};u(b,"_observer",null),u(b,"_observedCanvases",new Map);var R=b;var f=class f{static _initializeObserver(){if(f._observer)return;let t=e=>{e.forEach(r=>{let s=f._observedCanvases.get(r.target);if(!s)return;let[i,c]=s;clearTimeout(c);let l=setTimeout(()=>{i.resize()},100);f._observedCanvases.set(r.target,[i,l])})};f._observer=new ResizeObserver(t)}static observe(t,e){f._initializeObserver(),!f._observedCanvases.has(t)&&(f._observedCanvases.set(t,[e,0]),f._observer?.observe(t))}static unobserve(t){let e=f._observedCanvases.get(t);if(e){let r=e[1];r&&clearTimeout(r)}f._observer?.unobserve(t),f._observedCanvases.delete(t),!f._observedCanvases.size&&f._observer&&(f._observer.disconnect(),f._observer=null)}};u(f,"_observer",null),u(f,"_observedCanvases",new Map);var k=f;function Pt(n){return/^#([\\da-f]{6}|[\\da-f]{8})$/iu.test(n)}function pt(n){if(!Pt(n))return[0,0,0,0];let t=n.replace("#","");t=t.length===6?`${t}ff`:t;let e=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,s=parseInt(t.slice(4,6),16)/255,i=parseInt(t.slice(6,8),16)/255;return[e,r,s,i]}function q(n){if(n.byteLength<4)return!1;let t=new Uint8Array(n.slice(0,W.byteLength));for(let e=0;e<W.length;e+=1)if(W[e]!==t[e])return!1;return!0}function Tt(n){return st.every(t=>Object.hasOwn(n,t))}function tt(n){return typeof n=="string"?/^\\s*\\{/u.test(n)&&/\\}\\s*$/u.test(n):Tt(n)}function et(){return 1+((E?window.devicePixelRatio:1)-1)*ot}function U(n){let t=n.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return!(t.bottom<0||t.top>e||t.right<0||t.left>r)}function A(n){let t=n.target;if(t instanceof HTMLCanvasElement){let e=t.getBoundingClientRect();if(e.width===0||e.height===0||t.width===0||t.height===0)return null;let r=t.width/e.width,s=t.height/e.height,i=(n.clientX-e.left)*r,c=(n.clientY-e.top)*s;return!Number.isFinite(i)||!Number.isFinite(c)||Number.isNaN(i)||Number.isNaN(c)?null:{x:i,y:c}}return null}function At(n){return new Promise((t,e)=>{let r=new FileReader;r.onerror=()=>e(r.error??new Error("Failed to read image slot source")),r.onload=()=>t(r.result),r.readAsDataURL(n)})}async function ht(n){if(!/^https?:\\/\\//i.test(n))return n;let t=await fetch(n);if(!t.ok)throw new Error(`Failed to fetch image slot source from URL: ${n}. ${t.status}: ${t.statusText}`);return At(await t.blob())}function mt(n){let t=n.replace("OpenUrl: ",""),e=t.indexOf(" | Target: "),r,s;e===-1?(r=t,s="_blank"):(r=t.substring(0,e),s=t.substring(e+11)),window.open(r,s)}function gt(n,t,e){let r=null,s=t,i=e;async function c(w){await n({module_or_path:w})}async function l(w){let I=await fetch(w);if(!I.ok)throw new Error(`fetch ${w} responded with ${I.status} ${I.statusText}`);let P=await I.arrayBuffer();await n({module_or_path:P})}async function y(w,I){try{return await w(I),null}catch(P){return P}}return{load(){if(!r){let w=s,I=null;I=(async()=>{let P=await y(c,w);if(!P)return;console.warn(`Primary WASM load failed from ${w}: ${P.message}`);let O=null;if(i!==null){if(console.warn(`Attempting to load WASM from backup URL: ${i}`),O=await y(c,i),!O)return;console.warn(`Backup WASM load failed from ${i}: ${O.message}`)}console.warn("Retrying WASM load with buffered instantiation");let B=await y(l,w);if(B&&(console.warn(`Buffered WASM load from ${w} failed: ${B.message}`),!(i!==null&&(B=await y(l,i),!B))))throw console.error(`Primary WASM URL failed: ${P.message}`),O&&console.error(`Backup WASM URL failed: ${O.message}`),console.error(`Buffered fallback failed: ${B.message}`),r===I&&(r=null),new Error("WASM loading failed from all sources.")})(),r=I}return r},setWasmUrl(w){if(typeof w!="string"||w.trim()==="")throw new TypeError("setWasmUrl() expects a non-empty URL string");i=null,w!==s&&(s=w,r=null)}}}var ft=null;function K(){return ft??(ft=gt(ut,`https://cdn.jsdelivr.net/npm/${Q}@${Z}/dist/dotlottie-player.wasm`,`https://unpkg.com/${Q}@${Z}/dist/dotlottie-player.wasm`)),ft}var nt=n=>{switch(n){case"reverse":return x.Reverse;case"bounce":return x.Bounce;case"reverse-bounce":return x.ReverseBounce;default:return x.Forward}},wt=n=>{switch(n){case x.Reverse:return"reverse";case x.Bounce:return"bounce";case x.ReverseBounce:return"reverse-bounce";default:return"forward"}},Ft=n=>{switch(n){case"contain":return"contain";case"cover":return"cover";case"fill":return"fill";case"fit-height":return"fit-height";case"fit-width":return"fit-width";case"none":return"none";default:return"contain"}},F=class{constructor(t){u(this,"_canvas",null);u(this,"_pendingLoad",null);u(this,"_srcFetchAbort",null);u(this,"_context",null);u(this,"_eventManager");u(this,"_animationFrameId",null);u(this,"_frameManager");u(this,"_boundAnimationLoop");u(this,"_dotLottieCore",null);u(this,"_stateMachineId","");u(this,"_stateMachineConfig",null);u(this,"_isStateMachineRunning",!1);u(this,"_renderConfig",{});u(this,"_isFrozen",!1);u(this,"_backgroundColor",null);u(this,"_lastFrameTime",null);u(this,"_boundOnClick",null);u(this,"_boundOnPointerUp",null);u(this,"_boundOnPointerDown",null);u(this,"_boundOnPointerMove",null);u(this,"_boundOnPointerEnter",null);u(this,"_boundOnPointerLeave",null);u(this,"_bufferMismatchCount",0);u(this,"_lastExpectedBufferSize",0);u(this,"_cachedImageData",null);u(this,"_cachedImageDataBuffer",null);u(this,"_cachedImageDataByteOffset",0);u(this,"_marker","");u(this,"_segment",null);this._canvas=t.canvas??null,this._eventManager=new J,this._frameManager=new N,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||et(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0};let e=null;t.src&&!t.data&&(this._srcFetchAbort=new AbortController,e=this._fetchData(t.src,this._srcFetchAbort.signal),e.catch(()=>{})),this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(nt(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&t.segment.length===2&&(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])),this._marker=t.marker??"",this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._applyAssetResolver(t.assetResolver??null),this._stateMachineId=t.stateMachineId??"",this._stateMachineConfig=t.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:"ready"}),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src,e):this._pendingLoad={src:t.src,dataPromise:e}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)}).catch(r=>{this._srcFetchAbort?.abort(),console.error("[dotlottie-web] Initialization failed:",r),this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load wasm module: ${r}`)})})}async _initWasm(){return K().load()}_createCore(){return new j}_onCoreCreated(){}_setupTarget(t,e){return this._dotLottieCore?this._dotLottieCore.setup_sw_target(t,e):!1}_drainPlayerEvents({skipFrame:t=!1}={}){if(this._dotLottieCore)for(;;){let e=this._dotLottieCore.poll_event();if(e==null)break;switch(e.type){case"Load":setTimeout(()=>this._eventManager.dispatch({type:"load"}),0);break;case"LoadError":setTimeout(()=>this._eventManager.dispatch({type:"loadError",error:new Error("failed to load")}),0);break;case"Play":queueMicrotask(()=>this._eventManager.dispatch({type:"play"}));break;case"Pause":queueMicrotask(()=>this._eventManager.dispatch({type:"pause"}));break;case"Stop":queueMicrotask(()=>this._eventManager.dispatch({type:"stop"}));break;case"Frame":{let r=e.frameNo??0;t||queueMicrotask(()=>this._eventManager.dispatch({type:"frame",currentFrame:r}));break}case"Render":{let r=e.frameNo??0;t||queueMicrotask(()=>this._eventManager.dispatch({type:"render",currentFrame:r}));break}case"Loop":{let r=e.loopCount??0;queueMicrotask(()=>this._eventManager.dispatch({type:"loop",loopCount:r}));break}case"Complete":queueMicrotask(()=>this._eventManager.dispatch({type:"complete"}));break;default:break}}}_discardPlayerEvents(){for(;this._dotLottieCore?.poll_event()!=null;);}_drainSmEvents(){if(this._dotLottieCore){for(;;){let t=this._dotLottieCore.sm_poll_event();if(t==null)break;switch(t.type){case"Start":queueMicrotask(()=>{this._isStateMachineRunning=!0,this._eventManager.dispatch({type:"stateMachineStart"}),this._startAnimationLoop()});break;case"Stop":queueMicrotask(()=>{this._isStateMachineRunning=!1,this._eventManager.dispatch({type:"stateMachineStop"}),this._dotLottieCore?.status()!==C.Playing&&this._stopAnimationLoop()});break;case"CustomEvent":this._eventManager.dispatch({type:"stateMachineCustomEvent",eventName:t.message??""});break;case"BooleanInputChange":this._eventManager.dispatch({type:"stateMachineBooleanInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"NumericInputChange":this._eventManager.dispatch({type:"stateMachineNumericInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"StringInputChange":this._eventManager.dispatch({type:"stateMachineStringInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"InputFired":this._eventManager.dispatch({type:"stateMachineInputFired",inputName:t.name??""});break;case"Transition":this._eventManager.dispatch({type:"stateMachineTransition",fromState:t.previousState??"",toState:t.newState??""});break;case"StateEntered":this._eventManager.dispatch({type:"stateMachineStateEntered",state:t.state??""});break;case"StateExit":this._eventManager.dispatch({type:"stateMachineStateExit",state:t.state??""});break;case"Error":this._eventManager.dispatch({type:"stateMachineError",error:t.message??""});break;default:break}}for(;;){let t=this._dotLottieCore.sm_poll_internal_event();if(t==null)break;if(t.type==="Message"){let e=t.message??"";E&&e.startsWith("OpenUrl: ")?mt(e):this._eventManager.dispatch({type:"stateMachineInternalMessage",message:e})}}}}_dispatchError(t){console.error(t),this._eventManager.dispatch({type:"loadError",error:new Error(t)})}async _fetchData(t,e=null){let r=await fetch(t,{signal:e});if(!r.ok)throw new Error(`Failed to fetch animation data from URL: ${t}. ${r.status}: ${r.statusText}`);let s=await r.arrayBuffer();return q(s)?s:new TextDecoder().decode(s)}_loadFromData(t){if(this._dotLottieCore===null)return;if(!this._canvas){console.warn("[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.");return}this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height);let e=!1;if(typeof t=="string"){if(e=this._dotLottieCore.load_animation(t),!e&&!tt(t)){this._discardPlayerEvents(),this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");return}}else if(t instanceof ArrayBuffer){if(!q(t)){this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");return}e=this._dotLottieCore.load_dotlottie_data(new Uint8Array(t))}else if(typeof t=="object"){if(!tt(t)){this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");return}e=this._dotLottieCore.load_animation(JSON.stringify(t))}else{this._dispatchError(`Unsupported data type for animation data. Expected:\n          - string (Lottie JSON),\n          - ArrayBuffer (dotLottie),\n          - object (Lottie JSON).\n          Received: ${typeof t}`);return}if(e){if(this._renderConfig.quality!==void 0&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents({skipFrame:!!this._marker||!!this._segment}),this._marker&&this._dotLottieCore.set_marker(this._marker),this._segment){this._dotLottieCore.set_segment(this._segment[0],this._segment[1]);let r=wt(this._dotLottieCore.mode()),s=r==="reverse"||r==="reverse-bounce"?this._segment[1]:this._segment[0];this._dotLottieCore.set_frame(s)}setTimeout(()=>{this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame})},0),this._dotLottieCore.render(),this._drainPlayerEvents(),this._draw(),this._stateMachineId?this.stateMachineLoad(this._stateMachineId)&&this.stateMachineStart()&&this._startAnimationLoop():this._dotLottieCore.status()===C.Playing&&this._startAnimationLoop(),E&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(R.observe(this._canvas,this),U(this._canvas)||this.freeze()),this._renderConfig.autoResize&&k.observe(this._canvas,this))}else this._drainPlayerEvents()}_loadFromSrc(t,e){(e??this._fetchData(t)).then(r=>this._loadFromData(r)).catch(r=>this._dispatchError(`Failed to load animation data from URL: ${t}. ${r}`))}get buffer(){return this._dotLottieCore?this._dotLottieCore.get_pixel_buffer():null}get activeAnimationId(){return this._dotLottieCore?.animation_id()??void 0}get activeThemeId(){return this._dotLottieCore?.theme_id()??void 0}get layout(){if(this._dotLottieCore)return{align:[this._dotLottieCore.layout_align_x(),this._dotLottieCore.layout_align_y()],fit:Ft(this._dotLottieCore.layout_fit())}}get marker(){return this._dotLottieCore?.current_marker()??""}get manifest(){try{let t=this._dotLottieCore?.manifest_string();if(this._dotLottieCore===null||!t)return null;let e=JSON.parse(t);return Object.keys(e).length===0?null:e}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){if(this._dotLottieCore)return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?wt(this._dotLottieCore.mode()):"forward"}get isFrozen(){return this._isFrozen}get isStateMachineRunning(){return this._isStateMachineRunning}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.autoplay()??!1}get useFrameInterpolation(){return this._dotLottieCore?.use_frame_interpolation()??!1}get speed(){return this._dotLottieCore?.speed()??0}get isReady(){return this._dotLottieCore!==null}get isLoaded(){return(this._dotLottieCore?.status()??C.Idle)!==C.Idle}get isPlaying(){return this._dotLottieCore?.status()===C.Playing}get isPaused(){return this._dotLottieCore?.status()===C.Paused}get isStopped(){return this._dotLottieCore?.status()===C.Stopped}get currentFrame(){return this._dotLottieCore?Math.round(this._dotLottieCore.current_frame()*100)/100:0}get loopCount(){return this._dotLottieCore?.current_loop_count()??0}get totalFrames(){return this._dotLottieCore?.total_frames()??0}get duration(){return(this._dotLottieCore?.duration()??0)/1e3}get canvas(){return this._canvas}load(t){this._dotLottieCore!==null&&(this._stopAnimationLoop(),this._cleanupCanvas(),this._isFrozen=!1,this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(nt(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&t.segment.length===2?(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])):(this._segment=null,this._dotLottieCore.clear_segment()),this._marker=t.marker??"",this._marker?this._dotLottieCore.set_marker(this._marker):this._dotLottieCore.clear_marker(),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._applyAssetResolver(t.assetResolver??null),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src):this._pendingLoad={src:t.src}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor))}_draw(){if(this._dotLottieCore===null||this._canvas===null||(!this._context&&"getContext"in this._canvas&&typeof this._canvas.getContext=="function"&&(!E||typeof HTMLCanvasElement<"u"&&this._canvas instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&this._canvas instanceof OffscreenCanvas)&&(this._context=this._canvas.getContext("2d")),!this._context))return;let t=this._dotLottieCore.get_pixel_buffer(),e=this._canvas.width,r=this._canvas.height,s=e*r*it;if(t.byteLength!==s){this._lastExpectedBufferSize===s?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=s),this._bufferMismatchCount===10&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${s} bytes for canvas ${e}x${r}, but got ${t.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`);return}this._bufferMismatchCount=0,this._lastExpectedBufferSize=s;let i=this._cachedImageData;if(!(i!==null&&i.width===e&&i.height===r&&i.data.byteLength===s&&this._cachedImageDataBuffer===t.buffer&&this._cachedImageDataByteOffset===t.byteOffset)){if(typeof ImageData>"u")this._cachedImageData=this._context.createImageData(e,r);else{let l=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData=new ImageData(l,e,r)}this._cachedImageDataBuffer=t.buffer,this._cachedImageDataByteOffset=t.byteOffset}if(typeof ImageData>"u"){let l=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData.data.set(l)}this._context.putImageData(this._cachedImageData,0,0)}_cleanupCanvas(){this._canvas&&E&&this._canvas instanceof HTMLCanvasElement&&(R.unobserve(this._canvas),k.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&E&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(R.observe(this._canvas,this),U(this._canvas)||this.freeze()),this._renderConfig.autoResize&&k.observe(this._canvas,this),this._isStateMachineRunning&&this._setupStateMachineListeners()),this._canvas&&this._dotLottieCore&&this.isLoaded&&this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}_setupRendererOnCanvas(){this._context=null}_stopAnimationLoop(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),this._lastFrameTime=null}_startAnimationLoop(){this._animationFrameId===null&&this._dotLottieCore&&!this._isFrozen&&(this._dotLottieCore.status()===C.Playing||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop))}_animationLoop(t){if(this._dotLottieCore===null){this._stopAnimationLoop();return}if(this._dotLottieCore.status()!==C.Playing&&!this._isStateMachineRunning){this._stopAnimationLoop();return}try{let e=this._lastFrameTime!==null?t-this._lastFrameTime:0;this._lastFrameTime=t;let r=this._isStateMachineRunning?this._dotLottieCore.sm_tick(e):this._dotLottieCore.tick(e);this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),r&&this._draw(),this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop)}catch(e){console.error("Error in animation frame:",e),this._eventManager.dispatch({type:"renderError",error:e}),e instanceof WebAssembly.RuntimeError&&this.destroy()}}play(){if(this._dotLottieCore===null||!this.isLoaded)return;this._stopAnimationLoop();let t=this._dotLottieCore.play();this._drainPlayerEvents(),(t||this._dotLottieCore.status()===C.Playing)&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&E&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!U(this._canvas)&&this.freeze()}pause(){this._dotLottieCore!==null&&(this._dotLottieCore.pause(),this._drainPlayerEvents(),this._stopAnimationLoop())}stop(){if(this._dotLottieCore===null)return;let t=this._dotLottieCore.stop();this._drainPlayerEvents(),this._stopAnimationLoop(),t&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._dotLottieCore.render(),this._draw())}setFrame(t){if(this._dotLottieCore===null)return;if(this._dotLottieCore.set_frame(t)){let r=this._dotLottieCore.render();this._drainPlayerEvents(),r&&this._draw()}}setSpeed(t){this._dotLottieCore!==null&&this._dotLottieCore.set_speed(t)}setBackgroundColor(t){if(this._dotLottieCore!==null){if(E&&this._canvas instanceof HTMLCanvasElement)this._canvas.style.backgroundColor=t;else{let[e,r,s,i]=pt(t);this._dotLottieCore.set_background(e,r,s,i)}this._backgroundColor=t}}setLoop(t){this._dotLottieCore!==null&&this._dotLottieCore.set_loop(t)}setLoopCount(t){this._dotLottieCore!==null&&this._dotLottieCore.set_loop_count(t)}setUseFrameInterpolation(t){this._dotLottieCore!==null&&this._dotLottieCore.set_use_frame_interpolation(t)}_applyAssetResolver(t){if(this._dotLottieCore!==null){if(t===null){this._dotLottieCore.set_asset_resolver(null);return}this._dotLottieCore.set_asset_resolver(e=>{try{return t(e)??null}catch(r){return console.error(`[dotlottie-web] assetResolver threw for "${e}":`,r),null}})}}addEventListener(t,e){this._eventManager.addEventListener(t,e)}removeEventListener(t,e){this._eventManager.removeEventListener(t,e)}destroy(){this._stopAnimationLoop(),this._isStateMachineRunning=!1,this._cleanupCanvas(),this._srcFetchAbort?.abort(),this._srcFetchAbort=null,this._pendingLoad=null;let t=this._dotLottieCore;if(this._dotLottieCore=null,this._context=null,t)try{t.free()}catch(e){console.warn("[dotlottie-web] Error freeing wasm core during destroy:",e)}this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners()}freeze(){this._animationFrameId!==null&&(this._stopAnimationLoop(),this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}))}unfreeze(){this._animationFrameId===null&&(this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}),this._startAnimationLoop())}_syncCanvasSize(){if(!(E&&this._canvas instanceof HTMLCanvasElement))return;let t=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:e,width:r}=this._canvas.getBoundingClientRect();e!==0&&r!==0&&(this._canvas.width=r*t,this._canvas.height=e*t)}resize(){if(!this._dotLottieCore||!this.isLoaded||!this._canvas)return;this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}setCanvas(t){if(!(!t||this._canvas===t)&&(this._canvas&&this._cleanupCanvas(),this._canvas=t,this._initializeCanvas(),this._pendingLoad)){let e=this._pendingLoad;this._pendingLoad=null,e.data?this._loadFromData(e.data):e.src&&this._loadFromSrc(e.src,e.dataPromise)}}setTransform(t){if(!this._dotLottieCore)return!1;let e=this._dotLottieCore.set_transform(new Float32Array(t));return e&&this._dotLottieCore.render()&&this._draw(),e}getTransform(){if(!this._dotLottieCore)return;let t=this._dotLottieCore.get_transform();return Array.from(t)}setSegment(t,e){this._dotLottieCore!==null&&(this._segment=[t,e],this._dotLottieCore.set_segment(t,e))}resetSegment(){this._dotLottieCore!==null&&(this._segment=null,this._dotLottieCore.clear_segment())}setMode(t){this._dotLottieCore!==null&&this._dotLottieCore.set_mode(nt(t))}setRenderConfig(t){let{devicePixelRatio:e,freezeOnOffscreen:r,quality:s,...i}=t;this._renderConfig={...this._renderConfig,...i,devicePixelRatio:e||et(),freezeOnOffscreen:r??!0,...s!==void 0&&{quality:s}},s!==void 0&&this._dotLottieCore&&this._dotLottieCore.set_quality(s),E&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?k.observe(this._canvas,this):k.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(R.observe(this._canvas,this),U(this._canvas)||this.freeze()):(R.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(t){if(this._dotLottieCore===null||this._dotLottieCore.animation_id()===t||!this._canvas)return;this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height),this._dotLottieCore.load_animation_from_id(t)?(this._renderConfig.quality!==void 0&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents(),this._dotLottieCore.render(),this._draw()):this._dispatchError(`Failed to load animation with id: ${t}`)}setMarker(t){if(this._dotLottieCore===null)return;this.markers().some(s=>s.name===t)?(this._marker=t,this._dotLottieCore.set_marker(t)):(this._marker="",this._segment=null,this._dotLottieCore.clear_marker(),this._dotLottieCore.clear_segment())}markers(){let t=this._dotLottieCore?.markers();return t&&Array.isArray(t)?t:[]}setTheme(t){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.set_theme(t);return e&&(this._dotLottieCore.render(),this._draw()),e}resetTheme(){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.reset_theme();return t&&(this._dotLottieCore.render(),this._draw()),t}setThemeData(t){if(this._dotLottieCore===null)return!1;let e=typeof t=="string"?t:JSON.stringify(t),r=this._dotLottieCore.set_theme_data(e);return r&&(this._dotLottieCore.render(),this._draw()),r}setSlots(t){this._dotLottieCore!==null&&this._dotLottieCore.set_slots_str(JSON.stringify(t))&&(this._dotLottieCore.render(),this._draw())}_isKeyframeArray(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="object"&&t[0]!==null&&"t"in t[0]&&"s"in t[0]}getSlotIds(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.get_slot_ids();return Array.isArray(t)?t:[]}getSlotType(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_type(t);if(e)return e}getSlot(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_str(t);if(e)try{return JSON.parse(e)}catch{return}}getSlots(){if(!this._dotLottieCore)return{};try{return JSON.parse(this._dotLottieCore.get_slots_str())}catch{return{}}}setColorSlot(t,e){if(this._dotLottieCore===null)return!1;let r=this._isKeyframeArray(e),s=JSON.stringify({a:r?1:0,k:e}),i=this._dotLottieCore.set_slot_str(t,s);return this._dotLottieCore.render(),this._draw(),i}setScalarSlot(t,e){if(this._dotLottieCore===null)return!1;let s=JSON.stringify({a:typeof e!="number"?1:0,k:e}),i=this._dotLottieCore.set_slot_str(t,s);return this._dotLottieCore.render(),this._draw(),i}setVectorSlot(t,e){if(this._dotLottieCore===null)return!1;let r=this._isKeyframeArray(e),s=JSON.stringify({a:r?1:0,k:e}),i=this._dotLottieCore.set_slot_str(t,s);return this._dotLottieCore.render(),this._draw(),i}setGradientSlot(t,e,r){if(this._dotLottieCore===null)return!1;let s=this._isKeyframeArray(e),i=JSON.stringify({k:{a:s?1:0,k:e},p:r}),c=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),c}setTextSlot(t,e){if(this._dotLottieCore===null)return!1;let r=this._dotLottieCore.get_slot_str(t),s=e;if(r){let l=JSON.parse(r);if(l&&"k"in l&&Array.isArray(l.k)){let y=l.k[0];"s"in y&&typeof y.s=="object"&&(s={...y.s,...e})}}let i=JSON.stringify({a:0,k:[{t:0,s}]}),c=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),c}async setImageSlot(t,e){if(this._dotLottieCore===null)return!1;let r=await ht(e);if(this._dotLottieCore===null)return!1;let s=this._dotLottieCore.set_image_slot(t,r);return this._dotLottieCore.render(),this._draw(),s}resetSlot(t){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.reset_slot(t);return this._dotLottieCore.render(),this._draw(),e}clearSlot(t){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.clear_slot(t);return this._dotLottieCore.render(),this._draw(),e}resetSlots(){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.reset_slots();return this._dotLottieCore.render(),this._draw(),t}clearSlots(){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.clear_slots();return this._dotLottieCore.render(),this._draw(),t}setLayout(t){this._dotLottieCore!==null&&this._dotLottieCore.set_layout(t.fit??"contain",t.align?.[0]??.5,t.align?.[1]??.5)}setViewport(t,e,r,s){return this._dotLottieCore===null?!1:this._dotLottieCore.set_viewport(t,e,r,s)}static setWasmUrl(t){K().setWasmUrl(t)}static preload(){return K().load()}static async registerFont(t,e){try{await K().load();let r;if(typeof e=="string"){let i=await fetch(e);if(!i.ok)return console.error(`Failed to fetch font from URL: ${e}. Status: ${i.status}`),!1;r=new Uint8Array(await i.arrayBuffer())}else e instanceof Uint8Array?r=e:r=new Uint8Array(e);let s=dt(t,r);return s||console.error(`Failed to register font "${t}". Font data may be invalid.`),s}catch(r){return console.error(`Error registering font "${t}":`,r),!1}}animationSize(){let t=this._dotLottieCore?.animation_size();return{width:t?.[0]??0,height:t?.[1]??0}}stateMachineLoad(t){return this._dotLottieCore?this._dotLottieCore.state_machine_load_from_id(t):!1}stateMachineLoadData(t){return this._dotLottieCore?this._dotLottieCore.state_machine_load(t):!1}stateMachineSetConfig(t){this._stateMachineConfig=t}stateMachineStart(){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction??!0,this._stateMachineConfig?.openUrlPolicy?.whitelist??[]);return this._drainSmEvents(),t&&(this._isStateMachineRunning=!0,this._setupStateMachineListeners(),this._startAnimationLoop()),t}stateMachineStop(){if(!this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_stop();return this._drainSmEvents(),t&&(this._isStateMachineRunning=!1,this._cleanupStateMachineListeners(),this._dotLottieCore.status()!==C.Playing&&this._stopAnimationLoop()),t}stateMachineGetStatus(){return this._dotLottieCore?.sm_status()??""}stateMachineGetCurrentState(){return this._dotLottieCore?.sm_current_state()??""}stateMachineGetActiveId(){return this._dotLottieCore?.state_machine_id()??""}stateMachineOverrideState(t,e=!1){return this._dotLottieCore?.sm_override_current_state(t,e)??!1}stateMachineSetSeed(t){return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(t)))??!1}stateMachineGet(t){return this._dotLottieCore?.get_state_machine(t)??""}stateMachineGetListeners(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_framework_setup();return Array.isArray(t)?t:[]}stateMachineSetBooleanInput(t,e){return this._dotLottieCore?.sm_set_boolean_input(t,e)??!1}stateMachineSetNumericInput(t,e){return this._dotLottieCore?.sm_set_numeric_input(t,e)??!1}stateMachineSetStringInput(t,e){return this._dotLottieCore?.sm_set_string_input(t,e)??!1}stateMachineGetBooleanInput(t){return this._dotLottieCore?.sm_get_boolean_input(t)??void 0}stateMachineGetNumericInput(t){return this._dotLottieCore?.sm_get_numeric_input(t)??void 0}stateMachineGetStringInput(t){return this._dotLottieCore?.sm_get_string_input(t)??void 0}stateMachineGetInputs(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_get_inputs();return Array.isArray(t)?t:[]}stateMachineFireEvent(t){this._dotLottieCore?.sm_fire(t)}stateMachinePostClickEvent(t,e){this._dotLottieCore?.sm_post_click(t,e)}stateMachinePostPointerUpEvent(t,e){this._dotLottieCore?.sm_post_pointer_up(t,e)}stateMachinePostPointerDownEvent(t,e){this._dotLottieCore?.sm_post_pointer_down(t,e)}stateMachinePostPointerMoveEvent(t,e){this._dotLottieCore?.sm_post_pointer_move(t,e)}stateMachinePostPointerEnterEvent(t,e){this._dotLottieCore?.sm_post_pointer_enter(t,e)}stateMachinePostPointerExitEvent(t,e){this._dotLottieCore?.sm_post_pointer_exit(t,e)}_onClick(t){let e=A(t);e&&this.stateMachinePostClickEvent(e.x,e.y)}_onPointerUp(t){let e=A(t);e&&this.stateMachinePostPointerUpEvent(e.x,e.y)}_onPointerDown(t){let e=A(t);e&&this.stateMachinePostPointerDownEvent(e.x,e.y)}_onPointerMove(t){let e=A(t);e&&this.stateMachinePostPointerMoveEvent(e.x,e.y)}_onPointerEnter(t){let e=A(t);e&&this.stateMachinePostPointerEnterEvent(e.x,e.y)}_onPointerLeave(t){let e=A(t);e&&this.stateMachinePostPointerExitEvent(e.x,e.y)}_setupStateMachineListeners(){if(E&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieCore!==null&&this.isLoaded){let t=this.stateMachineGetListeners();this._cleanupStateMachineListeners(),t.includes("Click")&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener("click",this._boundOnClick)),t.includes("PointerUp")&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener("pointerup",this._boundOnPointerUp)),t.includes("PointerDown")&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener("pointerdown",this._boundOnPointerDown)),t.includes("PointerMove")&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener("pointermove",this._boundOnPointerMove)),t.includes("PointerEnter")&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener("pointerenter",this._boundOnPointerEnter)),t.includes("PointerExit")&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener("pointerleave",this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){E&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&(this._canvas.removeEventListener("click",this._boundOnClick),this._boundOnClick=null),this._boundOnPointerUp&&(this._canvas.removeEventListener("pointerup",this._boundOnPointerUp),this._boundOnPointerUp=null),this._boundOnPointerDown&&(this._canvas.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerDown=null),this._boundOnPointerMove&&(this._canvas.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerMove=null),this._boundOnPointerEnter&&(this._canvas.removeEventListener("pointerenter",this._boundOnPointerEnter),this._boundOnPointerEnter=null),this._boundOnPointerLeave&&(this._canvas.removeEventListener("pointerleave",this._boundOnPointerLeave),this._boundOnPointerLeave=null))}};var a=new Map,Ot={ready:n=>t=>{let e={id:"",method:"onReady",result:{instanceId:n,event:t}};self.postMessage(e)},complete:n=>t=>{let e={id:"",method:"onComplete",result:{instanceId:n,event:t}};self.postMessage(e)},load:n=>t=>{let r={id:"",method:"onLoad",result:{instanceId:n,event:t}};self.postMessage(r)},loadError:n=>t=>{let r={id:"",method:"onLoadError",result:{instanceId:n,event:t}};self.postMessage(r)},renderError:n=>t=>{let r={id:"",method:"onRenderError",result:{instanceId:n,event:t}};self.postMessage(r)},loop:n=>t=>{let r={id:"",method:"onLoop",result:{instanceId:n,event:t}};self.postMessage(r)},play:n=>t=>{let r={id:"",method:"onPlay",result:{instanceId:n,event:t}};self.postMessage(r)},pause:n=>t=>{let r={id:"",method:"onPause",result:{instanceId:n,event:t}};self.postMessage(r)},stop:n=>t=>{let r={id:"",method:"onStop",result:{instanceId:n,event:t}};self.postMessage(r)},frame:n=>t=>{let r={id:"",method:"onFrame",result:{instanceId:n,event:t}};self.postMessage(r)},render:n=>t=>{let r={id:"",method:"onRender",result:{instanceId:n,event:t}};self.postMessage(r)},freeze:n=>t=>{let r={id:"",method:"onFreeze",result:{instanceId:n,event:t}};self.postMessage(r)},unfreeze:n=>t=>{let r={id:"",method:"onUnfreeze",result:{instanceId:n,event:t}};self.postMessage(r)},destroy:n=>t=>{let r={id:"",method:"onDestroy",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStart:n=>t=>{let r={id:"",method:"onStateMachineStart",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStop:n=>t=>{let r={id:"",method:"onStateMachineStop",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineTransition:n=>t=>{let r={id:"",method:"onStateMachineTransition",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStateEntered:n=>t=>{let r={id:"",method:"onStateMachineStateEntered",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStateExit:n=>t=>{let r={id:"",method:"onStateMachineStateExit",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineCustomEvent:n=>t=>{let r={id:"",method:"onStateMachineCustomEvent",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineError:n=>t=>{let r={id:"",method:"onStateMachineError",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineBooleanInputValueChange:n=>t=>{let r={id:"",method:"onStateMachineBooleanInputValueChange",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineNumericInputValueChange:n=>t=>{let r={id:"",method:"onStateMachineNumericInputValueChange",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStringInputValueChange:n=>t=>{let r={id:"",method:"onStateMachineStringInputValueChange",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineInputFired:n=>t=>{let r={id:"",method:"onStateMachineInputFired",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineInternalMessage:n=>t=>{let r={id:"",method:"onStateMachineInternalMessage",result:{instanceId:n,event:t}};self.postMessage(r)}},rt={setTransform(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setTransform(n.params.transform)},getTransform(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getTransform()},getDotLottieInstanceState(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return{state:{loopCount:e.loopCount,isLoaded:e.isLoaded,isPaused:e.isPaused,isPlaying:e.isPlaying,isStopped:e.isStopped,isFrozen:e.isFrozen,loop:e.loop,mode:e.mode,speed:e.speed,currentFrame:e.currentFrame,totalFrames:e.totalFrames,duration:e.duration,useFrameInterpolation:e.useFrameInterpolation,renderConfig:e.renderConfig,marker:e.marker,backgroundColor:e.backgroundColor,markers:e.markers(),activeAnimationId:e.activeAnimationId,activeThemeId:e.activeThemeId,autoplay:e.autoplay,segment:e.segment,layout:e.layout,isReady:e.isReady,manifest:e.manifest}}},setLayout(n){let t=n.params.instanceId,e=n.params.layout,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setLayout(e)},stateMachineGetListeners(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetListeners()},stateMachineStart(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineStart()},stateMachineStop(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineStop()},stateMachineLoad(n){let t=n.params.instanceId,e=n.params.stateMachineId,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineLoad(e)},stateMachineLoadData(n){let t=n.params.instanceId,e=n.params.stateMachineData,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineLoadData(e)},stateMachinePostClickEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostClickEvent(e,r)},stateMachinePostPointerUpEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerUpEvent(e,r)},stateMachinePostPointerDownEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerDownEvent(e,r)},stateMachinePostPointerMoveEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerMoveEvent(e,r)},stateMachinePostPointerEnterEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerEnterEvent(e,r)},stateMachinePostPointerExitEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerExitEvent(e,r)},stateMachineSetNumericInput:n=>{let t=n.params.instanceId,e=n.params.name,r=n.params.value,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachineSetNumericInput(e,r)},stateMachineSetBooleanInput:n=>{let t=n.params.instanceId,e=n.params.name,r=n.params.value,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachineSetBooleanInput(e,r)},stateMachineSetConfig:n=>{let t=n.params.instanceId,e=n.params.config,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.stateMachineSetConfig(e)},stateMachineSetStringInput:n=>{let t=n.params.instanceId,e=n.params.name,r=n.params.value,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachineSetStringInput(e,r)},stateMachineGetNumericInput:n=>{let t=n.params.instanceId,e=n.params.name,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineGetNumericInput(e)},stateMachineGetBooleanInput:n=>{let t=n.params.instanceId,e=n.params.name,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineGetBooleanInput(e)},stateMachineGetStringInput:n=>{let t=n.params.instanceId,e=n.params.name,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineGetStringInput(e)},stateMachineGetInputs:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetInputs()},stateMachineFireEvent:n=>{let t=n.params.instanceId,e=n.params.name,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineFireEvent(e)},stateMachineGetStatus:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetStatus()},stateMachineGetCurrentState:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetCurrentState()},stateMachineGetActiveId:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetActiveId()},stateMachineOverrideState:n=>{let t=n.params.instanceId,e=n.params.state,r=n.params.immediate,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachineOverrideState(e,r)},stateMachineSetSeed:n=>{let t=n.params.instanceId,e=n.params.seed,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineSetSeed(e)},stateMachineGet:n=>{let t=n.params.instanceId,e=n.params.stateMachineId,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineGet(e)},create:n=>{let t=n.params.instanceId,e=n.params.config,r=n.params.width,s=n.params.height;if(a.has(t))throw new Error(`Instance with id ${t} already exists.`);let i=new F(e);return i.canvas&&(i.canvas.height=s,i.canvas.width=r),a.set(t,i),["complete","frame","load","loadError","renderError","loop","pause","play","stop","destroy","freeze","unfreeze","render","ready","stateMachineStart","stateMachineStop","stateMachineTransition","stateMachineStateEntered","stateMachineStateExit","stateMachineCustomEvent","stateMachineError","stateMachineBooleanInputValueChange","stateMachineNumericInputValueChange","stateMachineStringInputValueChange","stateMachineInputFired","stateMachineInternalMessage"].forEach(l=>{i.addEventListener(l,Ot[l](t))}),{instanceId:t}},destroy:n=>{let t=n.params.instanceId,e=a.get(t);e&&(e.destroy(),a.delete(t))},freeze:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.freeze()},load:n=>{let t=n.params.instanceId,e=n.params.config,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.load(e)},loadAnimation:n=>{let t=n.params.instanceId,e=n.params.animationId,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.loadAnimation(e)},setTheme:n=>{let t=n.params.instanceId,e=n.params.themeId,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.setTheme(e)},setThemeData:n=>{let t=n.params.instanceId,e=n.params.themeData,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.setThemeData(e)},pause:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.pause()},play:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.play()},registerFont:async n=>{let{fontName:t,fontSource:e}=n.params;return F.registerFont(t,e)},resize:n=>{let t=n.params.instanceId,e=n.params.width,r=n.params.height,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);s.canvas&&(s.canvas.height=r,s.canvas.width=e),s.resize()},setBackgroundColor:n=>{let t=n.params.instanceId,e=n.params.backgroundColor,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setBackgroundColor(e)},setSlots:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.setSlots(n.params.slots)},getSlotIds:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getSlotIds()},getSlotType:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getSlotType(n.params.slotId)},getSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getSlot(n.params.slotId)},getSlots:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getSlots()},setColorSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setColorSlot(n.params.slotId,n.params.value)},setScalarSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setScalarSlot(n.params.slotId,n.params.value)},setVectorSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setVectorSlot(n.params.slotId,n.params.value)},setGradientSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setGradientSlot(n.params.slotId,n.params.value,n.params.colorStopCount)},setTextSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setTextSlot(n.params.slotId,n.params.value)},setImageSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setImageSlot(n.params.slotId,n.params.src)},resetSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.resetSlot(n.params.slotId)},clearSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.clearSlot(n.params.slotId)},resetSlots:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.resetSlots()},clearSlots:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.clearSlots()},setFrame:n=>{let t=n.params.instanceId,e=n.params.frame,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setFrame(e)},setMode:n=>{let t=n.params.instanceId,e=n.params.mode,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setMode(e)},setRenderConfig:n=>{let t=n.params.instanceId,e=n.params.renderConfig,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setRenderConfig(e)},setSegment:n=>{let t=n.params.instanceId,e=n.params.segment,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setSegment(e[0],e[1])},resetSegment:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.resetSegment()},setSpeed:n=>{let t=n.params.instanceId,e=n.params.speed,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setSpeed(e)},setUseFrameInterpolation:n=>{let t=n.params.instanceId,e=n.params.useFrameInterpolation,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setUseFrameInterpolation(e)},setWasmUrl:n=>{F.setWasmUrl(n.params.url)},stop:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.stop()},unfreeze:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.unfreeze()},setViewport(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=n.params.width,i=n.params.height,c=a.get(t);if(!c)throw new Error(`Instance with id ${t} does not exist.`);return c.setViewport(e,r,s,i)},animationSize(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);let{height:r,width:s}=e.animationSize();return{height:r,width:s}},setMarker(n){let t=n.params.instanceId,e=n.params.marker,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setMarker(e)},setLoop(n){let t=n.params.instanceId,e=n.params.loop,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setLoop(e)},setLoopCount(n){let t=n.params.instanceId,e=n.params.loopCount,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setLoopCount(e)}};function Bt(n){let t=n.method;if(Object.hasOwn(rt,t)&&typeof rt[t]=="function")return rt[t](n);throw new Error(`Method ${String(t)} is not implemented in commands.`)}self.onmessage=async n=>{try{let t=await Bt(n.data),e={id:n.data.id,method:n.data.method,result:t};self.postMessage(e)}catch(t){let e={id:n.data.id,method:n.data.method,error:t.message};self.postMessage(e)}};var Dt="",ce=Dt;})();\n'],{type:
5"application/javascript"}),e=URL.createObjectURL(t),n=new Worker(e);return URL.revokeObjectURL(e),n}},tt=class{constructor(){s(this,"_workers",new Map),s(this,"_animationWorkerMap",new Map),s(this,"_eventHandlers",new Map),s(this,"_rpcHandlers",new Map),s(this,"_routeMessage",t=>{let e=t.data;if(e.id){let n=this._rpcHandlers.get(e.id);n&&n(t);return}let n=e.result?.instanceId;if(n){let e=this._eventHandlers.get(n);e&&e(t)}
5})}getWorker(t){let e=this._workers.get(t);return e||((e=new Z).addEventListener("message",this._routeMessage),this._workers.set(t,e)),e}assignAnimationToWorker(t,e){this._animationWorkerMap.set(t,e)}unassignAnimationFromWorker(t){this._animationWorkerMap.delete(t)}sendMessage(t,e,n){this.getWorker(t).postMessage(e,n||[])}broadcastMessage(t,e){this._workers.forEach(n=>{n.postMessage(t,e||[])})}terminateWorker(t){let e=this._workers.get(t);e&&(e.removeEventListener("message",this._routeMessage),e.terminate(),this._workers.delete(t))}registerEventHandler(t,e){this._eventHandlers.set(t,e)}unregisterEventHandler(t){this._eventHandlers.delete(t)}registerRpcReplyHandler(t,e){this._rpcHandlers.set(t,e)}unregisterRpcReplyHandler(t){this._rpcHandlers.delete(t)}};function te(t,e){if("u">typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement){let{height:n,width:r}=t.getBoundingClientRect();if(0!==n&&0!==r)return{width:r*e,height:n*e}}return{width:t.width,height:t.height}}function tn(){return Date.now().toString(36)+Math.random().toString(36).substr(2,9)}let tr=null;function ti(){return tr??(tr=new tt),tr}function ts(t,e){return{id:`dotlottie-request-${tn()}`,method:t,params:e}}let ta="",to=new Map,t_=!1;function td(t){let{assetResolver:e,...n}=t;return void 0===e||t_||(t_=!0,console.warn("[dotlottie-web] `assetResolver` is not supported by DotLottieWorker and has been ignored: a resolver must run synchronously, which is not possible across the worker boundary. Use `DotLottie` instead if the animation references assets it does not embed.")),n}var tl=class{constructor(t){if(s(this,"_eventManager",new z),s(this,"_id",void 0),s(this,"_workerId",void 0),s(this,"_worker",void 0),s(this,"_canvas",void 0),s(this,"_dotLottieInstanceState",{loopCount:0,markers:[],autoplay:!1,backgroundColor:"",currentFrame:0,duration:0,loop:!1,mode:"forward",segment:[0,0],speed:1,totalFrames:0,isLoaded:!1,isPlaying:!1,isPaused:!1,isStopped:!0,isFrozen:!1,useFrameInterpolation:!1,renderConfig:{devicePixelRatio:N()},activeAnimationId:"",activeThemeId:"",layout:void 0,marker:"",isReady:!1,manifest:null}),s(this,"_created",!1),s(this,"_retired",!1),s(this,"_boundOnClick",null),s(this,"_boundOnPointerUp",null),s(this,"_boundOnPointerDown",null),s(this,"_boundOnPointerMove",null),s(this,"_boundOnPointerEnter",null),s(this,"_boundOnPointerLeave",null),s(this,"_pendingConfig",null),t.canvas){let e="u">typeof HTMLCanvasElement&&t.canvas instanceof HTMLCanvasElement,n="u">typeof OffscreenCanvas&&t.canvas instanceof OffscreenCanvas;if(!e&&!n)throw Error("Worker-based DotLottie requires HTMLCanvasElement or OffscreenCanvas")}this._canvas=t.canvas??null,this._id=`dotlottie-${tn()}`,this._workerId=t.workerId||"defaultWorker",this._worker=ti().getWorker(this._workerId),ti().assignAnimationToWorker(this._id,this._workerId),ta&&this._sendMessage("setWasmUrl",{url:ta});let e={...t,renderConfig:{...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||N(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0}};this._pendingConfig=e,this._canvas&&(this._create(e),this._pendingConfig=null),ti().registerEventHandler(this._id,this._handleWorkerEvent.bind(this))}async _handleWorkerEvent(t){let e=t.data;if(!e.id&&("onLoad"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event),d&&this._canvas instanceof HTMLCanvasElement&&(this._dotLottieInstanceState.renderConfig.freezeOnOffscreen&&($.observe(this._canvas,this),H(this._canvas)||await this.freeze()),this._dotLottieInstanceState.renderConfig.autoResize&&U.observe(this._canvas,this))),"onComplete"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onDestroy"===e.method&&e.result.instanceId===this._id&&this._eventManager.dispatch(e.result.event),"onUnfreeze"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._dotLottieInstanceState.isFrozen=!1,this._eventManager.dispatch(e.result.event)),"onFrame"===e.method&&e.result.instanceId===this._id&&(this._dotLottieInstanceState.currentFrame=e.result.event.currentFrame,this._eventManager.dispatch(e.result.event)),"onRender"===e.method&&e.result.instanceId===this._id&&this._eventManager.dispatch(e.result.event),"onFreeze"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onPause"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onPlay"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStop"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onLoadError"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onRenderError"===e.method&&e.result.instanceId===this._id&&this._eventManager.dispatch(e.result.event),"onReady"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onLoop"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineStart"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._setupStateMachineListeners(),this._eventManager.dispatch(e.result.event)),"onStateMachineStop"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._cleanupStateMachineListeners(),this._eventManager.dispatch(e.result.event)),"onStateMachineTransition"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineStateEntered"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineStateExit"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineCustomEvent"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineError"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineBooleanInputValueChange"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineNumericInputValueChange"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineStringInputValueChange"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineInputFired"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineInternalMessage"===e.method&&e.result.instanceId===this._id)){await this._updateDotLottieInstanceState();let t=e.result.event;t.message.startsWith("OpenUrl: ")&&V(t.message)}}async _create(t){let e;if(!this._canvas)return;if(this._canvas instanceof HTMLCanvasElement){let n=to.get(this._canvas);if(n&&n.workerId===this._workerId){await this._adopt(n,t);return}e=this._canvas.transferControlToOffscreen(),to.set(this._canvas,{destroyTimer:null,facade:this,instanceId:this._id,workerId:this._workerId})}else e=this._canvas;let{instanceId:n}=await this._sendMessage("create",{instanceId:this._id,config:{...td(t),canvas:e},...te(this._canvas,t.renderConfig?.devicePixelRatio||N())},[e]);if(n!==this._id)throw Error("Instance ID mismatch");this._retired||(this._created=!0,await this._updateDotLottieInstanceState())}async _adopt(t,e){null===t.destroyTimer?t.facade._retire():(clearTimeout(t.destroyTimer),t.destroyTimer=null),ti().unassignAnimationFromWorker(this._id),this._id=t.instanceId,ti().assignAnimationToWorker(this._id,this._workerId),t.facade=this,this._created=!0;let{canvas:n,...r}=td(e);await this._sendMessage("load",{config:r,instanceId:this._id}),await this._updateDotLottieInstanceState()}_retire(){this._retired=!0,this._created&&(this._created=!1,this._cleanupStateMachineListeners(),this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),d&&this._canvas instanceof HTMLCanvasElement&&($.unobserve(this._canvas),U.unobserve(this._canvas)))}get loopCount(){return this._dotLottieInstanceState.loopCount}get isLoaded(){return this._dotLottieInstanceState.isLoaded}get isPlaying(){return this._dotLottieInstanceState.isPlaying}
5get isPaused(){return this._dotLottieInstanceState.isPaused}get isStopped(){return this._dotLottieInstanceState.isStopped}get currentFrame(){return this._dotLottieInstanceState.currentFrame}get isFrozen(){return this._dotLottieInstanceState.isFrozen}get totalFrames(){return this._dotLottieInstanceState.totalFrames}get segment(){return this._dotLottieInstanceState.segment}get speed(){return this._dotLottieInstanceState.speed}get duration(){return this._dotLottieInstanceState.duration}get isReady(){return this._dotLottieInstanceState.isReady}get mode(){return this._dotLottieInstanceState.mode}get canvas(){return this._canvas}async setCanvas(t){let e="u">typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement,n="u">typeof OffscreenCanvas&&t instanceof OffscreenCanvas;if(!e&&!n)throw Error("Worker-based DotLottie requires HTMLCanvasElement or OffscreenCanvas");if(this._canvas!==t){if(this._created&&null!==this._canvas)throw Error("Cannot change canvas after worker instance is already created with a different canvas.");this._canvas=t,!this._created&&this._pendingConfig&&(await this._create(this._pendingConfig),this._pendingConfig=null)}}get autoplay(){return this._dotLottieInstanceState.autoplay}get backgroundColor(){return this._dotLottieInstanceState.backgroundColor}get loop(){return this._dotLottieInstanceState.loop}get useFrameInterpolation(){return this._dotLottieInstanceState.useFrameInterpolation}get renderConfig(){return this._dotLottieInstanceState.renderConfig}get manifest(){return this._dotLottieInstanceState.manifest}get activeAnimationId(){return this._dotLottieInstanceState.activeAnimationId}get marker(){return this._dotLottieInstanceState.marker}get activeThemeId(){return this._dotLottieInstanceState.activeThemeId}get layout(){return this._dotLottieInstanceState.layout}async play(){this._created&&(await this._sendMessage("play",{instanceId:this._id}),await this._updateDotLottieInstanceState(),d&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieInstanceState.renderConfig.freezeOnOffscreen&&!H(this._canvas)&&await this.freeze())}async pause(){this._created&&(await this._sendMessage("pause",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async stop(){this._created&&(await this._sendMessage("stop",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async setSpeed(t){this._created&&(await this._sendMessage("setSpeed",{instanceId:this._id,speed:t}),await this._updateDotLottieInstanceState())}async setMode(t){this._created&&(await this._sendMessage("setMode",{instanceId:this._id,mode:t}),await this._updateDotLottieInstanceState())}async setFrame(t){this._created&&(await this._sendMessage("setFrame",{frame:t,instanceId:this._id}),await this._updateDotLottieInstanceState())}async setSegment(t,e){this._created&&(await this._sendMessage("setSegment",{instanceId:this._id,segment:[t,e]}),await this._updateDotLottieInstanceState())}async resetSegment(){this._created&&(await this._sendMessage("resetSegment",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async setRenderConfig(t){if(!this._created)return;let{devicePixelRatio:e,freezeOnOffscreen:n,quality:r,...i}=t;await this._sendMessage("setRenderConfig",{instanceId:this._id,renderConfig:{...this._dotLottieInstanceState.renderConfig,...i,devicePixelRatio:e||N(),freezeOnOffscreen:n??!0,...void 0!==r&&{quality:r}}}),await this._updateDotLottieInstanceState(),d&&this._canvas instanceof HTMLCanvasElement&&(this._dotLottieInstanceState.renderConfig.autoResize?U.observe(this._canvas,this):U.unobserve(this._canvas),this._dotLottieInstanceState.renderConfig.freezeOnOffscreen?($.observe(this._canvas,this),H(this._canvas)||await this.freeze()):($.unobserve(this._canvas),this._dotLottieInstanceState.isFrozen&&await this.unfreeze()))}async setUseFrameInterpolation(t){this._created&&(await this._sendMessage("setUseFrameInterpolation",{instanceId:this._id,useFrameInterpolation:t}),await this._updateDotLottieInstanceState())}async setTheme(t){if(!this._created)return!1;let e=await this._sendMessage("setTheme",{instanceId:this._id,themeId:t});return await this._updateDotLottieInstanceState(),e}
5async load(t){if(!this._created){this._pendingConfig&&(this._pendingConfig={...this._pendingConfig,...t});return}await this._sendMessage("load",{config:td(t),instanceId:this._id}),await this._updateDotLottieInstanceState()}async setLoop(t){this._created&&(await this._sendMessage("setLoop",{instanceId:this._id,loop:t}),await this._updateDotLottieInstanceState())}async setLoopCount(t){this._created&&(await this._sendMessage("setLoopCount",{instanceId:this._id,loopCount:t}),await this._updateDotLottieInstanceState())}async resize(){if(!this._created||!this._canvas)return;let{height:t,width:e}=te(this._canvas,this._dotLottieInstanceState.renderConfig.devicePixelRatio||N());await this._sendMessage("resize",{height:t,instanceId:this._id,width:e}),await this._updateDotLottieInstanceState()}async destroy(){if(!this._created)return;let t=this._canvas,e=t instanceof HTMLCanvasElement?to.get(t):void 0;this._retire(),e&&e.facade===this?e.destroyTimer=setTimeout(()=>{to.delete(t),this._finalizeDestroy()},0):await this._finalizeDestroy()}async _finalizeDestroy(){ti().unregisterEventHandler(this._id),ti().unassignAnimationFromWorker(this._id),await this._sendMessage("destroy",{instanceId:this._id})}async freeze(){this._created&&(await this._sendMessage("freeze",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async unfreeze(){this._created&&(await this._sendMessage("unfreeze",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async setBackgroundColor(t){this._created&&(await this._sendMessage("setBackgroundColor",{instanceId:this._id,backgroundColor:t}),await this._updateDotLottieInstanceState())}async loadAnimation(t){this._created&&(await this._sendMessage("loadAnimation",{animationId:t,instanceId:this._id}),await this._updateDotLottieInstanceState())}async setLayout(t){this._created&&(await this._sendMessage("setLayout",{instanceId:this._id,layout:t}),await this._updateDotLottieInstanceState())}async setSlots(t){this._created&&await this._sendMessage("setSlots",{instanceId:this._id,slots:t})}async getSlotIds(){return this._created?this._sendMessage("getSlotIds",{instanceId:this._id}):[]}async getSlotType(t){if(this._created)return this._sendMessage("getSlotType",{instanceId:this._id,slotId:t})}async getSlot(t){if(this._created)return this._sendMessage("getSlot",{instanceId:this._id,slotId:t})}async getSlots(){return this._created?this._sendMessage("getSlots",{instanceId:this._id}):{}}async setColorSlot(t,e){return!!this._created&&this._sendMessage("setColorSlot",{instanceId:this._id,slotId:t,value:e})}async setScalarSlot(t,e){return!!this._created&&this._sendMessage("setScalarSlot",{instanceId:this._id,slotId:t,value:e})}async setVectorSlot(t,e){return!!this._created&&this._sendMessage("setVectorSlot",{instanceId:this._id,slotId:t,value:e})}async setGradientSlot(t,e,n){return!!this._created&&this._sendMessage("setGradientSlot",{instanceId:this._id,slotId:t,value:e,colorStopCount:n})}async setTextSlot(t,e){return!!this._created&&this._sendMessage("setTextSlot",{instanceId:this._id,slotId:t,value:e})}async setImageSlot(t,e){if(!this._created)return!1;let n=await q(e);return this._sendMessage("setImageSlot",{instanceId:this._id,slotId:t,src:n})}async resetSlot(t){return!!this._created&&this._sendMessage("resetSlot",{instanceId:this._id,slotId:t})}async clearSlot(t){return!!this._created&&this._sendMessage("clearSlot",{instanceId:this._id,slotId:t})}async resetSlots(){return!!this._created&&this._sendMessage("resetSlots",{instanceId:this._id})}async clearSlots(){return!!this._created&&this._sendMessage("clearSlots",{instanceId:this._id})}async _updateDotLottieInstanceState(){if(!this._created)return;let t=await this._sendMessage("getDotLottieInstanceState",{instanceId:this._id});this._dotLottieInstanceState=t.state}markers(){return this._dotLottieInstanceState.markers}async setMarker(t){this._created&&(await this._sendMessage("setMarker",{instanceId:this._id,marker:t}),await this._updateDotLottieInstanceState())}async setThemeData(t){if(!this._created)return!1;let e=await this._sendMessage("setThemeData",{instanceId:this._id,themeData:t});return await this._updateDotLottieInstanceState(),e}async setViewport(t,e,n,r){return!!this._created&&this._sendMessage("setViewport",{x:t,y:e,width:n,height:r,instanceId:this._id})}async animationSize(){return this._created?this._sendMessage("animationSize",{instanceId:this._id}):{height:0,width:0}}async setTransform(t){return!!this._created&&this._sendMessage("setTransform",{instanceId:this._id,transform:t})}async getTransform(){if(this._created)return this._sendMessage("getTransform",{instanceId:this._id})}async _sendMessage(t,e,n){let r=ts(t,e);return new Promise((e,i)=>
5{ti().registerRpcReplyHandler(r.id,n=>{ti().unregisterRpcReplyHandler(r.id);let s=n.data;s.error?i(Error(`Failed to execute method ${t}: ${s.error}`)):e(s.result)}),this._worker.postMessage(r,n||[])})}addEventListener(t,e){this._eventManager.addEventListener(t,e)}removeEventListener(t,e){this._eventManager.removeEventListener(t,e)}static setWasmUrl(t){if("string"!=typeof t||""===t.trim())throw TypeError("setWasmUrl() expects a non-empty URL string");ta=typeof document>"u"?t:new URL(t,document.baseURI).href,ti().broadcastMessage(ts("setWasmUrl",{url:ta}))}static async registerFont(t,e){try{return ti().broadcastMessage(ts("registerFont",{fontName:t,fontSource:e})),!0}catch(e){return console.error(`Error broadcasting registerFont for "${t}":`,e),!1}}async stateMachineLoad(t){if(!this._created)return!1;let e=await this._sendMessage("stateMachineLoad",{instanceId:this._id,stateMachineId:t});return await this._updateDotLottieInstanceState(),e}async stateMachineLoadData(t){if(!this._created)return!1;let e=await this._sendMessage("stateMachineLoadData",{instanceId:this._id,stateMachineData:t});return await this._updateDotLottieInstanceState(),e}async stateMachineStart(){if(!this._created)return!1;let t=await this._sendMessage("stateMachineStart",{instanceId:this._id});return t&&(this._setupStateMachineListeners(),await this._updateDotLottieInstanceState()),t}async stateMachineStop(){return!!this._created&&(this._cleanupStateMachineListeners(),this._sendMessage("stateMachineStop",{instanceId:this._id}))}async stateMachineSetNumericInput(t,e){return!!this._created&&this._sendMessage("stateMachineSetNumericInput",{instanceId:this._id,name:t,value:e})}async stateMachineSetBooleanInput(t,e){return!!this._created&&this._sendMessage("stateMachineSetBooleanInput",{instanceId:this._id,name:t,value:e})}async stateMachineSetConfig(t){this._created&&this._sendMessage("stateMachineSetConfig",{instanceId:this._id,config:t})}async stateMachineSetStringInput(t,e){return!!this._created&&this._sendMessage("stateMachineSetStringInput",{instanceId:this._id,name:t,value:e})}async stateMachineGetNumericInput(t){if(this._created)return this._sendMessage("stateMachineGetNumericInput",{instanceId:this._id,name:t})}async stateMachineGetBooleanInput(t){if(this._created)return this._sendMessage("stateMachineGetBooleanInput",{instanceId:this._id,name:t})}async stateMachineGetStringInput(t){if(this._created)return this._sendMessage("stateMachineGetStringInput",{instanceId:this._id,name:t})}async stateMachineGetInputs(){if(this._created)return this._sendMessage("stateMachineGetInputs",{instanceId:this._id})}async stateMachineFireEvent(t){this._created&&this._sendMessage("stateMachineFireEvent",{instanceId:this._id,name:t})}async stateMachineGetStatus(){return this._created?this._sendMessage("stateMachineGetStatus",{instanceId:this._id}):""}async stateMachineGetCurrentState(){return this._created?this._sendMessage("stateMachineGetCurrentState",{instanceId:this._id}):""}async stateMachineGetActiveId(){return this._created?this._sendMessage("stateMachineGetActiveId",{instanceId:this._id}):""}async stateMachineOverrideState(t,e=!1){return!!this._created&&this._sendMessage("stateMachineOverrideState",{instanceId:this._id,state:t,immediate:e})}async stateMachineSetSeed(t){return!!this._created&&this._sendMessage("stateMachineSetSeed",{instanceId:this._id,seed:t})}async stateMachineGet(t){return this._created?this._sendMessage("stateMachineGet",{instanceId:this._id,stateMachineId:t}):""}async stateMachineGetListeners(){return this._created?this._sendMessage("stateMachineGetListeners",{instanceId:this._id}):[]}async stateMachinePostClickEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostClickEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerUpEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerUpEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerDownEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerDownEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerMoveEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerMoveEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerEnterEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerEnterEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerExitEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerExitEvent",{instanceId:this._id,x:t,y:e})}_onClick(t){let e=G(t);e&&this._sendMessage("stateMachinePostClickEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerUp(t){let e=G(t);e&&this._sendMessage("stateMachinePostPointerUpEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerDown(t){let e=G(t);e&&this._sendMessage("stateMachinePostPointerDownEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerMove(t){let e=G(t);e&&this._sendMessage("stateMachinePostPointerMoveEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerEnter(t){let e=G(t);e&&this._sendMessage("stateMachinePostPointerEnterEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerLeave(t){let e=G(t);e&&this._sendMessage("stateMachinePostPointerExitEvent",{instanceId:this._id,x:e.x,y:e.y})}async _setupStateMachineListeners(){if(d&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded){let t=await this._sendMessage("stateMachineGetListeners",{instanceId:this._id});0!==t.length&&(this._cleanupStateMachineListeners(),t.includes("Click")&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener("click",this._boundOnClick)),t.includes("PointerUp")&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener("pointerup",this._boundOnPointerUp)),t.includes("PointerDown")&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener("pointerdown",this._boundOnPointerDown)),t.includes("PointerMove")&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener("pointermove",this._boundOnPointerMove)),t.includes("PointerEnter")&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener("pointerenter",this._boundOnPointerEnter)),t.includes("PointerExit")&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener("pointerleave",this._boundOnPointerLeave)))}}_cleanupStateMachineListeners(){d&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&(this._canvas.removeEventListener("click",this._boundOnClick),this._boundOnClick=null),this._boundOnPointerUp&&(this._canvas.removeEventListener("pointerup",this._boundOnPointerUp),this._boundOnPointerUp=null),this._boundOnPointerDown&&(this._canvas.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerDown=null),this._boundOnPointerMove&&(this._canvas.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerMove=null),this._boundOnPointerEnter&&(this._canvas.removeEventListener("pointerenter",this._boundOnPointerEnter),this._boundOnPointerEnter=null),this._boundOnPointerLeave&&(this._canvas.removeEventListener("pointerleave",this._boundOnPointerLeave),this._boundOnPointerLeave=null))}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.