diff --git a/bundle.js b/bundle.js index d303eb5..cecb43b 100644 --- a/bundle.js +++ b/bundle.js @@ -1,3 +1,3 @@ /*patched bundle*/ /*use localStorage.host = "dev" to switch to dev*/ -(()=>{"use strict";var __webpack_modules__={8045:e=>{e.exports=function(e,t){for(var o=new Array(arguments.length-1),i=0,n=2,s=!0;n{var o=t;o.length=function(e){var t=e.length;if(!t)return 0;for(var o=0;--t%4>1&&"="===e.charAt(t);)++o;return Math.ceil(3*e.length)/4-o};for(var i=new Array(64),n=new Array(123),s=0;s<64;)n[i[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;o.encode=function(e,t,o){for(var n,s=null,r=[],a=0,l=0;t>2],n=(3&d)<<4,l=1;break;case 1:r[a++]=i[n|d>>4],n=(15&d)<<2,l=2;break;case 2:r[a++]=i[n|d>>6],r[a++]=i[63&d],l=0}a>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,r)),a=0)}return l&&(r[a++]=i[n],r[a++]=61,1===l&&(r[a++]=61)),s?(a&&s.push(String.fromCharCode.apply(String,r.slice(0,a))),s.join("")):String.fromCharCode.apply(String,r.slice(0,a))};var r="invalid encoding";o.decode=function(e,t,o){for(var i,s=o,a=0,l=0;l1)break;if(void 0===(d=n[d]))throw Error(r);switch(a){case 0:i=d,a=1;break;case 1:t[o++]=i<<2|(48&d)>>4,i=d,a=2;break;case 2:t[o++]=(15&i)<<4|(60&d)>>2,i=d,a=3;break;case 3:t[o++]=(3&i)<<6|d,a=0}}if(1===a)throw Error(r);return o-s},o.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,o){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:o||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 o=this._listeners[e],i=0;i{function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),o=new Uint8Array(t.buffer),i=128===o[3];function n(e,i,n){t[0]=e,i[n]=o[0],i[n+1]=o[1],i[n+2]=o[2],i[n+3]=o[3]}function s(e,i,n){t[0]=e,i[n]=o[3],i[n+1]=o[2],i[n+2]=o[1],i[n+3]=o[0]}function r(e,i){return o[0]=e[i],o[1]=e[i+1],o[2]=e[i+2],o[3]=e[i+3],t[0]}function a(e,i){return o[3]=e[i],o[2]=e[i+1],o[1]=e[i+2],o[0]=e[i+3],t[0]}e.writeFloatLE=i?n:s,e.writeFloatBE=i?s:n,e.readFloatLE=i?r:a,e.readFloatBE=i?a:r}():function(){function t(e,t,o,i){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,o,i);else if(isNaN(t))e(2143289344,o,i);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,o,i);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,o,i);else{var s=Math.floor(Math.log(t)/Math.LN2);e((n<<31|s+127<<23|8388607&Math.round(t*Math.pow(2,-s)*8388608))>>>0,o,i)}}function r(e,t,o){var i=e(t,o),n=2*(i>>31)+1,s=i>>>23&255,r=8388607&i;return 255===s?r?NaN:n*(1/0):0===s?1401298464324817e-60*n*r:n*Math.pow(2,s-150)*(r+8388608)}e.writeFloatLE=t.bind(null,o),e.writeFloatBE=t.bind(null,i),e.readFloatLE=r.bind(null,n),e.readFloatBE=r.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),o=new Uint8Array(t.buffer),i=128===o[7];function n(e,i,n){t[0]=e,i[n]=o[0],i[n+1]=o[1],i[n+2]=o[2],i[n+3]=o[3],i[n+4]=o[4],i[n+5]=o[5],i[n+6]=o[6],i[n+7]=o[7]}function s(e,i,n){t[0]=e,i[n]=o[7],i[n+1]=o[6],i[n+2]=o[5],i[n+3]=o[4],i[n+4]=o[3],i[n+5]=o[2],i[n+6]=o[1],i[n+7]=o[0]}function r(e,i){return o[0]=e[i],o[1]=e[i+1],o[2]=e[i+2],o[3]=e[i+3],o[4]=e[i+4],o[5]=e[i+5],o[6]=e[i+6],o[7]=e[i+7],t[0]}function a(e,i){return o[7]=e[i],o[6]=e[i+1],o[5]=e[i+2],o[4]=e[i+3],o[3]=e[i+4],o[2]=e[i+5],o[1]=e[i+6],o[0]=e[i+7],t[0]}e.writeDoubleLE=i?n:s,e.writeDoubleBE=i?s:n,e.readDoubleLE=i?r:a,e.readDoubleBE=i?a:r}():function(){function t(e,t,o,i,n,s){var r=i<0?1:0;if(r&&(i=-i),0===i)e(0,n,s+t),e(1/i>0?0:2147483648,n,s+o);else if(isNaN(i))e(0,n,s+t),e(2146959360,n,s+o);else if(i>17976931348623157e292)e(0,n,s+t),e((r<<31|2146435072)>>>0,n,s+o);else{var a;if(i<22250738585072014e-324)e((a=i/5e-324)>>>0,n,s+t),e((r<<31|a/4294967296)>>>0,n,s+o);else{var l=Math.floor(Math.log(i)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=i*Math.pow(2,-l))>>>0,n,s+t),e((r<<31|l+1023<<20|1048576*a&1048575)>>>0,n,s+o)}}}function r(e,t,o,i,n){var s=e(i,n+t),r=e(i,n+o),a=2*(r>>31)+1,l=r>>>20&2047,d=4294967296*(1048575&r)+s;return 2047===l?d?NaN:a*(1/0):0===l?5e-324*a*d:a*Math.pow(2,l-1075)*(d+4503599627370496)}e.writeDoubleLE=t.bind(null,o,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=r.bind(null,n,0,4),e.readDoubleBE=r.bind(null,s,4,0)}(),e}function o(e,t,o){t[o]=255&e,t[o+1]=e>>>8&255,t[o+2]=e>>>16&255,t[o+3]=e>>>24}function i(e,t,o){t[o]=e>>>24,t[o+1]=e>>>16&255,t[o+2]=e>>>8&255,t[o+3]=255&e}function n(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,o){var i=o||8192,n=i>>>1,s=null,r=i;return function(o){if(o<1||o>n)return e(o);r+o>i&&(s=e(i),r=0);var a=t.call(s,r,r+=o);return 7&r&&(r=1+(7|r)),a}}},1447:(e,t)=>{var o=t;o.length=function(e){for(var t=0,o=0,i=0;i191&&i<224?s[r++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,s[r++]=55296+(i>>10),s[r++]=56320+(1023&i)):s[r++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],r>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,s)),r=0);return n?(r&&n.push(String.fromCharCode.apply(String,s.slice(0,r))),n.join("")):String.fromCharCode.apply(String,s.slice(0,r))},o.write=function(e,t,o){for(var i,n,s=o,r=0;r>6|192,t[o++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=e.charCodeAt(r+1)))?(i=65536+((1023&i)<<10)+(1023&n),++r,t[o++]=i>>18|240,t[o++]=i>>12&63|128,t[o++]=i>>6&63|128,t[o++]=63&i|128):(t[o++]=i>>12|224,t[o++]=i>>6&63|128,t[o++]=63&i|128);return o-s}},4912:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=new URL(o(1873),o.b),u=r()(n()),p=l()(d),h=l()(c);u.push([e.id,`dialog{padding:0;border-radius:10px;background-color:var(--color-background);outline:none;border:2px solid var(--color-cards);box-shadow:var(--box-shadow);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-cards)}dialog .header .title i{font-size:.87em;margin-right:5px}dialog .header .x{opacity:.4;transition:120ms}dialog .header .x:hover{opacity:1;cursor:url(${p}),auto}dialog .header .x:hover *{cursor:url(${p}),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]{z-index:150}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(6px);backdrop-filter:blur(6px);background-color:rgba(0,0,0,.8);cursor:url(${h}),auto}dialog:not([modal]){z-index:100}dialog:not([modal]):before,dialog:not([modal]):after{content:"";width:0;height:0;position:absolute;border-top:12px solid rgba(0,0,0,0);border-bottom:12px solid rgba(0,0,0,0);border-right:12px solid rgba(0,0,0,0);border-left:12px solid rgba(0,0,0,0);pointer-events:none}dialog:not([modal]):after{border-bottom:12px solid var(--color-background);left:calc(50% - 12px - var(--offset, 0px));top:-24px}dialog:not([modal]):before{border-bottom:12px solid var(--color-cards);left:calc(50% - 12px - var(--offset, 0px));top:-26px}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(${h}),auto;pointer-events:all}`,""]);const v=u},7966:(e,t,o)=>{o.d(t,{A:()=>p});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=r()(n()),u=l()(d);c.push([e.id,`pv-actions dialog{min-width:170px}pv-actions dialog .content{padding:0;color:var(--color-text);z-index:90;padding:4px}pv-actions dialog .content div{border-radius:6px;padding:9px 32px 9px 10px;cursor:url(${u}),auto;z-index:200;transition:120ms}pv-actions dialog .content div:hover{background-color:var(--color-cards)}pv-actions dialog .content div i{margin-right:6px}pv-actions dialog .content .unmute-notes,pv-actions dialog .content .unmute-chat{color:var(--color-muted);display:none}`,""]);const p=c},8138:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-ban dialog{width:290px}pv-ban dialog .content{gap:8px}pv-ban dialog .content select{padding:7px 5px}",""]);const a=r},9264:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-banip dialog{width:290px}pv-banip dialog .content{gap:8px}pv-banip dialog .content select{padding:7px 5px}",""]);const a=r},6138:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-devices dialog{width:max-content;min-width:260px}pv-devices dialog .content .inputs,pv-devices dialog .content .outputs{display:flex;flex-direction:column;gap:10px}pv-devices dialog .content .inputs .field,pv-devices dialog .content .outputs .field{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px}pv-devices dialog .content .inputs .field .muted,pv-devices dialog .content .outputs .field .muted{color:var(--color-text);opacity:.4}pv-devices dialog .content .inputs{margin-bottom:20px}",""]);const a=r},9114:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-message dialog{width:330px}pv-message dialog .content .message{margin-bottom:0px}",""]);const a=r},9728:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.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:.9em;margin-left:3px;opacity:.5}pv-new-room dialog .content .private{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:.9em}",""]);const a=r},8394:(e,t,o)=>{o.d(t,{A:()=>p});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=r()(n()),u=l()(d);c.push([e.id,`pv-profile dialog{width:280px}pv-profile dialog .content{gap:8px}pv-profile dialog .content .field{position:relative;display:flex;flex-direction:column;gap:3px}pv-profile dialog .content .field label{font-size:.9em;margin-left:3px;opacity:.5}pv-profile dialog .content .input-color-text{position:relative}pv-profile dialog .content input[type=color]{position:absolute;height:28px;width:28px;bottom:7px;right:7px;border:none;outline:none;cursor:url(${u}),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:5px;transition:filter 120ms}pv-profile dialog .content input[type=color]::-webkit-color-swatch:hover{filter:brightness(1.1)}pv-profile dialog .content input[type=color]::-moz-color-swatch{border:none}pv-profile dialog .content input[type=color]::-webkit-color-swatch-wrapper{border:none;padding:0;margin:0}`,""]);const p=c},672:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-settings dialog{min-width:320px}pv-settings dialog .content .container{display:flex;flex-direction:column;justify-content:flex-start;gap:2px}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:42%}pv-settings dialog .content .container .buttons{font-size:.85em}",""]);const a=r},5500:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-sounds dialog{width:max-content;width:200px}pv-sounds dialog .content{display:flex;flex-direction:column;gap:12px}",""]);const a=r},5734:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"@keyframes delayedFadeOut{0%{opacity:.6}80%{opacity:.6}100%{opacity:0}}pv-canvas{display:flex;position:relative;flex-direction:column;background-color:var(--color-canvas);border-top-left-radius:10px;border-top-right-radius:10px;overflow:hidden;flex:1}pv-canvas .info{position:absolute;bottom:8px;left:10px;color:#fff;font-size:.8em;opacity:0}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}",""]);const a=r},9546:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9738),o.b),c=new URL(o(9662),o.b),u=r()(n()),p=l()(d),h=l()(c);u.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:12px;gap:2px;margin:0;list-style-type:none;background-color:var(--color-background);z-index:25}pv-chat .messages :first-child{margin-top:auto}pv-chat .messages .message{user-select:text;cursor:url(${p}),auto;overflow-wrap:anywhere;width:100%;animation:slideUpIn 120ms ease-in-out;padding:0 6px;clip-path:view-box}pv-chat .messages .message .username{user-select:text;cursor:url(${p}),auto;margin-right:8px;font-weight:bold}pv-chat .messages .message .username .bi-discord{color:#5865f2}pv-chat .messages .message .mention{background-color:var(--color-hover);color:var(--color-text);cursor:url(${h}),auto;border-radius:2px;font-weight:bold;transition:120ms}pv-chat .messages .message .mention:hover{background-color:var(--color-text);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 .typing{display:flex;font-style:italic;animation:none;width:100%;opacity:.4;font-size:.9em;margin-left:10px;margin-bottom:2px}pv-chat .footer{display:flex;align-items:center;padding:4px 12px 4px 12px;background-color:var(--color-cards);border-radius:10px;z-index:25}pv-chat .footer input[type=text]{padding:8px 0}pv-chat .footer button{background-color:rgba(0,0,0,0);cursor:url(${h}),auto;padding:4px 4px 2px 8px;font-size:1em;border:none;border-radius:0;box-shadow:none;margin:0;flex:0;color:var(--color-text)}pv-chat .footer button i{opacity:.4;cursor:url(${h}),auto;transition:120ms;font-size:1.1em}pv-chat .footer button:hover{background:rgba(0,0,0,0)}pv-chat .footer button:hover i{opacity:1}`,""]);const v=u},6610:(e,t,o)=>{o.d(t,{A:()=>p});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(1873),o.b),c=r()(n()),u=l()(d);c.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(${u});pointer-events:none;animation-name:heartbeat;animation-duration:.6s;animation-timing-function:linear;animation-iteration-count:infinite}pv-cursor .badge{padding:3px 8px;font-size:.9em;font-weight:bold;margin-top:20px;margin-left:9px;max-width:170px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-color:var(--color-hover);border-radius:10px}`,""]);const p=c},5750:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-keys{display:flex;flex-direction:row;gap:1px;width:100%;aspect-ratio:8;overflow:hidden;border-bottom-left-radius:10px;border-bottom-right-radius:10px;min-height:100px;background-color:var(--color-hover)}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:var(--color-canvas);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;filter:brightness(0.7)}pv-keys .key .black.loading{opacity:.3}pv-keys .key .black.show-label[data-label]::after{color:#fff;font-size:.5vw}",""]);const a=r},5146:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,'@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(-3px)}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 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)}}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(6px);backdrop-filter:blur(6px);color:var(--color-white-3);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:var(--color-white-3);color:var(--color-white-3);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:20px;box-sizing:border-box;animation:waveform .3s .3s linear infinite alternate}pv-loader .animation .loader::before{left:-20px;animation-delay:0s}pv-loader .caption{color:var(--color-white-3);text-align:center;font-size:1.1rem;margin-top:1rem}pv-loader.closing{animation:slideDownOut 200ms forwards;animation-delay:500ms;pointer-events:none}',""]);const a=r},1230:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.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:8px;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:8px;border-bottom-right-radius:8px;animation-name:release}",""]);const a=r},1358:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"@keyframes fadeInTransparent1{from{opacity:0}to{opacity:1}}pv-ping{position:relative;margin-left:4px;margin-top:-2px;margin-bottom:6px;display:flex;flex-direction:row;align-items:center;gap:6px;animation:fadeInTransparent1 400ms forwards ease-out}pv-ping .icon{width:7px;height:7px;border-radius:50%;background-color:var(--color-text);opacity:.6}pv-ping .icon.green{background-color:var(--color-green);animation:greenPulse 5s infinite}pv-ping .icon.orange{background-color:var(--color-orange);animation:orangePulse 5s infinite}pv-ping .icon.red{background-color:var(--color-red);animation:redPulse 5s infinite}pv-ping .ms{color:var(--color-text);font-size:.8em;opacity:.6}",""]);const a=r},6898:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=new URL(o(1873),o.b),u=r()(n()),p=l()(d),h=l()(c);u.push([e.id,`pv-room{display:flex;flex-direction:row;justify-content:space-between;width:20vw;position:relative;gap:2px}pv-room .room-selector{position:relative;display:flex;flex-direction:row;justify-content:space-between;font-weight:bold;padding:10px 12px;border-radius:10px;cursor:url(${p}),auto;gap:10px;background-color:var(--color-cards);z-index:90;max-width:calc(100% - 48px);width:calc(100% - 48px);height:46px;transition:120ms;border-top-right-radius:0;border-bottom-right-radius:0}pv-room .room-selector *{cursor:url(${p}),auto}pv-room .room-selector:hover:not(:has(.room-list:hover)){background-color:var(--color-hover)}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-selector .subtitle{font-weight:bold;font-size:1.2em;opacity:.4;min-width:max-content}pv-room .room-selector .arrow{font-weight:bold;font-size:1.2em}pv-room .room-list{position:absolute;top:calc(100% + 6px);left:0;width:max(20vw,100%);max-height:60vh;cursor:url(${h}),auto;border-radius:10px;background-color:var(--color-cards);border:0px solid var(--color-hover);display:flex;flex-direction:column;overflow:auto;font-weight:normal;box-shadow:var(--box-shadow);transition:120ms;opacity:1;animation:slideDownIn 100ms ease-out}pv-room .room-list[hidden]{pointer-events:none;animation:slideUpOut 100ms ease-out;opacity:0}pv-room .room-list>*{font-weight:bold;padding:10px 12px;display:flex;justify-content:space-between;transition:120ms}pv-room .room-list>* .room-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;max-width:80%}pv-room .room-list>* .room-count{pointer-events:none}pv-room .room-list>*:hover{background-color:var(--color-hover)}pv-room .room-list>*:not([data-id]){color:color-mix(in lch, var(--color-text), var(--color-background))}pv-room .settings{display:flex;justify-content:center;align-items:center;box-sizing:border-box;height:46px;width:46px;transition:120ms;border-top-left-radius:0;border-bottom-left-radius:0;flex:0}pv-room .settings i{font-size:1.2em;padding:0;cursor:url(${p}),auto}`,""]);const v=u},2732:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=new URL(o(1873),o.b),u=r()(n()),p=l()(d),h=l()(c);u.push([e.id,`pv-toolbar{width:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--color-text);background-color:rgba(0,0,0,0);height:46px;margin-bottom:6px;gap:6px}pv-toolbar .left,pv-toolbar .right,pv-toolbar .center{display:flex;flex-direction:row;align-items:center;gap:2px}pv-toolbar .left .volume,pv-toolbar .right .volume,pv-toolbar .center .volume{display:flex;flex-direction:row;justify-content:space-between;font-size:1.3em;padding-right:14px}pv-toolbar .left .volume i,pv-toolbar .right .volume i,pv-toolbar .center .volume i{height:100%;aspect-ratio:1;display:flex;justify-content:center;align-items:center;margin-left:2px;cursor:url(${p}),auto}pv-toolbar .left>button,pv-toolbar .right>button,pv-toolbar .center>button{aspect-ratio:1;font-size:1.3em}pv-toolbar .left .fps,pv-toolbar .right .fps,pv-toolbar .center .fps{font-size:12px;cursor:url(${h}),auto}pv-toolbar .left>*,pv-toolbar .right>*,pv-toolbar .center>*{background-color:var(--color-cards);height:46px;border-radius:0;display:flex;justify-content:center;align-items:center;transition:120ms}pv-toolbar .left>*:not(:disabled):hover,pv-toolbar .left>*.open,pv-toolbar .right>*:not(:disabled):hover,pv-toolbar .right>*.open,pv-toolbar .center>*:not(:disabled):hover,pv-toolbar .center>*.open{background-color:var(--color-hover)}pv-toolbar .left>*:first-child,pv-toolbar .right>*:first-child,pv-toolbar .center>*:first-child{border-top-left-radius:10px;border-bottom-left-radius:10px}pv-toolbar .left>*:last-child,pv-toolbar .right>*:last-child,pv-toolbar .center>*:last-child{border-top-right-radius:10px;border-bottom-right-radius:10px}pv-toolbar .center{width:100%;justify-content:end}`,""]);const v=u},8098:(e,t,o)=>{o.d(t,{A:()=>p});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=r()(n()),u=l()(d);c.push([e.id,`pv-user{border-radius:10px;padding:4px 7px;font-size:.9em;margin:0;max-width:170px;line-height:1.4em;transition:120ms;cursor:url(${u}),auto;background-color:var(--color-cards);z-index:25;display:flex;align-items:center}pv-user.muted{opacity:.4}pv-user:hover,pv-user.open{background-color:var(--color-hover)}pv-user *{cursor:url(${u}),auto}pv-user .text{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}pv-user .badges{background-color:var(--color-badge);color:var(--color-badge-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}`,""]);const p=c},8758:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-users{display:flex;flex-direction:column;justify-content:space-between;width:20vw;position:relative}pv-users .users{display:flex;flex-wrap:wrap;max-height:25vh;margin:6px 0;gap:4px;overflow:auto}",""]);const a=r},2100:(e,t,o)=>{o.d(t,{A:()=>g});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9738),o.b),c=new URL(o(4675),o.b),u=new URL(o(9662),o.b),p=new URL(o(1873),o.b),h=r()(n());h.push([e.id,"@import url(https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css);"]),h.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;700&display=swap);"]);var v=l()(d),f=l()(c),m=l()(u),b=l()(p);h.push([e.id,`input[type=text]{flex:1;width:100%;border:none;outline:none;font-size:1em;padding-left:0;cursor:url(${v}),auto;color:var(--color-text);background-color:var(--color-cards);border-radius:10px;padding:10px}input[type=text]::placeholder{opacity:.8}input[type=text]:disabled{opacity:.4;cursor:url(${f}),auto}button{display:inline-block;outline:0;border:none;border-radius:10px;font-size:13px;background-color:var(--color-cards);color:var(--color-text);padding:9px 18px;cursor:url(${m}),auto}button>*{cursor:url(${m}),auto}button:not(:disabled):hover{background-color:var(--color-hover)}button:disabled{opacity:.4;cursor:url(${f}),auto}button:disabled>*{cursor:url(${f}),auto}.toggle{position:relative;display:inline-block;width:48px;height:28px}.toggle input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:url(${m}),auto;top:0;left:0;right:0;bottom:0;background-color:var(--color-hover);transition:120ms;border-radius:34px}.slider:before{position:absolute;bottom:5px;left:5px;content:"";background-color:#fff;border-radius:50%;transition:120ms;height:18px;width:18px}input:checked+.slider{background-color:var(--color-accent)}input:checked+.slider:before{-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:10px}a{cursor:url(${m}),auto;text-decoration:none;color:var(--color-blue);font-weight:bold}a:hover{text-decoration:underline}input[type=range]{-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);cursor:url(${m}),auto}input[type=range]::-webkit-slider-runnable-track{background:var(--color-background);border-radius:10px;height:.5rem}input[type=range]::-moz-range-track{background:var(--color-background);border-radius:10px;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(${m}),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(${m}),auto;margin-top:-0.4rem;border:none}input[type=range]:focus{outline:none}select{width:100%;font-size:.9em;padding:4px;border-radius:7px;background-color:var(--color-cards);color:var(--color-text);border:none;outline:none;cursor:url(${m}),auto}select:focus{outline:none}select option{border-radius:0px;color:inherit;background-color:var(--color-cards)}select option:disabled{color:var(--color-text);opacity:.4}select:disabled{cursor:url(${f}),auto}[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:10px;content:attr(data-tooltip);font-size:14px;padding:6px 9px;top:54px;white-space:nowrap;transform:translate3d(0, -10px, 0);transition:all 100ms ease-in-out;transition-delay:0;box-shadow:var(--box-shadow)}[data-tooltip]:hover:before{opacity:1;transform:translate3d(0, 0, 0);transition-delay:300ms}[data-tooltip].open:before{transition-delay:0ms;opacity:0}@media only screen and (max-device-width: 641px){[data-tooltip]:before{display:none}}:root{--color-white-1: #f5f5f5;--color-white-2: #e6e6e6;--color-white-3: #dbdbdb;--color-white-4: #c2c2c2;--color-black-1: #0d0d0d;--color-black-2: #181818;--color-black-3: #1d1d1d;--color-black-4: #303030;--color-accent: #09527c;--color-red: #af0d0d;--color-blue: #0073c0;--color-green: #00b400;--color-orange: #fc9700;--color-muted: #bb4949;--color-background: var(--color-black-1);--color-cards: var(--color-black-2);--color-hover: var(--color-black-3);--color-badge: var(--color-black-4);--color-badge-text: var(--color-white-4);--color-text: var(--color-white-3);--color-canvas: var(--color-black-2);--box-shadow: rgba(10, 10, 10, 0.4) 0px 2px 8px 0px}:root [data-theme=light]{--color-background: var(--color-white-1);--color-cards: var(--color-white-2);--color-hover: var(--color-white-3);--color-badge: var(--color-white-4);--color-badge-text: var(--color-black-4);--color-text: var(--color-black-1);--color-canvas: var(--color-black-2);--box-shadow: rgba(10, 10, 10, 0.1) 0px 2px 8px 0px}:root [data-theme=darker]{--color-background: black;--color-cards: var(--color-black-1);--color-hover: var(--color-black-2);--color-badge: var(--color-black-3);--color-badge-text: var(--color-white-4);--color-text: var(--color-white-3);--color-canvas: var(--color-black-1);--box-shadow: rgba(10, 10, 10, 0.4) 0px 2px 8px 0px}::selection{background-color:var(--color-text);color:var(--color-cards)}::-webkit-scrollbar{width:8px;height:16px}::-webkit-scrollbar-track{background:rgba(0,0,0,0)}::-webkit-scrollbar-thumb{background:var(--color-cards);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:var(--color-hover)}*{font-family:"Nunito Sans",sans-serif;box-sizing:border-box;user-select:none;cursor:url(${b}),auto}html{width:100vw;height:100%;overflow:hidden}html body{width:100%;height:100%;margin:0;overflow:hidden}html body>.app{position:relative;display:flex;width:100%;height:100%;background:var(--color-background);color:var(--color-text);padding:max(.8vw,8px);gap:max(.8vw,8px);overflow:hidden}html body>.app>.side{display:flex;flex-direction:column;position:relative}@media only screen and (max-device-width: 641px){html body>.app>.side{width:100%}html body>.app>.side>*{width:100%}}@media only screen and (max-device-height: 480px){html body>.app>.side{display:none}}@media only screen and (max-device-height: 480px)and (max-device-width: 641px){html body>.app>.side{display:flex}}html body>.app>.center{display:flex;flex-direction:column;overflow:hidden;border-radius:10px;width:100%;height:100%}@media only screen and (max-device-width: 641px){html body>.app>.center{display:none}}`,""]);const g=h},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",i=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),i&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),i&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,i,n,s){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(i)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},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,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,o){return Function.prototype.apply.call(e,t,o)};t=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=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(o,i){function n(o){e.removeListener(t,s),i(o)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",n),o([].slice.call(arguments))}f(e,t,s,{once:!0}),"error"!==t&&function(e,t,o){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,n)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var r=10;function a(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 d(e,t,o,i){var n,s,r;if(a(o),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,o.listener?o.listener:o),s=e._events),r=s[t]),void 0===r)r=s[t]=o,++e._eventsCount;else if("function"==typeof r?r=s[t]=i?[o,r]:[r,o]:i?r.unshift(o):r.push(o),(n=l(e))>0&&r.length>n&&!r.warned){r.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=r.length,console&&console.warn}return e}function c(){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 u(e,t,o){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:o},n=c.bind(i);return n.listener=o,i.wrapFn=n,n}function p(e,t,o){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?o?[n.listener||n]:[n]:o?function(e){for(var t=new Array(e.length),o=0;o0&&(r=t[0]),r instanceof Error)throw r;var a=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw a.context=r,a}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var d=l.length,c=v(l,d);for(o=0;o=0;s--)if(o[s]===t||o[s].listener===t){r=o[s].listener,n=s;break}if(n<0)return this;0===n?o.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6946:(e,t,o)=>{e.exports=o(4394)},4394:(e,t,o)=>{var i=t;function n(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}i.build="minimal",i.Writer=o(3449),i.BufferWriter=o(818),i.Reader=o(6237),i.BufferReader=o(3158),i.util=o(3610),i.rpc=o(5047),i.roots=o(4529),i.configure=n,n()},6237:(e,t,o)=>{e.exports=l;var i,n=o(3610),s=n.LongBits,r=n.utf8;function a(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 d,c="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")},u=function(){return n.Buffer?function(e){return(l.create=function(e){return n.Buffer.isBuffer(e)?new i(e):c(e)})(e)}:c};function p(){var e=new s(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(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 a(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 h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function v(){if(this.pos+8>this.len)throw a(this,8);return new s(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=u(),l.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,l.prototype.uint32=(d=4294967295,function(){if(d=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return d;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return d}),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 a(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,o=this.pos+e;if(o>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,o);if(t===o){var i=n.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,o)},l.prototype.string=function(){var e=this.bytes();return r.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(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){i=e,l.create=u(),i._configure();var t=n.Long?"toLong":"toNumber";n.merge(l.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return v.call(this)[t](!0)},sfixed64:function(){return v.call(this)[t](!1)}})}},3158:(e,t,o)=>{e.exports=s;var i=o(6237);(s.prototype=Object.create(i.prototype)).constructor=s;var n=o(3610);function s(e){i.call(this,e)}s._configure=function(){n.Buffer&&(s.prototype._slice=n.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,o)=>{t.Service=o(7595)},7595:(e,t,o)=>{e.exports=n;var i=o(3610);function n(e,t,o){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(o)}(n.prototype=Object.create(i.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(t,o,n,s,r){if(!s)throw TypeError("request must be specified");var a=this;if(!r)return i.asPromise(e,a,t,o,n,s);if(a.rpcImpl)try{return a.rpcImpl(t,o[a.requestDelimited?"encodeDelimited":"encode"](s).finish(),(function(e,o){if(e)return a.emit("error",e,t),r(e);if(null!==o){if(!(o instanceof n))try{o=n[a.responseDelimited?"decodeDelimited":"decode"](o)}catch(e){return a.emit("error",e,t),r(e)}return a.emit("data",o,t),r(null,o)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){r(e)}),0)}else setTimeout((function(){r(Error("already ended"))}),0)},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2239:(e,t,o)=>{e.exports=n;var i=o(3610);function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var s=n.zero=new n(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var r=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var o=e>>>0,i=(e-o)/4294967296>>>0;return t&&(i=~i>>>0,o=~o>>>0,++o>4294967295&&(o=0,++i>4294967295&&(i=0))),new n(o,i)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(i.isString(e)){if(!i.Long)return n.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):s},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,o=~this.hi>>>0;return t||(o=o+1>>>0),-(t+4294967296*o)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===r?s:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},n.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)},n.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},n.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},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return 0===o?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:o<128?9:10}},3610:function(e,t,o){var i=t;function n(e,t,o){for(var i=Object.keys(t),n=0;n0)},i.Buffer=function(){try{var e=i.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(e){return"number"==typeof e?i.Buffer?i._Buffer_allocUnsafe(e):new i.Array(e):i.Buffer?i._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},i.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(e){return e?i.LongBits.from(e).toHash():i.LongBits.zeroHash},i.longFromHash=function(e,t){var o=i.LongBits.fromHash(e);return i.Long?i.Long.fromBits(o.lo,o.hi,t):o.toNumber(Boolean(t))},i.merge=n,i.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},i.newError=s,i.ProtocolError=s("ProtocolError"),i.oneOfGetter=function(e){for(var t={},o=0;o-1;--o)if(1===t[e[o]]&&void 0!==this[e[o]]&&null!==this[e[o]])return e[o]}},i.oneOfSetter=function(e){return function(t){for(var o=0;o{e.exports=u;var i,n=o(3610),s=n.LongBits,r=n.base64,a=n.utf8;function l(e,t,o){this.fn=e,this.len=t,this.next=void 0,this.val=o}function d(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function u(){this.len=0,this.head=new l(d,0,0),this.tail=this.head,this.states=null}var p=function(){return n.Buffer?function(){return(u.create=function(){return new i})()}:function(){return new u}};function h(e,t,o){t[o]=255&e}function v(e,t){this.len=e,this.next=void 0,this.val=t}function f(e,t,o){for(;e.hi;)t[o++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[o++]=127&e.lo|128,e.lo=e.lo>>>7;t[o++]=e.lo}function m(e,t,o){t[o]=255&e,t[o+1]=e>>>8&255,t[o+2]=e>>>16&255,t[o+3]=e>>>24}u.create=p(),u.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype._push=function(e,t,o){return this.tail=this.tail.next=new l(e,t,o),this.len+=t,this},v.prototype=Object.create(l.prototype),v.prototype.fn=function(e,t,o){for(;e>127;)t[o++]=127&e|128,e>>>=7;t[o]=e},u.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new v((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},u.prototype.int32=function(e){return e<0?this._push(f,10,s.fromNumber(e)):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},u.prototype.uint64=function(e){var t=s.from(e);return this._push(f,t.length(),t)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(e){var t=s.from(e).zzEncode();return this._push(f,t.length(),t)},u.prototype.bool=function(e){return this._push(h,1,e?1:0)},u.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(e){var t=s.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},u.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var b=n.Array.prototype.set?function(e,t,o){t.set(e,o)}:function(e,t,o){for(var i=0;i>>0;if(!t)return this._push(h,1,0);if(n.isString(e)){var o=u.alloc(t=r.length(e));r.decode(e,o,0),e=o}return this.uint32(t)._push(b,t,e)},u.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},u.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(d,0,0),this.len=0,this},u.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(d,0,0),this.len=0),this},u.prototype.ldelim=function(){var e=this.head,t=this.tail,o=this.len;return this.reset().uint32(o),o&&(this.tail.next=e.next,this.tail=t,this.len+=o),this},u.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),o=0;e;)e.fn(e.val,t,o),o+=e.len,e=e.next;return t},u._configure=function(e){i=e,u.create=p(),i._configure()}},818:(e,t,o)=>{e.exports=s;var i=o(3449);(s.prototype=Object.create(i.prototype)).constructor=s;var n=o(3610);function s(){i.call(this)}function r(e,t,o){e.length<40?n.utf8.write(e,t,o):t.utf8Write?t.utf8Write(e,o):t.write(e,o)}s._configure=function(){s.alloc=n._Buffer_allocUnsafe,s.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(e,t,o){t.set(e,o)}:function(e,t,o){if(e.copy)e.copy(t,o,0,e.length);else for(var i=0;i>>0;return this.uint32(t),t&&this._push(s.writeBytesBuffer,t,e),this},s.prototype.string=function(e){var t=n.Buffer.byteLength(e);return this.uint32(t),t&&this._push(r,t,e),this},s._configure()},5072:e=>{var t=[];function o(e){for(var o=-1,i=0;i{var t={};e.exports=function(e,o){var i=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(o)}},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,o)=>{e.exports=function(e){var t=o.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(o){!function(e,t,o){var i="";o.supports&&(i+="@supports (".concat(o.supports,") {")),o.media&&(i+="@media ".concat(o.media," {"));var n=void 0!==o.layer;n&&(i+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),i+=o.css,n&&(i+="}"),o.media&&(i+="}"),o.supports&&(i+="}");var s=o.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,o)},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,o)=>{e.exports=o.p+"5dd1fe40dbea45cd26d2.cur"},9662:(e,t,o)=>{e.exports=o.p+"88b4a467a18e813218f8.cur"},9738:(e,t,o)=>{e.exports=o.p+"c7283f73cbd89e54a615.cur"},4675:(e,t,o)=>{e.exports=o.p+"27f230d7609eeee55225.cur"}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var o=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(o.exports,o,o.exports,__webpack_require__),o.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 o in t)__webpack_require__.o(t,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},__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&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var i=o.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=o[i--].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__={};(()=>{var e=__webpack_require__(5072),t=__webpack_require__.n(e),o=__webpack_require__(7825),i=__webpack_require__.n(o),n=__webpack_require__(7659),s=__webpack_require__.n(n),r=__webpack_require__(5056),a=__webpack_require__.n(r),l=__webpack_require__(540),d=__webpack_require__.n(l),c=__webpack_require__(1113),u=__webpack_require__.n(c),p=__webpack_require__(2100),h={};h.styleTagTransform=u(),h.setAttributes=a(),h.insert=s().bind(null,"head"),h.domAPI=i(),h.insertStyleElement=d(),t()(p.A,h),p.A&&p.A.locals&&p.A.locals;const v=new class{constructor(){this.settings=new Map,this.callbacks=new Map}notifyChange(e,t){const o=this.callbacks.get(e)||[];for(const e of o)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 o=this.callbacks.get(e)||[];o.push(t),this.callbacks.set(e,o)}remove(e){this.settings.delete(e),this.save()}};function f(e){const t=document.createElement("p");return t.appendChild(document.createTextNode(e)),t.innerHTML}class m extends HTMLElement{constructor(){super()}attributeChangedCallback(e,t,o){var i;this.isConnected&&(null===(i=this[`on_${e}_change`.replace(/_([a-z])/g,(e=>e[1].toUpperCase()))])||void 0===i||i.call(this,o))}}m.observedAttributes=[];const b=m,g=()=>(e,t)=>{delete e[t],Object.defineProperty(e,t,{get:function(){return this.querySelector(`.${e=t,e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}`);var e},set:void 0,enumerable:!0,configurable:!0})};function y(e,t,o){return{configurable:!0,get(){const e=o.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}var w=__webpack_require__(4912),k={};k.styleTagTransform=u(),k.setAttributes=a(),k.insert=s().bind(null,"head"),k.domAPI=i(),k.insertStyleElement=d(),t()(w.A,k),w.A&&w.A.locals&&w.A.locals;var x=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class E extends b{constructor(){super()}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){if(this.args=t,this.anchor=e,this.anchor){const e=this.anchor.getBoundingClientRect();this.popup.show();let t=0,o=e.left+e.width/2-this.popup.clientWidth/2-2,i=e.top+e.height+15;o<12&&(t=12-o,o=12),o+this.popup.clientWidth>window.innerWidth&&(t=window.innerWidth-o-this.popup.clientWidth-25,o=window.innerWidth-this.popup.clientWidth-25),this.popup.style.marginLeft=`${o}px`,this.popup.style.marginTop=`${i}px`,this.popup.style.setProperty("--offset",`${t}px`)}else this.popup.showModal()}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){const t=this.popup.getBoundingClientRect();this.isOpen()&&"OPTION"!==e.target.tagName&&!this.popup.hasAttribute("blocking")&&(e.clientXt.right||e.clientYt.bottom)&&this.close()}}x([g()],E.prototype,"popup",void 0),x([g()],E.prototype,"x",void 0),x([y],E.prototype,"close",null),x([y],E.prototype,"onMouseDown",null);var A=__webpack_require__(672),_={};_.styleTagTransform=u(),_.setAttributes=a(),_.insert=s().bind(null,"head"),_.domAPI=i(),_.insertStyleElement=d(),t()(A.A,_),A.A&&A.A.locals&&A.A.locals;var S=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class O extends E{constructor(){super(),this.innerHTML='
Settings
',this.theme.value=v.get("theme")||"dark",this.keyboardLayout.value=v.get("keyboardLayout")||"pianoverse",this.showCursors.checked=v.get("showCursors"),this.showEffects.checked=v.get("showEffects"),this.showLabels.checked=v.get("showLabels"),this.showPing.checked=v.get("showPing"),this.hideMyCursor.checked=v.get("hideMyCursor")}connectedCallback(){super.connectedCallback(),this.theme.addEventListener("change",(()=>{v.set("theme",this.theme.value)})),this.keyboardLayout.addEventListener("change",(()=>{v.set("keyboardLayout",this.keyboardLayout.value)})),this.showEffects.addEventListener("change",(()=>{v.set("showEffects",this.showEffects.checked)})),this.showCursors.addEventListener("change",(()=>{v.set("showCursors",this.showCursors.checked)})),this.showLabels.addEventListener("change",(()=>{v.set("showLabels",this.showLabels.checked)})),this.showPing.addEventListener("change",(()=>{v.set("showPing",this.showPing.checked)})),this.hideMyCursor.addEventListener("change",(()=>{v.set("hideMyCursor",this.hideMyCursor.checked)}))}}S([g()],O.prototype,"theme",void 0),S([g()],O.prototype,"keyboardLayout",void 0),S([g()],O.prototype,"showEffects",void 0),S([g()],O.prototype,"showCursors",void 0),S([g()],O.prototype,"showLabels",void 0),S([g()],O.prototype,"showPing",void 0),S([g()],O.prototype,"hideMyCursor",void 0),customElements.define("pv-settings",O);var L=__webpack_require__(5146),C={};C.styleTagTransform=u(),C.setAttributes=a(),C.insert=s().bind(null,"head"),C.domAPI=i(),C.insertStyleElement=d(),t()(L.A,C),L.A&&L.A.locals&&L.A.locals;class T extends b{constructor(){super(),this.innerHTML='
Loading...
'}setCaption(e){this.caption.textContent=e||"Loading, please wait..."}}(function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);s>3&&r&&Object.defineProperty(t,o,r)})([g()],T.prototype,"caption",void 0),customElements.define("pv-loader",T);var R=__webpack_require__(7007),N=__webpack_require__.n(R);class P extends(N()){constructor(){super()}start(e){this.loader||(this.loader=new T,document.body.append(this.loader),at.closeDialogs(),at.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 M=new P;var I,D,j,U=__webpack_require__(6946);function B(e){switch(e){case 0:case"USER":return I.USER;case 1:case"MODERATOR":return I.MODERATOR;case 2:case"DEVELOPER":return I.DEVELOPER;default:return I.UNRECOGNIZED}}function K(e){switch(e){case I.USER:return"USER";case I.MODERATOR:return"MODERATOR";case I.DEVELOPER:return"DEVELOPER";case I.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function H(e){switch(e){case 0:case"PONG":return D.PONG;case 1:case"CHAT":return D.CHAT;case 2:case"ROOMS":return D.ROOMS;case 3:case"WELCOME":return D.WELCOME;case 4:case"MOVE":return D.MOVE;case 5:case"PRESS":return D.PRESS;case 6:case"RELEASE":return D.RELEASE;case 7:case"SUSTAIN":return D.SUSTAIN;case 8:case"PROFILE":return D.PROFILE;case 9:case"JOIN":return D.JOIN;case 10:case"LEAVE":return D.LEAVE;case 11:case"RATELIMIT":return D.RATELIMIT;case 12:case"MESSAGE":return D.MESSAGE;case 13:case"CHOWN":return D.CHOWN;case 14:case"CLEAR":return D.CLEAR;default:return D.UNRECOGNIZED}}function z(e){switch(e){case D.PONG:return"PONG";case D.CHAT:return"CHAT";case D.ROOMS:return"ROOMS";case D.WELCOME:return"WELCOME";case D.MOVE:return"MOVE";case D.PRESS:return"PRESS";case D.RELEASE:return"RELEASE";case D.SUSTAIN:return"SUSTAIN";case D.PROFILE:return"PROFILE";case D.JOIN:return"JOIN";case D.LEAVE:return"LEAVE";case D.RATELIMIT:return"RATELIMIT";case D.MESSAGE:return"MESSAGE";case D.CHOWN:return"CHOWN";case D.CLEAR:return"CLEAR";case D.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function q(e){switch(e){case 0:case"PING":return j.PING;case 1:case"ROOM":return j.ROOM;case 2:case"PROFILE":return j.PROFILE;case 3:case"CHAT":return j.CHAT;case 4:case"MOVE":return j.MOVE;case 5:case"MUTE":return j.MUTE;case 6:case"UNMUTE":return j.UNMUTE;case 7:case"KICK":return j.KICK;case 8:case"PRESS":return j.PRESS;case 9:case"RELEASE":return j.RELEASE;case 10:case"SUSTAIN":return j.SUSTAIN;case 11:case"HEARTBEAT":return j.HEARTBEAT;case 12:case"BAN":return j.BAN;case 13:case"CHOWN":return j.CHOWN;default:return j.UNRECOGNIZED}}!function(e){e[e.USER=0]="USER",e[e.MODERATOR=1]="MODERATOR",e[e.DEVELOPER=2]="DEVELOPER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(I||(I={})),function(e){e[e.PONG=0]="PONG",e[e.CHAT=1]="CHAT",e[e.ROOMS=2]="ROOMS",e[e.WELCOME=3]="WELCOME",e[e.MOVE=4]="MOVE",e[e.PRESS=5]="PRESS",e[e.RELEASE=6]="RELEASE",e[e.SUSTAIN=7]="SUSTAIN",e[e.PROFILE=8]="PROFILE",e[e.JOIN=9]="JOIN",e[e.LEAVE=10]="LEAVE",e[e.RATELIMIT=11]="RATELIMIT",e[e.MESSAGE=12]="MESSAGE",e[e.CHOWN=13]="CHOWN",e[e.CLEAR=14]="CLEAR",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(D||(D={})),function(e){e[e.PING=0]="PING",e[e.ROOM=1]="ROOM",e[e.PROFILE=2]="PROFILE",e[e.CHAT=3]="CHAT",e[e.MOVE=4]="MOVE",e[e.MUTE=5]="MUTE",e[e.UNMUTE=6]="UNMUTE",e[e.KICK=7]="KICK",e[e.PRESS=8]="PRESS",e[e.RELEASE=9]="RELEASE",e[e.SUSTAIN=10]="SUSTAIN",e[e.HEARTBEAT=11]="HEARTBEAT",e[e.BAN=12]="BAN",e[e.CHOWN=13]="CHOWN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(j||(j={}));const F={encode(e,t=U.Writer.create()){0!==e.event&&t.uint32(8).int32(e.event),void 0!==e.pong&&J.encode(e.pong,t.uint32(18).fork()).ldelim(),void 0!==e.chat&&ee.encode(e.chat,t.uint32(26).fork()).ldelim();for(const o of e.rooms)W.encode(o,t.uint32(34).fork()).ldelim();return void 0!==e.welcome&&Q.encode(e.welcome,t.uint32(42).fork()).ldelim(),void 0!==e.move&&V.encode(e.move,t.uint32(50).fork()).ldelim(),void 0!==e.press&&Y.encode(e.press,t.uint32(58).fork()).ldelim(),void 0!==e.release&&X.encode(e.release,t.uint32(66).fork()).ldelim(),void 0!==e.sustain&&Z.encode(e.sustain,t.uint32(74).fork()).ldelim(),void 0!==e.profile&&G.encode(e.profile,t.uint32(82).fork()).ldelim(),void 0!==e.join&&G.encode(e.join,t.uint32(90).fork()).ldelim(),""!==e.leave&&t.uint32(98).string(e.leave),0!==e.ratelimit&&t.uint32(104).uint32(e.ratelimit),""!==e.message&&t.uint32(114).string(e.message),""!==e.chown&&t.uint32(122).string(e.chown),void 0!==e.clear&&J.encode(e.clear,t.uint32(130).fork()).ldelim(),t},decode(e,t){const o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={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,message:"",chown:"",clear:void 0};for(;o.pos>>3){case 1:if(8!==e)break;n.event=o.int32();continue;case 2:if(18!==e)break;n.pong=J.decode(o,o.uint32());continue;case 3:if(26!==e)break;n.chat=ee.decode(o,o.uint32());continue;case 4:if(34!==e)break;n.rooms.push(W.decode(o,o.uint32()));continue;case 5:if(42!==e)break;n.welcome=Q.decode(o,o.uint32());continue;case 6:if(50!==e)break;n.move=V.decode(o,o.uint32());continue;case 7:if(58!==e)break;n.press=Y.decode(o,o.uint32());continue;case 8:if(66!==e)break;n.release=X.decode(o,o.uint32());continue;case 9:if(74!==e)break;n.sustain=Z.decode(o,o.uint32());continue;case 10:if(82!==e)break;n.profile=G.decode(o,o.uint32());continue;case 11:if(90!==e)break;n.join=G.decode(o,o.uint32());continue;case 12:if(98!==e)break;n.leave=o.string();continue;case 13:if(104!==e)break;n.ratelimit=o.uint32();continue;case 14:if(114!==e)break;n.message=o.string();continue;case 15:if(122!==e)break;n.chown=o.string();continue;case 16:if(130!==e)break;n.clear=J.decode(o,o.uint32());continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({event:ie(e.event)?H(e.event):0,pong:ie(e.pong)?J.fromJSON(e.pong):void 0,chat:ie(e.chat)?ee.fromJSON(e.chat):void 0,rooms:globalThis.Array.isArray(null==e?void 0:e.rooms)?e.rooms.map((e=>W.fromJSON(e))):[],welcome:ie(e.welcome)?Q.fromJSON(e.welcome):void 0,move:ie(e.move)?V.fromJSON(e.move):void 0,press:ie(e.press)?Y.fromJSON(e.press):void 0,release:ie(e.release)?X.fromJSON(e.release):void 0,sustain:ie(e.sustain)?Z.fromJSON(e.sustain):void 0,profile:ie(e.profile)?G.fromJSON(e.profile):void 0,join:ie(e.join)?G.fromJSON(e.join):void 0,leave:ie(e.leave)?globalThis.String(e.leave):"",ratelimit:ie(e.ratelimit)?globalThis.Number(e.ratelimit):0,message:ie(e.message)?globalThis.String(e.message):"",chown:ie(e.chown)?globalThis.String(e.chown):"",clear:ie(e.clear)?J.fromJSON(e.clear):void 0}),toJSON(e){var t;const o={};return 0!==e.event&&(o.event=z(e.event)),void 0!==e.pong&&(o.pong=J.toJSON(e.pong)),void 0!==e.chat&&(o.chat=ee.toJSON(e.chat)),(null===(t=e.rooms)||void 0===t?void 0:t.length)&&(o.rooms=e.rooms.map((e=>W.toJSON(e)))),void 0!==e.welcome&&(o.welcome=Q.toJSON(e.welcome)),void 0!==e.move&&(o.move=V.toJSON(e.move)),void 0!==e.press&&(o.press=Y.toJSON(e.press)),void 0!==e.release&&(o.release=X.toJSON(e.release)),void 0!==e.sustain&&(o.sustain=Z.toJSON(e.sustain)),void 0!==e.profile&&(o.profile=G.toJSON(e.profile)),void 0!==e.join&&(o.join=G.toJSON(e.join)),""!==e.leave&&(o.leave=e.leave),0!==e.ratelimit&&(o.ratelimit=Math.round(e.ratelimit)),""!==e.message&&(o.message=e.message),""!==e.chown&&(o.chown=e.chown),void 0!==e.clear&&(o.clear=J.toJSON(e.clear)),o},create:e=>F.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n,s,r;const a={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,message:"",chown:"",clear:void 0};return a.event=null!==(t=e.event)&&void 0!==t?t:0,a.pong=void 0!==e.pong&&null!==e.pong?J.fromPartial(e.pong):void 0,a.chat=void 0!==e.chat&&null!==e.chat?ee.fromPartial(e.chat):void 0,a.rooms=(null===(o=e.rooms)||void 0===o?void 0:o.map((e=>W.fromPartial(e))))||[],a.welcome=void 0!==e.welcome&&null!==e.welcome?Q.fromPartial(e.welcome):void 0,a.move=void 0!==e.move&&null!==e.move?V.fromPartial(e.move):void 0,a.press=void 0!==e.press&&null!==e.press?Y.fromPartial(e.press):void 0,a.release=void 0!==e.release&&null!==e.release?X.fromPartial(e.release):void 0,a.sustain=void 0!==e.sustain&&null!==e.sustain?Z.fromPartial(e.sustain):void 0,a.profile=void 0!==e.profile&&null!==e.profile?G.fromPartial(e.profile):void 0,a.join=void 0!==e.join&&null!==e.join?G.fromPartial(e.join):void 0,a.leave=null!==(i=e.leave)&&void 0!==i?i:"",a.ratelimit=null!==(n=e.ratelimit)&&void 0!==n?n:0,a.message=null!==(s=e.message)&&void 0!==s?s:"",a.chown=null!==(r=e.chown)&&void 0!==r?r:"",a.clear=void 0!==e.clear&&null!==e.clear?J.fromPartial(e.clear):void 0,a}},$={encode:(e,t=U.Writer.create())=>(0!==e.event&&t.uint32(8).int32(e.event),void 0!==e.ping&&J.encode(e.ping,t.uint32(18).fork()).ldelim(),void 0!==e.room&&te.encode(e.room,t.uint32(26).fork()).ldelim(),void 0!==e.profile&&G.encode(e.profile,t.uint32(34).fork()).ldelim(),""!==e.chat&&t.uint32(42).string(e.chat),void 0!==e.move&&V.encode(e.move,t.uint32(50).fork()).ldelim(),""!==e.mute&&t.uint32(58).string(e.mute),""!==e.unmute&&t.uint32(66).string(e.unmute),""!==e.kick&&t.uint32(74).string(e.kick),void 0!==e.press&&Y.encode(e.press,t.uint32(82).fork()).ldelim(),void 0!==e.release&&X.encode(e.release,t.uint32(90).fork()).ldelim(),!1!==e.sustain&&t.uint32(96).bool(e.sustain),void 0!==e.heartbeat&&J.encode(e.heartbeat,t.uint32(106).fork()).ldelim(),void 0!==e.ban&&oe.encode(e.ban,t.uint32(114).fork()).ldelim(),""!==e.chown&&t.uint32(122).string(e.chown),t),decode(e,t){const o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={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,chown:""};for(;o.pos>>3){case 1:if(8!==e)break;n.event=o.int32();continue;case 2:if(18!==e)break;n.ping=J.decode(o,o.uint32());continue;case 3:if(26!==e)break;n.room=te.decode(o,o.uint32());continue;case 4:if(34!==e)break;n.profile=G.decode(o,o.uint32());continue;case 5:if(42!==e)break;n.chat=o.string();continue;case 6:if(50!==e)break;n.move=V.decode(o,o.uint32());continue;case 7:if(58!==e)break;n.mute=o.string();continue;case 8:if(66!==e)break;n.unmute=o.string();continue;case 9:if(74!==e)break;n.kick=o.string();continue;case 10:if(82!==e)break;n.press=Y.decode(o,o.uint32());continue;case 11:if(90!==e)break;n.release=X.decode(o,o.uint32());continue;case 12:if(96!==e)break;n.sustain=o.bool();continue;case 13:if(106!==e)break;n.heartbeat=J.decode(o,o.uint32());continue;case 14:if(114!==e)break;n.ban=oe.decode(o,o.uint32());continue;case 15:if(122!==e)break;n.chown=o.string();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({event:ie(e.event)?q(e.event):0,ping:ie(e.ping)?J.fromJSON(e.ping):void 0,room:ie(e.room)?te.fromJSON(e.room):void 0,profile:ie(e.profile)?G.fromJSON(e.profile):void 0,chat:ie(e.chat)?globalThis.String(e.chat):"",move:ie(e.move)?V.fromJSON(e.move):void 0,mute:ie(e.mute)?globalThis.String(e.mute):"",unmute:ie(e.unmute)?globalThis.String(e.unmute):"",kick:ie(e.kick)?globalThis.String(e.kick):"",press:ie(e.press)?Y.fromJSON(e.press):void 0,release:ie(e.release)?X.fromJSON(e.release):void 0,sustain:!!ie(e.sustain)&&globalThis.Boolean(e.sustain),heartbeat:ie(e.heartbeat)?J.fromJSON(e.heartbeat):void 0,ban:ie(e.ban)?oe.fromJSON(e.ban):void 0,chown:ie(e.chown)?globalThis.String(e.chown):""}),toJSON(e){const t={};return 0!==e.event&&(t.event=function(e){switch(e){case j.PING:return"PING";case j.ROOM:return"ROOM";case j.PROFILE:return"PROFILE";case j.CHAT:return"CHAT";case j.MOVE:return"MOVE";case j.MUTE:return"MUTE";case j.UNMUTE:return"UNMUTE";case j.KICK:return"KICK";case j.PRESS:return"PRESS";case j.RELEASE:return"RELEASE";case j.SUSTAIN:return"SUSTAIN";case j.HEARTBEAT:return"HEARTBEAT";case j.BAN:return"BAN";case j.CHOWN:return"CHOWN";case j.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.event)),void 0!==e.ping&&(t.ping=J.toJSON(e.ping)),void 0!==e.room&&(t.room=te.toJSON(e.room)),void 0!==e.profile&&(t.profile=G.toJSON(e.profile)),""!==e.chat&&(t.chat=e.chat),void 0!==e.move&&(t.move=V.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=Y.toJSON(e.press)),void 0!==e.release&&(t.release=X.toJSON(e.release)),!1!==e.sustain&&(t.sustain=e.sustain),void 0!==e.heartbeat&&(t.heartbeat=J.toJSON(e.heartbeat)),void 0!==e.ban&&(t.ban=oe.toJSON(e.ban)),""!==e.chown&&(t.chown=e.chown),t},create:e=>$.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n,s,r,a;const l={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,chown:""};return l.event=null!==(t=e.event)&&void 0!==t?t:0,l.ping=void 0!==e.ping&&null!==e.ping?J.fromPartial(e.ping):void 0,l.room=void 0!==e.room&&null!==e.room?te.fromPartial(e.room):void 0,l.profile=void 0!==e.profile&&null!==e.profile?G.fromPartial(e.profile):void 0,l.chat=null!==(o=e.chat)&&void 0!==o?o:"",l.move=void 0!==e.move&&null!==e.move?V.fromPartial(e.move):void 0,l.mute=null!==(i=e.mute)&&void 0!==i?i:"",l.unmute=null!==(n=e.unmute)&&void 0!==n?n:"",l.kick=null!==(s=e.kick)&&void 0!==s?s:"",l.press=void 0!==e.press&&null!==e.press?Y.fromPartial(e.press):void 0,l.release=void 0!==e.release&&null!==e.release?X.fromPartial(e.release):void 0,l.sustain=null!==(r=e.sustain)&&void 0!==r&&r,l.heartbeat=void 0!==e.heartbeat&&null!==e.heartbeat?J.fromPartial(e.heartbeat):void 0,l.ban=void 0!==e.ban&&null!==e.ban?oe.fromPartial(e.ban):void 0,l.chown=null!==(a=e.chown)&&void 0!==a?a:"",l}},J={encode:(e,t=U.Writer.create())=>t,decode(e,t){const o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;for(;o.pos({}),toJSON:e=>({}),create:e=>J.fromPartial(null!=e?e:{}),fromPartial:e=>({})},G={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,name:void 0,color:void 0,role:void 0,muted:void 0,x:void 0,y:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(18!==e)break;n.name=o.string();continue;case 3:if(26!==e)break;n.color=o.string();continue;case 4:if(32!==e)break;n.role=o.int32();continue;case 5:if(40!==e)break;n.muted=o.bool();continue;case 6:if(53!==e)break;n.x=o.float();continue;case 7:if(61!==e)break;n.y=o.float();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,name:ie(e.name)?globalThis.String(e.name):void 0,color:ie(e.color)?globalThis.String(e.color):void 0,role:ie(e.role)?B(e.role):void 0,muted:ie(e.muted)?globalThis.Boolean(e.muted):void 0,x:ie(e.x)?globalThis.Number(e.x):void 0,y:ie(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=K(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=>G.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n,s,r,a;const l={id:void 0,name:void 0,color:void 0,role:void 0,muted:void 0,x:void 0,y:void 0};return l.id=null!==(t=e.id)&&void 0!==t?t:void 0,l.name=null!==(o=e.name)&&void 0!==o?o:void 0,l.color=null!==(i=e.color)&&void 0!==i?i:void 0,l.role=null!==(n=e.role)&&void 0!==n?n:void 0,l.muted=null!==(s=e.muted)&&void 0!==s?s:void 0,l.x=null!==(r=e.x)&&void 0!==r?r:void 0,l.y=null!==(a=e.y)&&void 0!==a?a:void 0,l}},W={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,count:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.count=o.uint32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,count:ie(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=>W.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={id:void 0,count:void 0};return i.id=null!==(t=e.id)&&void 0!==t?t:void 0,i.count=null!==(o=e.count)&&void 0!==o?o:void 0,i}},V={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,x:void 0,y:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(21!==e)break;n.x=o.float();continue;case 3:if(29!==e)break;n.y=o.float();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,x:ie(e.x)?globalThis.Number(e.x):void 0,y:ie(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=>V.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i;const n={id:void 0,x:void 0,y:void 0};return n.id=null!==(t=e.id)&&void 0!==t?t:void 0,n.x=null!==(o=e.x)&&void 0!==o?o:void 0,n.y=null!==(i=e.y)&&void 0!==i?i:void 0,n}},Y={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,key:void 0,vel:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.key=o.uint32();continue;case 3:if(24!==e)break;n.vel=o.uint32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,key:ie(e.key)?globalThis.Number(e.key):void 0,vel:ie(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=>Y.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i;const n={id:void 0,key:void 0,vel:void 0};return n.id=null!==(t=e.id)&&void 0!==t?t:void 0,n.key=null!==(o=e.key)&&void 0!==o?o:void 0,n.vel=null!==(i=e.vel)&&void 0!==i?i:void 0,n}},X={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,key:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.key=o.uint32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,key:ie(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=>X.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={id:void 0,key:void 0};return i.id=null!==(t=e.id)&&void 0!==t?t:void 0,i.key=null!==(o=e.key)&&void 0!==o?o:void 0,i}},Z={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,enabled:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.enabled=o.bool();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,enabled:ie(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=>Z.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={id:void 0,enabled:void 0};return i.id=null!==(t=e.id)&&void 0!==t?t:void 0,i.enabled=null!==(o=e.enabled)&&void 0!==o?o:void 0,i}},Q={encode(e,t=U.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 o of e.chat)ee.encode(o,t.uint32(50).fork()).ldelim();return void 0!==e.role&&t.uint32(56).int32(e.role),t},decode(e,t){const o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,name:void 0,color:void 0,room:void 0,owner:void 0,chat:[],role:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(18!==e)break;n.name=o.string();continue;case 3:if(26!==e)break;n.color=o.string();continue;case 4:if(34!==e)break;n.room=o.string();continue;case 5:if(42!==e)break;n.owner=o.string();continue;case 6:if(50!==e)break;n.chat.push(ee.decode(o,o.uint32()));continue;case 7:if(56!==e)break;n.role=o.int32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,name:ie(e.name)?globalThis.String(e.name):void 0,color:ie(e.color)?globalThis.String(e.color):void 0,room:ie(e.room)?globalThis.String(e.room):void 0,owner:ie(e.owner)?globalThis.String(e.owner):void 0,chat:globalThis.Array.isArray(null==e?void 0:e.chat)?e.chat.map((e=>ee.fromJSON(e))):[],role:ie(e.role)?B(e.role):void 0}),toJSON(e){var t;const o={};return void 0!==e.id&&(o.id=e.id),void 0!==e.name&&(o.name=e.name),void 0!==e.color&&(o.color=e.color),void 0!==e.room&&(o.room=e.room),void 0!==e.owner&&(o.owner=e.owner),(null===(t=e.chat)||void 0===t?void 0:t.length)&&(o.chat=e.chat.map((e=>ee.toJSON(e)))),void 0!==e.role&&(o.role=K(e.role)),o},create:e=>Q.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n,s,r,a;const l={id:void 0,name:void 0,color:void 0,room:void 0,owner:void 0,chat:[],role:void 0};return l.id=null!==(t=e.id)&&void 0!==t?t:void 0,l.name=null!==(o=e.name)&&void 0!==o?o:void 0,l.color=null!==(i=e.color)&&void 0!==i?i:void 0,l.room=null!==(n=e.room)&&void 0!==n?n:void 0,l.owner=null!==(s=e.owner)&&void 0!==s?s:void 0,l.chat=(null===(r=e.chat)||void 0===r?void 0:r.map((e=>ee.fromPartial(e))))||[],l.role=null!==(a=e.role)&&void 0!==a?a:void 0,l}},ee={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,content:void 0,name:void 0,color:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(18!==e)break;n.content=o.string();continue;case 3:if(26!==e)break;n.name=o.string();continue;case 4:if(34!==e)break;n.color=o.string();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,content:ie(e.content)?globalThis.String(e.content):void 0,name:ie(e.name)?globalThis.String(e.name):void 0,color:ie(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=>ee.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n;const s={id:void 0,content:void 0,name:void 0,color:void 0};return s.id=null!==(t=e.id)&&void 0!==t?t:void 0,s.content=null!==(o=e.content)&&void 0!==o?o:void 0,s.name=null!==(i=e.name)&&void 0!==i?i:void 0,s.color=null!==(n=e.color)&&void 0!==n?n:void 0,s}},te={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={room:void 0,private:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.room=o.string();continue;case 2:if(16!==e)break;n.private=o.bool();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({room:ie(e.room)?globalThis.String(e.room):void 0,private:ie(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=>te.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={room:void 0,private:void 0};return i.room=null!==(t=e.room)&&void 0!==t?t:void 0,i.private=null!==(o=e.private)&&void 0!==o?o:void 0,i}},oe={encode:(e,t=U.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 o=e instanceof U.Reader?e:U.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,minutes:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.minutes=o.uint32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:ie(e.id)?globalThis.String(e.id):void 0,minutes:ie(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=>oe.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={id:void 0,minutes:void 0};return i.id=null!==(t=e.id)&&void 0!==t?t:void 0,i.minutes=null!==(o=e.minutes)&&void 0!==o?o:void 0,i}};function ie(e){return null!=e}class ne extends(N()){constructor(){super(),this._users=new Map,this._popStateTriggered=!1,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.sad.ovh";}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"),M.stop();const e=new URLSearchParams(window.location.search);v.has("name")&&v.has("color")&&this.profile(v.get("name"),v.get("color")),this.enter(e.get("r")||"Lobby")},this._ws.onclose=()=>{this.emit("reconnecting"),M.start("Reconnecting..."),setTimeout(this.init,3e3)}}handleMessage(e){let t,o;const i=new FileReader;i.onload=()=>{if(i.result instanceof ArrayBuffer){const e=new Uint8Array(i.result),n=F.decode(e);t=z(n.event).toLowerCase(),o=n[t],this.handleEventData(t,o)}},i.readAsArrayBuffer(new Blob([e.data]))}handleEventData(e,t){switch(e){case"welcome":this._users=new Map;const{id:e,name:o,color:i,role:n,room:s,owner:r}=t;this.me={id:e,name:o,color:i,role:n},v.set("name",this.me.name),v.set("color",this.me.color),this.room={id:s,owner:r},this._popStateTriggered||("Lobby"===this.room.id?window.history.pushState({},"",window.location.pathname):window.history.pushState({},"",`?r=${encodeURI(this.room.id)}`)),this._popStateTriggered=!1;const a=document.querySelector("pv-toolbar"),l=document.querySelector("pv-canvas"),d=document.querySelector("pv-keys"),c=document.querySelector("pv-chat");"Backrooms"===this.room.id?(a.style.display="none",l.style.display="none",d.style.display="none",c.style.display="none"):(a.style.display="",l.style.display="",d.style.display="",c.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===se.me.id&&(v.set("name",t.name),v.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"message":at.closeEverything(),at.open(it.MESSAGE,null,t);break;case"ratelimit":const u=`You're too fast! Try again in ${t/1e3} seconds.`;at.closeEverything(),at.open(it.MESSAGE,null,u)}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($.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 o=$.create({event:j.ROOM,room:{room:e,private:t}});return this.send(o)}profile(e,t){const o=$.create({event:j.PROFILE,profile:{name:e||this.me.name,color:t||this.me.color}});return this.send(o)}chat(e){const t=$.create({event:j.CHAT,chat:e});return this.send(t)}move(e,t){const o=$.create({event:j.MOVE,move:{x:e,y:t}});return this.send(o)}chown(e){const t=$.create({event:j.CHOWN,chown:e});return this.send(t)}mute(e){this.get(e).muted=!0;const t=$.create({event:j.MUTE,mute:e});return this.send(t)}unmute(e){this.get(e).muted=!1;const t=$.create({event:j.UNMUTE,unmute:e});return this.send(t)}kick(e){const t=$.create({event:j.KICK,kick:e});return this.send(t)}ban(e,t=60){const o=$.create({event:j.BAN,ban:{id:e,minutes:t}});return this.send(o)}press(e,t){const o=$.create({event:j.PRESS,press:{key:e,vel:t}});return this.send(o)}release(e){const t=$.create({event:j.RELEASE,release:{key:e}});return this.send(t)}sustain(e){const t=$.create({event:j.SUSTAIN,sustain:e});return this.send(t)}ping(){const e=$.create({event:j.PING});return this.send(e)}heartbeat(){const e=$.create({event:j.HEARTBEAT});return this.send(e)}}!function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);s>3&&r&&Object.defineProperty(t,o,r)}([y],ne.prototype,"init",null);const se=new ne,re=se;var ae=__webpack_require__(9728),le={};le.styleTagTransform=u(),le.setAttributes=a(),le.insert=s().bind(null,"head"),le.domAPI=i(),le.insertStyleElement=d(),t()(ae.A,le),ae.A&&ae.A.locals&&ae.A.locals;var de,ce=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class ue extends E{constructor(){super(),this.innerHTML='
Create 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())&&re.enter(this.inputRoom.value.trim(),this.inputPrivate.checked)}isValid(){return this.inputRoom.value.trim().length>=2&&this.inputRoom.value.trim().length<=32}}ce([g()],ue.prototype,"inputRoom",void 0),ce([g()],ue.prototype,"inputPrivate",void 0),ce([g()],ue.prototype,"buttonSave",void 0),ce([y],ue.prototype,"handleInput",null),ce([y],ue.prototype,"handleKeyDown",null),ce([y],ue.prototype,"submit",null),customElements.define("pv-new-room",ue),function(e){e[e.USER=0]="USER",e[e.MODERATOR=1]="MODERATOR",e[e.DEVELOPER=2]="DEVELOPER"}(de||(de={}));const pe=de;var he=function(e,t,o,i){return new(o||(o=Promise))((function(n,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,a)}l((i=i.apply(e,t||[])).next())}))};class ve extends(N()){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),v.on("volume",(t=>{this.volume=t,e.gain.value=Math.min(this.volume/100,1)}))}load(e,t){return he(this,void 0,void 0,(function*(){const o=yield fetch(t),i=yield o.arrayBuffer(),n=yield this.ctx.decodeAudioData(i);return this.sounds.set(e,n),e}))}unload(e){return he(this,void 0,void 0,(function*(){this.sounds.delete(e)}))}play(e,t){t>127&&(t=127);const o=this.ctx.currentTime,i=new AudioBufferSourceNode(this.ctx,{buffer:this.sounds.get(e)}),n=new GainNode(this.ctx,{gain:t/127}),s=new StereoPannerNode(this.ctx,{pan:(Number(e)-21)/87-.5});if(i.connect(n),n.connect(s),s.connect(this.limiter),i.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,o+.2),t.source.stop(o+.21)}this.currentlyPlaying.set(e,{source:i,gain:n})}stop(e){const t=this.ctx.currentTime;if(this.currentlyPlaying.has(e)){const o=this.currentlyPlaying.get(e);o.gain.gain.setValueAtTime(o.gain.gain.value,t),o.gain.gain.linearRampToValueAtTime(.1*o.gain.gain.value,t+.16),o.gain.gain.linearRampToValueAtTime(0,t+.4),o.source.stop(t+.41),this.currentlyPlaying.delete(e)}}}const fe=new ve,me={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,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,187:75,61:75,221:76},be={Digit1:36,Digit2:38,Digit3:40,Digit4:41,Digit5:43,Digit6:45,Digit7:47,Digit8:48,Digit9:50,Digit0:52,KeyQ:53,KeyW:55,KeyE:57,KeyR:59,KeyT:60,KeyY:62,KeyU:64,KeyI:65,KeyO:67,KeyP:69,KeyA:71,KeyS:72,KeyD:74,KeyF:76,KeyG:77,KeyH:79,KeyJ:81,KeyK:83,KeyL:84,KeyZ:86,KeyX:88,KeyC:89,KeyV:91,KeyB:93,KeyN:95,KeyM:96},ge={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};var ye=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};let we=0;class ke extends(N()){constructor(){super(),this.layout=new xe,v.on("keyboardLayout",(e=>{switch(e){case"pianoverse":this.layout=new xe;break;case"multiplayerpiano":this.layout=new Ee;break;case"virtualpiano":this.layout=new Ae}})),document.addEventListener("keydown",(e=>{if(!e.repeat&&!e.metaKey){switch(e.code){case"ArrowDown":return this.transpose(-12),void e.preventDefault();case"ArrowLeft":return this.transpose(-1),void e.preventDefault();case"ArrowRight":return this.transpose(1),void e.preventDefault();case"ArrowUp":return this.transpose(12),void e.preventDefault();case"Backspace":return Te.sustain(!Te.isSustainEnabled()),void this.emit("sustain",Te.isSustainEnabled());case"Space":return Te.sustain(!0),void this.emit("sustain",!0)}this.handleKeydown(e)}})),document.addEventListener("keyup",(e=>{if(!e.repeat&&!e.metaKey)return"Space"===e.code?(Te.sustain(!1),void this.emit("sustain",!1)):void this.handleKeyup(e)}))}transpose(e){we+e>=ke.MIN_TRANSPOSE&&we+e<=ke.MAX_TRANSPOSE&&(we+=e),this.emit("transpose",we)}handleKeydown(e){this.layout.handleKeydown(e)}handleKeyup(e){this.layout.handleKeyup(e)}}ke.MIN_TRANSPOSE=-36,ke.MAX_TRANSPOSE=36,ye([y],ke.prototype,"handleKeydown",null),ye([y],ke.prototype,"handleKeyup",null);class xe{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,o=ge[e.code]+t+we;isNaN(o)||o<21||o>108||o&&!this.pressed[e.code]&&(Te.press(o,110),this.pressed[e.code]=o)}handleKeyup(e){"CapsLock"===e.code&&(this.caps=!1),this.pressed[e.code]&&(Te.release(this.pressed[e.code]),delete this.pressed[e.code])}}class Ee{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 o=me[e.keyCode]+t+we;isNaN(o)||o<21||o>108||o&&!this.pressed[e.keyCode]&&(Te.press(o,110),this.pressed[e.keyCode]=o)}handleKeyup(e){"CapsLock"===e.code&&(this.caps=!1),this.pressed[e.keyCode]&&(Te.release(this.pressed[e.keyCode]),delete this.pressed[e.keyCode])}}class Ae{constructor(){this.pressed={}}handleKeydown(e){const t=be[e.code]+(e.shiftKey?1:0)+we;isNaN(t)||t<21||t>108||t&&!this.pressed[e.code]&&(Te.press(t,110),this.pressed[e.code]=t)}handleKeyup(e){this.pressed[e.code]&&(Te.release(this.pressed[e.code]),delete this.pressed[e.code])}}const _e=new ke;var Se;!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"}(Se||(Se={}));class Oe extends(N()){get inputs(){var e;return null===(e=this.access)||void 0===e?void 0:e.inputs}get outputs(){var e;return null===(e=this.access)||void 0===e?void 0:e.outputs}constructor(){super(),this.outputIds=new Set,this.initialized=!1,this.pressed={},this.offset=0,this.init(),_e.on("transpose",(e=>this.offset=e))}init(){return e=this,t=void 0,i=function*(){try{this.access=yield navigator.requestMIDIAccess({sysex:!1,software:!1}),this.access.onstatechange=e=>{e instanceof MIDIConnectionEvent&&this.handleConnectionEvent(e.port)},this.handleConnectionEvent()}catch(e){}},new((o=void 0)||(o=Promise))((function(n,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,a)}l((i=i.apply(e,t||[])).next())}));var e,t,o,i}handleConnectionEvent(e){var t,o;e?"input"===e.type&&(this.enableInput(e.id),this.initialized||setTimeout((()=>this.initialized=!0),1e3)):(null===(t=this.inputs)||void 0===t||t.forEach((e=>this.enableInput(e.id))),null===(o=this.outputs)||void 0===o||o.forEach((e=>this.disableOutput(e.id)))),this.emit("update")}onMidiInput(e){if(9==(15&e.data[0]))return;const t=e.data[0]>>4,o=e.data[1];8==t||9==t&&0==e.data[2]?(Te.release(this.pressed[o]),delete this.pressed[o]):9==t?(this.pressed[o]=o+this.offset,Te.press(o+this.offset,e.data[2])):11==t&&64==o&&Te.sustain(e.data[2]>0)}isInputEnabled(e){var t;let o=!1;return null===(t=this.inputs)||void 0===t||t.forEach((t=>{t.id===e&&null!=t.onmidimessage&&(o=!0)})),o}enableInput(e){var t;null===(t=this.inputs)||void 0===t||t.forEach((t=>{t.id===e&&(t.onmidimessage=this.onMidiInput)}))}disableInput(e){var t;null===(t=this.inputs)||void 0===t||t.forEach((t=>{t.id===e&&(t.onmidimessage=null)}))}sendNoteOn(e,t){var o;null===(o=this.outputs)||void 0===o||o.forEach((o=>{this.outputIds.has(o.id)&&o.send([Se.NOTE_ON,e,Math.min(t,127)])}))}sendNoteOff(e){var t;null===(t=this.outputs)||void 0===t||t.forEach((t=>{this.outputIds.has(t.id)&&t.send([Se.NOTE_OFF,e,0])}))}isOutputEnabled(e){return this.outputIds.has(e)}enableOutput(e){this.outputIds.add(e)}disableOutput(e){this.outputIds.delete(e)}}!function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);s>3&&r&&Object.defineProperty(t,o,r)}([y],Oe.prototype,"onMidiInput",null);const Le=new Oe;class Ce extends R.EventEmitter{constructor(e){super(),this.audioEngine=e,this.mapSustain=new Map,this.mapPressed=new Map,this.mapSustained=new Map;const t=[];for(let e=21;e<=108;++e)t.push((()=>{return t=this,o=void 0,n=function*(){yield this.audioEngine.load(e.toString(),`sounds/salamander/${e}.mp3`),this.emit("loaded",e)},new((i=void 0)||(i=Promise))((function(e,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof i?o:new i((function(e){e(o)}))).then(r,a)}l((n=n.apply(t,o||[])).next())}));var t,o,i,n})());Promise.all(t).catch((()=>{})),re.on("press",(({key:e,vel:t,id:o})=>this.press(e,t,o))),re.on("release",(({key:e,id:t})=>this.release(e,t))),re.on("sustain",(({enabled:e,id:t})=>this.sustain(e,t))),re.on("welcome",(e=>{this.releaseAllNotes(),this.mapPressed.set(e.id,new Set),this.mapSustained.set(e.id,new Set),this.mapSustain.set(e.id,!1)})),re.on("join",(e=>{this.mapPressed.set(e.id,new Set),this.mapSustained.set(e.id,new Set),this.mapSustain.set(e.id,!1)})),re.on("leave",(e=>{this.releaseAllNotesFrom(e.id),this.mapPressed.delete(e.id),this.mapSustained.delete(e.id),this.mapSustain.delete(e.id)}))}press(e,t,o){var i,n;this.audioEngine.play(e.toString(),t),Le.sendNoteOn(e,t),o||(o=re.me.id,re.press(e,t)),(null===(i=this.mapPressed.get(o))||void 0===i?void 0:i.has(e))&&this.emit("release",e),null===(n=this.mapPressed.get(o))||void 0===n||n.add(e),this.mapSustain.get(o)&&this.mapSustained.get(o).add(e),this.emit("press",e,t,o)}release(e,t){var o,i;this.emit("release",e),t||(t=re.me.id,re.release(e)),null===(o=this.mapPressed.get(t))||void 0===o||o.delete(e),(null===(i=this.mapSustained.get(t))||void 0===i?void 0:i.has(e))||(this.audioEngine.stop(null==e?void 0:e.toString()),Le.sendNoteOff(e))}sustain(e,t){t||(t=re.me.id,re.sustain(e)),this.mapSustain.set(t,e),e?this.mapPressed.get(t).forEach((e=>this.mapSustained.get(t).add(e))):(this.mapSustained.get(t).forEach((e=>{this.mapPressed.get(t).has(e)||(this.mapSustained.get(t).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(re.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(re.me.id)}}Ce.MIN_TRANSPOSE=-36,Ce.MAX_TRANSPOSE=36;const Te=new Ce(fe);var Re=__webpack_require__(7966),Ne={};Ne.styleTagTransform=u(),Ne.setAttributes=a(),Ne.insert=s().bind(null,"head"),Ne.domAPI=i(),Ne.insertStyleElement=d(),t()(Re.A,Ne),Re.A&&Re.A.locals&&Re.A.locals;var Pe=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Me extends E{constructor(){super(),this.innerHTML='
Promote
Demote
Make owner
Mute notes
Muted notes
Mute chat
Muted chat
Kick
Ban
Ban IP
',re.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),e===re.room.owner||re.me.id!==re.room.owner&&re.me.role!==pe.DEVELOPER?this.chown.style.display="none":this.chown.style.display="block",re.me.role===pe.DEVELOPER?(this.banip.style.display="block",re.get(e).role===pe.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"),re.get(e).muted?(this.unmuteNotes.style.display="block",this.muteNotes.style.display="none"):(this.unmuteNotes.style.display="none",this.muteNotes.style.display="block"),re.get(e).mutedChat?(this.unmuteChat.style.display="block",this.muteChat.style.display="none"):(this.unmuteChat.style.display="none",this.muteChat.style.display="block"),(re.me.id===re.room.owner||re.me.role===pe.MODERATOR||re.me.role===pe.DEVELOPER)&&re.me.role>=re.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),re.off("leave",this.onLeave)}onMod(){re.chat(`/mod ${this.contextId}`),this.mod.style.display="none",this.unmod.style.display="block"}onUnmod(){re.chat(`/unmod ${this.contextId}`),this.mod.style.display="block",this.unmod.style.display="none"}onChown(){re.chown(this.contextId),this.close()}onMuteNotes(){var e;re.mute(this.contextId),setTimeout((()=>Te.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;re.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;re.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;re.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(){re.kick(this.contextId),this.close()}onBan(){at.open(it.BAN,null,this.contextId),this.close()}onBanIP(){at.open(it.BANIP,null,this.contextId),this.close()}onLeave(e){e.id===this.contextId&&this.isOpen()&&this.close()}}Pe([g()],Me.prototype,"muteNotes",void 0),Pe([g()],Me.prototype,"unmuteNotes",void 0),Pe([g()],Me.prototype,"muteChat",void 0),Pe([g()],Me.prototype,"unmuteChat",void 0),Pe([g()],Me.prototype,"chown",void 0),Pe([g()],Me.prototype,"kick",void 0),Pe([g()],Me.prototype,"ban",void 0),Pe([g()],Me.prototype,"banip",void 0),Pe([g()],Me.prototype,"mod",void 0),Pe([g()],Me.prototype,"unmod",void 0),Pe([y],Me.prototype,"onMod",null),Pe([y],Me.prototype,"onUnmod",null),Pe([y],Me.prototype,"onChown",null),Pe([y],Me.prototype,"onMuteNotes",null),Pe([y],Me.prototype,"onUnmuteNotes",null),Pe([y],Me.prototype,"onMuteChat",null),Pe([y],Me.prototype,"onUnmuteChat",null),Pe([y],Me.prototype,"onKick",null),Pe([y],Me.prototype,"onBan",null),Pe([y],Me.prototype,"onBanIP",null),Pe([y],Me.prototype,"onLeave",null),customElements.define("pv-actions",Me);var Ie=__webpack_require__(6138),De={};De.styleTagTransform=u(),De.setAttributes=a(),De.insert=s().bind(null,"head"),De.domAPI=i(),De.insertStyleElement=d(),t()(Ie.A,De),Ie.A&&Ie.A.locals&&Ie.A.locals;var je=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Ue extends E{constructor(){super(),this.innerHTML='

Inputs

Outputs

'}connectedCallback(){super.connectedCallback(),Le.on("update",this.updateDevices),this.updateDevices()}disconnectedCallback(){Le.off("update",this.updateDevices)}updateDevices(){var e,t,o,i;let n=0,s=0;null===(e=Le.inputs)||void 0===e||e.forEach((e=>++n)),null===(t=Le.outputs)||void 0===t||t.forEach((e=>++s)),0===n?this.setMutedMessage(this.inputs,"No MIDI devices"):(this.inputs.innerHTML="",null===(o=Le.inputs)||void 0===o||o.forEach((e=>this.addInputToggle(e)))),0===s?this.setMutedMessage(this.outputs,"No MIDI devices"):(this.outputs.innerHTML="",null===(i=Le.outputs)||void 0===i||i.forEach((e=>this.addOutputToggle(e))))}setMutedMessage(e,t){e.innerHTML="";const o=document.createElement("div");o.classList.add("field");const i=document.createElement("span");i.classList.add("muted"),i.textContent=t,o.append(i),e.append(o)}addInputToggle(e){const t=document.createElement("div");t.classList.add("field");const o=document.createElement("label");o.textContent=e.name;const i=document.createElement("label");i.classList.add("toggle");const n=document.createElement("input");n.type="checkbox",n.checked=Le.isInputEnabled(e.id);const s=document.createElement("span");s.classList.add("slider"),s.addEventListener("click",(()=>{Le.isInputEnabled(e.id)?(Le.disableInput(e.id),Te.releaseAllMyNotes(),n.checked=!0):(Le.enableInput(e.id),n.checked=!1)})),i.append(n),i.append(s),t.append(o),t.append(i),this.inputs.append(t)}addOutputToggle(e){const t=document.createElement("div");t.classList.add("field");const o=document.createElement("label");o.textContent=e.name;const i=document.createElement("label");i.classList.add("toggle");const n=document.createElement("input");n.type="checkbox",n.checked=Le.isOutputEnabled(e.id);const s=document.createElement("span");s.classList.add("slider"),s.addEventListener("click",(()=>{Le.isOutputEnabled(e.id)?(Le.disableOutput(e.id),Te.releaseAllMyNotes(),n.checked=!0):(Le.enableOutput(e.id),n.checked=!1)})),i.append(n),i.append(s),t.append(o),t.append(i),this.outputs.append(t)}}je([g()],Ue.prototype,"inputs",void 0),je([g()],Ue.prototype,"outputs",void 0),je([y],Ue.prototype,"updateDevices",null),customElements.define("pv-devices",Ue);var Be=__webpack_require__(9114),Ke={};Ke.styleTagTransform=u(),Ke.setAttributes=a(),Ke.insert=s().bind(null,"head"),Ke.domAPI=i(),Ke.insertStyleElement=d(),t()(Be.A,Ke),Be.A&&Be.A.locals&&Be.A.locals;var He=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class ze extends E{constructor(){super(),this.innerHTML='
Information
'}onOpen(e){this.message.textContent=e,this.closeButton.addEventListener("click",this.close)}}He([g()],ze.prototype,"message",void 0),He([g()],ze.prototype,"closeButton",void 0),customElements.define("pv-message",ze);var qe=__webpack_require__(8394),Fe={};Fe.styleTagTransform=u(),Fe.setAttributes=a(),Fe.insert=s().bind(null,"head"),Fe.domAPI=i(),Fe.insertStyleElement=d(),t()(qe.A,Fe),qe.A&&qe.A.locals&&qe.A.locals;var $e=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Je extends E{constructor(){super(),this.innerHTML='
My profile
'}onOpen(){this.inputUsername.value=re.me.name,this.inputColor.value=re.me.color,this.inputColorText.value=re.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.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(),re.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)}}$e([g()],Je.prototype,"inputUsername",void 0),$e([g()],Je.prototype,"inputColorText",void 0),$e([g()],Je.prototype,"inputColor",void 0),$e([g()],Je.prototype,"buttonSave",void 0),$e([y],Je.prototype,"handleColorTextInput",null),$e([y],Je.prototype,"handleColorInput",null),$e([y],Je.prototype,"handleInput",null),$e([y],Je.prototype,"handleKeyDown",null),$e([y],Je.prototype,"submit",null),customElements.define("pv-profile",Je);var Ge=__webpack_require__(5500),We={};We.styleTagTransform=u(),We.setAttributes=a(),We.insert=s().bind(null,"head"),We.domAPI=i(),We.insertStyleElement=d(),t()(Ge.A,We),Ge.A&&Ge.A.locals&&Ge.A.locals;class Ve extends E{constructor(){super(),this.innerHTML='
'}connectedCallback(){super.connectedCallback()}disconnectedCallback(){}}customElements.define("pv-sounds",Ve);const Ye=()=>(e,t)=>{delete e[t],e.constructor.observedAttributes.push(t),Object.defineProperty(e,t,{get:function(){return this.getAttribute(t)},set:function(e){this.setAttribute(t,e)},enumerable:!0,configurable:!0})};var Xe=__webpack_require__(9264),Ze={};Ze.styleTagTransform=u(),Ze.setAttributes=a(),Ze.insert=s().bind(null,"head"),Ze.domAPI=i(),Ze.insertStyleElement=d(),t()(Xe.A,Ze),Xe.A&&Xe.A.locals&&Xe.A.locals;var Qe=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class et extends E{constructor(){super(),this.innerHTML='
Ban player
Are you sure you want to ban this player from Pianoverse?
'}connectedCallback(){super.connectedCallback(),this.submit.addEventListener("click",(()=>{re.chat(`/ban ${this.userId}`),this.close()}))}onOpen(e){this.userId=e}}Qe([g()],et.prototype,"submit",void 0),Qe([Ye()],et.prototype,"userId",void 0),customElements.define("pv-banip",et);var tt=__webpack_require__(8138),ot={};ot.styleTagTransform=u(),ot.setAttributes=a(),ot.insert=s().bind(null,"head"),ot.domAPI=i(),ot.insertStyleElement=d(),t()(tt.A,ot),tt.A&&tt.A.locals&&tt.A.locals;var it,nt,st=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class rt extends E{constructor(){super(),this.innerHTML='
Ban player
Are you sure you want to ban this player from the room?
'}connectedCallback(){super.connectedCallback(),this.duration.value="60",this.submit.addEventListener("click",(()=>{const e=Number(this.duration.value);re.ban(this.userId,e),this.close()}))}onOpen(e){this.userId=e}}st([g()],rt.prototype,"duration",void 0),st([g()],rt.prototype,"submit",void 0),st([Ye()],rt.prototype,"userId",void 0),customElements.define("pv-ban",rt),function(e){e.PROFILE="pv-profile",e.SETTINGS="pv-settings",e.NEW_ROOM="pv-new-room",e.MESSAGE="pv-message",e.BANIP="pv-banip",e.BAN="pv-ban"}(it||(it={})),function(e){e.ACTIONS="pv-actions",e.DEVICES="pv-devices",e.SOUNDS="pv-sounds"}(nt||(nt={}));class at{static open(e,...t){let o;switch(e){case it.BAN:o=new rt;break;case it.BANIP:o=new et;break;case it.PROFILE:o=new Je;break;case it.SETTINGS:o=new O;break;case it.MESSAGE:o=new ze;break;case it.NEW_ROOM:o=new ue;break;case nt.ACTIONS:o=new Me;break;case nt.DEVICES:o=new Ue;break;case nt.SOUNDS:o=new Ve;break;default:throw new Error(`Popup ${e} not found`)}return o&&(document.body.append(o),o.open(...t)),o}static closeEverything(){at.closeDialogs(),at.closeModals()}static closeModals(){const e=Object.values(it).join(", ");document.querySelectorAll(e).forEach((e=>e.close()))}static closeDialogs(){const e=Object.values(nt).join(", ");document.querySelectorAll(e).forEach((e=>e.close()))}}window.addEventListener("resize",(()=>at.closeDialogs()));var lt=__webpack_require__(2732),dt={};dt.styleTagTransform=u(),dt.setAttributes=a(),dt.insert=s().bind(null,"head"),dt.domAPI=i(),dt.insertStyleElement=d(),t()(lt.A,dt),lt.A&<.A.locals&<.A.locals;var ct=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class ut extends b{constructor(){super(),this.volumeBackup=100,this.innerHTML='
',this.volumeSlider.addEventListener("input",(()=>{v.set("volume",parseInt(this.volumeSlider.value))})),v.on("volume",(e=>{this.volumeSlider.value=e||0,e>0&&(this.volumeBackup=e)})),this.volume.addEventListener("wheel",(e=>{const t=v.get("volume");e.deltaY>0?v.set("volume",Math.max(t-5,0)):v.set("volume",Math.min(t+5,100))}),{passive:!0}),this.volume.getElementsByTagName("i")[0].addEventListener("click",(()=>{0==v.get("volume")?v.set("volume",this.volumeBackup):v.set("volume",0)})),navigator.share?this.share.addEventListener("click",(()=>{navigator.share({url:location.href})})):this.share.remove(),this.discord.addEventListener("click",(()=>{window.open("https://discord.gg/nDE7GK7Bru","_blank")}))}connectedCallback(){v.on("volume",(e=>{this.volume.getElementsByTagName("i")[0].className=e<=0?"bi bi-volume-mute-fill":e<50?"bi bi-volume-down-fill":"bi bi-volume-up-fill"})),this.devices.addEventListener("click",(()=>{this.devices.classList.add("open"),at.open(nt.DEVICES,this.devices).onClosing((()=>this.devices.classList.remove("open")))})),this.sounds.addEventListener("click",(()=>{this.sounds.classList.add("open"),at.open(nt.SOUNDS,this.sounds).onClosing((()=>this.sounds.classList.remove("open")))}))}}ct([g()],ut.prototype,"volume",void 0),ct([g()],ut.prototype,"volumeSlider",void 0),ct([g()],ut.prototype,"sounds",void 0),ct([g()],ut.prototype,"devices",void 0),ct([g()],ut.prototype,"share",void 0),ct([g()],ut.prototype,"discord",void 0),customElements.define("pv-toolbar",ut);var pt=__webpack_require__(1230),ht={};ht.styleTagTransform=u(),ht.setAttributes=a(),ht.insert=s().bind(null,"head"),ht.domAPI=i(),ht.insertStyleElement=d(),t()(pt.A,ht),pt.A&&pt.A.locals&&pt.A.locals;var vt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class ft extends b{constructor(){super(),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()}}function mt(e,t){return Math.random()*(t-e)+e}vt([Ye()],ft.prototype,"left",void 0),vt([Ye()],ft.prototype,"width",void 0),vt([Ye()],ft.prototype,"color",void 0),vt([y],ft.prototype,"onAnimationEnd",null),customElements.define("pv-note",ft);const bt=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 gt=__webpack_require__(5734),yt={};yt.styleTagTransform=u(),yt.setAttributes=a(),yt.insert=s().bind(null,"head"),yt.domAPI=i(),yt.insertStyleElement=d(),t()(gt.A,yt),gt.A&>.A.locals&>.A.locals;var wt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class kt extends b{constructor(){super(),this.particles=[],this.notes=[],this.start=0,this.frames=0,this.lastTime=0}connectedCallback(){this.innerHTML='
Transpose: +0
',this.fps=document.getElementsByClassName("fps")[0],_e.on("transpose",(e=>{this.info.innerText=`Transpose: ${e>0?"+":""}${e}`,this.info.style.animation="none",this.info.offsetHeight,this.info.style.animation="delayedFadeOut 1.5s forwards ease-out"})),_e.on("sustain",(e=>{this.info.innerText="Sustain "+(e?"ON":"OFF"),this.info.style.animation="none",this.info.offsetHeight,this.info.style.animation="delayedFadeOut 1.5s forwards ease-out"})),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}),Te.on("press",this.onKeyPressed),Te.on("release",this.onKeyReleased),v.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),e-this.start>=1e3&&this.fps&&(this.fps.textContent=`${this.frames} FPS`,this.frames=0,this.start=e),requestAnimationFrame(this.drawingAnimation)}update(e){for(let t=this.particles.length-1;t>=0;--t){const o=this.particles[t];o.r*=Math.pow(o.vr,e),o.r<=.5&&this.particles.splice(t,1),o.x+=o.vx*e,o.y+=o.vy*e,o.vx*=Math.pow(.95,e),o.vy*=Math.pow(.95,e)}for(const e of this.notes)if(e.pressed){const t=e.element.w,o=e.element.offsetLeft;for(let e=0;e<10;e++){const e=o+t/2+1.5*mt(-t/2,t/2);this.showEffects&&Math.random()>.7&&(this.particles.push({x:e,y:this.fgCanvas.height,vx:(e-o-t/2)/20,vy:mt(-4,-1),r:mt(2,2.4),vr:mt(.8,.99)}),this.particles.length>kt.MAX_PARTICLES&&this.particles.shift())}}else e.element.isConnected||(this.notes=this.notes.filter((t=>t!==e)))}onKeyPressed(e,t,o){var i;if(document.hidden||!this.showEffects)return;const n=bt.H[e-21];if(!n)return;const s=n.includes("s"),r=n.replace("s",""),a=bt.H.filter((e=>!e.includes("s"))).indexOf(r),l=this.fgCanvas.width*(a/52),d=s?this.fgCanvas.width/52/2:this.fgCanvas.width/52,c=new ft;c.setAttribute("left",`${s?l+1.45*d:l}px`),c.setAttribute("width",`${d}px`),c.setAttribute("color",null===(i=re.get(o))||void 0===i?void 0:i.color),this.append(c),this.notes.push({key:e,pressed:!0,pressedAt:Date.now(),element:c})}onKeyReleased(e,t){const o=this.notes.filter((t=>e===t.key&&t.pressed));for(const e of o)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 o=this.particles[t];e.moveTo(o.x+o.r,o.y),e.arc(o.x,o.y,o.r,0,2*Math.PI)}e.fill()}drawOctaveLines(e){e.strokeStyle="white",e.shadowBlur=0,e.globalAlpha=.05,e.lineWidth=1;const t=.03809*this.bgCanvas.width,o=.13479*this.bgCanvas.width;e.beginPath();for(let i=0;i<8;++i)e.moveTo(t+i*o,0),e.lineTo(t+i*o,this.bgCanvas.height);e.stroke()}}kt.MAX_PARTICLES=2e3,wt([g()],kt.prototype,"info",void 0),wt([g()],kt.prototype,"bgCanvas",void 0),wt([g()],kt.prototype,"fgCanvas",void 0),wt([y],kt.prototype,"drawingAnimation",null),wt([y],kt.prototype,"onKeyPressed",null),wt([y],kt.prototype,"onKeyReleased",null),wt([y],kt.prototype,"onResize",null),customElements.define("pv-canvas",kt);var xt=__webpack_require__(6610),Et={};Et.styleTagTransform=u(),Et.setAttributes=a(),Et.insert=s().bind(null,"head"),Et.domAPI=i(),Et.insertStyleElement=d(),t()(xt.A,Et),xt.A&&xt.A.locals&&xt.A.locals;var At=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class _t extends b{constructor(){super()}connectedCallback(){this.innerHTML=' Anyonmous ',this.badge.textContent=this.name,v.get("showCursors")?this.style.display="flex":this.style.display="none",v.on("showCursors",(e=>{this.style.display=e?"flex":"none"}))}onNameChange(e){this.badge.textContent=e}}At([g()],_t.prototype,"badge",void 0),At([Ye()],_t.prototype,"name",void 0),customElements.define("pv-cursor",_t);var St=__webpack_require__(1358),Ot={};Ot.styleTagTransform=u(),Ot.setAttributes=a(),Ot.insert=s().bind(null,"head"),Ot.domAPI=i(),Ot.insertStyleElement=d(),t()(St.A,Ot),St.A&&St.A.locals&&St.A.locals;var Lt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Ct extends b{constructor(){super(),this.pingDelay=2e3}connectedCallback(){this.innerHTML=' Pinging... ',this.pingInterval=setInterval(this.sendPing,this.pingDelay),re.isConnected()?this.sendPing():re.once("connected",this.sendPing)}sendPing(){let e=Date.now();re.ping()&&(re.removeAllListeners("pong"),re.once("pong",(()=>{const t=Date.now()-e;this.icon.className=t<200?"icon green":t<500?"icon orange":"icon red",this.ms.textContent=`${t} ms`})))}disconnectedCallback(){clearInterval(this.pingInterval),re.off("connected",this.sendPing)}}Lt([g()],Ct.prototype,"icon",void 0),Lt([g()],Ct.prototype,"ms",void 0),Lt([y],Ct.prototype,"sendPing",null),customElements.define("pv-ping",Ct);var Tt=__webpack_require__(8098),Rt={};Rt.styleTagTransform=u(),Rt.setAttributes=a(),Rt.insert=s().bind(null,"head"),Rt.domAPI=i(),Rt.insertStyleElement=d(),t()(Tt.A,Rt),Tt.A&&Tt.A.locals&&Tt.A.locals;var Nt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Pt extends b{constructor(e){super(),this.user=e,this.id=e.id}update(e){this.user=e,this.initialize()}connectedCallback(){this.innerHTML=' ',this.initialize(),this.addEventListener("click",this.openActions)}initialize(){switch(this.text.textContent=this.user.name,this.text.style.color=this.user.color,this.user.role){case pe.DEVELOPER:this.badges.style.display="block",this.badges.innerHTML="DEV";break;case pe.MODERATOR:this.badges.style.display="block",this.badges.innerHTML="MOD";break;default:case pe.USER:this.badges.style.display="none"}re.room.owner===this.user.id&&(this.badges.style.display="block",this.badges.innerHTML="ROOM OWNER")}openActions(){this.classList.add("open"),(this.id===re.me.id?at.open(it.PROFILE):at.open(nt.ACTIONS,this,this.id)).onClosing((()=>this.classList.remove("open")))}}Nt([g()],Pt.prototype,"text",void 0),Nt([g()],Pt.prototype,"badges",void 0),Nt([y],Pt.prototype,"openActions",null),customElements.define("pv-user",Pt);var Mt=__webpack_require__(8758),It={};It.styleTagTransform=u(),It.setAttributes=a(),It.insert=s().bind(null,"head"),It.domAPI=i(),It.insertStyleElement=d(),t()(Mt.A,It),Mt.A&&Mt.A.locals&&Mt.A.locals;var Dt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class jt extends b{constructor(){super()}connectedCallback(){this.innerHTML='
',re.on("welcome",this.initialize),re.on("chown",this.initialize),re.on("join",this.addUser),re.on("profile",this.updateUser),re.on("leave",this.removeUser),Te.on("press",((e,t,o)=>{const i=document.getElementById(o);i&&(i.style.animation="none",i.offsetHeight,i.style.animation="bounce 180ms ease-out")})),v.on("showPing",(e=>{var t;e?(null===(t=this.ping)||void 0===t||t.remove(),this.ping=new Ct,this.insertAdjacentElement("beforeend",this.ping)):this.ping&&this.ping.remove()}))}initialize(){this.users.innerHTML="",this.addUser(re.me);for(const e of re.users)this.addUser(e)}addUser(e){const t=new Pt(e);null==t||t.classList.toggle("muted",!(!re.get(e.id).muted&&!re.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",!(!re.get(e.id).muted&&!re.get(e.id).mutedChat))}removeUser(e){var t;null===(t=document.getElementById(e.id))||void 0===t||t.remove()}}Dt([g()],jt.prototype,"users",void 0),Dt([y],jt.prototype,"initialize",null),Dt([y],jt.prototype,"addUser",null),Dt([y],jt.prototype,"updateUser",null),Dt([y],jt.prototype,"removeUser",null),customElements.define("pv-users",jt);var Ut=__webpack_require__(5750),Bt={};Bt.styleTagTransform=u(),Bt.setAttributes=a(),Bt.insert=s().bind(null,"head"),Bt.domAPI=i(),Bt.insertStyleElement=d(),t()(Ut.A,Bt),Ut.A&&Ut.A.locals&&Ut.A.locals;var Kt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Ht extends b{constructor(){super(),this.isTactile=!1}connectedCallback(){this.innerHTML='
',this.setupKeysListeners(),Te.on("loaded",this.onLoaded),Te.on("unloaded",this.onUnloaded),Te.on("press",this.onPress),Te.on("release",this.onRelease),v.on("showLabels",(e=>{const t=this.querySelectorAll("[data-key]");for(const o of Array.from(t))o.classList.toggle("show-label",e)}))}setupKeysListeners(){const e=this.querySelectorAll("[data-key]");for(const t of Array.from(e))t.addEventListener("mousedown",(e=>{if(this.isTactile)return;const o=e.target,i=Number(o.dataset.key),n=Math.floor(e.offsetY/t.clientHeight*127);Te.press(i,n);const s=()=>{Te.release(i),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s)})),t.addEventListener("touchstart",(e=>{e.preventDefault(),this.isTactile=!0;const t=e.target,o=Number(t.dataset.key);Te.press(o,110);const i=()=>{Te.release(o),document.removeEventListener("touchend",i)};document.addEventListener("touchend",i)}))}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,o){const i=this.querySelector(`[data-key="${e}"]`);i&&(i.style.transitionDuration="0ms",i.style.backgroundColor=re.get(o).color)}onRelease(e){const t=this.querySelector(`[data-key="${e}"]`);t&&(t.style.transitionDuration="",t.style.backgroundColor="")}}Kt([y],Ht.prototype,"onLoaded",null),Kt([y],Ht.prototype,"onUnloaded",null),Kt([y],Ht.prototype,"onPress",null),Kt([y],Ht.prototype,"onRelease",null),customElements.define("pv-keys",Ht);var zt=__webpack_require__(9546),qt={};qt.styleTagTransform=u(),qt.setAttributes=a(),qt.insert=s().bind(null,"head"),qt.domAPI=i(),qt.insertStyleElement=d(),t()(zt.A,qt),zt.A&&zt.A.locals&&zt.A.locals;var Ft=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class $t extends b{constructor(){super()}connectedCallback(){this.innerHTML='
    ',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),re.on("welcome",this.onWelcome),re.on("chat",this.onMessage),re.on("join",this.onJoin),re.on("clear",this.clearChat)}updateMutedMessages(){var e;const t=this.messages.querySelectorAll("li");for(let o=0;o=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}makeLinksAndMentions(e){let t="";for(let o of e.split(" ")){o.startsWith("@")&&o.length>2&&(o=`${f(o)}`);const e=o.match($t.REGEX_HYPERLINK);if(e){const t=f(e[0]).replace(/&/g,"&");o=`${t}`}t+=`${o} `}return t}onMessage(e){var t;const o=this.isAtChatBottom();if(!e.name)return void this.sendSystemMessage(e.content);e.content=f(e.content),e.name=f(e.name);const i=this.makeLinksAndMentions(e.content),n=document.createElement("span");n.classList.add("username"),n.style.color=e.color,n.innerHTML="discord"===e.id?`${e.name} `:e.name,n.title=e.id;const s=document.createElement("li");for(s.classList.add("message"),e.id&&(s.setAttribute("from",e.id),(null===(t=re.get(e.id))||void 0===t?void 0:t.mutedChat)&&(s.style.display="none")),s.innerHTML=`${n.outerHTML}${i.trim()}`,this.messages.append(s);this.messages.children.length>$t.MAX_MESSAGES;)this.messages.removeChild(this.messages.firstChild);o&&this.scrollDown()}sendChatMessage(){this.input.value.trim()&&(re.chat(this.input.value),this.input.value="")}clearChat(){this.messages.innerHTML=""}sendSystemMessage(e){const t=this.isAtChatBottom(),o=document.createElement("li");o.textContent=e,o.classList.add("system"),this.messages.append(o),t&&this.scrollDown()}}$t.MAX_MESSAGES=150,$t.REGEX_HYPERLINK=/https?:\/\/[^\s]{2,}/,Ft([g()],$t.prototype,"messages",void 0),Ft([g()],$t.prototype,"input",void 0),Ft([g()],$t.prototype,"send",void 0),Ft([y],$t.prototype,"scrollDown",null),Ft([y],$t.prototype,"onDocumentKeyDown",null),Ft([y],$t.prototype,"onInputKeyDown",null),Ft([y],$t.prototype,"onInputKeyUp",null),Ft([y],$t.prototype,"onWelcome",null),Ft([y],$t.prototype,"onJoin",null),Ft([y],$t.prototype,"onMessage",null),Ft([y],$t.prototype,"sendChatMessage",null),Ft([y],$t.prototype,"clearChat",null),customElements.define("pv-chat",$t);var Jt=__webpack_require__(6898),Gt={};Gt.styleTagTransform=u(),Gt.setAttributes=a(),Gt.insert=s().bind(null,"head"),Gt.domAPI=i(),Gt.insertStyleElement=d(),t()(Jt.A,Gt),Jt.A&&Jt.A.locals&&Jt.A.locals;var Wt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Vt extends b{constructor(){super()}connectedCallback(){this.innerHTML='
    Offline
    1
    ',this.settings.addEventListener("click",(()=>at.open(it.SETTINGS))),this.roomSelector.addEventListener("click",this.onClickHeader),this.roomList.addEventListener("click",this.onRoomSelected),re.on("welcome",this.updateAll),re.on("join",this.updateAll),re.on("leave",this.updateAll),re.on("rooms",this.updateRoomList),re.on("reconnecting",this.updateTabTitle)}onClickHeader(e){this.roomList.hasAttribute("hidden")?(this.roomList.toggleAttribute("hidden",!1),document.addEventListener("mousedown",this.onMouseDown)):(this.roomList.toggleAttribute("hidden",!0),document.removeEventListener("mousedown",this.onMouseDown)),e.stopPropagation()}onMouseDown(e){this.roomList.contains(e.target)||this.roomSelector.contains(e.target)||(this.roomList.toggleAttribute("hidden",!0),document.removeEventListener("mousedown",this.onMouseDown))}onRoomSelected(e){const t=e.target;if(t.dataset.id){if(re.room.id===t.dataset.id)return;re.enter(t.dataset.id)}else t!==this.roomList&&at.open(it.NEW_ROOM)}updateRoomList(e){for(;this.roomList.children.length>1;)this.roomList.removeChild(this.roomList.firstChild);for(const t of e.sort(((e,t)=>e.count-t.count||e.id.localeCompare(t.id)))){const e=document.createElement("div"),o=document.createElement("span");o.classList.add("room-name"),o.textContent=t.id;const i=document.createElement("span");i.classList.add("room-count"),i.innerHTML=` ${t.count}`,e.dataset.id=t.id,e.insertAdjacentElement("beforeend",o),e.insertAdjacentElement("beforeend",i),this.roomList.insertBefore(e,this.roomList.firstChild)}}updateAll(){const e=re.users.length+1;this.count.textContent=e.toString(),this.updateTabTitle(),this.updateRoomName()}updateRoomName(){this.roomName.textContent=re.room.id||"--"}updateTabTitle(){re.room.id?re.isConnected()?document.title=`Pianoverse - ${re.room.id} (${1+re.users.length})`:document.title=`Pianoverse - ${re.room.id}`:document.title="Pianoverse"}}Wt([g()],Vt.prototype,"roomSelector",void 0),Wt([g()],Vt.prototype,"roomName",void 0),Wt([g()],Vt.prototype,"count",void 0),Wt([g()],Vt.prototype,"roomList",void 0),Wt([g()],Vt.prototype,"settings",void 0),Wt([y],Vt.prototype,"onClickHeader",null),Wt([y],Vt.prototype,"onMouseDown",null),Wt([y],Vt.prototype,"onRoomSelected",null),Wt([y],Vt.prototype,"updateRoomList",null),Wt([y],Vt.prototype,"updateAll",null),Wt([y],Vt.prototype,"updateRoomName",null),Wt([y],Vt.prototype,"updateTabTitle",null),customElements.define("pv-room",Vt);let Yt=Date.now(),Xt={x:0,y:0},Zt=v.get("hideMyCursor");v.on("hideMyCursor",(e=>{Zt=e,Zt&&re.move(1,1)})),document.addEventListener("mousemove",(e=>{var t,o;Zt||Date.now()-Yt<10||(t=Xt,o={x:e.clientX,y:e.clientY},Math.sqrt(Math.pow(t.x-o.x,2)+Math.pow(t.y-o.y,2))<3||(re.move(e.clientX/window.innerWidth,e.clientY/window.innerHeight),Yt=Date.now(),Xt={x:e.clientX,y:e.clientY}))}));const Qt=new Map,eo=new Map;function to(e){document.querySelector("link[rel=icon]").href=e?"favicon-light.svg":"favicon-dark.svg"}re.on("welcome",(e=>{Qt.forEach((e=>e.parentNode.removeChild(e))),Qt.clear()})),re.on("join",(e=>{if(Qt.has(e.id))return;const t=document.createElement("pv-cursor");t.setAttribute("name",e.name),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),Qt.set(e.id,t)})),re.on("move",(e=>{if(!Qt.has(e.id))return;const t=Qt.get(e.id);t.style.left=e.x*window.innerWidth+"px",t.style.top=e.y*window.innerHeight+"px",t.classList.remove("idle"),eo.has(e.id)&&(clearTimeout(eo.get(e.id)),eo.delete(e.id)),eo.set(e.id,setTimeout((()=>t.classList.add("idle")),1500))})),re.on("leave",(e=>{var t;if(!Qt.has(e.id))return;const o=Qt.get(e.id);null===(t=o.parentNode)||void 0===t||t.removeChild(o),Qt.delete(e.id)})),re.on("profile",(e=>{if(!Qt.has(e.id))return;const t=Qt.get(e.id);t.setAttribute("name",e.name),t.style.color=e.color})),re.on("reconnecting",(()=>{Array.from(Qt.values()).forEach((e=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),Qt.clear()})),v.on("theme",(e=>document.body.dataset.theme=e)),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(e=>to(e.matches))),to(window.matchMedia("(prefers-color-scheme: dark)").matches),v.setDefault("volume",100),v.setDefault("theme","dark"),v.setDefault("keyboardLayout","virtualpiano"),v.setDefault("showCursors",!0),v.setDefault("showEffects",!0),v.setDefault("showLabels",!1),v.setDefault("showPing",!1),v.setDefault("hideMyCursor",!1),v.restore(),v.remove("darkTheme"),v.remove("showNotes"),v.remove("showParticles"),v.remove("mppLayout"),v.remove("showFps")})()})(); +(()=>{"use strict";var __webpack_modules__={8045:e=>{e.exports=function(e,t){for(var o=new Array(arguments.length-1),i=0,n=2,s=!0;n{var o=t;o.length=function(e){var t=e.length;if(!t)return 0;for(var o=0;--t%4>1&&"="===e.charAt(t);)++o;return Math.ceil(3*e.length)/4-o};for(var i=new Array(64),n=new Array(123),s=0;s<64;)n[i[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;o.encode=function(e,t,o){for(var n,s=null,r=[],a=0,l=0;t>2],n=(3&d)<<4,l=1;break;case 1:r[a++]=i[n|d>>4],n=(15&d)<<2,l=2;break;case 2:r[a++]=i[n|d>>6],r[a++]=i[63&d],l=0}a>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,r)),a=0)}return l&&(r[a++]=i[n],r[a++]=61,1===l&&(r[a++]=61)),s?(a&&s.push(String.fromCharCode.apply(String,r.slice(0,a))),s.join("")):String.fromCharCode.apply(String,r.slice(0,a))};var r="invalid encoding";o.decode=function(e,t,o){for(var i,s=o,a=0,l=0;l1)break;if(void 0===(d=n[d]))throw Error(r);switch(a){case 0:i=d,a=1;break;case 1:t[o++]=i<<2|(48&d)>>4,i=d,a=2;break;case 2:t[o++]=(15&i)<<4|(60&d)>>2,i=d,a=3;break;case 3:t[o++]=(3&i)<<6|d,a=0}}if(1===a)throw Error(r);return o-s},o.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,o){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:o||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 o=this._listeners[e],i=0;i{function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),o=new Uint8Array(t.buffer),i=128===o[3];function n(e,i,n){t[0]=e,i[n]=o[0],i[n+1]=o[1],i[n+2]=o[2],i[n+3]=o[3]}function s(e,i,n){t[0]=e,i[n]=o[3],i[n+1]=o[2],i[n+2]=o[1],i[n+3]=o[0]}function r(e,i){return o[0]=e[i],o[1]=e[i+1],o[2]=e[i+2],o[3]=e[i+3],t[0]}function a(e,i){return o[3]=e[i],o[2]=e[i+1],o[1]=e[i+2],o[0]=e[i+3],t[0]}e.writeFloatLE=i?n:s,e.writeFloatBE=i?s:n,e.readFloatLE=i?r:a,e.readFloatBE=i?a:r}():function(){function t(e,t,o,i){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,o,i);else if(isNaN(t))e(2143289344,o,i);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,o,i);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,o,i);else{var s=Math.floor(Math.log(t)/Math.LN2);e((n<<31|s+127<<23|8388607&Math.round(t*Math.pow(2,-s)*8388608))>>>0,o,i)}}function r(e,t,o){var i=e(t,o),n=2*(i>>31)+1,s=i>>>23&255,r=8388607&i;return 255===s?r?NaN:n*(1/0):0===s?1401298464324817e-60*n*r:n*Math.pow(2,s-150)*(r+8388608)}e.writeFloatLE=t.bind(null,o),e.writeFloatBE=t.bind(null,i),e.readFloatLE=r.bind(null,n),e.readFloatBE=r.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),o=new Uint8Array(t.buffer),i=128===o[7];function n(e,i,n){t[0]=e,i[n]=o[0],i[n+1]=o[1],i[n+2]=o[2],i[n+3]=o[3],i[n+4]=o[4],i[n+5]=o[5],i[n+6]=o[6],i[n+7]=o[7]}function s(e,i,n){t[0]=e,i[n]=o[7],i[n+1]=o[6],i[n+2]=o[5],i[n+3]=o[4],i[n+4]=o[3],i[n+5]=o[2],i[n+6]=o[1],i[n+7]=o[0]}function r(e,i){return o[0]=e[i],o[1]=e[i+1],o[2]=e[i+2],o[3]=e[i+3],o[4]=e[i+4],o[5]=e[i+5],o[6]=e[i+6],o[7]=e[i+7],t[0]}function a(e,i){return o[7]=e[i],o[6]=e[i+1],o[5]=e[i+2],o[4]=e[i+3],o[3]=e[i+4],o[2]=e[i+5],o[1]=e[i+6],o[0]=e[i+7],t[0]}e.writeDoubleLE=i?n:s,e.writeDoubleBE=i?s:n,e.readDoubleLE=i?r:a,e.readDoubleBE=i?a:r}():function(){function t(e,t,o,i,n,s){var r=i<0?1:0;if(r&&(i=-i),0===i)e(0,n,s+t),e(1/i>0?0:2147483648,n,s+o);else if(isNaN(i))e(0,n,s+t),e(2146959360,n,s+o);else if(i>17976931348623157e292)e(0,n,s+t),e((r<<31|2146435072)>>>0,n,s+o);else{var a;if(i<22250738585072014e-324)e((a=i/5e-324)>>>0,n,s+t),e((r<<31|a/4294967296)>>>0,n,s+o);else{var l=Math.floor(Math.log(i)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=i*Math.pow(2,-l))>>>0,n,s+t),e((r<<31|l+1023<<20|1048576*a&1048575)>>>0,n,s+o)}}}function r(e,t,o,i,n){var s=e(i,n+t),r=e(i,n+o),a=2*(r>>31)+1,l=r>>>20&2047,d=4294967296*(1048575&r)+s;return 2047===l?d?NaN:a*(1/0):0===l?5e-324*a*d:a*Math.pow(2,l-1075)*(d+4503599627370496)}e.writeDoubleLE=t.bind(null,o,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=r.bind(null,n,0,4),e.readDoubleBE=r.bind(null,s,4,0)}(),e}function o(e,t,o){t[o]=255&e,t[o+1]=e>>>8&255,t[o+2]=e>>>16&255,t[o+3]=e>>>24}function i(e,t,o){t[o]=e>>>24,t[o+1]=e>>>16&255,t[o+2]=e>>>8&255,t[o+3]=255&e}function n(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,o){var i=o||8192,n=i>>>1,s=null,r=i;return function(o){if(o<1||o>n)return e(o);r+o>i&&(s=e(i),r=0);var a=t.call(s,r,r+=o);return 7&r&&(r=1+(7|r)),a}}},1447:(e,t)=>{var o=t;o.length=function(e){for(var t=0,o=0,i=0;i191&&i<224?s[r++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,s[r++]=55296+(i>>10),s[r++]=56320+(1023&i)):s[r++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],r>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,s)),r=0);return n?(r&&n.push(String.fromCharCode.apply(String,s.slice(0,r))),n.join("")):String.fromCharCode.apply(String,s.slice(0,r))},o.write=function(e,t,o){for(var i,n,s=o,r=0;r>6|192,t[o++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=e.charCodeAt(r+1)))?(i=65536+((1023&i)<<10)+(1023&n),++r,t[o++]=i>>18|240,t[o++]=i>>12&63|128,t[o++]=i>>6&63|128,t[o++]=63&i|128):(t[o++]=i>>12|224,t[o++]=i>>6&63|128,t[o++]=63&i|128);return o-s}},4912:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=new URL(o(1873),o.b),u=r()(n()),p=l()(d),h=l()(c);u.push([e.id,`dialog{padding:0;border-radius:8px;background-color:var(--color-background);outline:none;border:2px solid var(--color-cards);box-shadow:var(--box-shadow);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-cards)}dialog .header .title i{font-size:.87em;margin-right:5px}dialog .header .x{opacity:.4;transition:250ms}dialog .header .x:hover{transition:0ms;opacity:1;cursor:url(${p}),auto}dialog .header .x:hover *{cursor:url(${p}),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]{z-index:150}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(${h}),auto}dialog:not([modal]){z-index:100}dialog:not([modal]):before,dialog:not([modal]):after{content:"";width:0;height:0;position:absolute;border-top:12px solid rgba(0,0,0,0);border-bottom:12px solid rgba(0,0,0,0);border-right:12px solid rgba(0,0,0,0);border-left:12px solid rgba(0,0,0,0);pointer-events:none}dialog:not([modal]):after{border-bottom:12px solid var(--color-background);left:calc(50% - 12px - var(--offset, 0px));top:-24px}dialog:not([modal]):before{border-bottom:12px solid var(--color-cards);left:calc(50% - 12px - var(--offset, 0px));top:-26px}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(${h}),auto;pointer-events:all}`,""]);const v=u},7966:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=new URL(o(9738),o.b),u=r()(n()),p=l()(d),h=l()(c);u.push([e.id,`pv-actions dialog{min-width:170px}pv-actions dialog .content{padding:0;color:var(--color-text);z-index:90;padding:4px}pv-actions dialog .content div:not(:first-child){border-radius:4px;padding:9px 32px 9px 10px;cursor:url(${p}),auto;z-index:200;transition:150ms}pv-actions dialog .content div:not(:first-child):hover{transition:50ms;background-color:var(--color-cards)}pv-actions dialog .content div:not(:first-child) i{margin-right:6px}pv-actions dialog .content .userid{user-select:text;cursor:url(${h}),auto;text-align:center;padding:6px 16px;font-size:.9em;opacity:.4}pv-actions dialog .content .unmute-notes,pv-actions dialog .content .unmute-chat{color:var(--color-failure);display:none}`,""]);const v=u},8138:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-ban dialog{width:290px}pv-ban dialog .content{gap:8px}pv-ban dialog .content select{padding:7px 5px}",""]);const a=r},6138:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-devices dialog{width:max-content;min-width:260px}pv-devices dialog .content .inputs,pv-devices dialog .content .outputs{display:flex;flex-direction:column;gap:10px}pv-devices dialog .content .inputs .field,pv-devices dialog .content .outputs .field{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px}pv-devices dialog .content .inputs .field .muted,pv-devices dialog .content .outputs .field .muted{color:var(--color-text);opacity:.4}pv-devices dialog .content .inputs{margin-bottom:22px}",""]);const a=r},9114:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-message dialog{width:330px}pv-message dialog .content .message{margin-bottom:0px}",""]);const a=r},9728:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.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:.9em;margin-left:3px;opacity:.5}pv-new-room dialog .content .private{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:.9em}pv-new-room dialog .content .buttons{margin-top:0}",""]);const a=r},8394:(e,t,o)=>{o.d(t,{A:()=>p});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=r()(n()),u=l()(d);c.push([e.id,`pv-profile dialog{width:320px}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:.9em;margin-left:3px;opacity:.5}pv-profile dialog .content .input-color-text{position:relative}pv-profile dialog .content input[type=color]{position:absolute;height:28px;width:28px;bottom:7px;right:7px;border:none;outline:none;cursor:url(${u}),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:3px;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:3px;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 p=c},672:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-settings dialog{min-width:340px}pv-settings dialog .content .container{display:flex;flex-direction:column;justify-content:flex-start;gap:2px}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}pv-settings dialog .content .footer .madeby{font-size:.85em;transition:250ms}pv-settings dialog .content .footer .madeby:not(:disabled):hover{transition:0ms}pv-settings dialog .content .footer .madeby span,pv-settings dialog .content .footer .madeby a{opacity:.5}pv-settings dialog .content .footer .madeby a:hover{opacity:1;text-decoration:none}",""]);const a=r},5500:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-sounds dialog{width:max-content;width:200px}pv-sounds dialog .content{display:flex;flex-direction:column}",""]);const a=r},5734:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"@keyframes delayedFadeOut{0%{opacity:.6}80%{opacity:.6}100%{opacity:0}}pv-canvas{display:flex;position:relative;flex-direction:column;background-color:var(--color-canvas);border-top-left-radius:8px;border-top-right-radius:8px;overflow:hidden;flex:1}pv-canvas .info{position:absolute;bottom:8px;left:10px;color:#fff;font-size:.8em;opacity:0}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;top:20px;right:20px;display:flex;flex-direction:column;gap:10px;width:350px;height:300px;padding:0;margin:0;border-radius:8px}",""]);const a=r},9546:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9738),o.b),c=new URL(o(9662),o.b),u=r()(n()),p=l()(d),h=l()(c);u.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;line-height:22px;padding:12px;gap:2px;margin:0;list-style-type:none;z-index:25;mask-image:linear-gradient(to top, black calc(100% - 50px), transparent 100%)}pv-chat .messages :first-child{margin-top:auto;padding-top:14px}pv-chat .messages .message{user-select:text;cursor:url(${p}),auto;overflow-wrap:anywhere;width:100%;animation:slideUpIn 120ms ease-in-out;padding:0 6px;clip-path:view-box}pv-chat .messages .message img{transition:250ms;max-width:min(100%,300px);max-height:200px;border-radius:8px}pv-chat .messages .message .username{user-select:text;cursor:url(${p}),auto;margin-right:8px;font-weight:bold}pv-chat .messages .message .username .bi-discord{color:#5865f2}pv-chat .messages .message .mention{background-color:var(--color-cards);color:var(--color-text);cursor:url(${h}),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 .footer{display:flex;align-items:center;height:46px;padding:4px 12px 4px 12px;border-radius:8px;background-color:var(--color-cards);border:1px solid var(--color-hover);z-index:25}pv-chat .footer input[type=text]{padding:8px 0;border:none}pv-chat .footer button{background-color:rgba(0,0,0,0);cursor:url(${h}),auto;padding:4px 4px 2px 8px;font-size:1em;border:none;border-radius:0;box-shadow:none;margin:0;flex:0;color:var(--color-text)}pv-chat .footer button i{opacity:.4;cursor:url(${h}),auto;transition:250ms;font-size:1.1em}pv-chat .footer button:hover{background:rgba(0,0,0,0)}pv-chat .footer button:hover i{transition:0ms;opacity:1}`,""]);const v=u},6610:(e,t,o)=>{o.d(t,{A:()=>p});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(1873),o.b),c=r()(n()),u=l()(d);c.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(${u});pointer-events:none;animation-name:heartbeat;animation-duration:.6s;animation-timing-function:linear;animation-iteration-count:infinite}pv-cursor .badge{padding:3px 8px;font-size:.9em;font-weight:bold;margin-top:20px;margin-left:9px;max-width:170px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-color:var(--color-hover);border-radius:6px}`,""]);const p=c},5750:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-keys{display:flex;flex-direction:row;gap:1px;width:100%;aspect-ratio:8;overflow:hidden;border-bottom-left-radius:8px;border-bottom-right-radius:8px;min-height:100px;background-color:var(--color-hover);border-bottom:1px solid var(--color-hover);border-left:1px solid var(--color-hover);border-right:1px solid var(--color-hover)}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:var(--color-canvas);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;filter:brightness(0.7)}pv-keys .key .black.loading{opacity:.3}pv-keys .key .black.show-label[data-label]::after{color:#fff;font-size:.5vw}",""]);const a=r},5146:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,'@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes bounce{from{transform:translateY(-3px)}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-success)}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-warning)}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-failure)}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%{opacity:.85;transform:translateX(0)}40%{opacity:.85;transform:translateX(-6px)}100%{opacity:0;transform:translateX(8px)}}@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:500ms;pointer-events:none}',""]);const a=r},1230:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.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 a=r},1358:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"@keyframes fadeInTransparent1{from{opacity:0}to{opacity:1}}pv-ping{position:relative;display:flex;flex-direction:row;align-items:center;gap:6px;animation:fadeInTransparent1 400ms forwards ease-out;width:auto;text-align:right}pv-ping .icon{width:7px;height:7px;border-radius:50%;background-color:var(--color-text);opacity:.5}pv-ping .icon.success{background-color:var(--color-success);animation:greenPulse 5s infinite}pv-ping .icon.warning{background-color:var(--color-warning);animation:orangePulse 5s infinite}pv-ping .icon.failure{background-color:var(--color-failure);animation:redPulse 5s infinite}pv-ping .ms{color:var(--color-text);font-size:.8em;opacity:.5}",""]);const a=r},6898:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=new URL(o(1873),o.b),u=r()(n()),p=l()(d),h=l()(c);u.push([e.id,`pv-room{display:flex;flex-direction:row;justify-content:space-between;width:20vw;position:relative;gap:2px}pv-room .room-selector{position:relative;display:flex;flex-direction:row;justify-content:space-between;font-weight:bold;padding:10px 12px;border-radius:8px;background-color:var(--color-cards);cursor:url(${p}),auto;gap:10px;z-index:90;max-width:calc(100% - 48px);width:calc(100% - 48px);height:46px;transition:250ms;border-top-right-radius:0;border-bottom-right-radius:0;border:1px solid var(--color-hover);transition:250ms}pv-room .room-selector:not(:disabled):hover{transition:0ms}pv-room .room-selector.lobby{color:var(--color-lobby)}pv-room .room-selector *{cursor:url(${p}),auto}pv-room .room-selector:hover:not(:has(.room-list:hover)){background-color:var(--color-hover)}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-selector .subtitle{font-weight:bold;font-size:1.2em;opacity:.4;min-width:max-content}pv-room .room-selector .arrow{font-weight:bold;font-size:1.2em}pv-room .room-list{position:absolute;top:calc(100% + 6px);left:-1px;width:max(20vw,100%);max-height:60vh;cursor:url(${h}),auto;border-radius:8px;border:1px solid var(--color-hover);background-color:var(--color-cards);display:flex;flex-direction:column;overflow:auto;font-weight:normal;box-shadow:var(--box-shadow);transition:background-color 250ms;opacity:1;animation:slideDownIn 80ms ease-out;-moz-animation:none;color:var(--color-text)}pv-room .room-list[hidden]{pointer-events:none;animation:slideUpOut 80ms ease-out;-moz-animation:none;opacity:0}pv-room .room-list>*{font-weight:bold;padding:10px 12px;display:flex;justify-content:space-between;transition:250ms}pv-room .room-list>*.lobby{color:var(--color-lobby)}pv-room .room-list>* .room-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;max-width:80%}pv-room .room-list>* .room-count{pointer-events:none}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-cards))}pv-room .settings{display:flex;justify-content:center;align-items:center;box-sizing:border-box;background-color:var(--color-cards);height:46px;width:46px;transition:250ms;border-top-left-radius:0;border-bottom-left-radius:0;border:1px solid var(--color-hover);transition:250ms;flex:0}pv-room .settings:not(:disabled):hover{transition:0ms}pv-room .settings i{font-size:1.2em;padding:0;cursor:url(${p}),auto}`,""]);const v=u},2732:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=new URL(o(1873),o.b),u=r()(n()),p=l()(d),h=l()(c);u.push([e.id,`pv-toolbar{width:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--color-text);background-color:rgba(0,0,0,0);height:46px;margin-bottom:6px;gap:6px}pv-toolbar .left,pv-toolbar .right,pv-toolbar .center{display:flex;flex-direction:row;align-items:center;gap:2px}pv-toolbar .left .volume,pv-toolbar .right .volume,pv-toolbar .center .volume{display:flex;flex-direction:row;justify-content:space-between;font-size:1.3em;padding-right:14px}pv-toolbar .left .volume i,pv-toolbar .right .volume i,pv-toolbar .center .volume i{height:100%;aspect-ratio:1;display:flex;justify-content:center;align-items:center;margin-left:2px;cursor:url(${p}),auto}pv-toolbar .left>button,pv-toolbar .right>button,pv-toolbar .center>button{aspect-ratio:1;font-size:1.3em}pv-toolbar .left .fps,pv-toolbar .right .fps,pv-toolbar .center .fps{font-size:12px;cursor:url(${h}),auto}pv-toolbar .left>*,pv-toolbar .right>*,pv-toolbar .center>*{background-color:var(--color-cards);height:46px;border:1px solid var(--color-hover);border-radius:0;display:flex;justify-content:center;align-items:center;transition:250ms;transition:250ms}pv-toolbar .left>*:not(:disabled):hover,pv-toolbar .right>*:not(:disabled):hover,pv-toolbar .center>*:not(:disabled):hover{transition:0ms}pv-toolbar .left>*:not(:disabled):hover,pv-toolbar .left>*.open,pv-toolbar .right>*:not(:disabled):hover,pv-toolbar .right>*.open,pv-toolbar .center>*:not(:disabled):hover,pv-toolbar .center>*.open{background-color:var(--color-hover)}pv-toolbar .left>*:first-child,pv-toolbar .right>*:first-child,pv-toolbar .center>*:first-child{border-top-left-radius:8px;border-bottom-left-radius:8px}pv-toolbar .left>*:last-child,pv-toolbar .right>*:last-child,pv-toolbar .center>*:last-child{border-top-right-radius:8px;border-bottom-right-radius:8px}pv-toolbar .center{width:100%;justify-content:end}`,""]);const v=u},8098:(e,t,o)=>{o.d(t,{A:()=>p});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9662),o.b),c=r()(n()),u=l()(d);c.push([e.id,`pv-user{display:flex;align-items:center;border-radius:6px;background-color:var(--color-cards);border:1px solid var(--color-hover);padding:3px 6px;font-size:.9em;margin:0;max-width:170px;line-height:1.4em;transition:250ms;cursor:url(${u}),auto;z-index:25;transition:250ms}pv-user:not(:disabled):hover{transition:0ms}pv-user.muted{opacity:.4}pv-user:hover,pv-user.open{background-color:var(--color-hover)}pv-user *{cursor:url(${u}),auto}pv-user .text{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}pv-user .badges{background-color:var(--color-badge);color:var(--color-badge-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}`,""]);const p=c},8758:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s)()(n());r.push([e.id,"pv-users{display:flex;flex-direction:column;justify-content:space-between;width:20vw;position:relative}pv-users .users{display:flex;flex-wrap:wrap;max-height:25vh;margin:6px 0;gap:4px;overflow:auto}",""]);const a=r},2100:(e,t,o)=>{o.d(t,{A:()=>g});var i=o(1601),n=o.n(i),s=o(6314),r=o.n(s),a=o(4417),l=o.n(a),d=new URL(o(9738),o.b),c=new URL(o(4675),o.b),u=new URL(o(9662),o.b),p=new URL(o(1873),o.b),h=r()(n());h.push([e.id,"@import url(https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css);"]),h.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;700&display=swap);"]);var v=l()(d),f=l()(c),m=l()(u),b=l()(p);h.push([e.id,`input[type=text]{flex:1;width:100%;border:none;outline:none;font-size:1em;padding-left:0;cursor:url(${v}),auto;color:var(--color-text);background-color:var(--color-cards);border-radius:8px;border:1px solid var(--color-hover);padding:10px}input[type=text]::placeholder{opacity:.4;color:var(--color-text)}input[type=text]:disabled{opacity:.4;cursor:url(${f}),auto}button{display:inline-block;outline:0;border:none;border-radius:8px;font-size:13px;background-color:var(--color-cards);color:var(--color-text);padding:0 18px;height:38px;cursor:url(${m}),auto;border:1px solid var(--color-hover);transition:250ms;box-sizing:border-box}button:not(:disabled):hover{transition:0ms}button>*{cursor:url(${m}),auto}button:not(:disabled):hover{background-color:var(--color-hover)}button:disabled{opacity:.4;cursor:url(${f}),auto}button:disabled>*{cursor:url(${f}),auto}.toggle{position:relative;display:inline-block;width:48px;height:28px}.toggle input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:url(${m}),auto;top:0;left:0;right:0;bottom:0;background-color:var(--color-cards);transition:125ms;border-radius:34px;border:1px solid var(--color-hover);transition:250ms}.slider:not(:disabled):hover{transition:0ms}.slider:hover{background-color:var(--color-hover)}.slider:before{position:absolute;bottom:4px;left:4px;content:"";background-color:#fff;border-radius:50%;transition:125ms;height:18px;width:18px}input:checked+.slider{background-color:var(--color-toggles);border:1px solid var(--color-toggles)}input:checked+.slider:before{-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:10px}a{cursor:url(${m}),auto;text-decoration:none;color:var(--color-links);font-weight:bold;user-select:auto;transition:250ms}a *{cursor:url(${m}),auto}a:hover{transition:0ms;text-decoration:underline}input[type=range]{-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);cursor:url(${m}),auto}input[type=range]::-webkit-slider-runnable-track{background:var(--color-background);border-radius:8px;height:.5rem}input[type=range]::-moz-range-track{background:var(--color-background);border-radius:8px;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(${m}),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(${m}),auto;margin-top:-0.4rem;border:none}input[type=range]:focus{outline:none}select{width:100%;font-size:.9em;padding:4px;border-radius:5px;background-color:var(--color-cards);color:var(--color-text);border:none;outline:none;cursor:url(${m}),auto;border:1px solid var(--color-hover);transition:250ms}select:not(:disabled):hover{transition:0ms}select:not(:disabled):hover{background-color:var(--color-hover)}select:focus{outline:none}select option{border-radius:0px;color:inherit}select option:disabled{color:var(--color-text);opacity:.4}select:disabled{cursor:url(${f}),auto}[data-tooltip]{position:relative}[data-tooltip]:before{display:block;opacity:0;pointer-events:none;position:absolute;z-index:100;background:var(--color-cards);color:var(--color-text);border-radius:8px;border:1px solid var(--color-hover);content:attr(data-tooltip);font-size:14px;padding:6px 9px;top:54px;white-space:nowrap;transform:translate3d(0, -10px, 0);transition:all 100ms ease-in-out;transition-delay:0;box-shadow:var(--box-shadow)}[data-tooltip]:hover:before{opacity:1;transform:translate3d(0, 0, 0);transition-delay:300ms}[data-tooltip].open:before{transition-delay:0ms;opacity:0}@media only screen and (max-device-width: 641px){[data-tooltip]:before{display:none}}:root{--color-success: #56c756;--color-warning: #cfb04b;--color-failure: #bb4949;--color-background: #0d0d0d;--color-cards: #212121;--color-hover: #272727;--color-badge: #303030;--color-badge-text: #c2c2c2;--color-text: #dddddd;--color-canvas: #1a1a1a;--color-lobby: #d6d4ae;--color-toggles: #09527c;--color-links: #0c88cf;--box-shadow: rgba(10, 10, 10, 0.4) 0px 2px 8px 0px}:root [data-theme=darker]{--color-background: #000000;--color-cards: #0d0d0d;--color-hover: #1d1d1d;--color-badge: #242424;--color-badge-text: #c2c2c2;--color-text: #dbdbdb;--color-canvas: #0d0d0d;--color-lobby: #caca9d;--color-toggles: #09527c;--color-links: #0b77b6;--box-shadow: rgba(10, 10, 10, 0.4) 0px 2px 8px 0px}:root [data-theme=catpuccin-mocha]{--color-background: #11111b;--color-cards: #2c2d3d;--color-hover: #38394e;--color-badge: #585b70;--color-badge-text: #cdd6f4;--color-text: #cdd6f4;--color-canvas: #1e1e2e;--color-lobby: #8b8cc0;--color-toggles: #4b4b97;--color-links: #6464c4;--box-shadow: rgba(10, 10, 10, 0.4) 0px 2px 8px 0px}:root [data-theme=viridian]{--color-background: #001f18;--color-cards: #003325;--color-hover: #003b2d;--color-badge: #00614c;--color-badge-text: #00ffca;--color-text: #c3fff5;--color-canvas: #003327;--color-lobby: #1fdfa0;--color-toggles: #008c67;--color-links: #009970;--box-shadow: rgb(0, 46, 34, 0.1) 0px 2px 8px 0px}:root [data-theme=macchiato]{--color-background: #f7eee9;--color-cards: #dccfc1;--color-hover: #d4c5b5;--color-badge: #f7eee9;--color-badge-text: #432818;--color-text: #432818;--color-canvas: #20130c;--color-lobby: #946d57;--color-toggles: #432818;--color-links: rgb(95, 56, 34);--box-shadow: rgba(10, 10, 10, 0.1) 0px 2px 8px 0px}:root [data-theme=matcha]{--color-background: #e5ece5;--color-cards: #ccdbcd;--color-hover: #c0d3c1;--color-badge: #e5f7e6;--color-badge-text: #2c4d2b;--color-text: #1a271c;--color-canvas: #172419;--color-lobby: #567e5b;--color-toggles: #567e5b;--color-links: #567e5b;--box-shadow: rgba(10, 10, 10, 0.1) 0px 2px 8px 0px}:root [data-theme=slate]{--color-background: #e5e7ec;--color-cards: #ccd1db;--color-hover: #c0c7d3;--color-badge: #e5ebf7;--color-badge-text: #2b374d;--color-text: #1a1f27;--color-canvas: #171c24;--color-lobby: #5f758f;--color-toggles: #5f758f;--color-links: #3f4f63;--box-shadow: rgba(10, 10, 10, 0.1) 0px 2px 8px 0px}:root [data-theme=taro]{--color-background: #e9e5ec;--color-cards: #d6ccdb;--color-hover: #ccc0d3;--color-badge: #f0e5f7;--color-badge-text: #422b4d;--color-text: #221a27;--color-canvas: #1f1724;--color-lobby: #765485;--color-toggles: #765485;--color-links: #765485;--box-shadow: rgba(10, 10, 10, 0.1) 0px 2px 8px 0px}::selection{background-color:var(--color-text);color:var(--color-cards)}::-webkit-scrollbar{width:8px;height:16px}::-webkit-scrollbar-track{background:rgba(0,0,0,0)}::-webkit-scrollbar-thumb{background:var(--color-cards);border:1px solid var(--color-hover);border-radius:8px}::-webkit-scrollbar-thumb:hover{background:var(--color-hover)}*{cursor:url(${b}),auto;font-family:"Nunito Sans",sans-serif;box-sizing:border-box;user-select:none}html{width:100vw;height:100%;overflow:hidden}html body{width:100%;height:100%;margin:0;overflow:hidden}html body>.app{position:relative;display:flex;width:100%;height:100%;background:var(--color-background);color:var(--color-text);padding:max(.8vw,8px);gap:max(.8vw,8px);overflow:hidden}html body>.app>.side{display:flex;flex-direction:column;position:relative}@media only screen and (max-device-width: 641px){html body>.app>.side{width:100%}html body>.app>.side>*{width:100%}}@media only screen and (max-device-height: 480px){html body>.app>.side{display:none}}@media only screen and (max-device-height: 480px)and (max-device-width: 641px){html body>.app>.side{display:flex}}html body>.app>.center{display:flex;flex-direction:column;overflow:hidden;border-radius:8px;width:100%;height:100%}@media only screen and (max-device-width: 641px){html body>.app>.center{display:none}}`,""]);const g=h},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",i=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),i&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),i&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,i,n,s){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(i)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},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,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,o){return Function.prototype.apply.call(e,t,o)};t=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=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(o,i){function n(o){e.removeListener(t,s),i(o)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",n),o([].slice.call(arguments))}f(e,t,s,{once:!0}),"error"!==t&&function(e,t,o){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,n)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var r=10;function a(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 d(e,t,o,i){var n,s,r;if(a(o),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,o.listener?o.listener:o),s=e._events),r=s[t]),void 0===r)r=s[t]=o,++e._eventsCount;else if("function"==typeof r?r=s[t]=i?[o,r]:[r,o]:i?r.unshift(o):r.push(o),(n=l(e))>0&&r.length>n&&!r.warned){r.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=r.length,console&&console.warn}return e}function c(){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 u(e,t,o){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:o},n=c.bind(i);return n.listener=o,i.wrapFn=n,n}function p(e,t,o){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?o?[n.listener||n]:[n]:o?function(e){for(var t=new Array(e.length),o=0;o0&&(r=t[0]),r instanceof Error)throw r;var a=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw a.context=r,a}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var d=l.length,c=v(l,d);for(o=0;o=0;s--)if(o[s]===t||o[s].listener===t){r=o[s].listener,n=s;break}if(n<0)return this;0===n?o.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6946:(e,t,o)=>{e.exports=o(4394)},4394:(e,t,o)=>{var i=t;function n(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}i.build="minimal",i.Writer=o(3449),i.BufferWriter=o(818),i.Reader=o(6237),i.BufferReader=o(3158),i.util=o(3610),i.rpc=o(5047),i.roots=o(4529),i.configure=n,n()},6237:(e,t,o)=>{e.exports=l;var i,n=o(3610),s=n.LongBits,r=n.utf8;function a(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 d,c="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")},u=function(){return n.Buffer?function(e){return(l.create=function(e){return n.Buffer.isBuffer(e)?new i(e):c(e)})(e)}:c};function p(){var e=new s(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(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 a(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 h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function v(){if(this.pos+8>this.len)throw a(this,8);return new s(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=u(),l.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,l.prototype.uint32=(d=4294967295,function(){if(d=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return d;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return d}),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 a(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,o=this.pos+e;if(o>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,o);if(t===o){var i=n.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,o)},l.prototype.string=function(){var e=this.bytes();return r.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(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){i=e,l.create=u(),i._configure();var t=n.Long?"toLong":"toNumber";n.merge(l.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return v.call(this)[t](!0)},sfixed64:function(){return v.call(this)[t](!1)}})}},3158:(e,t,o)=>{e.exports=s;var i=o(6237);(s.prototype=Object.create(i.prototype)).constructor=s;var n=o(3610);function s(e){i.call(this,e)}s._configure=function(){n.Buffer&&(s.prototype._slice=n.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,o)=>{t.Service=o(7595)},7595:(e,t,o)=>{e.exports=n;var i=o(3610);function n(e,t,o){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(o)}(n.prototype=Object.create(i.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(t,o,n,s,r){if(!s)throw TypeError("request must be specified");var a=this;if(!r)return i.asPromise(e,a,t,o,n,s);if(a.rpcImpl)try{return a.rpcImpl(t,o[a.requestDelimited?"encodeDelimited":"encode"](s).finish(),(function(e,o){if(e)return a.emit("error",e,t),r(e);if(null!==o){if(!(o instanceof n))try{o=n[a.responseDelimited?"decodeDelimited":"decode"](o)}catch(e){return a.emit("error",e,t),r(e)}return a.emit("data",o,t),r(null,o)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){r(e)}),0)}else setTimeout((function(){r(Error("already ended"))}),0)},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2239:(e,t,o)=>{e.exports=n;var i=o(3610);function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var s=n.zero=new n(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var r=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var o=e>>>0,i=(e-o)/4294967296>>>0;return t&&(i=~i>>>0,o=~o>>>0,++o>4294967295&&(o=0,++i>4294967295&&(i=0))),new n(o,i)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(i.isString(e)){if(!i.Long)return n.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):s},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,o=~this.hi>>>0;return t||(o=o+1>>>0),-(t+4294967296*o)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===r?s:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},n.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)},n.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},n.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},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return 0===o?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:o<128?9:10}},3610:function(e,t,o){var i=t;function n(e,t,o){for(var i=Object.keys(t),n=0;n0)},i.Buffer=function(){try{var e=i.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(e){return"number"==typeof e?i.Buffer?i._Buffer_allocUnsafe(e):new i.Array(e):i.Buffer?i._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},i.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(e){return e?i.LongBits.from(e).toHash():i.LongBits.zeroHash},i.longFromHash=function(e,t){var o=i.LongBits.fromHash(e);return i.Long?i.Long.fromBits(o.lo,o.hi,t):o.toNumber(Boolean(t))},i.merge=n,i.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},i.newError=s,i.ProtocolError=s("ProtocolError"),i.oneOfGetter=function(e){for(var t={},o=0;o-1;--o)if(1===t[e[o]]&&void 0!==this[e[o]]&&null!==this[e[o]])return e[o]}},i.oneOfSetter=function(e){return function(t){for(var o=0;o{e.exports=u;var i,n=o(3610),s=n.LongBits,r=n.base64,a=n.utf8;function l(e,t,o){this.fn=e,this.len=t,this.next=void 0,this.val=o}function d(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function u(){this.len=0,this.head=new l(d,0,0),this.tail=this.head,this.states=null}var p=function(){return n.Buffer?function(){return(u.create=function(){return new i})()}:function(){return new u}};function h(e,t,o){t[o]=255&e}function v(e,t){this.len=e,this.next=void 0,this.val=t}function f(e,t,o){for(;e.hi;)t[o++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[o++]=127&e.lo|128,e.lo=e.lo>>>7;t[o++]=e.lo}function m(e,t,o){t[o]=255&e,t[o+1]=e>>>8&255,t[o+2]=e>>>16&255,t[o+3]=e>>>24}u.create=p(),u.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype._push=function(e,t,o){return this.tail=this.tail.next=new l(e,t,o),this.len+=t,this},v.prototype=Object.create(l.prototype),v.prototype.fn=function(e,t,o){for(;e>127;)t[o++]=127&e|128,e>>>=7;t[o]=e},u.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new v((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},u.prototype.int32=function(e){return e<0?this._push(f,10,s.fromNumber(e)):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},u.prototype.uint64=function(e){var t=s.from(e);return this._push(f,t.length(),t)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(e){var t=s.from(e).zzEncode();return this._push(f,t.length(),t)},u.prototype.bool=function(e){return this._push(h,1,e?1:0)},u.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(e){var t=s.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},u.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var b=n.Array.prototype.set?function(e,t,o){t.set(e,o)}:function(e,t,o){for(var i=0;i>>0;if(!t)return this._push(h,1,0);if(n.isString(e)){var o=u.alloc(t=r.length(e));r.decode(e,o,0),e=o}return this.uint32(t)._push(b,t,e)},u.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},u.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(d,0,0),this.len=0,this},u.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(d,0,0),this.len=0),this},u.prototype.ldelim=function(){var e=this.head,t=this.tail,o=this.len;return this.reset().uint32(o),o&&(this.tail.next=e.next,this.tail=t,this.len+=o),this},u.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),o=0;e;)e.fn(e.val,t,o),o+=e.len,e=e.next;return t},u._configure=function(e){i=e,u.create=p(),i._configure()}},818:(e,t,o)=>{e.exports=s;var i=o(3449);(s.prototype=Object.create(i.prototype)).constructor=s;var n=o(3610);function s(){i.call(this)}function r(e,t,o){e.length<40?n.utf8.write(e,t,o):t.utf8Write?t.utf8Write(e,o):t.write(e,o)}s._configure=function(){s.alloc=n._Buffer_allocUnsafe,s.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(e,t,o){t.set(e,o)}:function(e,t,o){if(e.copy)e.copy(t,o,0,e.length);else for(var i=0;i>>0;return this.uint32(t),t&&this._push(s.writeBytesBuffer,t,e),this},s.prototype.string=function(e){var t=n.Buffer.byteLength(e);return this.uint32(t),t&&this._push(r,t,e),this},s._configure()},5072:e=>{var t=[];function o(e){for(var o=-1,i=0;i{var t={};e.exports=function(e,o){var i=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(o)}},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,o)=>{e.exports=function(e){var t=o.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(o){!function(e,t,o){var i="";o.supports&&(i+="@supports (".concat(o.supports,") {")),o.media&&(i+="@media ".concat(o.media," {"));var n=void 0!==o.layer;n&&(i+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),i+=o.css,n&&(i+="}"),o.media&&(i+="}"),o.supports&&(i+="}");var s=o.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,o)},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,o)=>{e.exports=o.p+"5dd1fe40dbea45cd26d2.cur"},9662:(e,t,o)=>{e.exports=o.p+"88b4a467a18e813218f8.cur"},9738:(e,t,o)=>{e.exports=o.p+"c7283f73cbd89e54a615.cur"},4675:(e,t,o)=>{e.exports=o.p+"27f230d7609eeee55225.cur"}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var o=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(o.exports,o,o.exports,__webpack_require__),o.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 o in t)__webpack_require__.o(t,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},__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&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var i=o.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=o[i--].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__={};(()=>{var e=__webpack_require__(5072),t=__webpack_require__.n(e),o=__webpack_require__(7825),i=__webpack_require__.n(o),n=__webpack_require__(7659),s=__webpack_require__.n(n),r=__webpack_require__(5056),a=__webpack_require__.n(r),l=__webpack_require__(540),d=__webpack_require__.n(l),c=__webpack_require__(1113),u=__webpack_require__.n(c),p=__webpack_require__(2100),h={};function v(e){const t=document.createElement("p");return t.appendChild(document.createTextNode(e)),t.innerHTML}h.styleTagTransform=u(),h.setAttributes=a(),h.insert=s().bind(null,"head"),h.domAPI=i(),h.insertStyleElement=d(),t()(p.A,h),p.A&&p.A.locals&&p.A.locals;class f extends HTMLElement{constructor(){super()}attributeChangedCallback(e,t,o){var i;this.isConnected&&(null===(i=this[`on_${e}_change`.replace(/_([a-z])/g,(e=>e[1].toUpperCase()))])||void 0===i||i.call(this,o))}}f.observedAttributes=[];const m=f,b=()=>(e,t)=>{delete e[t],Object.defineProperty(e,t,{get:function(){return this.querySelector(`.${e=t,e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}`);var e},set:void 0,enumerable:!0,configurable:!0})};var g=__webpack_require__(5146),y={};y.styleTagTransform=u(),y.setAttributes=a(),y.insert=s().bind(null,"head"),y.domAPI=i(),y.insertStyleElement=d(),t()(g.A,y),g.A&&g.A.locals&&g.A.locals;class w extends m{constructor(){super(),this.innerHTML='
    Loading, please wait...
    '}setCaption(e){this.caption.textContent=e||"Loading, please wait..."}}function k(e,t,o){return{configurable:!0,get(){const e=o.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}(function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);s>3&&r&&Object.defineProperty(t,o,r)})([b()],w.prototype,"caption",void 0),customElements.define("pv-loader",w);var x=__webpack_require__(4912),E={};E.styleTagTransform=u(),E.setAttributes=a(),E.insert=s().bind(null,"head"),E.domAPI=i(),E.insertStyleElement=d(),t()(x.A,E),x.A&&x.A.locals&&x.A.locals;var A=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class _ extends m{constructor(){super()}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){if(this.args=t,this.anchor=e,this.anchor){const e=this.anchor.getBoundingClientRect();this.popup.show();let t=0,o=e.left+e.width/2-this.popup.clientWidth/2-2,i=e.top+e.height+15;o<12&&(t=12-o,o=12),o+this.popup.clientWidth>window.innerWidth&&(t=window.innerWidth-o-this.popup.clientWidth-25,o=window.innerWidth-this.popup.clientWidth-25),this.popup.style.marginLeft=`${o}px`,this.popup.style.marginTop=`${i}px`,this.popup.style.setProperty("--offset",`${t}px`)}else this.popup.showModal()}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){const t=this.popup.getBoundingClientRect();this.isOpen()&&"OPTION"!==e.target.tagName&&!this.popup.hasAttribute("blocking")&&(e.clientXt.right||e.clientYt.bottom)&&this.close()}}A([b()],_.prototype,"popup",void 0),A([b()],_.prototype,"x",void 0),A([k],_.prototype,"close",null),A([k],_.prototype,"onMouseDown",null);const O=new class{constructor(){this.settings=new Map,this.callbacks=new Map}notifyChange(e,t){const o=this.callbacks.get(e)||[];for(const e of o)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 o=this.callbacks.get(e)||[];o.push(t),this.callbacks.set(e,o)}remove(e){this.settings.delete(e),this.save()}};var S=__webpack_require__(672),L={};L.styleTagTransform=u(),L.setAttributes=a(),L.insert=s().bind(null,"head"),L.domAPI=i(),L.insertStyleElement=d(),t()(S.A,L),S.A&&S.A.locals&&S.A.locals;var C=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class T extends _{constructor(){super(),this.innerHTML='
    Settings
    ',this.theme.value=O.get("theme")||"dark",this.keyboardLayout.value=O.get("keyboardLayout")||"pianoverse",this.showCursors.checked=O.get("showCursors"),this.showEffects.checked=O.get("showEffects"),this.showLabels.checked=O.get("showLabels")}connectedCallback(){super.connectedCallback(),this.theme.addEventListener("change",(()=>{O.set("theme",this.theme.value)})),this.keyboardLayout.addEventListener("change",(()=>{O.set("keyboardLayout",this.keyboardLayout.value)})),this.showEffects.addEventListener("change",(()=>{O.set("showEffects",this.showEffects.checked)})),this.showCursors.addEventListener("change",(()=>{O.set("showCursors",this.showCursors.checked)})),this.showLabels.addEventListener("change",(()=>{O.set("showLabels",this.showLabels.checked)}))}}C([b()],T.prototype,"theme",void 0),C([b()],T.prototype,"keyboardLayout",void 0),C([b()],T.prototype,"showEffects",void 0),C([b()],T.prototype,"showCursors",void 0),C([b()],T.prototype,"showLabels",void 0),customElements.define("pv-settings",T);var N,R,P,M=__webpack_require__(6946);function I(e){switch(e){case 0:case"USER":return N.USER;case 1:case"MODERATOR":return N.MODERATOR;case 2:case"DEVELOPER":return N.DEVELOPER;default:return N.UNRECOGNIZED}}function D(e){switch(e){case N.USER:return"USER";case N.MODERATOR:return"MODERATOR";case N.DEVELOPER:return"DEVELOPER";case N.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function j(e){switch(e){case 0:case"CLEAR":return R.CLEAR;case 1:case"PONG":return R.PONG;case 2:case"CHAT":return R.CHAT;case 3:case"ROOMS":return R.ROOMS;case 4:case"WELCOME":return R.WELCOME;case 5:case"MOVE":return R.MOVE;case 6:case"PRESS":return R.PRESS;case 7:case"RELEASE":return R.RELEASE;case 8:case"SUSTAIN":return R.SUSTAIN;case 9:case"PROFILE":return R.PROFILE;case 10:case"JOIN":return R.JOIN;case 11:case"LEAVE":return R.LEAVE;case 12:case"RATELIMIT":return R.RATELIMIT;case 13:case"MESSAGE":return R.MESSAGE;case 14:case"CHOWN":return R.CHOWN;default:return R.UNRECOGNIZED}}function U(e){switch(e){case R.CLEAR:return"CLEAR";case R.PONG:return"PONG";case R.CHAT:return"CHAT";case R.ROOMS:return"ROOMS";case R.WELCOME:return"WELCOME";case R.MOVE:return"MOVE";case R.PRESS:return"PRESS";case R.RELEASE:return"RELEASE";case R.SUSTAIN:return"SUSTAIN";case R.PROFILE:return"PROFILE";case R.JOIN:return"JOIN";case R.LEAVE:return"LEAVE";case R.RATELIMIT:return"RATELIMIT";case R.MESSAGE:return"MESSAGE";case R.CHOWN:return"CHOWN";case R.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function B(e){switch(e){case 0:case"CHOWN":return P.CHOWN;case 1:case"PING":return P.PING;case 2:case"ROOM":return P.ROOM;case 3:case"PROFILE":return P.PROFILE;case 4:case"CHAT":return P.CHAT;case 5:case"MOVE":return P.MOVE;case 6:case"MUTE":return P.MUTE;case 7:case"UNMUTE":return P.UNMUTE;case 8:case"KICK":return P.KICK;case 9:case"PRESS":return P.PRESS;case 10:case"RELEASE":return P.RELEASE;case 11:case"SUSTAIN":return P.SUSTAIN;case 12:case"HEARTBEAT":return P.HEARTBEAT;case 13:case"BAN":return P.BAN;case 14:case"IPBAN":return P.IPBAN;case 15:case"MOD":return P.MOD;case 16:case"UNMOD":return P.UNMOD;default:return P.UNRECOGNIZED}}!function(e){e[e.USER=0]="USER",e[e.MODERATOR=1]="MODERATOR",e[e.DEVELOPER=2]="DEVELOPER",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(N||(N={})),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.MESSAGE=13]="MESSAGE",e[e.CHOWN=14]="CHOWN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(R||(R={})),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.IPBAN=14]="IPBAN",e[e.MOD=15]="MOD",e[e.UNMOD=16]="UNMOD",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(P||(P={}));const H={encode(e,t=M.Writer.create()){void 0!==e.clear&&K.encode(e.clear,t.uint32(10).fork()).ldelim(),0!==e.event&&t.uint32(16).int32(e.event),void 0!==e.pong&&K.encode(e.pong,t.uint32(26).fork()).ldelim(),void 0!==e.chat&&X.encode(e.chat,t.uint32(34).fork()).ldelim();for(const o of e.rooms)$.encode(o,t.uint32(42).fork()).ldelim();return void 0!==e.welcome&&V.encode(e.welcome,t.uint32(50).fork()).ldelim(),void 0!==e.move&&F.encode(e.move,t.uint32(58).fork()).ldelim(),void 0!==e.press&&J.encode(e.press,t.uint32(66).fork()).ldelim(),void 0!==e.release&&G.encode(e.release,t.uint32(74).fork()).ldelim(),void 0!==e.sustain&&W.encode(e.sustain,t.uint32(82).fork()).ldelim(),void 0!==e.profile&&q.encode(e.profile,t.uint32(90).fork()).ldelim(),void 0!==e.join&&q.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.message&&t.uint32(122).string(e.message),""!==e.chown&&t.uint32(130).string(e.chown),t},decode(e,t){const o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={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,message:"",chown:""};for(;o.pos>>3){case 1:if(10!==e)break;n.clear=K.decode(o,o.uint32());continue;case 2:if(16!==e)break;n.event=o.int32();continue;case 3:if(26!==e)break;n.pong=K.decode(o,o.uint32());continue;case 4:if(34!==e)break;n.chat=X.decode(o,o.uint32());continue;case 5:if(42!==e)break;n.rooms.push($.decode(o,o.uint32()));continue;case 6:if(50!==e)break;n.welcome=V.decode(o,o.uint32());continue;case 7:if(58!==e)break;n.move=F.decode(o,o.uint32());continue;case 8:if(66!==e)break;n.press=J.decode(o,o.uint32());continue;case 9:if(74!==e)break;n.release=G.decode(o,o.uint32());continue;case 10:if(82!==e)break;n.sustain=W.decode(o,o.uint32());continue;case 11:if(90!==e)break;n.profile=q.decode(o,o.uint32());continue;case 12:if(98!==e)break;n.join=q.decode(o,o.uint32());continue;case 13:if(106!==e)break;n.leave=o.string();continue;case 14:if(112!==e)break;n.ratelimit=o.uint32();continue;case 15:if(122!==e)break;n.message=o.string();continue;case 16:if(130!==e)break;n.chown=o.string();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({clear:Q(e.clear)?K.fromJSON(e.clear):void 0,event:Q(e.event)?j(e.event):0,pong:Q(e.pong)?K.fromJSON(e.pong):void 0,chat:Q(e.chat)?X.fromJSON(e.chat):void 0,rooms:globalThis.Array.isArray(null==e?void 0:e.rooms)?e.rooms.map((e=>$.fromJSON(e))):[],welcome:Q(e.welcome)?V.fromJSON(e.welcome):void 0,move:Q(e.move)?F.fromJSON(e.move):void 0,press:Q(e.press)?J.fromJSON(e.press):void 0,release:Q(e.release)?G.fromJSON(e.release):void 0,sustain:Q(e.sustain)?W.fromJSON(e.sustain):void 0,profile:Q(e.profile)?q.fromJSON(e.profile):void 0,join:Q(e.join)?q.fromJSON(e.join):void 0,leave:Q(e.leave)?globalThis.String(e.leave):"",ratelimit:Q(e.ratelimit)?globalThis.Number(e.ratelimit):0,message:Q(e.message)?globalThis.String(e.message):"",chown:Q(e.chown)?globalThis.String(e.chown):""}),toJSON(e){var t;const o={};return void 0!==e.clear&&(o.clear=K.toJSON(e.clear)),0!==e.event&&(o.event=U(e.event)),void 0!==e.pong&&(o.pong=K.toJSON(e.pong)),void 0!==e.chat&&(o.chat=X.toJSON(e.chat)),(null===(t=e.rooms)||void 0===t?void 0:t.length)&&(o.rooms=e.rooms.map((e=>$.toJSON(e)))),void 0!==e.welcome&&(o.welcome=V.toJSON(e.welcome)),void 0!==e.move&&(o.move=F.toJSON(e.move)),void 0!==e.press&&(o.press=J.toJSON(e.press)),void 0!==e.release&&(o.release=G.toJSON(e.release)),void 0!==e.sustain&&(o.sustain=W.toJSON(e.sustain)),void 0!==e.profile&&(o.profile=q.toJSON(e.profile)),void 0!==e.join&&(o.join=q.toJSON(e.join)),""!==e.leave&&(o.leave=e.leave),0!==e.ratelimit&&(o.ratelimit=Math.round(e.ratelimit)),""!==e.message&&(o.message=e.message),""!==e.chown&&(o.chown=e.chown),o},create:e=>H.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n,s,r;const a={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,message:"",chown:""};return a.clear=void 0!==e.clear&&null!==e.clear?K.fromPartial(e.clear):void 0,a.event=null!==(t=e.event)&&void 0!==t?t:0,a.pong=void 0!==e.pong&&null!==e.pong?K.fromPartial(e.pong):void 0,a.chat=void 0!==e.chat&&null!==e.chat?X.fromPartial(e.chat):void 0,a.rooms=(null===(o=e.rooms)||void 0===o?void 0:o.map((e=>$.fromPartial(e))))||[],a.welcome=void 0!==e.welcome&&null!==e.welcome?V.fromPartial(e.welcome):void 0,a.move=void 0!==e.move&&null!==e.move?F.fromPartial(e.move):void 0,a.press=void 0!==e.press&&null!==e.press?J.fromPartial(e.press):void 0,a.release=void 0!==e.release&&null!==e.release?G.fromPartial(e.release):void 0,a.sustain=void 0!==e.sustain&&null!==e.sustain?W.fromPartial(e.sustain):void 0,a.profile=void 0!==e.profile&&null!==e.profile?q.fromPartial(e.profile):void 0,a.join=void 0!==e.join&&null!==e.join?q.fromPartial(e.join):void 0,a.leave=null!==(i=e.leave)&&void 0!==i?i:"",a.ratelimit=null!==(n=e.ratelimit)&&void 0!==n?n:0,a.message=null!==(s=e.message)&&void 0!==s?s:"",a.chown=null!==(r=e.chown)&&void 0!==r?r:"",a}},z={encode:(e,t=M.Writer.create())=>(""!==e.chown&&t.uint32(10).string(e.chown),0!==e.event&&t.uint32(16).int32(e.event),void 0!==e.ping&&K.encode(e.ping,t.uint32(26).fork()).ldelim(),void 0!==e.room&&Y.encode(e.room,t.uint32(34).fork()).ldelim(),void 0!==e.profile&&q.encode(e.profile,t.uint32(42).fork()).ldelim(),""!==e.chat&&t.uint32(50).string(e.chat),void 0!==e.move&&F.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&&J.encode(e.press,t.uint32(90).fork()).ldelim(),void 0!==e.release&&G.encode(e.release,t.uint32(98).fork()).ldelim(),!1!==e.sustain&&t.uint32(104).bool(e.sustain),void 0!==e.heartbeat&&K.encode(e.heartbeat,t.uint32(114).fork()).ldelim(),void 0!==e.ban&&Z.encode(e.ban,t.uint32(122).fork()).ldelim(),""!==e.ipban&&t.uint32(130).string(e.ipban),""!==e.mod&&t.uint32(138).string(e.mod),""!==e.unmod&&t.uint32(146).string(e.unmod),t),decode(e,t){const o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={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,ipban:"",mod:"",unmod:""};for(;o.pos>>3){case 1:if(10!==e)break;n.chown=o.string();continue;case 2:if(16!==e)break;n.event=o.int32();continue;case 3:if(26!==e)break;n.ping=K.decode(o,o.uint32());continue;case 4:if(34!==e)break;n.room=Y.decode(o,o.uint32());continue;case 5:if(42!==e)break;n.profile=q.decode(o,o.uint32());continue;case 6:if(50!==e)break;n.chat=o.string();continue;case 7:if(58!==e)break;n.move=F.decode(o,o.uint32());continue;case 8:if(66!==e)break;n.mute=o.string();continue;case 9:if(74!==e)break;n.unmute=o.string();continue;case 10:if(82!==e)break;n.kick=o.string();continue;case 11:if(90!==e)break;n.press=J.decode(o,o.uint32());continue;case 12:if(98!==e)break;n.release=G.decode(o,o.uint32());continue;case 13:if(104!==e)break;n.sustain=o.bool();continue;case 14:if(114!==e)break;n.heartbeat=K.decode(o,o.uint32());continue;case 15:if(122!==e)break;n.ban=Z.decode(o,o.uint32());continue;case 16:if(130!==e)break;n.ipban=o.string();continue;case 17:if(138!==e)break;n.mod=o.string();continue;case 18:if(146!==e)break;n.unmod=o.string();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({chown:Q(e.chown)?globalThis.String(e.chown):"",event:Q(e.event)?B(e.event):0,ping:Q(e.ping)?K.fromJSON(e.ping):void 0,room:Q(e.room)?Y.fromJSON(e.room):void 0,profile:Q(e.profile)?q.fromJSON(e.profile):void 0,chat:Q(e.chat)?globalThis.String(e.chat):"",move:Q(e.move)?F.fromJSON(e.move):void 0,mute:Q(e.mute)?globalThis.String(e.mute):"",unmute:Q(e.unmute)?globalThis.String(e.unmute):"",kick:Q(e.kick)?globalThis.String(e.kick):"",press:Q(e.press)?J.fromJSON(e.press):void 0,release:Q(e.release)?G.fromJSON(e.release):void 0,sustain:!!Q(e.sustain)&&globalThis.Boolean(e.sustain),heartbeat:Q(e.heartbeat)?K.fromJSON(e.heartbeat):void 0,ban:Q(e.ban)?Z.fromJSON(e.ban):void 0,ipban:Q(e.ipban)?globalThis.String(e.ipban):"",mod:Q(e.mod)?globalThis.String(e.mod):"",unmod:Q(e.unmod)?globalThis.String(e.unmod):""}),toJSON(e){const t={};return""!==e.chown&&(t.chown=e.chown),0!==e.event&&(t.event=function(e){switch(e){case P.CHOWN:return"CHOWN";case P.PING:return"PING";case P.ROOM:return"ROOM";case P.PROFILE:return"PROFILE";case P.CHAT:return"CHAT";case P.MOVE:return"MOVE";case P.MUTE:return"MUTE";case P.UNMUTE:return"UNMUTE";case P.KICK:return"KICK";case P.PRESS:return"PRESS";case P.RELEASE:return"RELEASE";case P.SUSTAIN:return"SUSTAIN";case P.HEARTBEAT:return"HEARTBEAT";case P.BAN:return"BAN";case P.IPBAN:return"IPBAN";case P.MOD:return"MOD";case P.UNMOD:return"UNMOD";case P.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.event)),void 0!==e.ping&&(t.ping=K.toJSON(e.ping)),void 0!==e.room&&(t.room=Y.toJSON(e.room)),void 0!==e.profile&&(t.profile=q.toJSON(e.profile)),""!==e.chat&&(t.chat=e.chat),void 0!==e.move&&(t.move=F.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=J.toJSON(e.press)),void 0!==e.release&&(t.release=G.toJSON(e.release)),!1!==e.sustain&&(t.sustain=e.sustain),void 0!==e.heartbeat&&(t.heartbeat=K.toJSON(e.heartbeat)),void 0!==e.ban&&(t.ban=Z.toJSON(e.ban)),""!==e.ipban&&(t.ipban=e.ipban),""!==e.mod&&(t.mod=e.mod),""!==e.unmod&&(t.unmod=e.unmod),t},create:e=>z.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n,s,r,a,l,d,c;const u={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,ipban:"",mod:"",unmod:""};return u.chown=null!==(t=e.chown)&&void 0!==t?t:"",u.event=null!==(o=e.event)&&void 0!==o?o:0,u.ping=void 0!==e.ping&&null!==e.ping?K.fromPartial(e.ping):void 0,u.room=void 0!==e.room&&null!==e.room?Y.fromPartial(e.room):void 0,u.profile=void 0!==e.profile&&null!==e.profile?q.fromPartial(e.profile):void 0,u.chat=null!==(i=e.chat)&&void 0!==i?i:"",u.move=void 0!==e.move&&null!==e.move?F.fromPartial(e.move):void 0,u.mute=null!==(n=e.mute)&&void 0!==n?n:"",u.unmute=null!==(s=e.unmute)&&void 0!==s?s:"",u.kick=null!==(r=e.kick)&&void 0!==r?r:"",u.press=void 0!==e.press&&null!==e.press?J.fromPartial(e.press):void 0,u.release=void 0!==e.release&&null!==e.release?G.fromPartial(e.release):void 0,u.sustain=null!==(a=e.sustain)&&void 0!==a&&a,u.heartbeat=void 0!==e.heartbeat&&null!==e.heartbeat?K.fromPartial(e.heartbeat):void 0,u.ban=void 0!==e.ban&&null!==e.ban?Z.fromPartial(e.ban):void 0,u.ipban=null!==(l=e.ipban)&&void 0!==l?l:"",u.mod=null!==(d=e.mod)&&void 0!==d?d:"",u.unmod=null!==(c=e.unmod)&&void 0!==c?c:"",u}},K={encode:(e,t=M.Writer.create())=>t,decode(e,t){const o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;for(;o.pos({}),toJSON:e=>({}),create:e=>K.fromPartial(null!=e?e:{}),fromPartial:e=>({})},q={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,name:void 0,color:void 0,role:void 0,muted:void 0,x:void 0,y:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(18!==e)break;n.name=o.string();continue;case 3:if(26!==e)break;n.color=o.string();continue;case 4:if(32!==e)break;n.role=o.int32();continue;case 5:if(40!==e)break;n.muted=o.bool();continue;case 6:if(53!==e)break;n.x=o.float();continue;case 7:if(61!==e)break;n.y=o.float();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,name:Q(e.name)?globalThis.String(e.name):void 0,color:Q(e.color)?globalThis.String(e.color):void 0,role:Q(e.role)?I(e.role):void 0,muted:Q(e.muted)?globalThis.Boolean(e.muted):void 0,x:Q(e.x)?globalThis.Number(e.x):void 0,y:Q(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=D(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=>q.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n,s,r,a;const l={id:void 0,name:void 0,color:void 0,role:void 0,muted:void 0,x:void 0,y:void 0};return l.id=null!==(t=e.id)&&void 0!==t?t:void 0,l.name=null!==(o=e.name)&&void 0!==o?o:void 0,l.color=null!==(i=e.color)&&void 0!==i?i:void 0,l.role=null!==(n=e.role)&&void 0!==n?n:void 0,l.muted=null!==(s=e.muted)&&void 0!==s?s:void 0,l.x=null!==(r=e.x)&&void 0!==r?r:void 0,l.y=null!==(a=e.y)&&void 0!==a?a:void 0,l}},$={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,count:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.count=o.uint32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,count:Q(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=>$.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={id:void 0,count:void 0};return i.id=null!==(t=e.id)&&void 0!==t?t:void 0,i.count=null!==(o=e.count)&&void 0!==o?o:void 0,i}},F={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,x:void 0,y:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(21!==e)break;n.x=o.float();continue;case 3:if(29!==e)break;n.y=o.float();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,x:Q(e.x)?globalThis.Number(e.x):void 0,y:Q(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=>F.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i;const n={id:void 0,x:void 0,y:void 0};return n.id=null!==(t=e.id)&&void 0!==t?t:void 0,n.x=null!==(o=e.x)&&void 0!==o?o:void 0,n.y=null!==(i=e.y)&&void 0!==i?i:void 0,n}},J={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,key:void 0,vel:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.key=o.uint32();continue;case 3:if(24!==e)break;n.vel=o.uint32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,key:Q(e.key)?globalThis.Number(e.key):void 0,vel:Q(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=>J.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i;const n={id:void 0,key:void 0,vel:void 0};return n.id=null!==(t=e.id)&&void 0!==t?t:void 0,n.key=null!==(o=e.key)&&void 0!==o?o:void 0,n.vel=null!==(i=e.vel)&&void 0!==i?i:void 0,n}},G={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,key:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.key=o.uint32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,key:Q(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=>G.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={id:void 0,key:void 0};return i.id=null!==(t=e.id)&&void 0!==t?t:void 0,i.key=null!==(o=e.key)&&void 0!==o?o:void 0,i}},W={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,enabled:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.enabled=o.bool();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,enabled:Q(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=>W.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={id:void 0,enabled:void 0};return i.id=null!==(t=e.id)&&void 0!==t?t:void 0,i.enabled=null!==(o=e.enabled)&&void 0!==o?o:void 0,i}},V={encode(e,t=M.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 o of e.chat)X.encode(o,t.uint32(50).fork()).ldelim();return void 0!==e.role&&t.uint32(56).int32(e.role),t},decode(e,t){const o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,name:void 0,color:void 0,room:void 0,owner:void 0,chat:[],role:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(18!==e)break;n.name=o.string();continue;case 3:if(26!==e)break;n.color=o.string();continue;case 4:if(34!==e)break;n.room=o.string();continue;case 5:if(42!==e)break;n.owner=o.string();continue;case 6:if(50!==e)break;n.chat.push(X.decode(o,o.uint32()));continue;case 7:if(56!==e)break;n.role=o.int32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,name:Q(e.name)?globalThis.String(e.name):void 0,color:Q(e.color)?globalThis.String(e.color):void 0,room:Q(e.room)?globalThis.String(e.room):void 0,owner:Q(e.owner)?globalThis.String(e.owner):void 0,chat:globalThis.Array.isArray(null==e?void 0:e.chat)?e.chat.map((e=>X.fromJSON(e))):[],role:Q(e.role)?I(e.role):void 0}),toJSON(e){var t;const o={};return void 0!==e.id&&(o.id=e.id),void 0!==e.name&&(o.name=e.name),void 0!==e.color&&(o.color=e.color),void 0!==e.room&&(o.room=e.room),void 0!==e.owner&&(o.owner=e.owner),(null===(t=e.chat)||void 0===t?void 0:t.length)&&(o.chat=e.chat.map((e=>X.toJSON(e)))),void 0!==e.role&&(o.role=D(e.role)),o},create:e=>V.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n,s,r,a;const l={id:void 0,name:void 0,color:void 0,room:void 0,owner:void 0,chat:[],role:void 0};return l.id=null!==(t=e.id)&&void 0!==t?t:void 0,l.name=null!==(o=e.name)&&void 0!==o?o:void 0,l.color=null!==(i=e.color)&&void 0!==i?i:void 0,l.room=null!==(n=e.room)&&void 0!==n?n:void 0,l.owner=null!==(s=e.owner)&&void 0!==s?s:void 0,l.chat=(null===(r=e.chat)||void 0===r?void 0:r.map((e=>X.fromPartial(e))))||[],l.role=null!==(a=e.role)&&void 0!==a?a:void 0,l}},X={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,content:void 0,name:void 0,color:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(18!==e)break;n.content=o.string();continue;case 3:if(26!==e)break;n.name=o.string();continue;case 4:if(34!==e)break;n.color=o.string();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,content:Q(e.content)?globalThis.String(e.content):void 0,name:Q(e.name)?globalThis.String(e.name):void 0,color:Q(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=>X.fromPartial(null!=e?e:{}),fromPartial(e){var t,o,i,n;const s={id:void 0,content:void 0,name:void 0,color:void 0};return s.id=null!==(t=e.id)&&void 0!==t?t:void 0,s.content=null!==(o=e.content)&&void 0!==o?o:void 0,s.name=null!==(i=e.name)&&void 0!==i?i:void 0,s.color=null!==(n=e.color)&&void 0!==n?n:void 0,s}},Y={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={room:void 0,private:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.room=o.string();continue;case 2:if(16!==e)break;n.private=o.bool();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({room:Q(e.room)?globalThis.String(e.room):void 0,private:Q(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=>Y.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={room:void 0,private:void 0};return i.room=null!==(t=e.room)&&void 0!==t?t:void 0,i.private=null!==(o=e.private)&&void 0!==o?o:void 0,i}},Z={encode:(e,t=M.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 o=e instanceof M.Reader?e:M.Reader.create(e);let i=void 0===t?o.len:o.pos+t;const n={id:void 0,minutes:void 0};for(;o.pos>>3){case 1:if(10!==e)break;n.id=o.string();continue;case 2:if(16!==e)break;n.minutes=o.uint32();continue}if(4==(7&e)||0===e)break;o.skipType(7&e)}return n},fromJSON:e=>({id:Q(e.id)?globalThis.String(e.id):void 0,minutes:Q(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=>Z.fromPartial(null!=e?e:{}),fromPartial(e){var t,o;const i={id:void 0,minutes:void 0};return i.id=null!==(t=e.id)&&void 0!==t?t:void 0,i.minutes=null!==(o=e.minutes)&&void 0!==o?o:void 0,i}};function Q(e){return null!=e}var ee=__webpack_require__(7007),te=__webpack_require__.n(ee);class oe extends(te()){constructor(){super(),this._users=new Map,this._popStateTriggered=!1,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.sad.ovh";}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"),nt.stop();const e=new URLSearchParams(window.location.search);O.has("name")&&O.has("color")&&this.profile(O.get("name"),O.get("color")),this.enter(e.get("r")||"Lobby")},this._ws.onclose=()=>{this.emit("reconnecting"),nt.start("Reconnecting..."),setTimeout(this.init,3e3)}}handleMessage(e){let t,o;const i=new FileReader;i.onload=()=>{if(i.result instanceof ArrayBuffer){const e=new Uint8Array(i.result),n=H.decode(e);t=U(n.event).toLowerCase(),o=n[t],this.handleEventData(t,o)}},i.readAsArrayBuffer(new Blob([e.data]))}handleEventData(e,t){switch(e){case"welcome":this._users=new Map;const{id:e,name:o,color:i,role:n,room:s,owner:r}=t;this.me={id:e,name:o,color:i,role:n},O.set("name",this.me.name),O.set("color",this.me.color),this.room={id:s,owner:r},this._popStateTriggered||("Lobby"===this.room.id?window.history.pushState({},"",window.location.pathname):window.history.pushState({},"",`?r=${encodeURI(this.room.id)}`)),this._popStateTriggered=!1;const a=document.querySelector("pv-toolbar"),l=document.querySelector("pv-canvas"),d=document.querySelector("pv-keys"),c=document.querySelector("pv-chat");"Backrooms"===this.room.id?(a.style.display="none",l.style.display="none",d.style.display="none",c.style.display="none"):(a.style.display="",l.style.display="",d.style.display="",c.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===ie.me.id&&(O.set("name",t.name),O.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"message":ot.closeEverything(),ot.open(Ze.MESSAGE,null,t);break;case"ratelimit":const u=`You're too fast! Try again in ${t/1e3} seconds.`;ot.closeEverything(),ot.open(Ze.MESSAGE,null,u)}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(z.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 o=z.create({event:P.ROOM,room:{room:e,private:t}});return this.send(o)}profile(e,t){const o=z.create({event:P.PROFILE,profile:{name:e||this.me.name,color:t||this.me.color}});return this.send(o)}chat(e){const t=z.create({event:P.CHAT,chat:e});return this.send(t)}move(e,t){const o=z.create({event:P.MOVE,move:{x:e,y:t}});return this.send(o)}chown(e){const t=z.create({event:P.CHOWN,chown:e});return this.send(t)}mute(e){this.get(e).muted=!0;const t=z.create({event:P.MUTE,mute:e});return this.send(t)}unmute(e){this.get(e).muted=!1;const t=z.create({event:P.UNMUTE,unmute:e});return this.send(t)}kick(e){const t=z.create({event:P.KICK,kick:e});return this.send(t)}ban(e,t=60){const o=z.create({event:P.BAN,ban:{id:e,minutes:t}});return this.send(o)}press(e,t){const o=z.create({event:P.PRESS,press:{key:e,vel:t}});return this.send(o)}release(e){const t=z.create({event:P.RELEASE,release:{key:e}});return this.send(t)}sustain(e){const t=z.create({event:P.SUSTAIN,sustain:e});return this.send(t)}mod(e){const t=z.create({event:P.MOD,mod:e});return this.send(t)}unmod(e){const t=z.create({event:P.UNMOD,unmod:e});return this.send(t)}ipban(e){const t=z.create({event:P.IPBAN,ipban:e});return this.send(t)}ping(){const e=z.create({event:P.PING});return this.send(e)}heartbeat(){const e=z.create({event:P.HEARTBEAT});return this.send(e)}}!function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);s>3&&r&&Object.defineProperty(t,o,r)}([k],oe.prototype,"init",null);const ie=new oe,ne=ie;var se=__webpack_require__(9728),re={};re.styleTagTransform=u(),re.setAttributes=a(),re.insert=s().bind(null,"head"),re.domAPI=i(),re.insertStyleElement=d(),t()(se.A,re),se.A&&se.A.locals&&se.A.locals;var ae,le=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class de extends _{constructor(){super(),this.innerHTML='
    Create 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())&&ne.enter(this.inputRoom.value.trim(),this.inputPrivate.checked)}isValid(){return this.inputRoom.value.trim().length>=2&&this.inputRoom.value.trim().length<=32}}le([b()],de.prototype,"inputRoom",void 0),le([b()],de.prototype,"inputPrivate",void 0),le([b()],de.prototype,"buttonSave",void 0),le([k],de.prototype,"handleInput",null),le([k],de.prototype,"handleKeyDown",null),le([k],de.prototype,"submit",null),customElements.define("pv-new-room",de),function(e){e[e.USER=0]="USER",e[e.MODERATOR=1]="MODERATOR",e[e.DEVELOPER=2]="DEVELOPER"}(ae||(ae={}));const ce=ae;var ue=function(e,t,o,i){return new(o||(o=Promise))((function(n,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,a)}l((i=i.apply(e,t||[])).next())}))};class pe extends(te()){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),O.on("volume",(t=>{this.volume=t,e.gain.value=Math.min(this.volume/100,1)}))}load(e,t){return ue(this,void 0,void 0,(function*(){const o=yield fetch(t),i=yield o.arrayBuffer(),n=yield this.ctx.decodeAudioData(i);return this.sounds.set(e,n),e}))}unload(e){return ue(this,void 0,void 0,(function*(){this.sounds.delete(e)}))}play(e,t){t>127&&(t=127);const o=this.ctx.currentTime,i=new AudioBufferSourceNode(this.ctx,{buffer:this.sounds.get(e)}),n=new GainNode(this.ctx,{gain:t/127}),s=new StereoPannerNode(this.ctx,{pan:(Number(e)-21)/87-.5});if(i.connect(n),n.connect(s),s.connect(this.limiter),i.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,o+.2),t.source.stop(o+.21)}this.currentlyPlaying.set(e,{source:i,gain:n})}stop(e){const t=this.ctx.currentTime;if(this.currentlyPlaying.has(e)){const o=this.currentlyPlaying.get(e);o.gain.gain.setValueAtTime(o.gain.gain.value,t),o.gain.gain.linearRampToValueAtTime(.1*o.gain.gain.value,t+.16),o.gain.gain.linearRampToValueAtTime(0,t+.4),o.source.stop(t+.41),this.currentlyPlaying.delete(e)}}}const he=new pe,ve={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,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,187:75,61:75,221:76},fe={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},me={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};var be=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};let ge=0,ye=109;class we extends(te()){constructor(){super(),this.layout=new ke,O.on("keyboardLayout",(e=>{switch(e){case"pianoverse":this.layout=new ke;break;case"multiplayerpiano":this.layout=new xe;break;case"virtualpiano":this.layout=new Ee}})),document.addEventListener("keydown",(e=>{if(!e.repeat&&!e.metaKey){switch(e.code){case"NumpadAdd":return this.velocity(Math.max(we.MIN_VELOCITY,Math.min(we.MAX_VELOCITY,ye+9))),void e.preventDefault();case"NumpadSubtract":return this.velocity(Math.max(we.MIN_VELOCITY,Math.min(we.MAX_VELOCITY,ye-9))),void e.preventDefault();case"ArrowDown":return this.transpose(-12),void e.preventDefault();case"ArrowLeft":return this.transpose(-1),void e.preventDefault();case"ArrowRight":return this.transpose(1),void e.preventDefault();case"ArrowUp":return this.transpose(12),void e.preventDefault();case"Backspace":return Ce.sustain(!Ce.isSustainEnabled()),void this.emit("sustain",Ce.isSustainEnabled());case"Space":return Ce.sustain(!0),void this.emit("sustain",!0)}this.handleKeydown(e)}})),document.addEventListener("keyup",(e=>{if(!e.repeat&&!e.metaKey)return"Space"===e.code?(Ce.sustain(!1),void this.emit("sustain",!1)):void this.handleKeyup(e)}))}transpose(e){ge+e>=we.MIN_TRANSPOSE&&ge+e<=we.MAX_TRANSPOSE&&(ge+=e),this.emit("transpose",ge)}velocity(e){e>=we.MIN_VELOCITY&&e<=we.MAX_VELOCITY&&(ye=e),this.emit("velocity",ye)}handleKeydown(e){this.layout.handleKeydown(e)}handleKeyup(e){this.layout.handleKeyup(e)}}we.MIN_TRANSPOSE=-36,we.MAX_TRANSPOSE=36,we.MIN_VELOCITY=1,we.MAX_VELOCITY=127,be([k],we.prototype,"handleKeydown",null),be([k],we.prototype,"handleKeyup",null);class ke{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,o=me[e.code]+t+ge;isNaN(o)||o<21||o>108||o&&!this.pressed[e.code]&&(Ce.press(o,ye),this.pressed[e.code]=o)}handleKeyup(e){"CapsLock"===e.code&&(this.caps=!1),this.pressed[e.code]&&(Ce.release(this.pressed[e.code]),delete this.pressed[e.code])}}class xe{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 o=ve[e.keyCode]+t+ge;isNaN(o)||o<21||o>108||o&&!this.pressed[e.keyCode]&&(Ce.press(o,ye),this.pressed[e.keyCode]=o)}handleKeyup(e){"CapsLock"===e.code&&(this.caps=!1),this.pressed[e.keyCode]&&(Ce.release(this.pressed[e.keyCode]),delete this.pressed[e.keyCode])}}class Ee{constructor(){this.pressed={}}handleKeydown(e){const t=fe[e.keyCode]+(e.shiftKey?1:0)+ge;isNaN(t)||t<21||t>108||t&&!this.pressed[e.keyCode]&&(Ce.press(t,ye),this.pressed[e.keyCode]=t)}handleKeyup(e){this.pressed[e.keyCode]&&(Ce.release(this.pressed[e.keyCode]),delete this.pressed[e.keyCode])}}const Ae=new we;var _e;!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"}(_e||(_e={}));class Oe extends(te()){get inputs(){var e;return null===(e=this.access)||void 0===e?void 0:e.inputs}get outputs(){var e;return null===(e=this.access)||void 0===e?void 0:e.outputs}constructor(){super(),this.outputIds=new Set,this.initialized=!1,this.pressed={},this.offset=0,this.init(),Ae.on("transpose",(e=>this.offset=e))}init(){return e=this,t=void 0,i=function*(){try{this.access=yield navigator.requestMIDIAccess({sysex:!1,software:!1}),this.access.onstatechange=e=>{e instanceof MIDIConnectionEvent&&this.handleConnectionEvent(e.port)},this.handleConnectionEvent()}catch(e){}},new((o=void 0)||(o=Promise))((function(n,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,a)}l((i=i.apply(e,t||[])).next())}));var e,t,o,i}handleConnectionEvent(e){var t,o;e?"input"===e.type&&(this.enableInput(e.id),this.initialized||setTimeout((()=>this.initialized=!0),1e3)):(null===(t=this.inputs)||void 0===t||t.forEach((e=>this.enableInput(e.id))),null===(o=this.outputs)||void 0===o||o.forEach((e=>this.disableOutput(e.id)))),this.emit("update")}onMidiInput(e){if(9==(15&e.data[0]))return;const t=e.data[0]>>4,o=e.data[1];8==t||9==t&&0==e.data[2]?(Ce.release(this.pressed[o]),delete this.pressed[o]):9==t?(this.pressed[o]=o+this.offset,Ce.press(o+this.offset,e.data[2])):11==t&&64==o&&Ce.sustain(e.data[2]>0)}isInputEnabled(e){var t;let o=!1;return null===(t=this.inputs)||void 0===t||t.forEach((t=>{t.id===e&&null!=t.onmidimessage&&(o=!0)})),o}enableInput(e){var t;null===(t=this.inputs)||void 0===t||t.forEach((t=>{t.id===e&&(t.onmidimessage=this.onMidiInput)}))}disableInput(e){var t;null===(t=this.inputs)||void 0===t||t.forEach((t=>{t.id===e&&(t.onmidimessage=null)}))}sendNoteOn(e,t){var o;null===(o=this.outputs)||void 0===o||o.forEach((o=>{this.outputIds.has(o.id)&&o.send([_e.NOTE_ON,e,Math.min(t,127)])}))}sendNoteOff(e){var t;null===(t=this.outputs)||void 0===t||t.forEach((t=>{this.outputIds.has(t.id)&&t.send([_e.NOTE_OFF,e,0])}))}isOutputEnabled(e){return this.outputIds.has(e)}enableOutput(e){this.outputIds.add(e)}disableOutput(e){this.outputIds.delete(e)}}!function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);s>3&&r&&Object.defineProperty(t,o,r)}([k],Oe.prototype,"onMidiInput",null);const Se=new Oe;class Le extends ee.EventEmitter{constructor(e){super(),this.audioEngine=e,this.mapSustain=new Map,this.mapPressed=new Map,this.mapSustained=new Map,ne.on("press",(({key:e,vel:t,id:o})=>this.press(e,t,o))),ne.on("release",(({key:e,id:t})=>this.release(e,t))),ne.on("sustain",(({enabled:e,id:t})=>this.sustain(e,t))),ne.on("welcome",(e=>{this.releaseAllNotes(),this.mapPressed.set(e.id,new Set),this.mapSustained.set(e.id,new Set),this.mapSustain.set(e.id,!1)})),ne.on("join",(e=>{this.mapPressed.set(e.id,new Set),this.mapSustained.set(e.id,new Set),this.mapSustain.set(e.id,!1)})),ne.on("leave",(e=>{this.releaseAllNotesFrom(e.id),this.mapPressed.delete(e.id),this.mapSustained.delete(e.id),this.mapSustain.delete(e.id)}))}load(e){const t=[];for(let o=21;o<=108;++o)t.push((()=>{return t=this,i=void 0,s=function*(){yield this.audioEngine.load(o.toString(),`sounds/${e}/${o}.mp3`),this.emit("loaded",o)},new((n=void 0)||(n=Promise))((function(e,o){function r(e){try{l(s.next(e))}catch(e){o(e)}}function a(e){try{l(s.throw(e))}catch(e){o(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof n?o:new n((function(e){e(o)}))).then(r,a)}l((s=s.apply(t,i||[])).next())}));var t,i,n,s})());Promise.all(t).catch((()=>{}))}press(e,t,o){var i,n;this.audioEngine.play(e.toString(),t),Se.sendNoteOn(e,t),o||(o=ne.me.id,ne.press(e,t)),(null===(i=this.mapPressed.get(o))||void 0===i?void 0:i.has(e))&&this.emit("release",e),null===(n=this.mapPressed.get(o))||void 0===n||n.add(e),this.mapSustain.get(o)&&this.mapSustained.get(o).add(e),this.emit("press",e,t,o)}release(e,t){var o,i;this.emit("release",e),t||(t=ne.me.id,ne.release(e)),null===(o=this.mapPressed.get(t))||void 0===o||o.delete(e),(null===(i=this.mapSustained.get(t))||void 0===i?void 0:i.has(e))||(this.audioEngine.stop(null==e?void 0:e.toString()),Se.sendNoteOff(e))}sustain(e,t){t||(t=ne.me.id,ne.sustain(e)),this.mapSustain.set(t,e),e?this.mapPressed.get(t).forEach((e=>this.mapSustained.get(t).add(e))):(this.mapSustained.get(t).forEach((e=>{this.mapPressed.get(t).has(e)||(this.mapSustained.get(t).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(ne.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(ne.me.id)}}Le.TRANSPOSE_MIN=-36,Le.TRANSPOSE_MAX=36;const Ce=new Le(he);var Te=__webpack_require__(7966),Ne={};Ne.styleTagTransform=u(),Ne.setAttributes=a(),Ne.insert=s().bind(null,"head"),Ne.domAPI=i(),Ne.insertStyleElement=d(),t()(Te.A,Ne),Te.A&&Te.A.locals&&Te.A.locals;var Re=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Pe extends _{constructor(){super(),this.innerHTML='
    ID: ########
    Promote
    Demote
    Make owner
    Mute notes
    Muted notes
    Mute chat
    Muted chat
    Kick
    Ban
    Ban IP
    ',ne.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}`,e===ne.room.owner||ne.me.id!==ne.room.owner&&ne.me.role!==ce.DEVELOPER||"Lobby"===ne.room.id?this.chown.style.display="none":this.chown.style.display="block",ne.me.role===ce.DEVELOPER?(this.banip.style.display="block",ne.get(e).role===ce.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"),ne.get(e).muted?(this.unmuteNotes.style.display="block",this.muteNotes.style.display="none"):(this.unmuteNotes.style.display="none",this.muteNotes.style.display="block"),ne.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=ne.me.id===ne.room.owner,o=ne.me.role===ce.MODERATOR||ne.me.role===ce.DEVELOPER;t&&ne.me.role>=ne.get(e).role||o&&ne.me.role>ne.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),ne.off("leave",this.onLeave)}onMod(){ne.mod(this.contextId),this.mod.style.display="none",this.unmod.style.display="block"}onUnmod(){ne.unmod(this.contextId),this.mod.style.display="block",this.unmod.style.display="none"}onChown(){ne.chown(this.contextId),this.close()}onMuteNotes(){var e;ne.mute(this.contextId),setTimeout((()=>Ce.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;ne.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;ne.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;ne.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(){ne.kick(this.contextId),this.close()}onBan(){ot.open(Ze.BAN,null,this.contextId),this.close()}onBanIP(){ne.ipban(this.contextId),this.close()}onLeave(e){e.id===this.contextId&&this.isOpen()&&this.close()}}Re([b()],Pe.prototype,"muteNotes",void 0),Re([b()],Pe.prototype,"unmuteNotes",void 0),Re([b()],Pe.prototype,"muteChat",void 0),Re([b()],Pe.prototype,"unmuteChat",void 0),Re([b()],Pe.prototype,"chown",void 0),Re([b()],Pe.prototype,"kick",void 0),Re([b()],Pe.prototype,"ban",void 0),Re([b()],Pe.prototype,"banip",void 0),Re([b()],Pe.prototype,"mod",void 0),Re([b()],Pe.prototype,"unmod",void 0),Re([b()],Pe.prototype,"userid",void 0),Re([k],Pe.prototype,"onMod",null),Re([k],Pe.prototype,"onUnmod",null),Re([k],Pe.prototype,"onChown",null),Re([k],Pe.prototype,"onMuteNotes",null),Re([k],Pe.prototype,"onUnmuteNotes",null),Re([k],Pe.prototype,"onMuteChat",null),Re([k],Pe.prototype,"onUnmuteChat",null),Re([k],Pe.prototype,"onKick",null),Re([k],Pe.prototype,"onBan",null),Re([k],Pe.prototype,"onBanIP",null),Re([k],Pe.prototype,"onLeave",null),customElements.define("pv-actions",Pe);var Me=__webpack_require__(6138),Ie={};Ie.styleTagTransform=u(),Ie.setAttributes=a(),Ie.insert=s().bind(null,"head"),Ie.domAPI=i(),Ie.insertStyleElement=d(),t()(Me.A,Ie),Me.A&&Me.A.locals&&Me.A.locals;var De=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class je extends _{constructor(){super(),this.innerHTML='

    Inputs

    Outputs

    '}connectedCallback(){super.connectedCallback(),Se.on("update",this.updateDevices),this.updateDevices()}disconnectedCallback(){Se.off("update",this.updateDevices)}updateDevices(){var e,t,o,i;let n=0,s=0;null===(e=Se.inputs)||void 0===e||e.forEach((e=>++n)),null===(t=Se.outputs)||void 0===t||t.forEach((e=>++s)),0===n?this.setMutedMessage(this.inputs,"No MIDI devices"):(this.inputs.innerHTML="",null===(o=Se.inputs)||void 0===o||o.forEach((e=>this.addInputToggle(e)))),0===s?this.setMutedMessage(this.outputs,"No MIDI devices"):(this.outputs.innerHTML="",null===(i=Se.outputs)||void 0===i||i.forEach((e=>this.addOutputToggle(e))))}setMutedMessage(e,t){e.innerHTML="";const o=document.createElement("div");o.classList.add("field");const i=document.createElement("span");i.classList.add("muted"),i.textContent=t,o.append(i),e.append(o)}addInputToggle(e){const t=document.createElement("div");t.classList.add("field");const o=document.createElement("label");o.textContent=e.name;const i=document.createElement("label");i.classList.add("toggle");const n=document.createElement("input");n.type="checkbox",n.checked=Se.isInputEnabled(e.id);const s=document.createElement("span");s.classList.add("slider"),s.addEventListener("click",(()=>{Se.isInputEnabled(e.id)?(Se.disableInput(e.id),Ce.releaseAllMyNotes(),n.checked=!0):(Se.enableInput(e.id),n.checked=!1)})),i.append(n),i.append(s),t.append(o),t.append(i),this.inputs.append(t)}addOutputToggle(e){const t=document.createElement("div");t.classList.add("field");const o=document.createElement("label");o.textContent=e.name;const i=document.createElement("label");i.classList.add("toggle");const n=document.createElement("input");n.type="checkbox",n.checked=Se.isOutputEnabled(e.id);const s=document.createElement("span");s.classList.add("slider"),s.addEventListener("click",(()=>{Se.isOutputEnabled(e.id)?(Se.disableOutput(e.id),Ce.releaseAllMyNotes(),n.checked=!0):(Se.enableOutput(e.id),n.checked=!1)})),i.append(n),i.append(s),t.append(o),t.append(i),this.outputs.append(t)}}De([b()],je.prototype,"inputs",void 0),De([b()],je.prototype,"outputs",void 0),De([k],je.prototype,"updateDevices",null),customElements.define("pv-devices",je);var Ue=__webpack_require__(9114),Be={};Be.styleTagTransform=u(),Be.setAttributes=a(),Be.insert=s().bind(null,"head"),Be.domAPI=i(),Be.insertStyleElement=d(),t()(Ue.A,Be),Ue.A&&Ue.A.locals&&Ue.A.locals;var He=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class ze extends _{constructor(){super(),this.innerHTML='
    Information
    '}onOpen(e){this.message.textContent=e,this.closeButton.addEventListener("click",this.close)}}He([b()],ze.prototype,"message",void 0),He([b()],ze.prototype,"closeButton",void 0),customElements.define("pv-message",ze);var Ke=__webpack_require__(8394),qe={};qe.styleTagTransform=u(),qe.setAttributes=a(),qe.insert=s().bind(null,"head"),qe.domAPI=i(),qe.insertStyleElement=d(),t()(Ke.A,qe),Ke.A&&Ke.A.locals&&Ke.A.locals;var $e=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Fe extends _{constructor(){super(),this.innerHTML='
    My profile
    '}onOpen(){this.inputId.value=ne.me.id,this.inputUsername.value=ne.me.name,this.inputColor.value=ne.me.color,this.inputColorText.value=ne.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(),ne.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)}}$e([b()],Fe.prototype,"inputId",void 0),$e([b()],Fe.prototype,"inputUsername",void 0),$e([b()],Fe.prototype,"inputColorText",void 0),$e([b()],Fe.prototype,"inputColor",void 0),$e([b()],Fe.prototype,"buttonSave",void 0),$e([k],Fe.prototype,"handleColorTextInput",null),$e([k],Fe.prototype,"handleColorInput",null),$e([k],Fe.prototype,"handleInput",null),$e([k],Fe.prototype,"handleKeyDown",null),$e([k],Fe.prototype,"submit",null),customElements.define("pv-profile",Fe);var Je=__webpack_require__(5500),Ge={};Ge.styleTagTransform=u(),Ge.setAttributes=a(),Ge.insert=s().bind(null,"head"),Ge.domAPI=i(),Ge.insertStyleElement=d(),t()(Je.A,Ge),Je.A&&Je.A.locals&&Je.A.locals;class We extends _{constructor(){super(),this.innerHTML='

    Sounds

    '}connectedCallback(){super.connectedCallback(),this.sound.addEventListener("change",(()=>{O.set("sound",this.sound.value)}))}onOpen(){this.sound.value=O.get("sound")}}(function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);s>3&&r&&Object.defineProperty(t,o,r)})([b()],We.prototype,"sound",void 0),customElements.define("pv-sounds",We);const Ve=()=>(e,t)=>{delete e[t],e.constructor.observedAttributes.push(t),Object.defineProperty(e,t,{get:function(){return this.getAttribute(t)},set:function(e){this.setAttribute(t,e)},enumerable:!0,configurable:!0})};var Xe=__webpack_require__(8138),Ye={};Ye.styleTagTransform=u(),Ye.setAttributes=a(),Ye.insert=s().bind(null,"head"),Ye.domAPI=i(),Ye.insertStyleElement=d(),t()(Xe.A,Ye),Xe.A&&Xe.A.locals&&Xe.A.locals;var Ze,Qe,et=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class tt extends _{constructor(){super(),this.innerHTML='
    Ban player
    Are you sure you want to ban this player from the room?
    '}connectedCallback(){super.connectedCallback(),this.duration.value="60",this.submit.addEventListener("click",(()=>{const e=Number(this.duration.value);ne.ban(this.userId,e),this.close()}))}onOpen(e){this.userId=e}}et([b()],tt.prototype,"duration",void 0),et([b()],tt.prototype,"submit",void 0),et([Ve()],tt.prototype,"userId",void 0),customElements.define("pv-ban",tt),function(e){e.PROFILE="pv-profile",e.SETTINGS="pv-settings",e.NEW_ROOM="pv-new-room",e.MESSAGE="pv-message",e.BAN="pv-ban"}(Ze||(Ze={})),function(e){e.ACTIONS="pv-actions",e.DEVICES="pv-devices",e.SOUNDS="pv-sounds"}(Qe||(Qe={}));class ot{static open(e,...t){let o;switch(e){case Ze.BAN:o=new tt;break;case Ze.PROFILE:o=new Fe;break;case Ze.SETTINGS:o=new T;break;case Ze.MESSAGE:o=new ze;break;case Ze.NEW_ROOM:o=new de;break;case Qe.ACTIONS:o=new Pe;break;case Qe.DEVICES:o=new je;break;case Qe.SOUNDS:o=new We;break;default:throw new Error(`Popup ${e} not found`)}return o&&(document.body.append(o),o.open(...t)),o}static closeEverything(){ot.closeDialogs(),ot.closeModals()}static closeModals(){const e=Object.values(Ze).join(", ");document.querySelectorAll(e).forEach((e=>e.close()))}static closeDialogs(){const e=Object.values(Qe).join(", ");document.querySelectorAll(e).forEach((e=>e.close()))}}window.addEventListener("resize",(()=>ot.closeDialogs()));class it extends(te()){constructor(){super()}start(e){this.loader||(this.loader=new w,document.body.append(this.loader),ot.closeDialogs(),ot.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 nt=new it;var st=__webpack_require__(2732),rt={};rt.styleTagTransform=u(),rt.setAttributes=a(),rt.insert=s().bind(null,"head"),rt.domAPI=i(),rt.insertStyleElement=d(),t()(st.A,rt),st.A&&st.A.locals&&st.A.locals;var at=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class lt extends m{constructor(){super(),this.volumeBackup=100,this.innerHTML='
    ',this.volumeSlider.addEventListener("input",(()=>{O.set("volume",parseInt(this.volumeSlider.value))})),O.on("volume",(e=>{this.volumeSlider.value=e||0,e>0&&(this.volumeBackup=e)})),this.volume.addEventListener("wheel",(e=>{const t=O.get("volume");e.deltaY>0?O.set("volume",Math.max(t-5,0)):O.set("volume",Math.min(t+5,100))}),{passive:!0}),this.volume.getElementsByTagName("i")[0].addEventListener("click",(()=>{0==O.get("volume")?O.set("volume",this.volumeBackup):O.set("volume",0)})),navigator.share?this.share.addEventListener("click",(()=>navigator.share({url:location.href}))):this.share.remove(),this.discord.addEventListener("click",(()=>window.open("https://discord.gg/nDE7GK7Bru","_blank")))}connectedCallback(){O.on("volume",(e=>{this.volume.getElementsByTagName("i")[0].className=e<=0?"bi bi-volume-mute-fill":e<50?"bi bi-volume-down-fill":"bi bi-volume-up-fill"})),this.devices.addEventListener("click",(()=>{this.devices.classList.add("open"),ot.open(Qe.DEVICES,this.devices).onClosing((()=>this.devices.classList.remove("open")))})),this.sounds.addEventListener("click",(()=>{this.sounds.classList.add("open"),ot.open(Qe.SOUNDS,this.sounds).onClosing((()=>this.sounds.classList.remove("open")))}))}}at([b()],lt.prototype,"volume",void 0),at([b()],lt.prototype,"volumeSlider",void 0),at([b()],lt.prototype,"sounds",void 0),at([b()],lt.prototype,"devices",void 0),at([b()],lt.prototype,"share",void 0),at([b()],lt.prototype,"discord",void 0),customElements.define("pv-toolbar",lt);var dt=__webpack_require__(1230),ct={};ct.styleTagTransform=u(),ct.setAttributes=a(),ct.insert=s().bind(null,"head"),ct.domAPI=i(),ct.insertStyleElement=d(),t()(dt.A,ct),dt.A&&dt.A.locals&&dt.A.locals;var ut=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class pt extends m{constructor(){super(),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()}}function ht(e,t){return Math.random()*(t-e)+e}ut([Ve()],pt.prototype,"left",void 0),ut([Ve()],pt.prototype,"width",void 0),ut([Ve()],pt.prototype,"color",void 0),ut([k],pt.prototype,"onAnimationEnd",null),customElements.define("pv-note",pt);const vt=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 ft=__webpack_require__(5734),mt={};mt.styleTagTransform=u(),mt.setAttributes=a(),mt.insert=s().bind(null,"head"),mt.domAPI=i(),mt.insertStyleElement=d(),t()(ft.A,mt),ft.A&&ft.A.locals&&ft.A.locals;var bt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class gt extends m{constructor(){super(),this.particles=[],this.notes=[],this.start=0,this.frames=0,this.lastTime=0}connectedCallback(){this.innerHTML='
    Transpose: +0
      ',this.fps=document.getElementsByClassName("fps")[0],Ae.on("transpose",(e=>{this.info.innerText=`Transpose: ${e>0?"+":""}${e}`,this.info.style.animation="none",this.info.offsetHeight,this.info.style.animation="delayedFadeOut 1.5s forwards ease-out"})),Ae.on("velocity",(e=>{this.info.innerText=`Velocity: ${e}`,this.info.style.animation="none",this.info.offsetHeight,this.info.style.animation="delayedFadeOut 1.5s forwards ease-out"})),Ae.on("sustain",(e=>{this.info.innerText="Sustain "+(e?"ON":"OFF"),this.info.style.animation="none",this.info.offsetHeight,this.info.style.animation="delayedFadeOut 1.5s forwards ease-out"})),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}),Ce.on("press",this.onKeyPressed),Ce.on("release",this.onKeyReleased),O.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),e-this.start>=1e3&&this.fps&&(this.fps.textContent=`${this.frames} FPS`,this.frames=0,this.start=e),requestAnimationFrame(this.drawingAnimation)}update(e){for(let t=this.particles.length-1;t>=0;--t){const o=this.particles[t];o.r*=Math.pow(o.vr,e),o.r<=.5&&this.particles.splice(t,1),o.x+=o.vx*e,o.y+=o.vy*e,o.vx*=Math.pow(.95,e),o.vy*=Math.pow(.95,e)}for(const e of this.notes)if(e.pressed){const t=e.element.w,o=e.element.offsetLeft;for(let e=0;e<10;e++){const e=o+t/2+1.5*ht(-t/2,t/2);this.showEffects&&Math.random()>.7&&(this.particles.push({x:e,y:this.fgCanvas.height,vx:(e-o-t/2)/20,vy:ht(-4,-1),r:ht(2,2.4),vr:ht(.8,.99)}),this.particles.length>gt.MAX_PARTICLES&&this.particles.shift())}}else e.element.isConnected||(this.notes=this.notes.filter((t=>t!==e)))}onKeyPressed(e,t,o){var i;if(document.hidden||!this.showEffects)return;const n=vt.H[e-21];if(!n)return;const s=n.includes("s"),r=n.replace("s",""),a=vt.H.filter((e=>!e.includes("s"))).indexOf(r),l=this.fgCanvas.width*(a/52),d=s?this.fgCanvas.width/52/2:this.fgCanvas.width/52,c=new pt;c.setAttribute("left",`${s?l+1.45*d:l}px`),c.setAttribute("width",`${d}px`),c.setAttribute("color",null===(i=ne.get(o))||void 0===i?void 0:i.color),this.append(c),this.notes.push({key:e,pressed:!0,pressedAt:Date.now(),element:c})}onKeyReleased(e,t){const o=this.notes.filter((t=>e===t.key&&t.pressed));for(const e of o)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 o=this.particles[t];e.moveTo(o.x+o.r,o.y),e.arc(o.x,o.y,o.r,0,2*Math.PI)}e.fill()}drawOctaveLines(e){e.strokeStyle="white",e.shadowBlur=0,e.globalAlpha=.05,e.lineWidth=1;const t=.03809*this.bgCanvas.width,o=.13479*this.bgCanvas.width;e.beginPath();for(let i=0;i<8;++i)e.moveTo(t+i*o,0),e.lineTo(t+i*o,this.bgCanvas.height);e.stroke()}}gt.MAX_PARTICLES=2e3,bt([b()],gt.prototype,"info",void 0),bt([b()],gt.prototype,"bgCanvas",void 0),bt([b()],gt.prototype,"fgCanvas",void 0),bt([k],gt.prototype,"drawingAnimation",null),bt([k],gt.prototype,"onKeyPressed",null),bt([k],gt.prototype,"onKeyReleased",null),bt([k],gt.prototype,"onResize",null),customElements.define("pv-canvas",gt);var yt=__webpack_require__(6610),wt={};wt.styleTagTransform=u(),wt.setAttributes=a(),wt.insert=s().bind(null,"head"),wt.domAPI=i(),wt.insertStyleElement=d(),t()(yt.A,wt),yt.A&&yt.A.locals&&yt.A.locals;var kt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class xt extends m{constructor(){super()}connectedCallback(){this.innerHTML=' Anyonmous ',this.badge.textContent=this.name,O.get("showCursors")?this.style.display="flex":this.style.display="none",O.on("showCursors",(e=>{this.style.display=e?"flex":"none"}))}onNameChange(e){this.badge.textContent=e}}kt([b()],xt.prototype,"badge",void 0),kt([Ve()],xt.prototype,"name",void 0),customElements.define("pv-cursor",xt);var Et=__webpack_require__(8098),At={};At.styleTagTransform=u(),At.setAttributes=a(),At.insert=s().bind(null,"head"),At.domAPI=i(),At.insertStyleElement=d(),t()(Et.A,At),Et.A&&Et.A.locals&&Et.A.locals;var _t=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Ot extends m{constructor(e){super(),this.user=e,this.id=e.id}update(e){this.user=e,this.initialize()}connectedCallback(){this.innerHTML=' ',this.initialize(),this.addEventListener("click",this.openActions)}initialize(){switch(this.text.textContent=this.user.name,this.text.style.color=this.user.color,this.user.role){case ce.DEVELOPER:this.badges.style.display="block",this.badges.innerHTML="DEV";break;case ce.MODERATOR:this.badges.style.display="block",this.badges.innerHTML="MOD";break;default:case ce.USER:this.badges.style.display="none"}ne.room.owner===this.user.id&&(this.badges.style.display="block",this.badges.innerHTML="ROOM OWNER")}openActions(){this.classList.add("open"),(this.id===ne.me.id?ot.open(Ze.PROFILE):ot.open(Qe.ACTIONS,this,this.id)).onClosing((()=>this.classList.remove("open")))}}_t([b()],Ot.prototype,"text",void 0),_t([b()],Ot.prototype,"badges",void 0),_t([k],Ot.prototype,"openActions",null),customElements.define("pv-user",Ot);var St=__webpack_require__(8758),Lt={};Lt.styleTagTransform=u(),Lt.setAttributes=a(),Lt.insert=s().bind(null,"head"),Lt.domAPI=i(),Lt.insertStyleElement=d(),t()(St.A,Lt),St.A&&St.A.locals&&St.A.locals;var Ct=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Tt extends m{constructor(){super()}connectedCallback(){this.innerHTML='
      ',ne.on("welcome",this.initialize),ne.on("chown",this.initialize),ne.on("join",this.addUser),ne.on("profile",this.updateUser),ne.on("leave",this.removeUser),Ce.on("press",((e,t,o)=>{const i=document.getElementById(o);i&&(i.style.animation="none",i.offsetHeight,i.style.animation="bounce 180ms ease-out")}))}initialize(){this.users.innerHTML="",this.addUser(ne.me);for(const e of ne.users)this.addUser(e)}addUser(e){const t=new Ot(e);null==t||t.classList.toggle("muted",!(!ne.get(e.id).muted&&!ne.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",!(!ne.get(e.id).muted&&!ne.get(e.id).mutedChat))}removeUser(e){var t;null===(t=document.getElementById(e.id))||void 0===t||t.remove()}}Ct([b()],Tt.prototype,"users",void 0),Ct([k],Tt.prototype,"initialize",null),Ct([k],Tt.prototype,"addUser",null),Ct([k],Tt.prototype,"updateUser",null),Ct([k],Tt.prototype,"removeUser",null),customElements.define("pv-users",Tt);var Nt=__webpack_require__(5750),Rt={};Rt.styleTagTransform=u(),Rt.setAttributes=a(),Rt.insert=s().bind(null,"head"),Rt.domAPI=i(),Rt.insertStyleElement=d(),t()(Nt.A,Rt),Nt.A&&Nt.A.locals&&Nt.A.locals;var Pt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Mt extends m{constructor(){super(),this.isTactile=!1}connectedCallback(){this.innerHTML='
      ',this.setupKeysListeners(),Ce.on("loaded",this.onLoaded),Ce.on("unloaded",this.onUnloaded),Ce.on("press",this.onPress),Ce.on("release",this.onRelease),O.on("showLabels",(e=>{const t=this.querySelectorAll("[data-key]");for(const o of Array.from(t))o.classList.toggle("show-label",e)})),O.on("sound",(e=>{const t=this.querySelectorAll("[data-key]");for(const e of Array.from(t))null==e||e.classList.add("loading");Ce.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 o=e.target,i=Number(o.dataset.key),n=Math.floor(e.offsetY/t.clientHeight*127);Ce.press(i,n);const s=()=>{Ce.release(i),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s)})),t.addEventListener("touchstart",(e=>{e.preventDefault(),this.isTactile=!0;const t=e.target,o=Number(t.dataset.key);Ce.press(o,110);const i=()=>{Ce.release(o),document.removeEventListener("touchend",i)};document.addEventListener("touchend",i)}))}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,o){const i=this.querySelector(`[data-key="${e}"]`);i&&(i.style.transitionDuration="0ms",i.style.backgroundColor=ne.get(o).color)}onRelease(e){const t=this.querySelector(`[data-key="${e}"]`);t&&(t.style.transitionDuration="",t.style.backgroundColor="")}}Pt([k],Mt.prototype,"onLoaded",null),Pt([k],Mt.prototype,"onUnloaded",null),Pt([k],Mt.prototype,"onPress",null),Pt([k],Mt.prototype,"onRelease",null),customElements.define("pv-keys",Mt);var It=__webpack_require__(9546),Dt={};Dt.styleTagTransform=u(),Dt.setAttributes=a(),Dt.insert=s().bind(null,"head"),Dt.domAPI=i(),Dt.insertStyleElement=d(),t()(It.A,Dt),It.A&&It.A.locals&&It.A.locals;var jt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Ut extends m{constructor(){super()}connectedCallback(){this.innerHTML='
        ',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),ne.on("welcome",this.onWelcome),ne.on("chat",this.onMessage),ne.on("join",this.onJoin),ne.on("clear",this.clearChat)}updateMutedMessages(){var e;const t=this.messages.querySelectorAll("li");for(let o=0;o=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(e){let t="";for(let o of e.content.split(" ")){const e=o.match(Ut.REGEX_HYPERLINK);if(o.startsWith("@")&&o.length>2&&o.length<=24)o=`${v(o)}`;else if(e){const t=v(e[0]).replace(/&/g,"&");o=`${t}`}t+=`${o} `}return t}onMessage(e){var t;const o=this.isAtChatBottom();if(!e.name)return void this.sendSystemMessage(e.content);e.content=v(e.content),e.name=v(e.name);const i=this.supercharge(e),n=document.createElement("span");n.classList.add("username"),n.style.color=e.color,n.innerHTML="discord"===e.id?`${e.name} `:e.name,n.title=e.id;const s=document.createElement("li");for(s.classList.add("message"),e.id&&(s.setAttribute("from",e.id),(null===(t=ne.get(e.id))||void 0===t?void 0:t.mutedChat)&&(s.style.display="none")),s.innerHTML=`${n.outerHTML}${i.trim()}`,this.messages.append(s);this.messages.children.length>Ut.MAX_MESSAGES;)this.messages.removeChild(this.messages.firstChild);o&&this.scrollDown()}sendChatMessage(){this.input.value.trim()&&(ne.chat(this.input.value),this.input.value="")}clearChat(){this.messages.innerHTML=""}sendSystemMessage(e){const t=this.isAtChatBottom(),o=document.createElement("li");o.textContent=e,o.classList.add("system"),this.messages.append(o),t&&this.scrollDown()}}Ut.MAX_MESSAGES=150,Ut.REGEX_HYPERLINK=/https?:\/\/[^\s@"'\:\$\(\)\{\}\\]{2,}/,jt([b()],Ut.prototype,"messages",void 0),jt([b()],Ut.prototype,"input",void 0),jt([b()],Ut.prototype,"send",void 0),jt([k],Ut.prototype,"scrollDown",null),jt([k],Ut.prototype,"onDocumentKeyDown",null),jt([k],Ut.prototype,"onInputKeyDown",null),jt([k],Ut.prototype,"onInputKeyUp",null),jt([k],Ut.prototype,"onWelcome",null),jt([k],Ut.prototype,"onJoin",null),jt([k],Ut.prototype,"onMessage",null),jt([k],Ut.prototype,"sendChatMessage",null),jt([k],Ut.prototype,"clearChat",null),customElements.define("pv-chat",Ut);var Bt=__webpack_require__(1358),Ht={};Ht.styleTagTransform=u(),Ht.setAttributes=a(),Ht.insert=s().bind(null,"head"),Ht.domAPI=i(),Ht.insertStyleElement=d(),t()(Bt.A,Ht),Bt.A&&Bt.A.locals&&Bt.A.locals;var zt=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Kt extends m{constructor(){super(),this.pingDelay=2e3}connectedCallback(){this.innerHTML=' Pinging... ',this.pingInterval=setInterval(this.sendPing,this.pingDelay),ne.isConnected()?this.sendPing():ne.once("connected",this.sendPing)}sendPing(){let e=Date.now();ne.ping()&&(ne.removeAllListeners("pong"),ne.once("pong",(()=>{const t=Date.now()-e;this.icon.className=t<200?"icon success":t<500?"icon warning":"icon failure",this.ms.textContent=`${t} ms`})))}disconnectedCallback(){clearInterval(this.pingInterval),ne.off("connected",this.sendPing)}}zt([b()],Kt.prototype,"icon",void 0),zt([b()],Kt.prototype,"ms",void 0),zt([k],Kt.prototype,"sendPing",null),customElements.define("pv-ping",Kt);var qt=__webpack_require__(6898),$t={};$t.styleTagTransform=u(),$t.setAttributes=a(),$t.insert=s().bind(null,"head"),$t.domAPI=i(),$t.insertStyleElement=d(),t()(qt.A,$t),qt.A&&qt.A.locals&&qt.A.locals;var Ft=function(e,t,o,i){var n,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,o,r):n(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};class Jt extends m{constructor(){super()}connectedCallback(){this.innerHTML='
        Offline
        1
        ',this.settings.addEventListener("click",(()=>ot.open(Ze.SETTINGS))),this.roomSelector.addEventListener("click",this.onClickHeader),this.roomList.addEventListener("click",this.onRoomSelected),ne.on("welcome",this.updateAll),ne.on("join",this.updateAll),ne.on("leave",this.updateAll),ne.on("rooms",this.updateRoomList),ne.on("reconnecting",this.updateTabTitle)}onClickHeader(e){this.roomList.hasAttribute("hidden")?(this.roomList.toggleAttribute("hidden",!1),document.addEventListener("mousedown",this.onMouseDown)):(this.roomList.toggleAttribute("hidden",!0),document.removeEventListener("mousedown",this.onMouseDown)),e.stopPropagation()}onMouseDown(e){this.roomList.contains(e.target)||this.roomSelector.contains(e.target)||(this.roomList.toggleAttribute("hidden",!0),document.removeEventListener("mousedown",this.onMouseDown))}onRoomSelected(e){const t=e.target;if(t.dataset.id){if(ne.room.id===t.dataset.id)return;ne.enter(t.dataset.id)}else t!==this.roomList&&ot.open(Ze.NEW_ROOM)}updateRoomList(e){for(;this.roomList.children.length>1;)this.roomList.removeChild(this.roomList.firstChild);for(const t of e.sort(((e,t)=>e.count-t.count||e.id.localeCompare(t.id)))){const e=t.id.match(/^Lobby(?: [0-9])?$|^Backrooms$/),o=document.createElement("div"),i=document.createElement("span");o.classList.toggle("lobby",!!e),i.classList.add("room-name"),i.textContent=t.id;const n=document.createElement("span");n.classList.add("room-count"),n.innerHTML=` ${t.count}`,o.dataset.id=t.id,o.insertAdjacentElement("beforeend",i),o.insertAdjacentElement("beforeend",n),this.roomList.insertBefore(o,this.roomList.firstChild)}}updateAll(){const e=ne.users.length+1;this.count.textContent=e.toString(),this.updateTabTitle(),this.updateRoomName()}updateRoomName(){this.roomName.textContent=ne.room.id||"--";const e=ne.room.id.match(/^Lobby(?: [1-9])?$|^Backrooms$/);this.roomSelector.classList.toggle("lobby",!!e)}updateTabTitle(){ne.room.id?ne.isConnected()?document.title=`Pianoverse - ${ne.room.id} (${1+ne.users.length})`:document.title=`Pianoverse - ${ne.room.id}`:document.title="Pianoverse"}}Ft([b()],Jt.prototype,"roomSelector",void 0),Ft([b()],Jt.prototype,"roomName",void 0),Ft([b()],Jt.prototype,"count",void 0),Ft([b()],Jt.prototype,"roomList",void 0),Ft([b()],Jt.prototype,"settings",void 0),Ft([k],Jt.prototype,"onClickHeader",null),Ft([k],Jt.prototype,"onMouseDown",null),Ft([k],Jt.prototype,"onRoomSelected",null),Ft([k],Jt.prototype,"updateRoomList",null),Ft([k],Jt.prototype,"updateAll",null),Ft([k],Jt.prototype,"updateRoomName",null),Ft([k],Jt.prototype,"updateTabTitle",null),customElements.define("pv-room",Jt);let Gt=Date.now(),Wt={x:0,y:0},Vt=!O.get("showCursors");O.on("showCursors",(e=>{Vt=!e,Vt&&ne.move(1,1)})),document.addEventListener("mousemove",(e=>{var t,o;Vt||Date.now()-Gt<10||(t=Wt,o={x:e.clientX,y:e.clientY},Math.sqrt(Math.pow(t.x-o.x,2)+Math.pow(t.y-o.y,2))<3||(ne.move(e.clientX/window.innerWidth,e.clientY/window.innerHeight),Gt=Date.now(),Wt={x:e.clientX,y:e.clientY}))}));const Xt=new Map,Yt=new Map;function Zt(e){document.querySelector("link[rel=icon]").href=e?"favicon-light.svg":"favicon-dark.svg"}ne.on("welcome",(e=>{Xt.forEach((e=>e.parentNode.removeChild(e))),Xt.clear()})),ne.on("join",(e=>{if(Xt.has(e.id))return;const t=new xt;t.setAttribute("name",e.name),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),Xt.set(e.id,t)})),ne.on("move",(e=>{if(!Xt.has(e.id))return;const t=Xt.get(e.id);t.style.left=e.x*window.innerWidth+"px",t.style.top=e.y*window.innerHeight+"px",t.classList.remove("idle"),Yt.has(e.id)&&(clearTimeout(Yt.get(e.id)),Yt.delete(e.id)),Yt.set(e.id,setTimeout((()=>t.classList.add("idle")),1500))})),ne.on("leave",(e=>{var t;if(!Xt.has(e.id))return;const o=Xt.get(e.id);null===(t=o.parentNode)||void 0===t||t.removeChild(o),Xt.delete(e.id)})),ne.on("profile",(e=>{if(!Xt.has(e.id))return;const t=Xt.get(e.id);t.setAttribute("name",e.name),t.style.color=e.color})),ne.on("reconnecting",(()=>{Array.from(Xt.values()).forEach((e=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),Xt.clear()})),O.on("theme",(e=>document.body.dataset.theme=e)),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(e=>Zt(e.matches))),Zt(window.matchMedia("(prefers-color-scheme: dark)").matches),nt.start("Joining the room..."),O.restore(),O.setDefault("volume",100),O.setDefault("theme","dark"),O.setDefault("keyboardLayout","virtualpiano"),O.setDefault("showCursors",!0),O.setDefault("showEffects",!0),O.setDefault("showLabels",!1),O.setDefault("sound","salamander"),O.remove("darkTheme"),O.remove("showNotes"),O.remove("showParticles"),O.remove("mppLayout"),O.remove("showFps"),O.remove("hideMyCursor"),O.remove("showPing")})()})(); \ No newline at end of file diff --git a/index.html b/index.html index ab132cd..51eb546 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,4 @@ + @@ -6,8 +7,8 @@ + - diff --git a/sounds/soft/100.mp3 b/sounds/soft/100.mp3 new file mode 100644 index 0000000..d361258 Binary files /dev/null and b/sounds/soft/100.mp3 differ diff --git a/sounds/soft/101.mp3 b/sounds/soft/101.mp3 new file mode 100644 index 0000000..c01a1bc Binary files /dev/null and b/sounds/soft/101.mp3 differ diff --git a/sounds/soft/102.mp3 b/sounds/soft/102.mp3 new file mode 100644 index 0000000..ef86b07 Binary files /dev/null and b/sounds/soft/102.mp3 differ diff --git a/sounds/soft/103.mp3 b/sounds/soft/103.mp3 new file mode 100644 index 0000000..f716700 Binary files /dev/null and b/sounds/soft/103.mp3 differ diff --git a/sounds/soft/104.mp3 b/sounds/soft/104.mp3 new file mode 100644 index 0000000..0c2ab82 Binary files /dev/null and b/sounds/soft/104.mp3 differ diff --git a/sounds/soft/105.mp3 b/sounds/soft/105.mp3 new file mode 100644 index 0000000..909bb49 Binary files /dev/null and b/sounds/soft/105.mp3 differ diff --git a/sounds/soft/106.mp3 b/sounds/soft/106.mp3 new file mode 100644 index 0000000..8ee5537 Binary files /dev/null and b/sounds/soft/106.mp3 differ diff --git a/sounds/soft/107.mp3 b/sounds/soft/107.mp3 new file mode 100644 index 0000000..b1a6b0b Binary files /dev/null and b/sounds/soft/107.mp3 differ diff --git a/sounds/soft/108.mp3 b/sounds/soft/108.mp3 new file mode 100644 index 0000000..7b4daf5 Binary files /dev/null and b/sounds/soft/108.mp3 differ diff --git a/sounds/soft/21.mp3 b/sounds/soft/21.mp3 new file mode 100644 index 0000000..b12c603 Binary files /dev/null and b/sounds/soft/21.mp3 differ diff --git a/sounds/soft/22.mp3 b/sounds/soft/22.mp3 new file mode 100644 index 0000000..d78f674 Binary files /dev/null and b/sounds/soft/22.mp3 differ diff --git a/sounds/soft/23.mp3 b/sounds/soft/23.mp3 new file mode 100644 index 0000000..2e2525f Binary files /dev/null and b/sounds/soft/23.mp3 differ diff --git a/sounds/soft/24.mp3 b/sounds/soft/24.mp3 new file mode 100644 index 0000000..0bc1acf Binary files /dev/null and b/sounds/soft/24.mp3 differ diff --git a/sounds/soft/25.mp3 b/sounds/soft/25.mp3 new file mode 100644 index 0000000..d7de476 Binary files /dev/null and b/sounds/soft/25.mp3 differ diff --git a/sounds/soft/26.mp3 b/sounds/soft/26.mp3 new file mode 100644 index 0000000..dfb8e82 Binary files /dev/null and b/sounds/soft/26.mp3 differ diff --git a/sounds/soft/27.mp3 b/sounds/soft/27.mp3 new file mode 100644 index 0000000..acb8c61 Binary files /dev/null and b/sounds/soft/27.mp3 differ diff --git a/sounds/soft/28.mp3 b/sounds/soft/28.mp3 new file mode 100644 index 0000000..f111ea8 Binary files /dev/null and b/sounds/soft/28.mp3 differ diff --git a/sounds/soft/29.mp3 b/sounds/soft/29.mp3 new file mode 100644 index 0000000..efce938 Binary files /dev/null and b/sounds/soft/29.mp3 differ diff --git a/sounds/soft/30.mp3 b/sounds/soft/30.mp3 new file mode 100644 index 0000000..626a735 Binary files /dev/null and b/sounds/soft/30.mp3 differ diff --git a/sounds/soft/31.mp3 b/sounds/soft/31.mp3 new file mode 100644 index 0000000..d2f631d Binary files /dev/null and b/sounds/soft/31.mp3 differ diff --git a/sounds/soft/32.mp3 b/sounds/soft/32.mp3 new file mode 100644 index 0000000..f42fe29 Binary files /dev/null and b/sounds/soft/32.mp3 differ diff --git a/sounds/soft/33.mp3 b/sounds/soft/33.mp3 new file mode 100644 index 0000000..046de4c Binary files /dev/null and b/sounds/soft/33.mp3 differ diff --git a/sounds/soft/34.mp3 b/sounds/soft/34.mp3 new file mode 100644 index 0000000..5a3b9c9 Binary files /dev/null and b/sounds/soft/34.mp3 differ diff --git a/sounds/soft/35.mp3 b/sounds/soft/35.mp3 new file mode 100644 index 0000000..d13299d Binary files /dev/null and b/sounds/soft/35.mp3 differ diff --git a/sounds/soft/36.mp3 b/sounds/soft/36.mp3 new file mode 100644 index 0000000..e23aa0e Binary files /dev/null and b/sounds/soft/36.mp3 differ diff --git a/sounds/soft/37.mp3 b/sounds/soft/37.mp3 new file mode 100644 index 0000000..9417a88 Binary files /dev/null and b/sounds/soft/37.mp3 differ diff --git a/sounds/soft/38.mp3 b/sounds/soft/38.mp3 new file mode 100644 index 0000000..ad5652f Binary files /dev/null and b/sounds/soft/38.mp3 differ diff --git a/sounds/soft/39.mp3 b/sounds/soft/39.mp3 new file mode 100644 index 0000000..9e87766 Binary files /dev/null and b/sounds/soft/39.mp3 differ diff --git a/sounds/soft/40.mp3 b/sounds/soft/40.mp3 new file mode 100644 index 0000000..bbf8baa Binary files /dev/null and b/sounds/soft/40.mp3 differ diff --git a/sounds/soft/41.mp3 b/sounds/soft/41.mp3 new file mode 100644 index 0000000..ea129ff Binary files /dev/null and b/sounds/soft/41.mp3 differ diff --git a/sounds/soft/42.mp3 b/sounds/soft/42.mp3 new file mode 100644 index 0000000..914a907 Binary files /dev/null and b/sounds/soft/42.mp3 differ diff --git a/sounds/soft/43.mp3 b/sounds/soft/43.mp3 new file mode 100644 index 0000000..fb62406 Binary files /dev/null and b/sounds/soft/43.mp3 differ diff --git a/sounds/soft/44.mp3 b/sounds/soft/44.mp3 new file mode 100644 index 0000000..3e4933c Binary files /dev/null and b/sounds/soft/44.mp3 differ diff --git a/sounds/soft/45.mp3 b/sounds/soft/45.mp3 new file mode 100644 index 0000000..560be76 Binary files /dev/null and b/sounds/soft/45.mp3 differ diff --git a/sounds/soft/46.mp3 b/sounds/soft/46.mp3 new file mode 100644 index 0000000..ac5daa7 Binary files /dev/null and b/sounds/soft/46.mp3 differ diff --git a/sounds/soft/47.mp3 b/sounds/soft/47.mp3 new file mode 100644 index 0000000..cca2fd6 Binary files /dev/null and b/sounds/soft/47.mp3 differ diff --git a/sounds/soft/48.mp3 b/sounds/soft/48.mp3 new file mode 100644 index 0000000..93f7065 Binary files /dev/null and b/sounds/soft/48.mp3 differ diff --git a/sounds/soft/49.mp3 b/sounds/soft/49.mp3 new file mode 100644 index 0000000..029e70d Binary files /dev/null and b/sounds/soft/49.mp3 differ diff --git a/sounds/soft/50.mp3 b/sounds/soft/50.mp3 new file mode 100644 index 0000000..eab2538 Binary files /dev/null and b/sounds/soft/50.mp3 differ diff --git a/sounds/soft/51.mp3 b/sounds/soft/51.mp3 new file mode 100644 index 0000000..2f9760a Binary files /dev/null and b/sounds/soft/51.mp3 differ diff --git a/sounds/soft/52.mp3 b/sounds/soft/52.mp3 new file mode 100644 index 0000000..09bec15 Binary files /dev/null and b/sounds/soft/52.mp3 differ diff --git a/sounds/soft/53.mp3 b/sounds/soft/53.mp3 new file mode 100644 index 0000000..4b7f251 Binary files /dev/null and b/sounds/soft/53.mp3 differ diff --git a/sounds/soft/54.mp3 b/sounds/soft/54.mp3 new file mode 100644 index 0000000..2ee77b7 Binary files /dev/null and b/sounds/soft/54.mp3 differ diff --git a/sounds/soft/55.mp3 b/sounds/soft/55.mp3 new file mode 100644 index 0000000..1ac74cd Binary files /dev/null and b/sounds/soft/55.mp3 differ diff --git a/sounds/soft/56.mp3 b/sounds/soft/56.mp3 new file mode 100644 index 0000000..f83976d Binary files /dev/null and b/sounds/soft/56.mp3 differ diff --git a/sounds/soft/57.mp3 b/sounds/soft/57.mp3 new file mode 100644 index 0000000..de64f9d Binary files /dev/null and b/sounds/soft/57.mp3 differ diff --git a/sounds/soft/58.mp3 b/sounds/soft/58.mp3 new file mode 100644 index 0000000..f162045 Binary files /dev/null and b/sounds/soft/58.mp3 differ diff --git a/sounds/soft/59.mp3 b/sounds/soft/59.mp3 new file mode 100644 index 0000000..3e32357 Binary files /dev/null and b/sounds/soft/59.mp3 differ diff --git a/sounds/soft/60.mp3 b/sounds/soft/60.mp3 new file mode 100644 index 0000000..04174c2 Binary files /dev/null and b/sounds/soft/60.mp3 differ diff --git a/sounds/soft/61.mp3 b/sounds/soft/61.mp3 new file mode 100644 index 0000000..e812607 Binary files /dev/null and b/sounds/soft/61.mp3 differ diff --git a/sounds/soft/62.mp3 b/sounds/soft/62.mp3 new file mode 100644 index 0000000..13973a7 Binary files /dev/null and b/sounds/soft/62.mp3 differ diff --git a/sounds/soft/63.mp3 b/sounds/soft/63.mp3 new file mode 100644 index 0000000..ce92028 Binary files /dev/null and b/sounds/soft/63.mp3 differ diff --git a/sounds/soft/64.mp3 b/sounds/soft/64.mp3 new file mode 100644 index 0000000..8a69900 Binary files /dev/null and b/sounds/soft/64.mp3 differ diff --git a/sounds/soft/65.mp3 b/sounds/soft/65.mp3 new file mode 100644 index 0000000..322e6a2 Binary files /dev/null and b/sounds/soft/65.mp3 differ diff --git a/sounds/soft/66.mp3 b/sounds/soft/66.mp3 new file mode 100644 index 0000000..797ed59 Binary files /dev/null and b/sounds/soft/66.mp3 differ diff --git a/sounds/soft/67.mp3 b/sounds/soft/67.mp3 new file mode 100644 index 0000000..a58165d Binary files /dev/null and b/sounds/soft/67.mp3 differ diff --git a/sounds/soft/68.mp3 b/sounds/soft/68.mp3 new file mode 100644 index 0000000..102a713 Binary files /dev/null and b/sounds/soft/68.mp3 differ diff --git a/sounds/soft/69.mp3 b/sounds/soft/69.mp3 new file mode 100644 index 0000000..e96f302 Binary files /dev/null and b/sounds/soft/69.mp3 differ diff --git a/sounds/soft/70.mp3 b/sounds/soft/70.mp3 new file mode 100644 index 0000000..66c6817 Binary files /dev/null and b/sounds/soft/70.mp3 differ diff --git a/sounds/soft/71.mp3 b/sounds/soft/71.mp3 new file mode 100644 index 0000000..0aeb55c Binary files /dev/null and b/sounds/soft/71.mp3 differ diff --git a/sounds/soft/72.mp3 b/sounds/soft/72.mp3 new file mode 100644 index 0000000..60eb7ce Binary files /dev/null and b/sounds/soft/72.mp3 differ diff --git a/sounds/soft/73.mp3 b/sounds/soft/73.mp3 new file mode 100644 index 0000000..fda95f4 Binary files /dev/null and b/sounds/soft/73.mp3 differ diff --git a/sounds/soft/74.mp3 b/sounds/soft/74.mp3 new file mode 100644 index 0000000..c523b6c Binary files /dev/null and b/sounds/soft/74.mp3 differ diff --git a/sounds/soft/75.mp3 b/sounds/soft/75.mp3 new file mode 100644 index 0000000..80fa528 Binary files /dev/null and b/sounds/soft/75.mp3 differ diff --git a/sounds/soft/76.mp3 b/sounds/soft/76.mp3 new file mode 100644 index 0000000..932289a Binary files /dev/null and b/sounds/soft/76.mp3 differ diff --git a/sounds/soft/77.mp3 b/sounds/soft/77.mp3 new file mode 100644 index 0000000..fd48d5f Binary files /dev/null and b/sounds/soft/77.mp3 differ diff --git a/sounds/soft/78.mp3 b/sounds/soft/78.mp3 new file mode 100644 index 0000000..8dce1dc Binary files /dev/null and b/sounds/soft/78.mp3 differ diff --git a/sounds/soft/79.mp3 b/sounds/soft/79.mp3 new file mode 100644 index 0000000..ce91ff5 Binary files /dev/null and b/sounds/soft/79.mp3 differ diff --git a/sounds/soft/80.mp3 b/sounds/soft/80.mp3 new file mode 100644 index 0000000..fcd735b Binary files /dev/null and b/sounds/soft/80.mp3 differ diff --git a/sounds/soft/81.mp3 b/sounds/soft/81.mp3 new file mode 100644 index 0000000..8973b66 Binary files /dev/null and b/sounds/soft/81.mp3 differ diff --git a/sounds/soft/82.mp3 b/sounds/soft/82.mp3 new file mode 100644 index 0000000..2173ba0 Binary files /dev/null and b/sounds/soft/82.mp3 differ diff --git a/sounds/soft/83.mp3 b/sounds/soft/83.mp3 new file mode 100644 index 0000000..8a13347 Binary files /dev/null and b/sounds/soft/83.mp3 differ diff --git a/sounds/soft/84.mp3 b/sounds/soft/84.mp3 new file mode 100644 index 0000000..0469aad Binary files /dev/null and b/sounds/soft/84.mp3 differ diff --git a/sounds/soft/85.mp3 b/sounds/soft/85.mp3 new file mode 100644 index 0000000..7597d3b Binary files /dev/null and b/sounds/soft/85.mp3 differ diff --git a/sounds/soft/86.mp3 b/sounds/soft/86.mp3 new file mode 100644 index 0000000..34916a9 Binary files /dev/null and b/sounds/soft/86.mp3 differ diff --git a/sounds/soft/87.mp3 b/sounds/soft/87.mp3 new file mode 100644 index 0000000..9655a79 Binary files /dev/null and b/sounds/soft/87.mp3 differ diff --git a/sounds/soft/88.mp3 b/sounds/soft/88.mp3 new file mode 100644 index 0000000..5c590ae Binary files /dev/null and b/sounds/soft/88.mp3 differ diff --git a/sounds/soft/89.mp3 b/sounds/soft/89.mp3 new file mode 100644 index 0000000..da1f08f Binary files /dev/null and b/sounds/soft/89.mp3 differ diff --git a/sounds/soft/90.mp3 b/sounds/soft/90.mp3 new file mode 100644 index 0000000..b17faba Binary files /dev/null and b/sounds/soft/90.mp3 differ diff --git a/sounds/soft/91.mp3 b/sounds/soft/91.mp3 new file mode 100644 index 0000000..213b4e7 Binary files /dev/null and b/sounds/soft/91.mp3 differ diff --git a/sounds/soft/92.mp3 b/sounds/soft/92.mp3 new file mode 100644 index 0000000..88e2d00 Binary files /dev/null and b/sounds/soft/92.mp3 differ diff --git a/sounds/soft/93.mp3 b/sounds/soft/93.mp3 new file mode 100644 index 0000000..99e35d2 Binary files /dev/null and b/sounds/soft/93.mp3 differ diff --git a/sounds/soft/94.mp3 b/sounds/soft/94.mp3 new file mode 100644 index 0000000..67f0917 Binary files /dev/null and b/sounds/soft/94.mp3 differ diff --git a/sounds/soft/95.mp3 b/sounds/soft/95.mp3 new file mode 100644 index 0000000..9af8caf Binary files /dev/null and b/sounds/soft/95.mp3 differ diff --git a/sounds/soft/96.mp3 b/sounds/soft/96.mp3 new file mode 100644 index 0000000..d9d4dd8 Binary files /dev/null and b/sounds/soft/96.mp3 differ diff --git a/sounds/soft/97.mp3 b/sounds/soft/97.mp3 new file mode 100644 index 0000000..ff3b2cc Binary files /dev/null and b/sounds/soft/97.mp3 differ diff --git a/sounds/soft/98.mp3 b/sounds/soft/98.mp3 new file mode 100644 index 0000000..0cffcb6 Binary files /dev/null and b/sounds/soft/98.mp3 differ diff --git a/sounds/soft/99.mp3 b/sounds/soft/99.mp3 new file mode 100644 index 0000000..bc43dfb Binary files /dev/null and b/sounds/soft/99.mp3 differ