diff --git a/.github/workflows/buildapp.yaml b/.github/workflows/buildapp.yaml index 499b35d..41cc8bd 100644 --- a/.github/workflows/buildapp.yaml +++ b/.github/workflows/buildapp.yaml @@ -1,9 +1,6 @@ -name: Build ReplayWeb.page App +name: Build/release -on: - push: - branches: - - main +on: push jobs: release: @@ -11,10 +8,10 @@ jobs: strategy: matrix: - os: [macos-10.14, ubuntu-latest] + os: [macos-10.15, ubuntu-latest] platform: [windows, linux] exclude: - - os: macos-10.14 + - os: macos-10.15 platform: windows steps: @@ -24,7 +21,7 @@ jobs: - name: Install Node.js, NPM and Yarn uses: actions/setup-node@v1 with: - node-version: 13 + node-version: 14 - name: Cache Dirs uses: actions/cache@v2 @@ -47,7 +44,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - if [ "$GITHUB_REF" == "refs/heads/main" ]; then + if [ "$GITHUB_REF" == "refs/heads/main" ] || [ -f ./force_release ]; then export YARN_BUILD_CMD="release" else export YARN_BUILD_CMD="dist" @@ -55,10 +52,10 @@ jobs: if [ "$RUNNER_OS" == "Linux" ]; then if [ "$PLATFORM" == "linux" ]; then - mkdir -p plugins-linux; - pushd plugins-linux; - wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/libpepflashplayer.so"; - popd; + #mkdir -p plugins-linux; + #pushd plugins-linux; + #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/libpepflashplayer.so"; + #popd; docker run --rm \ -e GH_TOKEN=${GH_TOKEN} \ @@ -69,11 +66,11 @@ jobs: electronuserland/builder:wine \ /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn install && yarn run $YARN_BUILD_CMD --linux --x64" else - mkdir -p plugins-win; - pushd plugins-win; - wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer-x86_64.dll"; - wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer-x86.dll"; - popd; + #mkdir -p plugins-win; + #pushd plugins-win; + #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer-x86_64.dll"; + #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/pepflashplayer-x86.dll"; + #popd; docker run --rm \ -e GH_TOKEN=${GH_TOKEN} \ @@ -87,12 +84,12 @@ jobs: /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn install && yarn run $YARN_BUILD_CMD --win --x64 --ia32" fi else - mkdir -p plugins-mac; - pushd plugins-mac; - wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/PepperFlashPlayer.plugin.zip"; - unzip PepperFlashPlayer.plugin.zip; - rm PepperFlashPlayer.plugin.zip; - popd; + #mkdir -p plugins-mac; + #pushd plugins-mac; + #wget "https://s3.amazonaws.com/webrecorder-builds/flashplugin/PepperFlashPlayer.plugin.zip"; + #unzip PepperFlashPlayer.plugin.zip; + #rm PepperFlashPlayer.plugin.zip; + #popd; yarn install yarn run $YARN_BUILD_CMD fi diff --git a/CHANGES.md b/CHANGES.md index 2a15b0a..f9c25c8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,12 @@ ## CHANGES +v1.5.0 +- Update to wabac.js 2.9.0-beta.1, fidelity and loading improvements, smaller size (includes indexeddb data migration) +- Update to electron 14, latest Chrome +- Update to Universal builds for OS X. +- Add Ruffle, use for Flash Rendering, both in hosted and electron app versions. +- Embeds: Better error message for service worker not found + v1.4.7 - Loading: HAR file loading: Add messages when HAR file content is missing, don't filter out empty urls (via wabac.js) - Loading: Fix "null" added on Not Found error page when there is no hashtag. diff --git a/_data/package.json b/_data/package.json index bfd2105..3ed389e 100644 --- a/_data/package.json +++ b/_data/package.json @@ -1,7 +1,7 @@ { "name": "replaywebpage", "productName": "ReplayWeb.page", - "version": "1.4.7", + "version": "1.5.0", "description": "Serverless Web Archive Replay", "repository": "https://github.com/webrecorder/replayweb.page", "homepage": "https://replayweb.page/", @@ -9,7 +9,7 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-free": "^5.13.0", - "@webrecorder/wabac": "webrecorder/wabac.js", + "@webrecorder/wabac": "^2.9.0-beta.1", "bulma": "^0.9.2", "electron-log": "^4.3.0", "electron-updater": "^4.3.5", @@ -28,8 +28,8 @@ "devDependencies": { "copy-webpack-plugin": "^6.3.0", "css-loader": "^3.5.3", - "electron": "^11.4.11", - "electron-builder": "^22.7.0", + "electron": "^14.0.0-beta.24", + "electron-builder": "^22.13.1", "electron-notarize": "^1.0.0", "http-server": "^0.12.3", "mini-css-extract-plugin": "^0.9.0", @@ -46,6 +46,7 @@ "files": [ "/assets", "/src", + "/ruffle", "sw.js", "ui.js", "index.js" @@ -93,8 +94,14 @@ "mac": { "category": "public.app-category.utilities", "target": [ - "dmg", - "zip" + { + "target": "dmg", + "arch": "universal" + }, + { + "target": "zip", + "arch": "universal" + } ], "hardenedRuntime": true, "gatekeeperAssess": false, diff --git a/package.json b/package.json index bfd2105..3ed389e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "replaywebpage", "productName": "ReplayWeb.page", - "version": "1.4.7", + "version": "1.5.0", "description": "Serverless Web Archive Replay", "repository": "https://github.com/webrecorder/replayweb.page", "homepage": "https://replayweb.page/", @@ -9,7 +9,7 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-free": "^5.13.0", - "@webrecorder/wabac": "webrecorder/wabac.js", + "@webrecorder/wabac": "^2.9.0-beta.1", "bulma": "^0.9.2", "electron-log": "^4.3.0", "electron-updater": "^4.3.5", @@ -28,8 +28,8 @@ "devDependencies": { "copy-webpack-plugin": "^6.3.0", "css-loader": "^3.5.3", - "electron": "^11.4.11", - "electron-builder": "^22.7.0", + "electron": "^14.0.0-beta.24", + "electron-builder": "^22.13.1", "electron-notarize": "^1.0.0", "http-server": "^0.12.3", "mini-css-extract-plugin": "^0.9.0", @@ -46,6 +46,7 @@ "files": [ "/assets", "/src", + "/ruffle", "sw.js", "ui.js", "index.js" @@ -93,8 +94,14 @@ "mac": { "category": "public.app-category.utilities", "target": [ - "dmg", - "zip" + { + "target": "dmg", + "arch": "universal" + }, + { + "target": "zip", + "arch": "universal" + } ], "hardenedRuntime": true, "gatekeeperAssess": false, diff --git a/ruffle/5c07dd6ff5768c700aa3.wasm b/ruffle/5c07dd6ff5768c700aa3.wasm new file mode 100644 index 0000000..21b6e4a Binary files /dev/null and b/ruffle/5c07dd6ff5768c700aa3.wasm differ diff --git a/ruffle/LICENSE_MIT b/ruffle/LICENSE_MIT new file mode 100644 index 0000000..63a286b --- /dev/null +++ b/ruffle/LICENSE_MIT @@ -0,0 +1,25 @@ +Copyright (c) 2018 Mike Welsh + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/ruffle/ruffle.js b/ruffle/ruffle.js new file mode 100644 index 0000000..ec41485 --- /dev/null +++ b/ruffle/ruffle.js @@ -0,0 +1,2 @@ +(()=>{"use strict";var e,t,n={903:(e,t,n)=>{e.exports=n.p+"5c07dd6ff5768c700aa3.wasm"}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);i.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,i.d(o,a),o},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="",i.b=document.baseURI||self.location.href,(()=>{const e="undefined"!=typeof AudioContext?AudioContext:"undefined"!=typeof webkitAudioContext?webkitAudioContext:void 0;let t;const n=new Array(32).fill(void 0);function r(e){return n[e]}n.push(void 0,null,!0,!1);let o=n.length;function a(e){const t=r(e);return function(e){e<36||(n[e]=o,o=e)}(e),t}let s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});s.decode();let c=null;function u(){return null!==c&&c.buffer===t.memory.buffer||(c=new Uint8Array(t.memory.buffer)),c}function l(e,t){return s.decode(u().subarray(e,e+t))}function f(e){o===n.length&&n.push(n.length+1);const t=o;return o=n[t],n[t]=e,t}let _=0,d=new TextEncoder("utf-8");const b="function"==typeof d.encodeInto?function(e,t){return d.encodeInto(e,t)}:function(e,t){const n=d.encode(e);return t.set(n),{read:e.length,written:n.length}};function g(e,t,n){if(void 0===n){const n=d.encode(e),r=t(n.length);return u().subarray(r,r+n.length).set(n),_=n.length,r}let r=e.length,i=t(r);const o=u();let a=0;for(;a127)break;o[i+a]=t}if(a!==r){0!==a&&(e=e.slice(a)),i=n(i,r,r=a+3*e.length);const t=u().subarray(i+a,i+r);a+=b(e,t).written}return _=a,i}let w=null;function h(){return null!==w&&w.buffer===t.memory.buffer||(w=new Int32Array(t.memory.buffer)),w}function p(e){return null==e}let m=null;function y(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let n="[";t>0&&(n+=y(e[0]));for(let r=1;r1))return toString.call(e);if(r=n[1],"Object"==r)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function v(e,n,r,i){const o={a:e,b:n,cnt:1,dtor:r},a=(...e)=>{o.cnt++;const n=o.a;o.a=0;try{return i(n,o.b,...e)}finally{0==--o.cnt?t.__wbindgen_export_2.get(o.dtor)(n,o.b):o.a=n}};return a.original=o,a}function x(e,n,r){t._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4b8745fdac2a290c(e,n,f(r))}function k(e,n,r){t._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4b8745fdac2a290c(e,n,f(r))}function E(e,n){t._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3873182cfbb4b316(e,n)}function C(e,n,r){t._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4b8745fdac2a290c(e,n,f(r))}function S(e,n,r){t._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4b8745fdac2a290c(e,n,f(r))}function I(e,n,r){t._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1f5d1f7ff644399d(e,n,r)}function A(e,n,r){t._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4b8745fdac2a290c(e,n,f(r))}function R(e,n,r){t._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4b8745fdac2a290c(e,n,f(r))}function F(e,n,r){t._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h638e7144e7b26f5b(e,n,f(r))}let P=null;function O(e,n){return(null!==P&&P.buffer===t.memory.buffer||(P=new Float32Array(t.memory.buffer)),P).subarray(e/4,e/4+n)}function T(e,n){try{return e.apply(this,n)}catch(e){t.__wbindgen_exn_store(f(e))}}let M=32;function j(e){if(1==M)throw new Error("out of js stack");return n[--M]=e,M}let L=null;function N(e,t){return u().subarray(e/1,e/1+t)}class D{static __wrap(e){const t=Object.create(D.prototype);return t.ptr=e,t}__destroy_into_raw(){const e=this.ptr;return this.ptr=0,e}free(){const e=this.__destroy_into_raw();t.__wbg_ruffle_free(e)}constructor(e,r,i){try{var o=t.ruffle_new(f(e),f(r),j(i));return D.__wrap(o)}finally{n[M++]=void 0}}stream_from(e,r){try{var i=g(e,t.__wbindgen_malloc,t.__wbindgen_realloc),o=_;t.ruffle_stream_from(this.ptr,i,o,j(r))}finally{n[M++]=void 0}}load_data(e,r){try{t.ruffle_load_data(this.ptr,f(e),j(r))}finally{n[M++]=void 0}}play(){t.ruffle_play(this.ptr)}pause(){t.ruffle_pause(this.ptr)}is_playing(){return 0!==t.ruffle_is_playing(this.ptr)}prepare_context_menu(){return a(t.ruffle_prepare_context_menu(this.ptr))}run_context_menu_callback(e){t.ruffle_run_context_menu_callback(this.ptr,e)}clear_custom_menu_items(){t.ruffle_clear_custom_menu_items(this.ptr)}destroy(){t.ruffle_destroy(this.ptr)}call_exposed_callback(e,n){var r=g(e,t.__wbindgen_malloc,t.__wbindgen_realloc),i=_,o=function(e,n){const r=n(4*e.length),i=(null!==L&&L.buffer===t.memory.buffer||(L=new Uint32Array(t.memory.buffer)),L);for(let t=0;t>>0,f>>>0)},s.wbg.__wbg_createVertexArray_855d59250230c563=function(e){var t=r(e).createVertexArray();return p(t)?0:f(t)},s.wbg.__wbg_renderbufferStorageMultisample_bbeb2b87cb14307f=function(e,t,n,i,o,a){r(e).renderbufferStorageMultisample(t>>>0,n,i>>>0,o,a)},s.wbg.__wbg_texImage2D_173d216c50e54701=function(){return T((function(e,t,n,i,o,a,s,c,u,l,f){r(e).texImage2D(t>>>0,n,i,o,a,s,c>>>0,u>>>0,0===l?void 0:N(l,f))}),arguments)},s.wbg.__wbg_bindFramebuffer_ce3cfcfec4aa02cc=function(e,t,n){r(e).bindFramebuffer(t>>>0,r(n))},s.wbg.__wbg_bindRenderbuffer_35f3639b7da4e4c7=function(e,t,n){r(e).bindRenderbuffer(t>>>0,r(n))},s.wbg.__wbg_bindTexture_f2a0487a487a78d9=function(e,t,n){r(e).bindTexture(t>>>0,r(n))},s.wbg.__wbg_createFramebuffer_7fd863d54241be81=function(e){var t=r(e).createFramebuffer();return p(t)?0:f(t)},s.wbg.__wbg_createRenderbuffer_52ebc0325ed6e885=function(e){var t=r(e).createRenderbuffer();return p(t)?0:f(t)},s.wbg.__wbg_createTexture_a46f881a1c96b496=function(e){var t=r(e).createTexture();return p(t)?0:f(t)},s.wbg.__wbg_deleteFramebuffer_867aba8474910f62=function(e,t){r(e).deleteFramebuffer(r(t))},s.wbg.__wbg_deleteRenderbuffer_eb162fd0beb632da=function(e,t){r(e).deleteRenderbuffer(r(t))},s.wbg.__wbg_deleteTexture_1affe310edd12b75=function(e,t){r(e).deleteTexture(r(t))},s.wbg.__wbg_framebufferRenderbuffer_7bb033ee5a2eca8c=function(e,t,n,i,o){r(e).framebufferRenderbuffer(t>>>0,n>>>0,i>>>0,r(o))},s.wbg.__wbg_framebufferTexture2D_9a77a023fd4aedcc=function(e,t,n,i,o,a){r(e).framebufferTexture2D(t>>>0,n>>>0,i>>>0,r(o),a)},s.wbg.__wbg_getError_142acae679908a25=function(e){return r(e).getError()},s.wbg.__wbg_getParameter_34e9af6606eb8544=function(){return T((function(e,t){return f(r(e).getParameter(t>>>0))}),arguments)},s.wbg.__wbg_texParameteri_e99b48aa90ae569b=function(e,t,n,i){r(e).texParameteri(t>>>0,n>>>0,i)},s.wbg.__wbg_instanceof_Window_9c4fd26090e1d029=function(e){return r(e)instanceof Window},s.wbg.__wbg_document_249e9cf340780f93=function(e){var t=r(e).document;return p(t)?0:f(t)},s.wbg.__wbg_location_cf542a8f458da7b4=function(e){return f(r(e).location)},s.wbg.__wbg_navigator_fdf3521d0e190a9b=function(e){return f(r(e).navigator)},s.wbg.__wbg_devicePixelRatio_ea9c0157a379b3ec=function(e){return r(e).devicePixelRatio},s.wbg.__wbg_performance_e029cf47e1c47c09=function(e){var t=r(e).performance;return p(t)?0:f(t)},s.wbg.__wbg_localStorage_884d77b5cedf820a=function(){return T((function(e){var t=r(e).localStorage;return p(t)?0:f(t)}),arguments)},s.wbg.__wbg_cancelAnimationFrame_28c6665c9b2a3944=function(){return T((function(e,t){r(e).cancelAnimationFrame(t)}),arguments)},s.wbg.__wbg_focus_b5729f61a3280cbc=function(){return T((function(e){r(e).focus()}),arguments)},s.wbg.__wbg_open_313f5801aab5e2f1=function(){return T((function(e,t,n,i,o){var a=r(e).open(l(t,n),l(i,o));return p(a)?0:f(a)}),arguments)},s.wbg.__wbg_requestAnimationFrame_aa3bab1f9557a4da=function(){return T((function(e,t){return r(e).requestAnimationFrame(r(t))}),arguments)},s.wbg.__wbg_fetch_eaee025997e4cd56=function(e,t){return f(r(e).fetch(r(t)))},s.wbg.__wbg_destination_c5ce4ac317c9219f=function(e){return f(r(e).destination)},s.wbg.__wbg_sampleRate_cc13fe55474678eb=function(e){return r(e).sampleRate},s.wbg.__wbg_currentTime_ae061c195387b7ac=function(e){return r(e).currentTime},s.wbg.__wbg_new_29e8884899ea6ee2=function(){return T((function(){return f(new e)}),arguments)},s.wbg.__wbg_suspend_4b5d3b7ee1f4a3ec=function(){return T((function(e){return f(r(e).suspend())}),arguments)},s.wbg.__wbg_createBuffer_53c7286e081d0b3e=function(){return T((function(e,t,n,i){return f(r(e).createBuffer(t>>>0,n>>>0,i))}),arguments)},s.wbg.__wbg_createBufferSource_8b7fd8bc4222b208=function(){return T((function(e){return f(r(e).createBufferSource())}),arguments)},s.wbg.__wbg_createChannelMerger_c059636adf34e09d=function(){return T((function(e,t){return f(r(e).createChannelMerger(t>>>0))}),arguments)},s.wbg.__wbg_createChannelSplitter_68062f62d4d66ed8=function(){return T((function(e,t){return f(r(e).createChannelSplitter(t>>>0))}),arguments)},s.wbg.__wbg_createGain_7b6dadac3a6522d6=function(){return T((function(e){return f(r(e).createGain())}),arguments)},s.wbg.__wbg_createScriptProcessor_bce5438a51faa41d=function(){return T((function(e,t,n,i){return f(r(e).createScriptProcessor(t>>>0,n>>>0,i>>>0))}),arguments)},s.wbg.__wbg_decodeAudioData_81b31c0703465a21=function(){return T((function(e,t,n,i){return f(r(e).decodeAudioData(r(t),r(n),r(i)))}),arguments)},s.wbg.__wbg_resume_2c75f8fc1fd26d4b=function(){return T((function(e){return f(r(e).resume())}),arguments)},s.wbg.__wbg_setvalue_e8ff05630a7ffecb=function(e,t){r(e).value=t},s.wbg.__wbg_linearRampToValueAtTime_0245aa9e5d87776f=function(){return T((function(e,t,n){return f(r(e).linearRampToValueAtTime(t,n))}),arguments)},s.wbg.__wbg_setValueAtTime_b4a172acdfc9830f=function(){return T((function(e,t,n){return f(r(e).setValueAtTime(t,n))}),arguments)},s.wbg.__wbg_gain_b3536e37256053f5=function(e){return f(r(e).gain)},s.wbg.__wbg_baseURI_6a10de9fa3003a69=function(){return T((function(e,n){var i=r(n).baseURI,o=p(i)?0:g(i,t.__wbindgen_malloc,t.__wbindgen_realloc),a=_;h()[e/4+1]=a,h()[e/4+0]=o}),arguments)},s.wbg.__wbg_appendChild_6ae001e6d3556190=function(){return T((function(e,t){return f(r(e).appendChild(r(t)))}),arguments)},s.wbg.__wbg_get_36b7a676e4c8aee9=function(){return T((function(e,n,i,o){var a=r(n)[l(i,o)],s=p(a)?0:g(a,t.__wbindgen_malloc,t.__wbindgen_realloc),c=_;h()[e/4+1]=c,h()[e/4+0]=s}),arguments)},s.wbg.__wbg_set_ad2026ce7b489f96=function(){return T((function(e,t,n,i,o){r(e)[l(t,n)]=l(i,o)}),arguments)},s.wbg.__wbg_delete_9614de882c9a0cf5=function(){return T((function(e,t,n){delete r(e)[l(t,n)]}),arguments)},s.wbg.__wbg_instanceof_SvgsvgElement_28ef05afde3449f9=function(e){return r(e)instanceof SVGSVGElement},s.wbg.__wbg_createSVGMatrix_43815bd5777c567f=function(e){return f(r(e).createSVGMatrix())},s.wbg.__wbg_setProperty_84c0a22125c731d6=function(){return T((function(e,t,n,i,o){r(e).setProperty(l(t,n),l(i,o))}),arguments)},s.wbg.__wbg_protocol_2d293dcd35a07041=function(){return T((function(e,n){var i=g(r(n).protocol,t.__wbindgen_malloc,t.__wbindgen_realloc),o=_;h()[e/4+1]=o,h()[e/4+0]=i}),arguments)},s.wbg.__wbg_assign_fc277322e1a88614=function(){return T((function(e,t,n){r(e).assign(l(t,n))}),arguments)},s.wbg.__wbg_new_3c2bf2a5257369ec=function(){return T((function(){return f(new Path2D)}),arguments)},s.wbg.__wbg_addPath_cf691ede06f38917=function(e,t,n){r(e).addPath(r(t),r(n))},s.wbg.__wbg_closePath_48f860f5bcbc79f3=function(e){r(e).closePath()},s.wbg.__wbg_lineTo_7fd48462a80ac962=function(e,t,n){r(e).lineTo(t,n)},s.wbg.__wbg_moveTo_62ea44f899317925=function(e,t,n){r(e).moveTo(t,n)},s.wbg.__wbg_quadraticCurveTo_6f746087da5a242c=function(e,t,n,i,o){r(e).quadraticCurveTo(t,n,i,o)},s.wbg.__wbg_length_914ec377666a1fb8=function(e){return r(e).length},s.wbg.__wbg_setTransform_4c6870c885e2b89e=function(e,t){r(e).setTransform(r(t))},s.wbg.__wbg_offsetX_951495e9516f0aeb=function(e){return r(e).offsetX},s.wbg.__wbg_offsetY_0377a1f53f902a1e=function(e){return r(e).offsetY},s.wbg.__wbg_button_c35922e0098b9cda=function(e){return r(e).button},s.wbg.__wbg_bindVertexArrayOES_bb8a104f35d5cf4f=function(e,t){r(e).bindVertexArrayOES(r(t))},s.wbg.__wbg_createVertexArrayOES_51a703442a9d8099=function(e){var t=r(e).createVertexArrayOES();return p(t)?0:f(t)},s.wbg.__wbg_deltaY_49d792c5901e3fc1=function(e){return r(e).deltaY},s.wbg.__wbg_deltaMode_7ed5ee895d112617=function(e){return r(e).deltaMode},s.wbg.__wbg_connect_3a117c24756fdf62=function(){return T((function(e,t){return f(r(e).connect(r(t)))}),arguments)},s.wbg.__wbg_connect_3a51bca7e31cd323=function(){return T((function(e,t,n){return f(r(e).connect(r(t),n>>>0))}),arguments)},s.wbg.__wbg_connect_52449bed6e387d23=function(){return T((function(e,t,n,i){return f(r(e).connect(r(t),n>>>0,i>>>0))}),arguments)},s.wbg.__wbg_disconnect_b101656fb34b9fa3=function(){return T((function(e){r(e).disconnect()}),arguments)},s.wbg.__wbg_outputBuffer_7e7061041aa8a304=function(){return T((function(e){return f(r(e).outputBuffer)}),arguments)},s.wbg.__wbg_instanceof_Response_8295bf7aacde3233=function(e){return r(e)instanceof Response},s.wbg.__wbg_ok_e1e8f70fbf7c1fdc=function(e){return r(e).ok},s.wbg.__wbg_statusText_c5b7d9b4bc84d715=function(e,n){var i=g(r(n).statusText,t.__wbindgen_malloc,t.__wbindgen_realloc),o=_;h()[e/4+1]=o,h()[e/4+0]=i},s.wbg.__wbg_arrayBuffer_a98df6d58bb5ea26=function(){return T((function(e){return f(r(e).arrayBuffer())}),arguments)},s.wbg.__wbg_seta_5138c769bc027dee=function(e,t){r(e).a=t},s.wbg.__wbg_setb_d92c5b9331343d2e=function(e,t){r(e).b=t},s.wbg.__wbg_setc_c6fbbb68c7ba4693=function(e,t){r(e).c=t},s.wbg.__wbg_setd_42dcf42c3ceabc9b=function(e,t){r(e).d=t},s.wbg.__wbg_sete_49250c2d46b375b3=function(e,t){r(e).e=t},s.wbg.__wbg_setf_12cb2512fe19ba3f=function(e,t){r(e).f=t},s.wbg.__wbg_setbuffer_5aca59a6f26d3307=function(e,t){r(e).buffer=r(t)},s.wbg.__wbg_setloop_710fa1431c2bc494=function(e,t){r(e).loop=0!==t},s.wbg.__wbg_setloopStart_988c5aad78cc446c=function(e,t){r(e).loopStart=t},s.wbg.__wbg_setloopEnd_fcc6c08574ca8ae5=function(e,t){r(e).loopEnd=t},s.wbg.__wbg_setonended_0efd780b31d16bbf=function(e,t){r(e).onended=r(t)},s.wbg.__wbg_start_e92060130d43d928=function(){return T((function(e){r(e).start()}),arguments)},s.wbg.__wbg_start_a8d199336331f3a5=function(){return T((function(e,t,n){r(e).start(t,n)}),arguments)},s.wbg.__wbg_stop_37842cd5a56a341c=function(){return T((function(e,t){r(e).stop(t)}),arguments)},s.wbg.__wbg_instanceof_HtmlFormElement_de39c8070c818493=function(e){return r(e)instanceof HTMLFormElement},s.wbg.__wbg_submit_e668f2e6a4582aa6=function(){return T((function(e){r(e).submit()}),arguments)},s.wbg.__wbg_now_4abbca4ef2aba8d6=function(e){return r(e).now()},s.wbg.__wbg_pointerId_e68d773decdc9224=function(e){return r(e).pointerId},s.wbg.__wbg_setonaudioprocess_9d6a213da205ae4d=function(e,t){r(e).onaudioprocess=r(t)},s.wbg.__wbg_instanceof_HtmlCanvasElement_e0e251da2aa0b541=function(e){return r(e)instanceof HTMLCanvasElement},s.wbg.__wbg_width_5843e31ec081f978=function(e){return r(e).width},s.wbg.__wbg_setwidth_fd251e9da5abcced=function(e,t){r(e).width=t>>>0},s.wbg.__wbg_height_872c06b1bc666dd9=function(e){return r(e).height},s.wbg.__wbg_setheight_5b882973e84fa13c=function(e,t){r(e).height=t>>>0},s.wbg.__wbg_getContext_d778ffc8203f64ae=function(){return T((function(e,t,n){var i=r(e).getContext(l(t,n));return p(i)?0:f(i)}),arguments)},s.wbg.__wbg_getContext_4678c25f580222b0=function(){return T((function(e,t,n,i){var o=r(e).getContext(l(t,n),r(i));return p(o)?0:f(o)}),arguments)},s.wbg.__wbg_setsrc_21ed0b40d0ff0413=function(e,t,n){r(e).src=l(t,n)},s.wbg.__wbg_new_0891fac076d9e6b3=function(){return T((function(){return f(new Image)}),arguments)},s.wbg.__wbg_newwithwidthandheight_045e54743ae79290=function(){return T((function(e,t){return f(new Image(e>>>0,t>>>0))}),arguments)},s.wbg.__wbg_key_97a48109ce6890c4=function(e,n){var i=g(r(n).key,t.__wbindgen_malloc,t.__wbindgen_realloc),o=_;h()[e/4+1]=o,h()[e/4+0]=i},s.wbg.__wbg_code_e70e2272901f086c=function(e,n){var i=g(r(n).code,t.__wbindgen_malloc,t.__wbindgen_realloc),o=_;h()[e/4+1]=o,h()[e/4+0]=i},s.wbg.__wbg_newwithstrandinit_a58924208f457f33=function(){return T((function(e,t,n){return f(new Request(l(e,t),r(n)))}),arguments)},s.wbg.__wbg_body_0d97f334de622953=function(e){var t=r(e).body;return p(t)?0:f(t)},s.wbg.__wbg_createElement_ba61aad8af6be7f4=function(){return T((function(e,t,n){return f(r(e).createElement(l(t,n)))}),arguments)},s.wbg.__wbg_createElementNS_c951238dc260501e=function(){return T((function(e,t,n,i,o){return f(r(e).createElementNS(0===t?void 0:l(t,n),l(i,o)))}),arguments)},s.wbg.__wbg_setid_16518c90432c2f8e=function(e,t,n){r(e).id=l(t,n)},s.wbg.__wbg_clientWidth_405142b36824cd4f=function(e){return r(e).clientWidth},s.wbg.__wbg_clientHeight_645231c9da3480a9=function(e){return r(e).clientHeight},s.wbg.__wbg_querySelector_6c8f27227fc14315=function(){return T((function(e,t,n){var i=r(e).querySelector(l(t,n));return p(i)?0:f(i)}),arguments)},s.wbg.__wbg_releasePointerCapture_758b760808d6ce02=function(){return T((function(e,t){r(e).releasePointerCapture(t)}),arguments)},s.wbg.__wbg_setAttribute_0b50656f1ccc45bf=function(){return T((function(e,t,n,i,o){r(e).setAttribute(l(t,n),l(i,o))}),arguments)},s.wbg.__wbg_setAttributeNS_d31649e78e2cf95c=function(){return T((function(e,t,n,i,o,a,s){r(e).setAttributeNS(0===t?void 0:l(t,n),l(i,o),l(a,s))}),arguments)},s.wbg.__wbg_setPointerCapture_6f31425163cf44a1=function(){return T((function(e,t){r(e).setPointerCapture(t)}),arguments)},s.wbg.__wbg_remove_eabff3d9e444a826=function(e){r(e).remove()},s.wbg.__wbg_instanceof_WebGlRenderingContext_5671fd2c102046b1=function(e){return r(e)instanceof WebGLRenderingContext},s.wbg.__wbg_drawingBufferWidth_0f8ef2b95bb66c81=function(e){return r(e).drawingBufferWidth},s.wbg.__wbg_drawingBufferHeight_04a3507b6fb21bac=function(e){return r(e).drawingBufferHeight},s.wbg.__wbg_bufferData_9f09145baa3273f9=function(e,t,n,i,o){r(e).bufferData(t>>>0,N(n,i),o>>>0)},s.wbg.__wbg_texImage2D_48722cf9f95c8df8=function(){return T((function(e,t,n,i,o,a,s,c,u,l,f){r(e).texImage2D(t>>>0,n,i,o,a,s,c>>>0,u>>>0,0===l?void 0:N(l,f))}),arguments)},s.wbg.__wbg_uniform1fv_0b5950d4f588ac7e=function(e,t,n,i){r(e).uniform1fv(r(t),O(n,i))},s.wbg.__wbg_uniform4fv_8fa4c0052d79aed2=function(e,t,n,i){r(e).uniform4fv(r(t),O(n,i))},s.wbg.__wbg_uniformMatrix3fv_c4a15deb8d8fbd61=function(e,t,n,i,o){r(e).uniformMatrix3fv(r(t),0!==n,O(i,o))},s.wbg.__wbg_uniformMatrix4fv_62951f66fbf764cd=function(e,t,n,i,o){r(e).uniformMatrix4fv(r(t),0!==n,O(i,o))},s.wbg.__wbg_activeTexture_790fa161eaf8dcb0=function(e,t){r(e).activeTexture(t>>>0)},s.wbg.__wbg_attachShader_5446231928034874=function(e,t,n){r(e).attachShader(r(t),r(n))},s.wbg.__wbg_bindBuffer_5b0bd39cdc9f3c91=function(e,t,n){r(e).bindBuffer(t>>>0,r(n))},s.wbg.__wbg_bindFramebuffer_9490ff183a431d0d=function(e,t,n){r(e).bindFramebuffer(t>>>0,r(n))},s.wbg.__wbg_bindRenderbuffer_86495e658e23020f=function(e,t,n){r(e).bindRenderbuffer(t>>>0,r(n))},s.wbg.__wbg_bindTexture_6df7d2262019c813=function(e,t,n){r(e).bindTexture(t>>>0,r(n))},s.wbg.__wbg_blendFunc_c91f929b64e24ca6=function(e,t,n){r(e).blendFunc(t>>>0,n>>>0)},s.wbg.__wbg_clear_216e95e64c0ce688=function(e,t){r(e).clear(t>>>0)},s.wbg.__wbg_clearColor_f7316ccd75b2a3b1=function(e,t,n,i,o){r(e).clearColor(t,n,i,o)},s.wbg.__wbg_colorMask_cc8730de91ea02ce=function(e,t,n,i,o){r(e).colorMask(0!==t,0!==n,0!==i,0!==o)},s.wbg.__wbg_compileShader_749eb91c541c360c=function(e,t){r(e).compileShader(r(t))},s.wbg.__wbg_createBuffer_8ae1735de737ca21=function(e){var t=r(e).createBuffer();return p(t)?0:f(t)},s.wbg.__wbg_createProgram_28f1378728397a46=function(e){var t=r(e).createProgram();return p(t)?0:f(t)},s.wbg.__wbg_createShader_f6da8384be38c095=function(e,t){var n=r(e).createShader(t>>>0);return p(n)?0:f(n)},s.wbg.__wbg_createTexture_be549d53d11ebf83=function(e){var t=r(e).createTexture();return p(t)?0:f(t)},s.wbg.__wbg_disable_b2672dfd98db0d2c=function(e,t){r(e).disable(t>>>0)},s.wbg.__wbg_disableVertexAttribArray_f5154961c6bbc61f=function(e,t){r(e).disableVertexAttribArray(t>>>0)},s.wbg.__wbg_drawElements_19a4ea67a2f14d44=function(e,t,n,i,o){r(e).drawElements(t>>>0,n,i>>>0,o)},s.wbg.__wbg_enable_9c5b69ae0579565d=function(e,t){r(e).enable(t>>>0)},s.wbg.__wbg_enableVertexAttribArray_eff1f71734ec0c24=function(e,t){r(e).enableVertexAttribArray(t>>>0)},s.wbg.__wbg_getAttribLocation_7321b82ba20f42ed=function(e,t,n,i){return r(e).getAttribLocation(r(t),l(n,i))},s.wbg.__wbg_getExtension_29e749f65dd345b5=function(){return T((function(e,t,n){var i=r(e).getExtension(l(t,n));return p(i)?0:f(i)}),arguments)},s.wbg.__wbg_getParameter_e02390c31b2aedb9=function(){return T((function(e,t){return f(r(e).getParameter(t>>>0))}),arguments)},s.wbg.__wbg_getProgramInfoLog_89c655cf7d3deb29=function(e,n,i){var o=r(n).getProgramInfoLog(r(i)),a=p(o)?0:g(o,t.__wbindgen_malloc,t.__wbindgen_realloc),s=_;h()[e/4+1]=s,h()[e/4+0]=a},s.wbg.__wbg_getProgramParameter_97fb617622a1e9c6=function(e,t,n){return f(r(e).getProgramParameter(r(t),n>>>0))},s.wbg.__wbg_getShaderInfoLog_8fbfc8052cd2a5c2=function(e,n,i){var o=r(n).getShaderInfoLog(r(i)),a=p(o)?0:g(o,t.__wbindgen_malloc,t.__wbindgen_realloc),s=_;h()[e/4+1]=s,h()[e/4+0]=a},s.wbg.__wbg_getUniformLocation_8ef86decd2ceb6a0=function(e,t,n,i){var o=r(e).getUniformLocation(r(t),l(n,i));return p(o)?0:f(o)},s.wbg.__wbg_linkProgram_b060b6f5c6419695=function(e,t){r(e).linkProgram(r(t))},s.wbg.__wbg_pixelStorei_1e9534b41710bd3f=function(e,t,n){r(e).pixelStorei(t>>>0,n)},s.wbg.__wbg_shaderSource_e00c8c2b41679a01=function(e,t,n,i){r(e).shaderSource(r(t),l(n,i))},s.wbg.__wbg_stencilFunc_eeb2374a49160e1e=function(e,t,n,i){r(e).stencilFunc(t>>>0,n,i>>>0)},s.wbg.__wbg_stencilMask_8383787c8968e634=function(e,t){r(e).stencilMask(t>>>0)},s.wbg.__wbg_stencilOp_d618117604d44e35=function(e,t,n,i){r(e).stencilOp(t>>>0,n>>>0,i>>>0)},s.wbg.__wbg_texParameteri_58c0d4e82f062e6f=function(e,t,n,i){r(e).texParameteri(t>>>0,n>>>0,i)},s.wbg.__wbg_uniform1f_affc2490c2cff524=function(e,t,n){r(e).uniform1f(r(t),n)},s.wbg.__wbg_uniform1i_584ce89a2fa7078d=function(e,t,n){r(e).uniform1i(r(t),n)},s.wbg.__wbg_useProgram_ad5593b87b2aec4f=function(e,t){r(e).useProgram(r(t))},s.wbg.__wbg_vertexAttribPointer_3e272f16a22bb68c=function(e,t,n,i,o,a,s){r(e).vertexAttribPointer(t>>>0,n,i>>>0,0!==o,a,s)},s.wbg.__wbg_viewport_40ac6422fa7e7109=function(e,t,n,i,o){r(e).viewport(t,n,i,o)},s.wbg.__wbg_debug_3c0b82934d1dd91e=function(e){console.debug(r(e))},s.wbg.__wbg_error_9ff84d33a850b1ef=function(e){console.error(r(e))},s.wbg.__wbg_info_3b2058a219fa31b9=function(e){console.info(r(e))},s.wbg.__wbg_log_386a8115a84a780d=function(e){console.log(r(e))},s.wbg.__wbg_warn_5fc232d538408d4a=function(e){console.warn(r(e))},s.wbg.__wbg_style_9290c51fe7cb7783=function(e){return f(r(e).style)},s.wbg.__wbg_newwithbuffersourcesequenceandoptions_689c4999a01e0d8c=function(){return T((function(e,t){return f(new Blob(r(e),r(t)))}),arguments)},s.wbg.__wbg_currentTarget_a3b06d00ff76859b=function(e){var t=r(e).currentTarget;return p(t)?0:f(t)},s.wbg.__wbg_preventDefault_19876bf3a4179b34=function(e){r(e).preventDefault()},s.wbg.__wbg_addEventListener_b334b84e6525699c=function(){return T((function(e,t,n,i){r(e).addEventListener(l(t,n),r(i))}),arguments)},s.wbg.__wbg_addEventListener_502683a26945b1a5=function(){return T((function(e,t,n,i,o){r(e).addEventListener(l(t,n),r(i),r(o))}),arguments)},s.wbg.__wbg_addEventListener_b88d8dd107ce2f39=function(){return T((function(e,t,n,i,o){r(e).addEventListener(l(t,n),r(i),0!==o)}),arguments)},s.wbg.__wbg_removeEventListener_380d0ebdf9cd12ba=function(){return T((function(e,t,n,i){r(e).removeEventListener(l(t,n),r(i))}),arguments)},s.wbg.__wbg_removeEventListener_1f30d3e3ef4ee58e=function(){return T((function(e,t,n,i,o){r(e).removeEventListener(l(t,n),r(i),0!==o)}),arguments)},s.wbg.__wbg_data_7db9e348ce1855fa=function(e,n){var i=function(e,t){const n=t(1*e.length);return u().set(e,n/1),_=e.length,n}(r(n).data,t.__wbindgen_malloc),o=_;h()[e/4+1]=o,h()[e/4+0]=i},s.wbg.__wbg_userAgent_89e0d93ea0bfe354=function(){return T((function(e,n){var i=g(r(n).userAgent,t.__wbindgen_malloc,t.__wbindgen_realloc),o=_;h()[e/4+1]=o,h()[e/4+0]=i}),arguments)},s.wbg.__wbg_instanceof_CanvasRenderingContext2d_eea9cd931eb496b7=function(e){return r(e)instanceof CanvasRenderingContext2D},s.wbg.__wbg_setglobalAlpha_6b6fb9a57a09df9d=function(e,t){r(e).globalAlpha=t},s.wbg.__wbg_setglobalCompositeOperation_e404daf7e6bb63e4=function(){return T((function(e,t,n){r(e).globalCompositeOperation=l(t,n)}),arguments)},s.wbg.__wbg_setstrokeStyle_72f1ad8117744d41=function(e,t){r(e).strokeStyle=r(t)},s.wbg.__wbg_setfillStyle_5306396b0368ba08=function(e,t){r(e).fillStyle=r(t)},s.wbg.__wbg_setfilter_fa947e793349a2de=function(e,t,n){r(e).filter=l(t,n)},s.wbg.__wbg_setlineWidth_9f25e0ceca65a4d7=function(e,t){r(e).lineWidth=t},s.wbg.__wbg_setlineCap_6c7169ac07a6349e=function(e,t,n){r(e).lineCap=l(t,n)},s.wbg.__wbg_setlineJoin_d6311997533dcdbf=function(e,t,n){r(e).lineJoin=l(t,n)},s.wbg.__wbg_setmiterLimit_cd181ac4dc64fc1d=function(e,t){r(e).miterLimit=t},s.wbg.__wbg_drawImage_ff0075aa41bc6155=function(){return T((function(e,t,n,i){r(e).drawImage(r(t),n,i)}),arguments)},s.wbg.__wbg_drawImage_b43cf9d292491493=function(){return T((function(e,t,n,i){r(e).drawImage(r(t),n,i)}),arguments)},s.wbg.__wbg_fill_a928208ebdb3fecc=function(e,t){r(e).fill(r(t))},s.wbg.__wbg_stroke_c19677a93050ef02=function(e,t){r(e).stroke(r(t))},s.wbg.__wbg_createPattern_a737181b452c0941=function(){return T((function(e,t,n,i){var o=r(e).createPattern(r(t),l(n,i));return p(o)?0:f(o)}),arguments)},s.wbg.__wbg_getImageData_6e56dc172cd2ed36=function(){return T((function(e,t,n,i,o){return f(r(e).getImageData(t,n,i,o))}),arguments)},s.wbg.__wbg_clearRect_dbb56982eff2a250=function(e,t,n,i,o){r(e).clearRect(t,n,i,o)},s.wbg.__wbg_fillRect_33b210367d4a0063=function(e,t,n,i,o){r(e).fillRect(t,n,i,o)},s.wbg.__wbg_resetTransform_09cd4a47a1d0fc9c=function(){return T((function(e){r(e).resetTransform()}),arguments)},s.wbg.__wbg_setTransform_36254c0c8f264eee=function(){return T((function(e,t,n,i,o,a,s){r(e).setTransform(t,n,i,o,a,s)}),arguments)},s.wbg.__wbg_randomFillSync_64cc7d048f228ca8=function(){return T((function(e,t,n){r(e).randomFillSync(N(t,n))}),arguments)},s.wbg.__wbg_getRandomValues_98117e9a7e993920=function(){return T((function(e,t){r(e).getRandomValues(r(t))}),arguments)},s.wbg.__wbg_process_2f24d6544ea7b200=function(e){return f(r(e).process)},s.wbg.__wbindgen_is_object=function(e){const t=r(e);return"object"==typeof t&&null!==t},s.wbg.__wbg_versions_6164651e75405d4a=function(e){return f(r(e).versions)},s.wbg.__wbg_node_4b517d861cbcb3bc=function(e){return f(r(e).node)},s.wbg.__wbg_crypto_98fc271021c7d2ad=function(e){return f(r(e).crypto)},s.wbg.__wbg_msCrypto_a2cdb043d2bfe57f=function(e){return f(r(e).msCrypto)},s.wbg.__wbg_modulerequire_3440a4bcf44437db=function(){return T((function(e,t){return f(d.require(l(e,t)))}),arguments)},s.wbg.__wbg_get_73c087db0a496c21=function(e,t){return f(r(e)[t>>>0])},s.wbg.__wbg_new_ec75d0d5815be736=function(){return f(new Array)},s.wbg.__wbg_newnoargs_1a11e7e8c906996c=function(e,t){return f(new Function(l(e,t)))},s.wbg.__wbg_next_f6ffce741b18af05=function(){return T((function(e){return f(r(e).next())}),arguments)},s.wbg.__wbg_done_1d79fc301127c139=function(e){return r(e).done},s.wbg.__wbg_value_4c025ad337ce3912=function(e){return f(r(e).value)},s.wbg.__wbg_get_6d26c712aa73c8b2=function(){return T((function(e,t){return f(Reflect.get(r(e),r(t)))}),arguments)},s.wbg.__wbg_call_e91f71ddf1f45cff=function(){return T((function(e,t){return f(r(e).call(r(t)))}),arguments)},s.wbg.__wbg_new_4b48f9f8159fea77=function(){return f(new Object)},s.wbg.__wbg_isArray_8c5958cbfaf9bb48=function(e){return Array.isArray(r(e))},s.wbg.__wbg_of_876160abee4f7934=function(e,t){return f(Array.of(r(e),r(t)))},s.wbg.__wbg_push_0daae9343162dbe7=function(e,t){return r(e).push(r(t))},s.wbg.__wbg_instanceof_ArrayBuffer_8431a1911282ee67=function(e){return r(e)instanceof ArrayBuffer},s.wbg.__wbg_new_a2c5b0bdc4e645fe=function(e){return f(new ArrayBuffer(e>>>0))},s.wbg.__wbg_slice_93c69bd892b5e800=function(e,t,n){return f(r(e).slice(t>>>0,n>>>0))},s.wbg.__wbg_values_3ecc6f723c37f081=function(e){return f(r(e).values())},s.wbg.__wbg_apply_86d95332399ce038=function(){return T((function(e,t,n){return f(r(e).apply(r(t),r(n)))}),arguments)},s.wbg.__wbg_call_e3c72355d091d5d4=function(){return T((function(e,t,n){return f(r(e).call(r(t),r(n)))}),arguments)},s.wbg.__wbg_getTime_223a3e3188667617=function(e){return r(e).getTime()},s.wbg.__wbg_getTimezoneOffset_b1626f6856267b2a=function(e){return r(e).getTimezoneOffset()},s.wbg.__wbg_new0_06175e996d76315f=function(){return f(new Date)},s.wbg.__wbg_instanceof_Object_c3a2e0ae84ee9d83=function(e){return r(e)instanceof Object},s.wbg.__wbg_entries_a3fad9ebd955672b=function(e){return f(Object.entries(r(e)))},s.wbg.__wbg_fromEntries_daab53f284229069=function(){return T((function(e){return f(Object.fromEntries(r(e)))}),arguments)},s.wbg.__wbg_is_50b1fea1dc5b6e28=function(e,t){return Object.is(r(e),r(t))},s.wbg.__wbg_resolve_7161ec6fd5b1cd29=function(e){return f(Promise.resolve(r(e)))},s.wbg.__wbg_then_6d5072fec3fdb237=function(e,t){return f(r(e).then(r(t)))},s.wbg.__wbg_then_4f3c7f6f3d36634a=function(e,t,n){return f(r(e).then(r(t),r(n)))},s.wbg.__wbg_self_b4546ea7b590539e=function(){return T((function(){return f(self.self)}),arguments)},s.wbg.__wbg_window_c279fea81f426a68=function(){return T((function(){return f(window.window)}),arguments)},s.wbg.__wbg_globalThis_038a6ea0ff17789f=function(){return T((function(){return f(globalThis.globalThis)}),arguments)},s.wbg.__wbg_global_4f93ce884bcee597=function(){return T((function(){return f(i.g.global)}),arguments)},s.wbg.__wbg_buffer_79a3294266d4e783=function(e){return f(r(e).buffer)},s.wbg.__wbg_newwithbyteoffsetandlength_22a36e6023ad3cd0=function(e,t,n){return f(new Uint8Array(r(e),t>>>0,n>>>0))},s.wbg.__wbg_new_945397fb09fec0b8=function(e){return f(new Uint8Array(r(e)))},s.wbg.__wbg_set_223873223acf6d07=function(e,t,n){r(e).set(r(t),n>>>0)},s.wbg.__wbg_length_68e13e7bbd918464=function(e){return r(e).length},s.wbg.__wbg_newwithlength_b7722b5594f1dc21=function(e){return f(new Uint8Array(e>>>0))},s.wbg.__wbg_fill_5f53806db2ee7a45=function(e,t,n,i){return f(r(e).fill(t,n>>>0,i>>>0))},s.wbg.__wbg_buffer_4c09b94094b6c48a=function(e){return f(r(e).buffer)},s.wbg.__wbg_subarray_466613921b2fc6db=function(e,t,n){return f(r(e).subarray(t>>>0,n>>>0))},s.wbg.__wbg_byteLength_e00cf4c7ebad38b5=function(e){return r(e).byteLength},s.wbg.__wbg_byteOffset_6f016df1cbf92532=function(e){return r(e).byteOffset},s.wbg.__wbg_ownKeys_1e941d117f37bfa7=function(){return T((function(e){return f(Reflect.ownKeys(r(e)))}),arguments)},s.wbg.__wbg_set_d29a397c9cc5d746=function(){return T((function(e,t,n){return Reflect.set(r(e),r(t),r(n))}),arguments)},s.wbg.__wbindgen_number_get=function(e,n){const i=r(n);var o="number"==typeof i?i:void 0;(null!==m&&m.buffer===t.memory.buffer||(m=new Float64Array(t.memory.buffer)),m)[e/8+1]=p(o)?0:o,h()[e/4+0]=!p(o)},s.wbg.__wbindgen_is_string=function(e){return"string"==typeof r(e)},s.wbg.__wbindgen_string_get=function(e,n){const i=r(n);var o="string"==typeof i?i:void 0,a=p(o)?0:g(o,t.__wbindgen_malloc,t.__wbindgen_realloc),s=_;h()[e/4+1]=s,h()[e/4+0]=a},s.wbg.__wbindgen_boolean_get=function(e){const t=r(e);return"boolean"==typeof t?t?1:0:2},s.wbg.__wbindgen_debug_string=function(e,n){var i=g(y(r(n)),t.__wbindgen_malloc,t.__wbindgen_realloc),o=_;h()[e/4+1]=o,h()[e/4+0]=i},s.wbg.__wbindgen_throw=function(e,t){throw new Error(l(e,t))},s.wbg.__wbindgen_rethrow=function(e){throw a(e)},s.wbg.__wbindgen_memory=function(){return f(t.memory)},s.wbg.__wbindgen_closure_wrapper412=function(e,t,n){return f(v(e,t,4,x))},s.wbg.__wbindgen_closure_wrapper414=function(e,t,n){return f(v(e,t,4,k))},s.wbg.__wbindgen_closure_wrapper416=function(e,t,n){return f(v(e,t,4,E))},s.wbg.__wbindgen_closure_wrapper418=function(e,t,n){return f(v(e,t,4,C))},s.wbg.__wbindgen_closure_wrapper420=function(e,t,n){return f(v(e,t,4,S))},s.wbg.__wbindgen_closure_wrapper422=function(e,t,n){return f(v(e,t,4,I))},s.wbg.__wbindgen_closure_wrapper424=function(e,t,n){return f(v(e,t,4,A))},s.wbg.__wbindgen_closure_wrapper426=function(e,t,n){return f(v(e,t,4,R))},s.wbg.__wbindgen_closure_wrapper1834=function(e,t,n){return f(v(e,t,885,F))},("string"==typeof o||"function"==typeof Request&&o instanceof Request||"function"==typeof URL&&o instanceof URL)&&(o=fetch(o));const{instance:c,module:d}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;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)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await o,s);return t=c.exports,n.__wbindgen_wasm_module=d,t};function U(e){const t="function"==typeof Function.prototype.toString?Function.prototype.toString():null;return"string"==typeof t&&t.indexOf("[native code]")>=0&&Function.prototype.toString.call(e).indexOf("[native code]")>=0}let B=null;function V(){return null==B&&(B=function(){return e=this,t=void 0,r=function*(){"function"==typeof Array.prototype.reduce&&U(Array.prototype.reduce)||Object.defineProperty(Array.prototype,"reduce",{value(...e){if(0===e.length&&window.Prototype&&window.Prototype.Version&&window.Prototype.Version<"1.6.1")return this.length>1?this:this[0];const t=e[0];if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(`${t} is not a function`);const n=Object(this),r=n.length>>>0;let i,o=0;if(e.length>=2)i=e[1];else{for(;o=r)throw new TypeError("Reduce of empty array with no initial value");i=n[o++]}for(;oe[t]}),"function"!=typeof Reflect.set&&Object.defineProperty(Reflect,"set",{value(e,t,n){e[t]=n}});const e=yield Promise.resolve().then(i.t.bind(i,903,17));return yield W(e.default),D},new((n=void 0)||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}()),B}class ${constructor(e){if(this.__mimetypes=[],this.__named_mimetypes={},e)for(let t=0;t\n :host {\n --ruffle-blue: #37528c;\n --ruffle-orange: #ffad33;\n\n display: inline-block;\n position: relative;\n /* Default width/height; this will get overridden by user styles/attributes. */\n width: 550px;\n height: 400px;\n font-family: Arial, sans-serif;\n letter-spacing: 0.4px;\n touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n -webkit-tap-highlight-color: transparent;\n }\n\n /* Ruffle\'s width/height CSS interferes Safari fullscreen CSS. */\n /* Ensure that Safari\'s fullscreen mode actually fills the screen. */\n :host(:-webkit-full-screen) {\n display: block;\n width: 100% !important;\n height: 100% !important;\n }\n\n /* All of these use the dimensions specified by the embed. */\n #container,\n #play_button,\n #unmute_overlay,\n #unmute_overlay .background,\n #panic,\n #message_overlay {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n #container {\n overflow: hidden;\n }\n\n #container canvas {\n width: 100%;\n height: 100%;\n }\n\n #play_button,\n #unmute_overlay {\n cursor: pointer;\n display: none;\n }\n\n #unmute_overlay .background {\n background: black;\n opacity: 0.7;\n }\n\n #play_button .icon,\n #unmute_overlay .icon {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50%;\n height: 50%;\n max-width: 384px;\n max-height: 384px;\n transform: translate(-50%, -50%);\n opacity: 0.8;\n }\n\n #play_button:hover .icon,\n #unmute_overlay:hover .icon {\n opacity: 1;\n }\n\n #panic {\n font-size: 20px;\n text-align: center;\n /* Inverted colors from play button! */\n background: linear-gradient(180deg, #fd3a40 0%, #fda138 100%);\n color: white;\n display: flex;\n flex-flow: column;\n justify-content: space-around;\n }\n\n #panic a {\n color: var(--ruffle-blue);\n font-weight: bold;\n }\n\n #panic-title {\n font-size: xxx-large;\n font-weight: bold;\n }\n\n #panic-body.details {\n flex: 0.9;\n margin: 0 10px;\n }\n\n #panic-body textarea {\n width: 100%;\n height: 100%;\n resize: none;\n }\n\n #panic ul {\n padding: 0;\n display: flex;\n list-style-type: none;\n justify-content: space-evenly;\n }\n\n #message_overlay {\n position: absolute;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n opacity: 1;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n }\n\n #message_overlay .message {\n text-align: center;\n max-height: 100%;\n max-width: 100%;\n padding: 5%;\n }\n\n #message_overlay p {\n margin: 0.5em 0;\n }\n\n #message_overlay .message div {\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n column-gap: 1em;\n }\n\n #message_overlay a, #message_overlay button {\n cursor: pointer;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n border: 2px solid var(--ruffle-orange);\n font-weight: bold;\n font-size: 1.25em;\n border-radius: 0.6em;\n padding: 10px;\n text-decoration: none;\n margin: 2% 0;\n }\n\n #message_overlay a:hover, #message_overlay button:hover {\n background: #ffffff4c;\n }\n\n #continue-btn {\n cursor: pointer;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n border: 2px solid var(--ruffle-orange);\n font-weight: bold;\n font-size: 20px;\n border-radius: 20px;\n padding: 10px;\n }\n\n #continue-btn:hover {\n background: #ffffff4c;\n }\n\n #context-menu {\n display: none;\n color: black;\n background: #fafafa;\n border: 1px solid gray;\n box-shadow: 0px 5px 10px -5px black;\n position: absolute;\n font-size: 14px;\n text-align: left;\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n #context-menu .menu_item {\n padding: 5px 10px;\n cursor: pointer;\n color: black;\n }\n\n #context-menu .menu_item.disabled {\n cursor: default;\n color: gray;\n }\n\n #context-menu .menu_item:not(.disabled):hover {\n background: lightgray;\n }\n\n #context-menu .menu_separator hr {\n border: none;\n border-bottom: 1px solid lightgray;\n margin: 2px;\n }\n \n \n\n
\n
\n
Click to unmute
\n
\n\n
    \n';const G={};function Y(e,t){if(void 0!==G[e]){if(G[e].class!==t)throw new Error("Internal naming conflict on "+e);return G[e].name}let n=0;if(void 0!==window.customElements)for(;n<999;){let r=e;if(n>0&&(r=r+"-"+n),void 0===window.customElements.get(r))return window.customElements.define(r,t),G[e]={class:t,name:r,internalName:e},r;n+=1}throw new Error("Failed to assign custom element "+e)}var X,K,Q,Z;!function(e){e.On="on",e.Off="off",e.Auto="auto"}(X||(X={})),function(e){e.Off="off",e.Fullscreen="fullscreen",e.On="on"}(K||(K={})),function(e){e.Visible="visible",e.Hidden="hidden"}(Q||(Q={})),function(e){e.Error="error",e.Warn="warn",e.Info="info",e.Debug="debug",e.Trace="trace"}(Z||(Z={}));var ee=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const te="application/x-shockwave-flash",ne="application/futuresplash",re="application/x-shockwave-flash2-preview",ie="application/vnd.adobe.flash-movie",oe="https://ruffle.rs",ae=/^\s*(\d+(\.\d+)?(%)?)/;var se,ce;function ue(e){if(null==e)return{};e instanceof URLSearchParams||(e=new URLSearchParams(e));const t={};for(const[n,r]of e)t[n]=r.toString();return t}!function(e){e[e.Unknown=0]="Unknown",e[e.CSPConflict=1]="CSPConflict",e[e.FileProtocol=2]="FileProtocol",e[e.InvalidWasm=3]="InvalidWasm",e[e.JavascriptConfiguration=4]="JavascriptConfiguration",e[e.JavascriptConflict=5]="JavascriptConflict",e[e.WasmCors=6]="WasmCors",e[e.WasmDownload=7]="WasmDownload",e[e.WasmMimeType=8]="WasmMimeType",e[e.WasmNotFound=9]="WasmNotFound",e[e.SwfFetchError=10]="SwfFetchError"}(se||(se={}));class le extends HTMLElement{constructor(){return super(),this.hasContextMenu=!1,this.contextMenuForceDisabled=!1,this.isTouch=!1,this.panicked=!1,this.isExtension=!1,this.config={},this.shadow=this.attachShadow({mode:"open"}),this.shadow.appendChild(J.content.cloneNode(!0)),this.dynamicStyles=this.shadow.getElementById("dynamic_styles"),this.container=this.shadow.getElementById("container"),this.playButton=this.shadow.getElementById("play_button"),this.playButton&&this.playButton.addEventListener("click",(()=>this.play())),this.unmuteOverlay=this.shadow.getElementById("unmute_overlay"),this.contextMenuElement=this.shadow.getElementById("context-menu"),this.addEventListener("contextmenu",this.showContextMenu.bind(this)),this.addEventListener("pointerdown",this.pointerDown.bind(this)),window.addEventListener("click",this.hideContextMenu.bind(this)),this.instance=null,this.options=null,this.onFSCommand=null,this._readyState=ce.HaveNothing,this._metadata=null,this.ruffleConstructor=V(),this.lastActivePlayingState=!1,this.setupPauseOnTabHidden(),this}get readyState(){return this._readyState}get metadata(){return this._metadata}setupPauseOnTabHidden(){document.addEventListener("visibilitychange",(()=>{this.instance&&(document.hidden&&(this.lastActivePlayingState=this.instance.is_playing(),this.instance.pause()),document.hidden||!0!==this.lastActivePlayingState||this.instance.play())}),!1)}connectedCallback(){this.updateStyles()}static get observedAttributes(){return["width","height"]}attributeChangedCallback(e,t,n){"width"!==e&&"height"!==e||this.updateStyles()}disconnectedCallback(){this.destroy()}updateStyles(){if(this.dynamicStyles.sheet){if(this.dynamicStyles.sheet.rules)for(let e=0;e{if(console.error(`Serious error loading Ruffle: ${e}`),"file:"===window.location.protocol)e.ruffleIndexError=se.FileProtocol;else{e.ruffleIndexError=se.WasmNotFound;const t=String(e.message).toLowerCase();t.includes("mime")?e.ruffleIndexError=se.WasmMimeType:t.includes("networkerror")||t.includes("failed to fetch")?e.ruffleIndexError=se.WasmCors:t.includes("disallowed by embedder")?e.ruffleIndexError=se.CSPConflict:"CompileError"===e.name?e.ruffleIndexError=se.InvalidWasm:t.includes("could not download wasm module")&&"TypeError"===e.name?e.ruffleIndexError=se.WasmDownload:"TypeError"===e.name&&(e.ruffleIndexError=se.JavascriptConflict)}throw this.panic(e),e}));this.instance=new n(this.container,this,e),console.log("New Ruffle instance created."),"running"!==this.audioState()&&(this.container.style.visibility="hidden",yield new Promise((e=>{window.setTimeout((()=>{e()}),200)})),this.container.style.visibility="");const r=Object.values(Object(X)).includes(e.autoplay)?e.autoplay:X.Auto,i=Object.values(Object(Q)).includes(e.unmuteOverlay)?e.unmuteOverlay:Q.Visible;if(r==X.On||r==X.Auto&&"running"===this.audioState()){if(this.play(),"running"!==this.audioState()){i===Q.Visible&&(this.unmuteOverlay.style.display="block"),this.container.addEventListener("click",this.unmuteOverlayClicked.bind(this),{once:!0});const e=null===(t=this.instance)||void 0===t?void 0:t.audio_context();e&&(e.onstatechange=()=>{"running"===e.state&&this.unmuteOverlayClicked(),e.onstatechange=null})}}else this.playButton.style.display="block"}))}destroy(){this.instance&&(this.instance.destroy(),this.instance=null,this._metadata=null,this._readyState=ce.HaveNothing,console.log("Ruffle instance destroyed."))}load(e){var t,n;return ee(this,void 0,void 0,(function*(){let r="";switch(typeof e){case"string":e={url:e};break;case"object":null===e?r="Argument 0 must be a string or object":"url"in e||"data"in e?"url"in e&&"string"!=typeof e.url&&(r="`url` must be a string"):r="Argument 0 must contain a `url` or `data` key";break;default:r="Argument 0 must be a string or object"}if(r.length>0){const e=new TypeError(r);throw e.ruffleIndexError=se.JavascriptConfiguration,this.panic(e),e}if(this.isConnected&&!this.isUnusedFallbackObject())try{const r=Object.assign(Object.assign(Object.assign({},null!==(n=null===(t=window.RufflePlayer)||void 0===t?void 0:t.config)&&void 0!==n?n:{}),this.config),e);if(r.allowScriptAccess=e.allowScriptAccess,this.options=e,this.hasContextMenu=!1!==r.contextMenu,r.backgroundColor&&(this.container.style.backgroundColor=r.backgroundColor),yield this.ensureFreshInstance(r),"url"in e){console.log(`Loading SWF file ${e.url}`);try{this.swfUrl=new URL(e.url,document.location.href).href}catch(t){this.swfUrl=e.url}const t=Object.assign(Object.assign({},ue(e.url.substring(e.url.indexOf("?")))),ue(e.parameters));this.instance.stream_from(e.url,t)}else"data"in e&&(console.log("Loading SWF data"),this.instance.load_data(new Uint8Array(e.data),ue(e.parameters)))}catch(e){throw console.error(`Serious error occurred loading SWF file: ${e}`),e}else console.warn("Ignoring attempt to play a disconnected or suspended Ruffle element")}))}play(){this.instance&&(this.instance.play(),this.playButton&&(this.playButton.style.display="none"))}get fullscreenEnabled(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}get isFullscreen(){return(document.fullscreenElement||document.webkitFullscreenElement)===this}enterFullscreen(){const e={navigationUI:"hide"};this.requestFullscreen?this.requestFullscreen(e):this.webkitRequestFullscreen?this.webkitRequestFullscreen(e):this.webkitRequestFullScreen&&this.webkitRequestFullScreen(e)}exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}pointerDown(e){"touch"!==e.pointerType&&"pen"!==e.pointerType||(this.isTouch=!0)}contextMenuItems(){const e=String.fromCharCode(10003),t=[];this.instance&&this.instance.prepare_context_menu().forEach(((n,r)=>{n.separatorBefore&&t.push(null),t.push({text:n.caption+(n.checked?` (${e})`:""),onClick:()=>{var e;return null===(e=this.instance)||void 0===e?void 0:e.run_context_menu_callback(r)},enabled:n.enabled})})),t.push(null),this.fullscreenEnabled&&(this.isFullscreen?t.push({text:"Exit fullscreen",onClick:this.exitFullscreen.bind(this)}):t.push({text:"Enter fullscreen",onClick:this.enterFullscreen.bind(this)})),t.push(null);const n=this.isExtension?"extension":"";return t.push({text:`About Ruffle ${n} (nightly 2021-08-27)`,onClick(){window.open(oe,"_blank")}}),this.isTouch&&(t.push(null),t.push({text:"Hide this menu",onClick:()=>this.contextMenuForceDisabled=!0})),t}showContextMenu(e){if(e.preventDefault(),!this.hasContextMenu||this.contextMenuForceDisabled)return;for(;this.contextMenuElement.firstChild;)this.contextMenuElement.removeChild(this.contextMenuElement.firstChild);for(const e of this.contextMenuItems())if(null===e){if(!this.contextMenuElement.lastElementChild)continue;if(this.contextMenuElement.lastElementChild.classList.contains("menu_separator"))continue;const e=document.createElement("li");e.className="menu_separator";const t=document.createElement("hr");e.appendChild(t),this.contextMenuElement.appendChild(e)}else{const{text:t,onClick:n,enabled:r}=e,i=document.createElement("li");i.className="menu_item",i.textContent=t,this.contextMenuElement.appendChild(i),!1!==r?i.addEventListener("click",n):i.classList.add("disabled")}this.contextMenuElement.style.left="0",this.contextMenuElement.style.top="0",this.contextMenuElement.style.display="block";const t=this.getBoundingClientRect(),n=e.clientX-t.x,r=e.clientY-t.y,i=t.width-this.contextMenuElement.clientWidth-1,o=t.height-this.contextMenuElement.clientHeight-1;this.contextMenuElement.style.left=Math.floor(Math.min(n,i))+"px",this.contextMenuElement.style.top=Math.floor(Math.min(r,o))+"px"}hideContextMenu(){var e;null===(e=this.instance)||void 0===e||e.clear_custom_menu_items(),this.contextMenuElement.style.display="none"}pause(){this.instance&&(this.instance.pause(),this.playButton&&(this.playButton.style.display="block"))}audioState(){if(this.instance){const e=this.instance.audio_context();return e&&e.state||"running"}return"suspended"}unmuteOverlayClicked(){if(this.instance){if("running"!==this.audioState()){const e=this.instance.audio_context();e&&e.resume()}this.unmuteOverlay&&(this.unmuteOverlay.style.display="none")}}copyElement(e){if(e){for(let t=0;tnull==t?void 0:t.call_exposed_callback(e,n)}set traceObserver(e){var t;null===(t=this.instance)||void 0===t||t.set_trace_observer(e)}panic(e){var t;if(this.panicked)return;if(this.panicked=!0,e instanceof Error&&("AbortError"===e.name||e.message.includes("AbortError")))return;const n=null!==(t=null==e?void 0:e.ruffleIndexError)&&void 0!==t?t:se.Unknown,r=Object.assign([],{stackIndex:-1});if(r.push("# Error Info\n"),e instanceof Error){if(r.push(`Error name: ${e.name}\n`),r.push(`Error message: ${e.message}\n`),e.stack){const t=r.push(`Error stack:\n\`\`\`\n${e.stack}\n\`\`\`\n`)-1;r.stackIndex=t}}else r.push(`Error: ${e}\n`);r.push("\n# Player Info\n"),r.push(this.debugPlayerInfo()),r.push("\n# Page Info\n"),r.push(`Page URL: ${document.location.href}\n`),this.swfUrl&&r.push(`SWF URL: ${this.swfUrl}\n`),r.push("\n# Browser Info\n"),r.push(`Useragent: ${window.navigator.userAgent}\n`),r.push(`OS: ${window.navigator.platform}\n`),r.push("\n# Ruffle Info\n"),r.push("Version: 0.1.0\n"),r.push("Name: nightly 2021-08-27\n"),r.push("Channel: nightly\n"),r.push("Built: 2021-08-27T00:10:47.557Z\n"),r.push("Commit: b5ee94aff1ea6c036a174456680733e2709e91d0\n"),r.push(`Is extension: ${this.isExtension}\n`);const i=r.join(""),o=document.location.href.split(/[?#]/)[0];let a,s,c=`https://github.com/ruffle-rs/ruffle/issues/new?title=${encodeURIComponent(`Error on ${o}`)}&body=`,u=encodeURIComponent(i);switch(r.stackIndex>-1&&String(c+u).length>8195&&(r[r.stackIndex]=null,u=encodeURIComponent(r.join(""))),c+=u,n){case se.FileProtocol:a='\n

    It appears you are running Ruffle on the "file:" protocol.

    \n

    This doesn\'t work as browsers block many features from working for security reasons.

    \n

    Instead, we invite you to setup a local server or either use the web demo or the desktop application.

    \n ',s=`\n
  • Web Demo
  • \n
  • Desktop Application
  • \n `;break;case se.JavascriptConfiguration:a="\n

    Ruffle has encountered a major issue due to an incorrect JavaScript configuration.

    \n

    If you are the server administrator, we invite you to check the error details to find out which parameter is at fault.

    \n

    You can also consult the Ruffle wiki for help.

    \n ",s='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case se.WasmNotFound:a='\n

    Ruffle failed to load the required ".wasm" file component.

    \n

    If you are the server administrator, please ensure the file has correctly been uploaded.

    \n

    If the issue persists, you may need to use the "publicPath" setting: please consult the Ruffle wiki for help.

    \n ',s='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case se.WasmMimeType:a='\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This web server is not serving ".wasm" files with the correct MIME type.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ',s='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case se.SwfFetchError:a="\n

    Ruffle failed to load the Flash SWF file.

    \n

    The most likely reason is that the file no longer exists, so there is nothing for Ruffle to load.

    \n

    Try contacting the website administrator for help.

    \n ",s='\n
  • View Error Details
  • \n ';break;case se.WasmCors:a='\n

    Ruffle failed to load the required ".wasm" file component.

    \n

    Access to fetch has likely been blocked by CORS policy.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ',s='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case se.InvalidWasm:a="\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    It seems like this page has missing or invalid files for running Ruffle.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ",s='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case se.WasmDownload:a="\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This can often resolve itself, so you can try reloading the page.

    \n

    Otherwise, please contact the website administrator.

    \n ",s='\n
  • View Error Details
  • \n ';break;case se.JavascriptConflict:a="\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    It seems like this page uses JavaScript code that conflicts with Ruffle.

    \n

    If you are the server administrator, we invite you to try loading the file on a blank page.

    \n ",s=`\n
  • Report Bug
  • \n
  • View Error Details
  • \n `;break;case se.CSPConflict:a='\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This web server\'s Content Security Policy does not allow the required ".wasm" component to run.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ',s='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;default:a="\n

    Ruffle has encountered a major issue whilst trying to display this Flash content.

    \n

    This isn't supposed to happen, so we'd really appreciate if you could file a bug!

    \n ",s=`\n
  • Report Bug
  • \n
  • View Error Details
  • \n `}this.container.innerHTML=`\n
    \n
    Something went wrong :(
    \n
    ${a}
    \n \n
    \n `;const l=this.container.querySelector("#panic-view-details");l&&(l.onclick=()=>{const e=this.container.querySelector("#panic-body");return e.classList.add("details"),e.innerHTML=``,!1}),this.destroy()}displayRootMovieDownloadFailedMessage(){const e=new URL(this.swfUrl);if(window.location.origin==e.origin||!this.isExtension||!window.location.protocol.includes("http")){const e=new Error("Failed to fetch: "+this.swfUrl);return e.ruffleIndexError=se.SwfFetchError,void this.panic(e)}const t=document.createElement("div");t.id="message_overlay",t.innerHTML=`
    \n

    Ruffle wasn't able to run the Flash embedded in this page.

    \n

    You can try to open the file in a separate tab, to sidestep this issue.

    \n \n
    `,this.container.prepend(t)}displayUnsupportedMessage(){const e=document.createElement("div");e.id="message_overlay",e.innerHTML='
    \n

    Flash Player has been removed from browsers in 2021.

    \n

    This content is not yet supported by the Ruffle emulator and will likely not run as intended.

    \n
    \n More info\n \n
    \n
    ',this.container.prepend(e),e.querySelector("#run-anyway-btn").onclick=()=>{e.parentNode.removeChild(e)}}displayMessage(e){const t=document.createElement("div");t.id="message_overlay",t.innerHTML=`
    \n

    ${e}

    \n
    \n \n
    \n
    `,this.container.prepend(t),this.container.querySelector("#continue-btn").onclick=()=>{t.parentNode.removeChild(t)}}debugPlayerInfo(){var e,t;return`Allows script access: ${null!==(t=null===(e=this.options)||void 0===e?void 0:e.allowScriptAccess)&&void 0!==t&&t}\n`}setMetadata(e){this._metadata=e,this._readyState=ce.Loaded,this.dispatchEvent(new Event(le.LOADED_METADATA)),this.dispatchEvent(new Event(le.LOADED_DATA))}setIsExtension(e){this.isExtension=e}}function fe(e,t){switch(e||(e="sameDomain"),e.toLowerCase()){case"always":return!0;case"never":return!1;case"samedomain":default:try{return new URL(window.location.href).origin===new URL(t,window.location.href).origin}catch(e){return!1}}}function _e(e){if(e){let t="";try{t=new URL(e,oe).pathname}catch(e){}if(t&&t.length>=4){const e=t.slice(-4).toLowerCase();if(".swf"===e||".spl"===e)return!0}}return!1}le.LOADED_METADATA="loadedmetadata",le.LOADED_DATA="loadeddata",function(e){e[e.HaveNothing=0]="HaveNothing",e[e.Loading=1]="Loading",e[e.Loaded=2]="Loaded"}(ce||(ce={}));class de extends le{constructor(){super()}connectedCallback(){var e,t,n,r,i;super.connectedCallback();const o=this.attributes.getNamedItem("src");if(o){const a=null!==(t=null===(e=this.attributes.getNamedItem("allowScriptAccess"))||void 0===e?void 0:e.value)&&void 0!==t?t:null;this.load({url:o.value,allowScriptAccess:fe(a,o.value),parameters:null===(n=this.attributes.getNamedItem("flashvars"))||void 0===n?void 0:n.value,backgroundColor:null===(r=this.attributes.getNamedItem("bgcolor"))||void 0===r?void 0:r.value,base:null===(i=this.attributes.getNamedItem("base"))||void 0===i?void 0:i.value})}}get src(){var e;return null===(e=this.attributes.getNamedItem("src"))||void 0===e?void 0:e.value}set src(e){if(null!=e){const t=document.createAttribute("src");t.value=e,this.attributes.setNamedItem(t)}else this.attributes.removeNamedItem("src")}static get observedAttributes(){return["src","width","height"]}attributeChangedCallback(e,t,n){var r;if(super.attributeChangedCallback(e,t,n),this.isConnected&&"src"===e){let e;const t=this.attributes.getNamedItem("flashvars");t&&(e=t.value);const n=this.attributes.getNamedItem("src");n&&this.load({url:n.value,parameters:e,base:null===(r=this.attributes.getNamedItem("base"))||void 0===r?void 0:r.value})}}static isInterdictable(e){var t;if(!e.getAttribute("src"))return!1;const n=null===(t=e.getAttribute("type"))||void 0===t?void 0:t.toLowerCase();return n===te.toLowerCase()||n===ne.toLowerCase()||n===re.toLowerCase()||n===ie.toLowerCase()||(null==n||""===n)&&_e(e.getAttribute("src"))}static fromNativeEmbedElement(e){const t=Y("ruffle-embed",de),n=document.createElement(t);return n.copyElement(e),n}}function be(e,t,n){t=t.toLowerCase();for(const n in e)if(Object.hasOwnProperty.call(e,n)&&t===n.toLowerCase())return e[n];return n}function ge(e){var t,n;const r={};for(const i of e.children)if(i instanceof HTMLParamElement){const e=null===(t=i.attributes.getNamedItem("name"))||void 0===t?void 0:t.value,o=null===(n=i.attributes.getNamedItem("value"))||void 0===n?void 0:n.value;e&&o&&(r[e]=o)}return r}class we extends le{constructor(){super(),this.params={}}connectedCallback(){var e;super.connectedCallback(),this.params=ge(this);let t=null;this.attributes.getNamedItem("data")?t=null===(e=this.attributes.getNamedItem("data"))||void 0===e?void 0:e.value:this.params.movie&&(t=this.params.movie);const n=be(this.params,"allowScriptAccess",null),r=be(this.params,"flashvars",this.getAttribute("flashvars")),i=be(this.params,"bgcolor",this.getAttribute("bgcolor")),o=be(this.params,"base",this.getAttribute("base"));if(t){const e={url:t};e.allowScriptAccess=fe(n,t),r&&(e.parameters=r),i&&(e.backgroundColor=i),o&&(e.base=o),this.load(e)}}debugPlayerInfo(){var e;let t=super.debugPlayerInfo();t+="Player type: Object\n";let n=null;return this.attributes.getNamedItem("data")?n=null===(e=this.attributes.getNamedItem("data"))||void 0===e?void 0:e.value:this.params.movie&&(n=this.params.movie),t+=`SWF URL: ${n}\n`,Object.keys(this.params).forEach((e=>{t+=`Param ${e}: ${this.params[e]}\n`})),Object.keys(this.attributes).forEach((e=>{var n;t+=`Attribute ${e}: ${null===(n=this.attributes.getNamedItem(e))||void 0===n?void 0:n.value}\n`})),t}get data(){return this.getAttribute("data")}set data(e){if(null!=e){const t=document.createAttribute("data");t.value=e,this.attributes.setNamedItem(t)}else this.attributes.removeNamedItem("data")}static isInterdictable(e){var t,n,r;if(e.getElementsByTagName("ruffle-embed").length>0)return!1;const i=null===(t=e.attributes.getNamedItem("data"))||void 0===t?void 0:t.value.toLowerCase(),o=ge(e);let a;if(i)a=_e(i);else{if(!o||!o.movie)return!1;a=_e(o.movie)}const s=null===(n=e.attributes.getNamedItem("classid"))||void 0===n?void 0:n.value.toLowerCase();if(s==="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000".toLowerCase())return!Array.from(e.getElementsByTagName("embed")).some(de.isInterdictable);if(null!=s&&""!==s)return!1;const c=null===(r=e.attributes.getNamedItem("type"))||void 0===r?void 0:r.value.toLowerCase();return c===te.toLowerCase()||c===ne.toLowerCase()||c===re.toLowerCase()||c===ie.toLowerCase()||(null==c||""===c)&&a}static fromNativeObjectElement(e){const t=Y("ruffle-object",we),n=document.createElement(t);for(const t of Array.from(e.getElementsByTagName("embed")))de.isInterdictable(t)&&t.remove();for(const t of Array.from(e.getElementsByTagName("object")))we.isInterdictable(t)&&t.remove();return n.copyElement(e),n}}function he(e,t){let n="";if(void 0!==e&&void 0!==e.publicPaths&&void 0!==e.publicPaths[t])n=e.publicPaths[t];else if(void 0!==e&&void 0!==e.publicPath)n=e.publicPath;else if(void 0!==document.currentScript&&null!==document.currentScript&&"src"in document.currentScript&&""!==document.currentScript.src)try{n=new URL(".",document.currentScript.src).href}catch(e){console.warn("Unable to get currentScript URL")}return""===n||n.endsWith("/")||(n+="/"),n}var pe,me;let ye;const ve=null!==(me=null===(pe=window.RufflePlayer)||void 0===pe?void 0:pe.config)&&void 0!==me?me:{},xe=he(ve,"ruffle.js")+"ruffle.js";let ke,Ee,Ce,Se;function Ie(){try{ke=null!=ke?ke:document.getElementsByTagName("object"),Ee=null!=Ee?Ee:document.getElementsByTagName("embed");for(const e of Array.from(ke))if(we.isInterdictable(e)){const t=we.fromNativeObjectElement(e);t.setIsExtension(ye),e.replaceWith(t)}for(const e of Array.from(Ee))if(de.isInterdictable(e)){const t=de.fromNativeEmbedElement(e);t.setIsExtension(ye),e.replaceWith(t)}}catch(e){console.error(`Serious error encountered when polyfilling native Flash elements: ${e}`)}}function Ae(){Ce=null!=Ce?Ce:document.getElementsByTagName("iframe"),Se=null!=Se?Se:document.getElementsByTagName("frame"),[Ce,Se].forEach((e=>{for(let t=0;t{Re(r,i)}),!1)}}))}function Re(e,t){var n,r,i,o,a;return r=this,i=void 0,a=function*(){let r;yield new Promise((e=>{window.setTimeout((()=>{e()}),100)}));try{if(r=e.document,!r)return}catch(e){return void(ye||console.warn(t+e))}if(ye||void 0===r.documentElement.dataset.ruffleOptout)if(ye)e.RufflePlayer||(e.RufflePlayer={}),e.RufflePlayer.config=Object.assign(Object.assign({},ve),null!==(n=e.RufflePlayer.config)&&void 0!==n?n:{});else if(!e.RufflePlayer){const t=r.createElement("script");t.setAttribute("src",xe),t.onload=()=>{e.RufflePlayer={},e.RufflePlayer.config=ve},r.head.appendChild(t)}},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{c(a.next(e))}catch(e){t(e)}}function s(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}c((a=a.apply(r,i||[])).next())}))}class Fe{constructor(e,t,n,r,i){this.major=e,this.minor=t,this.patch=n,this.prIdent=r,this.buildIdent=i}static fromSemver(e){const t=e.split("+"),n=t[0].split("-"),r=n[0].split("."),i=parseInt(r[0],10);let o=0,a=0,s=null,c=null;return null!=r[1]&&(o=parseInt(r[1],10)),null!=r[2]&&(a=parseInt(r[2],10)),null!=n[1]&&(s=n[1].split(".")),null!=t[1]&&(c=t[1].split(".")),new Fe(i,o,a,s,c)}isCompatibleWith(e){return 0!==this.major&&this.major===e.major||0===this.major&&0===e.major&&0!==this.minor&&this.minor===e.minor||0===this.major&&0===e.major&&0===this.minor&&0===e.minor&&0!==this.patch&&this.patch===e.patch}hasPrecedenceOver(e){if(this.major>e.major)return!0;if(this.majore.minor)return!0;if(this.minore.patch)return!0;if(this.patchparseInt(e.prIdent[n],10))return!0;if(parseInt(this.prIdent[n],10)e.prIdent[n])return!0;if(this.prIdent[n]e.prIdent.length}return!1}isEqual(e){return this.major===e.major&&this.minor===e.minor&&this.patch===e.patch}isStableOrCompatiblePrerelease(e){return null==e.prIdent||this.major===e.major&&this.minor===e.minor&&this.patch===e.patch}}class Pe{constructor(e){this.requirements=e}satisfiedBy(e){for(let t=0;t"===i?n=n&&e.hasPrecedenceOver(o):">="===i?n=n&&(e.hasPrecedenceOver(o)||o.isEqual(e)):"<"===i?n=n&&o.hasPrecedenceOver(e):"<="===i?n=n&&(o.hasPrecedenceOver(e)||o.isEqual(e)):"^"===i&&(n=n&&o.isCompatibleWith(e))}if(n)return!0}return!1}static fromRequirementString(e){const t=e.split(" ");let n=[];const r=[];for(let e=0;e0&&(r.push(n),n=[]);else if(t[e].length>0){const r=/[0-9]/.exec(t[e]);if(r){const i=t[e].slice(0,r.index).trim(),o=Fe.fromSemver(t[e].slice(r.index).trim());n.push({comparator:i,version:o})}}return n.length>0&&r.push(n),new Pe(r)}}class Oe{constructor(e){this.sources={},this.config={},this.invoked=!1,this.newestName=null,this.conflict=null,null!=e&&(e instanceof Oe?(this.sources=e.sources,this.config=e.config,this.invoked=e.invoked,this.conflict=e.conflict,this.newestName=e.newestName,e.superseded()):e.constructor===Object&&e.config instanceof Object?this.config=e.config:this.conflict=e),"loading"===document.readyState?window.addEventListener("DOMContentLoaded",this.init.bind(this)):window.setTimeout(this.init.bind(this),0)}get version(){return"0.1.0"}registerSource(e,t){this.sources[e]=t}newestSourceName(){let e=null,t=Fe.fromSemver("0.0.0");for(const n in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,n)){const r=Fe.fromSemver(this.sources[n].version);r.hasPrecedenceOver(t)&&(e=n,t=r)}return e}init(){if(!this.invoked){if(this.invoked=!0,this.newestName=this.newestSourceName(),null===this.newestName)throw new Error("No registered Ruffle source!");!1!==this.config.polyfills&&this.sources[this.newestName].polyfill("extension"===this.newestName)}}newest(){const e=this.newestSourceName();return null!=e?this.sources[e]:null}satisfying(e){const t=Pe.fromRequirementString(e);let n=null;for(const e in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,e)){const r=Fe.fromSemver(this.sources[e].version);t.satisfiedBy(r)&&(n=this.sources[e])}return n}localCompatible(){return void 0!==this.sources.local?this.satisfying("^"+this.sources.local.version):this.newest()}local(){return void 0!==this.sources.local?this.satisfying("="+this.sources.local.version):this.newest()}superseded(){this.invoked=!0}static negotiate(e,t,n){let r;return r=e instanceof Oe?e:new Oe(e),void 0!==t&&void 0!==n&&(r.registerSource(t,n),!1!==r.config.polyfills&&n.pluginPolyfill()),r}}window.RufflePlayer=Oe.negotiate(window.RufflePlayer,"local",new class{constructor(e){this.name=e}get version(){return"0.1.0"}polyfill(e){!function(e){ye=e,Ie(),Ae(),new MutationObserver((function(e){e.some((e=>e.addedNodes.length>0))&&(Ie(),Ae())})).observe(document,{childList:!0,subtree:!0})}(e)}pluginPolyfill(){!function(e){"install"in navigator.plugins&&navigator.plugins.install||Object.defineProperty(navigator,"plugins",{value:new H(navigator.plugins),writable:!1}),navigator.plugins.install(e),!(e.length>0)||"install"in navigator.mimeTypes&&navigator.mimeTypes.install||Object.defineProperty(navigator,"mimeTypes",{value:new $(navigator.mimeTypes),writable:!1});const t=navigator.mimeTypes;for(let n=0;nSkip main navigation + ${IS_APP ? "" : + html``}