@lottiefiles/dotlottie-web 0.78.0 → 0.78.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.
- package/README.md +6 -2
- package/dist/dotlottie-player.wasm +0 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +24 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/webgl/dotlottie-player.wasm +0 -0
- package/dist/webgl/index.cjs +2 -2
- package/dist/webgl/index.cjs.map +1 -1
- package/dist/webgl/index.d.cts +11 -5
- package/dist/webgl/index.d.cts.map +1 -1
- package/dist/webgl/index.d.ts +24 -20
- package/dist/webgl/index.d.ts.map +1 -1
- package/dist/webgl/index.js +2 -2
- package/dist/webgl/index.js.map +1 -1
- package/dist/webgpu/dotlottie-player.wasm +0 -0
- package/dist/webgpu/index.cjs +2 -2
- package/dist/webgpu/index.cjs.map +1 -1
- package/dist/webgpu/index.d.cts +11 -5
- package/dist/webgpu/index.d.cts.map +1 -1
- package/dist/webgpu/index.d.ts +24 -20
- package/dist/webgpu/index.d.ts.map +1 -1
- package/dist/webgpu/index.js +2 -2
- package/dist/webgpu/index.js.map +1 -1
- package/package.json +2 -2
package/dist/webgpu/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const e=typeof window<`u`&&window.document!==void 0,t=new Uint8Array([80,75,3,4]),n=[`v`,`ip`,`op`,`layers`,`fr`,`w`,`h`];function r(e){"@babel/helpers - typeof";return r=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},r(e)}function i(e,t){if(r(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||`default`);if(r(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function a(e){var t=i(e,`string`);return r(t)==`symbol`?t:t+``}function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ee=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},te=class{constructor(){o(this,`_lastHandleId`,0),o(this,`_lastImmediate`,null)}requestAnimationFrame(e){return this._lastHandleId>=2**53-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(performance.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},ne=class{constructor(){o(this,`_strategy`,void 0),this._strategy=typeof requestAnimationFrame==`function`?new ee:new te}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}};let s,c=0,l=null;function u(){return(l===null||l.byteLength===0)&&(l=new Uint8Array(s.memory.buffer)),l}const d=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}},re=typeof d.encodeInto==`function`?function(e,t){return d.encodeInto(e,t)}:function(e,t){let n=d.encode(e);return t.set(n),{read:e.length,written:n.length}};function f(e,t,n){if(n===void 0){let n=d.encode(e),r=t(n.length,1)>>>0;return u().subarray(r,r+n.length).set(n),c=n.length,r}let r=e.length,i=t(r,1)>>>0,a=u(),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=u().subarray(i+o,i+r),a=re(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return c=o,i}let p=null;function m(){return(p===null||p.buffer.detached===!0||p.buffer.detached===void 0&&p.buffer!==s.memory.buffer)&&(p=new DataView(s.memory.buffer)),p}function h(e){let t=s.__externref_table_alloc_command_export();return s.__wbindgen_export_4.set(t,e),t}function g(e,t){try{return e.apply(this,t)}catch(e){let t=h(e);s.__wbindgen_exn_store_command_export(t)}}const _=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&_.decode();function v(e,t){return e>>>=0,_.decode(u().subarray(e,e+t))}function ie(e){return e==null}let y=null;function ae(){return(y===null||y.byteLength===0)&&(y=new Float32Array(s.memory.buffer)),y}function oe(e,t){let n=t(e.length*4,4)>>>0;return ae().set(e,n/4),c=e.length,n}function b(e,t){let n=t(e.length*1,1)>>>0;return u().set(e,n/1),c=e.length,n}function se(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=h(e[t]);m().setUint32(n+4*t,r,!0)}return c=e.length,n}function ce(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=b(t,s.__wbindgen_malloc_command_export),a=c;return s.register_font(n,r,i,a)!==0}const x=Object.freeze({Forward:0,0:`Forward`,Reverse:1,1:`Reverse`,Bounce:2,2:`Bounce`,ReverseBounce:3,3:`ReverseBounce`}),le=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_dotlottieplayerwasm_free(e>>>0,1));var ue=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,le.unregister(this),e}free(){let e=this.__destroy_into_raw();s.__wbg_dotlottieplayerwasm_free(e,0)}clear_slot(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,t,n)!==0}is_playing(){return s.dotlottieplayerwasm_is_playing(this.__wbg_ptr)!==0}is_stopped(){return s.dotlottieplayerwasm_is_stopped(this.__wbg_ptr)!==0}layout_fit(){let e,t;try{let n=s.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return e=n[0],t=n[1],v(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}loop_count(){return s.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return s.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}reset_slot(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,t,n)!==0}set_layout(e,t,n){let r=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),i=c;return s.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,i,t,n)!==0}set_marker(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;s.dotlottieplayerwasm_set_marker(this.__wbg_ptr,t,n)}clear_slots(){return s.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}is_complete(){return s.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}is_tweening(){return s.dotlottieplayerwasm_is_tweening(this.__wbg_ptr)!==0}reset_slots(){return s.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}reset_theme(){return s.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}segment_end(){return s.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(e){return s.dotlottieplayerwasm_set_quality(this.__wbg_ptr,e)!==0}set_segment(e,t){return s.dotlottieplayerwasm_set_segment(this.__wbg_ptr,e,t)!==0}sm_set_seed(e){return s.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,e)!==0}static unload_font(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_unload_font(t,n)!==0}animation_id(){let e=s.dotlottieplayerwasm_animation_id(this.__wbg_ptr),t;return e[0]!==0&&(t=v(e[0],e[1]).slice(),s.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}audio_volume(){return s.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return s.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return s.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return s.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return s.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){s.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){s.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return s.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr)}get_slot_str(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=v(r[0],r[1]).slice(),s.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}marker_names(){return s.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}set_autoplay(e){s.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,e)}set_slot_str(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=f(t,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,i,a)!==0}set_viewport(e,t,n,r){return s.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,e,t,n,r)!==0}total_frames(){return s.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return s.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}current_frame(){return s.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=v(r[0],r[1]).slice(),s.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}get_slots_str(){let e,t;try{let n=s.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return e=n[0],t=n[1],v(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}get_transform(){return s.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}segment_start(){return s.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,t,n)!==0}set_text_slot(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=f(t,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,i,a)!==0}set_transform(e){let t=oe(e,s.__wbindgen_malloc_command_export),n=c;return s.dotlottieplayerwasm_set_transform(this.__wbg_ptr,t,n)!==0}sm_get_inputs(){return s.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr)}sm_poll_event(){return s.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr)}sm_post_click(e,t){s.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,e,t)}animation_size(){return s.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}current_marker(){let e=s.dotlottieplayerwasm_current_marker(this.__wbg_ptr),t;return e[0]!==0&&(t=v(e[0],e[1]).slice(),s.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}layout_align_x(){return s.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return s.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_load_animation(this.__wbg_ptr,t,n)!==0}loop_animation(){return s.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_background(e,t,n,r){return s.dotlottieplayerwasm_set_background(this.__wbg_ptr,e,t,n,r)!==0}set_color_slot(e,t,n,r){let i=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,a,t,n,r)!==0}set_image_slot(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=f(t,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,n,r,i,a)!==0}set_loop_count(e){s.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,e)}set_theme_data(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,t,n)!==0}sm_reset_input(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;s.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,t,n)}manifest_string(){let e,t;try{let n=s.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return e=n[0],t=n[1],v(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}set_scalar_slot(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;return s.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,t)!==0}set_vector_slot(e,t,n){let r=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),i=c;return s.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,i,t,n)!==0}setup_sw_target(e,t){return s.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,e,t)!==0}get_pixel_buffer(){return s.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr)}set_audio_volume(e){s.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,e)}sm_current_state(){let e,t;try{let n=s.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return e=n[0],t=n[1],v(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}state_machine_id(){let e=s.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),t;return e[0]!==0&&(t=v(e[0],e[1]).slice(),s.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}get_state_machine(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=v(r[0],r[1]).slice(),s.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}set_position_slot(e,t,n){let r=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),i=c;return s.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,i,t,n)!==0}current_loop_count(){return s.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}sm_framework_setup(){return s.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr)}sm_post_pointer_up(e,t){s.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,e,t)}state_machine_load(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,t,n)!==0}load_dotlottie_data(e){let t=b(e,s.__wbindgen_malloc_command_export),n=c;return s.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,t,n)!==0}sm_get_string_input(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=v(r[0],r[1]).slice(),s.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}sm_set_string_input(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=f(t,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,i,a)!==0}sm_get_boolean_input(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,t,n);return r===16777215?void 0:r!==0}sm_get_numeric_input(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,t,n);return r===4294967297?void 0:r}sm_post_pointer_down(e,t){s.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,e,t)}sm_post_pointer_exit(e,t){s.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,e,t)}sm_post_pointer_move(e,t){s.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,e,t)}sm_set_boolean_input(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;return s.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,t)!==0}sm_set_numeric_input(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;return s.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,t)!==0}state_machine_unload(){s.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(e,t){s.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,e,t)}load_animation_from_id(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,t,n)!==0}sm_poll_internal_event(){return s.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}use_frame_interpolation(){return s.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}reset_current_loop_count(){s.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;return s.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,t)!==0}state_machine_load_from_id(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,t,n)!==0}set_use_frame_interpolation(e){s.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,e)}constructor(){let e=s.dotlottieplayerwasm_new();return this.__wbg_ptr=e>>>0,le.register(this,this.__wbg_ptr,this),this}mode(){return s.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return s.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}stop(){return s.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}tick(e){return s.dotlottieplayerwasm_tick(this.__wbg_ptr,e)!==0}pause(){return s.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}speed(){return s.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return s.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return s.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return s.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}markers(){return s.dotlottieplayerwasm_markers(this.__wbg_ptr)}sm_fire(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,t,n)!==0}sm_stop(){return s.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_tick(e){return s.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,e)!==0}autoplay(){return s.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}duration(){return s.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(e){s.dotlottieplayerwasm_set_loop(this.__wbg_ptr,e)}set_mode(e){s.dotlottieplayerwasm_set_mode(this.__wbg_ptr,e)}sm_start(e,t){let n=se(t,s.__wbindgen_malloc_command_export),r=c;return s.dotlottieplayerwasm_sm_start(this.__wbg_ptr,e,n,r)!==0}theme_id(){let e=s.dotlottieplayerwasm_theme_id(this.__wbg_ptr),t;return e[0]!==0&&(t=v(e[0],e[1]).slice(),s.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}is_loaded(){return s.dotlottieplayerwasm_is_loaded(this.__wbg_ptr)!==0}is_paused(){return s.dotlottieplayerwasm_is_paused(this.__wbg_ptr)!==0}load_font(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=b(t,s.__wbindgen_malloc_command_export),a=c;return s.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,i,a)!==0}set_frame(e){return s.dotlottieplayerwasm_set_frame(this.__wbg_ptr,e)!==0}set_speed(e){s.dotlottieplayerwasm_set_speed(this.__wbg_ptr,e)}set_theme(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_set_theme(this.__wbg_ptr,t,n)!==0}sm_status(){let e,t;try{let n=s.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return e=n[0],t=n[1],v(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}};async function de(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 fe(){let e={};return e.wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return g(function(e,t){let n=f(URL.createObjectURL(t),s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;m().setInt32(e+4,r,!0),m().setInt32(e+0,n,!0)},arguments)},e.wbg.__wbg_ended_b873fb75d0c13ca7=function(e){return e.ended},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let n,r;try{n=e,r=t,console.error(v(e,t))}finally{s.__wbindgen_free_command_export(n,r,1)}},e.wbg.__wbg_new_405e22f390576ce2=function(){return{}},e.wbg.__wbg_new_78feb108b6472713=function(){return[]},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Error()},e.wbg.__wbg_new_a12002a7f91c75be=function(e){return new Uint8Array(e)},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_newwithsrc_20307ca7e8762a81=function(){return g(function(e,t){return new Audio(v(e,t))},arguments)},e.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return g(function(e,t){return new Blob(e,t)},arguments)},e.wbg.__wbg_pause_b74c96d69f769518=function(){return g(function(e){e.pause()},arguments)},e.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return g(function(e){return e.play()},arguments)},e.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},e.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return g(function(e,t){URL.revokeObjectURL(v(e,t))},arguments)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return g(function(e,t,n){return Reflect.set(e,t,n)},arguments)},e.wbg.__wbg_setcurrentTime_64727eddd3966512=function(e,t){e.currentTime=t},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(e,t,n){e[t>>>0]=n},e.wbg.__wbg_settype_39ed370d3edd403c=function(e,t,n){e.type=v(t,n)},e.wbg.__wbg_setvolume_3895e06a030ca4f7=function(e,t){e.volume=t},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){let n=t.stack,r=f(n,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),i=c;m().setInt32(e+4,i,!0),m().setInt32(e+0,r,!0)},e.wbg.__wbindgen_init_externref_table=function(){let e=s.__wbindgen_export_4,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 s.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=ie(r)?0:f(r,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;m().setInt32(e+4,a,!0),m().setInt32(e+0,i,!0)},e.wbg.__wbindgen_string_new=function(e,t){return v(e,t)},e.wbg.__wbindgen_throw=function(e,t){throw Error(v(e,t))},e}function pe(e,t){return s=e.exports,me.__wbindgen_wasm_module=t,p=null,y=null,l=null,s.__wbindgen_start(),s}async function me(e){if(s!==void 0)return s;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=fe();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await de(await e,t);return pe(n,r)}var he=class{constructor(){o(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()}},S=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)}};o(S,`_observer`,null),o(S,`_observedCanvases`,new Map);var C=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)}};o(C,`_observer`,null),o(C,`_observedCanvases`,new Map);function ge(e){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(e)}function _e(e){if(!ge(e))return[0,0,0,0];let t=e.replace(`#`,``);return t=t.length===6?`${t}ff`:t,[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255,parseInt(t.slice(6,8),16)/255]}function ve(e){if(e.byteLength<4)return!1;let n=new Uint8Array(e.slice(0,t.byteLength));for(let e=0;e<t.length;e+=1)if(t[e]!==n[e])return!1;return!0}function ye(e){return n.every(t=>Object.hasOwn(e,t))}function be(e){return typeof e==`string`?/^\s*\{/u.test(e)&&/\}\s*$/u.test(e):ye(e)}function w(){return 1+((e?window.devicePixelRatio:1)-1)*.75}function T(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 E(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 xe(e){return 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)})}async function Se(e){if(!/^https?:\/\//i.test(e))return e;let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch image slot source from URL: ${e}. ${t.status}: ${t.statusText}`);return xe(await t.blob())}function Ce(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 D(e,t,n){let r=null,i=t;async function a(t){await e({module_or_path:t})}async function o(t){let n=await fetch(t);if(!n.ok)throw Error(`fetch ${t} responded with ${n.status} ${n.statusText}`);await e({module_or_path:await n.arrayBuffer()})}return{load(){if(!r){let e=i,t=n;r=(async()=>{let n,i;try{await a(e);return}catch(r){n=r,console.warn(`Primary WASM load failed from ${e}: ${r.message}`),console.warn(`Attempting to load WASM from backup URL: ${t}`)}try{await a(t);return}catch(e){i=e,console.warn(`Backup WASM load failed from ${t}: ${e.message}`)}console.warn(`Retrying WASM load with buffered instantiation`);try{await o(e);return}catch(t){console.warn(`Buffered WASM load from ${e} failed: ${t.message}`)}try{await o(t);return}catch(e){throw console.error(`Primary WASM URL failed: ${n.message}`),console.error(`Backup WASM URL failed: ${i.message}`),console.error(`Buffered fallback failed: ${e.message}`),r=null,Error(`WASM loading failed from all sources.`)}})()}return r},setWasmUrl(e){e!==i&&(i=e,r=null)}}}let O=null;function k(){return O??(O=D(me,`https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.78.0/dist/dotlottie-player.wasm`,`https://unpkg.com/@lottiefiles/dotlottie-web@0.78.0/dist/dotlottie-player.wasm`)),O}const A=e=>{switch(e){case`reverse`:return x.Reverse;case`bounce`:return x.Bounce;case`reverse-bounce`:return x.ReverseBounce;default:return x.Forward}},j=e=>{switch(e){case x.Reverse:return`reverse`;case x.Bounce:return`bounce`;case x.ReverseBounce:return`reverse-bounce`;default:return`forward`}},we=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 Te=class{constructor(e){o(this,`_canvas`,null),o(this,`_pendingLoad`,null),o(this,`_srcFetchAbort`,null),o(this,`_context`,null),o(this,`_eventManager`,void 0),o(this,`_animationFrameId`,null),o(this,`_frameManager`,void 0),o(this,`_boundAnimationLoop`,void 0),o(this,`_dotLottieCore`,null),o(this,`_stateMachineId`,``),o(this,`_stateMachineConfig`,null),o(this,`_isStateMachineRunning`,!1),o(this,`_renderConfig`,{}),o(this,`_isFrozen`,!1),o(this,`_backgroundColor`,null),o(this,`_lastFrameTime`,null),o(this,`_boundOnClick`,null),o(this,`_boundOnPointerUp`,null),o(this,`_boundOnPointerDown`,null),o(this,`_boundOnPointerMove`,null),o(this,`_boundOnPointerEnter`,null),o(this,`_boundOnPointerLeave`,null),o(this,`_bufferMismatchCount`,0),o(this,`_lastExpectedBufferSize`,0),o(this,`_cachedImageData`,null),o(this,`_cachedImageDataBuffer`,null),o(this,`_cachedImageDataByteOffset`,0),o(this,`_marker`,``),o(this,`_segment`,null),this._canvas=e.canvas??null,this._eventManager=new he,this._frameManager=new ne,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...e.renderConfig,devicePixelRatio:e.renderConfig?.devicePixelRatio||w(),freezeOnOffscreen:e.renderConfig?.freezeOnOffscreen??!0};let t=null;e.src&&!e.data&&(this._srcFetchAbort=new AbortController,t=this._fetchData(e.src,this._srcFetchAbort.signal),t.catch(()=>{})),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(A(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._segment=[e.segment[0],e.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._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,t):this._pendingLoad={src:e.src,dataPromise:t}),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor)}).catch(e=>{this._srcFetchAbort?.abort(),console.error(`[dotlottie-web] Initialization failed:`,e),this._eventManager.dispatch({type:`loadError`,error:Error(`Failed to load wasm module: ${e}`)})})}async _initWasm(){return k().load()}_createCore(){return new ue}_onCoreCreated(){}_setupTarget(e,t){return this._dotLottieCore?this._dotLottieCore.setup_sw_target(e,t):!1}_drainPlayerEvents({skipFrame:e=!1}={}){if(!this._dotLottieCore)return;let t;for(;(t=this._dotLottieCore.poll_event())!=null;){let n=t;switch(n.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`:e||queueMicrotask(()=>this._eventManager.dispatch({type:`frame`,currentFrame:n.frameNo??0}));break;case`Render`:e||queueMicrotask(()=>this._eventManager.dispatch({type:`render`,currentFrame:n.frameNo??0}));break;case`Loop`:queueMicrotask(()=>this._eventManager.dispatch({type:`loop`,loopCount:n.loopCount??0}));break;case`Complete`:queueMicrotask(()=>this._eventManager.dispatch({type:`complete`}));break;default:break}}}_discardPlayerEvents(){for(;this._dotLottieCore?.poll_event()!=null;);}_drainSmEvents(){if(!this._dotLottieCore)return;let t;for(;(t=this._dotLottieCore.sm_poll_event())!=null;){let e=t;switch(e.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?.is_playing()||this._stopAnimationLoop()});break;case`CustomEvent`:this._eventManager.dispatch({type:`stateMachineCustomEvent`,eventName:e.message??``});break;case`BooleanInputChange`:this._eventManager.dispatch({type:`stateMachineBooleanInputValueChange`,inputName:e.name??``,newValue:e.newValue,oldValue:e.oldValue});break;case`NumericInputChange`:this._eventManager.dispatch({type:`stateMachineNumericInputValueChange`,inputName:e.name??``,newValue:e.newValue,oldValue:e.oldValue});break;case`StringInputChange`:this._eventManager.dispatch({type:`stateMachineStringInputValueChange`,inputName:e.name??``,newValue:e.newValue,oldValue:e.oldValue});break;case`InputFired`:this._eventManager.dispatch({type:`stateMachineInputFired`,inputName:e.name??``});break;case`Transition`:this._eventManager.dispatch({type:`stateMachineTransition`,fromState:e.previousState??``,toState:e.newState??``});break;case`StateEntered`:this._eventManager.dispatch({type:`stateMachineStateEntered`,state:e.state??``});break;case`StateExit`:this._eventManager.dispatch({type:`stateMachineStateExit`,state:e.state??``});break;case`Error`:this._eventManager.dispatch({type:`stateMachineError`,error:e.message??``});break;default:break}}let n;for(;(n=this._dotLottieCore.sm_poll_internal_event())!=null;){let t=n;if(t.type===`Message`){let n=t.message??``;e&&n.startsWith(`OpenUrl: `)?Ce(n):this._eventManager.dispatch({type:`stateMachineInternalMessage`,message:n})}}}_dispatchError(e){console.error(e),this._eventManager.dispatch({type:`loadError`,error:Error(e)})}async _fetchData(e,t=null){let n=await fetch(e,{signal:t});if(!n.ok)throw Error(`Failed to fetch animation data from URL: ${e}. ${n.status}: ${n.statusText}`);let r=await n.arrayBuffer();return ve(r)?r:new TextDecoder().decode(r)}_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 n=!1;if(typeof t==`string`){if(n=this._dotLottieCore.load_animation(t),!n&&!be(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(!ve(t)){this._dispatchError(`Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.`);return}n=this._dotLottieCore.load_dotlottie_data(new Uint8Array(t))}else if(typeof t==`object`){if(!be(t)){this._dispatchError(`Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.`);return}n=this._dotLottieCore.load_animation(JSON.stringify(t))}else{this._dispatchError(`Unsupported data type for animation data. Expected:
|
|
1
|
+
const e=typeof window<`u`&&window.document!==void 0,t=new Uint8Array([80,75,3,4]),n=[`v`,`ip`,`op`,`layers`,`fr`,`w`,`h`];function r(e){"@babel/helpers - typeof";return r=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},r(e)}function i(e,t){if(r(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||`default`);if(r(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function a(e){var t=i(e,`string`);return r(t)==`symbol`?t:t+``}function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ee=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},te=class{constructor(){o(this,`_lastHandleId`,0),o(this,`_lastImmediate`,null)}requestAnimationFrame(e){return this._lastHandleId>=2**53-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(performance.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},ne=class{constructor(){o(this,`_strategy`,void 0),this._strategy=typeof requestAnimationFrame==`function`?new ee:new te}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}};let s,c=0,l=null;function u(){return(l===null||l.byteLength===0)&&(l=new Uint8Array(s.memory.buffer)),l}const d=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}},re=typeof d.encodeInto==`function`?function(e,t){return d.encodeInto(e,t)}:function(e,t){let n=d.encode(e);return t.set(n),{read:e.length,written:n.length}};function f(e,t,n){if(n===void 0){let n=d.encode(e),r=t(n.length,1)>>>0;return u().subarray(r,r+n.length).set(n),c=n.length,r}let r=e.length,i=t(r,1)>>>0,a=u(),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=u().subarray(i+o,i+r),a=re(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return c=o,i}let p=null;function m(){return(p===null||p.buffer.detached===!0||p.buffer.detached===void 0&&p.buffer!==s.memory.buffer)&&(p=new DataView(s.memory.buffer)),p}function h(e){let t=s.__externref_table_alloc_command_export();return s.__wbindgen_export_4.set(t,e),t}function g(e,t){try{return e.apply(this,t)}catch(e){let t=h(e);s.__wbindgen_exn_store_command_export(t)}}const ie=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&ie.decode();function _(e,t){return e>>>=0,ie.decode(u().subarray(e,e+t))}function ae(e){return e==null}let v=null;function oe(){return(v===null||v.byteLength===0)&&(v=new Float32Array(s.memory.buffer)),v}function se(e,t){let n=t(e.length*4,4)>>>0;return oe().set(e,n/4),c=e.length,n}function y(e,t){let n=t(e.length*1,1)>>>0;return u().set(e,n/1),c=e.length,n}function ce(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=h(e[t]);m().setUint32(n+4*t,r,!0)}return c=e.length,n}function le(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=y(t,s.__wbindgen_malloc_command_export),a=c;return s.register_font(n,r,i,a)!==0}const b=Object.freeze({Forward:0,0:`Forward`,Reverse:1,1:`Reverse`,Bounce:2,2:`Bounce`,ReverseBounce:3,3:`ReverseBounce`}),x=Object.freeze({Idle:0,0:`Idle`,Playing:1,1:`Playing`,Paused:2,2:`Paused`,Stopped:3,3:`Stopped`,Tweening:4,4:`Tweening`}),ue=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_dotlottieplayerwasm_free(e>>>0,1));var de=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ue.unregister(this),e}free(){let e=this.__destroy_into_raw();s.__wbg_dotlottieplayerwasm_free(e,0)}clear_slot(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,t,n)!==0}layout_fit(){let e,t;try{let n=s.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return e=n[0],t=n[1],_(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}loop_count(){return s.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return s.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}reset_slot(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,t,n)!==0}set_layout(e,t,n){let r=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),i=c;return s.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,i,t,n)!==0}set_marker(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;s.dotlottieplayerwasm_set_marker(this.__wbg_ptr,t,n)}clear_slots(){return s.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}is_complete(){return s.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}reset_slots(){return s.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}reset_theme(){return s.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}segment_end(){return s.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(e){return s.dotlottieplayerwasm_set_quality(this.__wbg_ptr,e)!==0}set_segment(e,t){return s.dotlottieplayerwasm_set_segment(this.__wbg_ptr,e,t)!==0}sm_set_seed(e){return s.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,e)!==0}static unload_font(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_unload_font(t,n)!==0}animation_id(){let e=s.dotlottieplayerwasm_animation_id(this.__wbg_ptr),t;return e[0]!==0&&(t=_(e[0],e[1]).slice(),s.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}audio_volume(){return s.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return s.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return s.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return s.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return s.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){s.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){s.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return s.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr)}get_slot_str(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=_(r[0],r[1]).slice(),s.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}marker_names(){return s.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}set_autoplay(e){s.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,e)}set_slot_str(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=f(t,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,i,a)!==0}set_viewport(e,t,n,r){return s.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,e,t,n,r)!==0}total_frames(){return s.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return s.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}current_frame(){return s.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=_(r[0],r[1]).slice(),s.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}get_slots_str(){let e,t;try{let n=s.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return e=n[0],t=n[1],_(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}get_transform(){return s.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}segment_start(){return s.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,t,n)!==0}set_text_slot(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=f(t,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,i,a)!==0}set_transform(e){let t=se(e,s.__wbindgen_malloc_command_export),n=c;return s.dotlottieplayerwasm_set_transform(this.__wbg_ptr,t,n)!==0}sm_get_inputs(){return s.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr)}sm_poll_event(){return s.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr)}sm_post_click(e,t){s.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,e,t)}animation_size(){return s.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}current_marker(){let e=s.dotlottieplayerwasm_current_marker(this.__wbg_ptr),t;return e[0]!==0&&(t=_(e[0],e[1]).slice(),s.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}layout_align_x(){return s.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return s.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_load_animation(this.__wbg_ptr,t,n)!==0}loop_animation(){return s.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_background(e,t,n,r){return s.dotlottieplayerwasm_set_background(this.__wbg_ptr,e,t,n,r)!==0}set_color_slot(e,t,n,r){let i=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,a,t,n,r)!==0}set_image_slot(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=f(t,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,n,r,i,a)!==0}set_loop_count(e){s.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,e)}set_theme_data(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,t,n)!==0}sm_reset_input(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;s.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,t,n)}manifest_string(){let e,t;try{let n=s.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return e=n[0],t=n[1],_(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}set_scalar_slot(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;return s.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,t)!==0}set_vector_slot(e,t,n){let r=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),i=c;return s.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,i,t,n)!==0}setup_sw_target(e,t){return s.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,e,t)!==0}get_pixel_buffer(){return s.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr)}set_audio_volume(e){s.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,e)}sm_current_state(){let e,t;try{let n=s.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return e=n[0],t=n[1],_(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}state_machine_id(){let e=s.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),t;return e[0]!==0&&(t=_(e[0],e[1]).slice(),s.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}get_state_machine(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=_(r[0],r[1]).slice(),s.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}set_position_slot(e,t,n){let r=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),i=c;return s.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,i,t,n)!==0}current_loop_count(){return s.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}sm_framework_setup(){return s.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr)}sm_post_pointer_up(e,t){s.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,e,t)}state_machine_load(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,t,n)!==0}load_dotlottie_data(e){let t=y(e,s.__wbindgen_malloc_command_export),n=c;return s.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,t,n)!==0}sm_get_string_input(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=_(r[0],r[1]).slice(),s.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}sm_set_string_input(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=f(t,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;return s.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,i,a)!==0}sm_get_boolean_input(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,t,n);return r===16777215?void 0:r!==0}sm_get_numeric_input(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c,r=s.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,t,n);return r===4294967297?void 0:r}sm_post_pointer_down(e,t){s.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,e,t)}sm_post_pointer_exit(e,t){s.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,e,t)}sm_post_pointer_move(e,t){s.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,e,t)}sm_set_boolean_input(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;return s.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,t)!==0}sm_set_numeric_input(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;return s.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,t)!==0}state_machine_unload(){s.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(e,t){s.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,e,t)}load_animation_from_id(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,t,n)!==0}sm_poll_internal_event(){return s.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}use_frame_interpolation(){return s.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}reset_current_loop_count(){s.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;return s.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,t)!==0}state_machine_load_from_id(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,t,n)!==0}set_use_frame_interpolation(e){s.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,e)}constructor(){let e=s.dotlottieplayerwasm_new();return this.__wbg_ptr=e>>>0,ue.register(this,this.__wbg_ptr,this),this}mode(){return s.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return s.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}stop(){return s.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}tick(e){return s.dotlottieplayerwasm_tick(this.__wbg_ptr,e)!==0}pause(){return s.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}speed(){return s.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return s.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return s.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return s.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}status(){return s.dotlottieplayerwasm_status(this.__wbg_ptr)}markers(){return s.dotlottieplayerwasm_markers(this.__wbg_ptr)}sm_fire(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,t,n)!==0}sm_stop(){return s.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_tick(e){return s.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,e)!==0}autoplay(){return s.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}duration(){return s.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(e){s.dotlottieplayerwasm_set_loop(this.__wbg_ptr,e)}set_mode(e){s.dotlottieplayerwasm_set_mode(this.__wbg_ptr,e)}sm_start(e,t){let n=ce(t,s.__wbindgen_malloc_command_export),r=c;return s.dotlottieplayerwasm_sm_start(this.__wbg_ptr,e,n,r)!==0}theme_id(){let e=s.dotlottieplayerwasm_theme_id(this.__wbg_ptr),t;return e[0]!==0&&(t=_(e[0],e[1]).slice(),s.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}load_font(e,t){let n=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c,i=y(t,s.__wbindgen_malloc_command_export),a=c;return s.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,i,a)!==0}set_frame(e){return s.dotlottieplayerwasm_set_frame(this.__wbg_ptr,e)!==0}set_speed(e){s.dotlottieplayerwasm_set_speed(this.__wbg_ptr,e)}set_theme(e){let t=f(e,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),n=c;return s.dotlottieplayerwasm_set_theme(this.__wbg_ptr,t,n)!==0}sm_status(){let e,t;try{let n=s.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return e=n[0],t=n[1],_(n[0],n[1])}finally{s.__wbindgen_free_command_export(e,t,1)}}};async function fe(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 pe(){let e={};return e.wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return g(function(e,t){let n=f(URL.createObjectURL(t),s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),r=c;m().setInt32(e+4,r,!0),m().setInt32(e+0,n,!0)},arguments)},e.wbg.__wbg_ended_b873fb75d0c13ca7=function(e){return e.ended},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let n,r;try{n=e,r=t,console.error(_(e,t))}finally{s.__wbindgen_free_command_export(n,r,1)}},e.wbg.__wbg_new_405e22f390576ce2=function(){return{}},e.wbg.__wbg_new_78feb108b6472713=function(){return[]},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Error()},e.wbg.__wbg_new_a12002a7f91c75be=function(e){return new Uint8Array(e)},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_newwithsrc_20307ca7e8762a81=function(){return g(function(e,t){return new Audio(_(e,t))},arguments)},e.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return g(function(e,t){return new Blob(e,t)},arguments)},e.wbg.__wbg_pause_b74c96d69f769518=function(){return g(function(e){e.pause()},arguments)},e.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return g(function(e){return e.play()},arguments)},e.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},e.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return g(function(e,t){URL.revokeObjectURL(_(e,t))},arguments)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return g(function(e,t,n){return Reflect.set(e,t,n)},arguments)},e.wbg.__wbg_setcurrentTime_64727eddd3966512=function(e,t){e.currentTime=t},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(e,t,n){e[t>>>0]=n},e.wbg.__wbg_settype_39ed370d3edd403c=function(e,t,n){e.type=_(t,n)},e.wbg.__wbg_setvolume_3895e06a030ca4f7=function(e,t){e.volume=t},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){let n=t.stack,r=f(n,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),i=c;m().setInt32(e+4,i,!0),m().setInt32(e+0,r,!0)},e.wbg.__wbindgen_init_externref_table=function(){let e=s.__wbindgen_export_4,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 s.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=ae(r)?0:f(r,s.__wbindgen_malloc_command_export,s.__wbindgen_realloc_command_export),a=c;m().setInt32(e+4,a,!0),m().setInt32(e+0,i,!0)},e.wbg.__wbindgen_string_new=function(e,t){return _(e,t)},e.wbg.__wbindgen_throw=function(e,t){throw Error(_(e,t))},e}function me(e,t){return s=e.exports,he.__wbindgen_wasm_module=t,p=null,v=null,l=null,s.__wbindgen_start(),s}async function he(e){if(s!==void 0)return s;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=pe();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await fe(await e,t);return me(n,r)}var ge=class{constructor(){o(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()}},S=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)}};o(S,`_observer`,null),o(S,`_observedCanvases`,new Map);var C=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)}};o(C,`_observer`,null),o(C,`_observedCanvases`,new Map);function _e(e){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(e)}function ve(e){if(!_e(e))return[0,0,0,0];let t=e.replace(`#`,``);return t=t.length===6?`${t}ff`:t,[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255,parseInt(t.slice(6,8),16)/255]}function ye(e){if(e.byteLength<4)return!1;let n=new Uint8Array(e.slice(0,t.byteLength));for(let e=0;e<t.length;e+=1)if(t[e]!==n[e])return!1;return!0}function be(e){return n.every(t=>Object.hasOwn(e,t))}function xe(e){return typeof e==`string`?/^\s*\{/u.test(e)&&/\}\s*$/u.test(e):be(e)}function w(){return 1+((e?window.devicePixelRatio:1)-1)*.75}function T(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 E(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 Se(e){return 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)})}async function Ce(e){if(!/^https?:\/\//i.test(e))return e;let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch image slot source from URL: ${e}. ${t.status}: ${t.statusText}`);return Se(await t.blob())}function we(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 D(e,t,n){let r=null,i=t;async function a(t){await e({module_or_path:t})}async function o(t){let n=await fetch(t);if(!n.ok)throw Error(`fetch ${t} responded with ${n.status} ${n.statusText}`);await e({module_or_path:await n.arrayBuffer()})}return{load(){if(!r){let e=i,t=n;r=(async()=>{let n,i;try{await a(e);return}catch(r){n=r,console.warn(`Primary WASM load failed from ${e}: ${r.message}`),console.warn(`Attempting to load WASM from backup URL: ${t}`)}try{await a(t);return}catch(e){i=e,console.warn(`Backup WASM load failed from ${t}: ${e.message}`)}console.warn(`Retrying WASM load with buffered instantiation`);try{await o(e);return}catch(t){console.warn(`Buffered WASM load from ${e} failed: ${t.message}`)}try{await o(t);return}catch(e){throw console.error(`Primary WASM URL failed: ${n.message}`),console.error(`Backup WASM URL failed: ${i.message}`),console.error(`Buffered fallback failed: ${e.message}`),r=null,Error(`WASM loading failed from all sources.`)}})()}return r},setWasmUrl(e){e!==i&&(i=e,r=null)}}}let O=null;function k(){return O??(O=D(he,`https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.78.1/dist/dotlottie-player.wasm`,`https://unpkg.com/@lottiefiles/dotlottie-web@0.78.1/dist/dotlottie-player.wasm`)),O}const A=e=>{switch(e){case`reverse`:return b.Reverse;case`bounce`:return b.Bounce;case`reverse-bounce`:return b.ReverseBounce;default:return b.Forward}},j=e=>{switch(e){case b.Reverse:return`reverse`;case b.Bounce:return`bounce`;case b.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 Ee=class{constructor(e){o(this,`_canvas`,null),o(this,`_pendingLoad`,null),o(this,`_srcFetchAbort`,null),o(this,`_context`,null),o(this,`_eventManager`,void 0),o(this,`_animationFrameId`,null),o(this,`_frameManager`,void 0),o(this,`_boundAnimationLoop`,void 0),o(this,`_dotLottieCore`,null),o(this,`_stateMachineId`,``),o(this,`_stateMachineConfig`,null),o(this,`_isStateMachineRunning`,!1),o(this,`_renderConfig`,{}),o(this,`_isFrozen`,!1),o(this,`_backgroundColor`,null),o(this,`_lastFrameTime`,null),o(this,`_boundOnClick`,null),o(this,`_boundOnPointerUp`,null),o(this,`_boundOnPointerDown`,null),o(this,`_boundOnPointerMove`,null),o(this,`_boundOnPointerEnter`,null),o(this,`_boundOnPointerLeave`,null),o(this,`_bufferMismatchCount`,0),o(this,`_lastExpectedBufferSize`,0),o(this,`_cachedImageData`,null),o(this,`_cachedImageDataBuffer`,null),o(this,`_cachedImageDataByteOffset`,0),o(this,`_marker`,``),o(this,`_segment`,null),this._canvas=e.canvas??null,this._eventManager=new ge,this._frameManager=new ne,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...e.renderConfig,devicePixelRatio:e.renderConfig?.devicePixelRatio||w(),freezeOnOffscreen:e.renderConfig?.freezeOnOffscreen??!0};let t=null;e.src&&!e.data&&(this._srcFetchAbort=new AbortController,t=this._fetchData(e.src,this._srcFetchAbort.signal),t.catch(()=>{})),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(A(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._segment=[e.segment[0],e.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._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,t):this._pendingLoad={src:e.src,dataPromise:t}),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor)}).catch(e=>{this._srcFetchAbort?.abort(),console.error(`[dotlottie-web] Initialization failed:`,e),this._eventManager.dispatch({type:`loadError`,error:Error(`Failed to load wasm module: ${e}`)})})}async _initWasm(){return k().load()}_createCore(){return new de}_onCoreCreated(){}_setupTarget(e,t){return this._dotLottieCore?this._dotLottieCore.setup_sw_target(e,t):!1}_drainPlayerEvents({skipFrame:e=!1}={}){if(!this._dotLottieCore)return;let t;for(;(t=this._dotLottieCore.poll_event())!=null;){let n=t;switch(n.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`:e||queueMicrotask(()=>this._eventManager.dispatch({type:`frame`,currentFrame:n.frameNo??0}));break;case`Render`:e||queueMicrotask(()=>this._eventManager.dispatch({type:`render`,currentFrame:n.frameNo??0}));break;case`Loop`:queueMicrotask(()=>this._eventManager.dispatch({type:`loop`,loopCount:n.loopCount??0}));break;case`Complete`:queueMicrotask(()=>this._eventManager.dispatch({type:`complete`}));break;default:break}}}_discardPlayerEvents(){for(;this._dotLottieCore?.poll_event()!=null;);}_drainSmEvents(){if(!this._dotLottieCore)return;let t;for(;(t=this._dotLottieCore.sm_poll_event())!=null;){let e=t;switch(e.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()!==x.Playing&&this._stopAnimationLoop()});break;case`CustomEvent`:this._eventManager.dispatch({type:`stateMachineCustomEvent`,eventName:e.message??``});break;case`BooleanInputChange`:this._eventManager.dispatch({type:`stateMachineBooleanInputValueChange`,inputName:e.name??``,newValue:e.newValue,oldValue:e.oldValue});break;case`NumericInputChange`:this._eventManager.dispatch({type:`stateMachineNumericInputValueChange`,inputName:e.name??``,newValue:e.newValue,oldValue:e.oldValue});break;case`StringInputChange`:this._eventManager.dispatch({type:`stateMachineStringInputValueChange`,inputName:e.name??``,newValue:e.newValue,oldValue:e.oldValue});break;case`InputFired`:this._eventManager.dispatch({type:`stateMachineInputFired`,inputName:e.name??``});break;case`Transition`:this._eventManager.dispatch({type:`stateMachineTransition`,fromState:e.previousState??``,toState:e.newState??``});break;case`StateEntered`:this._eventManager.dispatch({type:`stateMachineStateEntered`,state:e.state??``});break;case`StateExit`:this._eventManager.dispatch({type:`stateMachineStateExit`,state:e.state??``});break;case`Error`:this._eventManager.dispatch({type:`stateMachineError`,error:e.message??``});break;default:break}}let n;for(;(n=this._dotLottieCore.sm_poll_internal_event())!=null;){let t=n;if(t.type===`Message`){let n=t.message??``;e&&n.startsWith(`OpenUrl: `)?we(n):this._eventManager.dispatch({type:`stateMachineInternalMessage`,message:n})}}}_dispatchError(e){console.error(e),this._eventManager.dispatch({type:`loadError`,error:Error(e)})}async _fetchData(e,t=null){let n=await fetch(e,{signal:t});if(!n.ok)throw Error(`Failed to fetch animation data from URL: ${e}. ${n.status}: ${n.statusText}`);let r=await n.arrayBuffer();return ye(r)?r:new TextDecoder().decode(r)}_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 n=!1;if(typeof t==`string`){if(n=this._dotLottieCore.load_animation(t),!n&&!xe(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(!ye(t)){this._dispatchError(`Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.`);return}n=this._dotLottieCore.load_dotlottie_data(new Uint8Array(t))}else if(typeof t==`object`){if(!xe(t)){this._dispatchError(`Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.`);return}n=this._dotLottieCore.load_animation(JSON.stringify(t))}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
|
-
Received: ${typeof t}`);return}if(n){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 e=j(this._dotLottieCore.mode()),t=e===`reverse`||e===`reverse-bounce`?this._segment[1]:this._segment[0];this._dotLottieCore.set_frame(t)}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(),e&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(S.observe(this._canvas,this),T(this._canvas)||this.freeze()),this._renderConfig.autoResize&&C.observe(this._canvas,this))}else this._drainPlayerEvents()}_loadFromSrc(e,t){(t??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:we(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)return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?j(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)/1e3}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(A(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._segment=[e.segment[0],e.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])):(this._segment=null,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}),e.backgroundColor&&this.setBackgroundColor(e.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(),n=this._canvas.width,r=this._canvas.height,i=n*r*4;if(t.byteLength!==i){this._lastExpectedBufferSize===i?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=i),this._bufferMismatchCount===10&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${i} bytes for canvas ${n}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=i;let a=this._cachedImageData;if(!(a!==null&&a.width===n&&a.height===r&&a.data.byteLength===i&&this._cachedImageDataBuffer===t.buffer&&this._cachedImageDataByteOffset===t.byteOffset)){if(typeof ImageData>`u`)this._cachedImageData=this._context.createImageData(n,r);else{let e=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData=new ImageData(e,n,r)}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&&e&&this._canvas instanceof HTMLCanvasElement&&(S.unobserve(this._canvas),C.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&e&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(S.observe(this._canvas,this),T(this._canvas)||this.freeze()),this._renderConfig.autoResize&&C.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.is_playing()||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop))}_animationLoop(e){if(this._dotLottieCore===null){this._stopAnimationLoop();return}if(!this._dotLottieCore.is_playing()&&!this._isStateMachineRunning){this._stopAnimationLoop();return}try{let t=this._lastFrameTime===null?0:e-this._lastFrameTime;this._lastFrameTime=e;let n=this._isStateMachineRunning?this._dotLottieCore.sm_tick(t):this._dotLottieCore.tick(t);this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),n&&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.is_playing())&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&e&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!T(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.set_frame(e)){let e=this._dotLottieCore.render();this._drainPlayerEvents(),e&&this._draw()}}setSpeed(e){this._dotLottieCore!==null&&this._dotLottieCore.set_speed(e)}setBackgroundColor(t){if(this._dotLottieCore!==null){if(e&&this._canvas instanceof HTMLCanvasElement)this._canvas.style.backgroundColor=t;else{let[e,n,r,i]=_e(t);this._dotLottieCore.set_background(e,n,r,i)}this._backgroundColor=t}}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._srcFetchAbort?.abort(),this._srcFetchAbort=null,this._pendingLoad=null;let e=this._dotLottieCore;if(this._dotLottieCore=null,this._context=null,e)try{e.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:n,width:r}=this._canvas.getBoundingClientRect();n!==0&&r!==0&&(this._canvas.width=r*t,this._canvas.height=n*t)}resize(){!this._dotLottieCore||!this.isLoaded||!this._canvas||(this._syncCanvasSize(),this._setupTarget(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,e.dataPromise)}}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._segment=[e,t],this._dotLottieCore.set_segment(e,t))}resetSegment(){this._dotLottieCore!==null&&(this._segment=null,this._dotLottieCore.clear_segment())}setMode(e){this._dotLottieCore!==null&&this._dotLottieCore.set_mode(A(e))}setRenderConfig(t){let{devicePixelRatio:n,freezeOnOffscreen:r,quality:i,...a}=t;this._renderConfig={...this._renderConfig,...a,devicePixelRatio:n||w(),freezeOnOffscreen:r??!0,...i!==void 0&&{quality:i}},i!==void 0&&this._dotLottieCore&&this._dotLottieCore.set_quality(i),e&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?C.observe(this._canvas,this):C.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(S.observe(this._canvas,this),T(this._canvas)||this.freeze()):(S.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(e){this._dotLottieCore===null||this._dotLottieCore.animation_id()===e||!this._canvas||(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height),this._dotLottieCore.load_animation_from_id(e)?(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: ${e}`))}setMarker(e){this._dotLottieCore!==null&&(this.markers().some(t=>t.name===e)?(this._marker=e,this._dotLottieCore.set_marker(e)):(this._marker=``,this._segment=null,this._dotLottieCore.clear_marker(),this._dotLottieCore.clear_segment()))}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,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=JSON.stringify({a:typeof t==`number`?0:1,k:t}),r=this._dotLottieCore.set_slot_str(e,n);return this._dotLottieCore.render(),this._draw(),r}setVectorSlot(e,t){if(this._dotLottieCore===null)return!1;let n=this._isKeyframeArray(t),r=JSON.stringify({a:+!!n,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,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}async setImageSlot(e,t){if(this._dotLottieCore===null)return!1;let n=await Se(t);if(this._dotLottieCore===null)return!1;let r=this._dotLottieCore.set_image_slot(e,n);return this._dotLottieCore.render(),this._draw(),r}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){k().setWasmUrl(e)}static preload(){return k().load()}static async registerFont(e,t){try{await k().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=ce(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}}animationSize(){let e=this._dotLottieCore?.animation_size();return{width:e?.[0]??0,height:e?.[1]??0}}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}stateMachineSetSeed(e){return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(e)))??!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=E(e);t&&this.stateMachinePostClickEvent(t.x,t.y)}_onPointerUp(e){let t=E(e);t&&this.stateMachinePostPointerUpEvent(t.x,t.y)}_onPointerDown(e){let t=E(e);t&&this.stateMachinePostPointerDownEvent(t.x,t.y)}_onPointerMove(e){let t=E(e);t&&this.stateMachinePostPointerMoveEvent(t.x,t.y)}_onPointerEnter(e){let t=E(e);t&&this.stateMachinePostPointerEnterEvent(t.x,t.y)}_onPointerLeave(e){let t=E(e);t&&this.stateMachinePostPointerExitEvent(t.x,t.y)}_setupStateMachineListeners(){if(e&&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(){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))}};let M;function N(e){let t=M.__externref_table_alloc_command_export();return M.__wbindgen_export_2.set(t,e),t}function P(e,t){try{return e.apply(this,t)}catch(e){let t=N(e);M.__wbindgen_exn_store_command_export(t)}}let F=0,I=null;function L(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(M.memory.buffer)),I}const R=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}},Ee=typeof R.encodeInto==`function`?function(e,t){return R.encodeInto(e,t)}:function(e,t){let n=R.encode(e);return t.set(n),{read:e.length,written:n.length}};function z(e,t,n){if(n===void 0){let n=R.encode(e),r=t(n.length,1)>>>0;return L().subarray(r,r+n.length).set(n),F=n.length,r}let r=e.length,i=t(r,1)>>>0,a=L(),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=L().subarray(i+o,i+r),a=Ee(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return F=o,i}let B=null;function V(){return(B===null||B.buffer.detached===!0||B.buffer.detached===void 0&&B.buffer!==M.memory.buffer)&&(B=new DataView(M.memory.buffer)),B}const De=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&De.decode();function H(e,t){return e>>>=0,De.decode(L().subarray(e,e+t))}function Oe(e,t){return e>>>=0,L().subarray(e/1,e/1+t)}function U(e){let t=typeof e;if(t==`number`||t==`boolean`||e==null)return`${e}`;if(t==`string`)return`"${e}"`;if(t==`symbol`){let t=e.description;return t==null?`Symbol`:`Symbol(${t})`}if(t==`function`){let t=e.name;return typeof t==`string`&&t.length>0?`Function(${t})`:`Function`}if(Array.isArray(e)){let t=e.length,n=`[`;t>0&&(n+=U(e[0]));for(let r=1;r<t;r++)n+=`, `+U(e[r]);return n+=`]`,n}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r==`Object`)try{return`Object(`+JSON.stringify(e)+`)`}catch{return`Object`}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function ke(e){return e==null}let W=null;function Ae(){return(W===null||W.byteLength===0)&&(W=new Float32Array(M.memory.buffer)),W}function je(e,t){let n=t(e.length*4,4)>>>0;return Ae().set(e,n/4),F=e.length,n}function Me(e,t){let n=t(e.length*1,1)>>>0;return L().set(e,n/1),F=e.length,n}function Ne(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=N(e[t]);V().setUint32(n+4*t,r,!0)}return F=e.length,n}Object.freeze({Forward:0,0:`Forward`,Reverse:1,1:`Reverse`,Bounce:2,2:`Bounce`,ReverseBounce:3,3:`ReverseBounce`});const G=[`clamp-to-edge`,`repeat`,`mirror-repeat`],Pe=[`zero`,`one`,`src`,`one-minus-src`,`src-alpha`,`one-minus-src-alpha`,`dst`,`one-minus-dst`,`dst-alpha`,`one-minus-dst-alpha`,`src-alpha-saturated`,`constant`,`one-minus-constant`,`src1`,`one-minus-src1`,`src1-alpha`,`one-minus-src1-alpha`],Fe=[`add`,`subtract`,`reverse-subtract`,`min`,`max`],Ie=[`uniform`,`storage`,`read-only-storage`],Le=[`opaque`,`premultiplied`],K=[`never`,`less`,`equal`,`less-equal`,`greater`,`not-equal`,`greater-equal`,`always`],Re=[`none`,`front`,`back`],ze=[`nearest`,`linear`],Be=[`ccw`,`cw`],Ve=[`uint16`,`uint32`],q=[`load`,`clear`],He=[`nearest`,`linear`],Ue=[`point-list`,`line-list`,`line-strip`,`triangle-list`,`triangle-strip`],We=[`filtering`,`non-filtering`,`comparison`],J=[`keep`,`zero`,`replace`,`invert`,`increment-clamp`,`decrement-clamp`,`increment-wrap`,`decrement-wrap`],Ge=[`write-only`,`read-only`,`read-write`],Y=[`store`,`discard`],Ke=[`all`,`stencil-only`,`depth-only`],qe=[`1d`,`2d`,`3d`],X=`r8unorm.r8snorm.r8uint.r8sint.r16uint.r16sint.r16float.rg8unorm.rg8snorm.rg8uint.rg8sint.r32uint.r32sint.r32float.rg16uint.rg16sint.rg16float.rgba8unorm.rgba8unorm-srgb.rgba8snorm.rgba8uint.rgba8sint.bgra8unorm.bgra8unorm-srgb.rgb9e5ufloat.rgb10a2uint.rgb10a2unorm.rg11b10ufloat.rg32uint.rg32sint.rg32float.rgba16uint.rgba16sint.rgba16float.rgba32uint.rgba32sint.rgba32float.stencil8.depth16unorm.depth24plus.depth24plus-stencil8.depth32float.depth32float-stencil8.bc1-rgba-unorm.bc1-rgba-unorm-srgb.bc2-rgba-unorm.bc2-rgba-unorm-srgb.bc3-rgba-unorm.bc3-rgba-unorm-srgb.bc4-r-unorm.bc4-r-snorm.bc5-rg-unorm.bc5-rg-snorm.bc6h-rgb-ufloat.bc6h-rgb-float.bc7-rgba-unorm.bc7-rgba-unorm-srgb.etc2-rgb8unorm.etc2-rgb8unorm-srgb.etc2-rgb8a1unorm.etc2-rgb8a1unorm-srgb.etc2-rgba8unorm.etc2-rgba8unorm-srgb.eac-r11unorm.eac-r11snorm.eac-rg11unorm.eac-rg11snorm.astc-4x4-unorm.astc-4x4-unorm-srgb.astc-5x4-unorm.astc-5x4-unorm-srgb.astc-5x5-unorm.astc-5x5-unorm-srgb.astc-6x5-unorm.astc-6x5-unorm-srgb.astc-6x6-unorm.astc-6x6-unorm-srgb.astc-8x5-unorm.astc-8x5-unorm-srgb.astc-8x6-unorm.astc-8x6-unorm-srgb.astc-8x8-unorm.astc-8x8-unorm-srgb.astc-10x5-unorm.astc-10x5-unorm-srgb.astc-10x6-unorm.astc-10x6-unorm-srgb.astc-10x8-unorm.astc-10x8-unorm-srgb.astc-10x10-unorm.astc-10x10-unorm-srgb.astc-12x10-unorm.astc-12x10-unorm-srgb.astc-12x12-unorm.astc-12x12-unorm-srgb`.split(`.`),Je=[`float`,`unfilterable-float`,`depth`,`sint`,`uint`],Z=[`1d`,`2d`,`2d-array`,`cube`,`cube-array`,`3d`],Ye=`uint8.uint8x2.uint8x4.sint8.sint8x2.sint8x4.unorm8.unorm8x2.unorm8x4.snorm8.snorm8x2.snorm8x4.uint16.uint16x2.uint16x4.sint16.sint16x2.sint16x4.unorm16.unorm16x2.unorm16x4.snorm16.snorm16x2.snorm16x4.float16.float16x2.float16x4.float32.float32x2.float32x3.float32x4.uint32.uint32x2.uint32x3.uint32x4.sint32.sint32x2.sint32x3.sint32x4.unorm10-10-10-2.unorm8x4-bgra`.split(`.`),Xe=[`vertex`,`instance`],Ze=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>M.__wbg_dotlottieplayerwasm_free(e>>>0,1));var Qe=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ze.unregister(this),e}free(){let e=this.__destroy_into_raw();M.__wbg_dotlottieplayerwasm_free(e,0)}clear_slot(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,t,n)!==0}is_playing(){return M.dotlottieplayerwasm_is_playing(this.__wbg_ptr)!==0}is_stopped(){return M.dotlottieplayerwasm_is_stopped(this.__wbg_ptr)!==0}layout_fit(){let e,t;try{let n=M.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}loop_count(){return M.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return M.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}reset_slot(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,t,n)!==0}set_layout(e,t,n){let r=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),i=F;return M.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,i,t,n)!==0}set_marker(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;M.dotlottieplayerwasm_set_marker(this.__wbg_ptr,t,n)}clear_slots(){return M.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}is_complete(){return M.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}is_tweening(){return M.dotlottieplayerwasm_is_tweening(this.__wbg_ptr)!==0}reset_slots(){return M.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}reset_theme(){return M.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}segment_end(){return M.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(e){return M.dotlottieplayerwasm_set_quality(this.__wbg_ptr,e)!==0}set_segment(e,t){return M.dotlottieplayerwasm_set_segment(this.__wbg_ptr,e,t)!==0}sm_set_seed(e){return M.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,e)!==0}static unload_font(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_unload_font(t,n)!==0}animation_id(){let e=M.dotlottieplayerwasm_animation_id(this.__wbg_ptr),t;return e[0]!==0&&(t=H(e[0],e[1]).slice(),M.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}audio_volume(){return M.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return M.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return M.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return M.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return M.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){M.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){M.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return M.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr)}get_slot_str(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=H(r[0],r[1]).slice(),M.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}marker_names(){return M.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}set_autoplay(e){M.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,e)}set_slot_str(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=z(t,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,i,a)!==0}set_viewport(e,t,n,r){return M.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,e,t,n,r)!==0}total_frames(){return M.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return M.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}current_frame(){return M.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=H(r[0],r[1]).slice(),M.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}get_slots_str(){let e,t;try{let n=M.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}get_transform(){return M.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}segment_start(){return M.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,t,n)!==0}set_text_slot(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=z(t,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,i,a)!==0}set_transform(e){let t=je(e,M.__wbindgen_malloc_command_export),n=F;return M.dotlottieplayerwasm_set_transform(this.__wbg_ptr,t,n)!==0}sm_get_inputs(){return M.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr)}sm_poll_event(){return M.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr)}sm_post_click(e,t){M.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,e,t)}animation_size(){return M.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}current_marker(){let e=M.dotlottieplayerwasm_current_marker(this.__wbg_ptr),t;return e[0]!==0&&(t=H(e[0],e[1]).slice(),M.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}layout_align_x(){return M.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return M.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_load_animation(this.__wbg_ptr,t,n)!==0}loop_animation(){return M.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_background(e,t,n,r){return M.dotlottieplayerwasm_set_background(this.__wbg_ptr,e,t,n,r)!==0}set_color_slot(e,t,n,r){let i=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,a,t,n,r)!==0}set_image_slot(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=z(t,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,n,r,i,a)!==0}set_loop_count(e){M.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,e)}set_theme_data(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,t,n)!==0}sm_reset_input(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;M.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,t,n)}manifest_string(){let e,t;try{let n=M.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}set_scalar_slot(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;return M.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,t)!==0}set_vector_slot(e,t,n){let r=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),i=F;return M.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,i,t,n)!==0}setup_wg_target(e,t){return M.dotlottieplayerwasm_setup_wg_target(this.__wbg_ptr,e,t)!==0}set_audio_volume(e){M.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,e)}sm_current_state(){let e,t;try{let n=M.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}state_machine_id(){let e=M.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),t;return e[0]!==0&&(t=H(e[0],e[1]).slice(),M.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}get_state_machine(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=H(r[0],r[1]).slice(),M.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}set_position_slot(e,t,n){let r=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),i=F;return M.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,i,t,n)!==0}set_webgpu_device(e){M.dotlottieplayerwasm_set_webgpu_device(this.__wbg_ptr,e)}current_loop_count(){return M.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}set_webgpu_surface(e){M.dotlottieplayerwasm_set_webgpu_surface(this.__wbg_ptr,e)}sm_framework_setup(){return M.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr)}sm_post_pointer_up(e,t){M.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,e,t)}state_machine_load(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,t,n)!==0}load_dotlottie_data(e){let t=Me(e,M.__wbindgen_malloc_command_export),n=F;return M.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,t,n)!==0}sm_get_string_input(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=H(r[0],r[1]).slice(),M.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}sm_set_string_input(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=z(t,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,i,a)!==0}sm_get_boolean_input(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,t,n);return r===16777215?void 0:r!==0}sm_get_numeric_input(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,t,n);return r===4294967297?void 0:r}sm_post_pointer_down(e,t){M.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,e,t)}sm_post_pointer_exit(e,t){M.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,e,t)}sm_post_pointer_move(e,t){M.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,e,t)}sm_set_boolean_input(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;return M.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,t)!==0}sm_set_numeric_input(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;return M.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,t)!==0}state_machine_unload(){M.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(e,t){M.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,e,t)}load_animation_from_id(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,t,n)!==0}sm_poll_internal_event(){return M.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}use_frame_interpolation(){return M.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}reset_current_loop_count(){M.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;return M.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,t)!==0}state_machine_load_from_id(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,t,n)!==0}set_use_frame_interpolation(e){M.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,e)}constructor(){let e=M.dotlottieplayerwasm_new();return this.__wbg_ptr=e>>>0,Ze.register(this,this.__wbg_ptr,this),this}mode(){return M.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return M.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}stop(){return M.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}tick(e){return M.dotlottieplayerwasm_tick(this.__wbg_ptr,e)!==0}pause(){return M.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}speed(){return M.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return M.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return M.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return M.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}markers(){return M.dotlottieplayerwasm_markers(this.__wbg_ptr)}sm_fire(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,t,n)!==0}sm_stop(){return M.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_tick(e){return M.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,e)!==0}autoplay(){return M.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}duration(){return M.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(e){M.dotlottieplayerwasm_set_loop(this.__wbg_ptr,e)}set_mode(e){M.dotlottieplayerwasm_set_mode(this.__wbg_ptr,e)}sm_start(e,t){let n=Ne(t,M.__wbindgen_malloc_command_export),r=F;return M.dotlottieplayerwasm_sm_start(this.__wbg_ptr,e,n,r)!==0}theme_id(){let e=M.dotlottieplayerwasm_theme_id(this.__wbg_ptr),t;return e[0]!==0&&(t=H(e[0],e[1]).slice(),M.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}is_loaded(){return M.dotlottieplayerwasm_is_loaded(this.__wbg_ptr)!==0}is_paused(){return M.dotlottieplayerwasm_is_paused(this.__wbg_ptr)!==0}load_font(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=Me(t,M.__wbindgen_malloc_command_export),a=F;return M.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,i,a)!==0}set_frame(e){return M.dotlottieplayerwasm_set_frame(this.__wbg_ptr,e)!==0}set_speed(e){M.dotlottieplayerwasm_set_speed(this.__wbg_ptr,e)}set_theme(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_set_theme(this.__wbg_ptr,t,n)!==0}sm_status(){let e,t;try{let n=M.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}};async function $e(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 et(){let e={};return e.wbg={},e.wbg.__wbg_beginComputePass_ce58248c78ea4f0b=function(e,t){return e.beginComputePass(t)},e.wbg.__wbg_beginRenderPass_509df70c967b895c=function(){return P(function(e,t){return e.beginRenderPass(t)},arguments)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_configure_7e2130842707feff=function(){return P(function(e,t){e.configure(t)},arguments)},e.wbg.__wbg_copyTextureToTexture_8b0d14b8089f3036=function(){return P(function(e,t,n,r){e.copyTextureToTexture(t,n,r)},arguments)},e.wbg.__wbg_createBindGroupLayout_5f799ca8bc5aa1fc=function(){return P(function(e,t){return e.createBindGroupLayout(t)},arguments)},e.wbg.__wbg_createBindGroup_ddd3bb343cf271fb=function(e,t){return e.createBindGroup(t)},e.wbg.__wbg_createBuffer_826176fb72deecbf=function(){return P(function(e,t){return e.createBuffer(t)},arguments)},e.wbg.__wbg_createCommandEncoder_579fe7e60b87a1c4=function(e,t){return e.createCommandEncoder(t)},e.wbg.__wbg_createComputePipeline_5f91c9fb81d570e7=function(e,t){return e.createComputePipeline(t)},e.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return P(function(e,t){let n=z(URL.createObjectURL(t),M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;V().setInt32(e+4,r,!0),V().setInt32(e+0,n,!0)},arguments)},e.wbg.__wbg_createPipelineLayout_b1406687fd03f870=function(e,t){return e.createPipelineLayout(t)},e.wbg.__wbg_createRenderPipeline_24a0e9be53ed468e=function(){return P(function(e,t){return e.createRenderPipeline(t)},arguments)},e.wbg.__wbg_createSampler_381b4ade52f53f68=function(e,t){return e.createSampler(t)},e.wbg.__wbg_createShaderModule_035719b95e2aae80=function(e,t){return e.createShaderModule(t)},e.wbg.__wbg_createTexture_6947ba7853a1d055=function(){return P(function(e,t){return e.createTexture(t)},arguments)},e.wbg.__wbg_createView_7f08b4f77746d573=function(){return P(function(e,t){return e.createView(t)},arguments)},e.wbg.__wbg_destroy_911c8640ffed5684=function(e){e.destroy()},e.wbg.__wbg_destroy_c1bd9f1fd447bebf=function(e){e.destroy()},e.wbg.__wbg_dispatchWorkgroups_6b7a05edf9c2b474=function(e,t,n,r){e.dispatchWorkgroups(t>>>0,n>>>0,r>>>0)},e.wbg.__wbg_drawIndexed_0d27b49d3d541ca9=function(e,t,n,r,i,a){e.drawIndexed(t>>>0,n>>>0,r>>>0,i,a>>>0)},e.wbg.__wbg_draw_afac1827162db569=function(e,t,n,r,i){e.draw(t>>>0,n>>>0,r>>>0,i>>>0)},e.wbg.__wbg_end_5f3989c200fa79e9=function(e){e.end()},e.wbg.__wbg_end_e9ed158432136036=function(e){e.end()},e.wbg.__wbg_ended_b873fb75d0c13ca7=function(e){return e.ended},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let n,r;try{n=e,r=t,console.error(H(e,t))}finally{M.__wbindgen_free_command_export(n,r,1)}},e.wbg.__wbg_finish_5d6bd1bf9cca88b0=function(e,t){return e.finish(t)},e.wbg.__wbg_finish_a3819bcf098c1f84=function(e){return e.finish()},e.wbg.__wbg_format_cb1ef2f3b44b306a=function(e){let t=e.format;return(X.indexOf(t)+1||96)-1},e.wbg.__wbg_getCurrentTexture_cf3b91d12114ffcb=function(){return P(function(e){return e.getCurrentTexture()},arguments)},e.wbg.__wbg_height_a1cdc6189018a9b3=function(e){return e.height},e.wbg.__wbg_new_405e22f390576ce2=function(){return{}},e.wbg.__wbg_new_5e0be73521bc8c17=function(){return new Map},e.wbg.__wbg_new_78feb108b6472713=function(){return[]},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Error()},e.wbg.__wbg_new_a12002a7f91c75be=function(e){return new Uint8Array(e)},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_newwithlength_a381634e90c276d4=function(e){return new Uint8Array(e>>>0)},e.wbg.__wbg_newwithsrc_20307ca7e8762a81=function(){return P(function(e,t){return new Audio(H(e,t))},arguments)},e.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return P(function(e,t){return new Blob(e,t)},arguments)},e.wbg.__wbg_pause_b74c96d69f769518=function(){return P(function(e){e.pause()},arguments)},e.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return P(function(e){return e.play()},arguments)},e.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},e.wbg.__wbg_queue_712d25576063d2fc=function(e){return e.queue},e.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return P(function(e,t){URL.revokeObjectURL(H(e,t))},arguments)},e.wbg.__wbg_setBindGroup_03656750a7c9f7c6=function(e,t,n){e.setBindGroup(t>>>0,n)},e.wbg.__wbg_setBindGroup_438462565faaa01c=function(e,t,n){e.setBindGroup(t>>>0,n)},e.wbg.__wbg_setBindGroup_8ec97340dd95cb9c=function(e,t,n,r){e.setBindGroup(t>>>0,n,r)},e.wbg.__wbg_setBindGroup_beb777273edc100f=function(e,t,n,r){e.setBindGroup(t>>>0,n,r)},e.wbg.__wbg_setIndexBuffer_1e94798fafd75b38=function(e,t,n,r,i){e.setIndexBuffer(t,Ve[n],r,i)},e.wbg.__wbg_setPipeline_4cd9468d332cf0cb=function(e,t){e.setPipeline(t)},e.wbg.__wbg_setPipeline_a48ed1de5bcb914a=function(e,t){e.setPipeline(t)},e.wbg.__wbg_setScissorRect_d69fa46fa55e5d29=function(e,t,n,r,i){e.setScissorRect(t>>>0,n>>>0,r>>>0,i>>>0)},e.wbg.__wbg_setStencilReference_d21fe89ea5f39f77=function(e,t){e.setStencilReference(t>>>0)},e.wbg.__wbg_setVertexBuffer_31b4fff2767922a0=function(e,t,n,r,i){e.setVertexBuffer(t>>>0,n,r,i)},e.wbg.__wbg_set_8fc6bf8a5b1071d1=function(e,t,n){return e.set(t,n)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return P(function(e,t,n){return Reflect.set(e,t,n)},arguments)},e.wbg.__wbg_seta_aa2e87786f1942f7=function(e,t){e.a=t},e.wbg.__wbg_setaccess_86057694fc60b7f2=function(e,t){e.access=Ge[t]},e.wbg.__wbg_setaddressmodeu_f4d9eced9e9a9499=function(e,t){e.addressModeU=G[t]},e.wbg.__wbg_setaddressmodev_cb577d2f98afac7c=function(e,t){e.addressModeV=G[t]},e.wbg.__wbg_setaddressmodew_0e9a9aa668e91f34=function(e,t){e.addressModeW=G[t]},e.wbg.__wbg_setalpha_789b6ecd7c06e5f3=function(e,t){e.alpha=t},e.wbg.__wbg_setalphamode_8b1f0eb9b989dae4=function(e,t){e.alphaMode=Le[t]},e.wbg.__wbg_setalphatocoverageenabled_8862a1b7a0f204c6=function(e,t){e.alphaToCoverageEnabled=t!==0},e.wbg.__wbg_setarraylayercount_cd3d3ab55145805f=function(e,t){e.arrayLayerCount=t>>>0},e.wbg.__wbg_setarraystride_84800a5d0f5fa40b=function(e,t){e.arrayStride=t},e.wbg.__wbg_setaspect_71ab7bc27f22254c=function(e,t){e.aspect=Ke[t]},e.wbg.__wbg_setaspect_df168d4e18afc498=function(e,t){e.aspect=Ke[t]},e.wbg.__wbg_setattributes_340843a4c4217777=function(e,t){e.attributes=t},e.wbg.__wbg_setb_4a958fe161746e0b=function(e,t){e.b=t},e.wbg.__wbg_setbasearraylayer_66b527b8665953c2=function(e,t){e.baseArrayLayer=t>>>0},e.wbg.__wbg_setbasemiplevel_8b05bec34091257b=function(e,t){e.baseMipLevel=t>>>0},e.wbg.__wbg_setbeginningofpasswriteindex_449cbd524b33366d=function(e,t){e.beginningOfPassWriteIndex=t>>>0},e.wbg.__wbg_setbeginningofpasswriteindex_645ab3ba9029ac4a=function(e,t){e.beginningOfPassWriteIndex=t>>>0},e.wbg.__wbg_setbindgrouplayouts_b74aac632f5e0cd3=function(e,t){e.bindGroupLayouts=t},e.wbg.__wbg_setbinding_524d68995acbd9d8=function(e,t){e.binding=t>>>0},e.wbg.__wbg_setbinding_5fb23ecf62d3bb68=function(e,t){e.binding=t>>>0},e.wbg.__wbg_setblend_fc955738a0ea479e=function(e,t){e.blend=t},e.wbg.__wbg_setbuffer_90ac1c7477e1bc4f=function(e,t){e.buffer=t},e.wbg.__wbg_setbuffer_f4026154d4c607c4=function(e,t){e.buffer=t},e.wbg.__wbg_setbuffers_72c10dde80619dfb=function(e,t){e.buffers=t},e.wbg.__wbg_setbytesperrow_27937d232b087985=function(e,t){e.bytesPerRow=t>>>0},e.wbg.__wbg_setclearvalue_245c9baef9ca9f40=function(e,t){e.clearValue=t},e.wbg.__wbg_setcode_e3412dedece095a3=function(e,t,n){e.code=H(t,n)},e.wbg.__wbg_setcolor_2fcb4c98d73b4a08=function(e,t){e.color=t},e.wbg.__wbg_setcolorattachments_315a32a9447c8143=function(e,t){e.colorAttachments=t},e.wbg.__wbg_setcompare_1eeae8f049314765=function(e,t){e.compare=K[t]},e.wbg.__wbg_setcompare_392fd4fe47194005=function(e,t){e.compare=K[t]},e.wbg.__wbg_setcompute_5b54088b8639edd0=function(e,t){e.compute=t},e.wbg.__wbg_setconstants_08df997e38e4da58=function(e,t){e.constants=t},e.wbg.__wbg_setconstants_8fdb7b4cac7ebe8c=function(e,t){e.constants=t},e.wbg.__wbg_setconstants_a7158f4f0eb335b7=function(e,t){e.constants=t},e.wbg.__wbg_setcount_f0218523e435fe27=function(e,t){e.count=t>>>0},e.wbg.__wbg_setcullmode_d07f4cca149fc8fd=function(e,t){e.cullMode=Re[t]},e.wbg.__wbg_setcurrentTime_64727eddd3966512=function(e,t){e.currentTime=t},e.wbg.__wbg_setdepthbias_d0a6693d6a8ab87e=function(e,t){e.depthBias=t},e.wbg.__wbg_setdepthbiasclamp_256485c28643d20d=function(e,t){e.depthBiasClamp=t},e.wbg.__wbg_setdepthbiasslopescale_b7ec92a9bda5e232=function(e,t){e.depthBiasSlopeScale=t},e.wbg.__wbg_setdepthclearvalue_e427925fb817bffc=function(e,t){e.depthClearValue=t},e.wbg.__wbg_setdepthcompare_3d414508518d2332=function(e,t){e.depthCompare=K[t]},e.wbg.__wbg_setdepthfailop_bb45e35727206b07=function(e,t){e.depthFailOp=J[t]},e.wbg.__wbg_setdepthloadop_6e7ed58390bcb472=function(e,t){e.depthLoadOp=q[t]},e.wbg.__wbg_setdepthorarraylayers_f883a5503c92fcbe=function(e,t){e.depthOrArrayLayers=t>>>0},e.wbg.__wbg_setdepthreadonly_ec5f87de25f955c6=function(e,t){e.depthReadOnly=t!==0},e.wbg.__wbg_setdepthslice_4c2d15e75ec01602=function(e,t){e.depthSlice=t>>>0},e.wbg.__wbg_setdepthstencil_ab24ec143b022ff9=function(e,t){e.depthStencil=t},e.wbg.__wbg_setdepthstencilattachment_8abbf392d55551bd=function(e,t){e.depthStencilAttachment=t},e.wbg.__wbg_setdepthstoreop_c529093252e36c11=function(e,t){e.depthStoreOp=Y[t]},e.wbg.__wbg_setdepthwriteenabled_a97b018ec8906115=function(e,t){e.depthWriteEnabled=t!==0},e.wbg.__wbg_setdevice_3d552cd495a322c2=function(e,t){e.device=t},e.wbg.__wbg_setdimension_2892b665919c0e54=function(e,t){e.dimension=Z[t]},e.wbg.__wbg_setdimension_c14e0b4f680f2a14=function(e,t){e.dimension=qe[t]},e.wbg.__wbg_setdstfactor_04b172f73540aabf=function(e,t){e.dstFactor=Pe[t]},e.wbg.__wbg_setendofpasswriteindex_6923ba50f58bb0df=function(e,t){e.endOfPassWriteIndex=t>>>0},e.wbg.__wbg_setendofpasswriteindex_832ce3e1b3972fae=function(e,t){e.endOfPassWriteIndex=t>>>0},e.wbg.__wbg_setentries_545836ca7979d0c3=function(e,t){e.entries=t},e.wbg.__wbg_setentries_99398ac8873772cf=function(e,t){e.entries=t},e.wbg.__wbg_setentrypoint_40d651c49abeabef=function(e,t,n){e.entryPoint=H(t,n)},e.wbg.__wbg_setentrypoint_78553a4419def0b5=function(e,t,n){e.entryPoint=H(t,n)},e.wbg.__wbg_setentrypoint_9de314a2c2570802=function(e,t,n){e.entryPoint=H(t,n)},e.wbg.__wbg_setfailop_3b7d50b0a4f08e69=function(e,t){e.failOp=J[t]},e.wbg.__wbg_setformat_01f82498bb7aa545=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_3dd749532151c43e=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_5106903c3bec7f29=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_6077b776453ad8d1=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_984f8b09308d0584=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_c0f2655a6b8dae1a=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_d474115239036438=function(e,t){e.format=Ye[t]},e.wbg.__wbg_setfragment_1f67ab59aff99617=function(e,t){e.fragment=t},e.wbg.__wbg_setfrontface_1875a91bf87e5bad=function(e,t){e.frontFace=Be[t]},e.wbg.__wbg_setg_a62d6aa648d4cd4c=function(e,t){e.g=t},e.wbg.__wbg_sethasdynamicoffset_78853235cc49b8ea=function(e,t){e.hasDynamicOffset=t!==0},e.wbg.__wbg_setheight_1e158913ddc793af=function(e,t){e.height=t>>>0},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(e,t,n){e[t>>>0]=n},e.wbg.__wbg_setlayout_44fc85f3dd4d8fd6=function(e,t){e.layout=t},e.wbg.__wbg_setlayout_74172b78828c84fe=function(e,t){e.layout=t},e.wbg.__wbg_setlayout_a9e58d0996412dfa=function(e,t){e.layout=t},e.wbg.__wbg_setloadop_f1ccd5d15b52ca5d=function(e,t){e.loadOp=q[t]},e.wbg.__wbg_setlodmaxclamp_2c14826867287557=function(e,t){e.lodMaxClamp=t},e.wbg.__wbg_setlodminclamp_90c60cc7e8baa95b=function(e,t){e.lodMinClamp=t},e.wbg.__wbg_setmagfilter_064b565970422154=function(e,t){e.magFilter=ze[t]},e.wbg.__wbg_setmappedatcreation_5b22281a9edff7fa=function(e,t){e.mappedAtCreation=t!==0},e.wbg.__wbg_setmask_2007e390b35587d6=function(e,t){e.mask=t>>>0},e.wbg.__wbg_setmaxanisotropy_d90cbfc49f762cf1=function(e,t){e.maxAnisotropy=t},e.wbg.__wbg_setminbindingsize_b6106c56d37c8a84=function(e,t){e.minBindingSize=t},e.wbg.__wbg_setminfilter_712d4dcd764a0d5e=function(e,t){e.minFilter=ze[t]},e.wbg.__wbg_setmiplevel_5fa33ce523901448=function(e,t){e.mipLevel=t>>>0},e.wbg.__wbg_setmiplevelcount_836d12b93ef02836=function(e,t){e.mipLevelCount=t>>>0},e.wbg.__wbg_setmiplevelcount_da876250f18dd0e7=function(e,t){e.mipLevelCount=t>>>0},e.wbg.__wbg_setmipmapfilter_9cac92abe21b7816=function(e,t){e.mipmapFilter=He[t]},e.wbg.__wbg_setmodule_7b8dd93fefd91a73=function(e,t){e.module=t},e.wbg.__wbg_setmodule_e1281341685bf91a=function(e,t){e.module=t},e.wbg.__wbg_setmodule_e7a882363768bf73=function(e,t){e.module=t},e.wbg.__wbg_setmultisample_95fbbb44e36714e3=function(e,t){e.multisample=t},e.wbg.__wbg_setmultisampled_f7f0562151e1ff91=function(e,t){e.multisampled=t!==0},e.wbg.__wbg_setocclusionqueryset_a2a4abf338fb3441=function(e,t){e.occlusionQuerySet=t},e.wbg.__wbg_setoffset_1bf2826ce181376a=function(e,t){e.offset=t},e.wbg.__wbg_setoffset_f6f822a44e88af7e=function(e,t){e.offset=t},e.wbg.__wbg_setoffset_fe9f09cc240192d0=function(e,t){e.offset=t},e.wbg.__wbg_setoperation_de3d845bdac61eb3=function(e,t){e.operation=Fe[t]},e.wbg.__wbg_setorigin_9d2dbc71ffaae355=function(e,t){e.origin=t},e.wbg.__wbg_setpassop_8767e1a56e3c30da=function(e,t){e.passOp=J[t]},e.wbg.__wbg_setprimitive_491591635926383f=function(e,t){e.primitive=t},e.wbg.__wbg_setqueryset_0351509707c5cd51=function(e,t){e.querySet=t},e.wbg.__wbg_setqueryset_c4a0351a777cdfbd=function(e,t){e.querySet=t},e.wbg.__wbg_setr_732e149cd5493a75=function(e,t){e.r=t},e.wbg.__wbg_setresolvetarget_56e82fe32d6e757b=function(e,t){e.resolveTarget=t},e.wbg.__wbg_setresource_261b30a085bc9a72=function(e,t){e.resource=t},e.wbg.__wbg_setrowsperimage_5d58ebd56fa65231=function(e,t){e.rowsPerImage=t>>>0},e.wbg.__wbg_setsamplecount_ecdebb2cba9265c0=function(e,t){e.sampleCount=t>>>0},e.wbg.__wbg_setsampler_5d1ee8efc1fd14d3=function(e,t){e.sampler=t},e.wbg.__wbg_setsampletype_afa82d0d8ad6e2d7=function(e,t){e.sampleType=Je[t]},e.wbg.__wbg_setshaderlocation_315967bfde4427a8=function(e,t){e.shaderLocation=t>>>0},e.wbg.__wbg_setsize_021142f0cf8b49c2=function(e,t){e.size=t},e.wbg.__wbg_setsize_4f9d7203f06fc54a=function(e,t){e.size=t},e.wbg.__wbg_setsize_a2662ec0e7f16cc9=function(e,t){e.size=t},e.wbg.__wbg_setsrcfactor_5aea25a9f1933072=function(e,t){e.srcFactor=Pe[t]},e.wbg.__wbg_setstencilback_1b6b2643a15d5066=function(e,t){e.stencilBack=t},e.wbg.__wbg_setstencilclearvalue_ef82d3b767ad806f=function(e,t){e.stencilClearValue=t>>>0},e.wbg.__wbg_setstencilfront_4e2eaace01795028=function(e,t){e.stencilFront=t},e.wbg.__wbg_setstencilloadop_6e7bc3186a01330e=function(e,t){e.stencilLoadOp=q[t]},e.wbg.__wbg_setstencilreadmask_99287c6b013f0ae2=function(e,t){e.stencilReadMask=t>>>0},e.wbg.__wbg_setstencilreadonly_00d790631a8e4330=function(e,t){e.stencilReadOnly=t!==0},e.wbg.__wbg_setstencilstoreop_22d01da4d35271b2=function(e,t){e.stencilStoreOp=Y[t]},e.wbg.__wbg_setstencilwritemask_30cfa473ca5600c7=function(e,t){e.stencilWriteMask=t>>>0},e.wbg.__wbg_setstepmode_ac000a7f17d3b87d=function(e,t){e.stepMode=Xe[t]},e.wbg.__wbg_setstoragetexture_c17314bf4e104ece=function(e,t){e.storageTexture=t},e.wbg.__wbg_setstoreop_571e86638124baba=function(e,t){e.storeOp=Y[t]},e.wbg.__wbg_setstripindexformat_9ec52f6405d7985b=function(e,t){e.stripIndexFormat=Ve[t]},e.wbg.__wbg_settargets_591e8613a4896aac=function(e,t){e.targets=t},e.wbg.__wbg_settexture_62c91e1557d1310a=function(e,t){e.texture=t},e.wbg.__wbg_settexture_a8c8df2623f6e670=function(e,t){e.texture=t},e.wbg.__wbg_settimestampwrites_65e353db5011b652=function(e,t){e.timestampWrites=t},e.wbg.__wbg_settimestampwrites_c48f0b3db52a9119=function(e,t){e.timestampWrites=t},e.wbg.__wbg_settopology_35540552af8ad12e=function(e,t){e.topology=Ue[t]},e.wbg.__wbg_settype_39ed370d3edd403c=function(e,t,n){e.type=H(t,n)},e.wbg.__wbg_settype_51c2819925b5e0a6=function(e,t){e.type=We[t]},e.wbg.__wbg_settype_a275611edc111d26=function(e,t){e.type=Ie[t]},e.wbg.__wbg_setunclippeddepth_43cbbb9961b4b705=function(e,t){e.unclippedDepth=t!==0},e.wbg.__wbg_setusage_191c3002e6efb81b=function(e,t){e.usage=t>>>0},e.wbg.__wbg_setusage_7836ddf40e55971a=function(e,t){e.usage=t>>>0},e.wbg.__wbg_setusage_7e9a6c2f119cab96=function(e,t){e.usage=t>>>0},e.wbg.__wbg_setusage_97670aee3d9bbf16=function(e,t){e.usage=t>>>0},e.wbg.__wbg_setvertex_602fd330026bc0be=function(e,t){e.vertex=t},e.wbg.__wbg_setview_2eb28c0fa8228e7c=function(e,t){e.view=t},e.wbg.__wbg_setview_451a1441471a69db=function(e,t){e.view=t},e.wbg.__wbg_setviewdimension_d632693fb1d12b24=function(e,t){e.viewDimension=Z[t]},e.wbg.__wbg_setviewdimension_dc868215e54cbbba=function(e,t){e.viewDimension=Z[t]},e.wbg.__wbg_setviewformats_6c89940ba38f64ff=function(e,t){e.viewFormats=t},e.wbg.__wbg_setviewformats_ff9ffe91ceca51c3=function(e,t){e.viewFormats=t},e.wbg.__wbg_setvisibility_1f6371439759b513=function(e,t){e.visibility=t>>>0},e.wbg.__wbg_setvolume_3895e06a030ca4f7=function(e,t){e.volume=t},e.wbg.__wbg_setwidth_6cc268cef8245a36=function(e,t){e.width=t>>>0},e.wbg.__wbg_setwritemask_4ea635b0719187be=function(e,t){e.writeMask=t>>>0},e.wbg.__wbg_size_84ca9c23c7989256=function(e){return e.size},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){let n=t.stack,r=z(n,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),i=F;V().setInt32(e+4,i,!0),V().setInt32(e+0,r,!0)},e.wbg.__wbg_submit_3bf51baf36de553b=function(e,t){e.submit(t)},e.wbg.__wbg_unconfigure_64b5f267287f6b71=function(e){e.unconfigure()},e.wbg.__wbg_usage_d2a45c8d889f9c63=function(e){return e.usage},e.wbg.__wbg_width_684e9aa31cbda8b8=function(e){return e.width},e.wbg.__wbg_writeBuffer_b5be14e621130604=function(){return P(function(e,t,n,r){e.writeBuffer(t,n,r)},arguments)},e.wbg.__wbg_writeTexture_ff0b4f87c3efd0dc=function(){return P(function(e,t,n,r,i,a){e.writeTexture(t,Oe(n,r),i,a)},arguments)},e.wbg.__wbindgen_debug_string=function(e,t){let n=z(U(t),M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;V().setInt32(e+4,r,!0),V().setInt32(e+0,n,!0)},e.wbg.__wbindgen_init_externref_table=function(){let e=M.__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 M.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=ke(r)?0:z(r,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;V().setInt32(e+4,a,!0),V().setInt32(e+0,i,!0)},e.wbg.__wbindgen_string_new=function(e,t){return H(e,t)},e.wbg.__wbindgen_throw=function(e,t){throw Error(H(e,t))},e}function tt(e,t){return M=e.exports,nt.__wbindgen_wasm_module=t,B=null,W=null,I=null,M.__wbindgen_start(),M}async function nt(e){if(M!==void 0)return M;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=et();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await $e(await e,t);return tt(n,r)}let Q=null;function $(){return Q??(Q=D(nt,`https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.78.0/dist/webgpu/dotlottie-player.wasm`,`https://unpkg.com/@lottiefiles/dotlottie-web@0.78.0/dist/webgpu/dotlottie-player.wasm`)),Q}var rt=class extends Te{constructor(e){super(e),o(this,`_gpuDevice`,null),o(this,`_gpuContext`,null),o(this,`_deviceOwned`,!1),o(this,`_userDevice`,void 0),this._userDevice=e.device}async _initWasm(){if(await $().load(),this._userDevice)this._gpuDevice=this._userDevice,this._deviceOwned=!1;else{if(!navigator.gpu)throw Error(`WebGPU is not supported in this browser.`);let e=await navigator.gpu.requestAdapter();if(!e)throw Error(`Failed to get WebGPU adapter.`);let t=await e.requestDevice();t.addEventListener(`uncapturederror`,e=>{let t=e.error;console.error(`[dotlottie-web] WebGPU uncaptured error:`,t?.message??t)}),t.lost.then(e=>{e.reason!==`destroyed`&&console.error(`[dotlottie-web] WebGPU device lost: reason=${e.reason} msg=${e.message}`)}),this._gpuDevice=t,this._deviceOwned=!0}}_createCore(){return new Qe}_onCoreCreated(){!this._canvas||!this._dotLottieCore||!this._gpuDevice||this._setupGpuContext()}_setupGpuContext(){if(!this._canvas||!this._dotLottieCore||!this._gpuDevice)return;let t=this._canvas;if(e){let e=this._renderConfig.devicePixelRatio||w(),{width:n,height:r}=t.getBoundingClientRect();n!==0&&r!==0&&(t.width=Math.round(n*e),t.height=Math.round(r*e))}let n=t.getContext(`webgpu`);if(!n)throw Error(`Failed to get WebGPU canvas context.`);this._gpuContext=n;let r=this._dotLottieCore;r.set_webgpu_device(this._gpuDevice),r.set_webgpu_surface(n)}resize(){if(this._gpuContext&&this._gpuDevice&&this._canvas){let e=this._canvas,t=this._renderConfig.devicePixelRatio||w(),{width:n,height:r}=e.getBoundingClientRect();n!==0&&r!==0&&(e.width=Math.round(n*t),e.height=Math.round(r*t)),this._dotLottieCore&&this.isLoaded&&this._setupTarget(e.width,e.height)&&this._dotLottieCore.render();return}super.resize()}_setupTarget(e,t){return this._dotLottieCore?this._dotLottieCore.setup_wg_target(e,t):!1}_draw(){}_setupRendererOnCanvas(){this._context=null,this._gpuContext&&(this._gpuContext.unconfigure(),this._gpuContext=null),!(!this._canvas||!this._dotLottieCore||!this._gpuDevice)&&this._setupGpuContext()}destroy(){this._gpuContext&&(this._gpuContext.unconfigure(),this._gpuContext=null),super.destroy(),this._deviceOwned&&this._gpuDevice&&this._gpuDevice.destroy(),this._gpuDevice=null}get device(){return this._gpuDevice}static setWasmUrl(e){$().setWasmUrl(e)}static preload(){return $().load()}};export{rt as DotLottie};
|
|
5
|
+
Received: ${typeof t}`);return}if(n){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 e=j(this._dotLottieCore.mode()),t=e===`reverse`||e===`reverse-bounce`?this._segment[1]:this._segment[0];this._dotLottieCore.set_frame(t)}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()===x.Playing&&this._startAnimationLoop(),e&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(S.observe(this._canvas,this),T(this._canvas)||this.freeze()),this._renderConfig.autoResize&&C.observe(this._canvas,this))}else this._drainPlayerEvents()}_loadFromSrc(e,t){(t??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)return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?j(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()??x.Idle)!==x.Idle}get isPlaying(){return this._dotLottieCore?.status()===x.Playing}get isPaused(){return this._dotLottieCore?.status()===x.Paused}get isStopped(){return this._dotLottieCore?.status()===x.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(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(A(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._segment=[e.segment[0],e.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])):(this._segment=null,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}),e.backgroundColor&&this.setBackgroundColor(e.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(),n=this._canvas.width,r=this._canvas.height,i=n*r*4;if(t.byteLength!==i){this._lastExpectedBufferSize===i?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=i),this._bufferMismatchCount===10&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${i} bytes for canvas ${n}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=i;let a=this._cachedImageData;if(!(a!==null&&a.width===n&&a.height===r&&a.data.byteLength===i&&this._cachedImageDataBuffer===t.buffer&&this._cachedImageDataByteOffset===t.byteOffset)){if(typeof ImageData>`u`)this._cachedImageData=this._context.createImageData(n,r);else{let e=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData=new ImageData(e,n,r)}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&&e&&this._canvas instanceof HTMLCanvasElement&&(S.unobserve(this._canvas),C.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&e&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(S.observe(this._canvas,this),T(this._canvas)||this.freeze()),this._renderConfig.autoResize&&C.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()===x.Playing||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop))}_animationLoop(e){if(this._dotLottieCore===null){this._stopAnimationLoop();return}if(this._dotLottieCore.status()!==x.Playing&&!this._isStateMachineRunning){this._stopAnimationLoop();return}try{let t=this._lastFrameTime===null?0:e-this._lastFrameTime;this._lastFrameTime=e;let n=this._isStateMachineRunning?this._dotLottieCore.sm_tick(t):this._dotLottieCore.tick(t);this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),n&&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()===x.Playing)&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&e&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!T(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.set_frame(e)){let e=this._dotLottieCore.render();this._drainPlayerEvents(),e&&this._draw()}}setSpeed(e){this._dotLottieCore!==null&&this._dotLottieCore.set_speed(e)}setBackgroundColor(t){if(this._dotLottieCore!==null){if(e&&this._canvas instanceof HTMLCanvasElement)this._canvas.style.backgroundColor=t;else{let[e,n,r,i]=ve(t);this._dotLottieCore.set_background(e,n,r,i)}this._backgroundColor=t}}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._srcFetchAbort?.abort(),this._srcFetchAbort=null,this._pendingLoad=null;let e=this._dotLottieCore;if(this._dotLottieCore=null,this._context=null,e)try{e.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:n,width:r}=this._canvas.getBoundingClientRect();n!==0&&r!==0&&(this._canvas.width=r*t,this._canvas.height=n*t)}resize(){!this._dotLottieCore||!this.isLoaded||!this._canvas||(this._syncCanvasSize(),this._setupTarget(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,e.dataPromise)}}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._segment=[e,t],this._dotLottieCore.set_segment(e,t))}resetSegment(){this._dotLottieCore!==null&&(this._segment=null,this._dotLottieCore.clear_segment())}setMode(e){this._dotLottieCore!==null&&this._dotLottieCore.set_mode(A(e))}setRenderConfig(t){let{devicePixelRatio:n,freezeOnOffscreen:r,quality:i,...a}=t;this._renderConfig={...this._renderConfig,...a,devicePixelRatio:n||w(),freezeOnOffscreen:r??!0,...i!==void 0&&{quality:i}},i!==void 0&&this._dotLottieCore&&this._dotLottieCore.set_quality(i),e&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?C.observe(this._canvas,this):C.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(S.observe(this._canvas,this),T(this._canvas)||this.freeze()):(S.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(e){this._dotLottieCore===null||this._dotLottieCore.animation_id()===e||!this._canvas||(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height),this._dotLottieCore.load_animation_from_id(e)?(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: ${e}`))}setMarker(e){this._dotLottieCore!==null&&(this.markers().some(t=>t.name===e)?(this._marker=e,this._dotLottieCore.set_marker(e)):(this._marker=``,this._segment=null,this._dotLottieCore.clear_marker(),this._dotLottieCore.clear_segment()))}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,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=JSON.stringify({a:typeof t==`number`?0:1,k:t}),r=this._dotLottieCore.set_slot_str(e,n);return this._dotLottieCore.render(),this._draw(),r}setVectorSlot(e,t){if(this._dotLottieCore===null)return!1;let n=this._isKeyframeArray(t),r=JSON.stringify({a:+!!n,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,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}async setImageSlot(e,t){if(this._dotLottieCore===null)return!1;let n=await Ce(t);if(this._dotLottieCore===null)return!1;let r=this._dotLottieCore.set_image_slot(e,n);return this._dotLottieCore.render(),this._draw(),r}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){k().setWasmUrl(e)}static preload(){return k().load()}static async registerFont(e,t){try{await k().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=le(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}}animationSize(){let e=this._dotLottieCore?.animation_size();return{width:e?.[0]??0,height:e?.[1]??0}}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.status()!==x.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}stateMachineSetSeed(e){return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(e)))??!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=E(e);t&&this.stateMachinePostClickEvent(t.x,t.y)}_onPointerUp(e){let t=E(e);t&&this.stateMachinePostPointerUpEvent(t.x,t.y)}_onPointerDown(e){let t=E(e);t&&this.stateMachinePostPointerDownEvent(t.x,t.y)}_onPointerMove(e){let t=E(e);t&&this.stateMachinePostPointerMoveEvent(t.x,t.y)}_onPointerEnter(e){let t=E(e);t&&this.stateMachinePostPointerEnterEvent(t.x,t.y)}_onPointerLeave(e){let t=E(e);t&&this.stateMachinePostPointerExitEvent(t.x,t.y)}_setupStateMachineListeners(){if(e&&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(){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))}};let M;function N(e){let t=M.__externref_table_alloc_command_export();return M.__wbindgen_export_2.set(t,e),t}function P(e,t){try{return e.apply(this,t)}catch(e){let t=N(e);M.__wbindgen_exn_store_command_export(t)}}let F=0,I=null;function L(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(M.memory.buffer)),I}const R=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}},De=typeof R.encodeInto==`function`?function(e,t){return R.encodeInto(e,t)}:function(e,t){let n=R.encode(e);return t.set(n),{read:e.length,written:n.length}};function z(e,t,n){if(n===void 0){let n=R.encode(e),r=t(n.length,1)>>>0;return L().subarray(r,r+n.length).set(n),F=n.length,r}let r=e.length,i=t(r,1)>>>0,a=L(),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=L().subarray(i+o,i+r),a=De(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return F=o,i}let B=null;function V(){return(B===null||B.buffer.detached===!0||B.buffer.detached===void 0&&B.buffer!==M.memory.buffer)&&(B=new DataView(M.memory.buffer)),B}const Oe=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&Oe.decode();function H(e,t){return e>>>=0,Oe.decode(L().subarray(e,e+t))}function ke(e,t){return e>>>=0,L().subarray(e/1,e/1+t)}function U(e){let t=typeof e;if(t==`number`||t==`boolean`||e==null)return`${e}`;if(t==`string`)return`"${e}"`;if(t==`symbol`){let t=e.description;return t==null?`Symbol`:`Symbol(${t})`}if(t==`function`){let t=e.name;return typeof t==`string`&&t.length>0?`Function(${t})`:`Function`}if(Array.isArray(e)){let t=e.length,n=`[`;t>0&&(n+=U(e[0]));for(let r=1;r<t;r++)n+=`, `+U(e[r]);return n+=`]`,n}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r==`Object`)try{return`Object(`+JSON.stringify(e)+`)`}catch{return`Object`}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function Ae(e){return e==null}let W=null;function je(){return(W===null||W.byteLength===0)&&(W=new Float32Array(M.memory.buffer)),W}function Me(e,t){let n=t(e.length*4,4)>>>0;return je().set(e,n/4),F=e.length,n}function Ne(e,t){let n=t(e.length*1,1)>>>0;return L().set(e,n/1),F=e.length,n}function Pe(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=N(e[t]);V().setUint32(n+4*t,r,!0)}return F=e.length,n}Object.freeze({Forward:0,0:`Forward`,Reverse:1,1:`Reverse`,Bounce:2,2:`Bounce`,ReverseBounce:3,3:`ReverseBounce`}),Object.freeze({Idle:0,0:`Idle`,Playing:1,1:`Playing`,Paused:2,2:`Paused`,Stopped:3,3:`Stopped`,Tweening:4,4:`Tweening`});const G=[`clamp-to-edge`,`repeat`,`mirror-repeat`],Fe=[`zero`,`one`,`src`,`one-minus-src`,`src-alpha`,`one-minus-src-alpha`,`dst`,`one-minus-dst`,`dst-alpha`,`one-minus-dst-alpha`,`src-alpha-saturated`,`constant`,`one-minus-constant`,`src1`,`one-minus-src1`,`src1-alpha`,`one-minus-src1-alpha`],Ie=[`add`,`subtract`,`reverse-subtract`,`min`,`max`],Le=[`uniform`,`storage`,`read-only-storage`],Re=[`opaque`,`premultiplied`],K=[`never`,`less`,`equal`,`less-equal`,`greater`,`not-equal`,`greater-equal`,`always`],ze=[`none`,`front`,`back`],Be=[`nearest`,`linear`],Ve=[`ccw`,`cw`],He=[`uint16`,`uint32`],q=[`load`,`clear`],Ue=[`nearest`,`linear`],We=[`point-list`,`line-list`,`line-strip`,`triangle-list`,`triangle-strip`],Ge=[`filtering`,`non-filtering`,`comparison`],J=[`keep`,`zero`,`replace`,`invert`,`increment-clamp`,`decrement-clamp`,`increment-wrap`,`decrement-wrap`],Ke=[`write-only`,`read-only`,`read-write`],Y=[`store`,`discard`],qe=[`all`,`stencil-only`,`depth-only`],Je=[`1d`,`2d`,`3d`],X=`r8unorm.r8snorm.r8uint.r8sint.r16uint.r16sint.r16float.rg8unorm.rg8snorm.rg8uint.rg8sint.r32uint.r32sint.r32float.rg16uint.rg16sint.rg16float.rgba8unorm.rgba8unorm-srgb.rgba8snorm.rgba8uint.rgba8sint.bgra8unorm.bgra8unorm-srgb.rgb9e5ufloat.rgb10a2uint.rgb10a2unorm.rg11b10ufloat.rg32uint.rg32sint.rg32float.rgba16uint.rgba16sint.rgba16float.rgba32uint.rgba32sint.rgba32float.stencil8.depth16unorm.depth24plus.depth24plus-stencil8.depth32float.depth32float-stencil8.bc1-rgba-unorm.bc1-rgba-unorm-srgb.bc2-rgba-unorm.bc2-rgba-unorm-srgb.bc3-rgba-unorm.bc3-rgba-unorm-srgb.bc4-r-unorm.bc4-r-snorm.bc5-rg-unorm.bc5-rg-snorm.bc6h-rgb-ufloat.bc6h-rgb-float.bc7-rgba-unorm.bc7-rgba-unorm-srgb.etc2-rgb8unorm.etc2-rgb8unorm-srgb.etc2-rgb8a1unorm.etc2-rgb8a1unorm-srgb.etc2-rgba8unorm.etc2-rgba8unorm-srgb.eac-r11unorm.eac-r11snorm.eac-rg11unorm.eac-rg11snorm.astc-4x4-unorm.astc-4x4-unorm-srgb.astc-5x4-unorm.astc-5x4-unorm-srgb.astc-5x5-unorm.astc-5x5-unorm-srgb.astc-6x5-unorm.astc-6x5-unorm-srgb.astc-6x6-unorm.astc-6x6-unorm-srgb.astc-8x5-unorm.astc-8x5-unorm-srgb.astc-8x6-unorm.astc-8x6-unorm-srgb.astc-8x8-unorm.astc-8x8-unorm-srgb.astc-10x5-unorm.astc-10x5-unorm-srgb.astc-10x6-unorm.astc-10x6-unorm-srgb.astc-10x8-unorm.astc-10x8-unorm-srgb.astc-10x10-unorm.astc-10x10-unorm-srgb.astc-12x10-unorm.astc-12x10-unorm-srgb.astc-12x12-unorm.astc-12x12-unorm-srgb`.split(`.`),Ye=[`float`,`unfilterable-float`,`depth`,`sint`,`uint`],Z=[`1d`,`2d`,`2d-array`,`cube`,`cube-array`,`3d`],Xe=`uint8.uint8x2.uint8x4.sint8.sint8x2.sint8x4.unorm8.unorm8x2.unorm8x4.snorm8.snorm8x2.snorm8x4.uint16.uint16x2.uint16x4.sint16.sint16x2.sint16x4.unorm16.unorm16x2.unorm16x4.snorm16.snorm16x2.snorm16x4.float16.float16x2.float16x4.float32.float32x2.float32x3.float32x4.uint32.uint32x2.uint32x3.uint32x4.sint32.sint32x2.sint32x3.sint32x4.unorm10-10-10-2.unorm8x4-bgra`.split(`.`),Ze=[`vertex`,`instance`],Qe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>M.__wbg_dotlottieplayerwasm_free(e>>>0,1));var $e=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Qe.unregister(this),e}free(){let e=this.__destroy_into_raw();M.__wbg_dotlottieplayerwasm_free(e,0)}clear_slot(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,t,n)!==0}layout_fit(){let e,t;try{let n=M.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}loop_count(){return M.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return M.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}reset_slot(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,t,n)!==0}set_layout(e,t,n){let r=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),i=F;return M.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,i,t,n)!==0}set_marker(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;M.dotlottieplayerwasm_set_marker(this.__wbg_ptr,t,n)}clear_slots(){return M.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}is_complete(){return M.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}reset_slots(){return M.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}reset_theme(){return M.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}segment_end(){return M.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(e){return M.dotlottieplayerwasm_set_quality(this.__wbg_ptr,e)!==0}set_segment(e,t){return M.dotlottieplayerwasm_set_segment(this.__wbg_ptr,e,t)!==0}sm_set_seed(e){return M.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,e)!==0}static unload_font(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_unload_font(t,n)!==0}animation_id(){let e=M.dotlottieplayerwasm_animation_id(this.__wbg_ptr),t;return e[0]!==0&&(t=H(e[0],e[1]).slice(),M.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}audio_volume(){return M.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return M.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return M.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return M.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return M.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){M.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){M.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return M.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr)}get_slot_str(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=H(r[0],r[1]).slice(),M.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}marker_names(){return M.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}set_autoplay(e){M.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,e)}set_slot_str(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=z(t,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,i,a)!==0}set_viewport(e,t,n,r){return M.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,e,t,n,r)!==0}total_frames(){return M.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return M.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}current_frame(){return M.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=H(r[0],r[1]).slice(),M.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}get_slots_str(){let e,t;try{let n=M.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}get_transform(){return M.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}segment_start(){return M.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,t,n)!==0}set_text_slot(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=z(t,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,i,a)!==0}set_transform(e){let t=Me(e,M.__wbindgen_malloc_command_export),n=F;return M.dotlottieplayerwasm_set_transform(this.__wbg_ptr,t,n)!==0}sm_get_inputs(){return M.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr)}sm_poll_event(){return M.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr)}sm_post_click(e,t){M.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,e,t)}animation_size(){return M.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}current_marker(){let e=M.dotlottieplayerwasm_current_marker(this.__wbg_ptr),t;return e[0]!==0&&(t=H(e[0],e[1]).slice(),M.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}layout_align_x(){return M.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return M.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_load_animation(this.__wbg_ptr,t,n)!==0}loop_animation(){return M.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_background(e,t,n,r){return M.dotlottieplayerwasm_set_background(this.__wbg_ptr,e,t,n,r)!==0}set_color_slot(e,t,n,r){let i=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,a,t,n,r)!==0}set_image_slot(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=z(t,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,n,r,i,a)!==0}set_loop_count(e){M.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,e)}set_theme_data(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,t,n)!==0}sm_reset_input(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;M.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,t,n)}manifest_string(){let e,t;try{let n=M.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}set_scalar_slot(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;return M.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,t)!==0}set_vector_slot(e,t,n){let r=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),i=F;return M.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,i,t,n)!==0}setup_wg_target(e,t){return M.dotlottieplayerwasm_setup_wg_target(this.__wbg_ptr,e,t)!==0}set_audio_volume(e){M.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,e)}sm_current_state(){let e,t;try{let n=M.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}state_machine_id(){let e=M.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),t;return e[0]!==0&&(t=H(e[0],e[1]).slice(),M.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}get_state_machine(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=H(r[0],r[1]).slice(),M.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}set_position_slot(e,t,n){let r=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),i=F;return M.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,i,t,n)!==0}set_webgpu_device(e){M.dotlottieplayerwasm_set_webgpu_device(this.__wbg_ptr,e)}current_loop_count(){return M.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}set_webgpu_surface(e){M.dotlottieplayerwasm_set_webgpu_surface(this.__wbg_ptr,e)}sm_framework_setup(){return M.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr)}sm_post_pointer_up(e,t){M.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,e,t)}state_machine_load(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,t,n)!==0}load_dotlottie_data(e){let t=Ne(e,M.__wbindgen_malloc_command_export),n=F;return M.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,t,n)!==0}sm_get_string_input(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=H(r[0],r[1]).slice(),M.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}sm_set_string_input(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=z(t,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;return M.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,i,a)!==0}sm_get_boolean_input(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,t,n);return r===16777215?void 0:r!==0}sm_get_numeric_input(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F,r=M.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,t,n);return r===4294967297?void 0:r}sm_post_pointer_down(e,t){M.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,e,t)}sm_post_pointer_exit(e,t){M.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,e,t)}sm_post_pointer_move(e,t){M.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,e,t)}sm_set_boolean_input(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;return M.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,t)!==0}sm_set_numeric_input(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;return M.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,t)!==0}state_machine_unload(){M.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(e,t){M.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,e,t)}load_animation_from_id(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,t,n)!==0}sm_poll_internal_event(){return M.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}use_frame_interpolation(){return M.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}reset_current_loop_count(){M.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;return M.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,t)!==0}state_machine_load_from_id(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,t,n)!==0}set_use_frame_interpolation(e){M.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,e)}constructor(){let e=M.dotlottieplayerwasm_new();return this.__wbg_ptr=e>>>0,Qe.register(this,this.__wbg_ptr,this),this}mode(){return M.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return M.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}stop(){return M.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}tick(e){return M.dotlottieplayerwasm_tick(this.__wbg_ptr,e)!==0}pause(){return M.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}speed(){return M.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return M.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return M.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return M.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}status(){return M.dotlottieplayerwasm_status(this.__wbg_ptr)}markers(){return M.dotlottieplayerwasm_markers(this.__wbg_ptr)}sm_fire(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,t,n)!==0}sm_stop(){return M.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_tick(e){return M.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,e)!==0}autoplay(){return M.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}duration(){return M.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(e){M.dotlottieplayerwasm_set_loop(this.__wbg_ptr,e)}set_mode(e){M.dotlottieplayerwasm_set_mode(this.__wbg_ptr,e)}sm_start(e,t){let n=Pe(t,M.__wbindgen_malloc_command_export),r=F;return M.dotlottieplayerwasm_sm_start(this.__wbg_ptr,e,n,r)!==0}theme_id(){let e=M.dotlottieplayerwasm_theme_id(this.__wbg_ptr),t;return e[0]!==0&&(t=H(e[0],e[1]).slice(),M.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}load_font(e,t){let n=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F,i=Ne(t,M.__wbindgen_malloc_command_export),a=F;return M.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,i,a)!==0}set_frame(e){return M.dotlottieplayerwasm_set_frame(this.__wbg_ptr,e)!==0}set_speed(e){M.dotlottieplayerwasm_set_speed(this.__wbg_ptr,e)}set_theme(e){let t=z(e,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),n=F;return M.dotlottieplayerwasm_set_theme(this.__wbg_ptr,t,n)!==0}sm_status(){let e,t;try{let n=M.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return e=n[0],t=n[1],H(n[0],n[1])}finally{M.__wbindgen_free_command_export(e,t,1)}}};async function et(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 tt(){let e={};return e.wbg={},e.wbg.__wbg_beginRenderPass_509df70c967b895c=function(){return P(function(e,t){return e.beginRenderPass(t)},arguments)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_configure_7e2130842707feff=function(){return P(function(e,t){e.configure(t)},arguments)},e.wbg.__wbg_copyTextureToTexture_8b0d14b8089f3036=function(){return P(function(e,t,n,r){e.copyTextureToTexture(t,n,r)},arguments)},e.wbg.__wbg_createBindGroupLayout_5f799ca8bc5aa1fc=function(){return P(function(e,t){return e.createBindGroupLayout(t)},arguments)},e.wbg.__wbg_createBindGroup_ddd3bb343cf271fb=function(e,t){return e.createBindGroup(t)},e.wbg.__wbg_createBuffer_826176fb72deecbf=function(){return P(function(e,t){return e.createBuffer(t)},arguments)},e.wbg.__wbg_createCommandEncoder_579fe7e60b87a1c4=function(e,t){return e.createCommandEncoder(t)},e.wbg.__wbg_createComputePipeline_5f91c9fb81d570e7=function(e,t){return e.createComputePipeline(t)},e.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return P(function(e,t){let n=z(URL.createObjectURL(t),M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;V().setInt32(e+4,r,!0),V().setInt32(e+0,n,!0)},arguments)},e.wbg.__wbg_createPipelineLayout_b1406687fd03f870=function(e,t){return e.createPipelineLayout(t)},e.wbg.__wbg_createRenderPipeline_24a0e9be53ed468e=function(){return P(function(e,t){return e.createRenderPipeline(t)},arguments)},e.wbg.__wbg_createSampler_381b4ade52f53f68=function(e,t){return e.createSampler(t)},e.wbg.__wbg_createShaderModule_035719b95e2aae80=function(e,t){return e.createShaderModule(t)},e.wbg.__wbg_createTexture_6947ba7853a1d055=function(){return P(function(e,t){return e.createTexture(t)},arguments)},e.wbg.__wbg_createView_7f08b4f77746d573=function(){return P(function(e,t){return e.createView(t)},arguments)},e.wbg.__wbg_destroy_911c8640ffed5684=function(e){e.destroy()},e.wbg.__wbg_destroy_c1bd9f1fd447bebf=function(e){e.destroy()},e.wbg.__wbg_drawIndexed_0d27b49d3d541ca9=function(e,t,n,r,i,a){e.drawIndexed(t>>>0,n>>>0,r>>>0,i,a>>>0)},e.wbg.__wbg_end_5f3989c200fa79e9=function(e){e.end()},e.wbg.__wbg_ended_b873fb75d0c13ca7=function(e){return e.ended},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let n,r;try{n=e,r=t,console.error(H(e,t))}finally{M.__wbindgen_free_command_export(n,r,1)}},e.wbg.__wbg_finish_5d6bd1bf9cca88b0=function(e,t){return e.finish(t)},e.wbg.__wbg_finish_a3819bcf098c1f84=function(e){return e.finish()},e.wbg.__wbg_format_cb1ef2f3b44b306a=function(e){let t=e.format;return(X.indexOf(t)+1||96)-1},e.wbg.__wbg_getCurrentTexture_cf3b91d12114ffcb=function(){return P(function(e){return e.getCurrentTexture()},arguments)},e.wbg.__wbg_height_a1cdc6189018a9b3=function(e){return e.height},e.wbg.__wbg_new_405e22f390576ce2=function(){return{}},e.wbg.__wbg_new_5e0be73521bc8c17=function(){return new Map},e.wbg.__wbg_new_78feb108b6472713=function(){return[]},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Error()},e.wbg.__wbg_new_a12002a7f91c75be=function(e){return new Uint8Array(e)},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_newwithlength_a381634e90c276d4=function(e){return new Uint8Array(e>>>0)},e.wbg.__wbg_newwithsrc_20307ca7e8762a81=function(){return P(function(e,t){return new Audio(H(e,t))},arguments)},e.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return P(function(e,t){return new Blob(e,t)},arguments)},e.wbg.__wbg_pause_b74c96d69f769518=function(){return P(function(e){e.pause()},arguments)},e.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return P(function(e){return e.play()},arguments)},e.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},e.wbg.__wbg_queue_712d25576063d2fc=function(e){return e.queue},e.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return P(function(e,t){URL.revokeObjectURL(H(e,t))},arguments)},e.wbg.__wbg_setBindGroup_438462565faaa01c=function(e,t,n){e.setBindGroup(t>>>0,n)},e.wbg.__wbg_setBindGroup_beb777273edc100f=function(e,t,n,r){e.setBindGroup(t>>>0,n,r)},e.wbg.__wbg_setIndexBuffer_1e94798fafd75b38=function(e,t,n,r,i){e.setIndexBuffer(t,He[n],r,i)},e.wbg.__wbg_setPipeline_a48ed1de5bcb914a=function(e,t){e.setPipeline(t)},e.wbg.__wbg_setScissorRect_d69fa46fa55e5d29=function(e,t,n,r,i){e.setScissorRect(t>>>0,n>>>0,r>>>0,i>>>0)},e.wbg.__wbg_setStencilReference_d21fe89ea5f39f77=function(e,t){e.setStencilReference(t>>>0)},e.wbg.__wbg_setVertexBuffer_31b4fff2767922a0=function(e,t,n,r,i){e.setVertexBuffer(t>>>0,n,r,i)},e.wbg.__wbg_set_8fc6bf8a5b1071d1=function(e,t,n){return e.set(t,n)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return P(function(e,t,n){return Reflect.set(e,t,n)},arguments)},e.wbg.__wbg_seta_aa2e87786f1942f7=function(e,t){e.a=t},e.wbg.__wbg_setaccess_86057694fc60b7f2=function(e,t){e.access=Ke[t]},e.wbg.__wbg_setaddressmodeu_f4d9eced9e9a9499=function(e,t){e.addressModeU=G[t]},e.wbg.__wbg_setaddressmodev_cb577d2f98afac7c=function(e,t){e.addressModeV=G[t]},e.wbg.__wbg_setaddressmodew_0e9a9aa668e91f34=function(e,t){e.addressModeW=G[t]},e.wbg.__wbg_setalpha_789b6ecd7c06e5f3=function(e,t){e.alpha=t},e.wbg.__wbg_setalphamode_8b1f0eb9b989dae4=function(e,t){e.alphaMode=Re[t]},e.wbg.__wbg_setalphatocoverageenabled_8862a1b7a0f204c6=function(e,t){e.alphaToCoverageEnabled=t!==0},e.wbg.__wbg_setarraylayercount_cd3d3ab55145805f=function(e,t){e.arrayLayerCount=t>>>0},e.wbg.__wbg_setarraystride_84800a5d0f5fa40b=function(e,t){e.arrayStride=t},e.wbg.__wbg_setaspect_71ab7bc27f22254c=function(e,t){e.aspect=qe[t]},e.wbg.__wbg_setaspect_df168d4e18afc498=function(e,t){e.aspect=qe[t]},e.wbg.__wbg_setattributes_340843a4c4217777=function(e,t){e.attributes=t},e.wbg.__wbg_setb_4a958fe161746e0b=function(e,t){e.b=t},e.wbg.__wbg_setbasearraylayer_66b527b8665953c2=function(e,t){e.baseArrayLayer=t>>>0},e.wbg.__wbg_setbasemiplevel_8b05bec34091257b=function(e,t){e.baseMipLevel=t>>>0},e.wbg.__wbg_setbeginningofpasswriteindex_449cbd524b33366d=function(e,t){e.beginningOfPassWriteIndex=t>>>0},e.wbg.__wbg_setbindgrouplayouts_b74aac632f5e0cd3=function(e,t){e.bindGroupLayouts=t},e.wbg.__wbg_setbinding_524d68995acbd9d8=function(e,t){e.binding=t>>>0},e.wbg.__wbg_setbinding_5fb23ecf62d3bb68=function(e,t){e.binding=t>>>0},e.wbg.__wbg_setblend_fc955738a0ea479e=function(e,t){e.blend=t},e.wbg.__wbg_setbuffer_90ac1c7477e1bc4f=function(e,t){e.buffer=t},e.wbg.__wbg_setbuffer_f4026154d4c607c4=function(e,t){e.buffer=t},e.wbg.__wbg_setbuffers_72c10dde80619dfb=function(e,t){e.buffers=t},e.wbg.__wbg_setbytesperrow_27937d232b087985=function(e,t){e.bytesPerRow=t>>>0},e.wbg.__wbg_setclearvalue_245c9baef9ca9f40=function(e,t){e.clearValue=t},e.wbg.__wbg_setcode_e3412dedece095a3=function(e,t,n){e.code=H(t,n)},e.wbg.__wbg_setcolor_2fcb4c98d73b4a08=function(e,t){e.color=t},e.wbg.__wbg_setcolorattachments_315a32a9447c8143=function(e,t){e.colorAttachments=t},e.wbg.__wbg_setcompare_1eeae8f049314765=function(e,t){e.compare=K[t]},e.wbg.__wbg_setcompare_392fd4fe47194005=function(e,t){e.compare=K[t]},e.wbg.__wbg_setcompute_5b54088b8639edd0=function(e,t){e.compute=t},e.wbg.__wbg_setconstants_08df997e38e4da58=function(e,t){e.constants=t},e.wbg.__wbg_setconstants_8fdb7b4cac7ebe8c=function(e,t){e.constants=t},e.wbg.__wbg_setconstants_a7158f4f0eb335b7=function(e,t){e.constants=t},e.wbg.__wbg_setcount_f0218523e435fe27=function(e,t){e.count=t>>>0},e.wbg.__wbg_setcullmode_d07f4cca149fc8fd=function(e,t){e.cullMode=ze[t]},e.wbg.__wbg_setcurrentTime_64727eddd3966512=function(e,t){e.currentTime=t},e.wbg.__wbg_setdepthbias_d0a6693d6a8ab87e=function(e,t){e.depthBias=t},e.wbg.__wbg_setdepthbiasclamp_256485c28643d20d=function(e,t){e.depthBiasClamp=t},e.wbg.__wbg_setdepthbiasslopescale_b7ec92a9bda5e232=function(e,t){e.depthBiasSlopeScale=t},e.wbg.__wbg_setdepthclearvalue_e427925fb817bffc=function(e,t){e.depthClearValue=t},e.wbg.__wbg_setdepthcompare_3d414508518d2332=function(e,t){e.depthCompare=K[t]},e.wbg.__wbg_setdepthfailop_bb45e35727206b07=function(e,t){e.depthFailOp=J[t]},e.wbg.__wbg_setdepthloadop_6e7ed58390bcb472=function(e,t){e.depthLoadOp=q[t]},e.wbg.__wbg_setdepthorarraylayers_f883a5503c92fcbe=function(e,t){e.depthOrArrayLayers=t>>>0},e.wbg.__wbg_setdepthreadonly_ec5f87de25f955c6=function(e,t){e.depthReadOnly=t!==0},e.wbg.__wbg_setdepthslice_4c2d15e75ec01602=function(e,t){e.depthSlice=t>>>0},e.wbg.__wbg_setdepthstencil_ab24ec143b022ff9=function(e,t){e.depthStencil=t},e.wbg.__wbg_setdepthstencilattachment_8abbf392d55551bd=function(e,t){e.depthStencilAttachment=t},e.wbg.__wbg_setdepthstoreop_c529093252e36c11=function(e,t){e.depthStoreOp=Y[t]},e.wbg.__wbg_setdepthwriteenabled_a97b018ec8906115=function(e,t){e.depthWriteEnabled=t!==0},e.wbg.__wbg_setdevice_3d552cd495a322c2=function(e,t){e.device=t},e.wbg.__wbg_setdimension_2892b665919c0e54=function(e,t){e.dimension=Z[t]},e.wbg.__wbg_setdimension_c14e0b4f680f2a14=function(e,t){e.dimension=Je[t]},e.wbg.__wbg_setdstfactor_04b172f73540aabf=function(e,t){e.dstFactor=Fe[t]},e.wbg.__wbg_setendofpasswriteindex_6923ba50f58bb0df=function(e,t){e.endOfPassWriteIndex=t>>>0},e.wbg.__wbg_setentries_545836ca7979d0c3=function(e,t){e.entries=t},e.wbg.__wbg_setentries_99398ac8873772cf=function(e,t){e.entries=t},e.wbg.__wbg_setentrypoint_40d651c49abeabef=function(e,t,n){e.entryPoint=H(t,n)},e.wbg.__wbg_setentrypoint_78553a4419def0b5=function(e,t,n){e.entryPoint=H(t,n)},e.wbg.__wbg_setentrypoint_9de314a2c2570802=function(e,t,n){e.entryPoint=H(t,n)},e.wbg.__wbg_setfailop_3b7d50b0a4f08e69=function(e,t){e.failOp=J[t]},e.wbg.__wbg_setformat_01f82498bb7aa545=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_3dd749532151c43e=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_5106903c3bec7f29=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_6077b776453ad8d1=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_984f8b09308d0584=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_c0f2655a6b8dae1a=function(e,t){e.format=X[t]},e.wbg.__wbg_setformat_d474115239036438=function(e,t){e.format=Xe[t]},e.wbg.__wbg_setfragment_1f67ab59aff99617=function(e,t){e.fragment=t},e.wbg.__wbg_setfrontface_1875a91bf87e5bad=function(e,t){e.frontFace=Ve[t]},e.wbg.__wbg_setg_a62d6aa648d4cd4c=function(e,t){e.g=t},e.wbg.__wbg_sethasdynamicoffset_78853235cc49b8ea=function(e,t){e.hasDynamicOffset=t!==0},e.wbg.__wbg_setheight_1e158913ddc793af=function(e,t){e.height=t>>>0},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(e,t,n){e[t>>>0]=n},e.wbg.__wbg_setlayout_44fc85f3dd4d8fd6=function(e,t){e.layout=t},e.wbg.__wbg_setlayout_74172b78828c84fe=function(e,t){e.layout=t},e.wbg.__wbg_setlayout_a9e58d0996412dfa=function(e,t){e.layout=t},e.wbg.__wbg_setloadop_f1ccd5d15b52ca5d=function(e,t){e.loadOp=q[t]},e.wbg.__wbg_setlodmaxclamp_2c14826867287557=function(e,t){e.lodMaxClamp=t},e.wbg.__wbg_setlodminclamp_90c60cc7e8baa95b=function(e,t){e.lodMinClamp=t},e.wbg.__wbg_setmagfilter_064b565970422154=function(e,t){e.magFilter=Be[t]},e.wbg.__wbg_setmappedatcreation_5b22281a9edff7fa=function(e,t){e.mappedAtCreation=t!==0},e.wbg.__wbg_setmask_2007e390b35587d6=function(e,t){e.mask=t>>>0},e.wbg.__wbg_setmaxanisotropy_d90cbfc49f762cf1=function(e,t){e.maxAnisotropy=t},e.wbg.__wbg_setminbindingsize_b6106c56d37c8a84=function(e,t){e.minBindingSize=t},e.wbg.__wbg_setminfilter_712d4dcd764a0d5e=function(e,t){e.minFilter=Be[t]},e.wbg.__wbg_setmiplevel_5fa33ce523901448=function(e,t){e.mipLevel=t>>>0},e.wbg.__wbg_setmiplevelcount_836d12b93ef02836=function(e,t){e.mipLevelCount=t>>>0},e.wbg.__wbg_setmiplevelcount_da876250f18dd0e7=function(e,t){e.mipLevelCount=t>>>0},e.wbg.__wbg_setmipmapfilter_9cac92abe21b7816=function(e,t){e.mipmapFilter=Ue[t]},e.wbg.__wbg_setmodule_7b8dd93fefd91a73=function(e,t){e.module=t},e.wbg.__wbg_setmodule_e1281341685bf91a=function(e,t){e.module=t},e.wbg.__wbg_setmodule_e7a882363768bf73=function(e,t){e.module=t},e.wbg.__wbg_setmultisample_95fbbb44e36714e3=function(e,t){e.multisample=t},e.wbg.__wbg_setmultisampled_f7f0562151e1ff91=function(e,t){e.multisampled=t!==0},e.wbg.__wbg_setocclusionqueryset_a2a4abf338fb3441=function(e,t){e.occlusionQuerySet=t},e.wbg.__wbg_setoffset_1bf2826ce181376a=function(e,t){e.offset=t},e.wbg.__wbg_setoffset_f6f822a44e88af7e=function(e,t){e.offset=t},e.wbg.__wbg_setoffset_fe9f09cc240192d0=function(e,t){e.offset=t},e.wbg.__wbg_setoperation_de3d845bdac61eb3=function(e,t){e.operation=Ie[t]},e.wbg.__wbg_setorigin_9d2dbc71ffaae355=function(e,t){e.origin=t},e.wbg.__wbg_setpassop_8767e1a56e3c30da=function(e,t){e.passOp=J[t]},e.wbg.__wbg_setprimitive_491591635926383f=function(e,t){e.primitive=t},e.wbg.__wbg_setqueryset_0351509707c5cd51=function(e,t){e.querySet=t},e.wbg.__wbg_setr_732e149cd5493a75=function(e,t){e.r=t},e.wbg.__wbg_setresolvetarget_56e82fe32d6e757b=function(e,t){e.resolveTarget=t},e.wbg.__wbg_setresource_261b30a085bc9a72=function(e,t){e.resource=t},e.wbg.__wbg_setrowsperimage_5d58ebd56fa65231=function(e,t){e.rowsPerImage=t>>>0},e.wbg.__wbg_setsamplecount_ecdebb2cba9265c0=function(e,t){e.sampleCount=t>>>0},e.wbg.__wbg_setsampler_5d1ee8efc1fd14d3=function(e,t){e.sampler=t},e.wbg.__wbg_setsampletype_afa82d0d8ad6e2d7=function(e,t){e.sampleType=Ye[t]},e.wbg.__wbg_setshaderlocation_315967bfde4427a8=function(e,t){e.shaderLocation=t>>>0},e.wbg.__wbg_setsize_021142f0cf8b49c2=function(e,t){e.size=t},e.wbg.__wbg_setsize_4f9d7203f06fc54a=function(e,t){e.size=t},e.wbg.__wbg_setsize_a2662ec0e7f16cc9=function(e,t){e.size=t},e.wbg.__wbg_setsrcfactor_5aea25a9f1933072=function(e,t){e.srcFactor=Fe[t]},e.wbg.__wbg_setstencilback_1b6b2643a15d5066=function(e,t){e.stencilBack=t},e.wbg.__wbg_setstencilclearvalue_ef82d3b767ad806f=function(e,t){e.stencilClearValue=t>>>0},e.wbg.__wbg_setstencilfront_4e2eaace01795028=function(e,t){e.stencilFront=t},e.wbg.__wbg_setstencilloadop_6e7bc3186a01330e=function(e,t){e.stencilLoadOp=q[t]},e.wbg.__wbg_setstencilreadmask_99287c6b013f0ae2=function(e,t){e.stencilReadMask=t>>>0},e.wbg.__wbg_setstencilreadonly_00d790631a8e4330=function(e,t){e.stencilReadOnly=t!==0},e.wbg.__wbg_setstencilstoreop_22d01da4d35271b2=function(e,t){e.stencilStoreOp=Y[t]},e.wbg.__wbg_setstencilwritemask_30cfa473ca5600c7=function(e,t){e.stencilWriteMask=t>>>0},e.wbg.__wbg_setstepmode_ac000a7f17d3b87d=function(e,t){e.stepMode=Ze[t]},e.wbg.__wbg_setstoragetexture_c17314bf4e104ece=function(e,t){e.storageTexture=t},e.wbg.__wbg_setstoreop_571e86638124baba=function(e,t){e.storeOp=Y[t]},e.wbg.__wbg_setstripindexformat_9ec52f6405d7985b=function(e,t){e.stripIndexFormat=He[t]},e.wbg.__wbg_settargets_591e8613a4896aac=function(e,t){e.targets=t},e.wbg.__wbg_settexture_62c91e1557d1310a=function(e,t){e.texture=t},e.wbg.__wbg_settexture_a8c8df2623f6e670=function(e,t){e.texture=t},e.wbg.__wbg_settimestampwrites_c48f0b3db52a9119=function(e,t){e.timestampWrites=t},e.wbg.__wbg_settopology_35540552af8ad12e=function(e,t){e.topology=We[t]},e.wbg.__wbg_settype_39ed370d3edd403c=function(e,t,n){e.type=H(t,n)},e.wbg.__wbg_settype_51c2819925b5e0a6=function(e,t){e.type=Ge[t]},e.wbg.__wbg_settype_a275611edc111d26=function(e,t){e.type=Le[t]},e.wbg.__wbg_setunclippeddepth_43cbbb9961b4b705=function(e,t){e.unclippedDepth=t!==0},e.wbg.__wbg_setusage_191c3002e6efb81b=function(e,t){e.usage=t>>>0},e.wbg.__wbg_setusage_7836ddf40e55971a=function(e,t){e.usage=t>>>0},e.wbg.__wbg_setusage_7e9a6c2f119cab96=function(e,t){e.usage=t>>>0},e.wbg.__wbg_setusage_97670aee3d9bbf16=function(e,t){e.usage=t>>>0},e.wbg.__wbg_setvertex_602fd330026bc0be=function(e,t){e.vertex=t},e.wbg.__wbg_setview_2eb28c0fa8228e7c=function(e,t){e.view=t},e.wbg.__wbg_setview_451a1441471a69db=function(e,t){e.view=t},e.wbg.__wbg_setviewdimension_d632693fb1d12b24=function(e,t){e.viewDimension=Z[t]},e.wbg.__wbg_setviewdimension_dc868215e54cbbba=function(e,t){e.viewDimension=Z[t]},e.wbg.__wbg_setviewformats_6c89940ba38f64ff=function(e,t){e.viewFormats=t},e.wbg.__wbg_setviewformats_ff9ffe91ceca51c3=function(e,t){e.viewFormats=t},e.wbg.__wbg_setvisibility_1f6371439759b513=function(e,t){e.visibility=t>>>0},e.wbg.__wbg_setvolume_3895e06a030ca4f7=function(e,t){e.volume=t},e.wbg.__wbg_setwidth_6cc268cef8245a36=function(e,t){e.width=t>>>0},e.wbg.__wbg_setwritemask_4ea635b0719187be=function(e,t){e.writeMask=t>>>0},e.wbg.__wbg_size_84ca9c23c7989256=function(e){return e.size},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){let n=t.stack,r=z(n,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),i=F;V().setInt32(e+4,i,!0),V().setInt32(e+0,r,!0)},e.wbg.__wbg_submit_3bf51baf36de553b=function(e,t){e.submit(t)},e.wbg.__wbg_unconfigure_64b5f267287f6b71=function(e){e.unconfigure()},e.wbg.__wbg_usage_d2a45c8d889f9c63=function(e){return e.usage},e.wbg.__wbg_width_684e9aa31cbda8b8=function(e){return e.width},e.wbg.__wbg_writeBuffer_b5be14e621130604=function(){return P(function(e,t,n,r){e.writeBuffer(t,n,r)},arguments)},e.wbg.__wbg_writeTexture_ff0b4f87c3efd0dc=function(){return P(function(e,t,n,r,i,a){e.writeTexture(t,ke(n,r),i,a)},arguments)},e.wbg.__wbindgen_debug_string=function(e,t){let n=z(U(t),M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),r=F;V().setInt32(e+4,r,!0),V().setInt32(e+0,n,!0)},e.wbg.__wbindgen_init_externref_table=function(){let e=M.__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 M.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=Ae(r)?0:z(r,M.__wbindgen_malloc_command_export,M.__wbindgen_realloc_command_export),a=F;V().setInt32(e+4,a,!0),V().setInt32(e+0,i,!0)},e.wbg.__wbindgen_string_new=function(e,t){return H(e,t)},e.wbg.__wbindgen_throw=function(e,t){throw Error(H(e,t))},e}function nt(e,t){return M=e.exports,rt.__wbindgen_wasm_module=t,B=null,W=null,I=null,M.__wbindgen_start(),M}async function rt(e){if(M!==void 0)return M;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=tt();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await et(await e,t);return nt(n,r)}let Q=null;function $(){return Q??(Q=D(rt,`https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.78.1/dist/webgpu/dotlottie-player.wasm`,`https://unpkg.com/@lottiefiles/dotlottie-web@0.78.1/dist/webgpu/dotlottie-player.wasm`)),Q}var it=class extends Ee{constructor(e){super(e),o(this,`_gpuDevice`,null),o(this,`_gpuContext`,null),o(this,`_deviceOwned`,!1),o(this,`_userDevice`,void 0),this._userDevice=e.device}async _initWasm(){if(await $().load(),this._userDevice)this._gpuDevice=this._userDevice,this._deviceOwned=!1;else{if(!navigator.gpu)throw Error(`WebGPU is not supported in this browser.`);let e=await navigator.gpu.requestAdapter();if(!e)throw Error(`Failed to get WebGPU adapter.`);let t=await e.requestDevice();t.addEventListener(`uncapturederror`,e=>{let t=e.error;console.error(`[dotlottie-web] WebGPU uncaptured error:`,t?.message??t)}),t.lost.then(e=>{e.reason!==`destroyed`&&console.error(`[dotlottie-web] WebGPU device lost: reason=${e.reason} msg=${e.message}`)}),this._gpuDevice=t,this._deviceOwned=!0}}_createCore(){return new $e}_onCoreCreated(){!this._canvas||!this._dotLottieCore||!this._gpuDevice||this._setupGpuContext()}_setupGpuContext(){if(!this._canvas||!this._dotLottieCore||!this._gpuDevice)return;let t=this._canvas;if(e){let e=this._renderConfig.devicePixelRatio||w(),{width:n,height:r}=t.getBoundingClientRect();n!==0&&r!==0&&(t.width=Math.round(n*e),t.height=Math.round(r*e))}let n=t.getContext(`webgpu`);if(!n)throw Error(`Failed to get WebGPU canvas context.`);this._gpuContext=n;let r=this._dotLottieCore;r.set_webgpu_device(this._gpuDevice),r.set_webgpu_surface(n)}resize(){if(this._gpuContext&&this._gpuDevice&&this._canvas){let e=this._canvas,t=this._renderConfig.devicePixelRatio||w(),{width:n,height:r}=e.getBoundingClientRect();n!==0&&r!==0&&(e.width=Math.round(n*t),e.height=Math.round(r*t)),this._dotLottieCore&&this.isLoaded&&this._setupTarget(e.width,e.height)&&this._dotLottieCore.render();return}super.resize()}_setupTarget(e,t){return this._dotLottieCore?this._dotLottieCore.setup_wg_target(e,t):!1}_draw(){}_setupRendererOnCanvas(){this._context=null,this._gpuContext&&(this._gpuContext.unconfigure(),this._gpuContext=null),!(!this._canvas||!this._dotLottieCore||!this._gpuDevice)&&this._setupGpuContext()}destroy(){this._gpuContext&&(this._gpuContext.unconfigure(),this._gpuContext=null),super.destroy(),this._deviceOwned&&this._gpuDevice&&this._gpuDevice.destroy(),this._gpuDevice=null}get device(){return this._gpuDevice}static setWasmUrl(e){$().setWasmUrl(e)}static preload(){return $().load()}};export{it as DotLottie};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|