From 09436dfdb7e50d14606f429b70e285499948980c Mon Sep 17 00:00:00 2001 From: sophie Date: Mon, 25 Nov 2024 17:25:15 +0200 Subject: [PATCH] patch shit properly --- build/createPatchedBundle.nu | 25 ++++++++ build/downloadSounds.nu | 16 +++++ build/internal.patch | 7 +++ build/ws.patch | 10 ++++ bundle.js | 2 +- extra.js | 112 +++++++++++++++++++++++++++++++++++ index.html | 5 +- readme.md | 37 ++++++------ 8 files changed, 190 insertions(+), 24 deletions(-) create mode 100644 build/createPatchedBundle.nu create mode 100644 build/downloadSounds.nu create mode 100644 build/internal.patch create mode 100644 build/ws.patch create mode 100644 extra.js diff --git a/build/createPatchedBundle.nu b/build/createPatchedBundle.nu new file mode 100644 index 0000000..7d4d5d9 --- /dev/null +++ b/build/createPatchedBundle.nu @@ -0,0 +1,25 @@ + +def downloadScript [] { + rm -f bundle.js + print $"(ansi yellow)Downloading the script.." + wget -q https://pianoverse.net/bundle.js +} + +def applyPatches [] { + print $"(ansi yellow)Applying patches!.." + + let patches = (ls build | find .patch | each { |i| $i.name }) + $patches + | each {|i| + let splitted = open $i | split row -r '\n'; + let needle = $splitted | get 0; + let haystack = $splitted | skip 1 | str join ""; + open bundle.js | str replace $needle $haystack| save -f bundle.js + print $"(ansi green)Applied patch ($i)!" + } +} + +downloadScript +applyPatches + +print $"(ansi green)Happy hacking!" \ No newline at end of file diff --git a/build/downloadSounds.nu b/build/downloadSounds.nu new file mode 100644 index 0000000..e38dd31 --- /dev/null +++ b/build/downloadSounds.nu @@ -0,0 +1,16 @@ +mkdir sounds +cd sounds + +mkdir grand +mkdir salamander +mkdir soft +mkdir electric + +cd salamander +for $x in 21..108 {wget $"https://pianoverse.net/sounds/salamander/($x).mp3"} +cd grand +for $x in 21..108 {wget $"https://pianoverse.net/sounds/grand/($x).mp3"} +cd soft +for $x in 21..108 {wget $"https://pianoverse.net/sounds/soft/($x).mp3"} +cd electric +for $x in 21..108 {wget $"https://pianoverse.net/sounds/electric/($x).mp3"} \ No newline at end of file diff --git a/build/internal.patch b/build/internal.patch new file mode 100644 index 0000000..d6fe662 --- /dev/null +++ b/build/internal.patch @@ -0,0 +1,7 @@ +)})(); +); +window.PvInternals={}; +"__webpack_modules__ __webpack_module_cache__ __webpack_require__ __webpack_exports__ injectStylesIntoStyleTag injectStylesIntoStyleTag_default styleDomAPI styleDomAPI_default insertBySelector insertBySelector_default setAttributesWithoutAttributes setAttributesWithoutAttributes_default insertStyleElement insertStyleElement_default styleTagTransform styleTagTransform_default style options update toCamelCase escapeHtml hsl2hex isLobby code pv_loader_pv_loader pv_loader_options pv_loader_update __esDecorate __runInitializers __classPrivateFieldGet __classPrivateFieldSet bind pv_popup pv_popup_options pv_popup_update pv_popup_esDecorate pv_popup_runInitializers pv_popup_classPrivateFieldGet pv_popup_classPrivateFieldSet pv_transpose_code pv_transpose_pv_transpose pv_transpose_options pv_transpose_update pv_transpose_runInitializers pv_transpose_esDecorate pv_transpose_classPrivateFieldGet pv_transpose_classPrivateFieldSet pv_velocity_code pv_velocity_pv_velocity pv_velocity_options pv_velocity_update pv_velocity_runInitializers pv_velocity_esDecorate pv_velocity_classPrivateFieldGet pv_velocity_classPrivateFieldSet pv_settings_code pv_settings_pv_settings pv_settings_options pv_settings_update pv_settings_esDecorate pv_settings_runInitializers pv_settings_classPrivateFieldGet pv_settings_classPrivateFieldSet pv_notification_code pv_notification_pv_notification pv_notification_options pv_notification_update pv_notification_esDecorate pv_notification_runInitializers pv_notification_classPrivateFieldGet pv_notification_classPrivateFieldSet NotificationLevel minimal Role pianoverse_NotificationLevel ServerMessage_Event ClientMessage_Event roleFromJSON roleToJSON notificationLevelFromJSON notificationLevelToJSON serverMessage_EventFromJSON serverMessage_EventToJSON clientMessage_EventFromJSON clientMessage_EventToJSON createBaseServerMessage createBaseClientMessage createBaseVoid createBaseUserInfo createBaseRoom createBaseMove createBaseKeyPress createBaseKeyRelease createBaseSustain createBaseWelcome createBaseChat createBaseEnter createBaseBan createBaseNotification isSet events events_default client_runInitializers client_esDecorate pv_new_room_code pv_new_room_pv_new_room pv_new_room_options pv_new_room_update pv_new_room_esDecorate pv_new_room_runInitializers pv_new_room_classPrivateFieldGet pv_new_room_classPrivateFieldSet role_Role __awaiter midi_runInitializers midi_esDecorate midi_awaiter MIDICommand layout_runInitializers layout_esDecorate keyboard_awaiter pv_actions_code pv_actions_pv_actions pv_actions_options pv_actions_update pv_actions_esDecorate pv_actions_runInitializers pv_actions_classPrivateFieldGet pv_actions_classPrivateFieldSet pv_devices_code pv_devices_pv_devices pv_devices_options pv_devices_update pv_devices_esDecorate pv_devices_runInitializers pv_devices_classPrivateFieldGet pv_devices_classPrivateFieldSet pv_message_code pv_message_pv_message pv_message_options pv_message_update pv_message_esDecorate pv_message_runInitializers pv_message_classPrivateFieldGet pv_message_classPrivateFieldSet pv_profile_code pv_profile_pv_profile pv_profile_options pv_profile_update pv_profile_esDecorate pv_profile_runInitializers pv_profile_classPrivateFieldGet pv_profile_classPrivateFieldSet pv_sounds_code pv_sounds_pv_sounds pv_sounds_options pv_sounds_update pv_sounds_esDecorate pv_sounds_runInitializers pv_sounds_classPrivateFieldGet pv_sounds_classPrivateFieldSet pv_rooms_code pv_rooms_pv_rooms pv_rooms_options pv_rooms_update pv_rooms_esDecorate pv_rooms_runInitializers pv_rooms_classPrivateFieldGet pv_rooms_classPrivateFieldSet pv_ban_code pv_ban_pv_ban pv_ban_options pv_ban_update pv_ban_esDecorate pv_ban_runInitializers pv_ban_classPrivateFieldGet pv_ban_classPrivateFieldSet Modal Dialog pv_toolbar_code pv_toolbar_pv_toolbar pv_toolbar_options pv_toolbar_update pv_toolbar_esDecorate pv_toolbar_runInitializers pv_toolbar_classPrivateFieldGet pv_toolbar_classPrivateFieldSet pv_header_code pv_header_pv_header pv_header_options pv_header_update pv_header_esDecorate pv_header_runInitializers pv_header_classPrivateFieldGet pv_header_classPrivateFieldSet pv_note pv_note_options pv_note_update pv_note_esDecorate pv_note_runInitializers pv_note_classPrivateFieldGet pv_note_classPrivateFieldSet randf randi pv_canvas_code pv_canvas_pv_canvas pv_canvas_options pv_canvas_update pv_canvas_esDecorate pv_canvas_runInitializers pv_canvas_classPrivateFieldGet pv_canvas_classPrivateFieldSet pv_cursor_code pv_cursor_pv_cursor pv_cursor_options pv_cursor_update pv_cursor_esDecorate pv_cursor_runInitializers pv_cursor_classPrivateFieldGet pv_cursor_classPrivateFieldSet pv_user_code pv_user_pv_user pv_user_options pv_user_update pv_user_esDecorate pv_user_runInitializers pv_user_classPrivateFieldGet pv_user_classPrivateFieldSet pv_users_code pv_users_pv_users pv_users_options pv_users_update pv_users_esDecorate pv_users_runInitializers pv_users_classPrivateFieldGet pv_users_classPrivateFieldSet pv_keys_code pv_keys_pv_keys pv_keys_options pv_keys_update pv_keys_runInitializers pv_keys_esDecorate pv_knob_code pv_knob_pv_knob pv_knob_options pv_knob_update pv_knob_esDecorate pv_knob_runInitializers pv_knob_classPrivateFieldGet pv_knob_classPrivateFieldSet pv_chat_code pv_chat_pv_chat pv_chat_options pv_chat_update pv_chat_esDecorate pv_chat_runInitializers pv_chat_classPrivateFieldGet pv_chat_classPrivateFieldSet pv_ping_code pv_ping_pv_ping pv_ping_options pv_ping_update pv_ping_esDecorate pv_ping_runInitializers pv_ping_classPrivateFieldGet pv_ping_classPrivateFieldSet pv_room_code pv_room_pv_room pv_room_options pv_room_update pv_room_esDecorate pv_room_runInitializers pv_room_classPrivateFieldGet pv_room_classPrivateFieldSet distance setFavicon components_pv_loader_pv_loader components_pv_popup_pv_popup components_popups_pv_transpose_pv_transpose components_popups_pv_velocity_pv_velocity components_popups_pv_settings_pv_settings components_pv_notification_pv_notification components_popups_pv_new_room_pv_new_room components_popups_pv_actions_pv_actions components_popups_pv_devices_pv_devices components_popups_pv_message_pv_message components_popups_pv_profile_pv_profile components_popups_pv_sounds_pv_sounds components_popups_pv_rooms_pv_rooms components_popups_pv_ban_pv_ban components_pv_toolbar_pv_toolbar components_pv_header_pv_header components_pv_note_pv_note components_pv_canvas_pv_canvas components_pv_cursor_pv_cursor components_pv_user_pv_user components_pv_users_pv_users components_pv_keys_pv_keys components_pv_knob_pv_knob components_pv_chat_pv_chat components_pv_ping_pv_ping components_pv_room_pv_room src_components_pv_loader_pv_loader src_components_pv_toolbar_pv_toolbar src_components_pv_header_pv_header src_components_pv_canvas_pv_canvas src_components_pv_cursor_pv_cursor src_components_pv_user_pv_user src_components_pv_users_pv_users src_components_pv_keys_pv_keys src_components_pv_knob_pv_knob src_components_pv_chat_pv_chat src_components_pv_ping_pv_ping src_components_pv_room_pv_room PopupManager" + .split(" ").forEach(z => {window.PvInternals[z]=eval(z)}) + +})(); \ No newline at end of file diff --git a/build/ws.patch b/build/ws.patch new file mode 100644 index 0000000..606703b --- /dev/null +++ b/build/ws.patch @@ -0,0 +1,10 @@ +this._ws=new WebSocket("wss://pianoverse.net","pianoverse") +let wsurl=""; +if(!localStorage.host) { + wsurl = "wss://api.pianoverse.me"; +} else if(localStorage.host=="mainline") { + wsurl = "wss://pianoverse.net" +} else if(localStorage.host == "dev") { + wsurl = "ws://127.0.0.1:8081" +}; +this._ws = new WebSocket(wsurl,"pianoverse") \ No newline at end of file diff --git a/bundle.js b/bundle.js index 0177dc7..209f0b7 100644 --- a/bundle.js +++ b/bundle.js @@ -1 +1 @@ -(()=>{"use strict";var __webpack_modules__={8045:e=>{e.exports=function(e,t){for(var i=new Array(arguments.length-1),o=0,a=2,s=!0;a{var i=t;i.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var o=new Array(64),a=new Array(123),s=0;s<64;)a[o[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(e,t,i){for(var a,s=null,n=[],r=0,l=0;t>2],a=(3&c)<<4,l=1;break;case 1:n[r++]=o[a|c>>4],a=(15&c)<<2,l=2;break;case 2:n[r++]=o[a|c>>6],n[r++]=o[63&c],l=0}r>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),r=0)}return l&&(n[r++]=o[a],n[r++]=61,1===l&&(n[r++]=61)),s?(r&&s.push(String.fromCharCode.apply(String,n.slice(0,r))),s.join("")):String.fromCharCode.apply(String,n.slice(0,r))};var n="invalid encoding";i.decode=function(e,t,i){for(var o,s=i,r=0,l=0;l1)break;if(void 0===(c=a[c]))throw Error(n);switch(r){case 0:o=c,r=1;break;case 1:t[i++]=o<<2|(48&c)>>4,o=c,r=2;break;case 2:t[i++]=(15&o)<<4|(60&c)>>2,o=c,r=3;break;case 3:t[i++]=(3&o)<<6|c,r=0}}if(1===r)throw Error(n);return i-s},i.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},4358:e=>{function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var i=this._listeners[e],o=0;o{function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),i=new Uint8Array(t.buffer),o=128===i[3];function a(e,o,a){t[0]=e,o[a]=i[0],o[a+1]=i[1],o[a+2]=i[2],o[a+3]=i[3]}function s(e,o,a){t[0]=e,o[a]=i[3],o[a+1]=i[2],o[a+2]=i[1],o[a+3]=i[0]}function n(e,o){return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i[3]=e[o+3],t[0]}function r(e,o){return i[3]=e[o],i[2]=e[o+1],i[1]=e[o+2],i[0]=e[o+3],t[0]}e.writeFloatLE=o?a:s,e.writeFloatBE=o?s:a,e.readFloatLE=o?n:r,e.readFloatBE=o?r:n}():function(){function t(e,t,i,o){var a=t<0?1:0;if(a&&(t=-t),0===t)e(1/t>0?0:2147483648,i,o);else if(isNaN(t))e(2143289344,i,o);else if(t>34028234663852886e22)e((a<<31|2139095040)>>>0,i,o);else if(t<11754943508222875e-54)e((a<<31|Math.round(t/1401298464324817e-60))>>>0,i,o);else{var s=Math.floor(Math.log(t)/Math.LN2);e((a<<31|s+127<<23|8388607&Math.round(t*Math.pow(2,-s)*8388608))>>>0,i,o)}}function n(e,t,i){var o=e(t,i),a=2*(o>>31)+1,s=o>>>23&255,n=8388607&o;return 255===s?n?NaN:a*(1/0):0===s?1401298464324817e-60*a*n:a*Math.pow(2,s-150)*(n+8388608)}e.writeFloatLE=t.bind(null,i),e.writeFloatBE=t.bind(null,o),e.readFloatLE=n.bind(null,a),e.readFloatBE=n.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),i=new Uint8Array(t.buffer),o=128===i[7];function a(e,o,a){t[0]=e,o[a]=i[0],o[a+1]=i[1],o[a+2]=i[2],o[a+3]=i[3],o[a+4]=i[4],o[a+5]=i[5],o[a+6]=i[6],o[a+7]=i[7]}function s(e,o,a){t[0]=e,o[a]=i[7],o[a+1]=i[6],o[a+2]=i[5],o[a+3]=i[4],o[a+4]=i[3],o[a+5]=i[2],o[a+6]=i[1],o[a+7]=i[0]}function n(e,o){return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i[3]=e[o+3],i[4]=e[o+4],i[5]=e[o+5],i[6]=e[o+6],i[7]=e[o+7],t[0]}function r(e,o){return i[7]=e[o],i[6]=e[o+1],i[5]=e[o+2],i[4]=e[o+3],i[3]=e[o+4],i[2]=e[o+5],i[1]=e[o+6],i[0]=e[o+7],t[0]}e.writeDoubleLE=o?a:s,e.writeDoubleBE=o?s:a,e.readDoubleLE=o?n:r,e.readDoubleBE=o?r:n}():function(){function t(e,t,i,o,a,s){var n=o<0?1:0;if(n&&(o=-o),0===o)e(0,a,s+t),e(1/o>0?0:2147483648,a,s+i);else if(isNaN(o))e(0,a,s+t),e(2146959360,a,s+i);else if(o>17976931348623157e292)e(0,a,s+t),e((n<<31|2146435072)>>>0,a,s+i);else{var r;if(o<22250738585072014e-324)e((r=o/5e-324)>>>0,a,s+t),e((n<<31|r/4294967296)>>>0,a,s+i);else{var l=Math.floor(Math.log(o)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(r=o*Math.pow(2,-l))>>>0,a,s+t),e((n<<31|l+1023<<20|1048576*r&1048575)>>>0,a,s+i)}}}function n(e,t,i,o,a){var s=e(o,a+t),n=e(o,a+i),r=2*(n>>31)+1,l=n>>>20&2047,c=4294967296*(1048575&n)+s;return 2047===l?c?NaN:r*(1/0):0===l?5e-324*r*c:r*Math.pow(2,l-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,i,0,4),e.writeDoubleBE=t.bind(null,o,4,0),e.readDoubleLE=n.bind(null,a,0,4),e.readDoubleBE=n.bind(null,s,4,0)}(),e}function i(e,t,i){t[i]=255&e,t[i+1]=e>>>8&255,t[i+2]=e>>>16&255,t[i+3]=e>>>24}function o(e,t,i){t[i]=e>>>24,t[i+1]=e>>>16&255,t[i+2]=e>>>8&255,t[i+3]=255&e}function a(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},4153:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},9390:e=>{e.exports=function(e,t,i){var o=i||8192,a=o>>>1,s=null,n=o;return function(i){if(i<1||i>a)return e(i);n+i>o&&(s=e(o),n=0);var r=t.call(s,n,n+=i);return 7&n&&(n=1+(7|n)),r}}},1447:(e,t)=>{var i=t;i.length=function(e){for(var t=0,i=0,o=0;o191&&o<224?s[n++]=(31&o)<<6|63&e[t++]:o>239&&o<365?(o=((7&o)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,s[n++]=55296+(o>>10),s[n++]=56320+(1023&o)):s[n++]=(15&o)<<12|(63&e[t++])<<6|63&e[t++],n>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,s)),n=0);return a?(n&&a.push(String.fromCharCode.apply(String,s.slice(0,n))),a.join("")):String.fromCharCode.apply(String,s.slice(0,n))},i.write=function(e,t,i){for(var o,a,s=i,n=0;n>6|192,t[i++]=63&o|128):55296==(64512&o)&&56320==(64512&(a=e.charCodeAt(n+1)))?(o=65536+((1023&o)<<10)+(1023&a),++n,t[i++]=o>>18|240,t[i++]=o>>12&63|128,t[i++]=o>>6&63|128,t[i++]=63&o|128):(t[i++]=o>>12|224,t[i++]=o>>6&63|128,t[i++]=63&o|128);return i-s}},8728:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}pv-notification{overflow:hidden;position:relative;opacity:.85;border-radius:max(.4vw,4px);animation:bounceLeftIn 400ms ease-in-out;z-index:150;transition:250ms;cursor:url(${p}),auto}pv-notification:not(:disabled):hover{transition:0ms}pv-notification .container{overflow:visible;position:relative;padding:10px 14px;margin:0px;background:var(--color-cards);color:var(--color-text);border-radius:max(.4vw,4px);box-shadow:var(--shadow);display:flex;flex-direction:row;gap:14px}pv-notification .container .notification-icon{display:flex;flex-direction:column;justify-content:center;align-items:center}pv-notification .container .notification-icon i{font-size:22px}pv-notification .container .notification-icon i.success{color:var(--color-green)}pv-notification .container .notification-icon i.warning{color:var(--color-yellow)}pv-notification .container .notification-icon i.error{color:var(--color-red)}pv-notification .container .notification-title{font-weight:bold}pv-notification .container .notification-text{font-weight:normal;opacity:.7}pv-notification:hover{opacity:1}pv-notification.closing{animation:bounceRightOut 400ms ease-in-out}pv-notification .notification-bar{opacity:0;z-index:999;position:absolute;bottom:0px;left:0;width:100%;height:2px;background-color:var(--color-text);-webkit-animation:timeout 10s linear forwards;-moz-animation:timeout 10s linear forwards;-o-animation:timeout 10s linear forwards;animation:timeout 10s linear forwards}pv-notification:hover+.notification-bar{-webkit-animation-play-state:paused;-moz-animation-play-state:paused;-o-animation-play-state:paused;animation-play-state:paused}`,""]);const u=d},4912:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=new URL(i(1873),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`dialog{padding:0;background-color:var(--color-cards);border:none;outline:none;overflow:visible;color:var(--color-text);position:absolute;bottom:0;top:0}dialog .header{display:flex;justify-content:space-between;padding:14px;font-size:1.2em;font-weight:bold;border-bottom:2px solid var(--color-hover)}dialog .header .title i{font-size:.87em;margin-right:5px}dialog .header .x{opacity:.4;transition:250ms;font-size:14px;border-radius:99px;padding:2px;width:26px;height:26px;background-color:var(--color-hover);display:flex;align-items:center;justify-content:center}dialog .header .x:hover{transition:0ms;opacity:1;cursor:url(${u}),auto}dialog .content{display:flex;flex-direction:column;padding:14px}dialog .content .buttons{display:flex;justify-content:right;align-items:end;gap:6px;margin-top:6px}dialog[modal]{border-radius:6px;box-shadow:var(--shadow);border:2px solid var(--color-hover)}dialog[modal][open]{animation:bounceUpIn 320ms ease-out}dialog[modal][open]::backdrop{animation:fadeIn 200ms ease-out}dialog[modal][closing]{animation:slideDownOut 100ms ease-out}dialog[modal][closing]::backdrop{animation:fadeOut 200ms ease-out}dialog[modal]::backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:rgba(0,0,0,.8);cursor:url(${v}),auto}dialog:not([modal]){z-index:100;border-radius:max(.4vw,4px);box-shadow:var(--shadow)}dialog:not([modal]) .content{border-radius:max(.4vw,4px)}dialog:not([modal])[open]{animation:slideDownIn 100ms ease-out}dialog:not([modal])[closing]{animation:slideUpOut 100ms ease-out}dialog:not([modal])::backdrop{background-color:rgba(0,0,0,0);cursor:url(${v}),auto;pointer-events:all}`,""]);const h=p},7966:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=new URL(i(9738),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`pv-actions dialog{min-width:170px}pv-actions dialog .content{background:rgba(0,0,0,0);padding:4px}pv-actions dialog .content div:not(:first-child){padding:9px 32px 9px 10px;cursor:url(${u}),auto;z-index:200;transition:150ms;border-radius:calc(max(.4vw,4px) - 2px)}pv-actions dialog .content div:not(:first-child):hover{transition:50ms;backdrop-filter:invert(0.1)}pv-actions dialog .content div:not(:first-child) i{margin-right:6px;width:18px;height:18px;text-align:center}pv-actions dialog .content .userid{user-select:text;cursor:url(${v}),auto;text-align:center;padding:6px 16px;font-size:14px;opacity:.4}pv-actions dialog .content .unmute-notes,pv-actions dialog .content .unmute-chat{color:var(--color-red);display:none}`,""]);const h=p},8138:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-ban dialog{width:290px}pv-ban dialog .content{gap:8px}",""]);const r=n},6138:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-devices dialog .content table{border-collapse:collapse;padding:0}pv-devices dialog .content table th{padding-bottom:6px}pv-devices dialog .content table td{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-wrap:none}pv-devices dialog .content table tr>td:first-child{max-width:220px;width:140px}pv-devices dialog .content table tr:not(:last-child)>th,pv-devices dialog .content table tr:not(:last-child)>td{padding:0;padding-bottom:6px}pv-devices dialog .content table th:first-child,pv-devices dialog .content table td:first-child{text-align:left;padding-right:32px}pv-devices dialog .content table th:nth-child(2),pv-devices dialog .content table td:nth-child(2){padding-right:6px}pv-devices dialog .content table td:not(:last-child){width:45px}pv-devices dialog .content table .muted{color:var(--color-text);opacity:.4}",""]);const r=n},9114:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-message dialog{width:330px}pv-message dialog .content .message{margin-bottom:0px}",""]);const r=n},9728:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-new-room dialog{width:280px}pv-new-room dialog .content{gap:8px}pv-new-room dialog .content .field{display:flex;flex-direction:column;gap:3px}pv-new-room dialog .content .field label{font-size:14px;margin-left:3px;opacity:.5}pv-new-room dialog .content .private{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:14px}pv-new-room dialog .content .buttons{margin-top:0}",""]);const r=n},8394:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-profile dialog{width:290px}pv-profile dialog .content{gap:8px}pv-profile dialog .content .grid{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;grid-template-areas:"a b" "c c";gap:8px}pv-profile dialog .content .grid .a{grid-area:a}pv-profile dialog .content .grid .b{grid-area:b}pv-profile dialog .content .grid .c{grid-area:c}pv-profile dialog .content .field{position:relative;display:flex;flex-direction:column;gap:3px}pv-profile dialog .content .field label{font-size:14px;margin-left:3px;opacity:.5}pv-profile dialog .content .input-color-text{position:relative}pv-profile dialog .content input[type=color]{position:absolute;height:22px;width:22px;bottom:6px;right:6px;border:none;outline:none;cursor:url(${p}),auto;background-color:rgba(0,0,0,0);padding:0;margin:0}pv-profile dialog .content input[type=color]::-webkit-color-swatch{border:none;border-radius:4px;transition:250ms}pv-profile dialog .content input[type=color]::-webkit-color-swatch:not(:disabled):hover{transition:0ms}pv-profile dialog .content input[type=color]::-webkit-color-swatch:hover{filter:brightness(1.1)}pv-profile dialog .content input[type=color]::-webkit-color-swatch-wrapper{border:none;padding:0;margin:0}pv-profile dialog .content input[type=color]::-moz-color-swatch{border:none;border-radius:max(.4vw,4px);transition:250ms}pv-profile dialog .content input[type=color]::-moz-color-swatch:not(:disabled):hover{transition:0ms}pv-profile dialog .content input[type=color]::-moz-color-swatch:hover{filter:brightness(1.1)}pv-profile dialog .content input[type=color]::-moz-color-swatch-wrapper{border:none;padding:0;margin:0}`,""]);const u=d},5760:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}@keyframes slideDownIn1{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}pv-rooms dialog{min-width:220px;max-width:270px;background-color:var(--color-cards-alt)}pv-rooms dialog .content{padding:0;color:var(--color-text);padding:4px;display:flex;flex-direction:column;gap:2px}pv-rooms dialog .content div.animate:nth-child(1){animation-delay:.05s}pv-rooms dialog .content div.animate:nth-child(2){animation-delay:.1s}pv-rooms dialog .content div.animate:nth-child(3){animation-delay:.15s}pv-rooms dialog .content div.animate:nth-child(4){animation-delay:.2s}pv-rooms dialog .content div.animate:nth-child(5){animation-delay:.25s}pv-rooms dialog .content div.animate:nth-child(6){animation-delay:.3s}pv-rooms dialog .content div.animate:nth-child(7){animation-delay:.35s}pv-rooms dialog .content div.animate:nth-child(8){animation-delay:.4s}pv-rooms dialog .content div.animate:nth-child(9){animation-delay:.45s}pv-rooms dialog .content div.animate:nth-child(10){animation-delay:.5s}pv-rooms dialog .content div.animate:nth-child(11){animation-delay:.55s}pv-rooms dialog .content div.animate:nth-child(12){animation-delay:.6s}pv-rooms dialog .content div.animate:nth-child(13){animation-delay:.65s}pv-rooms dialog .content div.animate:nth-child(14){animation-delay:.7s}pv-rooms dialog .content div.animate:nth-child(15){animation-delay:.75s}pv-rooms dialog .content div.animate:nth-child(16){animation-delay:.8s}pv-rooms dialog .content div.animate:nth-child(17){animation-delay:.85s}pv-rooms dialog .content div.animate:nth-child(18){animation-delay:.9s}pv-rooms dialog .content div.animate:nth-child(19){animation-delay:.95s}pv-rooms dialog .content div.animate:nth-child(20){animation-delay:1s}pv-rooms dialog .content div.animate:nth-child(21){animation-delay:1.05s}pv-rooms dialog .content div.animate:nth-child(22){animation-delay:1.1s}pv-rooms dialog .content div.animate:nth-child(23){animation-delay:1.15s}pv-rooms dialog .content div.animate:nth-child(24){animation-delay:1.2s}pv-rooms dialog .content>div{border-radius:calc(max(.4vw,4px) - 2px);padding:9px 10px 9px 10px;z-index:200;transition:150ms;font-size:.9em;font-weight:bold;display:flex;justify-content:space-between;gap:10px}pv-rooms dialog .content>div .name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-wrap:none;pointer-events:none}pv-rooms dialog .content>div .count{min-width:fit-content;pointer-events:none}pv-rooms dialog .content>div.lobby>.name,pv-rooms dialog .content>div.lobby>.count{color:var(--color-lobby)}pv-rooms dialog .content>div.animate{opacity:0;animation:slideDownIn1 250ms ease-out forwards}pv-rooms dialog .content>div:hover,pv-rooms dialog .content>div.selected{transition:50ms;background-color:var(--color-hover-alt)}pv-rooms dialog .content>div:last-child span{opacity:.5}",""]);const r=n},672:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-settings dialog{min-width:320px}pv-settings dialog .content{padding-bottom:12px}pv-settings dialog .content .container{display:flex;flex-direction:column;justify-content:flex-start}pv-settings dialog .content .container h3{margin-bottom:4px}pv-settings dialog .content .container .field{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:38px;gap:3px}pv-settings dialog .content .container .field select{width:46%}pv-settings dialog .content .container .buttons{font-size:.85em}pv-settings dialog .content .footer{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:16px;padding:0 2px}pv-settings dialog .content .footer .madeby{display:flex;flex-direction:row;gap:12px;font-size:.85em;transition:250ms}pv-settings dialog .content .footer .madeby:not(:disabled):hover{transition:0ms}pv-settings dialog .content .footer .madeby a{color:var(--color-text);opacity:.5;transition:250ms}pv-settings dialog .content .footer .madeby a:not(:disabled):hover{transition:0ms}pv-settings dialog .content .footer .madeby a:hover{opacity:1}pv-settings dialog .content .footer .madeby a{cursor:url(${p}),auto}`,""]);const u=d},5500:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}@keyframes slideDownIn2{from{opacity:0;transform:translateY(-8px)}to{opacity:.7;transform:translateY(0)}}pv-sounds dialog{min-width:170px}pv-sounds dialog .content{padding:0;color:var(--color-text);padding:4px;display:flex;flex-direction:column;gap:2px}pv-sounds dialog .content div:nth-child(1){animation-delay:.05s}pv-sounds dialog .content div:nth-child(2){animation-delay:.1s}pv-sounds dialog .content div:nth-child(3){animation-delay:.15s}pv-sounds dialog .content div:nth-child(4){animation-delay:.2s}pv-sounds dialog .content div{border-radius:calc(max(.4vw,4px) - 2px);padding:9px 32px 9px 10px;z-index:200;transition:150ms;font-size:.9em;font-weight:bold;opacity:0;animation:slideDownIn2 250ms ease-out forwards}pv-sounds dialog .content div:hover,pv-sounds dialog .content div[selected]{transition:50ms;background-color:var(--color-hover)}pv-sounds dialog .content div i{margin-right:6px;width:18px;height:18px;text-align:center}",""]);const r=n},7030:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-transpose dialog{overflow:hidden;width:180px}pv-transpose dialog .content{display:flex;flex-direction:column;gap:10px}pv-transpose dialog .content .field{display:flex;flex-direction:row;gap:1px}pv-transpose dialog .content .field input[type=number]{font-weight:bold;border-top-right-radius:0;border-bottom-right-radius:0;flex:1}pv-transpose dialog .content .field .minus,pv-transpose dialog .content .field .plus{height:34px;width:34px;background-color:var(--color-hover);display:flex;justify-content:center;align-items:center;cursor:url(${p}),auto}pv-transpose dialog .content .field .plus{border-top-right-radius:4px;border-bottom-right-radius:4px}pv-transpose dialog .content small{opacity:.4;font:var(--font-small)}`,""]);const u=d},9952:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-velocity dialog{overflow:hidden;width:192px}pv-velocity dialog .content{display:flex;flex-direction:column;gap:10px}pv-velocity dialog .content .field{display:flex;flex-direction:row;gap:1px}pv-velocity dialog .content .field input[type=number]{font-weight:bold;border-top-right-radius:0;border-bottom-right-radius:0;flex:1}pv-velocity dialog .content .field .minus,pv-velocity dialog .content .field .plus{height:34px;width:34px;background-color:var(--color-hover);display:flex;justify-content:center;align-items:center;cursor:url(${p}),auto}pv-velocity dialog .content .field .plus{border-top-right-radius:4px;border-bottom-right-radius:4px}pv-velocity dialog .content small{opacity:.4;font:var(--font-small)}`,""]);const u=d},5734:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-canvas{display:flex;position:relative;flex-direction:column;background-color:var(--color-background);overflow:hidden;flex:1}pv-canvas .bg-canvas,pv-canvas .fg-canvas{position:absolute;pointer-events:none;image-rendering:pixelated;z-index:8}pv-canvas pv-note{z-index:9}pv-canvas #notifications{position:absolute;bottom:max(.7vw,8px);right:0;display:flex;flex-direction:column;gap:10px;width:365px;height:auto;padding:0;margin:0}",""]);const r=n},9546:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9738),i.b),d=new URL(i(9662),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`pv-chat{flex:1;width:20vw;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;gap:8px}pv-chat .messages{display:flex;height:100%;overflow-y:auto;overflow-x:hidden;flex-direction:column;padding:10px;gap:2px;margin:0;list-style-type:none;z-index:25;mask-image:linear-gradient(to top, black calc(100% - 120px), transparent 100%)}pv-chat .messages:not(:hover)::-webkit-scrollbar{transition:all 1s ease-in;background-color:var(--color-cards)}pv-chat .messages :first-child{margin-top:auto;padding-top:14px}pv-chat .messages .message{user-select:text;cursor:url(${u}),auto;overflow-wrap:anywhere;width:100%;animation:slideUpIn 120ms ease-in-out;padding:0 6px;clip-path:view-box;font:var(--font-default);line-height:21px}pv-chat .messages .message img{transition:250ms;height:19px;max-width:32px;vertical-align:top;image-rendering:auto;cursor:url(${u}),auto}pv-chat .messages .message .username{user-select:text;cursor:url(${u}),auto;margin-right:8px;font-weight:bold}pv-chat .messages .message .username .fa-discord{padding:0;color:#5865f2;font-size:14px}pv-chat .messages .message .mention{background-color:var(--color-hover);color:var(--color-text);cursor:url(${v}),auto;border-radius:2px;font-weight:bold;transition:250ms}pv-chat .messages .message .mention:hover{transition:0ms;background-color:var(--color-hover)}pv-chat .messages .system{display:flex;justify-content:center;text-align:center;font-style:italic;animation:none;width:100%;color:var(--color-text);opacity:.4}pv-chat>div{position:relative;display:flex;flex-direction:row}pv-chat>div input[type=text]{display:flex;align-items:center;height:46px;padding:0 42px 0 14px;border:none;outline:none;cursor:url(${u}),auto;color:var(--color-text);font-size:1em;box-sizing:border-box;width:100%;border-radius:6px;transition:background-color 80ms;background-color:rgba(0,0,0,0);border:1px solid var(--color-hover);z-index:25}pv-chat>div input[type=text]:focus{background-color:var(--color-hover)}pv-chat>div button{position:absolute;right:2px;z-index:26;background-color:rgba(0,0,0,0);cursor:url(${v}),auto;font-size:1em;border:none;height:46px;aspect-ratio:1;padding:0;border-radius:0;box-shadow:none;margin:0;flex:0;color:var(--color-text)}pv-chat>div button i{opacity:.4;cursor:url(${v}),auto;transition:250ms;font-size:1.1em}pv-chat>div button:hover{background:rgba(0,0,0,0) !important}pv-chat>div button:hover i{transition:0ms;opacity:1}`,""]);const h=p},6610:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(1873),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-cursor{position:absolute;display:flex;z-index:90;transition:30ms ease-out;pointer-events:none;opacity:.9}pv-cursor.idle{opacity:.4;transition:opacity 300ms ease-out}pv-cursor .icon{position:fixed;width:18px;height:24px;background-image:url(${p});pointer-events:none;animation-name:heartbeat;animation-duration:.6s;animation-timing-function:linear;animation-iteration-count:infinite}pv-cursor .badge{padding:4px 6px;font-size:14px;font-weight:bold;margin-top:20px;margin-left:6px;max-width:170px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-color:var(--color-hover);border-radius:6px}`,""]);const u=d},4950:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=new URL(i(4675),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`pv-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--color-text);background-color:var(--color-cards);height:48px;gap:8px;padding:0 8px 0 12px;border-bottom:1px solid var(--color-hover)}pv-header .left{gap:12px !important}pv-header .left .pianoverse{display:flex;flex-direction:row;align-items:center;gap:6px;font:var(--font-title);cursor:url(${u}),auto}pv-header .left .pianoverse svg{width:22px;fill:var(--color-text);height:22px}pv-header .left .pianoverse .title{font-weight:bold;opacity:.6}pv-header .left,pv-header .right,pv-header .center{display:flex;flex-direction:row;align-items:center;gap:2px}pv-header .left .volume,pv-header .right .volume,pv-header .center .volume{display:flex;flex-direction:row;justify-content:space-between;margin-right:4px}pv-header .left .volume i,pv-header .right .volume i,pv-header .center .volume i{height:100%;aspect-ratio:1;display:flex;justify-content:center;align-items:center}pv-header .left>.icon,pv-header .right>.icon,pv-header .center>.icon{height:28px;width:28px;border-radius:0;display:flex;justify-content:center;align-items:center;transition:250ms;border-radius:6px;transition:250ms}pv-header .left>.icon:not(:disabled):hover,pv-header .right>.icon:not(:disabled):hover,pv-header .center>.icon:not(:disabled):hover{transition:0ms}pv-header .left>.icon:not([disabled]):hover,pv-header .left>.icon.open,pv-header .right>.icon:not([disabled]):hover,pv-header .right>.icon.open,pv-header .center>.icon:not([disabled]):hover,pv-header .center>.icon.open{background-color:var(--color-hover)}pv-header .left>.icon[disabled],pv-header .right>.icon[disabled],pv-header .center>.icon[disabled]{cursor:url(${v}),auto;opacity:.4}pv-header .left>.icon[disabled] i,pv-header .right>.icon[disabled] i,pv-header .center>.icon[disabled] i{cursor:url(${v}),auto}pv-header .left .divider,pv-header .right .divider,pv-header .center .divider{background-color:var(--color-hover);border-radius:2px;margin:0 2px;height:16px;width:2px}`,""]);const h=p},5750:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-keys{display:flex;flex-direction:row;gap:1px;width:100%;aspect-ratio:8;overflow:hidden;min-height:100px;background-color:var(--color-hover);border-radius:max(.4vw,4px);box-shadow:var(--shadow)}pv-keys .key{position:relative;opacity:1;flex:1}pv-keys .key .show-label[data-label]::after{content:attr(data-label);position:absolute;bottom:0;left:0;width:100%;display:flex;align-items:center;justify-content:center}pv-keys .key .white{opacity:1;background-color:#fff;width:100%;height:100%;transition-property:background-color,opacity;transition-timing-function:ease-out;transition-duration:300ms}pv-keys .key .white.loading{opacity:.3}pv-keys .key .white.show-label[data-label]::after{color:#000;font-size:.65vw}pv-keys .key .black{opacity:1;background-color:#1b1b1b;border-bottom-left-radius:3px;border-bottom-right-radius:3px;width:60%;height:64%;position:absolute;top:0;left:70%;z-index:20;transition-property:background-color,opacity;transition-duration:200ms;transition-timing-function:ease-out}pv-keys .key .black.loading{opacity:.3}pv-keys .key .black.show-label[data-label]::after{color:#fff;font-size:.5vw}",""]);const r=n},3142:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(1873),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-knob{margin:25px;background-color:var(--color)}pv-knob .knob{position:relative;width:40px;height:40px;border-radius:50%;background:conic-gradient(var(--color-text) 0deg, var(--color-cards) 0deg);display:flex;align-items:center;justify-content:center;cursor:url(${p}),auto}pv-knob .knob::after{content:"";position:absolute;width:35px;height:35px;background:var(--color-hover);border-radius:50%}pv-knob .indicator{z-index:1000;font-size:12px;font-weight:bold;display:flex;justify-content:center}`,""]);const u=d},5146:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,'@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}pv-loader{position:absolute;top:0px;left:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(0,0,0,.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);color:#dbdbdb;z-index:200;animation:fadeIn 200ms forwards;pointer-events:all}pv-loader .animation{display:flex;justify-content:space-around;align-items:center;height:40px;width:100%}pv-loader .animation .loader{width:8px;height:40px;border-radius:4px;display:block;position:relative;background:#dbdbdb;color:#dbdbdb;box-sizing:border-box;animation:waveform .3s .15s linear infinite alternate}pv-loader .animation .loader::after,pv-loader .animation .loader::before{content:"";width:8px;height:40px;border-radius:4px;background:currentColor;position:absolute;top:50%;transform:translateY(-50%);left:15px;box-sizing:border-box;animation:waveform .3s .3s linear infinite alternate}pv-loader .animation .loader::before{left:-15px;animation-delay:0s}pv-loader .caption{color:#dbdbdb;text-align:center;font-size:1.1rem;margin-top:1rem}pv-loader.closing{animation:slideDownOut 200ms forwards;animation-delay:350ms;pointer-events:none}',""]);const r=n},1230:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"@keyframes press{from{height:0}to{height:100dvh}}@keyframes release{from{transform:translateY(0)}to{transform:translateY(-100dvh)}}pv-note{position:absolute;bottom:0;box-sizing:border-box;border-radius:.5vw;border-bottom-left-radius:0;border-bottom-right-radius:0;background-color:#fff;box-shadow:rgba(255,255,255,.4) 0px 5px,rgba(255,255,255,.3) 0px 10px,rgba(255,255,255,.2) 0px 15px,rgba(255,255,255,.1) 0px 20px,rgba(255,255,255,.05) 0px 25px;animation-duration:2.5s;animation-name:press;animation-timing-function:linear;animation-fill-mode:forwards;pointer-events:none}pv-note.released{border-bottom-left-radius:.5vw;border-bottom-right-radius:.5vw;animation-name:release}",""]);const r=n},1358:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-ping{position:relative;display:flex;flex-direction:row;align-items:center;text-align:right;width:auto;gap:6px;opacity:.5}pv-ping .icon{color:var(--color-text);border-radius:50%;font-size:.5em}pv-ping .icon.green{color:var(--color-green);animation:greenPulse 5s infinite}pv-ping .icon.yellow{color:var(--color-yellow);animation:yellowPulse 5s infinite}pv-ping .icon.orange{color:var(--color-orange);animation:orangePulse 5s infinite}pv-ping .icon.red{color:var(--color-red);animation:redPulse 5s infinite}pv-ping .ms{color:var(--color-text);font-size:.8em}",""]);const r=n},6898:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=new URL(i(1873),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}pv-room{display:flex;flex-direction:row;justify-content:space-between;max-width:12vw}pv-room .room-selector{display:flex;flex-direction:row;justify-content:left;align-items:center;text-align:left;font-weight:bold;gap:10px;cursor:url(${u}),auto;height:100%;transition:250ms}pv-room .room-selector:not(:disabled):hover{transition:0ms}pv-room .room-selector.open{border-bottom-left-radius:0;border-bottom-right-radius:0}pv-room .room-selector .room-name{font-size:1.2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;text-align:left;width:min-content}pv-room .room-list{padding:6px;position:absolute;top:48px;left:max(.7vw,8px);width:calc(20vw + max(.7vw,8px)*2);max-height:60vh;cursor:url(${v}),auto;border-radius:max(.4vw,4px);border-top-left-radius:0;border-top-right-radius:0;background-color:var(--color-cards);border:1px solid var(--color-hover);border-top:0;display:flex;flex-direction:column;overflow:auto;font-weight:normal;box-shadow:var(--shadow);transition:background-color 250ms;opacity:1;animation:slideDownIn 80ms ease-out;-moz-animation:none;color:var(--color-text);gap:2px;pointer-events:none;animation:slideUpOut 80ms ease-out;-moz-animation:none;opacity:0}pv-room .room-list>*{font-weight:bold;padding:8px 10px;display:flex;justify-content:space-between;transition:250ms;border-radius:max(.4vw,4px)}pv-room .room-list>*:not(:disabled):hover{transition:0ms}pv-room .room-list>* .room-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;max-width:80%;font-size:1em}pv-room .room-list>* .room-count{pointer-events:none;opacity:.4}pv-room .room-list>*:hover{transition:0ms;background-color:var(--color-hover)}pv-room .room-list>*:not([data-id]){color:color-mix(in lch, var(--color-text), var(--color-hover));font-size:1em}`,""]);const h=p},2732:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-toolbar{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--color-text);background-color:var(--color-cards);height:48px;gap:6px;border-radius:max(.4vw,4px);z-index:80;box-shadow:var(--shadow)}pv-toolbar .left,pv-toolbar .right{display:flex;flex-direction:row;align-items:center;gap:6px;height:100%;border-radius:max(.4vw,4px);flex:1;padding:8px}pv-toolbar .left>*,pv-toolbar .right>*{padding:6px 8px;display:flex;flex-direction:row;gap:6px;justify-content:center;align-items:center;transition:250ms;border-radius:8px;color:var(--color-text-muted);font-size:.9em;transition:250ms}pv-toolbar .left>*:not(:disabled):hover,pv-toolbar .right>*:not(:disabled):hover{transition:0ms}pv-toolbar .left>*:not([disabled]):not(.sustain):hover,pv-toolbar .left>*.open,pv-toolbar .right>*:not([disabled]):not(.sustain):hover,pv-toolbar .right>*.open{background-color:var(--color-hover)}pv-toolbar .left>* .title,pv-toolbar .right>* .title{font-weight:bold}pv-toolbar .left>* span,pv-toolbar .right>* span{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}pv-toolbar .left>* .value,pv-toolbar .right>* .value{opacity:.4}pv-toolbar .left .divider,pv-toolbar .right .divider{background-color:var(--color-hover);border-radius:2px;margin:0 2px;height:16px;width:2px}pv-toolbar .right{justify-content:end}pv-toolbar .center{width:100%;justify-content:end}",""]);const r=n},8098:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-user{display:flex;align-items:center;border-radius:6px;padding:4px 6px;font-size:14px;margin:0;max-width:170px;line-height:1.4em;transition:250ms;cursor:url(${p}),auto;box-shadow:var(--shadow);transition:250ms;border:none;position:relative;box-shadow:var(--shadow)}pv-user:not(:disabled):hover{transition:0ms}pv-user .text{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}pv-user .badges{color:var(--color-text);font-size:xx-small;font-weight:bold;border-radius:5px;line-height:18px;margin-left:5px;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.7}pv-user .badges i{color:var(--color-text);opacity:.3;font-size:.8em}pv-user.muted{opacity:.4}pv-user:hover,pv-user.open{background-color:var(--color-hover) !important}`,""]);const u=d},8758:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-users{display:flex;flex-direction:column;justify-content:space-between;width:20vw;position:relative;overflow:visible;padding-bottom:6px}pv-users .users{display:flex;flex-wrap:wrap;max-height:25vh;padding-bottom:2px;margin:0 0 4px 0;gap:5px;overflow:visible}",""]);const r=n},2100:(e,t,i)=>{i.d(t,{A:()=>g});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9738),i.b),d=new URL(i(4675),i.b),p=new URL(i(9662),i.b),u=new URL(i(1873),i.b),v=n()(a());v.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@100..1000&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap);"]);var h=l()(c),m=l()(d),f=l()(p),_=l()(u);v.push([e.id,`input{font-family:"Nunito",sans-serif}input[type=text]{width:100%;font-size:14px;color:var(--color-text);background-color:var(--color-hover);border-radius:4px;border:1px solid var(--color-hover);padding:6px;cursor:url(${h}),auto;outline:none}input[type=text]::placeholder{opacity:.4;color:var(--color-text)}input[type=text]:disabled{opacity:.4;cursor:url(${m}),auto}input[type=number]{-moz-appearance:textfield;appearance:textfield;width:100%;font-size:14px;padding:0 4px 0 6px;height:34px;border-radius:4px;background-color:var(--color-hover);color:var(--color-text);border:none;outline:none;border:1px solid var(--color-hover);cursor:url(${h}),auto;transition:250ms}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]:not(:disabled):hover{transition:0ms}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{background-color:var(--color-hover)}input[type=range]{-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);cursor:url(${f}),auto}input[type=range]::-webkit-slider-runnable-track{background:var(--color-hover);border-radius:max(.4vw,4px);height:.5rem}input[type=range]::-moz-range-track{background:var(--color-hover);border-radius:max(.4vw,4px);height:.5rem}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:.5rem;height:1.3rem;background:var(--color-text);border-radius:99px;cursor:url(${f}),auto;margin-top:-0.4rem;border:none}input[type=range]::-moz-range-thumb{-webkit-appearance:none;appearance:none;width:.5rem;height:1.3rem;background:var(--color-text);border-radius:99px;cursor:url(${f}),auto;margin-top:-0.4rem;border:none}input[type=range]:focus{outline:none}button{outline:0;border:none;border-radius:8px;height:34px;font-size:13px;background-color:var(--color-hover);color:var(--color-text);padding:7px 14px;cursor:url(${f}),auto;transition:250ms;box-sizing:border-box}button:not(:disabled):hover{transition:0ms}button:not(:disabled):hover{background-color:var(--color-hover)}button:disabled{opacity:.4;cursor:url(${m}),auto}.toggle{position:relative;display:inline-block;width:45px;height:26px}.toggle input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:url(${f}),auto;top:0;left:0;right:0;bottom:0;background-color:var(--color-hover);transition:100ms;border-radius:32px;transition:250ms}.slider:not(:disabled):hover{transition:0ms}.slider:hover{background-color:var(--color-hover)}.slider:before{position:absolute;bottom:5px;left:5px;content:"";background-color:#fff;border-radius:50%;transition:100ms;height:16px;width:16px}input:checked+.slider{background-color:var(--color-toggles)}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px)}input:disabled+.slider{opacity:.4;cursor:url(${m}),auto}input:disabled+.slider:before{opacity:.4;cursor:url(${m}),auto}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:10px}a{cursor:url(${f}),auto;text-decoration:none;color:var(--color-links);font-weight:bold;user-select:auto;transition:250ms}a *{cursor:url(${f}),auto}a:hover{transition:0ms;text-decoration:underline}select{width:100%;font-size:14px;padding:0 4px;height:34px;border-radius:6px;background-color:var(--color-hover);color:var(--color-text);border:none;outline:none;border:1px solid var(--color-hover);transition:250ms}select:not(:disabled):hover{transition:0ms}select:focus{outline:none}select:disabled{cursor:url(${m}),auto}kbd{background-color:var(--color-background);border-bottom:2px solid var(--color-hover);padding:0px 3px;border-radius:3px;color:var(--color-text)}[data-tooltip]{position:relative}[data-tooltip]:before{display:block;opacity:0;pointer-events:none;position:absolute;z-index:100;background:var(--color-hover);color:var(--color-text);border-radius:max(.4vw,4px);border:1px solid var(--color-hover);content:attr(data-tooltip);font-size:14px;padding:6px 9px;top:36px;white-space:nowrap;transform:translate3d(0, -10px, 0);transition:transform 100ms ease-in-out,opacity 100ms ease-in-out;transition-delay:0;box-shadow:var(--shadow)}[data-tooltip][right-edge]:before{right:0px}[data-tooltip][left-edge]:before{left:0px}[data-tooltip]:not(:disabled):hover:before{opacity:1;transform:translate3d(0, 0, 0);transition-delay:100ms}[data-tooltip].open:before{transition-delay:0ms;opacity:0}@media only screen and (max-device-width: 641px){[data-tooltip]:before{display:none}}:root{--color-green: #56c756;--color-yellow: #e9ad3f;--color-orange: #e9833f;--color-red: #bb4949;--font-title: bold 1.2rem "Nunito", sans-serif;--font-default: 1rem "Nunito", sans-serif;--font-small: 0.8rem "Nunito", sans-serif}:root [data-theme=dark]{--color-background: #050608;--color-cards: #0c0d14;--color-cards-alt: #16171f;--color-hover: #1d1e27;--color-hover-alt: #21222c;--color-badge: #282e41;--color-badge-text: #8d9dbb;--color-text: #a5abb3;--color-text-muted: #6d7277;--color-toggles: #384a8b;--color-links: #384a8b;--color-lobby: #b3a38c;--color-white: white;--color-black: black;--shadow: none}:root [data-theme=light]{--color-background: #101116;--color-cards: #ffffff;--color-cards-alt: var(--color-cards);--color-hover: #ececec;--color-hover-alt: var(--color-hover);--color-badge: #aab0c4;--color-badge-text: #3a3a3a;--color-text: #353535;--color-toggles: #384a8b;--color-links: #384a8b;--color-lobby: #8a6f48;--color-white: black;--color-black: white;--shadow: rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px}::selection{background-color:var(--color-text);color:var(--color-hover)}::-webkit-scrollbar{display:none;width:8px;height:16px}::-webkit-scrollbar-track{background:rgba(0,0,0,0)}::-webkit-scrollbar-thumb{background:var(--color-hover);border-radius:max(.4vw,4px)}::-webkit-scrollbar-thumb:hover{background:var(--color-hover)}*{box-sizing:border-box}html{overflow:hidden;height:100%;width:100vw}html body{font-family:"Nunito",sans-serif;cursor:url(${_}),auto;user-select:none;position:relative;overflow:hidden;height:100%;width:100%;margin:0}html body>.app{position:relative;display:flex;width:100%;height:calc(100% - 48px);background:var(--color-background);color:var(--color-text);overflow:hidden;padding:max(.7vw,8px);gap:max(.7vw,8px)}html body>.app>.chat{display:flex;flex-direction:column;position:relative;padding:max(.7vw,8px);border-radius:max(.4vw,4px);box-shadow:var(--shadow);background-color:var(--color-cards)}html body>.app>.piano{display:flex;flex-direction:column;width:calc(100% - max(.7vw,8px)*3 - 20vw);height:100%}@media only screen and (max-device-width: 641px){body pv-header .title,body pv-header .divider,body pv-header .volume.icon,body pv-header .volume-slider{display:none !important}body .app>.chat{width:100% !important}body .app>.chat>*{width:100% !important}body .app>.piano{display:none !important}}@media only screen and (max-device-height: 480px){body>.app>.chat{display:none !important}body>.app>.piano{width:100% !important}}@media only screen and (max-device-height: 480px)and (max-device-width: 641px){body>.app>.chat{display:flex !important}}`,""]);const g=v},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,o,a,s){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(o)for(var r=0;r0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),a&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=a):d[4]="".concat(a)),t.push(d))}},t}},4417:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},1601:e=>{e.exports=function(e){return e[1]}},7007:e=>{var t,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(i,o){function a(i){e.removeListener(t,s),o(i)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",a),i([].slice.call(arguments))}m(e,t,s,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,a)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var n=10;function r(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,i,o){var a,s,n;if(r(i),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),s=e._events),n=s[t]),void 0===n)n=s[t]=i,++e._eventsCount;else if("function"==typeof n?n=s[t]=o?[i,n]:[n,i]:o?n.unshift(i):n.push(i),(a=l(e))>0&&n.length>a&&!n.warned){n.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=n.length,console&&console.warn}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,i){var o={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},a=d.bind(o);return a.listener=i,o.wrapFn=a,a}function u(e,t,i){var o=e._events;if(void 0===o)return[];var a=o[t];return void 0===a?[]:"function"==typeof a?i?[a.listener||a]:[a]:i?function(e){for(var t=new Array(e.length),i=0;i0&&(n=t[0]),n instanceof Error)throw n;var r=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw r.context=n,r}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,d=h(l,c);for(i=0;i=0;s--)if(i[s]===t||i[s].listener===t){n=i[s].listener,a=s;break}if(a<0)return this;0===a?i.shift():function(e,t){for(;t+1=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return u(this,e,!0)},s.prototype.rawListeners=function(e){return u(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6946:(e,t,i)=>{e.exports=i(4394)},4394:(e,t,i)=>{var o=t;function a(){o.util._configure(),o.Writer._configure(o.BufferWriter),o.Reader._configure(o.BufferReader)}o.build="minimal",o.Writer=i(3449),o.BufferWriter=i(818),o.Reader=i(6237),o.BufferReader=i(3158),o.util=i(3610),o.rpc=i(5047),o.roots=i(4529),o.configure=a,a()},6237:(e,t,i)=>{e.exports=l;var o,a=i(3610),s=a.LongBits,n=a.utf8;function r(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},p=function(){return a.Buffer?function(e){return(l.create=function(e){return a.Buffer.isBuffer(e)?new o(e):d(e)})(e)}:d};function u(){var e=new s(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function v(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw r(this,8);return new s(v(this.buf,this.pos+=4),v(this.buf,this.pos+=4))}l.create=p(),l.prototype._slice=a.Array.prototype.subarray||a.Array.prototype.slice,l.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return c}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return v(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw r(this,4);return 0|v(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=a.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=a.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw r(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,i);if(t===i){var o=a.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return n.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw r(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){o=e,l.create=p(),o._configure();var t=a.Long?"toLong":"toNumber";a.merge(l.prototype,{int64:function(){return u.call(this)[t](!1)},uint64:function(){return u.call(this)[t](!0)},sint64:function(){return u.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},3158:(e,t,i)=>{e.exports=s;var o=i(6237);(s.prototype=Object.create(o.prototype)).constructor=s;var a=i(3610);function s(e){o.call(this,e)}s._configure=function(){a.Buffer&&(s.prototype._slice=a.Buffer.prototype.slice)},s.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},s._configure()},4529:e=>{e.exports={}},5047:(e,t,i)=>{t.Service=i(7595)},7595:(e,t,i)=>{e.exports=a;var o=i(3610);function a(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");o.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}(a.prototype=Object.create(o.EventEmitter.prototype)).constructor=a,a.prototype.rpcCall=function e(t,i,a,s,n){if(!s)throw TypeError("request must be specified");var r=this;if(!n)return o.asPromise(e,r,t,i,a,s);if(r.rpcImpl)try{return r.rpcImpl(t,i[r.requestDelimited?"encodeDelimited":"encode"](s).finish(),(function(e,i){if(e)return r.emit("error",e,t),n(e);if(null!==i){if(!(i instanceof a))try{i=a[r.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return r.emit("error",e,t),n(e)}return r.emit("data",i,t),n(null,i)}r.end(!0)}))}catch(e){return r.emit("error",e,t),void setTimeout((function(){n(e)}),0)}else setTimeout((function(){n(Error("already ended"))}),0)},a.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2239:(e,t,i)=>{e.exports=a;var o=i(3610);function a(e,t){this.lo=e>>>0,this.hi=t>>>0}var s=a.zero=new a(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var n=a.zeroHash="\0\0\0\0\0\0\0\0";a.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var i=e>>>0,o=(e-i)/4294967296>>>0;return t&&(o=~o>>>0,i=~i>>>0,++i>4294967295&&(i=0,++o>4294967295&&(o=0))),new a(i,o)},a.from=function(e){if("number"==typeof e)return a.fromNumber(e);if(o.isString(e)){if(!o.Long)return a.fromNumber(parseInt(e,10));e=o.Long.fromString(e)}return e.low||e.high?new a(e.low>>>0,e.high>>>0):s},a.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+4294967296*i)}return this.lo+4294967296*this.hi},a.prototype.toLong=function(e){return o.Long?new o.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var r=String.prototype.charCodeAt;a.fromHash=function(e){return e===n?s:new a((r.call(e,0)|r.call(e,1)<<8|r.call(e,2)<<16|r.call(e,3)<<24)>>>0,(r.call(e,4)|r.call(e,5)<<8|r.call(e,6)<<16|r.call(e,7)<<24)>>>0)},a.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},a.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},a.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},a.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},3610:function(e,t,i){var o=t;function a(e,t,i){for(var o=Object.keys(t),a=0;a0)},o.Buffer=function(){try{var e=o.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),o._Buffer_from=null,o._Buffer_allocUnsafe=null,o.newBuffer=function(e){return"number"==typeof e?o.Buffer?o._Buffer_allocUnsafe(e):new o.Array(e):o.Buffer?o._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.Long=o.global.dcodeIO&&o.global.dcodeIO.Long||o.global.Long||o.inquire("long"),o.key2Re=/^true|false|0|1$/,o.key32Re=/^-?(?:0|[1-9][0-9]*)$/,o.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,o.longToHash=function(e){return e?o.LongBits.from(e).toHash():o.LongBits.zeroHash},o.longFromHash=function(e,t){var i=o.LongBits.fromHash(e);return o.Long?o.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},o.merge=a,o.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},o.newError=s,o.ProtocolError=s("ProtocolError"),o.oneOfGetter=function(e){for(var t={},i=0;i-1;--i)if(1===t[e[i]]&&void 0!==this[e[i]]&&null!==this[e[i]])return e[i]}},o.oneOfSetter=function(e){return function(t){for(var i=0;i{e.exports=p;var o,a=i(3610),s=a.LongBits,n=a.base64,r=a.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=void 0,this.val=i}function c(){}function d(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function p(){this.len=0,this.head=new l(c,0,0),this.tail=this.head,this.states=null}var u=function(){return a.Buffer?function(){return(p.create=function(){return new o})()}:function(){return new p}};function v(e,t,i){t[i]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function f(e,t,i){t[i]=255&e,t[i+1]=e>>>8&255,t[i+2]=e>>>16&255,t[i+3]=e>>>24}p.create=u(),p.alloc=function(e){return new a.Array(e)},a.Array!==Array&&(p.alloc=a.pool(p.alloc,a.Array.prototype.subarray)),p.prototype._push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},h.prototype=Object.create(l.prototype),h.prototype.fn=function(e,t,i){for(;e>127;)t[i++]=127&e|128,e>>>=7;t[i]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return e<0?this._push(m,10,s.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=s.from(e);return this._push(m,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=s.from(e).zzEncode();return this._push(m,t.length(),t)},p.prototype.bool=function(e){return this._push(v,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(f,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=s.from(e);return this._push(f,4,t.lo)._push(f,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(a.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(a.float.writeDoubleLE,8,e)};var _=a.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var o=0;o>>0;if(!t)return this._push(v,1,0);if(a.isString(e)){var i=p.alloc(t=n.length(e));n.decode(e,i,0),e=i}return this.uint32(t)._push(_,t,e)},p.prototype.string=function(e){var t=r.length(e);return t?this.uint32(t)._push(r.write,t,e):this._push(v,1,0)},p.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new l(c,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(c,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},p._configure=function(e){o=e,p.create=u(),o._configure()}},818:(e,t,i)=>{e.exports=s;var o=i(3449);(s.prototype=Object.create(o.prototype)).constructor=s;var a=i(3610);function s(){o.call(this)}function n(e,t,i){e.length<40?a.utf8.write(e,t,i):t.utf8Write?t.utf8Write(e,i):t.write(e,i)}s._configure=function(){s.alloc=a._Buffer_allocUnsafe,s.writeBytesBuffer=a.Buffer&&a.Buffer.prototype instanceof Uint8Array&&"set"===a.Buffer.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var o=0;o>>0;return this.uint32(t),t&&this._push(s.writeBytesBuffer,t,e),this},s.prototype.string=function(e){var t=a.Buffer.byteLength(e);return this.uint32(t),t&&this._push(n,t,e),this},s._configure()},5072:e=>{var t=[];function i(e){for(var i=-1,o=0;o{var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,i)=>{e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var o="";i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var a=void 0!==i.layer;a&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,a&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}");var s=i.sourceMap;s&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1873:(e,t,i)=>{e.exports=i.p+"5dd1fe40dbea45cd26d2.cur"},9662:(e,t,i)=>{e.exports=i.p+"88b4a467a18e813218f8.cur"},9738:(e,t,i)=>{e.exports=i.p+"c7283f73cbd89e54a615.cur"},4675:(e,t,i)=>{e.exports=i.p+"27f230d7609eeee55225.cur"}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var o=i.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=i[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),__webpack_require__.b=document.baseURI||self.location.href,__webpack_require__.nc=void 0;var __webpack_exports__={},injectStylesIntoStyleTag=__webpack_require__(5072),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),styleDomAPI=__webpack_require__(7825),styleDomAPI_default=__webpack_require__.n(styleDomAPI),insertBySelector=__webpack_require__(7659),insertBySelector_default=__webpack_require__.n(insertBySelector),setAttributesWithoutAttributes=__webpack_require__(5056),setAttributesWithoutAttributes_default=__webpack_require__.n(setAttributesWithoutAttributes),insertStyleElement=__webpack_require__(540),insertStyleElement_default=__webpack_require__.n(insertStyleElement),styleTagTransform=__webpack_require__(1113),styleTagTransform_default=__webpack_require__.n(styleTagTransform),style=__webpack_require__(2100),options={};options.styleTagTransform=styleTagTransform_default(),options.setAttributes=setAttributesWithoutAttributes_default(),options.insert=insertBySelector_default().bind(null,"head"),options.domAPI=styleDomAPI_default(),options.insertStyleElement=insertStyleElement_default();var update=injectStylesIntoStyleTag_default()(style.A,options);const scss_style=style.A&&style.A.locals?style.A.locals:void 0;function toCamelCase(e){return e.replace(/_([a-z])/g,(e=>e[1].toUpperCase()))}function escapeHtml(e){const t=document.createElement("p");return t.appendChild(document.createTextNode(e)),t.innerHTML}function hsl2hex(e,t,i){i/=100;const o=t*Math.min(i,1-i)/100,a=t=>{const a=(t+e/30)%12,s=i-o*Math.max(Math.min(a-3,9-a,1),-1);return Math.round(255*s).toString(16).padStart(2,"0")};return`#${a(0)}${a(8)}${a(4)}`}function isLobby(e){return!!e.match(/^Lobby(?: [2-9])?$|^Backrooms$/)}class PvComponent extends HTMLElement{constructor(){super()}attributeChangedCallback(e,t,i){var o;this.isConnected&&(null===(o=this[toCamelCase(`on_${e}_change`)])||void 0===o||o.call(this,i))}}PvComponent.observedAttributes=[];const pv_component=PvComponent,format=e=>e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),child=(e,t)=>({get(){return this.querySelector(`.${format(t.name.toString())}`)}}),decorators_child=child;var code='
Loading, please wait...
';const pv_loader=code;var pv_loader_pv_loader=__webpack_require__(5146),pv_loader_options={};pv_loader_options.styleTagTransform=styleTagTransform_default(),pv_loader_options.setAttributes=setAttributesWithoutAttributes_default(),pv_loader_options.insert=insertBySelector_default().bind(null,"head"),pv_loader_options.domAPI=styleDomAPI_default(),pv_loader_options.insertStyleElement=insertStyleElement_default();var pv_loader_update=injectStylesIntoStyleTag_default()(pv_loader_pv_loader.A,pv_loader_options);const components_pv_loader_pv_loader=pv_loader_pv_loader.A&&pv_loader_pv_loader.A.locals?pv_loader_pv_loader.A.locals:void 0;var __esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},__runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o=pv_component,a=[],s=[];return e=class extends o{get caption(){return __classPrivateFieldGet(this,t,"f")}set caption(e){__classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(__runInitializers(this,a),__runInitializers(this,s,void 0))),this.innerHTML=pv_loader}setCaption(e){this.caption.textContent=e||"Loading, please wait..."}},t=new WeakMap,(()=>{var t;const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=o[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],__esDecorate(e,null,i,{kind:"accessor",name:"caption",static:!1,private:!1,access:{has:e=>"caption"in e,get:e=>e.caption,set:(e,t)=>{e.caption=t}},metadata:n},s,a),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e})();const src_components_pv_loader_pv_loader=PvLoader;function bind(e,t){t.addInitializer((function(){this[t.name]=this[t.name].bind(this)}))}customElements.define("pv-loader",PvLoader);var pv_popup=__webpack_require__(4912),pv_popup_options={};pv_popup_options.styleTagTransform=styleTagTransform_default(),pv_popup_options.setAttributes=setAttributesWithoutAttributes_default(),pv_popup_options.insert=insertBySelector_default().bind(null,"head"),pv_popup_options.domAPI=styleDomAPI_default(),pv_popup_options.insertStyleElement=insertStyleElement_default();var pv_popup_update=injectStylesIntoStyleTag_default()(pv_popup.A,pv_popup_options);const pv_popup_pv_popup=pv_popup.A&&pv_popup.A.locals?pv_popup.A.locals:void 0;var pv_popup_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_popup_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n,r=pv_component,l=[],c=[],d=[];return e=class extends r{get popup(){return pv_popup_classPrivateFieldGet(this,t,"f")}set popup(e){pv_popup_classPrivateFieldSet(this,t,e,"f")}get x(){return pv_popup_classPrivateFieldGet(this,i,"f")}set x(e){pv_popup_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_popup_runInitializers(this,l),pv_popup_runInitializers(this,c,void 0))),i.set(this,pv_popup_runInitializers(this,d,void 0))}onClose(){}onOpen(...e){}onClosing(e){this.closingCallback=e}isOpen(){var e;return null===(e=this.popup)||void 0===e?void 0:e.hasAttribute("open")}open(e,...t){this.args=t,this.anchor=e,this.anchor?(this.popup.show(),this.reposition(this.anchor)):this.popup.showModal()}reposition(e){const t=e.getBoundingClientRect();let i=0,o=t.left+t.width/2-this.popup.clientWidth/2,a=t.top+t.height+16;o<8&&(i=8-o,o=8),o+this.popup.clientWidth>window.innerWidth&&(i=window.innerWidth-o-this.popup.clientWidth-8,o=window.innerWidth-this.popup.clientWidth-8),this.popup.hasAttribute("left-edge")&&(o=t.left-8),this.popup.hasAttribute("right-edge")&&(o=t.left+t.width+8-this.popup.clientWidth),this.popup.style.marginLeft=`${o}px`,this.popup.style.marginTop=`${a}px`,this.popup.style.setProperty("--offset",`${i}px`)}close(){var e;null===(e=this.closingCallback)||void 0===e||e.call(this),this.popup.setAttribute("closing",""),this.popup.addEventListener("animationend",(()=>{this.popup.removeAttribute("closing"),this.popup.close(),document.body.removeEventListener("mousedown",this.onMouseDown),this.onClose(),this.remove()}),{once:!0})}connectedCallback(){var e;this.popup.addEventListener("keydown",(e=>{e.stopPropagation(),"Escape"===e.key&&(e.preventDefault(),this.popup.hasAttribute("blocking")||this.close())})),null===(e=this.x)||void 0===e||e.addEventListener("click",this.close),new MutationObserver((e=>{this.isOpen()&&e.some((e=>"attributes"===e.type&&"open"===e.attributeName))&&(document.body.addEventListener("mousedown",this.onMouseDown),this.onOpen(...this.args))})).observe(this.popup,{attributes:!0})}onMouseDown(e){var t;const i=this.popup.getBoundingClientRect();this.isOpen()&&"OPTION"!==e.target.tagName&&!this.popup.hasAttribute("blocking")&&!(null===(t=this.anchor)||void 0===t?void 0:t.contains(e.target))&&(e.clientXi.right||e.clientYi.bottom)&&this.close()}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=r[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],n=[bind],pv_popup_esDecorate(e,null,o,{kind:"accessor",name:"popup",static:!1,private:!1,access:{has:e=>"popup"in e,get:e=>e.popup,set:(e,t)=>{e.popup=t}},metadata:i},c,l),pv_popup_esDecorate(e,null,a,{kind:"accessor",name:"x",static:!1,private:!1,access:{has:e=>"x"in e,get:e=>e.x,set:(e,t)=>{e.x=t}},metadata:i},d,l),pv_popup_esDecorate(e,null,s,{kind:"method",name:"close",static:!1,private:!1,access:{has:e=>"close"in e,get:e=>e.close},metadata:i},null,l),pv_popup_esDecorate(e,null,n,{kind:"method",name:"onMouseDown",static:!1,private:!1,access:{has:e=>"onMouseDown"in e,get:e=>e.onMouseDown},metadata:i},null,l),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_pv_popup_pv_popup=PvPopup;class SettingsManager{constructor(){this.settings=new Map,this.callbacks=new Map}notifyChange(e,t){const i=this.callbacks.get(e)||[];for(const e of i)e(t)}restore(){const e=localStorage.getItem("settings");if(e){this.settings=new Map(JSON.parse(e));for(const[e,t]of this.settings)this.notifyChange(e,t)}}save(){localStorage.setItem("settings",JSON.stringify(Array.from(this.settings)))}setDefault(e,t){this.settings.has(e)||(this.settings.set(e,t),this.notifyChange(e,t))}set(e,t){this.settings.set(e,t),this.notifyChange(e,t),this.save()}get(e){var t;return null!==(t=this.settings.get(e))&&void 0!==t&&t}has(e){return this.settings.has(e)}on(e,t){const i=this.callbacks.get(e)||[];i.push(t),this.callbacks.set(e,i)}remove(e){this.settings.delete(e),this.save()}}const settings=new SettingsManager,settingsmanager=settings;var pv_transpose_code='
Press 🠉, 🠋, 🠈, 🠊 to transpose while playing.
';const pv_transpose=pv_transpose_code;var pv_transpose_pv_transpose=__webpack_require__(7030),pv_transpose_options={};pv_transpose_options.styleTagTransform=styleTagTransform_default(),pv_transpose_options.setAttributes=setAttributesWithoutAttributes_default(),pv_transpose_options.insert=insertBySelector_default().bind(null,"head"),pv_transpose_options.domAPI=styleDomAPI_default(),pv_transpose_options.insertStyleElement=insertStyleElement_default();var pv_transpose_update=injectStylesIntoStyleTag_default()(pv_transpose_pv_transpose.A,pv_transpose_options);const popups_pv_transpose_pv_transpose=pv_transpose_pv_transpose.A&&pv_transpose_pv_transpose.A.locals?pv_transpose_pv_transpose.A.locals:void 0;var pv_transpose_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_transpose_classPrivateFieldGet=function(e,t,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(e):o?o.value:t.get(e)},pv_transpose_classPrivateFieldSet=function(e,t,i,o,a){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?a.call(e,i):a?a.value=i:t.set(e,i),i};let PvTranspose=(()=>{var e,t,i,o;let a,s,n,r,l,c=components_pv_popup_pv_popup,d=[],p=[],u=[],v=[];return e=class extends c{get minus(){return pv_transpose_classPrivateFieldGet(this,t,"f")}set minus(e){pv_transpose_classPrivateFieldSet(this,t,e,"f")}get number(){return pv_transpose_classPrivateFieldGet(this,i,"f")}set number(e){pv_transpose_classPrivateFieldSet(this,i,e,"f")}get plus(){return pv_transpose_classPrivateFieldGet(this,o,"f")}set plus(e){pv_transpose_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),this.MIN=(pv_transpose_runInitializers(this,d),-36),this.MAX=36,t.set(this,pv_transpose_runInitializers(this,p,void 0)),i.set(this,pv_transpose_runInitializers(this,u,void 0)),o.set(this,pv_transpose_runInitializers(this,v,void 0)),this.innerHTML=pv_transpose,this.value=settingsmanager.get("transpose"),settingsmanager.on("transpose",(e=>this.value=e))}onOpen(){this.number.value=this.value.toString(),settingsmanager.on("transpose",(e=>this.number.value=e)),this.number.addEventListener("input",(()=>{isNaN(parseInt(this.number.value))||(parseInt(this.number.value)>this.MAX?this.number.value=this.MAX.toString():parseInt(this.number.value){this.decrease();const e=setInterval(this.decrease,100);document.addEventListener("pointerup",(()=>clearInterval(e)),{once:!0})})),this.plus.addEventListener("pointerdown",(()=>{this.increase();const e=setInterval(this.increase,100);document.addEventListener("pointerup",(()=>clearInterval(e)),{once:!0})}))}decrease(){this.value>this.MIN&&settingsmanager.set("transpose",this.value-1)}increase(){this.value{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_child],r=[bind],l=[bind],pv_transpose_esDecorate(e,null,a,{kind:"accessor",name:"minus",static:!1,private:!1,access:{has:e=>"minus"in e,get:e=>e.minus,set:(e,t)=>{e.minus=t}},metadata:i},p,d),pv_transpose_esDecorate(e,null,s,{kind:"accessor",name:"number",static:!1,private:!1,access:{has:e=>"number"in e,get:e=>e.number,set:(e,t)=>{e.number=t}},metadata:i},u,d),pv_transpose_esDecorate(e,null,n,{kind:"accessor",name:"plus",static:!1,private:!1,access:{has:e=>"plus"in e,get:e=>e.plus,set:(e,t)=>{e.plus=t}},metadata:i},v,d),pv_transpose_esDecorate(e,null,r,{kind:"method",name:"decrease",static:!1,private:!1,access:{has:e=>"decrease"in e,get:e=>e.decrease},metadata:i},null,d),pv_transpose_esDecorate(e,null,l,{kind:"method",name:"increase",static:!1,private:!1,access:{has:e=>"increase"in e,get:e=>e.increase},metadata:i},null,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_transpose_pv_transpose=PvTranspose;customElements.define("pv-transpose",PvTranspose);var pv_velocity_code='
Press and to change velocity while playing.
';const pv_velocity=pv_velocity_code;var pv_velocity_pv_velocity=__webpack_require__(9952),pv_velocity_options={};pv_velocity_options.styleTagTransform=styleTagTransform_default(),pv_velocity_options.setAttributes=setAttributesWithoutAttributes_default(),pv_velocity_options.insert=insertBySelector_default().bind(null,"head"),pv_velocity_options.domAPI=styleDomAPI_default(),pv_velocity_options.insertStyleElement=insertStyleElement_default();var pv_velocity_update=injectStylesIntoStyleTag_default()(pv_velocity_pv_velocity.A,pv_velocity_options);const popups_pv_velocity_pv_velocity=pv_velocity_pv_velocity.A&&pv_velocity_pv_velocity.A.locals?pv_velocity_pv_velocity.A.locals:void 0;var pv_velocity_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_velocity_classPrivateFieldGet=function(e,t,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(e):o?o.value:t.get(e)},pv_velocity_classPrivateFieldSet=function(e,t,i,o,a){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?a.call(e,i):a?a.value=i:t.set(e,i),i};let PvVelocity=(()=>{var e,t,i,o;let a,s,n,r,l,c=components_pv_popup_pv_popup,d=[],p=[],u=[],v=[];return e=class extends c{get minus(){return pv_velocity_classPrivateFieldGet(this,t,"f")}set minus(e){pv_velocity_classPrivateFieldSet(this,t,e,"f")}get number(){return pv_velocity_classPrivateFieldGet(this,i,"f")}set number(e){pv_velocity_classPrivateFieldSet(this,i,e,"f")}get plus(){return pv_velocity_classPrivateFieldGet(this,o,"f")}set plus(e){pv_velocity_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),this.MIN=(pv_velocity_runInitializers(this,d),1),this.MAX=127,t.set(this,pv_velocity_runInitializers(this,p,void 0)),i.set(this,pv_velocity_runInitializers(this,u,void 0)),o.set(this,pv_velocity_runInitializers(this,v,void 0)),this.innerHTML=pv_velocity,this.value=settingsmanager.get("velocity"),settingsmanager.on("velocity",(e=>this.value=e))}onOpen(){this.number.value=this.value.toString(),settingsmanager.on("velocity",(e=>this.number.value=e)),this.number.addEventListener("input",(()=>{isNaN(parseInt(this.number.value))||(parseInt(this.number.value)>this.MAX?this.number.value=this.MAX.toString():parseInt(this.number.value){this.decrease();const e=setInterval(this.decrease,100);document.addEventListener("pointerup",(()=>clearInterval(e)),{once:!0})})),this.plus.addEventListener("pointerdown",(()=>{this.increase();const e=setInterval(this.increase,100);document.addEventListener("pointerup",(()=>clearInterval(e)),{once:!0})}))}decrease(){this.value>this.MIN&&settingsmanager.set("velocity",this.value-1)}increase(){this.value{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_child],r=[bind],l=[bind],pv_velocity_esDecorate(e,null,a,{kind:"accessor",name:"minus",static:!1,private:!1,access:{has:e=>"minus"in e,get:e=>e.minus,set:(e,t)=>{e.minus=t}},metadata:i},p,d),pv_velocity_esDecorate(e,null,s,{kind:"accessor",name:"number",static:!1,private:!1,access:{has:e=>"number"in e,get:e=>e.number,set:(e,t)=>{e.number=t}},metadata:i},u,d),pv_velocity_esDecorate(e,null,n,{kind:"accessor",name:"plus",static:!1,private:!1,access:{has:e=>"plus"in e,get:e=>e.plus,set:(e,t)=>{e.plus=t}},metadata:i},v,d),pv_velocity_esDecorate(e,null,r,{kind:"method",name:"decrease",static:!1,private:!1,access:{has:e=>"decrease"in e,get:e=>e.decrease},metadata:i},null,d),pv_velocity_esDecorate(e,null,l,{kind:"method",name:"increase",static:!1,private:!1,access:{has:e=>"increase"in e,get:e=>e.increase},metadata:i},null,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_velocity_pv_velocity=PvVelocity;customElements.define("pv-velocity",PvVelocity);var pv_settings_code='
Settings
';const pv_settings=pv_settings_code;var pv_settings_pv_settings=__webpack_require__(672),pv_settings_options={};pv_settings_options.styleTagTransform=styleTagTransform_default(),pv_settings_options.setAttributes=setAttributesWithoutAttributes_default(),pv_settings_options.insert=insertBySelector_default().bind(null,"head"),pv_settings_options.domAPI=styleDomAPI_default(),pv_settings_options.insertStyleElement=insertStyleElement_default();var pv_settings_update=injectStylesIntoStyleTag_default()(pv_settings_pv_settings.A,pv_settings_options);const popups_pv_settings_pv_settings=pv_settings_pv_settings.A&&pv_settings_pv_settings.A.locals?pv_settings_pv_settings.A.locals:void 0;var pv_settings_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_settings_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a;let s,n,r,l,c=components_pv_popup_pv_popup,d=[],p=[],u=[],v=[],h=[];return e=class extends c{get keyboardLayout(){return pv_settings_classPrivateFieldGet(this,t,"f")}set keyboardLayout(e){pv_settings_classPrivateFieldSet(this,t,e,"f")}get showEffects(){return pv_settings_classPrivateFieldGet(this,i,"f")}set showEffects(e){pv_settings_classPrivateFieldSet(this,i,e,"f")}get showCursors(){return pv_settings_classPrivateFieldGet(this,o,"f")}set showCursors(e){pv_settings_classPrivateFieldSet(this,o,e,"f")}get showLabels(){return pv_settings_classPrivateFieldGet(this,a,"f")}set showLabels(e){pv_settings_classPrivateFieldSet(this,a,e,"f")}constructor(){super(),t.set(this,(pv_settings_runInitializers(this,d),pv_settings_runInitializers(this,p,void 0))),i.set(this,pv_settings_runInitializers(this,u,void 0)),o.set(this,pv_settings_runInitializers(this,v,void 0)),a.set(this,pv_settings_runInitializers(this,h,void 0)),this.innerHTML=pv_settings,this.keyboardLayout.value=settingsmanager.get("keyboardLayout")||"pianoverse",this.showCursors.checked=settingsmanager.get("showCursors"),this.showEffects.checked=settingsmanager.get("showEffects"),this.showLabels.checked=settingsmanager.get("showLabels")}connectedCallback(){super.connectedCallback(),this.keyboardLayout.addEventListener("change",(()=>{settingsmanager.set("keyboardLayout",this.keyboardLayout.value)})),this.showEffects.addEventListener("change",(()=>{settingsmanager.set("showEffects",this.showEffects.checked)})),this.showCursors.addEventListener("change",(()=>{settingsmanager.set("showCursors",this.showCursors.checked)})),this.showLabels.addEventListener("change",(()=>{settingsmanager.set("showLabels",this.showLabels.checked)}))}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;s=[decorators_child],n=[decorators_child],r=[decorators_child],l=[decorators_child],pv_settings_esDecorate(e,null,s,{kind:"accessor",name:"keyboardLayout",static:!1,private:!1,access:{has:e=>"keyboardLayout"in e,get:e=>e.keyboardLayout,set:(e,t)=>{e.keyboardLayout=t}},metadata:i},p,d),pv_settings_esDecorate(e,null,n,{kind:"accessor",name:"showEffects",static:!1,private:!1,access:{has:e=>"showEffects"in e,get:e=>e.showEffects,set:(e,t)=>{e.showEffects=t}},metadata:i},u,d),pv_settings_esDecorate(e,null,r,{kind:"accessor",name:"showCursors",static:!1,private:!1,access:{has:e=>"showCursors"in e,get:e=>e.showCursors,set:(e,t)=>{e.showCursors=t}},metadata:i},v,d),pv_settings_esDecorate(e,null,l,{kind:"accessor",name:"showLabels",static:!1,private:!1,access:{has:e=>"showLabels"in e,get:e=>e.showLabels,set:(e,t)=>{e.showLabels=t}},metadata:i},h,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_settings_pv_settings=PvSettings;customElements.define("pv-settings",PvSettings);var pv_notification_code='
';const pv_notification=pv_notification_code;var pv_notification_pv_notification=__webpack_require__(8728),pv_notification_options={};pv_notification_options.styleTagTransform=styleTagTransform_default(),pv_notification_options.setAttributes=setAttributesWithoutAttributes_default(),pv_notification_options.insert=insertBySelector_default().bind(null,"head"),pv_notification_options.domAPI=styleDomAPI_default(),pv_notification_options.insertStyleElement=insertStyleElement_default();var pv_notification_update=injectStylesIntoStyleTag_default()(pv_notification_pv_notification.A,pv_notification_options);const components_pv_notification_pv_notification=pv_notification_pv_notification.A&&pv_notification_pv_notification.A.locals?pv_notification_pv_notification.A.locals:void 0;var pv_notification_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_notification_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a;let s,n,r,l,c=pv_component,d=[],p=[],u=[],v=[],h=[];return e=class extends c{get notificationIcon(){return pv_notification_classPrivateFieldGet(this,t,"f")}set notificationIcon(e){pv_notification_classPrivateFieldSet(this,t,e,"f")}get notificationTitle(){return pv_notification_classPrivateFieldGet(this,i,"f")}set notificationTitle(e){pv_notification_classPrivateFieldSet(this,i,e,"f")}get notificationText(){return pv_notification_classPrivateFieldGet(this,o,"f")}set notificationText(e){pv_notification_classPrivateFieldSet(this,o,e,"f")}get notificationBar(){return pv_notification_classPrivateFieldGet(this,a,"f")}set notificationBar(e){pv_notification_classPrivateFieldSet(this,a,e,"f")}constructor(e,s,n,r=0){super(),t.set(this,(pv_notification_runInitializers(this,d),pv_notification_runInitializers(this,p,void 0))),i.set(this,pv_notification_runInitializers(this,u,void 0)),o.set(this,pv_notification_runInitializers(this,v,void 0)),a.set(this,pv_notification_runInitializers(this,h,void 0)),this.innerHTML=pv_notification,this.notificationTitle.textContent=s,this.notificationText.textContent=n,this.timeout=r;const l=this.notificationIcon.querySelector("i");switch(l.className="fa",e){case NotificationLevel.INFO:l.classList.add("fa-circle-info");break;case NotificationLevel.SUCCESS:l.classList.add("fa-circle-check"),l.classList.add("success");break;case NotificationLevel.WARNING:l.classList.add("fa-circle-exclamation"),l.classList.add("warning");break;case NotificationLevel.ERROR:l.classList.add("fa-circle-xmark"),l.classList.add("error")}}connectedCallback(){this.timeout>0?(this.notificationBar.style.opacity="1",this.notificationBar.style.animationDuration=`${this.timeout}s`,this.notificationBar.addEventListener("animationend",(e=>e.stopPropagation())),setTimeout((()=>this.close()),1e3*this.timeout)):setTimeout((()=>this.close()),3e5),this.addEventListener("click",(()=>this.close()))}close(){this.classList.add("closing"),this.addEventListener("animationend",(()=>this.remove()))}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;s=[decorators_child],n=[decorators_child],r=[decorators_child],l=[decorators_child],pv_notification_esDecorate(e,null,s,{kind:"accessor",name:"notificationIcon",static:!1,private:!1,access:{has:e=>"notificationIcon"in e,get:e=>e.notificationIcon,set:(e,t)=>{e.notificationIcon=t}},metadata:i},p,d),pv_notification_esDecorate(e,null,n,{kind:"accessor",name:"notificationTitle",static:!1,private:!1,access:{has:e=>"notificationTitle"in e,get:e=>e.notificationTitle,set:(e,t)=>{e.notificationTitle=t}},metadata:i},u,d),pv_notification_esDecorate(e,null,r,{kind:"accessor",name:"notificationText",static:!1,private:!1,access:{has:e=>"notificationText"in e,get:e=>e.notificationText,set:(e,t)=>{e.notificationText=t}},metadata:i},v,d),pv_notification_esDecorate(e,null,l,{kind:"accessor",name:"notificationBar",static:!1,private:!1,access:{has:e=>"notificationBar"in e,get:e=>e.notificationBar,set:(e,t)=>{e.notificationBar=t}},metadata:i},h,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const common_components_pv_notification_pv_notification=PvNotification;var NotificationLevel;customElements.define("pv-notification",PvNotification),function(e){e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(NotificationLevel||(NotificationLevel={}));class NotificationManager{static info(e,t,i){const o=new common_components_pv_notification_pv_notification(NotificationLevel.INFO,e,t,i),a=document.getElementById("notifications");return null==a||a.insertBefore(o,a.firstChild),o}static success(e,t,i){const o=new common_components_pv_notification_pv_notification(NotificationLevel.SUCCESS,e,t,i),a=document.getElementById("notifications");return null==a||a.insertBefore(o,a.firstChild),o}static warning(e,t,i){const o=new common_components_pv_notification_pv_notification(NotificationLevel.WARNING,e,t,i),a=document.getElementById("notifications");return null==a||a.insertBefore(o,a.firstChild),o}static error(e,t,i){const o=new common_components_pv_notification_pv_notification(NotificationLevel.ERROR,e,t,i),a=document.getElementById("notifications");return null==a||a.insertBefore(o,a.firstChild),o}}var minimal=__webpack_require__(6946);const protobufPackage="pianoverse";var Role,pianoverse_NotificationLevel,ServerMessage_Event,ClientMessage_Event;function roleFromJSON(e){switch(e){case 0:case"USER":return Role.USER;case 1:case"MODERATOR":return Role.MODERATOR;case 2:case"DEVELOPER":return Role.DEVELOPER;default:return Role.UNRECOGNIZED}}function roleToJSON(e){switch(e){case Role.USER:return"USER";case Role.MODERATOR:return"MODERATOR";case Role.DEVELOPER:return"DEVELOPER";case Role.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function notificationLevelFromJSON(e){switch(e){case 0:case"INFO":return pianoverse_NotificationLevel.INFO;case 1:case"SUCCESS":return pianoverse_NotificationLevel.SUCCESS;case 2:case"WARNING":return pianoverse_NotificationLevel.WARNING;case 3:case"ERROR":return pianoverse_NotificationLevel.ERROR;default:return pianoverse_NotificationLevel.UNRECOGNIZED}}function notificationLevelToJSON(e){switch(e){case pianoverse_NotificationLevel.INFO:return"INFO";case pianoverse_NotificationLevel.SUCCESS:return"SUCCESS";case pianoverse_NotificationLevel.WARNING:return"WARNING";case pianoverse_NotificationLevel.ERROR:return"ERROR";case pianoverse_NotificationLevel.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function serverMessage_EventFromJSON(e){switch(e){case 0:case"CLEAR":return ServerMessage_Event.CLEAR;case 1:case"PONG":return ServerMessage_Event.PONG;case 2:case"CHAT":return ServerMessage_Event.CHAT;case 3:case"ROOMS":return ServerMessage_Event.ROOMS;case 4:case"WELCOME":return ServerMessage_Event.WELCOME;case 5:case"MOVE":return ServerMessage_Event.MOVE;case 6:case"PRESS":return ServerMessage_Event.PRESS;case 7:case"RELEASE":return ServerMessage_Event.RELEASE;case 8:case"SUSTAIN":return ServerMessage_Event.SUSTAIN;case 9:case"PROFILE":return ServerMessage_Event.PROFILE;case 10:case"JOIN":return ServerMessage_Event.JOIN;case 11:case"LEAVE":return ServerMessage_Event.LEAVE;case 12:case"RATELIMIT":return ServerMessage_Event.RATELIMIT;case 13:case"POPUP":return ServerMessage_Event.POPUP;case 14:case"CHOWN":return ServerMessage_Event.CHOWN;case 15:case"NOTIFICATION":return ServerMessage_Event.NOTIFICATION;default:return ServerMessage_Event.UNRECOGNIZED}}function serverMessage_EventToJSON(e){switch(e){case ServerMessage_Event.CLEAR:return"CLEAR";case ServerMessage_Event.PONG:return"PONG";case ServerMessage_Event.CHAT:return"CHAT";case ServerMessage_Event.ROOMS:return"ROOMS";case ServerMessage_Event.WELCOME:return"WELCOME";case ServerMessage_Event.MOVE:return"MOVE";case ServerMessage_Event.PRESS:return"PRESS";case ServerMessage_Event.RELEASE:return"RELEASE";case ServerMessage_Event.SUSTAIN:return"SUSTAIN";case ServerMessage_Event.PROFILE:return"PROFILE";case ServerMessage_Event.JOIN:return"JOIN";case ServerMessage_Event.LEAVE:return"LEAVE";case ServerMessage_Event.RATELIMIT:return"RATELIMIT";case ServerMessage_Event.POPUP:return"POPUP";case ServerMessage_Event.CHOWN:return"CHOWN";case ServerMessage_Event.NOTIFICATION:return"NOTIFICATION";case ServerMessage_Event.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function clientMessage_EventFromJSON(e){switch(e){case 0:case"CHOWN":return ClientMessage_Event.CHOWN;case 1:case"PING":return ClientMessage_Event.PING;case 2:case"ROOM":return ClientMessage_Event.ROOM;case 3:case"PROFILE":return ClientMessage_Event.PROFILE;case 4:case"CHAT":return ClientMessage_Event.CHAT;case 5:case"MOVE":return ClientMessage_Event.MOVE;case 6:case"MUTE":return ClientMessage_Event.MUTE;case 7:case"UNMUTE":return ClientMessage_Event.UNMUTE;case 8:case"KICK":return ClientMessage_Event.KICK;case 9:case"PRESS":return ClientMessage_Event.PRESS;case 10:case"RELEASE":return ClientMessage_Event.RELEASE;case 11:case"SUSTAIN":return ClientMessage_Event.SUSTAIN;case 12:case"HEARTBEAT":return ClientMessage_Event.HEARTBEAT;case 13:case"BAN":return ClientMessage_Event.BAN;case 14:case"MOD":return ClientMessage_Event.MOD;case 15:case"UNMOD":return ClientMessage_Event.UNMOD;case 16:case"IPBAN":return ClientMessage_Event.IPBAN;default:return ClientMessage_Event.UNRECOGNIZED}}function clientMessage_EventToJSON(e){switch(e){case ClientMessage_Event.CHOWN:return"CHOWN";case ClientMessage_Event.PING:return"PING";case ClientMessage_Event.ROOM:return"ROOM";case ClientMessage_Event.PROFILE:return"PROFILE";case ClientMessage_Event.CHAT:return"CHAT";case ClientMessage_Event.MOVE:return"MOVE";case ClientMessage_Event.MUTE:return"MUTE";case ClientMessage_Event.UNMUTE:return"UNMUTE";case ClientMessage_Event.KICK:return"KICK";case ClientMessage_Event.PRESS:return"PRESS";case ClientMessage_Event.RELEASE:return"RELEASE";case ClientMessage_Event.SUSTAIN:return"SUSTAIN";case ClientMessage_Event.HEARTBEAT:return"HEARTBEAT";case ClientMessage_Event.BAN:return"BAN";case ClientMessage_Event.MOD:return"MOD";case ClientMessage_Event.UNMOD:return"UNMOD";case ClientMessage_Event.IPBAN:return"IPBAN";case ClientMessage_Event.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function createBaseServerMessage(){return{clear:void 0,event:0,pong:void 0,chat:void 0,rooms:[],welcome:void 0,move:void 0,press:void 0,release:void 0,sustain:void 0,profile:void 0,join:void 0,leave:"",ratelimit:0,popup:"",chown:"",notification:void 0}}!function(e){e[e.USER=0]="USER",e[e.MODERATOR=1]="MODERATOR",e[e.DEVELOPER=2]="DEVELOPER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(Role||(Role={})),function(e){e[e.INFO=0]="INFO",e[e.SUCCESS=1]="SUCCESS",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(pianoverse_NotificationLevel||(pianoverse_NotificationLevel={})),function(e){e[e.CLEAR=0]="CLEAR",e[e.PONG=1]="PONG",e[e.CHAT=2]="CHAT",e[e.ROOMS=3]="ROOMS",e[e.WELCOME=4]="WELCOME",e[e.MOVE=5]="MOVE",e[e.PRESS=6]="PRESS",e[e.RELEASE=7]="RELEASE",e[e.SUSTAIN=8]="SUSTAIN",e[e.PROFILE=9]="PROFILE",e[e.JOIN=10]="JOIN",e[e.LEAVE=11]="LEAVE",e[e.RATELIMIT=12]="RATELIMIT",e[e.POPUP=13]="POPUP",e[e.CHOWN=14]="CHOWN",e[e.NOTIFICATION=15]="NOTIFICATION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(ServerMessage_Event||(ServerMessage_Event={})),function(e){e[e.CHOWN=0]="CHOWN",e[e.PING=1]="PING",e[e.ROOM=2]="ROOM",e[e.PROFILE=3]="PROFILE",e[e.CHAT=4]="CHAT",e[e.MOVE=5]="MOVE",e[e.MUTE=6]="MUTE",e[e.UNMUTE=7]="UNMUTE",e[e.KICK=8]="KICK",e[e.PRESS=9]="PRESS",e[e.RELEASE=10]="RELEASE",e[e.SUSTAIN=11]="SUSTAIN",e[e.HEARTBEAT=12]="HEARTBEAT",e[e.BAN=13]="BAN",e[e.MOD=14]="MOD",e[e.UNMOD=15]="UNMOD",e[e.IPBAN=16]="IPBAN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(ClientMessage_Event||(ClientMessage_Event={}));const ServerMessage={encode(e,t=minimal.Writer.create()){void 0!==e.clear&&Void.encode(e.clear,t.uint32(10).fork()).ldelim(),0!==e.event&&t.uint32(16).int32(e.event),void 0!==e.pong&&Void.encode(e.pong,t.uint32(26).fork()).ldelim(),void 0!==e.chat&&Chat.encode(e.chat,t.uint32(34).fork()).ldelim();for(const i of e.rooms)Room.encode(i,t.uint32(42).fork()).ldelim();return void 0!==e.welcome&&Welcome.encode(e.welcome,t.uint32(50).fork()).ldelim(),void 0!==e.move&&Move.encode(e.move,t.uint32(58).fork()).ldelim(),void 0!==e.press&&KeyPress.encode(e.press,t.uint32(66).fork()).ldelim(),void 0!==e.release&&KeyRelease.encode(e.release,t.uint32(74).fork()).ldelim(),void 0!==e.sustain&&Sustain.encode(e.sustain,t.uint32(82).fork()).ldelim(),void 0!==e.profile&&UserInfo.encode(e.profile,t.uint32(90).fork()).ldelim(),void 0!==e.join&&UserInfo.encode(e.join,t.uint32(98).fork()).ldelim(),""!==e.leave&&t.uint32(106).string(e.leave),0!==e.ratelimit&&t.uint32(112).uint32(e.ratelimit),""!==e.popup&&t.uint32(122).string(e.popup),""!==e.chown&&t.uint32(130).string(e.chown),void 0!==e.notification&&Notification.encode(e.notification,t.uint32(138).fork()).ldelim(),t},decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseServerMessage();for(;i.pos>>3){case 1:if(10!==e)break;a.clear=Void.decode(i,i.uint32());continue;case 2:if(16!==e)break;a.event=i.int32();continue;case 3:if(26!==e)break;a.pong=Void.decode(i,i.uint32());continue;case 4:if(34!==e)break;a.chat=Chat.decode(i,i.uint32());continue;case 5:if(42!==e)break;a.rooms.push(Room.decode(i,i.uint32()));continue;case 6:if(50!==e)break;a.welcome=Welcome.decode(i,i.uint32());continue;case 7:if(58!==e)break;a.move=Move.decode(i,i.uint32());continue;case 8:if(66!==e)break;a.press=KeyPress.decode(i,i.uint32());continue;case 9:if(74!==e)break;a.release=KeyRelease.decode(i,i.uint32());continue;case 10:if(82!==e)break;a.sustain=Sustain.decode(i,i.uint32());continue;case 11:if(90!==e)break;a.profile=UserInfo.decode(i,i.uint32());continue;case 12:if(98!==e)break;a.join=UserInfo.decode(i,i.uint32());continue;case 13:if(106!==e)break;a.leave=i.string();continue;case 14:if(112!==e)break;a.ratelimit=i.uint32();continue;case 15:if(122!==e)break;a.popup=i.string();continue;case 16:if(130!==e)break;a.chown=i.string();continue;case 17:if(138!==e)break;a.notification=Notification.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({clear:isSet(e.clear)?Void.fromJSON(e.clear):void 0,event:isSet(e.event)?serverMessage_EventFromJSON(e.event):0,pong:isSet(e.pong)?Void.fromJSON(e.pong):void 0,chat:isSet(e.chat)?Chat.fromJSON(e.chat):void 0,rooms:globalThis.Array.isArray(null==e?void 0:e.rooms)?e.rooms.map((e=>Room.fromJSON(e))):[],welcome:isSet(e.welcome)?Welcome.fromJSON(e.welcome):void 0,move:isSet(e.move)?Move.fromJSON(e.move):void 0,press:isSet(e.press)?KeyPress.fromJSON(e.press):void 0,release:isSet(e.release)?KeyRelease.fromJSON(e.release):void 0,sustain:isSet(e.sustain)?Sustain.fromJSON(e.sustain):void 0,profile:isSet(e.profile)?UserInfo.fromJSON(e.profile):void 0,join:isSet(e.join)?UserInfo.fromJSON(e.join):void 0,leave:isSet(e.leave)?globalThis.String(e.leave):"",ratelimit:isSet(e.ratelimit)?globalThis.Number(e.ratelimit):0,popup:isSet(e.popup)?globalThis.String(e.popup):"",chown:isSet(e.chown)?globalThis.String(e.chown):"",notification:isSet(e.notification)?Notification.fromJSON(e.notification):void 0}),toJSON(e){var t;const i={};return void 0!==e.clear&&(i.clear=Void.toJSON(e.clear)),0!==e.event&&(i.event=serverMessage_EventToJSON(e.event)),void 0!==e.pong&&(i.pong=Void.toJSON(e.pong)),void 0!==e.chat&&(i.chat=Chat.toJSON(e.chat)),(null===(t=e.rooms)||void 0===t?void 0:t.length)&&(i.rooms=e.rooms.map((e=>Room.toJSON(e)))),void 0!==e.welcome&&(i.welcome=Welcome.toJSON(e.welcome)),void 0!==e.move&&(i.move=Move.toJSON(e.move)),void 0!==e.press&&(i.press=KeyPress.toJSON(e.press)),void 0!==e.release&&(i.release=KeyRelease.toJSON(e.release)),void 0!==e.sustain&&(i.sustain=Sustain.toJSON(e.sustain)),void 0!==e.profile&&(i.profile=UserInfo.toJSON(e.profile)),void 0!==e.join&&(i.join=UserInfo.toJSON(e.join)),""!==e.leave&&(i.leave=e.leave),0!==e.ratelimit&&(i.ratelimit=Math.round(e.ratelimit)),""!==e.popup&&(i.popup=e.popup),""!==e.chown&&(i.chown=e.chown),void 0!==e.notification&&(i.notification=Notification.toJSON(e.notification)),i},create:e=>ServerMessage.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a,s,n;const r=createBaseServerMessage();return r.clear=void 0!==e.clear&&null!==e.clear?Void.fromPartial(e.clear):void 0,r.event=null!==(t=e.event)&&void 0!==t?t:0,r.pong=void 0!==e.pong&&null!==e.pong?Void.fromPartial(e.pong):void 0,r.chat=void 0!==e.chat&&null!==e.chat?Chat.fromPartial(e.chat):void 0,r.rooms=(null===(i=e.rooms)||void 0===i?void 0:i.map((e=>Room.fromPartial(e))))||[],r.welcome=void 0!==e.welcome&&null!==e.welcome?Welcome.fromPartial(e.welcome):void 0,r.move=void 0!==e.move&&null!==e.move?Move.fromPartial(e.move):void 0,r.press=void 0!==e.press&&null!==e.press?KeyPress.fromPartial(e.press):void 0,r.release=void 0!==e.release&&null!==e.release?KeyRelease.fromPartial(e.release):void 0,r.sustain=void 0!==e.sustain&&null!==e.sustain?Sustain.fromPartial(e.sustain):void 0,r.profile=void 0!==e.profile&&null!==e.profile?UserInfo.fromPartial(e.profile):void 0,r.join=void 0!==e.join&&null!==e.join?UserInfo.fromPartial(e.join):void 0,r.leave=null!==(o=e.leave)&&void 0!==o?o:"",r.ratelimit=null!==(a=e.ratelimit)&&void 0!==a?a:0,r.popup=null!==(s=e.popup)&&void 0!==s?s:"",r.chown=null!==(n=e.chown)&&void 0!==n?n:"",r.notification=void 0!==e.notification&&null!==e.notification?Notification.fromPartial(e.notification):void 0,r}};function createBaseClientMessage(){return{chown:"",event:0,ping:void 0,room:void 0,profile:void 0,chat:"",move:void 0,mute:"",unmute:"",kick:"",press:void 0,release:void 0,sustain:!1,heartbeat:void 0,ban:void 0,mod:"",unmod:"",ipban:""}}const ClientMessage={encode:(e,t=minimal.Writer.create())=>(""!==e.chown&&t.uint32(10).string(e.chown),0!==e.event&&t.uint32(16).int32(e.event),void 0!==e.ping&&Void.encode(e.ping,t.uint32(26).fork()).ldelim(),void 0!==e.room&&Enter.encode(e.room,t.uint32(34).fork()).ldelim(),void 0!==e.profile&&UserInfo.encode(e.profile,t.uint32(42).fork()).ldelim(),""!==e.chat&&t.uint32(50).string(e.chat),void 0!==e.move&&Move.encode(e.move,t.uint32(58).fork()).ldelim(),""!==e.mute&&t.uint32(66).string(e.mute),""!==e.unmute&&t.uint32(74).string(e.unmute),""!==e.kick&&t.uint32(82).string(e.kick),void 0!==e.press&&KeyPress.encode(e.press,t.uint32(90).fork()).ldelim(),void 0!==e.release&&KeyRelease.encode(e.release,t.uint32(98).fork()).ldelim(),!1!==e.sustain&&t.uint32(104).bool(e.sustain),void 0!==e.heartbeat&&Void.encode(e.heartbeat,t.uint32(114).fork()).ldelim(),void 0!==e.ban&&Ban.encode(e.ban,t.uint32(122).fork()).ldelim(),""!==e.mod&&t.uint32(130).string(e.mod),""!==e.unmod&&t.uint32(138).string(e.unmod),""!==e.ipban&&t.uint32(146).string(e.ipban),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseClientMessage();for(;i.pos>>3){case 1:if(10!==e)break;a.chown=i.string();continue;case 2:if(16!==e)break;a.event=i.int32();continue;case 3:if(26!==e)break;a.ping=Void.decode(i,i.uint32());continue;case 4:if(34!==e)break;a.room=Enter.decode(i,i.uint32());continue;case 5:if(42!==e)break;a.profile=UserInfo.decode(i,i.uint32());continue;case 6:if(50!==e)break;a.chat=i.string();continue;case 7:if(58!==e)break;a.move=Move.decode(i,i.uint32());continue;case 8:if(66!==e)break;a.mute=i.string();continue;case 9:if(74!==e)break;a.unmute=i.string();continue;case 10:if(82!==e)break;a.kick=i.string();continue;case 11:if(90!==e)break;a.press=KeyPress.decode(i,i.uint32());continue;case 12:if(98!==e)break;a.release=KeyRelease.decode(i,i.uint32());continue;case 13:if(104!==e)break;a.sustain=i.bool();continue;case 14:if(114!==e)break;a.heartbeat=Void.decode(i,i.uint32());continue;case 15:if(122!==e)break;a.ban=Ban.decode(i,i.uint32());continue;case 16:if(130!==e)break;a.mod=i.string();continue;case 17:if(138!==e)break;a.unmod=i.string();continue;case 18:if(146!==e)break;a.ipban=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({chown:isSet(e.chown)?globalThis.String(e.chown):"",event:isSet(e.event)?clientMessage_EventFromJSON(e.event):0,ping:isSet(e.ping)?Void.fromJSON(e.ping):void 0,room:isSet(e.room)?Enter.fromJSON(e.room):void 0,profile:isSet(e.profile)?UserInfo.fromJSON(e.profile):void 0,chat:isSet(e.chat)?globalThis.String(e.chat):"",move:isSet(e.move)?Move.fromJSON(e.move):void 0,mute:isSet(e.mute)?globalThis.String(e.mute):"",unmute:isSet(e.unmute)?globalThis.String(e.unmute):"",kick:isSet(e.kick)?globalThis.String(e.kick):"",press:isSet(e.press)?KeyPress.fromJSON(e.press):void 0,release:isSet(e.release)?KeyRelease.fromJSON(e.release):void 0,sustain:!!isSet(e.sustain)&&globalThis.Boolean(e.sustain),heartbeat:isSet(e.heartbeat)?Void.fromJSON(e.heartbeat):void 0,ban:isSet(e.ban)?Ban.fromJSON(e.ban):void 0,mod:isSet(e.mod)?globalThis.String(e.mod):"",unmod:isSet(e.unmod)?globalThis.String(e.unmod):"",ipban:isSet(e.ipban)?globalThis.String(e.ipban):""}),toJSON(e){const t={};return""!==e.chown&&(t.chown=e.chown),0!==e.event&&(t.event=clientMessage_EventToJSON(e.event)),void 0!==e.ping&&(t.ping=Void.toJSON(e.ping)),void 0!==e.room&&(t.room=Enter.toJSON(e.room)),void 0!==e.profile&&(t.profile=UserInfo.toJSON(e.profile)),""!==e.chat&&(t.chat=e.chat),void 0!==e.move&&(t.move=Move.toJSON(e.move)),""!==e.mute&&(t.mute=e.mute),""!==e.unmute&&(t.unmute=e.unmute),""!==e.kick&&(t.kick=e.kick),void 0!==e.press&&(t.press=KeyPress.toJSON(e.press)),void 0!==e.release&&(t.release=KeyRelease.toJSON(e.release)),!1!==e.sustain&&(t.sustain=e.sustain),void 0!==e.heartbeat&&(t.heartbeat=Void.toJSON(e.heartbeat)),void 0!==e.ban&&(t.ban=Ban.toJSON(e.ban)),""!==e.mod&&(t.mod=e.mod),""!==e.unmod&&(t.unmod=e.unmod),""!==e.ipban&&(t.ipban=e.ipban),t},create:e=>ClientMessage.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a,s,n,r,l,c,d;const p=createBaseClientMessage();return p.chown=null!==(t=e.chown)&&void 0!==t?t:"",p.event=null!==(i=e.event)&&void 0!==i?i:0,p.ping=void 0!==e.ping&&null!==e.ping?Void.fromPartial(e.ping):void 0,p.room=void 0!==e.room&&null!==e.room?Enter.fromPartial(e.room):void 0,p.profile=void 0!==e.profile&&null!==e.profile?UserInfo.fromPartial(e.profile):void 0,p.chat=null!==(o=e.chat)&&void 0!==o?o:"",p.move=void 0!==e.move&&null!==e.move?Move.fromPartial(e.move):void 0,p.mute=null!==(a=e.mute)&&void 0!==a?a:"",p.unmute=null!==(s=e.unmute)&&void 0!==s?s:"",p.kick=null!==(n=e.kick)&&void 0!==n?n:"",p.press=void 0!==e.press&&null!==e.press?KeyPress.fromPartial(e.press):void 0,p.release=void 0!==e.release&&null!==e.release?KeyRelease.fromPartial(e.release):void 0,p.sustain=null!==(r=e.sustain)&&void 0!==r&&r,p.heartbeat=void 0!==e.heartbeat&&null!==e.heartbeat?Void.fromPartial(e.heartbeat):void 0,p.ban=void 0!==e.ban&&null!==e.ban?Ban.fromPartial(e.ban):void 0,p.mod=null!==(l=e.mod)&&void 0!==l?l:"",p.unmod=null!==(c=e.unmod)&&void 0!==c?c:"",p.ipban=null!==(d=e.ipban)&&void 0!==d?d:"",p}};function createBaseVoid(){return{}}const Void={encode:(e,t=minimal.Writer.create())=>t,decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseVoid();for(;i.pos({}),toJSON:e=>({}),create:e=>Void.fromPartial(null!=e?e:{}),fromPartial:e=>createBaseVoid()};function createBaseUserInfo(){return{id:void 0,name:void 0,color:void 0,role:void 0,muted:void 0,x:void 0,y:void 0}}const UserInfo={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.name&&t.uint32(18).string(e.name),void 0!==e.color&&t.uint32(26).string(e.color),void 0!==e.role&&t.uint32(32).int32(e.role),void 0!==e.muted&&t.uint32(40).bool(e.muted),void 0!==e.x&&t.uint32(53).float(e.x),void 0!==e.y&&t.uint32(61).float(e.y),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseUserInfo();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(18!==e)break;a.name=i.string();continue;case 3:if(26!==e)break;a.color=i.string();continue;case 4:if(32!==e)break;a.role=i.int32();continue;case 5:if(40!==e)break;a.muted=i.bool();continue;case 6:if(53!==e)break;a.x=i.float();continue;case 7:if(61!==e)break;a.y=i.float();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,name:isSet(e.name)?globalThis.String(e.name):void 0,color:isSet(e.color)?globalThis.String(e.color):void 0,role:isSet(e.role)?roleFromJSON(e.role):void 0,muted:isSet(e.muted)?globalThis.Boolean(e.muted):void 0,x:isSet(e.x)?globalThis.Number(e.x):void 0,y:isSet(e.y)?globalThis.Number(e.y):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.name&&(t.name=e.name),void 0!==e.color&&(t.color=e.color),void 0!==e.role&&(t.role=roleToJSON(e.role)),void 0!==e.muted&&(t.muted=e.muted),void 0!==e.x&&(t.x=e.x),void 0!==e.y&&(t.y=e.y),t},create:e=>UserInfo.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a,s,n,r;const l=createBaseUserInfo();return l.id=null!==(t=e.id)&&void 0!==t?t:void 0,l.name=null!==(i=e.name)&&void 0!==i?i:void 0,l.color=null!==(o=e.color)&&void 0!==o?o:void 0,l.role=null!==(a=e.role)&&void 0!==a?a:void 0,l.muted=null!==(s=e.muted)&&void 0!==s?s:void 0,l.x=null!==(n=e.x)&&void 0!==n?n:void 0,l.y=null!==(r=e.y)&&void 0!==r?r:void 0,l}};function createBaseRoom(){return{id:void 0,count:void 0}}const Room={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.count&&t.uint32(16).uint32(e.count),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseRoom();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.count=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,count:isSet(e.count)?globalThis.Number(e.count):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.count&&(t.count=Math.round(e.count)),t},create:e=>Room.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseRoom();return o.id=null!==(t=e.id)&&void 0!==t?t:void 0,o.count=null!==(i=e.count)&&void 0!==i?i:void 0,o}};function createBaseMove(){return{id:void 0,x:void 0,y:void 0}}const Move={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.x&&t.uint32(21).float(e.x),void 0!==e.y&&t.uint32(29).float(e.y),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseMove();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(21!==e)break;a.x=i.float();continue;case 3:if(29!==e)break;a.y=i.float();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,x:isSet(e.x)?globalThis.Number(e.x):void 0,y:isSet(e.y)?globalThis.Number(e.y):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.x&&(t.x=e.x),void 0!==e.y&&(t.y=e.y),t},create:e=>Move.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o;const a=createBaseMove();return a.id=null!==(t=e.id)&&void 0!==t?t:void 0,a.x=null!==(i=e.x)&&void 0!==i?i:void 0,a.y=null!==(o=e.y)&&void 0!==o?o:void 0,a}};function createBaseKeyPress(){return{id:void 0,key:void 0,vel:void 0}}const KeyPress={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.key&&t.uint32(16).uint32(e.key),void 0!==e.vel&&t.uint32(24).uint32(e.vel),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseKeyPress();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.key=i.uint32();continue;case 3:if(24!==e)break;a.vel=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,key:isSet(e.key)?globalThis.Number(e.key):void 0,vel:isSet(e.vel)?globalThis.Number(e.vel):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.key&&(t.key=Math.round(e.key)),void 0!==e.vel&&(t.vel=Math.round(e.vel)),t},create:e=>KeyPress.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o;const a=createBaseKeyPress();return a.id=null!==(t=e.id)&&void 0!==t?t:void 0,a.key=null!==(i=e.key)&&void 0!==i?i:void 0,a.vel=null!==(o=e.vel)&&void 0!==o?o:void 0,a}};function createBaseKeyRelease(){return{id:void 0,key:void 0}}const KeyRelease={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.key&&t.uint32(16).uint32(e.key),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseKeyRelease();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.key=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,key:isSet(e.key)?globalThis.Number(e.key):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.key&&(t.key=Math.round(e.key)),t},create:e=>KeyRelease.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseKeyRelease();return o.id=null!==(t=e.id)&&void 0!==t?t:void 0,o.key=null!==(i=e.key)&&void 0!==i?i:void 0,o}};function createBaseSustain(){return{id:void 0,enabled:void 0}}const Sustain={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.enabled&&t.uint32(16).bool(e.enabled),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseSustain();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.enabled=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,enabled:isSet(e.enabled)?globalThis.Boolean(e.enabled):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.enabled&&(t.enabled=e.enabled),t},create:e=>Sustain.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseSustain();return o.id=null!==(t=e.id)&&void 0!==t?t:void 0,o.enabled=null!==(i=e.enabled)&&void 0!==i?i:void 0,o}};function createBaseWelcome(){return{id:void 0,name:void 0,color:void 0,room:void 0,owner:void 0,chat:[],role:void 0,private:void 0}}const Welcome={encode(e,t=minimal.Writer.create()){void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.name&&t.uint32(18).string(e.name),void 0!==e.color&&t.uint32(26).string(e.color),void 0!==e.room&&t.uint32(34).string(e.room),void 0!==e.owner&&t.uint32(42).string(e.owner);for(const i of e.chat)Chat.encode(i,t.uint32(50).fork()).ldelim();return void 0!==e.role&&t.uint32(56).int32(e.role),void 0!==e.private&&t.uint32(64).bool(e.private),t},decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseWelcome();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(18!==e)break;a.name=i.string();continue;case 3:if(26!==e)break;a.color=i.string();continue;case 4:if(34!==e)break;a.room=i.string();continue;case 5:if(42!==e)break;a.owner=i.string();continue;case 6:if(50!==e)break;a.chat.push(Chat.decode(i,i.uint32()));continue;case 7:if(56!==e)break;a.role=i.int32();continue;case 8:if(64!==e)break;a.private=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,name:isSet(e.name)?globalThis.String(e.name):void 0,color:isSet(e.color)?globalThis.String(e.color):void 0,room:isSet(e.room)?globalThis.String(e.room):void 0,owner:isSet(e.owner)?globalThis.String(e.owner):void 0,chat:globalThis.Array.isArray(null==e?void 0:e.chat)?e.chat.map((e=>Chat.fromJSON(e))):[],role:isSet(e.role)?roleFromJSON(e.role):void 0,private:isSet(e.private)?globalThis.Boolean(e.private):void 0}),toJSON(e){var t;const i={};return void 0!==e.id&&(i.id=e.id),void 0!==e.name&&(i.name=e.name),void 0!==e.color&&(i.color=e.color),void 0!==e.room&&(i.room=e.room),void 0!==e.owner&&(i.owner=e.owner),(null===(t=e.chat)||void 0===t?void 0:t.length)&&(i.chat=e.chat.map((e=>Chat.toJSON(e)))),void 0!==e.role&&(i.role=roleToJSON(e.role)),void 0!==e.private&&(i.private=e.private),i},create:e=>Welcome.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a,s,n,r,l;const c=createBaseWelcome();return c.id=null!==(t=e.id)&&void 0!==t?t:void 0,c.name=null!==(i=e.name)&&void 0!==i?i:void 0,c.color=null!==(o=e.color)&&void 0!==o?o:void 0,c.room=null!==(a=e.room)&&void 0!==a?a:void 0,c.owner=null!==(s=e.owner)&&void 0!==s?s:void 0,c.chat=(null===(n=e.chat)||void 0===n?void 0:n.map((e=>Chat.fromPartial(e))))||[],c.role=null!==(r=e.role)&&void 0!==r?r:void 0,c.private=null!==(l=e.private)&&void 0!==l?l:void 0,c}};function createBaseChat(){return{id:void 0,content:void 0,name:void 0,color:void 0}}const Chat={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.content&&t.uint32(18).string(e.content),void 0!==e.name&&t.uint32(26).string(e.name),void 0!==e.color&&t.uint32(34).string(e.color),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseChat();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(18!==e)break;a.content=i.string();continue;case 3:if(26!==e)break;a.name=i.string();continue;case 4:if(34!==e)break;a.color=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,content:isSet(e.content)?globalThis.String(e.content):void 0,name:isSet(e.name)?globalThis.String(e.name):void 0,color:isSet(e.color)?globalThis.String(e.color):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.content&&(t.content=e.content),void 0!==e.name&&(t.name=e.name),void 0!==e.color&&(t.color=e.color),t},create:e=>Chat.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a;const s=createBaseChat();return s.id=null!==(t=e.id)&&void 0!==t?t:void 0,s.content=null!==(i=e.content)&&void 0!==i?i:void 0,s.name=null!==(o=e.name)&&void 0!==o?o:void 0,s.color=null!==(a=e.color)&&void 0!==a?a:void 0,s}};function createBaseEnter(){return{room:void 0,private:void 0}}const Enter={encode:(e,t=minimal.Writer.create())=>(void 0!==e.room&&t.uint32(10).string(e.room),void 0!==e.private&&t.uint32(16).bool(e.private),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseEnter();for(;i.pos>>3){case 1:if(10!==e)break;a.room=i.string();continue;case 2:if(16!==e)break;a.private=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({room:isSet(e.room)?globalThis.String(e.room):void 0,private:isSet(e.private)?globalThis.Boolean(e.private):void 0}),toJSON(e){const t={};return void 0!==e.room&&(t.room=e.room),void 0!==e.private&&(t.private=e.private),t},create:e=>Enter.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseEnter();return o.room=null!==(t=e.room)&&void 0!==t?t:void 0,o.private=null!==(i=e.private)&&void 0!==i?i:void 0,o}};function createBaseBan(){return{id:void 0,minutes:void 0}}const Ban={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.minutes&&t.uint32(16).uint32(e.minutes),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseBan();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.minutes=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,minutes:isSet(e.minutes)?globalThis.Number(e.minutes):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.minutes&&(t.minutes=Math.round(e.minutes)),t},create:e=>Ban.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseBan();return o.id=null!==(t=e.id)&&void 0!==t?t:void 0,o.minutes=null!==(i=e.minutes)&&void 0!==i?i:void 0,o}};function createBaseNotification(){return{level:void 0,title:void 0,text:void 0,timeout:void 0}}const Notification={encode:(e,t=minimal.Writer.create())=>(void 0!==e.level&&t.uint32(8).int32(e.level),void 0!==e.title&&t.uint32(18).string(e.title),void 0!==e.text&&t.uint32(26).string(e.text),void 0!==e.timeout&&t.uint32(32).uint32(e.timeout),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseNotification();for(;i.pos>>3){case 1:if(8!==e)break;a.level=i.int32();continue;case 2:if(18!==e)break;a.title=i.string();continue;case 3:if(26!==e)break;a.text=i.string();continue;case 4:if(32!==e)break;a.timeout=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({level:isSet(e.level)?notificationLevelFromJSON(e.level):void 0,title:isSet(e.title)?globalThis.String(e.title):void 0,text:isSet(e.text)?globalThis.String(e.text):void 0,timeout:isSet(e.timeout)?globalThis.Number(e.timeout):void 0}),toJSON(e){const t={};return void 0!==e.level&&(t.level=notificationLevelToJSON(e.level)),void 0!==e.title&&(t.title=e.title),void 0!==e.text&&(t.text=e.text),void 0!==e.timeout&&(t.timeout=Math.round(e.timeout)),t},create:e=>Notification.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a;const s=createBaseNotification();return s.level=null!==(t=e.level)&&void 0!==t?t:void 0,s.title=null!==(i=e.title)&&void 0!==i?i:void 0,s.text=null!==(o=e.text)&&void 0!==o?o:void 0,s.timeout=null!==(a=e.timeout)&&void 0!==a?a:void 0,s}};function isSet(e){return null!=e}var events=__webpack_require__(7007),events_default=__webpack_require__.n(events),client_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0};let Client=(()=>{var e;let t,i=events_default(),o=[];return e=class extends i{constructor(){super(),this._ws=void client_runInitializers(this,o),this._users=new Map,this._popStateTriggered=!1,this._reconnectTimeout=0,this.me={},this.room={},this.init(),new Worker("heartbeat.js").onmessage=()=>this.heartbeat(),window.location.search||window.history.replaceState({},"",""),window.addEventListener("popstate",(()=>{const e=new URLSearchParams(window.location.search);this._popStateTriggered=!0,this.enter(e.get("r")||"Lobby")}))}get users(){return Array.from(this._users.values())}get(e){return e&&e!==this.me.id?this._users.get(e):this.me}init(){let wsurl="";if(!localStorage.host){wsurl = "wss://api.pianoverse.me";}else if(localStorage.host=="mainline"){wsurl="wss://pianoverse.net"}else if(localStorage.host == "dev"){wsurl="ws://127.0.0.1:8081"};this._ws=new WebSocket(wsurl,"pianoverse"),this._ws.binaryType="arraybuffer",this._ws.onmessage=e=>this.handleMessage(e),this._ws.onopen=()=>{this.emit("connected"),loadermanager.stop(),this._reconnectTimeout=0;const e=new URLSearchParams(window.location.search);settingsmanager.has("name")&&settingsmanager.has("color")&&this.profile(settingsmanager.get("name"),settingsmanager.get("color")),this.enter(e.get("r")||"Lobby",null!==e.get("p"))},this._ws.onclose=()=>{this.emit("reconnecting"),loadermanager.start("Reconnecting..."),this._reconnectTimeout+=500,setTimeout(this.init,Math.min(this._reconnectTimeout,4e3))}}handleMessage(e){let t,i;const o=new FileReader;o.onload=()=>{if(o.result instanceof ArrayBuffer){const e=new Uint8Array(o.result),a=ServerMessage.decode(e);t=serverMessage_EventToJSON(a.event).toLowerCase(),i=a[t],this.handleEventData(t,i)}},o.readAsArrayBuffer(new Blob([e.data]))}handleEventData(e,t){switch(e){case"welcome":this._users=new Map;const{id:e,name:i,color:o,role:a,room:s,owner:n}=t;this.me={id:e,name:i,color:o,role:a},settingsmanager.set("name",this.me.name),settingsmanager.set("color",this.me.color),this.room={id:s,owner:n},this._popStateTriggered||("Lobby"===this.room.id?window.history.pushState({},"",window.location.pathname):window.history.pushState({},"",`?r=${encodeURI(this.room.id)}`+(t.private?"&p":""))),this._popStateTriggered=!1;const r=document.querySelector("pv-toolbar"),l=document.querySelector("pv-canvas"),c=document.querySelector("pv-keys"),d=document.querySelector("pv-chat");"Backrooms"===this.room.id?(r.style.display="none",l.style.display="none",c.style.display="none",d.style.display="none",document.body.querySelector(".chat").style.display="none"):(r.style.display="",l.style.display="",c.style.display="",d.style.display="",document.body.querySelector(".chat").style.display="");break;case"join":this._users.set(t.id,t);break;case"profile":this.get(t.id).name=t.name,this.get(t.id).color=t.color,this.get(t.id).role=t.role,t.id===client.me.id&&(settingsmanager.set("name",t.name),settingsmanager.set("color",t.color));break;case"chown":this.room.owner=t;break;case"leave":t=this.get(t),this._users.delete(t.id);break;case"notification":switch(t.level){case pianoverse_NotificationLevel.INFO:NotificationManager.info(t.title,t.text,t.timeout);break;case pianoverse_NotificationLevel.SUCCESS:NotificationManager.success(t.title,t.text,t.timeout);break;case pianoverse_NotificationLevel.WARNING:NotificationManager.warning(t.title,t.text,t.timeout);break;case pianoverse_NotificationLevel.ERROR:NotificationManager.error(t.title,t.text,t.timeout)}break;case"message":case"popup":PopupManager.closeEverything(),PopupManager.open(Modal.MESSAGE,null,t);break;case"ratelimit":NotificationManager.warning("Slow down!","You've reached the ratelimit.")}this.emit(e,t)}send(e){var t;return(null===(t=this._ws)||void 0===t?void 0:t.readyState)===WebSocket.OPEN&&(this._ws.send(ClientMessage.encode(e).finish()),!0)}isConnected(){var e;return(null===(e=this._ws)||void 0===e?void 0:e.readyState)===WebSocket.OPEN}enter(e,t=!1){const i=ClientMessage.create({event:ClientMessage_Event.ROOM,room:{room:e,private:t}});return this.send(i)}profile(e,t){const i=ClientMessage.create({event:ClientMessage_Event.PROFILE,profile:{name:e||this.me.name,color:t||this.me.color}});return this.send(i)}chat(e){const t=ClientMessage.create({event:ClientMessage_Event.CHAT,chat:e});return this.send(t)}move(e,t){const i=ClientMessage.create({event:ClientMessage_Event.MOVE,move:{x:e,y:t}});return this.send(i)}chown(e){const t=ClientMessage.create({event:ClientMessage_Event.CHOWN,chown:e});return this.send(t)}mute(e){this.get(e).muted=!0;const t=ClientMessage.create({event:ClientMessage_Event.MUTE,mute:e});return this.send(t)}unmute(e){this.get(e).muted=!1;const t=ClientMessage.create({event:ClientMessage_Event.UNMUTE,unmute:e});return this.send(t)}kick(e){const t=ClientMessage.create({event:ClientMessage_Event.KICK,kick:e});return this.send(t)}ban(e,t=60){const i=ClientMessage.create({event:ClientMessage_Event.BAN,ban:{id:e,minutes:t}});return this.send(i)}press(e,t){const i=ClientMessage.create({event:ClientMessage_Event.PRESS,press:{key:e,vel:t}});return this.send(i)}release(e){const t=ClientMessage.create({event:ClientMessage_Event.RELEASE,release:{key:e}});return this.send(t)}sustain(e){const t=ClientMessage.create({event:ClientMessage_Event.SUSTAIN,sustain:e});return this.send(t)}mod(e){const t=ClientMessage.create({event:ClientMessage_Event.MOD,mod:e});return this.send(t)}unmod(e){const t=ClientMessage.create({event:ClientMessage_Event.UNMOD,unmod:e});return this.send(t)}ipban(e){const t=ClientMessage.create({event:ClientMessage_Event.IPBAN,ipban:e});return this.send(t)}ping(){const e=ClientMessage.create({event:ClientMessage_Event.PING});return this.send(e)}heartbeat(){const e=ClientMessage.create({event:ClientMessage_Event.HEARTBEAT});return this.send(e)}},(()=>{var a;const s="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(a=i[Symbol.metadata])&&void 0!==a?a:null):void 0;t=[bind],client_esDecorate(e,null,t,{kind:"method",name:"init",static:!1,private:!1,access:{has:e=>"init"in e,get:e=>e.init},metadata:s},null,o),s&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})})(),e})();const client=new Client,services_client=client;window.client=client;var pv_new_room_code='
Create room
';const pv_new_room=pv_new_room_code;var pv_new_room_pv_new_room=__webpack_require__(9728),pv_new_room_options={};pv_new_room_options.styleTagTransform=styleTagTransform_default(),pv_new_room_options.setAttributes=setAttributesWithoutAttributes_default(),pv_new_room_options.insert=insertBySelector_default().bind(null,"head"),pv_new_room_options.domAPI=styleDomAPI_default(),pv_new_room_options.insertStyleElement=insertStyleElement_default();var pv_new_room_update=injectStylesIntoStyleTag_default()(pv_new_room_pv_new_room.A,pv_new_room_options);const popups_pv_new_room_pv_new_room=pv_new_room_pv_new_room.A&&pv_new_room_pv_new_room.A.locals?pv_new_room_pv_new_room.A.locals:void 0;var pv_new_room_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_new_room_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r,l,c,d=components_pv_popup_pv_popup,p=[],u=[],v=[],h=[];return e=class extends d{get inputRoom(){return pv_new_room_classPrivateFieldGet(this,t,"f")}set inputRoom(e){pv_new_room_classPrivateFieldSet(this,t,e,"f")}get inputPrivate(){return pv_new_room_classPrivateFieldGet(this,i,"f")}set inputPrivate(e){pv_new_room_classPrivateFieldSet(this,i,e,"f")}get buttonSave(){return pv_new_room_classPrivateFieldGet(this,o,"f")}set buttonSave(e){pv_new_room_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_new_room_runInitializers(this,p),pv_new_room_runInitializers(this,u,void 0))),i.set(this,pv_new_room_runInitializers(this,v,void 0)),o.set(this,pv_new_room_runInitializers(this,h,void 0)),this.innerHTML=pv_new_room}onOpen(){this.inputRoom.value="",this.inputRoom.focus()}connectedCallback(){super.connectedCallback(),this.buttonSave.addEventListener("click",this.submit),this.inputRoom.addEventListener("input",this.handleInput),this.inputRoom.addEventListener("keydown",this.handleKeyDown)}handleInput(){this.buttonSave.disabled=!this.isValid()}handleKeyDown(e){"Enter"===e.key&&this.isValid()&&this.submit()}submit(){var e;this.close(),(null===(e=this.inputRoom.value)||void 0===e?void 0:e.trim())&&services_client.enter(this.inputRoom.value.trim(),this.inputPrivate.checked)}isValid(){return this.inputRoom.value.trim().length>=2&&this.inputRoom.value.trim().length<=32}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=d[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_child],r=[bind],l=[bind],c=[bind],pv_new_room_esDecorate(e,null,a,{kind:"accessor",name:"inputRoom",static:!1,private:!1,access:{has:e=>"inputRoom"in e,get:e=>e.inputRoom,set:(e,t)=>{e.inputRoom=t}},metadata:i},u,p),pv_new_room_esDecorate(e,null,s,{kind:"accessor",name:"inputPrivate",static:!1,private:!1,access:{has:e=>"inputPrivate"in e,get:e=>e.inputPrivate,set:(e,t)=>{e.inputPrivate=t}},metadata:i},v,p),pv_new_room_esDecorate(e,null,n,{kind:"accessor",name:"buttonSave",static:!1,private:!1,access:{has:e=>"buttonSave"in e,get:e=>e.buttonSave,set:(e,t)=>{e.buttonSave=t}},metadata:i},h,p),pv_new_room_esDecorate(e,null,r,{kind:"method",name:"handleInput",static:!1,private:!1,access:{has:e=>"handleInput"in e,get:e=>e.handleInput},metadata:i},null,p),pv_new_room_esDecorate(e,null,l,{kind:"method",name:"handleKeyDown",static:!1,private:!1,access:{has:e=>"handleKeyDown"in e,get:e=>e.handleKeyDown},metadata:i},null,p),pv_new_room_esDecorate(e,null,c,{kind:"method",name:"submit",static:!1,private:!1,access:{has:e=>"submit"in e,get:e=>e.submit},metadata:i},null,p),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_new_room_pv_new_room=PvNewRoom;var role_Role;customElements.define("pv-new-room",PvNewRoom),function(e){e[e.USER=0]="USER",e[e.MODERATOR=1]="MODERATOR",e[e.DEVELOPER=2]="DEVELOPER"}(role_Role||(role_Role={}));const role=role_Role;var __awaiter=function(e,t,i,o){return new(i||(i=Promise))((function(a,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function r(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,r)}l((o=o.apply(e,t||[])).next())}))};class AudioEngine extends(events_default()){constructor(){super(),this.volume=100,this.ctx=new AudioContext({latencyHint:"interactive"}),this.sounds=new Map,this.currentlyPlaying=new Map;const e=new GainNode(this.ctx);e.gain.value=Math.min(this.volume/100,1),e.connect(this.ctx.destination),this.limiter=new DynamicsCompressorNode(this.ctx),this.limiter.threshold.value=-10,this.limiter.knee.value=5,this.limiter.ratio.value=20,this.limiter.attack.value=0,this.limiter.release.value=.1,this.limiter.connect(e),settingsmanager.on("volume",(t=>{this.volume=t,e.gain.value=Math.min(this.volume/100,1)}))}load(e,t){return __awaiter(this,void 0,void 0,(function*(){const i=yield fetch(t),o=yield i.arrayBuffer(),a=yield this.ctx.decodeAudioData(o);return this.sounds.set(e,a),e}))}unload(e){return __awaiter(this,void 0,void 0,(function*(){this.sounds.delete(e)}))}play(e,t){t>127&&(t=127);const i=this.ctx.currentTime,o=new AudioBufferSourceNode(this.ctx,{buffer:this.sounds.get(e)}),a=new GainNode(this.ctx,{gain:t/127}),s=new StereoPannerNode(this.ctx,{pan:(Number(e)-21)/87-.5});if(o.connect(a),a.connect(s),s.connect(this.limiter),o.start(),this.currentlyPlaying.has(e)){const t=this.currentlyPlaying.get(e);t.gain.gain.setValueAtTime(t.gain.gain.value,0),t.gain.gain.linearRampToValueAtTime(0,i+.2),t.source.stop(i+.21)}this.currentlyPlaying.set(e,{source:o,gain:a})}stop(e){const t=this.ctx.currentTime;if(this.currentlyPlaying.has(e)){const i=this.currentlyPlaying.get(e);i.gain.gain.setValueAtTime(i.gain.gain.value,t),i.gain.gain.linearRampToValueAtTime(.1*i.gain.gain.value,t+.16),i.gain.gain.linearRampToValueAtTime(0,t+.4),i.source.stop(t+.41),this.currentlyPlaying.delete(e)}}}const audio=new AudioEngine,audioengine=audio;var midi_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},midi_awaiter=function(e,t,i,o){return new(i||(i=Promise))((function(a,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function r(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,r)}l((o=o.apply(e,t||[])).next())}))},MIDICommand;!function(e){e[e.NOTE_OFF=128]="NOTE_OFF",e[e.NOTE_ON=144]="NOTE_ON",e[e.AFTER_TOUCH=160]="AFTER_TOUCH",e[e.CONTROL_CHANGE=176]="CONTROL_CHANGE",e[e.PATCH_CHANGE=192]="PATCH_CHANGE",e[e.CHANNEL_PRESSURE=208]="CHANNEL_PRESSURE",e[e.PITCH_BEND=224]="PITCH_BEND",e[e.SYSTEM_EXCLUSIVE=240]="SYSTEM_EXCLUSIVE"}(MIDICommand||(MIDICommand={}));let MIDIManager=(()=>{var e;let t,i=events_default(),o=[];return e=class extends i{constructor(){super(),this.access=void midi_runInitializers(this,o),this.outputIds=new Set,this.pressed={},this.offset=0,this.devices=new Map,this.init(),settingsmanager.on("transpose",(e=>this.offset=e))}registerDevice(e){this.devices.has(e.name)?"input"===e.type?this.devices.get(e.name).in=e:this.devices.get(e.name).out=e:this.devices.set(e.name,{name:e.name.trim(),in:"input"===e.type?e:null,out:"output"===e.type?e:null})}unregisterDevice(e){this.devices.has(e.name)&&("input"===e.type?this.devices.get(e.name).in=null:this.devices.get(e.name).out=null,null===this.devices.get(e.name).in&&null===this.devices.get(e.name).out&&this.devices.delete(e.name))}init(){return midi_awaiter(this,void 0,void 0,(function*(){try{this.access=yield navigator.requestMIDIAccess({sysex:!1,software:!1}),this.access.onstatechange=e=>{e instanceof MIDIConnectionEvent&&this.handleConnectionEvent(e.port)},this.access.inputs.forEach((e=>{this.registerDevice(e),this.enableInput(e.id)})),this.access.outputs.forEach((e=>{this.registerDevice(e),this.disableOutput(e.id)})),this.emit("update")}catch(e){}}))}handleConnectionEvent(e){"connected"===e.state?"input"===e.type?this.devices.has(e.name)?this.registerDevice(e):(this.registerDevice(e),this.enableInput(e.id),NotificationManager.success("Connected to a MIDI device",e.name,10)):this.registerDevice(e):this.unregisterDevice(e),this.emit("update")}onMidiInput(e){if(9==(15&e.data[0]))return;const t=e.data[0]>>4,i=e.data[1];8==t||9==t&&0==e.data[2]?(services_keyboard.release(this.pressed[i],void 0,!0),delete this.pressed[i]):9==t?(this.pressed[i]=i+this.offset,services_keyboard.press(i+this.offset,e.data[2],void 0,!0)):11==t&&64==i&&settingsmanager.set("sustain",e.data[2]>63)}isInputEnabled(e){var t;let i=!1;return null===(t=this.devices)||void 0===t||t.forEach((t=>{t.in&&t.in.id===e&&null!=t.in.onmidimessage&&(i=!0)})),i}enableInput(e){var t;null===(t=this.devices)||void 0===t||t.forEach((t=>{t.in&&t.in.id===e&&(t.in.onmidimessage=this.onMidiInput)}))}disableInput(e){var t;null===(t=this.devices)||void 0===t||t.forEach((t=>{t.in&&t.in.id===e&&(t.in.onmidimessage=null)}))}sendNoteOn(e,t){var i;null===(i=this.devices)||void 0===i||i.forEach((i=>{i.out&&this.outputIds.has(i.out.id)&&i.out.send([MIDICommand.NOTE_ON,e,Math.min(t,127)])}))}sendNoteOff(e){var t;null===(t=this.devices)||void 0===t||t.forEach((t=>{t.out&&this.outputIds.has(t.out.id)&&t.out.send([MIDICommand.NOTE_OFF,e,0])}))}sendSustain(e){var t;null===(t=this.devices)||void 0===t||t.forEach((t=>{t.out&&this.outputIds.has(t.out.id)&&t.out.send([MIDICommand.CONTROL_CHANGE,64,e?127:0])}))}isOutputEnabled(e){return this.outputIds.has(e)}enableOutput(e){this.outputIds.add(e)}disableOutput(e){this.outputIds.delete(e)}},(()=>{var a;const s="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(a=i[Symbol.metadata])&&void 0!==a?a:null):void 0;t=[bind],midi_esDecorate(e,null,t,{kind:"method",name:"onMidiInput",static:!1,private:!1,access:{has:e=>"onMidiInput"in e,get:e=>e.onMidiInput},metadata:s},null,o),s&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})})(),e})();const midi=new MIDIManager,services_midi=midi,layout={65:44,90:45,83:46,88:47,67:48,70:49,86:50,71:51,66:52,78:53,74:54,77:55,75:56,188:57,76:58,190:59,59:59,191:60,222:61,49:56,81:57,50:58,87:59,69:60,52:61,82:62,53:63,84:64,89:65,55:66,85:67,56:68,73:69,57:70,79:71,80:72,189:73,173:73,219:74,169:74,187:75,61:75,221:76,160:76},multiplayer_piano=layout,virtual_piano_layout={49:36,50:38,51:40,52:41,53:43,54:45,55:47,56:48,57:50,48:52,81:53,87:55,69:57,82:59,84:60,89:62,85:64,73:65,79:67,80:69,65:71,83:72,68:74,70:76,71:77,72:79,74:81,75:83,76:84,90:86,88:88,67:89,86:91,66:93,78:95,77:96},virtual_piano=virtual_piano_layout,pianoverse_layout={Backquote:54,Digit1:56,Digit2:58,Digit4:61,Digit5:63,Digit7:66,Digit8:68,Digit9:70,Minus:73,Equal:75,KeyQ:57,KeyW:59,KeyE:60,KeyR:62,KeyT:64,KeyY:65,KeyU:67,KeyI:69,KeyO:71,KeyP:72,BracketLeft:74,BracketRight:76,KeyA:44,KeyS:46,KeyF:49,KeyG:51,KeyJ:54,KeyK:56,KeyL:58,Quote:61,Backslash:63,IntlBackslash:43,KeyZ:45,KeyX:47,KeyC:48,KeyV:50,KeyB:52,KeyN:53,KeyM:55,Comma:57,Period:59,Slash:60},pianoverse=pianoverse_layout,info_namespaceObject=JSON.parse('{"H":["a-1","as-1","b-1","c0","cs0","d0","ds0","e0","f0","fs0","g0","gs0","a0","as0","b0","c1","cs1","d1","ds1","e1","f1","fs1","g1","gs1","a1","as1","b1","c2","cs2","d2","ds2","e2","f2","fs2","g2","gs2","a2","as2","b2","c3","cs3","d3","ds3","e3","f3","fs3","g3","gs3","a3","as3","b3","c4","cs4","d4","ds4","e4","f4","fs4","g4","gs4","a4","as4","b4","c5","cs5","d5","ds5","e5","f5","fs5","g5","gs5","a5","as5","b5","c6","cs6","d6","ds6","e6","f6","fs6","g6","gs6","a6","as6","b6","c7"]}');var layout_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0};let offset=0,vel=109,LayoutManager=(()=>{var e;let t,i,o=events_default(),a=[];return e=class extends o{constructor(){super(),this.layout=void layout_runInitializers(this,a),this.layout=new PianoverseLayout,settingsmanager.on("keyboardLayout",(e=>{switch(e){case"pianoverse":this.layout=new PianoverseLayout;break;case"multiplayerpiano":this.layout=new MultiplayerPianoLayout;break;case"virtualpiano":this.layout=new VirtualPianoLayout}})),settingsmanager.on("transpose",(e=>offset=e)),settingsmanager.on("velocity",(e=>vel=e)),document.addEventListener("keydown",(t=>{if(!t.repeat&&!t.metaKey){switch(t.code){case"NumpadAdd":return this.velocity(Math.max(e.MIN_VELOCITY,Math.min(e.MAX_VELOCITY,vel+9))),void t.preventDefault();case"NumpadSubtract":return this.velocity(Math.max(e.MIN_VELOCITY,Math.min(e.MAX_VELOCITY,vel-9))),void t.preventDefault();case"ArrowDown":return this.transpose(-12),void t.preventDefault();case"ArrowLeft":return this.transpose(-1),void t.preventDefault();case"ArrowRight":return this.transpose(1),void t.preventDefault();case"ArrowUp":return this.transpose(12),void t.preventDefault();case"Backspace":return void settingsmanager.set("sustain",!settingsmanager.get("sustain"));case"Space":return settingsmanager.set("sustain",!0),void t.preventDefault()}this.handleKeydown(t)}})),document.addEventListener("keyup",(e=>{e.repeat||e.metaKey||("Space"!==e.code?this.handleKeyup(e):settingsmanager.set("sustain",!1))}))}transpose(t){offset+t>=e.MIN_TRANSPOSE&&offset+t<=e.MAX_TRANSPOSE&&(offset+=t),settingsmanager.set("transpose",offset)}velocity(t){t>=e.MIN_VELOCITY&&t<=e.MAX_VELOCITY&&(vel=t),settingsmanager.set("velocity",vel)}handleKeydown(e){this.layout.handleKeydown(e)}handleKeyup(e){this.layout.handleKeyup(e)}},(()=>{var s;const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(s=o[Symbol.metadata])&&void 0!==s?s:null):void 0;t=[bind],i=[bind],layout_esDecorate(e,null,t,{kind:"method",name:"handleKeydown",static:!1,private:!1,access:{has:e=>"handleKeydown"in e,get:e=>e.handleKeydown},metadata:n},null,a),layout_esDecorate(e,null,i,{kind:"method",name:"handleKeyup",static:!1,private:!1,access:{has:e=>"handleKeyup"in e,get:e=>e.handleKeyup},metadata:n},null,a),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e.MIN_TRANSPOSE=-36,e.MAX_TRANSPOSE=36,e.MIN_VELOCITY=1,e.MAX_VELOCITY=127,e})();class PianoverseLayout{constructor(){this.pressed={},this.caps=!1}handleKeydown(e){"CapsLock"===e.code&&(this.caps=!0);const t=e.ctrlKey||this.caps?-12:e.shiftKey?12:0,i=pianoverse[e.code]+t+offset;isNaN(i)||i<21||i>108||i&&!this.pressed[e.code]&&(services_keyboard.press(i,vel),this.pressed[e.code]=i)}handleKeyup(e){"CapsLock"===e.code&&(this.caps=!1),this.pressed[e.code]&&(services_keyboard.release(this.pressed[e.code]),delete this.pressed[e.code])}}class MultiplayerPianoLayout{constructor(){this.pressed={},this.caps=!1}handleKeydown(e){let t=0;"CapsLock"===e.code&&(this.caps=!0),e.altKey?(t=24,e.preventDefault()):e.ctrlKey||this.caps?t=-12:e.shiftKey&&(t=12);const i=multiplayer_piano[e.keyCode]+t+offset;isNaN(i)||i<21||i>108||i&&!this.pressed[e.keyCode]&&(services_keyboard.press(i,vel),this.pressed[e.keyCode]=i)}handleKeyup(e){"CapsLock"===e.code&&(this.caps=!1),this.pressed[e.keyCode]&&(services_keyboard.release(this.pressed[e.keyCode]),delete this.pressed[e.keyCode])}}class VirtualPianoLayout{constructor(){this.pressed={}}handleKeydown(e){var t;let i=virtual_piano[e.keyCode];e.shiftKey&&(null===(t=info_namespaceObject.H[i-20])||void 0===t?void 0:t.includes("s"))&&(i+=1),i+=offset,isNaN(i)||i<21||i>108||i&&!this.pressed[e.keyCode]&&(services_keyboard.press(i,vel),this.pressed[e.keyCode]=i)}handleKeyup(e){this.pressed[e.keyCode]&&(services_keyboard.release(this.pressed[e.keyCode]),delete this.pressed[e.keyCode])}}const layoutManager=new LayoutManager,services_layout=null;var keyboard_awaiter=function(e,t,i,o){return new(i||(i=Promise))((function(a,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function r(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,r)}l((o=o.apply(e,t||[])).next())}))};class KeyboardState extends events.EventEmitter{constructor(e){super(),this.audioEngine=e,this.mapSustain=new Map,this.mapPressed=new Map,this.mapSustained=new Map,services_client.on("press",(({key:e,vel:t,id:i})=>this.press(e,t,i))),services_client.on("release",(({key:e,id:t})=>this.release(e,t))),services_client.on("sustain",(({enabled:e,id:t})=>this.sustain(e,t))),services_client.on("welcome",(e=>{this.releaseAllNotes(),this.mapPressed.set(e.id,new Set),this.mapSustained.set(e.id,new Set),this.mapSustain.set(e.id,!!this.mapSustain.get(services_client.me.id))})),services_client.on("join",(e=>{this.mapPressed.set(e.id,new Set),this.mapSustained.set(e.id,new Set),this.mapSustain.set(e.id,!1)})),services_client.on("leave",(e=>{this.releaseAllNotesFrom(e.id),this.mapPressed.delete(e.id),this.mapSustained.delete(e.id),this.mapSustain.delete(e.id)})),settingsmanager.on("sustain",(e=>this.sustain(e,void 0,!0)))}load(e){const t=[];for(let i=21;i<=108;++i)t.push((()=>keyboard_awaiter(this,void 0,void 0,(function*(){yield this.audioEngine.load(i.toString(),`sounds/${e}/${i}.mp3`),this.emit("loaded",i)})))());Promise.all(t).catch((()=>{NotificationManager.error("Failed to load sounds","Reload the page to try again.")}))}press(e,t,i,o){var a,s;"Backrooms"!==services_client.room.id&&(this.audioEngine.play(e.toString(),t),o||services_midi.sendNoteOn(e,t),i||(i=services_client.me.id,services_client.press(e,t)),(null===(a=this.mapPressed.get(i))||void 0===a?void 0:a.has(e))&&this.emit("release",e),null===(s=this.mapPressed.get(i))||void 0===s||s.add(e),this.mapSustain.get(i)&&this.mapSustained.get(i).add(e),this.emit("press",e,t,i))}release(e,t,i){var o,a;"Backrooms"!==services_client.room.id&&(this.emit("release",e),t||(t=services_client.me.id,services_client.release(e)),null===(o=this.mapPressed.get(t))||void 0===o||o.delete(e),(null===(a=this.mapSustained.get(t))||void 0===a?void 0:a.has(e))||(this.audioEngine.stop(null==e?void 0:e.toString()),i||services_midi.sendNoteOff(e)))}sustain(e,t,i){var o,a;"Backrooms"!==services_client.room.id&&(t||(t=services_client.me.id,services_client.sustain(e)),this.mapSustain.set(t,e),i&&services_midi.sendSustain(e),e?null===(o=this.mapPressed.get(t))||void 0===o||o.forEach((e=>{var i;return null===(i=this.mapSustained.get(t))||void 0===i?void 0:i.add(e)})):(null===(a=this.mapSustained.get(t))||void 0===a||a.forEach((e=>{var i,o;(null===(i=this.mapPressed.get(t))||void 0===i?void 0:i.has(e))||(null===(o=this.mapSustained.get(t))||void 0===o||o.delete(e),this.release(e,t))})),this.mapSustained.set(t,new Set)))}releaseAllNotes(){for(const[e,t]of this.mapPressed.entries())t.forEach((t=>this.release(t,e)))}releaseAllMyNotes(){this.releaseAllNotesFrom(services_client.me.id)}releaseAllNotesFrom(e){this.mapSustained.set(e,new Set);for(const t of this.mapPressed.get(e))this.release(t,e);for(const t of this.mapSustained.get(e))this.release(t,e)}isSustainEnabled(){return this.mapSustain.get(services_client.me.id)}}KeyboardState.TRANSPOSE_MIN=-36,KeyboardState.TRANSPOSE_MAX=36;const keyboard=new KeyboardState(audioengine),services_keyboard=keyboard;var pv_actions_code='
ID: ########
Promote
Demote
Make host
Mute notes
Muted notes
Mute chat
Muted chat
Kick
Ban
Ban IP
';const pv_actions=pv_actions_code;var pv_actions_pv_actions=__webpack_require__(7966),pv_actions_options={};pv_actions_options.styleTagTransform=styleTagTransform_default(),pv_actions_options.setAttributes=setAttributesWithoutAttributes_default(),pv_actions_options.insert=insertBySelector_default().bind(null,"head"),pv_actions_options.domAPI=styleDomAPI_default(),pv_actions_options.insertStyleElement=insertStyleElement_default();var pv_actions_update=injectStylesIntoStyleTag_default()(pv_actions_pv_actions.A,pv_actions_options);const popups_pv_actions_pv_actions=pv_actions_pv_actions.A&&pv_actions_pv_actions.A.locals?pv_actions_pv_actions.A.locals:void 0;var pv_actions_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_actions_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a,s,n,r,l,c,d,p;let u,v,h,m,f,_,g,b,y,w,k,x,E,S,P,T,I,C,O,A,M,N,L=components_pv_popup_pv_popup,D=[],R=[],j=[],F=[],z=[],B=[],U=[],W=[],G=[],K=[],V=[],H=[];return e=class extends L{get mod(){return pv_actions_classPrivateFieldGet(this,t,"f")}set mod(e){pv_actions_classPrivateFieldSet(this,t,e,"f")}get unmod(){return pv_actions_classPrivateFieldGet(this,i,"f")}set unmod(e){pv_actions_classPrivateFieldSet(this,i,e,"f")}get muteNotes(){return pv_actions_classPrivateFieldGet(this,o,"f")}set muteNotes(e){pv_actions_classPrivateFieldSet(this,o,e,"f")}get unmuteNotes(){return pv_actions_classPrivateFieldGet(this,a,"f")}set unmuteNotes(e){pv_actions_classPrivateFieldSet(this,a,e,"f")}get muteChat(){return pv_actions_classPrivateFieldGet(this,s,"f")}set muteChat(e){pv_actions_classPrivateFieldSet(this,s,e,"f")}get unmuteChat(){return pv_actions_classPrivateFieldGet(this,n,"f")}set unmuteChat(e){pv_actions_classPrivateFieldSet(this,n,e,"f")}get chown(){return pv_actions_classPrivateFieldGet(this,r,"f")}set chown(e){pv_actions_classPrivateFieldSet(this,r,e,"f")}get kick(){return pv_actions_classPrivateFieldGet(this,l,"f")}set kick(e){pv_actions_classPrivateFieldSet(this,l,e,"f")}get ban(){return pv_actions_classPrivateFieldGet(this,c,"f")}set ban(e){pv_actions_classPrivateFieldSet(this,c,e,"f")}get banip(){return pv_actions_classPrivateFieldGet(this,d,"f")}set banip(e){pv_actions_classPrivateFieldSet(this,d,e,"f")}get userid(){return pv_actions_classPrivateFieldGet(this,p,"f")}set userid(e){pv_actions_classPrivateFieldSet(this,p,e,"f")}constructor(){super(),t.set(this,(pv_actions_runInitializers(this,D),pv_actions_runInitializers(this,R,void 0))),i.set(this,pv_actions_runInitializers(this,j,void 0)),o.set(this,pv_actions_runInitializers(this,F,void 0)),a.set(this,pv_actions_runInitializers(this,z,void 0)),s.set(this,pv_actions_runInitializers(this,B,void 0)),n.set(this,pv_actions_runInitializers(this,U,void 0)),r.set(this,pv_actions_runInitializers(this,W,void 0)),l.set(this,pv_actions_runInitializers(this,G,void 0)),c.set(this,pv_actions_runInitializers(this,K,void 0)),d.set(this,pv_actions_runInitializers(this,V,void 0)),p.set(this,pv_actions_runInitializers(this,H,void 0)),this.innerHTML=pv_actions,services_client.once("leave",this.onLeave)}onOpen(e){this.contextId=e,this.mod.addEventListener("click",this.onMod),this.unmod.addEventListener("click",this.onUnmod),this.chown.addEventListener("click",this.onChown),this.muteNotes.addEventListener("click",this.onMuteNotes),this.unmuteNotes.addEventListener("click",this.onUnmuteNotes),this.muteChat.addEventListener("click",this.onMuteChat),this.unmuteChat.addEventListener("click",this.onUnmuteChat),this.kick.addEventListener("click",this.onKick),this.ban.addEventListener("click",this.onBan),this.banip.addEventListener("click",this.onBanIP),this.userid.innerText=`ID: ${e}`,this.querySelector(".content").style.color=`color-mix(in hsl, var(--color-white) 50%, ${services_client.get(e).color})`,this.querySelector(".content").style.background=`linear-gradient(135deg, ${services_client.get(e).color}55, ${services_client.get(e).color}40)`,e===services_client.room.owner||services_client.me.id!==services_client.room.owner&&services_client.me.role!==role.DEVELOPER||"Lobby"===services_client.room.id?this.chown.style.display="none":this.chown.style.display="block",services_client.me.role===role.DEVELOPER?(this.banip.style.display="block",services_client.get(e).role===role.MODERATOR?(this.mod.style.display="none",this.unmod.style.display="block"):(this.mod.style.display="block",this.unmod.style.display="none")):(this.banip.style.display="none",this.mod.style.display="none",this.unmod.style.display="none"),services_client.get(e).muted?(this.unmuteNotes.style.display="block",this.muteNotes.style.display="none"):(this.unmuteNotes.style.display="none",this.muteNotes.style.display="block"),services_client.get(e).mutedChat?(this.unmuteChat.style.display="block",this.muteChat.style.display="none"):(this.unmuteChat.style.display="none",this.muteChat.style.display="block");const t=services_client.me.id===services_client.room.owner,i=services_client.me.role===role.MODERATOR||services_client.me.role===role.DEVELOPER;t&&services_client.me.role>=services_client.get(e).role||i&&services_client.me.role>services_client.get(e).role?(this.kick.style.display="block",this.ban.style.display="block"):(this.kick.style.display="none",this.ban.style.display="none")}onClose(){this.muteNotes.removeEventListener("click",this.onMuteNotes),this.kick.removeEventListener("click",this.onKick),services_client.off("leave",this.onLeave)}onMod(){services_client.mod(this.contextId),this.mod.style.display="none",this.unmod.style.display="block"}onUnmod(){services_client.unmod(this.contextId),this.mod.style.display="block",this.unmod.style.display="none"}onChown(){services_client.chown(this.contextId),this.close()}onMuteNotes(){var e;services_client.mute(this.contextId),setTimeout((()=>services_keyboard.releaseAllNotesFrom(this.contextId)),250),this.unmuteNotes.style.display="block",this.muteNotes.style.display="none",null===(e=document.querySelector("pv-users"))||void 0===e||e.initialize()}onUnmuteNotes(){var e;services_client.unmute(this.contextId),this.unmuteNotes.style.display="none",this.muteNotes.style.display="block",null===(e=document.querySelector("pv-users"))||void 0===e||e.initialize()}onMuteChat(){var e,t;services_client.get(this.contextId).mutedChat=!0,this.unmuteChat.style.display="block",this.muteChat.style.display="none",null===(e=document.querySelector("pv-users"))||void 0===e||e.initialize(),null===(t=document.querySelector("pv-chat"))||void 0===t||t.updateMutedMessages()}onUnmuteChat(){var e,t;services_client.get(this.contextId).mutedChat=!1,this.unmuteChat.style.display="none",this.muteChat.style.display="block",null===(e=document.querySelector("pv-users"))||void 0===e||e.initialize(),null===(t=document.querySelector("pv-chat"))||void 0===t||t.updateMutedMessages()}onKick(){services_client.kick(this.contextId),this.close()}onBan(){PopupManager.open(Modal.BAN,null,this.contextId),this.close()}onBanIP(){services_client.ipban(this.contextId),this.close()}onLeave(e){e.id===this.contextId&&this.isOpen()&&this.close()}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,p=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=L[Symbol.metadata])&&void 0!==t?t:null):void 0;u=[decorators_child],v=[decorators_child],h=[decorators_child],m=[decorators_child],f=[decorators_child],_=[decorators_child],g=[decorators_child],b=[decorators_child],y=[decorators_child],w=[decorators_child],k=[decorators_child],x=[bind],E=[bind],S=[bind],P=[bind],T=[bind],I=[bind],C=[bind],O=[bind],A=[bind],M=[bind],N=[bind],pv_actions_esDecorate(e,null,u,{kind:"accessor",name:"mod",static:!1,private:!1,access:{has:e=>"mod"in e,get:e=>e.mod,set:(e,t)=>{e.mod=t}},metadata:i},R,D),pv_actions_esDecorate(e,null,v,{kind:"accessor",name:"unmod",static:!1,private:!1,access:{has:e=>"unmod"in e,get:e=>e.unmod,set:(e,t)=>{e.unmod=t}},metadata:i},j,D),pv_actions_esDecorate(e,null,h,{kind:"accessor",name:"muteNotes",static:!1,private:!1,access:{has:e=>"muteNotes"in e,get:e=>e.muteNotes,set:(e,t)=>{e.muteNotes=t}},metadata:i},F,D),pv_actions_esDecorate(e,null,m,{kind:"accessor",name:"unmuteNotes",static:!1,private:!1,access:{has:e=>"unmuteNotes"in e,get:e=>e.unmuteNotes,set:(e,t)=>{e.unmuteNotes=t}},metadata:i},z,D),pv_actions_esDecorate(e,null,f,{kind:"accessor",name:"muteChat",static:!1,private:!1,access:{has:e=>"muteChat"in e,get:e=>e.muteChat,set:(e,t)=>{e.muteChat=t}},metadata:i},B,D),pv_actions_esDecorate(e,null,_,{kind:"accessor",name:"unmuteChat",static:!1,private:!1,access:{has:e=>"unmuteChat"in e,get:e=>e.unmuteChat,set:(e,t)=>{e.unmuteChat=t}},metadata:i},U,D),pv_actions_esDecorate(e,null,g,{kind:"accessor",name:"chown",static:!1,private:!1,access:{has:e=>"chown"in e,get:e=>e.chown,set:(e,t)=>{e.chown=t}},metadata:i},W,D),pv_actions_esDecorate(e,null,b,{kind:"accessor",name:"kick",static:!1,private:!1,access:{has:e=>"kick"in e,get:e=>e.kick,set:(e,t)=>{e.kick=t}},metadata:i},G,D),pv_actions_esDecorate(e,null,y,{kind:"accessor",name:"ban",static:!1,private:!1,access:{has:e=>"ban"in e,get:e=>e.ban,set:(e,t)=>{e.ban=t}},metadata:i},K,D),pv_actions_esDecorate(e,null,w,{kind:"accessor",name:"banip",static:!1,private:!1,access:{has:e=>"banip"in e,get:e=>e.banip,set:(e,t)=>{e.banip=t}},metadata:i},V,D),pv_actions_esDecorate(e,null,k,{kind:"accessor",name:"userid",static:!1,private:!1,access:{has:e=>"userid"in e,get:e=>e.userid,set:(e,t)=>{e.userid=t}},metadata:i},H,D),pv_actions_esDecorate(e,null,x,{kind:"method",name:"onMod",static:!1,private:!1,access:{has:e=>"onMod"in e,get:e=>e.onMod},metadata:i},null,D),pv_actions_esDecorate(e,null,E,{kind:"method",name:"onUnmod",static:!1,private:!1,access:{has:e=>"onUnmod"in e,get:e=>e.onUnmod},metadata:i},null,D),pv_actions_esDecorate(e,null,S,{kind:"method",name:"onChown",static:!1,private:!1,access:{has:e=>"onChown"in e,get:e=>e.onChown},metadata:i},null,D),pv_actions_esDecorate(e,null,P,{kind:"method",name:"onMuteNotes",static:!1,private:!1,access:{has:e=>"onMuteNotes"in e,get:e=>e.onMuteNotes},metadata:i},null,D),pv_actions_esDecorate(e,null,T,{kind:"method",name:"onUnmuteNotes",static:!1,private:!1,access:{has:e=>"onUnmuteNotes"in e,get:e=>e.onUnmuteNotes},metadata:i},null,D),pv_actions_esDecorate(e,null,I,{kind:"method",name:"onMuteChat",static:!1,private:!1,access:{has:e=>"onMuteChat"in e,get:e=>e.onMuteChat},metadata:i},null,D),pv_actions_esDecorate(e,null,C,{kind:"method",name:"onUnmuteChat",static:!1,private:!1,access:{has:e=>"onUnmuteChat"in e,get:e=>e.onUnmuteChat},metadata:i},null,D),pv_actions_esDecorate(e,null,O,{kind:"method",name:"onKick",static:!1,private:!1,access:{has:e=>"onKick"in e,get:e=>e.onKick},metadata:i},null,D),pv_actions_esDecorate(e,null,A,{kind:"method",name:"onBan",static:!1,private:!1,access:{has:e=>"onBan"in e,get:e=>e.onBan},metadata:i},null,D),pv_actions_esDecorate(e,null,M,{kind:"method",name:"onBanIP",static:!1,private:!1,access:{has:e=>"onBanIP"in e,get:e=>e.onBanIP},metadata:i},null,D),pv_actions_esDecorate(e,null,N,{kind:"method",name:"onLeave",static:!1,private:!1,access:{has:e=>"onLeave"in e,get:e=>e.onLeave},metadata:i},null,D),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_actions_pv_actions=PvActions;customElements.define("pv-actions",PvActions);var pv_devices_code='
Name In Out
';const pv_devices=pv_devices_code;var pv_devices_pv_devices=__webpack_require__(6138),pv_devices_options={};pv_devices_options.styleTagTransform=styleTagTransform_default(),pv_devices_options.setAttributes=setAttributesWithoutAttributes_default(),pv_devices_options.insert=insertBySelector_default().bind(null,"head"),pv_devices_options.domAPI=styleDomAPI_default(),pv_devices_options.insertStyleElement=insertStyleElement_default();var pv_devices_update=injectStylesIntoStyleTag_default()(pv_devices_pv_devices.A,pv_devices_options);const popups_pv_devices_pv_devices=pv_devices_pv_devices.A&&pv_devices_pv_devices.A.locals?pv_devices_pv_devices.A.locals:void 0;var pv_devices_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_devices_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o,a=components_pv_popup_pv_popup,s=[],n=[];return e=class extends a{get devices(){return pv_devices_classPrivateFieldGet(this,t,"f")}set devices(e){pv_devices_classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(pv_devices_runInitializers(this,s),pv_devices_runInitializers(this,n,void 0))),this.innerHTML=pv_devices}connectedCallback(){super.connectedCallback(),services_midi.on("update",this.updateDevices),this.updateDevices()}disconnectedCallback(){services_midi.off("update",this.updateDevices)}updateDevices(){this.devices.innerHTML="";for(const e of services_midi.devices.values()){const t=document.createElement("tr"),i=document.createElement("td"),o=document.createElement("td"),a=document.createElement("td");if(i.textContent=e.name,i.title=e.name,t.append(i),e.in){const t=document.createElement("div");t.classList.add("field");const i=document.createElement("label");i.classList.add("toggle");const a=document.createElement("input");a.type="checkbox",a.checked=services_midi.isInputEnabled(e.in.id);const s=document.createElement("span");s.classList.add("slider"),s.addEventListener("click",(()=>{services_midi.isInputEnabled(e.in.id)?(services_midi.disableInput(e.in.id),services_keyboard.releaseAllMyNotes(),a.checked=!0):(services_midi.enableInput(e.in.id),a.checked=!1)})),i.append(a),i.append(s),t.append(i),o.append(t)}if(e.out){const t=document.createElement("div");t.classList.add("field");const i=document.createElement("label");i.classList.add("toggle");const o=document.createElement("input");o.type="checkbox",o.checked=services_midi.isOutputEnabled(e.out.id);const s=document.createElement("span");s.classList.add("slider"),s.addEventListener("click",(()=>{services_midi.isOutputEnabled(e.out.id)?(services_midi.disableOutput(e.out.id),services_keyboard.releaseAllMyNotes(),o.checked=!0):(services_midi.enableOutput(e.out.id),o.checked=!1)})),i.append(o),i.append(s),t.append(i),a.append(t)}t.append(o),t.append(a),this.devices.append(t)}if(0===services_midi.devices.size){const e=document.createElement("tr"),t=document.createElement("td"),i=document.createElement("td"),o=document.createElement("td");t.textContent="None",t.classList.add("muted"),e.append(t);{const e=document.createElement("div");e.classList.add("field");const t=document.createElement("label");t.classList.add("toggle");const o=document.createElement("input");o.type="checkbox",o.checked=!1,o.disabled=!0;const a=document.createElement("span");a.classList.add("slider"),t.append(o),t.append(a),e.append(t),i.append(e)}{const e=document.createElement("div");e.classList.add("field");const t=document.createElement("label");t.classList.add("toggle");const i=document.createElement("input");i.type="checkbox",i.checked=!1,i.disabled=!0;const a=document.createElement("span");a.classList.add("slider"),t.append(i),t.append(a),e.append(t),o.append(e)}e.append(i),e.append(o),this.devices.append(e)}}},t=new WeakMap,(()=>{var t;const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=a[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],o=[bind],pv_devices_esDecorate(e,null,i,{kind:"accessor",name:"devices",static:!1,private:!1,access:{has:e=>"devices"in e,get:e=>e.devices,set:(e,t)=>{e.devices=t}},metadata:r},n,s),pv_devices_esDecorate(e,null,o,{kind:"method",name:"updateDevices",static:!1,private:!1,access:{has:e=>"updateDevices"in e,get:e=>e.updateDevices},metadata:r},null,s),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();const components_popups_pv_devices_pv_devices=PvDevices;customElements.define("pv-devices",PvDevices);var pv_message_code='
Information
';const pv_message=pv_message_code;var pv_message_pv_message=__webpack_require__(9114),pv_message_options={};pv_message_options.styleTagTransform=styleTagTransform_default(),pv_message_options.setAttributes=setAttributesWithoutAttributes_default(),pv_message_options.insert=insertBySelector_default().bind(null,"head"),pv_message_options.domAPI=styleDomAPI_default(),pv_message_options.insertStyleElement=insertStyleElement_default();var pv_message_update=injectStylesIntoStyleTag_default()(pv_message_pv_message.A,pv_message_options);const popups_pv_message_pv_message=pv_message_pv_message.A&&pv_message_pv_message.A.locals?pv_message_pv_message.A.locals:void 0;var pv_message_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_message_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s=components_pv_popup_pv_popup,n=[],r=[],l=[];return e=class extends s{get message(){return pv_message_classPrivateFieldGet(this,t,"f")}set message(e){pv_message_classPrivateFieldSet(this,t,e,"f")}get closeButton(){return pv_message_classPrivateFieldGet(this,i,"f")}set closeButton(e){pv_message_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_message_runInitializers(this,n),pv_message_runInitializers(this,r,void 0))),i.set(this,pv_message_runInitializers(this,l,void 0)),this.innerHTML=pv_message}onOpen(e){this.message.textContent=e,this.closeButton.addEventListener("click",this.close)}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=s[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],pv_message_esDecorate(e,null,o,{kind:"accessor",name:"message",static:!1,private:!1,access:{has:e=>"message"in e,get:e=>e.message,set:(e,t)=>{e.message=t}},metadata:i},r,n),pv_message_esDecorate(e,null,a,{kind:"accessor",name:"closeButton",static:!1,private:!1,access:{has:e=>"closeButton"in e,get:e=>e.closeButton,set:(e,t)=>{e.closeButton=t}},metadata:i},l,n),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_message_pv_message=PvMessage;customElements.define("pv-message",PvMessage);var pv_profile_code='
My profile
';const pv_profile=pv_profile_code;var pv_profile_pv_profile=__webpack_require__(8394),pv_profile_options={};pv_profile_options.styleTagTransform=styleTagTransform_default(),pv_profile_options.setAttributes=setAttributesWithoutAttributes_default(),pv_profile_options.insert=insertBySelector_default().bind(null,"head"),pv_profile_options.domAPI=styleDomAPI_default(),pv_profile_options.insertStyleElement=insertStyleElement_default();var pv_profile_update=injectStylesIntoStyleTag_default()(pv_profile_pv_profile.A,pv_profile_options);const popups_pv_profile_pv_profile=pv_profile_pv_profile.A&&pv_profile_pv_profile.A.locals?pv_profile_pv_profile.A.locals:void 0;var pv_profile_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_profile_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a,s;let n,r,l,c,d,p,u,v,h,m,f=components_pv_popup_pv_popup,_=[],g=[],b=[],y=[],w=[],k=[];return e=class extends f{get inputId(){return pv_profile_classPrivateFieldGet(this,t,"f")}set inputId(e){pv_profile_classPrivateFieldSet(this,t,e,"f")}get inputUsername(){return pv_profile_classPrivateFieldGet(this,i,"f")}set inputUsername(e){pv_profile_classPrivateFieldSet(this,i,e,"f")}get inputColorText(){return pv_profile_classPrivateFieldGet(this,o,"f")}set inputColorText(e){pv_profile_classPrivateFieldSet(this,o,e,"f")}get inputColor(){return pv_profile_classPrivateFieldGet(this,a,"f")}set inputColor(e){pv_profile_classPrivateFieldSet(this,a,e,"f")}get buttonSave(){return pv_profile_classPrivateFieldGet(this,s,"f")}set buttonSave(e){pv_profile_classPrivateFieldSet(this,s,e,"f")}constructor(){super(),t.set(this,(pv_profile_runInitializers(this,_),pv_profile_runInitializers(this,g,void 0))),i.set(this,pv_profile_runInitializers(this,b,void 0)),o.set(this,pv_profile_runInitializers(this,y,void 0)),a.set(this,pv_profile_runInitializers(this,w,void 0)),s.set(this,pv_profile_runInitializers(this,k,void 0)),this.innerHTML=pv_profile}onOpen(){this.inputId.value=services_client.me.id,this.inputUsername.value=services_client.me.name,this.inputColor.value=services_client.me.color,this.inputColorText.value=services_client.me.color.toUpperCase(),this.inputUsername.focus()}connectedCallback(){super.connectedCallback(),this.buttonSave.addEventListener("click",this.submit),this.inputUsername.addEventListener("input",this.handleInput),this.inputUsername.addEventListener("keydown",this.handleKeyDown),this.inputColorText.addEventListener("input",this.handleColorTextInput),this.inputColorText.addEventListener("keydown",this.handleKeyDown),this.inputColor.addEventListener("input",this.handleColorInput)}handleColorTextInput(){null!==this.inputColorText.value.match(/^#[0-9A-F]{6}$/i)?this.inputColor.value=this.inputColorText.value:this.inputColor.value="#000000",this.buttonSave.disabled=!this.isValid()}handleColorInput(){this.inputColorText.value=this.inputColor.value.toUpperCase(),this.buttonSave.disabled=!this.isValid()}handleInput(){this.buttonSave.disabled=!this.isValid()}handleKeyDown(e){"Enter"===e.key&&this.isValid()&&this.submit()}submit(){this.close(),services_client.profile(this.inputUsername.value,this.inputColor.value)}isValid(){return this.inputUsername.value.trim().length>=2&&this.inputUsername.value.trim().length<=24&&null!==this.inputColorText.value.match(/^#[0-9A-F]{6}$/i)}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=f[Symbol.metadata])&&void 0!==t?t:null):void 0;n=[decorators_child],r=[decorators_child],l=[decorators_child],c=[decorators_child],d=[decorators_child],p=[bind],u=[bind],v=[bind],h=[bind],m=[bind],pv_profile_esDecorate(e,null,n,{kind:"accessor",name:"inputId",static:!1,private:!1,access:{has:e=>"inputId"in e,get:e=>e.inputId,set:(e,t)=>{e.inputId=t}},metadata:i},g,_),pv_profile_esDecorate(e,null,r,{kind:"accessor",name:"inputUsername",static:!1,private:!1,access:{has:e=>"inputUsername"in e,get:e=>e.inputUsername,set:(e,t)=>{e.inputUsername=t}},metadata:i},b,_),pv_profile_esDecorate(e,null,l,{kind:"accessor",name:"inputColorText",static:!1,private:!1,access:{has:e=>"inputColorText"in e,get:e=>e.inputColorText,set:(e,t)=>{e.inputColorText=t}},metadata:i},y,_),pv_profile_esDecorate(e,null,c,{kind:"accessor",name:"inputColor",static:!1,private:!1,access:{has:e=>"inputColor"in e,get:e=>e.inputColor,set:(e,t)=>{e.inputColor=t}},metadata:i},w,_),pv_profile_esDecorate(e,null,d,{kind:"accessor",name:"buttonSave",static:!1,private:!1,access:{has:e=>"buttonSave"in e,get:e=>e.buttonSave,set:(e,t)=>{e.buttonSave=t}},metadata:i},k,_),pv_profile_esDecorate(e,null,p,{kind:"method",name:"handleColorTextInput",static:!1,private:!1,access:{has:e=>"handleColorTextInput"in e,get:e=>e.handleColorTextInput},metadata:i},null,_),pv_profile_esDecorate(e,null,u,{kind:"method",name:"handleColorInput",static:!1,private:!1,access:{has:e=>"handleColorInput"in e,get:e=>e.handleColorInput},metadata:i},null,_),pv_profile_esDecorate(e,null,v,{kind:"method",name:"handleInput",static:!1,private:!1,access:{has:e=>"handleInput"in e,get:e=>e.handleInput},metadata:i},null,_),pv_profile_esDecorate(e,null,h,{kind:"method",name:"handleKeyDown",static:!1,private:!1,access:{has:e=>"handleKeyDown"in e,get:e=>e.handleKeyDown},metadata:i},null,_),pv_profile_esDecorate(e,null,m,{kind:"method",name:"submit",static:!1,private:!1,access:{has:e=>"submit"in e,get:e=>e.submit},metadata:i},null,_),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_profile_pv_profile=PvProfile;customElements.define("pv-profile",PvProfile);var pv_sounds_code='
Grand Piano
Salamander Piano
Soft Piano
Electric Piano
';const pv_sounds=pv_sounds_code;var pv_sounds_pv_sounds=__webpack_require__(5500),pv_sounds_options={};pv_sounds_options.styleTagTransform=styleTagTransform_default(),pv_sounds_options.setAttributes=setAttributesWithoutAttributes_default(),pv_sounds_options.insert=insertBySelector_default().bind(null,"head"),pv_sounds_options.domAPI=styleDomAPI_default(),pv_sounds_options.insertStyleElement=insertStyleElement_default();var pv_sounds_update=injectStylesIntoStyleTag_default()(pv_sounds_pv_sounds.A,pv_sounds_options);const popups_pv_sounds_pv_sounds=pv_sounds_pv_sounds.A&&pv_sounds_pv_sounds.A.locals?pv_sounds_pv_sounds.A.locals:void 0;var pv_sounds_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_sounds_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o=components_pv_popup_pv_popup,a=[],s=[];return e=class extends o{get content(){return pv_sounds_classPrivateFieldGet(this,t,"f")}set content(e){pv_sounds_classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(pv_sounds_runInitializers(this,a),pv_sounds_runInitializers(this,s,void 0))),this.innerHTML=pv_sounds}onOpen(e){const t=settingsmanager.get("sound");t&&this.querySelector(`[value=${t}]`).setAttribute("selected",""),this.content.addEventListener("click",(e=>{const t=e.target;"DIV"===t.tagName&&t.getAttribute("value")&&(settingsmanager.set("sound",t.getAttribute("value")||""),this.close())}))}},t=new WeakMap,(()=>{var t;const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=o[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],pv_sounds_esDecorate(e,null,i,{kind:"accessor",name:"content",static:!1,private:!1,access:{has:e=>"content"in e,get:e=>e.content,set:(e,t)=>{e.content=t}},metadata:n},s,a),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e})();const components_popups_pv_sounds_pv_sounds=PvSounds;customElements.define("pv-sounds",PvSounds);var pv_rooms_code='
';const pv_rooms=pv_rooms_code;var pv_rooms_pv_rooms=__webpack_require__(5760),pv_rooms_options={};pv_rooms_options.styleTagTransform=styleTagTransform_default(),pv_rooms_options.setAttributes=setAttributesWithoutAttributes_default(),pv_rooms_options.insert=insertBySelector_default().bind(null,"head"),pv_rooms_options.domAPI=styleDomAPI_default(),pv_rooms_options.insertStyleElement=insertStyleElement_default();var pv_rooms_update=injectStylesIntoStyleTag_default()(pv_rooms_pv_rooms.A,pv_rooms_options);const popups_pv_rooms_pv_rooms=pv_rooms_pv_rooms.A&&pv_rooms_pv_rooms.A.locals?pv_rooms_pv_rooms.A.locals:void 0;var pv_rooms_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_rooms_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o=components_pv_popup_pv_popup,a=[],s=[];return e=class extends o{get content(){return pv_rooms_classPrivateFieldGet(this,t,"f")}set content(e){pv_rooms_classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(pv_rooms_runInitializers(this,a),pv_rooms_runInitializers(this,s,void 0))),this.innerHTML=pv_rooms}onOpen(e){this.updateRooms(e,!0),this.content.addEventListener("click",(e=>{const t=e.target;"DIV"===t.tagName&&(t.getAttribute("value")?services_client.enter(t.getAttribute("value")):PopupManager.open(Modal.NEW_ROOM),this.close())}))}updateRooms(e,t=!1){this.content.innerHTML=e.map((e=>`\n
\n ${e.id}\n ${e.count}\n
`)).reverse().join(""),this.content.innerHTML+=`\n
\n New room...\n
`}},t=new WeakMap,(()=>{var t;const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=o[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],pv_rooms_esDecorate(e,null,i,{kind:"accessor",name:"content",static:!1,private:!1,access:{has:e=>"content"in e,get:e=>e.content,set:(e,t)=>{e.content=t}},metadata:n},s,a),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e})();const components_popups_pv_rooms_pv_rooms=PvRooms;customElements.define("pv-rooms",PvRooms);const attr=(e,t)=>(pv_component.observedAttributes.push(t.name.toString()),{get(){return this.getAttribute(t.name)},set(e){this.setAttribute(t.name.toString(),e)}}),decorators_attr=attr;var pv_ban_code='
Ban player
Are you sure you want to ban this player from the room?
';const pv_ban=pv_ban_code;var pv_ban_pv_ban=__webpack_require__(8138),pv_ban_options={};pv_ban_options.styleTagTransform=styleTagTransform_default(),pv_ban_options.setAttributes=setAttributesWithoutAttributes_default(),pv_ban_options.insert=insertBySelector_default().bind(null,"head"),pv_ban_options.domAPI=styleDomAPI_default(),pv_ban_options.insertStyleElement=insertStyleElement_default();var pv_ban_update=injectStylesIntoStyleTag_default()(pv_ban_pv_ban.A,pv_ban_options);const popups_pv_ban_pv_ban=pv_ban_pv_ban.A&&pv_ban_pv_ban.A.locals?pv_ban_pv_ban.A.locals:void 0;var pv_ban_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_ban_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r=components_pv_popup_pv_popup,l=[],c=[],d=[],p=[];return e=class extends r{get duration(){return pv_ban_classPrivateFieldGet(this,t,"f")}set duration(e){pv_ban_classPrivateFieldSet(this,t,e,"f")}get submit(){return pv_ban_classPrivateFieldGet(this,i,"f")}set submit(e){pv_ban_classPrivateFieldSet(this,i,e,"f")}get userId(){return pv_ban_classPrivateFieldGet(this,o,"f")}set userId(e){pv_ban_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_ban_runInitializers(this,l),pv_ban_runInitializers(this,c,void 0))),i.set(this,pv_ban_runInitializers(this,d,void 0)),o.set(this,pv_ban_runInitializers(this,p,void 0)),this.innerHTML=pv_ban}connectedCallback(){super.connectedCallback(),this.duration.value="60",this.submit.addEventListener("click",(()=>{const e=Number(this.duration.value);services_client.ban(this.userId,e),this.close()}))}onOpen(e){this.userId=e}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=r[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_attr],pv_ban_esDecorate(e,null,a,{kind:"accessor",name:"duration",static:!1,private:!1,access:{has:e=>"duration"in e,get:e=>e.duration,set:(e,t)=>{e.duration=t}},metadata:i},c,l),pv_ban_esDecorate(e,null,s,{kind:"accessor",name:"submit",static:!1,private:!1,access:{has:e=>"submit"in e,get:e=>e.submit,set:(e,t)=>{e.submit=t}},metadata:i},d,l),pv_ban_esDecorate(e,null,n,{kind:"accessor",name:"userId",static:!1,private:!1,access:{has:e=>"userId"in e,get:e=>e.userId,set:(e,t)=>{e.userId=t}},metadata:i},p,l),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_ban_pv_ban=PvBan;var Modal,Dialog;customElements.define("pv-ban",PvBan),function(e){e.PROFILE="pv-profile",e.SETTINGS="pv-settings",e.NEW_ROOM="pv-new-room",e.MESSAGE="pv-message",e.BAN="pv-ban"}(Modal||(Modal={})),function(e){e.ACTIONS="pv-actions",e.DEVICES="pv-devices",e.TRANSPOSE="pv-transpose",e.VELOCITY="pv-velocity",e.SOUNDS="pv-sounds",e.ROOMS="pv-rooms"}(Dialog||(Dialog={}));class PopupManager{static open(e,...t){let i;if(i=document.querySelector(e),i&&!i.querySelector("dialog").hasAttribute("closing"))return i.close(),i;switch(e){case Modal.BAN:i=new components_popups_pv_ban_pv_ban;break;case Modal.PROFILE:i=new components_popups_pv_profile_pv_profile;break;case Modal.SETTINGS:i=new components_popups_pv_settings_pv_settings;break;case Modal.MESSAGE:i=new components_popups_pv_message_pv_message;break;case Modal.NEW_ROOM:i=new components_popups_pv_new_room_pv_new_room;break;case Dialog.ROOMS:i=new components_popups_pv_rooms_pv_rooms;break;case Dialog.ACTIONS:i=new components_popups_pv_actions_pv_actions;break;case Dialog.DEVICES:i=new components_popups_pv_devices_pv_devices;break;case Dialog.SOUNDS:i=new components_popups_pv_sounds_pv_sounds;break;case Dialog.TRANSPOSE:i=new components_popups_pv_transpose_pv_transpose;break;case Dialog.VELOCITY:i=new components_popups_pv_velocity_pv_velocity;break;default:throw new Error(`Popup ${e} not found`)}return i&&(document.body.append(i),i.open(...t)),i}static closeEverything(){PopupManager.closeDialogs(),PopupManager.closeModals()}static closeModals(){const e=Object.values(Modal).join(", ");document.querySelectorAll(e).forEach((e=>e.close()))}static closeDialogs(){const e=Object.values(Dialog).join(", ");document.querySelectorAll(e).forEach((e=>e.close()))}}window.addEventListener("resize",(()=>PopupManager.closeDialogs()));class LoaderManager extends(events_default()){constructor(){super()}start(e){this.loader||(this.loader=new src_components_pv_loader_pv_loader,document.body.append(this.loader),PopupManager.closeDialogs(),PopupManager.closeModals()),this.loader.setCaption(e)}stop(){this.loader&&(this.loader.classList.add("closing"),this.loader.addEventListener("animationend",(()=>{var e;null===(e=this.loader)||void 0===e||e.remove(),this.loader=null})))}}const loader=new LoaderManager,loadermanager=loader;var pv_toolbar_code='
Transpose
Velocity
Sustain
MIDI
';const pv_toolbar=pv_toolbar_code;var pv_toolbar_pv_toolbar=__webpack_require__(2732),pv_toolbar_options={};pv_toolbar_options.styleTagTransform=styleTagTransform_default(),pv_toolbar_options.setAttributes=setAttributesWithoutAttributes_default(),pv_toolbar_options.insert=insertBySelector_default().bind(null,"head"),pv_toolbar_options.domAPI=styleDomAPI_default(),pv_toolbar_options.insertStyleElement=insertStyleElement_default();var pv_toolbar_update=injectStylesIntoStyleTag_default()(pv_toolbar_pv_toolbar.A,pv_toolbar_options);const components_pv_toolbar_pv_toolbar=pv_toolbar_pv_toolbar.A&&pv_toolbar_pv_toolbar.A.locals?pv_toolbar_pv_toolbar.A.locals:void 0;var pv_toolbar_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_toolbar_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a,s,n,r,l;let c,d,p,u,v,h,m,f,_=pv_component,g=[],b=[],y=[],w=[],k=[],x=[],E=[],S=[],P=[];return e=class extends _{get sounds(){return pv_toolbar_classPrivateFieldGet(this,t,"f")}set sounds(e){pv_toolbar_classPrivateFieldSet(this,t,e,"f")}get soundsValue(){return pv_toolbar_classPrivateFieldGet(this,i,"f")}set soundsValue(e){pv_toolbar_classPrivateFieldSet(this,i,e,"f")}get transpose(){return pv_toolbar_classPrivateFieldGet(this,o,"f")}set transpose(e){pv_toolbar_classPrivateFieldSet(this,o,e,"f")}get transposeValue(){return pv_toolbar_classPrivateFieldGet(this,a,"f")}set transposeValue(e){pv_toolbar_classPrivateFieldSet(this,a,e,"f")}get velocity(){return pv_toolbar_classPrivateFieldGet(this,s,"f")}set velocity(e){pv_toolbar_classPrivateFieldSet(this,s,e,"f")}get velocityValue(){return pv_toolbar_classPrivateFieldGet(this,n,"f")}set velocityValue(e){pv_toolbar_classPrivateFieldSet(this,n,e,"f")}get sustainValue(){return pv_toolbar_classPrivateFieldGet(this,r,"f")}set sustainValue(e){pv_toolbar_classPrivateFieldSet(this,r,e,"f")}get devices(){return pv_toolbar_classPrivateFieldGet(this,l,"f")}set devices(e){pv_toolbar_classPrivateFieldSet(this,l,e,"f")}constructor(){super(),t.set(this,(pv_toolbar_runInitializers(this,g),pv_toolbar_runInitializers(this,b,void 0))),i.set(this,pv_toolbar_runInitializers(this,y,void 0)),o.set(this,pv_toolbar_runInitializers(this,w,void 0)),a.set(this,pv_toolbar_runInitializers(this,k,void 0)),s.set(this,pv_toolbar_runInitializers(this,x,void 0)),n.set(this,pv_toolbar_runInitializers(this,E,void 0)),r.set(this,pv_toolbar_runInitializers(this,S,void 0)),l.set(this,pv_toolbar_runInitializers(this,P,void 0)),this.innerHTML=pv_toolbar}connectedCallback(){this.sounds.addEventListener("click",(()=>{this.sounds.classList.add("open"),PopupManager.open(Dialog.SOUNDS,this.sounds).onClosing((()=>this.sounds.classList.remove("open")))})),this.devices.addEventListener("click",(()=>{this.devices.classList.add("open"),PopupManager.open(Dialog.DEVICES,this.devices).onClosing((()=>this.devices.classList.remove("open")))})),this.transpose.addEventListener("click",(()=>{this.transpose.classList.add("open"),PopupManager.open(Dialog.TRANSPOSE,this.transpose).onClosing((()=>this.transpose.classList.remove("open")))})),this.velocity.addEventListener("click",(()=>{this.velocity.classList.add("open"),PopupManager.open(Dialog.VELOCITY,this.velocity).onClosing((()=>this.velocity.classList.remove("open")))})),settingsmanager.on("sound",(e=>{switch(e){case"grand":this.soundsValue.textContent="Grand Piano";break;case"salamander":this.soundsValue.textContent="Salamander Piano";break;case"soft":this.soundsValue.textContent="Soft Piano";break;case"electric":this.soundsValue.textContent="Electric Piano"}})),settingsmanager.on("transpose",(e=>this.transposeValue.textContent=e<=0?e.toString():"+"+e.toString())),settingsmanager.on("velocity",(e=>this.velocityValue.textContent=e.toString())),settingsmanager.on("sustain",(e=>this.sustainValue.checked=e)),this.sustainValue.addEventListener("click",(()=>{settingsmanager.set("sustain",!settingsmanager.get("sustain"))}))}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=_[Symbol.metadata])&&void 0!==t?t:null):void 0;c=[decorators_child],d=[decorators_child],p=[decorators_child],u=[decorators_child],v=[decorators_child],h=[decorators_child],m=[decorators_child],f=[decorators_child],pv_toolbar_esDecorate(e,null,c,{kind:"accessor",name:"sounds",static:!1,private:!1,access:{has:e=>"sounds"in e,get:e=>e.sounds,set:(e,t)=>{e.sounds=t}},metadata:i},b,g),pv_toolbar_esDecorate(e,null,d,{kind:"accessor",name:"soundsValue",static:!1,private:!1,access:{has:e=>"soundsValue"in e,get:e=>e.soundsValue,set:(e,t)=>{e.soundsValue=t}},metadata:i},y,g),pv_toolbar_esDecorate(e,null,p,{kind:"accessor",name:"transpose",static:!1,private:!1,access:{has:e=>"transpose"in e,get:e=>e.transpose,set:(e,t)=>{e.transpose=t}},metadata:i},w,g),pv_toolbar_esDecorate(e,null,u,{kind:"accessor",name:"transposeValue",static:!1,private:!1,access:{has:e=>"transposeValue"in e,get:e=>e.transposeValue,set:(e,t)=>{e.transposeValue=t}},metadata:i},k,g),pv_toolbar_esDecorate(e,null,v,{kind:"accessor",name:"velocity",static:!1,private:!1,access:{has:e=>"velocity"in e,get:e=>e.velocity,set:(e,t)=>{e.velocity=t}},metadata:i},x,g),pv_toolbar_esDecorate(e,null,h,{kind:"accessor",name:"velocityValue",static:!1,private:!1,access:{has:e=>"velocityValue"in e,get:e=>e.velocityValue,set:(e,t)=>{e.velocityValue=t}},metadata:i},E,g),pv_toolbar_esDecorate(e,null,m,{kind:"accessor",name:"sustainValue",static:!1,private:!1,access:{has:e=>"sustainValue"in e,get:e=>e.sustainValue,set:(e,t)=>{e.sustainValue=t}},metadata:i},S,g),pv_toolbar_esDecorate(e,null,f,{kind:"accessor",name:"devices",static:!1,private:!1,access:{has:e=>"devices"in e,get:e=>e.devices,set:(e,t)=>{e.devices=t}},metadata:i},P,g),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_toolbar_pv_toolbar=null;customElements.define("pv-toolbar",PvToolbar);var pv_header_code='
Pianoverse
';const pv_header=pv_header_code;var pv_header_pv_header=__webpack_require__(4950),pv_header_options={};pv_header_options.styleTagTransform=styleTagTransform_default(),pv_header_options.setAttributes=setAttributesWithoutAttributes_default(),pv_header_options.insert=insertBySelector_default().bind(null,"head"),pv_header_options.domAPI=styleDomAPI_default(),pv_header_options.insertStyleElement=insertStyleElement_default();var pv_header_update=injectStylesIntoStyleTag_default()(pv_header_pv_header.A,pv_header_options);const components_pv_header_pv_header=pv_header_pv_header.A&&pv_header_pv_header.A.locals?pv_header_pv_header.A.locals:void 0;var pv_header_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_header_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a,s,n;let r,l,c,d,p,u,v=pv_component,h=[],m=[],f=[],_=[],g=[],b=[],y=[];return e=class extends v{get pianoverse(){return pv_header_classPrivateFieldGet(this,t,"f")}set pianoverse(e){pv_header_classPrivateFieldSet(this,t,e,"f")}get volume(){return pv_header_classPrivateFieldGet(this,i,"f")}set volume(e){pv_header_classPrivateFieldSet(this,i,e,"f")}get volumeSlider(){return pv_header_classPrivateFieldGet(this,o,"f")}set volumeSlider(e){pv_header_classPrivateFieldSet(this,o,e,"f")}get mode(){return pv_header_classPrivateFieldGet(this,a,"f")}set mode(e){pv_header_classPrivateFieldSet(this,a,e,"f")}get discord(){return pv_header_classPrivateFieldGet(this,s,"f")}set discord(e){pv_header_classPrivateFieldSet(this,s,e,"f")}get settings(){return pv_header_classPrivateFieldGet(this,n,"f")}set settings(e){pv_header_classPrivateFieldSet(this,n,e,"f")}constructor(){super(),t.set(this,(pv_header_runInitializers(this,h),pv_header_runInitializers(this,m,void 0))),i.set(this,pv_header_runInitializers(this,f,void 0)),o.set(this,pv_header_runInitializers(this,_,void 0)),a.set(this,pv_header_runInitializers(this,g,void 0)),s.set(this,pv_header_runInitializers(this,b,void 0)),n.set(this,pv_header_runInitializers(this,y,void 0)),this.volumeBackup=100,this.innerHTML=pv_header,this.pianoverse.addEventListener("click",(()=>{var e;"Lobby"!==(null===(e=services_client.room)||void 0===e?void 0:e.id)&&services_client.enter("Lobby")})),this.volumeSlider.addEventListener("input",(()=>{settingsmanager.set("volume",parseInt(this.volumeSlider.value))})),settingsmanager.on("volume",(e=>{this.volumeSlider.value=e||0,e>0&&(this.volumeBackup=e)})),this.volume.addEventListener("wheel",(e=>{const t=settingsmanager.get("volume");e.deltaY>0?settingsmanager.set("volume",Math.max(t-5,0)):settingsmanager.set("volume",Math.min(t+5,100))}),{passive:!0}),this.volume.getElementsByTagName("i")[0].addEventListener("click",(()=>{0==settingsmanager.get("volume")?settingsmanager.set("volume",this.volumeBackup):settingsmanager.set("volume",0)})),this.mode.addEventListener("click",(()=>{settingsmanager.set("theme","dark"===settingsmanager.get("theme")?"light":"dark"),this.mode.dataset.tooltip="dark"===settingsmanager.get("theme")?"Dark mode":"Light mode",this.mode.querySelector("i").className="dark"===settingsmanager.get("theme")?"fas fa-moon":"fas fa-sun"}))}connectedCallback(){settingsmanager.on("volume",(e=>{this.volume.getElementsByTagName("i")[0].className=e<=0?"fas fa-volume-xmark":e<50?"fas fa-volume-low":"fas fa-volume-high"})),this.settings.addEventListener("click",(()=>{PopupManager.open(Modal.SETTINGS)})),this.discord.addEventListener("click",(()=>{window.open("https://discord.gg/nDE7GK7Bru","_blank")}))}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,n=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=v[Symbol.metadata])&&void 0!==t?t:null):void 0;r=[decorators_child],l=[decorators_child],c=[decorators_child],d=[decorators_child],p=[decorators_child],u=[decorators_child],pv_header_esDecorate(e,null,r,{kind:"accessor",name:"pianoverse",static:!1,private:!1,access:{has:e=>"pianoverse"in e,get:e=>e.pianoverse,set:(e,t)=>{e.pianoverse=t}},metadata:i},m,h),pv_header_esDecorate(e,null,l,{kind:"accessor",name:"volume",static:!1,private:!1,access:{has:e=>"volume"in e,get:e=>e.volume,set:(e,t)=>{e.volume=t}},metadata:i},f,h),pv_header_esDecorate(e,null,c,{kind:"accessor",name:"volumeSlider",static:!1,private:!1,access:{has:e=>"volumeSlider"in e,get:e=>e.volumeSlider,set:(e,t)=>{e.volumeSlider=t}},metadata:i},_,h),pv_header_esDecorate(e,null,d,{kind:"accessor",name:"mode",static:!1,private:!1,access:{has:e=>"mode"in e,get:e=>e.mode,set:(e,t)=>{e.mode=t}},metadata:i},g,h),pv_header_esDecorate(e,null,p,{kind:"accessor",name:"discord",static:!1,private:!1,access:{has:e=>"discord"in e,get:e=>e.discord,set:(e,t)=>{e.discord=t}},metadata:i},b,h),pv_header_esDecorate(e,null,u,{kind:"accessor",name:"settings",static:!1,private:!1,access:{has:e=>"settings"in e,get:e=>e.settings,set:(e,t)=>{e.settings=t}},metadata:i},y,h),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_header_pv_header=null;customElements.define("pv-header",PvHeader);var pv_note=__webpack_require__(1230),pv_note_options={};pv_note_options.styleTagTransform=styleTagTransform_default(),pv_note_options.setAttributes=setAttributesWithoutAttributes_default(),pv_note_options.insert=insertBySelector_default().bind(null,"head"),pv_note_options.domAPI=styleDomAPI_default(),pv_note_options.insertStyleElement=insertStyleElement_default();var pv_note_update=injectStylesIntoStyleTag_default()(pv_note.A,pv_note_options);const pv_note_pv_note=pv_note.A&&pv_note.A.locals?pv_note.A.locals:void 0;var pv_note_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_note_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r,l=pv_component,c=[],d=[],p=[],u=[];return e=class extends l{get left(){return pv_note_classPrivateFieldGet(this,t,"f")}set left(e){pv_note_classPrivateFieldSet(this,t,e,"f")}get width(){return pv_note_classPrivateFieldGet(this,i,"f")}set width(e){pv_note_classPrivateFieldSet(this,i,e,"f")}get color(){return pv_note_classPrivateFieldGet(this,o,"f")}set color(e){pv_note_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_note_runInitializers(this,c),pv_note_runInitializers(this,d,void 0))),i.set(this,pv_note_runInitializers(this,p,void 0)),o.set(this,pv_note_runInitializers(this,u,void 0)),this.released=!1}get h(){return this.getBoundingClientRect().height}get w(){return this.getBoundingClientRect().width}connectedCallback(){this.style.left=this.left,this.style.width=this.width,this.style.boxShadow=`\n ${this.color}7F 0px 5px,\n ${this.color}66 0px 10px,\n ${this.color}4C 0px 15px,\n ${this.color}33 0px 20px,\n ${this.color}19 0px 25px\n `}release(){this.released||(this.released=!0,this.style.height=`${Math.max(this.clientHeight+2,10)}px`,this.classList.add("released"),this.addEventListener("animationend",this.onAnimationEnd,{once:!0}))}onAnimationEnd(){this.remove()}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=l[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_attr],s=[decorators_attr],n=[decorators_attr],r=[bind],pv_note_esDecorate(e,null,a,{kind:"accessor",name:"left",static:!1,private:!1,access:{has:e=>"left"in e,get:e=>e.left,set:(e,t)=>{e.left=t}},metadata:i},d,c),pv_note_esDecorate(e,null,s,{kind:"accessor",name:"width",static:!1,private:!1,access:{has:e=>"width"in e,get:e=>e.width,set:(e,t)=>{e.width=t}},metadata:i},p,c),pv_note_esDecorate(e,null,n,{kind:"accessor",name:"color",static:!1,private:!1,access:{has:e=>"color"in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:i},u,c),pv_note_esDecorate(e,null,r,{kind:"method",name:"onAnimationEnd",static:!1,private:!1,access:{has:e=>"onAnimationEnd"in e,get:e=>e.onAnimationEnd},metadata:i},null,c),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_pv_note_pv_note=PvNote;function randf(e,t){return Math.random()*(t-e)+e}function randi(e,t){return Math.floor(Math.random()*(t-e+1))+e}customElements.define("pv-note",PvNote);var pv_canvas_code='
    ';const pv_canvas=pv_canvas_code;var pv_canvas_pv_canvas=__webpack_require__(5734),pv_canvas_options={};pv_canvas_options.styleTagTransform=styleTagTransform_default(),pv_canvas_options.setAttributes=setAttributesWithoutAttributes_default(),pv_canvas_options.insert=insertBySelector_default().bind(null,"head"),pv_canvas_options.domAPI=styleDomAPI_default(),pv_canvas_options.insertStyleElement=insertStyleElement_default();var pv_canvas_update=injectStylesIntoStyleTag_default()(pv_canvas_pv_canvas.A,pv_canvas_options);const components_pv_canvas_pv_canvas=pv_canvas_pv_canvas.A&&pv_canvas_pv_canvas.A.locals?pv_canvas_pv_canvas.A.locals:void 0;var pv_canvas_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_canvas_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n,r,l,c=pv_component,d=[],p=[],u=[];return e=class extends c{get bgCanvas(){return pv_canvas_classPrivateFieldGet(this,t,"f")}set bgCanvas(e){pv_canvas_classPrivateFieldSet(this,t,e,"f")}get fgCanvas(){return pv_canvas_classPrivateFieldGet(this,i,"f")}set fgCanvas(e){pv_canvas_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_canvas_runInitializers(this,d),pv_canvas_runInitializers(this,p,void 0))),i.set(this,pv_canvas_runInitializers(this,u,void 0)),this.particles=[],this.notes=[],this.start=0,this.frames=0,this.lastTime=0}connectedCallback(){this.innerHTML=pv_canvas,this.fgContext=this.fgCanvas.getContext("2d"),this.bgContext=this.bgCanvas.getContext("2d"),window.addEventListener("resize",this.onResize,{passive:!0}),document.addEventListener("DOMContentLoaded",this.onResize,{passive:!0,once:!0}),document.addEventListener("visibilitychange",this.onResize,{passive:!0}),services_keyboard.on("press",this.onKeyPressed),services_keyboard.on("release",this.onKeyReleased),settingsmanager.on("showEffects",(e=>{this.showEffects=e,this.particles=[]})),requestAnimationFrame(this.drawingAnimation)}drawingAnimation(e){0===this.start&&(this.start=e,this.lastTime=e);const t=(e-this.lastTime)/7;this.lastTime=e,this.frames++,this.drawForeground(),this.update(t),requestAnimationFrame(this.drawingAnimation)}update(t){for(let e=this.particles.length-1;e>=0;--e){const i=this.particles[e];i.r*=Math.pow(i.vr,t),i.r<=.5&&this.particles.splice(e,1),i.x+=i.vx*t,i.y+=i.vy*t,i.vx*=Math.pow(.95,t),i.vy*=Math.pow(.95,t)}for(const t of this.notes)if(t.pressed){const i=t.element.w,o=t.element.offsetLeft;for(let t=0;t<10;t++){const t=o+i/2+1.5*randf(-i/2,i/2);this.showEffects&&Math.random()>.7&&(this.particles.push({x:t,y:this.fgCanvas.height,vx:(t-o-i/2)/20,vy:randf(-4,-1),r:randf(2,2.4),vr:randf(.8,.99)}),this.particles.length>e.MAX_PARTICLES&&this.particles.shift())}}else t.element.isConnected||(this.notes=this.notes.filter((e=>e!==t)))}onKeyPressed(e,t,i){var o;if(document.hidden||!this.showEffects)return;const a=info_namespaceObject.H[e-21];if(!a)return;const s=a.includes("s"),n=a.replace("s",""),r=info_namespaceObject.H.filter((e=>!e.includes("s"))).indexOf(n),l=this.fgCanvas.width*(r/52),c=s?this.fgCanvas.width/52*.6:this.fgCanvas.width/52,d=new components_pv_note_pv_note;d.setAttribute("left",`${s?l+1.2*c:l}px`),d.setAttribute("width",`${c}px`),d.setAttribute("color",null===(o=services_client.get(i))||void 0===o?void 0:o.color),this.append(d),this.notes.push({key:e,pressed:!0,pressedAt:Date.now(),element:d})}onKeyReleased(e,t){const i=this.notes.filter((t=>e===t.key&&t.pressed));for(const e of i)e.pressed=!1,e.element.release()}onResize(){this.bgCanvas.width=this.clientWidth,this.bgCanvas.height=this.clientHeight,this.fgCanvas.width=this.clientWidth,this.fgCanvas.height=this.clientHeight,this.drawBackground()}drawForeground(){this.clear(this.fgContext),this.showEffects&&this.drawParticles(this.fgContext)}drawBackground(){this.clear(this.bgContext),this.drawOctaveLines(this.bgContext)}clear(e){e.clearRect(0,0,e.canvas.width,e.canvas.height)}drawParticles(e){e.fillStyle="white",e.shadowColor="white",e.shadowBlur=10,e.beginPath();for(let t=this.particles.length-1;t>=0;--t){const i=this.particles[t];e.moveTo(i.x+i.r,i.y),e.arc(i.x,i.y,i.r,0,2*Math.PI)}e.fill()}drawOctaveLines(e){e.strokeStyle="white",e.shadowBlur=0,e.globalAlpha=.02,e.lineWidth=1;const t=.03809*this.bgCanvas.width,i=.1346*this.bgCanvas.width;e.beginPath();for(let o=0;o<8;++o)e.moveTo(t+o*i,0),e.lineTo(t+o*i,this.bgCanvas.height);e.stroke()}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],n=[bind],r=[bind],l=[bind],pv_canvas_esDecorate(e,null,o,{kind:"accessor",name:"bgCanvas",static:!1,private:!1,access:{has:e=>"bgCanvas"in e,get:e=>e.bgCanvas,set:(e,t)=>{e.bgCanvas=t}},metadata:i},p,d),pv_canvas_esDecorate(e,null,a,{kind:"accessor",name:"fgCanvas",static:!1,private:!1,access:{has:e=>"fgCanvas"in e,get:e=>e.fgCanvas,set:(e,t)=>{e.fgCanvas=t}},metadata:i},u,d),pv_canvas_esDecorate(e,null,s,{kind:"method",name:"drawingAnimation",static:!1,private:!1,access:{has:e=>"drawingAnimation"in e,get:e=>e.drawingAnimation},metadata:i},null,d),pv_canvas_esDecorate(e,null,n,{kind:"method",name:"onKeyPressed",static:!1,private:!1,access:{has:e=>"onKeyPressed"in e,get:e=>e.onKeyPressed},metadata:i},null,d),pv_canvas_esDecorate(e,null,r,{kind:"method",name:"onKeyReleased",static:!1,private:!1,access:{has:e=>"onKeyReleased"in e,get:e=>e.onKeyReleased},metadata:i},null,d),pv_canvas_esDecorate(e,null,l,{kind:"method",name:"onResize",static:!1,private:!1,access:{has:e=>"onResize"in e,get:e=>e.onResize},metadata:i},null,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e.MAX_PARTICLES=2e3,e})();const src_components_pv_canvas_pv_canvas=null;customElements.define("pv-canvas",PvCanvas);var pv_cursor_code=' Anyonmous ';const pv_cursor=pv_cursor_code;var pv_cursor_pv_cursor=__webpack_require__(6610),pv_cursor_options={};pv_cursor_options.styleTagTransform=styleTagTransform_default(),pv_cursor_options.setAttributes=setAttributesWithoutAttributes_default(),pv_cursor_options.insert=insertBySelector_default().bind(null,"head"),pv_cursor_options.domAPI=styleDomAPI_default(),pv_cursor_options.insertStyleElement=insertStyleElement_default();var pv_cursor_update=injectStylesIntoStyleTag_default()(pv_cursor_pv_cursor.A,pv_cursor_options);const components_pv_cursor_pv_cursor=pv_cursor_pv_cursor.A&&pv_cursor_pv_cursor.A.locals?pv_cursor_pv_cursor.A.locals:void 0;var pv_cursor_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_cursor_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r=pv_component,l=[],c=[],d=[],p=[];return e=class extends r{get badge(){return pv_cursor_classPrivateFieldGet(this,t,"f")}set badge(e){pv_cursor_classPrivateFieldSet(this,t,e,"f")}get name(){return pv_cursor_classPrivateFieldGet(this,i,"f")}set name(e){pv_cursor_classPrivateFieldSet(this,i,e,"f")}get color(){return pv_cursor_classPrivateFieldGet(this,o,"f")}set color(e){pv_cursor_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_cursor_runInitializers(this,l),pv_cursor_runInitializers(this,c,void 0))),i.set(this,pv_cursor_runInitializers(this,d,void 0)),o.set(this,pv_cursor_runInitializers(this,p,void 0))}connectedCallback(){this.innerHTML=pv_cursor,this.badge.textContent=this.name,this.badge.style.color=`color-mix(in hsl, var(--color-white) 50%, ${this.color})`,this.badge.style.background=`linear-gradient(135deg, ${this.color}55, ${this.color}40)`,settingsmanager.get("showCursors")?this.style.display="flex":this.style.display="none",settingsmanager.on("showCursors",(e=>{this.style.display=e?"flex":"none"}))}onNameChange(e){this.badge.textContent=e}onColorChange(e){this.badge.style.color=`color-mix(in hsl, var(--color-white) 50%, ${e})`,this.badge.style.background=`linear-gradient(135deg, ${e}55, ${e}40)`}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=r[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_attr],n=[decorators_attr],pv_cursor_esDecorate(e,null,a,{kind:"accessor",name:"badge",static:!1,private:!1,access:{has:e=>"badge"in e,get:e=>e.badge,set:(e,t)=>{e.badge=t}},metadata:i},c,l),pv_cursor_esDecorate(e,null,s,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:i},d,l),pv_cursor_esDecorate(e,null,n,{kind:"accessor",name:"color",static:!1,private:!1,access:{has:e=>"color"in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:i},p,l),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_cursor_pv_cursor=PvCursor;customElements.define("pv-cursor",PvCursor);var pv_user_code=' ';const pv_user=pv_user_code;var pv_user_pv_user=__webpack_require__(8098),pv_user_options={};pv_user_options.styleTagTransform=styleTagTransform_default(),pv_user_options.setAttributes=setAttributesWithoutAttributes_default(),pv_user_options.insert=insertBySelector_default().bind(null,"head"),pv_user_options.domAPI=styleDomAPI_default(),pv_user_options.insertStyleElement=insertStyleElement_default();var pv_user_update=injectStylesIntoStyleTag_default()(pv_user_pv_user.A,pv_user_options);const components_pv_user_pv_user=pv_user_pv_user.A&&pv_user_pv_user.A.locals?pv_user_pv_user.A.locals:void 0;var pv_user_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_user_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n=pv_component,r=[],l=[],c=[];return e=class extends n{get text(){return pv_user_classPrivateFieldGet(this,t,"f")}set text(e){pv_user_classPrivateFieldSet(this,t,e,"f")}get badges(){return pv_user_classPrivateFieldGet(this,i,"f")}set badges(e){pv_user_classPrivateFieldSet(this,i,e,"f")}constructor(e){super(),t.set(this,(pv_user_runInitializers(this,r),pv_user_runInitializers(this,l,void 0))),i.set(this,pv_user_runInitializers(this,c,void 0)),this.user=e,this.id=null==e?void 0:e.id}update(e){this.user=e,this.initialize()}connectedCallback(){this.innerHTML=pv_user,this.initialize(),this.addEventListener("click",this.openActions)}initialize(){switch(this.text.textContent=this.user.name,this.text.style.color=`color-mix(in hsl, var(--color-white) 50%, ${this.user.color})`,this.style.background=`linear-gradient(135deg, ${this.user.color}55, ${this.user.color}40)`,this.badges.style.backgroundColor=`color-mix(in hsl, var(--color-black) 90%, ${this.user.color})`,this.badges.innerHTML="",this.user.role){case role.DEVELOPER:this.badges.style.display="block",this.badges.innerHTML="DEV";break;case role.MODERATOR:this.badges.style.display="block",this.badges.innerHTML="MOD";break;default:case role.USER:this.badges.style.display="none"}services_client.room.owner===this.user.id&&(this.badges.style.display="block",this.badges.innerHTML=this.badges.innerHTML?`${this.badges.innerHTML} / HOST`:"HOST"),services_client.me.id==this.user.id&&(this.badges.style.display="block",this.badges.innerHTML=this.badges.innerHTML?"ME / "+this.badges.innerHTML:"ME")}openActions(){this.classList.add("open"),(this.id===services_client.me.id?PopupManager.open(Modal.PROFILE):PopupManager.open(Dialog.ACTIONS,this,this.id)).onClosing((()=>this.classList.remove("open")))}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=n[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],pv_user_esDecorate(e,null,o,{kind:"accessor",name:"text",static:!1,private:!1,access:{has:e=>"text"in e,get:e=>e.text,set:(e,t)=>{e.text=t}},metadata:i},l,r),pv_user_esDecorate(e,null,a,{kind:"accessor",name:"badges",static:!1,private:!1,access:{has:e=>"badges"in e,get:e=>e.badges,set:(e,t)=>{e.badges=t}},metadata:i},c,r),pv_user_esDecorate(e,null,s,{kind:"method",name:"openActions",static:!1,private:!1,access:{has:e=>"openActions"in e,get:e=>e.openActions},metadata:i},null,r),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_user_pv_user=PvUser;customElements.define("pv-user",PvUser);var pv_users_code='
    ';const pv_users=pv_users_code;var pv_users_pv_users=__webpack_require__(8758),pv_users_options={};pv_users_options.styleTagTransform=styleTagTransform_default(),pv_users_options.setAttributes=setAttributesWithoutAttributes_default(),pv_users_options.insert=insertBySelector_default().bind(null,"head"),pv_users_options.domAPI=styleDomAPI_default(),pv_users_options.insertStyleElement=insertStyleElement_default();var pv_users_update=injectStylesIntoStyleTag_default()(pv_users_pv_users.A,pv_users_options);const components_pv_users_pv_users=pv_users_pv_users.A&&pv_users_pv_users.A.locals?pv_users_pv_users.A.locals:void 0;var pv_users_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_users_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o,a,s,n,r=pv_component,l=[],c=[];return e=class extends r{get users(){return pv_users_classPrivateFieldGet(this,t,"f")}set users(e){pv_users_classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(pv_users_runInitializers(this,l),pv_users_runInitializers(this,c,void 0)))}connectedCallback(){this.innerHTML=pv_users,services_client.on("welcome",this.initialize),services_client.on("chown",this.initialize),services_client.on("join",this.addUser),services_client.on("profile",this.updateUser),services_client.on("leave",this.removeUser),services_keyboard.on("press",((e,t,i)=>{const o=document.getElementById(i);o&&(o.style.animation="none",o.offsetHeight,o.style.animation="bounce 180ms ease-out")}))}initialize(){this.users.innerHTML="",this.addUser(services_client.me);for(const e of services_client.users)this.addUser(e)}addUser(e){const t=new src_components_pv_user_pv_user(e);null==t||t.classList.toggle("muted",!(!services_client.get(e.id).muted&&!services_client.get(e.id).mutedChat)),this.users.append(t)}updateUser(e){const t=document.getElementById(e.id);null==t||t.update(e),null==t||t.classList.toggle("muted",!(!services_client.get(e.id).muted&&!services_client.get(e.id).mutedChat))}removeUser(e){var t;null===(t=document.getElementById(e.id))||void 0===t||t.remove()}},t=new WeakMap,(()=>{var t;const d="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=r[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],o=[bind],a=[bind],s=[bind],n=[bind],pv_users_esDecorate(e,null,i,{kind:"accessor",name:"users",static:!1,private:!1,access:{has:e=>"users"in e,get:e=>e.users,set:(e,t)=>{e.users=t}},metadata:d},c,l),pv_users_esDecorate(e,null,o,{kind:"method",name:"initialize",static:!1,private:!1,access:{has:e=>"initialize"in e,get:e=>e.initialize},metadata:d},null,l),pv_users_esDecorate(e,null,a,{kind:"method",name:"addUser",static:!1,private:!1,access:{has:e=>"addUser"in e,get:e=>e.addUser},metadata:d},null,l),pv_users_esDecorate(e,null,s,{kind:"method",name:"updateUser",static:!1,private:!1,access:{has:e=>"updateUser"in e,get:e=>e.updateUser},metadata:d},null,l),pv_users_esDecorate(e,null,n,{kind:"method",name:"removeUser",static:!1,private:!1,access:{has:e=>"removeUser"in e,get:e=>e.removeUser},metadata:d},null,l),d&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d})})(),e})();const src_components_pv_users_pv_users=null;customElements.define("pv-users",PvUsers);var pv_keys_code='
    ';const pv_keys=pv_keys_code;var pv_keys_pv_keys=__webpack_require__(5750),pv_keys_options={};pv_keys_options.styleTagTransform=styleTagTransform_default(),pv_keys_options.setAttributes=setAttributesWithoutAttributes_default(),pv_keys_options.insert=insertBySelector_default().bind(null,"head"),pv_keys_options.domAPI=styleDomAPI_default(),pv_keys_options.insertStyleElement=insertStyleElement_default();var pv_keys_update=injectStylesIntoStyleTag_default()(pv_keys_pv_keys.A,pv_keys_options);const components_pv_keys_pv_keys=pv_keys_pv_keys.A&&pv_keys_pv_keys.A.locals?pv_keys_pv_keys.A.locals:void 0;var pv_keys_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0};let PvKeys=(()=>{var e;let t,i,o,a,s=pv_component,n=[];return e=class extends s{constructor(){super(),this.isTactile=(pv_keys_runInitializers(this,n),!1)}connectedCallback(){this.innerHTML=pv_keys,this.setupKeysListeners(),services_keyboard.on("loaded",this.onLoaded),services_keyboard.on("unloaded",this.onUnloaded),services_keyboard.on("press",this.onPress),services_keyboard.on("release",this.onRelease),settingsmanager.on("showLabels",(e=>{const t=this.querySelectorAll("[data-key]");for(const i of Array.from(t))i.classList.toggle("show-label",e)})),settingsmanager.on("sound",(e=>{const t=this.querySelectorAll("[data-key]");for(const e of Array.from(t))null==e||e.classList.add("loading");services_keyboard.load(e)}))}setupKeysListeners(){const e=this.querySelectorAll("[data-key]");for(const t of Array.from(e))t.addEventListener("mousedown",(e=>{if(this.isTactile)return;const i=e.target,o=Number(i.dataset.key),a=Math.floor(e.offsetY/t.clientHeight*127);services_keyboard.press(o,a);const s=()=>{services_keyboard.release(o),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s)})),t.addEventListener("touchstart",(e=>{e.preventDefault(),this.isTactile=!0;const t=e.target,i=Number(t.dataset.key);services_keyboard.press(i,110);const o=()=>{services_keyboard.release(i),document.removeEventListener("touchend",o)};document.addEventListener("touchend",o)}))}onLoaded(e){const t=this.querySelector(`[data-key="${e}"]`);null==t||t.classList.remove("loading")}onUnloaded(){const e=this.querySelectorAll("[data-key]");for(const t of Array.from(e))t.classList.add("loading")}onPress(e,t,i){const o=this.querySelector(`[data-key="${e}"]`);o&&(o.style.transitionDuration="0ms",o.style.backgroundColor=services_client.get(i).color)}onRelease(e){const t=this.querySelector(`[data-key="${e}"]`);t&&(t.style.transitionDuration="",t.style.backgroundColor="")}},(()=>{var r;const l="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(r=s[Symbol.metadata])&&void 0!==r?r:null):void 0;t=[bind],i=[bind],o=[bind],a=[bind],pv_keys_esDecorate(e,null,t,{kind:"method",name:"onLoaded",static:!1,private:!1,access:{has:e=>"onLoaded"in e,get:e=>e.onLoaded},metadata:l},null,n),pv_keys_esDecorate(e,null,i,{kind:"method",name:"onUnloaded",static:!1,private:!1,access:{has:e=>"onUnloaded"in e,get:e=>e.onUnloaded},metadata:l},null,n),pv_keys_esDecorate(e,null,o,{kind:"method",name:"onPress",static:!1,private:!1,access:{has:e=>"onPress"in e,get:e=>e.onPress},metadata:l},null,n),pv_keys_esDecorate(e,null,a,{kind:"method",name:"onRelease",static:!1,private:!1,access:{has:e=>"onRelease"in e,get:e=>e.onRelease},metadata:l},null,n),l&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:l})})(),e})();const src_components_pv_keys_pv_keys=null;customElements.define("pv-keys",PvKeys);var pv_knob_code='
    ';const pv_knob=pv_knob_code;var pv_knob_pv_knob=__webpack_require__(3142),pv_knob_options={};pv_knob_options.styleTagTransform=styleTagTransform_default(),pv_knob_options.setAttributes=setAttributesWithoutAttributes_default(),pv_knob_options.insert=insertBySelector_default().bind(null,"head"),pv_knob_options.domAPI=styleDomAPI_default(),pv_knob_options.insertStyleElement=insertStyleElement_default();var pv_knob_update=injectStylesIntoStyleTag_default()(pv_knob_pv_knob.A,pv_knob_options);const components_pv_knob_pv_knob=pv_knob_pv_knob.A&&pv_knob_pv_knob.A.locals?pv_knob_pv_knob.A.locals:void 0;var pv_knob_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_knob_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s=pv_component,n=[],r=[],l=[];return e=class extends s{get knob(){return pv_knob_classPrivateFieldGet(this,t,"f")}set knob(e){pv_knob_classPrivateFieldSet(this,t,e,"f")}get indicator(){return pv_knob_classPrivateFieldGet(this,i,"f")}set indicator(e){pv_knob_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_knob_runInitializers(this,n),pv_knob_runInitializers(this,r,void 0))),i.set(this,pv_knob_runInitializers(this,l,void 0)),this.angle=0,this.yStart=0,this.dragging=!1,this.value=0,this.MIN_ANGLE=-135,this.MAX_ANGLE=135,this.STEP=1,this.minValue=-24,this.maxValue=24}connectedCallback(){this.innerHTML=pv_knob;let e=0;this.knob.addEventListener("mousedown",(e=>{this.dragging=!0,this.yStart=e.clientY,e.preventDefault()})),window.addEventListener("mousemove",(t=>{if(!this.dragging)return;e+=this.yStart-t.clientY,this.yStart=t.clientY;const i=Math.floor(e/this.STEP);if(0!==i){e-=i*this.STEP,this.angle=Math.min(this.MAX_ANGLE,Math.max(this.MIN_ANGLE,this.angle+i*this.STEP));const t=this.angle<0?360+this.angle:this.angle;this.angle<0?this.knob.style.background=`conic-gradient(var(--color-cards) ${t}deg, var(--color-text) ${t}deg)`:this.knob.style.background=`conic-gradient(var(--color-text) ${t}deg, var(--color-cards) ${t}deg)`,this.value=this.calculateValue(),this.indicator.textContent=this.value.toString()}})),window.addEventListener("mouseup",(()=>this.dragging=!1)),this.indicator.textContent=this.value.toString()}calculateValue(){const e=this.maxValue-this.minValue,t=this.MAX_ANGLE-this.MIN_ANGLE;return Math.round((this.angle+this.MAX_ANGLE)/t*e+this.minValue)}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=s[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],pv_knob_esDecorate(e,null,o,{kind:"accessor",name:"knob",static:!1,private:!1,access:{has:e=>"knob"in e,get:e=>e.knob,set:(e,t)=>{e.knob=t}},metadata:i},r,n),pv_knob_esDecorate(e,null,a,{kind:"accessor",name:"indicator",static:!1,private:!1,access:{has:e=>"indicator"in e,get:e=>e.indicator,set:(e,t)=>{e.indicator=t}},metadata:i},l,n),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_knob_pv_knob=null;customElements.define("pv-knob",PvKnob);var pv_chat_code='
      ';const pv_chat=pv_chat_code;var pv_chat_pv_chat=__webpack_require__(9546),pv_chat_options={};pv_chat_options.styleTagTransform=styleTagTransform_default(),pv_chat_options.setAttributes=setAttributesWithoutAttributes_default(),pv_chat_options.insert=insertBySelector_default().bind(null,"head"),pv_chat_options.domAPI=styleDomAPI_default(),pv_chat_options.insertStyleElement=insertStyleElement_default();var pv_chat_update=injectStylesIntoStyleTag_default()(pv_chat_pv_chat.A,pv_chat_options);const components_pv_chat_pv_chat=pv_chat_pv_chat.A&&pv_chat_pv_chat.A.locals?pv_chat_pv_chat.A.locals:void 0;var pv_chat_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_chat_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r,l,c,d,p,u,v,h,m,f=pv_component,_=[],g=[],b=[],y=[];return e=class extends f{get messages(){return pv_chat_classPrivateFieldGet(this,t,"f")}set messages(e){pv_chat_classPrivateFieldSet(this,t,e,"f")}get input(){return pv_chat_classPrivateFieldGet(this,i,"f")}set input(e){pv_chat_classPrivateFieldSet(this,i,e,"f")}get send(){return pv_chat_classPrivateFieldGet(this,o,"f")}set send(e){pv_chat_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_chat_runInitializers(this,_),pv_chat_runInitializers(this,g,void 0))),i.set(this,pv_chat_runInitializers(this,b,void 0)),o.set(this,pv_chat_runInitializers(this,y,void 0))}connectedCallback(){this.innerHTML=pv_chat,window.addEventListener("resize",this.scrollDown,{passive:!0}),document.addEventListener("keydown",this.onDocumentKeyDown),this.input.addEventListener("keydown",this.onInputKeyDown),this.input.addEventListener("keyup",this.onInputKeyUp),this.send.addEventListener("click",this.sendChatMessage),services_client.on("welcome",this.onWelcome),services_client.on("chat",this.onMessage),services_client.on("join",this.onJoin),services_client.on("clear",this.clearChat)}updateMutedMessages(){var e;const t=this.messages.querySelectorAll("li");for(let i=0;i=this.messages.scrollHeight-this.messages.clientHeight-100}scrollDown(){this.messages.scrollTop=this.messages.scrollHeight}onDocumentKeyDown(e){document.activeElement===this.input?"Escape"===e.key&&this.input.blur():"Enter"===e.key&&this.input.focus()}onInputKeyDown(e){switch(e.key){case"Enter":this.sendChatMessage();break;case"Escape":this.input.blur()}e.stopPropagation()}onInputKeyUp(e){e.stopPropagation()}onWelcome({chat:e}){this.clearChat();for(const t of e)t.name?this.onMessage(t):this.sendSystemMessage(t.content);this.messages.scrollTop=this.messages.scrollHeight}onJoin(){this.messages.scrollTop=this.messages.scrollHeight}supercharge(t){let i="";for(let o of t.content.split(" ")){const t=o.match(e.REGEX_HYPERLINK);if(o.startsWith("@")&&o.length>2&&o.length<=24)o=`${escapeHtml(o)}`;else if(t){const e=escapeHtml(t[0]).replace(/&/g,"&");o=`${e}`}i+=`${o} `}const o=i.matchAll(e.REGEX_EMOJI);for(const e of o){const t="a"===e[0][4],o=e[1];i=i.replace(e[0],`emoji`)}return i}onMessage(t){var i;const o=this.isAtChatBottom();if(!t.name)return void this.sendSystemMessage(t.content);t.content=escapeHtml(t.content),t.name=escapeHtml(t.name);const a=this.supercharge(t),s=document.createElement("span");s.classList.add("username"),s.style.color=t.color,s.innerHTML="discord"===t.id?`${t.name} `:t.name,s.title=t.id;const n=document.createElement("li");for(n.classList.add("message"),t.id&&(n.setAttribute("from",t.id),(null===(i=services_client.get(t.id))||void 0===i?void 0:i.mutedChat)&&(n.style.display="none")),n.innerHTML=`${s.outerHTML}${a.trim()}`,this.messages.append(n);this.messages.children.length>e.MAX_MESSAGES;)this.messages.removeChild(this.messages.firstChild);o&&this.scrollDown()}sendChatMessage(){this.input.value.trim()&&(services_client.chat(this.input.value),this.input.value="")}clearChat(){this.messages.innerHTML=""}sendSystemMessage(e){const t=this.isAtChatBottom(),i=document.createElement("li");i.textContent=e,i.classList.add("system"),this.messages.append(i),t&&this.scrollDown()}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=f[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_child],r=[bind],l=[bind],c=[bind],d=[bind],p=[bind],u=[bind],v=[bind],h=[bind],m=[bind],pv_chat_esDecorate(e,null,a,{kind:"accessor",name:"messages",static:!1,private:!1,access:{has:e=>"messages"in e,get:e=>e.messages,set:(e,t)=>{e.messages=t}},metadata:i},g,_),pv_chat_esDecorate(e,null,s,{kind:"accessor",name:"input",static:!1,private:!1,access:{has:e=>"input"in e,get:e=>e.input,set:(e,t)=>{e.input=t}},metadata:i},b,_),pv_chat_esDecorate(e,null,n,{kind:"accessor",name:"send",static:!1,private:!1,access:{has:e=>"send"in e,get:e=>e.send,set:(e,t)=>{e.send=t}},metadata:i},y,_),pv_chat_esDecorate(e,null,r,{kind:"method",name:"scrollDown",static:!1,private:!1,access:{has:e=>"scrollDown"in e,get:e=>e.scrollDown},metadata:i},null,_),pv_chat_esDecorate(e,null,l,{kind:"method",name:"onDocumentKeyDown",static:!1,private:!1,access:{has:e=>"onDocumentKeyDown"in e,get:e=>e.onDocumentKeyDown},metadata:i},null,_),pv_chat_esDecorate(e,null,c,{kind:"method",name:"onInputKeyDown",static:!1,private:!1,access:{has:e=>"onInputKeyDown"in e,get:e=>e.onInputKeyDown},metadata:i},null,_),pv_chat_esDecorate(e,null,d,{kind:"method",name:"onInputKeyUp",static:!1,private:!1,access:{has:e=>"onInputKeyUp"in e,get:e=>e.onInputKeyUp},metadata:i},null,_),pv_chat_esDecorate(e,null,p,{kind:"method",name:"onWelcome",static:!1,private:!1,access:{has:e=>"onWelcome"in e,get:e=>e.onWelcome},metadata:i},null,_),pv_chat_esDecorate(e,null,u,{kind:"method",name:"onJoin",static:!1,private:!1,access:{has:e=>"onJoin"in e,get:e=>e.onJoin},metadata:i},null,_),pv_chat_esDecorate(e,null,v,{kind:"method",name:"onMessage",static:!1,private:!1,access:{has:e=>"onMessage"in e,get:e=>e.onMessage},metadata:i},null,_),pv_chat_esDecorate(e,null,h,{kind:"method",name:"sendChatMessage",static:!1,private:!1,access:{has:e=>"sendChatMessage"in e,get:e=>e.sendChatMessage},metadata:i},null,_),pv_chat_esDecorate(e,null,m,{kind:"method",name:"clearChat",static:!1,private:!1,access:{has:e=>"clearChat"in e,get:e=>e.clearChat},metadata:i},null,_),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e.MAX_MESSAGES=150,e.REGEX_HYPERLINK=/https?:\/\/[^\s@"'\$\{\}\\]{2,}/,e.REGEX_EMOJI=/<a?:.*?:(\d+)>/g,e})();const src_components_pv_chat_pv_chat=null;customElements.define("pv-chat",PvChat);var pv_ping_code=' Pinging... ';const pv_ping=pv_ping_code;var pv_ping_pv_ping=__webpack_require__(1358),pv_ping_options={};pv_ping_options.styleTagTransform=styleTagTransform_default(),pv_ping_options.setAttributes=setAttributesWithoutAttributes_default(),pv_ping_options.insert=insertBySelector_default().bind(null,"head"),pv_ping_options.domAPI=styleDomAPI_default(),pv_ping_options.insertStyleElement=insertStyleElement_default();var pv_ping_update=injectStylesIntoStyleTag_default()(pv_ping_pv_ping.A,pv_ping_options);const components_pv_ping_pv_ping=pv_ping_pv_ping.A&&pv_ping_pv_ping.A.locals?pv_ping_pv_ping.A.locals:void 0;var pv_ping_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_ping_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n=pv_component,r=[],l=[],c=[];return e=class extends n{get icon(){return pv_ping_classPrivateFieldGet(this,t,"f")}set icon(e){pv_ping_classPrivateFieldSet(this,t,e,"f")}get ms(){return pv_ping_classPrivateFieldGet(this,i,"f")}set ms(e){pv_ping_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_ping_runInitializers(this,r),pv_ping_runInitializers(this,l,void 0))),i.set(this,pv_ping_runInitializers(this,c,void 0)),this.pingDelay=2e3}connectedCallback(){this.innerHTML=pv_ping,this.pingInterval=setInterval(this.sendPing,this.pingDelay),services_client.isConnected()?this.sendPing():services_client.once("connected",this.sendPing)}sendPing(){let e=Date.now();services_client.ping()&&(services_client.removeAllListeners("pong"),services_client.once("pong",(()=>{const t=Date.now()-e;this.icon.className=t<200?"icon green fas fa-circle":t<500?"icon yellow fas fa-circle":t<1e3?"icon orange fas fa-circle":"icon red fas fa-circle",this.ms.textContent=`${t} ms`})))}disconnectedCallback(){clearInterval(this.pingInterval),services_client.off("connected",this.sendPing)}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=n[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],pv_ping_esDecorate(e,null,o,{kind:"accessor",name:"icon",static:!1,private:!1,access:{has:e=>"icon"in e,get:e=>e.icon,set:(e,t)=>{e.icon=t}},metadata:i},l,r),pv_ping_esDecorate(e,null,a,{kind:"accessor",name:"ms",static:!1,private:!1,access:{has:e=>"ms"in e,get:e=>e.ms,set:(e,t)=>{e.ms=t}},metadata:i},c,r),pv_ping_esDecorate(e,null,s,{kind:"method",name:"sendPing",static:!1,private:!1,access:{has:e=>"sendPing"in e,get:e=>e.sendPing},metadata:i},null,r),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_ping_pv_ping=null;customElements.define("pv-ping",PvPing);var pv_room_code='
      Offline
      ';const pv_room=pv_room_code;var pv_room_pv_room=__webpack_require__(6898),pv_room_options={};pv_room_options.styleTagTransform=styleTagTransform_default(),pv_room_options.setAttributes=setAttributesWithoutAttributes_default(),pv_room_options.insert=insertBySelector_default().bind(null,"head"),pv_room_options.domAPI=styleDomAPI_default(),pv_room_options.insertStyleElement=insertStyleElement_default();var pv_room_update=injectStylesIntoStyleTag_default()(pv_room_pv_room.A,pv_room_options);const components_pv_room_pv_room=pv_room_pv_room.A&&pv_room_pv_room.A.locals?pv_room_pv_room.A.locals:void 0;var pv_room_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_room_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n,r,l,c=pv_component,d=[],p=[],u=[];return e=class extends c{get roomSelector(){return pv_room_classPrivateFieldGet(this,t,"f")}set roomSelector(e){pv_room_classPrivateFieldSet(this,t,e,"f")}get roomName(){return pv_room_classPrivateFieldGet(this,i,"f")}set roomName(e){pv_room_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_room_runInitializers(this,d),pv_room_runInitializers(this,p,void 0))),i.set(this,pv_room_runInitializers(this,u,void 0)),this.rooms=[],this.popup=null}connectedCallback(){this.innerHTML=pv_room,this.roomSelector.addEventListener("click",this.onClickRoomSelector),services_client.on("welcome",this.updateAll),services_client.on("join",this.updateAll),services_client.on("leave",this.updateAll),services_client.on("rooms",this.updateRoomList),services_client.on("reconnecting",this.updateBrowserTab)}onClickRoomSelector(e){this.popup=PopupManager.open(Dialog.ROOMS,this,this.rooms),this.popup.onClosing((()=>this.popup=null))}updateRoomList(e){var t;this.rooms=e,null===(t=this.popup)||void 0===t||t.updateRooms(e)}updateAll(){this.updateBrowserTab(),this.roomName.textContent=services_client.room.id+` (${1+services_client.users.length})`||"--";const e=services_client.room.id.match(/^Lobby(?: [1-9])?$|^Backrooms$/);this.roomSelector.classList.toggle("lobby",!!e)}updateBrowserTab(){services_client.room.id?services_client.isConnected()?document.title=`Pianoverse - ${services_client.room.id} (${1+services_client.users.length})`:document.title=`Pianoverse - ${services_client.room.id}`:document.title="Pianoverse"}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],n=[bind],r=[bind],l=[bind],pv_room_esDecorate(e,null,o,{kind:"accessor",name:"roomSelector",static:!1,private:!1,access:{has:e=>"roomSelector"in e,get:e=>e.roomSelector,set:(e,t)=>{e.roomSelector=t}},metadata:i},p,d),pv_room_esDecorate(e,null,a,{kind:"accessor",name:"roomName",static:!1,private:!1,access:{has:e=>"roomName"in e,get:e=>e.roomName,set:(e,t)=>{e.roomName=t}},metadata:i},u,d),pv_room_esDecorate(e,null,s,{kind:"method",name:"onClickRoomSelector",static:!1,private:!1,access:{has:e=>"onClickRoomSelector"in e,get:e=>e.onClickRoomSelector},metadata:i},null,d),pv_room_esDecorate(e,null,n,{kind:"method",name:"updateRoomList",static:!1,private:!1,access:{has:e=>"updateRoomList"in e,get:e=>e.updateRoomList},metadata:i},null,d),pv_room_esDecorate(e,null,r,{kind:"method",name:"updateAll",static:!1,private:!1,access:{has:e=>"updateAll"in e,get:e=>e.updateAll},metadata:i},null,d),pv_room_esDecorate(e,null,l,{kind:"method",name:"updateBrowserTab",static:!1,private:!1,access:{has:e=>"updateBrowserTab"in e,get:e=>e.updateBrowserTab},metadata:i},null,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_room_pv_room=null;function distance(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}customElements.define("pv-room",PvRoom);let lastSent=Date.now(),lastCoords={x:0,y:0},hideMyCursor=!settingsmanager.get("showCursors");settingsmanager.on("showCursors",(e=>{hideMyCursor=!e,hideMyCursor&&services_client.move(1,1)})),document.addEventListener("touchmove",(e=>{var t,i,o,a,s,n;hideMyCursor||Date.now()-lastSent<10||distance(lastCoords,{x:null===(t=e.touches[0])||void 0===t?void 0:t.clientX,y:null===(i=e.touches[0])||void 0===i?void 0:i.clientY})<3||(services_client.move((null===(o=e.touches[0])||void 0===o?void 0:o.clientX)/window.innerWidth,(null===(a=e.touches[0])||void 0===a?void 0:a.clientY)/window.innerHeight),lastSent=Date.now(),lastCoords={x:null===(s=e.touches[0])||void 0===s?void 0:s.clientX,y:null===(n=e.touches[0])||void 0===n?void 0:n.clientY})})),document.addEventListener("mousemove",(e=>{hideMyCursor||Date.now()-lastSent<10||distance(lastCoords,{x:e.clientX,y:e.clientY})<3||(services_client.move(e.clientX/window.innerWidth,e.clientY/window.innerHeight),lastSent=Date.now(),lastCoords={x:e.clientX,y:e.clientY})}));const cursors=new Map,timeouts=new Map;function setFavicon(e){document.querySelector("link[rel=icon]").href=e?"favicon-light.svg":"favicon-dark.svg"}services_client.on("welcome",(e=>{cursors.forEach((e=>e.parentNode.removeChild(e))),cursors.clear()})),services_client.on("join",(e=>{if(cursors.has(e.id))return;const t=new src_components_pv_cursor_pv_cursor;t.setAttribute("name",e.name),t.setAttribute("color",e.color),t.classList.add("idle"),t.style.left=e.x*window.innerWidth+"px",t.style.top=e.y*window.innerHeight+"px",t.style.color=e.color,document.body.append(t),cursors.set(e.id,t)})),services_client.on("move",(e=>{if(!cursors.has(e.id))return;const t=cursors.get(e.id);t.style.left=e.x*window.innerWidth+"px",t.style.top=e.y*window.innerHeight+"px",t.classList.remove("idle"),timeouts.has(e.id)&&(clearTimeout(timeouts.get(e.id)),timeouts.delete(e.id)),timeouts.set(e.id,setTimeout((()=>t.classList.add("idle")),1500))})),services_client.on("leave",(e=>{var t;if(!cursors.has(e.id))return;const i=cursors.get(e.id);null===(t=i.parentNode)||void 0===t||t.removeChild(i),cursors.delete(e.id)})),services_client.on("profile",(e=>{if(!cursors.has(e.id))return;const t=cursors.get(e.id);t.setAttribute("name",e.name),t.setAttribute("color",e.color)})),services_client.on("reconnecting",(()=>{Array.from(cursors.values()).forEach((e=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),cursors.clear()})),settingsmanager.on("theme",(e=>document.body.dataset.theme=e)),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(e=>setFavicon(e.matches))),setFavicon(window.matchMedia("(prefers-color-scheme: dark)").matches),loadermanager.start("Joining the room..."),settingsmanager.restore(),settingsmanager.remove("darkTheme"),settingsmanager.remove("showNotes"),settingsmanager.remove("showParticles"),settingsmanager.remove("mppLayout"),settingsmanager.remove("showFps"),settingsmanager.remove("hideMyCursor"),settingsmanager.remove("showPing"),settingsmanager.setDefault("volume",100),settingsmanager.setDefault("transpose",0),settingsmanager.setDefault("velocity",110),settingsmanager.setDefault("sustain",!1),settingsmanager.setDefault("theme","dark"),settingsmanager.setDefault("keyboardLayout","virtualpiano"),settingsmanager.setDefault("showCursors",!0),settingsmanager.setDefault("showEffects",!0),settingsmanager.setDefault("showLabels",!1),settingsmanager.setDefault("sound","salamander"),"dark"!==settingsmanager.get("theme")&&"light"!==settingsmanager.get("theme")&&settingsmanager.set("theme","dark")})(); \ No newline at end of file +(()=>{"use strict";var __webpack_modules__={8045:e=>{e.exports=function(e,t){for(var i=new Array(arguments.length-1),o=0,a=2,s=!0;a{var i=t;i.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var o=new Array(64),a=new Array(123),s=0;s<64;)a[o[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(e,t,i){for(var a,s=null,n=[],r=0,l=0;t>2],a=(3&c)<<4,l=1;break;case 1:n[r++]=o[a|c>>4],a=(15&c)<<2,l=2;break;case 2:n[r++]=o[a|c>>6],n[r++]=o[63&c],l=0}r>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),r=0)}return l&&(n[r++]=o[a],n[r++]=61,1===l&&(n[r++]=61)),s?(r&&s.push(String.fromCharCode.apply(String,n.slice(0,r))),s.join("")):String.fromCharCode.apply(String,n.slice(0,r))};var n="invalid encoding";i.decode=function(e,t,i){for(var o,s=i,r=0,l=0;l1)break;if(void 0===(c=a[c]))throw Error(n);switch(r){case 0:o=c,r=1;break;case 1:t[i++]=o<<2|(48&c)>>4,o=c,r=2;break;case 2:t[i++]=(15&o)<<4|(60&c)>>2,o=c,r=3;break;case 3:t[i++]=(3&o)<<6|c,r=0}}if(1===r)throw Error(n);return i-s},i.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},4358:e=>{function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var i=this._listeners[e],o=0;o{function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),i=new Uint8Array(t.buffer),o=128===i[3];function a(e,o,a){t[0]=e,o[a]=i[0],o[a+1]=i[1],o[a+2]=i[2],o[a+3]=i[3]}function s(e,o,a){t[0]=e,o[a]=i[3],o[a+1]=i[2],o[a+2]=i[1],o[a+3]=i[0]}function n(e,o){return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i[3]=e[o+3],t[0]}function r(e,o){return i[3]=e[o],i[2]=e[o+1],i[1]=e[o+2],i[0]=e[o+3],t[0]}e.writeFloatLE=o?a:s,e.writeFloatBE=o?s:a,e.readFloatLE=o?n:r,e.readFloatBE=o?r:n}():function(){function t(e,t,i,o){var a=t<0?1:0;if(a&&(t=-t),0===t)e(1/t>0?0:2147483648,i,o);else if(isNaN(t))e(2143289344,i,o);else if(t>34028234663852886e22)e((a<<31|2139095040)>>>0,i,o);else if(t<11754943508222875e-54)e((a<<31|Math.round(t/1401298464324817e-60))>>>0,i,o);else{var s=Math.floor(Math.log(t)/Math.LN2);e((a<<31|s+127<<23|8388607&Math.round(t*Math.pow(2,-s)*8388608))>>>0,i,o)}}function n(e,t,i){var o=e(t,i),a=2*(o>>31)+1,s=o>>>23&255,n=8388607&o;return 255===s?n?NaN:a*(1/0):0===s?1401298464324817e-60*a*n:a*Math.pow(2,s-150)*(n+8388608)}e.writeFloatLE=t.bind(null,i),e.writeFloatBE=t.bind(null,o),e.readFloatLE=n.bind(null,a),e.readFloatBE=n.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),i=new Uint8Array(t.buffer),o=128===i[7];function a(e,o,a){t[0]=e,o[a]=i[0],o[a+1]=i[1],o[a+2]=i[2],o[a+3]=i[3],o[a+4]=i[4],o[a+5]=i[5],o[a+6]=i[6],o[a+7]=i[7]}function s(e,o,a){t[0]=e,o[a]=i[7],o[a+1]=i[6],o[a+2]=i[5],o[a+3]=i[4],o[a+4]=i[3],o[a+5]=i[2],o[a+6]=i[1],o[a+7]=i[0]}function n(e,o){return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i[3]=e[o+3],i[4]=e[o+4],i[5]=e[o+5],i[6]=e[o+6],i[7]=e[o+7],t[0]}function r(e,o){return i[7]=e[o],i[6]=e[o+1],i[5]=e[o+2],i[4]=e[o+3],i[3]=e[o+4],i[2]=e[o+5],i[1]=e[o+6],i[0]=e[o+7],t[0]}e.writeDoubleLE=o?a:s,e.writeDoubleBE=o?s:a,e.readDoubleLE=o?n:r,e.readDoubleBE=o?r:n}():function(){function t(e,t,i,o,a,s){var n=o<0?1:0;if(n&&(o=-o),0===o)e(0,a,s+t),e(1/o>0?0:2147483648,a,s+i);else if(isNaN(o))e(0,a,s+t),e(2146959360,a,s+i);else if(o>17976931348623157e292)e(0,a,s+t),e((n<<31|2146435072)>>>0,a,s+i);else{var r;if(o<22250738585072014e-324)e((r=o/5e-324)>>>0,a,s+t),e((n<<31|r/4294967296)>>>0,a,s+i);else{var l=Math.floor(Math.log(o)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(r=o*Math.pow(2,-l))>>>0,a,s+t),e((n<<31|l+1023<<20|1048576*r&1048575)>>>0,a,s+i)}}}function n(e,t,i,o,a){var s=e(o,a+t),n=e(o,a+i),r=2*(n>>31)+1,l=n>>>20&2047,c=4294967296*(1048575&n)+s;return 2047===l?c?NaN:r*(1/0):0===l?5e-324*r*c:r*Math.pow(2,l-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,i,0,4),e.writeDoubleBE=t.bind(null,o,4,0),e.readDoubleLE=n.bind(null,a,0,4),e.readDoubleBE=n.bind(null,s,4,0)}(),e}function i(e,t,i){t[i]=255&e,t[i+1]=e>>>8&255,t[i+2]=e>>>16&255,t[i+3]=e>>>24}function o(e,t,i){t[i]=e>>>24,t[i+1]=e>>>16&255,t[i+2]=e>>>8&255,t[i+3]=255&e}function a(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},4153:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},9390:e=>{e.exports=function(e,t,i){var o=i||8192,a=o>>>1,s=null,n=o;return function(i){if(i<1||i>a)return e(i);n+i>o&&(s=e(o),n=0);var r=t.call(s,n,n+=i);return 7&n&&(n=1+(7|n)),r}}},1447:(e,t)=>{var i=t;i.length=function(e){for(var t=0,i=0,o=0;o191&&o<224?s[n++]=(31&o)<<6|63&e[t++]:o>239&&o<365?(o=((7&o)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,s[n++]=55296+(o>>10),s[n++]=56320+(1023&o)):s[n++]=(15&o)<<12|(63&e[t++])<<6|63&e[t++],n>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,s)),n=0);return a?(n&&a.push(String.fromCharCode.apply(String,s.slice(0,n))),a.join("")):String.fromCharCode.apply(String,s.slice(0,n))},i.write=function(e,t,i){for(var o,a,s=i,n=0;n>6|192,t[i++]=63&o|128):55296==(64512&o)&&56320==(64512&(a=e.charCodeAt(n+1)))?(o=65536+((1023&o)<<10)+(1023&a),++n,t[i++]=o>>18|240,t[i++]=o>>12&63|128,t[i++]=o>>6&63|128,t[i++]=63&o|128):(t[i++]=o>>12|224,t[i++]=o>>6&63|128,t[i++]=63&o|128);return i-s}},8728:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}pv-notification{overflow:hidden;position:relative;opacity:.85;border-radius:max(.4vw,4px);animation:bounceLeftIn 400ms ease-in-out;z-index:150;transition:250ms;cursor:url(${p}),auto}pv-notification:not(:disabled):hover{transition:0ms}pv-notification .container{overflow:visible;position:relative;padding:10px 14px;margin:0px;background:var(--color-cards);color:var(--color-text);border-radius:max(.4vw,4px);box-shadow:var(--shadow);display:flex;flex-direction:row;gap:14px}pv-notification .container .notification-icon{display:flex;flex-direction:column;justify-content:center;align-items:center}pv-notification .container .notification-icon i{font-size:22px}pv-notification .container .notification-icon i.success{color:var(--color-green)}pv-notification .container .notification-icon i.warning{color:var(--color-yellow)}pv-notification .container .notification-icon i.error{color:var(--color-red)}pv-notification .container .notification-title{font-weight:bold}pv-notification .container .notification-text{font-weight:normal;opacity:.7}pv-notification:hover{opacity:1}pv-notification.closing{animation:bounceRightOut 400ms ease-in-out}pv-notification .notification-bar{opacity:0;z-index:999;position:absolute;bottom:0px;left:0;width:100%;height:2px;background-color:var(--color-text);-webkit-animation:timeout 10s linear forwards;-moz-animation:timeout 10s linear forwards;-o-animation:timeout 10s linear forwards;animation:timeout 10s linear forwards}pv-notification:hover+.notification-bar{-webkit-animation-play-state:paused;-moz-animation-play-state:paused;-o-animation-play-state:paused;animation-play-state:paused}`,""]);const u=d},4912:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=new URL(i(1873),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`dialog{padding:0;background-color:var(--color-cards);border:none;outline:none;overflow:visible;color:var(--color-text);position:absolute;bottom:0;top:0}dialog .header{display:flex;justify-content:space-between;padding:14px;font-size:1.2em;font-weight:bold;border-bottom:2px solid var(--color-hover)}dialog .header .title i{font-size:.87em;margin-right:5px}dialog .header .x{opacity:.4;transition:250ms;font-size:14px;border-radius:99px;padding:2px;width:26px;height:26px;background-color:var(--color-hover);display:flex;align-items:center;justify-content:center}dialog .header .x:hover{transition:0ms;opacity:1;cursor:url(${u}),auto}dialog .content{display:flex;flex-direction:column;padding:14px}dialog .content .buttons{display:flex;justify-content:right;align-items:end;gap:6px;margin-top:6px}dialog[modal]{border-radius:6px;box-shadow:var(--shadow);border:2px solid var(--color-hover)}dialog[modal][open]{animation:bounceUpIn 320ms ease-out}dialog[modal][open]::backdrop{animation:fadeIn 200ms ease-out}dialog[modal][closing]{animation:slideDownOut 100ms ease-out}dialog[modal][closing]::backdrop{animation:fadeOut 200ms ease-out}dialog[modal]::backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:rgba(0,0,0,.8);cursor:url(${v}),auto}dialog:not([modal]){z-index:100;border-radius:max(.4vw,4px);box-shadow:var(--shadow)}dialog:not([modal]) .content{border-radius:max(.4vw,4px)}dialog:not([modal])[open]{animation:slideDownIn 100ms ease-out}dialog:not([modal])[closing]{animation:slideUpOut 100ms ease-out}dialog:not([modal])::backdrop{background-color:rgba(0,0,0,0);cursor:url(${v}),auto;pointer-events:all}`,""]);const h=p},7966:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=new URL(i(9738),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`pv-actions dialog{min-width:170px}pv-actions dialog .content{background:rgba(0,0,0,0);padding:4px}pv-actions dialog .content div:not(:first-child){padding:9px 32px 9px 10px;cursor:url(${u}),auto;z-index:200;transition:150ms;border-radius:calc(max(.4vw,4px) - 2px)}pv-actions dialog .content div:not(:first-child):hover{transition:50ms;backdrop-filter:invert(0.1)}pv-actions dialog .content div:not(:first-child) i{margin-right:6px;width:18px;height:18px;text-align:center}pv-actions dialog .content .userid{user-select:text;cursor:url(${v}),auto;text-align:center;padding:6px 16px;font-size:14px;opacity:.4}pv-actions dialog .content .unmute-notes,pv-actions dialog .content .unmute-chat{color:var(--color-red);display:none}`,""]);const h=p},8138:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-ban dialog{width:290px}pv-ban dialog .content{gap:8px}",""]);const r=n},6138:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-devices dialog .content table{border-collapse:collapse;padding:0}pv-devices dialog .content table th{padding-bottom:6px}pv-devices dialog .content table td{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-wrap:none}pv-devices dialog .content table tr>td:first-child{max-width:220px;width:140px}pv-devices dialog .content table tr:not(:last-child)>th,pv-devices dialog .content table tr:not(:last-child)>td{padding:0;padding-bottom:6px}pv-devices dialog .content table th:first-child,pv-devices dialog .content table td:first-child{text-align:left;padding-right:32px}pv-devices dialog .content table th:nth-child(2),pv-devices dialog .content table td:nth-child(2){padding-right:6px}pv-devices dialog .content table td:not(:last-child){width:45px}pv-devices dialog .content table .muted{color:var(--color-text);opacity:.4}",""]);const r=n},9114:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-message dialog{width:330px}pv-message dialog .content .message{margin-bottom:0px}",""]);const r=n},9728:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-new-room dialog{width:280px}pv-new-room dialog .content{gap:8px}pv-new-room dialog .content .field{display:flex;flex-direction:column;gap:3px}pv-new-room dialog .content .field label{font-size:14px;margin-left:3px;opacity:.5}pv-new-room dialog .content .private{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:14px}pv-new-room dialog .content .buttons{margin-top:0}",""]);const r=n},8394:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-profile dialog{width:290px}pv-profile dialog .content{gap:8px}pv-profile dialog .content .grid{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;grid-template-areas:"a b" "c c";gap:8px}pv-profile dialog .content .grid .a{grid-area:a}pv-profile dialog .content .grid .b{grid-area:b}pv-profile dialog .content .grid .c{grid-area:c}pv-profile dialog .content .field{position:relative;display:flex;flex-direction:column;gap:3px}pv-profile dialog .content .field label{font-size:14px;margin-left:3px;opacity:.5}pv-profile dialog .content .input-color-text{position:relative}pv-profile dialog .content input[type=color]{position:absolute;height:22px;width:22px;bottom:6px;right:6px;border:none;outline:none;cursor:url(${p}),auto;background-color:rgba(0,0,0,0);padding:0;margin:0}pv-profile dialog .content input[type=color]::-webkit-color-swatch{border:none;border-radius:4px;transition:250ms}pv-profile dialog .content input[type=color]::-webkit-color-swatch:not(:disabled):hover{transition:0ms}pv-profile dialog .content input[type=color]::-webkit-color-swatch:hover{filter:brightness(1.1)}pv-profile dialog .content input[type=color]::-webkit-color-swatch-wrapper{border:none;padding:0;margin:0}pv-profile dialog .content input[type=color]::-moz-color-swatch{border:none;border-radius:max(.4vw,4px);transition:250ms}pv-profile dialog .content input[type=color]::-moz-color-swatch:not(:disabled):hover{transition:0ms}pv-profile dialog .content input[type=color]::-moz-color-swatch:hover{filter:brightness(1.1)}pv-profile dialog .content input[type=color]::-moz-color-swatch-wrapper{border:none;padding:0;margin:0}`,""]);const u=d},5760:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}@keyframes slideDownIn1{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}pv-rooms dialog{min-width:220px;max-width:270px;background-color:var(--color-cards-alt)}pv-rooms dialog .content{padding:0;color:var(--color-text);padding:4px;display:flex;flex-direction:column;gap:2px}pv-rooms dialog .content div.animate:nth-child(1){animation-delay:.05s}pv-rooms dialog .content div.animate:nth-child(2){animation-delay:.1s}pv-rooms dialog .content div.animate:nth-child(3){animation-delay:.15s}pv-rooms dialog .content div.animate:nth-child(4){animation-delay:.2s}pv-rooms dialog .content div.animate:nth-child(5){animation-delay:.25s}pv-rooms dialog .content div.animate:nth-child(6){animation-delay:.3s}pv-rooms dialog .content div.animate:nth-child(7){animation-delay:.35s}pv-rooms dialog .content div.animate:nth-child(8){animation-delay:.4s}pv-rooms dialog .content div.animate:nth-child(9){animation-delay:.45s}pv-rooms dialog .content div.animate:nth-child(10){animation-delay:.5s}pv-rooms dialog .content div.animate:nth-child(11){animation-delay:.55s}pv-rooms dialog .content div.animate:nth-child(12){animation-delay:.6s}pv-rooms dialog .content div.animate:nth-child(13){animation-delay:.65s}pv-rooms dialog .content div.animate:nth-child(14){animation-delay:.7s}pv-rooms dialog .content div.animate:nth-child(15){animation-delay:.75s}pv-rooms dialog .content div.animate:nth-child(16){animation-delay:.8s}pv-rooms dialog .content div.animate:nth-child(17){animation-delay:.85s}pv-rooms dialog .content div.animate:nth-child(18){animation-delay:.9s}pv-rooms dialog .content div.animate:nth-child(19){animation-delay:.95s}pv-rooms dialog .content div.animate:nth-child(20){animation-delay:1s}pv-rooms dialog .content div.animate:nth-child(21){animation-delay:1.05s}pv-rooms dialog .content div.animate:nth-child(22){animation-delay:1.1s}pv-rooms dialog .content div.animate:nth-child(23){animation-delay:1.15s}pv-rooms dialog .content div.animate:nth-child(24){animation-delay:1.2s}pv-rooms dialog .content>div{border-radius:calc(max(.4vw,4px) - 2px);padding:9px 10px 9px 10px;z-index:200;transition:150ms;font-size:.9em;font-weight:bold;display:flex;justify-content:space-between;gap:10px}pv-rooms dialog .content>div .name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-wrap:none;pointer-events:none}pv-rooms dialog .content>div .count{min-width:fit-content;pointer-events:none}pv-rooms dialog .content>div.lobby>.name,pv-rooms dialog .content>div.lobby>.count{color:var(--color-lobby)}pv-rooms dialog .content>div.animate{opacity:0;animation:slideDownIn1 250ms ease-out forwards}pv-rooms dialog .content>div:hover,pv-rooms dialog .content>div.selected{transition:50ms;background-color:var(--color-hover-alt)}pv-rooms dialog .content>div:last-child span{opacity:.5}",""]);const r=n},672:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-settings dialog{min-width:320px}pv-settings dialog .content{padding-bottom:12px}pv-settings dialog .content .container{display:flex;flex-direction:column;justify-content:flex-start}pv-settings dialog .content .container h3{margin-bottom:4px}pv-settings dialog .content .container .field{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:38px;gap:3px}pv-settings dialog .content .container .field select{width:46%}pv-settings dialog .content .container .buttons{font-size:.85em}pv-settings dialog .content .footer{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:16px;padding:0 2px}pv-settings dialog .content .footer .madeby{display:flex;flex-direction:row;gap:12px;font-size:.85em;transition:250ms}pv-settings dialog .content .footer .madeby:not(:disabled):hover{transition:0ms}pv-settings dialog .content .footer .madeby a{color:var(--color-text);opacity:.5;transition:250ms}pv-settings dialog .content .footer .madeby a:not(:disabled):hover{transition:0ms}pv-settings dialog .content .footer .madeby a:hover{opacity:1}pv-settings dialog .content .footer .madeby a{cursor:url(${p}),auto}`,""]);const u=d},5500:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}@keyframes slideDownIn2{from{opacity:0;transform:translateY(-8px)}to{opacity:.7;transform:translateY(0)}}pv-sounds dialog{min-width:170px}pv-sounds dialog .content{padding:0;color:var(--color-text);padding:4px;display:flex;flex-direction:column;gap:2px}pv-sounds dialog .content div:nth-child(1){animation-delay:.05s}pv-sounds dialog .content div:nth-child(2){animation-delay:.1s}pv-sounds dialog .content div:nth-child(3){animation-delay:.15s}pv-sounds dialog .content div:nth-child(4){animation-delay:.2s}pv-sounds dialog .content div{border-radius:calc(max(.4vw,4px) - 2px);padding:9px 32px 9px 10px;z-index:200;transition:150ms;font-size:.9em;font-weight:bold;opacity:0;animation:slideDownIn2 250ms ease-out forwards}pv-sounds dialog .content div:hover,pv-sounds dialog .content div[selected]{transition:50ms;background-color:var(--color-hover)}pv-sounds dialog .content div i{margin-right:6px;width:18px;height:18px;text-align:center}",""]);const r=n},7030:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-transpose dialog{overflow:hidden;width:180px}pv-transpose dialog .content{display:flex;flex-direction:column;gap:10px}pv-transpose dialog .content .field{display:flex;flex-direction:row;gap:1px}pv-transpose dialog .content .field input[type=number]{font-weight:bold;border-top-right-radius:0;border-bottom-right-radius:0;flex:1}pv-transpose dialog .content .field .minus,pv-transpose dialog .content .field .plus{height:34px;width:34px;background-color:var(--color-hover);display:flex;justify-content:center;align-items:center;cursor:url(${p}),auto}pv-transpose dialog .content .field .plus{border-top-right-radius:4px;border-bottom-right-radius:4px}pv-transpose dialog .content small{opacity:.4;font:var(--font-small)}`,""]);const u=d},9952:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-velocity dialog{overflow:hidden;width:192px}pv-velocity dialog .content{display:flex;flex-direction:column;gap:10px}pv-velocity dialog .content .field{display:flex;flex-direction:row;gap:1px}pv-velocity dialog .content .field input[type=number]{font-weight:bold;border-top-right-radius:0;border-bottom-right-radius:0;flex:1}pv-velocity dialog .content .field .minus,pv-velocity dialog .content .field .plus{height:34px;width:34px;background-color:var(--color-hover);display:flex;justify-content:center;align-items:center;cursor:url(${p}),auto}pv-velocity dialog .content .field .plus{border-top-right-radius:4px;border-bottom-right-radius:4px}pv-velocity dialog .content small{opacity:.4;font:var(--font-small)}`,""]);const u=d},5734:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-canvas{display:flex;position:relative;flex-direction:column;background-color:var(--color-background);overflow:hidden;flex:1}pv-canvas .bg-canvas,pv-canvas .fg-canvas{position:absolute;pointer-events:none;image-rendering:pixelated;z-index:8}pv-canvas pv-note{z-index:9}pv-canvas #notifications{position:absolute;bottom:max(.7vw,8px);right:0;display:flex;flex-direction:column;gap:10px;width:365px;height:auto;padding:0;margin:0}",""]);const r=n},9546:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9738),i.b),d=new URL(i(9662),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`pv-chat{flex:1;width:20vw;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;gap:8px}pv-chat .messages{display:flex;height:100%;overflow-y:auto;overflow-x:hidden;flex-direction:column;padding:10px;gap:2px;margin:0;list-style-type:none;z-index:25;mask-image:linear-gradient(to top, black calc(100% - 120px), transparent 100%)}pv-chat .messages:not(:hover)::-webkit-scrollbar{transition:all 1s ease-in;background-color:var(--color-cards)}pv-chat .messages :first-child{margin-top:auto;padding-top:14px}pv-chat .messages .message{user-select:text;cursor:url(${u}),auto;overflow-wrap:anywhere;width:100%;animation:slideUpIn 120ms ease-in-out;padding:0 6px;clip-path:view-box;font:var(--font-default);line-height:21px}pv-chat .messages .message img{transition:250ms;height:19px;max-width:32px;vertical-align:top;image-rendering:auto;cursor:url(${u}),auto}pv-chat .messages .message .username{user-select:text;cursor:url(${u}),auto;margin-right:8px;font-weight:bold}pv-chat .messages .message .username .fa-discord{padding:0;color:#5865f2;font-size:14px}pv-chat .messages .message .mention{background-color:var(--color-hover);color:var(--color-text);cursor:url(${v}),auto;border-radius:2px;font-weight:bold;transition:250ms}pv-chat .messages .message .mention:hover{transition:0ms;background-color:var(--color-hover)}pv-chat .messages .system{display:flex;justify-content:center;text-align:center;font-style:italic;animation:none;width:100%;color:var(--color-text);opacity:.4}pv-chat>div{position:relative;display:flex;flex-direction:row}pv-chat>div input[type=text]{display:flex;align-items:center;height:46px;padding:0 42px 0 14px;border:none;outline:none;cursor:url(${u}),auto;color:var(--color-text);font-size:1em;box-sizing:border-box;width:100%;border-radius:6px;transition:background-color 80ms;background-color:rgba(0,0,0,0);border:1px solid var(--color-hover);z-index:25}pv-chat>div input[type=text]:focus{background-color:var(--color-hover)}pv-chat>div button{position:absolute;right:2px;z-index:26;background-color:rgba(0,0,0,0);cursor:url(${v}),auto;font-size:1em;border:none;height:46px;aspect-ratio:1;padding:0;border-radius:0;box-shadow:none;margin:0;flex:0;color:var(--color-text)}pv-chat>div button i{opacity:.4;cursor:url(${v}),auto;transition:250ms;font-size:1.1em}pv-chat>div button:hover{background:rgba(0,0,0,0) !important}pv-chat>div button:hover i{transition:0ms;opacity:1}`,""]);const h=p},6610:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(1873),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-cursor{position:absolute;display:flex;z-index:90;transition:30ms ease-out;pointer-events:none;opacity:.9}pv-cursor.idle{opacity:.4;transition:opacity 300ms ease-out}pv-cursor .icon{position:fixed;width:18px;height:24px;background-image:url(${p});pointer-events:none;animation-name:heartbeat;animation-duration:.6s;animation-timing-function:linear;animation-iteration-count:infinite}pv-cursor .badge{padding:4px 6px;font-size:14px;font-weight:bold;margin-top:20px;margin-left:6px;max-width:170px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-color:var(--color-hover);border-radius:6px}`,""]);const u=d},4950:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=new URL(i(4675),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`pv-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--color-text);background-color:var(--color-cards);height:48px;gap:8px;padding:0 8px 0 12px;border-bottom:1px solid var(--color-hover)}pv-header .left{gap:12px !important}pv-header .left .pianoverse{display:flex;flex-direction:row;align-items:center;gap:6px;font:var(--font-title);cursor:url(${u}),auto}pv-header .left .pianoverse svg{width:22px;fill:var(--color-text);height:22px}pv-header .left .pianoverse .title{font-weight:bold;opacity:.6}pv-header .left,pv-header .right,pv-header .center{display:flex;flex-direction:row;align-items:center;gap:2px}pv-header .left .volume,pv-header .right .volume,pv-header .center .volume{display:flex;flex-direction:row;justify-content:space-between;margin-right:4px}pv-header .left .volume i,pv-header .right .volume i,pv-header .center .volume i{height:100%;aspect-ratio:1;display:flex;justify-content:center;align-items:center}pv-header .left>.icon,pv-header .right>.icon,pv-header .center>.icon{height:28px;width:28px;border-radius:0;display:flex;justify-content:center;align-items:center;transition:250ms;border-radius:6px;transition:250ms}pv-header .left>.icon:not(:disabled):hover,pv-header .right>.icon:not(:disabled):hover,pv-header .center>.icon:not(:disabled):hover{transition:0ms}pv-header .left>.icon:not([disabled]):hover,pv-header .left>.icon.open,pv-header .right>.icon:not([disabled]):hover,pv-header .right>.icon.open,pv-header .center>.icon:not([disabled]):hover,pv-header .center>.icon.open{background-color:var(--color-hover)}pv-header .left>.icon[disabled],pv-header .right>.icon[disabled],pv-header .center>.icon[disabled]{cursor:url(${v}),auto;opacity:.4}pv-header .left>.icon[disabled] i,pv-header .right>.icon[disabled] i,pv-header .center>.icon[disabled] i{cursor:url(${v}),auto}pv-header .left .divider,pv-header .right .divider,pv-header .center .divider{background-color:var(--color-hover);border-radius:2px;margin:0 2px;height:16px;width:2px}`,""]);const h=p},5750:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-keys{display:flex;flex-direction:row;gap:1px;width:100%;aspect-ratio:8;overflow:hidden;min-height:100px;background-color:var(--color-hover);border-radius:max(.4vw,4px);box-shadow:var(--shadow)}pv-keys .key{position:relative;opacity:1;flex:1}pv-keys .key .show-label[data-label]::after{content:attr(data-label);position:absolute;bottom:0;left:0;width:100%;display:flex;align-items:center;justify-content:center}pv-keys .key .white{opacity:1;background-color:#fff;width:100%;height:100%;transition-property:background-color,opacity;transition-timing-function:ease-out;transition-duration:300ms}pv-keys .key .white.loading{opacity:.3}pv-keys .key .white.show-label[data-label]::after{color:#000;font-size:.65vw}pv-keys .key .black{opacity:1;background-color:#1b1b1b;border-bottom-left-radius:3px;border-bottom-right-radius:3px;width:60%;height:64%;position:absolute;top:0;left:70%;z-index:20;transition-property:background-color,opacity;transition-duration:200ms;transition-timing-function:ease-out}pv-keys .key .black.loading{opacity:.3}pv-keys .key .black.show-label[data-label]::after{color:#fff;font-size:.5vw}",""]);const r=n},3142:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(1873),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-knob{margin:25px;background-color:var(--color)}pv-knob .knob{position:relative;width:40px;height:40px;border-radius:50%;background:conic-gradient(var(--color-text) 0deg, var(--color-cards) 0deg);display:flex;align-items:center;justify-content:center;cursor:url(${p}),auto}pv-knob .knob::after{content:"";position:absolute;width:35px;height:35px;background:var(--color-hover);border-radius:50%}pv-knob .indicator{z-index:1000;font-size:12px;font-weight:bold;display:flex;justify-content:center}`,""]);const u=d},5146:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,'@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}pv-loader{position:absolute;top:0px;left:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(0,0,0,.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);color:#dbdbdb;z-index:200;animation:fadeIn 200ms forwards;pointer-events:all}pv-loader .animation{display:flex;justify-content:space-around;align-items:center;height:40px;width:100%}pv-loader .animation .loader{width:8px;height:40px;border-radius:4px;display:block;position:relative;background:#dbdbdb;color:#dbdbdb;box-sizing:border-box;animation:waveform .3s .15s linear infinite alternate}pv-loader .animation .loader::after,pv-loader .animation .loader::before{content:"";width:8px;height:40px;border-radius:4px;background:currentColor;position:absolute;top:50%;transform:translateY(-50%);left:15px;box-sizing:border-box;animation:waveform .3s .3s linear infinite alternate}pv-loader .animation .loader::before{left:-15px;animation-delay:0s}pv-loader .caption{color:#dbdbdb;text-align:center;font-size:1.1rem;margin-top:1rem}pv-loader.closing{animation:slideDownOut 200ms forwards;animation-delay:350ms;pointer-events:none}',""]);const r=n},1230:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"@keyframes press{from{height:0}to{height:100dvh}}@keyframes release{from{transform:translateY(0)}to{transform:translateY(-100dvh)}}pv-note{position:absolute;bottom:0;box-sizing:border-box;border-radius:.5vw;border-bottom-left-radius:0;border-bottom-right-radius:0;background-color:#fff;box-shadow:rgba(255,255,255,.4) 0px 5px,rgba(255,255,255,.3) 0px 10px,rgba(255,255,255,.2) 0px 15px,rgba(255,255,255,.1) 0px 20px,rgba(255,255,255,.05) 0px 25px;animation-duration:2.5s;animation-name:press;animation-timing-function:linear;animation-fill-mode:forwards;pointer-events:none}pv-note.released{border-bottom-left-radius:.5vw;border-bottom-right-radius:.5vw;animation-name:release}",""]);const r=n},1358:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-ping{position:relative;display:flex;flex-direction:row;align-items:center;text-align:right;width:auto;gap:6px;opacity:.5}pv-ping .icon{color:var(--color-text);border-radius:50%;font-size:.5em}pv-ping .icon.green{color:var(--color-green);animation:greenPulse 5s infinite}pv-ping .icon.yellow{color:var(--color-yellow);animation:yellowPulse 5s infinite}pv-ping .icon.orange{color:var(--color-orange);animation:orangePulse 5s infinite}pv-ping .icon.red{color:var(--color-red);animation:redPulse 5s infinite}pv-ping .ms{color:var(--color-text);font-size:.8em}",""]);const r=n},6898:(e,t,i)=>{i.d(t,{A:()=>h});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=new URL(i(1873),i.b),p=n()(a()),u=l()(c),v=l()(d);p.push([e.id,`@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(2px)}to{transform:translateY(0)}}@keyframes waveform{0%{height:40px}100%{height:4px}}@keyframes heartbeat{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(0.9)}100%{opacity:.8;transform:scale(0.9)}}@keyframes greenPulse{0%{box-shadow:0 0 0 0 var(--color-green)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes yellowPulse{0%{box-shadow:0 0 0 0 var(--color-yellow)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes orangePulse{0%{box-shadow:0 0 0 0 var(--color-orange)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes redPulse{0%{box-shadow:0 0 0 0 var(--color-red)}20%{box-shadow:0 0 0 6px rgba(0,0,0,0)}100%{box-shadow:0 0 0 6px rgba(0,0,0,0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes slideUpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-8px)}}@keyframes slideLeftIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideLeftOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-8px)}}@keyframes slideRightIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRightOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(8px)}}@keyframes slideDownIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDownOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@keyframes bounceUpIn{0%{opacity:0;transform:translateY(8px)}40%{opacity:1;transform:translateY(-6px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounceLeftIn{0%{opacity:0;transform:translateX(8px)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:.85;transform:translateX(0)}}@keyframes bounceRightOut{0%{transform:translateX(0)}20%{opacity:.85;transform:translateX(-4px)}100%{opacity:0;transform:translateX(16px)}}@keyframes bounceDownIn{0%{opacity:0;transform:translateY(-8px)}40%{opacity:1;transform:translateY(6px)}100%{opacity:1;transform:translateY(0)}}@keyframes timeout{from{width:100%}to{width:0%}}pv-room{display:flex;flex-direction:row;justify-content:space-between;max-width:12vw}pv-room .room-selector{display:flex;flex-direction:row;justify-content:left;align-items:center;text-align:left;font-weight:bold;gap:10px;cursor:url(${u}),auto;height:100%;transition:250ms}pv-room .room-selector:not(:disabled):hover{transition:0ms}pv-room .room-selector.open{border-bottom-left-radius:0;border-bottom-right-radius:0}pv-room .room-selector .room-name{font-size:1.2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;text-align:left;width:min-content}pv-room .room-list{padding:6px;position:absolute;top:48px;left:max(.7vw,8px);width:calc(20vw + max(.7vw,8px)*2);max-height:60vh;cursor:url(${v}),auto;border-radius:max(.4vw,4px);border-top-left-radius:0;border-top-right-radius:0;background-color:var(--color-cards);border:1px solid var(--color-hover);border-top:0;display:flex;flex-direction:column;overflow:auto;font-weight:normal;box-shadow:var(--shadow);transition:background-color 250ms;opacity:1;animation:slideDownIn 80ms ease-out;-moz-animation:none;color:var(--color-text);gap:2px;pointer-events:none;animation:slideUpOut 80ms ease-out;-moz-animation:none;opacity:0}pv-room .room-list>*{font-weight:bold;padding:8px 10px;display:flex;justify-content:space-between;transition:250ms;border-radius:max(.4vw,4px)}pv-room .room-list>*:not(:disabled):hover{transition:0ms}pv-room .room-list>* .room-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;max-width:80%;font-size:1em}pv-room .room-list>* .room-count{pointer-events:none;opacity:.4}pv-room .room-list>*:hover{transition:0ms;background-color:var(--color-hover)}pv-room .room-list>*:not([data-id]){color:color-mix(in lch, var(--color-text), var(--color-hover));font-size:1em}`,""]);const h=p},2732:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-toolbar{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--color-text);background-color:var(--color-cards);height:48px;gap:6px;border-radius:max(.4vw,4px);z-index:80;box-shadow:var(--shadow)}pv-toolbar .left,pv-toolbar .right{display:flex;flex-direction:row;align-items:center;gap:6px;height:100%;border-radius:max(.4vw,4px);flex:1;padding:8px}pv-toolbar .left>*,pv-toolbar .right>*{padding:6px 8px;display:flex;flex-direction:row;gap:6px;justify-content:center;align-items:center;transition:250ms;border-radius:8px;color:var(--color-text-muted);font-size:.9em;transition:250ms}pv-toolbar .left>*:not(:disabled):hover,pv-toolbar .right>*:not(:disabled):hover{transition:0ms}pv-toolbar .left>*:not([disabled]):not(.sustain):hover,pv-toolbar .left>*.open,pv-toolbar .right>*:not([disabled]):not(.sustain):hover,pv-toolbar .right>*.open{background-color:var(--color-hover)}pv-toolbar .left>* .title,pv-toolbar .right>* .title{font-weight:bold}pv-toolbar .left>* span,pv-toolbar .right>* span{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}pv-toolbar .left>* .value,pv-toolbar .right>* .value{opacity:.4}pv-toolbar .left .divider,pv-toolbar .right .divider{background-color:var(--color-hover);border-radius:2px;margin:0 2px;height:16px;width:2px}pv-toolbar .right{justify-content:end}pv-toolbar .center{width:100%;justify-content:end}",""]);const r=n},8098:(e,t,i)=>{i.d(t,{A:()=>u});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9662),i.b),d=n()(a()),p=l()(c);d.push([e.id,`pv-user{display:flex;align-items:center;border-radius:6px;padding:4px 6px;font-size:14px;margin:0;max-width:170px;line-height:1.4em;transition:250ms;cursor:url(${p}),auto;box-shadow:var(--shadow);transition:250ms;border:none;position:relative;box-shadow:var(--shadow)}pv-user:not(:disabled):hover{transition:0ms}pv-user .text{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}pv-user .badges{color:var(--color-text);font-size:xx-small;font-weight:bold;border-radius:5px;line-height:18px;margin-left:5px;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.7}pv-user .badges i{color:var(--color-text);opacity:.3;font-size:.8em}pv-user.muted{opacity:.4}pv-user:hover,pv-user.open{background-color:var(--color-hover) !important}`,""]);const u=d},8758:(e,t,i)=>{i.d(t,{A:()=>r});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s)()(a());n.push([e.id,"pv-users{display:flex;flex-direction:column;justify-content:space-between;width:20vw;position:relative;overflow:visible;padding-bottom:6px}pv-users .users{display:flex;flex-wrap:wrap;max-height:25vh;padding-bottom:2px;margin:0 0 4px 0;gap:5px;overflow:visible}",""]);const r=n},2100:(e,t,i)=>{i.d(t,{A:()=>g});var o=i(1601),a=i.n(o),s=i(6314),n=i.n(s),r=i(4417),l=i.n(r),c=new URL(i(9738),i.b),d=new URL(i(4675),i.b),p=new URL(i(9662),i.b),u=new URL(i(1873),i.b),v=n()(a());v.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@100..1000&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap);"]);var h=l()(c),m=l()(d),f=l()(p),_=l()(u);v.push([e.id,`input{font-family:"Nunito",sans-serif}input[type=text]{width:100%;font-size:14px;color:var(--color-text);background-color:var(--color-hover);border-radius:4px;border:1px solid var(--color-hover);padding:6px;cursor:url(${h}),auto;outline:none}input[type=text]::placeholder{opacity:.4;color:var(--color-text)}input[type=text]:disabled{opacity:.4;cursor:url(${m}),auto}input[type=number]{-moz-appearance:textfield;appearance:textfield;width:100%;font-size:14px;padding:0 4px 0 6px;height:34px;border-radius:4px;background-color:var(--color-hover);color:var(--color-text);border:none;outline:none;border:1px solid var(--color-hover);cursor:url(${h}),auto;transition:250ms}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]:not(:disabled):hover{transition:0ms}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{background-color:var(--color-hover)}input[type=range]{-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);cursor:url(${f}),auto}input[type=range]::-webkit-slider-runnable-track{background:var(--color-hover);border-radius:max(.4vw,4px);height:.5rem}input[type=range]::-moz-range-track{background:var(--color-hover);border-radius:max(.4vw,4px);height:.5rem}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:.5rem;height:1.3rem;background:var(--color-text);border-radius:99px;cursor:url(${f}),auto;margin-top:-0.4rem;border:none}input[type=range]::-moz-range-thumb{-webkit-appearance:none;appearance:none;width:.5rem;height:1.3rem;background:var(--color-text);border-radius:99px;cursor:url(${f}),auto;margin-top:-0.4rem;border:none}input[type=range]:focus{outline:none}button{outline:0;border:none;border-radius:8px;height:34px;font-size:13px;background-color:var(--color-hover);color:var(--color-text);padding:7px 14px;cursor:url(${f}),auto;transition:250ms;box-sizing:border-box}button:not(:disabled):hover{transition:0ms}button:not(:disabled):hover{background-color:var(--color-hover)}button:disabled{opacity:.4;cursor:url(${m}),auto}.toggle{position:relative;display:inline-block;width:45px;height:26px}.toggle input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:url(${f}),auto;top:0;left:0;right:0;bottom:0;background-color:var(--color-hover);transition:100ms;border-radius:32px;transition:250ms}.slider:not(:disabled):hover{transition:0ms}.slider:hover{background-color:var(--color-hover)}.slider:before{position:absolute;bottom:5px;left:5px;content:"";background-color:#fff;border-radius:50%;transition:100ms;height:16px;width:16px}input:checked+.slider{background-color:var(--color-toggles)}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px)}input:disabled+.slider{opacity:.4;cursor:url(${m}),auto}input:disabled+.slider:before{opacity:.4;cursor:url(${m}),auto}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:10px}a{cursor:url(${f}),auto;text-decoration:none;color:var(--color-links);font-weight:bold;user-select:auto;transition:250ms}a *{cursor:url(${f}),auto}a:hover{transition:0ms;text-decoration:underline}select{width:100%;font-size:14px;padding:0 4px;height:34px;border-radius:6px;background-color:var(--color-hover);color:var(--color-text);border:none;outline:none;border:1px solid var(--color-hover);transition:250ms}select:not(:disabled):hover{transition:0ms}select:focus{outline:none}select:disabled{cursor:url(${m}),auto}kbd{background-color:var(--color-background);border-bottom:2px solid var(--color-hover);padding:0px 3px;border-radius:3px;color:var(--color-text)}[data-tooltip]{position:relative}[data-tooltip]:before{display:block;opacity:0;pointer-events:none;position:absolute;z-index:100;background:var(--color-hover);color:var(--color-text);border-radius:max(.4vw,4px);border:1px solid var(--color-hover);content:attr(data-tooltip);font-size:14px;padding:6px 9px;top:36px;white-space:nowrap;transform:translate3d(0, -10px, 0);transition:transform 100ms ease-in-out,opacity 100ms ease-in-out;transition-delay:0;box-shadow:var(--shadow)}[data-tooltip][right-edge]:before{right:0px}[data-tooltip][left-edge]:before{left:0px}[data-tooltip]:not(:disabled):hover:before{opacity:1;transform:translate3d(0, 0, 0);transition-delay:100ms}[data-tooltip].open:before{transition-delay:0ms;opacity:0}@media only screen and (max-device-width: 641px){[data-tooltip]:before{display:none}}:root{--color-green: #56c756;--color-yellow: #e9ad3f;--color-orange: #e9833f;--color-red: #bb4949;--font-title: bold 1.2rem "Nunito", sans-serif;--font-default: 1rem "Nunito", sans-serif;--font-small: 0.8rem "Nunito", sans-serif}:root [data-theme=dark]{--color-background: #050608;--color-cards: #0c0d14;--color-cards-alt: #16171f;--color-hover: #1d1e27;--color-hover-alt: #21222c;--color-badge: #282e41;--color-badge-text: #8d9dbb;--color-text: #a5abb3;--color-text-muted: #6d7277;--color-toggles: #384a8b;--color-links: #384a8b;--color-lobby: #b3a38c;--color-white: white;--color-black: black;--shadow: none}:root [data-theme=light]{--color-background: #101116;--color-cards: #ffffff;--color-cards-alt: var(--color-cards);--color-hover: #ececec;--color-hover-alt: var(--color-hover);--color-badge: #aab0c4;--color-badge-text: #3a3a3a;--color-text: #353535;--color-toggles: #384a8b;--color-links: #384a8b;--color-lobby: #8a6f48;--color-white: black;--color-black: white;--shadow: rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px}::selection{background-color:var(--color-text);color:var(--color-hover)}::-webkit-scrollbar{display:none;width:8px;height:16px}::-webkit-scrollbar-track{background:rgba(0,0,0,0)}::-webkit-scrollbar-thumb{background:var(--color-hover);border-radius:max(.4vw,4px)}::-webkit-scrollbar-thumb:hover{background:var(--color-hover)}*{box-sizing:border-box}html{overflow:hidden;height:100%;width:100vw}html body{font-family:"Nunito",sans-serif;cursor:url(${_}),auto;user-select:none;position:relative;overflow:hidden;height:100%;width:100%;margin:0}html body>.app{position:relative;display:flex;width:100%;height:calc(100% - 48px);background:var(--color-background);color:var(--color-text);overflow:hidden;padding:max(.7vw,8px);gap:max(.7vw,8px)}html body>.app>.chat{display:flex;flex-direction:column;position:relative;padding:max(.7vw,8px);border-radius:max(.4vw,4px);box-shadow:var(--shadow);background-color:var(--color-cards)}html body>.app>.piano{display:flex;flex-direction:column;width:calc(100% - max(.7vw,8px)*3 - 20vw);height:100%}@media only screen and (max-device-width: 641px){body pv-header .title,body pv-header .divider,body pv-header .volume.icon,body pv-header .volume-slider{display:none !important}body .app>.chat{width:100% !important}body .app>.chat>*{width:100% !important}body .app>.piano{display:none !important}}@media only screen and (max-device-height: 480px){body>.app>.chat{display:none !important}body>.app>.piano{width:100% !important}}@media only screen and (max-device-height: 480px)and (max-device-width: 641px){body>.app>.chat{display:flex !important}}`,""]);const g=v},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,o,a,s){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(o)for(var r=0;r0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),a&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=a):d[4]="".concat(a)),t.push(d))}},t}},4417:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},1601:e=>{e.exports=function(e){return e[1]}},7007:e=>{var t,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(i,o){function a(i){e.removeListener(t,s),o(i)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",a),i([].slice.call(arguments))}m(e,t,s,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,a)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var n=10;function r(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,i,o){var a,s,n;if(r(i),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),s=e._events),n=s[t]),void 0===n)n=s[t]=i,++e._eventsCount;else if("function"==typeof n?n=s[t]=o?[i,n]:[n,i]:o?n.unshift(i):n.push(i),(a=l(e))>0&&n.length>a&&!n.warned){n.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=n.length,console&&console.warn}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,i){var o={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},a=d.bind(o);return a.listener=i,o.wrapFn=a,a}function u(e,t,i){var o=e._events;if(void 0===o)return[];var a=o[t];return void 0===a?[]:"function"==typeof a?i?[a.listener||a]:[a]:i?function(e){for(var t=new Array(e.length),i=0;i0&&(n=t[0]),n instanceof Error)throw n;var r=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw r.context=n,r}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,d=h(l,c);for(i=0;i=0;s--)if(i[s]===t||i[s].listener===t){n=i[s].listener,a=s;break}if(a<0)return this;0===a?i.shift():function(e,t){for(;t+1=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return u(this,e,!0)},s.prototype.rawListeners=function(e){return u(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6946:(e,t,i)=>{e.exports=i(4394)},4394:(e,t,i)=>{var o=t;function a(){o.util._configure(),o.Writer._configure(o.BufferWriter),o.Reader._configure(o.BufferReader)}o.build="minimal",o.Writer=i(3449),o.BufferWriter=i(818),o.Reader=i(6237),o.BufferReader=i(3158),o.util=i(3610),o.rpc=i(5047),o.roots=i(4529),o.configure=a,a()},6237:(e,t,i)=>{e.exports=l;var o,a=i(3610),s=a.LongBits,n=a.utf8;function r(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},p=function(){return a.Buffer?function(e){return(l.create=function(e){return a.Buffer.isBuffer(e)?new o(e):d(e)})(e)}:d};function u(){var e=new s(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function v(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw r(this,8);return new s(v(this.buf,this.pos+=4),v(this.buf,this.pos+=4))}l.create=p(),l.prototype._slice=a.Array.prototype.subarray||a.Array.prototype.slice,l.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return c}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return v(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw r(this,4);return 0|v(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=a.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=a.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw r(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,i);if(t===i){var o=a.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return n.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw r(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){o=e,l.create=p(),o._configure();var t=a.Long?"toLong":"toNumber";a.merge(l.prototype,{int64:function(){return u.call(this)[t](!1)},uint64:function(){return u.call(this)[t](!0)},sint64:function(){return u.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},3158:(e,t,i)=>{e.exports=s;var o=i(6237);(s.prototype=Object.create(o.prototype)).constructor=s;var a=i(3610);function s(e){o.call(this,e)}s._configure=function(){a.Buffer&&(s.prototype._slice=a.Buffer.prototype.slice)},s.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},s._configure()},4529:e=>{e.exports={}},5047:(e,t,i)=>{t.Service=i(7595)},7595:(e,t,i)=>{e.exports=a;var o=i(3610);function a(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");o.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}(a.prototype=Object.create(o.EventEmitter.prototype)).constructor=a,a.prototype.rpcCall=function e(t,i,a,s,n){if(!s)throw TypeError("request must be specified");var r=this;if(!n)return o.asPromise(e,r,t,i,a,s);if(r.rpcImpl)try{return r.rpcImpl(t,i[r.requestDelimited?"encodeDelimited":"encode"](s).finish(),(function(e,i){if(e)return r.emit("error",e,t),n(e);if(null!==i){if(!(i instanceof a))try{i=a[r.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return r.emit("error",e,t),n(e)}return r.emit("data",i,t),n(null,i)}r.end(!0)}))}catch(e){return r.emit("error",e,t),void setTimeout((function(){n(e)}),0)}else setTimeout((function(){n(Error("already ended"))}),0)},a.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2239:(e,t,i)=>{e.exports=a;var o=i(3610);function a(e,t){this.lo=e>>>0,this.hi=t>>>0}var s=a.zero=new a(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var n=a.zeroHash="\0\0\0\0\0\0\0\0";a.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var i=e>>>0,o=(e-i)/4294967296>>>0;return t&&(o=~o>>>0,i=~i>>>0,++i>4294967295&&(i=0,++o>4294967295&&(o=0))),new a(i,o)},a.from=function(e){if("number"==typeof e)return a.fromNumber(e);if(o.isString(e)){if(!o.Long)return a.fromNumber(parseInt(e,10));e=o.Long.fromString(e)}return e.low||e.high?new a(e.low>>>0,e.high>>>0):s},a.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+4294967296*i)}return this.lo+4294967296*this.hi},a.prototype.toLong=function(e){return o.Long?new o.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var r=String.prototype.charCodeAt;a.fromHash=function(e){return e===n?s:new a((r.call(e,0)|r.call(e,1)<<8|r.call(e,2)<<16|r.call(e,3)<<24)>>>0,(r.call(e,4)|r.call(e,5)<<8|r.call(e,6)<<16|r.call(e,7)<<24)>>>0)},a.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},a.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},a.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},a.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},3610:function(e,t,i){var o=t;function a(e,t,i){for(var o=Object.keys(t),a=0;a0)},o.Buffer=function(){try{var e=o.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),o._Buffer_from=null,o._Buffer_allocUnsafe=null,o.newBuffer=function(e){return"number"==typeof e?o.Buffer?o._Buffer_allocUnsafe(e):new o.Array(e):o.Buffer?o._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.Long=o.global.dcodeIO&&o.global.dcodeIO.Long||o.global.Long||o.inquire("long"),o.key2Re=/^true|false|0|1$/,o.key32Re=/^-?(?:0|[1-9][0-9]*)$/,o.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,o.longToHash=function(e){return e?o.LongBits.from(e).toHash():o.LongBits.zeroHash},o.longFromHash=function(e,t){var i=o.LongBits.fromHash(e);return o.Long?o.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},o.merge=a,o.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},o.newError=s,o.ProtocolError=s("ProtocolError"),o.oneOfGetter=function(e){for(var t={},i=0;i-1;--i)if(1===t[e[i]]&&void 0!==this[e[i]]&&null!==this[e[i]])return e[i]}},o.oneOfSetter=function(e){return function(t){for(var i=0;i{e.exports=p;var o,a=i(3610),s=a.LongBits,n=a.base64,r=a.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=void 0,this.val=i}function c(){}function d(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function p(){this.len=0,this.head=new l(c,0,0),this.tail=this.head,this.states=null}var u=function(){return a.Buffer?function(){return(p.create=function(){return new o})()}:function(){return new p}};function v(e,t,i){t[i]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function f(e,t,i){t[i]=255&e,t[i+1]=e>>>8&255,t[i+2]=e>>>16&255,t[i+3]=e>>>24}p.create=u(),p.alloc=function(e){return new a.Array(e)},a.Array!==Array&&(p.alloc=a.pool(p.alloc,a.Array.prototype.subarray)),p.prototype._push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},h.prototype=Object.create(l.prototype),h.prototype.fn=function(e,t,i){for(;e>127;)t[i++]=127&e|128,e>>>=7;t[i]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return e<0?this._push(m,10,s.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=s.from(e);return this._push(m,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=s.from(e).zzEncode();return this._push(m,t.length(),t)},p.prototype.bool=function(e){return this._push(v,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(f,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=s.from(e);return this._push(f,4,t.lo)._push(f,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(a.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(a.float.writeDoubleLE,8,e)};var _=a.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var o=0;o>>0;if(!t)return this._push(v,1,0);if(a.isString(e)){var i=p.alloc(t=n.length(e));n.decode(e,i,0),e=i}return this.uint32(t)._push(_,t,e)},p.prototype.string=function(e){var t=r.length(e);return t?this.uint32(t)._push(r.write,t,e):this._push(v,1,0)},p.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new l(c,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(c,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},p._configure=function(e){o=e,p.create=u(),o._configure()}},818:(e,t,i)=>{e.exports=s;var o=i(3449);(s.prototype=Object.create(o.prototype)).constructor=s;var a=i(3610);function s(){o.call(this)}function n(e,t,i){e.length<40?a.utf8.write(e,t,i):t.utf8Write?t.utf8Write(e,i):t.write(e,i)}s._configure=function(){s.alloc=a._Buffer_allocUnsafe,s.writeBytesBuffer=a.Buffer&&a.Buffer.prototype instanceof Uint8Array&&"set"===a.Buffer.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var o=0;o>>0;return this.uint32(t),t&&this._push(s.writeBytesBuffer,t,e),this},s.prototype.string=function(e){var t=a.Buffer.byteLength(e);return this.uint32(t),t&&this._push(n,t,e),this},s._configure()},5072:e=>{var t=[];function i(e){for(var i=-1,o=0;o{var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,i)=>{e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var o="";i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var a=void 0!==i.layer;a&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,a&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}");var s=i.sourceMap;s&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1873:(e,t,i)=>{e.exports=i.p+"5dd1fe40dbea45cd26d2.cur"},9662:(e,t,i)=>{e.exports=i.p+"88b4a467a18e813218f8.cur"},9738:(e,t,i)=>{e.exports=i.p+"c7283f73cbd89e54a615.cur"},4675:(e,t,i)=>{e.exports=i.p+"27f230d7609eeee55225.cur"}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var o=i.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=i[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),__webpack_require__.b=document.baseURI||self.location.href,__webpack_require__.nc=void 0;var __webpack_exports__={},injectStylesIntoStyleTag=__webpack_require__(5072),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),styleDomAPI=__webpack_require__(7825),styleDomAPI_default=__webpack_require__.n(styleDomAPI),insertBySelector=__webpack_require__(7659),insertBySelector_default=__webpack_require__.n(insertBySelector),setAttributesWithoutAttributes=__webpack_require__(5056),setAttributesWithoutAttributes_default=__webpack_require__.n(setAttributesWithoutAttributes),insertStyleElement=__webpack_require__(540),insertStyleElement_default=__webpack_require__.n(insertStyleElement),styleTagTransform=__webpack_require__(1113),styleTagTransform_default=__webpack_require__.n(styleTagTransform),style=__webpack_require__(2100),options={};options.styleTagTransform=styleTagTransform_default(),options.setAttributes=setAttributesWithoutAttributes_default(),options.insert=insertBySelector_default().bind(null,"head"),options.domAPI=styleDomAPI_default(),options.insertStyleElement=insertStyleElement_default();var update=injectStylesIntoStyleTag_default()(style.A,options);const scss_style=style.A&&style.A.locals?style.A.locals:void 0;function toCamelCase(e){return e.replace(/_([a-z])/g,(e=>e[1].toUpperCase()))}function escapeHtml(e){const t=document.createElement("p");return t.appendChild(document.createTextNode(e)),t.innerHTML}function hsl2hex(e,t,i){i/=100;const o=t*Math.min(i,1-i)/100,a=t=>{const a=(t+e/30)%12,s=i-o*Math.max(Math.min(a-3,9-a,1),-1);return Math.round(255*s).toString(16).padStart(2,"0")};return`#${a(0)}${a(8)}${a(4)}`}function isLobby(e){return!!e.match(/^Lobby(?: [2-9])?$|^Backrooms$/)}class PvComponent extends HTMLElement{constructor(){super()}attributeChangedCallback(e,t,i){var o;this.isConnected&&(null===(o=this[toCamelCase(`on_${e}_change`)])||void 0===o||o.call(this,i))}}PvComponent.observedAttributes=[];const pv_component=PvComponent,format=e=>e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),child=(e,t)=>({get(){return this.querySelector(`.${format(t.name.toString())}`)}}),decorators_child=child;var code='
      Loading, please wait...
      ';const pv_loader=code;var pv_loader_pv_loader=__webpack_require__(5146),pv_loader_options={};pv_loader_options.styleTagTransform=styleTagTransform_default(),pv_loader_options.setAttributes=setAttributesWithoutAttributes_default(),pv_loader_options.insert=insertBySelector_default().bind(null,"head"),pv_loader_options.domAPI=styleDomAPI_default(),pv_loader_options.insertStyleElement=insertStyleElement_default();var pv_loader_update=injectStylesIntoStyleTag_default()(pv_loader_pv_loader.A,pv_loader_options);const components_pv_loader_pv_loader=pv_loader_pv_loader.A&&pv_loader_pv_loader.A.locals?pv_loader_pv_loader.A.locals:void 0;var __esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},__runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o=pv_component,a=[],s=[];return e=class extends o{get caption(){return __classPrivateFieldGet(this,t,"f")}set caption(e){__classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(__runInitializers(this,a),__runInitializers(this,s,void 0))),this.innerHTML=pv_loader}setCaption(e){this.caption.textContent=e||"Loading, please wait..."}},t=new WeakMap,(()=>{var t;const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=o[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],__esDecorate(e,null,i,{kind:"accessor",name:"caption",static:!1,private:!1,access:{has:e=>"caption"in e,get:e=>e.caption,set:(e,t)=>{e.caption=t}},metadata:n},s,a),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e})();const src_components_pv_loader_pv_loader=PvLoader;function bind(e,t){t.addInitializer((function(){this[t.name]=this[t.name].bind(this)}))}customElements.define("pv-loader",PvLoader);var pv_popup=__webpack_require__(4912),pv_popup_options={};pv_popup_options.styleTagTransform=styleTagTransform_default(),pv_popup_options.setAttributes=setAttributesWithoutAttributes_default(),pv_popup_options.insert=insertBySelector_default().bind(null,"head"),pv_popup_options.domAPI=styleDomAPI_default(),pv_popup_options.insertStyleElement=insertStyleElement_default();var pv_popup_update=injectStylesIntoStyleTag_default()(pv_popup.A,pv_popup_options);const pv_popup_pv_popup=pv_popup.A&&pv_popup.A.locals?pv_popup.A.locals:void 0;var pv_popup_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_popup_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n,r=pv_component,l=[],c=[],d=[];return e=class extends r{get popup(){return pv_popup_classPrivateFieldGet(this,t,"f")}set popup(e){pv_popup_classPrivateFieldSet(this,t,e,"f")}get x(){return pv_popup_classPrivateFieldGet(this,i,"f")}set x(e){pv_popup_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_popup_runInitializers(this,l),pv_popup_runInitializers(this,c,void 0))),i.set(this,pv_popup_runInitializers(this,d,void 0))}onClose(){}onOpen(...e){}onClosing(e){this.closingCallback=e}isOpen(){var e;return null===(e=this.popup)||void 0===e?void 0:e.hasAttribute("open")}open(e,...t){this.args=t,this.anchor=e,this.anchor?(this.popup.show(),this.reposition(this.anchor)):this.popup.showModal()}reposition(e){const t=e.getBoundingClientRect();let i=0,o=t.left+t.width/2-this.popup.clientWidth/2,a=t.top+t.height+16;o<8&&(i=8-o,o=8),o+this.popup.clientWidth>window.innerWidth&&(i=window.innerWidth-o-this.popup.clientWidth-8,o=window.innerWidth-this.popup.clientWidth-8),this.popup.hasAttribute("left-edge")&&(o=t.left-8),this.popup.hasAttribute("right-edge")&&(o=t.left+t.width+8-this.popup.clientWidth),this.popup.style.marginLeft=`${o}px`,this.popup.style.marginTop=`${a}px`,this.popup.style.setProperty("--offset",`${i}px`)}close(){var e;null===(e=this.closingCallback)||void 0===e||e.call(this),this.popup.setAttribute("closing",""),this.popup.addEventListener("animationend",(()=>{this.popup.removeAttribute("closing"),this.popup.close(),document.body.removeEventListener("mousedown",this.onMouseDown),this.onClose(),this.remove()}),{once:!0})}connectedCallback(){var e;this.popup.addEventListener("keydown",(e=>{e.stopPropagation(),"Escape"===e.key&&(e.preventDefault(),this.popup.hasAttribute("blocking")||this.close())})),null===(e=this.x)||void 0===e||e.addEventListener("click",this.close),new MutationObserver((e=>{this.isOpen()&&e.some((e=>"attributes"===e.type&&"open"===e.attributeName))&&(document.body.addEventListener("mousedown",this.onMouseDown),this.onOpen(...this.args))})).observe(this.popup,{attributes:!0})}onMouseDown(e){var t;const i=this.popup.getBoundingClientRect();this.isOpen()&&"OPTION"!==e.target.tagName&&!this.popup.hasAttribute("blocking")&&!(null===(t=this.anchor)||void 0===t?void 0:t.contains(e.target))&&(e.clientXi.right||e.clientYi.bottom)&&this.close()}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=r[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],n=[bind],pv_popup_esDecorate(e,null,o,{kind:"accessor",name:"popup",static:!1,private:!1,access:{has:e=>"popup"in e,get:e=>e.popup,set:(e,t)=>{e.popup=t}},metadata:i},c,l),pv_popup_esDecorate(e,null,a,{kind:"accessor",name:"x",static:!1,private:!1,access:{has:e=>"x"in e,get:e=>e.x,set:(e,t)=>{e.x=t}},metadata:i},d,l),pv_popup_esDecorate(e,null,s,{kind:"method",name:"close",static:!1,private:!1,access:{has:e=>"close"in e,get:e=>e.close},metadata:i},null,l),pv_popup_esDecorate(e,null,n,{kind:"method",name:"onMouseDown",static:!1,private:!1,access:{has:e=>"onMouseDown"in e,get:e=>e.onMouseDown},metadata:i},null,l),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_pv_popup_pv_popup=PvPopup;class SettingsManager{constructor(){this.settings=new Map,this.callbacks=new Map}notifyChange(e,t){const i=this.callbacks.get(e)||[];for(const e of i)e(t)}restore(){const e=localStorage.getItem("settings");if(e){this.settings=new Map(JSON.parse(e));for(const[e,t]of this.settings)this.notifyChange(e,t)}}save(){localStorage.setItem("settings",JSON.stringify(Array.from(this.settings)))}setDefault(e,t){this.settings.has(e)||(this.settings.set(e,t),this.notifyChange(e,t))}set(e,t){this.settings.set(e,t),this.notifyChange(e,t),this.save()}get(e){var t;return null!==(t=this.settings.get(e))&&void 0!==t&&t}has(e){return this.settings.has(e)}on(e,t){const i=this.callbacks.get(e)||[];i.push(t),this.callbacks.set(e,i)}remove(e){this.settings.delete(e),this.save()}}const settings=new SettingsManager,settingsmanager=settings;var pv_transpose_code='
      Press 🠉, 🠋, 🠈, 🠊 to transpose while playing.
      ';const pv_transpose=pv_transpose_code;var pv_transpose_pv_transpose=__webpack_require__(7030),pv_transpose_options={};pv_transpose_options.styleTagTransform=styleTagTransform_default(),pv_transpose_options.setAttributes=setAttributesWithoutAttributes_default(),pv_transpose_options.insert=insertBySelector_default().bind(null,"head"),pv_transpose_options.domAPI=styleDomAPI_default(),pv_transpose_options.insertStyleElement=insertStyleElement_default();var pv_transpose_update=injectStylesIntoStyleTag_default()(pv_transpose_pv_transpose.A,pv_transpose_options);const popups_pv_transpose_pv_transpose=pv_transpose_pv_transpose.A&&pv_transpose_pv_transpose.A.locals?pv_transpose_pv_transpose.A.locals:void 0;var pv_transpose_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_transpose_classPrivateFieldGet=function(e,t,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(e):o?o.value:t.get(e)},pv_transpose_classPrivateFieldSet=function(e,t,i,o,a){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?a.call(e,i):a?a.value=i:t.set(e,i),i};let PvTranspose=(()=>{var e,t,i,o;let a,s,n,r,l,c=components_pv_popup_pv_popup,d=[],p=[],u=[],v=[];return e=class extends c{get minus(){return pv_transpose_classPrivateFieldGet(this,t,"f")}set minus(e){pv_transpose_classPrivateFieldSet(this,t,e,"f")}get number(){return pv_transpose_classPrivateFieldGet(this,i,"f")}set number(e){pv_transpose_classPrivateFieldSet(this,i,e,"f")}get plus(){return pv_transpose_classPrivateFieldGet(this,o,"f")}set plus(e){pv_transpose_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),this.MIN=(pv_transpose_runInitializers(this,d),-36),this.MAX=36,t.set(this,pv_transpose_runInitializers(this,p,void 0)),i.set(this,pv_transpose_runInitializers(this,u,void 0)),o.set(this,pv_transpose_runInitializers(this,v,void 0)),this.innerHTML=pv_transpose,this.value=settingsmanager.get("transpose"),settingsmanager.on("transpose",(e=>this.value=e))}onOpen(){this.number.value=this.value.toString(),settingsmanager.on("transpose",(e=>this.number.value=e)),this.number.addEventListener("input",(()=>{isNaN(parseInt(this.number.value))||(parseInt(this.number.value)>this.MAX?this.number.value=this.MAX.toString():parseInt(this.number.value){this.decrease();const e=setInterval(this.decrease,100);document.addEventListener("pointerup",(()=>clearInterval(e)),{once:!0})})),this.plus.addEventListener("pointerdown",(()=>{this.increase();const e=setInterval(this.increase,100);document.addEventListener("pointerup",(()=>clearInterval(e)),{once:!0})}))}decrease(){this.value>this.MIN&&settingsmanager.set("transpose",this.value-1)}increase(){this.value{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_child],r=[bind],l=[bind],pv_transpose_esDecorate(e,null,a,{kind:"accessor",name:"minus",static:!1,private:!1,access:{has:e=>"minus"in e,get:e=>e.minus,set:(e,t)=>{e.minus=t}},metadata:i},p,d),pv_transpose_esDecorate(e,null,s,{kind:"accessor",name:"number",static:!1,private:!1,access:{has:e=>"number"in e,get:e=>e.number,set:(e,t)=>{e.number=t}},metadata:i},u,d),pv_transpose_esDecorate(e,null,n,{kind:"accessor",name:"plus",static:!1,private:!1,access:{has:e=>"plus"in e,get:e=>e.plus,set:(e,t)=>{e.plus=t}},metadata:i},v,d),pv_transpose_esDecorate(e,null,r,{kind:"method",name:"decrease",static:!1,private:!1,access:{has:e=>"decrease"in e,get:e=>e.decrease},metadata:i},null,d),pv_transpose_esDecorate(e,null,l,{kind:"method",name:"increase",static:!1,private:!1,access:{has:e=>"increase"in e,get:e=>e.increase},metadata:i},null,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_transpose_pv_transpose=PvTranspose;customElements.define("pv-transpose",PvTranspose);var pv_velocity_code='
      Press and to change velocity while playing.
      ';const pv_velocity=pv_velocity_code;var pv_velocity_pv_velocity=__webpack_require__(9952),pv_velocity_options={};pv_velocity_options.styleTagTransform=styleTagTransform_default(),pv_velocity_options.setAttributes=setAttributesWithoutAttributes_default(),pv_velocity_options.insert=insertBySelector_default().bind(null,"head"),pv_velocity_options.domAPI=styleDomAPI_default(),pv_velocity_options.insertStyleElement=insertStyleElement_default();var pv_velocity_update=injectStylesIntoStyleTag_default()(pv_velocity_pv_velocity.A,pv_velocity_options);const popups_pv_velocity_pv_velocity=pv_velocity_pv_velocity.A&&pv_velocity_pv_velocity.A.locals?pv_velocity_pv_velocity.A.locals:void 0;var pv_velocity_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_velocity_classPrivateFieldGet=function(e,t,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(e):o?o.value:t.get(e)},pv_velocity_classPrivateFieldSet=function(e,t,i,o,a){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?a.call(e,i):a?a.value=i:t.set(e,i),i};let PvVelocity=(()=>{var e,t,i,o;let a,s,n,r,l,c=components_pv_popup_pv_popup,d=[],p=[],u=[],v=[];return e=class extends c{get minus(){return pv_velocity_classPrivateFieldGet(this,t,"f")}set minus(e){pv_velocity_classPrivateFieldSet(this,t,e,"f")}get number(){return pv_velocity_classPrivateFieldGet(this,i,"f")}set number(e){pv_velocity_classPrivateFieldSet(this,i,e,"f")}get plus(){return pv_velocity_classPrivateFieldGet(this,o,"f")}set plus(e){pv_velocity_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),this.MIN=(pv_velocity_runInitializers(this,d),1),this.MAX=127,t.set(this,pv_velocity_runInitializers(this,p,void 0)),i.set(this,pv_velocity_runInitializers(this,u,void 0)),o.set(this,pv_velocity_runInitializers(this,v,void 0)),this.innerHTML=pv_velocity,this.value=settingsmanager.get("velocity"),settingsmanager.on("velocity",(e=>this.value=e))}onOpen(){this.number.value=this.value.toString(),settingsmanager.on("velocity",(e=>this.number.value=e)),this.number.addEventListener("input",(()=>{isNaN(parseInt(this.number.value))||(parseInt(this.number.value)>this.MAX?this.number.value=this.MAX.toString():parseInt(this.number.value){this.decrease();const e=setInterval(this.decrease,100);document.addEventListener("pointerup",(()=>clearInterval(e)),{once:!0})})),this.plus.addEventListener("pointerdown",(()=>{this.increase();const e=setInterval(this.increase,100);document.addEventListener("pointerup",(()=>clearInterval(e)),{once:!0})}))}decrease(){this.value>this.MIN&&settingsmanager.set("velocity",this.value-1)}increase(){this.value{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_child],r=[bind],l=[bind],pv_velocity_esDecorate(e,null,a,{kind:"accessor",name:"minus",static:!1,private:!1,access:{has:e=>"minus"in e,get:e=>e.minus,set:(e,t)=>{e.minus=t}},metadata:i},p,d),pv_velocity_esDecorate(e,null,s,{kind:"accessor",name:"number",static:!1,private:!1,access:{has:e=>"number"in e,get:e=>e.number,set:(e,t)=>{e.number=t}},metadata:i},u,d),pv_velocity_esDecorate(e,null,n,{kind:"accessor",name:"plus",static:!1,private:!1,access:{has:e=>"plus"in e,get:e=>e.plus,set:(e,t)=>{e.plus=t}},metadata:i},v,d),pv_velocity_esDecorate(e,null,r,{kind:"method",name:"decrease",static:!1,private:!1,access:{has:e=>"decrease"in e,get:e=>e.decrease},metadata:i},null,d),pv_velocity_esDecorate(e,null,l,{kind:"method",name:"increase",static:!1,private:!1,access:{has:e=>"increase"in e,get:e=>e.increase},metadata:i},null,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_velocity_pv_velocity=PvVelocity;customElements.define("pv-velocity",PvVelocity);var pv_settings_code='
      Settings
      ';const pv_settings=pv_settings_code;var pv_settings_pv_settings=__webpack_require__(672),pv_settings_options={};pv_settings_options.styleTagTransform=styleTagTransform_default(),pv_settings_options.setAttributes=setAttributesWithoutAttributes_default(),pv_settings_options.insert=insertBySelector_default().bind(null,"head"),pv_settings_options.domAPI=styleDomAPI_default(),pv_settings_options.insertStyleElement=insertStyleElement_default();var pv_settings_update=injectStylesIntoStyleTag_default()(pv_settings_pv_settings.A,pv_settings_options);const popups_pv_settings_pv_settings=pv_settings_pv_settings.A&&pv_settings_pv_settings.A.locals?pv_settings_pv_settings.A.locals:void 0;var pv_settings_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_settings_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a;let s,n,r,l,c=components_pv_popup_pv_popup,d=[],p=[],u=[],v=[],h=[];return e=class extends c{get keyboardLayout(){return pv_settings_classPrivateFieldGet(this,t,"f")}set keyboardLayout(e){pv_settings_classPrivateFieldSet(this,t,e,"f")}get showEffects(){return pv_settings_classPrivateFieldGet(this,i,"f")}set showEffects(e){pv_settings_classPrivateFieldSet(this,i,e,"f")}get showCursors(){return pv_settings_classPrivateFieldGet(this,o,"f")}set showCursors(e){pv_settings_classPrivateFieldSet(this,o,e,"f")}get showLabels(){return pv_settings_classPrivateFieldGet(this,a,"f")}set showLabels(e){pv_settings_classPrivateFieldSet(this,a,e,"f")}constructor(){super(),t.set(this,(pv_settings_runInitializers(this,d),pv_settings_runInitializers(this,p,void 0))),i.set(this,pv_settings_runInitializers(this,u,void 0)),o.set(this,pv_settings_runInitializers(this,v,void 0)),a.set(this,pv_settings_runInitializers(this,h,void 0)),this.innerHTML=pv_settings,this.keyboardLayout.value=settingsmanager.get("keyboardLayout")||"pianoverse",this.showCursors.checked=settingsmanager.get("showCursors"),this.showEffects.checked=settingsmanager.get("showEffects"),this.showLabels.checked=settingsmanager.get("showLabels")}connectedCallback(){super.connectedCallback(),this.keyboardLayout.addEventListener("change",(()=>{settingsmanager.set("keyboardLayout",this.keyboardLayout.value)})),this.showEffects.addEventListener("change",(()=>{settingsmanager.set("showEffects",this.showEffects.checked)})),this.showCursors.addEventListener("change",(()=>{settingsmanager.set("showCursors",this.showCursors.checked)})),this.showLabels.addEventListener("change",(()=>{settingsmanager.set("showLabels",this.showLabels.checked)}))}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;s=[decorators_child],n=[decorators_child],r=[decorators_child],l=[decorators_child],pv_settings_esDecorate(e,null,s,{kind:"accessor",name:"keyboardLayout",static:!1,private:!1,access:{has:e=>"keyboardLayout"in e,get:e=>e.keyboardLayout,set:(e,t)=>{e.keyboardLayout=t}},metadata:i},p,d),pv_settings_esDecorate(e,null,n,{kind:"accessor",name:"showEffects",static:!1,private:!1,access:{has:e=>"showEffects"in e,get:e=>e.showEffects,set:(e,t)=>{e.showEffects=t}},metadata:i},u,d),pv_settings_esDecorate(e,null,r,{kind:"accessor",name:"showCursors",static:!1,private:!1,access:{has:e=>"showCursors"in e,get:e=>e.showCursors,set:(e,t)=>{e.showCursors=t}},metadata:i},v,d),pv_settings_esDecorate(e,null,l,{kind:"accessor",name:"showLabels",static:!1,private:!1,access:{has:e=>"showLabels"in e,get:e=>e.showLabels,set:(e,t)=>{e.showLabels=t}},metadata:i},h,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_settings_pv_settings=PvSettings;customElements.define("pv-settings",PvSettings);var pv_notification_code='
      ';const pv_notification=pv_notification_code;var pv_notification_pv_notification=__webpack_require__(8728),pv_notification_options={};pv_notification_options.styleTagTransform=styleTagTransform_default(),pv_notification_options.setAttributes=setAttributesWithoutAttributes_default(),pv_notification_options.insert=insertBySelector_default().bind(null,"head"),pv_notification_options.domAPI=styleDomAPI_default(),pv_notification_options.insertStyleElement=insertStyleElement_default();var pv_notification_update=injectStylesIntoStyleTag_default()(pv_notification_pv_notification.A,pv_notification_options);const components_pv_notification_pv_notification=pv_notification_pv_notification.A&&pv_notification_pv_notification.A.locals?pv_notification_pv_notification.A.locals:void 0;var pv_notification_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_notification_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a;let s,n,r,l,c=pv_component,d=[],p=[],u=[],v=[],h=[];return e=class extends c{get notificationIcon(){return pv_notification_classPrivateFieldGet(this,t,"f")}set notificationIcon(e){pv_notification_classPrivateFieldSet(this,t,e,"f")}get notificationTitle(){return pv_notification_classPrivateFieldGet(this,i,"f")}set notificationTitle(e){pv_notification_classPrivateFieldSet(this,i,e,"f")}get notificationText(){return pv_notification_classPrivateFieldGet(this,o,"f")}set notificationText(e){pv_notification_classPrivateFieldSet(this,o,e,"f")}get notificationBar(){return pv_notification_classPrivateFieldGet(this,a,"f")}set notificationBar(e){pv_notification_classPrivateFieldSet(this,a,e,"f")}constructor(e,s,n,r=0){super(),t.set(this,(pv_notification_runInitializers(this,d),pv_notification_runInitializers(this,p,void 0))),i.set(this,pv_notification_runInitializers(this,u,void 0)),o.set(this,pv_notification_runInitializers(this,v,void 0)),a.set(this,pv_notification_runInitializers(this,h,void 0)),this.innerHTML=pv_notification,this.notificationTitle.textContent=s,this.notificationText.textContent=n,this.timeout=r;const l=this.notificationIcon.querySelector("i");switch(l.className="fa",e){case NotificationLevel.INFO:l.classList.add("fa-circle-info");break;case NotificationLevel.SUCCESS:l.classList.add("fa-circle-check"),l.classList.add("success");break;case NotificationLevel.WARNING:l.classList.add("fa-circle-exclamation"),l.classList.add("warning");break;case NotificationLevel.ERROR:l.classList.add("fa-circle-xmark"),l.classList.add("error")}}connectedCallback(){this.timeout>0?(this.notificationBar.style.opacity="1",this.notificationBar.style.animationDuration=`${this.timeout}s`,this.notificationBar.addEventListener("animationend",(e=>e.stopPropagation())),setTimeout((()=>this.close()),1e3*this.timeout)):setTimeout((()=>this.close()),3e5),this.addEventListener("click",(()=>this.close()))}close(){this.classList.add("closing"),this.addEventListener("animationend",(()=>this.remove()))}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;s=[decorators_child],n=[decorators_child],r=[decorators_child],l=[decorators_child],pv_notification_esDecorate(e,null,s,{kind:"accessor",name:"notificationIcon",static:!1,private:!1,access:{has:e=>"notificationIcon"in e,get:e=>e.notificationIcon,set:(e,t)=>{e.notificationIcon=t}},metadata:i},p,d),pv_notification_esDecorate(e,null,n,{kind:"accessor",name:"notificationTitle",static:!1,private:!1,access:{has:e=>"notificationTitle"in e,get:e=>e.notificationTitle,set:(e,t)=>{e.notificationTitle=t}},metadata:i},u,d),pv_notification_esDecorate(e,null,r,{kind:"accessor",name:"notificationText",static:!1,private:!1,access:{has:e=>"notificationText"in e,get:e=>e.notificationText,set:(e,t)=>{e.notificationText=t}},metadata:i},v,d),pv_notification_esDecorate(e,null,l,{kind:"accessor",name:"notificationBar",static:!1,private:!1,access:{has:e=>"notificationBar"in e,get:e=>e.notificationBar,set:(e,t)=>{e.notificationBar=t}},metadata:i},h,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const common_components_pv_notification_pv_notification=PvNotification;var NotificationLevel;customElements.define("pv-notification",PvNotification),function(e){e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(NotificationLevel||(NotificationLevel={}));class NotificationManager{static info(e,t,i){const o=new common_components_pv_notification_pv_notification(NotificationLevel.INFO,e,t,i),a=document.getElementById("notifications");return null==a||a.insertBefore(o,a.firstChild),o}static success(e,t,i){const o=new common_components_pv_notification_pv_notification(NotificationLevel.SUCCESS,e,t,i),a=document.getElementById("notifications");return null==a||a.insertBefore(o,a.firstChild),o}static warning(e,t,i){const o=new common_components_pv_notification_pv_notification(NotificationLevel.WARNING,e,t,i),a=document.getElementById("notifications");return null==a||a.insertBefore(o,a.firstChild),o}static error(e,t,i){const o=new common_components_pv_notification_pv_notification(NotificationLevel.ERROR,e,t,i),a=document.getElementById("notifications");return null==a||a.insertBefore(o,a.firstChild),o}}var minimal=__webpack_require__(6946);const protobufPackage="pianoverse";var Role,pianoverse_NotificationLevel,ServerMessage_Event,ClientMessage_Event;function roleFromJSON(e){switch(e){case 0:case"USER":return Role.USER;case 1:case"MODERATOR":return Role.MODERATOR;case 2:case"DEVELOPER":return Role.DEVELOPER;default:return Role.UNRECOGNIZED}}function roleToJSON(e){switch(e){case Role.USER:return"USER";case Role.MODERATOR:return"MODERATOR";case Role.DEVELOPER:return"DEVELOPER";case Role.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function notificationLevelFromJSON(e){switch(e){case 0:case"INFO":return pianoverse_NotificationLevel.INFO;case 1:case"SUCCESS":return pianoverse_NotificationLevel.SUCCESS;case 2:case"WARNING":return pianoverse_NotificationLevel.WARNING;case 3:case"ERROR":return pianoverse_NotificationLevel.ERROR;default:return pianoverse_NotificationLevel.UNRECOGNIZED}}function notificationLevelToJSON(e){switch(e){case pianoverse_NotificationLevel.INFO:return"INFO";case pianoverse_NotificationLevel.SUCCESS:return"SUCCESS";case pianoverse_NotificationLevel.WARNING:return"WARNING";case pianoverse_NotificationLevel.ERROR:return"ERROR";case pianoverse_NotificationLevel.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function serverMessage_EventFromJSON(e){switch(e){case 0:case"CLEAR":return ServerMessage_Event.CLEAR;case 1:case"PONG":return ServerMessage_Event.PONG;case 2:case"CHAT":return ServerMessage_Event.CHAT;case 3:case"ROOMS":return ServerMessage_Event.ROOMS;case 4:case"WELCOME":return ServerMessage_Event.WELCOME;case 5:case"MOVE":return ServerMessage_Event.MOVE;case 6:case"PRESS":return ServerMessage_Event.PRESS;case 7:case"RELEASE":return ServerMessage_Event.RELEASE;case 8:case"SUSTAIN":return ServerMessage_Event.SUSTAIN;case 9:case"PROFILE":return ServerMessage_Event.PROFILE;case 10:case"JOIN":return ServerMessage_Event.JOIN;case 11:case"LEAVE":return ServerMessage_Event.LEAVE;case 12:case"RATELIMIT":return ServerMessage_Event.RATELIMIT;case 13:case"POPUP":return ServerMessage_Event.POPUP;case 14:case"CHOWN":return ServerMessage_Event.CHOWN;case 15:case"NOTIFICATION":return ServerMessage_Event.NOTIFICATION;default:return ServerMessage_Event.UNRECOGNIZED}}function serverMessage_EventToJSON(e){switch(e){case ServerMessage_Event.CLEAR:return"CLEAR";case ServerMessage_Event.PONG:return"PONG";case ServerMessage_Event.CHAT:return"CHAT";case ServerMessage_Event.ROOMS:return"ROOMS";case ServerMessage_Event.WELCOME:return"WELCOME";case ServerMessage_Event.MOVE:return"MOVE";case ServerMessage_Event.PRESS:return"PRESS";case ServerMessage_Event.RELEASE:return"RELEASE";case ServerMessage_Event.SUSTAIN:return"SUSTAIN";case ServerMessage_Event.PROFILE:return"PROFILE";case ServerMessage_Event.JOIN:return"JOIN";case ServerMessage_Event.LEAVE:return"LEAVE";case ServerMessage_Event.RATELIMIT:return"RATELIMIT";case ServerMessage_Event.POPUP:return"POPUP";case ServerMessage_Event.CHOWN:return"CHOWN";case ServerMessage_Event.NOTIFICATION:return"NOTIFICATION";case ServerMessage_Event.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function clientMessage_EventFromJSON(e){switch(e){case 0:case"CHOWN":return ClientMessage_Event.CHOWN;case 1:case"PING":return ClientMessage_Event.PING;case 2:case"ROOM":return ClientMessage_Event.ROOM;case 3:case"PROFILE":return ClientMessage_Event.PROFILE;case 4:case"CHAT":return ClientMessage_Event.CHAT;case 5:case"MOVE":return ClientMessage_Event.MOVE;case 6:case"MUTE":return ClientMessage_Event.MUTE;case 7:case"UNMUTE":return ClientMessage_Event.UNMUTE;case 8:case"KICK":return ClientMessage_Event.KICK;case 9:case"PRESS":return ClientMessage_Event.PRESS;case 10:case"RELEASE":return ClientMessage_Event.RELEASE;case 11:case"SUSTAIN":return ClientMessage_Event.SUSTAIN;case 12:case"HEARTBEAT":return ClientMessage_Event.HEARTBEAT;case 13:case"BAN":return ClientMessage_Event.BAN;case 14:case"MOD":return ClientMessage_Event.MOD;case 15:case"UNMOD":return ClientMessage_Event.UNMOD;case 16:case"IPBAN":return ClientMessage_Event.IPBAN;default:return ClientMessage_Event.UNRECOGNIZED}}function clientMessage_EventToJSON(e){switch(e){case ClientMessage_Event.CHOWN:return"CHOWN";case ClientMessage_Event.PING:return"PING";case ClientMessage_Event.ROOM:return"ROOM";case ClientMessage_Event.PROFILE:return"PROFILE";case ClientMessage_Event.CHAT:return"CHAT";case ClientMessage_Event.MOVE:return"MOVE";case ClientMessage_Event.MUTE:return"MUTE";case ClientMessage_Event.UNMUTE:return"UNMUTE";case ClientMessage_Event.KICK:return"KICK";case ClientMessage_Event.PRESS:return"PRESS";case ClientMessage_Event.RELEASE:return"RELEASE";case ClientMessage_Event.SUSTAIN:return"SUSTAIN";case ClientMessage_Event.HEARTBEAT:return"HEARTBEAT";case ClientMessage_Event.BAN:return"BAN";case ClientMessage_Event.MOD:return"MOD";case ClientMessage_Event.UNMOD:return"UNMOD";case ClientMessage_Event.IPBAN:return"IPBAN";case ClientMessage_Event.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function createBaseServerMessage(){return{clear:void 0,event:0,pong:void 0,chat:void 0,rooms:[],welcome:void 0,move:void 0,press:void 0,release:void 0,sustain:void 0,profile:void 0,join:void 0,leave:"",ratelimit:0,popup:"",chown:"",notification:void 0}}!function(e){e[e.USER=0]="USER",e[e.MODERATOR=1]="MODERATOR",e[e.DEVELOPER=2]="DEVELOPER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(Role||(Role={})),function(e){e[e.INFO=0]="INFO",e[e.SUCCESS=1]="SUCCESS",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(pianoverse_NotificationLevel||(pianoverse_NotificationLevel={})),function(e){e[e.CLEAR=0]="CLEAR",e[e.PONG=1]="PONG",e[e.CHAT=2]="CHAT",e[e.ROOMS=3]="ROOMS",e[e.WELCOME=4]="WELCOME",e[e.MOVE=5]="MOVE",e[e.PRESS=6]="PRESS",e[e.RELEASE=7]="RELEASE",e[e.SUSTAIN=8]="SUSTAIN",e[e.PROFILE=9]="PROFILE",e[e.JOIN=10]="JOIN",e[e.LEAVE=11]="LEAVE",e[e.RATELIMIT=12]="RATELIMIT",e[e.POPUP=13]="POPUP",e[e.CHOWN=14]="CHOWN",e[e.NOTIFICATION=15]="NOTIFICATION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(ServerMessage_Event||(ServerMessage_Event={})),function(e){e[e.CHOWN=0]="CHOWN",e[e.PING=1]="PING",e[e.ROOM=2]="ROOM",e[e.PROFILE=3]="PROFILE",e[e.CHAT=4]="CHAT",e[e.MOVE=5]="MOVE",e[e.MUTE=6]="MUTE",e[e.UNMUTE=7]="UNMUTE",e[e.KICK=8]="KICK",e[e.PRESS=9]="PRESS",e[e.RELEASE=10]="RELEASE",e[e.SUSTAIN=11]="SUSTAIN",e[e.HEARTBEAT=12]="HEARTBEAT",e[e.BAN=13]="BAN",e[e.MOD=14]="MOD",e[e.UNMOD=15]="UNMOD",e[e.IPBAN=16]="IPBAN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(ClientMessage_Event||(ClientMessage_Event={}));const ServerMessage={encode(e,t=minimal.Writer.create()){void 0!==e.clear&&Void.encode(e.clear,t.uint32(10).fork()).ldelim(),0!==e.event&&t.uint32(16).int32(e.event),void 0!==e.pong&&Void.encode(e.pong,t.uint32(26).fork()).ldelim(),void 0!==e.chat&&Chat.encode(e.chat,t.uint32(34).fork()).ldelim();for(const i of e.rooms)Room.encode(i,t.uint32(42).fork()).ldelim();return void 0!==e.welcome&&Welcome.encode(e.welcome,t.uint32(50).fork()).ldelim(),void 0!==e.move&&Move.encode(e.move,t.uint32(58).fork()).ldelim(),void 0!==e.press&&KeyPress.encode(e.press,t.uint32(66).fork()).ldelim(),void 0!==e.release&&KeyRelease.encode(e.release,t.uint32(74).fork()).ldelim(),void 0!==e.sustain&&Sustain.encode(e.sustain,t.uint32(82).fork()).ldelim(),void 0!==e.profile&&UserInfo.encode(e.profile,t.uint32(90).fork()).ldelim(),void 0!==e.join&&UserInfo.encode(e.join,t.uint32(98).fork()).ldelim(),""!==e.leave&&t.uint32(106).string(e.leave),0!==e.ratelimit&&t.uint32(112).uint32(e.ratelimit),""!==e.popup&&t.uint32(122).string(e.popup),""!==e.chown&&t.uint32(130).string(e.chown),void 0!==e.notification&&Notification.encode(e.notification,t.uint32(138).fork()).ldelim(),t},decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseServerMessage();for(;i.pos>>3){case 1:if(10!==e)break;a.clear=Void.decode(i,i.uint32());continue;case 2:if(16!==e)break;a.event=i.int32();continue;case 3:if(26!==e)break;a.pong=Void.decode(i,i.uint32());continue;case 4:if(34!==e)break;a.chat=Chat.decode(i,i.uint32());continue;case 5:if(42!==e)break;a.rooms.push(Room.decode(i,i.uint32()));continue;case 6:if(50!==e)break;a.welcome=Welcome.decode(i,i.uint32());continue;case 7:if(58!==e)break;a.move=Move.decode(i,i.uint32());continue;case 8:if(66!==e)break;a.press=KeyPress.decode(i,i.uint32());continue;case 9:if(74!==e)break;a.release=KeyRelease.decode(i,i.uint32());continue;case 10:if(82!==e)break;a.sustain=Sustain.decode(i,i.uint32());continue;case 11:if(90!==e)break;a.profile=UserInfo.decode(i,i.uint32());continue;case 12:if(98!==e)break;a.join=UserInfo.decode(i,i.uint32());continue;case 13:if(106!==e)break;a.leave=i.string();continue;case 14:if(112!==e)break;a.ratelimit=i.uint32();continue;case 15:if(122!==e)break;a.popup=i.string();continue;case 16:if(130!==e)break;a.chown=i.string();continue;case 17:if(138!==e)break;a.notification=Notification.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({clear:isSet(e.clear)?Void.fromJSON(e.clear):void 0,event:isSet(e.event)?serverMessage_EventFromJSON(e.event):0,pong:isSet(e.pong)?Void.fromJSON(e.pong):void 0,chat:isSet(e.chat)?Chat.fromJSON(e.chat):void 0,rooms:globalThis.Array.isArray(null==e?void 0:e.rooms)?e.rooms.map((e=>Room.fromJSON(e))):[],welcome:isSet(e.welcome)?Welcome.fromJSON(e.welcome):void 0,move:isSet(e.move)?Move.fromJSON(e.move):void 0,press:isSet(e.press)?KeyPress.fromJSON(e.press):void 0,release:isSet(e.release)?KeyRelease.fromJSON(e.release):void 0,sustain:isSet(e.sustain)?Sustain.fromJSON(e.sustain):void 0,profile:isSet(e.profile)?UserInfo.fromJSON(e.profile):void 0,join:isSet(e.join)?UserInfo.fromJSON(e.join):void 0,leave:isSet(e.leave)?globalThis.String(e.leave):"",ratelimit:isSet(e.ratelimit)?globalThis.Number(e.ratelimit):0,popup:isSet(e.popup)?globalThis.String(e.popup):"",chown:isSet(e.chown)?globalThis.String(e.chown):"",notification:isSet(e.notification)?Notification.fromJSON(e.notification):void 0}),toJSON(e){var t;const i={};return void 0!==e.clear&&(i.clear=Void.toJSON(e.clear)),0!==e.event&&(i.event=serverMessage_EventToJSON(e.event)),void 0!==e.pong&&(i.pong=Void.toJSON(e.pong)),void 0!==e.chat&&(i.chat=Chat.toJSON(e.chat)),(null===(t=e.rooms)||void 0===t?void 0:t.length)&&(i.rooms=e.rooms.map((e=>Room.toJSON(e)))),void 0!==e.welcome&&(i.welcome=Welcome.toJSON(e.welcome)),void 0!==e.move&&(i.move=Move.toJSON(e.move)),void 0!==e.press&&(i.press=KeyPress.toJSON(e.press)),void 0!==e.release&&(i.release=KeyRelease.toJSON(e.release)),void 0!==e.sustain&&(i.sustain=Sustain.toJSON(e.sustain)),void 0!==e.profile&&(i.profile=UserInfo.toJSON(e.profile)),void 0!==e.join&&(i.join=UserInfo.toJSON(e.join)),""!==e.leave&&(i.leave=e.leave),0!==e.ratelimit&&(i.ratelimit=Math.round(e.ratelimit)),""!==e.popup&&(i.popup=e.popup),""!==e.chown&&(i.chown=e.chown),void 0!==e.notification&&(i.notification=Notification.toJSON(e.notification)),i},create:e=>ServerMessage.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a,s,n;const r=createBaseServerMessage();return r.clear=void 0!==e.clear&&null!==e.clear?Void.fromPartial(e.clear):void 0,r.event=null!==(t=e.event)&&void 0!==t?t:0,r.pong=void 0!==e.pong&&null!==e.pong?Void.fromPartial(e.pong):void 0,r.chat=void 0!==e.chat&&null!==e.chat?Chat.fromPartial(e.chat):void 0,r.rooms=(null===(i=e.rooms)||void 0===i?void 0:i.map((e=>Room.fromPartial(e))))||[],r.welcome=void 0!==e.welcome&&null!==e.welcome?Welcome.fromPartial(e.welcome):void 0,r.move=void 0!==e.move&&null!==e.move?Move.fromPartial(e.move):void 0,r.press=void 0!==e.press&&null!==e.press?KeyPress.fromPartial(e.press):void 0,r.release=void 0!==e.release&&null!==e.release?KeyRelease.fromPartial(e.release):void 0,r.sustain=void 0!==e.sustain&&null!==e.sustain?Sustain.fromPartial(e.sustain):void 0,r.profile=void 0!==e.profile&&null!==e.profile?UserInfo.fromPartial(e.profile):void 0,r.join=void 0!==e.join&&null!==e.join?UserInfo.fromPartial(e.join):void 0,r.leave=null!==(o=e.leave)&&void 0!==o?o:"",r.ratelimit=null!==(a=e.ratelimit)&&void 0!==a?a:0,r.popup=null!==(s=e.popup)&&void 0!==s?s:"",r.chown=null!==(n=e.chown)&&void 0!==n?n:"",r.notification=void 0!==e.notification&&null!==e.notification?Notification.fromPartial(e.notification):void 0,r}};function createBaseClientMessage(){return{chown:"",event:0,ping:void 0,room:void 0,profile:void 0,chat:"",move:void 0,mute:"",unmute:"",kick:"",press:void 0,release:void 0,sustain:!1,heartbeat:void 0,ban:void 0,mod:"",unmod:"",ipban:""}}const ClientMessage={encode:(e,t=minimal.Writer.create())=>(""!==e.chown&&t.uint32(10).string(e.chown),0!==e.event&&t.uint32(16).int32(e.event),void 0!==e.ping&&Void.encode(e.ping,t.uint32(26).fork()).ldelim(),void 0!==e.room&&Enter.encode(e.room,t.uint32(34).fork()).ldelim(),void 0!==e.profile&&UserInfo.encode(e.profile,t.uint32(42).fork()).ldelim(),""!==e.chat&&t.uint32(50).string(e.chat),void 0!==e.move&&Move.encode(e.move,t.uint32(58).fork()).ldelim(),""!==e.mute&&t.uint32(66).string(e.mute),""!==e.unmute&&t.uint32(74).string(e.unmute),""!==e.kick&&t.uint32(82).string(e.kick),void 0!==e.press&&KeyPress.encode(e.press,t.uint32(90).fork()).ldelim(),void 0!==e.release&&KeyRelease.encode(e.release,t.uint32(98).fork()).ldelim(),!1!==e.sustain&&t.uint32(104).bool(e.sustain),void 0!==e.heartbeat&&Void.encode(e.heartbeat,t.uint32(114).fork()).ldelim(),void 0!==e.ban&&Ban.encode(e.ban,t.uint32(122).fork()).ldelim(),""!==e.mod&&t.uint32(130).string(e.mod),""!==e.unmod&&t.uint32(138).string(e.unmod),""!==e.ipban&&t.uint32(146).string(e.ipban),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseClientMessage();for(;i.pos>>3){case 1:if(10!==e)break;a.chown=i.string();continue;case 2:if(16!==e)break;a.event=i.int32();continue;case 3:if(26!==e)break;a.ping=Void.decode(i,i.uint32());continue;case 4:if(34!==e)break;a.room=Enter.decode(i,i.uint32());continue;case 5:if(42!==e)break;a.profile=UserInfo.decode(i,i.uint32());continue;case 6:if(50!==e)break;a.chat=i.string();continue;case 7:if(58!==e)break;a.move=Move.decode(i,i.uint32());continue;case 8:if(66!==e)break;a.mute=i.string();continue;case 9:if(74!==e)break;a.unmute=i.string();continue;case 10:if(82!==e)break;a.kick=i.string();continue;case 11:if(90!==e)break;a.press=KeyPress.decode(i,i.uint32());continue;case 12:if(98!==e)break;a.release=KeyRelease.decode(i,i.uint32());continue;case 13:if(104!==e)break;a.sustain=i.bool();continue;case 14:if(114!==e)break;a.heartbeat=Void.decode(i,i.uint32());continue;case 15:if(122!==e)break;a.ban=Ban.decode(i,i.uint32());continue;case 16:if(130!==e)break;a.mod=i.string();continue;case 17:if(138!==e)break;a.unmod=i.string();continue;case 18:if(146!==e)break;a.ipban=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({chown:isSet(e.chown)?globalThis.String(e.chown):"",event:isSet(e.event)?clientMessage_EventFromJSON(e.event):0,ping:isSet(e.ping)?Void.fromJSON(e.ping):void 0,room:isSet(e.room)?Enter.fromJSON(e.room):void 0,profile:isSet(e.profile)?UserInfo.fromJSON(e.profile):void 0,chat:isSet(e.chat)?globalThis.String(e.chat):"",move:isSet(e.move)?Move.fromJSON(e.move):void 0,mute:isSet(e.mute)?globalThis.String(e.mute):"",unmute:isSet(e.unmute)?globalThis.String(e.unmute):"",kick:isSet(e.kick)?globalThis.String(e.kick):"",press:isSet(e.press)?KeyPress.fromJSON(e.press):void 0,release:isSet(e.release)?KeyRelease.fromJSON(e.release):void 0,sustain:!!isSet(e.sustain)&&globalThis.Boolean(e.sustain),heartbeat:isSet(e.heartbeat)?Void.fromJSON(e.heartbeat):void 0,ban:isSet(e.ban)?Ban.fromJSON(e.ban):void 0,mod:isSet(e.mod)?globalThis.String(e.mod):"",unmod:isSet(e.unmod)?globalThis.String(e.unmod):"",ipban:isSet(e.ipban)?globalThis.String(e.ipban):""}),toJSON(e){const t={};return""!==e.chown&&(t.chown=e.chown),0!==e.event&&(t.event=clientMessage_EventToJSON(e.event)),void 0!==e.ping&&(t.ping=Void.toJSON(e.ping)),void 0!==e.room&&(t.room=Enter.toJSON(e.room)),void 0!==e.profile&&(t.profile=UserInfo.toJSON(e.profile)),""!==e.chat&&(t.chat=e.chat),void 0!==e.move&&(t.move=Move.toJSON(e.move)),""!==e.mute&&(t.mute=e.mute),""!==e.unmute&&(t.unmute=e.unmute),""!==e.kick&&(t.kick=e.kick),void 0!==e.press&&(t.press=KeyPress.toJSON(e.press)),void 0!==e.release&&(t.release=KeyRelease.toJSON(e.release)),!1!==e.sustain&&(t.sustain=e.sustain),void 0!==e.heartbeat&&(t.heartbeat=Void.toJSON(e.heartbeat)),void 0!==e.ban&&(t.ban=Ban.toJSON(e.ban)),""!==e.mod&&(t.mod=e.mod),""!==e.unmod&&(t.unmod=e.unmod),""!==e.ipban&&(t.ipban=e.ipban),t},create:e=>ClientMessage.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a,s,n,r,l,c,d;const p=createBaseClientMessage();return p.chown=null!==(t=e.chown)&&void 0!==t?t:"",p.event=null!==(i=e.event)&&void 0!==i?i:0,p.ping=void 0!==e.ping&&null!==e.ping?Void.fromPartial(e.ping):void 0,p.room=void 0!==e.room&&null!==e.room?Enter.fromPartial(e.room):void 0,p.profile=void 0!==e.profile&&null!==e.profile?UserInfo.fromPartial(e.profile):void 0,p.chat=null!==(o=e.chat)&&void 0!==o?o:"",p.move=void 0!==e.move&&null!==e.move?Move.fromPartial(e.move):void 0,p.mute=null!==(a=e.mute)&&void 0!==a?a:"",p.unmute=null!==(s=e.unmute)&&void 0!==s?s:"",p.kick=null!==(n=e.kick)&&void 0!==n?n:"",p.press=void 0!==e.press&&null!==e.press?KeyPress.fromPartial(e.press):void 0,p.release=void 0!==e.release&&null!==e.release?KeyRelease.fromPartial(e.release):void 0,p.sustain=null!==(r=e.sustain)&&void 0!==r&&r,p.heartbeat=void 0!==e.heartbeat&&null!==e.heartbeat?Void.fromPartial(e.heartbeat):void 0,p.ban=void 0!==e.ban&&null!==e.ban?Ban.fromPartial(e.ban):void 0,p.mod=null!==(l=e.mod)&&void 0!==l?l:"",p.unmod=null!==(c=e.unmod)&&void 0!==c?c:"",p.ipban=null!==(d=e.ipban)&&void 0!==d?d:"",p}};function createBaseVoid(){return{}}const Void={encode:(e,t=minimal.Writer.create())=>t,decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseVoid();for(;i.pos({}),toJSON:e=>({}),create:e=>Void.fromPartial(null!=e?e:{}),fromPartial:e=>createBaseVoid()};function createBaseUserInfo(){return{id:void 0,name:void 0,color:void 0,role:void 0,muted:void 0,x:void 0,y:void 0}}const UserInfo={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.name&&t.uint32(18).string(e.name),void 0!==e.color&&t.uint32(26).string(e.color),void 0!==e.role&&t.uint32(32).int32(e.role),void 0!==e.muted&&t.uint32(40).bool(e.muted),void 0!==e.x&&t.uint32(53).float(e.x),void 0!==e.y&&t.uint32(61).float(e.y),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseUserInfo();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(18!==e)break;a.name=i.string();continue;case 3:if(26!==e)break;a.color=i.string();continue;case 4:if(32!==e)break;a.role=i.int32();continue;case 5:if(40!==e)break;a.muted=i.bool();continue;case 6:if(53!==e)break;a.x=i.float();continue;case 7:if(61!==e)break;a.y=i.float();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,name:isSet(e.name)?globalThis.String(e.name):void 0,color:isSet(e.color)?globalThis.String(e.color):void 0,role:isSet(e.role)?roleFromJSON(e.role):void 0,muted:isSet(e.muted)?globalThis.Boolean(e.muted):void 0,x:isSet(e.x)?globalThis.Number(e.x):void 0,y:isSet(e.y)?globalThis.Number(e.y):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.name&&(t.name=e.name),void 0!==e.color&&(t.color=e.color),void 0!==e.role&&(t.role=roleToJSON(e.role)),void 0!==e.muted&&(t.muted=e.muted),void 0!==e.x&&(t.x=e.x),void 0!==e.y&&(t.y=e.y),t},create:e=>UserInfo.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a,s,n,r;const l=createBaseUserInfo();return l.id=null!==(t=e.id)&&void 0!==t?t:void 0,l.name=null!==(i=e.name)&&void 0!==i?i:void 0,l.color=null!==(o=e.color)&&void 0!==o?o:void 0,l.role=null!==(a=e.role)&&void 0!==a?a:void 0,l.muted=null!==(s=e.muted)&&void 0!==s?s:void 0,l.x=null!==(n=e.x)&&void 0!==n?n:void 0,l.y=null!==(r=e.y)&&void 0!==r?r:void 0,l}};function createBaseRoom(){return{id:void 0,count:void 0}}const Room={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.count&&t.uint32(16).uint32(e.count),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseRoom();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.count=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,count:isSet(e.count)?globalThis.Number(e.count):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.count&&(t.count=Math.round(e.count)),t},create:e=>Room.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseRoom();return o.id=null!==(t=e.id)&&void 0!==t?t:void 0,o.count=null!==(i=e.count)&&void 0!==i?i:void 0,o}};function createBaseMove(){return{id:void 0,x:void 0,y:void 0}}const Move={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.x&&t.uint32(21).float(e.x),void 0!==e.y&&t.uint32(29).float(e.y),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseMove();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(21!==e)break;a.x=i.float();continue;case 3:if(29!==e)break;a.y=i.float();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,x:isSet(e.x)?globalThis.Number(e.x):void 0,y:isSet(e.y)?globalThis.Number(e.y):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.x&&(t.x=e.x),void 0!==e.y&&(t.y=e.y),t},create:e=>Move.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o;const a=createBaseMove();return a.id=null!==(t=e.id)&&void 0!==t?t:void 0,a.x=null!==(i=e.x)&&void 0!==i?i:void 0,a.y=null!==(o=e.y)&&void 0!==o?o:void 0,a}};function createBaseKeyPress(){return{id:void 0,key:void 0,vel:void 0}}const KeyPress={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.key&&t.uint32(16).uint32(e.key),void 0!==e.vel&&t.uint32(24).uint32(e.vel),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseKeyPress();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.key=i.uint32();continue;case 3:if(24!==e)break;a.vel=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,key:isSet(e.key)?globalThis.Number(e.key):void 0,vel:isSet(e.vel)?globalThis.Number(e.vel):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.key&&(t.key=Math.round(e.key)),void 0!==e.vel&&(t.vel=Math.round(e.vel)),t},create:e=>KeyPress.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o;const a=createBaseKeyPress();return a.id=null!==(t=e.id)&&void 0!==t?t:void 0,a.key=null!==(i=e.key)&&void 0!==i?i:void 0,a.vel=null!==(o=e.vel)&&void 0!==o?o:void 0,a}};function createBaseKeyRelease(){return{id:void 0,key:void 0}}const KeyRelease={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.key&&t.uint32(16).uint32(e.key),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseKeyRelease();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.key=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,key:isSet(e.key)?globalThis.Number(e.key):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.key&&(t.key=Math.round(e.key)),t},create:e=>KeyRelease.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseKeyRelease();return o.id=null!==(t=e.id)&&void 0!==t?t:void 0,o.key=null!==(i=e.key)&&void 0!==i?i:void 0,o}};function createBaseSustain(){return{id:void 0,enabled:void 0}}const Sustain={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.enabled&&t.uint32(16).bool(e.enabled),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseSustain();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.enabled=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,enabled:isSet(e.enabled)?globalThis.Boolean(e.enabled):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.enabled&&(t.enabled=e.enabled),t},create:e=>Sustain.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseSustain();return o.id=null!==(t=e.id)&&void 0!==t?t:void 0,o.enabled=null!==(i=e.enabled)&&void 0!==i?i:void 0,o}};function createBaseWelcome(){return{id:void 0,name:void 0,color:void 0,room:void 0,owner:void 0,chat:[],role:void 0,private:void 0}}const Welcome={encode(e,t=minimal.Writer.create()){void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.name&&t.uint32(18).string(e.name),void 0!==e.color&&t.uint32(26).string(e.color),void 0!==e.room&&t.uint32(34).string(e.room),void 0!==e.owner&&t.uint32(42).string(e.owner);for(const i of e.chat)Chat.encode(i,t.uint32(50).fork()).ldelim();return void 0!==e.role&&t.uint32(56).int32(e.role),void 0!==e.private&&t.uint32(64).bool(e.private),t},decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseWelcome();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(18!==e)break;a.name=i.string();continue;case 3:if(26!==e)break;a.color=i.string();continue;case 4:if(34!==e)break;a.room=i.string();continue;case 5:if(42!==e)break;a.owner=i.string();continue;case 6:if(50!==e)break;a.chat.push(Chat.decode(i,i.uint32()));continue;case 7:if(56!==e)break;a.role=i.int32();continue;case 8:if(64!==e)break;a.private=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,name:isSet(e.name)?globalThis.String(e.name):void 0,color:isSet(e.color)?globalThis.String(e.color):void 0,room:isSet(e.room)?globalThis.String(e.room):void 0,owner:isSet(e.owner)?globalThis.String(e.owner):void 0,chat:globalThis.Array.isArray(null==e?void 0:e.chat)?e.chat.map((e=>Chat.fromJSON(e))):[],role:isSet(e.role)?roleFromJSON(e.role):void 0,private:isSet(e.private)?globalThis.Boolean(e.private):void 0}),toJSON(e){var t;const i={};return void 0!==e.id&&(i.id=e.id),void 0!==e.name&&(i.name=e.name),void 0!==e.color&&(i.color=e.color),void 0!==e.room&&(i.room=e.room),void 0!==e.owner&&(i.owner=e.owner),(null===(t=e.chat)||void 0===t?void 0:t.length)&&(i.chat=e.chat.map((e=>Chat.toJSON(e)))),void 0!==e.role&&(i.role=roleToJSON(e.role)),void 0!==e.private&&(i.private=e.private),i},create:e=>Welcome.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a,s,n,r,l;const c=createBaseWelcome();return c.id=null!==(t=e.id)&&void 0!==t?t:void 0,c.name=null!==(i=e.name)&&void 0!==i?i:void 0,c.color=null!==(o=e.color)&&void 0!==o?o:void 0,c.room=null!==(a=e.room)&&void 0!==a?a:void 0,c.owner=null!==(s=e.owner)&&void 0!==s?s:void 0,c.chat=(null===(n=e.chat)||void 0===n?void 0:n.map((e=>Chat.fromPartial(e))))||[],c.role=null!==(r=e.role)&&void 0!==r?r:void 0,c.private=null!==(l=e.private)&&void 0!==l?l:void 0,c}};function createBaseChat(){return{id:void 0,content:void 0,name:void 0,color:void 0}}const Chat={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.content&&t.uint32(18).string(e.content),void 0!==e.name&&t.uint32(26).string(e.name),void 0!==e.color&&t.uint32(34).string(e.color),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseChat();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(18!==e)break;a.content=i.string();continue;case 3:if(26!==e)break;a.name=i.string();continue;case 4:if(34!==e)break;a.color=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,content:isSet(e.content)?globalThis.String(e.content):void 0,name:isSet(e.name)?globalThis.String(e.name):void 0,color:isSet(e.color)?globalThis.String(e.color):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.content&&(t.content=e.content),void 0!==e.name&&(t.name=e.name),void 0!==e.color&&(t.color=e.color),t},create:e=>Chat.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a;const s=createBaseChat();return s.id=null!==(t=e.id)&&void 0!==t?t:void 0,s.content=null!==(i=e.content)&&void 0!==i?i:void 0,s.name=null!==(o=e.name)&&void 0!==o?o:void 0,s.color=null!==(a=e.color)&&void 0!==a?a:void 0,s}};function createBaseEnter(){return{room:void 0,private:void 0}}const Enter={encode:(e,t=minimal.Writer.create())=>(void 0!==e.room&&t.uint32(10).string(e.room),void 0!==e.private&&t.uint32(16).bool(e.private),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseEnter();for(;i.pos>>3){case 1:if(10!==e)break;a.room=i.string();continue;case 2:if(16!==e)break;a.private=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({room:isSet(e.room)?globalThis.String(e.room):void 0,private:isSet(e.private)?globalThis.Boolean(e.private):void 0}),toJSON(e){const t={};return void 0!==e.room&&(t.room=e.room),void 0!==e.private&&(t.private=e.private),t},create:e=>Enter.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseEnter();return o.room=null!==(t=e.room)&&void 0!==t?t:void 0,o.private=null!==(i=e.private)&&void 0!==i?i:void 0,o}};function createBaseBan(){return{id:void 0,minutes:void 0}}const Ban={encode:(e,t=minimal.Writer.create())=>(void 0!==e.id&&t.uint32(10).string(e.id),void 0!==e.minutes&&t.uint32(16).uint32(e.minutes),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseBan();for(;i.pos>>3){case 1:if(10!==e)break;a.id=i.string();continue;case 2:if(16!==e)break;a.minutes=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({id:isSet(e.id)?globalThis.String(e.id):void 0,minutes:isSet(e.minutes)?globalThis.Number(e.minutes):void 0}),toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.minutes&&(t.minutes=Math.round(e.minutes)),t},create:e=>Ban.fromPartial(null!=e?e:{}),fromPartial(e){var t,i;const o=createBaseBan();return o.id=null!==(t=e.id)&&void 0!==t?t:void 0,o.minutes=null!==(i=e.minutes)&&void 0!==i?i:void 0,o}};function createBaseNotification(){return{level:void 0,title:void 0,text:void 0,timeout:void 0}}const Notification={encode:(e,t=minimal.Writer.create())=>(void 0!==e.level&&t.uint32(8).int32(e.level),void 0!==e.title&&t.uint32(18).string(e.title),void 0!==e.text&&t.uint32(26).string(e.text),void 0!==e.timeout&&t.uint32(32).uint32(e.timeout),t),decode(e,t){const i=e instanceof minimal.Reader?e:minimal.Reader.create(e);let o=void 0===t?i.len:i.pos+t;const a=createBaseNotification();for(;i.pos>>3){case 1:if(8!==e)break;a.level=i.int32();continue;case 2:if(18!==e)break;a.title=i.string();continue;case 3:if(26!==e)break;a.text=i.string();continue;case 4:if(32!==e)break;a.timeout=i.uint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},fromJSON:e=>({level:isSet(e.level)?notificationLevelFromJSON(e.level):void 0,title:isSet(e.title)?globalThis.String(e.title):void 0,text:isSet(e.text)?globalThis.String(e.text):void 0,timeout:isSet(e.timeout)?globalThis.Number(e.timeout):void 0}),toJSON(e){const t={};return void 0!==e.level&&(t.level=notificationLevelToJSON(e.level)),void 0!==e.title&&(t.title=e.title),void 0!==e.text&&(t.text=e.text),void 0!==e.timeout&&(t.timeout=Math.round(e.timeout)),t},create:e=>Notification.fromPartial(null!=e?e:{}),fromPartial(e){var t,i,o,a;const s=createBaseNotification();return s.level=null!==(t=e.level)&&void 0!==t?t:void 0,s.title=null!==(i=e.title)&&void 0!==i?i:void 0,s.text=null!==(o=e.text)&&void 0!==o?o:void 0,s.timeout=null!==(a=e.timeout)&&void 0!==a?a:void 0,s}};function isSet(e){return null!=e}var events=__webpack_require__(7007),events_default=__webpack_require__.n(events),client_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0};let Client=(()=>{var e;let t,i=events_default(),o=[];return e=class extends i{constructor(){super(),this._ws=void client_runInitializers(this,o),this._users=new Map,this._popStateTriggered=!1,this._reconnectTimeout=0,this.me={},this.room={},this.init(),new Worker("heartbeat.js").onmessage=()=>this.heartbeat(),window.location.search||window.history.replaceState({},"",""),window.addEventListener("popstate",(()=>{const e=new URLSearchParams(window.location.search);this._popStateTriggered=!0,this.enter(e.get("r")||"Lobby")}))}get users(){return Array.from(this._users.values())}get(e){return e&&e!==this.me.id?this._users.get(e):this.me}init(){let wsurl="";if(!localStorage.host) { wsurl = "wss://api.pianoverse.me";} else if(localStorage.host=="mainline") { wsurl = "wss://pianoverse.net"} else if(localStorage.host == "dev") { wsurl = "ws://127.0.0.1:8081"};this._ws = new WebSocket(wsurl,"pianoverse"),this._ws.binaryType="arraybuffer",this._ws.onmessage=e=>this.handleMessage(e),this._ws.onopen=()=>{this.emit("connected"),loadermanager.stop(),this._reconnectTimeout=0;const e=new URLSearchParams(window.location.search);settingsmanager.has("name")&&settingsmanager.has("color")&&this.profile(settingsmanager.get("name"),settingsmanager.get("color")),this.enter(e.get("r")||"Lobby",null!==e.get("p"))},this._ws.onclose=()=>{this.emit("reconnecting"),loadermanager.start("Reconnecting..."),this._reconnectTimeout+=500,setTimeout(this.init,Math.min(this._reconnectTimeout,4e3))}}handleMessage(e){let t,i;const o=new FileReader;o.onload=()=>{if(o.result instanceof ArrayBuffer){const e=new Uint8Array(o.result),a=ServerMessage.decode(e);t=serverMessage_EventToJSON(a.event).toLowerCase(),i=a[t],this.handleEventData(t,i)}},o.readAsArrayBuffer(new Blob([e.data]))}handleEventData(e,t){switch(e){case"welcome":this._users=new Map;const{id:e,name:i,color:o,role:a,room:s,owner:n}=t;this.me={id:e,name:i,color:o,role:a},settingsmanager.set("name",this.me.name),settingsmanager.set("color",this.me.color),this.room={id:s,owner:n},this._popStateTriggered||("Lobby"===this.room.id?window.history.pushState({},"",window.location.pathname):window.history.pushState({},"",`?r=${encodeURI(this.room.id)}`+(t.private?"&p":""))),this._popStateTriggered=!1;const r=document.querySelector("pv-toolbar"),l=document.querySelector("pv-canvas"),c=document.querySelector("pv-keys"),d=document.querySelector("pv-chat");"Backrooms"===this.room.id?(r.style.display="none",l.style.display="none",c.style.display="none",d.style.display="none",document.body.querySelector(".chat").style.display="none"):(r.style.display="",l.style.display="",c.style.display="",d.style.display="",document.body.querySelector(".chat").style.display="");break;case"join":this._users.set(t.id,t);break;case"profile":this.get(t.id).name=t.name,this.get(t.id).color=t.color,this.get(t.id).role=t.role,t.id===client.me.id&&(settingsmanager.set("name",t.name),settingsmanager.set("color",t.color));break;case"chown":this.room.owner=t;break;case"leave":t=this.get(t),this._users.delete(t.id);break;case"notification":switch(t.level){case pianoverse_NotificationLevel.INFO:NotificationManager.info(t.title,t.text,t.timeout);break;case pianoverse_NotificationLevel.SUCCESS:NotificationManager.success(t.title,t.text,t.timeout);break;case pianoverse_NotificationLevel.WARNING:NotificationManager.warning(t.title,t.text,t.timeout);break;case pianoverse_NotificationLevel.ERROR:NotificationManager.error(t.title,t.text,t.timeout)}break;case"message":case"popup":PopupManager.closeEverything(),PopupManager.open(Modal.MESSAGE,null,t);break;case"ratelimit":NotificationManager.warning("Slow down!","You've reached the ratelimit.")}this.emit(e,t)}send(e){var t;return(null===(t=this._ws)||void 0===t?void 0:t.readyState)===WebSocket.OPEN&&(this._ws.send(ClientMessage.encode(e).finish()),!0)}isConnected(){var e;return(null===(e=this._ws)||void 0===e?void 0:e.readyState)===WebSocket.OPEN}enter(e,t=!1){const i=ClientMessage.create({event:ClientMessage_Event.ROOM,room:{room:e,private:t}});return this.send(i)}profile(e,t){const i=ClientMessage.create({event:ClientMessage_Event.PROFILE,profile:{name:e||this.me.name,color:t||this.me.color}});return this.send(i)}chat(e){const t=ClientMessage.create({event:ClientMessage_Event.CHAT,chat:e});return this.send(t)}move(e,t){const i=ClientMessage.create({event:ClientMessage_Event.MOVE,move:{x:e,y:t}});return this.send(i)}chown(e){const t=ClientMessage.create({event:ClientMessage_Event.CHOWN,chown:e});return this.send(t)}mute(e){this.get(e).muted=!0;const t=ClientMessage.create({event:ClientMessage_Event.MUTE,mute:e});return this.send(t)}unmute(e){this.get(e).muted=!1;const t=ClientMessage.create({event:ClientMessage_Event.UNMUTE,unmute:e});return this.send(t)}kick(e){const t=ClientMessage.create({event:ClientMessage_Event.KICK,kick:e});return this.send(t)}ban(e,t=60){const i=ClientMessage.create({event:ClientMessage_Event.BAN,ban:{id:e,minutes:t}});return this.send(i)}press(e,t){const i=ClientMessage.create({event:ClientMessage_Event.PRESS,press:{key:e,vel:t}});return this.send(i)}release(e){const t=ClientMessage.create({event:ClientMessage_Event.RELEASE,release:{key:e}});return this.send(t)}sustain(e){const t=ClientMessage.create({event:ClientMessage_Event.SUSTAIN,sustain:e});return this.send(t)}mod(e){const t=ClientMessage.create({event:ClientMessage_Event.MOD,mod:e});return this.send(t)}unmod(e){const t=ClientMessage.create({event:ClientMessage_Event.UNMOD,unmod:e});return this.send(t)}ipban(e){const t=ClientMessage.create({event:ClientMessage_Event.IPBAN,ipban:e});return this.send(t)}ping(){const e=ClientMessage.create({event:ClientMessage_Event.PING});return this.send(e)}heartbeat(){const e=ClientMessage.create({event:ClientMessage_Event.HEARTBEAT});return this.send(e)}},(()=>{var a;const s="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(a=i[Symbol.metadata])&&void 0!==a?a:null):void 0;t=[bind],client_esDecorate(e,null,t,{kind:"method",name:"init",static:!1,private:!1,access:{has:e=>"init"in e,get:e=>e.init},metadata:s},null,o),s&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})})(),e})();const client=new Client,services_client=client;var pv_new_room_code='
      Create room
      ';const pv_new_room=pv_new_room_code;var pv_new_room_pv_new_room=__webpack_require__(9728),pv_new_room_options={};pv_new_room_options.styleTagTransform=styleTagTransform_default(),pv_new_room_options.setAttributes=setAttributesWithoutAttributes_default(),pv_new_room_options.insert=insertBySelector_default().bind(null,"head"),pv_new_room_options.domAPI=styleDomAPI_default(),pv_new_room_options.insertStyleElement=insertStyleElement_default();var pv_new_room_update=injectStylesIntoStyleTag_default()(pv_new_room_pv_new_room.A,pv_new_room_options);const popups_pv_new_room_pv_new_room=pv_new_room_pv_new_room.A&&pv_new_room_pv_new_room.A.locals?pv_new_room_pv_new_room.A.locals:void 0;var pv_new_room_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_new_room_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r,l,c,d=components_pv_popup_pv_popup,p=[],u=[],v=[],h=[];return e=class extends d{get inputRoom(){return pv_new_room_classPrivateFieldGet(this,t,"f")}set inputRoom(e){pv_new_room_classPrivateFieldSet(this,t,e,"f")}get inputPrivate(){return pv_new_room_classPrivateFieldGet(this,i,"f")}set inputPrivate(e){pv_new_room_classPrivateFieldSet(this,i,e,"f")}get buttonSave(){return pv_new_room_classPrivateFieldGet(this,o,"f")}set buttonSave(e){pv_new_room_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_new_room_runInitializers(this,p),pv_new_room_runInitializers(this,u,void 0))),i.set(this,pv_new_room_runInitializers(this,v,void 0)),o.set(this,pv_new_room_runInitializers(this,h,void 0)),this.innerHTML=pv_new_room}onOpen(){this.inputRoom.value="",this.inputRoom.focus()}connectedCallback(){super.connectedCallback(),this.buttonSave.addEventListener("click",this.submit),this.inputRoom.addEventListener("input",this.handleInput),this.inputRoom.addEventListener("keydown",this.handleKeyDown)}handleInput(){this.buttonSave.disabled=!this.isValid()}handleKeyDown(e){"Enter"===e.key&&this.isValid()&&this.submit()}submit(){var e;this.close(),(null===(e=this.inputRoom.value)||void 0===e?void 0:e.trim())&&services_client.enter(this.inputRoom.value.trim(),this.inputPrivate.checked)}isValid(){return this.inputRoom.value.trim().length>=2&&this.inputRoom.value.trim().length<=32}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=d[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_child],r=[bind],l=[bind],c=[bind],pv_new_room_esDecorate(e,null,a,{kind:"accessor",name:"inputRoom",static:!1,private:!1,access:{has:e=>"inputRoom"in e,get:e=>e.inputRoom,set:(e,t)=>{e.inputRoom=t}},metadata:i},u,p),pv_new_room_esDecorate(e,null,s,{kind:"accessor",name:"inputPrivate",static:!1,private:!1,access:{has:e=>"inputPrivate"in e,get:e=>e.inputPrivate,set:(e,t)=>{e.inputPrivate=t}},metadata:i},v,p),pv_new_room_esDecorate(e,null,n,{kind:"accessor",name:"buttonSave",static:!1,private:!1,access:{has:e=>"buttonSave"in e,get:e=>e.buttonSave,set:(e,t)=>{e.buttonSave=t}},metadata:i},h,p),pv_new_room_esDecorate(e,null,r,{kind:"method",name:"handleInput",static:!1,private:!1,access:{has:e=>"handleInput"in e,get:e=>e.handleInput},metadata:i},null,p),pv_new_room_esDecorate(e,null,l,{kind:"method",name:"handleKeyDown",static:!1,private:!1,access:{has:e=>"handleKeyDown"in e,get:e=>e.handleKeyDown},metadata:i},null,p),pv_new_room_esDecorate(e,null,c,{kind:"method",name:"submit",static:!1,private:!1,access:{has:e=>"submit"in e,get:e=>e.submit},metadata:i},null,p),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_new_room_pv_new_room=PvNewRoom;var role_Role;customElements.define("pv-new-room",PvNewRoom),function(e){e[e.USER=0]="USER",e[e.MODERATOR=1]="MODERATOR",e[e.DEVELOPER=2]="DEVELOPER"}(role_Role||(role_Role={}));const role=role_Role;var __awaiter=function(e,t,i,o){return new(i||(i=Promise))((function(a,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function r(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,r)}l((o=o.apply(e,t||[])).next())}))};class AudioEngine extends(events_default()){constructor(){super(),this.volume=100,this.ctx=new AudioContext({latencyHint:"interactive"}),this.sounds=new Map,this.currentlyPlaying=new Map;const e=new GainNode(this.ctx);e.gain.value=Math.min(this.volume/100,1),e.connect(this.ctx.destination),this.limiter=new DynamicsCompressorNode(this.ctx),this.limiter.threshold.value=-10,this.limiter.knee.value=5,this.limiter.ratio.value=20,this.limiter.attack.value=0,this.limiter.release.value=.1,this.limiter.connect(e),settingsmanager.on("volume",(t=>{this.volume=t,e.gain.value=Math.min(this.volume/100,1)}))}load(e,t){return __awaiter(this,void 0,void 0,(function*(){const i=yield fetch(t),o=yield i.arrayBuffer(),a=yield this.ctx.decodeAudioData(o);return this.sounds.set(e,a),e}))}unload(e){return __awaiter(this,void 0,void 0,(function*(){this.sounds.delete(e)}))}play(e,t){t>127&&(t=127);const i=this.ctx.currentTime,o=new AudioBufferSourceNode(this.ctx,{buffer:this.sounds.get(e)}),a=new GainNode(this.ctx,{gain:t/127}),s=new StereoPannerNode(this.ctx,{pan:(Number(e)-21)/87-.5});if(o.connect(a),a.connect(s),s.connect(this.limiter),o.start(),this.currentlyPlaying.has(e)){const t=this.currentlyPlaying.get(e);t.gain.gain.setValueAtTime(t.gain.gain.value,0),t.gain.gain.linearRampToValueAtTime(0,i+.2),t.source.stop(i+.21)}this.currentlyPlaying.set(e,{source:o,gain:a})}stop(e){const t=this.ctx.currentTime;if(this.currentlyPlaying.has(e)){const i=this.currentlyPlaying.get(e);i.gain.gain.setValueAtTime(i.gain.gain.value,t),i.gain.gain.linearRampToValueAtTime(.1*i.gain.gain.value,t+.16),i.gain.gain.linearRampToValueAtTime(0,t+.4),i.source.stop(t+.41),this.currentlyPlaying.delete(e)}}}const audio=new AudioEngine,audioengine=audio;var midi_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},midi_awaiter=function(e,t,i,o){return new(i||(i=Promise))((function(a,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function r(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,r)}l((o=o.apply(e,t||[])).next())}))},MIDICommand;!function(e){e[e.NOTE_OFF=128]="NOTE_OFF",e[e.NOTE_ON=144]="NOTE_ON",e[e.AFTER_TOUCH=160]="AFTER_TOUCH",e[e.CONTROL_CHANGE=176]="CONTROL_CHANGE",e[e.PATCH_CHANGE=192]="PATCH_CHANGE",e[e.CHANNEL_PRESSURE=208]="CHANNEL_PRESSURE",e[e.PITCH_BEND=224]="PITCH_BEND",e[e.SYSTEM_EXCLUSIVE=240]="SYSTEM_EXCLUSIVE"}(MIDICommand||(MIDICommand={}));let MIDIManager=(()=>{var e;let t,i=events_default(),o=[];return e=class extends i{constructor(){super(),this.access=void midi_runInitializers(this,o),this.outputIds=new Set,this.pressed={},this.offset=0,this.devices=new Map,this.init(),settingsmanager.on("transpose",(e=>this.offset=e))}registerDevice(e){this.devices.has(e.name)?"input"===e.type?this.devices.get(e.name).in=e:this.devices.get(e.name).out=e:this.devices.set(e.name,{name:e.name.trim(),in:"input"===e.type?e:null,out:"output"===e.type?e:null})}unregisterDevice(e){this.devices.has(e.name)&&("input"===e.type?this.devices.get(e.name).in=null:this.devices.get(e.name).out=null,null===this.devices.get(e.name).in&&null===this.devices.get(e.name).out&&this.devices.delete(e.name))}init(){return midi_awaiter(this,void 0,void 0,(function*(){try{this.access=yield navigator.requestMIDIAccess({sysex:!1,software:!1}),this.access.onstatechange=e=>{e instanceof MIDIConnectionEvent&&this.handleConnectionEvent(e.port)},this.access.inputs.forEach((e=>{this.registerDevice(e),this.enableInput(e.id)})),this.access.outputs.forEach((e=>{this.registerDevice(e),this.disableOutput(e.id)})),this.emit("update")}catch(e){}}))}handleConnectionEvent(e){"connected"===e.state?"input"===e.type?this.devices.has(e.name)?this.registerDevice(e):(this.registerDevice(e),this.enableInput(e.id),NotificationManager.success("Connected to a MIDI device",e.name,10)):this.registerDevice(e):this.unregisterDevice(e),this.emit("update")}onMidiInput(e){if(9==(15&e.data[0]))return;const t=e.data[0]>>4,i=e.data[1];8==t||9==t&&0==e.data[2]?(services_keyboard.release(this.pressed[i],void 0,!0),delete this.pressed[i]):9==t?(this.pressed[i]=i+this.offset,services_keyboard.press(i+this.offset,e.data[2],void 0,!0)):11==t&&64==i&&settingsmanager.set("sustain",e.data[2]>63)}isInputEnabled(e){var t;let i=!1;return null===(t=this.devices)||void 0===t||t.forEach((t=>{t.in&&t.in.id===e&&null!=t.in.onmidimessage&&(i=!0)})),i}enableInput(e){var t;null===(t=this.devices)||void 0===t||t.forEach((t=>{t.in&&t.in.id===e&&(t.in.onmidimessage=this.onMidiInput)}))}disableInput(e){var t;null===(t=this.devices)||void 0===t||t.forEach((t=>{t.in&&t.in.id===e&&(t.in.onmidimessage=null)}))}sendNoteOn(e,t){var i;null===(i=this.devices)||void 0===i||i.forEach((i=>{i.out&&this.outputIds.has(i.out.id)&&i.out.send([MIDICommand.NOTE_ON,e,Math.min(t,127)])}))}sendNoteOff(e){var t;null===(t=this.devices)||void 0===t||t.forEach((t=>{t.out&&this.outputIds.has(t.out.id)&&t.out.send([MIDICommand.NOTE_OFF,e,0])}))}sendSustain(e){var t;null===(t=this.devices)||void 0===t||t.forEach((t=>{t.out&&this.outputIds.has(t.out.id)&&t.out.send([MIDICommand.CONTROL_CHANGE,64,e?127:0])}))}isOutputEnabled(e){return this.outputIds.has(e)}enableOutput(e){this.outputIds.add(e)}disableOutput(e){this.outputIds.delete(e)}},(()=>{var a;const s="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(a=i[Symbol.metadata])&&void 0!==a?a:null):void 0;t=[bind],midi_esDecorate(e,null,t,{kind:"method",name:"onMidiInput",static:!1,private:!1,access:{has:e=>"onMidiInput"in e,get:e=>e.onMidiInput},metadata:s},null,o),s&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})})(),e})();const midi=new MIDIManager,services_midi=midi,layout={65:44,90:45,83:46,88:47,67:48,70:49,86:50,71:51,66:52,78:53,74:54,77:55,75:56,188:57,76:58,190:59,59:59,191:60,222:61,49:56,81:57,50:58,87:59,69:60,52:61,82:62,53:63,84:64,89:65,55:66,85:67,56:68,73:69,57:70,79:71,80:72,189:73,173:73,219:74,169:74,187:75,61:75,221:76,160:76},multiplayer_piano=layout,virtual_piano_layout={49:36,50:38,51:40,52:41,53:43,54:45,55:47,56:48,57:50,48:52,81:53,87:55,69:57,82:59,84:60,89:62,85:64,73:65,79:67,80:69,65:71,83:72,68:74,70:76,71:77,72:79,74:81,75:83,76:84,90:86,88:88,67:89,86:91,66:93,78:95,77:96},virtual_piano=virtual_piano_layout,pianoverse_layout={Backquote:54,Digit1:56,Digit2:58,Digit4:61,Digit5:63,Digit7:66,Digit8:68,Digit9:70,Minus:73,Equal:75,KeyQ:57,KeyW:59,KeyE:60,KeyR:62,KeyT:64,KeyY:65,KeyU:67,KeyI:69,KeyO:71,KeyP:72,BracketLeft:74,BracketRight:76,KeyA:44,KeyS:46,KeyF:49,KeyG:51,KeyJ:54,KeyK:56,KeyL:58,Quote:61,Backslash:63,IntlBackslash:43,KeyZ:45,KeyX:47,KeyC:48,KeyV:50,KeyB:52,KeyN:53,KeyM:55,Comma:57,Period:59,Slash:60},pianoverse=pianoverse_layout,info_namespaceObject=JSON.parse('{"H":["a-1","as-1","b-1","c0","cs0","d0","ds0","e0","f0","fs0","g0","gs0","a0","as0","b0","c1","cs1","d1","ds1","e1","f1","fs1","g1","gs1","a1","as1","b1","c2","cs2","d2","ds2","e2","f2","fs2","g2","gs2","a2","as2","b2","c3","cs3","d3","ds3","e3","f3","fs3","g3","gs3","a3","as3","b3","c4","cs4","d4","ds4","e4","f4","fs4","g4","gs4","a4","as4","b4","c5","cs5","d5","ds5","e5","f5","fs5","g5","gs5","a5","as5","b5","c6","cs6","d6","ds6","e6","f6","fs6","g6","gs6","a6","as6","b6","c7"]}');var layout_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0};let offset=0,vel=109,LayoutManager=(()=>{var e;let t,i,o=events_default(),a=[];return e=class extends o{constructor(){super(),this.layout=void layout_runInitializers(this,a),this.layout=new PianoverseLayout,settingsmanager.on("keyboardLayout",(e=>{switch(e){case"pianoverse":this.layout=new PianoverseLayout;break;case"multiplayerpiano":this.layout=new MultiplayerPianoLayout;break;case"virtualpiano":this.layout=new VirtualPianoLayout}})),settingsmanager.on("transpose",(e=>offset=e)),settingsmanager.on("velocity",(e=>vel=e)),document.addEventListener("keydown",(t=>{if(!t.repeat&&!t.metaKey){switch(t.code){case"NumpadAdd":return this.velocity(Math.max(e.MIN_VELOCITY,Math.min(e.MAX_VELOCITY,vel+9))),void t.preventDefault();case"NumpadSubtract":return this.velocity(Math.max(e.MIN_VELOCITY,Math.min(e.MAX_VELOCITY,vel-9))),void t.preventDefault();case"ArrowDown":return this.transpose(-12),void t.preventDefault();case"ArrowLeft":return this.transpose(-1),void t.preventDefault();case"ArrowRight":return this.transpose(1),void t.preventDefault();case"ArrowUp":return this.transpose(12),void t.preventDefault();case"Backspace":return void settingsmanager.set("sustain",!settingsmanager.get("sustain"));case"Space":return settingsmanager.set("sustain",!0),void t.preventDefault()}this.handleKeydown(t)}})),document.addEventListener("keyup",(e=>{e.repeat||e.metaKey||("Space"!==e.code?this.handleKeyup(e):settingsmanager.set("sustain",!1))}))}transpose(t){offset+t>=e.MIN_TRANSPOSE&&offset+t<=e.MAX_TRANSPOSE&&(offset+=t),settingsmanager.set("transpose",offset)}velocity(t){t>=e.MIN_VELOCITY&&t<=e.MAX_VELOCITY&&(vel=t),settingsmanager.set("velocity",vel)}handleKeydown(e){this.layout.handleKeydown(e)}handleKeyup(e){this.layout.handleKeyup(e)}},(()=>{var s;const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(s=o[Symbol.metadata])&&void 0!==s?s:null):void 0;t=[bind],i=[bind],layout_esDecorate(e,null,t,{kind:"method",name:"handleKeydown",static:!1,private:!1,access:{has:e=>"handleKeydown"in e,get:e=>e.handleKeydown},metadata:n},null,a),layout_esDecorate(e,null,i,{kind:"method",name:"handleKeyup",static:!1,private:!1,access:{has:e=>"handleKeyup"in e,get:e=>e.handleKeyup},metadata:n},null,a),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e.MIN_TRANSPOSE=-36,e.MAX_TRANSPOSE=36,e.MIN_VELOCITY=1,e.MAX_VELOCITY=127,e})();class PianoverseLayout{constructor(){this.pressed={},this.caps=!1}handleKeydown(e){"CapsLock"===e.code&&(this.caps=!0);const t=e.ctrlKey||this.caps?-12:e.shiftKey?12:0,i=pianoverse[e.code]+t+offset;isNaN(i)||i<21||i>108||i&&!this.pressed[e.code]&&(services_keyboard.press(i,vel),this.pressed[e.code]=i)}handleKeyup(e){"CapsLock"===e.code&&(this.caps=!1),this.pressed[e.code]&&(services_keyboard.release(this.pressed[e.code]),delete this.pressed[e.code])}}class MultiplayerPianoLayout{constructor(){this.pressed={},this.caps=!1}handleKeydown(e){let t=0;"CapsLock"===e.code&&(this.caps=!0),e.altKey?(t=24,e.preventDefault()):e.ctrlKey||this.caps?t=-12:e.shiftKey&&(t=12);const i=multiplayer_piano[e.keyCode]+t+offset;isNaN(i)||i<21||i>108||i&&!this.pressed[e.keyCode]&&(services_keyboard.press(i,vel),this.pressed[e.keyCode]=i)}handleKeyup(e){"CapsLock"===e.code&&(this.caps=!1),this.pressed[e.keyCode]&&(services_keyboard.release(this.pressed[e.keyCode]),delete this.pressed[e.keyCode])}}class VirtualPianoLayout{constructor(){this.pressed={}}handleKeydown(e){var t;let i=virtual_piano[e.keyCode];e.shiftKey&&(null===(t=info_namespaceObject.H[i-20])||void 0===t?void 0:t.includes("s"))&&(i+=1),i+=offset,isNaN(i)||i<21||i>108||i&&!this.pressed[e.keyCode]&&(services_keyboard.press(i,vel),this.pressed[e.keyCode]=i)}handleKeyup(e){this.pressed[e.keyCode]&&(services_keyboard.release(this.pressed[e.keyCode]),delete this.pressed[e.keyCode])}}const layoutManager=new LayoutManager,services_layout=null;var keyboard_awaiter=function(e,t,i,o){return new(i||(i=Promise))((function(a,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function r(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,r)}l((o=o.apply(e,t||[])).next())}))};class KeyboardState extends events.EventEmitter{constructor(e){super(),this.audioEngine=e,this.mapSustain=new Map,this.mapPressed=new Map,this.mapSustained=new Map,services_client.on("press",(({key:e,vel:t,id:i})=>this.press(e,t,i))),services_client.on("release",(({key:e,id:t})=>this.release(e,t))),services_client.on("sustain",(({enabled:e,id:t})=>this.sustain(e,t))),services_client.on("welcome",(e=>{this.releaseAllNotes(),this.mapPressed.set(e.id,new Set),this.mapSustained.set(e.id,new Set),this.mapSustain.set(e.id,!!this.mapSustain.get(services_client.me.id))})),services_client.on("join",(e=>{this.mapPressed.set(e.id,new Set),this.mapSustained.set(e.id,new Set),this.mapSustain.set(e.id,!1)})),services_client.on("leave",(e=>{this.releaseAllNotesFrom(e.id),this.mapPressed.delete(e.id),this.mapSustained.delete(e.id),this.mapSustain.delete(e.id)})),settingsmanager.on("sustain",(e=>this.sustain(e,void 0,!0)))}load(e){const t=[];for(let i=21;i<=108;++i)t.push((()=>keyboard_awaiter(this,void 0,void 0,(function*(){yield this.audioEngine.load(i.toString(),`sounds/${e}/${i}.mp3`),this.emit("loaded",i)})))());Promise.all(t).catch((()=>{NotificationManager.error("Failed to load sounds","Reload the page to try again.")}))}press(e,t,i,o){var a,s;"Backrooms"!==services_client.room.id&&(this.audioEngine.play(e.toString(),t),o||services_midi.sendNoteOn(e,t),i||(i=services_client.me.id,services_client.press(e,t)),(null===(a=this.mapPressed.get(i))||void 0===a?void 0:a.has(e))&&this.emit("release",e),null===(s=this.mapPressed.get(i))||void 0===s||s.add(e),this.mapSustain.get(i)&&this.mapSustained.get(i).add(e),this.emit("press",e,t,i))}release(e,t,i){var o,a;"Backrooms"!==services_client.room.id&&(this.emit("release",e),t||(t=services_client.me.id,services_client.release(e)),null===(o=this.mapPressed.get(t))||void 0===o||o.delete(e),(null===(a=this.mapSustained.get(t))||void 0===a?void 0:a.has(e))||(this.audioEngine.stop(null==e?void 0:e.toString()),i||services_midi.sendNoteOff(e)))}sustain(e,t,i){var o,a;"Backrooms"!==services_client.room.id&&(t||(t=services_client.me.id,services_client.sustain(e)),this.mapSustain.set(t,e),i&&services_midi.sendSustain(e),e?null===(o=this.mapPressed.get(t))||void 0===o||o.forEach((e=>{var i;return null===(i=this.mapSustained.get(t))||void 0===i?void 0:i.add(e)})):(null===(a=this.mapSustained.get(t))||void 0===a||a.forEach((e=>{var i,o;(null===(i=this.mapPressed.get(t))||void 0===i?void 0:i.has(e))||(null===(o=this.mapSustained.get(t))||void 0===o||o.delete(e),this.release(e,t))})),this.mapSustained.set(t,new Set)))}releaseAllNotes(){for(const[e,t]of this.mapPressed.entries())t.forEach((t=>this.release(t,e)))}releaseAllMyNotes(){this.releaseAllNotesFrom(services_client.me.id)}releaseAllNotesFrom(e){this.mapSustained.set(e,new Set);for(const t of this.mapPressed.get(e))this.release(t,e);for(const t of this.mapSustained.get(e))this.release(t,e)}isSustainEnabled(){return this.mapSustain.get(services_client.me.id)}}KeyboardState.TRANSPOSE_MIN=-36,KeyboardState.TRANSPOSE_MAX=36;const keyboard=new KeyboardState(audioengine),services_keyboard=keyboard;var pv_actions_code='
      ID: ########
      Promote
      Demote
      Make host
      Mute notes
      Muted notes
      Mute chat
      Muted chat
      Kick
      Ban
      Ban IP
      ';const pv_actions=pv_actions_code;var pv_actions_pv_actions=__webpack_require__(7966),pv_actions_options={};pv_actions_options.styleTagTransform=styleTagTransform_default(),pv_actions_options.setAttributes=setAttributesWithoutAttributes_default(),pv_actions_options.insert=insertBySelector_default().bind(null,"head"),pv_actions_options.domAPI=styleDomAPI_default(),pv_actions_options.insertStyleElement=insertStyleElement_default();var pv_actions_update=injectStylesIntoStyleTag_default()(pv_actions_pv_actions.A,pv_actions_options);const popups_pv_actions_pv_actions=pv_actions_pv_actions.A&&pv_actions_pv_actions.A.locals?pv_actions_pv_actions.A.locals:void 0;var pv_actions_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_actions_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a,s,n,r,l,c,d,p;let u,v,h,m,f,_,g,b,y,w,k,x,E,S,P,T,I,C,O,A,M,N,L=components_pv_popup_pv_popup,D=[],R=[],j=[],F=[],z=[],B=[],U=[],W=[],G=[],K=[],V=[],H=[];return e=class extends L{get mod(){return pv_actions_classPrivateFieldGet(this,t,"f")}set mod(e){pv_actions_classPrivateFieldSet(this,t,e,"f")}get unmod(){return pv_actions_classPrivateFieldGet(this,i,"f")}set unmod(e){pv_actions_classPrivateFieldSet(this,i,e,"f")}get muteNotes(){return pv_actions_classPrivateFieldGet(this,o,"f")}set muteNotes(e){pv_actions_classPrivateFieldSet(this,o,e,"f")}get unmuteNotes(){return pv_actions_classPrivateFieldGet(this,a,"f")}set unmuteNotes(e){pv_actions_classPrivateFieldSet(this,a,e,"f")}get muteChat(){return pv_actions_classPrivateFieldGet(this,s,"f")}set muteChat(e){pv_actions_classPrivateFieldSet(this,s,e,"f")}get unmuteChat(){return pv_actions_classPrivateFieldGet(this,n,"f")}set unmuteChat(e){pv_actions_classPrivateFieldSet(this,n,e,"f")}get chown(){return pv_actions_classPrivateFieldGet(this,r,"f")}set chown(e){pv_actions_classPrivateFieldSet(this,r,e,"f")}get kick(){return pv_actions_classPrivateFieldGet(this,l,"f")}set kick(e){pv_actions_classPrivateFieldSet(this,l,e,"f")}get ban(){return pv_actions_classPrivateFieldGet(this,c,"f")}set ban(e){pv_actions_classPrivateFieldSet(this,c,e,"f")}get banip(){return pv_actions_classPrivateFieldGet(this,d,"f")}set banip(e){pv_actions_classPrivateFieldSet(this,d,e,"f")}get userid(){return pv_actions_classPrivateFieldGet(this,p,"f")}set userid(e){pv_actions_classPrivateFieldSet(this,p,e,"f")}constructor(){super(),t.set(this,(pv_actions_runInitializers(this,D),pv_actions_runInitializers(this,R,void 0))),i.set(this,pv_actions_runInitializers(this,j,void 0)),o.set(this,pv_actions_runInitializers(this,F,void 0)),a.set(this,pv_actions_runInitializers(this,z,void 0)),s.set(this,pv_actions_runInitializers(this,B,void 0)),n.set(this,pv_actions_runInitializers(this,U,void 0)),r.set(this,pv_actions_runInitializers(this,W,void 0)),l.set(this,pv_actions_runInitializers(this,G,void 0)),c.set(this,pv_actions_runInitializers(this,K,void 0)),d.set(this,pv_actions_runInitializers(this,V,void 0)),p.set(this,pv_actions_runInitializers(this,H,void 0)),this.innerHTML=pv_actions,services_client.once("leave",this.onLeave)}onOpen(e){this.contextId=e,this.mod.addEventListener("click",this.onMod),this.unmod.addEventListener("click",this.onUnmod),this.chown.addEventListener("click",this.onChown),this.muteNotes.addEventListener("click",this.onMuteNotes),this.unmuteNotes.addEventListener("click",this.onUnmuteNotes),this.muteChat.addEventListener("click",this.onMuteChat),this.unmuteChat.addEventListener("click",this.onUnmuteChat),this.kick.addEventListener("click",this.onKick),this.ban.addEventListener("click",this.onBan),this.banip.addEventListener("click",this.onBanIP),this.userid.innerText=`ID: ${e}`,this.querySelector(".content").style.color=`color-mix(in hsl, var(--color-white) 50%, ${services_client.get(e).color})`,this.querySelector(".content").style.background=`linear-gradient(135deg, ${services_client.get(e).color}55, ${services_client.get(e).color}40)`,e===services_client.room.owner||services_client.me.id!==services_client.room.owner&&services_client.me.role!==role.DEVELOPER||"Lobby"===services_client.room.id?this.chown.style.display="none":this.chown.style.display="block",services_client.me.role===role.DEVELOPER?(this.banip.style.display="block",services_client.get(e).role===role.MODERATOR?(this.mod.style.display="none",this.unmod.style.display="block"):(this.mod.style.display="block",this.unmod.style.display="none")):(this.banip.style.display="none",this.mod.style.display="none",this.unmod.style.display="none"),services_client.get(e).muted?(this.unmuteNotes.style.display="block",this.muteNotes.style.display="none"):(this.unmuteNotes.style.display="none",this.muteNotes.style.display="block"),services_client.get(e).mutedChat?(this.unmuteChat.style.display="block",this.muteChat.style.display="none"):(this.unmuteChat.style.display="none",this.muteChat.style.display="block");const t=services_client.me.id===services_client.room.owner,i=services_client.me.role===role.MODERATOR||services_client.me.role===role.DEVELOPER;t&&services_client.me.role>=services_client.get(e).role||i&&services_client.me.role>services_client.get(e).role?(this.kick.style.display="block",this.ban.style.display="block"):(this.kick.style.display="none",this.ban.style.display="none")}onClose(){this.muteNotes.removeEventListener("click",this.onMuteNotes),this.kick.removeEventListener("click",this.onKick),services_client.off("leave",this.onLeave)}onMod(){services_client.mod(this.contextId),this.mod.style.display="none",this.unmod.style.display="block"}onUnmod(){services_client.unmod(this.contextId),this.mod.style.display="block",this.unmod.style.display="none"}onChown(){services_client.chown(this.contextId),this.close()}onMuteNotes(){var e;services_client.mute(this.contextId),setTimeout((()=>services_keyboard.releaseAllNotesFrom(this.contextId)),250),this.unmuteNotes.style.display="block",this.muteNotes.style.display="none",null===(e=document.querySelector("pv-users"))||void 0===e||e.initialize()}onUnmuteNotes(){var e;services_client.unmute(this.contextId),this.unmuteNotes.style.display="none",this.muteNotes.style.display="block",null===(e=document.querySelector("pv-users"))||void 0===e||e.initialize()}onMuteChat(){var e,t;services_client.get(this.contextId).mutedChat=!0,this.unmuteChat.style.display="block",this.muteChat.style.display="none",null===(e=document.querySelector("pv-users"))||void 0===e||e.initialize(),null===(t=document.querySelector("pv-chat"))||void 0===t||t.updateMutedMessages()}onUnmuteChat(){var e,t;services_client.get(this.contextId).mutedChat=!1,this.unmuteChat.style.display="none",this.muteChat.style.display="block",null===(e=document.querySelector("pv-users"))||void 0===e||e.initialize(),null===(t=document.querySelector("pv-chat"))||void 0===t||t.updateMutedMessages()}onKick(){services_client.kick(this.contextId),this.close()}onBan(){PopupManager.open(Modal.BAN,null,this.contextId),this.close()}onBanIP(){services_client.ipban(this.contextId),this.close()}onLeave(e){e.id===this.contextId&&this.isOpen()&&this.close()}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,p=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=L[Symbol.metadata])&&void 0!==t?t:null):void 0;u=[decorators_child],v=[decorators_child],h=[decorators_child],m=[decorators_child],f=[decorators_child],_=[decorators_child],g=[decorators_child],b=[decorators_child],y=[decorators_child],w=[decorators_child],k=[decorators_child],x=[bind],E=[bind],S=[bind],P=[bind],T=[bind],I=[bind],C=[bind],O=[bind],A=[bind],M=[bind],N=[bind],pv_actions_esDecorate(e,null,u,{kind:"accessor",name:"mod",static:!1,private:!1,access:{has:e=>"mod"in e,get:e=>e.mod,set:(e,t)=>{e.mod=t}},metadata:i},R,D),pv_actions_esDecorate(e,null,v,{kind:"accessor",name:"unmod",static:!1,private:!1,access:{has:e=>"unmod"in e,get:e=>e.unmod,set:(e,t)=>{e.unmod=t}},metadata:i},j,D),pv_actions_esDecorate(e,null,h,{kind:"accessor",name:"muteNotes",static:!1,private:!1,access:{has:e=>"muteNotes"in e,get:e=>e.muteNotes,set:(e,t)=>{e.muteNotes=t}},metadata:i},F,D),pv_actions_esDecorate(e,null,m,{kind:"accessor",name:"unmuteNotes",static:!1,private:!1,access:{has:e=>"unmuteNotes"in e,get:e=>e.unmuteNotes,set:(e,t)=>{e.unmuteNotes=t}},metadata:i},z,D),pv_actions_esDecorate(e,null,f,{kind:"accessor",name:"muteChat",static:!1,private:!1,access:{has:e=>"muteChat"in e,get:e=>e.muteChat,set:(e,t)=>{e.muteChat=t}},metadata:i},B,D),pv_actions_esDecorate(e,null,_,{kind:"accessor",name:"unmuteChat",static:!1,private:!1,access:{has:e=>"unmuteChat"in e,get:e=>e.unmuteChat,set:(e,t)=>{e.unmuteChat=t}},metadata:i},U,D),pv_actions_esDecorate(e,null,g,{kind:"accessor",name:"chown",static:!1,private:!1,access:{has:e=>"chown"in e,get:e=>e.chown,set:(e,t)=>{e.chown=t}},metadata:i},W,D),pv_actions_esDecorate(e,null,b,{kind:"accessor",name:"kick",static:!1,private:!1,access:{has:e=>"kick"in e,get:e=>e.kick,set:(e,t)=>{e.kick=t}},metadata:i},G,D),pv_actions_esDecorate(e,null,y,{kind:"accessor",name:"ban",static:!1,private:!1,access:{has:e=>"ban"in e,get:e=>e.ban,set:(e,t)=>{e.ban=t}},metadata:i},K,D),pv_actions_esDecorate(e,null,w,{kind:"accessor",name:"banip",static:!1,private:!1,access:{has:e=>"banip"in e,get:e=>e.banip,set:(e,t)=>{e.banip=t}},metadata:i},V,D),pv_actions_esDecorate(e,null,k,{kind:"accessor",name:"userid",static:!1,private:!1,access:{has:e=>"userid"in e,get:e=>e.userid,set:(e,t)=>{e.userid=t}},metadata:i},H,D),pv_actions_esDecorate(e,null,x,{kind:"method",name:"onMod",static:!1,private:!1,access:{has:e=>"onMod"in e,get:e=>e.onMod},metadata:i},null,D),pv_actions_esDecorate(e,null,E,{kind:"method",name:"onUnmod",static:!1,private:!1,access:{has:e=>"onUnmod"in e,get:e=>e.onUnmod},metadata:i},null,D),pv_actions_esDecorate(e,null,S,{kind:"method",name:"onChown",static:!1,private:!1,access:{has:e=>"onChown"in e,get:e=>e.onChown},metadata:i},null,D),pv_actions_esDecorate(e,null,P,{kind:"method",name:"onMuteNotes",static:!1,private:!1,access:{has:e=>"onMuteNotes"in e,get:e=>e.onMuteNotes},metadata:i},null,D),pv_actions_esDecorate(e,null,T,{kind:"method",name:"onUnmuteNotes",static:!1,private:!1,access:{has:e=>"onUnmuteNotes"in e,get:e=>e.onUnmuteNotes},metadata:i},null,D),pv_actions_esDecorate(e,null,I,{kind:"method",name:"onMuteChat",static:!1,private:!1,access:{has:e=>"onMuteChat"in e,get:e=>e.onMuteChat},metadata:i},null,D),pv_actions_esDecorate(e,null,C,{kind:"method",name:"onUnmuteChat",static:!1,private:!1,access:{has:e=>"onUnmuteChat"in e,get:e=>e.onUnmuteChat},metadata:i},null,D),pv_actions_esDecorate(e,null,O,{kind:"method",name:"onKick",static:!1,private:!1,access:{has:e=>"onKick"in e,get:e=>e.onKick},metadata:i},null,D),pv_actions_esDecorate(e,null,A,{kind:"method",name:"onBan",static:!1,private:!1,access:{has:e=>"onBan"in e,get:e=>e.onBan},metadata:i},null,D),pv_actions_esDecorate(e,null,M,{kind:"method",name:"onBanIP",static:!1,private:!1,access:{has:e=>"onBanIP"in e,get:e=>e.onBanIP},metadata:i},null,D),pv_actions_esDecorate(e,null,N,{kind:"method",name:"onLeave",static:!1,private:!1,access:{has:e=>"onLeave"in e,get:e=>e.onLeave},metadata:i},null,D),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_actions_pv_actions=PvActions;customElements.define("pv-actions",PvActions);var pv_devices_code='
      Name In Out
      ';const pv_devices=pv_devices_code;var pv_devices_pv_devices=__webpack_require__(6138),pv_devices_options={};pv_devices_options.styleTagTransform=styleTagTransform_default(),pv_devices_options.setAttributes=setAttributesWithoutAttributes_default(),pv_devices_options.insert=insertBySelector_default().bind(null,"head"),pv_devices_options.domAPI=styleDomAPI_default(),pv_devices_options.insertStyleElement=insertStyleElement_default();var pv_devices_update=injectStylesIntoStyleTag_default()(pv_devices_pv_devices.A,pv_devices_options);const popups_pv_devices_pv_devices=pv_devices_pv_devices.A&&pv_devices_pv_devices.A.locals?pv_devices_pv_devices.A.locals:void 0;var pv_devices_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_devices_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o,a=components_pv_popup_pv_popup,s=[],n=[];return e=class extends a{get devices(){return pv_devices_classPrivateFieldGet(this,t,"f")}set devices(e){pv_devices_classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(pv_devices_runInitializers(this,s),pv_devices_runInitializers(this,n,void 0))),this.innerHTML=pv_devices}connectedCallback(){super.connectedCallback(),services_midi.on("update",this.updateDevices),this.updateDevices()}disconnectedCallback(){services_midi.off("update",this.updateDevices)}updateDevices(){this.devices.innerHTML="";for(const e of services_midi.devices.values()){const t=document.createElement("tr"),i=document.createElement("td"),o=document.createElement("td"),a=document.createElement("td");if(i.textContent=e.name,i.title=e.name,t.append(i),e.in){const t=document.createElement("div");t.classList.add("field");const i=document.createElement("label");i.classList.add("toggle");const a=document.createElement("input");a.type="checkbox",a.checked=services_midi.isInputEnabled(e.in.id);const s=document.createElement("span");s.classList.add("slider"),s.addEventListener("click",(()=>{services_midi.isInputEnabled(e.in.id)?(services_midi.disableInput(e.in.id),services_keyboard.releaseAllMyNotes(),a.checked=!0):(services_midi.enableInput(e.in.id),a.checked=!1)})),i.append(a),i.append(s),t.append(i),o.append(t)}if(e.out){const t=document.createElement("div");t.classList.add("field");const i=document.createElement("label");i.classList.add("toggle");const o=document.createElement("input");o.type="checkbox",o.checked=services_midi.isOutputEnabled(e.out.id);const s=document.createElement("span");s.classList.add("slider"),s.addEventListener("click",(()=>{services_midi.isOutputEnabled(e.out.id)?(services_midi.disableOutput(e.out.id),services_keyboard.releaseAllMyNotes(),o.checked=!0):(services_midi.enableOutput(e.out.id),o.checked=!1)})),i.append(o),i.append(s),t.append(i),a.append(t)}t.append(o),t.append(a),this.devices.append(t)}if(0===services_midi.devices.size){const e=document.createElement("tr"),t=document.createElement("td"),i=document.createElement("td"),o=document.createElement("td");t.textContent="None",t.classList.add("muted"),e.append(t);{const e=document.createElement("div");e.classList.add("field");const t=document.createElement("label");t.classList.add("toggle");const o=document.createElement("input");o.type="checkbox",o.checked=!1,o.disabled=!0;const a=document.createElement("span");a.classList.add("slider"),t.append(o),t.append(a),e.append(t),i.append(e)}{const e=document.createElement("div");e.classList.add("field");const t=document.createElement("label");t.classList.add("toggle");const i=document.createElement("input");i.type="checkbox",i.checked=!1,i.disabled=!0;const a=document.createElement("span");a.classList.add("slider"),t.append(i),t.append(a),e.append(t),o.append(e)}e.append(i),e.append(o),this.devices.append(e)}}},t=new WeakMap,(()=>{var t;const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=a[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],o=[bind],pv_devices_esDecorate(e,null,i,{kind:"accessor",name:"devices",static:!1,private:!1,access:{has:e=>"devices"in e,get:e=>e.devices,set:(e,t)=>{e.devices=t}},metadata:r},n,s),pv_devices_esDecorate(e,null,o,{kind:"method",name:"updateDevices",static:!1,private:!1,access:{has:e=>"updateDevices"in e,get:e=>e.updateDevices},metadata:r},null,s),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();const components_popups_pv_devices_pv_devices=PvDevices;customElements.define("pv-devices",PvDevices);var pv_message_code='
      Information
      ';const pv_message=pv_message_code;var pv_message_pv_message=__webpack_require__(9114),pv_message_options={};pv_message_options.styleTagTransform=styleTagTransform_default(),pv_message_options.setAttributes=setAttributesWithoutAttributes_default(),pv_message_options.insert=insertBySelector_default().bind(null,"head"),pv_message_options.domAPI=styleDomAPI_default(),pv_message_options.insertStyleElement=insertStyleElement_default();var pv_message_update=injectStylesIntoStyleTag_default()(pv_message_pv_message.A,pv_message_options);const popups_pv_message_pv_message=pv_message_pv_message.A&&pv_message_pv_message.A.locals?pv_message_pv_message.A.locals:void 0;var pv_message_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_message_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s=components_pv_popup_pv_popup,n=[],r=[],l=[];return e=class extends s{get message(){return pv_message_classPrivateFieldGet(this,t,"f")}set message(e){pv_message_classPrivateFieldSet(this,t,e,"f")}get closeButton(){return pv_message_classPrivateFieldGet(this,i,"f")}set closeButton(e){pv_message_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_message_runInitializers(this,n),pv_message_runInitializers(this,r,void 0))),i.set(this,pv_message_runInitializers(this,l,void 0)),this.innerHTML=pv_message}onOpen(e){this.message.textContent=e,this.closeButton.addEventListener("click",this.close)}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=s[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],pv_message_esDecorate(e,null,o,{kind:"accessor",name:"message",static:!1,private:!1,access:{has:e=>"message"in e,get:e=>e.message,set:(e,t)=>{e.message=t}},metadata:i},r,n),pv_message_esDecorate(e,null,a,{kind:"accessor",name:"closeButton",static:!1,private:!1,access:{has:e=>"closeButton"in e,get:e=>e.closeButton,set:(e,t)=>{e.closeButton=t}},metadata:i},l,n),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_message_pv_message=PvMessage;customElements.define("pv-message",PvMessage);var pv_profile_code='
      My profile
      ';const pv_profile=pv_profile_code;var pv_profile_pv_profile=__webpack_require__(8394),pv_profile_options={};pv_profile_options.styleTagTransform=styleTagTransform_default(),pv_profile_options.setAttributes=setAttributesWithoutAttributes_default(),pv_profile_options.insert=insertBySelector_default().bind(null,"head"),pv_profile_options.domAPI=styleDomAPI_default(),pv_profile_options.insertStyleElement=insertStyleElement_default();var pv_profile_update=injectStylesIntoStyleTag_default()(pv_profile_pv_profile.A,pv_profile_options);const popups_pv_profile_pv_profile=pv_profile_pv_profile.A&&pv_profile_pv_profile.A.locals?pv_profile_pv_profile.A.locals:void 0;var pv_profile_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_profile_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a,s;let n,r,l,c,d,p,u,v,h,m,f=components_pv_popup_pv_popup,_=[],g=[],b=[],y=[],w=[],k=[];return e=class extends f{get inputId(){return pv_profile_classPrivateFieldGet(this,t,"f")}set inputId(e){pv_profile_classPrivateFieldSet(this,t,e,"f")}get inputUsername(){return pv_profile_classPrivateFieldGet(this,i,"f")}set inputUsername(e){pv_profile_classPrivateFieldSet(this,i,e,"f")}get inputColorText(){return pv_profile_classPrivateFieldGet(this,o,"f")}set inputColorText(e){pv_profile_classPrivateFieldSet(this,o,e,"f")}get inputColor(){return pv_profile_classPrivateFieldGet(this,a,"f")}set inputColor(e){pv_profile_classPrivateFieldSet(this,a,e,"f")}get buttonSave(){return pv_profile_classPrivateFieldGet(this,s,"f")}set buttonSave(e){pv_profile_classPrivateFieldSet(this,s,e,"f")}constructor(){super(),t.set(this,(pv_profile_runInitializers(this,_),pv_profile_runInitializers(this,g,void 0))),i.set(this,pv_profile_runInitializers(this,b,void 0)),o.set(this,pv_profile_runInitializers(this,y,void 0)),a.set(this,pv_profile_runInitializers(this,w,void 0)),s.set(this,pv_profile_runInitializers(this,k,void 0)),this.innerHTML=pv_profile}onOpen(){this.inputId.value=services_client.me.id,this.inputUsername.value=services_client.me.name,this.inputColor.value=services_client.me.color,this.inputColorText.value=services_client.me.color.toUpperCase(),this.inputUsername.focus()}connectedCallback(){super.connectedCallback(),this.buttonSave.addEventListener("click",this.submit),this.inputUsername.addEventListener("input",this.handleInput),this.inputUsername.addEventListener("keydown",this.handleKeyDown),this.inputColorText.addEventListener("input",this.handleColorTextInput),this.inputColorText.addEventListener("keydown",this.handleKeyDown),this.inputColor.addEventListener("input",this.handleColorInput)}handleColorTextInput(){null!==this.inputColorText.value.match(/^#[0-9A-F]{6}$/i)?this.inputColor.value=this.inputColorText.value:this.inputColor.value="#000000",this.buttonSave.disabled=!this.isValid()}handleColorInput(){this.inputColorText.value=this.inputColor.value.toUpperCase(),this.buttonSave.disabled=!this.isValid()}handleInput(){this.buttonSave.disabled=!this.isValid()}handleKeyDown(e){"Enter"===e.key&&this.isValid()&&this.submit()}submit(){this.close(),services_client.profile(this.inputUsername.value,this.inputColor.value)}isValid(){return this.inputUsername.value.trim().length>=2&&this.inputUsername.value.trim().length<=24&&null!==this.inputColorText.value.match(/^#[0-9A-F]{6}$/i)}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=f[Symbol.metadata])&&void 0!==t?t:null):void 0;n=[decorators_child],r=[decorators_child],l=[decorators_child],c=[decorators_child],d=[decorators_child],p=[bind],u=[bind],v=[bind],h=[bind],m=[bind],pv_profile_esDecorate(e,null,n,{kind:"accessor",name:"inputId",static:!1,private:!1,access:{has:e=>"inputId"in e,get:e=>e.inputId,set:(e,t)=>{e.inputId=t}},metadata:i},g,_),pv_profile_esDecorate(e,null,r,{kind:"accessor",name:"inputUsername",static:!1,private:!1,access:{has:e=>"inputUsername"in e,get:e=>e.inputUsername,set:(e,t)=>{e.inputUsername=t}},metadata:i},b,_),pv_profile_esDecorate(e,null,l,{kind:"accessor",name:"inputColorText",static:!1,private:!1,access:{has:e=>"inputColorText"in e,get:e=>e.inputColorText,set:(e,t)=>{e.inputColorText=t}},metadata:i},y,_),pv_profile_esDecorate(e,null,c,{kind:"accessor",name:"inputColor",static:!1,private:!1,access:{has:e=>"inputColor"in e,get:e=>e.inputColor,set:(e,t)=>{e.inputColor=t}},metadata:i},w,_),pv_profile_esDecorate(e,null,d,{kind:"accessor",name:"buttonSave",static:!1,private:!1,access:{has:e=>"buttonSave"in e,get:e=>e.buttonSave,set:(e,t)=>{e.buttonSave=t}},metadata:i},k,_),pv_profile_esDecorate(e,null,p,{kind:"method",name:"handleColorTextInput",static:!1,private:!1,access:{has:e=>"handleColorTextInput"in e,get:e=>e.handleColorTextInput},metadata:i},null,_),pv_profile_esDecorate(e,null,u,{kind:"method",name:"handleColorInput",static:!1,private:!1,access:{has:e=>"handleColorInput"in e,get:e=>e.handleColorInput},metadata:i},null,_),pv_profile_esDecorate(e,null,v,{kind:"method",name:"handleInput",static:!1,private:!1,access:{has:e=>"handleInput"in e,get:e=>e.handleInput},metadata:i},null,_),pv_profile_esDecorate(e,null,h,{kind:"method",name:"handleKeyDown",static:!1,private:!1,access:{has:e=>"handleKeyDown"in e,get:e=>e.handleKeyDown},metadata:i},null,_),pv_profile_esDecorate(e,null,m,{kind:"method",name:"submit",static:!1,private:!1,access:{has:e=>"submit"in e,get:e=>e.submit},metadata:i},null,_),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_profile_pv_profile=PvProfile;customElements.define("pv-profile",PvProfile);var pv_sounds_code='
      Grand Piano
      Salamander Piano
      Soft Piano
      Electric Piano
      ';const pv_sounds=pv_sounds_code;var pv_sounds_pv_sounds=__webpack_require__(5500),pv_sounds_options={};pv_sounds_options.styleTagTransform=styleTagTransform_default(),pv_sounds_options.setAttributes=setAttributesWithoutAttributes_default(),pv_sounds_options.insert=insertBySelector_default().bind(null,"head"),pv_sounds_options.domAPI=styleDomAPI_default(),pv_sounds_options.insertStyleElement=insertStyleElement_default();var pv_sounds_update=injectStylesIntoStyleTag_default()(pv_sounds_pv_sounds.A,pv_sounds_options);const popups_pv_sounds_pv_sounds=pv_sounds_pv_sounds.A&&pv_sounds_pv_sounds.A.locals?pv_sounds_pv_sounds.A.locals:void 0;var pv_sounds_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_sounds_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o=components_pv_popup_pv_popup,a=[],s=[];return e=class extends o{get content(){return pv_sounds_classPrivateFieldGet(this,t,"f")}set content(e){pv_sounds_classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(pv_sounds_runInitializers(this,a),pv_sounds_runInitializers(this,s,void 0))),this.innerHTML=pv_sounds}onOpen(e){const t=settingsmanager.get("sound");t&&this.querySelector(`[value=${t}]`).setAttribute("selected",""),this.content.addEventListener("click",(e=>{const t=e.target;"DIV"===t.tagName&&t.getAttribute("value")&&(settingsmanager.set("sound",t.getAttribute("value")||""),this.close())}))}},t=new WeakMap,(()=>{var t;const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=o[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],pv_sounds_esDecorate(e,null,i,{kind:"accessor",name:"content",static:!1,private:!1,access:{has:e=>"content"in e,get:e=>e.content,set:(e,t)=>{e.content=t}},metadata:n},s,a),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e})();const components_popups_pv_sounds_pv_sounds=PvSounds;customElements.define("pv-sounds",PvSounds);var pv_rooms_code='
      ';const pv_rooms=pv_rooms_code;var pv_rooms_pv_rooms=__webpack_require__(5760),pv_rooms_options={};pv_rooms_options.styleTagTransform=styleTagTransform_default(),pv_rooms_options.setAttributes=setAttributesWithoutAttributes_default(),pv_rooms_options.insert=insertBySelector_default().bind(null,"head"),pv_rooms_options.domAPI=styleDomAPI_default(),pv_rooms_options.insertStyleElement=insertStyleElement_default();var pv_rooms_update=injectStylesIntoStyleTag_default()(pv_rooms_pv_rooms.A,pv_rooms_options);const popups_pv_rooms_pv_rooms=pv_rooms_pv_rooms.A&&pv_rooms_pv_rooms.A.locals?pv_rooms_pv_rooms.A.locals:void 0;var pv_rooms_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_rooms_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o=components_pv_popup_pv_popup,a=[],s=[];return e=class extends o{get content(){return pv_rooms_classPrivateFieldGet(this,t,"f")}set content(e){pv_rooms_classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(pv_rooms_runInitializers(this,a),pv_rooms_runInitializers(this,s,void 0))),this.innerHTML=pv_rooms}onOpen(e){this.updateRooms(e,!0),this.content.addEventListener("click",(e=>{const t=e.target;"DIV"===t.tagName&&(t.getAttribute("value")?services_client.enter(t.getAttribute("value")):PopupManager.open(Modal.NEW_ROOM),this.close())}))}updateRooms(e,t=!1){this.content.innerHTML=e.map((e=>`\n
      \n ${e.id}\n ${e.count}\n
      `)).reverse().join(""),this.content.innerHTML+=`\n
      \n New room...\n
      `}},t=new WeakMap,(()=>{var t;const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=o[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],pv_rooms_esDecorate(e,null,i,{kind:"accessor",name:"content",static:!1,private:!1,access:{has:e=>"content"in e,get:e=>e.content,set:(e,t)=>{e.content=t}},metadata:n},s,a),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e})();const components_popups_pv_rooms_pv_rooms=PvRooms;customElements.define("pv-rooms",PvRooms);const attr=(e,t)=>(pv_component.observedAttributes.push(t.name.toString()),{get(){return this.getAttribute(t.name)},set(e){this.setAttribute(t.name.toString(),e)}}),decorators_attr=attr;var pv_ban_code='
      Ban player
      Are you sure you want to ban this player from the room?
      ';const pv_ban=pv_ban_code;var pv_ban_pv_ban=__webpack_require__(8138),pv_ban_options={};pv_ban_options.styleTagTransform=styleTagTransform_default(),pv_ban_options.setAttributes=setAttributesWithoutAttributes_default(),pv_ban_options.insert=insertBySelector_default().bind(null,"head"),pv_ban_options.domAPI=styleDomAPI_default(),pv_ban_options.insertStyleElement=insertStyleElement_default();var pv_ban_update=injectStylesIntoStyleTag_default()(pv_ban_pv_ban.A,pv_ban_options);const popups_pv_ban_pv_ban=pv_ban_pv_ban.A&&pv_ban_pv_ban.A.locals?pv_ban_pv_ban.A.locals:void 0;var pv_ban_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_ban_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r=components_pv_popup_pv_popup,l=[],c=[],d=[],p=[];return e=class extends r{get duration(){return pv_ban_classPrivateFieldGet(this,t,"f")}set duration(e){pv_ban_classPrivateFieldSet(this,t,e,"f")}get submit(){return pv_ban_classPrivateFieldGet(this,i,"f")}set submit(e){pv_ban_classPrivateFieldSet(this,i,e,"f")}get userId(){return pv_ban_classPrivateFieldGet(this,o,"f")}set userId(e){pv_ban_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_ban_runInitializers(this,l),pv_ban_runInitializers(this,c,void 0))),i.set(this,pv_ban_runInitializers(this,d,void 0)),o.set(this,pv_ban_runInitializers(this,p,void 0)),this.innerHTML=pv_ban}connectedCallback(){super.connectedCallback(),this.duration.value="60",this.submit.addEventListener("click",(()=>{const e=Number(this.duration.value);services_client.ban(this.userId,e),this.close()}))}onOpen(e){this.userId=e}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=r[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_attr],pv_ban_esDecorate(e,null,a,{kind:"accessor",name:"duration",static:!1,private:!1,access:{has:e=>"duration"in e,get:e=>e.duration,set:(e,t)=>{e.duration=t}},metadata:i},c,l),pv_ban_esDecorate(e,null,s,{kind:"accessor",name:"submit",static:!1,private:!1,access:{has:e=>"submit"in e,get:e=>e.submit,set:(e,t)=>{e.submit=t}},metadata:i},d,l),pv_ban_esDecorate(e,null,n,{kind:"accessor",name:"userId",static:!1,private:!1,access:{has:e=>"userId"in e,get:e=>e.userId,set:(e,t)=>{e.userId=t}},metadata:i},p,l),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_popups_pv_ban_pv_ban=PvBan;var Modal,Dialog;customElements.define("pv-ban",PvBan),function(e){e.PROFILE="pv-profile",e.SETTINGS="pv-settings",e.NEW_ROOM="pv-new-room",e.MESSAGE="pv-message",e.BAN="pv-ban"}(Modal||(Modal={})),function(e){e.ACTIONS="pv-actions",e.DEVICES="pv-devices",e.TRANSPOSE="pv-transpose",e.VELOCITY="pv-velocity",e.SOUNDS="pv-sounds",e.ROOMS="pv-rooms"}(Dialog||(Dialog={}));class PopupManager{static open(e,...t){let i;if(i=document.querySelector(e),i&&!i.querySelector("dialog").hasAttribute("closing"))return i.close(),i;switch(e){case Modal.BAN:i=new components_popups_pv_ban_pv_ban;break;case Modal.PROFILE:i=new components_popups_pv_profile_pv_profile;break;case Modal.SETTINGS:i=new components_popups_pv_settings_pv_settings;break;case Modal.MESSAGE:i=new components_popups_pv_message_pv_message;break;case Modal.NEW_ROOM:i=new components_popups_pv_new_room_pv_new_room;break;case Dialog.ROOMS:i=new components_popups_pv_rooms_pv_rooms;break;case Dialog.ACTIONS:i=new components_popups_pv_actions_pv_actions;break;case Dialog.DEVICES:i=new components_popups_pv_devices_pv_devices;break;case Dialog.SOUNDS:i=new components_popups_pv_sounds_pv_sounds;break;case Dialog.TRANSPOSE:i=new components_popups_pv_transpose_pv_transpose;break;case Dialog.VELOCITY:i=new components_popups_pv_velocity_pv_velocity;break;default:throw new Error(`Popup ${e} not found`)}return i&&(document.body.append(i),i.open(...t)),i}static closeEverything(){PopupManager.closeDialogs(),PopupManager.closeModals()}static closeModals(){const e=Object.values(Modal).join(", ");document.querySelectorAll(e).forEach((e=>e.close()))}static closeDialogs(){const e=Object.values(Dialog).join(", ");document.querySelectorAll(e).forEach((e=>e.close()))}}window.addEventListener("resize",(()=>PopupManager.closeDialogs()));class LoaderManager extends(events_default()){constructor(){super()}start(e){this.loader||(this.loader=new src_components_pv_loader_pv_loader,document.body.append(this.loader),PopupManager.closeDialogs(),PopupManager.closeModals()),this.loader.setCaption(e)}stop(){this.loader&&(this.loader.classList.add("closing"),this.loader.addEventListener("animationend",(()=>{var e;null===(e=this.loader)||void 0===e||e.remove(),this.loader=null})))}}const loader=new LoaderManager,loadermanager=loader;var pv_toolbar_code='
      Transpose
      Velocity
      Sustain
      MIDI
      ';const pv_toolbar=pv_toolbar_code;var pv_toolbar_pv_toolbar=__webpack_require__(2732),pv_toolbar_options={};pv_toolbar_options.styleTagTransform=styleTagTransform_default(),pv_toolbar_options.setAttributes=setAttributesWithoutAttributes_default(),pv_toolbar_options.insert=insertBySelector_default().bind(null,"head"),pv_toolbar_options.domAPI=styleDomAPI_default(),pv_toolbar_options.insertStyleElement=insertStyleElement_default();var pv_toolbar_update=injectStylesIntoStyleTag_default()(pv_toolbar_pv_toolbar.A,pv_toolbar_options);const components_pv_toolbar_pv_toolbar=pv_toolbar_pv_toolbar.A&&pv_toolbar_pv_toolbar.A.locals?pv_toolbar_pv_toolbar.A.locals:void 0;var pv_toolbar_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_toolbar_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a,s,n,r,l;let c,d,p,u,v,h,m,f,_=pv_component,g=[],b=[],y=[],w=[],k=[],x=[],E=[],S=[],P=[];return e=class extends _{get sounds(){return pv_toolbar_classPrivateFieldGet(this,t,"f")}set sounds(e){pv_toolbar_classPrivateFieldSet(this,t,e,"f")}get soundsValue(){return pv_toolbar_classPrivateFieldGet(this,i,"f")}set soundsValue(e){pv_toolbar_classPrivateFieldSet(this,i,e,"f")}get transpose(){return pv_toolbar_classPrivateFieldGet(this,o,"f")}set transpose(e){pv_toolbar_classPrivateFieldSet(this,o,e,"f")}get transposeValue(){return pv_toolbar_classPrivateFieldGet(this,a,"f")}set transposeValue(e){pv_toolbar_classPrivateFieldSet(this,a,e,"f")}get velocity(){return pv_toolbar_classPrivateFieldGet(this,s,"f")}set velocity(e){pv_toolbar_classPrivateFieldSet(this,s,e,"f")}get velocityValue(){return pv_toolbar_classPrivateFieldGet(this,n,"f")}set velocityValue(e){pv_toolbar_classPrivateFieldSet(this,n,e,"f")}get sustainValue(){return pv_toolbar_classPrivateFieldGet(this,r,"f")}set sustainValue(e){pv_toolbar_classPrivateFieldSet(this,r,e,"f")}get devices(){return pv_toolbar_classPrivateFieldGet(this,l,"f")}set devices(e){pv_toolbar_classPrivateFieldSet(this,l,e,"f")}constructor(){super(),t.set(this,(pv_toolbar_runInitializers(this,g),pv_toolbar_runInitializers(this,b,void 0))),i.set(this,pv_toolbar_runInitializers(this,y,void 0)),o.set(this,pv_toolbar_runInitializers(this,w,void 0)),a.set(this,pv_toolbar_runInitializers(this,k,void 0)),s.set(this,pv_toolbar_runInitializers(this,x,void 0)),n.set(this,pv_toolbar_runInitializers(this,E,void 0)),r.set(this,pv_toolbar_runInitializers(this,S,void 0)),l.set(this,pv_toolbar_runInitializers(this,P,void 0)),this.innerHTML=pv_toolbar}connectedCallback(){this.sounds.addEventListener("click",(()=>{this.sounds.classList.add("open"),PopupManager.open(Dialog.SOUNDS,this.sounds).onClosing((()=>this.sounds.classList.remove("open")))})),this.devices.addEventListener("click",(()=>{this.devices.classList.add("open"),PopupManager.open(Dialog.DEVICES,this.devices).onClosing((()=>this.devices.classList.remove("open")))})),this.transpose.addEventListener("click",(()=>{this.transpose.classList.add("open"),PopupManager.open(Dialog.TRANSPOSE,this.transpose).onClosing((()=>this.transpose.classList.remove("open")))})),this.velocity.addEventListener("click",(()=>{this.velocity.classList.add("open"),PopupManager.open(Dialog.VELOCITY,this.velocity).onClosing((()=>this.velocity.classList.remove("open")))})),settingsmanager.on("sound",(e=>{switch(e){case"grand":this.soundsValue.textContent="Grand Piano";break;case"salamander":this.soundsValue.textContent="Salamander Piano";break;case"soft":this.soundsValue.textContent="Soft Piano";break;case"electric":this.soundsValue.textContent="Electric Piano"}})),settingsmanager.on("transpose",(e=>this.transposeValue.textContent=e<=0?e.toString():"+"+e.toString())),settingsmanager.on("velocity",(e=>this.velocityValue.textContent=e.toString())),settingsmanager.on("sustain",(e=>this.sustainValue.checked=e)),this.sustainValue.addEventListener("click",(()=>{settingsmanager.set("sustain",!settingsmanager.get("sustain"))}))}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=_[Symbol.metadata])&&void 0!==t?t:null):void 0;c=[decorators_child],d=[decorators_child],p=[decorators_child],u=[decorators_child],v=[decorators_child],h=[decorators_child],m=[decorators_child],f=[decorators_child],pv_toolbar_esDecorate(e,null,c,{kind:"accessor",name:"sounds",static:!1,private:!1,access:{has:e=>"sounds"in e,get:e=>e.sounds,set:(e,t)=>{e.sounds=t}},metadata:i},b,g),pv_toolbar_esDecorate(e,null,d,{kind:"accessor",name:"soundsValue",static:!1,private:!1,access:{has:e=>"soundsValue"in e,get:e=>e.soundsValue,set:(e,t)=>{e.soundsValue=t}},metadata:i},y,g),pv_toolbar_esDecorate(e,null,p,{kind:"accessor",name:"transpose",static:!1,private:!1,access:{has:e=>"transpose"in e,get:e=>e.transpose,set:(e,t)=>{e.transpose=t}},metadata:i},w,g),pv_toolbar_esDecorate(e,null,u,{kind:"accessor",name:"transposeValue",static:!1,private:!1,access:{has:e=>"transposeValue"in e,get:e=>e.transposeValue,set:(e,t)=>{e.transposeValue=t}},metadata:i},k,g),pv_toolbar_esDecorate(e,null,v,{kind:"accessor",name:"velocity",static:!1,private:!1,access:{has:e=>"velocity"in e,get:e=>e.velocity,set:(e,t)=>{e.velocity=t}},metadata:i},x,g),pv_toolbar_esDecorate(e,null,h,{kind:"accessor",name:"velocityValue",static:!1,private:!1,access:{has:e=>"velocityValue"in e,get:e=>e.velocityValue,set:(e,t)=>{e.velocityValue=t}},metadata:i},E,g),pv_toolbar_esDecorate(e,null,m,{kind:"accessor",name:"sustainValue",static:!1,private:!1,access:{has:e=>"sustainValue"in e,get:e=>e.sustainValue,set:(e,t)=>{e.sustainValue=t}},metadata:i},S,g),pv_toolbar_esDecorate(e,null,f,{kind:"accessor",name:"devices",static:!1,private:!1,access:{has:e=>"devices"in e,get:e=>e.devices,set:(e,t)=>{e.devices=t}},metadata:i},P,g),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_toolbar_pv_toolbar=null;customElements.define("pv-toolbar",PvToolbar);var pv_header_code='
      Pianoverse
      ';const pv_header=pv_header_code;var pv_header_pv_header=__webpack_require__(4950),pv_header_options={};pv_header_options.styleTagTransform=styleTagTransform_default(),pv_header_options.setAttributes=setAttributesWithoutAttributes_default(),pv_header_options.insert=insertBySelector_default().bind(null,"head"),pv_header_options.domAPI=styleDomAPI_default(),pv_header_options.insertStyleElement=insertStyleElement_default();var pv_header_update=injectStylesIntoStyleTag_default()(pv_header_pv_header.A,pv_header_options);const components_pv_header_pv_header=pv_header_pv_header.A&&pv_header_pv_header.A.locals?pv_header_pv_header.A.locals:void 0;var pv_header_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_header_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o,a,s,n;let r,l,c,d,p,u,v=pv_component,h=[],m=[],f=[],_=[],g=[],b=[],y=[];return e=class extends v{get pianoverse(){return pv_header_classPrivateFieldGet(this,t,"f")}set pianoverse(e){pv_header_classPrivateFieldSet(this,t,e,"f")}get volume(){return pv_header_classPrivateFieldGet(this,i,"f")}set volume(e){pv_header_classPrivateFieldSet(this,i,e,"f")}get volumeSlider(){return pv_header_classPrivateFieldGet(this,o,"f")}set volumeSlider(e){pv_header_classPrivateFieldSet(this,o,e,"f")}get mode(){return pv_header_classPrivateFieldGet(this,a,"f")}set mode(e){pv_header_classPrivateFieldSet(this,a,e,"f")}get discord(){return pv_header_classPrivateFieldGet(this,s,"f")}set discord(e){pv_header_classPrivateFieldSet(this,s,e,"f")}get settings(){return pv_header_classPrivateFieldGet(this,n,"f")}set settings(e){pv_header_classPrivateFieldSet(this,n,e,"f")}constructor(){super(),t.set(this,(pv_header_runInitializers(this,h),pv_header_runInitializers(this,m,void 0))),i.set(this,pv_header_runInitializers(this,f,void 0)),o.set(this,pv_header_runInitializers(this,_,void 0)),a.set(this,pv_header_runInitializers(this,g,void 0)),s.set(this,pv_header_runInitializers(this,b,void 0)),n.set(this,pv_header_runInitializers(this,y,void 0)),this.volumeBackup=100,this.innerHTML=pv_header,this.pianoverse.addEventListener("click",(()=>{var e;"Lobby"!==(null===(e=services_client.room)||void 0===e?void 0:e.id)&&services_client.enter("Lobby")})),this.volumeSlider.addEventListener("input",(()=>{settingsmanager.set("volume",parseInt(this.volumeSlider.value))})),settingsmanager.on("volume",(e=>{this.volumeSlider.value=e||0,e>0&&(this.volumeBackup=e)})),this.volume.addEventListener("wheel",(e=>{const t=settingsmanager.get("volume");e.deltaY>0?settingsmanager.set("volume",Math.max(t-5,0)):settingsmanager.set("volume",Math.min(t+5,100))}),{passive:!0}),this.volume.getElementsByTagName("i")[0].addEventListener("click",(()=>{0==settingsmanager.get("volume")?settingsmanager.set("volume",this.volumeBackup):settingsmanager.set("volume",0)})),this.mode.addEventListener("click",(()=>{settingsmanager.set("theme","dark"===settingsmanager.get("theme")?"light":"dark"),this.mode.dataset.tooltip="dark"===settingsmanager.get("theme")?"Dark mode":"Light mode",this.mode.querySelector("i").className="dark"===settingsmanager.get("theme")?"fas fa-moon":"fas fa-sun"}))}connectedCallback(){settingsmanager.on("volume",(e=>{this.volume.getElementsByTagName("i")[0].className=e<=0?"fas fa-volume-xmark":e<50?"fas fa-volume-low":"fas fa-volume-high"})),this.settings.addEventListener("click",(()=>{PopupManager.open(Modal.SETTINGS)})),this.discord.addEventListener("click",(()=>{window.open("https://discord.gg/nDE7GK7Bru","_blank")}))}},t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,n=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=v[Symbol.metadata])&&void 0!==t?t:null):void 0;r=[decorators_child],l=[decorators_child],c=[decorators_child],d=[decorators_child],p=[decorators_child],u=[decorators_child],pv_header_esDecorate(e,null,r,{kind:"accessor",name:"pianoverse",static:!1,private:!1,access:{has:e=>"pianoverse"in e,get:e=>e.pianoverse,set:(e,t)=>{e.pianoverse=t}},metadata:i},m,h),pv_header_esDecorate(e,null,l,{kind:"accessor",name:"volume",static:!1,private:!1,access:{has:e=>"volume"in e,get:e=>e.volume,set:(e,t)=>{e.volume=t}},metadata:i},f,h),pv_header_esDecorate(e,null,c,{kind:"accessor",name:"volumeSlider",static:!1,private:!1,access:{has:e=>"volumeSlider"in e,get:e=>e.volumeSlider,set:(e,t)=>{e.volumeSlider=t}},metadata:i},_,h),pv_header_esDecorate(e,null,d,{kind:"accessor",name:"mode",static:!1,private:!1,access:{has:e=>"mode"in e,get:e=>e.mode,set:(e,t)=>{e.mode=t}},metadata:i},g,h),pv_header_esDecorate(e,null,p,{kind:"accessor",name:"discord",static:!1,private:!1,access:{has:e=>"discord"in e,get:e=>e.discord,set:(e,t)=>{e.discord=t}},metadata:i},b,h),pv_header_esDecorate(e,null,u,{kind:"accessor",name:"settings",static:!1,private:!1,access:{has:e=>"settings"in e,get:e=>e.settings,set:(e,t)=>{e.settings=t}},metadata:i},y,h),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_header_pv_header=null;customElements.define("pv-header",PvHeader);var pv_note=__webpack_require__(1230),pv_note_options={};pv_note_options.styleTagTransform=styleTagTransform_default(),pv_note_options.setAttributes=setAttributesWithoutAttributes_default(),pv_note_options.insert=insertBySelector_default().bind(null,"head"),pv_note_options.domAPI=styleDomAPI_default(),pv_note_options.insertStyleElement=insertStyleElement_default();var pv_note_update=injectStylesIntoStyleTag_default()(pv_note.A,pv_note_options);const pv_note_pv_note=pv_note.A&&pv_note.A.locals?pv_note.A.locals:void 0;var pv_note_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_note_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r,l=pv_component,c=[],d=[],p=[],u=[];return e=class extends l{get left(){return pv_note_classPrivateFieldGet(this,t,"f")}set left(e){pv_note_classPrivateFieldSet(this,t,e,"f")}get width(){return pv_note_classPrivateFieldGet(this,i,"f")}set width(e){pv_note_classPrivateFieldSet(this,i,e,"f")}get color(){return pv_note_classPrivateFieldGet(this,o,"f")}set color(e){pv_note_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_note_runInitializers(this,c),pv_note_runInitializers(this,d,void 0))),i.set(this,pv_note_runInitializers(this,p,void 0)),o.set(this,pv_note_runInitializers(this,u,void 0)),this.released=!1}get h(){return this.getBoundingClientRect().height}get w(){return this.getBoundingClientRect().width}connectedCallback(){this.style.left=this.left,this.style.width=this.width,this.style.boxShadow=`\n ${this.color}7F 0px 5px,\n ${this.color}66 0px 10px,\n ${this.color}4C 0px 15px,\n ${this.color}33 0px 20px,\n ${this.color}19 0px 25px\n `}release(){this.released||(this.released=!0,this.style.height=`${Math.max(this.clientHeight+2,10)}px`,this.classList.add("released"),this.addEventListener("animationend",this.onAnimationEnd,{once:!0}))}onAnimationEnd(){this.remove()}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=l[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_attr],s=[decorators_attr],n=[decorators_attr],r=[bind],pv_note_esDecorate(e,null,a,{kind:"accessor",name:"left",static:!1,private:!1,access:{has:e=>"left"in e,get:e=>e.left,set:(e,t)=>{e.left=t}},metadata:i},d,c),pv_note_esDecorate(e,null,s,{kind:"accessor",name:"width",static:!1,private:!1,access:{has:e=>"width"in e,get:e=>e.width,set:(e,t)=>{e.width=t}},metadata:i},p,c),pv_note_esDecorate(e,null,n,{kind:"accessor",name:"color",static:!1,private:!1,access:{has:e=>"color"in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:i},u,c),pv_note_esDecorate(e,null,r,{kind:"method",name:"onAnimationEnd",static:!1,private:!1,access:{has:e=>"onAnimationEnd"in e,get:e=>e.onAnimationEnd},metadata:i},null,c),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const components_pv_note_pv_note=PvNote;function randf(e,t){return Math.random()*(t-e)+e}function randi(e,t){return Math.floor(Math.random()*(t-e+1))+e}customElements.define("pv-note",PvNote);var pv_canvas_code='
        ';const pv_canvas=pv_canvas_code;var pv_canvas_pv_canvas=__webpack_require__(5734),pv_canvas_options={};pv_canvas_options.styleTagTransform=styleTagTransform_default(),pv_canvas_options.setAttributes=setAttributesWithoutAttributes_default(),pv_canvas_options.insert=insertBySelector_default().bind(null,"head"),pv_canvas_options.domAPI=styleDomAPI_default(),pv_canvas_options.insertStyleElement=insertStyleElement_default();var pv_canvas_update=injectStylesIntoStyleTag_default()(pv_canvas_pv_canvas.A,pv_canvas_options);const components_pv_canvas_pv_canvas=pv_canvas_pv_canvas.A&&pv_canvas_pv_canvas.A.locals?pv_canvas_pv_canvas.A.locals:void 0;var pv_canvas_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_canvas_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n,r,l,c=pv_component,d=[],p=[],u=[];return e=class extends c{get bgCanvas(){return pv_canvas_classPrivateFieldGet(this,t,"f")}set bgCanvas(e){pv_canvas_classPrivateFieldSet(this,t,e,"f")}get fgCanvas(){return pv_canvas_classPrivateFieldGet(this,i,"f")}set fgCanvas(e){pv_canvas_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_canvas_runInitializers(this,d),pv_canvas_runInitializers(this,p,void 0))),i.set(this,pv_canvas_runInitializers(this,u,void 0)),this.particles=[],this.notes=[],this.start=0,this.frames=0,this.lastTime=0}connectedCallback(){this.innerHTML=pv_canvas,this.fgContext=this.fgCanvas.getContext("2d"),this.bgContext=this.bgCanvas.getContext("2d"),window.addEventListener("resize",this.onResize,{passive:!0}),document.addEventListener("DOMContentLoaded",this.onResize,{passive:!0,once:!0}),document.addEventListener("visibilitychange",this.onResize,{passive:!0}),services_keyboard.on("press",this.onKeyPressed),services_keyboard.on("release",this.onKeyReleased),settingsmanager.on("showEffects",(e=>{this.showEffects=e,this.particles=[]})),requestAnimationFrame(this.drawingAnimation)}drawingAnimation(e){0===this.start&&(this.start=e,this.lastTime=e);const t=(e-this.lastTime)/7;this.lastTime=e,this.frames++,this.drawForeground(),this.update(t),requestAnimationFrame(this.drawingAnimation)}update(t){for(let e=this.particles.length-1;e>=0;--e){const i=this.particles[e];i.r*=Math.pow(i.vr,t),i.r<=.5&&this.particles.splice(e,1),i.x+=i.vx*t,i.y+=i.vy*t,i.vx*=Math.pow(.95,t),i.vy*=Math.pow(.95,t)}for(const t of this.notes)if(t.pressed){const i=t.element.w,o=t.element.offsetLeft;for(let t=0;t<10;t++){const t=o+i/2+1.5*randf(-i/2,i/2);this.showEffects&&Math.random()>.7&&(this.particles.push({x:t,y:this.fgCanvas.height,vx:(t-o-i/2)/20,vy:randf(-4,-1),r:randf(2,2.4),vr:randf(.8,.99)}),this.particles.length>e.MAX_PARTICLES&&this.particles.shift())}}else t.element.isConnected||(this.notes=this.notes.filter((e=>e!==t)))}onKeyPressed(e,t,i){var o;if(document.hidden||!this.showEffects)return;const a=info_namespaceObject.H[e-21];if(!a)return;const s=a.includes("s"),n=a.replace("s",""),r=info_namespaceObject.H.filter((e=>!e.includes("s"))).indexOf(n),l=this.fgCanvas.width*(r/52),c=s?this.fgCanvas.width/52*.6:this.fgCanvas.width/52,d=new components_pv_note_pv_note;d.setAttribute("left",`${s?l+1.2*c:l}px`),d.setAttribute("width",`${c}px`),d.setAttribute("color",null===(o=services_client.get(i))||void 0===o?void 0:o.color),this.append(d),this.notes.push({key:e,pressed:!0,pressedAt:Date.now(),element:d})}onKeyReleased(e,t){const i=this.notes.filter((t=>e===t.key&&t.pressed));for(const e of i)e.pressed=!1,e.element.release()}onResize(){this.bgCanvas.width=this.clientWidth,this.bgCanvas.height=this.clientHeight,this.fgCanvas.width=this.clientWidth,this.fgCanvas.height=this.clientHeight,this.drawBackground()}drawForeground(){this.clear(this.fgContext),this.showEffects&&this.drawParticles(this.fgContext)}drawBackground(){this.clear(this.bgContext),this.drawOctaveLines(this.bgContext)}clear(e){e.clearRect(0,0,e.canvas.width,e.canvas.height)}drawParticles(e){e.fillStyle="white",e.shadowColor="white",e.shadowBlur=10,e.beginPath();for(let t=this.particles.length-1;t>=0;--t){const i=this.particles[t];e.moveTo(i.x+i.r,i.y),e.arc(i.x,i.y,i.r,0,2*Math.PI)}e.fill()}drawOctaveLines(e){e.strokeStyle="white",e.shadowBlur=0,e.globalAlpha=.02,e.lineWidth=1;const t=.03809*this.bgCanvas.width,i=.1346*this.bgCanvas.width;e.beginPath();for(let o=0;o<8;++o)e.moveTo(t+o*i,0),e.lineTo(t+o*i,this.bgCanvas.height);e.stroke()}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],n=[bind],r=[bind],l=[bind],pv_canvas_esDecorate(e,null,o,{kind:"accessor",name:"bgCanvas",static:!1,private:!1,access:{has:e=>"bgCanvas"in e,get:e=>e.bgCanvas,set:(e,t)=>{e.bgCanvas=t}},metadata:i},p,d),pv_canvas_esDecorate(e,null,a,{kind:"accessor",name:"fgCanvas",static:!1,private:!1,access:{has:e=>"fgCanvas"in e,get:e=>e.fgCanvas,set:(e,t)=>{e.fgCanvas=t}},metadata:i},u,d),pv_canvas_esDecorate(e,null,s,{kind:"method",name:"drawingAnimation",static:!1,private:!1,access:{has:e=>"drawingAnimation"in e,get:e=>e.drawingAnimation},metadata:i},null,d),pv_canvas_esDecorate(e,null,n,{kind:"method",name:"onKeyPressed",static:!1,private:!1,access:{has:e=>"onKeyPressed"in e,get:e=>e.onKeyPressed},metadata:i},null,d),pv_canvas_esDecorate(e,null,r,{kind:"method",name:"onKeyReleased",static:!1,private:!1,access:{has:e=>"onKeyReleased"in e,get:e=>e.onKeyReleased},metadata:i},null,d),pv_canvas_esDecorate(e,null,l,{kind:"method",name:"onResize",static:!1,private:!1,access:{has:e=>"onResize"in e,get:e=>e.onResize},metadata:i},null,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e.MAX_PARTICLES=2e3,e})();const src_components_pv_canvas_pv_canvas=null;customElements.define("pv-canvas",PvCanvas);var pv_cursor_code=' Anyonmous ';const pv_cursor=pv_cursor_code;var pv_cursor_pv_cursor=__webpack_require__(6610),pv_cursor_options={};pv_cursor_options.styleTagTransform=styleTagTransform_default(),pv_cursor_options.setAttributes=setAttributesWithoutAttributes_default(),pv_cursor_options.insert=insertBySelector_default().bind(null,"head"),pv_cursor_options.domAPI=styleDomAPI_default(),pv_cursor_options.insertStyleElement=insertStyleElement_default();var pv_cursor_update=injectStylesIntoStyleTag_default()(pv_cursor_pv_cursor.A,pv_cursor_options);const components_pv_cursor_pv_cursor=pv_cursor_pv_cursor.A&&pv_cursor_pv_cursor.A.locals?pv_cursor_pv_cursor.A.locals:void 0;var pv_cursor_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_cursor_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r=pv_component,l=[],c=[],d=[],p=[];return e=class extends r{get badge(){return pv_cursor_classPrivateFieldGet(this,t,"f")}set badge(e){pv_cursor_classPrivateFieldSet(this,t,e,"f")}get name(){return pv_cursor_classPrivateFieldGet(this,i,"f")}set name(e){pv_cursor_classPrivateFieldSet(this,i,e,"f")}get color(){return pv_cursor_classPrivateFieldGet(this,o,"f")}set color(e){pv_cursor_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_cursor_runInitializers(this,l),pv_cursor_runInitializers(this,c,void 0))),i.set(this,pv_cursor_runInitializers(this,d,void 0)),o.set(this,pv_cursor_runInitializers(this,p,void 0))}connectedCallback(){this.innerHTML=pv_cursor,this.badge.textContent=this.name,this.badge.style.color=`color-mix(in hsl, var(--color-white) 50%, ${this.color})`,this.badge.style.background=`linear-gradient(135deg, ${this.color}55, ${this.color}40)`,settingsmanager.get("showCursors")?this.style.display="flex":this.style.display="none",settingsmanager.on("showCursors",(e=>{this.style.display=e?"flex":"none"}))}onNameChange(e){this.badge.textContent=e}onColorChange(e){this.badge.style.color=`color-mix(in hsl, var(--color-white) 50%, ${e})`,this.badge.style.background=`linear-gradient(135deg, ${e}55, ${e}40)`}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=r[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_attr],n=[decorators_attr],pv_cursor_esDecorate(e,null,a,{kind:"accessor",name:"badge",static:!1,private:!1,access:{has:e=>"badge"in e,get:e=>e.badge,set:(e,t)=>{e.badge=t}},metadata:i},c,l),pv_cursor_esDecorate(e,null,s,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:i},d,l),pv_cursor_esDecorate(e,null,n,{kind:"accessor",name:"color",static:!1,private:!1,access:{has:e=>"color"in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:i},p,l),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_cursor_pv_cursor=PvCursor;customElements.define("pv-cursor",PvCursor);var pv_user_code=' ';const pv_user=pv_user_code;var pv_user_pv_user=__webpack_require__(8098),pv_user_options={};pv_user_options.styleTagTransform=styleTagTransform_default(),pv_user_options.setAttributes=setAttributesWithoutAttributes_default(),pv_user_options.insert=insertBySelector_default().bind(null,"head"),pv_user_options.domAPI=styleDomAPI_default(),pv_user_options.insertStyleElement=insertStyleElement_default();var pv_user_update=injectStylesIntoStyleTag_default()(pv_user_pv_user.A,pv_user_options);const components_pv_user_pv_user=pv_user_pv_user.A&&pv_user_pv_user.A.locals?pv_user_pv_user.A.locals:void 0;var pv_user_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_user_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n=pv_component,r=[],l=[],c=[];return e=class extends n{get text(){return pv_user_classPrivateFieldGet(this,t,"f")}set text(e){pv_user_classPrivateFieldSet(this,t,e,"f")}get badges(){return pv_user_classPrivateFieldGet(this,i,"f")}set badges(e){pv_user_classPrivateFieldSet(this,i,e,"f")}constructor(e){super(),t.set(this,(pv_user_runInitializers(this,r),pv_user_runInitializers(this,l,void 0))),i.set(this,pv_user_runInitializers(this,c,void 0)),this.user=e,this.id=null==e?void 0:e.id}update(e){this.user=e,this.initialize()}connectedCallback(){this.innerHTML=pv_user,this.initialize(),this.addEventListener("click",this.openActions)}initialize(){switch(this.text.textContent=this.user.name,this.text.style.color=`color-mix(in hsl, var(--color-white) 50%, ${this.user.color})`,this.style.background=`linear-gradient(135deg, ${this.user.color}55, ${this.user.color}40)`,this.badges.style.backgroundColor=`color-mix(in hsl, var(--color-black) 90%, ${this.user.color})`,this.badges.innerHTML="",this.user.role){case role.DEVELOPER:this.badges.style.display="block",this.badges.innerHTML="DEV";break;case role.MODERATOR:this.badges.style.display="block",this.badges.innerHTML="MOD";break;default:case role.USER:this.badges.style.display="none"}services_client.room.owner===this.user.id&&(this.badges.style.display="block",this.badges.innerHTML=this.badges.innerHTML?`${this.badges.innerHTML} / HOST`:"HOST"),services_client.me.id==this.user.id&&(this.badges.style.display="block",this.badges.innerHTML=this.badges.innerHTML?"ME / "+this.badges.innerHTML:"ME")}openActions(){this.classList.add("open"),(this.id===services_client.me.id?PopupManager.open(Modal.PROFILE):PopupManager.open(Dialog.ACTIONS,this,this.id)).onClosing((()=>this.classList.remove("open")))}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=n[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],pv_user_esDecorate(e,null,o,{kind:"accessor",name:"text",static:!1,private:!1,access:{has:e=>"text"in e,get:e=>e.text,set:(e,t)=>{e.text=t}},metadata:i},l,r),pv_user_esDecorate(e,null,a,{kind:"accessor",name:"badges",static:!1,private:!1,access:{has:e=>"badges"in e,get:e=>e.badges,set:(e,t)=>{e.badges=t}},metadata:i},c,r),pv_user_esDecorate(e,null,s,{kind:"method",name:"openActions",static:!1,private:!1,access:{has:e=>"openActions"in e,get:e=>e.openActions},metadata:i},null,r),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_user_pv_user=PvUser;customElements.define("pv-user",PvUser);var pv_users_code='
        ';const pv_users=pv_users_code;var pv_users_pv_users=__webpack_require__(8758),pv_users_options={};pv_users_options.styleTagTransform=styleTagTransform_default(),pv_users_options.setAttributes=setAttributesWithoutAttributes_default(),pv_users_options.insert=insertBySelector_default().bind(null,"head"),pv_users_options.domAPI=styleDomAPI_default(),pv_users_options.insertStyleElement=insertStyleElement_default();var pv_users_update=injectStylesIntoStyleTag_default()(pv_users_pv_users.A,pv_users_options);const components_pv_users_pv_users=pv_users_pv_users.A&&pv_users_pv_users.A.locals?pv_users_pv_users.A.locals:void 0;var pv_users_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_users_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t;let i,o,a,s,n,r=pv_component,l=[],c=[];return e=class extends r{get users(){return pv_users_classPrivateFieldGet(this,t,"f")}set users(e){pv_users_classPrivateFieldSet(this,t,e,"f")}constructor(){super(),t.set(this,(pv_users_runInitializers(this,l),pv_users_runInitializers(this,c,void 0)))}connectedCallback(){this.innerHTML=pv_users,services_client.on("welcome",this.initialize),services_client.on("chown",this.initialize),services_client.on("join",this.addUser),services_client.on("profile",this.updateUser),services_client.on("leave",this.removeUser),services_keyboard.on("press",((e,t,i)=>{const o=document.getElementById(i);o&&(o.style.animation="none",o.offsetHeight,o.style.animation="bounce 180ms ease-out")}))}initialize(){this.users.innerHTML="",this.addUser(services_client.me);for(const e of services_client.users)this.addUser(e)}addUser(e){const t=new src_components_pv_user_pv_user(e);null==t||t.classList.toggle("muted",!(!services_client.get(e.id).muted&&!services_client.get(e.id).mutedChat)),this.users.append(t)}updateUser(e){const t=document.getElementById(e.id);null==t||t.update(e),null==t||t.classList.toggle("muted",!(!services_client.get(e.id).muted&&!services_client.get(e.id).mutedChat))}removeUser(e){var t;null===(t=document.getElementById(e.id))||void 0===t||t.remove()}},t=new WeakMap,(()=>{var t;const d="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=r[Symbol.metadata])&&void 0!==t?t:null):void 0;i=[decorators_child],o=[bind],a=[bind],s=[bind],n=[bind],pv_users_esDecorate(e,null,i,{kind:"accessor",name:"users",static:!1,private:!1,access:{has:e=>"users"in e,get:e=>e.users,set:(e,t)=>{e.users=t}},metadata:d},c,l),pv_users_esDecorate(e,null,o,{kind:"method",name:"initialize",static:!1,private:!1,access:{has:e=>"initialize"in e,get:e=>e.initialize},metadata:d},null,l),pv_users_esDecorate(e,null,a,{kind:"method",name:"addUser",static:!1,private:!1,access:{has:e=>"addUser"in e,get:e=>e.addUser},metadata:d},null,l),pv_users_esDecorate(e,null,s,{kind:"method",name:"updateUser",static:!1,private:!1,access:{has:e=>"updateUser"in e,get:e=>e.updateUser},metadata:d},null,l),pv_users_esDecorate(e,null,n,{kind:"method",name:"removeUser",static:!1,private:!1,access:{has:e=>"removeUser"in e,get:e=>e.removeUser},metadata:d},null,l),d&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d})})(),e})();const src_components_pv_users_pv_users=null;customElements.define("pv-users",PvUsers);var pv_keys_code='
        ';const pv_keys=pv_keys_code;var pv_keys_pv_keys=__webpack_require__(5750),pv_keys_options={};pv_keys_options.styleTagTransform=styleTagTransform_default(),pv_keys_options.setAttributes=setAttributesWithoutAttributes_default(),pv_keys_options.insert=insertBySelector_default().bind(null,"head"),pv_keys_options.domAPI=styleDomAPI_default(),pv_keys_options.insertStyleElement=insertStyleElement_default();var pv_keys_update=injectStylesIntoStyleTag_default()(pv_keys_pv_keys.A,pv_keys_options);const components_pv_keys_pv_keys=pv_keys_pv_keys.A&&pv_keys_pv_keys.A.locals?pv_keys_pv_keys.A.locals:void 0;var pv_keys_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0};let PvKeys=(()=>{var e;let t,i,o,a,s=pv_component,n=[];return e=class extends s{constructor(){super(),this.isTactile=(pv_keys_runInitializers(this,n),!1)}connectedCallback(){this.innerHTML=pv_keys,this.setupKeysListeners(),services_keyboard.on("loaded",this.onLoaded),services_keyboard.on("unloaded",this.onUnloaded),services_keyboard.on("press",this.onPress),services_keyboard.on("release",this.onRelease),settingsmanager.on("showLabels",(e=>{const t=this.querySelectorAll("[data-key]");for(const i of Array.from(t))i.classList.toggle("show-label",e)})),settingsmanager.on("sound",(e=>{const t=this.querySelectorAll("[data-key]");for(const e of Array.from(t))null==e||e.classList.add("loading");services_keyboard.load(e)}))}setupKeysListeners(){const e=this.querySelectorAll("[data-key]");for(const t of Array.from(e))t.addEventListener("mousedown",(e=>{if(this.isTactile)return;const i=e.target,o=Number(i.dataset.key),a=Math.floor(e.offsetY/t.clientHeight*127);services_keyboard.press(o,a);const s=()=>{services_keyboard.release(o),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s)})),t.addEventListener("touchstart",(e=>{e.preventDefault(),this.isTactile=!0;const t=e.target,i=Number(t.dataset.key);services_keyboard.press(i,110);const o=()=>{services_keyboard.release(i),document.removeEventListener("touchend",o)};document.addEventListener("touchend",o)}))}onLoaded(e){const t=this.querySelector(`[data-key="${e}"]`);null==t||t.classList.remove("loading")}onUnloaded(){const e=this.querySelectorAll("[data-key]");for(const t of Array.from(e))t.classList.add("loading")}onPress(e,t,i){const o=this.querySelector(`[data-key="${e}"]`);o&&(o.style.transitionDuration="0ms",o.style.backgroundColor=services_client.get(i).color)}onRelease(e){const t=this.querySelector(`[data-key="${e}"]`);t&&(t.style.transitionDuration="",t.style.backgroundColor="")}},(()=>{var r;const l="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(r=s[Symbol.metadata])&&void 0!==r?r:null):void 0;t=[bind],i=[bind],o=[bind],a=[bind],pv_keys_esDecorate(e,null,t,{kind:"method",name:"onLoaded",static:!1,private:!1,access:{has:e=>"onLoaded"in e,get:e=>e.onLoaded},metadata:l},null,n),pv_keys_esDecorate(e,null,i,{kind:"method",name:"onUnloaded",static:!1,private:!1,access:{has:e=>"onUnloaded"in e,get:e=>e.onUnloaded},metadata:l},null,n),pv_keys_esDecorate(e,null,o,{kind:"method",name:"onPress",static:!1,private:!1,access:{has:e=>"onPress"in e,get:e=>e.onPress},metadata:l},null,n),pv_keys_esDecorate(e,null,a,{kind:"method",name:"onRelease",static:!1,private:!1,access:{has:e=>"onRelease"in e,get:e=>e.onRelease},metadata:l},null,n),l&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:l})})(),e})();const src_components_pv_keys_pv_keys=null;customElements.define("pv-keys",PvKeys);var pv_knob_code='
        ';const pv_knob=pv_knob_code;var pv_knob_pv_knob=__webpack_require__(3142),pv_knob_options={};pv_knob_options.styleTagTransform=styleTagTransform_default(),pv_knob_options.setAttributes=setAttributesWithoutAttributes_default(),pv_knob_options.insert=insertBySelector_default().bind(null,"head"),pv_knob_options.domAPI=styleDomAPI_default(),pv_knob_options.insertStyleElement=insertStyleElement_default();var pv_knob_update=injectStylesIntoStyleTag_default()(pv_knob_pv_knob.A,pv_knob_options);const components_pv_knob_pv_knob=pv_knob_pv_knob.A&&pv_knob_pv_knob.A.locals?pv_knob_pv_knob.A.locals:void 0;var pv_knob_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_knob_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s=pv_component,n=[],r=[],l=[];return e=class extends s{get knob(){return pv_knob_classPrivateFieldGet(this,t,"f")}set knob(e){pv_knob_classPrivateFieldSet(this,t,e,"f")}get indicator(){return pv_knob_classPrivateFieldGet(this,i,"f")}set indicator(e){pv_knob_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_knob_runInitializers(this,n),pv_knob_runInitializers(this,r,void 0))),i.set(this,pv_knob_runInitializers(this,l,void 0)),this.angle=0,this.yStart=0,this.dragging=!1,this.value=0,this.MIN_ANGLE=-135,this.MAX_ANGLE=135,this.STEP=1,this.minValue=-24,this.maxValue=24}connectedCallback(){this.innerHTML=pv_knob;let e=0;this.knob.addEventListener("mousedown",(e=>{this.dragging=!0,this.yStart=e.clientY,e.preventDefault()})),window.addEventListener("mousemove",(t=>{if(!this.dragging)return;e+=this.yStart-t.clientY,this.yStart=t.clientY;const i=Math.floor(e/this.STEP);if(0!==i){e-=i*this.STEP,this.angle=Math.min(this.MAX_ANGLE,Math.max(this.MIN_ANGLE,this.angle+i*this.STEP));const t=this.angle<0?360+this.angle:this.angle;this.angle<0?this.knob.style.background=`conic-gradient(var(--color-cards) ${t}deg, var(--color-text) ${t}deg)`:this.knob.style.background=`conic-gradient(var(--color-text) ${t}deg, var(--color-cards) ${t}deg)`,this.value=this.calculateValue(),this.indicator.textContent=this.value.toString()}})),window.addEventListener("mouseup",(()=>this.dragging=!1)),this.indicator.textContent=this.value.toString()}calculateValue(){const e=this.maxValue-this.minValue,t=this.MAX_ANGLE-this.MIN_ANGLE;return Math.round((this.angle+this.MAX_ANGLE)/t*e+this.minValue)}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=s[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],pv_knob_esDecorate(e,null,o,{kind:"accessor",name:"knob",static:!1,private:!1,access:{has:e=>"knob"in e,get:e=>e.knob,set:(e,t)=>{e.knob=t}},metadata:i},r,n),pv_knob_esDecorate(e,null,a,{kind:"accessor",name:"indicator",static:!1,private:!1,access:{has:e=>"indicator"in e,get:e=>e.indicator,set:(e,t)=>{e.indicator=t}},metadata:i},l,n),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_knob_pv_knob=null;customElements.define("pv-knob",PvKnob);var pv_chat_code='
          ';const pv_chat=pv_chat_code;var pv_chat_pv_chat=__webpack_require__(9546),pv_chat_options={};pv_chat_options.styleTagTransform=styleTagTransform_default(),pv_chat_options.setAttributes=setAttributesWithoutAttributes_default(),pv_chat_options.insert=insertBySelector_default().bind(null,"head"),pv_chat_options.domAPI=styleDomAPI_default(),pv_chat_options.insertStyleElement=insertStyleElement_default();var pv_chat_update=injectStylesIntoStyleTag_default()(pv_chat_pv_chat.A,pv_chat_options);const components_pv_chat_pv_chat=pv_chat_pv_chat.A&&pv_chat_pv_chat.A.locals?pv_chat_pv_chat.A.locals:void 0;var pv_chat_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_chat_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i,o;let a,s,n,r,l,c,d,p,u,v,h,m,f=pv_component,_=[],g=[],b=[],y=[];return e=class extends f{get messages(){return pv_chat_classPrivateFieldGet(this,t,"f")}set messages(e){pv_chat_classPrivateFieldSet(this,t,e,"f")}get input(){return pv_chat_classPrivateFieldGet(this,i,"f")}set input(e){pv_chat_classPrivateFieldSet(this,i,e,"f")}get send(){return pv_chat_classPrivateFieldGet(this,o,"f")}set send(e){pv_chat_classPrivateFieldSet(this,o,e,"f")}constructor(){super(),t.set(this,(pv_chat_runInitializers(this,_),pv_chat_runInitializers(this,g,void 0))),i.set(this,pv_chat_runInitializers(this,b,void 0)),o.set(this,pv_chat_runInitializers(this,y,void 0))}connectedCallback(){this.innerHTML=pv_chat,window.addEventListener("resize",this.scrollDown,{passive:!0}),document.addEventListener("keydown",this.onDocumentKeyDown),this.input.addEventListener("keydown",this.onInputKeyDown),this.input.addEventListener("keyup",this.onInputKeyUp),this.send.addEventListener("click",this.sendChatMessage),services_client.on("welcome",this.onWelcome),services_client.on("chat",this.onMessage),services_client.on("join",this.onJoin),services_client.on("clear",this.clearChat)}updateMutedMessages(){var e;const t=this.messages.querySelectorAll("li");for(let i=0;i=this.messages.scrollHeight-this.messages.clientHeight-100}scrollDown(){this.messages.scrollTop=this.messages.scrollHeight}onDocumentKeyDown(e){document.activeElement===this.input?"Escape"===e.key&&this.input.blur():"Enter"===e.key&&this.input.focus()}onInputKeyDown(e){switch(e.key){case"Enter":this.sendChatMessage();break;case"Escape":this.input.blur()}e.stopPropagation()}onInputKeyUp(e){e.stopPropagation()}onWelcome({chat:e}){this.clearChat();for(const t of e)t.name?this.onMessage(t):this.sendSystemMessage(t.content);this.messages.scrollTop=this.messages.scrollHeight}onJoin(){this.messages.scrollTop=this.messages.scrollHeight}supercharge(t){let i="";for(let o of t.content.split(" ")){const t=o.match(e.REGEX_HYPERLINK);if(o.startsWith("@")&&o.length>2&&o.length<=24)o=`${escapeHtml(o)}`;else if(t){const e=escapeHtml(t[0]).replace(/&/g,"&");o=`${e}`}i+=`${o} `}const o=i.matchAll(e.REGEX_EMOJI);for(const e of o){const t="a"===e[0][4],o=e[1];i=i.replace(e[0],`emoji`)}return i}onMessage(t){var i;const o=this.isAtChatBottom();if(!t.name)return void this.sendSystemMessage(t.content);t.content=escapeHtml(t.content),t.name=escapeHtml(t.name);const a=this.supercharge(t),s=document.createElement("span");s.classList.add("username"),s.style.color=t.color,s.innerHTML="discord"===t.id?`${t.name} `:t.name,s.title=t.id;const n=document.createElement("li");for(n.classList.add("message"),t.id&&(n.setAttribute("from",t.id),(null===(i=services_client.get(t.id))||void 0===i?void 0:i.mutedChat)&&(n.style.display="none")),n.innerHTML=`${s.outerHTML}${a.trim()}`,this.messages.append(n);this.messages.children.length>e.MAX_MESSAGES;)this.messages.removeChild(this.messages.firstChild);o&&this.scrollDown()}sendChatMessage(){this.input.value.trim()&&(services_client.chat(this.input.value),this.input.value="")}clearChat(){this.messages.innerHTML=""}sendSystemMessage(e){const t=this.isAtChatBottom(),i=document.createElement("li");i.textContent=e,i.classList.add("system"),this.messages.append(i),t&&this.scrollDown()}},t=new WeakMap,i=new WeakMap,o=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=f[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[decorators_child],s=[decorators_child],n=[decorators_child],r=[bind],l=[bind],c=[bind],d=[bind],p=[bind],u=[bind],v=[bind],h=[bind],m=[bind],pv_chat_esDecorate(e,null,a,{kind:"accessor",name:"messages",static:!1,private:!1,access:{has:e=>"messages"in e,get:e=>e.messages,set:(e,t)=>{e.messages=t}},metadata:i},g,_),pv_chat_esDecorate(e,null,s,{kind:"accessor",name:"input",static:!1,private:!1,access:{has:e=>"input"in e,get:e=>e.input,set:(e,t)=>{e.input=t}},metadata:i},b,_),pv_chat_esDecorate(e,null,n,{kind:"accessor",name:"send",static:!1,private:!1,access:{has:e=>"send"in e,get:e=>e.send,set:(e,t)=>{e.send=t}},metadata:i},y,_),pv_chat_esDecorate(e,null,r,{kind:"method",name:"scrollDown",static:!1,private:!1,access:{has:e=>"scrollDown"in e,get:e=>e.scrollDown},metadata:i},null,_),pv_chat_esDecorate(e,null,l,{kind:"method",name:"onDocumentKeyDown",static:!1,private:!1,access:{has:e=>"onDocumentKeyDown"in e,get:e=>e.onDocumentKeyDown},metadata:i},null,_),pv_chat_esDecorate(e,null,c,{kind:"method",name:"onInputKeyDown",static:!1,private:!1,access:{has:e=>"onInputKeyDown"in e,get:e=>e.onInputKeyDown},metadata:i},null,_),pv_chat_esDecorate(e,null,d,{kind:"method",name:"onInputKeyUp",static:!1,private:!1,access:{has:e=>"onInputKeyUp"in e,get:e=>e.onInputKeyUp},metadata:i},null,_),pv_chat_esDecorate(e,null,p,{kind:"method",name:"onWelcome",static:!1,private:!1,access:{has:e=>"onWelcome"in e,get:e=>e.onWelcome},metadata:i},null,_),pv_chat_esDecorate(e,null,u,{kind:"method",name:"onJoin",static:!1,private:!1,access:{has:e=>"onJoin"in e,get:e=>e.onJoin},metadata:i},null,_),pv_chat_esDecorate(e,null,v,{kind:"method",name:"onMessage",static:!1,private:!1,access:{has:e=>"onMessage"in e,get:e=>e.onMessage},metadata:i},null,_),pv_chat_esDecorate(e,null,h,{kind:"method",name:"sendChatMessage",static:!1,private:!1,access:{has:e=>"sendChatMessage"in e,get:e=>e.sendChatMessage},metadata:i},null,_),pv_chat_esDecorate(e,null,m,{kind:"method",name:"clearChat",static:!1,private:!1,access:{has:e=>"clearChat"in e,get:e=>e.clearChat},metadata:i},null,_),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e.MAX_MESSAGES=150,e.REGEX_HYPERLINK=/https?:\/\/[^\s@"'\$\{\}\\]{2,}/,e.REGEX_EMOJI=/<a?:.*?:(\d+)>/g,e})();const src_components_pv_chat_pv_chat=null;customElements.define("pv-chat",PvChat);var pv_ping_code=' Pinging... ';const pv_ping=pv_ping_code;var pv_ping_pv_ping=__webpack_require__(1358),pv_ping_options={};pv_ping_options.styleTagTransform=styleTagTransform_default(),pv_ping_options.setAttributes=setAttributesWithoutAttributes_default(),pv_ping_options.insert=insertBySelector_default().bind(null,"head"),pv_ping_options.domAPI=styleDomAPI_default(),pv_ping_options.insertStyleElement=insertStyleElement_default();var pv_ping_update=injectStylesIntoStyleTag_default()(pv_ping_pv_ping.A,pv_ping_options);const components_pv_ping_pv_ping=pv_ping_pv_ping.A&&pv_ping_pv_ping.A.locals?pv_ping_pv_ping.A.locals:void 0;var pv_ping_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_ping_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n=pv_component,r=[],l=[],c=[];return e=class extends n{get icon(){return pv_ping_classPrivateFieldGet(this,t,"f")}set icon(e){pv_ping_classPrivateFieldSet(this,t,e,"f")}get ms(){return pv_ping_classPrivateFieldGet(this,i,"f")}set ms(e){pv_ping_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_ping_runInitializers(this,r),pv_ping_runInitializers(this,l,void 0))),i.set(this,pv_ping_runInitializers(this,c,void 0)),this.pingDelay=2e3}connectedCallback(){this.innerHTML=pv_ping,this.pingInterval=setInterval(this.sendPing,this.pingDelay),services_client.isConnected()?this.sendPing():services_client.once("connected",this.sendPing)}sendPing(){let e=Date.now();services_client.ping()&&(services_client.removeAllListeners("pong"),services_client.once("pong",(()=>{const t=Date.now()-e;this.icon.className=t<200?"icon green fas fa-circle":t<500?"icon yellow fas fa-circle":t<1e3?"icon orange fas fa-circle":"icon red fas fa-circle",this.ms.textContent=`${t} ms`})))}disconnectedCallback(){clearInterval(this.pingInterval),services_client.off("connected",this.sendPing)}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=n[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],pv_ping_esDecorate(e,null,o,{kind:"accessor",name:"icon",static:!1,private:!1,access:{has:e=>"icon"in e,get:e=>e.icon,set:(e,t)=>{e.icon=t}},metadata:i},l,r),pv_ping_esDecorate(e,null,a,{kind:"accessor",name:"ms",static:!1,private:!1,access:{has:e=>"ms"in e,get:e=>e.ms,set:(e,t)=>{e.ms=t}},metadata:i},c,r),pv_ping_esDecorate(e,null,s,{kind:"method",name:"sendPing",static:!1,private:!1,access:{has:e=>"sendPing"in e,get:e=>e.sendPing},metadata:i},null,r),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_ping_pv_ping=null;customElements.define("pv-ping",PvPing);var pv_room_code='
          Offline
          ';const pv_room=pv_room_code;var pv_room_pv_room=__webpack_require__(6898),pv_room_options={};pv_room_options.styleTagTransform=styleTagTransform_default(),pv_room_options.setAttributes=setAttributesWithoutAttributes_default(),pv_room_options.insert=insertBySelector_default().bind(null,"head"),pv_room_options.domAPI=styleDomAPI_default(),pv_room_options.insertStyleElement=insertStyleElement_default();var pv_room_update=injectStylesIntoStyleTag_default()(pv_room_pv_room.A,pv_room_options);const components_pv_room_pv_room=pv_room_pv_room.A&&pv_room_pv_room.A.locals?pv_room_pv_room.A.locals:void 0;var pv_room_esDecorate=function(e,t,i,o,a,s){function n(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?o.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,v=i.length-1;v>=0;v--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(e||null))};var f=(0,i[v])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=n(f.get))&&(p.get=r),(r=n(f.set))&&(p.set=r),(r=n(f.init))&&a.unshift(r)}else(r=n(f))&&("field"===l?a.unshift(r):p[c]=r)}d&&Object.defineProperty(d,o.name,p),u=!0},pv_room_runInitializers=function(e,t,i){for(var o=arguments.length>2,a=0;a{var e,t,i;let o,a,s,n,r,l,c=pv_component,d=[],p=[],u=[];return e=class extends c{get roomSelector(){return pv_room_classPrivateFieldGet(this,t,"f")}set roomSelector(e){pv_room_classPrivateFieldSet(this,t,e,"f")}get roomName(){return pv_room_classPrivateFieldGet(this,i,"f")}set roomName(e){pv_room_classPrivateFieldSet(this,i,e,"f")}constructor(){super(),t.set(this,(pv_room_runInitializers(this,d),pv_room_runInitializers(this,p,void 0))),i.set(this,pv_room_runInitializers(this,u,void 0)),this.rooms=[],this.popup=null}connectedCallback(){this.innerHTML=pv_room,this.roomSelector.addEventListener("click",this.onClickRoomSelector),services_client.on("welcome",this.updateAll),services_client.on("join",this.updateAll),services_client.on("leave",this.updateAll),services_client.on("rooms",this.updateRoomList),services_client.on("reconnecting",this.updateBrowserTab)}onClickRoomSelector(e){this.popup=PopupManager.open(Dialog.ROOMS,this,this.rooms),this.popup.onClosing((()=>this.popup=null))}updateRoomList(e){var t;this.rooms=e,null===(t=this.popup)||void 0===t||t.updateRooms(e)}updateAll(){this.updateBrowserTab(),this.roomName.textContent=services_client.room.id+` (${1+services_client.users.length})`||"--";const e=services_client.room.id.match(/^Lobby(?: [1-9])?$|^Backrooms$/);this.roomSelector.classList.toggle("lobby",!!e)}updateBrowserTab(){services_client.room.id?services_client.isConnected()?document.title=`Pianoverse - ${services_client.room.id} (${1+services_client.users.length})`:document.title=`Pianoverse - ${services_client.room.id}`:document.title="Pianoverse"}},t=new WeakMap,i=new WeakMap,(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;o=[decorators_child],a=[decorators_child],s=[bind],n=[bind],r=[bind],l=[bind],pv_room_esDecorate(e,null,o,{kind:"accessor",name:"roomSelector",static:!1,private:!1,access:{has:e=>"roomSelector"in e,get:e=>e.roomSelector,set:(e,t)=>{e.roomSelector=t}},metadata:i},p,d),pv_room_esDecorate(e,null,a,{kind:"accessor",name:"roomName",static:!1,private:!1,access:{has:e=>"roomName"in e,get:e=>e.roomName,set:(e,t)=>{e.roomName=t}},metadata:i},u,d),pv_room_esDecorate(e,null,s,{kind:"method",name:"onClickRoomSelector",static:!1,private:!1,access:{has:e=>"onClickRoomSelector"in e,get:e=>e.onClickRoomSelector},metadata:i},null,d),pv_room_esDecorate(e,null,n,{kind:"method",name:"updateRoomList",static:!1,private:!1,access:{has:e=>"updateRoomList"in e,get:e=>e.updateRoomList},metadata:i},null,d),pv_room_esDecorate(e,null,r,{kind:"method",name:"updateAll",static:!1,private:!1,access:{has:e=>"updateAll"in e,get:e=>e.updateAll},metadata:i},null,d),pv_room_esDecorate(e,null,l,{kind:"method",name:"updateBrowserTab",static:!1,private:!1,access:{has:e=>"updateBrowserTab"in e,get:e=>e.updateBrowserTab},metadata:i},null,d),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();const src_components_pv_room_pv_room=null;function distance(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}customElements.define("pv-room",PvRoom);let lastSent=Date.now(),lastCoords={x:0,y:0},hideMyCursor=!settingsmanager.get("showCursors");settingsmanager.on("showCursors",(e=>{hideMyCursor=!e,hideMyCursor&&services_client.move(1,1)})),document.addEventListener("touchmove",(e=>{var t,i,o,a,s,n;hideMyCursor||Date.now()-lastSent<10||distance(lastCoords,{x:null===(t=e.touches[0])||void 0===t?void 0:t.clientX,y:null===(i=e.touches[0])||void 0===i?void 0:i.clientY})<3||(services_client.move((null===(o=e.touches[0])||void 0===o?void 0:o.clientX)/window.innerWidth,(null===(a=e.touches[0])||void 0===a?void 0:a.clientY)/window.innerHeight),lastSent=Date.now(),lastCoords={x:null===(s=e.touches[0])||void 0===s?void 0:s.clientX,y:null===(n=e.touches[0])||void 0===n?void 0:n.clientY})})),document.addEventListener("mousemove",(e=>{hideMyCursor||Date.now()-lastSent<10||distance(lastCoords,{x:e.clientX,y:e.clientY})<3||(services_client.move(e.clientX/window.innerWidth,e.clientY/window.innerHeight),lastSent=Date.now(),lastCoords={x:e.clientX,y:e.clientY})}));const cursors=new Map,timeouts=new Map;function setFavicon(e){document.querySelector("link[rel=icon]").href=e?"favicon-light.svg":"favicon-dark.svg"}services_client.on("welcome",(e=>{cursors.forEach((e=>e.parentNode.removeChild(e))),cursors.clear()})),services_client.on("join",(e=>{if(cursors.has(e.id))return;const t=new src_components_pv_cursor_pv_cursor;t.setAttribute("name",e.name),t.setAttribute("color",e.color),t.classList.add("idle"),t.style.left=e.x*window.innerWidth+"px",t.style.top=e.y*window.innerHeight+"px",t.style.color=e.color,document.body.append(t),cursors.set(e.id,t)})),services_client.on("move",(e=>{if(!cursors.has(e.id))return;const t=cursors.get(e.id);t.style.left=e.x*window.innerWidth+"px",t.style.top=e.y*window.innerHeight+"px",t.classList.remove("idle"),timeouts.has(e.id)&&(clearTimeout(timeouts.get(e.id)),timeouts.delete(e.id)),timeouts.set(e.id,setTimeout((()=>t.classList.add("idle")),1500))})),services_client.on("leave",(e=>{var t;if(!cursors.has(e.id))return;const i=cursors.get(e.id);null===(t=i.parentNode)||void 0===t||t.removeChild(i),cursors.delete(e.id)})),services_client.on("profile",(e=>{if(!cursors.has(e.id))return;const t=cursors.get(e.id);t.setAttribute("name",e.name),t.setAttribute("color",e.color)})),services_client.on("reconnecting",(()=>{Array.from(cursors.values()).forEach((e=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),cursors.clear()})),settingsmanager.on("theme",(e=>document.body.dataset.theme=e)),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(e=>setFavicon(e.matches))),setFavicon(window.matchMedia("(prefers-color-scheme: dark)").matches),loadermanager.start("Joining the room..."),settingsmanager.restore(),settingsmanager.remove("darkTheme"),settingsmanager.remove("showNotes"),settingsmanager.remove("showParticles"),settingsmanager.remove("mppLayout"),settingsmanager.remove("showFps"),settingsmanager.remove("hideMyCursor"),settingsmanager.remove("showPing"),settingsmanager.setDefault("volume",100),settingsmanager.setDefault("transpose",0),settingsmanager.setDefault("velocity",110),settingsmanager.setDefault("sustain",!1),settingsmanager.setDefault("theme","dark"),settingsmanager.setDefault("keyboardLayout","virtualpiano"),settingsmanager.setDefault("showCursors",!0),settingsmanager.setDefault("showEffects",!0),settingsmanager.setDefault("showLabels",!1),settingsmanager.setDefault("sound","salamander"),"dark"!==settingsmanager.get("theme")&&"light"!==settingsmanager.get("theme")&&settingsmanager.set("theme","dark");window.PvInternals={};"__webpack_modules__ __webpack_module_cache__ __webpack_require__ __webpack_exports__ injectStylesIntoStyleTag injectStylesIntoStyleTag_default styleDomAPI styleDomAPI_default insertBySelector insertBySelector_default setAttributesWithoutAttributes setAttributesWithoutAttributes_default insertStyleElement insertStyleElement_default styleTagTransform styleTagTransform_default style options update toCamelCase escapeHtml hsl2hex isLobby code pv_loader_pv_loader pv_loader_options pv_loader_update __esDecorate __runInitializers __classPrivateFieldGet __classPrivateFieldSet bind pv_popup pv_popup_options pv_popup_update pv_popup_esDecorate pv_popup_runInitializers pv_popup_classPrivateFieldGet pv_popup_classPrivateFieldSet pv_transpose_code pv_transpose_pv_transpose pv_transpose_options pv_transpose_update pv_transpose_runInitializers pv_transpose_esDecorate pv_transpose_classPrivateFieldGet pv_transpose_classPrivateFieldSet pv_velocity_code pv_velocity_pv_velocity pv_velocity_options pv_velocity_update pv_velocity_runInitializers pv_velocity_esDecorate pv_velocity_classPrivateFieldGet pv_velocity_classPrivateFieldSet pv_settings_code pv_settings_pv_settings pv_settings_options pv_settings_update pv_settings_esDecorate pv_settings_runInitializers pv_settings_classPrivateFieldGet pv_settings_classPrivateFieldSet pv_notification_code pv_notification_pv_notification pv_notification_options pv_notification_update pv_notification_esDecorate pv_notification_runInitializers pv_notification_classPrivateFieldGet pv_notification_classPrivateFieldSet NotificationLevel minimal Role pianoverse_NotificationLevel ServerMessage_Event ClientMessage_Event roleFromJSON roleToJSON notificationLevelFromJSON notificationLevelToJSON serverMessage_EventFromJSON serverMessage_EventToJSON clientMessage_EventFromJSON clientMessage_EventToJSON createBaseServerMessage createBaseClientMessage createBaseVoid createBaseUserInfo createBaseRoom createBaseMove createBaseKeyPress createBaseKeyRelease createBaseSustain createBaseWelcome createBaseChat createBaseEnter createBaseBan createBaseNotification isSet events events_default client_runInitializers client_esDecorate pv_new_room_code pv_new_room_pv_new_room pv_new_room_options pv_new_room_update pv_new_room_esDecorate pv_new_room_runInitializers pv_new_room_classPrivateFieldGet pv_new_room_classPrivateFieldSet role_Role __awaiter midi_runInitializers midi_esDecorate midi_awaiter MIDICommand layout_runInitializers layout_esDecorate keyboard_awaiter pv_actions_code pv_actions_pv_actions pv_actions_options pv_actions_update pv_actions_esDecorate pv_actions_runInitializers pv_actions_classPrivateFieldGet pv_actions_classPrivateFieldSet pv_devices_code pv_devices_pv_devices pv_devices_options pv_devices_update pv_devices_esDecorate pv_devices_runInitializers pv_devices_classPrivateFieldGet pv_devices_classPrivateFieldSet pv_message_code pv_message_pv_message pv_message_options pv_message_update pv_message_esDecorate pv_message_runInitializers pv_message_classPrivateFieldGet pv_message_classPrivateFieldSet pv_profile_code pv_profile_pv_profile pv_profile_options pv_profile_update pv_profile_esDecorate pv_profile_runInitializers pv_profile_classPrivateFieldGet pv_profile_classPrivateFieldSet pv_sounds_code pv_sounds_pv_sounds pv_sounds_options pv_sounds_update pv_sounds_esDecorate pv_sounds_runInitializers pv_sounds_classPrivateFieldGet pv_sounds_classPrivateFieldSet pv_rooms_code pv_rooms_pv_rooms pv_rooms_options pv_rooms_update pv_rooms_esDecorate pv_rooms_runInitializers pv_rooms_classPrivateFieldGet pv_rooms_classPrivateFieldSet pv_ban_code pv_ban_pv_ban pv_ban_options pv_ban_update pv_ban_esDecorate pv_ban_runInitializers pv_ban_classPrivateFieldGet pv_ban_classPrivateFieldSet Modal Dialog pv_toolbar_code pv_toolbar_pv_toolbar pv_toolbar_options pv_toolbar_update pv_toolbar_esDecorate pv_toolbar_runInitializers pv_toolbar_classPrivateFieldGet pv_toolbar_classPrivateFieldSet pv_header_code pv_header_pv_header pv_header_options pv_header_update pv_header_esDecorate pv_header_runInitializers pv_header_classPrivateFieldGet pv_header_classPrivateFieldSet pv_note pv_note_options pv_note_update pv_note_esDecorate pv_note_runInitializers pv_note_classPrivateFieldGet pv_note_classPrivateFieldSet randf randi pv_canvas_code pv_canvas_pv_canvas pv_canvas_options pv_canvas_update pv_canvas_esDecorate pv_canvas_runInitializers pv_canvas_classPrivateFieldGet pv_canvas_classPrivateFieldSet pv_cursor_code pv_cursor_pv_cursor pv_cursor_options pv_cursor_update pv_cursor_esDecorate pv_cursor_runInitializers pv_cursor_classPrivateFieldGet pv_cursor_classPrivateFieldSet pv_user_code pv_user_pv_user pv_user_options pv_user_update pv_user_esDecorate pv_user_runInitializers pv_user_classPrivateFieldGet pv_user_classPrivateFieldSet pv_users_code pv_users_pv_users pv_users_options pv_users_update pv_users_esDecorate pv_users_runInitializers pv_users_classPrivateFieldGet pv_users_classPrivateFieldSet pv_keys_code pv_keys_pv_keys pv_keys_options pv_keys_update pv_keys_runInitializers pv_keys_esDecorate pv_knob_code pv_knob_pv_knob pv_knob_options pv_knob_update pv_knob_esDecorate pv_knob_runInitializers pv_knob_classPrivateFieldGet pv_knob_classPrivateFieldSet pv_chat_code pv_chat_pv_chat pv_chat_options pv_chat_update pv_chat_esDecorate pv_chat_runInitializers pv_chat_classPrivateFieldGet pv_chat_classPrivateFieldSet pv_ping_code pv_ping_pv_ping pv_ping_options pv_ping_update pv_ping_esDecorate pv_ping_runInitializers pv_ping_classPrivateFieldGet pv_ping_classPrivateFieldSet pv_room_code pv_room_pv_room pv_room_options pv_room_update pv_room_esDecorate pv_room_runInitializers pv_room_classPrivateFieldGet pv_room_classPrivateFieldSet distance setFavicon components_pv_loader_pv_loader components_pv_popup_pv_popup components_popups_pv_transpose_pv_transpose components_popups_pv_velocity_pv_velocity components_popups_pv_settings_pv_settings components_pv_notification_pv_notification components_popups_pv_new_room_pv_new_room components_popups_pv_actions_pv_actions components_popups_pv_devices_pv_devices components_popups_pv_message_pv_message components_popups_pv_profile_pv_profile components_popups_pv_sounds_pv_sounds components_popups_pv_rooms_pv_rooms components_popups_pv_ban_pv_ban components_pv_toolbar_pv_toolbar components_pv_header_pv_header components_pv_note_pv_note components_pv_canvas_pv_canvas components_pv_cursor_pv_cursor components_pv_user_pv_user components_pv_users_pv_users components_pv_keys_pv_keys components_pv_knob_pv_knob components_pv_chat_pv_chat components_pv_ping_pv_ping components_pv_room_pv_room src_components_pv_loader_pv_loader src_components_pv_toolbar_pv_toolbar src_components_pv_header_pv_header src_components_pv_canvas_pv_canvas src_components_pv_cursor_pv_cursor src_components_pv_user_pv_user src_components_pv_users_pv_users src_components_pv_keys_pv_keys src_components_pv_knob_pv_knob src_components_pv_chat_pv_chat src_components_pv_ping_pv_ping src_components_pv_room_pv_room PopupManager".split(" ").forEach(z => {window.PvInternals[z]=eval(z)})})(); \ No newline at end of file diff --git a/extra.js b/extra.js new file mode 100644 index 0000000..c24e575 --- /dev/null +++ b/extra.js @@ -0,0 +1,112 @@ +// iife is only so "pv" doesn't go into globals +(() => { + const pv = window.PvInternals; + + if(pv.services_client) { + console.log("pv.me has loaded correctly") + } + + //#region custom modal + class PvmeRulesModal extends pv.components_pv_popup_pv_popup { + constructor() { + super(); + this.message = "yo" + + this.innerHTML = ` + +
          +
          + Rules +
          +
          +
          +
          +
          + pianoverse.me rules are very simple. +
            +
          • Don't be annoying
          • +
          • Don't be racist
          • +
          • Do not argue punishments
          • +
          + That's it! :) +
          +
          +
          `; + } + } + + customElements.define("pvme-rules-modal", PvmeRulesModal); + pv.Modal.RULES = "pvme-rules-modal"; + + //#endregion custom modal + //#region break PopupMananger so it takes our new popup into account + pv.PopupManager.open = (e, ...t) => { + let i; + if (i = document.querySelector(e), + i && !i.querySelector("dialog").hasAttribute("closing")) + return i.close(), + i; + switch (e) { + case pv.Modal.BAN: + i = new components_popups_pv_ban_pv_ban; + break; + case pv.Modal.PROFILE: + i = new components_popups_pv_profile_pv_profile; + break; + case pv.Modal.SETTINGS: + i = new components_popups_pv_settings_pv_settings; + break; + case pv.Modal.MESSAGE: + i = new components_popups_pv_message_pv_message; + break; + case pv.Modal.NEW_ROOM: + i = new components_popups_pv_new_room_pv_new_room; + break; + case pv.Modal.NEW_ROOM: + i = new components_popups_pv_new_room_pv_new_room; + break; + case pv.Modal.RULES: + i = new PvmeRulesModal; + break; + case pv.Dialog.ROOMS: + i = new components_popups_pv_rooms_pv_rooms; + break; + case pv.Dialog.ACTIONS: + i = new components_popups_pv_actions_pv_actions; + break; + case pv.Dialog.DEVICES: + i = new components_popups_pv_devices_pv_devices; + break; + case pv.Dialog.SOUNDS: + i = new components_popups_pv_sounds_pv_sounds; + break; + case pv.Dialog.TRANSPOSE: + i = new components_popups_pv_transpose_pv_transpose; + break; + case pv.Dialog.VELOCITY: + i = new components_popups_pv_velocity_pv_velocity; + break; + default: + throw new Error(`Popup ${e} not found`) + } + return i && (document.body.append(i), + i.open(...t)), + i + } + //#endregion + //#region pvme rules + class PvmeRules extends HTMLElement {} + customElements.define("pvme-rules", PvmeRules); + + let g = document.querySelector("body > pv-header > div.left"); + { let a = document.createElement("div"); a.className = "divider"; a.style.marginLeft = "20px"; g.appendChild(a); } + { + let a = document.createElement("pvme-rules"); + a.innerHTML = `
          `; + a.addEventListener("click", () => { + pv.PopupManager.open(pv.Modal.RULES, null, "Rules.\nDon't be annoying.\n\nThat's it."); + }) + g.appendChild(a); + } + //#endregion pvme rules +})(); \ No newline at end of file diff --git a/index.html b/index.html index 50cd81d..bb12a9a 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,5 @@ - - @@ -34,6 +32,7 @@ Pianoverse - Play piano with your friends! + @@ -50,6 +49,4 @@ - - \ No newline at end of file diff --git a/readme.md b/readme.md index 3e1412b..98810bd 100644 --- a/readme.md +++ b/readme.md @@ -1,28 +1,27 @@ # [Pianoverse Client for pianoverse.me](https://pianoverse.me/) Extracted from the https://pianoverse.net site at 10:33, November 25. -Bundle.js has modifications to point towards "api.pianoverse.me" Commit ID: 6202927ae53e43bafd8b8fd3be1ffcaaa45426a3 -``` -let wsurl = ""; -if(!localStorage.host){ - wsurl = "wss://api.pianoverse.me"; -} else if(localStorage.host == "mainline") { - wsurl = "wss://pianoverse.net" -} else if(localStorage.host == "dev") { - wsurl = "ws://127.0.0.1:8081" -}; +## Patches +This client contains two patches, internal.patch, and ws.patch. -this._ws=new WebSocket(wsurl,"pianoverse") -``` +1. ws.patch -s/`,services_client=client;`/`,services_client=client;window.client=client;` -s/`this._ws=new WebSocket("wss://pianoverse.net","pianoverse")`/`let wsurl="";if(!localStorage.host){wsurl = "wss://api.pianoverse.me";}else if(localStorage.host=="mainline"){wsurl="wss://pianoverse.net"}else if(localStorage.host == "dev"){wsurl="ws://127.0.0.1:8081"};this._ws=new WebSocket(wsurl,"pianoverse")` +| localStorage.host value | connnects to | +|:-----------------------:|:-----------------:| +| | api.pianoverse.me | +| mainline | pianoverse.net | +| dev | 127.0.0.1:8081 | -To reverse these modifications, run `localStorage.host = "mainline"`. You can also make it point towards 127.0.0.1:8081 with `localStorage.host = "dev"` +2. internal.patch +Exposes all internal pianoverse APIs on window.PvInternals. -Nushell script for downloading all sounds: -```nu -for $x in 21..108 {wget $"https://pianoverse.net/sounds/salamander/($x).mp3"} -``` + +Use nushell and `build/createPatchedBundle.nu` in the root to create a bundle.js. + +## extra.js +extra.js is a quick attempt to implement a new feature for Pianoverse with the internal APIs, which is possible, however hard. It adds a simple button for rules and a new modal. It **requires the internal patch** and for it to be added in index.html. + +## Sounds +Use the `build/downloadSounds.nu` nushell script to download all sounds. \ No newline at end of file