@lottiefiles/dotlottie-web 0.66.0 → 0.66.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},a=class{constructor(){r(this,`_lastHandleId`,0),r(this,`_lastImmediate`,null)}requestAnimationFrame(e){return this._lastHandleId>=2**53-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(Date.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},o=class{constructor(){r(this,`_strategy`,void 0),this._strategy=typeof requestAnimationFrame==`function`?new i:new a}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}};const s=typeof window<`u`&&window.document!==void 0,c=new Uint8Array([80,75,3,4]),l=[`v`,`ip`,`op`,`layers`,`fr`,`w`,`h`],u=`0.66.0`,d=`@lottiefiles/dotlottie-web`;let f;function p(e){let t=f.__externref_table_alloc_command_export();return f.__wbindgen_export_2.set(t,e),t}function m(e,t){try{return e.apply(this,t)}catch(e){let t=p(e);f.__wbindgen_exn_store_command_export(t)}}let h=0,g=null;function _(){return(g===null||g.byteLength===0)&&(g=new Uint8Array(f.memory.buffer)),g}const v=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}},y=typeof v.encodeInto==`function`?function(e,t){return v.encodeInto(e,t)}:function(e,t){let n=v.encode(e);return t.set(n),{read:e.length,written:n.length}};function b(e,t,n){if(n===void 0){let n=v.encode(e),r=t(n.length,1)>>>0;return _().subarray(r,r+n.length).set(n),h=n.length,r}let r=e.length,i=t(r,1)>>>0,a=_(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=_().subarray(i+o,i+r),a=y(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return h=o,i}function x(e){return e==null}let S=null;function C(){return(S===null||S.buffer.detached===!0||S.buffer.detached===void 0&&S.buffer!==f.memory.buffer)&&(S=new DataView(f.memory.buffer)),S}const w=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&w.decode();function T(e,t){return e>>>=0,w.decode(_().subarray(e,e+t))}function E(e,t){let n=t(e.length*1,1)>>>0;return _().set(e,n/1),h=e.length,n}let D=null;function O(){return(D===null||D.byteLength===0)&&(D=new Float32Array(f.memory.buffer)),D}function k(e,t){let n=t(e.length*4,4)>>>0;return O().set(e,n/4),h=e.length,n}function A(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=p(e[t]);C().setUint32(n+4*t,r,!0)}return h=e.length,n}function j(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=E(t,f.__wbindgen_malloc_command_export),a=h;return f.register_font(n,r,i,a)!==0}const M=Object.freeze({Forward:0,0:`Forward`,Reverse:1,1:`Reverse`,Bounce:2,2:`Bounce`,ReverseBounce:3,3:`ReverseBounce`}),N=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>f.__wbg_dotlottieplayerwasm_free(e>>>0,1));var P=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){let e=this.__destroy_into_raw();f.__wbg_dotlottieplayerwasm_free(e,0)}constructor(){return this.__wbg_ptr=f.dotlottieplayerwasm_new()>>>0,N.register(this,this.__wbg_ptr,this),this}load_animation(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_load_animation(this.__wbg_ptr,r,i,t,n)!==0}load_dotlottie_data(e,t,n){let r=E(e,f.__wbindgen_malloc_command_export),i=h;return f.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,r,i,t,n)!==0}load_animation_from_id(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,r,i,t,n)!==0}tick(){return f.dotlottieplayerwasm_tick(this.__wbg_ptr)!==0}render(){return f.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}clear(){f.dotlottieplayerwasm_clear(this.__wbg_ptr)}resize(e,t){return f.dotlottieplayerwasm_resize(this.__wbg_ptr,e,t)!==0}get_pixel_buffer(){return f.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr)}play(){return f.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}pause(){return f.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}stop(){return f.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}is_playing(){return f.dotlottieplayerwasm_is_playing(this.__wbg_ptr)!==0}is_paused(){return f.dotlottieplayerwasm_is_paused(this.__wbg_ptr)!==0}is_stopped(){return f.dotlottieplayerwasm_is_stopped(this.__wbg_ptr)!==0}is_loaded(){return f.dotlottieplayerwasm_is_loaded(this.__wbg_ptr)!==0}is_complete(){return f.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}is_tweening(){return f.dotlottieplayerwasm_is_tweening(this.__wbg_ptr)!==0}current_frame(){return f.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}total_frames(){return f.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}request_frame(){return f.dotlottieplayerwasm_request_frame(this.__wbg_ptr)}set_frame(e){return f.dotlottieplayerwasm_set_frame(this.__wbg_ptr,e)!==0}seek(e){return f.dotlottieplayerwasm_seek(this.__wbg_ptr,e)!==0}duration(){return f.dotlottieplayerwasm_duration(this.__wbg_ptr)}segment_duration(){return f.dotlottieplayerwasm_segment_duration(this.__wbg_ptr)}current_loop_count(){return f.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}reset_current_loop_count(){f.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}width(){return f.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return f.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}animation_size(){return f.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}mode(){return f.dotlottieplayerwasm_mode(this.__wbg_ptr)}set_mode(e){f.dotlottieplayerwasm_set_mode(this.__wbg_ptr,e)}speed(){return f.dotlottieplayerwasm_speed(this.__wbg_ptr)}set_speed(e){f.dotlottieplayerwasm_set_speed(this.__wbg_ptr,e)}loop_animation(){return f.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_loop(e){f.dotlottieplayerwasm_set_loop(this.__wbg_ptr,e)}loop_count(){return f.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}set_loop_count(e){f.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,e)}autoplay(){return f.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}set_autoplay(e){f.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,e)}use_frame_interpolation(){return f.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}set_use_frame_interpolation(e){f.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,e)}background_color(){return f.dotlottieplayerwasm_background_color(this.__wbg_ptr)>>>0}set_background_color(e){return f.dotlottieplayerwasm_set_background_color(this.__wbg_ptr,e)!==0}clear_background_color(){return f.dotlottieplayerwasm_clear_background_color(this.__wbg_ptr)!==0}set_quality(e){return f.dotlottieplayerwasm_set_quality(this.__wbg_ptr,e)!==0}has_segment(){return f.dotlottieplayerwasm_has_segment(this.__wbg_ptr)!==0}segment_start(){return f.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}segment_end(){return f.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_segment(e,t){return f.dotlottieplayerwasm_set_segment(this.__wbg_ptr,e,t)!==0}clear_segment(){return f.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}set_layout(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,i,t,n)!==0}layout_fit(){let e,t;try{let n=f.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}layout_align_x(){return f.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return f.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}set_viewport(e,t,n,r){return f.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,e,t,n,r)!==0}set_color_slot(e,t,n,r){let i=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;return f.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,a,t,n,r)!==0}set_scalar_slot(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,t)!==0}set_text_slot(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=b(t,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;return f.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,i,a)!==0}set_vector_slot(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,i,t,n)!==0}set_position_slot(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,i,t,n)!==0}clear_slots(){return f.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}clear_slot(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,t,n)!==0}set_slots_str(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,t,n)!==0}set_slot_str(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=b(t,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;return f.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,i,a)!==0}get_slot_str(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=T(r[0],r[1]).slice(),f.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}get_slots_str(){let e,t;try{let n=f.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}get_slot_ids(){return f.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr)}get_slot_type(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=T(r[0],r[1]).slice(),f.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}reset_slot(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,t,n)!==0}reset_slots(){return f.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}intersect(e,t,n){let r=b(n,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_intersect(this.__wbg_ptr,e,t,r,i)!==0}get_layer_bounds(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_get_layer_bounds(this.__wbg_ptr,t,n)}get_transform(){return f.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}set_transform(e){let t=k(e,f.__wbindgen_malloc_command_export),n=h;return f.dotlottieplayerwasm_set_transform(this.__wbg_ptr,t,n)!==0}tween(e,t){return f.dotlottieplayerwasm_tween(this.__wbg_ptr,e,x(t)?4294967297:Math.fround(t))!==0}tween_with_easing(e,t,n,r,i,a){return f.dotlottieplayerwasm_tween_with_easing(this.__wbg_ptr,e,x(t)?4294967297:Math.fround(t),n,r,i,a)!==0}tween_stop(){return f.dotlottieplayerwasm_tween_stop(this.__wbg_ptr)!==0}tween_update(e){return f.dotlottieplayerwasm_tween_update(this.__wbg_ptr,x(e)?4294967297:Math.fround(e))!==0}tween_to_marker(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_tween_to_marker(this.__wbg_ptr,n,r,x(t)?4294967297:Math.fround(t))!==0}markers(){return f.dotlottieplayerwasm_markers(this.__wbg_ptr)}marker_names(){return f.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}current_marker(){let e=f.dotlottieplayerwasm_current_marker(this.__wbg_ptr),t;return e[0]!==0&&(t=T(e[0],e[1]).slice(),f.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}set_marker(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;f.dotlottieplayerwasm_set_marker(this.__wbg_ptr,t,n)}clear_marker(){f.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}poll_event(){return f.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}emit_on_loop(){f.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}load_font(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=E(t,f.__wbindgen_malloc_command_export),a=h;return f.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,i,a)!==0}static unload_font(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_unload_font(t,n)!==0}set_theme(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_set_theme(this.__wbg_ptr,t,n)!==0}reset_theme(){return f.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}set_theme_data(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,t,n)!==0}theme_id(){let e=f.dotlottieplayerwasm_theme_id(this.__wbg_ptr),t;return e[0]!==0&&(t=T(e[0],e[1]).slice(),f.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}animation_id(){let e=f.dotlottieplayerwasm_animation_id(this.__wbg_ptr),t;return e[0]!==0&&(t=T(e[0],e[1]).slice(),f.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}manifest_string(){let e,t;try{let n=f.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}get_state_machine(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=T(r[0],r[1]).slice(),f.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}state_machine_id(){let e=f.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),t;return e[0]!==0&&(t=T(e[0],e[1]).slice(),f.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}state_machine_load(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,t,n)!==0}state_machine_load_from_id(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,t,n)!==0}state_machine_unload(){f.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_fire(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,t,n)!==0}sm_set_numeric_input(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,t)!==0}sm_get_numeric_input(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,t,n);return r===4294967297?void 0:r}sm_set_string_input(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=b(t,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;return f.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,i,a)!==0}sm_get_string_input(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=T(r[0],r[1]).slice(),f.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}sm_set_boolean_input(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,t)!==0}sm_get_boolean_input(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,t,n);return r===16777215?void 0:r!==0}sm_reset_input(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;f.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,t,n)}sm_poll_event(){return f.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr)}sm_start(e,t){let n=A(t,f.__wbindgen_malloc_command_export),r=h;return f.dotlottieplayerwasm_sm_start(this.__wbg_ptr,e,n,r)!==0}sm_stop(){return f.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_status(){let e,t;try{let n=f.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}sm_current_state(){let e,t;try{let n=f.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}sm_override_current_state(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,t)!==0}sm_framework_setup(){return f.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr)}sm_get_inputs(){return f.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr)}sm_post_click(e,t){f.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,e,t)}sm_post_pointer_down(e,t){f.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,e,t)}sm_post_pointer_up(e,t){f.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,e,t)}sm_post_pointer_move(e,t){f.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,e,t)}sm_post_pointer_enter(e,t){f.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,e,t)}sm_post_pointer_exit(e,t){f.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,e,t)}sm_poll_internal_event(){return f.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}sm_tick(){return f.dotlottieplayerwasm_sm_tick(this.__wbg_ptr)!==0}};async function F(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.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",t);else throw t}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function I(){let e={};return e.wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_new_405e22f390576ce2=function(){return{}},e.wbg.__wbg_new_78feb108b6472713=function(){return[]},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},e.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(e){return new Float32Array(e>>>0)},e.wbg.__wbg_now_807e54c39636c349=function(){return Date.now()},e.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return m(function(e,t,n){return Reflect.set(e,t,n)},arguments)},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(e,t,n){e[t>>>0]=n},e.wbg.__wbindgen_init_externref_table=function(){let e=f.__wbindgen_export_2,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},e.wbg.__wbindgen_memory=function(){return f.memory},e.wbg.__wbindgen_number_new=function(e){return e},e.wbg.__wbindgen_string_get=function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=x(r)?0:b(r,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;C().setInt32(e+4,a,!0),C().setInt32(e+0,i,!0)},e.wbg.__wbindgen_string_new=function(e,t){return T(e,t)},e.wbg.__wbindgen_throw=function(e,t){throw Error(T(e,t))},e}function L(e,t){return f=e.exports,R.__wbindgen_wasm_module=t,S=null,D=null,g=null,f.__wbindgen_start(),f}async function R(e){if(f!==void 0)return f;if(e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0)throw Error(`WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().`);let t=I();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await F(await e,t);return L(n,r)}var z=class{constructor(){r(this,`_eventListeners`,new Map)}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){let n=this._eventListeners.get(e);n&&(t?(n.delete(t),n.size===0&&this._eventListeners.delete(e)):this._eventListeners.delete(e))}dispatch(e){this._eventListeners.get(e.type)?.forEach(t=>t(e))}removeAllEventListeners(){this._eventListeners.clear()}},B=class e{static _initializeObserver(){e._observer||(e._observer=new IntersectionObserver(t=>{t.forEach(t=>{let n=e._observedCanvases.get(t.target);n&&(t.isIntersecting?n.unfreeze():n.freeze())})},{threshold:0}))}static observe(t,n){e._initializeObserver(),!e._observedCanvases.has(t)&&(e._observedCanvases.set(t,n),e._observer?.observe(t))}static unobserve(t){e._observer?.unobserve(t),e._observedCanvases.delete(t),e._observedCanvases.size===0&&(e._observer?.disconnect(),e._observer=null)}};r(B,`_observer`,null),r(B,`_observedCanvases`,new Map);var V=class e{static _initializeObserver(){e._observer||(e._observer=new ResizeObserver(t=>{t.forEach(t=>{let n=e._observedCanvases.get(t.target);if(!n)return;let[r,i]=n;clearTimeout(i);let a=setTimeout(()=>{r.resize()},100);e._observedCanvases.set(t.target,[r,a])})}))}static observe(t,n){e._initializeObserver(),!e._observedCanvases.has(t)&&(e._observedCanvases.set(t,[n,0]),e._observer?.observe(t))}static unobserve(t){let n=e._observedCanvases.get(t);if(n){let e=n[1];e&&clearTimeout(e)}e._observer?.unobserve(t),e._observedCanvases.delete(t),!e._observedCanvases.size&&e._observer&&(e._observer.disconnect(),e._observer=null)}};r(V,`_observer`,null),r(V,`_observedCanvases`,new Map);function H(e){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(e)}function U(e){if(!H(e))return 0;let t=e.replace(`#`,``);return t=t.length===6?`${t}ff`:t,parseInt(t,16)}function W(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e.slice(0,c.byteLength));for(let e=0;e<c.length;e+=1)if(c[e]!==t[e])return!1;return!0}function G(e){return l.every(t=>Object.hasOwn(e,t))}function K(e){if(typeof e==`string`)try{return G(JSON.parse(e))}catch{return!1}else return G(e)}function q(){return 1+((s?window.devicePixelRatio:1)-1)*.75}function J(e){let t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return!(t.bottom<0||t.top>n||t.right<0||t.left>r)}function Y(e){let t=e.target;if(t instanceof HTMLCanvasElement){let n=t.getBoundingClientRect();if(n.width===0||n.height===0||t.width===0||t.height===0)return null;let r=t.width/n.width,i=t.height/n.height,a=(e.clientX-n.left)*r,o=(e.clientY-n.top)*i;return!Number.isFinite(a)||!Number.isFinite(o)||Number.isNaN(a)||Number.isNaN(o)?null:{x:a,y:o}}return null}function X(e){let t=e.replace(`OpenUrl: `,``),n=t.indexOf(` | Target: `),r,i;n===-1?(r=t,i=`_blank`):(r=t.substring(0,n),i=t.substring(n+11)),window.open(r,i)}function Z(e,t,n){let r=null,i=t;return{load(){return r||(r=e(i).then(()=>void 0).catch(async t=>{console.warn(`Primary WASM load failed from ${i}: ${t.message}`),console.warn(`Attempting to load WASM from backup URL: ${n}`);try{await e(n)}catch(e){throw console.error(`Primary WASM URL failed: ${t.message}`),console.error(`Backup WASM URL failed: ${e.message}`),r=null,Error(`WASM loading failed from all sources.`)}})),r},setWasmUrl(e){e!==i&&(i=e,r=null)}}}const Q=Z(R,`https://cdn.jsdelivr.net/npm/${d}@${u}/dist/dotlottie-player.wasm`,`https://unpkg.com/${d}@${u}/dist/dotlottie-player.wasm`),$=e=>{switch(e){case`reverse`:return M.Reverse;case`bounce`:return M.Bounce;case`reverse-bounce`:return M.ReverseBounce;default:return M.Forward}},ee=e=>{switch(e){case M.Reverse:return`reverse`;case M.Bounce:return`bounce`;case M.ReverseBounce:return`reverse-bounce`;default:return`forward`}},te=e=>{switch(e){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`}};var ne=class{constructor(e){r(this,`_canvas`,null),r(this,`_pendingLoad`,null),r(this,`_context`,null),r(this,`_eventManager`,void 0),r(this,`_animationFrameId`,null),r(this,`_frameManager`,void 0),r(this,`_dotLottieCore`,null),r(this,`_stateMachineId`,``),r(this,`_stateMachineConfig`,null),r(this,`_isStateMachineRunning`,!1),r(this,`_renderConfig`,{}),r(this,`_isFrozen`,!1),r(this,`_backgroundColor`,null),r(this,`_boundOnClick`,null),r(this,`_boundOnPointerUp`,null),r(this,`_boundOnPointerDown`,null),r(this,`_boundOnPointerMove`,null),r(this,`_boundOnPointerEnter`,null),r(this,`_boundOnPointerLeave`,null),r(this,`_bufferMismatchCount`,0),r(this,`_lastExpectedBufferSize`,0),r(this,`_marker`,``),this._canvas=e.canvas??null,this._eventManager=new z,this._frameManager=new o,this._renderConfig={...e.renderConfig,devicePixelRatio:e.renderConfig?.devicePixelRatio||q(),freezeOnOffscreen:e.renderConfig?.freezeOnOffscreen??!0},this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(e.autoplay??!1),this._dotLottieCore.set_loop(e.loop??!1),this._dotLottieCore.set_loop_count(e.loopCount??0),this._dotLottieCore.set_mode($(e.mode??`forward`)),this._dotLottieCore.set_speed(e.speed??1),this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation??!0),e.segment&&e.segment.length===2&&this._dotLottieCore.set_segment(e.segment[0],e.segment[1]),this._marker=e.marker??``,this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(e.layout?.fit??`contain`,e.layout?.align?.[0]??.5,e.layout?.align?.[1]??.5),this._stateMachineId=e.stateMachineId??``,this._stateMachineConfig=e.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:`ready`}),e.data?this._canvas?this._loadFromData(e.data):this._pendingLoad={data:e.data}:e.src&&(this._canvas?this._loadFromSrc(e.src):this._pendingLoad={src:e.src}),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor)}).catch(e=>{console.error(`[dotlottie-web] Initialization failed:`,e),this._eventManager.dispatch({type:`loadError`,error:Error(`Failed to load wasm module: ${e}`)})})}async _initWasm(){return Q.load()}_createCore(){return new P}_onCoreCreated(){}_drainPlayerEvents(){if(!this._dotLottieCore)return;let e;for(;(e=this._dotLottieCore.poll_event())!=null;){let t=e;switch(t.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`:setTimeout(()=>this._eventManager.dispatch({type:`play`}),0);break;case`Pause`:setTimeout(()=>this._eventManager.dispatch({type:`pause`}),0);break;case`Stop`:setTimeout(()=>this._eventManager.dispatch({type:`stop`}),0);break;case`Frame`:setTimeout(()=>this._eventManager.dispatch({type:`frame`,currentFrame:t.frameNo??0}),0);break;case`Render`:setTimeout(()=>this._eventManager.dispatch({type:`render`,currentFrame:t.frameNo??0}),0);break;case`Loop`:setTimeout(()=>this._eventManager.dispatch({type:`loop`,loopCount:t.loopCount??0}),0);break;case`Complete`:setTimeout(()=>this._eventManager.dispatch({type:`complete`}),0);break;default:break}}}_drainSmEvents(){if(!this._dotLottieCore)return;let e;for(;(e=this._dotLottieCore.sm_poll_event())!=null;){let t=e;switch(t.type){case`Start`:setTimeout(()=>{this._isStateMachineRunning=!0,this._eventManager.dispatch({type:`stateMachineStart`}),this._startAnimationLoop()},0);break;case`Stop`:setTimeout(()=>{this._isStateMachineRunning=!1,this._eventManager.dispatch({type:`stateMachineStop`}),this._dotLottieCore?.is_playing()||this._stopAnimationLoop()},0);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}}let t;for(;(t=this._dotLottieCore.sm_poll_internal_event())!=null;){let e=t;if(e.type===`Message`){let t=e.message??``;s&&t.startsWith(`OpenUrl: `)?X(t):this._eventManager.dispatch({type:`stateMachineInternalMessage`,message:t})}}}_dispatchError(e){console.error(e),this._eventManager.dispatch({type:`loadError`,error:Error(e)})}async _fetchData(e){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch animation data from URL: ${e}. ${t.status}: ${t.statusText}`);let n=await t.arrayBuffer();return W(n)?n:new TextDecoder().decode(n)}_loadFromData(e){if(this._dotLottieCore===null)return;if(!this._canvas){console.warn(`[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.`);return}let t=this._canvas.width,n=this._canvas.height,r=!1;if(typeof e==`string`){if(!K(e)){this._dispatchError(`Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.`);return}r=this._dotLottieCore.load_animation(e,t,n)}else if(e instanceof ArrayBuffer){if(!W(e)){this._dispatchError(`Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.`);return}r=this._dotLottieCore.load_dotlottie_data(new Uint8Array(e),t,n)}else if(typeof e==`object`){if(!K(e)){this._dispatchError(`Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.`);return}r=this._dotLottieCore.load_animation(JSON.stringify(e),t,n)}else{this._dispatchError(`Unsupported data type for animation data. Expected:
1
+ function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},a=class{constructor(){r(this,`_lastHandleId`,0),r(this,`_lastImmediate`,null)}requestAnimationFrame(e){return this._lastHandleId>=2**53-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(Date.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},o=class{constructor(){r(this,`_strategy`,void 0),this._strategy=typeof requestAnimationFrame==`function`?new i:new a}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}};const s=typeof window<`u`&&window.document!==void 0,c=new Uint8Array([80,75,3,4]),l=[`v`,`ip`,`op`,`layers`,`fr`,`w`,`h`],u=`0.66.1`,d=`@lottiefiles/dotlottie-web`;let f;function p(e){let t=f.__externref_table_alloc_command_export();return f.__wbindgen_export_2.set(t,e),t}function m(e,t){try{return e.apply(this,t)}catch(e){let t=p(e);f.__wbindgen_exn_store_command_export(t)}}let h=0,g=null;function _(){return(g===null||g.byteLength===0)&&(g=new Uint8Array(f.memory.buffer)),g}const v=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}},y=typeof v.encodeInto==`function`?function(e,t){return v.encodeInto(e,t)}:function(e,t){let n=v.encode(e);return t.set(n),{read:e.length,written:n.length}};function b(e,t,n){if(n===void 0){let n=v.encode(e),r=t(n.length,1)>>>0;return _().subarray(r,r+n.length).set(n),h=n.length,r}let r=e.length,i=t(r,1)>>>0,a=_(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=_().subarray(i+o,i+r),a=y(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return h=o,i}function x(e){return e==null}let S=null;function C(){return(S===null||S.buffer.detached===!0||S.buffer.detached===void 0&&S.buffer!==f.memory.buffer)&&(S=new DataView(f.memory.buffer)),S}const w=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&w.decode();function T(e,t){return e>>>=0,w.decode(_().subarray(e,e+t))}function E(e,t){let n=t(e.length*1,1)>>>0;return _().set(e,n/1),h=e.length,n}let D=null;function O(){return(D===null||D.byteLength===0)&&(D=new Float32Array(f.memory.buffer)),D}function k(e,t){let n=t(e.length*4,4)>>>0;return O().set(e,n/4),h=e.length,n}function A(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=p(e[t]);C().setUint32(n+4*t,r,!0)}return h=e.length,n}function j(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=E(t,f.__wbindgen_malloc_command_export),a=h;return f.register_font(n,r,i,a)!==0}const M=Object.freeze({Forward:0,0:`Forward`,Reverse:1,1:`Reverse`,Bounce:2,2:`Bounce`,ReverseBounce:3,3:`ReverseBounce`}),N=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>f.__wbg_dotlottieplayerwasm_free(e>>>0,1));var P=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){let e=this.__destroy_into_raw();f.__wbg_dotlottieplayerwasm_free(e,0)}constructor(){return this.__wbg_ptr=f.dotlottieplayerwasm_new()>>>0,N.register(this,this.__wbg_ptr,this),this}load_animation(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_load_animation(this.__wbg_ptr,r,i,t,n)!==0}load_dotlottie_data(e,t,n){let r=E(e,f.__wbindgen_malloc_command_export),i=h;return f.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,r,i,t,n)!==0}load_animation_from_id(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,r,i,t,n)!==0}tick(){return f.dotlottieplayerwasm_tick(this.__wbg_ptr)!==0}render(){return f.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}clear(){f.dotlottieplayerwasm_clear(this.__wbg_ptr)}resize(e,t){return f.dotlottieplayerwasm_resize(this.__wbg_ptr,e,t)!==0}get_pixel_buffer(){return f.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr)}play(){return f.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}pause(){return f.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}stop(){return f.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}is_playing(){return f.dotlottieplayerwasm_is_playing(this.__wbg_ptr)!==0}is_paused(){return f.dotlottieplayerwasm_is_paused(this.__wbg_ptr)!==0}is_stopped(){return f.dotlottieplayerwasm_is_stopped(this.__wbg_ptr)!==0}is_loaded(){return f.dotlottieplayerwasm_is_loaded(this.__wbg_ptr)!==0}is_complete(){return f.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}is_tweening(){return f.dotlottieplayerwasm_is_tweening(this.__wbg_ptr)!==0}current_frame(){return f.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}total_frames(){return f.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}request_frame(){return f.dotlottieplayerwasm_request_frame(this.__wbg_ptr)}set_frame(e){return f.dotlottieplayerwasm_set_frame(this.__wbg_ptr,e)!==0}seek(e){return f.dotlottieplayerwasm_seek(this.__wbg_ptr,e)!==0}duration(){return f.dotlottieplayerwasm_duration(this.__wbg_ptr)}segment_duration(){return f.dotlottieplayerwasm_segment_duration(this.__wbg_ptr)}current_loop_count(){return f.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}reset_current_loop_count(){f.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}width(){return f.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return f.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}animation_size(){return f.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}mode(){return f.dotlottieplayerwasm_mode(this.__wbg_ptr)}set_mode(e){f.dotlottieplayerwasm_set_mode(this.__wbg_ptr,e)}speed(){return f.dotlottieplayerwasm_speed(this.__wbg_ptr)}set_speed(e){f.dotlottieplayerwasm_set_speed(this.__wbg_ptr,e)}loop_animation(){return f.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_loop(e){f.dotlottieplayerwasm_set_loop(this.__wbg_ptr,e)}loop_count(){return f.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}set_loop_count(e){f.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,e)}autoplay(){return f.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}set_autoplay(e){f.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,e)}use_frame_interpolation(){return f.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}set_use_frame_interpolation(e){f.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,e)}background_color(){return f.dotlottieplayerwasm_background_color(this.__wbg_ptr)>>>0}set_background_color(e){return f.dotlottieplayerwasm_set_background_color(this.__wbg_ptr,e)!==0}clear_background_color(){return f.dotlottieplayerwasm_clear_background_color(this.__wbg_ptr)!==0}set_quality(e){return f.dotlottieplayerwasm_set_quality(this.__wbg_ptr,e)!==0}has_segment(){return f.dotlottieplayerwasm_has_segment(this.__wbg_ptr)!==0}segment_start(){return f.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}segment_end(){return f.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_segment(e,t){return f.dotlottieplayerwasm_set_segment(this.__wbg_ptr,e,t)!==0}clear_segment(){return f.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}set_layout(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,i,t,n)!==0}layout_fit(){let e,t;try{let n=f.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}layout_align_x(){return f.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return f.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}set_viewport(e,t,n,r){return f.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,e,t,n,r)!==0}set_color_slot(e,t,n,r){let i=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;return f.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,a,t,n,r)!==0}set_scalar_slot(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,t)!==0}set_text_slot(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=b(t,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;return f.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,i,a)!==0}set_vector_slot(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,i,t,n)!==0}set_position_slot(e,t,n){let r=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,i,t,n)!==0}clear_slots(){return f.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}clear_slot(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,t,n)!==0}set_slots_str(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,t,n)!==0}set_slot_str(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=b(t,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;return f.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,i,a)!==0}get_slot_str(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=T(r[0],r[1]).slice(),f.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}get_slots_str(){let e,t;try{let n=f.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}get_slot_ids(){return f.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr)}get_slot_type(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=T(r[0],r[1]).slice(),f.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}reset_slot(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,t,n)!==0}reset_slots(){return f.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}intersect(e,t,n){let r=b(n,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),i=h;return f.dotlottieplayerwasm_intersect(this.__wbg_ptr,e,t,r,i)!==0}get_layer_bounds(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_get_layer_bounds(this.__wbg_ptr,t,n)}get_transform(){return f.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}set_transform(e){let t=k(e,f.__wbindgen_malloc_command_export),n=h;return f.dotlottieplayerwasm_set_transform(this.__wbg_ptr,t,n)!==0}tween(e,t){return f.dotlottieplayerwasm_tween(this.__wbg_ptr,e,x(t)?4294967297:Math.fround(t))!==0}tween_with_easing(e,t,n,r,i,a){return f.dotlottieplayerwasm_tween_with_easing(this.__wbg_ptr,e,x(t)?4294967297:Math.fround(t),n,r,i,a)!==0}tween_stop(){return f.dotlottieplayerwasm_tween_stop(this.__wbg_ptr)!==0}tween_update(e){return f.dotlottieplayerwasm_tween_update(this.__wbg_ptr,x(e)?4294967297:Math.fround(e))!==0}tween_to_marker(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_tween_to_marker(this.__wbg_ptr,n,r,x(t)?4294967297:Math.fround(t))!==0}markers(){return f.dotlottieplayerwasm_markers(this.__wbg_ptr)}marker_names(){return f.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}current_marker(){let e=f.dotlottieplayerwasm_current_marker(this.__wbg_ptr),t;return e[0]!==0&&(t=T(e[0],e[1]).slice(),f.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}set_marker(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;f.dotlottieplayerwasm_set_marker(this.__wbg_ptr,t,n)}clear_marker(){f.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}poll_event(){return f.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}emit_on_loop(){f.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}load_font(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=E(t,f.__wbindgen_malloc_command_export),a=h;return f.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,i,a)!==0}static unload_font(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_unload_font(t,n)!==0}set_theme(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_set_theme(this.__wbg_ptr,t,n)!==0}reset_theme(){return f.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}set_theme_data(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,t,n)!==0}theme_id(){let e=f.dotlottieplayerwasm_theme_id(this.__wbg_ptr),t;return e[0]!==0&&(t=T(e[0],e[1]).slice(),f.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}animation_id(){let e=f.dotlottieplayerwasm_animation_id(this.__wbg_ptr),t;return e[0]!==0&&(t=T(e[0],e[1]).slice(),f.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}manifest_string(){let e,t;try{let n=f.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}get_state_machine(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=T(r[0],r[1]).slice(),f.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}state_machine_id(){let e=f.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),t;return e[0]!==0&&(t=T(e[0],e[1]).slice(),f.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}state_machine_load(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,t,n)!==0}state_machine_load_from_id(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,t,n)!==0}state_machine_unload(){f.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_fire(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;return f.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,t,n)!==0}sm_set_numeric_input(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,t)!==0}sm_get_numeric_input(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,t,n);return r===4294967297?void 0:r}sm_set_string_input(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h,i=b(t,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;return f.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,i,a)!==0}sm_get_string_input(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=T(r[0],r[1]).slice(),f.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}sm_set_boolean_input(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,t)!==0}sm_get_boolean_input(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h,r=f.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,t,n);return r===16777215?void 0:r!==0}sm_reset_input(e){let t=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),n=h;f.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,t,n)}sm_poll_event(){return f.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr)}sm_start(e,t){let n=A(t,f.__wbindgen_malloc_command_export),r=h;return f.dotlottieplayerwasm_sm_start(this.__wbg_ptr,e,n,r)!==0}sm_stop(){return f.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_status(){let e,t;try{let n=f.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}sm_current_state(){let e,t;try{let n=f.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return e=n[0],t=n[1],T(n[0],n[1])}finally{f.__wbindgen_free_command_export(e,t,1)}}sm_override_current_state(e,t){let n=b(e,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),r=h;return f.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,t)!==0}sm_framework_setup(){return f.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr)}sm_get_inputs(){return f.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr)}sm_post_click(e,t){f.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,e,t)}sm_post_pointer_down(e,t){f.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,e,t)}sm_post_pointer_up(e,t){f.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,e,t)}sm_post_pointer_move(e,t){f.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,e,t)}sm_post_pointer_enter(e,t){f.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,e,t)}sm_post_pointer_exit(e,t){f.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,e,t)}sm_poll_internal_event(){return f.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}sm_tick(){return f.dotlottieplayerwasm_sm_tick(this.__wbg_ptr)!==0}};async function F(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.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",t);else throw t}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function I(){let e={};return e.wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_new_405e22f390576ce2=function(){return{}},e.wbg.__wbg_new_78feb108b6472713=function(){return[]},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},e.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(e){return new Float32Array(e>>>0)},e.wbg.__wbg_now_807e54c39636c349=function(){return Date.now()},e.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return m(function(e,t,n){return Reflect.set(e,t,n)},arguments)},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(e,t,n){e[t>>>0]=n},e.wbg.__wbindgen_init_externref_table=function(){let e=f.__wbindgen_export_2,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},e.wbg.__wbindgen_memory=function(){return f.memory},e.wbg.__wbindgen_number_new=function(e){return e},e.wbg.__wbindgen_string_get=function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=x(r)?0:b(r,f.__wbindgen_malloc_command_export,f.__wbindgen_realloc_command_export),a=h;C().setInt32(e+4,a,!0),C().setInt32(e+0,i,!0)},e.wbg.__wbindgen_string_new=function(e,t){return T(e,t)},e.wbg.__wbindgen_throw=function(e,t){throw Error(T(e,t))},e}function L(e,t){return f=e.exports,R.__wbindgen_wasm_module=t,S=null,D=null,g=null,f.__wbindgen_start(),f}async function R(e){if(f!==void 0)return f;if(e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0)throw Error(`WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().`);let t=I();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await F(await e,t);return L(n,r)}var z=class{constructor(){r(this,`_eventListeners`,new Map)}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){let n=this._eventListeners.get(e);n&&(t?(n.delete(t),n.size===0&&this._eventListeners.delete(e)):this._eventListeners.delete(e))}dispatch(e){this._eventListeners.get(e.type)?.forEach(t=>t(e))}removeAllEventListeners(){this._eventListeners.clear()}},B=class e{static _initializeObserver(){e._observer||(e._observer=new IntersectionObserver(t=>{t.forEach(t=>{let n=e._observedCanvases.get(t.target);n&&(t.isIntersecting?n.unfreeze():n.freeze())})},{threshold:0}))}static observe(t,n){e._initializeObserver(),!e._observedCanvases.has(t)&&(e._observedCanvases.set(t,n),e._observer?.observe(t))}static unobserve(t){e._observer?.unobserve(t),e._observedCanvases.delete(t),e._observedCanvases.size===0&&(e._observer?.disconnect(),e._observer=null)}};r(B,`_observer`,null),r(B,`_observedCanvases`,new Map);var V=class e{static _initializeObserver(){e._observer||(e._observer=new ResizeObserver(t=>{t.forEach(t=>{let n=e._observedCanvases.get(t.target);if(!n)return;let[r,i]=n;clearTimeout(i);let a=setTimeout(()=>{r.resize()},100);e._observedCanvases.set(t.target,[r,a])})}))}static observe(t,n){e._initializeObserver(),!e._observedCanvases.has(t)&&(e._observedCanvases.set(t,[n,0]),e._observer?.observe(t))}static unobserve(t){let n=e._observedCanvases.get(t);if(n){let e=n[1];e&&clearTimeout(e)}e._observer?.unobserve(t),e._observedCanvases.delete(t),!e._observedCanvases.size&&e._observer&&(e._observer.disconnect(),e._observer=null)}};r(V,`_observer`,null),r(V,`_observedCanvases`,new Map);function H(e){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(e)}function U(e){if(!H(e))return 0;let t=e.replace(`#`,``);return t=t.length===6?`${t}ff`:t,parseInt(t,16)}function W(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e.slice(0,c.byteLength));for(let e=0;e<c.length;e+=1)if(c[e]!==t[e])return!1;return!0}function G(e){return l.every(t=>Object.hasOwn(e,t))}function K(e){if(typeof e==`string`)try{return G(JSON.parse(e))}catch{return!1}else return G(e)}function q(){return 1+((s?window.devicePixelRatio:1)-1)*.75}function J(e){let t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return!(t.bottom<0||t.top>n||t.right<0||t.left>r)}function Y(e){let t=e.target;if(t instanceof HTMLCanvasElement){let n=t.getBoundingClientRect();if(n.width===0||n.height===0||t.width===0||t.height===0)return null;let r=t.width/n.width,i=t.height/n.height,a=(e.clientX-n.left)*r,o=(e.clientY-n.top)*i;return!Number.isFinite(a)||!Number.isFinite(o)||Number.isNaN(a)||Number.isNaN(o)?null:{x:a,y:o}}return null}function X(e){let t=e.replace(`OpenUrl: `,``),n=t.indexOf(` | Target: `),r,i;n===-1?(r=t,i=`_blank`):(r=t.substring(0,n),i=t.substring(n+11)),window.open(r,i)}function Z(e,t,n){let r=null,i=t;return{load(){return r||(r=e(i).then(()=>void 0).catch(async t=>{console.warn(`Primary WASM load failed from ${i}: ${t.message}`),console.warn(`Attempting to load WASM from backup URL: ${n}`);try{await e(n)}catch(e){throw console.error(`Primary WASM URL failed: ${t.message}`),console.error(`Backup WASM URL failed: ${e.message}`),r=null,Error(`WASM loading failed from all sources.`)}})),r},setWasmUrl(e){e!==i&&(i=e,r=null)}}}const Q=Z(R,`https://cdn.jsdelivr.net/npm/${d}@${u}/dist/dotlottie-player.wasm`,`https://unpkg.com/${d}@${u}/dist/dotlottie-player.wasm`),$=e=>{switch(e){case`reverse`:return M.Reverse;case`bounce`:return M.Bounce;case`reverse-bounce`:return M.ReverseBounce;default:return M.Forward}},ee=e=>{switch(e){case M.Reverse:return`reverse`;case M.Bounce:return`bounce`;case M.ReverseBounce:return`reverse-bounce`;default:return`forward`}},te=e=>{switch(e){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`}};var ne=class{constructor(e){r(this,`_canvas`,null),r(this,`_pendingLoad`,null),r(this,`_context`,null),r(this,`_eventManager`,void 0),r(this,`_animationFrameId`,null),r(this,`_frameManager`,void 0),r(this,`_dotLottieCore`,null),r(this,`_stateMachineId`,``),r(this,`_stateMachineConfig`,null),r(this,`_isStateMachineRunning`,!1),r(this,`_renderConfig`,{}),r(this,`_isFrozen`,!1),r(this,`_backgroundColor`,null),r(this,`_boundOnClick`,null),r(this,`_boundOnPointerUp`,null),r(this,`_boundOnPointerDown`,null),r(this,`_boundOnPointerMove`,null),r(this,`_boundOnPointerEnter`,null),r(this,`_boundOnPointerLeave`,null),r(this,`_bufferMismatchCount`,0),r(this,`_lastExpectedBufferSize`,0),r(this,`_marker`,``),this._canvas=e.canvas??null,this._eventManager=new z,this._frameManager=new o,this._renderConfig={...e.renderConfig,devicePixelRatio:e.renderConfig?.devicePixelRatio||q(),freezeOnOffscreen:e.renderConfig?.freezeOnOffscreen??!0},this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(e.autoplay??!1),this._dotLottieCore.set_loop(e.loop??!1),this._dotLottieCore.set_loop_count(e.loopCount??0),this._dotLottieCore.set_mode($(e.mode??`forward`)),this._dotLottieCore.set_speed(e.speed??1),this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation??!0),e.segment&&e.segment.length===2&&this._dotLottieCore.set_segment(e.segment[0],e.segment[1]),this._marker=e.marker??``,this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(e.layout?.fit??`contain`,e.layout?.align?.[0]??.5,e.layout?.align?.[1]??.5),this._stateMachineId=e.stateMachineId??``,this._stateMachineConfig=e.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:`ready`}),e.data?this._canvas?this._loadFromData(e.data):this._pendingLoad={data:e.data}:e.src&&(this._canvas?this._loadFromSrc(e.src):this._pendingLoad={src:e.src}),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor)}).catch(e=>{console.error(`[dotlottie-web] Initialization failed:`,e),this._eventManager.dispatch({type:`loadError`,error:Error(`Failed to load wasm module: ${e}`)})})}async _initWasm(){return Q.load()}_createCore(){return new P}_onCoreCreated(){}_drainPlayerEvents(){if(!this._dotLottieCore)return;let e;for(;(e=this._dotLottieCore.poll_event())!=null;){let t=e;switch(t.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`:setTimeout(()=>this._eventManager.dispatch({type:`play`}),0);break;case`Pause`:setTimeout(()=>this._eventManager.dispatch({type:`pause`}),0);break;case`Stop`:setTimeout(()=>this._eventManager.dispatch({type:`stop`}),0);break;case`Frame`:setTimeout(()=>this._eventManager.dispatch({type:`frame`,currentFrame:t.frameNo??0}),0);break;case`Render`:setTimeout(()=>this._eventManager.dispatch({type:`render`,currentFrame:t.frameNo??0}),0);break;case`Loop`:setTimeout(()=>this._eventManager.dispatch({type:`loop`,loopCount:t.loopCount??0}),0);break;case`Complete`:setTimeout(()=>this._eventManager.dispatch({type:`complete`}),0);break;default:break}}}_drainSmEvents(){if(!this._dotLottieCore)return;let e;for(;(e=this._dotLottieCore.sm_poll_event())!=null;){let t=e;switch(t.type){case`Start`:setTimeout(()=>{this._isStateMachineRunning=!0,this._eventManager.dispatch({type:`stateMachineStart`}),this._startAnimationLoop()},0);break;case`Stop`:setTimeout(()=>{this._isStateMachineRunning=!1,this._eventManager.dispatch({type:`stateMachineStop`}),this._dotLottieCore?.is_playing()||this._stopAnimationLoop()},0);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}}let t;for(;(t=this._dotLottieCore.sm_poll_internal_event())!=null;){let e=t;if(e.type===`Message`){let t=e.message??``;s&&t.startsWith(`OpenUrl: `)?X(t):this._eventManager.dispatch({type:`stateMachineInternalMessage`,message:t})}}}_dispatchError(e){console.error(e),this._eventManager.dispatch({type:`loadError`,error:Error(e)})}async _fetchData(e){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch animation data from URL: ${e}. ${t.status}: ${t.statusText}`);let n=await t.arrayBuffer();return W(n)?n:new TextDecoder().decode(n)}_loadFromData(e){if(this._dotLottieCore===null)return;if(!this._canvas){console.warn(`[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.`);return}let t=this._canvas.width,n=this._canvas.height,r=!1;if(typeof e==`string`){if(!K(e)){this._dispatchError(`Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.`);return}r=this._dotLottieCore.load_animation(e,t,n)}else if(e instanceof ArrayBuffer){if(!W(e)){this._dispatchError(`Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.`);return}r=this._dotLottieCore.load_dotlottie_data(new Uint8Array(e),t,n)}else if(typeof e==`object`){if(!K(e)){this._dispatchError(`Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.`);return}r=this._dotLottieCore.load_animation(JSON.stringify(e),t,n)}else{this._dispatchError(`Unsupported data type for animation data. Expected:
2
2
  - string (Lottie JSON),
3
3
  - ArrayBuffer (dotLottie),
4
4
  - object (Lottie JSON).
5
5
  Received: ${typeof e}`);return}r?(this._renderConfig.quality!==void 0&&this._dotLottieCore.set_quality(this._renderConfig.quality),s&&this.resize(),this._drainPlayerEvents(),this._marker&&this._dotLottieCore.set_marker(this._marker),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.is_playing()&&this._startAnimationLoop(),s&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(B.observe(this._canvas,this),J(this._canvas)||this.freeze()),this._renderConfig.autoResize&&V.observe(this._canvas,this))):this._drainPlayerEvents()}_loadFromSrc(e){this._fetchData(e).then(e=>this._loadFromData(e)).catch(t=>this._dispatchError(`Failed to load animation data from URL: ${e}. ${t}`))}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:te(this._dotLottieCore.layout_fit())}}get marker(){return this._dotLottieCore?.current_marker()??``}get manifest(){try{let e=this._dotLottieCore?.manifest_string();if(this._dotLottieCore===null||!e)return null;let t=JSON.parse(e);return Object.keys(t).length===0?null:t}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){if(!(!this._dotLottieCore||!this._dotLottieCore.has_segment()))return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?ee(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?.is_loaded()??!1}get isPlaying(){return this._dotLottieCore?.is_playing()??!1}get isPaused(){return this._dotLottieCore?.is_paused()??!1}get isStopped(){return this._dotLottieCore?.is_stopped()??!1}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}get segmentDuration(){return this._dotLottieCore?.segment_duration()??0}get canvas(){return this._canvas}load(e){this._dotLottieCore!==null&&(this._stopAnimationLoop(),this._cleanupCanvas(),this._isFrozen=!1,this._dotLottieCore.set_autoplay(e.autoplay??!1),this._dotLottieCore.set_loop(e.loop??!1),this._dotLottieCore.set_loop_count(e.loopCount??0),this._dotLottieCore.set_mode($(e.mode??`forward`)),this._dotLottieCore.set_speed(e.speed??1),this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation??!0),e.segment&&e.segment.length===2?this._dotLottieCore.set_segment(e.segment[0],e.segment[1]):this._dotLottieCore.clear_segment(),this._marker=e.marker??``,this._marker?this._dotLottieCore.set_marker(this._marker):this._dotLottieCore.clear_marker(),this._dotLottieCore.set_layout(e.layout?.fit??`contain`,e.layout?.align?.[0]??.5,e.layout?.align?.[1]??.5),e.data?this._canvas?this._loadFromData(e.data):this._pendingLoad={data:e.data}:e.src&&(this._canvas?this._loadFromSrc(e.src):this._pendingLoad={src:e.src}),this.setBackgroundColor(e.backgroundColor??``))}_draw(){if(!(this._dotLottieCore===null||this._canvas===null)&&(!this._context&&`getContext`in this._canvas&&typeof this._canvas.getContext==`function`&&(typeof HTMLCanvasElement<`u`&&this._canvas instanceof HTMLCanvasElement||typeof OffscreenCanvas<`u`&&this._canvas instanceof OffscreenCanvas)&&(this._context=this._canvas.getContext(`2d`)),this._context)){let e=this._dotLottieCore.get_pixel_buffer(),t=this._canvas.width*this._canvas.height*4;if(e.byteLength!==t){this._lastExpectedBufferSize===t?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=t),this._bufferMismatchCount===10&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${t} bytes for canvas ${this._canvas.width}x${this._canvas.height}, but got ${e.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`);return}this._bufferMismatchCount=0,this._lastExpectedBufferSize=t;let n=null,r=new Uint8ClampedArray(e.buffer,e.byteOffset,e.byteLength);typeof ImageData>`u`?(n=this._context.createImageData(this._canvas.width,this._canvas.height),n.data.set(r)):n=new ImageData(r,this._canvas.width,this._canvas.height),this._context.putImageData(n,0,0)}}_cleanupCanvas(){this._canvas&&s&&this._canvas instanceof HTMLCanvasElement&&(B.unobserve(this._canvas),V.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&s&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(B.observe(this._canvas,this),J(this._canvas)||this.freeze()),this._renderConfig.autoResize&&V.observe(this._canvas,this),this._isStateMachineRunning&&this._setupStateMachineListeners()),this._canvas&&this._dotLottieCore&&this.isLoaded&&this._dotLottieCore.resize(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)}_startAnimationLoop(){this._animationFrameId===null&&this._dotLottieCore&&!this._isFrozen&&(this._dotLottieCore.is_playing()||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._animationLoop.bind(this)))}_animationLoop(){if(this._dotLottieCore===null){this._stopAnimationLoop();return}if(!this._dotLottieCore.is_playing()&&!this._isStateMachineRunning){this._stopAnimationLoop();return}try{let e=this._isStateMachineRunning?this._dotLottieCore.sm_tick():this._dotLottieCore.tick();this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),e&&this._draw(),this._animationFrameId=this._frameManager.requestAnimationFrame(this._animationLoop.bind(this))}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 e=this._dotLottieCore.play();this._drainPlayerEvents(),(e||this._dotLottieCore.is_playing())&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&s&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!J(this._canvas)&&this.freeze()}pause(){this._dotLottieCore!==null&&(this._dotLottieCore.pause(),this._drainPlayerEvents(),this._stopAnimationLoop())}stop(){if(this._dotLottieCore===null)return;let e=this._dotLottieCore.stop();this._drainPlayerEvents(),this._stopAnimationLoop(),e&&(this._eventManager.dispatch({type:`frame`,currentFrame:this.currentFrame}),this._dotLottieCore.render(),this._draw())}setFrame(e){if(this._dotLottieCore!==null&&this._dotLottieCore.seek(e)){let e=this._dotLottieCore.render();this._drainPlayerEvents(),e&&this._draw()}}setSpeed(e){this._dotLottieCore!==null&&this._dotLottieCore.set_speed(e)}setBackgroundColor(e){this._dotLottieCore!==null&&(s&&this._canvas instanceof HTMLCanvasElement?this._canvas.style.backgroundColor=e:this._dotLottieCore.set_background_color(U(e)),this._backgroundColor=e)}setLoop(e){this._dotLottieCore!==null&&this._dotLottieCore.set_loop(e)}setLoopCount(e){this._dotLottieCore!==null&&this._dotLottieCore.set_loop_count(e)}setUseFrameInterpolation(e){this._dotLottieCore!==null&&this._dotLottieCore.set_use_frame_interpolation(e)}addEventListener(e,t){this._eventManager.addEventListener(e,t)}removeEventListener(e,t){this._eventManager.removeEventListener(e,t)}destroy(){this._stopAnimationLoop(),this._isStateMachineRunning=!1,this._cleanupCanvas(),this._dotLottieCore?.free(),this._dotLottieCore=null,this._context=null,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())}resize(){if(!(!this._dotLottieCore||!this.isLoaded||!this._canvas)){if(s&&this._canvas instanceof HTMLCanvasElement){let e=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:t,width:n}=this._canvas.getBoundingClientRect();t!==0&&n!==0&&(this._canvas.width=n*e,this._canvas.height=t*e)}this._dotLottieCore.resize(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}}setCanvas(e){if(!(!e||this._canvas===e)&&(this._canvas&&this._cleanupCanvas(),this._canvas=e,this._initializeCanvas(),this._pendingLoad)){let e=this._pendingLoad;this._pendingLoad=null,e.data?this._loadFromData(e.data):e.src&&this._loadFromSrc(e.src)}}setTransform(e){if(!this._dotLottieCore)return!1;let t=this._dotLottieCore.set_transform(new Float32Array(e));return t&&this._dotLottieCore.render()&&this._draw(),t}getTransform(){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_transform();return Array.from(e)}setSegment(e,t){this._dotLottieCore!==null&&this._dotLottieCore.set_segment(e,t)}setMode(e){this._dotLottieCore!==null&&this._dotLottieCore.set_mode($(e))}setRenderConfig(e){let{devicePixelRatio:t,freezeOnOffscreen:n,quality:r,...i}=e;this._renderConfig={...this._renderConfig,...i,devicePixelRatio:t||q(),freezeOnOffscreen:n??!0,...r!==void 0&&{quality:r}},r!==void 0&&this._dotLottieCore&&this._dotLottieCore.set_quality(r),s&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?V.observe(this._canvas,this):V.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(B.observe(this._canvas,this),J(this._canvas)||this.freeze()):(B.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(e){this._dotLottieCore===null||this._dotLottieCore.animation_id()===e||!this._canvas||(this._dotLottieCore.load_animation_from_id(e,this._canvas.width,this._canvas.height)?(this._renderConfig.quality!==void 0&&this._dotLottieCore.set_quality(this._renderConfig.quality),this.resize(),this._drainPlayerEvents(),this._dotLottieCore.render(),this._draw()):this._dispatchError(`Failed to load animation with id: ${e}`))}setMarker(e){this._dotLottieCore!==null&&(this._marker=e,this._dotLottieCore.set_marker(e))}markers(){let e=this._dotLottieCore?.markers();return e&&Array.isArray(e)?e:[]}setTheme(e){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.set_theme(e);return t&&(this._dotLottieCore.render(),this._draw()),t}resetTheme(){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.reset_theme();return e&&(this._dotLottieCore.render(),this._draw()),e}setThemeData(e){if(this._dotLottieCore===null)return!1;let t=typeof e==`string`?e:JSON.stringify(e),n=this._dotLottieCore.set_theme_data(t);return n&&(this._dotLottieCore.render(),this._draw()),n}setSlots(e){this._dotLottieCore!==null&&this._dotLottieCore.set_slots_str(JSON.stringify(e))&&(this._dotLottieCore.render(),this._draw())}_isKeyframeArray(e){return Array.isArray(e)&&e.length>0&&typeof e[0]==`object`&&e[0]!==null&&`t`in e[0]&&`s`in e[0]}getSlotIds(){if(!this._dotLottieCore)return[];let e=this._dotLottieCore.get_slot_ids();return Array.isArray(e)?e:[]}getSlotType(e){if(!this._dotLottieCore)return;let t=this._dotLottieCore.get_slot_type(e);if(t)return t}getSlot(e){if(!this._dotLottieCore)return;let t=this._dotLottieCore.get_slot_str(e);if(t)try{return JSON.parse(t)}catch{return}}getSlots(){if(!this._dotLottieCore)return{};try{return JSON.parse(this._dotLottieCore.get_slots_str())}catch{return{}}}setColorSlot(e,t){if(this._dotLottieCore===null)return!1;let n=this._isKeyframeArray(t),r=JSON.stringify({a:n?1:0,k:t}),i=this._dotLottieCore.set_slot_str(e,r);return this._dotLottieCore.render(),this._draw(),i}setScalarSlot(e,t){if(this._dotLottieCore===null)return!1;let n=typeof t!=`number`,r=JSON.stringify({a:n?1:0,k:t}),i=this._dotLottieCore.set_slot_str(e,r);return this._dotLottieCore.render(),this._draw(),i}setVectorSlot(e,t){if(this._dotLottieCore===null)return!1;let n=this._isKeyframeArray(t),r=JSON.stringify({a:n?1:0,k:t}),i=this._dotLottieCore.set_slot_str(e,r);return this._dotLottieCore.render(),this._draw(),i}setGradientSlot(e,t,n){if(this._dotLottieCore===null)return!1;let r=this._isKeyframeArray(t),i=JSON.stringify({k:{a:r?1:0,k:t},p:n}),a=this._dotLottieCore.set_slot_str(e,i);return this._dotLottieCore.render(),this._draw(),a}setTextSlot(e,t){if(this._dotLottieCore===null)return!1;let n=this._dotLottieCore.get_slot_str(e),r=t;if(n){let e=JSON.parse(n);if(e&&`k`in e&&Array.isArray(e.k)){let n=e.k[0];`s`in n&&typeof n.s==`object`&&(r={...n.s,...t})}}let i=JSON.stringify({a:0,k:[{t:0,s:r}]}),a=this._dotLottieCore.set_slot_str(e,i);return this._dotLottieCore.render(),this._draw(),a}resetSlot(e){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.reset_slot(e);return this._dotLottieCore.render(),this._draw(),t}clearSlot(e){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.clear_slot(e);return this._dotLottieCore.render(),this._draw(),t}resetSlots(){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.reset_slots();return this._dotLottieCore.render(),this._draw(),e}clearSlots(){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.clear_slots();return this._dotLottieCore.render(),this._draw(),e}setLayout(e){this._dotLottieCore!==null&&this._dotLottieCore.set_layout(e.fit??`contain`,e.align?.[0]??.5,e.align?.[1]??.5)}setViewport(e,t,n,r){return this._dotLottieCore===null?!1:this._dotLottieCore.set_viewport(e,t,n,r)}static setWasmUrl(e){Q.setWasmUrl(e)}static async registerFont(e,t){try{await Q.load();let n;if(typeof t==`string`){let e=await fetch(t);if(!e.ok)return console.error(`Failed to fetch font from URL: ${t}. Status: ${e.status}`),!1;n=new Uint8Array(await e.arrayBuffer())}else n=t instanceof Uint8Array?t:new Uint8Array(t);let r=j(e,n);return r||console.error(`Failed to register font "${e}". Font data may be invalid.`),r}catch(t){return console.error(`Error registering font "${e}":`,t),!1}}tween(e,t){return this._dotLottieCore?this._dotLottieCore.tween_with_easing(e,t,0,0,1,1):!1}tweenToMarker(e,t){return this._dotLottieCore?this._dotLottieCore.tween_to_marker(e,t):!1}animationSize(){let e=this._dotLottieCore?.animation_size();return{width:e?.[0]??0,height:e?.[1]??0}}getLayerBoundingBox(e){let t=this._dotLottieCore?.get_layer_bounds(e);if(t&&t.length===8)return Array.from(t)}static transformThemeToLottieSlots(e,t){return``}stateMachineLoad(e){return this._dotLottieCore?this._dotLottieCore.state_machine_load_from_id(e):!1}stateMachineLoadData(e){return this._dotLottieCore?this._dotLottieCore.state_machine_load(e):!1}stateMachineSetConfig(e){this._stateMachineConfig=e}stateMachineStart(){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction??!0,this._stateMachineConfig?.openUrlPolicy?.whitelist??[]);return this._drainSmEvents(),e&&(this._isStateMachineRunning=!0,this._setupStateMachineListeners(),this._startAnimationLoop()),e}stateMachineStop(){if(!this._dotLottieCore)return!1;let e=this._dotLottieCore.sm_stop();return this._drainSmEvents(),e&&(this._isStateMachineRunning=!1,this._cleanupStateMachineListeners(),this._dotLottieCore.is_playing()||this._stopAnimationLoop()),e}stateMachineGetStatus(){return this._dotLottieCore?.sm_status()??``}stateMachineGetCurrentState(){return this._dotLottieCore?.sm_current_state()??``}stateMachineGetActiveId(){return this._dotLottieCore?.state_machine_id()??``}stateMachineOverrideState(e,t=!1){return this._dotLottieCore?.sm_override_current_state(e,t)??!1}stateMachineGet(e){return this._dotLottieCore?.get_state_machine(e)??``}stateMachineGetListeners(){if(!this._dotLottieCore)return[];let e=this._dotLottieCore.sm_framework_setup();return Array.isArray(e)?e:[]}stateMachineSetBooleanInput(e,t){return this._dotLottieCore?.sm_set_boolean_input(e,t)??!1}stateMachineSetNumericInput(e,t){return this._dotLottieCore?.sm_set_numeric_input(e,t)??!1}stateMachineSetStringInput(e,t){return this._dotLottieCore?.sm_set_string_input(e,t)??!1}stateMachineGetBooleanInput(e){return this._dotLottieCore?.sm_get_boolean_input(e)??void 0}stateMachineGetNumericInput(e){return this._dotLottieCore?.sm_get_numeric_input(e)??void 0}stateMachineGetStringInput(e){return this._dotLottieCore?.sm_get_string_input(e)??void 0}stateMachineGetInputs(){if(!this._dotLottieCore)return[];let e=this._dotLottieCore.sm_get_inputs();return Array.isArray(e)?e:[]}stateMachineFireEvent(e){this._dotLottieCore?.sm_fire(e)}stateMachinePostClickEvent(e,t){this._dotLottieCore?.sm_post_click(e,t)}stateMachinePostPointerUpEvent(e,t){this._dotLottieCore?.sm_post_pointer_up(e,t)}stateMachinePostPointerDownEvent(e,t){this._dotLottieCore?.sm_post_pointer_down(e,t)}stateMachinePostPointerMoveEvent(e,t){this._dotLottieCore?.sm_post_pointer_move(e,t)}stateMachinePostPointerEnterEvent(e,t){this._dotLottieCore?.sm_post_pointer_enter(e,t)}stateMachinePostPointerExitEvent(e,t){this._dotLottieCore?.sm_post_pointer_exit(e,t)}_onClick(e){let t=Y(e);t&&this.stateMachinePostClickEvent(t.x,t.y)}_onPointerUp(e){let t=Y(e);t&&this.stateMachinePostPointerUpEvent(t.x,t.y)}_onPointerDown(e){let t=Y(e);t&&this.stateMachinePostPointerDownEvent(t.x,t.y)}_onPointerMove(e){let t=Y(e);t&&this.stateMachinePostPointerMoveEvent(t.x,t.y)}_onPointerEnter(e){let t=Y(e);t&&this.stateMachinePostPointerEnterEvent(t.x,t.y)}_onPointerLeave(e){let t=Y(e);t&&this.stateMachinePostPointerExitEvent(t.x,t.y)}_setupStateMachineListeners(){if(s&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieCore!==null&&this.isLoaded){let e=this.stateMachineGetListeners();this._cleanupStateMachineListeners(),e.includes(`Click`)&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener(`click`,this._boundOnClick)),e.includes(`PointerUp`)&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener(`pointerup`,this._boundOnPointerUp)),e.includes(`PointerDown`)&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener(`pointerdown`,this._boundOnPointerDown)),e.includes(`PointerMove`)&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener(`pointermove`,this._boundOnPointerMove)),e.includes(`PointerEnter`)&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener(`pointerenter`,this._boundOnPointerEnter)),e.includes(`PointerExit`)&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener(`pointerleave`,this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){s&&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))}};export{X as a,B as c,d,u as f,Y as i,z as l,Z as n,J as o,r as p,q as r,V as s,ne as t,s as u};
6
- //# sourceMappingURL=dotlottie-Cn4v_pQB.js.map
6
+ //# sourceMappingURL=dotlottie-DBBPxC2A.js.map