UNPKG

@lottiefiles/dotlottie-web

Version:
1 lines 313 kB
{"version":3,"file":"index.cjs","names":["wasm","addToExternrefTable0","handleError","WASM_VECTOR_LEN","cachedUint8ArrayMemory0","getUint8ArrayMemory0","cachedTextEncoder","encodeString","passStringToWasm0","isLikeNone","cachedDataViewMemory0","getDataViewMemory0","cachedTextDecoder","getStringFromWasm0","passArray8ToWasm0","cachedFloat32ArrayMemory0","getFloat32ArrayMemory0","passArrayF32ToWasm0","passArrayJsValueToWasm0","Mode","DotLottiePlayerWasmFinalization","DotLottiePlayerWasm","__wbg_load","__wbg_get_imports","__wbg_init_memory","__wbg_finalize_init","__wbg_init","init","CoreMode","DotLottiePlayerWasm","init"],"sources":["../../src/constants.ts","../../src/animation-frame-manager.ts","../../src/core/dotlottie-player.js","../../src/event-manager.ts","../../src/offscreen-observer.ts","../../src/resize-observer.ts","../../src/utils.ts","../../src/wasm-loader.ts","../../src/dotlottie.ts","../../src/webgpu/dotlottie-player.js","../../src/webgpu/dotlottie-webgpu.ts"],"sourcesContent":["export const IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nexport const MS_TO_SEC_FACTOR = 1000;\nexport const DEFAULT_BG_COLOR = '#00000000';\nexport const ZIP_SIGNATURE = new Uint8Array([0x50, 0x4b, 0x03, 0x04]);\nexport const LOTTIE_JSON_MANDATORY_FIELDS = ['v', 'ip', 'op', 'layers', 'fr', 'w', 'h'];\n\n// These values are replace during the build process with the package version and name\nexport const PACKAGE_VERSION = __PACKAGE_VERSION__;\nexport const PACKAGE_NAME = __PACKAGE_NAME__;\n\nexport const DEFAULT_DPR_FACTOR = 0.75;\n\nexport const BYTES_PER_PIXEL = 4;\n","/* eslint-disable max-classes-per-file */\n\ninterface AnimationFrameStrategy {\n cancelAnimationFrame(id: number): void;\n requestAnimationFrame(callback: (time: number) => void): number;\n}\n\nclass WebAnimationFrameStrategy implements AnimationFrameStrategy {\n public requestAnimationFrame(callback: (time: number) => void): number {\n return requestAnimationFrame(callback);\n }\n\n public cancelAnimationFrame(id: number): void {\n cancelAnimationFrame(id);\n }\n}\n\nclass NodeAnimationFrameStrategy implements AnimationFrameStrategy {\n private _lastHandleId: number = 0;\n\n private _lastImmediate: NodeJS.Immediate | null = null;\n\n public requestAnimationFrame(callback: (time: number) => void): number {\n if (this._lastHandleId >= Number.MAX_SAFE_INTEGER) {\n this._lastHandleId = 0;\n }\n\n this._lastHandleId += 1;\n\n this._lastImmediate = setImmediate(() => {\n callback(Date.now());\n });\n\n return this._lastHandleId;\n }\n\n public cancelAnimationFrame(_id: number): void {\n if (this._lastImmediate) {\n clearImmediate(this._lastImmediate);\n }\n }\n}\n\nexport class AnimationFrameManager {\n private readonly _strategy: AnimationFrameStrategy;\n\n public constructor() {\n this._strategy =\n typeof requestAnimationFrame === 'function' ? new WebAnimationFrameStrategy() : new NodeAnimationFrameStrategy();\n }\n\n public requestAnimationFrame(callback: (time: number) => void): number {\n return this._strategy.requestAnimationFrame(callback);\n }\n\n public cancelAnimationFrame(id: number): void {\n this._strategy.cancelAnimationFrame(id);\n }\n}\n","\nlet wasm;\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc_command_export();\n wasm.__wbindgen_export_2.set(idx, obj);\n return idx;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store_command_export(idx);\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8ArrayMemory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nlet cachedFloat32ArrayMemory0 = null;\n\nfunction getFloat32ArrayMemory0() {\n if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {\n cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);\n }\n return cachedFloat32ArrayMemory0;\n}\n\nfunction passArrayF32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getFloat32ArrayMemory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction passArrayJsValueToWasm0(array, malloc) {\n const ptr = malloc(array.length * 4, 4) >>> 0;\n for (let i = 0; i < array.length; i++) {\n const add = addToExternrefTable0(array[i]);\n getDataViewMemory0().setUint32(ptr + 4 * i, add, true);\n }\n WASM_VECTOR_LEN = array.length;\n return ptr;\n}\n/**\n * Register a font globally (static, not tied to a player instance).\n * @param {string} name\n * @param {Uint8Array} data\n * @returns {boolean}\n */\nexport function register_font(name, data) {\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_malloc_command_export);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.register_font(ptr0, len0, ptr1, len1);\n return ret !== 0;\n}\n\n/**\n * Playback direction / bounce mode.\n * @enum {0 | 1 | 2 | 3}\n */\nexport const Mode = Object.freeze({\n Forward: 0, \"0\": \"Forward\",\n Reverse: 1, \"1\": \"Reverse\",\n Bounce: 2, \"2\": \"Bounce\",\n ReverseBounce: 3, \"3\": \"ReverseBounce\",\n});\n\nconst DotLottiePlayerWasmFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_dotlottieplayerwasm_free(ptr >>> 0, 1));\n\nexport class DotLottiePlayerWasm {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n DotLottiePlayerWasmFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_dotlottieplayerwasm_free(ptr, 0);\n }\n constructor() {\n const ret = wasm.dotlottieplayerwasm_new();\n this.__wbg_ptr = ret >>> 0;\n DotLottiePlayerWasmFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * Load a Lottie JSON animation. Sets up the rendering target automatically.\n * @param {string} data\n * @param {number} width\n * @param {number} height\n * @returns {boolean}\n */\n load_animation(data, width, height) {\n const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_load_animation(this.__wbg_ptr, ptr0, len0, width, height);\n return ret !== 0;\n }\n /**\n * Load a .lottie archive from raw bytes.\n * @param {Uint8Array} data\n * @param {number} width\n * @param {number} height\n * @returns {boolean}\n */\n load_dotlottie_data(data, width, height) {\n const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr, ptr0, len0, width, height);\n return ret !== 0;\n }\n /**\n * Load an animation from an already-loaded .lottie archive by its ID.\n * @param {string} id\n * @param {number} width\n * @param {number} height\n * @returns {boolean}\n */\n load_animation_from_id(id, width, height) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr, ptr0, len0, width, height);\n return ret !== 0;\n }\n /**\n * Advance time and render. Call once per `requestAnimationFrame`.\n * @returns {boolean}\n */\n tick() {\n const ret = wasm.dotlottieplayerwasm_tick(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Render the current frame without advancing time.\n * @returns {boolean}\n */\n render() {\n const ret = wasm.dotlottieplayerwasm_render(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Clear the canvas to the background colour.\n */\n clear() {\n wasm.dotlottieplayerwasm_clear(this.__wbg_ptr);\n }\n /**\n * Resize the canvas. For the SW renderer this also resizes the pixel buffer.\n * @param {number} width\n * @param {number} height\n * @returns {boolean}\n */\n resize(width, height) {\n const ret = wasm.dotlottieplayerwasm_resize(this.__wbg_ptr, width, height);\n return ret !== 0;\n }\n /**\n * Zero-copy `Uint8Array` view into WASM linear memory.\n *\n * **Use the returned array immediately.** Do not store the reference across\n * any call that may reallocate the buffer (e.g. `resize` / `load_animation`\n * with different dimensions).\n * @returns {Uint8Array}\n */\n get_pixel_buffer() {\n const ret = wasm.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {boolean}\n */\n play() {\n const ret = wasm.dotlottieplayerwasm_play(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n pause() {\n const ret = wasm.dotlottieplayerwasm_pause(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n stop() {\n const ret = wasm.dotlottieplayerwasm_stop(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n is_playing() {\n const ret = wasm.dotlottieplayerwasm_is_playing(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n is_paused() {\n const ret = wasm.dotlottieplayerwasm_is_paused(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n is_stopped() {\n const ret = wasm.dotlottieplayerwasm_is_stopped(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n is_loaded() {\n const ret = wasm.dotlottieplayerwasm_is_loaded(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n is_complete() {\n const ret = wasm.dotlottieplayerwasm_is_complete(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n is_tweening() {\n const ret = wasm.dotlottieplayerwasm_is_tweening(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {number}\n */\n current_frame() {\n const ret = wasm.dotlottieplayerwasm_current_frame(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n total_frames() {\n const ret = wasm.dotlottieplayerwasm_total_frames(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n request_frame() {\n const ret = wasm.dotlottieplayerwasm_request_frame(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} no\n * @returns {boolean}\n */\n set_frame(no) {\n const ret = wasm.dotlottieplayerwasm_set_frame(this.__wbg_ptr, no);\n return ret !== 0;\n }\n /**\n * @param {number} no\n * @returns {boolean}\n */\n seek(no) {\n const ret = wasm.dotlottieplayerwasm_seek(this.__wbg_ptr, no);\n return ret !== 0;\n }\n /**\n * @returns {number}\n */\n duration() {\n const ret = wasm.dotlottieplayerwasm_duration(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n segment_duration() {\n const ret = wasm.dotlottieplayerwasm_segment_duration(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n current_loop_count() {\n const ret = wasm.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr);\n return ret >>> 0;\n }\n reset_current_loop_count() {\n wasm.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr);\n }\n /**\n * @returns {number}\n */\n width() {\n const ret = wasm.dotlottieplayerwasm_width(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n height() {\n const ret = wasm.dotlottieplayerwasm_height(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * `[width, height]` of the animation in its native coordinate space.\n * @returns {Float32Array}\n */\n animation_size() {\n const ret = wasm.dotlottieplayerwasm_animation_size(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {Mode}\n */\n mode() {\n const ret = wasm.dotlottieplayerwasm_mode(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {Mode} mode\n */\n set_mode(mode) {\n wasm.dotlottieplayerwasm_set_mode(this.__wbg_ptr, mode);\n }\n /**\n * @returns {number}\n */\n speed() {\n const ret = wasm.dotlottieplayerwasm_speed(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} speed\n */\n set_speed(speed) {\n wasm.dotlottieplayerwasm_set_speed(this.__wbg_ptr, speed);\n }\n /**\n * @returns {boolean}\n */\n loop_animation() {\n const ret = wasm.dotlottieplayerwasm_loop_animation(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {boolean} v\n */\n set_loop(v) {\n wasm.dotlottieplayerwasm_set_loop(this.__wbg_ptr, v);\n }\n /**\n * @returns {number}\n */\n loop_count() {\n const ret = wasm.dotlottieplayerwasm_loop_count(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} n\n */\n set_loop_count(n) {\n wasm.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr, n);\n }\n /**\n * @returns {boolean}\n */\n autoplay() {\n const ret = wasm.dotlottieplayerwasm_autoplay(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {boolean} v\n */\n set_autoplay(v) {\n wasm.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr, v);\n }\n /**\n * @returns {boolean}\n */\n use_frame_interpolation() {\n const ret = wasm.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {boolean} v\n */\n set_use_frame_interpolation(v) {\n wasm.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr, v);\n }\n /**\n * @returns {number}\n */\n background_color() {\n const ret = wasm.dotlottieplayerwasm_background_color(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * Set background colour (`0xAARRGGBB`).\n * @param {number} color\n * @returns {boolean}\n */\n set_background_color(color) {\n const ret = wasm.dotlottieplayerwasm_set_background_color(this.__wbg_ptr, color);\n return ret !== 0;\n }\n /**\n * Clear the background colour (transparent).\n * @returns {boolean}\n */\n clear_background_color() {\n const ret = wasm.dotlottieplayerwasm_clear_background_color(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {number} quality\n * @returns {boolean}\n */\n set_quality(quality) {\n const ret = wasm.dotlottieplayerwasm_set_quality(this.__wbg_ptr, quality);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n has_segment() {\n const ret = wasm.dotlottieplayerwasm_has_segment(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @returns {number}\n */\n segment_start() {\n const ret = wasm.dotlottieplayerwasm_segment_start(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n segment_end() {\n const ret = wasm.dotlottieplayerwasm_segment_end(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} start\n * @param {number} end\n * @returns {boolean}\n */\n set_segment(start, end) {\n const ret = wasm.dotlottieplayerwasm_set_segment(this.__wbg_ptr, start, end);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n clear_segment() {\n const ret = wasm.dotlottieplayerwasm_clear_segment(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Set the layout.\n *\n * `fit` is one of `\"contain\"`, `\"fill\"`, `\"cover\"`, `\"fit-width\"`,\n * `\"fit-height\"`, `\"none\"`. `align_x` / `align_y` are in [0, 1].\n * @param {string} fit\n * @param {number} align_x\n * @param {number} align_y\n * @returns {boolean}\n */\n set_layout(fit, align_x, align_y) {\n const ptr0 = passStringToWasm0(fit, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_layout(this.__wbg_ptr, ptr0, len0, align_x, align_y);\n return ret !== 0;\n }\n /**\n * @returns {string}\n */\n layout_fit() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free_command_export(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {number}\n */\n layout_align_x() {\n const ret = wasm.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n layout_align_y() {\n const ret = wasm.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @returns {boolean}\n */\n set_viewport(x, y, w, h) {\n const ret = wasm.dotlottieplayerwasm_set_viewport(this.__wbg_ptr, x, y, w, h);\n return ret !== 0;\n }\n /**\n * Set a color slot (`r`, `g`, `b` in [0, 1]).\n * @param {string} id\n * @param {number} r\n * @param {number} g\n * @param {number} b\n * @returns {boolean}\n */\n set_color_slot(id, r, g, b) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr, ptr0, len0, r, g, b);\n return ret !== 0;\n }\n /**\n * @param {string} id\n * @param {number} value\n * @returns {boolean}\n */\n set_scalar_slot(id, value) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr, ptr0, len0, value);\n return ret !== 0;\n }\n /**\n * @param {string} id\n * @param {string} text\n * @returns {boolean}\n */\n set_text_slot(id, text) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr, ptr0, len0, ptr1, len1);\n return ret !== 0;\n }\n /**\n * @param {string} id\n * @param {number} x\n * @param {number} y\n * @returns {boolean}\n */\n set_vector_slot(id, x, y) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr, ptr0, len0, x, y);\n return ret !== 0;\n }\n /**\n * @param {string} id\n * @param {number} x\n * @param {number} y\n * @returns {boolean}\n */\n set_position_slot(id, x, y) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr, ptr0, len0, x, y);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n clear_slots() {\n const ret = wasm.dotlottieplayerwasm_clear_slots(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {string} id\n * @returns {boolean}\n */\n clear_slot(id) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_clear_slot(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Set multiple slots at once from a JSON string.\n * @param {string} json\n * @returns {boolean}\n */\n set_slots_str(json) {\n const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Set a single slot by ID from a JSON value string.\n * @param {string} id\n * @param {string} json\n * @returns {boolean}\n */\n set_slot_str(id, json) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr, ptr0, len0, ptr1, len1);\n return ret !== 0;\n }\n /**\n * Get the JSON value of a single slot by ID, or `undefined` if not found.\n * @param {string} id\n * @returns {string | undefined}\n */\n get_slot_str(id) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr, ptr0, len0);\n let v2;\n if (ret[0] !== 0) {\n v2 = getStringFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);\n }\n return v2;\n }\n /**\n * Get all slots as a JSON object string.\n * @returns {string}\n */\n get_slots_str() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free_command_export(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get all slot IDs as a JS array.\n * @returns {any}\n */\n get_slot_ids() {\n const ret = wasm.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr);\n return ret;\n }\n /**\n * Get the type string of a slot, or `undefined` if not found.\n * @param {string} id\n * @returns {string | undefined}\n */\n get_slot_type(id) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr, ptr0, len0);\n let v2;\n if (ret[0] !== 0) {\n v2 = getStringFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);\n }\n return v2;\n }\n /**\n * Reset a slot to its default value from the animation.\n * @param {string} id\n * @returns {boolean}\n */\n reset_slot(id) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_reset_slot(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Reset all slots to their default values from the animation.\n * @returns {boolean}\n */\n reset_slots() {\n const ret = wasm.dotlottieplayerwasm_reset_slots(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {number} x\n * @param {number} y\n * @param {string} layer_name\n * @returns {boolean}\n */\n intersect(x, y, layer_name) {\n const ptr0 = passStringToWasm0(layer_name, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_intersect(this.__wbg_ptr, x, y, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Returns `[x, y, width, height]` of the layer's bounding box.\n * @param {string} layer_name\n * @returns {Float32Array}\n */\n get_layer_bounds(layer_name) {\n const ptr0 = passStringToWasm0(layer_name, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_get_layer_bounds(this.__wbg_ptr, ptr0, len0);\n return ret;\n }\n /**\n * Returns the current affine transform as a flat `Float32Array`.\n * @returns {Float32Array}\n */\n get_transform() {\n const ret = wasm.dotlottieplayerwasm_get_transform(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {Float32Array} data\n * @returns {boolean}\n */\n set_transform(data) {\n const ptr0 = passArrayF32ToWasm0(data, wasm.__wbindgen_malloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_transform(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Tween to `to` frame. `duration` in seconds; pass `undefined` for default.\n * @param {number} to\n * @param {number | null} [duration]\n * @returns {boolean}\n */\n tween(to, duration) {\n const ret = wasm.dotlottieplayerwasm_tween(this.__wbg_ptr, to, isLikeNone(duration) ? 0x100000001 : Math.fround(duration));\n return ret !== 0;\n }\n /**\n * Tween with a cubic-bezier easing (`e0..e3`).\n * @param {number} to\n * @param {number | null | undefined} duration\n * @param {number} e0\n * @param {number} e1\n * @param {number} e2\n * @param {number} e3\n * @returns {boolean}\n */\n tween_with_easing(to, duration, e0, e1, e2, e3) {\n const ret = wasm.dotlottieplayerwasm_tween_with_easing(this.__wbg_ptr, to, isLikeNone(duration) ? 0x100000001 : Math.fround(duration), e0, e1, e2, e3);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n tween_stop() {\n const ret = wasm.dotlottieplayerwasm_tween_stop(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {number | null} [progress]\n * @returns {boolean}\n */\n tween_update(progress) {\n const ret = wasm.dotlottieplayerwasm_tween_update(this.__wbg_ptr, isLikeNone(progress) ? 0x100000001 : Math.fround(progress));\n return ret !== 0;\n }\n /**\n * @param {string} marker\n * @param {number | null} [duration]\n * @returns {boolean}\n */\n tween_to_marker(marker, duration) {\n const ptr0 = passStringToWasm0(marker, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_tween_to_marker(this.__wbg_ptr, ptr0, len0, isLikeNone(duration) ? 0x100000001 : Math.fround(duration));\n return ret !== 0;\n }\n /**\n * Returns an array of `{ name, time, duration }` objects.\n * @returns {any}\n */\n markers() {\n const ret = wasm.dotlottieplayerwasm_markers(this.__wbg_ptr);\n return ret;\n }\n /**\n * Returns an array of marker name strings.\n * @returns {any}\n */\n marker_names() {\n const ret = wasm.dotlottieplayerwasm_marker_names(this.__wbg_ptr);\n return ret;\n }\n /**\n * Name of the currently active marker, or `undefined` if none.\n * @returns {string | undefined}\n */\n current_marker() {\n const ret = wasm.dotlottieplayerwasm_current_marker(this.__wbg_ptr);\n let v1;\n if (ret[0] !== 0) {\n v1 = getStringFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);\n }\n return v1;\n }\n /**\n * @param {string} name\n */\n set_marker(name) {\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n wasm.dotlottieplayerwasm_set_marker(this.__wbg_ptr, ptr0, len0);\n }\n clear_marker() {\n wasm.dotlottieplayerwasm_clear_marker(this.__wbg_ptr);\n }\n /**\n * Poll the next player event. Returns `null` if the queue is empty,\n * otherwise a plain JS object with a `type` string field and optional\n * payload fields (`frameNo`, `loopCount`).\n * @returns {any}\n */\n poll_event() {\n const ret = wasm.dotlottieplayerwasm_poll_event(this.__wbg_ptr);\n return ret;\n }\n emit_on_loop() {\n wasm.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr);\n }\n /**\n * @param {string} name\n * @param {Uint8Array} data\n * @returns {boolean}\n */\n load_font(name, data) {\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_malloc_command_export);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_load_font(this.__wbg_ptr, ptr0, len0, ptr1, len1);\n return ret !== 0;\n }\n /**\n * @param {string} name\n * @returns {boolean}\n */\n static unload_font(name) {\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_unload_font(ptr0, len0);\n return ret !== 0;\n }\n /**\n * @param {string} id\n * @returns {boolean}\n */\n set_theme(id) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_theme(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * @returns {boolean}\n */\n reset_theme() {\n const ret = wasm.dotlottieplayerwasm_reset_theme(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * @param {string} data\n * @returns {boolean}\n */\n set_theme_data(data) {\n const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * @returns {string | undefined}\n */\n theme_id() {\n const ret = wasm.dotlottieplayerwasm_theme_id(this.__wbg_ptr);\n let v1;\n if (ret[0] !== 0) {\n v1 = getStringFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);\n }\n return v1;\n }\n /**\n * @returns {string | undefined}\n */\n animation_id() {\n const ret = wasm.dotlottieplayerwasm_animation_id(this.__wbg_ptr);\n let v1;\n if (ret[0] !== 0) {\n v1 = getStringFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);\n }\n return v1;\n }\n /**\n * Returns the animation manifest as a JSON string, or empty string if unavailable.\n * @returns {string}\n */\n manifest_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free_command_export(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the raw JSON definition of a state machine by ID, or `undefined`.\n * @param {string} id\n * @returns {string | undefined}\n */\n get_state_machine(id) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr, ptr0, len0);\n let v2;\n if (ret[0] !== 0) {\n v2 = getStringFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);\n }\n return v2;\n }\n /**\n * Returns the ID of the currently active state machine, or `undefined`.\n * @returns {string | undefined}\n */\n state_machine_id() {\n const ret = wasm.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr);\n let v1;\n if (ret[0] !== 0) {\n v1 = getStringFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);\n }\n return v1;\n }\n /**\n * Load a state machine from a JSON definition string. Returns `true` on\n * success. The engine is kept alive inside the player and interacted\n * with via the `sm_*` methods.\n * @param {string} definition\n * @returns {boolean}\n */\n state_machine_load(definition) {\n const ptr0 = passStringToWasm0(definition, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Load a state machine from a .lottie archive by state-machine ID.\n * @param {string} id\n * @returns {boolean}\n */\n state_machine_load_from_id(id) {\n const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Unload the active state machine.\n */\n state_machine_unload() {\n wasm.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr);\n }\n /**\n * Fire a named event into the state machine.\n * @param {string} event\n * @returns {boolean}\n */\n sm_fire(event) {\n const ptr0 = passStringToWasm0(event, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_fire(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * @param {string} key\n * @param {number} value\n * @returns {boolean}\n */\n sm_set_numeric_input(key, value) {\n const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr, ptr0, len0, value);\n return ret !== 0;\n }\n /**\n * @param {string} key\n * @returns {number | undefined}\n */\n sm_get_numeric_input(key) {\n const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr, ptr0, len0);\n return ret === 0x100000001 ? undefined : ret;\n }\n /**\n * @param {string} key\n * @param {string} value\n * @returns {boolean}\n */\n sm_set_string_input(key, value) {\n const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr, ptr0, len0, ptr1, len1);\n return ret !== 0;\n }\n /**\n * @param {string} key\n * @returns {string | undefined}\n */\n sm_get_string_input(key) {\n const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr, ptr0, len0);\n let v2;\n if (ret[0] !== 0) {\n v2 = getStringFromWasm0(ret[0], ret[1]).slice();\n wasm.__wbindgen_free_command_export(ret[0], ret[1] * 1, 1);\n }\n return v2;\n }\n /**\n * @param {string} key\n * @param {boolean} value\n * @returns {boolean}\n */\n sm_set_boolean_input(key, value) {\n const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr, ptr0, len0, value);\n return ret !== 0;\n }\n /**\n * @param {string} key\n * @returns {boolean | undefined}\n */\n sm_get_boolean_input(key) {\n const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr, ptr0, len0);\n return ret === 0xFFFFFF ? undefined : ret !== 0;\n }\n /**\n * @param {string} key\n */\n sm_reset_input(key) {\n const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n wasm.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * Poll the next state machine event. Returns `null` if the queue is empty,\n * otherwise a JS object with a `type` field and optional payload.\n * @returns {any}\n */\n sm_poll_event() {\n const ret = wasm.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr);\n return ret;\n }\n /**\n * Start the state machine with an open-URL policy.\n * @param {boolean} require_user_interaction\n * @param {any[]} whitelist\n * @returns {boolean}\n */\n sm_start(require_user_interaction, whitelist) {\n const ptr0 = passArrayJsValueToWasm0(whitelist, wasm.__wbindgen_malloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_start(this.__wbg_ptr, require_user_interaction, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Stop the state machine.\n * @returns {boolean}\n */\n sm_stop() {\n const ret = wasm.dotlottieplayerwasm_sm_stop(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the current status of the state machine as a string.\n * @returns {string}\n */\n sm_status() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.dotlottieplayerwasm_sm_status(this.__wbg_ptr);\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free_command_export(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the name of the current state.\n * @returns {string}\n */\n sm_current_state() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free_command_export(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Override the current state.\n * @param {string} state\n * @param {boolean} immediate\n * @returns {boolean}\n */\n sm_override_current_state(state, immediate) {\n const ptr0 = passStringToWasm0(state, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr, ptr0, len0, immediate);\n return ret !== 0;\n }\n /**\n * Returns the framework setup listeners as a JS array of strings.\n * @returns {any}\n */\n sm_framework_setup() {\n const ret = wasm.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr);\n return ret;\n }\n /**\n * Returns all state machine inputs as a JS array of strings.\n * @returns {any}\n */\n sm_get_inputs() {\n const ret = wasm.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {number} x\n * @param {number} y\n */\n sm_post_click(x, y) {\n wasm.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr, x, y);\n }\n /**\n * @param {number} x\n * @param {number} y\n */\n sm_post_pointer_down(x, y) {\n wasm.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr, x, y);\n }\n /**\n * @param {number} x\n * @param {number} y\n */\n sm_post_pointer_up(x, y) {\n wasm.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr, x, y);\n }\n /**\n * @param {number} x\n * @param {number} y\n */\n sm_post_pointer_move(x, y) {\n wasm.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr, x, y);\n }\n /**\n * @param {number} x\n * @param {number} y\n */\n sm_post_pointer_enter(x, y) {\n wasm.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr, x, y);\n }\n /**\n * @param {number} x\n * @param {number} y\n */\n sm_post_pointer_exit(x, y) {\n wasm.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr, x, y);\n }\n /**\n * Poll the next state machine internal event. Returns `null` if the\n * queue is empty, otherwise a JS object `{ type: \"Message\", message }`.\n * @returns {any}\n */\n sm_poll_internal_event() {\n const ret = wasm.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr);\n return ret;\n }\n /**\n * Advance the state machine by one tick. Returns `false` if no state machine\n * is loaded, otherwise `true` (even if the machine is stopped or errored).\n * @returns {boolean}\n */\n sm_tick() {\n const ret = wasm.dotlottieplayerwasm_sm_tick(this.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {\n const ret = arg0.buffer;\n return ret;\n };\n imports.wbg.__wbg_new_405e22f390576ce2 = function() {\n const ret = new Object();\n return ret;\n };\n imports.wbg.__wbg_new_78feb108b6472713 = function() {\n const ret = new Array();\n return ret;\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);\n return ret;\n };\n imports.wbg.__wbg_newwithlength_5a5efe313cfd59f1 = function(arg0) {\n const ret = new Float32Array(arg0 >>> 0);\n return ret;\n };\n imports.wbg.__wbg_now_807e54c39636c349 = function() {\n const ret = Date.now();\n return ret;\n };\n imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {\n const ret = arg0.push(arg1);\n return ret;\n };\n imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(arg0, arg1, arg2);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_setindex_4e73afdcd9bb95cd = function(arg0, arg1, arg2) {\n arg0[