From 09432ad2f92659a8a3bb4f016940ff24c83197cc Mon Sep 17 00:00:00 2001 From: lesleyrs <19632758+lesleyrs@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:43:02 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20lesleyrs?= =?UTF-8?q?/Client2@1bd3f9a097809d6afa265706ac002ccfd88b96aa=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 577d1f76..62a4a312 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -(()=>{"use strict";var t,i,s,h,e={8793:(t,i,s)=>{s.d(i,{K:()=>N});var h=s(1120),e=s(4583),n=s(1069),r=s(4702);class o{static tt=t=>{let i=0;t=t.toUpperCase();for(let s=0;s=this.st)return null;if(this.ot[t])return this.ot[t];const i=this.rt[t],s=i+this.nt[t];if(this.it){const h=Uint8Array.from(this.buffer.subarray(i,i+s));return this.ot[t]=h,h}{const i=Uint8Array.from(r.A.read(this.et[t],this.buffer,this.nt[t],this.rt[t]));return this.ot[t]=i,i}}}var l=s(8370),a=(s(8902),s(6666)),c=s(198),f=s(818),u=s(670),d=s(8268),w=s(3867),y=s(7854),A=s(8950),p=s(1302),m=s(9298),I=s(8665),E=s(1312),g=s(3819),_=s(8317),C=s(9234),T=s(123),O=s(5637),v=s(6948),b=s(2164),L=s(8738),R=s(3764),S=s(8534),M=s(6730);function k(t,i){var s;(s=document.createElement('a')).href=t,s.download=i,document.body.appendChild(s),s.style='display: none',s.click(),s.remove()}class x{wt=new Map;yt;At=self.isSecureContext?self.crypto.randomUUID():'0';constructor(t){this.yt=t}async It(){const t=new RTCPeerConnection({Et:[{gt:'stun:stun.l.google.com:19302'}]}),i=t.createDataChannel('channel'),s=crypto.randomUUID();this.wt.set(s,i),await t.setLocalDescription(await t.createOffer()),t.onicegatheringstatechange=async()=>{if('complete'===t.iceGatheringState){let i;self.isSecureContext?await navigator.clipboard.writeText(JSON.stringify(t.localDescription)):console.log(JSON.stringify(t.localDescription));try{for(;null===(i=prompt('Offer copied to clipboard, paste answer here')););t.setRemoteDescription(new RTCSessionDescription(JSON.parse(i)))}catch(t){console.error(t)}}},i.onopen=()=>{i.send(JSON.stringify({type:'id',id:s})),console.log('Connected to peer!')},i.onerror=t=>{console.error(t)},i.onmessage=t=>{const i=JSON.parse(t.data);i.data&&(i.data=Object.values(i.data)),this.yt&&this.yt.postMessage(i)}}postMessage(t){const i=this.wt.get(t.data.id),s=t.data;s.data&&(s.data=Array.from(t.data.data)),i&&'open'===i.readyState&&i.send(JSON.stringify(s))}}class D{pc;_t=void 0;At;constructor(t){this.pc=new RTCPeerConnection({Et:[{gt:'stun:stun.l.google.com:19302'}]}),this.pc.ondatachannel=i=>{this._t=i.channel,this._t.onopen=()=>{console.log('Connected to host!')},this._t.onerror=t=>{console.error(t)},this._t.onmessage=i=>{if(!this.At){const t=JSON.parse(i.data);if('id'===t.type)return void(this.At=t.id)}t.onmessage&&t.onmessage(i)}},this.pc.onicegatheringstatechange=async()=>{'complete'===this.pc.iceGatheringState&&(self.isSecureContext?await navigator.clipboard.writeText(JSON.stringify(this.pc.localDescription)):console.log(JSON.stringify(this.pc.localDescription)))}}async Ct(t){await this.pc.setRemoteDescription(new RTCSessionDescription(JSON.parse(t))),await this.pc.setLocalDescription(await this.pc.createAnswer())}}class N extends l.A{static Tt=225;static Ot=10;static portOffset=0;static members=!0;static vt=!1;static bt='';static Lt='';static Rt=!1;static St=2;static Mt=!1;static kt='https://raw.githubusercontent.com/2004scape/Server/main';static exponent=58778699976184461502525193738213253649000149147835990136706041084440742975821n;static xt=7162900525229798032761816791230527296329313291232324290237849263501208207972894053929065636522363163621000728841182238772712427862772219676577293600221789n;static Dt=0;static Nt=0;static Pt=0;static Ft=0;static Ut=0;static Bt=0;static Gt=0;static Ht=0;static Wt=0;static Yt=0;static Vt=0;static Kt=0;static Xt=0;static zt=0;static jt=0;static Zt=()=>{c.A.vt=!1,e.A.vt=!1,N.vt=!1,f.A.vt=!1};static qt=()=>{c.A.vt=!0,e.A.vt=!0,N.vt=!0,f.A.vt=!0};$t=2048;Jt=2047;Qt=!1;ti=!1;ii=!1;si=!1;db=null;hi=0;ei=[];stream=null;in=n.A.ni(1);ri=n.A.ni(1);oi=n.A.ni(1);li=0n;ai=0;ci=0;fi=0;ui=null;di=0;packetSize=0;wi=0;yi=0;Ai=0;pi=null;mi=!0;Ii=0;Ei=0;gi=null;_i=null;Ci=null;Ti=null;Oi=null;vi=null;bi=null;Li=null;Ri=null;Si=null;Mi=null;ki='';xi='';username='';password='';Di=null;Ni=null;Pi=null;Fi=null;Ui=[];Bi=!1;Gi=null;Hi=null;Wi=null;Yi=null;Vi=null;Ki=null;Xi=null;zi=null;ji=null;Zi=null;qi=new Int32Array(256);$i=0;Ji=0;Qi=0;ts=null;ss=null;hs=null;es=null;ns=null;rs=null;os=null;ls=null;cs=null;fs=null;us=null;ds=null;ws=null;ys=null;As=null;ps=null;Is=null;Es=null;gs=null;_s=null;Cs=null;Ts=new Int32Array(33);Os=new Int32Array(33);vs=new Int32Array(151);bs=new Int32Array(151);Ls=null;Rs=null;Ss=null;Ms=null;ks=null;xs=null;Ds=new w.Ns(13,null);Ps=null;Fs=null;Us=new w.Ns(50,null);Bs=new w.Ns(50,null);Gs=new w.Ns(20,null);Hs=new w.Ns(20,null);Ws=null;Ys=new w.Ns(8,null);Vs=null;Ks=null;Xs=null;zs=null;js=null;Zs=null;qs=null;$s=null;Js=null;Qs=null;th=null;ih=null;sh=null;hh=null;eh=null;nh=null;rh=null;oh=null;lh=new w.Ns(1e3,null);ah=!1;fh=!1;uh=!1;dh=!1;wh=-1;yh=0;Ah=0;ph=0;mh=0;Ih=0;Eh=0;gh=!1;_h=0;Ch=0;Th=0;Oh=0;bh=0;Lh=0;Rh=[];Sh=-1;Mh=-1;kh=new h.A;xh=78;Dh=0;Nh=0;Ph=[];Fh=0;Uh=0;Bh=0;Gh=0;Hh=0;Wh=0;Yh=0;Vh=0;Kh=[];Xh=[];zh=[];jh=[];Zh=null;qh=-1;$h=3;Jh=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];Qh=0;te=0;ie=0;se=!1;he=0;ee=!1;ne='';re='';oe=0;le='';ae=!1;ce=-1;fe=new w.Ns(100,null);ue=new w.Ns(100,null);messageType=new Int32Array(100);de=new Int32Array(100);we=0;ye=0;Ae=0;pe='';me=0;Ie=0;Ee=0;ge=0;_e=0;Ce=0;Te=0;Oe=0;ve=0;be=!1;Le=0;Re=0;Se=0;Me=0;ke=null;xe=0;De=0;Ne=0;Pe=0;Fe=!1;Ue=[];Be=[];Ge=0;He=0;We=0;Ye=null;Ve=0;Ke=new Int32Array(500);Xe=new Int32Array(500);ze=new Int32Array(500);je=new Int32Array(500);Ze=0;qe=0;$e=0;Je='';Qe=!1;tn=-1;sn=0;hn=0;en=0;nn=0;rn=0;ln=new Int32Array(1e3);an=new Int32Array(1e3);cn=null;fn=0;un=0;dn=0;wn=0;yn=0;An=!1;pn=0;mn=0;In=0;En=0;gn=2;_n=2;Cn=1;Tn=new Int32Array(5);On=new w.Ns(5,!1);vn=new Int32Array(5);bn=new Int32Array(5);Ln=new Int32Array(5);Rn=0;Sn=0;Mn=0;kn=0;xn=0;Dn=0;Nn=0;Pn=0;Fn=0;Un=1;Bn=2;Gn=-1;Hn=0;Wn=0;Yn=0;Vn=0;Kn=0;Xn=0;zn=null;jn=null;Zn=null;qn=0;$n=0;Jn=new Int8Array(16384);Qn=new w.Ns(u.A.tr,null);ir=0;sr=0;hr=128;er=0;nr=0;rr=0;lr=0;ar=0;cr=null;ur=null;dr=new w.wr(u.A.yr,u.A.yr);Ar=0;pr=0;mr=0;Ir=0;Er=0;gr=0;_r=0;Cr=0;Tr=0;Or=0;vr=0;br=0;Lr=new w.Ns(this.$t,null);Rr=0;Sr=new Int32Array(this.$t);Mr=0;kr=0;Dr=new Int32Array(this.$t);Nr=new Int32Array(1e3);Pr=new w.Ns(this.$t,null);Fr=new w.Ns(8192,null);Ur=0;Br=new Int32Array(8192);Gr=new a.A;Hr=new a.A;Wr=new a.A;Yr=new a.A;Vr=new w.Kr(u.A.tr,u.A.yr,u.A.yr,null);Xr=new a.A;zr=new Int32Array(4e3);jr=new Int32Array(4e3);Zr=new Int32Array(u.A.yr*u.A.yr);qr=new Int32Array(u.A.yr*u.A.yr);$r=0;Jr=null;Qr=0;io=0;so=-1;ho=0;eo=0;no=0;ro=0;oo=!1;lo=!0;ao=!1;co=new Int32Array(7);fo=new Int32Array(5);uo=0;do=0;static wo=50;yo=new Int32Array(N.wo);Ao=new Int32Array(N.wo);po=new Int32Array(N.wo);mo=new Int32Array(N.wo);Io=new Int32Array(N.wo);Eo=new Int32Array(N.wo);_o=new Int32Array(N.wo);Co=new w.Ns(N.wo,null);To=new w.Ns(100,null);Oo=new BigInt64Array(100);vo=new Int32Array(100);bo=null;Lo=0;Ro=!0;So=new Int32Array(50);Mo=new Int32Array(50);ko=new Int32Array(50);xo=192;Do=-1;No=-1;Po=0;Fo=0;Uo=0;Bo=!0;Go=null;Ho=0;Wo=0;Yo=192;yt=void 0;Vo=!1;host=null;Ko=null;Xo=new w.Ns(16,null);zo=0;jo=!1;Zo=()=>{try{this.stream&&this.stream.close()}catch(t){}this.Ko&&'998'===N.getParameter('world')&&this.Ko._t?.send(JSON.stringify({type:'close',id:this.Ko.At})),this.stream=null,(0,T.qo)(!1),this.ri=null,this.oi=null,this.in=null,this.Zn=null,this.zn=null,this.jn=null,this.cr=null,this.ur=null,this.cn=null,this.Qn=null,this.Zr=null,this.qr=null,this.zr=null,this.jr=null,this.Jn=null,this.ss=null,this.hs=null,this.es=null,this.ns=null,this.rs=null,this.os=null,this.ls=null,this.cs=null,this.fs=null,this.us=null,this.ds=null,this.ws=null,this.ys=null,this.As=null,this.ps=null,this.Is=null,this.Es=null,this.Ls=null,this.Ss=null,this.Rs=null,this.Ms=null,this.ks=null,this.xs=null,this.Ds=null,this.qs=null,this.$s=null,this.Js=null,this.Qs=null,this.th=null,this.ih=null,this.sh=null,this.hh=null,this.eh=null,this.nh=null,this.Fs=null,this.Gs=null,this.Hs=null,this.Ys=null,this.Vs=null,this.Ks=null,this.Xs=null,this.zs=null,this.Us=null,this.Bs=null,this.dr=null,this.Lr=null,this.Sr=null,this.Dr=null,this.Pr=null,this.Nr=null,this.Fr=null,this.Br=null,this.Vr=null,this.Xr=null,this.Yr=null,this.Gr=null,this.Hr=null,this.Wr=null,this.ze=null,this.je=null,this.Ke=null,this.Xe=null,this.Rh=null,this.Ue=null,this.ln=null,this.an=null,this.lh=null,this.Ps=null,this.To=null,this.Oo=null,this.vo=null,this.Ti=null,this.Oi=null,this.gi=null,this._i=null,this.Ci=null,this.vi=null,this.bi=null,this.Li=null,this.Ri=null,this.$o(),O.A.Zo(),v.A.Zo(),p.A.Zo(),b.A.Jo=null,_.A.Jo=null,h.A.Jo=null,E.A.Jo=null,L.A.Jo=null,L.A.Qo=null,R.A.Jo=null,this.tl=null,d.A.Qo=null,e.A.Zo(),c.A.Zo(),I.A.Zo(),S.A.Jo=[],M.A.Jo=[]};il(){return this.Ii}sl(){return this.ae}hl(){return this.ee}el(){return this.Mh}nl(){return this.wh}$o=()=>{this.Bi=!1,this.ts&&(clearInterval(this.ts),this.ts=null),this.Si=null,this.Mi=null,this.Ui=[],this.Xi=null,this.zi=null,this.ji=null,this.Zi=null,this.Yi=null,this.Wi=null,this.Vi=null,this.Ki=null,this.Gi=null,this.Hi=null};rl=()=>{'999'===N.getParameter('world')?(this.yt=new Worker('worker.js',{type:'module'}),this.yt.onmessage=this.onmessage,this.host=new x(this.yt)):'998'===N.getParameter('world')&&(this.yt={onmessage:t=>{this.stream.ol.onmessage(t)},postMessage:t=>{this.Ko&&this.Ko._t&&'open'===this.Ko._t.readyState&&this.Ko._t.send(JSON.stringify(t))},onerror:null,onmessageerror:null,terminate:()=>{throw new Error},addEventListener:()=>{throw new Error},removeEventListener:()=>{throw new Error},dispatchEvent:()=>{throw new Error}},this.Ko=new D(this.yt))};onmessage=t=>{switch(t.data.type){case'ready':return void(this.Vo=!0);case'save':return k(t.data.value,t.data.path.split('/').pop().split('\\').pop()),void URL.revokeObjectURL(t.data.value);case'close':return void this.yt?.postMessage({type:'close',id:t.data.id})}this.host?.At===t.data.id?this.stream.ol.onmessage(t.data):this.host?.postMessage(t)};ll=async()=>{if(999==+N.getParameter('world'))this.host&&await this.host.It();else if(998==+N.getParameter('world')&&this.Ko){if(this.Ko._t)return void console.log('You are already connected.');let t;try{for(;null===(t=prompt('Paste offer here, answer will be copied to clipboard')););await this.Ko.Ct(t)}catch(t){console.error(t)}}};al=async(t,i,s,h)=>{let e=5,r=await(this.db?.cl(t));if(r&&n.A.fl(r)!==s&&(r=void 0),r)return new o(r);for(;!r;){await this.ul(h,`Requesting ${i}`);try{r=+N.getParameter('world')<998?await(0,C.dl)(`${N.Lt}/${t}${s}`):await(0,C.dl)(`${N.Lt}/${t}`)}catch(t){r=void 0;for(let t=e;t>0;t--)await this.ul(h,`Error loading - Will retry in ${t} secs.`),await(0,C.wl)(1e3);e*=2,e>60&&(e=60)}}return await(this.db?.yl(t,r)),new o(r)};Al=async(t,i,s,h)=>{let e=await(this.db?.cl(t+'.mid'));if(e&&12345678!==i&&n.A.fl(e)!==i&&(e=void 0),!e)try{e=+N.getParameter('world')<998?await(0,C.dl)(`${N.Lt}/${t}_${i}.mid`):await(0,C.dl)(`${N.Lt}/songs/${t}.mid`),s!==e.length&&(e=e.slice(0,s))}catch(t){}if(!e)return;await(this.db?.yl(t+'.mid',e));const o=new n.A(Uint8Array.from(e)).ut,l=r.A.read(o,e,s,4);(0,T.pl)(l,this.Yo,h)};ml=()=>{if(y.Il.fillStyle='black',y.Il.fillRect(0,0,this.width,this.height),this.El(1),this.ii){this.Bi=!1,y.Il.font='bold 16px helvetica, sans-serif',y.Il.textAlign='left',y.Il.fillStyle='yellow';let t=35;y.Il.fillText('Sorry, an error has occured whilst loading RuneScape',30,t),t+=50,y.Il.fillStyle='white',y.Il.fillText('To fix this try the following (in order):',30,t),t+=50,y.Il.font='bold 12px helvetica, sans-serif',y.Il.fillText('1: Try closing ALL open web-browser windows, and reloading',30,t),t+=30,y.Il.fillText('2: Try clearing your web-browsers cache from tools->internet options',30,t),t+=30,y.Il.fillText('3: Try using a different game-world',30,t),t+=30,y.Il.fillText('4: Try rebooting your computer',30,t),t+=30,y.Il.fillText('5: Try selecting a different version of Java from the play-game menu',30,t)}if(this.si&&(this.Bi=!1,y.Il.font='bold 20px helvetica, sans-serif',y.Il.textAlign='left',y.Il.fillStyle='white',y.Il.fillText('Error - unable to load game!',50,50),y.Il.fillText('To play RuneScape make sure you play from',50,100),y.Il.fillText('https://2004scape.org',50,150)),this.ti){this.Bi=!1,y.Il.font='bold 13px helvetica, sans-serif',y.Il.textAlign='left',y.Il.fillStyle='yellow';let t=35;y.Il.fillText('Error a copy of RuneScape already appears to be loaded',30,t),t+=50,y.Il.fillStyle='white',y.Il.fillText('To fix this try the following (in order):',30,t),t+=50,y.Il.font='bold 12px helvetica, sans-serif',y.Il.fillText('1: Try closing ALL open web-browser windows, and reloading',30,t),t+=30,y.Il.fillText('2: Try rebooting your computer, and reloading',30,t)}};gl=t=>{if(!t._l)return!1;for(let i=0;i=h)return!1}else if(3===t._l[i]){if(s<=h)return!1}else if(4===t._l[i]){if(s===h)return!1}else if(s!==h)return!1}return!0};Ol=(t,i,s,h,e)=>{this.js?.draw(t,i),this.Zs?.draw(t,i+e-16),A.A.fillRect(t,i+16,16,e-32,m.A.vl);let n=(e-32)*e/h|0;n<8&&(n=8);const r=(e-n-32)*s/(h-e)|0;A.A.fillRect(t,i+r+16,16,n,m.A.bl),A.A.Ll(t,i+r+16,m.A.Rl,n),A.A.Ll(t+1,i+r+16,m.A.Rl,n),A.A.Sl(t,i+r+16,m.A.Rl,16),A.A.Sl(t,i+r+17,m.A.Rl,16),A.A.Ll(t+15,i+r+16,m.A.Ml,n),A.A.Ll(t+14,i+r+17,m.A.Ml,n-1),A.A.Sl(t,i+r+n+15,m.A.Ml,16),A.A.Sl(t+1,i+r+n+14,m.A.Ml,15)};kl=(t,i)=>{let s=!1;const e=h.A.Jo[t];if(!e.xl)return!1;for(let t=0;th.delay[n.Fl];)n.Pl-=h.delay[n.Fl]+1,n.Fl++,n.Fl>=h.Ul&&(n.Fl-=h.Bl,(n.Fl<0||n.Fl>=h.Ul)&&(n.Fl=0)),s=!0}}}return s};Gl=(t,i,s,n,r=!1)=>{if(0!==t.type||!t.xl||t.hide&&this.me!==t.id&&this.Ie!==t.id&&this.Ee!==t.id)return;const o=A.A.left,l=A.A.top,a=A.A.right,c=A.A.bottom;A.A.Hl(i,s,i+t.width,s+t.height);const f=t.xl.length;for(let o=0;o0&&this.zl(c),c.type===h.A.jl)c.Zl>c.scroll-c.height&&(c.Zl=c.scroll-c.height),c.Zl<0&&(c.Zl=0),this.Gl(c,l,a,c.Zl,r),c.scroll>c.height&&this.Ol(l+c.width,a,c.Zl,c.scroll,c.height);else if(c.type===h.A.ql){let t=0;for(let i=0;i0){let i=0,s=0;const n=c.Ql[t]-1;if(h>=-32&&h<=512&&e>=-32&&e<=334||0!==this.Ce&&this._e===t){const r=p.A.ha(n,c.ta[t]);if(0!==this.Ce&&this._e===t&&this.ge===c.id?(i=this.ea-this.Te,s=this.na-this.Oe,i<5&&i>-5&&(i=0),s<5&&s>-5&&(s=0),this.ve<5&&(i=0,s=0),r.ra(128,h+i,e+s)):0!==this.xe&&this.De===t&&this.Ne===c.id?r.ra(128,h,e):r.draw(h,e),33===r.oa||1!==c.ta[t]){const n=c.ta[t];this.Di?.la(h+i+1,e+10+s,this.aa(n),m.A.ca),this.Di?.la(h+i,e+9+s,this.aa(n),m.A.fa)}}}else if(c.ua&&t<20){const i=c.ua[t];i?.draw(h,e)}t++}}else if(c.type===h.A.da)c.fill?A.A.fillRect(l,a,c.width,c.height,c.wa):A.A.Vl(l,a,c.width,c.height,c.wa);else if(c.type===h.A.ya){const t=c.font;let i=c.wa,s=c.text;if(this.Ee!==c.id&&this.Ie!==c.id&&this.me!==c.id||0===c.Aa||(i=c.Aa),this.gl(c)&&(i=c.pa,c.ma&&c.ma.length>0&&(s=c.ma)),c.Ia===h.A.Ea&&this.Fe&&(s='Please wait...',i=c.wa),!t||!s)continue;for(let h=a+t.height;s.length>0;h+=t.height){if(-1!==s.indexOf('%')){for(;;){const t=s.indexOf('%1');if(-1===t)break;s=s.substring(0,t)+this.ga(this.Cl(c,0))+s.substring(t+2)}for(;;){const t=s.indexOf('%2');if(-1===t)break;s=s.substring(0,t)+this.ga(this.Cl(c,1))+s.substring(t+2)}for(;;){const t=s.indexOf('%3');if(-1===t)break;s=s.substring(0,t)+this.ga(this.Cl(c,2))+s.substring(t+2)}for(;;){const t=s.indexOf('%4');if(-1===t)break;s=s.substring(0,t)+this.ga(this.Cl(c,3))+s.substring(t+2)}for(;;){const t=s.indexOf('%5');if(-1===t)break;s=s.substring(0,t)+this.ga(this.Cl(c,4))+s.substring(t+2)}}const e=s.indexOf('\\n');let n;-1!==e?(n=s.substring(0,e),s=s.substring(e+2)):(n=s,s=''),c._a?t.Ca(l+(c.width/2|0),h,n,i,c.Ta):t.Oa(l,h,n,i,c.Ta)}}else if(c.type===h.A.va){let t;t=this.gl(c)?c.ba:c.La,t?.draw(l,a)}else if(c.type===h.A.Ra){const t=e.A.Sa,i=e.A.Ma;e.A.Sa=l+(c.width/2|0),e.A.Ma=a+(c.height/2|0);const s=e.A.sin[c.ka]*c.zoom>>16,h=e.A.cos[c.ka]*c.zoom>>16,n=this.gl(c);let r;r=n?c.Nl:c.Dl;let o=null;if(-1===r)o=c.xa(-1,-1,n);else{const t=E.A.Jo[r];t.frames&&t.Da&&(o=c.xa(t.frames[c.Fl],t.Da[c.Fl],n))}o&&o.Na(0,c.Pa,0,c.ka,0,s,h),e.A.Sa=t,e.A.Ma=i}else if(c.type===h.A.Fa){const t=c.font;if(!t||!c.Ql||!c.ta)continue;let i=0;for(let s=0;s0){const e=p.A.get(c.Ql[i]-1);let n=e.name;if((e.Ua||1!==c.ta[i])&&(n=n+' x'+this.Ba(c.ta[i])),!n)continue;const r=l+h*(c.ia+115),o=a+s*(c.sa+12);c._a?t.Ca(r+(c.width/2|0),o,n,c.wa,c.Ta):t.Oa(r,o,n,c.wa,c.Ta)}i++}}}A.A.Hl(o,l,a,c)};zl=t=>{let i=t.Xl;if(i>=h.A.Ga&&i<=h.A.Ha)i--,i>=this.uo?(t.text='',t.Ia=0):(t.text=this.To[i],t.Ia=1);else if(i>=h.A.Wa&&i<=h.A.Ya)i-=h.A.Wa,i>=this.uo?(t.text='',t.Ia=0):(0===this.vo[i]?t.text='@red@Offline':this.vo[i]===N.Ot?t.text='@gre@World-'+(this.vo[i]-9):t.text='@yel@World-'+(this.vo[i]-9),t.Ia=1);else if(i===h.A.Va)t.scroll=15*this.uo+20,t.scroll<=t.height&&(t.scroll=t.height+1);else if(i>=h.A.Ka&&i<=h.A.Xa)i-=h.A.Ka,i>=this.Nh?(t.text='',t.Ia=0):(t.text=g.A.za(g.A.ja(this.Ph[i])),t.Ia=1);else if(i===h.A.Za)t.scroll=15*this.Nh+20,t.scroll<=t.height&&(t.scroll=t.height+1);else if(i===h.A.qa){if(t.ka=150,t.Pa=256*Math.sin(this.hi/40)&2047,this.ao){this.ao=!1;const i=new w.Ns(7,null);let s=0;for(let t=0;t<7;t++){const h=this.co[t];h>=0&&(i[s++]=_.A.Jo[h].xa())}const h=I.A.$a(i,s);for(let t=0;t<5;t++)0!==this.fo[t]&&(h.Ja(d.A.Qa[t][0],d.A.Qa[t][this.fo[t]]),1===t&&h.Ja(d.A.tc[0],d.A.tc[this.fo[t]]));if(this.Jr){const i=E.A.Jo[this.Jr.ic].frames;i&&(h.sc(),h.hc(i[0]),h.ec(64,850,-30,-50,-30,!0),t.model=h)}}}else if(i===h.A.nc)this.rh||(this.rh=t.La,this.oh=t.ba),this.lo?t.La=this.oh:t.La=this.rh;else if(i===h.A.rc)this.rh||(this.rh=t.La,this.oh=t.ba),this.lo?t.La=this.rh:t.La=this.oh;else if(i===h.A.oc)t.text=this.Je,this.hi%20<10?t.text=t.text+'|':t.text=t.text+' ';else if(i===h.A.lc)this.oo?this.Qe?(t.wa=m.A.RED,t.text='Moderator option: Mute player for 48 hours: '):(t.wa=m.A.Kl,t.text='Moderator option: Mute player for 48 hours: '):t.text='';else if(i===h.A.ac||i===h.A.cc)if(0===this.sn)t.text='';else{let i;i=0===this.hn?'earlier today':1===this.hn?'yesterday':this.hn+' days ago',t.text='You last logged in '+i+' from: '+g.A.fc(this.sn)}else if(i===h.A.uc)0===this.nn&&(t.text='0 unread messages',t.wa=m.A.fa),1===this.nn&&(t.text='1 unread message',t.wa=m.A.GREEN),this.nn>1&&(t.text=this.nn+' unread messages',t.wa=m.A.GREEN);else if(i===h.A.dc)if(201===this.en)t.text='';else if(200===this.en)t.text='You have not yet set any password recovery questions.';else{let i;i=0===this.en?'Earlier today':1===this.en?'Yesterday':this.en+' days ago',t.text=i+' you changed your recovery questions'}else i===h.A.wc?201===this.en?t.text='':200===this.en?t.text='We strongly recommend you do so now to secure your account.':t.text='If you do not remember making this change then cancel it immediately':i===h.A.yc&&(201===this.en?t.text='':(this.en,t.text="Do this from the 'account management' area on our front webpage"))};Cl=(t,i)=>{if(!t.scripts||i>=t.scripts.length)return-2;try{const s=t.scripts[i];if(!s)return-1;let e=0,n=0;for(;;){const t=s[n++];if(0===t)return e;if(1===t)e+=this.Xh[s[n++]];else if(2===t)e+=this.zh[s[n++]];else if(3===t)e+=this.Kh[s[n++]];else if(4===t){const t=h.A.Jo[s[n++]],i=s[n++]+1;if(t.Ql&&t.ta)for(let s=0;st<999999999?String(t):'*';Ba=t=>{let i=String(t);for(let t=i.length-3;t>0;t-=3)i=i.substring(0,t)+','+i.substring(t);return i.length>8?i='@gre@'+i.substring(0,i.length-8)+' million @whi@('+i+')':i.length>4&&(i='@cya@'+i.substring(0,i.length-4)+'K @whi@('+i+')'),' '+i};aa=t=>t<1e5?String(t):t<1e7?(t/1e3|0)+'K':(t/1e6|0)+'M'}},7604:(t,i,s)=>{s.d(i,{w:()=>r});var h=s(8370),e=s(8793),n=s(9234);async function r(){await async function(){0===h.A.getParameter('world').length&&h.A.setParameter('world','1');['0','998','999'].includes(h.A.getParameter('world'))?function(){if(+h.A.getParameter('world')>=998)return void(e.K.Lt='data/pack/client');e.K.bt='http://localhost',e.K.Lt='http://localhost',e.K.portOffset=0}():await async function(t){const i=await o(t,parseInt(h.A.getParameter('world'),10)),s=new URL(i.address);e.K.Ot=10+i.id-1,e.K.bt=`${s.protocol}//${s.hostname}`,e.K.Lt=`${s.protocol}//${s.hostname}:${s.port}`,t||(e.K.bt=e.K.bt.replace('https:','http:'));e.K.portOffset=i.portOffset,e.K.members=!0===i?.members,h.A.setParameter('world',i.id.toString(10))}(window.location.protocol.startsWith('https'))}(),function(){0===h.A.getParameter('detail').length&&h.A.setParameter('detail','high');'low'===h.A.getParameter('detail')?e.K.qt():e.K.Zt()}(),0===h.A.getParameter('method').length&&h.A.setParameter('method','0')}async function o(t,i,s=0){if(s>=10)throw new Error('could not find world to connect!');const h=t?'https:':'http:';let e;try{e=JSON.parse(await(0,n.mc)(`${h}//2004scape.org/api/v1/worldlist`))}catch(h){return await(0,n.wl)(1e3),o(t,i,++s)}e.push({id:0,region:'Local Development',address:'http://localhost',portOffset:0,members:!0,Lr:0});const r=e.find((t=>t.id===i));return r||o(t,i,10)}},7906:(t,i,s)=>{s.a(t,(async(t,i)=>{try{var h=s(1312),e=s(5637),n=s(1302),r=s(6948),o=s(8317),l=s(8738),a=s(3764),c=s(1120),f=s(1183),u=s(8950),d=s(4583),w=s(1673),y=s(1122),A=s(2682),p=s(8665),m=s(9298),I=s(1069),E=s(3554),g=s(353),_=s(2634),C=s(4544),T=s(2215),O=s(3955),v=s(7953),b=s(2646),L=s(3937),R=(s(8902),s(4702)),S=s(6666),M=s(3819),k=s(2595),x=s(198),D=s(818),N=s(5599),P=s(1023),F=s(6169),U=s(2630),B=s(5327),G=s(670),H=s(9456),W=s(8268),Y=s(8412),V=s(3606),K=s(4197),X=s(254),z=s(7628),j=s(123),Z=s(9234),q=s(3867),$=s(8793),J=s(8534),Q=s(6730),tt=s(2164),it=s(7604),st=s(3795),ht=s(4909),et=s(296);class t extends $.K{load=async()=>{if(this.Qt)this.ti=!0;else{this.Qt=!0;try{this.rl(),await this.ul(10,'Connecting to fileserver'),await R.A.load(await(await fetch('bz2.wasm')).arrayBuffer()),this.db=new C.A(await C.A.openDatabase());const t=new I.A(new Uint8Array(await(0,Z.dl)(`${$.K.Lt}/crc`)));for(let i=0;i<9;i++)this.ei[i]=t.ut;$.K.vt||await this.Al('scape_main',12345678,4e4,!1);const i=await this.al('title','title screen',this.ei[1],10);this.pi=i,this.Di=A.A.Ic(i,'p11'),this.Ni=A.A.Ic(i,'p12'),this.Pi=A.A.Ic(i,'b12'),this.Fi=A.A.Ic(i,'q8'),await this.Ec(),this.gc();const s=await this.al('config','config',this.ei[2],15),u=await this.al('interface','interface',this.ei[3],20),m=await this.al('media','2d graphics',this.ei[4],30),E=await this.al('models','3d graphics',this.ei[5],40),g=await this.al('textures','textures',this.ei[6],60),_=await this.al('wordenc','chat system',this.ei[7],65),T=await this.al('sounds','sound effects',this.ei[8],70);this.ur=new q._c(G.A.tr,G.A.yr,G.A.yr),this.cr=new q.Cc(G.A.tr,G.A.yr+1,G.A.yr+1),this.cr&&(this.cn=new x.A(this.cr,G.A.yr,G.A.tr,G.A.yr));for(let t=0;t34||t>34))999===i&&(i=h);else if(999!==i){s=h;break}this.vs[t-9]=i-21,this.bs[t-9]=s-i}d.A.kc(479,96),this.gs=d.A.xc,d.A.kc(190,261),this._s=d.A.xc,d.A.kc(512,334),this.Cs=d.A.xc;const V=new Int32Array(9);for(let t=0;t<9;t++){const i=32*t+128+15,s=3*i+600,h=d.A.sin[i];V[t]=s*h>>16}x.A.init(512,334,500,800,V),v.A.Sc(_),this.Dc()}catch(t){console.error(t),this.ii=!0}}};update=async()=>{this.ti||this.ii||this.si||(this.hi++,this.Nc?await this.Pc():await this.Fc())};draw=async()=>{this.ti||this.ii||this.si?this.ml():(this.Nc?this.Uc():await this.Bc(),this.yh=0)};refresh=()=>{this.mi=!0};ul=async(t,i)=>{if(console.log(`${t}%: ${i}`),await this.Gc(),!this.pi)return void await super.ul(t,i);this.Ci?.bind();this.Pi?.Hc(180,54,'RuneScape is loading - please wait...',m.A.Kl);u.A.Vl(28,62,304,34,m.A.Wc),u.A.Vl(29,63,302,32,m.A.ca),u.A.fillRect(30,64,3*t,30,m.A.Wc),u.A.fillRect(30+3*t,64,300-3*t,30,m.A.ca),this.Pi?.Hc(180,85,i,m.A.Kl),this.Ci?.draw(214,186),this.mi&&(this.mi=!1,this.Bi||(this.Ti?.draw(0,0),this.Oi?.draw(661,0)),this.gi?.draw(128,0),this._i?.draw(214,386),this.vi?.draw(0,265),this.bi?.draw(574,265),this.Li?.draw(128,186),this.Ri?.draw(574,186)),await(0,Z.wl)(5)};Yc=()=>{this.Bi&&(this.Vc(),this.Vc(),this.Kc())};Gc=async()=>{this.gi||(this.tl=null,this.ns=null,this.hs=null,this.ss=null,this.es=null,this.rs=null,this.os=null,this.ls=null,this.Ti=new f.A(128,265),u.A.clear(),this.Oi=new f.A(128,265),u.A.clear(),this.gi=new f.A(533,186),u.A.clear(),this._i=new f.A(360,146),u.A.clear(),this.Ci=new f.A(360,200),u.A.clear(),this.vi=new f.A(214,267),u.A.clear(),this.bi=new f.A(215,267),u.A.clear(),this.Li=new f.A(86,79),u.A.clear(),this.Ri=new f.A(87,79),u.A.clear(),this.pi&&(await this.Ec(),this.gc()),this.mi=!0)};Ec=async()=>{if(!this.pi)return;const t=await y.A.Xc(this.pi,'title');this.Ti?.bind(),t.vc(0,0),this.Oi?.bind(),t.vc(-661,0),this.gi?.bind(),t.vc(-128,0),this._i?.bind(),t.vc(-214,-386),this.Ci?.bind(),t.vc(-214,-186),this.vi?.bind(),t.vc(0,-265),this.bi?.bind(),t.vc(-128,-186),this.Li?.bind(),t.vc(-128,-186),this.Ri?.bind(),t.vc(-574,-186),t.Tc(),this.Ti?.bind(),t.vc(394,0),this.Oi?.bind(),t.vc(-267,0),this.gi?.bind(),t.vc(266,0),this._i?.bind(),t.vc(180,-386),this.Ci?.bind(),t.vc(180,-186),this.vi?.bind(),t.vc(394,-265),this.bi?.bind(),t.vc(-180,-265),this.Li?.bind(),t.vc(212,-186),this.Ri?.bind(),t.vc(-180,-186);const i=y.A.Ic(this.pi,'logo');this.gi?.bind(),i.draw((this.width/2|0)-(i.width/2|0)-128,18)};zc=t=>{if(!this.Yi||!this.Wi)return;this.Yi.fill(0);for(let t=0;t<5e3;t++){const t=128*Math.random()*256|0;this.Yi[t]=256*Math.random()|0}for(let t=0;t<20;t++){for(let t=1;t<255;t++)for(let i=1;i<127;i++){const s=i+(t<<7);this.Wi[s]=(this.Yi[s-1]+this.Yi[s+1]+this.Yi[s-128]+this.Yi[s+128])/4|0}const t=this.Yi;this.Yi=this.Wi,this.Wi=t}if(t){let i=0;for(let s=0;s{if(this.pi){this.Si=w.A.Ic(this.pi,'titlebox'),this.Mi=w.A.Ic(this.pi,'titlebutton');for(let t=0;t<12;t++)this.Ui[t]=w.A.Ic(this.pi,'runes',t);this.Gi=new y.A(128,265),this.Hi=new y.A(128,265),this.Ti&&(0,Z.qc)(this.Ti.Mc,0,this.Gi.Mc,0,33920),this.Oi&&(0,Z.qc)(this.Oi.Mc,0,this.Hi.Mc,0,33920),this.zi=new Int32Array(256);for(let t=0;t<64;t++)this.zi[t]=262144*t;for(let t=0;t<64;t++)this.zi[t+64]=1024*t+m.A.RED;for(let t=0;t<64;t++)this.zi[t+128]=4*t+m.A.fa;for(let t=0;t<64;t++)this.zi[t+192]=m.A.Kl;this.ji=new Int32Array(256);for(let t=0;t<64;t++)this.ji[t]=1024*t;for(let t=0;t<64;t++)this.ji[t+64]=4*t+m.A.GREEN;for(let t=0;t<64;t++)this.ji[t+128]=262144*t+m.A.$c;for(let t=0;t<64;t++)this.ji[t+192]=m.A.Kl;this.Zi=new Int32Array(256);for(let t=0;t<64;t++)this.Zi[t]=4*t;for(let t=0;t<64;t++)this.Zi[t+64]=262144*t+m.A.BLUE;for(let t=0;t<64;t++)this.Zi[t+128]=1024*t+m.A.Jc;for(let t=0;t<64;t++)this.Zi[t+192]=m.A.Kl;this.Xi=new Int32Array(256),this.Yi=new Int32Array(32768),this.Wi=new Int32Array(32768),this.zc(null),this.Vi=new Int32Array(32768),this.Ki=new Int32Array(32768),this.ul(10,'Connecting to fileserver').then((()=>{this.Bi||(this.Bi=!0,this.ts=setInterval(this.Yc,35))}))}};Fc=async()=>{if(0===this.Ii){let t=(this.width/2|0)-80,i=20+(this.height/2|0);if(i+=20,1===this.Qc&&this.tf>=t-75&&this.tf<=t+75&&this.if>=i-20&&this.if<=i+20){if(+$.K.getParameter('world')>=998)return void this.ll();this.Ii=3,this.Ei=0}t=80+(this.width/2|0),1===this.Qc&&this.tf>=t-75&&this.tf<=t+75&&this.if>=i-20&&this.if<=i+20&&(this.ki='',this.xi='Enter your username & password.',this.Ii=2,this.Ei=0)}else if(2===this.Ii){let t=(this.height/2|0)-40;t+=30,t+=25,1===this.Qc&&this.if>=t-15&&this.if=t-15&&this.if=i-75&&this.tf<=i+75&&this.if>=s-20&&this.if<=s+20&&await this.sf(this.username,this.password,!1),i=80+(this.width/2|0),1===this.Qc&&this.tf>=i-75&&this.tf<=i+75&&this.if>=s-20&&this.if<=s+20&&(this.Ii=0,this.username='',this.password='');;){const t=this.hf();if(-1===t)return;let i=!1;for(let s=0;s0&&(this.username=this.username.substring(0,this.username.length-1)),9!==t&&10!==t&&13!==t||(this.Ei=1),i&&(this.username=this.username+String.fromCharCode(t)),this.username.length>12&&(this.username=this.username.substring(0,12))):1===this.Ei&&(8===t&&this.password.length>0&&(this.password=this.password.substring(0,this.password.length-1)),9!==t&&10!==t&&13!==t||(this.Ei=0),i&&(this.password=this.password+String.fromCharCode(t)),this.password.length>20&&(this.password=this.password.substring(0,20)))}}else if(3===this.Ii){const t=this.width/2|0;let i=50+(this.height/2|0);i+=20,1===this.Qc&&this.tf>=t-75&&this.tf<=t+75&&this.if>=i-20&&this.if<=i+20&&(this.Ii=0)}};Bc=async()=>{await this.Gc(),this.Ci?.bind(),this.Si?.draw(0,0);if(0===this.Ii){let t=180,i=80;this.Pi?.Ca(t,i,'Welcome to RuneScape',m.A.fa,!0),t=100,i=120,this.Mi?.draw(t-73,i-20),this.Pi?.Ca(t,i+5,'New user',m.A.Kl,!0),t=260,this.Mi?.draw(t-73,i-20),this.Pi?.Ca(t,i+5,'Existing User',m.A.Kl,!0)}else if(2===this.Ii){let t=100,i=60;this.ki.length>0?(this.Pi?.Ca(180,i-15,this.ki,m.A.fa,!0),this.Pi?.Ca(180,i,this.xi,m.A.fa,!0),i+=30):(this.Pi?.Ca(180,i-7,this.xi,m.A.fa,!0),i+=30),this.Pi?.Oa(90,i,`Username: ${this.username}${0===this.Ei&&this.hi%40<20?'@yel@|':''}`,m.A.Kl,!0),i+=15,this.Pi?.Oa(92,i,`Password: ${M.A.nf(this.password)}${1===this.Ei&&this.hi%40<20?'@yel@|':''}`,m.A.Kl,!0),i=150,this.Mi?.draw(t-73,i-20),this.Pi?.Ca(t,i+5,'Login',m.A.Kl,!0),t=260,this.Mi?.draw(t-73,i-20),this.Pi?.Ca(t,i+5,'Cancel',m.A.Kl,!0)}else if(3===this.Ii){this.Pi?.Ca(180,40,'Create a free account',m.A.fa,!0);const t=180;let i=65;this.Pi?.Ca(180,i,'To create a new account you need to',m.A.Kl,!0),i+=15,this.Pi?.Ca(180,i,'go back to the main RuneScape webpage',m.A.Kl,!0),i+=15,this.Pi?.Ca(180,i,"and choose the red 'create account'",m.A.Kl,!0),i+=15,this.Pi?.Ca(180,i,'button at the top right of that page.',m.A.Kl,!0),i=150,this.Mi?.draw(t-73,i-20),this.Pi?.Ca(t,i+5,'Cancel',m.A.Kl,!0)}this.Ci?.draw(214,186),this.mi&&(this.mi=!1,this.gi?.draw(128,0),this._i?.draw(214,386),this.vi?.draw(0,265),this.bi?.draw(574,265),this.Li?.draw(128,186),this.Ri?.draw(574,186))};sf=async(i,s,h)=>{try{if(h||(this.ki='',this.xi='Connecting to server...',await this.Bc()),'998'===t.getParameter('world')){if(this.Ko&&!this.Ko._t)return this.ki='You are not connected to a host.',void(this.xi='Please try using world 999.');this.stream=new et.A(this.yt,this.Ko.At)}else if('999'===t.getParameter('world')){if(!this.Vo)return this.ki='The server is starting up.',void(this.xi='Please try again in a moment.');this.stream=new et.A(this.yt,this.host.At)}else this.stream=new E.A(await E.A.rf({host:$.K.bt,port:43594+$.K.portOffset}));await this.stream.lf(this.in.data,0,8),this.in.ft=0,this.li=this.in.af;const e=new Int32Array([Math.floor(99999999*Math.random()),Math.floor(99999999*Math.random()),Number(this.li>>32n),Number(this.li&BigInt(4294967295))]);this.ri.ft=0,this.ri.p1(10),this.ri.p4(e[0]),this.ri.p4(e[1]),this.ri.p4(e[2]),this.ri.p4(e[3]),this.ri.p4(0),this.ri.cf(i),this.ri.cf(s),this.ri.ff($.K.xt,$.K.exponent),this.oi.ft=0,h?this.oi.p1(18):this.oi.p1(16),this.oi.p1(this.ri.ft+36+1+1),this.oi.p1($.K.Tt),this.oi.p1($.K.vt?1:0);for(let t=0;t<9;t++)this.oi.p4(this.ei[t]);this.oi.uf(this.ri.data,this.ri.ft,0),this.ri.random=new _.A(e);for(let t=0;t<4;t++)e[t]+=50;this.ui=new _.A(e),this.stream?.write(this.oi.data,this.oi.ft);const n=await this.stream.read();if(1===n)return await(0,Z.wl)(2e3),void await this.sf(i,s,h);if(2===n||18===n){this.oo=18===n,k.A.df(),this.Nc=!0,this.ri.ft=0,this.in.ft=0,this.di=-1,this.wi=-1,this.yi=-1,this.Ai=-1,this.packetSize=0,this.ai=0,this.fi=0,this.ci=0,this.Fh=0,this.Lh=0,this.gh=!1,this.wf=0;for(let t=0;t<100;t++)this.fe[t]=null;this.Le=0,this.Ge=0,this.fn=0,this.Lo=0,this.mn=(100*Math.random()|0)-50,this.In=(110*Math.random()|0)-55,this.En=(80*Math.random()|0)-40,this.Pn=(120*Math.random()|0)-60,this.Fn=(30*Math.random()|0)-20,this.er=(20*Math.random()|0)-10&2047,this.Gn=-1,this.wn=0,this.yn=0,this.Rr=0,this.Ur=0;for(let t=0;t{if(null!==this.Lr){this.fi>1&&this.fi--,this.ci>0&&this.ci--;for(let t=0;t<5&&await this.read();t++);if(this.Nc){for(let t=0;tthis.Fo+(this.Po/22|0)&&(this.Po=i.ft,this.Fo=Date.now(),this.Do=this.So[t],this.No=this.Mo[t],await(0,j.mf)(i.data.slice(0,i.ft),this.xo))}catch(t){console.error(t)}this.Lo--;for(let i=t;i0&&(this.Uo-=20,this.Uo<0&&(this.Uo=0),0===this.Uo&&this.Bo&&!$.K.vt&&this.Go&&await this.Al(this.Go,this.Ho,this.Wo,!1));const t=k.A.flush();if(t&&(this.ri.If(O.A.Ef),this.ri.p2(t.ft),this.ri.uf(t.data,t.ft,0),t.release()),this.ai++,this.ai>750&&await this.gf(),this._f(),this.Cf(),this.Tf(),this.Of(),(1===this.vf[1]||1===this.vf[2]||1===this.vf[3]||1===this.vf[4])&&this.sr++>5&&(this.sr=0,this.ri.If(O.A.bf),this.ri.p2(this.hr),this.ri.p2(this.er),this.ri.p1(this.Pn),this.ri.p1(this.Fn)),this.un++,0!==this.Ah&&(this.ph+=20,this.ph>=400&&(this.Ah=0)),0!==this.xe&&(this.Pe++,this.Pe>=15&&(2===this.xe&&(this.ah=!0),3===this.xe&&(this.fh=!0),this.xe=0)),0!==this.Ce&&(this.ve++,(this.ea>this.Te+5||this.eathis.Oe+5||this.na=5){if(this.Ze=-1,this.Rf(),this.Ze===this.ge&&this.qe!==this._e){const t=c.A.Jo[this.ge];if(t.Ql){const i=t.Ql[this.qe];t.Ql[this.qe]=t.Ql[this._e],t.Ql[this._e]=i}if(t.ta){const i=t.ta[this.qe];t.ta[this.qe]=t.ta[this._e],t.ta[this._e]=i}this.ri.If(O.A.Sf),this.ri.p2(this.ge),this.ri.p2(this._e),this.ri.p2(this.qe)}}else(1===this.Ve||this.Mf(this.Lh-1))&&this.Lh>2?this.kf():this.Lh>0&&await this.xf(this.Lh-1);this.Pe=10,this.Qc=0}if($.K.Pt++,$.K.Pt>127&&($.K.Pt=0,this.ri.If(O.A.Df),this.ri.p3(4991788)),-1!==x.A.Nf&&this.Jr){const t=x.A.Nf,i=x.A.Pf,s=this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],t,i,0,0,0,0,0,0,!0);x.A.Nf=-1,s&&(this.mh=this.tf,this.Ih=this.if,this.Ah=1,this.ph=0)}1===this.Qc&&this.Zh&&(this.Zh=null,this.fh=!0,this.Qc=0),await this.Gf(),this.Hf(),this.Wf(),this.Yf(),1!==this.Lf&&1!==this.Qc||this.yh++,2===this.fn&&($.K.Mt?this.Vf():this.Kf()),2===this.fn&&this.An&&this.Xf();for(let t=0;t<5;t++)this.Tn[t]++;if(await this.zf(),this.wf++,this.wf>4500&&(this.ci=250,this.wf-=500,this.ri.If(O.A.jf)),this.pn++,this.pn>500){this.pn=0;const t=8*Math.random()|0;1&~t||(this.mn+=this.gn),2&~t||(this.In+=this._n),4&~t||(this.En+=this.Cn)}if(this.mn<-50&&(this.gn=2),this.mn>50&&(this.gn=-2),this.In<-55&&(this._n=2),this.In>55&&(this._n=-2),this.En<-40&&(this.Cn=1),this.En>40&&(this.Cn=-1),this.Nn++,this.Nn>500){this.Nn=0;const t=8*Math.random()|0;1&~t||(this.Pn+=this.Bn),2&~t||(this.Fn+=this.Un)}this.Pn<-60&&(this.Bn=2),this.Pn>60&&(this.Bn=-2),this.Fn<-20&&(this.Un=1),this.Fn>10&&(this.Un=-1),$.K.Ft++,$.K.Ft>110&&($.K.Ft=0,this.ri.If(O.A.Zf),this.ri.p4(0)),this.eo++,this.eo>50&&this.ri.If(O.A.qf);try{this.stream&&this.ri.ft>0&&(this.stream.write(this.ri.data,this.ri.ft),this.ri.ft=0,this.eo=0)}catch(t){console.log(t),await this.gf()}}}};Uc=()=>{if(null===this.Lr)return;this.mi&&(this.mi=!1,this.cs?.draw(0,11),this.fs?.draw(0,375),this.us?.draw(729,5),this.ds?.draw(752,231),this.ws?.draw(0,0),this.ys?.draw(561,0),this.As?.draw(520,11),this.ps?.draw(520,231),this.Is?.draw(501,375),this.Es?.draw(0,345),this.ah=!0,this.fh=!0,this.uh=!0,this.dh=!0,2!==this.fn&&(this.es?.draw(8,11),this.hs?.draw(561,5))),2===this.fn&&this.$f(),this.gh&&1===this._h&&(this.ah=!0);let t=!1;if(-1!==this.Sh&&(t=this.kl(this.Sh,this.un),t&&(this.ah=!0)),2===this.xe&&(this.ah=!0),2===this.Ce&&(this.ah=!0),this.ah&&(this.Jf(),this.ah=!1),-1===this.Mh){this.kh.Zl=this.xh-this.Dh-77,this.ea>453&&this.ea<565&&this.na>350&&this.Qf(this.ea-22,this.na-375,this.xh,77,!1,463,0,this.kh);let t=this.xh-this.kh.Zl-77;t<0&&(t=0),t>this.xh-77&&(t=this.xh-77),this.Dh!==t&&(this.Dh=t,this.fh=!0)}-1!==this.Mh&&(t=this.kl(this.Mh,this.un),t&&(this.fh=!0)),3===this.xe&&(this.fh=!0),3===this.Ce&&(this.fh=!0),this.Zh&&(this.fh=!0),this.gh&&2===this._h&&(this.fh=!0),this.fh&&(this.tu(),this.fh=!1),2===this.fn&&(this.iu(),this.hs?.draw(561,5)),-1!==this.qh&&(this.uh=!0),this.uh&&(-1!==this.qh&&this.qh===this.$h&&(this.qh=-1,this.ri.If(O.A.su),this.ri.p1(this.$h)),this.uh=!1,this.ls?.bind(),this.xs?.draw(0,0),-1===this.Sh&&(-1!==this.Jh[this.$h]&&(0===this.$h?this.qs?.draw(29,30):1===this.$h?this.$s?.draw(59,29):2===this.$h?this.$s?.draw(87,29):3===this.$h?this.Js?.draw(115,29):4===this.$h?this.th?.draw(156,29):5===this.$h?this.th?.draw(184,29):6===this.$h&&this.Qs?.draw(212,30)),-1!==this.Jh[0]&&(0!==this.qh||this.hi%20<10)&&this.Ds[0]?.draw(35,34),-1!==this.Jh[1]&&(1!==this.qh||this.hi%20<10)&&this.Ds[1]?.draw(59,32),-1!==this.Jh[2]&&(2!==this.qh||this.hi%20<10)&&this.Ds[2]?.draw(86,32),-1!==this.Jh[3]&&(3!==this.qh||this.hi%20<10)&&this.Ds[3]?.draw(121,33),-1!==this.Jh[4]&&(4!==this.qh||this.hi%20<10)&&this.Ds[4]?.draw(157,34),-1!==this.Jh[5]&&(5!==this.qh||this.hi%20<10)&&this.Ds[5]?.draw(185,32),-1!==this.Jh[6]&&(6!==this.qh||this.hi%20<10)&&this.Ds[6]?.draw(212,34)),this.ls?.draw(520,165),this.os?.bind(),this.ks?.draw(0,0),-1===this.Sh&&(-1!==this.Jh[this.$h]&&(7===this.$h?this.ih?.draw(49,0):8===this.$h?this.sh?.draw(81,0):9===this.$h?this.sh?.draw(108,0):10===this.$h?this.hh?.draw(136,1):11===this.$h?this.nh?.draw(178,0):12===this.$h?this.nh?.draw(205,0):13===this.$h&&this.eh?.draw(233,0)),-1!==this.Jh[8]&&(8!==this.qh||this.hi%20<10)&&this.Ds[7]?.draw(80,2),-1!==this.Jh[9]&&(9!==this.qh||this.hi%20<10)&&this.Ds[8]?.draw(107,3),-1!==this.Jh[10]&&(10!==this.qh||this.hi%20<10)&&this.Ds[9]?.draw(142,4),-1!==this.Jh[11]&&(11!==this.qh||this.hi%20<10)&&this.Ds[10]?.draw(179,2),-1!==this.Jh[12]&&(12!==this.qh||this.hi%20<10)&&this.Ds[11]?.draw(206,2),-1!==this.Jh[13]&&(13!==this.qh||this.hi%20<10)&&this.Ds[12]?.draw(230,2)),this.os?.draw(501,492),this.es?.bind()),this.dh&&(this.dh=!1,this.rs?.bind(),this.Ms?.draw(0,0),this.Ni?.Ca(57,33,'Public chat',m.A.Kl,!0),0===this.Qh&&this.Ni?.Ca(57,46,'On',m.A.GREEN,!0),1===this.Qh&&this.Ni?.Ca(57,46,'Friends',m.A.fa,!0),2===this.Qh&&this.Ni?.Ca(57,46,'Off',m.A.RED,!0),3===this.Qh&&this.Ni?.Ca(57,46,'Hide',m.A.$c,!0),this.Ni?.Ca(186,33,'Private chat',m.A.Kl,!0),0===this.te&&this.Ni?.Ca(186,46,'On',m.A.GREEN,!0),1===this.te&&this.Ni?.Ca(186,46,'Friends',m.A.fa,!0),2===this.te&&this.Ni?.Ca(186,46,'Off',m.A.RED,!0),this.Ni?.Ca(326,33,'Trade/duel',m.A.Kl,!0),0===this.ie&&this.Ni?.Ca(326,46,'On',m.A.GREEN,!0),1===this.ie&&this.Ni?.Ca(326,46,'Friends',m.A.fa,!0),2===this.ie&&this.Ni?.Ca(326,46,'Off',m.A.RED,!0),this.Ni?.Ca(462,38,'Report abuse',m.A.Kl,!0),this.rs?.draw(0,471),this.es?.bind()),this.un=0};$f=()=>{if(this.dn++,this.hu(),this.eu(),this.nu(),this.ru(),this.ou(),!this.An){let t=this.hr;(this.Dn/256|0)>t&&(t=this.Dn/256|0),this.On[4]&&this.bn[4]+128>t&&(t=this.bn[4]+128);const i=this.er+this.En&2047;if(this.Jr&&this.lu(this.lr,this.au(this.ir,this.Jr.x,this.Jr.z)-50,this.ar,i,t,3*t+600),$.K.Nt++,$.K.Nt>1802){$.K.Nt=0,this.ri.If(O.A.cu),this.ri.p1(0);const t=this.ri.ft;this.ri.p2(29711),this.ri.p1(70),this.ri.p1(256*Math.random()|0),this.ri.p1(242),this.ri.p1(186),this.ri.p1(39),this.ri.p1(61),2*Math.random()|0||this.ri.p1(13),2*Math.random()|0||this.ri.p2(57856),this.ri.p2(65536*Math.random()|0),this.ri.fu(this.ri.ft-t)}}let t;t=this.An?this.uu():this.du();const i=this.Rn,s=this.Sn,h=this.Mn,e=this.kn,n=this.xn;let r;for(let t=0;t<5;t++)this.On[t]&&(r=Math.random()*(2*this.vn[t]+1)-this.vn[t]+Math.sin(this.Tn[t]*(this.Ln[t]/100))*this.bn[t]|0,0===t&&(this.Rn+=r),1===t&&(this.Sn+=r),2===t&&(this.Mn+=r),3===t&&(this.xn=this.xn+r&2047),4===t&&(this.kn+=r,this.kn<128&&(this.kn=128),this.kn>383&&(this.kn=383)));r=d.A.wu,p.A.yu=!0,p.A.Au=0,p.A.ea=this.ea-8,p.A.na=this.na-11,u.A.clear(),this.cn?.draw(this.Rn,this.Sn,this.Mn,t,this.xn,this.kn,this.hi),this.cn?.pu(),this.mu(),this.Iu(),$.K.Rt&&this.Eu(),this.gu(r),this._u(),this.es?.draw(8,11),this.Rn=i,this.Sn=s,this.Mn=h,this.kn=e,this.xn=n};Cu=()=>{e.A.Tu?.clear(),e.A.Ou?.clear(),r.A.Qo?.clear(),n.A.Qo?.clear(),n.A.vu?.clear(),W.A.Qo?.clear(),l.A.Qo?.clear()};bu=(t,i)=>{this.Lu(t.x,i,t.z)};Lu=(t,i,s)=>{if(t<128||s<128||t>13056||s>13056)return this.Ar=-1,void(this.pr=-1);const h=this.au(this.ir,t,s)-i;this.Ru(t,h,s)};Ru=(t,i,s)=>{let h=t-this.Rn,e=i-this.Sn,n=s-this.Mn;const r=d.A.sin[this.kn],o=d.A.cos[this.kn],l=d.A.sin[this.xn],a=d.A.cos[this.xn];let c=n*l+h*a>>16;n=n*a-h*l>>16,h=c,c=e*o-n*r>>16,n=e*r+n*o>>16,e=c,n>=50?(this.Ar=d.A.Sa+((h<<9)/n|0),this.pr=d.A.Ma+((e<<9)/n|0)):(this.Ar=-1,this.pr=-1)};mu=()=>{this.do=0;for(let t=-1;t-1))for(let t=0;t<8;t++)h.Su&1<=0&&10===this.Fh&&this.Hh===this.Sr[t]&&(this.bu(i,i.height+15),this.Ar>-1&&this.Hs[7]?.draw(this.Ar-12,this.pr-s))}else 1===this.Fh&&this.Uh===this.Br[t-this.Rr]&&this.hi%20<10&&(this.bu(i,i.height+15),this.Ar>-1&&this.Hs[2]?.draw(this.Ar-12,this.pr-28));if(i.Mu&&(t>=this.Rr||0===this.Qh||3===this.Qh||1===this.Qh&&this.ku(i.name))&&(this.bu(i,i.height),this.Ar>-1&&this.do<$.K.wo&&this.Pi&&(this.mo[this.do]=this.Pi.xu(i.Mu)/2|0,this.po[this.do]=this.Pi.height,this.yo[this.do]=this.Ar,this.Ao[this.do]=this.pr,this.Io[this.do]=i.Du,this.Eo[this.do]=i.Nu,this._o[this.do]=i.Pu,this.Co[this.do++]=i.Mu,0===this.Ae&&1===i.Nu&&(this.po[this.do]+=10,this.Ao[this.do]+=5),0===this.Ae&&2===i.Nu&&(this.mo[this.do]=60))),i.Fu>this.hi+100&&(this.bu(i,i.height+15),this.Ar>-1)){let t=30*i.Uu/i.Bu|0;t>30&&(t=30),u.A.fillRect(this.Ar-15,this.pr-3,t,5,m.A.GREEN),u.A.fillRect(this.Ar-15+t,this.pr-3,30-t,5,m.A.RED)}if(i.Fu>this.hi+330&&(this.bu(i,i.height/2|0),this.Ar>-1&&(this.Gs[i.Gu]?.draw(this.Ar-12,this.pr-12),this.Di?.Hc(this.Ar,this.pr+4,i.Hu.toString(),m.A.ca),this.Di?.Hc(this.Ar-1,this.pr+3,i.Hu.toString(),m.A.Kl))),$.K.Rt){if(i.pathLength>0||i.Wu>=this.hi||i.Yu>this.hi){const t=64*i.size;this.Vu(128*i.Uf[0]+t,128*i.Bf[0]+t,this.ir,i.size,65535,!1)}this.Vu(i.x,i.z,this.ir,i.size,6710886,!1);let s=0;if(this.bu(i,i.height+30),t32767&&(i-=32768),this.Di?.Hc(this.Ar,this.pr+s,'Face Entity: '+i,m.A.Kl),s-=15}(t.Ku&W.A.Ju)===W.A.Ju&&(this.Di?.Hc(this.Ar,this.pr+s,'Say',m.A.Kl),s-=15),(t.Ku&W.A.Qu)===W.A.Qu&&(this.Di?.Hc(this.Ar,this.pr+s,'Hit: Type '+t.Gu+' Amount '+t.Hu+' HP '+t.Uu+'/'+t.Bu,m.A.Kl),s-=15),(t.Ku&W.A.td)===W.A.td&&(this.Di?.Hc(this.Ar,this.pr+s,'Face Coord: '+t.sd/2+' '+t.hd/2,m.A.Kl),s-=15),(t.Ku&W.A.ed)===W.A.ed&&(this.Di?.Hc(this.Ar,this.pr+s,'Chat',m.A.Kl),s-=15),(t.Ku&W.A.nd)===W.A.nd&&(this.Di?.Hc(this.Ar,this.pr+s,'Play Spotanim: '+t.rd,m.A.Kl),s-=15),(t.Ku&W.A.od)===W.A.od&&(this.Di?.Hc(this.Ar,this.pr+s,'Exact Move',m.A.Kl),s-=15)}}else{const t=i;let s=0;if(this.bu(i,i.height+30),this.Di?.Hc(this.Ar,this.pr+s,t.type?.name??null,m.A.Kl),s-=15,-1!==t.Ku&&this.hi-t.Xu<30){if((t.Ku&Y.A.ju)===Y.A.ju&&(this.Di?.Hc(this.Ar,this.pr+s,'Play Seq: '+t.Zu,m.A.Kl),s-=15),(t.Ku&Y.A.qu)===Y.A.qu){let i=t.$u;i>32767&&(i-=32768),this.Di?.Hc(this.Ar,this.pr+s,'Face Entity: '+i,m.A.Kl),s-=15}(t.Ku&Y.A.Ju)===Y.A.Ju&&(this.Di?.Hc(this.Ar,this.pr+s,'Say',m.A.Kl),s-=15),(t.Ku&Y.A.Qu)===Y.A.Qu&&(this.Di?.Hc(this.Ar,this.pr+s,'Hit: Type '+t.Gu+' Amount '+t.Hu+' HP '+t.Uu+'/'+t.Bu,m.A.Kl),s-=15),(t.Ku&Y.A.ld)===Y.A.ld&&(this.Di?.Hc(this.Ar,this.pr+s,'Change Type: '+t.type?.id??null,m.A.Kl),s-=15),(t.Ku&Y.A.nd)===Y.A.nd&&(this.Di?.Hc(this.Ar,this.pr+s,'Play Spotanim: '+t.rd,m.A.Kl),s-=15),(t.Ku&Y.A.td)===Y.A.td&&(this.Di?.Hc(this.Ar,this.pr+s,'Face Coord: '+t.sd/2+' '+t.hd/2,m.A.Kl),s-=15)}}}}}if($.K.Rt)for(let t=0;t=104||i.z>=104||this.Vu(128*i.x+64,128*i.z+64,i.level,1,16776960,!1)}for(let t=0;tthis.Ao[r]-this.po[r]&&s-ethis.yo[r]-this.mo[r]&&this.Ao[r]-this.po[r]{2===this.Fh&&this.Hs[2]&&(this.Lu((this.Wh-this.Kn<<7)+this.Bh,2*this.Vh,(this.Yh-this.Xn<<7)+this.Gh),this.Ar>-1&&this.hi%20<10&&this.Hs[2].draw(this.Ar-12,this.pr-28))};Eu=()=>{const t=507;let i=13;this.jo?this.Di?.dd(t,i,'tock',m.A.fa,!0):this.Pi?.dd(t,i,'tick',m.A.fa,!0),i+=13,this.Di?.dd(t,i,`Fps: ${this.wd}, ${this.yd} ms`,m.A.fa,!0),i+=13,this.Di?.dd(t,i,`Draw: ${this.ms.toFixed(1)}, Avg: ${this.Ad.toFixed(1)}, Slow: ${this.pd.toFixed(1)} ms`,m.A.fa,!0),i+=13,this.Di?.dd(t,i,`Occluders: ${x.A.md[x.A.Id]} Active: ${x.A.Ed}`,m.A.fa,!0),i+=13,this.Di?.dd(t,i,'Local Pos: '+(this.Jr?.x??-1)+', '+(this.Jr?.z??-1)+', '+(this.Jr?.y??-1),m.A.fa,!0),i+=13,this.Di?.dd(t,i,'Camera Pos: '+this.Rn+', '+this.Mn+', '+this.Sn,m.A.fa,!0),i+=13,this.Di?.dd(t,i,'Camera Angle: '+this.xn+', '+this.kn,m.A.fa,!0),i+=13,this.Di?.dd(t,i,'Cutscene Source: '+this.Cr+', '+this.Tr+' '+this.Or+'; '+this.vr+', '+this.br,m.A.fa,!0),i+=13,this.Di?.dd(t,i,'Cutscene Destination: '+this.mr+', '+this.Ir+' '+this.Er+'; '+this.gr+', '+this._r,m.A.fa,!0),$.K.Mt&&(i+=13,this.Di?.dd(t,i,'Instructions:',m.A.fa,!0),i+=13,this.Di?.dd(t,i,'- Arrows to move Camera',m.A.fa,!0),i+=13,this.Di?.dd(t,i,'- Shift to control Source or Dest',m.A.fa,!0),i+=13,this.Di?.dd(t,i,'- Alt to control Height',m.A.fa,!0),i+=13,this.Di?.dd(t,i,'- Ctrl to control Modifier',m.A.fa,!0))};Vu=(t,i,s,h,e,n)=>{const r=this.au(s,t,i),o=64*h;this.Ru(t-o,r,i-o);const l=this.Ar,a=this.pr;this.Ru(t+o,r,i-o);const c=this.Ar,f=this.pr;this.Ru(t-o,r,i+o);const d=this.Ar,w=this.pr;this.Ru(t+o,r,i+o);const y=this.Ar,A=this.pr;-1!==l&&-1!==c&&-1!==d&&-1!==y&&(n&&(u.A.gd(l,a,y,A,(16711422&e)>>1),u.A.gd(c,f,d,w,(16711422&e)>>1)),u.A.gd(l,a,c,f,e),u.A.gd(l,a,d,w,e),u.A.gd(c,f,y,A,e),u.A.gd(d,w,y,A,e))};Vf(){const t=1==this.vf[5]?2:1;1==this.vf[6]?(1==this.vf[1]?(this.mr-=t,this.mr<1&&(this.mr=1)):1==this.vf[2]&&(this.mr+=t,this.mr>102&&(this.mr=102)),1==this.vf[3]?1==this.vf[7]?this.Er+=2*t:(this.Ir+=1,this.Ir>102&&(this.Ir=102)):1==this.vf[4]&&(1==this.vf[7]?this.Er-=2*t:(this.Ir-=1,this.Ir<1&&(this.Ir=1)))):(1==this.vf[1]?(this.Cr-=t,this.Cr<1&&(this.Cr=1)):1==this.vf[2]&&(this.Cr+=t,this.Cr>102&&(this.Cr=102)),1==this.vf[3]?1==this.vf[7]?this.Or+=2*t:(this.Tr+=t,this.Tr>102&&(this.Tr=102)):1==this.vf[4]&&(1==this.vf[7]?this.Or-=2*t:(this.Tr-=t,this.Tr<1&&(this.Tr=1)))),this.Rn=128*this.Cr+64,this.Mn=128*this.Tr+64,this.Sn=this.au(this.ir,this.Cr,this.Tr)-this.Or;const i=128*this.mr+64,s=128*this.Ir+64,h=this.au(this.ir,this.mr,this.Ir)-this.Er,e=i-this.Rn,n=h-this.Sn,r=s-this.Mn,o=0|Math.sqrt(e*e+r*r);this.kn=325.949*Math.atan2(n,o)&2047,this.xn=-325.949*Math.atan2(e,r)&2047,this.kn<128&&(this.kn=128),this.kn>383&&(this.kn=383)}_u=()=>{if(this._d(),1===this.Ah&&this.Ys[this.ph/100|0]?.draw(this.mh-8-8,this.Ih-8-11),2===this.Ah&&this.Ys[4+(this.ph/100|0)]?.draw(this.mh-8-8,this.Ih-8-11),-1!==this.wh&&(this.kl(this.wh,this.un),this.Gl(c.A.Jo[this.wh],0,0,0)),this.Cd(),this.gh?0===this._h&&this.Td():(this.Rf(),this.Od()),1===this.io&&(this.no>0||1===this.ro?this.Hs[1]?.draw(472,258):this.Hs[1]?.draw(472,296)),this.no>0&&(this.Hs[0]?.draw(472,296),this.Ni?.Hc(484,329,'Level: '+this.no,m.A.fa)),1===this.ro&&(this.Hs[6]?.draw(472,296),this.Ni?.Hc(484,329,'Arena',m.A.fa)),0!==this.fi){let t=this.fi/50|0;const i=t/60|0;t%=60,t<10?this.Ni?.la(4,329,'System update in: '+i+':0'+t,m.A.fa):this.Ni?.la(4,329,'System update in: '+i+':'+t,m.A.fa)}};_d=()=>{if(0===this.ye)return;const t=this.Ni;let i=0;0!==this.fi&&(i=1);for(let s=0;s<100;s++){if(!this.fe[s])continue;const h=this.messageType[s];let e;if((3===h||7===h)&&(7===h||0===this.te||1===this.te&&this.ku(this.ue[s]))&&(e=329-13*i,t?.la(4,e,'From '+this.ue[s]+': '+this.fe[s],m.A.ca),t?.la(4,e-1,'From '+this.ue[s]+': '+this.fe[s],m.A.$c),i++,i>=5))return;if(5===h&&this.te<2&&(e=329-13*i,t?.la(4,e,this.fe[s],m.A.ca),t?.la(4,e-1,this.fe[s],m.A.$c),i++,i>=5))return;if(6===h&&this.te<2&&(e=329-13*i,t?.la(4,e,'To '+this.ue[s]+': '+this.fe[s],m.A.ca),t?.la(4,e-1,'To '+this.ue[s]+': '+this.fe[s],m.A.$c),i++,i>=5))return}};Cd=()=>{if(!this.Jr)return;const t=(this.Jr.x>>7)+this.Kn,i=(this.Jr.z>>7)+this.Xn;if(this.no=t>=2944&&t<3392&&i>=3520&&i<6400?1+((i-3520)/8|0):t>=2944&&t<3392&&i>=9920&&i<12800?1+((i-9920)/8|0):0,this.ro=0,t>=3328&&t<3392&&i>=3200&&i<3264){const s=63&t,h=63&i;(s>=4&&s<=29&&h>=44&&h<=58||s>=36&&s<=61&&h>=44&&h<=58||s>=4&&s<=29&&h>=25&&h<=39||s>=36&&s<=61&&h>=25&&h<=39||s>=4&&s<=29&&h>=6&&h<=20||s>=36&&s<=61&&h>=6&&h<=20)&&(this.ro=1)}0===this.ro&&t>=3328&&t<=3393&&i>=3203&&i<=3325&&(this.ro=2),this.Eh=0,(t>=3053&&t<=3156&&i>=3056&&i<=3136||t>=3072&&t<=3118&&i>=9492&&i<=9535)&&(this.Eh=1),1===this.Eh&&t>=3139&&t<=3199&&i>=3008&&i<=3062&&(this.Eh=0)};Jf=()=>{this.ss?.bind(),this._s&&(d.A.xc=this._s),this.Ls?.draw(0,0),-1!==this.Sh?this.Gl(c.A.Jo[this.Sh],0,0,0):-1!==this.Jh[this.$h]&&this.Gl(c.A.Jo[this.Jh[this.$h]],0,0,0),this.gh&&1===this._h&&this.Td(),this.ss?.draw(562,231),this.es?.bind(),this.Cs&&(d.A.xc=this.Cs)};tu=()=>{if(this.ns?.bind(),this.gs&&(d.A.xc=this.gs),this.Rs?.draw(0,0),this.ee)this.Pi?.Hc(239,40,this.ne,m.A.ca),this.Pi?.Hc(239,60,this.re+'*',m.A.vd);else if(this.ae)this.Pi?.Hc(239,40,'Enter amount:',m.A.ca),this.Pi?.Hc(239,60,this.le+'*',m.A.vd);else if(this.Zh)this.Pi?.Hc(239,40,this.Zh,m.A.ca),this.Pi?.Hc(239,60,'Click to continue',m.A.vd);else if(-1!==this.Mh)this.Gl(c.A.Jo[this.Mh],0,0,0);else if(-1===this.ce){let t=this.Ni;0===$.K.St&&(t=this.Fi);let i=0;u.A.Hl(0,0,463,77);for(let s=0;s<100;s++){const h=this.fe[s];if(!h)continue;const e=this.messageType[s],n=this.Dh+70-14*i;0===e&&(n>0&&n<110&&t?.la(4,n,h,m.A.ca),i++),1===e&&(n>0&&n<110&&(t?.la(4,n,this.ue[s]+':',m.A.Kl),t?.la(t.xu(this.ue[s])+12,n,h,m.A.BLUE)),i++),2===e&&(0===this.Qh||1===this.Qh&&this.ku(this.ue[s]))&&(n>0&&n<110&&(t?.la(4,n,this.ue[s]+':',m.A.ca),t?.la(t.xu(this.ue[s])+12,n,h,m.A.BLUE)),i++),3!==e&&7!==e||0!==this.ye||!(7===e||0===this.te||1===this.te&&this.ku(this.ue[s]))||(n>0&&n<110&&(t?.la(4,n,'From '+this.ue[s]+':',m.A.ca),t?.la(t.xu('From '+this.ue[s])+12,n,h,m.A.bd)),i++),4===e&&(0===this.ie||1===this.ie&&this.ku(this.ue[s]))&&(n>0&&n<110&&t?.la(4,n,this.ue[s]+' '+this.fe[s],m.A.Ld),i++),5===e&&0===this.ye&&this.te<2&&(n>0&&n<110&&t?.la(4,n,h,m.A.bd),i++),6===e&&0===this.ye&&this.te<2&&(n>0&&n<110&&(t?.la(4,n,'To '+this.ue[s]+':',m.A.ca),t?.la(t.xu('To '+this.ue[s])+12,n,h,m.A.bd)),i++),8===e&&(0===this.ie||1===this.ie&&this.ku(this.ue[s]))&&(n>0&&n<110&&t?.la(4,n,this.ue[s]+' '+this.fe[s],m.A.Rd),i++)}u.A.ud(),this.xh=14*i+7,this.xh<78&&(this.xh=78),this.Ol(463,0,this.xh-this.Dh-77,this.xh,77),0==$.K.St?t?.la(3,90,this.pe+'*',m.A.ca):1==$.K.St?t?.la(3,90,this.pe+'*',m.A.BLUE):(t?.la(4,90,M.A.za(this.username)+':',m.A.ca),t?.la(t.xu(this.username+': ')+6,90,this.pe+'*',m.A.BLUE)),u.A.Sl(0,77,m.A.ca,479)}else this.Gl(c.A.Jo[this.ce],0,0,0);this.gh&&2===this._h&&this.Td(),this.ns?.draw(22,375),this.es?.bind(),this.Cs&&(d.A.xc=this.Cs)};iu=()=>{if(this.hs?.bind(),!this.Jr)return;const t=this.er+this.Pn&2047;let i=48+(this.Jr.x/32|0),s=464-(this.Jr.z/32|0);this.Ps?.Sd(21,9,146,151,this.vs,this.bs,i,s,t,this.Fn+256),this.Fs?.Sd(0,0,33,33,this.Ts,this.Os,25,25,this.er,256);for(let t=0;t{if(!i)return;const h=this.er+this.Pn&2047,e=s*s+t*t;if(e>6400)return;let n=d.A.sin[h],r=d.A.cos[h];n=256*n/(this.Fn+256)|0,r=256*r/(this.Fn+256)|0;const o=t*n+s*r>>16,l=t*r-s*n>>16;e>2500&&this.Ss?i.Dd(o+94-(i.oa/2|0),83-l-(i.Nd/2|0),this.Ss):i.draw(o+94-(i.oa/2|0),83-l-(i.Nd/2|0))};Pd=t=>{if(!this.Ps)return;const i=this.Ps.Mc,s=i.length;for(let t=0;t>14&32767;const h=e.A.get(s).Gd;if(h<0)continue;let n=t,r=i;if(22!==h&&29!==h&&34!==h&&36!==h&&46!==h&&47!==h&&48!==h){const s=G.A.yr,h=G.A.yr,e=this.Qn[this.ir];if(e){const o=e.flags;for(let e=0;e<10;e++){const e=4*Math.random()|0;0===e&&n>0&&n>t-3&&(o[G.A.index(n-1,r)]&H.A.Hd)===H.A.OPEN&&n--,1===e&&n0&&r>i-3&&(o[G.A.index(n,r-1)]&H.A.Yd)===H.A.OPEN&&r--,3===e&&r{if(!this.cn||!this.Ps)return;let r=this.cn.Kd(s,t,i);if(0!==r){const o=this.cn.Xd(s,t,i,r),l=o>>6&3,a=31&o;let c=h;r>0&&(c=n);const f=this.Ps.Mc,u=4*t+512*(103-i)*4+24624,d=r>>14&32767,w=e.A.get(d);if(-1===w.zd)a!==P.A.jd.id&&a!==P.A.Zd.id||(l===F.A.qd?(f[u]=c,f[u+512]=c,f[u+1024]=c,f[u+1536]=c):l===F.A.$d?(f[u]=c,f[u+1]=c,f[u+2]=c,f[u+3]=c):l===F.A.Jd?(f[u+3]=c,f[u+3+512]=c,f[u+3+1024]=c,f[u+3+1536]=c):l===F.A.Qd&&(f[u+1536]=c,f[u+1536+1]=c,f[u+1536+2]=c,f[u+1536+3]=c)),a===P.A.tw.id&&(l===F.A.qd?f[u]=c:l===F.A.$d?f[u+3]=c:l===F.A.Jd?f[u+3+1536]=c:l===F.A.Qd&&(f[u+1536]=c)),a===P.A.Zd.id&&(l===F.A.Qd?(f[u]=c,f[u+512]=c,f[u+1024]=c,f[u+1536]=c):l===F.A.qd?(f[u]=c,f[u+1]=c,f[u+2]=c,f[u+3]=c):l===F.A.$d?(f[u+3]=c,f[u+3+512]=c,f[u+3+1024]=c,f[u+3+1536]=c):l===F.A.Jd&&(f[u+1536]=c,f[u+1536+1]=c,f[u+1536+2]=c,f[u+1536+3]=c));else{const s=this.Us[w.zd];if(s){const h=(4*w.width-s.width)/2|0,e=(4*w.length-s.height)/2|0;s.draw(4*t+48+h,4*(G.A.yr-i-w.length)+e+48)}}}if(r=this.cn.iw(s,t,i),0!==r){const h=this.cn.Xd(s,t,i,r),n=h>>6&3,o=31&h,l=r>>14&32767,a=e.A.get(l);if(-1!==a.zd){const s=this.Us[a.zd];if(s){const h=(4*a.width-s.width)/2|0,e=(4*a.length-s.height)/2|0;s.draw(4*t+48+h,4*(G.A.yr-i-a.length)+e+48)}}else if(o===P.A.sw.id){let s=15658734;r>0&&(s=15597568);const h=this.Ps.Mc,e=4*t+512*(G.A.yr-1-i)*4+24624;n===F.A.qd||n===F.A.Jd?(h[e+1536]=s,h[e+1024+1]=s,h[e+512+2]=s,h[e+3]=s):(h[e]=s,h[e+512+1]=s,h[e+1024+2]=s,h[e+1536+3]=s)}}if(r=this.cn.Bd(s,t,i),0!==r){const s=e.A.get(r>>14&32767);if(-1!==s.zd){const h=this.Us[s.zd];if(h){const e=(4*s.width-h.width)/2|0,n=(4*s.length-h.height)/2|0;h.draw(4*t+48+e,4*(G.A.yr-i-s.length)+n+48)}}}};Od=()=>{if(this.Lh<2&&0===this.Le&&0===this.Ge)return;let t;t=1===this.Le&&this.Lh<2?'Use '+this.ke+' with...':1===this.Ge&&this.Lh<2?this.Ye+'...':this.Rh[this.Lh-1],this.Lh>2&&(t=t+'@whi@ / '+(this.Lh-2)+' more options'),this.Pi?.hw(4,15,t,m.A.Kl,!0,this.hi/1e3|0)};Td=()=>{const t=this.Ch,i=this.Th,s=this.Oh,h=this.bh,e=m.A.ew;u.A.fillRect(t,i,s,h,e),u.A.fillRect(t+1,i+1,s-2,16,m.A.ca),u.A.Vl(t+1,i+18,s-2,h-19,m.A.ca),this.Pi?.la(t+3,i+14,'Choose Option',e);let n=this.ea,r=this.na;0===this._h&&(n-=8,r-=11),1===this._h&&(n-=562,r-=231),2===this._h&&(n-=22,r-=375);for(let h=0;ht&&ne-13&&r{if(0!==this.Ce)return;let t=this.Qc;if(1===this.Ge&&this.tf>=520&&this.if>=165&&this.tf<=788&&this.if<=230&&(t=0),this.gh){if(1!==t){let t=this.ea,i=this.na;0===this._h?(t-=8,i-=11):1===this._h?(t-=562,i-=231):2===this._h&&(t-=22,i-=375),(tthis.Ch+this.Oh+10||ithis.Th+this.bh+10)&&(this.gh=!1,1===this._h&&(this.ah=!0),2===this._h&&(this.fh=!0))}if(1===t){const t=this.Ch,i=this.Th,s=this.Oh;let h=this.tf,e=this.if;0===this._h?(h-=8,e-=11):1===this._h?(h-=562,e-=231):2===this._h&&(h-=22,e-=375);let n=-1;for(let r=0;rt&&ho-13&&e0){const t=this.Ke[this.Lh-1];if(602===t||596===t||22===t||892===t||415===t||405===t||38===t||422===t||478===t||347===t||188===t){const t=this.ze[this.Lh-1],i=this.je[this.Lh-1];if(c.A.Jo[i].draggable)return this.be=!1,this.ve=0,this.ge=i,this._e=t,this.Ce=2,this.Te=this.tf,this.Oe=this.if,c.A.Jo[i].nw===this.wh&&(this.Ce=1),void(c.A.Jo[i].nw===this.Mh&&(this.Ce=3))}}if(1===t&&(1===this.Ve||this.Mf(this.Lh-1))&&this.Lh>2&&(t=2),1===t&&this.Lh>0&&await this.xf(this.Lh-1),2!==t||this.Lh<=0)return;this.kf()}};Hf=()=>{if(1===this.Qc&&this.Jr){let t=this.tf-21-561,i=this.if-9-5;if(t>=0&&i>=0&&t<146&&i<151){t-=73,i-=75;const s=this.er+this.Pn&2047;let h=d.A.sin[s],e=d.A.cos[s];h=h*(this.Fn+256)>>8,e=e*(this.Fn+256)>>8;const n=i*h+t*e>>11,r=i*e-t*h>>11,o=this.Jr.x+n>>7,l=this.Jr.z-r>>7;this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],o,l,1,0,0,0,0,0,!0)&&(this.ri.p1(t),this.ri.p1(i),this.ri.p2(this.er),this.ri.p1(57),this.ri.p1(this.Pn),this.ri.p1(this.Fn),this.ri.p1(89),this.ri.p2(this.Jr.x),this.ri.p2(this.Jr.z),this.ri.p1(this.$r),this.ri.p1(63))}}};Mf=t=>{if(t<0)return!1;let i=this.Ke[t];return i>=2e3&&(i-=2e3),406===i};xf=async t=>{if(t<0)return;this.ae&&(this.ae=!1,this.fh=!0);let i=this.Ke[t];const s=this.Xe[t],h=this.ze[t],r=this.je[t];if(i>=2e3&&(i-=2e3),903===i||363===i){let s=this.Rh[t];const h=s.indexOf('@whi@');if(-1!==h){s=s.substring(h+5).trim();const t=M.A.za(M.A.ja(M.A.xd(s)));let e=!1;for(let s=0;s=90&&this.ri.If(O.A.fw),this.ri.If(O.A.uw)):347===i?this.ri.If(O.A.dw):422===i?this.ri.If(O.A.ww):405===i?($.K.Wt+=s,$.K.Wt>=97&&(this.ri.If(O.A.yw),this.ri.p3(14953816)),this.ri.If(O.A.Aw)):38===i&&this.ri.If(O.A.pw),this.ri.p2(s),this.ri.p2(h),this.ri.p2(r),this.Pe=0,this.Ne=r,this.De=h,this.xe=2,c.A.Jo[r].nw===this.wh&&(this.xe=1),c.A.Jo[r].nw===this.Mh&&(this.xe=3);else if(728===i||542===i||6===i||963===i||245===i){const t=this.Fr[s];t&&this.Jr&&(this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],t.Uf[0],t.Bf[0],2,1,1,0,0,0,!1),this.mh=this.tf,this.Ih=this.if,this.Ah=2,this.ph=0,542===i?this.ri.If(O.A.mw):6===i?(3&s||$.K.Ht++,$.K.Ht>=124&&(this.ri.If(O.A.Iw),this.ri.p4(0)),this.ri.If(O.A.Ew)):963===i?this.ri.If(O.A.gw):728===i?this.ri.If(O.A._w):245===i&&(3&s||$.K.Yt++,$.K.Yt>=85&&(this.ri.If(O.A.Cw),this.ri.p2(39596)),this.ri.If(O.A.Tw)),this.ri.p2(s))}else if(217===i){if(this.Jr){this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],h,r,2,0,0,0,0,0,!1)||this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],h,r,2,1,1,0,0,0,!1),this.mh=this.tf,this.Ih=this.if,this.Ah=2,this.ph=0,this.ri.If(O.A.Ow),this.ri.p2(h+this.Kn),this.ri.p2(r+this.Xn),this.ri.p2(s),this.ri.p2(this.Me),this.ri.p2(this.Re),this.ri.p2(this.Se)}}else if(1175===i){const t=s>>14&32767,i=e.A.get(t);let h;h=i.bw?i.bw:"It's a "+i.name+'.',this.lw(0,h,'')}else if(285===i)this.aw(O.A.Lw,h,r,s);else if(881===i)this.ri.If(O.A.Rw),this.ri.p2(s),this.ri.p2(h),this.ri.p2(r),this.ri.p2(this.Me),this.ri.p2(this.Re),this.ri.p2(this.Se),this.Pe=0,this.Ne=r,this.De=h,this.xe=2,c.A.Jo[r].nw===this.wh&&(this.xe=1),c.A.Jo[r].nw===this.Mh&&(this.xe=3);else if(391===i)this.ri.If(O.A.Sw),this.ri.p2(s),this.ri.p2(h),this.ri.p2(r),this.ri.p2(this.He),this.Pe=0,this.Ne=r,this.De=h,this.xe=2,c.A.Jo[r].nw===this.wh&&(this.xe=1),c.A.Jo[r].nw===this.Mh&&(this.xe=3);else if(660===i)this.gh?this.cn?.click(h-8,r-11):this.cn?.click(this.tf-8,this.if-11);else{if(188===i)return this.Le=1,this.Re=h,this.Se=r,this.Me=s,this.ke=n.A.get(s).name,void(this.Ge=0);if(44===i)this.Fe||(this.ri.If(O.A.Mw),this.ri.p2(r),this.Fe=!0);else if(1773===i){const t=n.A.get(s);let i;i=r>=1e5?r+' x '+t.name:t.bw?t.bw:"It's a "+t.name+'.',this.lw(0,i,'')}else if(900===i){const t=this.Fr[s];t&&this.Jr&&(this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],t.Uf[0],t.Bf[0],2,1,1,0,0,0,!1),this.mh=this.tf,this.Ih=this.if,this.Ah=2,this.ph=0,this.ri.If(O.A.kw),this.ri.p2(s),this.ri.p2(this.Me),this.ri.p2(this.Re),this.ri.p2(this.Se))}else if(1373===i||1544===i||151===i||1101===i){const t=this.Lr[s];t&&this.Jr&&(this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],t.Uf[0],t.Bf[0],2,1,1,0,0,0,!1),this.mh=this.tf,this.Ih=this.if,this.Ah=2,this.ph=0,1101===i?this.ri.If(O.A.ow):151===i?($.K.zt++,$.K.zt>=90&&(this.ri.If(O.A.xw),this.ri.p2(31114)),this.ri.If(O.A.Dw)):1373===i?this.ri.If(O.A.rw):1544===i&&this.ri.If(O.A.Nw),this.ri.p2(s))}else if(265===i){const t=this.Fr[s];t&&this.Jr&&(this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],t.Uf[0],t.Bf[0],2,1,1,0,0,0,!1),this.mh=this.tf,this.Ih=this.if,this.Ah=2,this.ph=0,this.ri.If(O.A.Pw),this.ri.p2(s),this.ri.p2(this.He))}else if(679===i){const i=this.Rh[t],s=i.indexOf('@whi@');if(-1!==s){const t=M.A.xd(i.substring(s+5).trim());let h=-1;for(let i=0;i0&&(this.fh=!0,this.ae=!1,this.ee=!0,this.re='',this.oe=3,this.bo=this.Oo[h],this.ne='Enter message to send to '+this.To[h])}}else if(55===i)this.aw(O.A.Fw,h,r,s)&&this.ri.p2(this.He);else if(224===i||993===i||99===i||746===i||877===i){if(this.Jr){this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],h,r,2,0,0,0,0,0,!1)||this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],h,r,2,1,1,0,0,0,!1),this.mh=this.tf,this.Ih=this.if,this.Ah=2,this.ph=0,224===i?this.ri.If(O.A.Uw):746===i?this.ri.If(O.A.Bw):877===i?this.ri.If(O.A.Gw):99===i?this.ri.If(O.A.Hw):993===i&&this.ri.If(O.A.Ww),this.ri.p2(h+this.Kn),this.ri.p2(r+this.Xn),this.ri.p2(s)}}else if(1607===i){const t=this.Fr[s];if(t&&t.type){let i;i=t.type.bw?t.type.bw:"It's a "+t.type.name+'.',this.lw(0,i,'')}}else if(504===i)this.aw(O.A.Yw,h,r,s);else{if(930===i){const t=c.A.Jo[r];this.Ge=1,this.He=r,this.We=t.Vw,this.Le=0;let i=t.Kw;i&&-1!==i.indexOf(' ')&&(i=i.substring(0,i.indexOf(' ')));let s=t.Kw;return s&&-1!==s.indexOf(' ')&&(s=s.substring(s.indexOf(' ')+1)),this.Ye=i+' '+t.action+' '+s,void(16===this.We&&(this.ah=!0,this.$h=3,this.uh=!0))}if(951===i){const t=c.A.Jo[r];let i=!0;t.Xl>0&&(i=this.Xw(t)),i&&(this.ri.If(O.A.zw),this.ri.p2(r))}else if(602===i||596===i||22===i||892===i||415===i)22===i?this.ri.If(O.A.jw):415===i?(3&r||$.K.Xt++,$.K.Xt>=55&&(this.ri.If(O.A.Zw),this.ri.p4(0)),this.ri.If(O.A.qw)):602===i?this.ri.If(O.A.$w):892===i?(3&h||$.K.jt++,$.K.jt>=130&&(this.ri.If(O.A.Jw),this.ri.p1(177)),this.ri.If(O.A.Qw)):596===i&&this.ri.If(O.A.ty),this.ri.p2(s),this.ri.p2(h),this.ri.p2(r),this.Pe=0,this.Ne=r,this.De=h,this.xe=2,c.A.Jo[r].nw===this.wh&&(this.xe=1),c.A.Jo[r].nw===this.Mh&&(this.xe=3);else if(581===i)3&s||$.K.Gt++,$.K.Gt>=99&&(this.ri.If(O.A.iy),this.ri.p4(0)),this.aw(O.A.sy,h,r,s);else if(965===i){if(this.Jr){this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],h,r,2,0,0,0,0,0,!1)||this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],h,r,2,1,1,0,0,0,!1),this.mh=this.tf,this.Ih=this.if,this.Ah=2,this.ph=0,this.ri.If(O.A.hy),this.ri.p2(h+this.Kn),this.ri.p2(r+this.Xn),this.ri.p2(s),this.ri.p2(this.He)}}else if(1501===i)$.K.Kt+=this.Xn,$.K.Kt>=92&&(this.ri.If(O.A.ey),this.ri.p4(0)),this.aw(O.A.ny,h,r,s);else if(364===i)this.aw(O.A.oy,h,r,s);else if(1102===i){const t=n.A.get(s);let i;i=t.bw?t.bw:"It's a "+t.name+'.',this.lw(0,i,'')}else if(960===i){this.ri.If(O.A.zw),this.ri.p2(r);const t=c.A.Jo[r];if(t.scripts&&t.scripts[0]&&5===t.scripts[0][0]){const i=t.scripts[0][1];t.Tl&&this.Ue[i]!==t.Tl[0]&&(this.Ue[i]=t.Tl[0],await this.ly(i),this.ah=!0)}}else if(34===i){const i=this.Rh[t],s=i.indexOf('@whi@');if(-1!==s){this.uy(),this.Je=i.substring(s+5).trim(),this.Qe=!1;for(let t=0;t{const i=t.Xl;if(i===c.A.Ey&&(this.fh=!0,this.ae=!1,this.ee=!0,this.re='',this.oe=1,this.ne='Enter name of friend to add to list'),i===c.A.gy&&(this.fh=!0,this.ae=!1,this.ee=!0,this.re='',this.oe=2,this.ne='Enter name of friend to delete from list'),i===c.A._y)return this.ci=250,!0;if(i===c.A.Cy&&(this.fh=!0,this.ae=!1,this.ee=!0,this.re='',this.oe=4,this.ne='Enter name of player to add to list'),i===c.A.Ty&&(this.fh=!0,this.ae=!1,this.ee=!0,this.re='',this.oe=5,this.ne='Enter name of player to delete from list'),i>=c.A.Oy&&i<=c.A.vy){const t=(i-300)/2|0,s=1&i;let h=this.co[t];if(-1!==h)for(;;)if(0===s&&(h--,h<0&&(h=o.A.count-1)),1===s&&(h++,h>=o.A.count&&(h=0)),!o.A.Jo[h].disable&&o.A.Jo[h].type===t+(this.lo?0:7)){this.co[t]=h,this.ao=!0;break}}if(i>=c.A.by&&i<=c.A.Ly){const t=(i-314)/2|0,s=1&i;let h=this.fo[t];0===s&&(h--,h<0&&(h=W.A.Qa[t].length-1)),1===s&&(h++,h>=W.A.Qa[t].length&&(h=0)),this.fo[t]=h,this.ao=!0}if(i!==c.A.nc||this.lo||(this.lo=!0,this.yf()),i===c.A.rc&&this.lo&&(this.lo=!1,this.yf()),i===c.A.Ry){this.ri.If(O.A.Sy),this.ri.p1(this.lo?0:1);for(let t=0;t<7;t++)this.ri.p1(this.co[t]);for(let t=0;t<5;t++)this.ri.p1(this.fo[t]);return!0}return i===c.A.lc&&(this.Qe=!this.Qe),i>=c.A.My&&i<=c.A.ky&&(this.uy(),this.Je.length>0&&(this.ri.If(O.A.xy),this.ri.Dy(M.A.xd(this.Je)),this.ri.p1(i-601),this.ri.p1(this.Qe?1:0))),!1};yf=()=>{this.ao=!0;for(let t=0;t<7;t++){this.co[t]=-1;for(let i=0;i{if(!this.Jr||!this.cn)return!1;const n=h>>14&32767,r=this.cn.Xd(this.ir,i,s,h);if(-1===r)return!1;const o=31&r,l=r>>6&3;if(o===P.A.Ny.id||o===P.A.Py.id||o===P.A.Fy.id){const t=e.A.get(n);let h,r;l===F.A.qd||l===F.A.Jd?(h=t.width,r=t.length):(h=t.length,r=t.width);let o=t.Uy;0!==l&&(o=(o<>4-l)),this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],i,s,2,h,r,0,0,o,!1)}else this.Ff(this.Jr.Uf[0],this.Jr.Bf[0],i,s,2,0,0,l,o+1,0,!1);return this.mh=this.tf,this.Ih=this.if,this.Ah=2,this.ph=0,this.ri.If(t),this.ri.p2(i+this.Kn),this.ri.p2(s+this.Xn),this.ri.p2(n),!0};Wf=()=>{1===this.Qc&&(this.tf>=549&&this.tf<=583&&this.if>=195&&this.if<231&&-1!==this.Jh[0]?(this.ah=!0,this.$h=0,this.uh=!0):this.tf>=579&&this.tf<=609&&this.if>=194&&this.if<231&&-1!==this.Jh[1]?(this.ah=!0,this.$h=1,this.uh=!0):this.tf>=607&&this.tf<=637&&this.if>=194&&this.if<231&&-1!==this.Jh[2]?(this.ah=!0,this.$h=2,this.uh=!0):this.tf>=635&&this.tf<=679&&this.if>=194&&this.if<229&&-1!==this.Jh[3]?(this.ah=!0,this.$h=3,this.uh=!0):this.tf>=676&&this.tf<=706&&this.if>=194&&this.if<231&&-1!==this.Jh[4]?(this.ah=!0,this.$h=4,this.uh=!0):this.tf>=704&&this.tf<=734&&this.if>=194&&this.if<231&&-1!==this.Jh[5]?(this.ah=!0,this.$h=5,this.uh=!0):this.tf>=732&&this.tf<=766&&this.if>=195&&this.if<231&&-1!==this.Jh[6]?(this.ah=!0,this.$h=6,this.uh=!0):this.tf>=550&&this.tf<=584&&this.if>=492&&this.if<528&&-1!==this.Jh[7]?(this.ah=!0,this.$h=7,this.uh=!0):this.tf>=582&&this.tf<=612&&this.if>=492&&this.if<529&&-1!==this.Jh[8]?(this.ah=!0,this.$h=8,this.uh=!0):this.tf>=609&&this.tf<=639&&this.if>=492&&this.if<529&&-1!==this.Jh[9]?(this.ah=!0,this.$h=9,this.uh=!0):this.tf>=637&&this.tf<=681&&this.if>=493&&this.if<528&&-1!==this.Jh[10]?(this.ah=!0,this.$h=10,this.uh=!0):this.tf>=679&&this.tf<=709&&this.if>=492&&this.if<529&&-1!==this.Jh[11]?(this.ah=!0,this.$h=11,this.uh=!0):this.tf>=706&&this.tf<=736&&this.if>=492&&this.if<529&&-1!==this.Jh[12]?(this.ah=!0,this.$h=12,this.uh=!0):this.tf>=734&&this.tf<=768&&this.if>=492&&this.if<528&&-1!==this.Jh[13]&&(this.ah=!0,this.$h=13,this.uh=!0),$.K.Dt++,$.K.Dt>150&&($.K.Dt=0,this.ri.If(O.A.By),this.ri.p1(43)))};zf=async()=>{for(;;){let t;do{for(;;){if(t=this.hf(),-1===t)return;if(-1!==this.wh&&this.wh===this.tn){8===t&&this.Je.length>0&&(this.Je=this.Je.substring(0,this.Je.length-1));break}if(this.ee){if(t>=32&&t<=122&&this.re.length<80&&(this.re=this.re+String.fromCharCode(t),this.fh=!0),8===t&&this.re.length>0&&(this.re=this.re.substring(0,this.re.length-1),this.fh=!0),13===t||10===t){let t;if(this.ee=!1,this.fh=!0,1===this.oe&&(t=M.A.xd(this.re),this.yy(t)),2===this.oe&&this.uo>0&&(t=M.A.xd(this.re),this.py(t)),3===this.oe&&this.re.length>0&&this.bo){this.ri.If(O.A.Gy),this.ri.p1(0);const t=this.ri.ft;this.ri.Dy(this.bo),b.A.Hy(this.ri,this.re),this.ri.fu(this.ri.ft-t),this.re=M.A.Wy(this.re),this.re=v.A.filter(this.re),this.lw(6,this.re,M.A.za(M.A.ja(this.bo))),2===this.te&&(this.te=1,this.dh=!0,this.ri.If(O.A.Yy),this.ri.p1(this.Qh),this.ri.p1(this.te),this.ri.p1(this.ie))}4===this.oe&&this.Nh<100&&(t=M.A.xd(this.re),this.Ay(t)),5===this.oe&&this.Nh>0&&(t=M.A.xd(this.re),this.my(t))}}else if(this.ae){if(t>=48&&t<=57&&this.le.length<10&&(this.le=this.le+String.fromCharCode(t),this.fh=!0),8===t&&this.le.length>0&&(this.le=this.le.substring(0,this.le.length-1),this.fh=!0),13===t||10===t){if(this.le.length>0){let t=0;try{t=parseInt(this.le,10)}catch(t){}this.ri.If(O.A.Vy),this.ri.p4(t)}this.ae=!1,this.fh=!0}}else if(-1===this.Mh&&(t>=32&&t<=122&&this.pe.length<80&&(this.pe=this.pe+String.fromCharCode(t),this.fh=!0),8===t&&this.pe.length>0&&(this.pe=this.pe.substring(0,this.pe.length-1),this.fh=!0),(13===t||10===t)&&this.pe.length>0)){if('::clientdrop'===this.pe)await this.gf();else if(this.oo&&'::noclip'===this.pe)for(let t=0;t122)&&(t<65||t>90)&&(t<48||t>57)&&32!==t);this.Je.length<12&&(this.Je=this.Je+String.fromCharCode(t))}};Yf=()=>{if(1===this.Qc)if(this.tf>=8&&this.tf<=108&&this.if>=490&&this.if<=522)this.Qh=(this.Qh+1)%4,this.dh=!0,this.fh=!0,this.ri.If(O.A.Yy),this.ri.p1(this.Qh),this.ri.p1(this.te),this.ri.p1(this.ie);else if(this.tf>=137&&this.tf<=237&&this.if>=490&&this.if<=522)this.te=(this.te+1)%3,this.dh=!0,this.fh=!0,this.ri.If(O.A.Yy),this.ri.p1(this.Qh),this.ri.p1(this.te),this.ri.p1(this.ie);else if(this.tf>=275&&this.tf<=375&&this.if>=490&&this.if<=522)this.ie=(this.ie+1)%3,this.dh=!0,this.fh=!0,this.ri.If(O.A.Yy),this.ri.p1(this.Qh),this.ri.p1(this.te),this.ri.p1(this.ie);else if(this.tf>=416&&this.tf<=516&&this.if>=490&&this.if<=522){this.uy(),this.Je='',this.Qe=!1;for(let t=0;t{if(this.se?this.he=32:this.he=0,this.se=!1,t>=n&&t=r&&i=n&&t=r+h-16&&i=n-this.he&&t=r+16&&i0){let t=(h-32)*h/s|0;t<8&&(t=8);const n=i-r-(t/2|0)-16,l=h-t-32;o.Zl=(s-h)*n/l|0,e&&(this.ah=!0),this.se=!0}};Af=()=>{this.ns||(this.$o(),this.tl=null,this.gi=null,this._i=null,this.Ci=null,this.Ti=null,this.Oi=null,this.vi=null,this.bi=null,this.Li=null,this.Ri=null,this.ns=new f.A(479,96),this.hs=new f.A(168,160),u.A.clear(),this.Ss?.draw(0,0),this.ss=new f.A(190,261),this.es=new f.A(512,334),u.A.clear(),this.rs=new f.A(501,61),this.os=new f.A(288,40),this.ls=new f.A(269,66),this.mi=!0)};ku=t=>{if(!t)return!1;for(let i=0;i{if(0n===t)return;if(this.uo>=100)return void this.lw(0,'Your friends list is full. Max of 100 hit','');const i=M.A.za(M.A.ja(t));for(let s=0;s{if(0n!==t)for(let i=0;i{if(0n===t)return;if(this.Nh>=100)return void this.lw(0,'Your ignore list is full. Max of 100 hit','');const i=M.A.za(M.A.ja(t));for(let s=0;s{if(0n!==t)for(let i=0;i{const s=this.Vr[this.ir][t][i];if(!s)return void this.cn?.Qy(this.ir,t,i);let h=-99999999,e=null;for(let t=s.head();t;t=s.next()){const i=n.A.get(t.index);let s=i.tA;i.Ua&&(s*=t.count+1),s>h&&(h=s,e=t)}if(!e)return;s.iA(e);let r=-1,o=-1,l=0,a=0;for(let t=s.head();t;t=s.next())t.index!==e.index&&-1===r&&(r=t.index,l=t.count),t.index!==e.index&&t.index!==r&&-1===o&&(o=t.index,a=t.count);let c=null;-1!==r&&(c=n.A.get(r).sA(l));let f=null;-1!==o&&(f=n.A.get(o).sA(a));const u=t+(i<<7)+1610612736|0,d=n.A.get(e.index);this.cn?.hA(t,i,this.au(this.ir,128*t+64,128*i+64),this.ir,u,d.sA(e.count),f,c)};eA=(t,i,s,h,n,r,o)=>{if(i<1||s<1||i>102||s>102)return;if($.K.vt&&t!==this.ir)return;if(!this.cn)return;let l=0;if(o===N.A.nA&&(l=this.cn.Kd(t,i,s)),o===N.A.rA&&(l=this.cn.oA(t,s,i)),o===N.A.lA&&(l=this.cn.iw(t,i,s)),o===N.A.Fy&&(l=this.cn.Bd(t,i,s)),0!==l){const h=this.cn.Xd(t,i,s,l),n=l>>14&32767,r=31&h,a=h>>6;if(o===N.A.nA){this.cn?.aA(t,i,s,1);const h=e.A.get(n);h.cA&&this.Qn[t]?.aA(i,s,r,a,h.fA)}if(o===N.A.rA&&this.cn?.uA(t,i,s),o===N.A.lA){this.cn.dA(t,i,s);const h=e.A.get(n);if(i+h.width>G.A.yr-1||s+h.width>G.A.yr-1||i+h.length>G.A.yr-1||s+h.length>G.A.yr-1)return;h.cA&&this.Qn[t]?.dA(i,s,h.width,h.length,a,h.fA)}if(o===N.A.Fy){this.cn?.wA(t,i,s);const h=e.A.get(n);h.cA&&h.active&&this.Qn[t]?.yA(i,s)}}if(h>=0){let e=t;this.ur&&t<3&&!(2&~this.ur[1][i][s])&&(e=t+1),this.cr&&D.A.eA(t,i,s,this.cn,this.cr,this.Wr,this.Qn[t],h,r,n,e)}};uy=()=>{this.ri.If(O.A.AA),-1!==this.Sh&&(this.Sh=-1,this.ah=!0,this.Fe=!1,this.uh=!0),-1!==this.Mh&&(this.Mh=-1,this.fh=!0,this.Fe=!1),this.wh=-1};gf=async()=>{this.ci>0?await this.pA():(this.es?.bind(),this.Ni?.Hc(257,144,'Connection lost',m.A.ca),this.Ni?.Hc(256,143,'Connection lost',m.A.Kl),this.Ni?.Hc(257,159,'Please wait - attempting to reestablish',m.A.ca),this.Ni?.Hc(256,158,'Please wait - attempting to reestablish',m.A.Kl),this.es?.draw(8,11),this.wn=0,this.stream?.close(),this.Nc=!1,await this.sf(this.username,this.password,!0),this.Nc||await this.pA())};pA=async()=>{this.stream&&this.stream.close(),this.stream=null,this.Nc=!1,this.Ii=0,this.username='',this.password='',k.A.df(),this.Cu(),this.cn?.reset();for(let t=0;t{if(!this.stream)return!1;try{let t=this.stream.available;if(0===t)return!1;if(-1===this.di&&(await this.stream.lf(this.in.data,0,1),this.di=255&this.in.data[0],this.ui&&(this.di=this.di-this.ui.mA&255),this.packetSize=g.A.IA[this.di],t--),-1===this.packetSize){if(t<=0)return!1;await this.stream.lf(this.in.data,0,1),this.packetSize=255&this.in.data[0],t--}if(-2===this.packetSize){if(t<=1)return!1;await this.stream.lf(this.in.data,0,2),this.in.ft=0,this.packetSize=this.in.ct,t-=2}if(t0&&this.lw(5,s+' has logged in.',''),0===i&&this.lw(5,s+' has logged out.','')),s=null;break}s&&this.uo<100&&(this.Oo[this.uo]=t,this.To[this.uo]=s,this.vo[this.uo]=i,this.uo++,this.ah=!0);let h=!1;for(;!h;){h=!0;for(let t=0;t=0&&h>=0&&s=G.A.yr||t.z>=G.A.yr)&&t.SA();return 0!==this.wn&&(this.wn-=e,this.yn-=n),this.An=!1,this.di=-1,!0}if(this.di===T.A.MA)return c.A.Jo[this.in.ct].model=this.Jr?.kA()||null,this.di=-1,!0;if(this.di===T.A.xA)return this.Fh=this.in.CA,1===this.Fh&&(this.Uh=this.in.ct),this.Fh>=2&&this.Fh<=6&&(2===this.Fh&&(this.Bh=64,this.Gh=64),3===this.Fh&&(this.Bh=0,this.Gh=64),4===this.Fh&&(this.Bh=128,this.Gh=64),5===this.Fh&&(this.Bh=64,this.Gh=0),6===this.Fh&&(this.Bh=64,this.Gh=128),this.Fh=2,this.Wh=this.in.ct,this.Yh=this.in.ct,this.Vh=this.in.CA),10===this.Fh&&(this.Hh=this.in.ct),this.di=-1,!0;if(this.di===T.A.DA){const t=this.in.NA,i=this.in.ut,s=this.in.ut;return t!==this.Go&&this.Bo&&!$.K.vt&&await this.Al(t,i,s,!0),this.Go=t,this.Ho=i,this.Wo=s,this.Uo=0,this.di=-1,!0}if(this.di===T.A.PA)return await this.pA(),this.di=-1,!1;if(this.di===T.A.FA){const t=this.in.CA,i=this.in.CA;let s=-1;if(this.Zn)for(let h=0;h=100&&(this.Rn=128*this.Cr+64,this.Mn=128*this.Tr+64,this.Sn=this.au(this.ir,this.Cr,this.Tr)-this.Or),this.di=-1,!0;if(this.di===T.A.Op){this.Hn=this.in.CA,this.Wn=this.in.CA;for(let t=this.Hn;t=this.Hn&&t.x=this.Wn&&t.z1?this.lw(7,e,M.A.za(M.A.ja(t))):this.lw(3,e,M.A.za(M.A.ja(t)))}catch(t){}return this.di=-1,!0}if(this.di===T.A.Mp){for(let t=0;t=100){const t=128*this.mr+64,i=128*this.Ir+64,s=this.au(this.ir,this.mr,this.Ir)-this.Er,h=t-this.Rn,e=s-this.Sn,n=i-this.Mn,r=0|Math.sqrt(h*h+n*n);this.kn=325.949*Math.atan2(e,r)&2047,this.xn=-325.949*Math.atan2(h,n)&2047,this.kn<128&&(this.kn=128),this.kn>383&&(this.kn=383)}return this.di=-1,!0}if(this.di===T.A.Pp)return this.$h=this.in.CA,this.ah=!0,this.uh=!0,this.di=-1,!0;if(this.di===T.A.Fp){const t=this.in.NA;let i;if(t.endsWith(':tradereq:')){const s=t.substring(0,t.indexOf(':'));i=M.A.xd(s);let h=!1;for(let t=0;t>10&31,h=i>>5&31,e=31&i;return c.A.Jo[t].wa=(s<<19)+(h<<11)+(e<<3),this.di=-1,!0}if(this.di===T.A.Vp){for(let t=0;t=this.jh[s]&&(this.zh[t]=s+2);return this.di=-1,!0}if(this.di===T.A.$p){for(this.Hn=this.in.CA,this.Wn=this.in.CA;this.in.ft=0&&t{try{this.Gn=-1,this.Yr.clear(),this.Wr.clear(),this.Hr.clear(),this.Gr.clear(),d.A.rm(),this.Cu(),this.cn?.reset();for(let t=0;t>8,s=255&this.Zn[t];if(33===i&&s>=71&&s<=73){D.A.vt=!1;break}}if($.K.vt?this.cn?.om(this.ir):this.cn?.om(0),this.Zn&&this.zn){this.ri.If(O.A.qf);for(let s=0;s>8)-this.Kn,h=64*(255&this.Zn[s])-this.Xn,e=this.zn[s];if(e){const s=new I.A(new Uint8Array(e)).ut,n=R.A.read(s,e,e.length-4,4);t.lm(8*(this.Yn-6),8*(this.Vn-6),i,h,n)}else this.Vn<800&&t.am(h,i,64,64)}}if(this.Zn&&this.jn){this.ri.If(O.A.qf);for(let s=0;s>8)-this.Kn,r=64*(255&this.Zn[s])-this.Xn;t.fm(this.cn,this.Wr,this.Qn,e,n,r)}}}this.ri.If(O.A.qf),t.um(this.cn,this.Qn),this.es?.bind(),this.ri.If(O.A.qf);for(let t=this.Wr.head();t;t=this.Wr.next())2===(this.ur&&2&this.ur[1][t.dm][t.wm])&&(t.ym--,t.ym<0&&t.SA());for(let t=0;t{const i=c.A.Jo[t];if(i.xl)for(let t=0;t{let t=0;for(let i=0;i<99;i++){const s=i+1;t+=s+300*Math.pow(2,s/7)|0,this.jh[i]=t/4|0}};lw=(t,i,s)=>{0===t&&-1!==this.ce&&(this.Zh=i,this.Qc=0),-1===this.Mh&&(this.fh=!0);for(let t=99;t>0;t--)this.messageType[t]=this.messageType[t-1],this.ue[t]=this.ue[t-1],this.fe[t]=this.fe[t-1];$.K.Rt&&0===t&&(i='['+(this.hi/30|0)+']: '+i),this.messageType[0]=t,this.ue[0]=s,this.fe[0]=i};ly=async t=>{const i=a.A.Jo[t].pm;if(0!==i){const s=this.Ue[t];if(1===i&&(1===s&&d.A.Lc(.9),2===s&&d.A.Lc(.8),3===s&&d.A.Lc(.7),4===s&&d.A.Lc(.6),n.A.vu?.clear(),this.mi=!0),3===i){const t=this.Bo;0===s&&(this.Yo=256,(0,j.Im)(256),this.Bo=!0),1===s&&(this.Yo=192,(0,j.Im)(192),this.Bo=!0),2===s&&(this.Yo=128,(0,j.Im)(128),this.Bo=!0),3===s&&(this.Yo=64,(0,j.Im)(64),this.Bo=!0),4===s&&(this.Bo=!1),this.Bo!==t&&(this.Bo&&this.Go?await this.Al(this.Go,this.Ho,this.Wo,!1):(0,j.qo)(!1),this.Uo=0)}4===i&&(0===s&&(this.xo=256,(0,j.Em)(256),this.Ro=!0),1===s&&(this.xo=192,(0,j.Em)(192),this.Ro=!0),2===s&&(this.xo=128,(0,j.Em)(128),this.Ro=!0),3===s&&(this.xo=64,(0,j.Em)(64),this.Ro=!0),4===s&&(this.Ro=!1)),5===i&&(this.Ve=s),6===i&&(this.Ae=s),8===i&&(this.ye=s,this.fh=!0)}};gm=(t,i)=>{let s=0;for(let t=0;t<100;t++){if(!this.fe[t])continue;const h=this.messageType[t],e=this.Dh+70+4-14*s;if(e<-20)break;0===h&&s++,1!==h&&2!==h||!(1===h||0===this.Qh||1===this.Qh&&this.ku(this.ue[t]))||(i>e-14&&i<=e&&this.Jr&&this.ue[t]!==this.Jr.name&&(this.oo&&(this.Rh[this.Lh]='Report abuse @whi@'+this.ue[t],this.Ke[this.Lh]=34,this.Lh++),this.Rh[this.Lh]='Add ignore @whi@'+this.ue[t],this.Ke[this.Lh]=436,this.Lh++,this.Rh[this.Lh]='Add friend @whi@'+this.ue[t],this.Ke[this.Lh]=406,this.Lh++),s++),3!==h&&7!==h||0!==this.ye||!(7===h||0===this.te||1===this.te&&this.ku(this.ue[t]))||(i>e-14&&i<=e&&(this.oo&&(this.Rh[this.Lh]='Report abuse @whi@'+this.ue[t],this.Ke[this.Lh]=34,this.Lh++),this.Rh[this.Lh]='Add ignore @whi@'+this.ue[t],this.Ke[this.Lh]=436,this.Lh++,this.Rh[this.Lh]='Add friend @whi@'+this.ue[t],this.Ke[this.Lh]=406,this.Lh++),s++),4===h&&(0===this.ie||1===this.ie&&this.ku(this.ue[t]))&&(i>e-14&&i<=e&&(this.Rh[this.Lh]='Accept trade @whi@'+this.ue[t],this.Ke[this.Lh]=903,this.Lh++),s++),(5===h||6===h)&&0===this.ye&&this.te<2&&s++,8===h&&(0===this.ie||1===this.ie&&this.ku(this.ue[t]))&&(i>e-14&&i<=e&&(this.Rh[this.Lh]='Accept duel @whi@'+this.ue[t],this.Ke[this.Lh]=363,this.Lh++),s++)}};_m=t=>{if(0===this.ye)return;let i=0;0!==this.fi&&(i=1);for(let s=0;s<100;s++)if(null!==this.fe[s]){const h=this.messageType[s];if((3===h||7===h)&&(7===h||0===this.te||1===this.te&&this.ku(this.ue[s]))){const h=329-13*i;if(this.ea>8&&this.ea<520&&t-11>h-10&&t-11<=h+3&&(this.oo&&(this.Rh[this.Lh]='Report abuse @whi@'+this.ue[s],this.Ke[this.Lh]=2034,this.Lh++),this.Rh[this.Lh]='Add ignore @whi@'+this.ue[s],this.Ke[this.Lh]=2436,this.Lh++,this.Rh[this.Lh]='Add friend @whi@'+this.ue[s],this.Ke[this.Lh]=2406,this.Lh++),i++,i>=5)return}if((5===h||6===h)&&this.te<2&&(i++,i>=5))return}};Cm=(t,i,s,h,e,r)=>{if(0!==t.type||!t.xl||t.hide||ih+t.width||s>e+t.height||!t.Wl||!t.Yl)return;const o=t.xl.length;for(let l=0;l=0||0!==f.Aa)&&i>=o&&s>=a&&i=0?this.$e=f.Tm:this.$e=f.id),0===f.type)this.Cm(f,i,s,o,a,f.Zl),f.scroll>f.height&&this.Qf(i,s,f.scroll,f.height,!0,o+f.width,a,f);else if(2===f.type){let t=0;for(let h=0;h=r+32||s>=l+32){t++;continue}if(this.qe=t,this.Ze=f.id,!f.Ql||f.Ql[t]<=0){t++;continue}const c=n.A.get(f.Ql[t]-1);if(1===this.Le&&f.Om)f.id===this.Se&&t===this.Re||(this.Rh[this.Lh]='Use '+this.ke+' with @lre@'+c.name,this.Ke[this.Lh]=881,this.Xe[this.Lh]=c.id,this.ze[this.Lh]=t,this.je[this.Lh]=f.id,this.Lh++);else if(1===this.Ge&&f.Om)16&~this.We||(this.Rh[this.Lh]=this.Ye+' @lre@'+c.name,this.Ke[this.Lh]=391,this.Xe[this.Lh]=c.id,this.ze[this.Lh]=t,this.je[this.Lh]=f.id,this.Lh++);else{if(f.Om)for(let i=4;i>=3;i--)c.vm&&c.vm[i]?(this.Rh[this.Lh]=c.vm[i]+' @lre@'+c.name,3===i?this.Ke[this.Lh]=478:4===i&&(this.Ke[this.Lh]=347),this.Xe[this.Lh]=c.id,this.ze[this.Lh]=t,this.je[this.Lh]=f.id,this.Lh++):4===i&&(this.Rh[this.Lh]='Drop @lre@'+c.name,this.Ke[this.Lh]=347,this.Xe[this.Lh]=c.id,this.ze[this.Lh]=t,this.je[this.Lh]=f.id,this.Lh++);if(f.bm&&(this.Rh[this.Lh]='Use @lre@'+c.name,this.Ke[this.Lh]=188,this.Xe[this.Lh]=c.id,this.ze[this.Lh]=t,this.je[this.Lh]=f.id,this.Lh++),f.Om&&c.vm)for(let i=2;i>=0;i--)c.vm[i]&&(this.Rh[this.Lh]=c.vm[i]+' @lre@'+c.name,0===i?this.Ke[this.Lh]=405:1===i?this.Ke[this.Lh]=38:2===i&&(this.Ke[this.Lh]=422),this.Xe[this.Lh]=c.id,this.ze[this.Lh]=t,this.je[this.Lh]=f.id,this.Lh++);if(f.Lm)for(let i=4;i>=0;i--)f.Lm[i]&&(this.Rh[this.Lh]=f.Lm[i]+' @lre@'+c.name,0===i?this.Ke[this.Lh]=602:1===i?this.Ke[this.Lh]=596:2===i?this.Ke[this.Lh]=22:3===i?this.Ke[this.Lh]=892:4===i&&(this.Ke[this.Lh]=415),this.Xe[this.Lh]=c.id,this.ze[this.Lh]=t,this.je[this.Lh]=f.id,this.Lh++);this.Rh[this.Lh]='Examine @lre@'+c.name,$.K.Rt&&(this.Rh[this.Lh]+='@whi@ ('+c.id+')'),this.Ke[this.Lh]=1773,this.Xe[this.Lh]=c.id,f.ta&&(this.je[this.Lh]=f.ta[t]),this.Lh++}t++}}else if(i>=o&&s>=a&&i{let i=t.Xl;return i>=c.A.Ga&&i<=c.A.Ya?(i>=c.A.Wa?i-=c.A.Wa:i--,this.Rh[this.Lh]='Remove @whi@'+this.To[i],this.Ke[this.Lh]=557,this.Lh++,this.Rh[this.Lh]='Message @whi@'+this.To[i],this.Ke[this.Lh]=679,this.Lh++,!0):i>=c.A.Ka&&i<=c.A.Xa&&(this.Rh[this.Lh]='Remove @whi@'+t.text,this.Ke[this.Lh]=556,this.Lh++,!0)};Pm=()=>{0===this.Le&&0===this.Ge&&(this.Rh[this.Lh]='Walk here',this.Ke[this.Lh]=660,this.ze[this.Lh]=this.ea,this.je[this.Lh]=this.na,this.Lh++);let t=-1;for(let i=0;i>7&127,o=s>>29&3,l=s>>14&32767;if(s!==t){if(t=s,2===o&&this.cn&&this.cn.Xd(this.ir,h,r,s)>=0){const t=e.A.get(l);if(1===this.Le)this.Rh[this.Lh]='Use '+this.ke+' with @cya@'+t.name,this.Ke[this.Lh]=450,this.Xe[this.Lh]=s,this.ze[this.Lh]=h,this.je[this.Lh]=r,this.Lh++;else if(1!==this.Ge){if(t.Um)for(let i=4;i>=0;i--)t.Um[i]&&(this.Rh[this.Lh]=t.Um[i]+' @cya@'+t.name,0===i&&(this.Ke[this.Lh]=285),1===i&&(this.Ke[this.Lh]=504),2===i&&(this.Ke[this.Lh]=364),3===i&&(this.Ke[this.Lh]=581),4===i&&(this.Ke[this.Lh]=1501),this.Xe[this.Lh]=s,this.ze[this.Lh]=h,this.je[this.Lh]=r,this.Lh++);this.Rh[this.Lh]='Examine @cya@'+t.name,$.K.Rt&&(this.Rh[this.Lh]+='@whi@ ('+t.id+')'),this.Ke[this.Lh]=1175,this.Xe[this.Lh]=s,this.ze[this.Lh]=h,this.je[this.Lh]=r,this.Lh++}else 4&~this.We||(this.Rh[this.Lh]=this.Ye+' @cya@'+t.name,this.Ke[this.Lh]=55,this.Xe[this.Lh]=s,this.ze[this.Lh]=h,this.je[this.Lh]=r,this.Lh++)}if(1===o){const t=this.Fr[l];if(t&&t.type&&1===t.type.size&&64==(127&t.x)&&64==(127&t.z))for(let i=0;i=0;s--)t.Um&&t.Um[s]?(this.Rh[this.Lh]=t.Um[s]+' @lre@'+t.name,0===s&&(this.Ke[this.Lh]=224),1===s&&(this.Ke[this.Lh]=993),2===s&&(this.Ke[this.Lh]=99),3===s&&(this.Ke[this.Lh]=746),4===s&&(this.Ke[this.Lh]=877),this.Xe[this.Lh]=i.index,this.ze[this.Lh]=h,this.je[this.Lh]=r,this.Lh++):2===s&&(this.Rh[this.Lh]='Take @lre@'+t.name,this.Ke[this.Lh]=99,this.Xe[this.Lh]=i.index,this.ze[this.Lh]=h,this.je[this.Lh]=r,this.Lh++);this.Rh[this.Lh]='Examine @lre@'+t.name,$.K.Rt&&(this.Rh[this.Lh]+='@whi@ ('+i.index+')'),this.Ke[this.Lh]=1102,this.Xe[this.Lh]=i.index,this.ze[this.Lh]=h,this.je[this.Lh]=r,this.Lh++}else 1&~this.We||(this.Rh[this.Lh]=this.Ye+' @lre@'+t.name,this.Ke[this.Lh]=965,this.Xe[this.Lh]=i.index,this.ze[this.Lh]=h,this.je[this.Lh]=r,this.Lh++)}}}}};Bm=(t,i,s,h)=>{if(this.Lh>=400)return;let e=t.name;if(0!==t.Ym&&this.Jr&&(e=e+this.Vm(this.Jr.Ac,t.Ym)+' (level-'+t.Ym+')'),1===this.Le)this.Rh[this.Lh]='Use '+this.ke+' with @yel@'+e,this.Ke[this.Lh]=900,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++;else if(1!==this.Ge){let n;if(t.Um)for(n=4;n>=0;n--)t.Um[n]&&'attack'!==t.Um[n]?.toLowerCase()&&(this.Rh[this.Lh]=t.Um[n]+' @yel@'+e,0===n?this.Ke[this.Lh]=728:1===n?this.Ke[this.Lh]=542:2===n?this.Ke[this.Lh]=6:3===n?this.Ke[this.Lh]=963:4===n&&(this.Ke[this.Lh]=245),this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++);if(t.Um)for(n=4;n>=0;n--)if(t.Um[n]&&'attack'===t.Um[n]?.toLowerCase()){let r=0;this.Jr&&t.Ym>this.Jr.Ac&&(r=2e3),this.Rh[this.Lh]=t.Um[n]+' @yel@'+e,0===n?this.Ke[this.Lh]=r+728:1===n?this.Ke[this.Lh]=r+542:2===n?this.Ke[this.Lh]=r+6:3===n?this.Ke[this.Lh]=r+963:4===n&&(this.Ke[this.Lh]=r+245),this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++}this.Rh[this.Lh]='Examine @yel@'+e,$.K.Rt&&(this.Rh[this.Lh]+='@whi@ ('+t.id+')'),this.Ke[this.Lh]=1607,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++}else 2&~this.We||(this.Rh[this.Lh]=this.Ye+' @yel@'+e,this.Ke[this.Lh]=265,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++)};Gm=(t,i,s,h)=>{if(t===this.Jr||this.Lh>=400)return;let e=null;this.Jr&&(e=t.name+this.Vm(this.Jr.Ac,t.Ac)+' (level-'+t.Ac+')'),1===this.Le?(this.Rh[this.Lh]='Use '+this.ke+' with @whi@'+e,this.Ke[this.Lh]=367,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++):1!==this.Ge?(this.Rh[this.Lh]='Follow @whi@'+e,this.Ke[this.Lh]=1544,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++,0===this.Eh&&(this.Rh[this.Lh]='Trade with @whi@'+e,this.Ke[this.Lh]=1373,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++),this.no>0&&(this.Rh[this.Lh]='Attack @whi@'+e,this.Jr&&this.Jr.Ac>=t.Ac?this.Ke[this.Lh]=151:this.Ke[this.Lh]=2151,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++),1===this.ro&&(this.Rh[this.Lh]='Fight @whi@'+e,this.Ke[this.Lh]=151,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++),2===this.ro&&(this.Rh[this.Lh]='Duel-with @whi@'+e,this.Ke[this.Lh]=1101,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++)):8&~this.We||(this.Rh[this.Lh]=this.Ye+' @whi@'+e,this.Ke[this.Lh]=651,this.Xe[this.Lh]=i,this.ze[this.Lh]=s,this.je[this.Lh]=h,this.Lh++);for(let t=0;t{const s=t-i;return s<-9?'@red@':s<-6?'@or3@':s<-3?'@or2@':s<0?'@or1@':s>9?'@gre@':s>6?'@gr3@':s>3?'@gr2@':s>0?'@gr1@':'@yel@'};Rf=()=>{if(0===this.Ce){this.Rh[0]='Cancel',this.Ke[0]=1252,this.Lh=1,this._m(this.na),this.$e=0,this.ea>8&&this.na>11&&this.ea<520&&this.na<345&&(-1===this.wh?this.Pm():this.Cm(c.A.Jo[this.wh],this.ea,this.na,8,11,0)),this.$e!==this.me&&(this.me=this.$e),this.$e=0,this.ea>562&&this.na>231&&this.ea<752&&this.na<492&&(-1!==this.Sh?this.Cm(c.A.Jo[this.Sh],this.ea,this.na,562,231,0):-1!==this.Jh[this.$h]&&this.Cm(c.A.Jo[this.Jh[this.$h]],this.ea,this.na,562,231,0)),this.$e!==this.Ie&&(this.ah=!0,this.Ie=this.$e),this.$e=0,this.ea>22&&this.na>375&&this.ea<431&&this.na<471&&(-1===this.Mh?this.gm(this.ea-22,this.na-375):this.Cm(c.A.Jo[this.Mh],this.ea,this.na,22,375,0)),-1!==this.Mh&&this.$e!==this.Ee&&(this.fh=!0,this.Ee=this.$e);let t=!1;for(;!t;){t=!0;for(let i=0;i1e3){const s=this.Rh[i];this.Rh[i]=this.Rh[i+1],this.Rh[i+1]=s;const h=this.Ke[i];this.Ke[i]=this.Ke[i+1],this.Ke[i+1]=h;const e=this.ze[i];this.ze[i]=this.ze[i+1],this.ze[i+1]=e;const n=this.je[i];this.je[i]=this.je[i+1],this.je[i+1]=n;const r=this.Xe[i];this.Xe[i]=this.Xe[i+1],this.Xe[i+1]=r,t=!1}}}};kf=()=>{let t=0;if(this.Pi){let i;t=this.Pi.xu('Choose Option');for(let s=0;st&&(t=i)}t+=8;const i=15*this.Lh+21;let s,h;this.tf>8&&this.if>11&&this.tf<520&&this.if<345&&(s=this.tf-(t/2|0)-8,s+t>512?s=512-t:s<0&&(s=0),h=this.if-11,h+i>334?h=334-i:h<0&&(h=0),this.gh=!0,this._h=0,this.Ch=s,this.Th=h,this.Oh=t,this.bh=15*this.Lh+22),this.tf>562&&this.if>231&&this.tf<752&&this.if<492&&(s=this.tf-(t/2|0)-562,s<0?s=0:s+t>190&&(s=190-t),h=this.if-231,h<0?h=0:h+i>261&&(h=261-i),this.gh=!0,this._h=1,this.Ch=s,this.Th=h,this.Oh=t,this.bh=15*this.Lh+22),this.tf>22&&this.if>375&&this.tf<501&&this.if<471&&(s=this.tf-(t/2|0)-22,s<0?s=0:s+t>479&&(s=479-t),h=this.if-375,h<0?h=0:h+i>96&&(h=96-i),this.gh=!0,this._h=2,this.Ch=s,this.Th=h,this.Oh=t,this.bh=15*this.Lh+22)};Ff=(t,i,s,h,e,n,r,o,l,a,c)=>{const f=this.Qn[this.ir];if(!f)return!1;const u=G.A.yr,d=G.A.yr;for(let t=0;t0&&0===this.Zr[i]&&(g[i]&H.A.Hd)===H.A.OPEN&&(this.zr[p]=w-1,this.jr[p]=y,p=(p+1)%E,this.Zr[i]=2,this.qr[i]=t),i=G.A.index(w+1,y),w0&&0===this.Zr[i]&&(g[i]&H.A.Yd)===H.A.OPEN&&(this.zr[p]=w,this.jr[p]=y-1,p=(p+1)%E,this.Zr[i]=1,this.qr[i]=t),i=G.A.index(w,y+1),y0&&y>0&&0===this.Zr[i]&&!(g[i]&H.A.Zm)&&(g[G.A.index(w-1,y)]&H.A.Hd)===H.A.OPEN&&(g[G.A.index(w,y-1)]&H.A.Yd)===H.A.OPEN&&(this.zr[p]=w-1,this.jr[p]=y-1,p=(p+1)%E,this.Zr[i]=3,this.qr[i]=t),i=G.A.index(w+1,y-1),w0&&0===this.Zr[i]&&!(g[i]&H.A.qm)&&(g[G.A.index(w+1,y)]&H.A.Wd)===H.A.OPEN&&(g[G.A.index(w,y-1)]&H.A.Yd)===H.A.OPEN&&(this.zr[p]=w+1,this.jr[p]=y-1,p=(p+1)%E,this.Zr[i]=9,this.qr[i]=t),i=G.A.index(w-1,y+1),w>0&&y=0&&s>=0&&e0){E=Math.min(m,25),m--;const t=this.zr[m],i=this.jr[m];if($.K.Rt&&1===this.vf[6]&&1===this.vf[7]){for(let t=0;t{this.kr=0,this.Mr=0,this.sI(t),this.hI(t),this.eI(t,i),this.nI(t);for(let t=0;t{t.rI();if(0!==t.oI(1)){const i=t.oI(2);if(0===i)this.Dr[this.Mr++]=this.Jt;else if(1===i){const i=t.oI(3);this.Jr?.step(!1,i);1===t.oI(1)&&(this.Dr[this.Mr++]=this.Jt)}else if(2===i){const i=t.oI(3);this.Jr?.step(!0,i);const s=t.oI(3);this.Jr?.step(!0,s);1===t.oI(1)&&(this.Dr[this.Mr++]=this.Jt)}else if(3===i){this.ir=t.oI(2);const i=t.oI(7),s=t.oI(7),h=t.oI(1);this.Jr?.move(1===h,i,s);1===t.oI(1)&&(this.Dr[this.Mr++]=this.Jt)}}};hI=t=>{const i=t.oI(8);if(ithis.Rr)throw new Error(`eek! ${this.username} Too many players`);this.Rr=0;for(let s=0;s{let s;for(;t.lI+10<8*i&&(s=t.oI(11),2047!==s);){if(!this.Lr[s]){this.Lr[s]=new W.A;const t=this.Pr[s];t&&this.Lr[s]?.read(t)}this.Sr[this.Rr++]=s;const i=this.Lr[s];i&&(i.wu=this.hi);let h=t.oI(5);h>15&&(h-=32);let e=t.oI(5);e>15&&(e-=32);const n=t.oI(1);this.Jr&&i?.move(1===n,this.Jr.Uf[0]+h,this.Jr.Bf[0]+e);1===t.oI(1)&&(this.Dr[this.Mr++]=s)}t.aI()};nI=t=>{for(let i=0;i{if(t.Ku=s,t.Xu=this.hi,(s&W.A.zu)===W.A.zu){const s=e.CA,h=new Uint8Array(s),n=new I.A(h);e.sp(s,0,h),this.Pr[i]=n,t.read(n)}if((s&W.A.ju)===W.A.ju){let i=e.ct;65535===i&&(i=-1),i===t.Zu&&(t.uI=0);const s=e.CA;(-1===i||-1===t.Zu||h.A.Jo[i].priority>h.A.Jo[t.Zu].priority||0===h.A.Jo[t.Zu].priority)&&(t.Zu=i,t.dI=0,t.wI=0,t.yI=s,t.uI=0)}if((s&W.A.qu)===W.A.qu&&(t.$u=e.ct,65535===t.$u&&(t.$u=-1)),(s&W.A.Ju)===W.A.Ju&&(t.Mu=e.NA,t.Du=0,t.Nu=0,t.Pu=150,t.name&&this.lw(2,t.Mu,t.name)),(s&W.A.Qu)===W.A.Qu&&(t.Hu=e.CA,t.Gu=e.CA,t.Fu=this.hi+400,t.Uu=e.CA,t.Bu=e.CA),(s&W.A.td)===W.A.td&&(t.AI=e.ct,t.pI=e.ct,t.sd=t.AI,t.hd=t.pI),(s&W.A.ed)===W.A.ed){const i=e.ct,s=e.CA,h=e.CA,n=e.ft;if(t.name){const n=M.A.xd(t.name);let r=!1;if(s<=1)for(let t=0;t>8,t.Nu=255&i,t.Pu=150,s>1?this.lw(1,r,t.name):this.lw(2,r,t.name)}catch(t){}}e.ft=n+h}if((s&W.A.nd)===W.A.nd){t.rd=e.ct;const i=e.ut;t.mI=i>>16,t.II=this.hi+(65535&i),t.EI=0,t.gI=0,t.II>this.hi&&(t.EI=-1),65535===t.rd&&(t.rd=-1)}(s&W.A.od)===W.A.od&&(t._I=e.CA,t.CI=e.CA,t.TI=e.CA,t.OI=e.CA,t.Wu=e.ct+this.hi,t.Yu=e.ct+this.hi,t.vI=e.CA,t.pathLength=0,t.Uf[0]=t.TI,t.Bf[0]=t.OI)};bA=(t,i)=>{this.kr=0,this.Mr=0,this.bI(t),this.LI(t,i),this.RI(t);for(let t=0;t{t.rI();const i=t.oI(8);if(ithis.Ur)throw new Error(`eek! ${this.username} Too many npcs`);this.Ur=0;for(let s=0;s{for(;t.lI+21<8*i;){const i=t.oI(13);if(8191===i)break;this.Fr[i]||(this.Fr[i]=new Y.A);const s=this.Fr[i];this.Br[this.Ur++]=i,s?(s.wu=this.hi,s.type=r.A.get(t.oI(11)),s.size=s.type.size,s.SI=s.type.MI,s.kI=s.type.xI,s.DI=s.type.NI,s.FI=s.type.UI,s.ic=s.type.BI):t.oI(11);let h=t.oI(5);h>15&&(h-=32);let e=t.oI(5);e>15&&(e-=32),this.Jr&&s?.move(!1,this.Jr.Uf[0]+h,this.Jr.Bf[0]+e);1===t.oI(1)&&(this.Dr[this.Mr++]=i)}t.aI()};RI=t=>{for(let i=0;ih.A.Jo[e.Zu].priority||0===h.A.Jo[e.Zu].priority)&&(e.Zu=i,e.dI=0,e.wI=0,e.yI=s,e.uI=0)}if((n&Y.A.qu)===Y.A.qu&&(e.$u=t.ct,65535===e.$u&&(e.$u=-1)),(n&Y.A.Ju)===Y.A.Ju&&(e.Mu=t.NA,e.Pu=100),(n&Y.A.Qu)===Y.A.Qu&&(e.Hu=t.CA,e.Gu=t.CA,e.Fu=this.hi+400,e.Uu=t.CA,e.Bu=t.CA),(n&Y.A.ld)===Y.A.ld&&(e.type=r.A.get(t.ct),e.SI=e.type.MI,e.kI=e.type.xI,e.DI=e.type.NI,e.FI=e.type.UI,e.ic=e.type.BI),(n&Y.A.nd)===Y.A.nd){e.rd=t.ct;const i=t.ut;e.mI=i>>16,e.II=this.hi+(65535&i),e.EI=0,e.gI=0,e.II>this.hi&&(e.EI=-1),65535===e.rd&&(e.rd=-1)}(n&Y.A.td)===Y.A.td&&(e.AI=t.ct,e.pI=t.ct,e.sd=e.AI,e.hd=e.pI)}};_f=()=>{for(let t=-1;t1406){$.K.Bt=0,this.ri.If(O.A.HI),this.ri.p1(0);const t=this.ri.ft;this.ri.p1(162),this.ri.p1(22),2*Math.random()|0||this.ri.p1(84),this.ri.p2(31824),this.ri.p2(13490),2*Math.random()|0||this.ri.p1(123),2*Math.random()|0||this.ri.p1(134),this.ri.p1(100),this.ri.p1(94),this.ri.p2(35521),this.ri.fu(this.ri.ft-t)}};GI=t=>{(t.x<128||t.z<128||t.x>=13184||t.z>=13184)&&(t.Zu=-1,t.rd=-1,t.Wu=0,t.Yu=0,t.x=128*t.Uf[0]+64*t.size,t.z=128*t.Bf[0]+64*t.size,t.pathLength=0),t===this.Jr&&(t.x<1536||t.z<1536||t.x>=11776||t.z>=11776)&&(t.Zu=-1,t.rd=-1,t.Wu=0,t.Yu=0,t.x=128*t.Uf[0]+64*t.size,t.z=128*t.Bf[0]+64*t.size,t.pathLength=0),t.Wu>this.hi?this.WI(t):t.Yu>=this.hi?this.YI(t):this.VI(t),this.KI(t),this.XI(t)};hu=()=>{if(this.Jr){this.Jr.x>>7===this.wn&&this.Jr.z>>7===this.yn&&(this.wn=0);for(let t=-1;t50||this.Rr>200)&&-1!==t&&i.zI===i.ic;const h=i.x>>7,e=i.z>>7;if(!(h<0||h>=G.A.yr||e<0||e>=G.A.yr))if(!i.jI||this.hi=i.qI){if(64==(127&i.x)&&64==(127&i.z)){if(this.dr[h][e]===this.dn)continue;this.dr[h][e]=this.dn}i.y=this.au(this.ir,i.x,i.z),this.cn?.$I(this.ir,i.x,i.y,i.z,null,i,s,i.JI,60,i.QI)}else i.vt=!1,i.y=this.au(this.ir,i.x,i.z),this.cn?.tE(this.ir,i.x,i.y,i.z,i.iE,i.sE,i.hE,i.eE,null,i,s,i.JI)}}};Cf=()=>{for(let t=0;t{for(let t=0;t>7,e=i.z>>7;if(!(h<0||h>=G.A.yr||e<0||e>=G.A.yr)){if(1===i.size&&64==(127&i.x)&&64==(127&i.z)){if(this.dr[h][e]===this.dn)continue;this.dr[h][e]=this.dn}this.cn?.$I(this.ir,i.x,this.au(this.ir,i.x,i.z),i.z,null,i,s,i.JI,64*(i.size-1)+60,i.QI)}}};nu=()=>{for(let t=this.Gr.head();t;t=this.Gr.next())if(t.level!==this.ir||this.hi>t.nE)t.SA();else if(this.hi>=t.rE){if(t.target>0){const i=this.Fr[t.target-1];i&&t.oE(i.x,this.au(t.level,i.x,i.z)-t.offsetY,i.z,this.hi)}if(t.target<0){const i=-t.target-1;let s;s=i===this.so?this.Jr:this.Lr[i],s&&t.oE(s.x,this.au(t.level,s.x,s.z)-t.offsetY,s.z,this.hi)}t.update(this.un),this.cn?.$I(this.ir,0|t.x,0|t.y,0|t.z,null,t,-1,t.JI,60,!1)}};ru=()=>{for(let t=this.Hr.head();t;t=this.Hr.next())t.level!==this.ir||t.lE?t.SA():this.hi>=t.rE&&(t.update(this.un),t.lE?t.SA():this.cn?.$I(t.level,t.x,t.y,t.z,null,t,-1,0,60,!1))};ou=()=>{for(let t=this.Wr.head();t;t=this.Wr.next()){let i=!1;if(t.Pl+=this.un,-1===t.Fl&&(t.Fl=0,i=!0),t.aE.delay)for(;t.Pl>t.aE.delay[t.Fl];)if(t.Pl-=t.aE.delay[t.Fl]+1,t.Fl++,i=!0,t.Fl>=t.aE.Ul&&(t.Fl-=t.aE.Bl,t.Fl<0||t.Fl>=t.aE.Ul)){t.SA(),i=!1;break}if(i&&this.cn){const i=t.ym,s=t.dm,h=t.wm;let n=0;if(0===t.cE?n=this.cn.Kd(i,s,h):1===t.cE?n=this.cn.oA(i,h,s):2===t.cE?n=this.cn.iw(i,s,h):3===t.cE&&(n=this.cn.Bd(i,s,h)),this.cr&&0!==n&&(n>>14&32767)===t.index){const r=this.cr[i][s][h],o=this.cr[i][s+1][h],l=this.cr[i][s+1][h+1],a=this.cr[i][s][h+1],c=e.A.get(t.index);let f=-1;if(-1!==t.Fl&&t.aE.frames&&(f=t.aE.frames[t.Fl]),2===t.cE){const t=this.cn.Xd(i,s,h,n);let e=31&t;const u=t>>6;e===P.A.Py.id&&(e=P.A.Ny.id),this.cn?.fE(i,s,h,c.xa(e,u,r,o,l,a,f))}else if(1===t.cE)this.cn?.uE(i,s,h,c.xa(P.A.dE.id,0,r,o,l,a,f));else if(0===t.cE){const t=this.cn.Xd(i,s,h,n),e=31&t,u=t>>6;if(e===P.A.Zd.id){const t=u+1&3;this.cn?.wE(s,h,i,c.xa(P.A.Zd.id,u+4,r,o,l,a,f),c.xa(P.A.Zd.id,t,r,o,l,a,f))}else this.cn?.yE(i,s,h,c.xa(e,u,r,o,l,a,f))}else if(3===t.cE){const t=this.cn.Xd(i,s,h,n)>>6;this.cn?.AE(i,s,h,c.xa(P.A.Fy.id,t,r,o,l,a,f))}}else t.SA()}}};Tf=()=>{for(let t=-1;t0&&(s.Pu--,0===s.Pu&&(s.Mu=null))}for(let t=0;t0&&(s.Pu--,0===s.Pu&&(s.Mu=null))}};Of=()=>{if(2===this.fn){for(let t=this.Yr.head();t;t=this.Yr.next())this.hi>=t.nE&&(this.eA(t.vp,t.x,t.z,t.Am,t.angle,t.shape,t.nw),t.SA());$.K.Ut++,$.K.Ut>85&&($.K.Ut=0,this.ri.If(O.A.pE))}};WI=t=>{const i=t.Wu-this.hi,s=128*t._I+64*t.size,h=128*t.CI+64*t.size;t.x+=(s-t.x)/i|0,t.z+=(h-t.z)/i|0,t.mE=0,0===t.vI&&(t.IE=1024),1===t.vI&&(t.IE=1536),2===t.vI&&(t.IE=0),3===t.vI&&(t.IE=512)};YI=t=>{if(t.Yu===this.hi||-1===t.Zu||0!==t.yI||t.wI+1>h.A.Jo[t.Zu].delay[t.dI]){const i=t.Yu-t.Wu,s=this.hi-t.Wu,h=128*t._I+64*t.size,e=128*t.CI+64*t.size,n=128*t.TI+64*t.size,r=128*t.OI+64*t.size;t.x=(h*(i-s)+n*s)/i|0,t.z=(e*(i-s)+r*s)/i|0}t.mE=0,0===t.vI&&(t.IE=1024),1===t.vI&&(t.IE=1536),2===t.vI&&(t.IE=0),3===t.vI&&(t.IE=512),t.JI=t.IE};KI=t=>{if(-1!==t.$u&&t.$u<32768){const i=this.Fr[t.$u];if(i){const s=t.x-i.x,h=t.z-i.z;0===s&&0===h||(t.IE=325.949*Math.atan2(s,h)&2047)}}if(t.$u>=32768){let i=t.$u-32768;i===this.so&&(i=this.Jt);const s=this.Lr[i];if(s){const i=t.x-s.x,h=t.z-s.z;0===i&&0===h||(t.IE=325.949*Math.atan2(i,h)&2047)}}if((0!==t.AI||0!==t.pI)&&(0===t.pathLength||t.mE>0)){const i=t.x-64*(t.AI-this.Kn-this.Kn),s=t.z-64*(t.pI-this.Xn-this.Xn);0===i&&0===s||(t.IE=325.949*Math.atan2(i,s)&2047),t.AI=0,t.pI=0}const i=t.IE-t.JI&2047;if(0!==i&&(i<32||i>2016?t.JI=t.IE:i>1024?t.JI-=32:t.JI+=32,t.JI&=2047,t.zI===t.ic&&t.JI!==t.IE)){if(-1!==t.EE)return void(t.zI=t.EE);t.zI=t.SI}};XI=t=>{let i;if(t.QI=!1,-1!==t.zI&&(i=h.A.Jo[t.zI],t.gE++,i.delay&&t._Ei.delay[t._E]&&(t.gE=0,t._E++),t._E>=i.Ul&&(t.gE=0,t._E=0)),-1!==t.Zu&&0===t.yI){for(i=h.A.Jo[t.Zu],t.wI++;i.delay&&t.dIi.delay[t.dI];)t.wI-=i.delay[t.dI],t.dI++;t.dI>=i.Ul&&(t.dI-=i.Bl,t.uI++,t.uI>=i.CE&&(t.Zu=-1),(t.dI<0||t.dI>=i.Ul)&&(t.Zu=-1)),t.QI=i.TE}if(t.yI>0&&t.yI--,-1!==t.rd&&this.hi>=t.II){for(t.EI<0&&(t.EI=0),i=l.A.Jo[t.rd].aE,t.gI++;i&&i.delay&&t.EIi.delay[t.EI];)t.gI-=i.delay[t.EI],t.EI++;i&&t.EI>=i.Ul&&(t.EI<0||t.EI>=i.Ul)&&(t.rd=-1)}};VI=t=>{if(t.zI=t.ic,0===t.pathLength)return void(t.mE=0);if(-1!==t.Zu&&0===t.yI){if(!h.A.Jo[t.Zu].OE)return void t.mE++}const i=t.x,s=t.z,e=128*t.Uf[t.pathLength-1]+64*t.size,n=128*t.Bf[t.pathLength-1]+64*t.size;if(e-i<=256&&e-i>=-256&&n-s<=256&&n-s>=-256){t.IE=in?1792:1536:i>e?sn?256:512:s1024&&(h-=2048);let r=t.kI;h>=-256&&h<=256?r=t.SI:h>=256&&h<768?r=t.FI:h>=-768&&h<=-256&&(r=t.DI),-1===r&&(r=t.SI),t.zI=r;let o=4;t.JI!==t.IE&&-1===t.$u&&(o=2),t.pathLength>2&&(o=6),t.pathLength>3&&(o=8),t.mE>0&&t.pathLength>1&&(o=8,t.mE--),t.vE[t.pathLength-1]&&(o<<=1),o>=8&&t.zI===t.SI&&-1!==t.bE&&(t.zI=t.bE),ie&&(t.x=e)):i>e&&(t.x-=o,t.xn&&(t.z=n)):s>n&&(t.z-=o,t.z{let t=3;if(this.kn<310&&this.Jr){let i=this.Rn>>7,s=this.Mn>>7;const h=this.Jr.x>>7,e=this.Jr.z>>7;let n,r,o,l;if(this.ur&&4&this.ur[this.ir][i][s]&&(t=this.ir),n=h>i?h-i:i-h,r=e>s?e-s:s-e,n>r)for(o=65536*r/n|0,l=32768;i!==h;)ih&&i--,this.ur&&4&this.ur[this.ir][i][s]&&(t=this.ir),l+=o,l>=65536&&(l-=65536,se&&s--,this.ur&&4&this.ur[this.ir][i][s]&&(t=this.ir));else for(o=65536*n/r|0,l=32768;s!==e;)se&&s--,this.ur&&4&this.ur[this.ir][i][s]&&(t=this.ir),l+=o,l>=65536&&(l-=65536,ih&&i--,this.ur&&4&this.ur[this.ir][i][s]&&(t=this.ir))}return this.Jr&&this.ur&&4&this.ur[this.ir][this.Jr.x>>7][this.Jr.z>>7]&&(t=this.ir),t};uu=()=>{if(!this.ur)return 0;return this.au(this.ir,this.Rn,this.Mn)-this.Sn>=800||!(4&this.ur[this.ir][this.Rn>>7][this.Mn>>7])?3:this.ir};au=(t,i,s)=>{if(!this.cr)return 0;const h=Math.min(i>>7,G.A.yr-1),e=Math.min(s>>7,G.A.yr-1);let n=t;t<3&&this.ur&&!(2&~this.ur[1][h][e])&&(n=t+1);const r=127&i,o=127&s;return(this.cr[n][h][e]*(128-r)+this.cr[n][h+1][e]*r>>7)*(128-o)+(this.cr[n][h][e+1]*(128-r)+this.cr[n][h+1][e+1]*r>>7)*o>>7};lu=(t,i,s,h,e,n)=>{const r=2048-e&2047,o=2048-h&2047;let l,a,c,f=0,u=0,w=n;0!==r&&(l=d.A.sin[r],a=d.A.cos[r],c=u*a-n*l>>16,w=u*l+n*a>>16,u=c),0!==o&&(l=d.A.sin[o],a=d.A.cos[o],c=w*l+f*a>>16,w=w*a-f*l>>16,f=c),this.Rn=t-f,this.Sn=i-u,this.Mn=s-w,this.kn=e,this.xn=h};Kf=()=>{if(!this.Jr)return;const t=this.Jr.x+this.mn,i=this.Jr.z+this.In;(this.lr-t<-500||this.lr-t>500||this.ar-i<-500||this.ar-i>500)&&(this.lr=t,this.ar=i),this.lr!==t&&(this.lr+=(t-this.lr)/16|0),this.ar!==i&&(this.ar+=(i-this.ar)/16|0),1===this.vf[1]?this.nr+=(-this.nr-24)/2|0:1===this.vf[2]?this.nr+=(24-this.nr)/2|0:this.nr=this.nr/2|0,1===this.vf[3]?this.rr+=(12-this.rr)/2|0:1===this.vf[4]?this.rr+=(-this.rr-12)/2|0:this.rr=this.rr/2|0,this.er=this.er+this.nr/2&2047,this.hr+=this.rr/2|0,this.hr<128&&(this.hr=128),this.hr>383&&(this.hr=383);const s=this.lr>>7,h=this.ar>>7,e=this.au(this.ir,this.lr,this.ar);let n=0;if(this.cr&&s>3&&h>3&&s<100&&h<100)for(let t=s-4;t<=s+4;t++)for(let i=h-4;i<=h+4;i++){let s=this.ir;s<3&&this.ur&&!(2&~this.ur[1][t][i])&&s++;const h=e-this.cr[s][t][i];h>n&&(n=h)}let r=192*n;r>98048&&(r=98048),r<32768&&(r=32768),r>this.Dn?this.Dn+=(r-this.Dn)/24|0:r{let t=128*this.Cr+64,i=128*this.Tr+64,s=this.au(this.ir,this.Cr,this.Tr)-this.Or;this.Rnt&&(this.Rn=t)),this.Rn>t&&(this.Rn-=this.vr+((this.Rn-t)*this.br/1e3|0),this.Rns&&(this.Sn=s)),this.Sn>s&&(this.Sn-=this.vr+((this.Sn-s)*this.br/1e3|0),this.Sni&&(this.Mn=i)),this.Mn>i&&(this.Mn-=this.vr+((this.Mn-i)*this.br/1e3|0),this.Mn383&&(o=383),this.kno&&(this.kn=o)),this.kn>o&&(this.kn-=this.gr+((this.kn-o)*this._r/1e3|0),this.kn1024&&(a-=2048),a<-1024&&(a+=2048),a>0&&(this.xn+=this.gr+(a*this._r/1e3|0),this.xn&=2047),a<0&&(this.xn-=this.gr+(-a*this._r/1e3|0),this.xn&=2047);let c=l-this.xn;c>1024&&(c-=2048),c<-1024&&(c+=2048),(c<0&&a>0||c>0&&a<0)&&(this.xn=l)};qA=(t,i)=>{const s=t.CA;let n=this.Hn+(s>>4&7),r=this.Wn+(7&s);if(i===T.A.ZA||i===T.A.jA){const s=t.CA,h=s>>2,e=3&s,o=P.A.of(h).nw;let l;if(l=i===T.A.jA?-1:t.ct,n>=0&&r>=0&&n>14&32767,h=31&t,e=t>>6}t=new U.A(this.ir,o,n,r,0,F.A.qd,P.A.jd.id,s,e,h),this.Xr.LE(t)}t&&(t.Am=l,t.shape=h,t.angle=e),this.eA(this.ir,n,r,l,e,h,o)}}else if(i===T.A.zA){const i=t.CA>>2,s=P.A.of(i).nw,e=t.ct;if(n>=0&&r>=0&&n>14&32767,this.ir,s,n,r,h.A.Jo[e],!1);this.Wr.LE(i)}}}else if(i===T.A.XA){const i=t.ct,s=t.ct;if(n>=0&&r>=0&&n=0&&r>=0&&n=0&&r>=0&&n=0&&s>=0&&i=0&&r>=0&&n=0&&r>=0&&n>2,h=3&i,o=P.A.of(s).nw,l=t.ct,a=t.ct,c=t.ct,f=t.ct;let u,d=t.gA,w=t.gA,y=t.gA,A=t.gA;if(u=f===this.so?this.Jr:this.Lr[f],u&&this.cr){const t=new B.A(this.ir,o,n,r,-1,h,s,a+this.hi);this.Yr.LE(t);const i=new B.A(this.ir,o,n,r,l,h,s,c+this.hi);this.Yr.LE(i);const f=this.cr[this.ir][n][r],p=this.cr[this.ir][n+1][r],m=this.cr[this.ir][n+1][r+1],I=this.cr[this.ir][n][r+1],E=e.A.get(l);u.ZI=a+this.hi,u.qI=c+this.hi,u.jI=E.xa(s,h,f,p,m,I,-1);let g,_=E.width,C=E.length;h!==F.A.$d&&h!==F.A.Qd||(_=E.length,C=E.width),u.RE=128*n+64*_,u.SE=128*r+64*C,u.ME=this.au(this.ir,u.RE,u.SE),d>y&&(g=d,d=y,y=g),w>A&&(g=w,w=A,A=g),u.iE=n+d,u.hE=n+y,u.sE=r+w,u.eE=r+A}}else if(i===T.A.GA){const i=t.ct,s=t.ct,h=t.ct;if(n>=0&&r>=0&&n{if(!$.K.vt){if(d.A.kE[17]>=t){const t=d.A.xE[17];if(!t)return;const i=t.width*t.height-1,s=t.width*this.un*2,h=t.Mc,e=this.Jn;for(let t=0;t<=i;t++)e[t]=h[t-s&i];t.Mc=e,this.Jn=h,d.A.DE(17)}if(d.A.kE[24]>=t){const t=d.A.xE[24];if(!t)return;const i=t.width*t.height-1,s=t.width*this.un*2,h=t.Mc,e=this.Jn;for(let t=0;t<=i;t++)e[t]=h[t-s&i];t.Mc=e,this.Jn=h,d.A.DE(24)}}};Vc=()=>{if(!(this.Vi&&this.Ki&&this.Yi&&this.qi))return;for(let t=10;t<117;t++){(100*Math.random()|0)<50&&(this.Vi[t+32512]=255)}for(let t=0;t<100;t++){const t=2+(124*Math.random()|0)+(128+(128*Math.random()|0)<<7);this.Vi[t]=192}for(let t=1;t<255;t++)for(let i=1;i<127;i++){const s=i+(t<<7);this.Ki[s]=(this.Vi[s-1]+this.Vi[s+1]+this.Vi[s-128]+this.Vi[s+128])/4|0}this.$i+=128,this.$i>this.Yi.length&&(this.$i-=this.Yi.length,this.zc(this.Ui[12*Math.random()|0]));for(let t=1;t<255;t++)for(let i=1;i<127;i++){const s=i+(t<<7);let h=this.Ki[s+128]-(this.Yi[s+this.$i&this.Yi.length-1]/5|0);h<0&&(h=0),this.Vi[s]=h}for(let t=0;t<255;t++)this.qi[t]=this.qi[t+1];if(this.qi[255]=16*Math.sin(this.hi/14)+14*Math.sin(this.hi/15)+12*Math.sin(this.hi/16)|0,this.Ji>0&&(this.Ji-=4),this.Qi>0&&(this.Qi-=4),0===this.Ji&&0===this.Qi){const t=2e3*Math.random()|0;0===t?this.Ji=1024:1===t&&(this.Qi=1024)}};NE=(t,i,s)=>{const h=256-i;return((16711935&t)*h+(16711935&s)*i&4278255360)+((65280&t)*h+(65280&s)*i&16711680)>>8};Kc=()=>{if(!(this.Xi&&this.zi&&this.ji&&this.Zi&&this.qi&&this.Vi))return;const t=256;if(this.Ji>0)for(let t=0;t<256;t++)this.Ji>768?this.Xi[t]=this.NE(this.zi[t],1024-this.Ji,this.ji[t]):this.Ji>256?this.Xi[t]=this.ji[t]:this.Xi[t]=this.NE(this.ji[t],256-this.Ji,this.zi[t]);else if(this.Qi>0)for(let t=0;t<256;t++)this.Qi>768?this.Xi[t]=this.NE(this.zi[t],1024-this.Qi,this.Zi[t]):this.Qi>256?this.Xi[t]=this.Zi[t]:this.Xi[t]=this.NE(this.Zi[t],256-this.Qi,this.zi[t]);else for(let t=0;t<256;t++)this.Xi[t]=this.zi[t];for(let t=0;t<33920;t++)this.Ti&&this.Gi&&(this.Ti.Mc[t]=this.Gi.Mc[t]);let i=0,s=1152;for(let h=1;h<255;h++){let e=(this.qi[h]*(t-h)/t|0)+22;e<0&&(e=0),i+=e;for(let t=e;t<128;t++){let t=this.Vi[i++];if(0===t)s++;else{const i=t,h=256-t;if(t=this.Xi[t],this.Ti){const e=this.Ti.Mc[s];this.Ti.Mc[s++]=((16711935&t)*i+(16711935&e)*h&4278255360)+((65280&t)*i+(65280&e)*h&16711680)>>8}}}s+=e}this.Ti?.draw(0,0);for(let t=0;t<33920;t++)this.Oi&&this.Hi&&(this.Oi.Mc[t]=this.Hi.Mc[t]);i=0,s=1176;for(let h=1;h<255;h++){const e=this.qi[h]*(t-h)/t|0,n=103-e;s+=e;for(let t=0;t>8}}}i+=128-n,s+=128-n-e}this.Oi?.draw(661,0)}}console.log(`RS2 user client - release #${$.K.Tt}`),await(0,it.w)(),(new t).run().then((()=>{})),i()}catch(t){i(t)}}),1)},8370:(t,i,s)=>{s.d(i,{A:()=>c});var h=s(1183),e=s(4583),n=s(9234);const r=['F11','F12'],o={'Backspace':{code:8,ch:8},'Enter':{code:10,ch:10},'Shift':{code:16,ch:65535},'Escape':{code:27,ch:27},'Tab':{code:9,ch:9},'CapsLock':{code:20,ch:65535},' ':{code:32,ch:32},'Control':{code:17,ch:65535},'Alt':{code:18,ch:65535},'Meta':{code:524,ch:65535},'ArrowLeft':{code:37,ch:65535},'ArrowRight':{code:39,ch:65535},'ArrowUp':{code:38,ch:65535},'ArrowDown':{code:40,ch:65535},'Insert':{code:155,ch:65535},'Home':{code:36,ch:65535},'PageUp':{code:33,ch:65535},'Delete':{code:127,ch:127},'End':{code:35,ch:65535},'PageDown':{code:34,ch:65535},'`':{code:192,ch:96},'~':{code:192,ch:126},'!':{code:49,ch:33},'@':{code:50,ch:64},'#':{code:51,ch:35},'$':{code:52,ch:36},'%':{code:53,ch:37},'^':{code:54,ch:94},'&':{code:55,ch:38},'*':{code:56,ch:42},'(':{code:57,ch:40},')':{code:48,ch:41},'-':{code:45,ch:45},'_':{code:45,ch:95},'=':{code:61,ch:61},'+':{code:61,ch:43},'[':{code:91,ch:91},'{':{code:91,ch:123},']':{code:93,ch:93},'}':{code:93,ch:125},'\\':{code:92,ch:92},'|':{code:92,ch:124},';':{code:59,ch:59},':':{code:59,ch:58},"'":{code:222,ch:39},'"':{code:222,ch:34},',':{code:44,ch:44},'<':{code:44,ch:60},'.':{code:46,ch:46},'>':{code:46,ch:62},'/':{code:47,ch:47},'?':{code:47,ch:63},'F1':{code:112,ch:65535},'F2':{code:113,ch:65535},'F3':{code:114,ch:65535},'F4':{code:115,ch:65535},'F5':{code:116,ch:65535},'F6':{code:117,ch:65535},'F7':{code:118,ch:65535},'F8':{code:119,ch:65535},'F9':{code:120,ch:65535},'F10':{code:121,ch:65535},'F11':{code:122,ch:65535},'F12':{code:123,ch:65535},0:{code:48,ch:48},1:{code:49,ch:49},2:{code:50,ch:50},3:{code:51,ch:51},4:{code:52,ch:52},5:{code:53,ch:53},6:{code:54,ch:54},7:{code:55,ch:55},8:{code:56,ch:56},9:{code:57,ch:57},'a':{code:65,ch:97},'b':{code:66,ch:98},'c':{code:67,ch:99},'d':{code:68,ch:100},'e':{code:69,ch:101},'f':{code:70,ch:102},'g':{code:71,ch:103},'h':{code:72,ch:104},'i':{code:73,ch:105},'j':{code:74,ch:106},'k':{code:75,ch:107},'l':{code:76,ch:108},'m':{code:77,ch:109},'n':{code:78,ch:110},'o':{code:79,ch:111},'p':{code:80,ch:112},'q':{code:81,ch:113},'r':{code:82,ch:114},'s':{code:83,ch:115},'t':{code:84,ch:116},'u':{code:85,ch:117},'v':{code:86,ch:118},'w':{code:87,ch:119},'x':{code:88,ch:120},'y':{code:89,ch:121},'z':{code:90,ch:122},'A':{code:65,ch:65},'B':{code:66,ch:66},'C':{code:67,ch:67},'D':{code:68,ch:68},'E':{code:69,ch:69},'F':{code:70,ch:70},'G':{code:71,ch:71},'H':{code:72,ch:72},'I':{code:73,ch:73},'J':{code:74,ch:74},'K':{code:75,ch:75},'L':{code:76,ch:76},'M':{code:77,ch:77},'N':{code:78,ch:78},'O':{code:79,ch:79},'P':{code:80,ch:80},'Q':{code:81,ch:81},'R':{code:82,ch:82},'S':{code:83,ch:83},'T':{code:84,ch:84},'U':{code:85,ch:85},'V':{code:86,ch:86},'W':{code:87,ch:87},'X':{code:88,ch:88},'Y':{code:89,ch:89},'Z':{code:90,ch:90}};var l=s(2595),a=s(7854);class c{static getParameter(t){return new URLSearchParams(window.location.search).get(t)??''}static setParameter(t,i){const s=new URL(window.location.toString());s.searchParams.set(t,i),window.history.pushState(null,'',s.toString())}pd=0;PE=[];FE=0;tl=null;state=0;yd=20;UE=1;BE=[];wd=0;GE=0;HE=[];WE=!0;YE=!1;VE=50;hasFocus=!0;Nc=!1;wf=0;Lf=0;ea=0;na=0;Qc=0;tf=0;if=0;vf=[];KE=[];XE=0;zE=0;input=null;jE=!1;ZE=!1;qE=!1;time=-1;$E=0;JE=0;QE=0;tg=0;ig=0;sg=0;constructor(t=!1){a.hg.tabIndex=-1,a.Il.fillStyle='black',a.Il.fillRect(0,0,a.hg.width,a.hg.height),this.YE=t,this.YE?this.resize(window.innerWidth,window.innerHeight):this.resize(a.hg.width,a.hg.height)}get width(){return a.hg.width}get height(){return a.hg.height}resize=(t,i)=>{a.hg.width=t,a.hg.height=i,this.tl=new h.A(t,i),e.A.eg()};run=async()=>{a.hg.addEventListener('resize',(()=>{this.YE&&this.resize(window.innerWidth,window.innerHeight)}),!1),a.hg.onmousedown=this.onmousedown,a.hg.onmouseup=this.onmouseup,a.hg.onmouseenter=this.onmouseenter,a.hg.onmouseleave=this.onmouseleave,a.hg.onmousemove=this.onmousemove,window.onbeforeunload=this.Zo,a.hg.onfocus=this.onfocus,a.hg.onblur=this.onblur,this.ng?(a.hg.ontouchstart=this.ontouchstart,a.hg.ontouchend=this.ontouchend,a.hg.ontouchmove=this.ontouchmove):(a.hg.onkeydown=this.onkeydown,a.hg.onkeyup=this.onkeyup),a.hg.oncontextmenu=t=>{t.preventDefault()},window.oncontextmenu=t=>{t.preventDefault()},this.ng&&'low'===c.getParameter('detail')&&(this.VE=30),await this.ul(0,'Loading...'),await this.load();for(let t=0;t<10;t++)this.BE[t]=performance.now();let t,i=0,s=256,h=1,e=0;for(;this.state>=0;){if(this.state>0&&(this.state--,0===this.state))return void this.rg();const r=s,o=h;s=300,h=1,t=performance.now();const l=this.BE[i];if(0===l?(s=r,h=o):t>l&&(s=2560*this.yd/(t-l)|0),s<25?s=25:s>256&&(s=256,h=this.yd-(t-l)/10|0),this.BE[i]=t,i=(i+1)%10,h>1)for(let t=0;t<10;t++)0!==this.BE[t]&&(this.BE[t]+=h);for(h0&&(this.wd=1e3*s/(256*this.yd)|0);const a=performance.now();if(this.WE&&this.refresh(),await this.draw(),this.HE[this.GE]=(performance.now()-a)/1e3,this.GE=(this.GE+1)%this.HE.length,this.VE<50){const i=1e3/this.VE-(performance.now()-t);i>0&&await(0,n.wl)(i)}}-1===this.state&&this.rg()};rg=()=>{this.state=-2,this.Zo()};El=t=>{this.yd=1e3/t|0};Ky=t=>{this.VE=Math.max(Math.min(50,0|t),0)};start=()=>{this.state>=0&&(this.state=0)};stop=()=>{this.state>=0&&(this.state=4e3/this.yd|0)};destroy=()=>{this.state=-1};load=async()=>{};update=async()=>{};Zo=()=>{};draw=async()=>{};refresh=()=>{};async ul(t,i){const s=this.width,h=this.height;this.WE&&(a.Il.fillStyle='black',a.Il.fillRect(0,0,s,h),this.WE=!1);const e=h/2-18;a.Il.fillStyle='rgb(140, 17, 17)',a.Il.rect((s/2|0)-152,e,304,34),a.Il.fillRect((s/2|0)-150,e+2,3*t,30),a.Il.fillStyle='black',a.Il.fillRect((s/2|0)-150+3*t,e+2,300-3*t,30),a.Il.font='bold 13px helvetica, sans-serif',a.Il.textAlign='center',a.Il.fillStyle='white',a.Il.fillText(i,s/2|0,e+22),await(0,n.wl)(5)}hf=()=>{let t=-1;return this.zE!==this.XE&&(t=this.KE[this.XE],this.XE=this.XE+1&127),t};get ms(){const t=this.HE.length;let i=0;for(let s=0;sthis.pd&&(this.pd=s),this.PE[this.FE]=s,this.FE=(this.FE+1)%250,s}get Ad(){return this.PE.reduce(((t,i)=>t+i),0)/250}onkeydown=t=>{const i=t.key;this.wf=0;const s=o[i];if(!s||0===t.code.length&&!t.isTrusted)return void console.warn(`Unhandled key: ${i}`);const h=s.code;let e=s.ch;t.ctrlKey&&(e>='A'.charCodeAt(0)&&e<=']'.charCodeAt(0)||e=='_'.charCodeAt(0)?e-='A'.charCodeAt(0)-1:e>='a'.charCodeAt(0)&&e<='z'.charCodeAt(0)&&(e-='a'.charCodeAt(0)-1)),e<30&&(e=0),h===o.ArrowLeft.code?e=1:h===o.ArrowRight.code?e=2:h===o.ArrowUp.code?e=3:h===o.ArrowDown.code?e=4:h===o.Control.code?e=5:h===o.Shift.code?e=6:h===o.Alt.code?e=7:h===o.Backspace.code||h===o.Delete.code?e=8:h===o.Tab.code?e=9:h===o.Enter.code?e=10:h>=o.F1.code&&h<=o.F12.code?e=h+1008-o.F1.code:h===o.Home.code?e=1e3:h===o.End.code?e=1001:h===o.PageUp.code?e=1002:h===o.PageDown.code&&(e=1003),e>0&&e<128&&(this.vf[e]=1),e>4&&(this.KE[this.zE]=e,this.zE=this.zE+1&127),l.A.enabled&&l.A.og(e),r.includes(i)||t.preventDefault()};onkeyup=t=>{const i=t.key;this.wf=0;const s=o[i];if(!s||0===t.code.length&&!t.isTrusted)return void console.warn(`Unhandled key: ${i}`);const h=s.code;let e=s.ch;e<30&&(e=0),h===o.ArrowLeft.code?e=1:h===o.ArrowRight.code?e=2:h===o.ArrowUp.code?e=3:h===o.ArrowDown.code?e=4:h===o.Control.code?e=5:h===o.Shift.code?e=6:h===o.Alt.code?e=7:h===o.Backspace.code||h===o.Delete.code?e=8:h===o.Tab.code?e=9:h===o.Enter.code?e=10:h>=o.F1.code&&h<=o.F12.code?e=h+1008-o.F1.code:h===o.Home.code?e=1e3:h===o.End.code?e=1001:h===o.PageUp.code?e=1002:h===o.PageDown.code&&(e=1003),e>0&&e<128&&(this.vf[e]=0),l.A.enabled&&l.A.lg(e),r.includes(i)||t.preventDefault()};onmousedown=t=>{if(this.jE=!1,(t.clientX>0||t.clientY>0)&&this.ag(t),this.wf=0,this.tf=this.ea,this.if=this.na,this.ng&&!this.cg){if(this.fg()||this.ug()||this.dg())return this.Qc=1,void(this.Lf=1);t.timeStamp>=this.time+500?(this.Qc=2,this.Lf=2):(this.Qc=1,this.Lf=1)}else 2===t.button?(this.Qc=2,this.Lf=2):(this.Qc=1,this.Lf=1);l.A.enabled&&l.A.wg(this.tf,this.if,t.buttons)};onmouseup=t=>{this.ag(t),this.wf=0,this.Lf=0,l.A.enabled&&l.A.yg(t.buttons)};onmouseenter=t=>{this.ag(t),l.A.enabled&&l.A.Ag()};onmouseleave=t=>{this.ag(t),this.wf=0,this.ea=-1,this.na=-1,this.Lf=0,this.tf=-1,this.if=-1,l.A.enabled&&l.A.pg()};onmousemove=t=>{this.ag(t),this.wf=0,l.A.enabled&&l.A.mg(this.ea,this.na)};onfocus=t=>{this.hasFocus=!0,this.WE=!0,this.refresh(),l.A.enabled&&l.A.Ig()};onblur=t=>{this.hasFocus=!1,l.A.enabled&&l.A.Eg()};ontouchstart=t=>{if(!this.ng)return;null!==this.input&&(this.input.parentNode?.removeChild(this.input),this.input=null),this.jE=!0;const i=t.changedTouches[0],s=0|i.clientX,h=0|i.clientY;this.onmousemove(new MouseEvent('mousemove',{clientX:s,clientY:h})),this.$E=this.ig=this.QE=0|i.screenX,this.JE=this.sg=this.tg=0|i.screenY,this.time=t.timeStamp,this.ZE=this.gg(),this.qE=this._g()};ontouchend=t=>{if(!this.ng||!this.jE)return;const i=t.changedTouches[0],s=0|i.clientX,h=0|i.clientY;if(this.onmousemove(new MouseEvent('mousemove',{clientX:s,clientY:h})),this.ig=0|i.screenX,this.sg=0|i.screenY,this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowLeft',code:'ArrowLeft'})),this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowUp',code:'ArrowUp'})),this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowRight',code:'ArrowRight'})),this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowDown',code:'ArrowDown'})),this.ZE&&!this.gg())return void(this.jE=!1);if(this.qE&&!this._g())return void(this.jE=!1);if(this.fg()||this.Cg()||this.ug()||this.dg()){null!==this.input&&(this.input.parentNode?.contains(this.input)&&this.input.parentNode?.removeChild(this.input),this.input=null);const t=document.createElement('input');return this.ug()?(t.setAttribute('id','username'),t.setAttribute('placeholder','Username')):this.dg()?(t.setAttribute('id','password'),t.setAttribute('placeholder','Password')):this.fg()?(t.setAttribute('id','chatinput'),t.setAttribute('placeholder','Chatinput')):this.Cg()&&(t.setAttribute('id','chatpopup'),t.setAttribute('placeholder','Chatpopup')),this.Tg?t.setAttribute('type','password'):t.setAttribute('type',this.dg()?'password':'text'),t.setAttribute('autofocus','autofocus'),t.setAttribute('spellcheck','false'),t.setAttribute('autocomplete','off'),t.setAttribute('style',`position: fixed; left: ${s}px; top: ${h}px; width: 1px; height: 1px; opacity: 0;`),document.body.appendChild(t),t.focus(),t.click(),this.Tg&&(t.oninput=t=>{if(!(t instanceof InputEvent))return;const i=t,s=i.data;null!==s&&'insertText'===i.inputType&&this.onkeydown(new KeyboardEvent('keydown',{key:s,code:s}))}),t.onkeydown=t=>{this.Tg&&'Enter'!==t.key&&'Backspace'!==t.key||this.onkeydown(new KeyboardEvent('keydown',{key:t.key,code:t.key}))},t.onkeyup=t=>{this.Tg&&'Enter'!==t.key&&'Backspace'!==t.key||this.onkeyup(new KeyboardEvent('keyup',{key:t.key,code:t.key}))},t.onfocus=t=>{this.input?.parentNode?.removeChild(this.input),this.input=null,this.onfocus(t)},this.input=t,void(this.jE=!1)}const e=t.timeStamp>=this.time+500,n=Math.abs(this.$E-this.ig)>16||Math.abs(this.JE-this.sg)>16;e&&!n?(this.jE=!0,this.onmousedown(new MouseEvent('mousedown',{buttons:2}))):(this.Lf=0,this.jE=!1)};ontouchmove=t=>{if(!this.ng||!this.jE)return;const i=t.changedTouches[0],s=0|i.clientX,h=0|i.clientY;this.onmousemove(new MouseEvent('mousemove',{clientX:s,clientY:h})),this.ig=0|i.screenX,this.sg=0|i.screenY,this.ZE&&-1===this.nl()?(this.QE-this.ig>0?this.rotate(2):this.QE-this.ig<0&&this.rotate(0),this.tg-this.sg>0?this.rotate(3):this.tg-this.sg<0&&this.rotate(1)):(this.qE||-1!==this.nl())&&this.onmousedown(new MouseEvent('mousedown',{buttons:1})),this.QE=this.ig,this.tg=this.sg};get ng(){return['Android','webOS','iPhone','iPad','iPod','BlackBerry','Windows Phone'].some((t=>navigator.userAgent.includes(t)))}get Tg(){return['Android'].some((t=>navigator.userAgent.includes(t)))}get cg(){return['Capacitor'].some((t=>navigator.userAgent.includes(t)))}gg=()=>this.Nc&&this.ea>=8&&this.ea<=520&&this.na>=11&&this.na<=345;fg=()=>this.Nc&&-1===this.el()&&!this.sl()&&!this.hl()&&this.ea>=11&&this.ea<=506&&this.na>=449&&this.na<=482;Cg=()=>this.Nc&&(this.sl()||this.hl())&&this.ea>=11&&this.ea<=506&&this.na>=383&&this.na<=482;_g=()=>this.Nc&&this.ea>=562&&this.ea<=752&&this.na>=231&&this.na<=492;ug=()=>!this.Nc&&2===this.il()&&this.ea>=301&&this.ea<=562&&this.na>=262&&this.na<=279;dg=()=>!this.Nc&&2===this.il()&&this.ea>=301&&this.ea<=562&&this.na>=279&&this.na<=296;rotate=t=>{0===t?(this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowRight',code:'ArrowRight'})),this.onkeydown(new KeyboardEvent('keydown',{key:'ArrowLeft',code:'ArrowLeft'}))):1===t?(this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowDown',code:'ArrowDown'})),this.onkeydown(new KeyboardEvent('keydown',{key:'ArrowUp',code:'ArrowUp'}))):2===t?(this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowLeft',code:'ArrowLeft'})),this.onkeydown(new KeyboardEvent('keydown',{key:'ArrowRight',code:'ArrowRight'}))):3===t&&(this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowUp',code:'ArrowUp'})),this.onkeydown(new KeyboardEvent('keydown',{key:'ArrowDown',code:'ArrowDown'})))};Og=()=>null!==document.fullscreenElement;ag=t=>{if(this.Og()){const i=t.target.getBoundingClientRect(),s=window.innerHeight/a.hg.height,h=(window.innerWidth-a.hg.width*s)/2;this.ea=0|this.vg(t.clientX-i.left-h,0,a.hg.width*s,0,789),this.na=0|this.vg(t.clientY-i.top,0,a.hg.height*s,0,532)}else{const i=a.hg.getBoundingClientRect(),s=a.hg.width/i.width,h=a.hg.height/i.height;this.ea=(t.clientX-i.left)*s|0,this.na=(t.clientY-i.top)*h|0}this.ea<0&&(this.ea=0),this.na<0&&(this.na=0),this.ea>789&&(this.ea=789),this.na>532&&(this.na=532)};vg=(t,i,s,h,e)=>(t-i)*(e-h)/(s-i)+h}},2595:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1069);class e{static enabled=!1;static bg=null;static Lg=null;static Rg=0;static Sg=0;static Mg=0;static kg=0;static xg=0;static rp=()=>{this.bg=h.A.ni(1),this.Lg=null,this.Rg=performance.now(),this.enabled=!0};static df=()=>{this.enabled=!1,this.bg=null};static flush=()=>{let t=null;return this.Lg&&this.enabled&&(t=this.Lg),this.Lg=null,t};static stop=()=>{let t=null;return this.bg&&this.bg.ft>0&&this.enabled&&(t=this.bg),this.df(),t};static wg=(t,i,s)=>{if(!(this.enabled&&t>=0&&t<789&&i>=0&&i<532))return;this.Sg++;const h=performance.now();let e=(h-this.Rg)/10|0;e>250&&(e=250),this.Rg=h,this.Dg(5),1===s?this.bg?.p1(1):this.bg?.p1(2),this.bg?.p1(e),this.bg?.p3(t+(i<<10))};static yg=t=>{if(!this.enabled)return;this.Sg++;const i=performance.now();let s=(i-this.Rg)/10|0;s>250&&(s=250),this.Rg=i,this.Dg(2),1===t?this.bg?.p1(3):this.bg?.p1(4),this.bg?.p1(s)};static mg=(t,i)=>{if(!(this.enabled&&t>=0&&t<789&&i>=0&&i<532))return;const s=performance.now();if(s-this.Mg>=50){this.Mg=s,this.Sg++;let h=(s-this.Rg)/10|0;h>250&&(h=250),this.Rg=s,t-this.kg<8&&t-this.kg>=-8&&i-this.xg<8&&i-this.xg>=-8?(this.Dg(3),this.bg?.p1(5),this.bg?.p1(h),this.bg?.p1(t+(i-this.xg+8<<4)+8-this.kg)):t-this.kg<128&&t-this.kg>=-128&&i-this.xg<128&&i-this.xg>=-128?(this.Dg(4),this.bg?.p1(6),this.bg?.p1(h),this.bg?.p1(t+128-this.kg),this.bg?.p1(i+128-this.xg)):(this.Dg(5),this.bg?.p1(7),this.bg?.p1(h),this.bg?.p3(t+(i<<10))),this.kg=t,this.xg=i}};static og=t=>{if(!this.enabled)return;this.Sg++;const i=performance.now();let s=(i-this.Rg)/10|0;s>250&&(s=250),this.Rg=i,1e3===t?t=11:1001===t?t=12:1002===t?t=14:1003===t?t=15:t>=1008&&(t-=992),this.Dg(3),this.bg?.p1(8),this.bg?.p1(s),this.bg?.p1(t)};static lg=t=>{if(!this.enabled)return;this.Sg++;const i=performance.now();let s=(i-this.Rg)/10|0;s>250&&(s=250),this.Rg=i,1e3===t?t=11:1001===t?t=12:1002===t?t=14:1003===t?t=15:t>=1008&&(t-=992),this.Dg(3),this.bg?.p1(9),this.bg?.p1(s),this.bg?.p1(t)};static Ig=()=>{if(!this.enabled)return;this.Sg++;const t=performance.now();let i=(t-this.Rg)/10|0;i>250&&(i=250),this.Rg=t,this.Dg(2),this.bg?.p1(10),this.bg?.p1(i)};static Eg=()=>{if(!this.enabled)return;this.Sg++;const t=performance.now();let i=(t-this.Rg)/10|0;i>250&&(i=250),this.Rg=t,this.Dg(2),this.bg?.p1(11),this.bg?.p1(i)};static Ag=()=>{if(!this.enabled)return;this.Sg++;const t=performance.now();let i=(t-this.Rg)/10|0;i>250&&(i=250),this.Rg=t,this.Dg(2),this.bg?.p1(12),this.bg?.p1(i)};static pg=()=>{if(!this.enabled)return;this.Sg++;const t=performance.now();let i=(t-this.Rg)/10|0;i>250&&(i=250),this.Rg=t,this.Dg(2),this.bg?.p1(13),this.bg?.p1(i)};static Dg=t=>{if(this.bg&&this.bg.ft+t>=500){const t=this.bg;this.bg=h.A.ni(1),this.Lg=t}}}},1120:(t,i,s)=>{s.d(i,{A:()=>c});var h=s(1069),e=s(8665),n=s(2031),r=s(1122),o=s(3819),l=s(3867),a=s(8950);class c{static Jo=[];static Ng=null;static Qo=null;static jl=0;static Pg=1;static ql=2;static da=3;static ya=4;static va=5;static Ra=6;static Fa=7;static Rm=1;static km=2;static xm=3;static Dm=4;static Nm=5;static Ea=6;static Ga=1;static Ha=100;static Wa=101;static Ya=200;static Ey=201;static gy=202;static Va=203;static _y=205;static Oy=300;static Fg=301;static Ug=302;static Bg=303;static Gg=304;static Hg=305;static Wg=306;static Yg=307;static Vg=308;static Kg=309;static Xg=310;static zg=311;static jg=312;static vy=313;static by=314;static Zg=315;static qg=316;static $g=317;static Jg=318;static Qg=319;static t_=320;static i_=321;static s_=322;static Ly=323;static nc=324;static rc=325;static Ry=326;static qa=327;static Ka=401;static Xa=500;static Cy=501;static Ty=502;static Za=503;static oc=600;static My=601;static h_=602;static e_=603;static n_=604;static r_=605;static o_=606;static l_=607;static a_=608;static c_=609;static f_=610;static u_=611;static ky=612;static lc=613;static ac=650;static uc=651;static dc=652;static wc=653;static yc=654;static cc=655;static Sc=(t,i,s)=>{this.Ng=new n.A(5e4),this.Qo=new n.A(5e4);const e=new h.A(t.read('data'));let r=-1;for(e.ft+=2;e.ft0){h._l=new Uint8Array(n),h.Tl=new Uint16Array(n);for(let t=0;t0){h.scripts=new l.Ns(o,null);for(let t=0;t0){const e=s.lastIndexOf(',');h.ua[t]=this.d_(i,s.substring(0,e),parseInt(s.substring(e+1),10))}}h.Lm=new l.Ns(5,null);for(let t=0;t<5;t++){const i=e.NA;h.Lm[t]=i,0===i.length&&(h.Lm[t]=null)}}if(h.type===c.da&&(h.fill=1===e.CA),h.type===c.ya||h.type===c.Pg){h._a=1===e.CA;const t=e.CA;s&&(h.font=s[t]),h.Ta=1===e.CA}if(h.type===c.ya&&(h.text=e.NA,h.ma=e.NA),h.type!==c.Pg&&h.type!==c.da&&h.type!==c.ya||(h.wa=e.ut),h.type!==c.da&&h.type!==c.ya||(h.pa=e.ut,h.Aa=e.ut),h.type===c.va){const t=e.NA;if(t.length>0){const s=t.lastIndexOf(',');h.La=this.d_(i,t.substring(0,s),parseInt(t.substring(s+1),10))}const s=e.NA;if(s.length>0){const t=s.lastIndexOf(',');h.ba=this.d_(i,s.substring(0,t),parseInt(s.substring(t+1),10))}}if(h.type===c.Ra){const t=e.CA;0!==t&&(h.model=this.xa((t-1<<8)+e.CA));const i=e.CA;0!==i&&(h.w_=this.xa((i-1<<8)+e.CA)),h.Dl=e.CA,0===h.Dl?h.Dl=-1:h.Dl=(h.Dl-1<<8)+e.CA,h.Nl=e.CA,0===h.Nl?h.Nl=-1:h.Nl=(h.Nl-1<<8)+e.CA,h.zoom=e.ct,h.ka=e.ct,h.Pa=e.ct}if(h.type===c.Fa){h.Ql=new Int32Array(h.width*h.height),h.ta=new Int32Array(h.width*h.height),h._a=1===e.CA;const t=e.CA;s&&(h.font=s[t]),h.Ta=1===e.CA,h.wa=e.ut,h.ia=e.Cp,h.sa=e.Cp,h.Om=1===e.CA,h.Lm=new l.Ns(5,null);for(let t=0;t<5;t++){const i=e.NA;h.Lm[t]=i,0===i.length&&(h.Lm[t]=null)}}h.Ia!==c.km&&h.type!==c.ql||(h.Kw=e.NA,h.action=e.NA,h.Vw=e.ct),h.Ia!==c.Rm&&h.Ia!==c.Dm&&h.Ia!==c.Nm&&h.Ia!==c.Ea||(h.Mm=e.NA,0===h.Mm.length&&(h.Ia===c.Rm?h.Mm='Ok':h.Ia===c.Dm||h.Ia===c.Nm?h.Mm='Select':h.Ia===c.Ea&&(h.Mm='Continue')))}this.Ng=null,this.Qo=null};static d_=(t,i,s)=>{const h=o.A.y_(i)<<8n|BigInt(s);if(this.Ng){const t=this.Ng.get(h);if(t)return t}let e;try{e=r.A.Ic(t,i,s),this.Ng?.put(h,e)}catch(t){return null}return e};static xa=t=>{if(this.Qo){const i=this.Qo.get(BigInt(t));if(i)return i}const i=e.A.model(t);return this.Qo?.put(BigInt(t),i),i};id=-1;nw=-1;type=-1;Ia=-1;Xl=0;width=0;height=0;Tm=-1;_l=null;Tl=null;scripts=null;scroll=0;hide=!1;draggable=!1;Om=!1;bm=!1;ia=0;sa=0;$l=null;Jl=null;ua=null;Lm=null;fill=!1;_a=!1;font=null;Ta=!1;text=null;ma=null;wa=0;pa=0;Aa=0;La=null;ba=null;model=null;w_=null;Dl=-1;Nl=-1;zoom=0;ka=0;Pa=0;Kw=null;action=null;Vw=-1;Mm=null;xl=null;Wl=null;Yl=null;x=0;y=0;Zl=0;Ql=null;ta=null;Fl=0;Pl=0;xa(t,i,s){let h=this.model;if(s&&(h=this.w_),!h)return null;if(-1===t&&-1===i&&!h.A_)return h;const n=e.A.p_(h,!0,!0,!1);return-1===t&&-1===i||n.sc(),-1!==t&&n.hc(t),-1!==i&&n.hc(i),n.ec(64,768,-50,-10,-50,!0),n}m_(){if(this.nw===this.id)return this.x;let t=c.Jo[this.nw];if(!t.xl||!t.Wl||!t.Yl)return this.x;let i=t.xl.indexOf(this.id);if(-1===i)return this.x;let s=t.Wl[i];for(;t.nw!==t.id;){const h=c.Jo[t.nw];h.xl&&h.Wl&&h.Yl&&(i=h.xl.indexOf(t.id),-1!==i&&(s+=h.Wl[i])),t=h}return s}I_(){if(this.nw===this.id)return this.y;let t=c.Jo[this.nw];if(!t.xl||!t.Wl||!t.Yl)return this.y;let i=t.xl.indexOf(this.id);if(-1===i)return this.y;let s=t.Yl[i];for(;t.nw!==t.id;){const h=c.Jo[t.nw];h.xl&&h.Wl&&h.Yl&&(i=h.xl.indexOf(t.id),-1!==i&&(s+=h.Yl[i])),t=h}return s}outline(t){const i=this.m_(),s=this.I_();a.A.Vl(i,s,this.width,this.height,t)}move(t,i){if(this.nw===this.id)return;this.x=0,this.y=0;const s=c.Jo[this.nw];if(s.xl&&s.Wl&&s.Yl){const h=s.xl.indexOf(this.id);-1!==h&&(s.Wl[h]=t,s.Yl[h]=i)}}delete(){if(this.nw===this.id)return;const t=c.Jo[this.nw];if(t.xl&&t.Wl&&t.Yl){const i=t.xl.indexOf(this.id);-1!==i&&(t.xl.splice(i,1),t.Wl.splice(i,1),t.Yl.splice(i,1))}}}},6333:(t,i,s)=>{s.d(i,{$:()=>h});class h{id;E_=null;constructor(t){this.id=t}g_(t){for(;;){const i=t.CA;if(0===i)break;this.decode(i,t)}return this}}},2164:(t,i,s)=>{s.d(i,{A:()=>n});var h=s(1069),e=s(6333);class n extends e.${static count=0;static Jo=[];static Sc=t=>{const i=new h.A(t.read('flo.dat'));this.count=i.ct;for(let t=0;t(s>179&&(i=i/2|0),s>192&&(i=i/2|0),s>217&&(i=i/2|0),s>243&&(i=i/2|0),(t/4<<10)+(i/32<<7)+(s/2|0));static C_=(t,i)=>-1===t?12345678:((i=i*(127&t)/128|0)<2?i=2:i>126&&(i=126),(65408&t)+i);static T_=(t,i)=>-2===t?12345678:-1===t?(i<0?i=0:i>127&&(i=127),127-i):((i=i*(127&t)/128|0)<2?i=2:i>126&&(i=126),(65408&t)+i);O_=0;texture=-1;v_=!1;b_=!0;L_=0;R_=0;S_=0;M_=0;k_=0;x_=0;decode(t,i){1===t?(this.O_=i.lt,this.setColor(this.O_)):2===t?this.texture=i.CA:3===t?this.v_=!0:5===t?this.b_=!1:6===t?this.E_=i.NA:console.log('Error unrecognised config code: ',t)}setColor(t){const i=(t>>16&255)/256,s=(t>>8&255)/256,h=(255&t)/256;let e=i;si&&(r=s),h>r&&(r=h);let o=0,l=0;const a=(e+r)/2;e!==r&&(a<.5&&(l=(r-e)/(r+e)),a>=.5&&(l=(r-e)/(2-r-e)),i===r?o=(s-h)/(r-e):s===r?o=(h-i)/(r-e)+2:h===r&&(o=(i-s)/(r-e)+4)),o/=6,this.L_=256*o|0,this.R_=256*l|0,this.S_=256*a|0,this.R_<0?this.R_=0:this.R_>255&&(this.R_=255),this.S_<0?this.S_=0:this.S_>255&&(this.S_=255),this.M_=a>.5?(1-a)*l*512|0:a*l*512|0,this.M_<1&&(this.M_=1),this.k_=o*this.M_|0;let c=this.L_+(16*Math.random()|0)-8;c<0?c=0:c>255&&(c=255);let f=this.R_+(48*Math.random()|0)-24;f<0?f=0:f>255&&(f=255);let u=this.S_+(48*Math.random()|0)-24;u<0?u=0:u>255&&(u=255),this.x_=n.__(c,f,u)}}},8317:(t,i,s)=>{s.d(i,{A:()=>o});var h=s(1069),e=s(6333),n=s(8665),r=s(3867);class o extends e.${static count=0;static Jo=[];static Sc=t=>{const i=new h.A(t.read('idk.dat'));this.count=i.ct;for(let t=0;t=40&&t<50)this.P_[t-40]=i.ct;else if(t>=50&&t<60)this.F_[t-50]=i.ct;else{if(!(t>=60&&t<70))throw new Error(`Unrecognized idk config code: ${t}`);this.N_[t-60]=i.ct}}xa(){if(!this.D_)return null;const t=new r.Ns(this.D_.length,null);for(let i=0;i{s.d(i,{A:()=>c});var h=s(6333),e=s(1069),n=s(2031),r=s(8665),o=s(1023),l=s(6169),a=s(3867);class c extends h.${static count=0;static cache=null;static U_=null;static B_=null;static G_=0;static Tu=new n.A(500);static Ou=new n.A(30);static Sc=t=>{this.U_=new e.A(t.read('loc.dat'));const i=new e.A(t.read('loc.idx'));this.count=i.ct,this.B_=new Int32Array(this.count);let s=2;for(let t=0;t{if(!this.cache||!this.B_||!this.U_)throw new Error('LocType not loaded!!!');for(let i=0;i<10;i++){const s=this.cache[i];if(s&&s.id===t)return s}this.G_=(this.G_+1)%10;const i=this.cache[this.G_];return this.U_.ft=this.B_[t],i.id=t,i.reset(),i.g_(this.U_),i.H_||(i.H_=new Int32Array(1)),-1===i.W_&&i.H_&&(i.active=i.H_.length>0&&i.H_[0]===o.A.Ny.id,i.Um&&(i.active=!0)),i};static Zo=()=>{this.Tu=null,this.Ou=null,this.B_=null,this.cache=null,this.U_=null};D_=null;H_=null;name=null;bw=null;P_=null;F_=null;width=1;length=1;cA=!0;fA=!0;active=!1;W_=-1;Y_=!1;V_=!1;b_=!1;Dl=-1;K_=!1;X_=16;z_=0;j_=0;Um=null;Gd=-1;zd=-1;Z_=!1;q_=!0;J_=128;Q_=128;tC=128;Uy=0;iC=0;sC=0;hC=0;eC=!1;decode(t,i){if(1===t){const t=i.CA;this.D_=new Int32Array(t),this.H_=new Int32Array(t);for(let s=0;s=30&&t<39)this.Um||(this.Um=new a.Ns(5,null)),this.Um[t-30]=i.NA,'hidden'===this.Um[t-30]?.toLowerCase()&&(this.Um[t-30]=null);else if(40===t){const t=i.CA;this.P_=new Uint16Array(t),this.F_=new Uint16Array(t);for(let s=0;s=this.D_.length)return null;let d=this.D_[a];if(-1===d)return null;const w=this.Z_!==i>3;w&&(d+=65536);let y=c.Tu?.get(BigInt(d));y||(y=r.A.model(65535&d),w&&y.fC(),c.Tu?.put(BigInt(d),y));const A=128!==this.J_||128!==this.Q_||128!==this.tC,p=0!==this.iC||0!==this.sC||0!==this.hC;let m=r.A.p_(y,!this.P_,!this.K_,i===l.A.qd&&-1===o&&!A&&!p);for(-1!==o&&(m.sc(),m.hc(o),m.uC=null,m.dC=null);i-- >0;)m.wC();if(this.P_&&this.F_)for(let t=0;t{s.d(i,{A:()=>l});var h=s(6333),e=s(1069),n=s(2031),r=s(8665),o=s(3867);class l extends h.${static count=0;static cache=null;static U_=null;static B_=null;static G_=0;static Qo=new n.A(30);static Sc=t=>{this.U_=new e.A(t.read('npc.dat'));const i=new e.A(t.read('npc.idx'));this.count=i.ct,this.B_=new Int32Array(this.count);let s=2;for(let t=0;t{if(!this.cache||!this.B_||!this.U_)throw new Error('NpcType not loaded!!!');for(let i=0;i<20;i++){const s=this.cache[i];if(s&&s.id===t)return s}this.G_=(this.G_+1)%20;const i=this.cache[this.G_]=new l(t);return this.U_.ft=this.B_[t],i.g_(this.U_),i};static Zo=()=>{this.Qo=null,this.B_=null,this.cache=null,this.U_=null};name=null;bw=null;size=1;D_=null;N_=null;K_=!1;BI=-1;MI=-1;xI=-1;NI=-1;UI=-1;P_=null;F_=null;Um=null;J_=-1;Q_=-1;tC=-1;kd=!0;Ym=-1;pC=128;mC=128;decode(t,i){if(1===t){const t=i.CA;this.D_=new Uint16Array(t);for(let s=0;s=30&&t<40)this.Um||(this.Um=new o.Ns(5,null)),this.Um[t-30]=i.NA,'hidden'===this.Um[t-30]?.toLowerCase()&&(this.Um[t-30]=null);else if(40===t){const t=i.CA;this.P_=new Uint16Array(t),this.F_=new Uint16Array(t);for(let s=0;s{s.d(i,{A:()=>u});var h=s(6333),e=s(1069),n=s(1122),r=s(2031),o=s(8665),l=s(4583),a=s(8950),c=s(9298),f=s(3867);class u extends h.${static count=0;static cache=null;static U_=null;static B_=null;static G_=0;static TC=!0;static Qo=new r.A(50);static vu=new r.A(200);static Sc=(t,i)=>{this.TC=i,this.U_=new e.A(t.read('obj.dat'));const s=new e.A(t.read('obj.idx'));this.count=s.ct,this.B_=new Int32Array(this.count);let h=2;for(let t=0;t{if(!this.cache||!this.B_||!this.U_)throw new Error('ObjType not loaded!!!');for(let i=0;i<10;i++){const s=this.cache[i];if(s&&s.id===t)return s}this.G_=(this.G_+1)%10;const i=this.cache[this.G_];return this.U_.ft=this.B_[t],i.id=t,i.reset(),i.g_(this.U_),-1!==i.OC&&i.vC(),!this.TC&&i.members&&(i.name='Members Object',i.bw="Login to a members' server to use this object.",i.Um=null,i.vm=null),i};static Zo=()=>{this.Qo=null,this.vu=null,this.B_=null,this.cache=null,this.U_=null};static ha=(t,i)=>{if(u.vu){let s=u.vu.get(BigInt(t));if(s&&s.Nd!==i&&-1!==s.Nd&&(s.SA(),s=null),s)return s}let s=u.get(t);if(s.bC||(i=-1),s.bC&&s.LC&&i>1){let t=-1;for(let h=0;h<10;h++)i>=s.LC[h]&&0!==s.LC[h]&&(t=s.bC[h]);-1!==t&&(s=u.get(t))}const h=new n.A(32,32),e=l.A.Sa,r=l.A.Ma,o=l.A.xc,f=a.A.Mc,d=a.A.RC,w=a.A.SC,y=a.A.left,A=a.A.right,p=a.A.top,m=a.A.bottom;l.A.MC=!1,a.A.bind(h.Mc,32,32),a.A.fillRect(0,0,32,32,c.A.ca),l.A.eg();const I=s.sA(1),E=l.A.sin[s.Bp]*s.Hp>>16,g=l.A.cos[s.Bp]*s.Hp>>16;I.Na(0,s.Gp,s.kC,s.Bp,s.xC,E+(I.AC/2|0)+s.DC,g+s.DC);for(let t=31;t>=0;t--)for(let i=31;i>=0;i--)0===h.Mc[t+32*i]&&(t>0&&h.Mc[t+32*i-1]>1||i>0&&h.Mc[t+32*(i-1)]>1||t<31&&h.Mc[t+32*i+1]>1||i<31&&h.Mc[t+32*(i+1)]>1)&&(h.Mc[t+32*i]=1);for(let t=31;t>=0;t--)for(let i=31;i>=0;i--)0===h.Mc[t+32*i]&&t>0&&i>0&&h.Mc[t+32*(i-1)-1]>0&&(h.Mc[t+32*i]=3153952);if(-1!==s.OC){const t=this.ha(s.NC,10),i=t.oa,h=t.Nd;t.oa=32,t.Nd=32,t.PC(5,5,22,22),t.oa=i,t.Nd=h}return u.vu?.put(BigInt(t),h),a.A.bind(f,d,w),a.A.Hl(y,p,A,m),l.A.Sa=e,l.A.Ma=r,l.A.xc=o,l.A.MC=!0,s.Ua?h.oa=33:h.oa=32,h.Nd=i,h};model=0;name=null;bw=null;P_=null;F_=null;Hp=2e3;Bp=0;Gp=0;kC=0;xC=0;DC=0;FC=!1;UC=-1;Ua=!1;tA=1;members=!1;Um=null;vm=null;BC=-1;GC=-1;HC=0;WC=-1;YC=-1;VC=0;KC=-1;XC=-1;zC=-1;jC=-1;ZC=-1;qC=-1;bC=null;LC=null;NC=-1;OC=-1;decode(t,i){if(1===t)this.model=i.ct;else if(2===t)this.name=i.NA;else if(3===t)this.bw=i.NA;else if(4===t)this.Hp=i.ct;else if(5===t)this.Bp=i.ct;else if(6===t)this.Gp=i.ct;else if(7===t)this.xC=i.Cp,this.xC>32767&&(this.xC-=65536);else if(8===t)this.DC=i.Cp,this.DC>32767&&(this.DC-=65536);else if(9===t)this.FC=!0;else if(10===t)this.UC=i.ct;else if(11===t)this.Ua=!0;else if(12===t)this.tA=i.ut;else if(16===t)this.members=!0;else if(23===t)this.BC=i.ct,this.HC=i.gA;else if(24===t)this.GC=i.ct;else if(25===t)this.WC=i.ct,this.VC=i.gA;else if(26===t)this.YC=i.ct;else if(t>=30&&t<35)this.Um||(this.Um=new f.Ns(5,null)),this.Um[t-30]=i.NA,'hidden'===this.Um[t-30]?.toLowerCase()&&(this.Um[t-30]=null);else if(t>=35&&t<40)this.vm||(this.vm=new f.Ns(5,null)),this.vm[t-35]=i.NA;else if(40===t){const t=i.CA;this.P_=new Uint16Array(t),this.F_=new Uint16Array(t);for(let s=0;s=100&&t<110&&(this.bC&&this.LC||(this.bC=new Uint16Array(10),this.LC=new Uint16Array(10)),this.bC[t-100]=i.ct,this.LC[t-100]=i.ct)}$C(t){let i=this.BC;if(1===t&&(i=this.WC),-1===i)return null;let s=this.GC,h=this.KC;1===t&&(s=this.YC,h=this.XC);let e=o.A.model(i);if(-1!==s){const t=o.A.model(s);if(-1===h){const i=[e,t];e=o.A.$a(i,2)}else{const i=[e,t,o.A.model(h)];e=o.A.$a(i,3)}}if(0===t&&0!==this.HC&&e.translate(this.HC,0,0),1===t&&0!==this.VC&&e.translate(this.VC,0,0),this.P_&&this.F_)for(let t=0;t1){let i=-1;for(let s=0;s<10;s++)t>=this.LC[s]&&0!==this.LC[s]&&(i=this.bC[s]);if(-1!==i)return u.get(i).sA(1)}if(u.Qo){const t=u.Qo.get(BigInt(this.id));if(t)return t}const i=o.A.model(this.model);if(this.P_&&this.F_)for(let t=0;t{s.d(i,{A:()=>r});var h=s(6333),e=s(1069),n=s(6730);class r extends h.${static count=0;static Jo=[];static Sc=t=>{const i=new e.A(t.read('seq.dat'));this.count=i.ct;for(let t=0;t{s.d(i,{A:()=>l});var h=s(6333),e=s(1069),n=s(1312),r=s(8665),o=s(2031);class l extends h.${static count=0;static Jo=[];static Qo=new o.A(30);static Sc=t=>{const i=new e.A(t.read('spotanim.dat'));this.count=i.ct;for(let t=0;t=40&&t<50)this.P_[t-40]=i.ct;else{if(!(t>=50&&t<60))throw new Error(`Unrecognized spotanim config code: ${t}`);this.F_[t-50]=i.ct}}xa(){let t=l.Qo?.get(BigInt(this.id));if(t)return t;t=r.A.model(this.model);for(let i=0;i<6;i++)0!==this.P_[0]&&t.Ja(this.P_[i],this.F_[i]);return l.Qo?.put(BigInt(this.id),t),t}}},3764:(t,i,s)=>{s.d(i,{A:()=>n});var h=s(6333),e=s(1069);class n extends h.${static count=0;static Jo=[];static tT=[];static iT=0;static Sc=t=>{const i=new e.A(t.read('varp.dat'));this.count=i.ct;for(let t=0;t{s.d(i,{A:()=>h});class h{static OPEN=0;static rT=1;static oT=2;static lT=4;static aT=8;static cT=h.rT<<4;static fT=h.oT<<4;static uT=h.lT<<4;static dT=h.aT<<4;static wT=256;static yT=512;static AT=1024;static pT=2048;static mT=4096;static IT=h.yT<<4;static ET=h.AT<<4;static gT=h.pT<<4;static _T=h.mT<<4;static CT=h.wT<<9;static TT=524288;static OT=2097152;static vT=h.OT|h.TT;static bT=h.wT|h.vT;static Yd=h.oT|h.bT;static Hd=h.aT|h.bT;static Zm=h.oT|h.lT|h.Hd;static Vd=h.fT|h.bT;static $m=h.aT|h.cT|h.Vd;static Wd=h.dT|h.bT;static qm=h.rT|h.oT|h.Wd;static Jm=h.fT|h.uT|h.Wd;static LT=16777215}},670:(t,i,s)=>{s.d(i,{A:()=>o});var h=s(9456),e=s(6169),n=s(1023),r=s(4909);class o{static tr=4;static yr=104;static index=(t,i)=>t*o.yr+i;offsetX;RT;sizeX;sizeZ;flags;constructor(){this.offsetX=0,this.RT=0,this.sizeX=o.yr,this.sizeZ=o.yr,this.flags=new Int32Array(this.sizeX*this.sizeZ),this.reset()}reset=()=>{for(let t=0;t{this.flags[o.index(t-this.offsetX,i-this.RT)]|=h.A.OT};yA=(t,i)=>{this.flags[o.index(t-this.offsetX,i-this.RT)]&=~h.A.OT};eA=(t,i,s,n,r,o)=>{let l=h.A.wT;o&&(l|=h.A.CT);const a=t-this.offsetX,c=i-this.RT;if(r===e.A.$d||r===e.A.Qd){const t=s;s=n,n=t}for(let t=a;t=0&&t=0&&i{let l=h.A.wT;o&&(l|=h.A.CT);const a=t-this.offsetX,c=i-this.RT;if(r===e.A.$d||r===e.A.Qd){const t=s;s=n,n=t}for(let t=a;t=0&&t=0&&i{const l=t-this.offsetX,a=i-this.RT,c=o?h.A._T:h.A.dT,f=o?h.A.mT:h.A.aT,u=o?h.A.AT:h.A.oT,d=o?h.A.ET:h.A.fT,w=o?h.A.yT:h.A.rT,y=o?h.A.IT:h.A.cT,A=o?h.A.pT:h.A.lT,p=o?h.A.gT:h.A.uT;s===n.A.jd.id?r===e.A.qd?(this.add(l,a,c),this.add(l-1,a,f)):r===e.A.$d?(this.add(l,a,u),this.add(l,a+1,d)):r===e.A.Jd?(this.add(l,a,f),this.add(l+1,a,c)):r===e.A.Qd&&(this.add(l,a,d),this.add(l,a-1,u)):s===n.A.kT.id||s===n.A.tw.id?r===e.A.qd?(this.add(l,a,w),this.add(l-1,a+1,y)):r===e.A.$d?(this.add(l,a,A),this.add(l+1,a+1,p)):r===e.A.Jd?(this.add(l,a,y),this.add(l+1,a-1,w)):r===e.A.Qd&&(this.add(l,a,p),this.add(l-1,a-1,A)):s===n.A.Zd.id&&(r===e.A.qd?(this.add(l,a,u|c),this.add(l-1,a,f),this.add(l,a+1,d)):r===e.A.$d?(this.add(l,a,u|f),this.add(l,a+1,d),this.add(l+1,a,c)):r===e.A.Jd?(this.add(l,a,d|f),this.add(l+1,a,c),this.add(l,a-1,u)):r===e.A.Qd&&(this.add(l,a,d|c),this.add(l,a-1,u),this.add(l-1,a,f))),o&&this.MT(t,i,s,r,!1)};aA=(t,i,s,r,o)=>{const l=t-this.offsetX,a=i-this.RT,c=o?h.A._T:h.A.dT,f=o?h.A.mT:h.A.aT,u=o?h.A.AT:h.A.oT,d=o?h.A.ET:h.A.fT,w=o?h.A.yT:h.A.rT,y=o?h.A.IT:h.A.cT,A=o?h.A.pT:h.A.lT,p=o?h.A.gT:h.A.uT;s===n.A.jd.id?r===e.A.qd?(this.remove(l,a,c),this.remove(l-1,a,f)):r===e.A.$d?(this.remove(l,a,u),this.remove(l,a+1,d)):r===e.A.Jd?(this.remove(l,a,f),this.remove(l+1,a,c)):r===e.A.Qd&&(this.remove(l,a,d),this.remove(l,a-1,u)):s===n.A.kT.id||s===n.A.tw.id?r===e.A.qd?(this.remove(l,a,w),this.remove(l-1,a+1,y)):r===e.A.$d?(this.remove(l,a,A),this.remove(l+1,a+1,p)):r===e.A.Jd?(this.remove(l,a,y),this.remove(l+1,a-1,w)):r===e.A.Qd&&(this.remove(l,a,p),this.remove(l-1,a-1,A)):s===n.A.Zd.id&&(r===e.A.qd?(this.remove(l,a,u|c),this.remove(l-1,a,f),this.remove(l,a+1,d)):r===e.A.$d?(this.remove(l,a,u|f),this.remove(l,a+1,d),this.remove(l+1,a,c)):r===e.A.Jd?(this.remove(l,a,d|f),this.remove(l+1,a,c),this.remove(l,a-1,u)):r===e.A.Qd&&(this.remove(l,a,d|c),this.remove(l,a-1,u),this.remove(l-1,a,f))),o&&this.aA(t,i,s,r,!1)};Xm=(t,i,s,r,l,a)=>{if(t===s&&i===r)return!0;const c=t-this.offsetX,f=i-this.RT,u=s-this.offsetX,d=r-this.RT,w=o.index(c,f);if(l===n.A.jd.id){if(a===e.A.qd){if(c===u-1&&f===d)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.Vd)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.Yd)===h.A.OPEN)return!0}else if(a===e.A.$d){if(c===u&&f===d+1)return!0;if(c===u-1&&f===d&&(this.flags[w]&h.A.Hd)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.Wd)===h.A.OPEN)return!0}else if(a===e.A.Jd){if(c===u+1&&f===d)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.Vd)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.Yd)===h.A.OPEN)return!0}else if(a===e.A.Qd){if(c===u&&f===d-1)return!0;if(c===u-1&&f===d&&(this.flags[w]&h.A.Hd)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.Wd)===h.A.OPEN)return!0}}else if(l===n.A.Zd.id){if(a===e.A.qd){if(c===u-1&&f===d)return!0;if(c===u&&f===d+1)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.Wd)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.Yd)===h.A.OPEN)return!0}else if(a===e.A.$d){if(c===u-1&&f===d&&(this.flags[w]&h.A.Hd)===h.A.OPEN)return!0;if(c===u&&f===d+1)return!0;if(c===u+1&&f===d)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.Yd)===h.A.OPEN)return!0}else if(a===e.A.Jd){if(c===u-1&&f===d&&(this.flags[w]&h.A.Hd)===h.A.OPEN)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.Vd)===h.A.OPEN)return!0;if(c===u+1&&f===d)return!0;if(c===u&&f===d-1)return!0}else if(a===e.A.Qd){if(c===u-1&&f===d)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.Vd)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.Wd)===h.A.OPEN)return!0;if(c===u&&f===d-1)return!0}}else if(l===n.A.sw.id){if(c===u&&f===d+1&&(this.flags[w]&h.A.fT)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.oT)===h.A.OPEN)return!0;if(c===u-1&&f===d&&(this.flags[w]&h.A.aT)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.dT)===h.A.OPEN)return!0}return!1};zm=(t,i,s,r,l,a)=>{if(t===s&&i===r)return!0;const c=t-this.offsetX,f=i-this.RT,u=s-this.offsetX,d=r-this.RT,w=o.index(c,f);if(l===n.A.xT.id||l===n.A.DT.id){if(l===n.A.DT.id&&(a=a+2&3),a===e.A.qd){if(c===u+1&&f===d&&(this.flags[w]&h.A.dT)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.oT)===h.A.OPEN)return!0}else if(a===e.A.$d){if(c===u-1&&f===d&&(this.flags[w]&h.A.aT)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.oT)===h.A.OPEN)return!0}else if(a===e.A.Jd){if(c===u-1&&f===d&&(this.flags[w]&h.A.aT)===h.A.OPEN)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.fT)===h.A.OPEN)return!0}else if(a===e.A.Qd){if(c===u+1&&f===d&&(this.flags[w]&h.A.dT)===h.A.OPEN)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.fT)===h.A.OPEN)return!0}}else if(l===n.A.NT.id){if(c===u&&f===d+1&&(this.flags[w]&h.A.fT)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.oT)===h.A.OPEN)return!0;if(c===u-1&&f===d&&(this.flags[w]&h.A.aT)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.dT)===h.A.OPEN)return!0}return!1};jm=(t,i,s,e,n,l,a)=>{const c=s+n-1,f=e+l-1,u=o.index(t-this.offsetX,i-this.RT);return t>=s&&t<=c&&i>=e&&i<=f||(t===s-1&&i>=e&&i<=f&&(this.flags[u]&h.A.aT)===h.A.OPEN&&(a&r.A.qd)===h.A.OPEN||(t===c+1&&i>=e&&i<=f&&(this.flags[u]&h.A.dT)===h.A.OPEN&&(a&r.A.Jd)===h.A.OPEN||(i===e-1&&t>=s&&t<=c&&(this.flags[u]&h.A.oT)===h.A.OPEN&&(a&r.A.Qd)===h.A.OPEN||i===f+1&&t>=s&&t<=c&&(this.flags[u]&h.A.fT)===h.A.OPEN&&(a&r.A.$d)===h.A.OPEN)))};add=(t,i,s)=>{this.flags[o.index(t,i)]|=s};remove=(t,i,s)=>{this.flags[o.index(t,i)]&=h.A.LT-s}}},4909:(t,i,s)=>{s.d(i,{A:()=>h});class h{static $d=1;static Jd=2;static Qd=4;static qd=8}},6169:(t,i,s)=>{s.d(i,{A:()=>h});class h{static qd=0;static $d=1;static Jd=2;static Qd=3}},5599:(t,i,s)=>{s.d(i,{A:()=>h});class h{static nA=0;static rA=1;static lA=2;static Fy=3}},1023:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(5599);class e{static jd=new e(0,h.A.nA);static kT=new e(1,h.A.nA);static Zd=new e(2,h.A.nA);static tw=new e(3,h.A.nA);static dE=new e(4,h.A.rA);static Km=new e(5,h.A.rA);static xT=new e(6,h.A.rA);static DT=new e(7,h.A.rA);static NT=new e(8,h.A.rA);static sw=new e(9,h.A.lA);static Ny=new e(10,h.A.lA);static Py=new e(11,h.A.lA);static PT=new e(12,h.A.lA);static FT=new e(13,h.A.lA);static UT=new e(14,h.A.lA);static BT=new e(15,h.A.lA);static GT=new e(16,h.A.lA);static HT=new e(17,h.A.lA);static WT=new e(18,h.A.lA);static YT=new e(19,h.A.lA);static VT=new e(20,h.A.lA);static KT=new e(21,h.A.lA);static Fy=new e(22,h.A.Fy);static values(){return[this.jd,this.kT,this.HT,this.BT,this.Zd,this.UT,this.sw,this.tw,this.Fy,this.PT,this.Py,this.xT,this.VT,this.Ny,this.Km,this.FT,this.DT,this.dE,this.GT,this.NT,this.YT,this.KT,this.WT]}static of(t){const i=this.values();for(let s=0;s{s.d(i,{A:()=>A});var h=s(670),e=s(2164),n=s(1069),r=s(4583),o=s(198),l=s(5637),a=s(4197),c=s(1312),f=s(1023),u=s(6169),d=s(9298),w=s(5518),y=s(3867);class A{static XT=Int8Array.of(1,2,4,8);static zT=Uint8Array.of(16,32,64,128);static jT=Int8Array.of(1,0,-1,0);static ZT=Int8Array.of(0,-1,0,1);static qT=(17*Math.random()|0)-8;static $T=(33*Math.random()|0)-16;static vt=!0;static hm=0;static JT=!1;static QT=(t,i)=>{let s=this.tO(t+45365,i+91923,4)+(this.tO(t+10294,i+37821,2)-128>>1)+(this.tO(t,i,1)-128>>2)-128;return s=35+(.3*s|0),s<10?s=10:s>60&&(s=60),s};static tO=(t,i,s)=>{const h=t/s|0,e=t&s-1,n=i/s|0,r=i&s-1,o=this.iO(h,n),l=this.iO(h+1,n),a=this.iO(h,n+1),c=this.iO(h+1,n+1),f=this.sO(o,l,e,s),u=this.sO(a,c,e,s);return this.sO(f,u,r,s)};static sO=(t,i,s,h)=>{const e=65536-r.A.cos[1024*s/h|0]>>1;return(t*(65536-e)>>16)+(i*e>>16)};static iO=(t,i)=>((this.hO(t-1,i-1)+this.hO(t+1,i-1)+this.hO(t-1,i+1)+this.hO(t+1,i+1))/16|0)+((this.hO(t-1,i)+this.hO(t+1,i)+this.hO(t,i-1)+this.hO(t,i+1))/8|0)+(this.hO(t,i)/4|0);static hO=(t,i)=>{const s=t+57*i,h=BigInt(s<<13^s);return 255&Number((h*(h*h*15731n+789221n)+1376312589n&0x7fffffffn)>>19n)};static eA=(t,i,s,h,e,n,r,o,d,w,y)=>{const p=e[y][i][s],m=e[y][i+1][s],I=e[y][i+1][s+1],E=e[y][i][s+1],g=p+m+I+E>>2,_=l.A.get(o);let C=i+(s<<7)+(o<<14)+1073741824|0;_.active||(C+=-2147483648),C|=0;const T=(w<<6)+d<<24>>24;if(d===f.A.Fy.id)h?.eO(_.xa(f.A.Fy.id,w,p,m,I,E,-1),t,i,s,g,C,T),_.cA&&_.active&&r?.ST(i,s),-1!==_.Dl&&n.LE(new a.A(o,t,3,i,s,c.A.Jo[_.Dl],!0));else if(d===f.A.Ny.id||d===f.A.Py.id){const e=_.xa(f.A.Ny.id,w,p,m,I,E,-1);if(e){let n,r,o=0;d===f.A.Py.id&&(o+=256),w===u.A.$d||w===u.A.Qd?(n=_.length,r=_.width):(n=_.width,r=_.length),h?.eA(t,i,s,g,e,null,C,T,n,r,o)}_.cA&&r?.eA(i,s,_.width,_.length,w,_.fA),-1!==_.Dl&&n.LE(new a.A(o,t,2,i,s,c.A.Jo[_.Dl],!0))}else if(d>=f.A.PT.id)h?.eA(t,i,s,g,_.xa(d,w,p,m,I,E,-1),null,C,T,1,1,0),_.cA&&r?.eA(i,s,_.width,_.length,w,_.fA),-1!==_.Dl&&n.LE(new a.A(o,t,2,i,s,c.A.Jo[_.Dl],!0));else if(d===f.A.jd.id)h?.MT(t,i,s,g,A.XT[w],0,_.xa(f.A.jd.id,w,p,m,I,E,-1),null,C,T),_.cA&&r?.MT(i,s,d,w,_.fA),-1!==_.Dl&&n.LE(new a.A(o,t,0,i,s,c.A.Jo[_.Dl],!0));else if(d===f.A.kT.id)h?.MT(t,i,s,g,A.zT[w],0,_.xa(f.A.kT.id,w,p,m,I,E,-1),null,C,T),_.cA&&r?.MT(i,s,d,w,_.fA),-1!==_.Dl&&n.LE(new a.A(o,t,0,i,s,c.A.Jo[_.Dl],!0));else if(d===f.A.Zd.id){const e=w+1&3;h?.MT(t,i,s,g,A.XT[w],A.XT[e],_.xa(f.A.Zd.id,w+4,p,m,I,E,-1),_.xa(f.A.Zd.id,e,p,m,I,E,-1),C,T),_.cA&&r?.MT(i,s,d,w,_.fA),-1!==_.Dl&&n.LE(new a.A(o,t,0,i,s,c.A.Jo[_.Dl],!0))}else if(d===f.A.tw.id)h?.MT(t,i,s,g,A.zT[w],0,_.xa(f.A.tw.id,w,p,m,I,E,-1),null,C,T),_.cA&&r?.MT(i,s,d,w,_.fA),-1!==_.Dl&&n.LE(new a.A(o,t,0,i,s,c.A.Jo[_.Dl],!0));else if(d===f.A.sw.id)h?.eA(t,i,s,g,_.xa(d,w,p,m,I,E,-1),null,C,T,1,1,0),_.cA&&r?.eA(i,s,_.width,_.length,w,_.fA),-1!==_.Dl&&n.LE(new a.A(o,t,2,i,s,c.A.Jo[_.Dl],!0));else if(d===f.A.dE.id)h?.nO(t,i,s,g,0,0,C,_.xa(f.A.dE.id,u.A.qd,p,m,I,E,-1),T,512*w,A.XT[w]),-1!==_.Dl&&n.LE(new a.A(o,t,1,i,s,c.A.Jo[_.Dl],!0));else if(d===f.A.Km.id){let e=16;if(h){const n=h.Kd(t,i,s);n>0&&(e=l.A.get(n>>14&32767).X_)}h?.nO(t,i,s,g,A.jT[w]*e,A.ZT[w]*e,C,_.xa(f.A.dE.id,u.A.qd,p,m,I,E,-1),T,512*w,A.XT[w]),-1!==_.Dl&&n.LE(new a.A(o,t,1,i,s,c.A.Jo[_.Dl],!0))}else d===f.A.xT.id?(h?.nO(t,i,s,g,0,0,C,_.xa(f.A.dE.id,u.A.qd,p,m,I,E,-1),T,w,256),-1!==_.Dl&&n.LE(new a.A(o,t,1,i,s,c.A.Jo[_.Dl],!0))):d===f.A.DT.id?(h?.nO(t,i,s,g,0,0,C,_.xa(f.A.dE.id,u.A.qd,p,m,I,E,-1),T,w,512),-1!==_.Dl&&n.LE(new a.A(o,t,1,i,s,c.A.Jo[_.Dl],!0))):d===f.A.NT.id&&(h?.nO(t,i,s,g,0,0,C,_.xa(f.A.dE.id,u.A.qd,p,m,I,E,-1),T,w,768),-1!==_.Dl&&n.LE(new a.A(o,t,1,i,s,c.A.Jo[_.Dl],!0)))};hE;eE;cr;ur;rO;oO;lO;aO;cO;fO;uO;dO;wO;yO;AO;pO;constructor(t,i,s,e){this.hE=t,this.eE=i,this.cr=s,this.ur=e,this.rO=new y._c(h.A.tr,t,i),this.oO=new y._c(h.A.tr,t,i),this.lO=new y._c(h.A.tr,t,i),this.aO=new y._c(h.A.tr,t,i),this.pO=new y.Cc(h.A.tr,t+1,i+1),this.cO=new y._c(h.A.tr,t+1,i+1),this.fO=new y.wr(t+1,i+1),this.uO=new Int32Array(i),this.dO=new Int32Array(i),this.wO=new Int32Array(i),this.yO=new Int32Array(i),this.AO=new Int32Array(i)}um=(t,i)=>{for(let t=0;t=0&&i[h]?.ST(s,e)}A.qT+=(5*Math.random()|0)-2,A.qT<-8?A.qT=-8:A.qT>8&&(A.qT=8),A.$T+=(5*Math.random()|0)-2,A.$T<-16?A.$T=-16:A.$T>16&&(A.$T=16);for(let i=0;i>8;for(let t=1;t>2)+(s[e+1][t]>>3)+(s[e][t-1]>>2)+(s[e][t+1]>>3)+(s[e][t]>>1);this.fO[e][t]=u-d}for(let t=0;t=0&&h0){const i=e.A.Jo[s-1];this.uO[t]+=i.k_,this.dO[t]+=i.R_,this.wO[t]+=i.S_,this.yO[t]+=i.M_,n=this.AO[t]++}}const r=s-5;if(r>=0&&r0){const i=e.A.Jo[s-1];this.uO[t]-=i.k_,this.dO[t]-=i.R_,this.wO[t]-=i.S_,this.yO[t]-=i.M_,n=this.AO[t]--}}}if(s>=1&&s=0&&f=0&&y=1&&c0||y>0){const p=this.cr[i][s][c],m=this.cr[i][s+1][c],I=this.cr[i][s+1][c+1],E=this.cr[i][s][c+1],g=this.fO[s][c],_=this.fO[s+1][c],C=this.fO[s+1][c+1],T=this.fO[s][c+1];let O=-1,v=-1;if(f>0){const t=256*h/l|0,i=n/a|0;let s=o/a|0;O=e.A.__(t,i,s);const r=t+A.qT&255;s+=A.$T,s<0?s=0:s>255&&(s=255),v=e.A.__(r,i,s)}if(i>0){let t=0!==f||this.lO[i][s][c]===w.A.IO;y>0&&!e.A.Jo[y-1].b_&&(t=!1),t&&p===m&&p===I&&p===E&&(this.pO[i][s][c]|=2340)}let b=0;if(-1!==O&&(b=r.A.palette[e.A.C_(v,96)]),0===y)t?.EO(i,s,c,w.A.IO,u.A.qd,-1,p,m,I,E,e.A.C_(O,g),e.A.C_(O,_),e.A.C_(O,C),e.A.C_(O,T),d.A.ca,d.A.ca,d.A.ca,d.A.ca,b,d.A.ca);else{const h=this.lO[i][s][c]+1,n=this.aO[i][s][c],o=e.A.Jo[y-1];let l,a,f=o.texture;f>=0?(a=r.A.gO(f),l=-1):o.O_===d.A.Jc?(a=0,l=-2,f=-1):(l=e.A.__(o.L_,o.R_,o.S_),a=r.A.palette[e.A.T_(o.x_,96)]),t?.EO(i,s,c,h,n,f,p,m,I,E,e.A.C_(O,g),e.A.C_(O,_),e.A.C_(O,C),e.A.C_(O,T),e.A.T_(l,g),e.A.T_(l,_),e.A.T_(l,C),e.A.T_(l,T),b,a)}}}}}}for(let s=1;s0&&(t<<=3,i<<=3,s<<=3);for(let h=0;h<=e;h++)for(let n=0;n<=this.eE;n++)for(let r=0;r<=this.hE;r++){if(this.pO[h][r][n]&t){let i=n,s=n,l=h,a=h;for(;i>0&&this.pO[h][r][i-1]&t;)i--;for(;s0;){for(let h=i;h<=s;h++)if(!(this.pO[l-1][r][h]&t))break t;l--}t:for(;a=8){const h=this.cr[a][r][i]-240,n=this.cr[l][r][i];o.A.OO(e,1,128*r,h,128*i,128*r,n,128*s+128);for(let h=l;h<=a;h++)for(let e=i;e<=s;e++)this.pO[h][r][e]&=~t}}if(this.pO[h][r][n]&i){let t=r,s=r,l=h,a=h;for(;t>0&&this.pO[h][t-1][n]&i;)t--;for(;s0;){for(let h=t;h<=s;h++)if(!(this.pO[l-1][h][n]&i))break t;l--}t:for(;a=8){const h=this.cr[a][t][n]-240,r=this.cr[l][t][n];o.A.OO(e,2,128*t,h,128*n,128*s+128,r,128*n);for(let h=l;h<=a;h++)for(let e=t;e<=s;e++)this.pO[h][e][n]&=~i}}if(this.pO[h][r][n]&s){let t=r,i=r,l=n,a=n;for(;l>0&&this.pO[h][r][l-1]&s;)l--;for(;a0;){for(let i=l;i<=a;i++)if(!(this.pO[h][t-1][i]&s))break t;t--}t:for(;i=4){const n=this.cr[h][t][l];o.A.OO(e,4,128*t,n,128*l,128*i+128,n,128*a+128);for(let e=t;e<=i;e++)for(let t=l;t<=a;t++)this.pO[h][e][t]&=~s}}}}}};am=(t,i,s,n)=>{let r=0;for(let t=0;t>24;break}for(let e=t;e=0&&t=0&&e{const o=new n.A(new Uint8Array(r));for(let n=0;n=0&&a=0&&c>24,this.aO[n][a][c]=(f-2&3)<<24>>24):f<=81?this.ur[n][a][c]=f-49<<24>>24:this.rO[n][a][c]=f-81<<24>>24}else for(;f=o.CA,0!==f;){if(1===f){o.CA;break}f<=49&&o.CA}}};fm=(t,i,s,e,r,o)=>{const l=new n.A(new Uint8Array(e));let a=-1;for(;;){const e=l.vO;if(0===e)return;a+=e;let n=0;for(;;){const e=l.vO;if(0===e)break;n+=e-1;const c=63&n,f=n>>6&63,u=n>>12,d=l.CA,w=d>>2,y=3&d,A=f+r,p=c+o;if(A>0&&p>0&&A=0&&(e=s[h]),this.eA(u,A,p,t,i,e,a,w,y)}}}};eA=(t,i,s,h,e,n,r,o,d)=>{if(A.vt){if(16&this.ur[t][i][s])return;if(this.mO(t,i,s)!==A.hm)return}const w=this.cr[t][i][s],y=this.cr[t][i+1][s],p=this.cr[t][i+1][s+1],m=this.cr[t][i][s+1],I=w+y+p+m>>2,E=l.A.get(r);let g=i+(s<<7)+(r<<14)+1073741824|0;E.active||(g+=-2147483648),g|=0;const _=(d<<6)+o<<24>>24;if(o===f.A.Fy.id)(!A.vt||E.active||E.eC)&&(h?.eO(E.xa(f.A.Fy.id,d,w,y,p,m,-1),t,i,s,I,g,_),E.cA&&E.active&&n?.ST(i,s),-1!==E.Dl&&e.LE(new a.A(r,t,3,i,s,c.A.Jo[E.Dl],!0)));else if(o===f.A.Ny.id||o===f.A.Py.id){const l=E.xa(f.A.Ny.id,d,w,y,p,m,-1);if(l){let e,n,r=0;if(o===f.A.Py.id&&(r+=256),d===u.A.$d||d===u.A.Qd?(e=E.length,n=E.width):(e=E.width,n=E.length),h?.eA(t,i,s,I,l,null,g,_,e,n,r)&&E.q_)for(let h=0;h<=e;h++)for(let e=0;e<=n;e++){let n=l.bO/4|0;n>30&&(n=30),n>this.cO[t][i+h][s+e]&&(this.cO[t][i+h][s+e]=n<<24>>24)}}E.cA&&n?.eA(i,s,E.width,E.length,d,E.fA),-1!==E.Dl&&e.LE(new a.A(r,t,2,i,s,c.A.Jo[E.Dl],!0))}else if(o>=f.A.PT.id)h?.eA(t,i,s,I,E.xa(o,d,w,y,p,m,-1),null,g,_,1,1,0),o>=f.A.PT.id&&o<=f.A.HT.id&&o!==f.A.FT.id&&t>0&&(this.pO[t][i][s]|=2340),E.cA&&n?.eA(i,s,E.width,E.length,d,E.fA),-1!==E.Dl&&e.LE(new a.A(r,t,2,i,s,c.A.Jo[E.Dl],!0));else if(o===f.A.jd.id)h?.MT(t,i,s,I,A.XT[d],0,E.xa(f.A.jd.id,d,w,y,p,m,-1),null,g,_),d===u.A.qd?(E.q_&&(this.cO[t][i][s]=50,this.cO[t][i][s+1]=50),E.b_&&(this.pO[t][i][s]|=585)):d===u.A.$d?(E.q_&&(this.cO[t][i][s+1]=50,this.cO[t][i+1][s+1]=50),E.b_&&(this.pO[t][i][s+1]|=1170)):d===u.A.Jd?(E.q_&&(this.cO[t][i+1][s]=50,this.cO[t][i+1][s+1]=50),E.b_&&(this.pO[t][i+1][s]|=585)):d===u.A.Qd&&(E.q_&&(this.cO[t][i][s]=50,this.cO[t][i+1][s]=50),E.b_&&(this.pO[t][i][s]|=1170)),E.cA&&n?.MT(i,s,o,d,E.fA),-1!==E.Dl&&e.LE(new a.A(r,t,0,i,s,c.A.Jo[E.Dl],!0)),16!==E.X_&&h?.LO(t,i,s,E.X_);else if(o===f.A.kT.id)h?.MT(t,i,s,I,A.zT[d],0,E.xa(f.A.kT.id,d,w,y,p,m,-1),null,g,_),E.q_&&(d===u.A.qd?this.cO[t][i][s+1]=50:d===u.A.$d?this.cO[t][i+1][s+1]=50:d===u.A.Jd?this.cO[t][i+1][s]=50:d===u.A.Qd&&(this.cO[t][i][s]=50)),E.cA&&n?.MT(i,s,o,d,E.fA),-1!==E.Dl&&e.LE(new a.A(r,t,0,i,s,c.A.Jo[E.Dl],!0));else if(o===f.A.Zd.id){const l=d+1&3;h?.MT(t,i,s,I,A.XT[d],A.XT[l],E.xa(f.A.Zd.id,d+4,w,y,p,m,-1),E.xa(f.A.Zd.id,l,w,y,p,m,-1),g,_),E.b_&&(d===u.A.qd?(this.pO[t][i][s]|=265,this.pO[t][i][s+1]|=1170):d===u.A.$d?(this.pO[t][i][s+1]|=1170,this.pO[t][i+1][s]|=585):d===u.A.Jd?(this.pO[t][i+1][s]|=585,this.pO[t][i][s]|=1170):d===u.A.Qd&&(this.pO[t][i][s]|=1170,this.pO[t][i][s]|=585)),E.cA&&n?.MT(i,s,o,d,E.fA),-1!==E.Dl&&e.LE(new a.A(r,t,0,i,s,c.A.Jo[E.Dl],!0)),16!==E.X_&&h?.LO(t,i,s,E.X_)}else if(o===f.A.tw.id)h?.MT(t,i,s,I,A.zT[d],0,E.xa(f.A.tw.id,d,w,y,p,m,-1),null,g,_),E.q_&&(d===u.A.qd?this.cO[t][i][s+1]=50:d===u.A.$d?this.cO[t][i+1][s+1]=50:d===u.A.Jd?this.cO[t][i+1][s]=50:d===u.A.Qd&&(this.cO[t][i][s]=50)),E.cA&&n?.MT(i,s,o,d,E.fA),-1!==E.Dl&&e.LE(new a.A(r,t,0,i,s,c.A.Jo[E.Dl],!0));else if(o===f.A.sw.id)h?.eA(t,i,s,I,E.xa(o,d,w,y,p,m,-1),null,g,_,1,1,0),E.cA&&n?.eA(i,s,E.width,E.length,d,E.fA),-1!==E.Dl&&e.LE(new a.A(r,t,2,i,s,c.A.Jo[E.Dl],!0));else if(o===f.A.dE.id)h?.nO(t,i,s,I,0,0,g,E.xa(f.A.dE.id,u.A.qd,w,y,p,m,-1),_,512*d,A.XT[d]),-1!==E.Dl&&e.LE(new a.A(r,t,1,i,s,c.A.Jo[E.Dl],!0));else if(o===f.A.Km.id){let n=16;if(h){const e=h.Kd(t,i,s);e>0&&(n=l.A.get(e>>14&32767).X_)}h?.nO(t,i,s,I,A.jT[d]*n,A.ZT[d]*n,g,E.xa(f.A.dE.id,u.A.qd,w,y,p,m,-1),_,512*d,A.XT[d]),-1!==E.Dl&&e.LE(new a.A(r,t,1,i,s,c.A.Jo[E.Dl],!0))}else o===f.A.xT.id?(h?.nO(t,i,s,I,0,0,g,E.xa(f.A.dE.id,u.A.qd,w,y,p,m,-1),_,d,256),-1!==E.Dl&&e.LE(new a.A(r,t,1,i,s,c.A.Jo[E.Dl],!0))):o===f.A.DT.id?(h?.nO(t,i,s,I,0,0,g,E.xa(f.A.dE.id,u.A.qd,w,y,p,m,-1),_,d,512),-1!==E.Dl&&e.LE(new a.A(r,t,1,i,s,c.A.Jo[E.Dl],!0))):o===f.A.NT.id&&(h?.nO(t,i,s,I,0,0,g,E.xa(f.A.dE.id,u.A.qd,w,y,p,m,-1),_,d,768),-1!==E.Dl&&e.LE(new a.A(r,t,1,i,s,c.A.Jo[E.Dl],!0)))};mO=(t,i,s)=>8&this.ur[t][i][s]?0:t<=0||!(2&this.ur[1][i][s])?t:t-1}},198:(t,i,s)=>{s.d(i,{A:()=>I});var h=s(4583);class e{level;y;x;z;model;RO;JI;SO;MO;kO;xO;DO;info;NO=0;wu=0;constructor(t,i,s,h,e,n,r,o,l,a,c,f,u){this.level=t,this.y=i,this.x=s,this.z=h,this.model=e,this.RO=n,this.JI=r,this.SO=o,this.MO=l,this.kO=a,this.xO=c,this.DO=f,this.info=u}}var n=s(3795);class r{iE;hE;sE;eE;type;PO;FO;UO;BO;GO;AC;mode=0;HO=0;WO=0;YO=0;VO=0;KO=0;XO=0;constructor(t,i,s,h,e,n,r,o,l,a,c){this.iE=t,this.hE=i,this.sE=s,this.eE=h,this.type=e,this.PO=n,this.FO=r,this.UO=o,this.BO=l,this.GO=a,this.AC=c}}var o=s(670);class l{y;x;z;model;DO;info;constructor(t,i,s,h,e,n){this.y=t,this.x=i,this.z=s,this.model=h,this.DO=e,this.info=n}}class a{y;x;z;zO;jO;ZO;qO;DO;info;constructor(t,i,s,h,e,n,r,o,l){this.y=t,this.x=i,this.z=s,this.zO=h,this.jO=e,this.ZO=n,this.qO=r,this.DO=o,this.info=l}}class c{y;x;z;type;angle;model;DO;info;constructor(t,i,s,h,e,n,r,o){this.y=t,this.x=i,this.z=s,this.type=h,this.angle=e,this.model=n,this.DO=r,this.info=o}}var f=s(6666);class u{y;x;z;$O;JO;QO;DO;offset;constructor(t,i,s,h,e,n,r,o){this.y=t,this.x=i,this.z=s,this.$O=h,this.JO=e,this.QO=n,this.DO=r,this.offset=o}}class d{tv;iv;sv;hv;ev;color;flat;constructor(t,i,s,h,e,n,r){this.tv=t,this.iv=i,this.sv=s,this.hv=h,this.ev=e,this.color=n,this.flat=r}}var w=s(8950);class y{static nv=new Int32Array(6);static rv=new Int32Array(6);static ov=new Int32Array(6);static lv=new Int32Array(6);static av=new Int32Array(6);static cv=[Int8Array.of(1,3,5,7),Int8Array.of(1,3,5,7),Int8Array.of(1,3,5,7),Int8Array.of(1,3,5,7,6),Int8Array.of(1,3,5,7,6),Int8Array.of(1,3,5,7,6),Int8Array.of(1,3,5,7,6),Int8Array.of(1,3,5,7,2,6),Int8Array.of(1,3,5,7,2,8),Int8Array.of(1,3,5,7,2,8),Int8Array.of(1,3,5,7,11,12),Int8Array.of(1,3,5,7,11,12),Int8Array.of(1,3,5,7,13,14)];static fv=[Int8Array.of(0,1,2,3,0,0,1,3),Int8Array.of(1,1,2,3,1,0,1,3),Int8Array.of(0,1,2,3,1,0,1,3),Int8Array.of(0,0,1,2,0,0,2,4,1,0,4,3),Int8Array.of(0,0,1,4,0,0,4,3,1,1,2,4),Int8Array.of(0,0,4,3,1,0,1,2,1,0,2,4),Int8Array.of(0,1,2,4,1,0,1,4,1,0,4,3),Int8Array.of(0,4,1,2,0,4,2,5,1,0,4,5,1,0,5,3),Int8Array.of(0,4,1,2,0,4,2,3,0,4,3,5,1,0,4,5),Int8Array.of(0,0,4,5,1,4,1,2,1,4,2,3,1,4,3,5),Int8Array.of(0,0,1,5,0,1,4,5,0,1,2,4,1,0,5,3,1,5,4,3,1,4,2,3),Int8Array.of(1,0,1,5,1,1,4,5,1,1,2,4,0,0,5,3,0,5,4,3,0,4,2,3),Int8Array.of(1,0,5,4,1,0,1,5,0,0,4,3,0,4,5,3,0,5,2,3,0,1,2,5)];static uv=128;static dv=this.uv/2|0;static wv=this.uv/4|0;static yv=3*this.uv/4|0;oC;aC;lC;Av;pv;mv;Iv;Ev;gv;_v;flat;shape;angle;Cv;Tv;constructor(t,i,s,h,e,n,r,o,l,a,c,f,u,d,w,A,p,m,I){this.flat=!(p!==h||p!==d||p!==o),this.shape=i,this.angle=n,this.Cv=u,this.Tv=l;const E=y.cv[i],g=E.length;this.oC=new Int32Array(g),this.aC=new Int32Array(g),this.lC=new Int32Array(g);const _=new Int32Array(g),C=new Int32Array(g),T=t*y.uv,O=m*y.uv;for(let t=0;t8&&g<=12&&(g=9+(g-n-9&3)),g>12&&g<=16&&(g=13+(g-n-13&3)),1===g?(i=T,l=O,c=p,u=r,m=a):2===g?(i=T+y.dv,l=O,c=p+h>>1,u=r+I>>1,m=a+s>>1):3===g?(i=T+y.uv,l=O,c=h,u=I,m=s):4===g?(i=T+y.uv,l=O+y.dv,c=h+d>>1,u=I+e>>1,m=s+w>>1):5===g?(i=T+y.uv,l=O+y.uv,c=d,u=e,m=w):6===g?(i=T+y.dv,l=O+y.uv,c=d+o>>1,u=e+A>>1,m=w+f>>1):7===g?(i=T,l=O+y.uv,c=o,u=A,m=f):8===g?(i=T,l=O+y.dv,c=o+p>>1,u=A+r>>1,m=f+a>>1):9===g?(i=T+y.dv,l=O+y.wv,c=p+h>>1,u=r+I>>1,m=a+s>>1):10===g?(i=T+y.yv,l=O+y.dv,c=h+d>>1,u=I+e>>1,m=s+w>>1):11===g?(i=T+y.dv,l=O+y.yv,c=d+o>>1,u=e+A>>1,m=w+f>>1):12===g?(i=T+y.wv,l=O+y.dv,c=o+p>>1,u=A+r>>1,m=f+a>>1):13===g?(i=T+y.wv,l=O+y.wv,c=p,u=r,m=a):14===g?(i=T+y.yv,l=O+y.wv,c=h,u=I,m=s):15===g?(i=T+y.yv,l=O+y.yv,c=d,u=e,m=w):(i=T+y.wv,l=O+y.yv,c=o,u=A,m=f),this.oC[t]=i,this.aC[t]=c,this.lC[t]=l,_[t]=u,C[t]=m}const v=y.fv[i],b=v.length/4|0;this.Iv=new Int32Array(b),this.Ev=new Int32Array(b),this.gv=new Int32Array(b),this.Av=new Int32Array(b),this.pv=new Int32Array(b),this.mv=new Int32Array(b),this._v=-1!==c?new Int32Array(b):null;let L=0;for(let t=0;t{this.kv=0,this.xv=0,this.Dv=t,this.Nv=i,this.Pv=t/2|0,this.Fv=i/2|0;const r=new m.vv(9,32,53,53,!1);for(let t=128;t<=384;t+=32)for(let i=0;i<2048;i+=64){this.Uv=h.A.sin[t],this.Bv=h.A.cos[t],this.Gv=h.A.sin[i],this.Hv=h.A.cos[i];const o=(t-128)/32|0,l=i/64|0;for(let t=-26;t<=26;t++)for(let i=-26;i<=26;i++){const h=128*t,a=128*i;let c=!1;for(let t=-s;t<=e;t+=128)if(this.yb(h,a,n[o]+t)){c=!0;break}r[o][l][t+25+1][i+25+1]=c}}for(let t=0;t<8;t++)for(let i=0;i<32;i++)for(let s=-25;s<25;s++)for(let h=-25;h<25;h++){let e=!1;t:for(let n=-1;n<=1;n++)for(let o=-1;o<=1;o++){if(r[t][i][s+n+25+1][h+o+25+1]){e=!0;break t}if(r[t][(i+1)%31][s+n+25+1][h+o+25+1]){e=!0;break t}if(r[t+1][i][s+n+25+1][h+o+25+1]){e=!0;break t}if(r[t+1][(i+1)%31][s+n+25+1][h+o+25+1]){e=!0;break t}}this.Ov[t][i][s+25][h+25]=e}};static Zo=()=>{this.bv=null,this.md=null,this.Lv=null,this.Mv=null,this.Ov=null,this.Sv=null,this.Qv=null,console.log('World3D unloaded!')};static OO=(t,i,s,h,e,n,o,l)=>{I.Lv[t][I.md[t]++]=new r(s/128|0,n/128|0,e/128|0,l/128|0,i,s,n,e,l,h,o)};static yb=(t,i,s)=>{const h=i*this.Gv+t*this.Hv>>16,e=i*this.Hv-t*this.Gv>>16,n=s*this.Uv+e*this.Bv>>16,r=s*this.Bv-e*this.Uv>>16;if(n<50||n>3500)return!1;const o=this.Pv+((h<<9)/n|0),l=this.Fv+((r<<9)/n|0);return o>=this.kv&&o<=this.Dv&&l>=this.xv&&l<=this.Nv};Ab;hE;eE;pb;mb;Yr;Ib;Eb;gb;_b=0;Cb=0;Tb=0;constructor(t,i,s,h){this.Ab=s,this.hE=h,this.eE=i,this.mb=new m.Kr(s,h,i,null),this.Ib=new m.Cc(s,h+1,i+1),this.pb=t,this.Yr=new m.Ns(5e3,null),this.Eb=new Int32Array(1e4),this.gb=new Int32Array(1e4),this.reset()}reset=()=>{for(let t=0;t{this.Cb=t;for(let i=0;i{const s=this.mb[0][t][i];for(let s=0;s<3;s++){this.mb[s][t][i]=this.mb[s+1][t][i];const h=this.mb[s][t][i];h&&h.level--}this.mb[0][t][i]||(this.mb[0][t][i]=new n.A(0,t,i));const h=this.mb[0][t][i];h&&(h.Ob=s),this.mb[3][t][i]=null};_O=(t,i,s,h)=>{const e=this.mb[t][i][s];e&&(e.vb=h)};EO=(t,i,s,h,e,r,o,l,a,c,f,u,w,p,m,I,E,g,_,C)=>{if(h===A.A.IO){for(let h=t;h>=0;h--)this.mb[h][i][s]||(this.mb[h][i][s]=new n.A(h,i,s));const h=this.mb[t][i][s];h&&(h.bb=new d(f,u,w,p,-1,_,!1))}else if(h===A.A.Lb){for(let h=t;h>=0;h--)this.mb[h][i][s]||(this.mb[h][i][s]=new n.A(h,i,s));const h=this.mb[t][i][s];h&&(h.bb=new d(m,I,E,g,r,C,o===l&&o===a&&o===c))}else{for(let h=t;h>=0;h--)this.mb[h][i][s]||(this.mb[h][i][s]=new n.A(h,i,s));const d=this.mb[t][i][s];d&&(d.Rb=new y(i,h,I,l,w,e,f,c,C,m,r,g,_,a,E,p,o,s,u))}};eO=(t,i,s,h,e,r,o)=>{this.mb[i][s][h]||(this.mb[i][s][h]=new n.A(i,s,h));const a=this.mb[i][s][h];a&&(a.Sb=new l(e,128*s+64,128*h+64,t,r,o))};wA=(t,i,s)=>{const h=this.mb[t][i][s];h&&(h.Sb=null)};hA=(t,i,s,h,e,r,o,l)=>{let a=0;const c=this.mb[h][t][i];if(c)for(let t=0;ta&&(a=s)}else this.mb[h][t][i]=new n.A(h,t,i);const f=this.mb[h][t][i];f&&(f.xb=new u(s,128*t+64,128*i+64,r,o,l,e,a))};Qy=(t,i,s)=>{const h=this.mb[t][i][s];h&&(h.xb=null)};MT=(t,i,s,h,e,r,o,l,c,f)=>{if(!o&&!l)return;for(let h=t;h>=0;h--)this.mb[h][i][s]||(this.mb[h][i][s]=new n.A(h,i,s));const u=this.mb[t][i][s];u&&(u.Db=new a(h,128*i+64,128*s+64,e,r,o,l,c,f))};aA=(t,i,s,h)=>{const e=this.mb[t][i][s];1===h&&e&&(e.Db=null)};nO=(t,i,s,h,e,r,o,l,a,f,u)=>{if(!l)return;for(let h=t;h>=0;h--)this.mb[h][i][s]||(this.mb[h][i][s]=new n.A(h,i,s));const d=this.mb[t][i][s];d&&(d.Nb=new c(h,128*i+e+64,128*s+r+64,u,f,l,o,a))};uA=(t,i,s)=>{const h=this.mb[t][i][s];h&&(h.Nb=null)};LO=(t,i,s,h)=>{const e=this.mb[t][i][s];if(!e)return;const n=e.Nb;if(!n)return;const r=128*i+64,o=128*s+64;n.x=r+((n.x-r)*h/16|0),n.z=o+((n.z-o)*h/16|0)};uE=(t,i,s,h)=>{if(!h)return;const e=this.mb[t][i][s];if(!e)return;const n=e.Nb;n&&(n.model=h)};AE=(t,i,s,h)=>{if(!h)return;const e=this.mb[t][i][s];if(!e)return;const n=e.Sb;n&&(n.model=h)};yE=(t,i,s,h)=>{if(!h)return;const e=this.mb[t][i][s];if(!e)return;const n=e.Db;n&&(n.ZO=h)};wE=(t,i,s,h,e)=>{if(!h)return;const n=this.mb[s][t][i];if(!n)return;const r=n.Db;r&&(r.ZO=h,r.qO=e)};eA=(t,i,s,h,e,n,r,o,l,a,c)=>{if(!e&&!n)return!0;const f=128*i+64*l,u=128*s+64*a;return this.Pb(f,u,h,t,i,s,l,a,e,n,r,o,c,!1)};$I=(t,i,s,h,e,n,r,o,l,a)=>{if(!e&&!n)return!0;let c=i-l,f=h-l,u=i+l,d=h+l;return a&&(o>640&&o<1408&&(d+=128),o>1152&&o<1920&&(u+=128),(o>1664||o<384)&&(f-=128),o>128&&o<896&&(c-=128)),c=c/128|0,f=f/128|0,u=u/128|0,d=d/128|0,this.Pb(i,h,s,t,c,f,u+1-c,d-f+1,e,n,r,0,o,!0)};tE=(t,i,s,h,e,n,r,o,l,a,c,f)=>!l&&!a||this.Pb(i,h,s,t,e,n,r+1-e,o-n+1,l,a,c,0,f,!0);dA=(t,i,s)=>{const h=this.mb[t][i][s];if(h)for(let t=0;t>29&3)&&e.SO===i&&e.kO===s)return void this.Fb(e)}};fE=(t,i,s,h)=>{if(!h)return;const e=this.mb[t][i][s];if(e)for(let t=0;t>29&3))return void(i.model=h)}};pu=()=>{for(let t=0;t{const h=this.mb[t][i][s];return h&&h.Db?h.Db.DO:0};oA=(t,i,s)=>{const h=this.mb[t][s][i];return h&&h.Nb?h.Nb.DO:0};iw=(t,i,s)=>{const h=this.mb[t][i][s];if(!h)return 0;for(let t=0;t>29&3)&&e.SO===i&&e.kO===s)return e.DO}return 0};Bd=(t,i,s)=>{const h=this.mb[t][i][s];return h&&h.Sb?h.Sb.DO:0};Xd=(t,i,s,h)=>{const e=this.mb[t][i][s];if(e){if(e.Db&&e.Db.DO===h)return 255&e.Db.info;if(e.Nb&&e.Nb.DO===h)return 255&e.Nb.info;if(e.Sb&&e.Sb.DO===h)return 255&e.Sb.info;for(let t=0;t{const n=i*(0|Math.sqrt(s*s+h*h+e*e))>>8;for(let i=0;i{if(i0){const e=this.mb[t][i+1][s-1];e&&e.Sb&&e.Sb.model&&e.Sb.model.Ub&&this.Gb(h,e.Sb.model,128,0,-128,!0)}};Bb=(t,i,s,h,e,n)=>{let r=!0,o=i;const l=i+h,a=s-1,c=s+e;for(let f=t;f<=t+1;f++)if(f!==this.Ab){for(let u=o;u<=l;u++)if(!(u<0||u>=this.hE))for(let o=a;o<=c;o++){if(o<0||o>=this.eE||r&&u=s||u===i))continue;const a=this.mb[f][u][o];if(!a)continue;const d=128*(u-i)+64*(1-h),w=128*(o-s)+64*(1-e),y=((this.pb[f][u][o]+this.pb[f][u+1][o]+this.pb[f][u][o+1]+this.pb[f][u+1][o+1])/4|0)-((this.pb[t][i][s]+this.pb[t][i+1][s]+this.pb[t][i][s+1]+this.pb[t][i+1][s+1])/4|0),A=a.Db;A&&A.ZO&&A.ZO.Ub&&this.Gb(n,A.ZO,d,y,w,r),A&&A.qO&&A.qO.Ub&&this.Gb(n,A.qO,d,y,w,r);for(let t=0;t{this.Tb++;let r=0;const o=i.oC,l=i.rC;if(t.Ub&&t.Yb)for(let n=0;ni.GO)continue;const u=t.oC[n]-s;if(ui.FO)continue;const d=t.lC[n]-e;if(di.BO)continue;if(i.Ub&&i.Yb)for(let t=0;t{const r=this.mb[t][i][s];if(!r)return;const o=r.bb;if(o){const t=o.color;if(0!==t)for(let i=0;i<4;i++)h[e]=t,h[e+1]=t,h[e+2]=t,h[e+3]=t,e+=n;return}const l=r.Rb;if(!l)return;const a=l.shape,c=l.angle,f=l.Cv,u=l.Tv,d=I.fb[a],w=I.ub[c];let y=0;if(0===f)for(let t=0;t<4;t++)0!==d[w[y++]]&&(h[e]=u),0!==d[w[y++]]&&(h[e+1]=u),0!==d[w[y++]]&&(h[e+2]=u),0!==d[w[y++]]&&(h[e+3]=u),e+=n;else for(let t=0;t<4;t++)h[e]=0===d[w[y++]]?f:u,h[e+1]=0===d[w[y++]]?f:u,h[e+2]=0===d[w[y++]]?f:u,h[e+3]=0===d[w[y++]]?f:u,e+=n};click=(t,i)=>{I.Jv=!0,I.ea=t,I.na=i,I.Nf=-1,I.Pf=-1};draw=(t,i,s,e,n,r,o)=>{t<0?t=0:t>=128*this.hE&&(t=128*this.hE-1),s<0?s=0:s>=128*this.eE&&(s=128*this.eE-1),I.wu++,I.Uv=h.A.sin[r],I.Bv=h.A.cos[r],I.Gv=h.A.sin[n],I.Hv=h.A.cos[n],I.Qv=I.Ov[(r-128)/32|0][n/64|0],I.Wv=t,I.Yv=i,I.Vv=s,I.Kv=t/128|0,I.Xv=s/128|0,I.Id=e,I.zv=I.Kv-25,I.zv<0&&(I.zv=0),I.Zv=I.Xv-25,I.Zv<0&&(I.Zv=0),I.jv=I.Kv+25,I.jv>this.hE&&(I.jv=this.hE),I.qv=I.Xv+25,I.qv>this.eE&&(I.qv=this.eE),this.Zb(),I.$v=0;for(let t=this.Cb;t=2e3)?(r.visible=!0,r.update=!0,r.qb=r.Mb>0,I.$v++):(r.visible=!1,r.update=!1,r.$b=0))}}for(let t=this.Cb;t=I.jv))for(let t=-25;t<=0;t++){const e=I.Xv+t,n=I.Xv-t;let r;if(s>=I.zv&&(e>=I.Zv&&(r=i[s][e],r&&r.visible&&this.Jb(r,!0,o)),n=I.Zv&&(r=i[h][e],r&&r.visible&&this.Jb(r,!0,o)),n=I.jv))for(let t=-25;t<=0;t++){const e=I.Xv+t,n=I.Xv-t;let r;if(s>=I.zv&&(e>=I.Zv&&(r=i[s][e],r&&r.visible&&this.Jb(r,!1,o)),n=I.Zv&&(r=i[h][e],r&&r.visible&&this.Jb(r,!1,o)),n{if(!c&&!f)return!1;for(let t=r;t=this.hE||i>=this.eE)return!1;const s=this.mb[h][t][i];if(s&&s.Mb>=5)return!1}const A=new e(h,s,t,i,c,f,w,r,r+l-1,o,o+a-1,u,d);for(let t=r;tr&&(s|=1),to&&(s+=8),i=0;s--)this.mb[s][t][i]||(this.mb[s][t][i]=new n.A(s,t,i));const e=this.mb[h][t][i];e&&(e.kb[e.Mb]=A,e.Qb[e.Mb]=s,e.tL|=s,e.Mb++)}return y&&(this.Yr[this._b++]=A),!0};Fb=t=>{for(let i=t.SO;i<=t.MO;i++)for(let s=t.kO;s<=t.xO;s++){const h=this.mb[t.level][i][s];if(h){for(let i=0;i{const t=I.md[I.Id],i=I.Lv[I.Id];I.Ed=0;for(let s=0;s=0&&h<=50){e=t.sE+25-I.Xv,e<0&&(e=0),n=t.eE+25-I.Xv,n>50&&(n=50);let i=!1;for(;e<=n;)if(I.Qv&&I.Qv[h][e++]){i=!0;break}if(i){if(r=I.Wv-t.PO,r>32)t.mode=1;else{if(r>=-32)continue;t.mode=2,r=-r}t.YO=(t.UO-I.Vv<<8)/r|0,t.VO=(t.BO-I.Vv<<8)/r|0,t.KO=(t.GO-I.Yv<<8)/r|0,t.XO=(t.AC-I.Yv<<8)/r|0,I.Sv[I.Ed++]=t}}}else if(2===t.type){if(h=t.sE+25-I.Xv,h>=0&&h<=50){e=t.iE+25-I.Kv,e<0&&(e=0),n=t.hE+25-I.Kv,n>50&&(n=50);let i=!1;for(;e<=n;)if(I.Qv&&I.Qv[e++][h]){i=!0;break}if(i){if(r=I.Vv-t.UO,r>32)t.mode=3;else{if(r>=-32)continue;t.mode=4,r=-r}t.HO=(t.PO-I.Wv<<8)/r|0,t.WO=(t.FO-I.Wv<<8)/r|0,t.KO=(t.GO-I.Yv<<8)/r|0,t.XO=(t.AC-I.Yv<<8)/r|0,I.Sv[I.Ed++]=t}}}else if(4===t.type&&(h=t.GO-I.Yv,h>128&&(e=t.sE+25-I.Xv,e<0&&(e=0),n=t.eE+25-I.Xv,n>50&&(n=50),e<=n))){let i=t.iE+25-I.Kv;i<0&&(i=0),r=t.hE+25-I.Kv,r>50&&(r=50);let s=!1;t:for(let t=i;t<=r;t++)for(let i=e;i<=n;i++)if(I.Qv&&I.Qv[t][i]){s=!0;break t}s&&(t.mode=5,t.HO=(t.PO-I.Wv<<8)/h|0,t.WO=(t.FO-I.Wv<<8)/h|0,t.YO=(t.UO-I.Vv<<8)/h|0,t.VO=(t.BO-I.Vv<<8)/h|0,I.Sv[I.Ed++]=t)}}};Jb=(t,i,s)=>{for(I.Mv.LE(t);;){let t;do{if(t=I.Mv.iL(),!t)return}while(!t.update);const h=t.x,e=t.z,n=t.level,r=t.sL,o=this.mb[n];if(t.visible){if(i){if(n>0){const t=this.mb[n-1][h][e];if(t&&t.update)continue}if(h<=I.Kv&&h>I.zv){const i=o[h-1][e];if(i&&i.update&&(i.visible||!(1&t.tL)))continue}if(h>=I.Kv&&hI.Zv){const i=o[h][e-1];if(i&&i.update&&(i.visible||!(8&t.tL)))continue}if(e>=I.Xv&&ee&&(a+=6),c=I.tb[a],t.rL=I.sb[a]),f&&(f.zO&I.ib[a]?16===f.zO?(t.$b=3,t.oL=I.hb[a],t.lL=3-t.oL):32===f.zO?(t.$b=6,t.oL=I.eb[a],t.lL=6-t.oL):64===f.zO?(t.$b=12,t.oL=I.nb[a],t.lL=12-t.oL):(t.$b=9,t.oL=I.rb[a],t.lL=9-t.oL):t.$b=0,f.zO&c&&!this.aL(r,h,e,f.zO)&&f.ZO?.draw(0,I.Uv,I.Bv,I.Gv,I.Hv,f.x-I.Wv,f.y-I.Yv,f.z-I.Vv,f.DO),f.jO&c&&!this.aL(r,h,e,f.jO)&&f.qO?.draw(0,I.Uv,I.Bv,I.Gv,I.Hv,f.x-I.Wv,f.y-I.Yv,f.z-I.Vv,f.DO)),u&&!this.visible(r,h,e,u.model.AC))if(u.type&c)u.model.draw(u.angle,I.Uv,I.Bv,I.Gv,I.Hv,u.x-I.Wv,u.y-I.Yv,u.z-I.Vv,u.DO);else if(768&u.type){const t=u.x-I.Wv,i=u.y-I.Yv,s=u.z-I.Vv,h=u.angle;let e,n;if(e=h===p.A.$d||h===p.A.Jd?-t:t,n=h===p.A.Jd||h===p.A.Qd?-s:s,256&u.type&&ne){const e=t+I.ab[h],n=s+I.cb[h];u.model.draw(512*h+1280&2047,I.Uv,I.Bv,I.Gv,I.Hv,e,i,n,u.DO)}}if(l){const i=t.Sb;i&&i.model?.draw(0,I.Uv,I.Bv,I.Gv,I.Hv,i.x-I.Wv,i.y-I.Yv,i.z-I.Vv,i.DO);const s=t.xb;s&&0===s.offset&&(s.QO&&s.QO.draw(0,I.Uv,I.Bv,I.Gv,I.Hv,s.x-I.Wv,s.y-I.Yv,s.z-I.Vv,s.DO),s.JO&&s.JO.draw(0,I.Uv,I.Bv,I.Gv,I.Hv,s.x-I.Wv,s.y-I.Yv,s.z-I.Vv,s.DO),s.$O&&s.$O.draw(0,I.Uv,I.Bv,I.Gv,I.Hv,s.x-I.Wv,s.y-I.Yv,s.z-I.Vv,s.DO))}const d=t.tL;if(0!==d){if(hI.Kv&&1&d){const t=o[h-1][e];t&&t.update&&I.Mv.LE(t)}if(e>I.Xv&&8&d){const t=o[h][e-1];t&&t.update&&I.Mv.LE(t)}}}if(0!==t.$b){let i=!0;for(let s=0;si.SO&&(n+=1),si.kO&&(n+=8),hh&&(h=e);const r=I.Xv-i.kO,l=i.xO-I.Xv;i.NO=l>r?h+l:h+r}for(;;){let t=-50,i=-1;for(let s=0;st&&(t=h.NO,i=s))}if(-1===i)break;const l=I.bv[i];if(l){l.wu=I.wu;let t=l.model;t||(t=l.RO?.draw(s)??null),t&&!this.cL(r,l.SO,l.MO,l.kO,l.xO,t.AC)&&t.draw(l.JI,I.Uv,I.Bv,I.Gv,I.Hv,l.x-I.Wv,l.y-I.Yv,l.z-I.Vv,l.DO);for(let t=l.SO;t<=l.MO;t++)for(let i=l.kO;i<=l.xO;i++){const s=o[t][i];s&&(0!==s.$b?I.Mv.LE(s):t===h&&i===e||!s.update||I.Mv.LE(s))}}}if(t.qb)continue}if(!t.update||0!==t.$b)continue;if(h<=I.Kv&&h>I.zv){const t=o[h-1][e];if(t&&t.update)continue}if(h>=I.Kv&&hI.Zv){const t=o[h][e-1];if(t&&t.update)continue}if(e>=I.Xv&&e=n){const n=t+I.ob[e],r=h+I.lb[e];i.model.draw(512*e+256,I.Uv,I.Bv,I.Gv,I.Hv,n,s,r,i.DO)}if(512&i.type&&r<=n){const n=t+I.ab[e],r=h+I.cb[e];i.model.draw(512*e+1280&2047,I.Uv,I.Bv,I.Gv,I.Hv,n,s,r,i.DO)}}const s=t.Db;s&&(s.jO&t.rL&&!this.aL(r,h,e,s.jO)&&s.qO?.draw(0,I.Uv,I.Bv,I.Gv,I.Hv,s.x-I.Wv,s.y-I.Yv,s.z-I.Vv,s.DO),s.zO&t.rL&&!this.aL(r,h,e,s.zO)&&s.ZO?.draw(0,I.Uv,I.Bv,I.Gv,I.Hv,s.x-I.Wv,s.y-I.Yv,s.z-I.Vv,s.DO))}if(nI.Kv){const t=o[h-1][e];t&&t.update&&I.Mv.LE(t)}if(e>I.Xv){const t=o[h][e-1];t&&t.update&&I.Mv.LE(t)}}};eL=(t,i,s,e,n,r,o,l)=>{let a,c,f,u,d=a=(s<<7)-I.Wv,y=c=(e<<7)-I.Vv,A=f=d+128,p=u=y+128,m=this.pb[i][s][e]-I.Yv,E=this.pb[i][s+1][e]-I.Yv,g=this.pb[i][s+1][e+1]-I.Yv,_=this.pb[i][s][e+1]-I.Yv,C=y*o+d*l>>16;if(y=y*l-d*o>>16,d=C,C=m*r-y*n>>16,y=m*n+y*r>>16,m=C,y<50)return;if(C=c*o+A*l>>16,c=c*l-A*o>>16,A=C,C=E*r-c*n>>16,c=E*n+c*r>>16,E=C,c<50)return;if(C=p*o+f*l>>16,p=p*l-f*o>>16,f=C,C=g*r-p*n>>16,p=g*n+p*r>>16,g=C,p<50)return;if(C=u*o+a*l>>16,u=u*l-a*o>>16,a=C,C=_*r-u*n>>16,u=_*n+u*r>>16,_=C,u<50)return;const T=h.A.Sa+((d<<9)/y|0),O=h.A.Ma+((m<<9)/y|0),v=h.A.Sa+((A<<9)/c|0),b=h.A.Ma+((E<<9)/c|0),L=h.A.Sa+((f<<9)/p|0),R=h.A.Ma+((g<<9)/p|0),S=h.A.Sa+((a<<9)/u|0),M=h.A.Ma+((_<<9)/u|0);if(h.A.alpha=0,(L-S)*(b-M)-(R-M)*(v-S)>0)if(h.A.fL=L<0||S<0||v<0||L>w.A.uL||S>w.A.uL||v>w.A.uL,I.Jv&&this.dL(I.ea,I.na,R,M,b,L,S,v)&&(I.Nf=s,I.Pf=e),-1===t.ev)12345678!==t.sv&&h.A.wL(L,S,v,R,M,b,t.sv,t.hv,t.iv);else if(I.vt){const i=I.wb[t.ev];h.A.wL(L,S,v,R,M,b,this.yL(i,t.sv),this.yL(i,t.hv),this.yL(i,t.iv))}else t.flat?h.A.pL(L,S,v,R,M,b,t.sv,t.hv,t.iv,d,m,y,A,a,E,_,c,u,t.ev):h.A.pL(L,S,v,R,M,b,t.sv,t.hv,t.iv,f,g,p,a,A,_,E,u,c,t.ev);if(!((T-v)*(M-b)-(O-b)*(S-v)<=0))if(h.A.fL=T<0||v<0||S<0||T>w.A.uL||v>w.A.uL||S>w.A.uL,I.Jv&&this.dL(I.ea,I.na,O,b,M,T,v,S)&&(I.Nf=s,I.Pf=e),-1!==t.ev){if(!I.vt)return void h.A.pL(T,v,S,O,b,M,t.tv,t.iv,t.hv,d,m,y,A,a,E,_,c,u,t.ev);const i=I.wb[t.ev];h.A.wL(T,v,S,O,b,M,this.yL(i,t.tv),this.yL(i,t.iv),this.yL(i,t.hv))}else 12345678!==t.tv&&h.A.wL(T,v,S,O,b,M,t.tv,t.iv,t.hv)};nL=(t,i,s,e,n,r,o)=>{let l=s.oC.length;for(let t=0;t>16;if(a=a*o-i*r>>16,i=c,c=l*n-a*e>>16,a=l*e+a*n>>16,l=c,a<50)return;s._v&&(y.ov[t]=i,y.lv[t]=l,y.av[t]=a),y.nv[t]=h.A.Sa+((i<<9)/a|0),y.rv[t]=h.A.Ma+((l<<9)/a|0)}h.A.alpha=0,l=s.Iv.length;for(let e=0;e0)if(h.A.fL=l<0||a<0||c<0||l>w.A.uL||a>w.A.uL||c>w.A.uL,I.Jv&&this.dL(I.ea,I.na,f,u,d,l,a,c)&&(I.Nf=t,I.Pf=i),s._v&&-1!==s._v[e])if(I.vt){const t=I.wb[s._v[e]];h.A.wL(l,a,c,f,u,d,this.yL(t,s.Av[e]),this.yL(t,s.pv[e]),this.yL(t,s.mv[e]))}else s.flat?h.A.pL(l,a,c,f,u,d,s.Av[e],s.pv[e],s.mv[e],y.ov[0],y.lv[0],y.av[0],y.ov[1],y.ov[3],y.lv[1],y.lv[3],y.av[1],y.av[3],s._v[e]):h.A.pL(l,a,c,f,u,d,s.Av[e],s.pv[e],s.mv[e],y.ov[n],y.lv[n],y.av[n],y.ov[r],y.ov[o],y.lv[r],y.lv[o],y.av[r],y.av[o],s._v[e]);else 12345678!==s.Av[e]&&h.A.wL(l,a,c,f,u,d,s.Av[e],s.pv[e],s.mv[e])}};hL=(t,i,s)=>{const h=this.Ib[t][i][s];if(h===-I.wu)return!1;if(h===I.wu)return!0;{const h=i<<7,e=s<<7;return this.mL(h+1,this.pb[t][i][s],e+1)&&this.mL(h+128-1,this.pb[t][i+1][s],e+1)&&this.mL(h+128-1,this.pb[t][i+1][s+1],e+128-1)&&this.mL(h+1,this.pb[t][i][s+1],e+128-1)?(this.Ib[t][i][s]=I.wu,!0):(this.Ib[t][i][s]=-I.wu,!1)}};aL=(t,i,s,h)=>{if(!this.hL(t,i,s))return!1;const e=i<<7,n=s<<7,r=this.pb[t][i][s]-1,o=r-120,l=r-230,a=r-238;if(h<16){if(1===h){if(e>I.Wv){if(!this.mL(e,r,n))return!1;if(!this.mL(e,r,n+128))return!1}if(t>0){if(!this.mL(e,o,n))return!1;if(!this.mL(e,o,n+128))return!1}return!!this.mL(e,l,n)&&this.mL(e,l,n+128)}if(2===h){if(n0){if(!this.mL(e,o,n+128))return!1;if(!this.mL(e+128,o,n+128))return!1}return!!this.mL(e,l,n+128)&&this.mL(e+128,l,n+128)}if(4===h){if(e0){if(!this.mL(e+128,o,n))return!1;if(!this.mL(e+128,o,n+128))return!1}return!!this.mL(e+128,l,n)&&this.mL(e+128,l,n+128)}if(8===h){if(n>I.Vv){if(!this.mL(e,r,n))return!1;if(!this.mL(e+128,r,n))return!1}if(t>0){if(!this.mL(e,o,n))return!1;if(!this.mL(e+128,o,n))return!1}return!!this.mL(e,l,n)&&this.mL(e+128,l,n)}}return!!this.mL(e+64,a,n+64)&&(16===h?this.mL(e,l,n+128):32===h?this.mL(e+128,l,n+128):64===h?this.mL(e+128,l,n):128===h?this.mL(e,l,n):(console.warn('Warning unsupported wall type!'),!0))};visible=(t,i,s,h)=>{if(this.hL(t,i,s)){const e=i<<7,n=s<<7;return this.mL(e+1,this.pb[t][i][s]-h,n+1)&&this.mL(e+128-1,this.pb[t][i+1][s]-h,n+1)&&this.mL(e+128-1,this.pb[t][i+1][s+1]-h,n+128-1)&&this.mL(e+1,this.pb[t][i][s+1]-h,n+128-1)}return!1};cL=(t,i,s,h,e,n)=>{let r,o;if(i!==s||h!==e){for(r=i;r<=s;r++)for(o=h;o<=e;o++)if(this.Ib[t][r][o]===-I.wu)return!1;o=1+(i<<7);const l=2+(h<<7),a=this.pb[t][i][h]-n;if(!this.mL(o,a,l))return!1;const c=(s<<7)-1;if(!this.mL(c,a,l))return!1;const f=(e<<7)-1;return!!this.mL(o,a,f)&&this.mL(c,a,f)}return!!this.hL(t,i,h)&&(r=i<<7,o=h<<7,this.mL(r+1,this.pb[t][i][h]-n,o+1)&&this.mL(r+128-1,this.pb[t][i+1][h]-n,o+1)&&this.mL(r+128-1,this.pb[t][i+1][h+1]-n,o+128-1)&&this.mL(r+1,this.pb[t][i][h+1]-n,o+128-1))};mL=(t,i,s)=>{for(let h=0;h0){const t=e.UO+(e.YO*h>>8),n=e.BO+(e.VO*h>>8),r=e.GO+(e.KO*h>>8),o=e.AC+(e.XO*h>>8);if(s>=t&&s<=n&&i>=r&&i<=o)return!0}}else if(2===e.mode){const h=t-e.PO;if(h>0){const t=e.UO+(e.YO*h>>8),n=e.BO+(e.VO*h>>8),r=e.GO+(e.KO*h>>8),o=e.AC+(e.XO*h>>8);if(s>=t&&s<=n&&i>=r&&i<=o)return!0}}else if(3===e.mode){const h=e.UO-s;if(h>0){const s=e.PO+(e.HO*h>>8),n=e.FO+(e.WO*h>>8),r=e.GO+(e.KO*h>>8),o=e.AC+(e.XO*h>>8);if(t>=s&&t<=n&&i>=r&&i<=o)return!0}}else if(4===e.mode){const h=s-e.UO;if(h>0){const s=e.PO+(e.HO*h>>8),n=e.FO+(e.WO*h>>8),r=e.GO+(e.KO*h>>8),o=e.AC+(e.XO*h>>8);if(t>=s&&t<=n&&i>=r&&i<=o)return!0}}else if(5===e.mode){const h=i-e.GO;if(h>0){const i=e.PO+(e.HO*h>>8),n=e.FO+(e.WO*h>>8),r=e.UO+(e.YO*h>>8),o=e.BO+(e.VO*h>>8);if(t>=i&&t<=n&&s>=r&&s<=o)return!0}}}return!1};dL=(t,i,s,h,e,n,r,o)=>{if(is&&i>h&&i>e)return!1;if(tn&&t>r&&t>o)return!1;const l=(i-h)*(o-r)-(t-r)*(e-h);return((i-s)*(r-n)-(t-n)*(h-s))*l>0&&l*((i-e)*(n-o)-(t-o)*(s-e))>0};yL=(t,i)=>((i=(127-i)*(127&t)/160|0)<2?i=2:i>126&&(i=126),(65408&t)+i)}},7121:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{}},4197:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{ym;cE;dm;wm;index;aE;Fl;Pl;constructor(t,i,s,h,e,n,r){super(),this.ym=i,this.cE=s,this.dm=h,this.wm=e,this.index=t,this.aE=n,r&&-1!==n.Bl&&this.aE.delay?(this.Fl=Math.random()*this.aE.Ul|0,this.Pl=Math.random()*this.aE.delay[this.Fl]|0):(this.Fl=-1,this.Pl=0)}}},8412:(t,i,s)=>{s.d(i,{A:()=>o});var h=s(9418),e=s(8665),n=s(8738),r=s(1312);class o extends h.A{static ju=2;static qu=4;static Ju=8;static Qu=16;static ld=32;static nd=64;static td=128;type=null;draw(t){if(!this.type)return null;if(-1===this.rd||-1===this.EI)return this.IC();const i=this.IC();if(!i)return null;const s=n.A.Jo[this.rd],h=e.A.p_(s.xa(),!0,!s.K_,!1);h.translate(-this.mI,0,0),h.sc(),s.aE&&s.aE.frames&&h.hc(s.aE.frames[this.EI]),h.uC=null,h.dC=null,128===s.pC&&128===s.mC||h.scale(s.pC,s.mC,s.pC),h.ec(64+s.z_,850+s.j_,-30,-50,-30,!0);const r=[i,h],o=e.A.IL(r,2);return 1===this.type.size&&(o.CC=!0),o}isVisible(){return null!==this.type}IC(){if(!this.type)return null;if(this.Zu>=0&&0===this.yI){const t=r.A.Jo[this.Zu].frames;if(t){const i=t[this.dI];let s=-1;if(this.zI>=0&&this.zI!==this.ic){const t=r.A.Jo[this.zI].frames;t&&(s=t[this._E])}return this.type.IC(i,s,r.A.Jo[this.Zu].OE)}}let t=-1;if(this.zI>=0){const i=r.A.Jo[this.zI].frames;i&&(t=i[this._E])}const i=this.type.IC(t,-1,null);return i?(this.height=i.AC,i):null}}},3606:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{index;count;constructor(t,i){super(),this.index=t,this.count=i}}},9418:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(7121),e=s(1312),n=s(3867);class r extends h.A{x=0;z=0;JI=0;QI=!1;size=1;ic=-1;EE=-1;SI=-1;kI=-1;DI=-1;FI=-1;bE=-1;Mu=null;Pu=100;Du=0;Nu=0;Hu=0;Gu=0;Fu=-1e3;Uu=0;Bu=0;$u=-1;AI=0;pI=0;zI=-1;_E=0;gE=0;Zu=-1;dI=0;wI=0;yI=0;uI=0;rd=-1;EI=0;gI=0;II=0;mI=0;_I=0;TI=0;CI=0;OI=0;Wu=0;Yu=0;vI=0;wu=0;height=0;IE=0;pathLength=0;Uf=new Int32Array(10);Bf=new Int32Array(10);vE=new n.Ns(10,!1);mE=0;Ku=-1;Xu=-1;sd=-1;hd=-1;move(t,i,s){if(-1!==this.Zu&&e.A.Jo[this.Zu].priority<=1&&(this.Zu=-1),!t){const t=i-this.Uf[0],h=s-this.Bf[0];if(t>=-8&&t<=8&&h>=-8&&h<=8){this.pathLength<9&&this.pathLength++;for(let t=this.pathLength;t>0;t--)this.Uf[t]=this.Uf[t-1],this.Bf[t]=this.Bf[t-1],this.vE[t]=this.vE[t-1];return this.Uf[0]=i,this.Bf[0]=s,void(this.vE[0]=!1)}}this.pathLength=0,this.mE=0,this.Uf[0]=i,this.Bf[0]=s,this.x=128*this.Uf[0]+64*this.size,this.z=128*this.Bf[0]+64*this.size}step(t,i){let s=this.Uf[0],h=this.Bf[0];0===i?(s--,h++):1===i?h++:2===i?(s++,h++):3===i?s--:4===i?s++:5===i?(s--,h--):6===i?h--:7===i&&(s++,h--),-1!==this.Zu&&e.A.Jo[this.Zu].priority<=1&&(this.Zu=-1),this.pathLength<9&&this.pathLength++;for(let t=this.pathLength;t>0;t--)this.Uf[t]=this.Uf[t-1],this.Bf[t]=this.Bf[t-1],this.vE[t]=this.vE[t-1];this.Uf[0]=s,this.Bf[0]=h,this.vE[0]=t}}},8268:(t,i,s)=>{s.d(i,{A:()=>d});var h=s(9418),e=s(8665),n=s(2031),r=s(8738),o=s(1312),l=s(8317),a=s(1302),c=s(3819),f=s(3867),u=s(9298);class d extends h.A{static zu=1;static ju=2;static qu=4;static Ju=8;static Qu=16;static td=32;static ed=64;static cI=128;static nd=256;static od=512;static tc=[u.A.EL,u.A.gL,u.A._L,u.A.CL,u.A.TL,u.A.OL,u.A.vL,u.A.bL,u.A.LL,u.A.RL,u.A.SL,u.A.ML,u.A.kL,u.A.xL,u.A.DL,u.A.NL];static Qa=[[u.A.PL,u.A.FL,u.A.UL,u.A.BL,u.A.HL,u.A.WL,u.A.YL,u.A.VL,u.A.KL,u.A.XL,u.A.zL,u.A.jL],[u.A.ZL,u.A.qL,u.A.$L,u.A.JL,u.A.QL,u.A.tR,u.A.iR,u.A.sR,u.A.hR,u.A.eR,u.A.nR,u.A.rR,u.A.oR,u.A.lR,u.A.aR,u.A.cR],[u.A.cR-1,u.A.ZL+1,u.A.qL,u.A.$L,u.A.JL,u.A.QL,u.A.tR,u.A.iR,u.A.sR,u.A.hR,u.A.eR,u.A.nR,u.A.rR,u.A.oR,u.A.lR,u.A.aR],[u.A.fR,u.A.uR,u.A.dR,u.A.wR,u.A.yR,u.A.AR],[u.A.pR,u.A.mR,u.A.IR,u.A.ER,u.A.gR,u.A._R,u.A.CR,u.A.TR]];static Qo=new n.A(200);name=null;visible=!1;OR=0;Su=0;vR=new Uint16Array(12);bR=new Uint16Array(5);Ac=0;LR=0n;y=0;ZI=0;qI=0;RE=0;ME=0;SE=0;jI=null;iE=0;sE=0;hE=0;eE=0;vt=!1;draw(t){if(!this.visible)return null;let i=this.IC();if(this.height=i.AC,i.CC=!0,this.vt)return i;if(-1!==this.rd&&-1!==this.EI){const t=r.A.Jo[this.rd],s=e.A.p_(t.xa(),!0,!t.K_,!1);s.translate(-this.mI,0,0),s.sc(),t.aE&&t.aE.frames&&s.hc(t.aE.frames[this.EI]),s.uC=null,s.dC=null,128===t.pC&&128===t.mC||s.scale(t.pC,t.mC,t.pC),s.ec(t.z_+64,t.j_+850,-30,-50,-30,!0);const h=[i,s];i=e.A.IL(h,2)}if(this.jI&&(t>=this.qI&&(this.jI=null),t>=this.ZI&&t=d.Qa[i].length)&&(s=0),this.bR[i]=s}this.ic=t.ct,65535===this.ic&&(this.ic=-1),this.EE=t.ct,65535===this.EE&&(this.EE=-1),this.SI=t.ct,65535===this.SI&&(this.SI=-1),this.kI=t.ct,65535===this.kI&&(this.kI=-1),this.DI=t.ct,65535===this.DI&&(this.DI=-1),this.FI=t.ct,65535===this.FI&&(this.FI=-1),this.bE=t.ct,65535===this.bE&&(this.bE=-1),this.name=c.A.za(c.A.ja(t.af)),this.Ac=t.CA,this.visible=!0,this.LR=0n;for(let t=0;t<12;t++)this.LR<<=0x4n,this.vR[t]>=256&&(this.LR+=BigInt(this.vR[t])-256n);this.vR[0]>=256&&(this.LR+=BigInt(this.vR[0])-256n>>4n),this.vR[1]>=256&&(this.LR+=BigInt(this.vR[1])-256n>>8n);for(let t=0;t<5;t++)this.LR<<=0x3n,this.LR+=BigInt(this.bR[t]);this.LR<<=0x1n,this.LR+=BigInt(this.OR)}kA(){if(!this.visible)return null;const t=new f.Ns(12,null);let i=0;for(let s=0;s<12;s++){const h=this.vR[s];if(h>=256&&h<512&&(t[i++]=l.A.Jo[h-256].kA()),h>=512){const s=a.A.get(h-512).kA(this.OR);s&&(t[i++]=s)}}const s=e.A.$a(t,i);for(let t=0;t<5;t++)0!==this.bR[t]&&(s.Ja(d.Qa[t][0],d.Qa[t][this.bR[t]]),1===t&&s.Ja(d.tc[0],d.tc[this.bR[t]]));return s}IC(){let t=this.LR,i=-1,s=-1,h=-1,n=-1;if(this.Zu>=0&&0===this.yI){const e=o.A.Jo[this.Zu];if(e.frames&&(i=e.frames[this.dI]),this.zI>=0&&this.zI!==this.ic){const t=o.A.Jo[this.zI].frames;t&&(s=t[this._E])}e.JC>=0&&(h=e.JC,t+=BigInt(h-this.vR[5])<<8n),e.QC>=0&&(n=e.QC,t+=BigInt(n-this.vR[3])<<16n)}else if(this.zI>=0){const t=o.A.Jo[this.zI].frames;t&&(i=t[this._E])}let r=d.Qo?.get(t);if(!r){const i=new f.Ns(12,null);let s=0;for(let t=0;t<12;t++){let e=this.vR[t];if(n>=0&&3===t&&(e=n),h>=0&&5===t&&(e=h),e>=256&&e<512){const t=l.A.Jo[e-256].xa();t&&(i[s++]=t)}if(e>=512){const t=a.A.get(e-512).$C(this.OR);t&&(i[s++]=t)}}r=e.A.$a(i,s);for(let t=0;t<5;t++)0!==this.bR[t]&&(r.Ja(d.Qa[t][0],d.Qa[t][this.bR[t]]),1===t&&r.Ja(d.tc[0],d.tc[this.bR[t]]));r.sc(),r.ec(64,850,-30,-50,-30,!0),d.Qo?.put(t,r)}if(this.vt)return r;const c=e.A.EC(r,!0);return-1!==i&&-1!==s?c.gC(i,s,o.A.Jo[this.Zu].OE):-1!==i&&c.hc(i),c._C(),c.uC=null,c.dC=null,c}}},254:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(8738),e=s(7121),n=s(8665);class r extends e.A{RR;level;SR;MR;kR;offsetY;rE;nE;xR;arc;target;mobile=!1;x=0;z=0;y=0;velocityX=0;DR=0;NR=0;velocityY=0;PR=0;JI=0;pitch=0;Fl=0;Pl=0;constructor(t,i,s,e,n,r,o,l,a,c,f){super(),this.RR=h.A.Jo[t],this.level=i,this.SR=s,this.MR=n,this.kR=e,this.rE=r,this.nE=o,this.xR=l,this.arc=a,this.target=c,this.offsetY=f}oE(t,i,s,h){if(!this.mobile){const i=t-this.SR,h=s-this.MR,e=Math.sqrt(i*i+h*h);this.x=this.SR+i*this.arc/e,this.z=this.MR+h*this.arc/e,this.y=this.kR}const e=this.nE+1-h;this.velocityX=(t-this.x)/e,this.DR=(s-this.z)/e,this.NR=Math.sqrt(this.velocityX*this.velocityX+this.DR*this.DR),this.mobile||(this.velocityY=-this.NR*Math.tan(.02454369*this.xR)),this.PR=2*(i-this.y-this.velocityY*e)/(e*e)}update(t){if(this.mobile=!0,this.x+=this.velocityX*t,this.z+=this.DR*t,this.y+=this.velocityY*t+.5*this.PR*t*t,this.velocityY+=this.PR*t,this.JI=325.949*Math.atan2(this.velocityX,this.DR)+1024&2047,this.pitch=325.949*Math.atan2(this.velocityY,this.NR)&2047,this.RR.aE&&this.RR.aE.delay)for(this.Pl+=t;this.Pl>this.RR.aE.delay[this.Fl];)this.Pl-=this.RR.aE.delay[this.Fl]+1,this.Fl++,this.Fl>=this.RR.aE.Ul&&(this.Fl=0)}draw(){const t=this.RR.xa(),i=n.A.p_(t,!0,!this.RR.K_,!1);return this.RR.aE&&this.RR.aE.frames&&(i.sc(),i.hc(this.RR.aE.frames[this.Fl]),i.uC=null,i.dC=null),128===this.RR.pC&&128===this.RR.mC||i.scale(this.RR.pC,this.RR.mC,this.RR.pC),i.FR(this.pitch),i.ec(64+this.RR.z_,850+this.RR.j_,-30,-50,-30,!0),i}}},7628:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(7121),e=s(8738),n=s(8665);class r extends h.A{type;level;x;z;y;rE;lE=!1;Fl=0;Pl=0;constructor(t,i,s,h,n,r,o){super(),this.type=e.A.Jo[t],this.level=i,this.x=s,this.z=h,this.y=n,this.rE=r+o}update(t){if(this.type.aE&&this.type.aE.delay)for(this.Pl+=t;this.Pl>this.type.aE.delay[this.Fl];)this.Pl-=this.type.aE.delay[this.Fl]+1,this.Fl++,this.Fl>=this.type.aE.Ul&&(this.Fl=0,this.lE=!0)}draw(){const t=this.type.xa(),i=n.A.p_(t,!0,!this.type.K_,!1);return!this.lE&&this.type.aE&&this.type.aE.frames&&(i.sc(),i.hc(this.type.aE.frames[this.Fl]),i.uC=null,i.dC=null),128===this.type.pC&&128===this.type.mC||i.scale(this.type.pC,this.type.mC,this.type.pC),0!==this.type.orientation&&(90===this.type.orientation?i.wC():180===this.type.orientation?(i.wC(),i.wC()):270===this.type.orientation&&(i.wC(),i.wC(),i.wC())),i.ec(64+this.type.z_,850+this.type.j_,-30,-50,-30,!0),i}}},5327:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{vp;nw;x;z;Am;angle;shape;nE;constructor(t,i,s,h,e,n,r,o){super(),this.vp=t,this.nw=i,this.x=s,this.z=h,this.Am=e,this.angle=n,this.shape=r,this.nE=o}}},2630:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{vp;nw;x;z;Am;angle;shape;bp;Lp;Rp;constructor(t,i,s,h,e,n,r,o,l,a){super(),this.vp=t,this.nw=i,this.x=s,this.z=h,this.Am=e,this.angle=n,this.shape=r,this.bp=o,this.Lp=l,this.Rp=a}}},3795:(t,i,s)=>{s.d(i,{A:()=>n});var h=s(1982),e=s(3867);class n extends h.A{level;x;z;sL;kb;Qb;bb=null;Rb=null;Db=null;Nb=null;Sb=null;xb=null;Ob=null;Mb=0;tL=0;vb=0;visible=!1;update=!1;qb=!1;$b=0;oL=0;lL=0;rL=0;constructor(t,i,s){super(),this.sL=this.level=t,this.x=i,this.z=s,this.kb=new e.Ns(5,null),this.Qb=new Int32Array(5)}}},5518:(t,i,s)=>{s.d(i,{A:()=>h});class h{static IO=0;static Lb=1;static UR=2;static BR=3;static GR=4;static HR=5;static dv=6;static wv=7;static yv=8;static WR=9;static YR=10;static VR=11}},4474:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{KR;XR;constructor(){super(),this.KR=this,this.XR=this}zR(){this.XR&&this.KR&&(this.XR.KR=this.KR,this.KR.XR=this.XR,this.KR=null,this.XR=null)}}},3819:(t,i,s)=>{s.d(i,{A:()=>h});class h{static jR=['_','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9'];static xd=t=>{t=t.trim();let i=0n;for(let s=0;s=65&&h<=90?i+=BigInt(h+1-65):h>=97&&h<=122?i+=BigInt(h+1-97):h>=48&&h<=57&&(i+=BigInt(h+27-48))}return i};static ja=t=>{if(t<0n||t>=6582952005840035281n)return'invalid_name';if(t%37n===0n)return'invalid_name';let i=0;const s=Array(12);for(;0n!==t;){const h=t;t/=37n,s[11-i++]=this.jR[Number(h-37n*t)]}return s.slice(12-i).join('')};static Wy=t=>{const i=[...t.toLowerCase()];let s=!0;for(let t=0;t='a'&&h<='z'&&(i[t]=h.toUpperCase(),s=!1),'.'!==h&&'!'!==h||(s=!0)}return i.join('')};static nf=t=>{let i='';for(let s=0;s(t>>24&255)+'.'+(t>>16&255)+'.'+(t>>8&255)+'.'+(255&t);static za=t=>{if(0===t.length)return t;const i=[...t];for(let t=0;t='a'&&i[t+1]<='z'&&(i[t+1]=String.fromCharCode(i[t+1].charCodeAt(0)+'A'.charCodeAt(0)-97)));return i[0]>='a'&&i[0]<='z'&&(i[0]=String.fromCharCode(i[0].charCodeAt(0)+'A'.charCodeAt(0)-97)),i.join('')};static y_=t=>{const i=t.toUpperCase();let s=0n;for(let t=0;t>56n)&0xffffffffffffffn;return s}}},6666:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e{ZR;cursor=null;constructor(){const t=new h.A;t.next=t,t.Wm=t,this.ZR=t}LE(t){t.Wm&&t.SA(),t.Wm=this.ZR.Wm,t.next=this.ZR,t.Wm&&(t.Wm.next=t),t.next.Wm=t}iA(t){t.Wm&&t.SA(),t.Wm=this.ZR,t.next=this.ZR.next,t.Wm.next=t,t.next&&(t.next.Wm=t)}iL(){const t=this.ZR.next;return t===this.ZR?null:(t?.SA(),t)}head(){const t=this.ZR.next;return t===this.ZR?(this.cursor=null,null):(this.cursor=t?.next||null,t)}Hm(){const t=this.ZR.Wm;return t===this.ZR?(this.cursor=null,null):(this.cursor=t?.Wm||null,t)}next(){const t=this.cursor;return t===this.ZR?(this.cursor=null,null):(this.cursor=t?.next||null,t)}Wm(){const t=this.cursor;return t===this.ZR?(this.cursor=null,null):(this.cursor=t?.Wm||null,t)}clear(){for(;;){const t=this.ZR.next;if(t===this.ZR)return;t?.SA()}}}},1982:(t,i,s)=>{s.d(i,{A:()=>h});class h{key;next;Wm;constructor(){this.key=0n,this.next=this,this.Wm=this}SA(){this.Wm&&this.next&&(this.Wm.next=this.next,this.next.Wm=this.Wm,this.next=null,this.Wm=null)}}},2031:(t,i,s)=>{s.d(i,{A:()=>o});var h=s(4474);class e{head;constructor(){this.head=new h.A}push(t){t.XR&&t.zR(),t.XR=this.head.XR,t.KR=this.head,t.XR&&(t.XR.KR=t),t.KR.XR=t}pop(){const t=this.head.KR;return t===this.head?null:(t?.zR(),t)}}var n=s(1982);class r{qR;$R;constructor(t){this.$R=[],this.qR=t;for(let i=0;i{s.d(i,{A:()=>n});var h=s(1069),e=s(3867);class n{static Jo=[];static Sc=t=>{const i=new h.A(t.read('base_head.dat')),s=new h.A(t.read('base_type.dat')),r=new h.A(t.read('base_label.dat')),o=i.ct;i.ft+=2;for(let t=0;t{s.d(i,{A:()=>n});var h=s(8534),e=s(1069);class n{static Jo=[];static Sc=t=>{const i=new e.A(t.read('frame_head.dat')),s=new e.A(t.read('frame_tran1.dat')),r=new e.A(t.read('frame_tran2.dat')),o=new e.A(t.read('frame_del.dat')),l=i.ct;i.ft+=2;const a=new Int32Array(500),c=new Int32Array(500),f=new Int32Array(500),u=new Int32Array(500);for(let t=0;t0){if(0!==d.types[t])for(let i=t-1;i>y;i--)if(0===d.types[i]){a[A]=i,c[A]=0,f[A]=0,u[A]=0,A++;break}a[A]=t;let s=0;3===d.types[a[A]]&&(s=128),c[A]=1&i?r.iS:s,f[A]=2&i?r.iS:s,u[A]=4&i?r.iS:s,y=t,A++}}e.length=A,e.sS=new Int32Array(A),e.x=new Int32Array(A),e.y=new Int32Array(A),e.z=new Int32Array(A);for(let t=0;t{s.d(i,{hg:()=>h,Il:()=>e,hS:()=>o,eS:()=>r,nS:()=>n});const h=document.getElementById('canvas'),e=h.getContext('2d',{willReadFrequently:!0}),n=document.createElement('canvas'),r=document.createElement('img'),o=n.getContext('2d',{willReadFrequently:!0})},9298:(t,i,s)=>{s.d(i,{A:()=>h});class h{static RED=16711680;static GREEN=65280;static BLUE=255;static fa=16776960;static $c=65535;static Jc=16711935;static Kl=16777215;static ca=0;static rS=16748608;static bd=8388608;static vd=128;static oS=16756736;static lS=16740352;static aS=16723968;static cS=12648192;static fS=8453888;static uS=4259584;static Wc=9179409;static ew=6116423;static vl=2301979;static bl=5063219;static Rl=7759444;static Ml=3353893;static Ld=8388736;static Rd=13350793;static ad=Int32Array.of(h.fa,h.RED,h.GREEN,h.$c,h.Jc,h.Kl);static PL=6798;static FL=107;static UL=10283;static BL=16;static HL=4797;static WL=7744;static YL=5799;static VL=4634;static KL=33697;static XL=22433;static zL=2983;static jL=54193;static ZL=8741;static qL=12;static $L=64030;static JL=43162;static QL=7735;static tR=8404;static iR=1701;static sR=38430;static hR=24094;static eR=10153;static nR=56621;static rR=4783;static oR=1341;static lR=16578;static aR=35003;static cR=25239;static EL=9104;static gL=10275;static _L=7595;static CL=3610;static TL=7975;static OL=8526;static vL=918;static bL=38802;static LL=24466;static RL=10145;static SL=58654;static ML=5027;static kL=1457;static xL=16565;static DL=34991;static NL=25486;static fR=4626;static uR=11146;static dR=6439;static wR=12;static yR=4758;static AR=10270;static TR=4574;static pR=4550;static mR=4537;static IR=5681;static ER=5673;static gR=5790;static _R=6806;static CR=8076}},8950:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(4474);class e extends h.A{static Mc=new Int32Array;static RC=0;static SC=0;static top=0;static bottom=0;static left=0;static right=0;static uL=0;static dS=0;static wS=0;static bind=(t,i,s)=>{this.Mc=t,this.RC=i,this.SC=s,this.Hl(0,0,i,s)};static ud=()=>{this.left=0,this.top=0,this.right=this.RC,this.bottom=this.SC,this.uL=this.right-1,this.dS=this.right/2|0};static Hl=(t,i,s,h)=>{t<0&&(t=0),i<0&&(i=0),s>this.RC&&(s=this.RC),h>this.SC&&(h=this.SC),this.top=i,this.bottom=h,this.left=t,this.right=s,this.uL=this.right-1,this.dS=this.right/2|0,this.wS=this.bottom/2|0};static clear=()=>{const t=this.RC*this.SC;for(let i=0;i{this.Sl(t,i,e,s),this.Sl(t,i+h-1,e,s),this.Ll(t,i,e,h),this.Ll(t+s-1,i,e,h)};static Sl=(t,i,s,h)=>{if(i=this.bottom)return;tthis.right&&(h=this.right-t);const e=t+i*this.RC;for(let t=0;t{if(t=this.right)return;ithis.bottom&&(h=this.bottom-i);const e=t+i*this.RC;for(let t=0;t{const n=Math.abs(s-t),r=Math.abs(h-i),o=t=this.left&&t=this.top&&i-r&&(a-=r,t+=o),s{tthis.right&&(s=this.right-t),i+h>this.bottom&&(h=this.bottom-i);const n=this.RC-s;let r=t+i*this.RC;for(let t=-h;t<0;t++){for(let t=-s;t<0;t++)this.Mc[r++]=e;r+=n}};static yS(t,i,s,h,e,n){tthis.right&&(s=this.right-t),i+h>this.bottom&&(h=this.bottom-i);const r=256-n,o=(e>>16&255)*n,l=(e>>8&255)*n,a=(255&e)*n,c=this.RC-s;let f=t+i*this.RC;for(let t=0;t>16&255)*r>>8<<16)+(l+(this.Mc[f]>>8&255)*r>>8<<8)+(a+(255&this.Mc[f])*r>>8);this.Mc[f++]=t}f+=c}}static AS(t,i,s,h,e){const n=256-e,r=(h>>16&255)*e,o=(h>>8&255)*e,l=(255&h)*e;let a=i-s;a<0&&(a=0);let c=i+s;c>=this.SC&&(c=this.SC-1);for(let h=a;h<=c;h++){const e=h-i,a=0|Math.sqrt(s*s-e*e);let c=t-a;c<0&&(c=0);let f=t+a;f>=this.RC&&(f=this.RC-1);let u=c+h*this.RC;for(let t=c;t<=f;t++){const t=(r+(this.Mc[u]>>16&255)*n>>8<<16)+(o+(this.Mc[u]>>8&255)*n>>8<<8)+(l+(255&this.Mc[u])*n>>8);this.Mc[u++]=t}}}static pS=(t,i,s)=>{t=this.right||i=this.bottom||(this.Mc[t+i*this.RC]=s)}}},4583:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(8950),e=s(1673),n=s(3867);class r extends h.A{static vt=!1;static mS=new Int32Array(512);static IS=new Int32Array(2048);static sin=new Int32Array(2048);static cos=new Int32Array(2048);static palette=new Int32Array(65536);static xE=new n.Ns(50,null);static ES=0;static xc=new Int32Array;static Sa=0;static Ma=0;static MC=!0;static fL=!1;static alpha=0;static gS=null;static _S=new n.Ns(50,null);static CS=0;static wu=0;static kE=new Int32Array(50);static TS=new n.Ns(50,null);static OS=!1;static vS=new n.Ns(50,!1);static bS=new Int32Array(50);static{for(let t=1;t<512;t++)this.mS[t]=32768/t|0;for(let t=1;t<2048;t++)this.IS[t]=65536/t|0;for(let t=0;t<2048;t++)this.sin[t]=65536*Math.sin(.0030679615757712823*t)|0,this.cos[t]=65536*Math.cos(.0030679615757712823*t)|0}static Zo=()=>{this.mS=null,this.mS=null,this.sin=null,this.cos=null,this.xc=null,this.xE=null,this.vS=null,this.bS=null,this.gS=null,this._S=null,this.kE=null,this.palette=null,this.TS=null,console.log('Draw3D unloaded!')};static eg=()=>{this.xc=new Int32Array(h.A.SC);for(let t=0;t{this.xc=new Int32Array(i);for(let s=0;s{this.gS=null,this._S.fill(null)};static bc=t=>{this.ES=0;for(let i=0;i<50;i++)try{this.xE[i]=e.A.Ic(t,i.toString()),this.vt&&128===this.xE[i]?.oa?this.xE[i]?.LS():this.xE[i]?.PC(),this.ES++}catch(t){}};static gO=t=>{if(0!==this.bS[t])return this.bS[t];const i=this.TS[t];if(!i)return 0;let s=0,h=0,e=0;const n=i.length;for(let t=0;t>16&255,h+=i[t]>>8&255,e+=255&i[t];let r=(s/n<<16)+(h/n<<8)+(e/n|0);return r=this.RS(r,1.4),0===r&&(r=1),this.bS[t]=r,r};static Lc=t=>{const i=t+.03*Math.random()-.015;let s=0;for(let t=0;t<512;t++){const h=(t/8|0)/64+.0078125,e=(7&t)/8+.0625;for(let t=0;t<128;t++){const n=t/128;let r=n,o=n,l=n;if(0!==e){let t;t=n<.5?n*(e+1):n+e-n*e;const i=2*n-t;let s=h+.3333333333333333;s>1&&s--;let a=h-.3333333333333333;a<0&&a++,r=6*s<1?i+6*(t-i)*s:2*s<1?t:3*s<2?i+(t-i)*(.6666666666666666-s)*6:i,o=6*h<1?i+6*(t-i)*h:2*h<1?t:3*h<2?i+(t-i)*(.6666666666666666-h)*6:i,l=6*a<1?i+6*(t-i)*a:2*a<1?t:3*a<2?i+(t-i)*(.6666666666666666-a)*6:i}const a=((256*r|0)<<16)+((256*o|0)<<8)+(256*l|0);this.palette[s++]=this.RS(a,i)}}for(let t=0;t<50;t++){const s=this.xE[t];if(!s)continue;const h=s.palette;this.TS[t]=new Int32Array(h.length);for(let s=0;s{const s=(t>>16)/256,h=(t>>8&255)/256,e=(255&t)/256;return((256*Math.pow(s,i)|0)<<16)+((256*Math.pow(h,i)|0)<<8)+(256*Math.pow(e,i)|0)};static Rc=t=>{this.gS||(this.CS=t,this.vt?this.gS=new n.wr(t,16384):this.gS=new n.wr(t,65536),this._S.fill(null))};static wL=(t,i,s,e,n,o,l,a,c)=>{let f=0,u=0;n!==e&&(f=(i-t<<16)/(n-e)|0,u=(a-l<<15)/(n-e)|0);let d=0,w=0;o!==n&&(d=(s-i<<16)/(o-n)|0,w=(c-a<<15)/(o-n)|0);let y=0,A=0;if(o!==e&&(y=(t-s<<16)/(e-o)|0,A=(l-c<<15)/(e-o)|0),e<=n&&e<=o){if(eh.A.bottom&&(n=h.A.bottom),o>h.A.bottom&&(o=h.A.bottom),nd)for(o-=n,n-=e,e=r.xc[e];;){if(--n<0)for(;;){if(--o<0)return;this.SS(s>>16,i>>16,c>>7,a>>7,h.A.Mc,e,0),s+=y,i+=d,c+=A,a+=w,e+=h.A.RC}this.SS(s>>16,t>>16,c>>7,l>>7,h.A.Mc,e,0),s+=y,t+=f,c+=A,l+=u,e+=h.A.RC}else for(o-=n,n-=e,e=r.xc[e];;){if(--n<0)for(;;){if(--o<0)return;this.SS(i>>16,s>>16,a>>7,c>>7,h.A.Mc,e,0),s+=y,i+=d,c+=A,a+=w,e+=h.A.RC}this.SS(t>>16,s>>16,l>>7,c>>7,h.A.Mc,e,0),s+=y,t+=f,c+=A,l+=u,e+=h.A.RC}else if(i=t<<=16,a=l<<=15,e<0&&(i-=y*e,t-=f*e,a-=A*e,l-=u*e,e=0),s<<=16,c<<=15,o<0&&(s-=d*o,c-=w*o,o=0),e!==o&&yf)for(n-=o,o-=e,e=r.xc[e];;){if(--o<0)for(;;){if(--n<0)return;this.SS(s>>16,t>>16,c>>7,l>>7,h.A.Mc,e,0),s+=d,t+=f,c+=w,l+=u,e+=h.A.RC}this.SS(i>>16,t>>16,a>>7,l>>7,h.A.Mc,e,0),i+=y,t+=f,a+=A,l+=u,e+=h.A.RC}else for(n-=o,o-=e,e=r.xc[e];;){if(--o<0)for(;;){if(--n<0)return;this.SS(t>>16,s>>16,l>>7,c>>7,h.A.Mc,e,0),s+=d,t+=f,c+=w,l+=u,e+=h.A.RC}this.SS(t>>16,i>>16,l>>7,a>>7,h.A.Mc,e,0),i+=y,t+=f,a+=A,l+=u,e+=h.A.RC}}else if(n<=o){if(nh.A.bottom&&(o=h.A.bottom),e>h.A.bottom&&(e=h.A.bottom),oy)for(e-=o,o-=n,n=r.xc[n];;){if(--o<0)for(;;){if(--e<0)return;this.SS(t>>16,s>>16,l>>7,c>>7,h.A.Mc,n,0),t+=f,s+=y,l+=u,c+=A,n+=h.A.RC}this.SS(t>>16,i>>16,l>>7,a>>7,h.A.Mc,n,0),t+=f,i+=d,l+=u,a+=w,n+=h.A.RC}else for(e-=o,o-=n,n=r.xc[n];;){if(--o<0)for(;;){if(--e<0)return;this.SS(s>>16,t>>16,c>>7,l>>7,h.A.Mc,n,0),t+=f,s+=y,l+=u,c+=A,n+=h.A.RC}this.SS(i>>16,t>>16,a>>7,l>>7,h.A.Mc,n,0),t+=f,i+=d,l+=u,a+=w,n+=h.A.RC}else if(s=i<<=16,c=a<<=15,n<0&&(s-=f*n,i-=d*n,c-=u*n,a-=w*n,n=0),t<<=16,l<<=15,e<0&&(t-=y*e,l-=A*e,e=0),o-=e,e-=n,n=r.xc[n],f>16,i>>16,l>>7,a>>7,h.A.Mc,n,0),t+=y,i+=d,l+=A,a+=w,n+=h.A.RC}this.SS(s>>16,i>>16,c>>7,a>>7,h.A.Mc,n,0),s+=f,i+=d,c+=u,a+=w,n+=h.A.RC}else for(;;){if(--e<0)for(;;){if(--o<0)return;this.SS(i>>16,t>>16,a>>7,l>>7,h.A.Mc,n,0),t+=y,i+=d,l+=A,a+=w,n+=h.A.RC}this.SS(i>>16,s>>16,a>>7,c>>7,h.A.Mc,n,0),s+=f,i+=d,c+=u,a+=w,n+=h.A.RC}}else if(oh.A.bottom&&(e=h.A.bottom),n>h.A.bottom&&(n=h.A.bottom),e>16,t>>16,a>>7,l>>7,h.A.Mc,o,0),i+=d,t+=f,a+=w,l+=u,o+=h.A.RC}this.SS(i>>16,s>>16,a>>7,c>>7,h.A.Mc,o,0),i+=d,s+=y,a+=w,c+=A,o+=h.A.RC}else for(;;){if(--e<0)for(;;){if(--n<0)return;this.SS(t>>16,i>>16,l>>7,a>>7,h.A.Mc,o,0),i+=d,t+=f,a+=w,l+=u,o+=h.A.RC}this.SS(s>>16,i>>16,c>>7,a>>7,h.A.Mc,o,0),i+=d,s+=y,a+=w,c+=A,o+=h.A.RC}else if(t=s<<=16,l=c<<=15,o<0&&(t-=d*o,s-=y*o,l-=w*o,c-=A*o,o=0),i<<=16,a<<=15,n<0&&(i-=f*n,a-=u*n,n=0),e-=n,n-=o,o=r.xc[o],d>16,s>>16,a>>7,c>>7,h.A.Mc,o,0),i+=f,s+=y,a+=u,c+=A,o+=h.A.RC}this.SS(t>>16,s>>16,l>>7,c>>7,h.A.Mc,o,0),t+=d,s+=y,l+=w,c+=A,o+=h.A.RC}else for(;;){if(--n<0)for(;;){if(--e<0)return;this.SS(s>>16,i>>16,c>>7,a>>7,h.A.Mc,o,0),i+=f,s+=y,a+=u,c+=A,o+=h.A.RC}this.SS(s>>16,t>>16,c>>7,l>>7,h.A.Mc,o,0),t+=d,s+=y,l+=w,c+=A,o+=h.A.RC}};static SS=(t,i,s,e,n,o,l)=>{let a;if(r.MC){let c;if(r.fL){if(c=i-t>3?(e-s)/(i-t)|0:0,i>h.A.uL&&(i=h.A.uL),t<0&&(s-=t*c,t=0),t>=i)return;o+=t,l=i-t>>2,c<<=2}else{if(!(t>2)>0?(e-s)*r.mS[l]>>15:0}if(0===r.alpha)for(;;){if(--l<0){if((l=i-t&3)>0){a=r.palette[s>>8];do{n[o++]=a,l--}while(l>0);return}break}a=r.palette[s>>8],s+=c,n[o++]=a,n[o++]=a,n[o++]=a,n[o++]=a}else{const h=r.alpha,e=256-r.alpha;for(;;){if(--l<0){if((l=i-t&3)>0){a=r.palette[s>>8],a=((16711935&a)*e>>8&16711935)+((65280&a)*e>>8&65280);do{n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280),l--}while(l>0)}break}a=r.palette[s>>8],s+=c,a=((16711935&a)*e>>8&16711935)+((65280&a)*e>>8&65280),n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280),n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280),n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280),n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280)}}}else if(th.A.uL&&(i=h.A.uL),t<0&&(s-=t*c,t=0),t>=i))return;if(o+=t,l=i-t,0===r.alpha)do{n[o++]=r.palette[s>>8],s+=c,l--}while(l>0);else{const t=r.alpha,i=256-r.alpha;do{a=r.palette[s>>8],s+=c,a=((16711935&a)*i>>8&16711935)+((65280&a)*i>>8&65280),n[o++]=a+((16711935&n[o])*t>>8&16711935)+((65280&n[o])*t>>8&65280),l--}while(l>0)}}};static MS=(t,i,s,e,n,r,o)=>{let l=0;n!==e&&(l=(i-t<<16)/(n-e)|0);let a=0;r!==n&&(a=(s-i<<16)/(r-n)|0);let c=0;if(r!==e&&(c=(t-s<<16)/(e-r)|0),e<=n&&e<=r){if(eh.A.bottom&&(n=h.A.bottom),r>h.A.bottom&&(r=h.A.bottom),na)for(r-=n,n-=e,e=this.xc[e];;){if(--n<0)for(;;){if(--r<0)return;this.kS(s>>16,i>>16,h.A.Mc,e,o),s+=c,i+=a,e+=h.A.RC}this.kS(s>>16,t>>16,h.A.Mc,e,o),s+=c,t+=l,e+=h.A.RC}else for(r-=n,n-=e,e=this.xc[e];;){if(--n<0)for(;;){if(--r<0)return;this.kS(i>>16,s>>16,h.A.Mc,e,o),s+=c,i+=a,e+=h.A.RC}this.kS(t>>16,s>>16,h.A.Mc,e,o),s+=c,t+=l,e+=h.A.RC}else if(i=t<<=16,e<0&&(i-=c*e,t-=l*e,e=0),s<<=16,r<0&&(s-=a*r,r=0),e!==r&&cl)for(n-=r,r-=e,e=this.xc[e];;){if(--r<0)for(;;){if(--n<0)return;this.kS(s>>16,t>>16,h.A.Mc,e,o),s+=a,t+=l,e+=h.A.RC}this.kS(i>>16,t>>16,h.A.Mc,e,o),i+=c,t+=l,e+=h.A.RC}else for(n-=r,r-=e,e=this.xc[e];;){if(--r<0)for(;;){if(--n<0)return;this.kS(t>>16,s>>16,h.A.Mc,e,o),s+=a,t+=l,e+=h.A.RC}this.kS(t>>16,i>>16,h.A.Mc,e,o),i+=c,t+=l,e+=h.A.RC}}else if(n<=r){if(nh.A.bottom&&(r=h.A.bottom),e>h.A.bottom&&(e=h.A.bottom),rc)for(e-=r,r-=n,n=this.xc[n];;){if(--r<0)for(;;){if(--e<0)return;this.kS(t>>16,s>>16,h.A.Mc,n,o),t+=l,s+=c,n+=h.A.RC}this.kS(t>>16,i>>16,h.A.Mc,n,o),t+=l,i+=a,n+=h.A.RC}else for(e-=r,r-=n,n=this.xc[n];;){if(--r<0)for(;;){if(--e<0)return;this.kS(s>>16,t>>16,h.A.Mc,n,o),t+=l,s+=c,n+=h.A.RC}this.kS(i>>16,t>>16,h.A.Mc,n,o),t+=l,i+=a,n+=h.A.RC}else if(s=i<<=16,n<0&&(s-=l*n,i-=a*n,n=0),t<<=16,e<0&&(t-=c*e,e=0),l>16,i>>16,h.A.Mc,n,o),t+=c,i+=a,n+=h.A.RC}this.kS(s>>16,i>>16,h.A.Mc,n,o),s+=l,i+=a,n+=h.A.RC}else for(r-=e,e-=n,n=this.xc[n];;){if(--e<0)for(;;){if(--r<0)return;this.kS(i>>16,t>>16,h.A.Mc,n,o),t+=c,i+=a,n+=h.A.RC}this.kS(i>>16,s>>16,h.A.Mc,n,o),s+=l,i+=a,n+=h.A.RC}}else if(rh.A.bottom&&(e=h.A.bottom),n>h.A.bottom&&(n=h.A.bottom),e>16,t>>16,h.A.Mc,r,o),i+=a,t+=l,r+=h.A.RC}this.kS(i>>16,s>>16,h.A.Mc,r,o),i+=a,s+=c,r+=h.A.RC}else for(n-=e,e-=r,r=this.xc[r];;){if(--e<0)for(;;){if(--n<0)return;this.kS(t>>16,i>>16,h.A.Mc,r,o),i+=a,t+=l,r+=h.A.RC}this.kS(s>>16,i>>16,h.A.Mc,r,o),i+=a,s+=c,r+=h.A.RC}else if(t=s<<=16,r<0&&(t-=a*r,s-=c*r,r=0),i<<=16,n<0&&(i-=l*n,n=0),a>16,s>>16,h.A.Mc,r,o),i+=l,s+=c,r+=h.A.RC}this.kS(t>>16,s>>16,h.A.Mc,r,o),t+=a,s+=c,r+=h.A.RC}else for(e-=n,n-=r,r=this.xc[r];;){if(--n<0)for(;;){if(--e<0)return;this.kS(s>>16,i>>16,h.A.Mc,r,o),i+=l,s+=c,r+=h.A.RC}this.kS(s>>16,t>>16,h.A.Mc,r,o),t+=a,s+=c,r+=h.A.RC}};static pL=(t,i,s,e,n,r,o,l,a,c,f,u,d,w,y,A,p,m,I)=>{const E=this.xS(I);this.OS=!this.vS[I];const g=c-d,_=f-y,C=u-p,T=w-c,O=A-f,v=m-u;let b=T*f-O*c<<14;const L=O*u-v*f<<8,R=v*c-T*u<<5;let S=g*f-_*c<<14;const M=_*u-C*f<<8,k=C*c-g*u<<5;let x=_*T-g*O<<14;const D=C*O-_*v<<8,N=g*v-C*T<<5;let P=0,F=0;n!==e&&(P=(i-t<<16)/(n-e)|0,F=(l-o<<16)/(n-e)|0);let U=0,B=0;r!==n&&(U=(s-i<<16)/(r-n)|0,B=(a-l<<16)/(r-n)|0);let G=0,H=0;if(r!==e&&(G=(t-s<<16)/(e-r)|0,H=(o-a<<16)/(e-r)|0),e<=n&&e<=r){if(eh.A.bottom&&(n=h.A.bottom),r>h.A.bottom&&(r=h.A.bottom),nU)for(r-=n,n-=e,e=this.xc[e];;){if(--n<0)for(;;){if(--r<0)return;this.DS(s>>16,i>>16,h.A.Mc,e,E,0,0,b,S,x,L,M,D,a>>8,l>>8),s+=G,i+=U,a+=H,l+=B,e+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(s>>16,t>>16,h.A.Mc,e,E,0,0,b,S,x,L,M,D,a>>8,o>>8),s+=G,t+=P,a+=H,o+=F,e+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(r-=n,n-=e,e=this.xc[e];;){if(--n<0)for(;;){if(--r<0)return;this.DS(i>>16,s>>16,h.A.Mc,e,E,0,0,b,S,x,L,M,D,l>>8,a>>8),s+=G,i+=U,a+=H,l+=B,e+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(t>>16,s>>16,h.A.Mc,e,E,0,0,b,S,x,L,M,D,o>>8,a>>8),s+=G,t+=P,a+=H,o+=F,e+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}else{i=t<<=16,l=o<<=16,e<0&&(i-=G*e,t-=P*e,l-=H*e,o-=F*e,e=0),s<<=16,a<<=16,r<0&&(s-=U*r,a-=B*r,r=0);const c=e-this.Ma;if(b+=R*c,S+=k*c,x+=N*c,b|=0,S|=0,x|=0,(e===r||G>=P)&&(e!==r||U<=P))for(n-=r,r-=e,e=this.xc[e];;){if(--r<0)for(;;){if(--n<0)return;this.DS(t>>16,s>>16,h.A.Mc,e,E,0,0,b,S,x,L,M,D,o>>8,a>>8),s+=U,t+=P,a+=B,o+=F,e+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(t>>16,i>>16,h.A.Mc,e,E,0,0,b,S,x,L,M,D,o>>8,l>>8),i+=G,t+=P,l+=H,o+=F,e+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(n-=r,r-=e,e=this.xc[e];;){if(--r<0)for(;;){if(--n<0)return;this.DS(s>>16,t>>16,h.A.Mc,e,E,0,0,b,S,x,L,M,D,a>>8,o>>8),s+=U,t+=P,a+=B,o+=F,e+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(i>>16,t>>16,h.A.Mc,e,E,0,0,b,S,x,L,M,D,l>>8,o>>8),i+=G,t+=P,l+=H,o+=F,e+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}}else if(n<=r){if(nh.A.bottom&&(r=h.A.bottom),e>h.A.bottom&&(e=h.A.bottom),rG)for(e-=r,r-=n,n=this.xc[n];;){if(--r<0)for(;;){if(--e<0)return;this.DS(t>>16,s>>16,h.A.Mc,n,E,0,0,b,S,x,L,M,D,o>>8,a>>8),t+=P,s+=G,o+=F,a+=H,n+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(t>>16,i>>16,h.A.Mc,n,E,0,0,b,S,x,L,M,D,o>>8,l>>8),t+=P,i+=U,o+=F,l+=B,n+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(e-=r,r-=n,n=this.xc[n];;){if(--r<0)for(;;){if(--e<0)return;this.DS(s>>16,t>>16,h.A.Mc,n,E,0,0,b,S,x,L,M,D,a>>8,o>>8),t+=P,s+=G,o+=F,a+=H,n+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(i>>16,t>>16,h.A.Mc,n,E,0,0,b,S,x,L,M,D,l>>8,o>>8),t+=P,i+=U,o+=F,l+=B,n+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}else{s=i<<=16,a=l<<=16,n<0&&(s-=P*n,i-=U*n,a-=F*n,l-=B*n,n=0),t<<=16,o<<=16,e<0&&(t-=G*e,o-=H*e,e=0);const c=n-this.Ma;if(b+=R*c,S+=k*c,x+=N*c,b|=0,S|=0,x|=0,r-=e,e-=n,n=this.xc[n],P>16,i>>16,h.A.Mc,n,E,0,0,b,S,x,L,M,D,o>>8,l>>8),t+=G,i+=U,o+=H,l+=B,n+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(s>>16,i>>16,h.A.Mc,n,E,0,0,b,S,x,L,M,D,a>>8,l>>8),s+=P,i+=U,a+=F,l+=B,n+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(;;){if(--e<0)for(;;){if(--r<0)return;this.DS(i>>16,t>>16,h.A.Mc,n,E,0,0,b,S,x,L,M,D,l>>8,o>>8),t+=G,i+=U,o+=H,l+=B,n+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(i>>16,s>>16,h.A.Mc,n,E,0,0,b,S,x,L,M,D,l>>8,a>>8),s+=P,i+=U,a+=F,l+=B,n+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}}else if(rh.A.bottom&&(e=h.A.bottom),n>h.A.bottom&&(n=h.A.bottom),e>16,t>>16,h.A.Mc,r,E,0,0,b,S,x,L,M,D,l>>8,o>>8),i+=U,t+=P,l+=B,o+=F,r+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(i>>16,s>>16,h.A.Mc,r,E,0,0,b,S,x,L,M,D,l>>8,a>>8),i+=U,s+=G,l+=B,a+=H,r+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(;;){if(--e<0)for(;;){if(--n<0)return;this.DS(t>>16,i>>16,h.A.Mc,r,E,0,0,b,S,x,L,M,D,o>>8,l>>8),i+=U,t+=P,l+=B,o+=F,r+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(s>>16,i>>16,h.A.Mc,r,E,0,0,b,S,x,L,M,D,a>>8,l>>8),i+=U,s+=G,l+=B,a+=H,r+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}else{t=s<<=16,o=a<<=16,r<0&&(t-=U*r,s-=G*r,o-=B*r,a-=H*r,r=0),i<<=16,l<<=16,n<0&&(i-=P*n,l-=F*n,n=0);const c=r-this.Ma;if(b+=R*c,S+=k*c,x+=N*c,b|=0,S|=0,x|=0,e-=n,n-=r,r=this.xc[r],U>16,s>>16,h.A.Mc,r,E,0,0,b,S,x,L,M,D,l>>8,a>>8),i+=P,s+=G,l+=F,a+=H,r+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(t>>16,s>>16,h.A.Mc,r,E,0,0,b,S,x,L,M,D,o>>8,a>>8),t+=U,s+=G,o+=B,a+=H,r+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(;;){if(--n<0)for(;;){if(--e<0)return;this.DS(s>>16,i>>16,h.A.Mc,r,E,0,0,b,S,x,L,M,D,a>>8,l>>8),i+=P,s+=G,l+=F,a+=H,r+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.DS(s>>16,t>>16,h.A.Mc,r,E,0,0,b,S,x,L,M,D,a>>8,o>>8),t+=U,s+=G,o+=B,a+=H,r+=h.A.RC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}};static DS=(t,i,s,e,n,r,o,l,a,c,f,u,d,w,y)=>{if(t>=i)return;let A,p,m,I,E,g,_,C,T;if(this.fL){if(A=(y-w)/(i-t)|0,i>h.A.uL&&(i=h.A.uL),t<0&&(w-=t*A,t=0),t>=i)return;p=i-t>>3,A<<=12}else i-t>7?(p=i-t>>3,A=(y-w)*this.mS[p]>>6):(p=0,A=0);if(w<<=9,e+=t,this.vt&&n)if(m=0,I=0,g=t-this.Sa,l+=(f>>3)*g,a+=(u>>3)*g,c+=(d>>3)*g,l|=0,a|=0,E=(c|=0)>>12,0!==E&&(o=a/E|0,(r=l/E|0)<0?r=0:r>4032&&(r=4032)),l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>12,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>4032&&(m=4032)),_=m-r>>3,C=I-o>>3,r+=w>>3&786432,T=w>>23,this.OS){for(;p-- >0;)s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r=m,o=I,l+=f,a+=u,E=(c+=d)>>12,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>4032&&(m=4032)),_=m-r>>3,C=I-o>>3,r+=(w+=A)>>3&786432,T=w>>23;for(p=i-t&7;p-- >0;)s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C}else{for(;p-- >0;){let t;0!=(t=n[(4032&o)+(r>>6)]>>>T)&&(s[e]=t),e+=1,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e+=1,r=m,o=I,l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>12,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>4032&&(m=4032)),_=m-r>>3,C=I-o>>3,r+=(w+=A)>>3&786432,T=w>>23}for(p=i-t&7;p-- >0;){let t;0!=(t=n[(4032&o)+(r>>6)]>>>T)&&(s[e]=t),e++,r+=_,o+=C}}else if(m=0,I=0,g=t-this.Sa,l+=(f>>3)*g,a+=(u>>3)*g,c+=(d>>3)*g,l|=0,a|=0,E=(c|=0)>>14,0!==E&&(o=a/E|0,(r=l/E|0)<0?r=0:r>16256&&(r=16256)),l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>14,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>16256&&(m=16256)),_=m-r>>3,C=I-o>>3,r+=6291456&w,T=w>>23,this.OS&&n){for(;p-- >0;)s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r=m,o=I,l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>14,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>16256&&(m=16256)),_=m-r>>3,C=I-o>>3,r+=6291456&(w+=A),T=w>>23;for(p=i-t&7;p-- >0;)s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C}else{for(;p-- >0&&n;){let t;0!=(t=n[(16256&o)+(r>>7)]>>>T)&&(s[e]=t),e+=1,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,r=m,o=I,l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>14,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>16256&&(m=16256)),_=m-r>>3,C=I-o>>3,r+=6291456&(w+=A),T=w>>23}for(p=i-t&7;p-- >0&&n;){let t;0!=(t=n[(16256&o)+(r>>7)]>>>T)&&(s[e]=t),e++,r+=_,o+=C}}};static kS=(t,i,s,e,n)=>{if(this.fL&&(i>h.A.uL&&(i=h.A.uL),t<0&&(t=0)),t>=i)return;e+=t;let r=i-t>>2;if(0===this.alpha)for(;;){if(r--,r<0)for(r=i-t&3;;){if(r--,r<0)return;s[e++]=n}s[e++]=n,s[e++]=n,s[e++]=n,s[e++]=n}const o=this.alpha,l=256-this.alpha;for(n=((16711935&n)*l>>8&16711935)+((65280&n)*l>>8&65280);;){if(r--,r<0)for(r=i-t&3;;){if(r--,r<0)return;s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280)}s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280),s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280),s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280),s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280)}};static DE=t=>{this._S[t]&&this.gS&&(this.gS[this.CS++]=this._S[t],this._S[t]=null)};static xS=t=>{if(this.kE[t]=this.wu++,this._S[t])return this._S[t];let i;if(this.CS>0&&this.gS)i=this.gS[--this.CS],this.gS[this.CS]=null;else{let t=0,s=-1;for(let i=0;i>>3)&16316671,i[e+8192]=n-(n>>>2)&16316671,i[e+12288]=n-(n>>>2)-(n>>>3)&16316671}}else{if(64===s.width)for(let t=0;t<128;t++)for(let e=0;e<128;e++)i[e+(t<<7)]=h[s.Mc[(e>>1)+(t>>1<<6)]];else for(let t=0;t<16384;t++)i[t]=h[s.Mc[t]];this.vS[t]=!1;for(let s=0;s<16384;s++){i[s]&=16316671;const h=i[s];0===h&&(this.vS[t]=!0),i[s+16384]=h-(h>>>3)&16316671,i[s+32768]=h-(h>>>2)&16316671,i[s+49152]=h-(h>>>2)-(h>>>3)&16316671}}return i}}},8665:(t,i,s)=>{s.d(i,{A:()=>f});var h=s(1069),e=s(8950),n=s(4583),r=s(6730),o=s(4474),l=s(3867);class a{rC=0;Kb=0;NS=0;PS=-1;US=-1;BS=-1;GS=-1;HS=-1;WS=-1;YS=-1;VS=-1;KS=-1;XS=0;zS=-1;jS=-1;ZS=-1;data=null}class c{x=0;y=0;z=0;w=0}class f extends o.A{static metadata=null;static head=null;static qS=null;static $S=null;static JS=null;static QS=null;static tM=null;static iM=null;static sM=null;static hM=null;static eM=null;static nM=null;static rM=null;static oM=null;static axis=null;static lM=new l.Ns(4096,!1);static aM=new l.Ns(4096,!1);static cM=new Int32Array(4096);static fM=new Int32Array(4096);static uM=new Int32Array(4096);static dM=new Int32Array(4096);static wM=new Int32Array(4096);static yM=new Int32Array(4096);static AM=new Int32Array(1500);static pM=new l.wr(1500,512);static mM=new Int32Array(12);static IM=new l.wr(12,2e3);static EM=new Int32Array(2e3);static gM=new Int32Array(2e3);static _M=new Int32Array(12);static CM=new Int32Array(10);static TM=new Int32Array(10);static OM=new Int32Array(10);static Hn=0;static vM=0;static Wn=0;static yu=!1;static ea=0;static na=0;static Au=0;static Fm=new Int32Array(1e3);static bM=!1;static Sc(t){try{f.head=new h.A(t.read('ob_head.dat')),f.qS=new h.A(t.read('ob_face1.dat')),f.$S=new h.A(t.read('ob_face2.dat')),f.JS=new h.A(t.read('ob_face3.dat')),f.QS=new h.A(t.read('ob_face4.dat')),f.tM=new h.A(t.read('ob_face5.dat')),f.iM=new h.A(t.read('ob_point1.dat')),f.sM=new h.A(t.read('ob_point2.dat')),f.hM=new h.A(t.read('ob_point3.dat')),f.eM=new h.A(t.read('ob_point4.dat')),f.nM=new h.A(t.read('ob_point5.dat')),f.rM=new h.A(t.read('ob_vertex1.dat')),f.oM=new h.A(t.read('ob_vertex2.dat')),f.axis=new h.A(t.read('ob_axis.dat')),f.head.ft=0,f.iM.ft=0,f.sM.ft=0,f.hM.ft=0,f.eM.ft=0,f.rM.ft=0,f.oM.ft=0;const i=f.head.ct;f.metadata=new l.Ns(i+100,null);let s=0,e=0,n=0,r=0,o=0,c=0,u=0;for(let t=0;t>7)<2?i=2:i>126&&(i=126),(65408&t)+i):(i<0?i=0:i>127&&(i=127),127-i)}static nC=(t,i,s)=>{const h=t.rC,e=t.Kb,n=t.NS;let r,o,a,u,d;if(i){r=new Int32Array(h);for(let i=0;i{const e=t.rC,n=t.Kb,r=t.NS;let o,l,a,c,u;if(h)o=t.oC,l=t.aC,a=t.lC;else{o=new Int32Array(e),l=new Int32Array(e),a=new Int32Array(e);for(let i=0;i{const s=t.rC,h=t.Kb,e=t.NS,n=new Int32Array(s),r=new Int32Array(s),o=new Int32Array(s);for(let i=0;i{let s=!1,h=!1,e=!1,n=!1,r=0,o=0,l=0,a=-1;for(let c=0;c{let s=!1,h=!1,e=!1,n=!1,r=0,o=0,l=0,a=-1;for(let c=0;c{let o=-1;const l=t.oC[i],a=t.aC[i],c=t.lC[i];for(let t=0;t{if(!f.metadata)throw new Error('cant loading model metadata!!!!!');const i=f.metadata[t];if(!i)throw console.log(`Error model:${t} not found!`),new Error('cant loading model metadata!!!!!');if(!(f.head&&f.qS&&f.$S&&f.JS&&f.QS&&f.tM&&f.iM&&f.sM&&f.hM&&f.eM&&f.nM&&f.rM&&f.oM&&f.axis))throw new Error('cant loading model!!!!!');const s=i.rC,h=i.Kb,e=i.NS,n=new Int32Array(s),r=new Int32Array(s),o=new Int32Array(s),l=new Int32Array(h),a=new Int32Array(h),c=new Int32Array(h),u=new Int32Array(e),d=new Int32Array(e),w=new Int32Array(e);let y=null;i.HS>=0&&(y=new Int32Array(s));let A=null;i.KS>=0&&(A=new Int32Array(h));let p=null,m=0;i.XS>=0?p=new Int32Array(h):m=-i.XS-1;let I=null;i.zS>=0&&(I=new Int32Array(h));let E=null;i.jS>=0&&(E=new Int32Array(h));const g=new Int32Array(h);f.iM.ft=i.PS,f.sM.ft=i.US,f.hM.ft=i.BS,f.eM.ft=i.GS,f.nM.ft=i.HS;let _,C,T,O=0,v=0,b=0;for(let t=0;t{if(!f.metadata||!f.metadata[i])throw new Error('No model metadata');const s=f.metadata[i];if(s.data=t,!s.data.length)throw new Error('No model data');const e=s.rC,n=s.Kb,r=s.NS,o=new Int32Array(e),l=new Int32Array(e),a=new Int32Array(e),c=new Int32Array(n),u=new Int32Array(n),d=new Int32Array(n),w=new Int32Array(r),y=new Int32Array(r),A=new Int32Array(r);let p=null;s.HS>=0&&(p=new Int32Array(e));let m=null;s.KS>=0&&(m=new Int32Array(n));let I=null,E=0;s.XS>=0?I=new Int32Array(n):E=-s.XS-1;let g=null;s.zS>=0&&(g=new Int32Array(n));let _=null;s.jS>=0&&(_=new Int32Array(n));const C=new Int32Array(n),T=new h.A(s.data);T.ft=s.PS;const O=new h.A(s.data);O.ft=s.US;const v=new h.A(s.data);v.ft=s.BS;const b=new h.A(s.data);b.ft=s.GS;const L=new h.A(s.data);L.ft=s.HS;let R,S,M,k=0,x=0,D=0;for(let t=0;tthis.AC&&(this.AC=-s),s>this.GO&&(this.GO=s);const e=i*i+h*h;e>this.bO&&(this.bO=e)}this.bO=Math.sqrt(this.bO)+.99|0,this.BM=Math.sqrt(this.bO*this.bO+this.AC*this.AC)+.99|0,this.UM=this.BM+(Math.sqrt(this.bO*this.bO+this.GO*this.GO)+.99|0)}cC(){this.AC=0,this.GO=0;for(let t=0;tthis.AC&&(this.AC=-i),i>this.GO&&(this.GO=i)}this.BM=Math.sqrt(this.bO*this.bO+this.AC*this.AC)+.99|0,this.UM=this.BM+(Math.sqrt(this.bO*this.bO+this.GO*this.GO)+.99|0)}sc(){if(this.GM){const t=new Int32Array(256);let i=0;for(let s=0;si&&(i=h)}this.dC=new l.Ns(i+1,null);for(let s=0;s<=i;s++)this.dC[s]=new Int32Array(t[s]),t[s]=0;let s=0;for(;si&&(i=h)}this.uC=new l.Ns(i+1,null);for(let s=0;s<=i;s++)this.uC[s]=new Int32Array(t[s]),t[s]=0;let s=0;for(;sl;)l=s[o++];n&&n.types&&h.x&&h.y&&h.z&&n.labels&&(i!==l||0===n.types[i])&&this.KM(h.x[t],h.y[t],h.z[t],n.labels[i],n.types[i])}f.Hn=0,f.vM=0,f.Wn=0,o=0,l=s[o++];for(let t=0;tl;)l=s[o++];n&&n.types&&e.x&&e.y&&e.z&&n.labels&&(i===l||0===n.types[i])&&this.KM(e.x[t],e.y[t],e.z[t],n.labels[i],n.types[i])}}else this.hc(t)}hc(t){if(!this.dC||-1===t||!r.A.Jo[t])return;const i=r.A.Jo[t],s=i.tS;f.Hn=0,f.vM=0,f.Wn=0;for(let t=0;t>16;this.lC[t]=this.aC[t]*i+this.lC[t]*s>>16,this.aC[t]=h}}translate(t,i,s){for(let h=0;h>8;if(this.SM&&this.MM&&this.kM||(this.SM=new Int32Array(this.Kb),this.MM=new Int32Array(this.Kb),this.kM=new Int32Array(this.Kb)),!this.Ub){this.Ub=new l.Ns(this.rC,null);for(let t=0;t8192||p>8192||m>8192||A<-8192||p<-8192||m<-8192;)A>>=1,p>>=1,m>>=1;let I=0|Math.sqrt(A*A+p*p+m*m);if(I<=0&&(I=1),A=256*A/I|0,p=256*p/I|0,m=256*m/I|0,this.Vb&&1&this.Vb[i]){const n=t+((s*A+h*p+e*m)/(r+(r/2|0))|0);this.A_&&(this.SM[i]=f.RM(this.A_[i],n,this.Vb[i]))}else{let t=this.Ub[n];t&&(t.x+=A,t.y+=p,t.z+=m,t.w++),t=this.Ub[o],t&&(t.x+=A,t.y+=p,t.z+=m,t.w++),t=this.Ub[l],t&&(t.x+=A,t.y+=p,t.z+=m,t.w++)}}if(n)this.Hb(t,r,s,h,e);else{this.Yb=new l.Ns(this.rC,null);for(let t=0;t>16;for(let h=0;h>16,E=E*w-I*d>>16,I=m),0!==t&&(m=E*a-g*l>>16,g=E*l+g*a>>16,E=m),0!==i&&(m=g*c+I*u>>16,g=g*u-I*c>>16,I=m),I+=e,E+=r,g+=o,m=E*A-g*y>>16,g=E*y+g*A>>16,E=m,f.cM&&f.fM&&f.uM&&(f.uM[h]=g-p,f.cM[h]=n.A.Sa+((I<<9)/g|0),f.fM[h]=n.A.Ma+((E<<9)/g|0)),this.NS>0&&f.dM&&f.wM&&f.yM&&(f.dM[h]=I,f.wM[h]=E,f.yM[h]=g)}try{this.zM(!1,!1,0)}catch(t){}}draw(t,i,s,h,r,o,l,a,c){const u=a*r-o*h>>16,d=l*i+u*s>>16,w=this.bO*s>>16,y=d+w;if(y<=50||d>=3500)return;const A=a*h+o*r>>16;let p=A-this.bO<<9;if((p/y|0)>=e.A.dS)return;let m=A+this.bO<<9;if((m/y|0)<=-e.A.dS)return;const I=l*s-u*i>>16,E=this.bO*i>>16;let g=I+E<<9;if((g/y|0)<=-e.A.wS)return;let _=I-(E+(this.AC*s>>16))<<9;if((_/y|0)>=e.A.wS)return;let C=d-(w+(this.AC*i>>16))<=50,T=!1;if(c>0&&f.yu){let t=d-w;t<=50&&(t=50),A>0?(p=p/y|0,m=m/t|0):(m=m/y|0,p=p/t|0),I>0?(_=_/y|0,g=g/t|0):(g=g/y|0,_=_/t|0);const i=f.ea-n.A.Sa,s=f.na-n.A.Ma;i>p&&i_&&s>16,w=w*L-c*b>>16,c=n),c+=o,u+=l,w+=a,n=w*h+c*r>>16,w=w*r-c*h>>16,c=n,n=u*s-w*i>>16,w=u*i+w*s>>16,u=n,f.uM&&(f.uM[e]=w-d),w>=50&&f.cM&&f.fM?(f.cM[e]=O+((c<<9)/w|0),f.fM[e]=v+((u<<9)/w|0)):f.cM&&(f.cM[e]=-5e3,C=!0),(C||this.NS>0)&&f.dM&&f.wM&&f.yM&&(f.dM[e]=c,f.wM[e]=u,f.yM[e]=w)}try{this.zM(C,T,c)}catch(t){}}zM(t,i,s,h=!1){f.bM&&(this.YM=-1,this.VM=-1);for(let t=0;te.A.uL||a>e.A.uL||c>e.A.uL),f.pM&&f.AM){const t=((y+A+p)/3|0)+this.BM;f.pM[t][f.AM[t]++]=h,f.bM&&this.jM(f.ea,f.na,u,d,w,l,a,c)&&this.VM=0;t--){const i=f.AM[t];if(!(i<=0)&&f.pM){const s=f.pM[t];for(let t=0;t=0;t--){const i=f.AM[t];if(i>0&&f.pM){const s=f.pM[t];for(let h=0;h0||f.mM[2]>0)&&(n=(f._M[1]+f._M[2])/(f.mM[1]+f.mM[2])|0);let r=0;f.mM&&f._M&&(f.mM[3]>0||f.mM[4]>0)&&(r=(f._M[3]+f._M[4])/(f.mM[3]+f.mM[4])|0);let o=0;if(f.mM&&f._M&&(f.mM[6]>0||f.mM[8]>0)&&(o=(f._M[6]+f._M[8])/(f.mM[6]+f.mM[8])|0),f.mM&&f.IM){let t,i=0,s=f.mM[10],e=f.IM[10],l=f.EM;i===s&&(i=0,s=f.mM[11],e=f.IM[11],l=f.gM),t=in;)try{this.ZM(e[i++],h),i===s&&e!==f.IM[11]&&(i=0,s=f.mM[11],e=f.IM[11],l=f.gM),t=ir;)try{this.ZM(e[i++],h),i===s&&e!==f.IM[11]&&(i=0,s=f.mM[11],e=f.IM[11],l=f.gM),t=io;)try{this.ZM(e[i++],h),i===s&&e!==f.IM[11]&&(i=0,s=f.mM[11],e=f.IM[11],l=f.gM),t=i>2,r=this.NM[i],o=this.PM[i],l=this.FM[i];n.A.pL(f.cM[s],f.cM[h],f.cM[e],f.fM[s],f.fM[h],f.fM[e],this.SM[t],this.MM[t],this.kM[t],f.dM[r],f.wM[r],f.yM[r],f.dM[o],f.dM[l],f.wM[o],f.wM[l],f.yM[o],f.yM[l],this.A_[t])}else if(3===r&&this.Vb&&this.A_&&this.SM&&f.cM&&f.fM&&f.dM&&f.wM&&f.yM){const i=this.Vb[t]>>2,r=this.NM[i],o=this.PM[i],l=this.FM[i];n.A.pL(f.cM[s],f.cM[h],f.cM[e],f.fM[s],f.fM[h],f.fM[e],this.SM[t],this.SM[t],this.SM[t],f.dM[r],f.wM[r],f.yM[r],f.dM[o],f.dM[l],f.wM[o],f.wM[l],f.yM[o],f.yM[l],this.A_[t])}}qM(t,i=!1){let s=0;if(f.yM){const i=n.A.Sa,h=n.A.Ma,e=this.Xb[t],r=this.zb[t],o=this.jb[t],l=f.yM[e],a=f.yM[r],c=f.yM[o];if(l>=50&&f.cM&&f.fM&&this.SM)f.CM[s]=f.cM[e],f.TM[s]=f.fM[e],f.OM[s++]=this.SM[t];else if(f.dM&&f.wM&&this.SM){const u=f.dM[e],d=f.wM[e],w=this.SM[t];if(c>=50&&this.kM){const e=(50-l)*n.A.IS[c-l];f.CM[s]=i+((u+((f.dM[o]-u)*e>>16)<<9)/50|0),f.TM[s]=h+((d+((f.wM[o]-d)*e>>16)<<9)/50|0),f.OM[s++]=w+((this.kM[t]-w)*e>>16)}if(a>=50&&this.MM){const e=(50-l)*n.A.IS[a-l];f.CM[s]=i+((u+((f.dM[r]-u)*e>>16)<<9)/50|0),f.TM[s]=h+((d+((f.wM[r]-d)*e>>16)<<9)/50|0),f.OM[s++]=w+((this.MM[t]-w)*e>>16)}}if(a>=50&&f.cM&&f.fM&&this.MM)f.CM[s]=f.cM[r],f.TM[s]=f.fM[r],f.OM[s++]=this.MM[t];else if(f.dM&&f.wM&&this.MM){const u=f.dM[r],d=f.wM[r],w=this.MM[t];if(l>=50&&this.SM){const r=(50-a)*n.A.IS[l-a];f.CM[s]=i+((u+((f.dM[e]-u)*r>>16)<<9)/50|0),f.TM[s]=h+((d+((f.wM[e]-d)*r>>16)<<9)/50|0),f.OM[s++]=w+((this.SM[t]-w)*r>>16)}if(c>=50&&this.kM){const e=(50-a)*n.A.IS[c-a];f.CM[s]=i+((u+((f.dM[o]-u)*e>>16)<<9)/50|0),f.TM[s]=h+((d+((f.wM[o]-d)*e>>16)<<9)/50|0),f.OM[s++]=w+((this.kM[t]-w)*e>>16)}}if(c>=50&&f.cM&&f.fM&&this.kM)f.CM[s]=f.cM[o],f.TM[s]=f.fM[o],f.OM[s++]=this.kM[t];else if(f.dM&&f.wM&&this.kM){const u=f.dM[o],d=f.wM[o],w=this.kM[t];if(a>=50&&this.MM){const e=(50-c)*n.A.IS[a-c];f.CM[s]=i+((u+((f.dM[r]-u)*e>>16)<<9)/50|0),f.TM[s]=h+((d+((f.wM[r]-d)*e>>16)<<9)/50|0),f.OM[s++]=w+((this.MM[t]-w)*e>>16)}if(l>=50&&this.SM){const r=(50-c)*n.A.IS[l-c];f.CM[s]=i+((u+((f.dM[e]-u)*r>>16)<<9)/50|0),f.TM[s]=h+((d+((f.wM[e]-d)*r>>16)<<9)/50|0),f.OM[s++]=w+((this.SM[t]-w)*r>>16)}}}const h=f.CM[0],r=f.CM[1],o=f.CM[2],l=f.TM[0],a=f.TM[1],c=f.TM[2];if(!((h-r)*(c-a)-(l-a)*(o-r)<=0))if(n.A.fL=!1,3===s){let s;if((h<0||r<0||o<0||h>e.A.uL||r>e.A.uL||o>e.A.uL)&&(n.A.fL=!0),s=this.Vb?3&this.Vb[t]:0,i)n.A.gd(h,r,l,a,f.OM[0]),n.A.gd(r,o,a,c,f.OM[1]),n.A.gd(o,h,c,l,f.OM[2]);else if(0===s)n.A.wL(h,r,o,l,a,c,f.OM[0],f.OM[1],f.OM[2]);else if(1===s&&this.SM)n.A.MS(h,r,o,l,a,c,n.A.palette[this.SM[t]]);else if(2===s&&this.Vb&&this.A_&&f.dM&&f.wM&&f.yM){const i=this.Vb[t]>>2,s=this.NM[i],e=this.PM[i],u=this.FM[i];n.A.pL(h,r,o,l,a,c,f.OM[0],f.OM[1],f.OM[2],f.dM[s],f.wM[s],f.yM[s],f.dM[e],f.dM[u],f.wM[e],f.wM[u],f.yM[e],f.yM[u],this.A_[t])}else if(3===s&&this.Vb&&this.A_&&this.SM&&f.dM&&f.wM&&f.yM){const i=this.Vb[t]>>2,s=this.NM[i],e=this.PM[i],u=this.FM[i];n.A.pL(h,r,o,l,a,c,this.SM[t],this.SM[t],this.SM[t],f.dM[s],f.wM[s],f.yM[s],f.dM[e],f.dM[u],f.wM[e],f.wM[u],f.yM[e],f.yM[u],this.A_[t])}}else if(4===s){let s;if((h<0||r<0||o<0||h>e.A.uL||r>e.A.uL||o>e.A.uL||f.CM[3]<0||f.CM[3]>e.A.uL)&&(n.A.fL=!0),s=this.Vb?3&this.Vb[t]:0,i)n.A.gd(h,r,l,a,f.OM[0]),n.A.gd(r,o,a,c,f.OM[1]),n.A.gd(o,f.CM[3],c,f.TM[3],f.OM[2]),n.A.gd(f.CM[3],h,f.TM[3],l,f.OM[3]);else if(0===s)n.A.wL(h,r,o,l,a,c,f.OM[0],f.OM[1],f.OM[2]),n.A.wL(h,o,f.CM[3],l,c,f.TM[3],f.OM[0],f.OM[2],f.OM[3]);else if(1===s){if(this.SM){const i=n.A.palette[this.SM[t]];n.A.MS(h,r,o,l,a,c,i),n.A.MS(h,o,f.CM[3],l,c,f.TM[3],i)}}else if(2===s&&this.Vb&&this.A_&&f.dM&&f.wM&&f.yM){const i=this.Vb[t]>>2,s=this.NM[i],e=this.PM[i],u=this.FM[i];n.A.pL(h,r,o,l,a,c,f.OM[0],f.OM[1],f.OM[2],f.dM[s],f.wM[s],f.yM[s],f.dM[e],f.dM[u],f.wM[e],f.wM[u],f.yM[e],f.yM[u],this.A_[t]),n.A.pL(h,o,f.CM[3],l,c,f.TM[3],f.OM[0],f.OM[2],f.OM[3],f.dM[s],f.wM[s],f.yM[s],f.dM[e],f.dM[u],f.wM[e],f.wM[u],f.yM[e],f.yM[u],this.A_[t])}else if(3===s&&this.Vb&&this.A_&&this.SM&&f.dM&&f.wM&&f.yM){const i=this.Vb[t]>>2,s=this.NM[i],e=this.PM[i],u=this.FM[i];n.A.pL(h,r,o,l,a,c,this.SM[t],this.SM[t],this.SM[t],f.dM[s],f.wM[s],f.yM[s],f.dM[e],f.dM[u],f.wM[e],f.wM[u],f.yM[e],f.yM[u],this.A_[t]),n.A.pL(h,o,f.CM[3],l,c,f.TM[3],this.SM[t],this.SM[t],this.SM[t],f.dM[s],f.wM[s],f.yM[s],f.dM[e],f.dM[u],f.wM[e],f.wM[u],f.yM[e],f.yM[u],this.A_[t])}}}KM(t,i,s,h,e){if(!h)return;const r=h.length;if(0===e){let e=0;f.Hn=0,f.vM=0,f.Wn=0;for(let t=0;t0?(f.Hn=(f.Hn/e|0)+t,f.vM=(f.vM/e|0)+i,f.Wn=(f.Wn/e|0)+s):(f.Hn=t,f.vM=i,f.Wn=s)}else if(1===e)for(let e=0;e=this.dC.length)continue;const r=this.dC[n];if(r)for(let h=0;h=this.dC.length)continue;const o=this.dC[r];if(o)for(let h=0;h>16;this.aC[e]=this.aC[e]*u-this.oC[e]*c>>16,this.oC[e]=t}if(0!==r){c=n.A.sin[r],u=n.A.cos[r];const t=this.aC[e]*u-this.lC[e]*c>>16;this.lC[e]=this.aC[e]*c+this.lC[e]*u>>16,this.aC[e]=t}if(0!==l){c=n.A.sin[l],u=n.A.cos[l];const t=this.lC[e]*c+this.oC[e]*u>>16;this.lC[e]=this.lC[e]*u-this.oC[e]*c>>16,this.oC[e]=t}this.oC[e]+=f.Hn,this.aC[e]+=f.vM,this.lC[e]+=f.Wn}}else if(3===e)for(let e=0;e=this.dC.length)continue;const r=this.dC[n];if(r)for(let h=0;h=this.uC.length)continue;const e=this.uC[s];if(e)for(let i=0;i255&&(this.DM[s]=255)}}}XM(){this.AC=0,this.bO=0,this.GO=0,this.PO=999999,this.FO=-999999,this.BO=-99999,this.UO=99999;for(let t=0;tthis.FO&&(this.FO=i),hthis.BO&&(this.BO=h),-s>this.AC&&(this.AC=-s),s>this.GO&&(this.GO=s);const e=i*i+h*h;e>this.bO&&(this.bO=e)}this.bO=0|Math.sqrt(this.bO),this.BM=0|Math.sqrt(this.bO*this.bO+this.AC*this.AC),this.UM=this.BM+(0|Math.sqrt(this.bO*this.bO+this.GO*this.GO))}jM(t,i,s,h,e,n,r,o){return!(is&&i>h&&i>e)&&(!(t{s.d(i,{A:()=>o});var h=s(8950),e=s(1069),n=s(4474),r=s(7854);class o extends n.A{Mc;width;height;jc;Zc;oa;Nd;constructor(t,i){super(),this.Mc=new Int32Array(t*i),this.width=this.oa=t,this.height=this.Nd=i,this.jc=this.Zc=0}static Xc=async(t,i)=>{const s=t.read(i+'.dat');if(!s)throw new Error(`${i} jpeg not found!`);const h=await(async t=>{255!==t[0]&&(t[0]=255),URL.revokeObjectURL(r.eS.src),r.eS.src=URL.createObjectURL(new Blob([t],{type:'image/jpeg'})),await new Promise((t=>r.eS.onload=()=>t())),r.hS.clearRect(0,0,r.nS.width,r.nS.height);const i=r.eS.naturalWidth,s=r.eS.naturalHeight;return r.nS.width=i,r.nS.height=s,r.hS.drawImage(r.eS,0,0),r.hS.getImageData(0,0,i,s)})(s),e=new o(h.width,h.height),n=new Uint32Array(h.data.buffer),l=e.Mc;for(let t=0;t>24&255)<<24|(255&i)<<16|(i>>8&255)<<8|i>>16&255}return e};static Ic=(t,i,s=0)=>{const h=new e.A(t.read(i+'.dat')),n=new e.A(t.read('index.dat'));n.ft=h.ct;const r=n.ct,l=n.ct,a=[],c=n.CA-1;for(let t=0;th.length||n.ft>n.length)throw new Error;const f=n.CA,u=n.CA,d=n.ct,w=n.ct,y=new o(d,w);y.jc=f,y.Zc=u,y.oa=r,y.Nd=l;const A=n.CA;if(0===A){const t=y.width*y.height;for(let i=0;ih.A.bottom&&(n-=i+n-h.A.bottom),th.A.right){const i=t+r-h.A.right;r-=i,l+=i,o+=i}r>0&&n>0&&this.JM(r,n,this.Mc,e,l,h.A.Mc,s,o)}ra(t,i,s){i|=0,s|=0;let e=(i+=this.jc)+(s+=this.Zc)*h.A.RC,n=0,r=this.height,o=this.width,l=h.A.RC-o,a=0;if(sh.A.bottom&&(r-=s+r-h.A.bottom),ih.A.right){const t=i+o-h.A.right;o-=t,a+=t,l+=t}o>0&&r>0&&this.QM(o,r,this.Mc,n,a,h.A.Mc,e,l,t)}vc(t,i){t|=0,i|=0;let s=(t+=this.jc)+(i+=this.Zc)*h.A.RC,e=0,n=this.height,r=this.width,o=h.A.RC-r,l=0;if(ih.A.bottom&&(n-=i+n-h.A.bottom),th.A.right){const i=t+r-h.A.right;r-=i,l+=i,o+=i}r>0&&n>0&&this.tk(r,n,this.Mc,e,l,h.A.Mc,s,o)}Tc(){const t=this.Mc,i=this.width,s=this.height;for(let h=0;h>16&255;n+=t,n<1?n=1:n>255&&(n=255);let r=e>>8&255;r+=i,r<1?r=1:r>255&&(r=255);let o=255&e;o+=s,o<1?o=1:o>255&&(o=255),this.Mc[h]=(n<<16)+(r<<8)+o}}}PC(t,i,s,e){t|=0,i|=0,s|=0,e|=0;try{const n=this.width;let r=0,o=0;const l=this.oa,a=this.Nd,c=(l<<16)/s|0,f=(a<<16)/e|0;t+=(this.jc*s+l-1)/l|0,i+=(this.Zc*e+a-1)/a|0,this.jc*s%l!=0&&(r=(l-this.jc*s%l<<16)/s|0),this.Zc*e%a!=0&&(o=(a-this.Zc*e%a<<16)/e|0),s=s*(this.width-(r>>16))/l|0,e=e*(this.height-(o>>16))/a|0;let u=t+i*h.A.RC,d=h.A.RC-s;if(ih.A.bottom&&(e-=i+e-h.A.bottom),th.A.right){const i=t+s-h.A.right;s-=i,d+=i}this.scale(s,e,this.Mc,r,o,h.A.Mc,d,u,n,c,f)}catch(t){console.error('error in sprite clipping routine')}}Sd(t,i,s,e,n,r,o,l,a,c){t|=0,i|=0,s|=0,e|=0;try{const f=-s/2|0,u=-e/2|0,d=65536*Math.sin(a/326.11)|0,w=65536*Math.cos(a/326.11)|0,y=d*c>>8,A=w*c>>8;let p=(o<<16)+u*y+f*A,m=u*A-f*y+(l<<16),I=t+i*h.A.RC;for(let t=0;t>16)+(o>>16)*this.width],e+=A,o-=y;p+=y,m+=A,I+=h.A.RC}}catch(t){}}Dd(t,i,s){t|=0,i|=0;let e=(t+=this.jc)+(i+=this.Zc)*h.A.RC,n=0,r=this.height,o=this.width,l=h.A.RC-o,a=0;if(ih.A.bottom&&(r-=i+r-h.A.bottom),th.A.right){const i=t+o-h.A.right;o-=i,a+=i,l+=i}o>0&&r>0&&this.ik(o,r,this.Mc,a,n,h.A.Mc,e,l,s.Mc)}scale(t,i,s,h,e,n,r,o,l,a,c){try{const f=h;for(let u=-i;u<0;u++){const i=(e>>16)*l;for(let e=-t;e<0;e++){const t=s[(h>>16)+i];0===t?o++:n[o++]=t,h+=a}e+=c,h=f,o+=r}}catch(t){console.error('error in plot_scale')}}tk(t,i,s,h,e,n,r,o){const l=-(t>>2);t=-(3&t);for(let a=-i;a<0;a++){for(let t=l;t<0;t++)n[r++]=s[h++],n[r++]=s[h++],n[r++]=s[h++],n[r++]=s[h++];for(let i=t;i<0;i++)n[r++]=s[h++];r+=o,h+=e}}QM(t,i,s,h,e,n,r,o,l){const a=256-l;for(let c=-i;c<0;c++){for(let i=-t;i<0;i++){const t=s[h++];if(0===t)r++;else{const i=n[r];n[r++]=((16711935&t)*l+(16711935&i)*a&4278255360)+((65280&t)*l+(65280&i)*a&16711680)>>8}}r+=o,h+=e}}JM(t,i,s,h,e,n,r,o){const l=-(t>>2);t=-(3&t);for(let a=-i;a<0;a++){for(let t=l;t<0;t++){let t=s[h++];0===t?r++:n[r++]=t,t=s[h++],0===t?r++:n[r++]=t,t=s[h++],0===t?r++:n[r++]=t,t=s[h++],0===t?r++:n[r++]=t}for(let i=t;i<0;i++){const t=s[h++];0===t?r++:n[r++]=t}r+=o,h+=e}}ik(t,i,s,h,e,n,r,o,l){const a=-(t>>2);t=-(3&t);for(let c=-i;c<0;c++){for(let t=a;t<0;t++){let t=s[e++];0!==t&&0===l[r]?n[r++]=t:r++,t=s[e++],0!==t&&0===l[r]?n[r++]=t:r++,t=s[e++],0!==t&&0===l[r]?n[r++]=t:r++,t=s[e++],0!==t&&0===l[r]?n[r++]=t:r++}for(let i=t;i<0;i++){const t=s[e++];0!==t&&0===l[r]?n[r++]=t:r++}r+=o,e+=h}}}},1673:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(8950),e=s(1069),n=s(4474);class r extends n.A{Mc;width;height;jc;Zc;oa;Nd;palette;constructor(t,i,s){super(),this.Mc=new Int8Array(t*i),this.width=this.oa=t,this.height=this.Nd=i,this.jc=this.Zc=0,this.palette=s}static Ic=(t,i,s=0)=>{const h=new e.A(t.read(i+'.dat')),n=new e.A(t.read('index.dat'));n.ft=h.ct;const o=n.ct,l=n.ct,a=n.CA,c=new Int32Array(a);for(let t=1;th.length||n.ft>n.length)throw new Error;const f=n.CA,u=n.CA,d=n.ct,w=n.ct,y=new r(d,w,c);y.jc=f,y.Zc=u,y.oa=o,y.Nd=l;const A=y.Mc,p=n.CA;if(0===p){const t=y.width*y.height;for(let i=0;ih.A.bottom&&(n-=i+n-h.A.bottom),th.A.right){const i=t+r-h.A.right;r-=i,l+=i,o+=i}r>0&&n>0&&this.sk(r,n,this.Mc,e,l,h.A.Mc,s,o)}Tc(){const t=this.Mc,i=this.width,s=this.height;for(let h=0;h>16&255;e+=t,e<0?e=0:e>255&&(e=255);let n=this.palette[h]>>8&255;n+=i,n<0?n=0:n>255&&(n=255);let r=255&this.palette[h];r+=s,r<0?r=0:r>255&&(r=255),this.palette[h]=(e<<16)+(n<<8)+r}}LS(){this.oa|=0,this.Nd|=0,this.oa/=2,this.Nd/=2,this.oa|=0,this.Nd|=0;const t=new Int8Array(this.oa*this.Nd);let i=0;for(let s=0;s>1)+(s+this.Zc>>1)*this.oa]=this.Mc[i++];this.Mc=t,this.width=this.oa,this.height=this.Nd,this.jc=0,this.Zc=0}PC(){if(this.width===this.oa&&this.height===this.Nd)return;const t=new Int8Array(this.oa*this.Nd);let i=0;for(let s=0;s>2);t=-(3&t);for(let a=-i;a<0;a++){for(let t=l;t<0;t++){let t=s[h++];0===t?r++:n[r++]=this.palette[255&t],t=s[h++],0===t?r++:n[r++]=this.palette[255&t],t=s[h++],0===t?r++:n[r++]=this.palette[255&t],t=s[h++],0===t?r++:n[r++]=this.palette[255&t]}for(let i=t;i<0;i++){const t=s[h++];0===t?r++:n[r++]=this.palette[255&t]}r+=o,h+=e}}clip(t,i,s,e){try{const n=this.width;this.height;let r=0,o=0;const l=this.oa,a=this.Nd,c=(l<<16)/s|0,f=(a<<16)/e|0;t=t+(this.jc*s+l-1)/l|0,i=i+(this.Zc*e+a-1)/a|0,this.jc*s%l!=0&&(r=(l-this.jc*s%l<<16)/s|0),this.Zc*e%a!=0&&(o=(a-this.Zc*e%a<<16)/e|0),s=s*(this.width-(r>>16))/l|0,e=e*(this.height-(o>>16))/a|0;let u,d=t+i*h.A.RC,w=h.A.RC-s;ih.A.bottom&&(e-=i+e-h.A.bottom),th.A.right&&(u=t+s-h.A.right,s-=u,w+=u),this.hk(h.A.Mc,this.Mc,this.palette,r,o,d,w,s,e,c,f,n)}catch(t){console.log('error in sprite clipping routine')}}hk(t,i,s,h,e,n,r,o,l,a,c,f){try{const u=h;for(let d=-l;d<0;d++){const l=(e>>16)*f;for(let e=-o;e<0;e++){const e=i[(h>>16)+l];0==e?n++:t[n++]=s[255&e],h+=a}e+=c,h=u,n+=r}}catch(t){console.log('error in plot_scale')}}}},2682:(t,i,s)=>{s.d(i,{A:()=>l});var h=s(8950),e=s(1069),n=s(4474);class r{seed;constructor(t){this.seed=(0x5deece66dn^t)&(1n<<48n)-1n}ek(t){this.seed=(0x5deece66dn^t)&(1n<<48n)-1n}mA(){return this.next(32)}next(t){return this.seed=0x5deece66dn*this.seed+0xbn&(1n<<48n)-1n,Number(this.seed)>>>48-t}}var o=s(9298);class l extends n.A{static ef='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!"£$%^&*()-_=+[{]};:\'@#~,<.>/?\\| ';static nk=[];static{const t=navigator.userAgent.includes('Capacitor');for(let i=0;i<256;i++){let s=l.ef.indexOf(String.fromCharCode(i));t&&s>=63&&s--,-1===s&&(s=74),l.nk[i]=s}}rk=[];lk=new Int32Array(94);ak=new Int32Array(94);ck=new Int32Array(94);fk=new Int32Array(94);uk=new Int32Array(95);dk=new Int32Array(256);random=new r(BigInt(Date.now()));height=0;static Ic=(t,i)=>{const s=new e.A(t.read(i+'.dat')),h=new e.A(t.read('index.dat'));h.ft=s.ct+4;const n=h.CA;n>0&&(h.ft+=3*(n-1));const r=new l;for(let t=0;t<94;t++){r.ck[t]=h.CA,r.fk[t]=h.CA;const i=r.lk[t]=h.ct,e=r.ak[t]=h.ct,n=h.CA,o=i*e;if(r.rk[t]=new Int8Array(o),0===n)for(let h=0;hr.height&&(r.height=e),r.ck[t]=1,r.uk[t]=i+2;{let s=0;for(let h=e/7|0;h=h.A.bottom&&(n-=s+n+1-h.A.bottom),i=h.A.right){const t=i+e+1-h.A.right;e-=t,a+=t,l+=t}e>0&&n>0&&this.pk(e,n,t,c,a,h.A.Mc,o,l,r)}Ak(t,i,s,e,n,r,o){s|=0,e|=0;let l=(t|=0)+(i|=0)*h.A.RC,a=h.A.RC-s,c=0,f=0;if(i=h.A.bottom&&(e-=i+e+1-h.A.bottom),t=h.A.right){const i=t+s+1-h.A.right;s-=i,c+=i,a+=i}s>0&&e>0&&this.mk(s,e,h.A.Mc,l,a,o,f,c,n,r)}pk(t,i,s,h,e,n,r,o,l){const a=-((t|=0)>>2);t=-(3&t);for(let c=-(i|=0);c<0;c++){for(let t=a;t<0;t++)0===s[h++]?r++:n[r++]=l,0===s[h++]?r++:n[r++]=l,0===s[h++]?r++:n[r++]=l,0===s[h++]?r++:n[r++]=l;for(let i=t;i<0;i++)0===s[h++]?r++:n[r++]=l;r+=o,h+=e}}mk(t,i,s,h,e,n,r,o,l,a){t|=0;const c=((16711935&l)*a&4278255360)+((65280&l)*a&16711680)>>8,f=256-a;for(let l=-(i|=0);l<0;l++){for(let i=-t;i<0;i++)if(0===n[r++])h++;else{const t=s[h];s[h++]=(((16711935&t)*f&4278255360)+((65280&t)*f&16711680)>>8)+c}h+=e,r+=o}}yk(t){return'red'===t?o.A.RED:'gre'===t?o.A.GREEN:'blu'===t?o.A.BLUE:'yel'===t?o.A.fa:'cya'===t?o.A.$c:'mag'===t?o.A.Jc:'whi'===t?o.A.Kl:'bla'===t?o.A.ca:'lre'===t?o.A.rS:'dre'===t?o.A.bd:'dbl'===t?o.A.vd:'or1'===t?o.A.oS:'or2'===t?o.A.lS:'or3'===t?o.A.aS:'gr1'===t?o.A.cS:'gr2'===t?o.A.fS:'gr3'===t?o.A.uS:o.A.ca}split(t,i){if(0===t.length)return[t];const s=[];for(;t.length>0;){if(this.xu(t)<=i&&-1===t.indexOf('|')){s.push(t);break}let h=t.length;for(let s=0;si)break;h=s}else if('|'===t[s]){h=s;break}s.push(t.substring(0,h)),t=t.substring(h+1)}return s}}},1183:(t,i,s)=>{s.d(i,{A:()=>n});var h=s(8950),e=s(7854);class n{Ik;width;height;Ek;gk;Mc;constructor(t,i,s=e.Il){this.Ek=s,this.Ik=this.Ek.getImageData(0,0,t,i),this.gk=new Uint32Array(this.Ik.data.buffer),this.Mc=new Int32Array(t*i),this.width=t,this.height=i,this.bind()}clear(){this.Mc.fill(0)}bind(){h.A.bind(this.Mc,this.width,this.height)}draw(t,i){this.#t(),this.Ek.putImageData(this.Ik,t,i)}#t(){const t=this.Mc.length,i=this.Mc,s=this.gk;for(let h=0;h>16&255|(t>>8&255)<<8|(255&t)<<16|4278190080}}}},3955:(t,i,s)=>{s.d(i,{A:()=>h});class h{static RA=150;static qf=108;static jf=70;static Ef=81;static bf=189;static iy=7;static Iw=88;static yw=30;static Cw=176;static fw=220;static ey=66;static Zw=17;static xw=2;static Jw=238;static By=233;static cu=146;static Df=215;static Zf=236;static pE=85;static HI=219;static Uw=140;static Ww=40;static Hw=200;static Bw=178;static Gw=247;static hy=138;static Ow=239;static _w=194;static mw=8;static Ew=27;static gw=113;static Tw=100;static Pw=134;static kw=202;static Lw=245;static Yw=172;static oy=96;static sy=97;static ny=116;static Fw=9;static cw=75;static ow=164;static Dw=53;static Nw=185;static rw=206;static Iy=177;static wy=248;static Aw=195;static pw=71;static ww=133;static uw=157;static dw=211;static Sw=48;static Rw=130;static $w=31;static ty=59;static jw=212;static Qw=38;static qw=6;static zw=155;static Mw=235;static AA=231;static Vy=237;static su=175;static iI=93;static xy=190;static tI=165;static Sf=159;static $y=171;static qy=79;static Sy=52;static Yy=244;static Gy=148;static Zy=11;static jy=118;static Xy=4;static zy=158;static Qm=181}},3554:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(6666),e=s(1982),n=s(9234);class r{_k;Ck;Tk;closed=!1;Ok=!1;static rf=async t=>await new Promise(((i,s)=>{const h=t.host.startsWith('https'),e=h?'wss':'ws',n=t.host.substring(t.host.indexOf('//')+2),r=h?t.port+2:t.port+1,o=new WebSocket(`${e}://${n}:${r}`,'binary');o.addEventListener('open',(()=>{console.log('connection open!'),i(o)})),o.addEventListener('error',(()=>{console.log('connection error!'),s(o)}))}));constructor(t){t.onclose=this.onclose,t.onerror=this.onerror,this.Ck=new a(t,5e3),this.Tk=new o(t,5e3),this._k=t}get host(){return this._k.url.split('/')[2]}get port(){return parseInt(this._k.url.split(':')[2],10)}get available(){return this.closed?0:this.Ck.available}write(t,i){this.Tk.write(t,i)}async read(){return this.closed?0:this.Ck.vk()??await this.Ck.bk()}async lf(t,i,s){if(!this.closed)for(;s>0;){const h=this.Ck.Lk(t,i,s)??await this.Ck.Rk(t,i,s);if(h.length<=0)throw new Error('EOF');i+=h.length,s-=h.length}}close(){this.closed=!0,this._k.close(),this.Ck.close(),this.Tk.close(),console.log('connection close!'),this.Ok&&console.log('connection error!')}onclose=t=>{this.closed||this.close()};onerror=t=>{this.closed||(this.Ok=!0,this.close())}}class o{_k;Sk;closed=!1;Ok=!1;constructor(t,i){this._k=t,this.Sk=i}write(t,i){if(!this.closed){if(this.Ok)throw this.Ok=!1,new Error('Error in writer thread');if(i>this.Sk||t.length>this.Sk)throw new Error('buffer overflow');try{this._k.send(t.subarray(0,i))}catch(t){this.Ok=!0}}}close(){this.closed=!0}}class l extends e.A{aI;position;constructor(t){super(),this.aI=t,this.position=0}get available(){return this.aI.length-this.position}get read(){return this.aI[this.position++]}get Mk(){return this.aI.length}}class a{Sk;queue=new h.A;event=null;kk=null;total=0;closed=!1;constructor(t,i){this.Sk=i,t.binaryType='arraybuffer',t.onmessage=this.onmessage}get available(){return this.total}onmessage=t=>{if(this.closed)throw new Error('WebSocketReader is closed!');const i=new l(new Uint8Array(t.data));if(this.event?this.queue.LE(i):this.event=i,this.total+=i.Mk,this.kk&&(this.kk(this.event),this.kk=null,this.total>this.Sk))throw new Error('buffer overflow')};xk(){return this.event&&this.event.available>0?this.event.read:null}async Dk(t){for(this.event=this.queue.iL();this.totalthis.kk=t)),(0,n.wl)(2e3).then((()=>{if(this.closed)throw new Error('WebSocketReader closed while reading.')}))]);return this.event?this.event.read:this.Dk(t)}Lk(t,i,s){if(this.closed)throw new Error('WebSocketReader is closed!');if(!(this.event&&this.event.available>=s))return null;for(;s>0;){const h=this.xk();if(null===h)throw new Error('EOF - tried to read a fast byte when there was not enough immediate bytes.');t[i++]=h,this.total--,s--}return t}async Rk(t,i,s){if(this.closed)throw new Error('WebSocketReader is closed!');for(;s>0;)t[i++]=this.xk()??await this.Dk(s),this.total--,s--;return t}vk(){if(this.closed)throw new Error('WebSocketReader is closed!');const t=this.xk();return null===t?null:(this.total--,t)}async bk(){if(this.closed)throw new Error('WebSocketReader is closed!');const t=await this.Dk(1);return this.total--,t}close(){this.closed=!0,this.kk=null,this.total=0,this.event=null,this.queue.clear()}}},296:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(6666),e=s(1982),n=s(9234);class r{yt;ol;Nk;closed=!1;Ok=!1;constructor(t,i){this.yt=t,this.yt.onerror=this.onerror,this.yt.onmessageerror=this.onmessageerror,this.ol=new a(5e3),this.Nk=new o(this.yt,5e3,i),this.yt.postMessage({type:'connection',id:i})}get available(){return this.closed?0:this.ol.available}write(t,i){this.Nk.write(t,i)}async read(){return this.closed?0:this.ol.vk()??await this.ol.bk()}async lf(t,i,s){if(!this.closed)for(;s>0;){const h=this.ol.Lk(t,i,s)??await this.ol.Rk(t,i,s);if(h.length<=0)throw new Error('EOF');i+=h.length,s-=h.length}}close(){this.closed=!0,this.ol.close(),this.Nk.close(),console.log('connection close!'),this.Ok&&console.log('connection error!')}onerror=t=>{this.closed||(this.Ok=!0,this.close())};onmessageerror=t=>{this.closed||(this.Ok=!0,this.close())}}class o{yt;Sk;At;closed=!1;Ok=!1;constructor(t,i,s){this.yt=t,this.Sk=i,this.At=s}write(t,i){if(!this.closed){if(this.Ok)throw this.Ok=!1,new Error('Error in writer thread');if(i>this.Sk||t.length>this.Sk)throw new Error('buffer overflow');try{this.yt.postMessage({type:'data',data:t.subarray(0,i),id:this.At})}catch(t){this.Ok=!0}}}close(){this.closed=!0}}class l extends e.A{aI;position;constructor(t){super(),this.aI=t,this.position=0}get available(){return this.aI.length-this.position}get read(){return this.aI[this.position++]}get Mk(){return this.aI.length}}class a{Sk;queue=new h.A;event=null;kk=null;total=0;closed=!1;constructor(t){this.Sk=t}get available(){return this.total}onmessage=t=>{const i='string'==typeof t.data?JSON.parse(t.data):t;if('data'!==i.type)return void console.error('Unexpected message type: ',i.type);if(this.closed)throw new Error('WorkerReader is closed!');const s=new l(new Uint8Array(i.data));if(this.event?this.queue.LE(s):this.event=s,this.total+=s.Mk,this.kk&&(this.kk(this.event),this.kk=null,this.total>this.Sk))throw new Error('buffer overflow')};xk(){return this.event&&this.event.available>0?this.event.read:null}async Dk(t){for(this.event=this.queue.iL();this.totalthis.kk=t)),(0,n.wl)(2e3).then((()=>{if(this.closed)throw new Error('WorkerReader closed while reading.')}))]);return this.event?this.event.read:this.Dk(t)}Lk(t,i,s){if(this.closed)throw new Error('WorkerReader is closed!');if(!(this.event&&this.event.available>=s))return null;for(;s>0;){const h=this.xk();if(null===h)throw new Error('EOF - tried to read a fast byte when there was not enough immediate bytes.');t[i++]=h,this.total--,s--}return t}async Rk(t,i,s){if(this.closed)throw new Error('WorkerReader is closed!');for(;s>0;)t[i++]=this.xk()??await this.Dk(s),this.total--,s--;return t}vk(){if(this.closed)throw new Error('WorkerReader is closed!');const t=this.xk();return null===t?null:(this.total--,t)}async bk(){if(this.closed)throw new Error('WorkerReader is closed!');const t=await this.Dk(1);return this.total--,t}close(){this.closed=!0,this.kk=null,this.total=0,this.event=null,this.queue.clear()}}},4544:(t,i,s)=>{s.d(i,{A:()=>h});class h{db;constructor(t){t.onerror=this.onerror,t.onclose=this.onclose,this.db=t}static openDatabase=async()=>await new Promise(((t,i)=>{const s=indexedDB.open('lostcity',1);s.onsuccess=i=>{const s=i.target;console.log('database success!'),t(s.result)},s.onupgradeneeded=t=>{t.target.result.createObjectStore('cache')},s.onerror=t=>{const s=t.target;console.error('database error!: ',s.error),i(s.result)}}));cl=async t=>await new Promise((i=>{const s=this.db.transaction('cache','readonly').objectStore('cache').get(t);s.onsuccess=()=>{i(s.result)},s.onerror=t=>{i(void 0)}}));yl=async(t,i)=>await new Promise(((s,h)=>{const e=this.db.transaction('cache','readwrite').objectStore('cache').put(i,t);e.onsuccess=()=>{s()},e.onerror=t=>{h()}}));onclose=t=>{console.log('database close!')};onerror=t=>{console.log('database error!')};tt=t=>{const i=t.trim();let s=0;for(let t=0;t='A'&&h<='Z'?s+=h.charCodeAt(0)+1-65:h>='a'&&h<='z'?s+=h.charCodeAt(0)+1-97:h>='0'&&h<='9'&&(s+=h.charCodeAt(0)+27-48)}return s}}},2634:(t,i,s)=>{s.d(i,{A:()=>h});class h{count=0;Pk=new Int32Array(256);Fk=new Int32Array(256);a=0;b=0;c=0;constructor(t){for(let i=0;i>>2,e+=i,s+=h,s^=h<<8,n+=s,h+=e,h^=e>>>16,r+=h,e+=n,e^=n<<10,o+=e,n+=r,n^=r>>>4,t+=n,r+=o,r^=o<<8,i+=r,o+=t,o^=t>>>9,s+=o,t+=i;for(let l=0;l<256;l+=8)t+=this.Pk[l],i+=this.Pk[l+1],s+=this.Pk[l+2],h+=this.Pk[l+3],e+=this.Pk[l+4],n+=this.Pk[l+5],r+=this.Pk[l+6],o+=this.Pk[l+7],t^=i<<11,h+=t,i+=s,i^=s>>>2,e+=i,s+=h,s^=h<<8,n+=s,h+=e,h^=e>>>16,r+=h,e+=n,e^=n<<10,o+=e,n+=r,n^=r>>>4,t+=n,r+=o,r^=o<<8,i+=r,o+=t,o^=t>>>9,s+=o,t+=i,this.Fk[l]=t,this.Fk[l+1]=i,this.Fk[l+2]=s,this.Fk[l+3]=h,this.Fk[l+4]=e,this.Fk[l+5]=n,this.Fk[l+6]=r,this.Fk[l+7]=o;for(let l=0;l<256;l+=8)t+=this.Fk[l],i+=this.Fk[l+1],s+=this.Fk[l+2],h+=this.Fk[l+3],e+=this.Fk[l+4],n+=this.Fk[l+5],r+=this.Fk[l+6],o+=this.Fk[l+7],t^=i<<11,h+=t,i+=s,i^=s>>>2,e+=i,s+=h,s^=h<<8,n+=s,h+=e,h^=e>>>16,r+=h,e+=n,e^=n<<10,o+=e,n+=r,n^=r>>>4,t+=n,r+=o,r^=o<<8,i+=r,o+=t,o^=t>>>9,s+=o,t+=i,this.Fk[l]=t,this.Fk[l+1]=i,this.Fk[l+2]=s,this.Fk[l+3]=h,this.Fk[l+4]=e,this.Fk[l+5]=n,this.Fk[l+6]=r,this.Fk[l+7]=o;this.Uk(),this.count=256}Uk(){this.c++,this.b+=this.c;for(let t=0;t<256;t++){const i=this.Fk[t],s=3&t;let h;0===s?this.a^=this.a<<13:1===s?this.a^=this.a>>>6:2===s?this.a^=this.a<<2:3===s&&(this.a^=this.a>>>16),this.a+=this.Fk[t+128&255],this.Fk[t]=h=this.Fk[i>>>2&255]+this.a+this.b,this.Pk[t]=this.b=this.Fk[h>>>8>>>2&255]+i}}}},1069:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(9234),e=s(6666),n=s(4474);class r extends n.A{static Bk=3988292384;static Gk=new Int32Array(256);static Hk=new Uint32Array(33);static Wk=new e.A;static Yk=new e.A;static Vk=new e.A;static Kk=0;static Xk=0;static zk=0;static{for(let t=0;t<32;t++)r.Hk[t]=(1<>>=1:i=i>>>1^r.Bk;r.Gk[t]=i}}static fl=t=>{let i=4294967295;for(let s=0;s>>8^r.Gk[255&(i^t[s])];return~i};view;data;ft=0;lI=0;random=null;constructor(t){if(!t)throw new Error('Input src packet array was null!');super(),t instanceof Int8Array?this.data=new Uint8Array(t):this.data=t,this.view=new DataView(this.data.buffer,this.data.byteOffset,this.data.byteLength)}get length(){return this.view.byteLength}get available(){return this.length-this.ft}static ni=t=>{let i=null;return 0===t&&r.Kk>0?(r.Kk--,i=r.Wk.iL()):1===t&&r.Xk>0?(r.Xk--,i=r.Yk.iL()):2===t&&r.zk>0&&(r.zk--,i=r.Vk.iL()),i?(i.ft=0,i):new r(0===t?new Uint8Array(100):1===t?new Uint8Array(5e3):new Uint8Array(3e4))};release(){this.ft=0,100===this.view.byteLength&&r.Kk<1e3?(r.Wk.LE(this),r.Kk++):5e3===this.view.byteLength&&r.Xk<250?(r.Yk.LE(this),r.Xk++):3e4===this.view.byteLength&&r.zk<50&&(r.Vk.LE(this),r.zk++)}get CA(){return this.view.getUint8(this.ft++)}get gA(){return this.view.getInt8(this.ft++)}get ct(){const t=this.view.getUint16(this.ft);return this.ft+=2,t}get Cp(){const t=this.view.getInt16(this.ft);return this.ft+=2,t}get lt(){const t=this.view.getUint8(this.ft++)<<16|this.view.getUint16(this.ft);return this.ft+=2,t}get ut(){const t=this.view.getInt32(this.ft);return this.ft+=4,t}get af(){const t=this.view.getBigInt64(this.ft);return this.ft+=8,t}get iS(){return this.view.getUint8(this.ft)<128?this.CA-64:this.ct-49152}get vO(){return this.view.getUint8(this.ft)<128?this.CA:this.ct-32768}get NA(){const t=this.view,i=t.byteLength;let s,h='';for(;10!==(s=t.getUint8(this.ft++))&&this.ft>16),this.view.setUint16(this.ft,t),this.ft+=2}p4(t){this.view.setInt32(this.ft,t),this.ft+=4}Zk(t){this.view.setInt32(this.ft,t,!0),this.ft+=4}Dy(t){this.view.setBigInt64(this.ft,t),this.ft+=8}cf(t){const i=this.view,s=t.length;for(let h=0;h>>3}oI(t){let i=this.lI>>>3,s=8-(7&this.lI),h=0;for(this.lI+=t;t>s;s=8)h+=(this.view.getUint8(i++)&r.Hk[s])<>>s-t&r.Hk[t],h}ff(t,i){const s=this.ft;this.ft=0;const e=new Uint8Array(s);this.sp(s,0,e);const n=(0,h.qk)(e),r=(0,h.$k)(n,i,t),o=(0,h.Jk)(r);this.ft=0,this.p1(o.length),this.uf(o,o.length,0)}}},353:(t,i,s)=>{s.d(i,{A:()=>h});class h{static Qk=[95,218,67,50,253,222,194,60,101,128,8,251,92,111,24,33,223,66,232,59,227,113,153,105,126,98,167,102,177,238,62,190,147,23,150,151,156,144,193,155,81,0,198,22,137,210,179,16,168,170,32,181,248,141,58,87,208,106,180,191,221,241,40,176,196,154,65,145,230,78,30,161,188,41,14,129,18,199,47,247,225,34,51,10,159,75,12,56,61,31,39,91,46,242,134,5,122,123,209,228,104,195,21,3,11,44,107,172,6,186,110,215,205,103,27,185,124,77,252,117,86,115,127,207,52,79,43,97,219,116,169,7,118,162,108,36,20,233,88,135,80,19,42,237,57,152,71,9,250,17,4,119,234,130,26,200,189,163,254,245,197,171,220,235,140,244,184,94,211,231,99,246,121,212,112,204,63,148,83,178,1,255,131,13,183,142,236,45,55,35,243,136,37,85,100,160,38,224,146,174,82,48,109,132,125,90,143,138,240,173,165,164,192,175,29,74,28,114,213,73,64,206,76,139,96,2,229,15,93,25,239,202,49,70,214,201,72,203,68,89,69,157,216,217,249,120,226,84,149,187,54,53,158,166,182,133,0];static IA=[0,-2,4,6,-1,0,0,2,0,0,0,0,5,4,2,2,0,0,0,0,2,-2,2,14,0,6,3,0,4,0,0,0,3,0,0,0,0,0,0,0,0,-1,4,2,6,0,6,0,0,3,7,0,0,0,-1,0,0,0,0,4,0,0,0,0,0,0,0,0,1,15,0,0,0,0,6,0,2,0,0,0,2,0,0,0,1,0,0,4,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,-2,0,0,2,0,0,0,2,9,0,0,0,0,0,4,0,0,0,3,7,9,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,3,2,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,-2,2,0,0,0,0,0,6,0,0,0,2,0,2,0,0,0,-2,0,0,4,0,0,0,0,6,0,0,-2,-2,0,0,0,0,0,0,-2,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0]}},2215:(t,i,s)=>{s.d(i,{A:()=>h});class h{static gp=14;static $A=28;static jp=129;static tp=167;static Wp=168;static Ip=195;static Yp=2;static Kp=26;static Up=46;static Pp=84;static kp=87;static pp=103;static QA=146;static MA=197;static Zp=201;static yp=204;static _p=209;static cp=126;static xp=185;static lp=15;static ep=98;static tm=213;static Np=74;static Qp=13;static Tp=3;static zp=239;static vA=1;static im=184;static hp=133;static np=226;static Fp=4;static Xp=21;static mp=32;static Gy=41;static _A=152;static UA=19;static Jp=22;static xA=25;static TA=43;static qp=44;static Dp=68;static Vp=136;static BA=139;static ap=140;static PA=142;static op=243;static up=254;static FA=20;static OA=80;static Sp=132;static ip=220;static LA=237;static EA=150;static JA=175;static Mp=193;static dp=12;static DA=54;static fp=212;static Ap=7;static Op=135;static $p=162;static HA=23;static zA=42;static KA=49;static WA=50;static ZA=59;static VA=69;static jA=76;static GA=151;static YA=191;static XA=223}},3937:(t,i,s)=>{s.d(i,{A:()=>o});class h{start=0;end=0;form=0;length=0;tx=null;ix=null;threshold=0;position=0;delta=0;amplitude=0;sx=0;read(t){this.form=t.CA,this.start=t.ut,this.end=t.ut,this.length=t.CA,this.tx=new Int32Array(this.length),this.ix=new Int32Array(this.length);for(let i=0;i=this.threshold&&this.ix&&this.tx&&(this.amplitude=this.ix[this.position++]<<15,this.position>=this.length&&(this.position=this.length-1),this.threshold=this.tx[this.position]/65536*t|0,this.threshold>this.sx&&(this.delta=((this.ix[this.position]<<15)-this.amplitude)/(this.threshold-this.sx)|0)),this.amplitude+=this.delta,this.sx++,this.amplitude-this.delta>>15}}class e{static buffer=null;static hO=null;static sin=null;static hx=new Int32Array(5);static nx=new Int32Array(5);static ox=new Int32Array(5);static lx=new Int32Array(5);static ux=new Int32Array(5);wx=null;yx=null;Ax=null;mx=null;Ix=null;Ex=null;release=null;attack=null;gx=new Int32Array(5);_x=new Int32Array(5);Cx=new Int32Array(5);start=0;length=500;Tx=100;Ox=0;static init=()=>{this.hO=new Int32Array(32768);for(let t=0;t<32768;t++)Math.random()>.5?this.hO[t]=1:this.hO[t]=-1;this.sin=new Int32Array(32768);for(let t=0;t<32768;t++)this.sin[t]=16384*Math.sin(t/5215.1903)|0;this.buffer=new Int32Array(220500)};pf(t,i){for(let i=0;i>1,r+=(i*h>>16)+n}if(this.Ix&&this.Ex){const i=this.Ix.evaluate(t),s=this.Ex.evaluate(t);c=c*(32768+(this.vx(s,a,this.Ix.form)>>1))>>15,a+=(i*o>>16)+l}for(let h=0;h<5;h++)if(0!==this.gx[h]){const n=i+e.nx[h];n>15,e.hx[h],this.wx.form),e.hx[h]+=(s*e.lx[h]>>16)+e.ux[h])}}if(this.release&&this.attack){this.release.reset(),this.attack.reset();let i=0,s=!0;for(let h=0;h>8):this.release.start+((this.release.end-this.release.start)*r>>8),i+=256,i>=o&&(i=0,s=!s),s&&(e.buffer[h]=0)}}if(this.Ox>0&&this.Tx>0){const i=this.Ox*s;for(let s=i;s32767&&(e.buffer[i]=32767);return e.buffer}vx(t,i,s){return 1===s?(32767&i)<16384?t:-t:2===s?e.sin[32767&i]*t>>14:3===s?((32767&i)*t>>14)-t:4===s?e.hO[i/2607&32767]*t:0}read(t){this.wx=new h,this.wx.read(t),this.yx=new h,this.yx.read(t),0!==t.CA&&(t.ft--,this.Ax=new h,this.Ax.read(t),this.mx=new h,this.mx.read(t)),0!==t.CA&&(t.ft--,this.Ix=new h,this.Ix.read(t),this.Ex=new h,this.Ex.read(t)),0!==t.CA&&(t.ft--,this.release=new h,this.release.read(t),this.attack=new h,this.attack.read(t));for(let i=0;i<10;i++){const s=t.vO;if(0===s)break;this.gx[i]=s,this._x[i]=t.iS,this.Cx[i]=t.vO}this.Ox=t.vO,this.Tx=t.vO,this.length=t.ct,this.start=t.ct}}var n=s(1069),r=s(3867);class o{static wp=new Int32Array(1e3);static bx=null;static Lx=null;static Rx=new r.Ns(1e3,null);Sx=new r.Ns(10,null);Mx=0;loopEnd=0;static Sc=t=>{const i=new n.A(t.read('sounds.dat'));for(this.bx=new Uint8Array(441e3),this.Lx=new n.A(this.bx),e.init();;){const t=i.ct;if(65535===t)break;const s=new o;s.read(i),this.Rx[t]=s,this.wp[t]=s.trim()}};static pf=(t,i)=>{if(!this.Rx[t])return null;const s=this.Rx[t];return s?.kx(i)??null};read(t){for(let i=0;i<10;i++)0!==t.CA&&(t.ft--,this.Sx[i]=new e,this.Sx[i]?.read(t));this.Mx=t.ct,this.loopEnd=t.ct}trim(){let t=9999999;for(let i=0;i<10;i++)this.Sx[i]&&(this.Sx[i].start/20|0)i&&(i=this.Sx[t].length+this.Sx[t].start);if(0===i)return 0;let s=22050*i/1e3|0,h=22050*this.Mx/1e3|0,e=22050*this.loopEnd/1e3|0;(h<0||e<0||e>s||h>=e)&&(t=0);let n=s+(e-h)*(t-1);for(let t=44;t>8<<24>>24)}if(t>1){h+=44,e+=44,s+=44,n+=44;const i=n-s;for(let t=s-1;t>=e;t--)o.bx&&(o.bx[t+i]=o.bx[t]);for(let i=1;i{s.d(i,{Cc:()=>a,_c:()=>o,Ns:()=>h,Rv:()=>e,Kr:()=>n,vv:()=>r,wr:()=>l});class h extends Array{constructor(t,i){super(t);for(let s=0;s{s.d(i,{Jk:()=>l,dl:()=>e,qk:()=>o,wl:()=>h,mc:()=>n,qc:()=>r,$k:()=>a});const h=async t=>new Promise((i=>setTimeout(i,t))),e=async t=>new Int8Array(await(await fetch(t)).arrayBuffer()),n=async t=>(await fetch(t)).text();function r(t,i,s,h,e){for(;e--;)s[h++]=t[i++]}function o(t){let i=0n;for(let s=0;s0n;)i.unshift(Number(0xffn&t)),t>>=8n;return 128&i[0]&&i.unshift(0),new Uint8Array(i)}function a(t,i,s){let h=1n;for(;i>0n;)i%2n===1n&&(h=h*t%s),t=t*t%s,i>>=1n;return h}},7953:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1069);class e{static xx=new Uint16Array(['d','o','t'].join('').split('').map((t=>t.charCodeAt(0))));static Dx=new Uint16Array(['(','a',')'].join('').split('').map((t=>t.charCodeAt(0))));static Nx=new Uint16Array(['s','l','a','s','h'].join('').split('').map((t=>t.charCodeAt(0))));static Px=['cook',"cook's",'cooks','seeks','sheet'];static Fx=[];static Ux=[];static Bx=[];static Gx=[];static Hx=[];static Wx=[];static Sc=t=>{const i=new h.A(t.read('fragmentsenc.txt')),s=new h.A(t.read('badenc.txt')),e=new h.A(t.read('domainenc.txt')),n=new h.A(t.read('tldlist.txt'));this.read(s,e,i,n)};static filter=t=>{const i=[...t];this.format(i);const s=i.join('').trim(),h=s.toLowerCase(),e=[...h];this.Yx(e),this.Vx(e),this.Kx(e),this.Xx(e);for(let t=0;t{this.Zx(t),this.qx(i),this.$x(s),this.Jx(h)};static Jx=t=>{const i=t.ut;for(let s=0;st.CA))};static Zx=t=>{const i=t.ut;for(let s=0;st.CA));const i=new Array(t.CA).fill([]).map((()=>[t.gA,t.gA]));i.length>0&&(this.Gx[s]=i)}};static qx=t=>{const i=t.ut;for(let s=0;st.CA))};static $x=t=>{const i=t.ut;for(let s=0;s{const i=[...t],s=[...t];this.Qx(null,i,this.xx),this.Qx(null,s,this.Nx);for(let h=0;h{for(let i=0;i<2;i++)for(let i=this.Bx.length-1;i>=0;i--)this.Qx(this.Gx[i],t,this.Bx[i])};static Kx=t=>{const i=[...t],s=[...t];this.Qx(null,i,this.Dx),this.Qx(null,s,this.xx);for(let h=this.Hx.length-1;h>=0;h--)this.iD(s,i,this.Hx[h],t)};static Xx=t=>{for(let i=0;i=0&&e{if(this.lD(t))return!0;const i=this.aD(t),s=this.Wx,h=s.length;if(i===s[0]||i===s[h-1])return!0;let e=0,n=h-1;for(;e<=n;){const t=(e+n)/2|0;if(i===s[t])return!0;i{if(t.length>6)return 0;let i=0;for(let s=0;s{for(let s=i;s=0;s++)if(this.fD(t[s]))return s;return-1};static rD=(t,i)=>{for(let s=t;s=0;s++)if(!this.fD(i[s]))return s;return i.length};static uD=(t,i,s)=>i===s||'o'===i&&'0'===s?1:'o'===i&&'('===s&&')'===t?2:'c'!==i||'('!==s&&'<'!==s&&'['!==s?'e'===i&&'€'===s||'s'===i&&'$'===s||'l'===i&&'i'===s?1:0:1;static iD=(t,i,s,h)=>{const e=s.length,n=h.length;for(let r=0;r<=n-e;r++){const{dD:e,wD:n}=this.yD(r,s,h);if(!e)continue;const o=this.AD(r,h,3,i,['@']),l=this.pD(n-1,h,3,t,['.',',']);(o>2||l>2)&&this.nD(r,n,h)}};static yD=(t,i,s)=>{const h=i.length;let e=t,n=0;for(;e0)e+=l,n++;else{if(0===n)break;const s=this.uD(o,String.fromCharCode(i[n-1]),r);if(s>0)e+=s,1===n&&t++;else{if(n>=h||!this.hD(r))break;e++}}}return{dD:n>=h,wD:e}};static Qx=(t,i,s)=>{if(!(s.length>i.length))for(let h=0;h<=i.length-s.length;h++){let e=h;const{wD:n,mD:r,ID:o,ED:l,gD:a}=this._D(i,s,e);e=n;let c=i[e],f=e+1=s.length)||l&&a)continue;let u,d=!0;if(o){let t=!1,s=!1;if((h-1<0||this.hD(i[h-1])&&"'"!==i[h-1])&&(t=!0),(e>=i.length||this.hD(i[e])&&"'"!==i[e])&&(s=!0),!t||!s){let s=!1;for(u=h-2,t&&(u=h);!s&&u=0&&(!this.hD(i[u])||"'"===i[u])){const t=[];let h;for(h=0;h<3&&u+h=0&&(!this.hD(i[u-1])||"'"===i[u-1])&&(e=!1),e&&!this.oD(t)&&(s=!0)}u++}s||(d=!1)}}else{c=' ',h-1>=0&&(c=i[h-1]),f=' ',e{let h=s,e=0,n=0,r=!1,o=!1,l=!1;for(;h=t.length||o&&l);){const a=t[h],c=h+10)1===f&&this.fD(a)&&(o=!0),2===f&&(this.fD(a)||this.fD(c))&&(o=!0),h+=f,e++;else{if(0===e)break;let t;if((t=this.vD(c,String.fromCharCode(i[e-1]),a))>0)h+=t;else{if(e>=i.length||!this.eD(a))break;if(this.hD(a)&&"'"!==a&&(r=!0),this.fD(a)&&(l=!0),h++,n++,(100*n/(h-s)|0)>90)break}}}return{wD:h,mD:e,ID:r,ED:o,gD:l}};static vD=(t,i,s)=>{if(i===s)return 1;if(i>='a'&&i<='m'){if('a'===i)return'4'!==s&&'@'!==s&&'^'!==s?'/'===s&&'\\'===t?2:0:1;if('b'===i)return'6'!==s&&'8'!==s?'1'===s&&'3'===t?2:0:1;if('c'===i)return'('!==s&&'<'!==s&&'{'!==s&&'['!==s?0:1;if('d'===i)return'['===s&&')'===t?2:0;if('e'===i)return'3'!==s&&'€'!==s?0:1;if('f'===i)return'p'===s&&'h'===t?2:'£'===s?1:0;if('g'===i)return'9'!==s&&'6'!==s?0:1;if('h'===i)return'#'===s?1:0;if('i'===i)return'y'!==s&&'l'!==s&&'j'!==s&&'1'!==s&&'!'!==s&&':'!==s&&';'!==s&&'|'!==s?0:1;if('j'===i)return 0;if('k'===i)return 0;if('l'===i)return'1'!==s&&'|'!==s&&'i'!==s?0:1;if('m'===i)return 0}if(i>='n'&&i<='z'){if('n'===i)return 0;if('o'===i)return'0'!==s&&'*'!==s?'('===s&&')'===t||'['===s&&']'===t||'{'===s&&'}'===t||'<'===s&&'>'===t?2:0:1;if('p'===i)return 0;if('q'===i)return 0;if('r'===i)return 0;if('s'===i)return'5'!==s&&'z'!==s&&'$'!==s&&'2'!==s?0:1;if('t'===i)return'7'!==s&&'+'!==s?0:1;if('u'===i)return'v'===s?1:'\\'===s&&'/'===t||'\\'===s&&'|'===t||'|'===s&&'/'===t?2:0;if('v'===i)return'\\'===s&&'/'===t||'\\'===s&&'|'===t||'|'===s&&'/'===t?2:0;if('w'===i)return'v'===s&&'v'===t?2:0;if('x'===i)return')'===s&&'('===t||'}'===s&&'{'===t||']'===s&&'['===t||'>'===s&&'<'===t?2:0;if('y'===i)return 0;if('z'===i)return 0}return i>='0'&&i<='9'?'0'===i?'o'===s||'O'===s?1:'('===s&&')'===t||'{'===s&&'}'===t||'['===s&&']'===t?2:0:'1'===i&&'l'===s?1:0:','===i?'.'===s?1:0:'.'===i?','===s?1:0:'!'===i&&'i'===s?1:0};static TD=(t,i,s)=>{let h=0,e=i.length-1;for(;h<=e;){const n=(h+e)/2|0;if(i[n][0]===t&&i[n][1]===s)return!0;tthis.cD(t)?t.charCodeAt(0)+1-'a'.charCodeAt(0):"'"===t?28:this.fD(t)?t.charCodeAt(0)+29-'0'.charCodeAt(0):27;static tD=(t,i,s,h,e)=>{if(!(h.length>s.length))for(let n=0;n<=s.length-h.length;n++){const{wD:r,bD:o}=this.LD(s,h,n);if(o0&&c>0&&(l=!0),2===i&&(a>2&&c>0||a>0&&c>2)&&(l=!0),3===i&&a>0&&c>2&&(l=!0),!l)continue;let f,u=n,d=r-1,w=!1;if(a>2){if(4===a)for(w=!1,f=n-1;f>=0;f--)if(w){if('*'!==e[f])break;u=f}else'*'===e[f]&&(u=f,w=!0);for(w=!1,f=u-1;f>=0;f--)if(w){if(this.hD(s[f]))break;u=f}else this.hD(s[f])||(w=!0,u=f)}if(c>2){if(4===c)for(w=!1,f=d+1;f{let h=0;for(;s0)s+=r,h++;else{if(0===h)break;let t;if((t=this.uD(n,String.fromCharCode(i[h-1]),e))>0)s+=t;else{if(!this.hD(e))break;s++}}}return{wD:s,bD:h}};static hD=t=>!this.OD(t)&&!this.fD(t);static eD=t=>!this.cD(t)||('v'===t||'x'===t||'j'===t||'q'===t||'z'===t);static OD=t=>this.cD(t)||this.RD(t);static fD=t=>t>='0'&&t<='9';static cD=t=>t>='a'&&t<='z';static RD=t=>t>='A'&&t<='Z';static lD=t=>{for(let i=0;i{for(let h=t;h{let s=0;for(let h=i-1;h>=0&&this.hD(t[h]);h--)'*'===t[h]&&s++;return s};static MD=(t,i)=>{let s=0;for(let h=i+1;h(e?this.SD(i,s):this.MD(i,s))>=h?4:this.hD(e?t[s-1]:t[s+1])?1:0;static AD=(t,i,s,h,e)=>{if(0===t)return 2;for(let s=t-1;s>=0&&this.hD(i[s]);s--)if(e.includes(i[s]))return 3;return this.kD(i,h,t,s,!0)};static pD=(t,i,s,h,e)=>{if(t+1===i.length)return 2;for(let s=t+1;s{let i=0;for(let s=0;st>=' '&&t<=''||' '===t||'\n'===t||'\t'===t||'£'===t||'€'===t;static zx=(t,i)=>{for(let s=0;s{let i=!0;for(let s=0;s{s.d(i,{A:()=>h});class h{static DD=[' ','e','t','a','o','i','h','n','s','r','d','l','u','m','w','c','y','f','g','p','b','v','k','x','j','q','z','0','1','2','3','4','5','6','7','8','9',' ','!','?','.',',',':',';','(',')','-','&','*','\\','\'','@','#','+','=','£','$','%','"','[',']'];static ND=[];static Sc=(t,i)=>{let s,h=0,e=-1;for(let n=0;n>4&15,-1!==e?(this.ND[h++]=this.DD[(e<<4)+s-195],e=-1):s<13?this.ND[h++]=this.DD[s]:e=s,s=15&i,-1!==e?(this.ND[h++]=this.DD[(e<<4)+s-195],e=-1):s<13?this.ND[h++]=this.DD[s]:e=s}let n=!0;for(let t=0;t='a'&&i<='z'&&(this.ND[t]=i.toUpperCase(),n=!1),'.'!==i&&'!'!==i||(n=!0)}return this.ND.slice(0,h).join('')};static Hy=(t,i)=>{i.length>80&&(i=i.substring(0,80)),i=i.toLowerCase();let s=-1;for(let h=0;h12&&(n+=195),-1===s?n<13?s=n:t.p1(n):n<13?(t.p1((s<<4)+n),s=-1):(t.p1((s<<4)+(n>>4)),s=15&n)}-1!==s&&t.p1(s<<4)}}},4702:(t,i,s)=>{async function h(t,i={}){const s={env:Object.assign(Object.create(globalThis),i.env||{},{abort(t,i,s,h){t=r(t>>>0),i=r(i>>>0),s>>>=0,h>>>=0,(()=>{throw Error(`${t} in ${i}:${s}:${h}`)})()}})},{exports:h}=await WebAssembly.instantiate(t,s),e=h.memory||i.env.memory,n=Object.setPrototypeOf({read:(t,i,s,n)=>(i=function(t,i,s,n,r){if(null==n)return 0;const o=n.length,l=h.__pin(h.__new(o<>>0;if(r)new r(e.buffer,l,o).set(n);else for(let i=0;i>>0),n[i]);return h.__unpin(l),l}(l,6,0,i,Int8Array)||function(){throw TypeError("value must not be null")}(),function(t,i,s){if(!s)return null;const h=function(t){try{return o.getUint32(t,!0)}catch{return o=new DataView(e.buffer),o.getUint32(t,!0)}}(s-4)>>>i,n=new Array(h);for(let e=0;e>>0));return n}(a,0,h.read(t,i,s,n)>>>0))},h);function r(t){if(!t)return null;const i=t+new Uint32Array(e.buffer)[t-4>>>2]>>>1,s=new Uint16Array(e.buffer);let h=t>>>1,n="";for(;i-h>1024;)n+=String.fromCharCode(...s.subarray(h,h+=1024));return n+String.fromCharCode(...s.subarray(h,i))}let o=new DataView(e.buffer);function l(t,i){try{o.setUint8(t,i,!0)}catch{o=new DataView(e.buffer),o.setUint8(t,i,!0)}}function a(t){try{return o.getInt8(t,!0)}catch{return o=new DataView(e.buffer),o.getInt8(t,!0)}}return n}s.d(i,{A:()=>e});class e{static PD=null;static load=async t=>{this.PD=await h(new WebAssembly.Module(t),{env:void 0})};static read=(t,i,s,h)=>{if(!this.PD)throw new Error('bz2 not found!!');return Int8Array.from(this.PD.read(t,i,s,h))}}},123:(t,i,s)=>{let h;async function e(t,i){n(i);try{const i=await window.audioContext.decodeAudioData(Uint8Array.from(t).buffer);let s=window.audioContext.createBufferSource();s.buffer=i,s.connect(h),s.start()}catch(t){console.log(t)}}function n(t){h||(h=window.audioContext.createGain(),h.connect(window.audioContext.destination)),h.gain.value=t/256}function r(t,i,s){window._tinyMidiPlay&&window._tinyMidiPlay(t,i/256,s)}function o(t){window._tinyMidiVolume&&window._tinyMidiVolume(t/256)}function l(t){window._tinyMidiStop&&window._tinyMidiStop(t)}s.d(i,{mf:()=>e,pl:()=>r,Em:()=>n,qo:()=>l,Im:()=>o})},8902:(t,i,s)=>{var h;const e=(h="file:///home/runner/work/Client2/Client2/src/js/vendor/tinymidipcm/tinymidipcm.mjs",function(t){var i,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,s){i=t,e=s})),["_tsf_load_memory","_tsf_set_output","_tsf_channel_set_bank_preset","_tsf_set_max_voices","_tsf_channel_set_presetnumber","_tsf_reset","_tsf_close","_tml_load_memory","_midi_render","_malloc","_realloc","_free","_fflush","onRuntimeInitialized"].forEach((t=>{Object.getOwnPropertyDescriptor(n.ready,t)||Object.defineProperty(n.ready,t,{get:()=>z('You are getting '+t+' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'),set:()=>z('You are setting '+t+' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js')})}));var r=Object.assign({},n),o=[],l='object'==typeof window,a='function'==typeof importScripts,c='object'==typeof process&&'object'==typeof process.versions&&'string'==typeof process.versions.node,f=!l&&!c&&!a;if(n.ENVIRONMENT)throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)');var u,d,w,y='';if(c){if('undefined'==typeof process||!process.release||'node'!==process.release.name)throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');var A,p;y=a?require('path').FD(y)+'/':__dirname+'/';var m=()=>{p||(A=require('fs'),p=require('path'))};u=(t,i)=>(m(),t=p.normalize(t),A.UD(t,i?void 0:'utf8')),w=t=>{var i=u(t,!0);return i.buffer||(i=new Uint8Array(i)),D(i.buffer),i},d=(t,i,s)=>{m(),t=p.normalize(t),A.BD(t,(function(t,h){t?s(t):i(h.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,'/'),o=process.argv.slice(2),process.on('uncaughtException',(function(t){if(!(t instanceof et))throw t})),process.on('unhandledRejection',(function(t){throw t})),n.inspect=function(){return'[Emscripten Module object]'}}else if(f){if('object'==typeof process&&'function'==typeof require||'object'==typeof window||'function'==typeof importScripts)throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');'undefined'!=typeof read&&(u=function(t){return read(t)}),w=function(t){let i;return'function'==typeof readbuffer?new Uint8Array(readbuffer(t)):(i=read(t,'binary'),D('object'==typeof i),i)},d=function(t,i,s){setTimeout((()=>i(w(t))),0)},'undefined'!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),'undefined'!=typeof print&&('undefined'==typeof console&&(console={}),console.log=print,console.warn=console.error='undefined'!=typeof printErr?printErr:print)}else{if(!l&&!a)throw new Error('environment detection error');if(a?y=self.location.href:'undefined'!=typeof document&&document.currentScript&&(y=document.currentScript.src),h&&(y=h),y=0!==y.indexOf('blob:')?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf('/')+1):'','object'!=typeof window&&'function'!=typeof importScripts)throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');u=t=>{var i=new XMLHttpRequest;return i.open('GET',t,!1),i.send(null),i.responseText},a&&(w=t=>{var i=new XMLHttpRequest;return i.open('GET',t,!1),i.responseType='arraybuffer',i.send(null),new Uint8Array(i.response)}),d=(t,i,s)=>{var h=new XMLHttpRequest;h.open('GET',t,!0),h.responseType='arraybuffer',h.onload=()=>{200==h.status||0==h.status&&h.response?i(h.response):s()},h.onerror=s,h.send(null)}}n.print||console.log.bind(console);var I,E,g=n.printErr||console.warn.bind(console);function _(t,i){Object.getOwnPropertyDescriptor(n,t)||Object.defineProperty(n,t,{configurable:!0,get:function(){z('Module.'+t+' has been replaced with plain '+i+' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)')}})}function C(t){return'FS_createPath'===t||'FS_createDataFile'===t||'FS_createPreloadedFile'===t||'FS_unlink'===t||'addRunDependency'===t||'FS_createLazyFile'===t||'FS_createDevice'===t||'removeRunDependency'===t}Object.assign(n,r),r=null,I='fetchSettings',Object.getOwnPropertyDescriptor(n,I)&&z('`Module.'+I+'` was supplied but `'+I+'` not included in INCOMING_MODULE_JS_API'),n.arguments&&(o=n.arguments),_('arguments','arguments_'),n.thisProgram&&n.thisProgram,_('thisProgram','thisProgram'),n.quit&&n.quit,_('quit','quit_'),D(void 0===n.memoryInitializerPrefixURL,'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'),D(void 0===n.pthreadMainPrefixURL,'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'),D(void 0===n.cdInitializerPrefixURL,'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'),D(void 0===n.filePackagePrefixURL,'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'),D(void 0===n.read,'Module.read option was removed (modify read_ in JS)'),D(void 0===n.readAsync,'Module.readAsync option was removed (modify readAsync in JS)'),D(void 0===n.readBinary,'Module.readBinary option was removed (modify readBinary in JS)'),D(void 0===n.setWindowTitle,'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'),D(void 0===n.TOTAL_MEMORY,'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY'),_('read','read_'),_('readAsync','readAsync'),_('readBinary','readBinary'),_('setWindowTitle','setWindowTitle'),D(!f,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),n.wasmBinary&&(E=n.wasmBinary),_('wasmBinary','wasmBinary');var T;n.noExitRuntime;_('noExitRuntime','noExitRuntime'),'object'!=typeof WebAssembly&&z('no native wasm support detected');var O,v,b,L,R,S,M,k,x=!1;function D(t,i){t||z('Assertion failed'+(i?': '+i:''))}function N(t){O=t,n.HEAP8=v=new Int8Array(t),n.HEAP16=L=new Int16Array(t),n.HEAP32=R=new Int32Array(t),n.HEAPU8=b=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=S=new Uint32Array(t),n.HEAPF32=M=new Float32Array(t),n.HEAPF64=k=new Float64Array(t)}'undefined'!=typeof TextDecoder&&new TextDecoder('utf8');var P=5242880;n.TOTAL_STACK&&D(P===n.TOTAL_STACK,'the stack size can no longer be determined at runtime');var F=n.INITIAL_MEMORY||16777216;function U(){if(!x){var t=ft(),i=S[t>>2],s=S[t+4>>2];34821223==i&&2310721022==s||z('Stack overflow! Stack cookie has been overwritten at 0x'+t.toString(16)+', expected hex dwords 0x89BACDFE and 0x2135467, but received 0x'+s.toString(16)+' 0x'+i.toString(16)),1668509029!==S[0]&&z('Runtime error: The application has corrupted its heap memory area (address zero)!')}}_('INITIAL_MEMORY','INITIAL_MEMORY'),D(F>=P,'INITIAL_MEMORY should be larger than TOTAL_STACK, was '+F+'! (TOTAL_STACK='+P+')'),D('undefined'!=typeof Int32Array&&'undefined'!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,'JS engine does not provide full typed array support'),D(!n.wasmMemory,'Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally'),D(16777216==F,'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically'),function(){var t=new Int16Array(1),i=new Int8Array(t.buffer);if(t[0]=25459,115!==i[0]||99!==i[1])throw'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)'}();var B=[],G=[],H=[],W=!1;D(Math.imul,'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'),D(Math.fround,'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'),D(Math.clz32,'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'),D(Math.trunc,'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');var Y=0,V=null,K=null,X={};function z(t){n.onAbort&&n.onAbort(t),g(t='Aborted('+t+')'),x=!0;var i=new WebAssembly.RuntimeError(t);throw e(i),i}var j={error:function(){z('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM')},init:function(){j.error()},GD:function(){j.error()},HD:function(){j.error()},WD:function(){j.error()},open:function(){j.error()},YD:function(){j.error()},VD:function(){j.error()},KD:function(){j.error()},XD:function(){j.error()},zD:function(){j.error()}};n.FS_createDataFile=j.GD,n.FS_createPreloadedFile=j.HD;var Z,q,$,J,Q='data:application/octet-stream;base64,';function tt(t){return t.startsWith(Q)}function it(t){return t.startsWith('file://')}function st(t,i){return function(){var s=t,h=i;return i||(h=n.asm),D(W,'native function `'+s+'` called before runtime initialization'),h[t]||D(h[t],'exported native function `'+s+'` not found'),h[t].apply(null,arguments)}}function ht(t){try{if(t==Z&&E)return new Uint8Array(E);if(w)return w(t);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}function et(t){this.name='ExitStatus',this.message='Program terminated with exit('+t+')',this.status=t}function nt(t){for(;t.length>0;)t.shift()(n)}function rt(t){rt.jD||(rt.jD={}),rt.jD[t]||(rt.jD[t]=1,c&&(t='warning: '+t),g(t))}function ot(t){try{return T.grow(t-O.byteLength+65535>>>16),N(T.buffer),1}catch(i){g('emscripten_realloc_buffer: Attempted to grow heap from '+O.byteLength+' bytes to '+t+' bytes, but got error: '+i)}}n.locateFile?tt(Z='tinymidipcm.wasm')||(q=Z,Z=n.locateFile?n.locateFile(q,y):y+q):Z=new URL(s(8227),s.b).toString();var lt,at={"emscripten_memcpy_big":function(t,i,s){b.copyWithin(t,i,i+s)},"emscripten_resize_heap":function(t){var i=b.length;D((t>>>=0)>i);var s,h,e=2147483648;if(t>e)return g('Cannot enlarge memory, asked to go up to '+t+' bytes, but the limit is '+e+' bytes!'),!1;for(var n=1;n<=4;n*=2){var r=i*(1+.2/n);r=Math.min(r,t+100663296);var o=Math.min(e,(s=Math.max(t,r))+((h=65536)-s%h)%h);if(ot(o))return!0}return g('Failed to grow the heap from '+i+' bytes to '+o+' bytes, not enough memory!'),!1}},ct=(function(){var t,i={'env':at,'wasi_snapshot_preview1':at};function s(t,i){var s,h=t.exports;n.asm=h,D(T=n.asm.memory,"memory not found in wasm exports"),N(T.buffer),D(n.asm.__indirect_function_table,"table not found in wasm exports"),s=n.asm.__wasm_call_ctors,G.unshift(s),function(t){if(Y--,n.monitorRunDependencies&&n.monitorRunDependencies(Y),t?(D(X[t]),delete X[t]):g('warning: run dependency removed without ID'),0==Y&&(null!==V&&(clearInterval(V),V=null),K)){var i=K;K=null,i()}}('wasm-instantiate')}t='wasm-instantiate',Y++,n.monitorRunDependencies&&n.monitorRunDependencies(Y),t?(D(!X[t]),X[t]=1,null===V&&'undefined'!=typeof setInterval&&(V=setInterval((function(){if(x)return clearInterval(V),void(V=null);var t=!1;for(var i in X)t||(t=!0,g('still waiting on run dependencies:')),g('dependency: '+i);t&&g('(end of list)')}),1e4))):g('warning: run dependency added without ID');var h=n;function r(t){D(n===h,'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'),h=null,s(t.instance)}function o(t){return function(){if(!E&&(l||a)){if('function'==typeof fetch&&!it(Z))return fetch(Z,{credentials:'same-origin'}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+Z+"'";return t.arrayBuffer()})).catch((function(){return ht(Z)}));if(d)return new Promise((function(t,i){d(Z,(function(i){t(new Uint8Array(i))}),i)}))}return Promise.resolve().then((function(){return ht(Z)}))}().then((function(t){return WebAssembly.instantiate(t,i)})).then((function(t){return t})).then(t,(function(t){g('failed to asynchronously prepare wasm: '+t),it(Z)&&g('warning: Loading from a file URI ('+Z+') is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing'),z(t)}))}if(n.instantiateWasm)try{return n.instantiateWasm(i,s)}catch(t){g('Module.instantiateWasm callback failed with error: '+t),e(t)}(E||'function'!=typeof WebAssembly.instantiateStreaming||tt(Z)||it(Z)||c||'function'!=typeof fetch?o(r):fetch(Z,{credentials:'same-origin'}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(r,(function(t){return g('wasm streaming compile failed: '+t),g('falling back to ArrayBuffer instantiation'),o(r)}))}))).catch(e)}(),n.___wasm_call_ctors=st("__wasm_call_ctors"),n._malloc=st("malloc"),n._free=st("free"),n._tsf_load_memory=st("tsf_load_memory"),n._tsf_close=st("tsf_close"),n._tsf_reset=st("tsf_reset"),n._tsf_set_output=st("tsf_set_output"),n._tsf_set_max_voices=st("tsf_set_max_voices"),n._realloc=st("realloc"),n._tsf_channel_set_presetnumber=st("tsf_channel_set_presetnumber"),n._tsf_channel_set_bank_preset=st("tsf_channel_set_bank_preset"),n._tml_load_memory=st("tml_load_memory"),n._midi_render=st("midi_render"),n.___errno_location=st("__errno_location"),n._fflush=st("fflush"),n._emscripten_stack_init=function(){return(ct=n._emscripten_stack_init=n.asm.emscripten_stack_init).apply(null,arguments)}),ft=(n._emscripten_stack_get_free=function(){return(n._emscripten_stack_get_free=n.asm.emscripten_stack_get_free).apply(null,arguments)},n._emscripten_stack_get_base=function(){return(n._emscripten_stack_get_base=n.asm.emscripten_stack_get_base).apply(null,arguments)},n._emscripten_stack_get_end=function(){return(ft=n._emscripten_stack_get_end=n.asm.emscripten_stack_get_end).apply(null,arguments)});function ut(){var t;ct(),D(!(3&(t=ft()))),S[t>>2]=34821223,S[t+4>>2]=2310721022,S[0]=1668509029}function dt(t){function s(){lt||(lt=!0,n.calledRun=!0,x||(D(!W),W=!0,U(),nt(G),i(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),D(!n._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(U(),n.postRun)for('function'==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),H.unshift(t);var t;nt(H)}()))}t=t||o,Y>0||(ut(),function(){if(n.preRun)for('function'==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),B.unshift(t);var t;nt(B)}(),Y>0||(n.setStatus?(n.setStatus('Running...'),setTimeout((function(){setTimeout((function(){n.setStatus('')}),1),s()}),1)):s(),U()))}if(n.stackSave=st("stackSave"),n.stackRestore=st("stackRestore"),n.stackAlloc=st("stackAlloc"),n.setValue=function(t,i,s="i8"){switch(s.endsWith('*')&&(s='*'),s){case'i1':case'i8':v[0|t]=i;break;case'i16':L[t>>1]=i;break;case'i32':R[t>>2]=i;break;case'i64':J=[i>>>0,($=i,+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],R[t>>2]=J[0],R[t+4>>2]=J[1];break;case'float':M[t>>2]=i;break;case'double':k[t>>3]=i;break;case'*':S[t>>2]=i;break;default:z('invalid type for setValue: '+s)}},n.getValue=function(t,i="i8"){switch(i.endsWith('*')&&(i='*'),i){case'i1':case'i8':return v[0|t];case'i16':return L[t>>1];case'i32':case'i64':return R[t>>2];case'float':return M[t>>2];case'double':return k[t>>3];case'*':return S[t>>2];default:z('invalid type for getValue: '+i)}return null},['run','UTF8ArrayToString','UTF8ToString','stringToUTF8Array','stringToUTF8','lengthBytesUTF8','addOnPreRun','addOnInit','addOnPreMain','addOnExit','addOnPostRun','addRunDependency','removeRunDependency','FS_createFolder','FS_createPath','FS_createDataFile','FS_createPreloadedFile','FS_createLazyFile','FS_createLink','FS_createDevice','FS_unlink','getLEB','getFunctionTables','alignFunctionTables','registerFunctions','prettyPrint','getCompilerSetting','print','printErr','callMain','abort','keepRuntimeAlive','wasmMemory','stackAlloc','stackSave','stackRestore','getTempRet0','setTempRet0','writeStackCookie','checkStackCookie','ptrToString','zeroMemory','stringToNewUTF8','exitJS','getHeapMax','emscripten_realloc_buffer','ENV','ERRNO_CODES','ERRNO_MESSAGES','setErrNo','inetPton4','inetNtop4','inetPton6','inetNtop6','readSockaddr','writeSockaddr','DNS','getHostByName','Protocols','Sockets','getRandomDevice','warnOnce','traverseStack','UNWIND_CACHE','convertPCtoSourceLocation','readAsmConstArgsArray','readAsmConstArgs','mainThreadEM_ASM','jstoi_q','jstoi_s','getExecutableName','listenOnce','autoResumeAudioContext','dynCallLegacy','getDynCaller','dynCall','handleException','runtimeKeepalivePush','runtimeKeepalivePop','callUserCallback','maybeExit','safeSetTimeout','asmjsMangle','asyncLoad','alignMemory','mmapAlloc','writeI53ToI64','writeI53ToI64Clamped','writeI53ToI64Signaling','writeI53ToU64Clamped','writeI53ToU64Signaling','readI53FromI64','readI53FromU64','convertI32PairToI53','convertI32PairToI53Checked','convertU32PairToI53','getCFunc','ccall','cwrap','uleb128Encode','sigToWasmTypes','generateFuncType','convertJsFunctionToWasm','freeTableIndexes','functionsInTableMap','getEmptyTableSlot','updateTableMap','addFunction','removeFunction','reallyNegative','unSign','strLen','reSign','formatString','PATH','PATH_FS','intArrayFromString','intArrayToString','AsciiToString','stringToAscii','UTF16Decoder','UTF16ToString','stringToUTF16','lengthBytesUTF16','UTF32ToString','stringToUTF32','lengthBytesUTF32','allocateUTF8','allocateUTF8OnStack','writeStringToMemory','writeArrayToMemory','writeAsciiToMemory','SYSCALLS','getSocketFromFD','getSocketAddress','JSEvents','registerKeyEventCallback','specialHTMLTargets','maybeCStringToJsString','findEventTarget','findCanvasEventTarget','getBoundingClientRect','fillMouseEventData','registerMouseEventCallback','registerWheelEventCallback','registerUiEventCallback','registerFocusEventCallback','fillDeviceOrientationEventData','registerDeviceOrientationEventCallback','fillDeviceMotionEventData','registerDeviceMotionEventCallback','screenOrientation','fillOrientationChangeEventData','registerOrientationChangeEventCallback','fillFullscreenChangeEventData','registerFullscreenChangeEventCallback','JSEvents_requestFullscreen','JSEvents_resizeCanvasForFullscreen','registerRestoreOldStyle','hideEverythingExceptGivenElement','restoreHiddenElements','setLetterbox','currentFullscreenStrategy','restoreOldWindowedStyle','softFullscreenResizeWebGLRenderTarget','doRequestFullscreen','fillPointerlockChangeEventData','registerPointerlockChangeEventCallback','registerPointerlockErrorEventCallback','requestPointerLock','fillVisibilityChangeEventData','registerVisibilityChangeEventCallback','registerTouchEventCallback','fillGamepadEventData','registerGamepadEventCallback','registerBeforeUnloadEventCallback','fillBatteryEventData','battery','registerBatteryEventCallback','setCanvasElementSize','getCanvasElementSize','demangle','demangleAll','jsStackTrace','stackTrace','ExitStatus','getEnvStrings','checkWasiClock','flush_NO_FILESYSTEM','dlopenMissingError','createDyncallWrapper','setImmediateWrapped','clearImmediateWrapped','polyfillSetImmediate','uncaughtExceptionCount','exceptionLast','exceptionCaught','ExceptionInfo','exception_addRef','exception_decRef','Browser','setMainLoop','wget','FS','MEMFS','TTY','PIPEFS','SOCKFS','_setNetworkCallback','tempFixedLengthArray','miniTempWebGLFloatBuffers','heapObjectForWebGLType','heapAccessShiftForWebGLHeap','GL','emscriptenWebGLGet','computeUnpackAlignedImageSize','emscriptenWebGLGetTexPixelData','emscriptenWebGLGetUniform','webglGetUniformLocation','webglPrepareUniformLocationsBeforeFirstUse','webglGetLeftBracePos','emscriptenWebGLGetVertexAttrib','writeGLArray','AL','SDL_unicode','SDL_ttfContext','SDL_audio','SDL','SDL_gfx','GLUT','EGL','GLFW_Window','GLFW','GLEW','IDBStore','runAndAbortIfError','ALLOC_NORMAL','ALLOC_STACK','allocate'].forEach((function(t){Object.getOwnPropertyDescriptor(n,t)||Object.defineProperty(n,t,{configurable:!0,get:function(){var i="'"+t+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";C(t)&&(i+='. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'),z(i)}})})),['ptrToString','zeroMemory','stringToNewUTF8','exitJS','setErrNo','inetPton4','inetNtop4','inetPton6','inetNtop6','readSockaddr','writeSockaddr','getHostByName','getRandomDevice','traverseStack','convertPCtoSourceLocation','readAsmConstArgs','mainThreadEM_ASM','jstoi_q','jstoi_s','getExecutableName','listenOnce','autoResumeAudioContext','dynCallLegacy','getDynCaller','dynCall','runtimeKeepalivePush','runtimeKeepalivePop','callUserCallback','maybeExit','safeSetTimeout','asmjsMangle','asyncLoad','alignMemory','mmapAlloc','writeI53ToI64','writeI53ToI64Clamped','writeI53ToI64Signaling','writeI53ToU64Clamped','writeI53ToU64Signaling','readI53FromI64','readI53FromU64','convertI32PairToI53','convertI32PairToI53Checked','convertU32PairToI53','getCFunc','ccall','cwrap','uleb128Encode','sigToWasmTypes','generateFuncType','convertJsFunctionToWasm','getEmptyTableSlot','updateTableMap','addFunction','removeFunction','reallyNegative','unSign','strLen','reSign','formatString','intArrayFromString','intArrayToString','AsciiToString','stringToAscii','UTF16ToString','stringToUTF16','lengthBytesUTF16','UTF32ToString','stringToUTF32','lengthBytesUTF32','allocateUTF8','allocateUTF8OnStack','writeStringToMemory','writeAsciiToMemory','getSocketFromFD','getSocketAddress','registerKeyEventCallback','maybeCStringToJsString','findEventTarget','findCanvasEventTarget','getBoundingClientRect','fillMouseEventData','registerMouseEventCallback','registerWheelEventCallback','registerUiEventCallback','registerFocusEventCallback','fillDeviceOrientationEventData','registerDeviceOrientationEventCallback','fillDeviceMotionEventData','registerDeviceMotionEventCallback','screenOrientation','fillOrientationChangeEventData','registerOrientationChangeEventCallback','fillFullscreenChangeEventData','registerFullscreenChangeEventCallback','JSEvents_requestFullscreen','JSEvents_resizeCanvasForFullscreen','registerRestoreOldStyle','hideEverythingExceptGivenElement','restoreHiddenElements','setLetterbox','softFullscreenResizeWebGLRenderTarget','doRequestFullscreen','fillPointerlockChangeEventData','registerPointerlockChangeEventCallback','registerPointerlockErrorEventCallback','requestPointerLock','fillVisibilityChangeEventData','registerVisibilityChangeEventCallback','registerTouchEventCallback','fillGamepadEventData','registerGamepadEventCallback','registerBeforeUnloadEventCallback','fillBatteryEventData','battery','registerBatteryEventCallback','setCanvasElementSize','getCanvasElementSize','getEnvStrings','checkWasiClock','flush_NO_FILESYSTEM','createDyncallWrapper','setImmediateWrapped','clearImmediateWrapped','polyfillSetImmediate','ExceptionInfo','exception_addRef','exception_decRef','setMainLoop','_setNetworkCallback','heapObjectForWebGLType','heapAccessShiftForWebGLHeap','emscriptenWebGLGet','computeUnpackAlignedImageSize','emscriptenWebGLGetTexPixelData','emscriptenWebGLGetUniform','webglGetUniformLocation','webglPrepareUniformLocationsBeforeFirstUse','webglGetLeftBracePos','emscriptenWebGLGetVertexAttrib','writeGLArray','SDL_unicode','SDL_ttfContext','SDL_audio','GLFW_Window','runAndAbortIfError','ALLOC_NORMAL','ALLOC_STACK','allocate'].forEach((function(t){'undefined'==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,t)||Object.defineProperty(globalThis,t,{configurable:!0,get:function(){var i='`'+t+'` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line';C(t)&&(i+='. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'),rt(i)}})})),K=function t(){lt||dt(),lt||(K=t)},n.preInit)for('function'==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return dt(),t.ready});const n=class{constructor(t={}){this.ZD=void 0,this.qD=0,this.$D=0,this.JD=0,this.QD=t.QD||100,this.sampleRate=t.sampleRate||44100,this.tN=t.tN||2,this.gain=t.gain||0,t.bufferSize?this.bufferSize=t.bufferSize:this.iN(1),this.sN=t.sN||(()=>{}),this.hN=t.hN||(()=>{}),this.eN=void 0,this.test=0}async init(){if(!this.ZD){if('undefined'!=typeof process){const{FD:t}=await import('path'),{nN:i}=await import('module');globalThis.__dirname=t("file:///home/runner/work/Client2/Client2/src/js/vendor/tinymidipcm/index.js"),globalThis.require=i("file:///home/runner/work/Client2/Client2/src/js/vendor/tinymidipcm/index.js")}this.ZD=await e(),this.rN=this.ZD._malloc(this.bufferSize),this.oN=this.ZD._malloc(8)}}iN(t){this.bufferSize=4*this.sampleRate*this.tN*t}lN(){if(!this.ZD)throw new Error(`${this.constructor.name} not initalized. call .init()`)}aN(t){this.lN();const{_malloc:i,_free:s,_tsf_load_memory:h,_tsf_set_output:e,_tsf_channel_set_bank_preset:n,_tsf_set_max_voices:r,_tsf_channel_set_presetnumber:o}=this.ZD;s(this.qD),this.qD=i(t.length),this.ZD.HEAPU8.set(t,this.qD),this.$D=h(this.qD,t.length),e(this.$D,2===this.tN?0:2,this.sampleRate,this.gain)}cN(){this.lN();const t=new Uint8Array(this.bufferSize);return t.set(this.ZD.HEAPU8.subarray(this.rN,this.rN+this.bufferSize)),t}fN(t){const{_malloc:i,_free:s,_tml_load_memory:h}=this.ZD;return s(this.JD),this.JD=i(t.length),this.ZD.HEAPU8.set(t,this.JD),h(this.JD,t.length)}uN(t){const{_midi_render:i}=this.ZD;return i(this.$D,t,this.tN,this.sampleRate,this.rN,this.bufferSize,this.oN)}dN(t){if(this.lN(),!this.$D)throw new Error('no soundfont buffer set. call .setSoundfont');window.clearTimeout(this.eN);const{setValue:i,getValue:s}=this.ZD;i(this.oN,0,'double'),this.ZD._tsf_reset(this.$D),this.ZD._tsf_channel_set_bank_preset(this.$D,9,128,0),t[0]==='R'.charCodeAt(0)&&(t=t.slice(20));let h=this.fN(t);const e=()=>{h=this.uN(h);const t=this.cN();this.sN(t),h?this.eN=setTimeout(e,this.QD):this.hN(s(this.oN,'double'))};this.eN=setTimeout(e,16)}};!function(){window.AudioContext=window.AudioContext||window.webkitAudioContext,window.AudioContext&&(window.audioContext=new window.AudioContext);var t=function(i){if(window.audioContext){var s=window.audioContext.createBuffer(1,1,22050),h=window.audioContext.createBufferSource();h.buffer=s,h.connect(window.audioContext.destination),h.start?h.start(0):h.play?h.play(0):h.noteOn&&h.noteOn(0)}document.removeEventListener('touchstart',t),document.removeEventListener('touchend',t),document.removeEventListener('click',t)};document.addEventListener('touchstart',t),document.addEventListener('touchend',t),document.addEventListener('click',t)}(),(async()=>{const t=2,i=44100;let s=new Float32Array,h=window.audioContext.createGain();h.gain.value=.1,h.connect(window.audioContext.destination);let e=window.audioContext.currentTime,r=[];const o=new n({QD:30,sN:t=>{let i=new Float32Array(t.buffer),h=new Float32Array(s.length+i.length);h.set(s,0),h.set(i,s.length),s=h},hN:t=>{},bufferSize:102400});await o.init();const l=await fetch('./SCC1_Florestan.sf2'),a=new Uint8Array(await l.arrayBuffer());function c(){if(!window.audioContext||!s.length)return;let n=window.audioContext.createBufferSource();const o=s.length/t,l=window.audioContext.createBuffer(t,o,i);for(let i=0;i{t.stop(window.audioContext.currentTime)})),r=[],h.gain.value=t}}function d(t,i){-1!==t&&window._tinyMidiVolume(t),e=window.audioContext.currentTime,f=setInterval(c,250),o.dN(i)}o.aN(a),window._tinyMidiStop=async t=>{t?function(t,i){const s=window.audioContext.currentTime;h.gain.cancelScheduledValues(s),h.gain.setValueAtTime(h.gain.value,s),h.gain.linearRampToValueAtTime(t,s+2),setTimeout(i,2e3)}(0,(()=>{u()})):u()},window._tinyMidiVolume=(t=1)=>{h.gain.value=t},window._tinyMidiPlay=async(t,i,s)=>{t&&(await window._tinyMidiStop(s),s?setTimeout((()=>{d(i,t)}),2e3):d(i,t))}})()},8227:(t,i,s)=>{t.exports=s.p+"9f86b5397894e28b5ae2.wasm"}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var s=n[t]={exports:{}};return e[t](s,s.exports,r),s.exports}r.m=e,t="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",i="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",s="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",h=t=>{t&&t.d<1&&(t.d=1,t.forEach((t=>t.r--)),t.forEach((t=>t.r--?t.r++:t())))},r.a=(e,n,r)=>{var o;r&&((o=[]).d=-1);var l,a,c,f=new Set,u=e.exports,d=new Promise(((t,i)=>{c=i,a=t}));d[i]=u,d[t]=t=>(o&&t(o),f.forEach(t),d.catch((t=>{}))),e.exports=d,n((e=>{var n;l=(e=>e.map((e=>{if(null!==e&&"object"==typeof e){if(e[t])return e;if(e.then){var n=[];n.d=0,e.then((t=>{r[i]=t,h(n)}),(t=>{r[s]=t,h(n)}));var r={};return r[t]=t=>t(n),r}}var o={};return o[t]=t=>{},o[i]=e,o})))(e);var r=()=>l.map((t=>{if(t[s])throw t[s];return t[i]})),a=new Promise((i=>{(n=()=>i(r)).r=0;var s=t=>t!==o&&!f.has(t)&&(f.add(t),t&&!t.d&&(n.r++,t.push(n)));l.map((i=>i[t](s)))}));return n.r?a:r()}),(t=>(t?c(d[s]=t):a(u),h(o)))),o&&o.d<0&&(o.d=0)},r.d=(t,i)=>{for(var s in i)r.o(i,s)&&!r.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},r.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r.p="/Client2/",r.b=document.baseURI||self.location.href;r(7906)})(); \ No newline at end of file +(()=>{"use strict";var t,i,s,h,e={8793:(t,i,s)=>{s.d(i,{K:()=>N});var h=s(1120),e=s(4583),n=s(1069),r=s(4702);class o{static tt=t=>{let i=0;t=t.toUpperCase();for(let s=0;s=this.st)return null;if(this.ot[t])return this.ot[t];const i=this.rt[t],s=i+this.nt[t];if(this.it){const h=Uint8Array.from(this.buffer.subarray(i,i+s));return this.ot[t]=h,h}{const i=Uint8Array.from(r.A.read(this.et[t],this.buffer,this.nt[t],this.rt[t]));return this.ot[t]=i,i}}}var l=s(8370),a=(s(8902),s(6666)),c=s(198),f=s(818),u=s(670),d=s(8268),w=s(3867),y=s(7854),A=s(8950),p=s(1302),m=s(9298),I=s(8665),E=s(1312),g=s(3819),_=s(8317),C=s(9234),T=s(123),O=s(5637),v=s(6948),b=s(2164),L=s(8738),R=s(3764),S=s(8534),M=s(6730);function k(t,i){var s;(s=document.createElement('a')).href=t,s.download=i,document.body.appendChild(s),s.style='display: none',s.click(),s.remove()}class x{wt=new Map;yt;At=self.isSecureContext?self.crypto.randomUUID():'0';constructor(t){this.yt=t}async It(){const t=new RTCPeerConnection({iceServers:[{urls:'stun:stun.l.google.com:19302'}]}),i=t.createDataChannel('channel'),s=crypto.randomUUID();this.wt.set(s,i),await t.setLocalDescription(await t.createOffer()),t.onicegatheringstatechange=async()=>{if('complete'===t.iceGatheringState){let i;self.isSecureContext?await navigator.clipboard.writeText(JSON.stringify(t.localDescription)):console.log(JSON.stringify(t.localDescription));try{for(;null===(i=prompt('Offer copied to clipboard, paste answer here')););t.setRemoteDescription(new RTCSessionDescription(JSON.parse(i)))}catch(t){console.error(t)}}},i.onopen=()=>{i.send(JSON.stringify({type:'id',id:s})),console.log('Connected to peer!')},i.onerror=t=>{console.error(t)},i.onmessage=t=>{const i=JSON.parse(t.data);i.data&&(i.data=Object.values(i.data)),this.yt&&this.yt.postMessage(i)}}postMessage(t){const i=this.wt.get(t.data.id),s=t.data;s.data&&(s.data=Array.from(t.data.data)),i&&'open'===i.readyState&&i.send(JSON.stringify(s))}}class D{pc;Et=void 0;At;constructor(t){this.pc=new RTCPeerConnection({iceServers:[{urls:'stun:stun.l.google.com:19302'}]}),this.pc.ondatachannel=i=>{this.Et=i.channel,this.Et.onopen=()=>{console.log('Connected to host!')},this.Et.onerror=t=>{console.error(t)},this.Et.onmessage=i=>{if(!this.At){const t=JSON.parse(i.data);if('id'===t.type)return void(this.At=t.id)}t.onmessage&&t.onmessage(i)}},this.pc.onicegatheringstatechange=async()=>{'complete'===this.pc.iceGatheringState&&(self.isSecureContext?await navigator.clipboard.writeText(JSON.stringify(this.pc.localDescription)):console.log(JSON.stringify(this.pc.localDescription)))}}async gt(t){await this.pc.setRemoteDescription(new RTCSessionDescription(JSON.parse(t))),await this.pc.setLocalDescription(await this.pc.createAnswer())}}class N extends l.A{static _t=225;static Ct=10;static portOffset=0;static members=!0;static Tt=!1;static Ot='';static vt='';static bt=!1;static Lt=2;static Rt=!1;static St='https://raw.githubusercontent.com/2004scape/Server/main';static exponent=58778699976184461502525193738213253649000149147835990136706041084440742975821n;static Mt=7162900525229798032761816791230527296329313291232324290237849263501208207972894053929065636522363163621000728841182238772712427862772219676577293600221789n;static kt=0;static xt=0;static Dt=0;static Nt=0;static Pt=0;static Ft=0;static Ut=0;static Bt=0;static Gt=0;static Ht=0;static Wt=0;static Yt=0;static Vt=0;static Kt=0;static Xt=0;static zt=()=>{c.A.Tt=!1,e.A.Tt=!1,N.Tt=!1,f.A.Tt=!1};static jt=()=>{c.A.Tt=!0,e.A.Tt=!0,N.Tt=!0,f.A.Tt=!0};Zt=2048;qt=2047;$t=!1;Jt=!1;Qt=!1;ti=!1;db=null;ii=0;si=[];stream=null;in=n.A.hi(1);ei=n.A.hi(1);ni=n.A.hi(1);ri=0n;oi=0;li=0;ai=0;ci=null;fi=0;packetSize=0;ui=0;di=0;wi=0;yi=null;Ai=!0;pi=0;mi=0;Ii=null;Ei=null;gi=null;_i=null;Ci=null;Ti=null;Oi=null;vi=null;bi=null;Li=null;Ri=null;Si='';Mi='';username='';password='';ki=null;xi=null;Di=null;Ni=null;Pi=[];Fi=!1;Ui=null;Bi=null;Gi=null;Hi=null;Wi=null;Yi=null;Vi=null;Ki=null;Xi=null;zi=null;ji=new Int32Array(256);Zi=0;qi=0;$i=0;Ji=null;Qi=null;ts=null;ss=null;hs=null;es=null;ns=null;rs=null;os=null;ls=null;cs=null;fs=null;us=null;ds=null;ws=null;ys=null;As=null;ps=null;Is=null;Es=null;gs=null;_s=new Int32Array(33);Cs=new Int32Array(33);Ts=new Int32Array(151);Os=new Int32Array(151);vs=null;bs=null;Ls=null;Rs=null;Ss=null;Ms=null;ks=new w.xs(13,null);Ds=null;Ns=null;Ps=new w.xs(50,null);Fs=new w.xs(50,null);Us=new w.xs(20,null);Bs=new w.xs(20,null);Gs=null;Hs=new w.xs(8,null);Ws=null;Ys=null;Vs=null;Ks=null;Xs=null;zs=null;js=null;Zs=null;qs=null;$s=null;Js=null;Qs=null;th=null;ih=null;sh=null;hh=null;eh=null;nh=null;rh=new w.xs(1e3,null);oh=!1;lh=!1;ah=!1;fh=!1;uh=-1;dh=0;wh=0;yh=0;Ah=0;ph=0;mh=0;Ih=!1;Eh=0;gh=0;_h=0;Ch=0;Th=0;Oh=0;bh=[];Lh=-1;Rh=-1;Sh=new h.A;Mh=78;kh=0;xh=0;Dh=[];Nh=0;Ph=0;Fh=0;Uh=0;Bh=0;Gh=0;Hh=0;Wh=0;Yh=[];Vh=[];Kh=[];Xh=[];zh=null;jh=-1;Zh=3;qh=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];$h=0;Jh=0;Qh=0;te=!1;ie=0;se=!1;he='';ee='';ne=0;re='';oe=!1;le=-1;ae=new w.xs(100,null);ce=new w.xs(100,null);messageType=new Int32Array(100);fe=new Int32Array(100);ue=0;de=0;we=0;ye='';Ae=0;pe=0;me=0;Ie=0;Ee=0;ge=0;_e=0;Ce=0;Te=0;Oe=!1;ve=0;be=0;Le=0;Re=0;Se=null;Me=0;ke=0;xe=0;De=0;Ne=!1;Pe=[];Fe=[];Ue=0;Be=0;Ge=0;He=null;We=0;Ye=new Int32Array(500);Ve=new Int32Array(500);Ke=new Int32Array(500);Xe=new Int32Array(500);ze=0;je=0;Ze=0;qe='';$e=!1;Je=-1;Qe=0;tn=0;sn=0;hn=0;en=0;nn=new Int32Array(1e3);rn=new Int32Array(1e3);ln=null;an=0;cn=0;fn=0;un=0;dn=0;wn=!1;yn=0;An=0;pn=0;mn=0;In=2;En=2;gn=1;_n=new Int32Array(5);Cn=new w.xs(5,!1);Tn=new Int32Array(5);On=new Int32Array(5);vn=new Int32Array(5);bn=0;Ln=0;Rn=0;Sn=0;Mn=0;kn=0;xn=0;Dn=0;Nn=0;Pn=1;Fn=2;Un=-1;Bn=0;Gn=0;Hn=0;Wn=0;Yn=0;Vn=0;Kn=null;Xn=null;zn=null;jn=0;Zn=0;qn=new Int8Array(16384);$n=new w.xs(u.A.Jn,null);Qn=0;tr=0;ir=128;sr=0;hr=0;er=0;nr=0;rr=0;lr=null;ar=null;cr=new w.ur(u.A.dr,u.A.dr);wr=0;yr=0;Ar=0;pr=0;mr=0;Ir=0;Er=0;gr=0;_r=0;Cr=0;Tr=0;Or=0;vr=new w.xs(this.Zt,null);br=0;Lr=new Int32Array(this.Zt);Rr=0;Sr=0;Mr=new Int32Array(this.Zt);kr=new Int32Array(1e3);Dr=new w.xs(this.Zt,null);Nr=new w.xs(8192,null);Pr=0;Fr=new Int32Array(8192);Ur=new a.A;Br=new a.A;Gr=new a.A;Hr=new a.A;Wr=new w.Yr(u.A.Jn,u.A.dr,u.A.dr,null);Vr=new a.A;Kr=new Int32Array(4e3);Xr=new Int32Array(4e3);zr=new Int32Array(u.A.dr*u.A.dr);jr=new Int32Array(u.A.dr*u.A.dr);Zr=0;qr=null;$r=0;Jr=0;Qr=-1;io=0;so=0;ho=0;eo=0;no=!1;ro=!0;oo=!1;lo=new Int32Array(7);ao=new Int32Array(5);co=0;fo=0;static uo=50;do=new Int32Array(N.uo);wo=new Int32Array(N.uo);yo=new Int32Array(N.uo);Ao=new Int32Array(N.uo);po=new Int32Array(N.uo);mo=new Int32Array(N.uo);Io=new Int32Array(N.uo);Eo=new w.xs(N.uo,null);_o=new w.xs(100,null);Co=new BigInt64Array(100);To=new Int32Array(100);Oo=null;vo=0;bo=!0;Lo=new Int32Array(50);Ro=new Int32Array(50);So=new Int32Array(50);Mo=192;ko=-1;xo=-1;Do=0;No=0;Po=0;Fo=!0;Uo=null;Bo=0;Go=0;Ho=192;yt=void 0;Wo=!1;host=null;Yo=null;Vo=new w.xs(16,null);Ko=0;Xo=!1;zo=()=>{try{this.stream&&this.stream.close()}catch(t){}this.Yo&&'998'===N.getParameter('world')&&this.Yo.Et?.send(JSON.stringify({type:'close',id:this.Yo.At})),this.stream=null,(0,T.jo)(!1),this.ei=null,this.ni=null,this.in=null,this.zn=null,this.Kn=null,this.Xn=null,this.lr=null,this.ar=null,this.ln=null,this.$n=null,this.zr=null,this.jr=null,this.Kr=null,this.Xr=null,this.qn=null,this.Qi=null,this.ts=null,this.ss=null,this.hs=null,this.es=null,this.ns=null,this.rs=null,this.os=null,this.ls=null,this.cs=null,this.fs=null,this.us=null,this.ds=null,this.ws=null,this.ys=null,this.As=null,this.ps=null,this.vs=null,this.Ls=null,this.bs=null,this.Rs=null,this.Ss=null,this.Ms=null,this.ks=null,this.js=null,this.Zs=null,this.qs=null,this.$s=null,this.Js=null,this.Qs=null,this.th=null,this.ih=null,this.sh=null,this.hh=null,this.Ns=null,this.Us=null,this.Bs=null,this.Hs=null,this.Ws=null,this.Ys=null,this.Vs=null,this.Ks=null,this.Ps=null,this.Fs=null,this.cr=null,this.vr=null,this.Lr=null,this.Mr=null,this.Dr=null,this.kr=null,this.Nr=null,this.Fr=null,this.Wr=null,this.Vr=null,this.Hr=null,this.Ur=null,this.Br=null,this.Gr=null,this.Ke=null,this.Xe=null,this.Ye=null,this.Ve=null,this.bh=null,this.Pe=null,this.nn=null,this.rn=null,this.rh=null,this.Ds=null,this._o=null,this.Co=null,this.To=null,this._i=null,this.Ci=null,this.Ii=null,this.Ei=null,this.gi=null,this.Ti=null,this.Oi=null,this.vi=null,this.bi=null,this.Zo(),O.A.zo(),v.A.zo(),p.A.zo(),b.A.qo=null,_.A.qo=null,h.A.qo=null,E.A.qo=null,L.A.qo=null,L.A.$o=null,R.A.qo=null,this.Jo=null,d.A.$o=null,e.A.zo(),c.A.zo(),I.A.zo(),S.A.qo=[],M.A.qo=[]};Qo(){return this.pi}tl(){return this.oe}il(){return this.se}sl(){return this.Rh}hl(){return this.uh}Zo=()=>{this.Fi=!1,this.Ji&&(clearInterval(this.Ji),this.Ji=null),this.Li=null,this.Ri=null,this.Pi=[],this.Vi=null,this.Ki=null,this.Xi=null,this.zi=null,this.Hi=null,this.Gi=null,this.Wi=null,this.Yi=null,this.Ui=null,this.Bi=null};el=()=>{'999'===N.getParameter('world')?(this.yt=new Worker('worker.js',{type:'module'}),this.yt.onmessage=this.onmessage,this.host=new x(this.yt)):'998'===N.getParameter('world')&&(this.yt={onmessage:t=>{this.stream.nl.onmessage(t)},postMessage:t=>{this.Yo&&this.Yo.Et&&'open'===this.Yo.Et.readyState&&this.Yo.Et.send(JSON.stringify(t))},onerror:null,onmessageerror:null,terminate:()=>{throw new Error},addEventListener:()=>{throw new Error},removeEventListener:()=>{throw new Error},dispatchEvent:()=>{throw new Error}},this.Yo=new D(this.yt))};onmessage=t=>{switch(t.data.type){case'ready':return void(this.Wo=!0);case'save':return k(t.data.value,t.data.path.split('/').pop().split('\\').pop()),void URL.revokeObjectURL(t.data.value);case'close':return void this.yt?.postMessage({type:'close',id:t.data.id})}this.host?.At===t.data.id?this.stream.nl.onmessage(t.data):this.host?.postMessage(t)};rl=async()=>{if(999==+N.getParameter('world'))this.host&&await this.host.It();else if(998==+N.getParameter('world')&&this.Yo){if(this.Yo.Et)return void console.log('You are already connected.');let t;try{for(;null===(t=prompt('Paste offer here, answer will be copied to clipboard')););await this.Yo.gt(t)}catch(t){console.error(t)}}};ol=async(t,i,s,h)=>{let e=5,r=await(this.db?.ll(t));if(r&&n.A.al(r)!==s&&(r=void 0),r)return new o(r);for(;!r;){await this.cl(h,`Requesting ${i}`);try{r=+N.getParameter('world')<998?await(0,C.fl)(`${N.vt}/${t}${s}`):await(0,C.fl)(`${N.vt}/${t}`)}catch(t){r=void 0;for(let t=e;t>0;t--)await this.cl(h,`Error loading - Will retry in ${t} secs.`),await(0,C.ul)(1e3);e*=2,e>60&&(e=60)}}return await(this.db?.dl(t,r)),new o(r)};wl=async(t,i,s,h)=>{let e=await(this.db?.ll(t+'.mid'));if(e&&12345678!==i&&n.A.al(e)!==i&&(e=void 0),!e)try{e=+N.getParameter('world')<998?await(0,C.fl)(`${N.vt}/${t}_${i}.mid`):await(0,C.fl)(`${N.vt}/songs/${t}.mid`),s!==e.length&&(e=e.slice(0,s))}catch(t){}if(!e)return;await(this.db?.dl(t+'.mid',e));const o=new n.A(Uint8Array.from(e)).ut,l=r.A.read(o,e,s,4);(0,T.yl)(l,this.Ho,h)};Al=()=>{if(y.pl.fillStyle='black',y.pl.fillRect(0,0,this.width,this.height),this.ml(1),this.Qt){this.Fi=!1,y.pl.font='bold 16px helvetica, sans-serif',y.pl.textAlign='left',y.pl.fillStyle='yellow';let t=35;y.pl.fillText('Sorry, an error has occured whilst loading RuneScape',30,t),t+=50,y.pl.fillStyle='white',y.pl.fillText('To fix this try the following (in order):',30,t),t+=50,y.pl.font='bold 12px helvetica, sans-serif',y.pl.fillText('1: Try closing ALL open web-browser windows, and reloading',30,t),t+=30,y.pl.fillText('2: Try clearing your web-browsers cache from tools->internet options',30,t),t+=30,y.pl.fillText('3: Try using a different game-world',30,t),t+=30,y.pl.fillText('4: Try rebooting your computer',30,t),t+=30,y.pl.fillText('5: Try selecting a different version of Java from the play-game menu',30,t)}if(this.ti&&(this.Fi=!1,y.pl.font='bold 20px helvetica, sans-serif',y.pl.textAlign='left',y.pl.fillStyle='white',y.pl.fillText('Error - unable to load game!',50,50),y.pl.fillText('To play RuneScape make sure you play from',50,100),y.pl.fillText('https://2004scape.org',50,150)),this.Jt){this.Fi=!1,y.pl.font='bold 13px helvetica, sans-serif',y.pl.textAlign='left',y.pl.fillStyle='yellow';let t=35;y.pl.fillText('Error a copy of RuneScape already appears to be loaded',30,t),t+=50,y.pl.fillStyle='white',y.pl.fillText('To fix this try the following (in order):',30,t),t+=50,y.pl.font='bold 12px helvetica, sans-serif',y.pl.fillText('1: Try closing ALL open web-browser windows, and reloading',30,t),t+=30,y.pl.fillText('2: Try rebooting your computer, and reloading',30,t)}};Il=t=>{if(!t.El)return!1;for(let i=0;i=h)return!1}else if(3===t.El[i]){if(s<=h)return!1}else if(4===t.El[i]){if(s===h)return!1}else if(s!==h)return!1}return!0};Cl=(t,i,s,h,e)=>{this.Xs?.draw(t,i),this.zs?.draw(t,i+e-16),A.A.fillRect(t,i+16,16,e-32,m.A.Tl);let n=(e-32)*e/h|0;n<8&&(n=8);const r=(e-n-32)*s/(h-e)|0;A.A.fillRect(t,i+r+16,16,n,m.A.Ol),A.A.vl(t,i+r+16,m.A.bl,n),A.A.vl(t+1,i+r+16,m.A.bl,n),A.A.Ll(t,i+r+16,m.A.bl,16),A.A.Ll(t,i+r+17,m.A.bl,16),A.A.vl(t+15,i+r+16,m.A.Rl,n),A.A.vl(t+14,i+r+17,m.A.Rl,n-1),A.A.Ll(t,i+r+n+15,m.A.Rl,16),A.A.Ll(t+1,i+r+n+14,m.A.Rl,15)};Sl=(t,i)=>{let s=!1;const e=h.A.qo[t];if(!e.Ml)return!1;for(let t=0;th.delay[n.Nl];)n.Dl-=h.delay[n.Nl]+1,n.Nl++,n.Nl>=h.Pl&&(n.Nl-=h.Fl,(n.Nl<0||n.Nl>=h.Pl)&&(n.Nl=0)),s=!0}}}return s};Ul=(t,i,s,n,r=!1)=>{if(0!==t.type||!t.Ml||t.hide&&this.Ae!==t.id&&this.pe!==t.id&&this.me!==t.id)return;const o=A.A.left,l=A.A.top,a=A.A.right,c=A.A.bottom;A.A.Bl(i,s,i+t.width,s+t.height);const f=t.Ml.length;for(let o=0;o0&&this.Kl(c),c.type===h.A.Xl)c.zl>c.scroll-c.height&&(c.zl=c.scroll-c.height),c.zl<0&&(c.zl=0),this.Ul(c,l,a,c.zl,r),c.scroll>c.height&&this.Cl(l+c.width,a,c.zl,c.scroll,c.height);else if(c.type===h.A.jl){let t=0;for(let i=0;i0){let i=0,s=0;const n=c.$l[t]-1;if(h>=-32&&h<=512&&e>=-32&&e<=334||0!==this.ge&&this.Ee===t){const r=p.A.ia(n,c.Jl[t]);if(0!==this.ge&&this.Ee===t&&this.Ie===c.id?(i=this.sa-this._e,s=this.ha-this.Ce,i<5&&i>-5&&(i=0),s<5&&s>-5&&(s=0),this.Te<5&&(i=0,s=0),r.ea(128,h+i,e+s)):0!==this.Me&&this.ke===t&&this.xe===c.id?r.ea(128,h,e):r.draw(h,e),33===r.na||1!==c.Jl[t]){const n=c.Jl[t];this.ki?.ra(h+i+1,e+10+s,this.oa(n),m.A.la),this.ki?.ra(h+i,e+9+s,this.oa(n),m.A.aa)}}}else if(c.ca&&t<20){const i=c.ca[t];i?.draw(h,e)}t++}}else if(c.type===h.A.fa)c.fill?A.A.fillRect(l,a,c.width,c.height,c.ua):A.A.Wl(l,a,c.width,c.height,c.ua);else if(c.type===h.A.da){const t=c.font;let i=c.ua,s=c.text;if(this.me!==c.id&&this.pe!==c.id&&this.Ae!==c.id||0===c.wa||(i=c.wa),this.Il(c)&&(i=c.ya,c.Aa&&c.Aa.length>0&&(s=c.Aa)),c.pa===h.A.ma&&this.Ne&&(s='Please wait...',i=c.ua),!t||!s)continue;for(let h=a+t.height;s.length>0;h+=t.height){if(-1!==s.indexOf('%')){for(;;){const t=s.indexOf('%1');if(-1===t)break;s=s.substring(0,t)+this.Ia(this.gl(c,0))+s.substring(t+2)}for(;;){const t=s.indexOf('%2');if(-1===t)break;s=s.substring(0,t)+this.Ia(this.gl(c,1))+s.substring(t+2)}for(;;){const t=s.indexOf('%3');if(-1===t)break;s=s.substring(0,t)+this.Ia(this.gl(c,2))+s.substring(t+2)}for(;;){const t=s.indexOf('%4');if(-1===t)break;s=s.substring(0,t)+this.Ia(this.gl(c,3))+s.substring(t+2)}for(;;){const t=s.indexOf('%5');if(-1===t)break;s=s.substring(0,t)+this.Ia(this.gl(c,4))+s.substring(t+2)}}const e=s.indexOf('\\n');let n;-1!==e?(n=s.substring(0,e),s=s.substring(e+2)):(n=s,s=''),c.Ea?t.ga(l+(c.width/2|0),h,n,i,c._a):t.Ca(l,h,n,i,c._a)}}else if(c.type===h.A.Ta){let t;t=this.Il(c)?c.Oa:c.va,t?.draw(l,a)}else if(c.type===h.A.ba){const t=e.A.La,i=e.A.Ra;e.A.La=l+(c.width/2|0),e.A.Ra=a+(c.height/2|0);const s=e.A.sin[c.Sa]*c.zoom>>16,h=e.A.cos[c.Sa]*c.zoom>>16,n=this.Il(c);let r;r=n?c.xl:c.kl;let o=null;if(-1===r)o=c.Ma(-1,-1,n);else{const t=E.A.qo[r];t.frames&&t.ka&&(o=c.Ma(t.frames[c.Nl],t.ka[c.Nl],n))}o&&o.xa(0,c.Da,0,c.Sa,0,s,h),e.A.La=t,e.A.Ra=i}else if(c.type===h.A.Na){const t=c.font;if(!t||!c.$l||!c.Jl)continue;let i=0;for(let s=0;s0){const e=p.A.get(c.$l[i]-1);let n=e.name;if((e.Pa||1!==c.Jl[i])&&(n=n+' x'+this.Fa(c.Jl[i])),!n)continue;const r=l+h*(c.Ql+115),o=a+s*(c.ta+12);c.Ea?t.ga(r+(c.width/2|0),o,n,c.ua,c._a):t.Ca(r,o,n,c.ua,c._a)}i++}}}A.A.Bl(o,l,a,c)};Kl=t=>{let i=t.Vl;if(i>=h.A.Ua&&i<=h.A.Ba)i--,i>=this.co?(t.text='',t.pa=0):(t.text=this._o[i],t.pa=1);else if(i>=h.A.Ga&&i<=h.A.Ha)i-=h.A.Ga,i>=this.co?(t.text='',t.pa=0):(0===this.To[i]?t.text='@red@Offline':this.To[i]===N.Ct?t.text='@gre@World-'+(this.To[i]-9):t.text='@yel@World-'+(this.To[i]-9),t.pa=1);else if(i===h.A.Wa)t.scroll=15*this.co+20,t.scroll<=t.height&&(t.scroll=t.height+1);else if(i>=h.A.Ya&&i<=h.A.Va)i-=h.A.Ya,i>=this.xh?(t.text='',t.pa=0):(t.text=g.A.Ka(g.A.Xa(this.Dh[i])),t.pa=1);else if(i===h.A.za)t.scroll=15*this.xh+20,t.scroll<=t.height&&(t.scroll=t.height+1);else if(i===h.A.ja){if(t.Sa=150,t.Da=256*Math.sin(this.ii/40)&2047,this.oo){this.oo=!1;const i=new w.xs(7,null);let s=0;for(let t=0;t<7;t++){const h=this.lo[t];h>=0&&(i[s++]=_.A.qo[h].Ma())}const h=I.A.Za(i,s);for(let t=0;t<5;t++)0!==this.ao[t]&&(h.qa(d.A.$a[t][0],d.A.$a[t][this.ao[t]]),1===t&&h.qa(d.A.Ja[0],d.A.Ja[this.ao[t]]));if(this.qr){const i=E.A.qo[this.qr.Qa].frames;i&&(h.tc(),h.ic(i[0]),h.sc(64,850,-30,-50,-30,!0),t.model=h)}}}else if(i===h.A.hc)this.eh||(this.eh=t.va,this.nh=t.Oa),this.ro?t.va=this.nh:t.va=this.eh;else if(i===h.A.ec)this.eh||(this.eh=t.va,this.nh=t.Oa),this.ro?t.va=this.eh:t.va=this.nh;else if(i===h.A.nc)t.text=this.qe,this.ii%20<10?t.text=t.text+'|':t.text=t.text+' ';else if(i===h.A.rc)this.no?this.$e?(t.ua=m.A.RED,t.text='Moderator option: Mute player for 48 hours: '):(t.ua=m.A.Yl,t.text='Moderator option: Mute player for 48 hours: '):t.text='';else if(i===h.A.oc||i===h.A.lc)if(0===this.Qe)t.text='';else{let i;i=0===this.tn?'earlier today':1===this.tn?'yesterday':this.tn+' days ago',t.text='You last logged in '+i+' from: '+g.A.ac(this.Qe)}else if(i===h.A.cc)0===this.hn&&(t.text='0 unread messages',t.ua=m.A.aa),1===this.hn&&(t.text='1 unread message',t.ua=m.A.GREEN),this.hn>1&&(t.text=this.hn+' unread messages',t.ua=m.A.GREEN);else if(i===h.A.fc)if(201===this.sn)t.text='';else if(200===this.sn)t.text='You have not yet set any password recovery questions.';else{let i;i=0===this.sn?'Earlier today':1===this.sn?'Yesterday':this.sn+' days ago',t.text=i+' you changed your recovery questions'}else i===h.A.uc?201===this.sn?t.text='':200===this.sn?t.text='We strongly recommend you do so now to secure your account.':t.text='If you do not remember making this change then cancel it immediately':i===h.A.dc&&(201===this.sn?t.text='':(this.sn,t.text="Do this from the 'account management' area on our front webpage"))};gl=(t,i)=>{if(!t.scripts||i>=t.scripts.length)return-2;try{const s=t.scripts[i];if(!s)return-1;let e=0,n=0;for(;;){const t=s[n++];if(0===t)return e;if(1===t)e+=this.Vh[s[n++]];else if(2===t)e+=this.Kh[s[n++]];else if(3===t)e+=this.Yh[s[n++]];else if(4===t){const t=h.A.qo[s[n++]],i=s[n++]+1;if(t.$l&&t.Jl)for(let s=0;st<999999999?String(t):'*';Fa=t=>{let i=String(t);for(let t=i.length-3;t>0;t-=3)i=i.substring(0,t)+','+i.substring(t);return i.length>8?i='@gre@'+i.substring(0,i.length-8)+' million @whi@('+i+')':i.length>4&&(i='@cya@'+i.substring(0,i.length-4)+'K @whi@('+i+')'),' '+i};oa=t=>t<1e5?String(t):t<1e7?(t/1e3|0)+'K':(t/1e6|0)+'M'}},7604:(t,i,s)=>{s.d(i,{w:()=>r});var h=s(8370),e=s(8793),n=s(9234);async function r(){await async function(){0===h.A.getParameter('world').length&&h.A.setParameter('world','1');['0','998','999'].includes(h.A.getParameter('world'))?function(){if(+h.A.getParameter('world')>=998)return void(e.K.vt='data/pack/client');e.K.Ot='http://localhost',e.K.vt='http://localhost',e.K.portOffset=0}():await async function(t){const i=await o(t,parseInt(h.A.getParameter('world'),10)),s=new URL(i.address);e.K.Ct=10+i.id-1,e.K.Ot=`${s.protocol}//${s.hostname}`,e.K.vt=`${s.protocol}//${s.hostname}:${s.port}`,t||(e.K.Ot=e.K.Ot.replace('https:','http:'));e.K.portOffset=i.portOffset,e.K.members=!0===i?.members,h.A.setParameter('world',i.id.toString(10))}(window.location.protocol.startsWith('https'))}(),function(){0===h.A.getParameter('detail').length&&h.A.setParameter('detail','high');'low'===h.A.getParameter('detail')?e.K.jt():e.K.zt()}(),0===h.A.getParameter('method').length&&h.A.setParameter('method','0')}async function o(t,i,s=0){if(s>=10)throw new Error('could not find world to connect!');const h=t?'https:':'http:';let e;try{e=JSON.parse(await(0,n.yc)(`${h}//2004scape.org/api/v1/worldlist`))}catch(h){return await(0,n.ul)(1e3),o(t,i,++s)}e.push({id:0,region:'Local Development',address:'http://localhost',portOffset:0,members:!0,vr:0});const r=e.find((t=>t.id===i));return r||o(t,i,10)}},7906:(t,i,s)=>{s.a(t,(async(t,i)=>{try{var h=s(1312),e=s(5637),n=s(1302),r=s(6948),o=s(8317),l=s(8738),a=s(3764),c=s(1120),f=s(1183),u=s(8950),d=s(4583),w=s(1673),y=s(1122),A=s(2682),p=s(8665),m=s(9298),I=s(1069),E=s(3554),g=s(353),_=s(2634),C=s(4544),T=s(2215),O=s(3955),v=s(7953),b=s(2646),L=s(3937),R=(s(8902),s(4702)),S=s(6666),M=s(3819),k=s(2595),x=s(198),D=s(818),N=s(5599),P=s(1023),F=s(6169),U=s(2630),B=s(5327),G=s(670),H=s(9456),W=s(8268),Y=s(8412),V=s(3606),K=s(4197),X=s(254),z=s(7628),j=s(123),Z=s(9234),q=s(3867),$=s(8793),J=s(8534),Q=s(6730),tt=s(2164),it=s(7604),st=s(3795),ht=s(4909),et=s(296);class t extends $.K{load=async()=>{if(this.$t)this.Jt=!0;else{this.$t=!0;try{this.el(),await this.cl(10,'Connecting to fileserver'),await R.A.load(await(await fetch('bz2.wasm')).arrayBuffer()),this.db=new C.A(await C.A.openDatabase());const t=new I.A(new Uint8Array(await(0,Z.fl)(`${$.K.vt}/crc`)));for(let i=0;i<9;i++)this.si[i]=t.ut;$.K.Tt||await this.wl('scape_main',12345678,4e4,!1);const i=await this.ol('title','title screen',this.si[1],10);this.yi=i,this.ki=A.A.Ac(i,'p11'),this.xi=A.A.Ac(i,'p12'),this.Di=A.A.Ac(i,'b12'),this.Ni=A.A.Ac(i,'q8'),await this.mc(),this.Ic();const s=await this.ol('config','config',this.si[2],15),u=await this.ol('interface','interface',this.si[3],20),m=await this.ol('media','2d graphics',this.si[4],30),E=await this.ol('models','3d graphics',this.si[5],40),g=await this.ol('textures','textures',this.si[6],60),_=await this.ol('wordenc','chat system',this.si[7],65),T=await this.ol('sounds','sound effects',this.si[8],70);this.ar=new q.Ec(G.A.Jn,G.A.dr,G.A.dr),this.lr=new q.gc(G.A.Jn,G.A.dr+1,G.A.dr+1),this.lr&&(this.ln=new x.A(this.lr,G.A.dr,G.A.Jn,G.A.dr));for(let t=0;t34||t>34))999===i&&(i=h);else if(999!==i){s=h;break}this.Ts[t-9]=i-21,this.Os[t-9]=s-i}d.A.Sc(479,96),this.Is=d.A.Mc,d.A.Sc(190,261),this.Es=d.A.Mc,d.A.Sc(512,334),this.gs=d.A.Mc;const V=new Int32Array(9);for(let t=0;t<9;t++){const i=32*t+128+15,s=3*i+600,h=d.A.sin[i];V[t]=s*h>>16}x.A.init(512,334,500,800,V),v.A.Lc(_),this.kc()}catch(t){console.error(t),this.Qt=!0}}};update=async()=>{this.Jt||this.Qt||this.ti||(this.ii++,this.xc?await this.Dc():await this.Nc())};draw=async()=>{this.Jt||this.Qt||this.ti?this.Al():(this.xc?this.Pc():await this.Fc(),this.dh=0)};refresh=()=>{this.Ai=!0};cl=async(t,i)=>{if(console.log(`${t}%: ${i}`),await this.Uc(),!this.yi)return void await super.cl(t,i);this.gi?.bind();this.Di?.Bc(180,54,'RuneScape is loading - please wait...',m.A.Yl);u.A.Wl(28,62,304,34,m.A.Gc),u.A.Wl(29,63,302,32,m.A.la),u.A.fillRect(30,64,3*t,30,m.A.Gc),u.A.fillRect(30+3*t,64,300-3*t,30,m.A.la),this.Di?.Bc(180,85,i,m.A.Yl),this.gi?.draw(214,186),this.Ai&&(this.Ai=!1,this.Fi||(this._i?.draw(0,0),this.Ci?.draw(661,0)),this.Ii?.draw(128,0),this.Ei?.draw(214,386),this.Ti?.draw(0,265),this.Oi?.draw(574,265),this.vi?.draw(128,186),this.bi?.draw(574,186)),await(0,Z.ul)(5)};Hc=()=>{this.Fi&&(this.Wc(),this.Wc(),this.Yc())};Uc=async()=>{this.Ii||(this.Jo=null,this.hs=null,this.ts=null,this.Qi=null,this.ss=null,this.es=null,this.ns=null,this.rs=null,this._i=new f.A(128,265),u.A.clear(),this.Ci=new f.A(128,265),u.A.clear(),this.Ii=new f.A(533,186),u.A.clear(),this.Ei=new f.A(360,146),u.A.clear(),this.gi=new f.A(360,200),u.A.clear(),this.Ti=new f.A(214,267),u.A.clear(),this.Oi=new f.A(215,267),u.A.clear(),this.vi=new f.A(86,79),u.A.clear(),this.bi=new f.A(87,79),u.A.clear(),this.yi&&(await this.mc(),this.Ic()),this.Ai=!0)};mc=async()=>{if(!this.yi)return;const t=await y.A.Vc(this.yi,'title');this._i?.bind(),t.Tc(0,0),this.Ci?.bind(),t.Tc(-661,0),this.Ii?.bind(),t.Tc(-128,0),this.Ei?.bind(),t.Tc(-214,-386),this.gi?.bind(),t.Tc(-214,-186),this.Ti?.bind(),t.Tc(0,-265),this.Oi?.bind(),t.Tc(-128,-186),this.vi?.bind(),t.Tc(-128,-186),this.bi?.bind(),t.Tc(-574,-186),t._c(),this._i?.bind(),t.Tc(394,0),this.Ci?.bind(),t.Tc(-267,0),this.Ii?.bind(),t.Tc(266,0),this.Ei?.bind(),t.Tc(180,-386),this.gi?.bind(),t.Tc(180,-186),this.Ti?.bind(),t.Tc(394,-265),this.Oi?.bind(),t.Tc(-180,-265),this.vi?.bind(),t.Tc(212,-186),this.bi?.bind(),t.Tc(-180,-186);const i=y.A.Ac(this.yi,'logo');this.Ii?.bind(),i.draw((this.width/2|0)-(i.width/2|0)-128,18)};Kc=t=>{if(!this.Hi||!this.Gi)return;this.Hi.fill(0);for(let t=0;t<5e3;t++){const t=128*Math.random()*256|0;this.Hi[t]=256*Math.random()|0}for(let t=0;t<20;t++){for(let t=1;t<255;t++)for(let i=1;i<127;i++){const s=i+(t<<7);this.Gi[s]=(this.Hi[s-1]+this.Hi[s+1]+this.Hi[s-128]+this.Hi[s+128])/4|0}const t=this.Hi;this.Hi=this.Gi,this.Gi=t}if(t){let i=0;for(let s=0;s{if(this.yi){this.Li=w.A.Ac(this.yi,'titlebox'),this.Ri=w.A.Ac(this.yi,'titlebutton');for(let t=0;t<12;t++)this.Pi[t]=w.A.Ac(this.yi,'runes',t);this.Ui=new y.A(128,265),this.Bi=new y.A(128,265),this._i&&(0,Z.jc)(this._i.Rc,0,this.Ui.Rc,0,33920),this.Ci&&(0,Z.jc)(this.Ci.Rc,0,this.Bi.Rc,0,33920),this.Ki=new Int32Array(256);for(let t=0;t<64;t++)this.Ki[t]=262144*t;for(let t=0;t<64;t++)this.Ki[t+64]=1024*t+m.A.RED;for(let t=0;t<64;t++)this.Ki[t+128]=4*t+m.A.aa;for(let t=0;t<64;t++)this.Ki[t+192]=m.A.Yl;this.Xi=new Int32Array(256);for(let t=0;t<64;t++)this.Xi[t]=1024*t;for(let t=0;t<64;t++)this.Xi[t+64]=4*t+m.A.GREEN;for(let t=0;t<64;t++)this.Xi[t+128]=262144*t+m.A.Zc;for(let t=0;t<64;t++)this.Xi[t+192]=m.A.Yl;this.zi=new Int32Array(256);for(let t=0;t<64;t++)this.zi[t]=4*t;for(let t=0;t<64;t++)this.zi[t+64]=262144*t+m.A.BLUE;for(let t=0;t<64;t++)this.zi[t+128]=1024*t+m.A.qc;for(let t=0;t<64;t++)this.zi[t+192]=m.A.Yl;this.Vi=new Int32Array(256),this.Hi=new Int32Array(32768),this.Gi=new Int32Array(32768),this.Kc(null),this.Wi=new Int32Array(32768),this.Yi=new Int32Array(32768),this.cl(10,'Connecting to fileserver').then((()=>{this.Fi||(this.Fi=!0,this.Ji=setInterval(this.Hc,35))}))}};Nc=async()=>{if(0===this.pi){let t=(this.width/2|0)-80,i=20+(this.height/2|0);if(i+=20,1===this.$c&&this.Jc>=t-75&&this.Jc<=t+75&&this.Qc>=i-20&&this.Qc<=i+20){if(+$.K.getParameter('world')>=998)return void this.rl();this.pi=3,this.mi=0}t=80+(this.width/2|0),1===this.$c&&this.Jc>=t-75&&this.Jc<=t+75&&this.Qc>=i-20&&this.Qc<=i+20&&(this.Si='',this.Mi='Enter your username & password.',this.pi=2,this.mi=0)}else if(2===this.pi){let t=(this.height/2|0)-40;t+=30,t+=25,1===this.$c&&this.Qc>=t-15&&this.Qc=t-15&&this.Qc=i-75&&this.Jc<=i+75&&this.Qc>=s-20&&this.Qc<=s+20&&await this.tf(this.username,this.password,!1),i=80+(this.width/2|0),1===this.$c&&this.Jc>=i-75&&this.Jc<=i+75&&this.Qc>=s-20&&this.Qc<=s+20&&(this.pi=0,this.username='',this.password='');;){const t=this.if();if(-1===t)return;let i=!1;for(let s=0;s0&&(this.username=this.username.substring(0,this.username.length-1)),9!==t&&10!==t&&13!==t||(this.mi=1),i&&(this.username=this.username+String.fromCharCode(t)),this.username.length>12&&(this.username=this.username.substring(0,12))):1===this.mi&&(8===t&&this.password.length>0&&(this.password=this.password.substring(0,this.password.length-1)),9!==t&&10!==t&&13!==t||(this.mi=0),i&&(this.password=this.password+String.fromCharCode(t)),this.password.length>20&&(this.password=this.password.substring(0,20)))}}else if(3===this.pi){const t=this.width/2|0;let i=50+(this.height/2|0);i+=20,1===this.$c&&this.Jc>=t-75&&this.Jc<=t+75&&this.Qc>=i-20&&this.Qc<=i+20&&(this.pi=0)}};Fc=async()=>{await this.Uc(),this.gi?.bind(),this.Li?.draw(0,0);if(0===this.pi){let t=180,i=80;this.Di?.ga(t,i,'Welcome to RuneScape',m.A.aa,!0),t=100,i=120,this.Ri?.draw(t-73,i-20),this.Di?.ga(t,i+5,'New user',m.A.Yl,!0),t=260,this.Ri?.draw(t-73,i-20),this.Di?.ga(t,i+5,'Existing User',m.A.Yl,!0)}else if(2===this.pi){let t=100,i=60;this.Si.length>0?(this.Di?.ga(180,i-15,this.Si,m.A.aa,!0),this.Di?.ga(180,i,this.Mi,m.A.aa,!0),i+=30):(this.Di?.ga(180,i-7,this.Mi,m.A.aa,!0),i+=30),this.Di?.Ca(90,i,`Username: ${this.username}${0===this.mi&&this.ii%40<20?'@yel@|':''}`,m.A.Yl,!0),i+=15,this.Di?.Ca(92,i,`Password: ${M.A.hf(this.password)}${1===this.mi&&this.ii%40<20?'@yel@|':''}`,m.A.Yl,!0),i=150,this.Ri?.draw(t-73,i-20),this.Di?.ga(t,i+5,'Login',m.A.Yl,!0),t=260,this.Ri?.draw(t-73,i-20),this.Di?.ga(t,i+5,'Cancel',m.A.Yl,!0)}else if(3===this.pi){this.Di?.ga(180,40,'Create a free account',m.A.aa,!0);const t=180;let i=65;this.Di?.ga(180,i,'To create a new account you need to',m.A.Yl,!0),i+=15,this.Di?.ga(180,i,'go back to the main RuneScape webpage',m.A.Yl,!0),i+=15,this.Di?.ga(180,i,"and choose the red 'create account'",m.A.Yl,!0),i+=15,this.Di?.ga(180,i,'button at the top right of that page.',m.A.Yl,!0),i=150,this.Ri?.draw(t-73,i-20),this.Di?.ga(t,i+5,'Cancel',m.A.Yl,!0)}this.gi?.draw(214,186),this.Ai&&(this.Ai=!1,this.Ii?.draw(128,0),this.Ei?.draw(214,386),this.Ti?.draw(0,265),this.Oi?.draw(574,265),this.vi?.draw(128,186),this.bi?.draw(574,186))};tf=async(i,s,h)=>{try{if(h||(this.Si='',this.Mi='Connecting to server...',await this.Fc()),'998'===t.getParameter('world')){if(this.Yo&&!this.Yo.Et)return this.Si='You are not connected to a host.',void(this.Mi='Please try using world 999.');this.stream=new et.A(this.yt,this.Yo.At)}else if('999'===t.getParameter('world')){if(!this.Wo)return this.Si='The server is starting up.',void(this.Mi='Please try again in a moment.');this.stream=new et.A(this.yt,this.host.At)}else this.stream=new E.A(await E.A.ef({host:$.K.Ot,port:43594+$.K.portOffset}));await this.stream.nf(this.in.data,0,8),this.in.ft=0,this.ri=this.in.rf;const e=new Int32Array([Math.floor(99999999*Math.random()),Math.floor(99999999*Math.random()),Number(this.ri>>32n),Number(this.ri&BigInt(4294967295))]);this.ei.ft=0,this.ei.p1(10),this.ei.p4(e[0]),this.ei.p4(e[1]),this.ei.p4(e[2]),this.ei.p4(e[3]),this.ei.p4(0),this.ei.lf(i),this.ei.lf(s),this.ei.af($.K.Mt,$.K.exponent),this.ni.ft=0,h?this.ni.p1(18):this.ni.p1(16),this.ni.p1(this.ei.ft+36+1+1),this.ni.p1($.K._t),this.ni.p1($.K.Tt?1:0);for(let t=0;t<9;t++)this.ni.p4(this.si[t]);this.ni.cf(this.ei.data,this.ei.ft,0),this.ei.random=new _.A(e);for(let t=0;t<4;t++)e[t]+=50;this.ci=new _.A(e),this.stream?.write(this.ni.data,this.ni.ft);const n=await this.stream.read();if(1===n)return await(0,Z.ul)(2e3),void await this.tf(i,s,h);if(2===n||18===n){this.no=18===n,k.A.ff(),this.xc=!0,this.ei.ft=0,this.in.ft=0,this.fi=-1,this.ui=-1,this.di=-1,this.wi=-1,this.packetSize=0,this.oi=0,this.ai=0,this.li=0,this.Nh=0,this.Oh=0,this.Ih=!1,this.uf=0;for(let t=0;t<100;t++)this.ae[t]=null;this.ve=0,this.Ue=0,this.an=0,this.vo=0,this.An=(100*Math.random()|0)-50,this.pn=(110*Math.random()|0)-55,this.mn=(80*Math.random()|0)-40,this.Dn=(120*Math.random()|0)-60,this.Nn=(30*Math.random()|0)-20,this.sr=(20*Math.random()|0)-10&2047,this.Un=-1,this.un=0,this.dn=0,this.br=0,this.Pr=0;for(let t=0;t{if(null!==this.vr){this.ai>1&&this.ai--,this.li>0&&this.li--;for(let t=0;t<5&&await this.read();t++);if(this.xc){for(let t=0;tthis.No+(this.Do/22|0)&&(this.Do=i.ft,this.No=Date.now(),this.ko=this.Lo[t],this.xo=this.Ro[t],await(0,j.Af)(i.data.slice(0,i.ft),this.Mo))}catch(t){console.error(t)}this.vo--;for(let i=t;i0&&(this.Po-=20,this.Po<0&&(this.Po=0),0===this.Po&&this.Fo&&!$.K.Tt&&this.Uo&&await this.wl(this.Uo,this.Bo,this.Go,!1));const t=k.A.flush();if(t&&(this.ei.pf(O.A.mf),this.ei.p2(t.ft),this.ei.cf(t.data,t.ft,0),t.release()),this.oi++,this.oi>750&&await this.If(),this.Ef(),this.gf(),this._f(),this.Cf(),(1===this.Tf[1]||1===this.Tf[2]||1===this.Tf[3]||1===this.Tf[4])&&this.tr++>5&&(this.tr=0,this.ei.pf(O.A.Of),this.ei.p2(this.ir),this.ei.p2(this.sr),this.ei.p1(this.Dn),this.ei.p1(this.Nn)),this.cn++,0!==this.wh&&(this.yh+=20,this.yh>=400&&(this.wh=0)),0!==this.Me&&(this.De++,this.De>=15&&(2===this.Me&&(this.oh=!0),3===this.Me&&(this.lh=!0),this.Me=0)),0!==this.ge&&(this.Te++,(this.sa>this._e+5||this.sathis.Ce+5||this.ha=5){if(this.ze=-1,this.bf(),this.ze===this.Ie&&this.je!==this.Ee){const t=c.A.qo[this.Ie];if(t.$l){const i=t.$l[this.je];t.$l[this.je]=t.$l[this.Ee],t.$l[this.Ee]=i}if(t.Jl){const i=t.Jl[this.je];t.Jl[this.je]=t.Jl[this.Ee],t.Jl[this.Ee]=i}this.ei.pf(O.A.Lf),this.ei.p2(this.Ie),this.ei.p2(this.Ee),this.ei.p2(this.je)}}else(1===this.We||this.Rf(this.Oh-1))&&this.Oh>2?this.Sf():this.Oh>0&&await this.Mf(this.Oh-1);this.De=10,this.$c=0}if($.K.Dt++,$.K.Dt>127&&($.K.Dt=0,this.ei.pf(O.A.kf),this.ei.p3(4991788)),-1!==x.A.xf&&this.qr){const t=x.A.xf,i=x.A.Df,s=this.Nf(this.qr.Pf[0],this.qr.Ff[0],t,i,0,0,0,0,0,0,!0);x.A.xf=-1,s&&(this.Ah=this.Jc,this.ph=this.Qc,this.wh=1,this.yh=0)}1===this.$c&&this.zh&&(this.zh=null,this.lh=!0,this.$c=0),await this.Uf(),this.Bf(),this.Gf(),this.Hf(),1!==this.vf&&1!==this.$c||this.dh++,2===this.an&&($.K.Rt?this.Wf():this.Yf()),2===this.an&&this.wn&&this.Vf();for(let t=0;t<5;t++)this._n[t]++;if(await this.Kf(),this.uf++,this.uf>4500&&(this.li=250,this.uf-=500,this.ei.pf(O.A.Xf)),this.yn++,this.yn>500){this.yn=0;const t=8*Math.random()|0;1&~t||(this.An+=this.In),2&~t||(this.pn+=this.En),4&~t||(this.mn+=this.gn)}if(this.An<-50&&(this.In=2),this.An>50&&(this.In=-2),this.pn<-55&&(this.En=2),this.pn>55&&(this.En=-2),this.mn<-40&&(this.gn=1),this.mn>40&&(this.gn=-1),this.xn++,this.xn>500){this.xn=0;const t=8*Math.random()|0;1&~t||(this.Dn+=this.Fn),2&~t||(this.Nn+=this.Pn)}this.Dn<-60&&(this.Fn=2),this.Dn>60&&(this.Fn=-2),this.Nn<-20&&(this.Pn=1),this.Nn>10&&(this.Pn=-1),$.K.Nt++,$.K.Nt>110&&($.K.Nt=0,this.ei.pf(O.A.zf),this.ei.p4(0)),this.so++,this.so>50&&this.ei.pf(O.A.jf);try{this.stream&&this.ei.ft>0&&(this.stream.write(this.ei.data,this.ei.ft),this.ei.ft=0,this.so=0)}catch(t){console.log(t),await this.If()}}}};Pc=()=>{if(null===this.vr)return;this.Ai&&(this.Ai=!1,this.os?.draw(0,11),this.ls?.draw(0,375),this.cs?.draw(729,5),this.fs?.draw(752,231),this.us?.draw(0,0),this.ds?.draw(561,0),this.ws?.draw(520,11),this.ys?.draw(520,231),this.As?.draw(501,375),this.ps?.draw(0,345),this.oh=!0,this.lh=!0,this.ah=!0,this.fh=!0,2!==this.an&&(this.ss?.draw(8,11),this.ts?.draw(561,5))),2===this.an&&this.Zf(),this.Ih&&1===this.Eh&&(this.oh=!0);let t=!1;if(-1!==this.Lh&&(t=this.Sl(this.Lh,this.cn),t&&(this.oh=!0)),2===this.Me&&(this.oh=!0),2===this.ge&&(this.oh=!0),this.oh&&(this.qf(),this.oh=!1),-1===this.Rh){this.Sh.zl=this.Mh-this.kh-77,this.sa>453&&this.sa<565&&this.ha>350&&this.$f(this.sa-22,this.ha-375,this.Mh,77,!1,463,0,this.Sh);let t=this.Mh-this.Sh.zl-77;t<0&&(t=0),t>this.Mh-77&&(t=this.Mh-77),this.kh!==t&&(this.kh=t,this.lh=!0)}-1!==this.Rh&&(t=this.Sl(this.Rh,this.cn),t&&(this.lh=!0)),3===this.Me&&(this.lh=!0),3===this.ge&&(this.lh=!0),this.zh&&(this.lh=!0),this.Ih&&2===this.Eh&&(this.lh=!0),this.lh&&(this.Jf(),this.lh=!1),2===this.an&&(this.Qf(),this.ts?.draw(561,5)),-1!==this.jh&&(this.ah=!0),this.ah&&(-1!==this.jh&&this.jh===this.Zh&&(this.jh=-1,this.ei.pf(O.A.tu),this.ei.p1(this.Zh)),this.ah=!1,this.rs?.bind(),this.Ms?.draw(0,0),-1===this.Lh&&(-1!==this.qh[this.Zh]&&(0===this.Zh?this.js?.draw(29,30):1===this.Zh?this.Zs?.draw(59,29):2===this.Zh?this.Zs?.draw(87,29):3===this.Zh?this.qs?.draw(115,29):4===this.Zh?this.Js?.draw(156,29):5===this.Zh?this.Js?.draw(184,29):6===this.Zh&&this.$s?.draw(212,30)),-1!==this.qh[0]&&(0!==this.jh||this.ii%20<10)&&this.ks[0]?.draw(35,34),-1!==this.qh[1]&&(1!==this.jh||this.ii%20<10)&&this.ks[1]?.draw(59,32),-1!==this.qh[2]&&(2!==this.jh||this.ii%20<10)&&this.ks[2]?.draw(86,32),-1!==this.qh[3]&&(3!==this.jh||this.ii%20<10)&&this.ks[3]?.draw(121,33),-1!==this.qh[4]&&(4!==this.jh||this.ii%20<10)&&this.ks[4]?.draw(157,34),-1!==this.qh[5]&&(5!==this.jh||this.ii%20<10)&&this.ks[5]?.draw(185,32),-1!==this.qh[6]&&(6!==this.jh||this.ii%20<10)&&this.ks[6]?.draw(212,34)),this.rs?.draw(520,165),this.ns?.bind(),this.Ss?.draw(0,0),-1===this.Lh&&(-1!==this.qh[this.Zh]&&(7===this.Zh?this.Qs?.draw(49,0):8===this.Zh?this.th?.draw(81,0):9===this.Zh?this.th?.draw(108,0):10===this.Zh?this.ih?.draw(136,1):11===this.Zh?this.hh?.draw(178,0):12===this.Zh?this.hh?.draw(205,0):13===this.Zh&&this.sh?.draw(233,0)),-1!==this.qh[8]&&(8!==this.jh||this.ii%20<10)&&this.ks[7]?.draw(80,2),-1!==this.qh[9]&&(9!==this.jh||this.ii%20<10)&&this.ks[8]?.draw(107,3),-1!==this.qh[10]&&(10!==this.jh||this.ii%20<10)&&this.ks[9]?.draw(142,4),-1!==this.qh[11]&&(11!==this.jh||this.ii%20<10)&&this.ks[10]?.draw(179,2),-1!==this.qh[12]&&(12!==this.jh||this.ii%20<10)&&this.ks[11]?.draw(206,2),-1!==this.qh[13]&&(13!==this.jh||this.ii%20<10)&&this.ks[12]?.draw(230,2)),this.ns?.draw(501,492),this.ss?.bind()),this.fh&&(this.fh=!1,this.es?.bind(),this.Rs?.draw(0,0),this.xi?.ga(57,33,'Public chat',m.A.Yl,!0),0===this.$h&&this.xi?.ga(57,46,'On',m.A.GREEN,!0),1===this.$h&&this.xi?.ga(57,46,'Friends',m.A.aa,!0),2===this.$h&&this.xi?.ga(57,46,'Off',m.A.RED,!0),3===this.$h&&this.xi?.ga(57,46,'Hide',m.A.Zc,!0),this.xi?.ga(186,33,'Private chat',m.A.Yl,!0),0===this.Jh&&this.xi?.ga(186,46,'On',m.A.GREEN,!0),1===this.Jh&&this.xi?.ga(186,46,'Friends',m.A.aa,!0),2===this.Jh&&this.xi?.ga(186,46,'Off',m.A.RED,!0),this.xi?.ga(326,33,'Trade/duel',m.A.Yl,!0),0===this.Qh&&this.xi?.ga(326,46,'On',m.A.GREEN,!0),1===this.Qh&&this.xi?.ga(326,46,'Friends',m.A.aa,!0),2===this.Qh&&this.xi?.ga(326,46,'Off',m.A.RED,!0),this.xi?.ga(462,38,'Report abuse',m.A.Yl,!0),this.es?.draw(0,471),this.ss?.bind()),this.cn=0};Zf=()=>{if(this.fn++,this.iu(),this.su(),this.hu(),this.eu(),this.nu(),!this.wn){let t=this.ir;(this.kn/256|0)>t&&(t=this.kn/256|0),this.Cn[4]&&this.On[4]+128>t&&(t=this.On[4]+128);const i=this.sr+this.mn&2047;if(this.qr&&this.ru(this.nr,this.ou(this.Qn,this.qr.x,this.qr.z)-50,this.rr,i,t,3*t+600),$.K.xt++,$.K.xt>1802){$.K.xt=0,this.ei.pf(O.A.lu),this.ei.p1(0);const t=this.ei.ft;this.ei.p2(29711),this.ei.p1(70),this.ei.p1(256*Math.random()|0),this.ei.p1(242),this.ei.p1(186),this.ei.p1(39),this.ei.p1(61),2*Math.random()|0||this.ei.p1(13),2*Math.random()|0||this.ei.p2(57856),this.ei.p2(65536*Math.random()|0),this.ei.au(this.ei.ft-t)}}let t;t=this.wn?this.cu():this.fu();const i=this.bn,s=this.Ln,h=this.Rn,e=this.Sn,n=this.Mn;let r;for(let t=0;t<5;t++)this.Cn[t]&&(r=Math.random()*(2*this.Tn[t]+1)-this.Tn[t]+Math.sin(this._n[t]*(this.vn[t]/100))*this.On[t]|0,0===t&&(this.bn+=r),1===t&&(this.Ln+=r),2===t&&(this.Rn+=r),3===t&&(this.Mn=this.Mn+r&2047),4===t&&(this.Sn+=r,this.Sn<128&&(this.Sn=128),this.Sn>383&&(this.Sn=383)));r=d.A.uu,p.A.du=!0,p.A.wu=0,p.A.sa=this.sa-8,p.A.ha=this.ha-11,u.A.clear(),this.ln?.draw(this.bn,this.Ln,this.Rn,t,this.Mn,this.Sn,this.ii),this.ln?.yu(),this.Au(),this.pu(),$.K.bt&&this.mu(),this.Iu(r),this.Eu(),this.ss?.draw(8,11),this.bn=i,this.Ln=s,this.Rn=h,this.Sn=e,this.Mn=n};gu=()=>{e.A._u?.clear(),e.A.Cu?.clear(),r.A.$o?.clear(),n.A.$o?.clear(),n.A.Tu?.clear(),W.A.$o?.clear(),l.A.$o?.clear()};Ou=(t,i)=>{this.vu(t.x,i,t.z)};vu=(t,i,s)=>{if(t<128||s<128||t>13056||s>13056)return this.wr=-1,void(this.yr=-1);const h=this.ou(this.Qn,t,s)-i;this.bu(t,h,s)};bu=(t,i,s)=>{let h=t-this.bn,e=i-this.Ln,n=s-this.Rn;const r=d.A.sin[this.Sn],o=d.A.cos[this.Sn],l=d.A.sin[this.Mn],a=d.A.cos[this.Mn];let c=n*l+h*a>>16;n=n*a-h*l>>16,h=c,c=e*o-n*r>>16,n=e*r+n*o>>16,e=c,n>=50?(this.wr=d.A.La+((h<<9)/n|0),this.yr=d.A.Ra+((e<<9)/n|0)):(this.wr=-1,this.yr=-1)};Au=()=>{this.fo=0;for(let t=-1;t-1))for(let t=0;t<8;t++)h.Lu&1<=0&&10===this.Nh&&this.Bh===this.Lr[t]&&(this.Ou(i,i.height+15),this.wr>-1&&this.Bs[7]?.draw(this.wr-12,this.yr-s))}else 1===this.Nh&&this.Ph===this.Fr[t-this.br]&&this.ii%20<10&&(this.Ou(i,i.height+15),this.wr>-1&&this.Bs[2]?.draw(this.wr-12,this.yr-28));if(i.Ru&&(t>=this.br||0===this.$h||3===this.$h||1===this.$h&&this.Su(i.name))&&(this.Ou(i,i.height),this.wr>-1&&this.fo<$.K.uo&&this.Di&&(this.Ao[this.fo]=this.Di.Mu(i.Ru)/2|0,this.yo[this.fo]=this.Di.height,this.do[this.fo]=this.wr,this.wo[this.fo]=this.yr,this.po[this.fo]=i.ku,this.mo[this.fo]=i.xu,this.Io[this.fo]=i.Du,this.Eo[this.fo++]=i.Ru,0===this.we&&1===i.xu&&(this.yo[this.fo]+=10,this.wo[this.fo]+=5),0===this.we&&2===i.xu&&(this.Ao[this.fo]=60))),i.Nu>this.ii+100&&(this.Ou(i,i.height+15),this.wr>-1)){let t=30*i.Pu/i.Fu|0;t>30&&(t=30),u.A.fillRect(this.wr-15,this.yr-3,t,5,m.A.GREEN),u.A.fillRect(this.wr-15+t,this.yr-3,30-t,5,m.A.RED)}if(i.Nu>this.ii+330&&(this.Ou(i,i.height/2|0),this.wr>-1&&(this.Us[i.Uu]?.draw(this.wr-12,this.yr-12),this.ki?.Bc(this.wr,this.yr+4,i.Bu.toString(),m.A.la),this.ki?.Bc(this.wr-1,this.yr+3,i.Bu.toString(),m.A.Yl))),$.K.bt){if(i.pathLength>0||i.Gu>=this.ii||i.Hu>this.ii){const t=64*i.size;this.Wu(128*i.Pf[0]+t,128*i.Ff[0]+t,this.Qn,i.size,65535,!1)}this.Wu(i.x,i.z,this.Qn,i.size,6710886,!1);let s=0;if(this.Ou(i,i.height+30),t32767&&(i-=32768),this.ki?.Bc(this.wr,this.yr+s,'Face Entity: '+i,m.A.Yl),s-=15}(t.Yu&W.A.qu)===W.A.qu&&(this.ki?.Bc(this.wr,this.yr+s,'Say',m.A.Yl),s-=15),(t.Yu&W.A.$u)===W.A.$u&&(this.ki?.Bc(this.wr,this.yr+s,'Hit: Type '+t.Uu+' Amount '+t.Bu+' HP '+t.Pu+'/'+t.Fu,m.A.Yl),s-=15),(t.Yu&W.A.Ju)===W.A.Ju&&(this.ki?.Bc(this.wr,this.yr+s,'Face Coord: '+t.Qu/2+' '+t.td/2,m.A.Yl),s-=15),(t.Yu&W.A.sd)===W.A.sd&&(this.ki?.Bc(this.wr,this.yr+s,'Chat',m.A.Yl),s-=15),(t.Yu&W.A.hd)===W.A.hd&&(this.ki?.Bc(this.wr,this.yr+s,'Play Spotanim: '+t.ed,m.A.Yl),s-=15),(t.Yu&W.A.nd)===W.A.nd&&(this.ki?.Bc(this.wr,this.yr+s,'Exact Move',m.A.Yl),s-=15)}}else{const t=i;let s=0;if(this.Ou(i,i.height+30),this.ki?.Bc(this.wr,this.yr+s,t.type?.name??null,m.A.Yl),s-=15,-1!==t.Yu&&this.ii-t.Vu<30){if((t.Yu&Y.A.Xu)===Y.A.Xu&&(this.ki?.Bc(this.wr,this.yr+s,'Play Seq: '+t.zu,m.A.Yl),s-=15),(t.Yu&Y.A.ju)===Y.A.ju){let i=t.Zu;i>32767&&(i-=32768),this.ki?.Bc(this.wr,this.yr+s,'Face Entity: '+i,m.A.Yl),s-=15}(t.Yu&Y.A.qu)===Y.A.qu&&(this.ki?.Bc(this.wr,this.yr+s,'Say',m.A.Yl),s-=15),(t.Yu&Y.A.$u)===Y.A.$u&&(this.ki?.Bc(this.wr,this.yr+s,'Hit: Type '+t.Uu+' Amount '+t.Bu+' HP '+t.Pu+'/'+t.Fu,m.A.Yl),s-=15),(t.Yu&Y.A.rd)===Y.A.rd&&(this.ki?.Bc(this.wr,this.yr+s,'Change Type: '+t.type?.id??null,m.A.Yl),s-=15),(t.Yu&Y.A.hd)===Y.A.hd&&(this.ki?.Bc(this.wr,this.yr+s,'Play Spotanim: '+t.ed,m.A.Yl),s-=15),(t.Yu&Y.A.Ju)===Y.A.Ju&&(this.ki?.Bc(this.wr,this.yr+s,'Face Coord: '+t.Qu/2+' '+t.td/2,m.A.Yl),s-=15)}}}}}if($.K.bt)for(let t=0;t=104||i.z>=104||this.Wu(128*i.x+64,128*i.z+64,i.level,1,16776960,!1)}for(let t=0;tthis.wo[r]-this.yo[r]&&s-ethis.do[r]-this.Ao[r]&&this.wo[r]-this.yo[r]{2===this.Nh&&this.Bs[2]&&(this.vu((this.Gh-this.Yn<<7)+this.Fh,2*this.Wh,(this.Hh-this.Vn<<7)+this.Uh),this.wr>-1&&this.ii%20<10&&this.Bs[2].draw(this.wr-12,this.yr-28))};mu=()=>{const t=507;let i=13;this.Xo?this.ki?.fd(t,i,'tock',m.A.aa,!0):this.Di?.fd(t,i,'tick',m.A.aa,!0),i+=13,this.ki?.fd(t,i,`Fps: ${this.ud}, ${this.dd} ms`,m.A.aa,!0),i+=13,this.ki?.fd(t,i,`Draw: ${this.ms.toFixed(1)}, Avg: ${this.wd.toFixed(1)}, Slow: ${this.yd.toFixed(1)} ms`,m.A.aa,!0),i+=13,this.ki?.fd(t,i,`Occluders: ${x.A.Ad[x.A.pd]} Active: ${x.A.md}`,m.A.aa,!0),i+=13,this.ki?.fd(t,i,'Local Pos: '+(this.qr?.x??-1)+', '+(this.qr?.z??-1)+', '+(this.qr?.y??-1),m.A.aa,!0),i+=13,this.ki?.fd(t,i,'Camera Pos: '+this.bn+', '+this.Rn+', '+this.Ln,m.A.aa,!0),i+=13,this.ki?.fd(t,i,'Camera Angle: '+this.Mn+', '+this.Sn,m.A.aa,!0),i+=13,this.ki?.fd(t,i,'Cutscene Source: '+this.gr+', '+this._r+' '+this.Cr+'; '+this.Tr+', '+this.Or,m.A.aa,!0),i+=13,this.ki?.fd(t,i,'Cutscene Destination: '+this.Ar+', '+this.pr+' '+this.mr+'; '+this.Ir+', '+this.Er,m.A.aa,!0),$.K.Rt&&(i+=13,this.ki?.fd(t,i,'Instructions:',m.A.aa,!0),i+=13,this.ki?.fd(t,i,'- Arrows to move Camera',m.A.aa,!0),i+=13,this.ki?.fd(t,i,'- Shift to control Source or Dest',m.A.aa,!0),i+=13,this.ki?.fd(t,i,'- Alt to control Height',m.A.aa,!0),i+=13,this.ki?.fd(t,i,'- Ctrl to control Modifier',m.A.aa,!0))};Wu=(t,i,s,h,e,n)=>{const r=this.ou(s,t,i),o=64*h;this.bu(t-o,r,i-o);const l=this.wr,a=this.yr;this.bu(t+o,r,i-o);const c=this.wr,f=this.yr;this.bu(t-o,r,i+o);const d=this.wr,w=this.yr;this.bu(t+o,r,i+o);const y=this.wr,A=this.yr;-1!==l&&-1!==c&&-1!==d&&-1!==y&&(n&&(u.A.Id(l,a,y,A,(16711422&e)>>1),u.A.Id(c,f,d,w,(16711422&e)>>1)),u.A.Id(l,a,c,f,e),u.A.Id(l,a,d,w,e),u.A.Id(c,f,y,A,e),u.A.Id(d,w,y,A,e))};Wf(){const t=1==this.Tf[5]?2:1;1==this.Tf[6]?(1==this.Tf[1]?(this.Ar-=t,this.Ar<1&&(this.Ar=1)):1==this.Tf[2]&&(this.Ar+=t,this.Ar>102&&(this.Ar=102)),1==this.Tf[3]?1==this.Tf[7]?this.mr+=2*t:(this.pr+=1,this.pr>102&&(this.pr=102)):1==this.Tf[4]&&(1==this.Tf[7]?this.mr-=2*t:(this.pr-=1,this.pr<1&&(this.pr=1)))):(1==this.Tf[1]?(this.gr-=t,this.gr<1&&(this.gr=1)):1==this.Tf[2]&&(this.gr+=t,this.gr>102&&(this.gr=102)),1==this.Tf[3]?1==this.Tf[7]?this.Cr+=2*t:(this._r+=t,this._r>102&&(this._r=102)):1==this.Tf[4]&&(1==this.Tf[7]?this.Cr-=2*t:(this._r-=t,this._r<1&&(this._r=1)))),this.bn=128*this.gr+64,this.Rn=128*this._r+64,this.Ln=this.ou(this.Qn,this.gr,this._r)-this.Cr;const i=128*this.Ar+64,s=128*this.pr+64,h=this.ou(this.Qn,this.Ar,this.pr)-this.mr,e=i-this.bn,n=h-this.Ln,r=s-this.Rn,o=0|Math.sqrt(e*e+r*r);this.Sn=325.949*Math.atan2(n,o)&2047,this.Mn=-325.949*Math.atan2(e,r)&2047,this.Sn<128&&(this.Sn=128),this.Sn>383&&(this.Sn=383)}Eu=()=>{if(this.Ed(),1===this.wh&&this.Hs[this.yh/100|0]?.draw(this.Ah-8-8,this.ph-8-11),2===this.wh&&this.Hs[4+(this.yh/100|0)]?.draw(this.Ah-8-8,this.ph-8-11),-1!==this.uh&&(this.Sl(this.uh,this.cn),this.Ul(c.A.qo[this.uh],0,0,0)),this.gd(),this.Ih?0===this.Eh&&this._d():(this.bf(),this.Cd()),1===this.Jr&&(this.ho>0||1===this.eo?this.Bs[1]?.draw(472,258):this.Bs[1]?.draw(472,296)),this.ho>0&&(this.Bs[0]?.draw(472,296),this.xi?.Bc(484,329,'Level: '+this.ho,m.A.aa)),1===this.eo&&(this.Bs[6]?.draw(472,296),this.xi?.Bc(484,329,'Arena',m.A.aa)),0!==this.ai){let t=this.ai/50|0;const i=t/60|0;t%=60,t<10?this.xi?.ra(4,329,'System update in: '+i+':0'+t,m.A.aa):this.xi?.ra(4,329,'System update in: '+i+':'+t,m.A.aa)}};Ed=()=>{if(0===this.de)return;const t=this.xi;let i=0;0!==this.ai&&(i=1);for(let s=0;s<100;s++){if(!this.ae[s])continue;const h=this.messageType[s];let e;if((3===h||7===h)&&(7===h||0===this.Jh||1===this.Jh&&this.Su(this.ce[s]))&&(e=329-13*i,t?.ra(4,e,'From '+this.ce[s]+': '+this.ae[s],m.A.la),t?.ra(4,e-1,'From '+this.ce[s]+': '+this.ae[s],m.A.Zc),i++,i>=5))return;if(5===h&&this.Jh<2&&(e=329-13*i,t?.ra(4,e,this.ae[s],m.A.la),t?.ra(4,e-1,this.ae[s],m.A.Zc),i++,i>=5))return;if(6===h&&this.Jh<2&&(e=329-13*i,t?.ra(4,e,'To '+this.ce[s]+': '+this.ae[s],m.A.la),t?.ra(4,e-1,'To '+this.ce[s]+': '+this.ae[s],m.A.Zc),i++,i>=5))return}};gd=()=>{if(!this.qr)return;const t=(this.qr.x>>7)+this.Yn,i=(this.qr.z>>7)+this.Vn;if(this.ho=t>=2944&&t<3392&&i>=3520&&i<6400?1+((i-3520)/8|0):t>=2944&&t<3392&&i>=9920&&i<12800?1+((i-9920)/8|0):0,this.eo=0,t>=3328&&t<3392&&i>=3200&&i<3264){const s=63&t,h=63&i;(s>=4&&s<=29&&h>=44&&h<=58||s>=36&&s<=61&&h>=44&&h<=58||s>=4&&s<=29&&h>=25&&h<=39||s>=36&&s<=61&&h>=25&&h<=39||s>=4&&s<=29&&h>=6&&h<=20||s>=36&&s<=61&&h>=6&&h<=20)&&(this.eo=1)}0===this.eo&&t>=3328&&t<=3393&&i>=3203&&i<=3325&&(this.eo=2),this.mh=0,(t>=3053&&t<=3156&&i>=3056&&i<=3136||t>=3072&&t<=3118&&i>=9492&&i<=9535)&&(this.mh=1),1===this.mh&&t>=3139&&t<=3199&&i>=3008&&i<=3062&&(this.mh=0)};qf=()=>{this.Qi?.bind(),this.Es&&(d.A.Mc=this.Es),this.vs?.draw(0,0),-1!==this.Lh?this.Ul(c.A.qo[this.Lh],0,0,0):-1!==this.qh[this.Zh]&&this.Ul(c.A.qo[this.qh[this.Zh]],0,0,0),this.Ih&&1===this.Eh&&this._d(),this.Qi?.draw(562,231),this.ss?.bind(),this.gs&&(d.A.Mc=this.gs)};Jf=()=>{if(this.hs?.bind(),this.Is&&(d.A.Mc=this.Is),this.bs?.draw(0,0),this.se)this.Di?.Bc(239,40,this.he,m.A.la),this.Di?.Bc(239,60,this.ee+'*',m.A.Td);else if(this.oe)this.Di?.Bc(239,40,'Enter amount:',m.A.la),this.Di?.Bc(239,60,this.re+'*',m.A.Td);else if(this.zh)this.Di?.Bc(239,40,this.zh,m.A.la),this.Di?.Bc(239,60,'Click to continue',m.A.Td);else if(-1!==this.Rh)this.Ul(c.A.qo[this.Rh],0,0,0);else if(-1===this.le){let t=this.xi;0===$.K.Lt&&(t=this.Ni);let i=0;u.A.Bl(0,0,463,77);for(let s=0;s<100;s++){const h=this.ae[s];if(!h)continue;const e=this.messageType[s],n=this.kh+70-14*i;0===e&&(n>0&&n<110&&t?.ra(4,n,h,m.A.la),i++),1===e&&(n>0&&n<110&&(t?.ra(4,n,this.ce[s]+':',m.A.Yl),t?.ra(t.Mu(this.ce[s])+12,n,h,m.A.BLUE)),i++),2===e&&(0===this.$h||1===this.$h&&this.Su(this.ce[s]))&&(n>0&&n<110&&(t?.ra(4,n,this.ce[s]+':',m.A.la),t?.ra(t.Mu(this.ce[s])+12,n,h,m.A.BLUE)),i++),3!==e&&7!==e||0!==this.de||!(7===e||0===this.Jh||1===this.Jh&&this.Su(this.ce[s]))||(n>0&&n<110&&(t?.ra(4,n,'From '+this.ce[s]+':',m.A.la),t?.ra(t.Mu('From '+this.ce[s])+12,n,h,m.A.Od)),i++),4===e&&(0===this.Qh||1===this.Qh&&this.Su(this.ce[s]))&&(n>0&&n<110&&t?.ra(4,n,this.ce[s]+' '+this.ae[s],m.A.vd),i++),5===e&&0===this.de&&this.Jh<2&&(n>0&&n<110&&t?.ra(4,n,h,m.A.Od),i++),6===e&&0===this.de&&this.Jh<2&&(n>0&&n<110&&(t?.ra(4,n,'To '+this.ce[s]+':',m.A.la),t?.ra(t.Mu('To '+this.ce[s])+12,n,h,m.A.Od)),i++),8===e&&(0===this.Qh||1===this.Qh&&this.Su(this.ce[s]))&&(n>0&&n<110&&t?.ra(4,n,this.ce[s]+' '+this.ae[s],m.A.bd),i++)}u.A.ad(),this.Mh=14*i+7,this.Mh<78&&(this.Mh=78),this.Cl(463,0,this.Mh-this.kh-77,this.Mh,77),0==$.K.Lt?t?.ra(3,90,this.ye+'*',m.A.la):1==$.K.Lt?t?.ra(3,90,this.ye+'*',m.A.BLUE):(t?.ra(4,90,M.A.Ka(this.username)+':',m.A.la),t?.ra(t.Mu(this.username+': ')+6,90,this.ye+'*',m.A.BLUE)),u.A.Ll(0,77,m.A.la,479)}else this.Ul(c.A.qo[this.le],0,0,0);this.Ih&&2===this.Eh&&this._d(),this.hs?.draw(22,375),this.ss?.bind(),this.gs&&(d.A.Mc=this.gs)};Qf=()=>{if(this.ts?.bind(),!this.qr)return;const t=this.sr+this.Dn&2047;let i=48+(this.qr.x/32|0),s=464-(this.qr.z/32|0);this.Ds?.Ld(21,9,146,151,this.Ts,this.Os,i,s,t,this.Nn+256),this.Ns?.Ld(0,0,33,33,this._s,this.Cs,25,25,this.sr,256);for(let t=0;t{if(!i)return;const h=this.sr+this.Dn&2047,e=s*s+t*t;if(e>6400)return;let n=d.A.sin[h],r=d.A.cos[h];n=256*n/(this.Nn+256)|0,r=256*r/(this.Nn+256)|0;const o=t*n+s*r>>16,l=t*r-s*n>>16;e>2500&&this.Ls?i.kd(o+94-(i.na/2|0),83-l-(i.xd/2|0),this.Ls):i.draw(o+94-(i.na/2|0),83-l-(i.xd/2|0))};Dd=t=>{if(!this.Ds)return;const i=this.Ds.Rc,s=i.length;for(let t=0;t>14&32767;const h=e.A.get(s).Ud;if(h<0)continue;let n=t,r=i;if(22!==h&&29!==h&&34!==h&&36!==h&&46!==h&&47!==h&&48!==h){const s=G.A.dr,h=G.A.dr,e=this.$n[this.Qn];if(e){const o=e.flags;for(let e=0;e<10;e++){const e=4*Math.random()|0;0===e&&n>0&&n>t-3&&(o[G.A.index(n-1,r)]&H.A.Bd)===H.A.OPEN&&n--,1===e&&n0&&r>i-3&&(o[G.A.index(n,r-1)]&H.A.Hd)===H.A.OPEN&&r--,3===e&&r{if(!this.ln||!this.Ds)return;let r=this.ln.Yd(s,t,i);if(0!==r){const o=this.ln.Vd(s,t,i,r),l=o>>6&3,a=31&o;let c=h;r>0&&(c=n);const f=this.Ds.Rc,u=4*t+512*(103-i)*4+24624,d=r>>14&32767,w=e.A.get(d);if(-1===w.Kd)a!==P.A.Xd.id&&a!==P.A.zd.id||(l===F.A.jd?(f[u]=c,f[u+512]=c,f[u+1024]=c,f[u+1536]=c):l===F.A.Zd?(f[u]=c,f[u+1]=c,f[u+2]=c,f[u+3]=c):l===F.A.qd?(f[u+3]=c,f[u+3+512]=c,f[u+3+1024]=c,f[u+3+1536]=c):l===F.A.$d&&(f[u+1536]=c,f[u+1536+1]=c,f[u+1536+2]=c,f[u+1536+3]=c)),a===P.A.Jd.id&&(l===F.A.jd?f[u]=c:l===F.A.Zd?f[u+3]=c:l===F.A.qd?f[u+3+1536]=c:l===F.A.$d&&(f[u+1536]=c)),a===P.A.zd.id&&(l===F.A.$d?(f[u]=c,f[u+512]=c,f[u+1024]=c,f[u+1536]=c):l===F.A.jd?(f[u]=c,f[u+1]=c,f[u+2]=c,f[u+3]=c):l===F.A.Zd?(f[u+3]=c,f[u+3+512]=c,f[u+3+1024]=c,f[u+3+1536]=c):l===F.A.qd&&(f[u+1536]=c,f[u+1536+1]=c,f[u+1536+2]=c,f[u+1536+3]=c));else{const s=this.Ps[w.Kd];if(s){const h=(4*w.width-s.width)/2|0,e=(4*w.length-s.height)/2|0;s.draw(4*t+48+h,4*(G.A.dr-i-w.length)+e+48)}}}if(r=this.ln.Qd(s,t,i),0!==r){const h=this.ln.Vd(s,t,i,r),n=h>>6&3,o=31&h,l=r>>14&32767,a=e.A.get(l);if(-1!==a.Kd){const s=this.Ps[a.Kd];if(s){const h=(4*a.width-s.width)/2|0,e=(4*a.length-s.height)/2|0;s.draw(4*t+48+h,4*(G.A.dr-i-a.length)+e+48)}}else if(o===P.A.tw.id){let s=15658734;r>0&&(s=15597568);const h=this.Ds.Rc,e=4*t+512*(G.A.dr-1-i)*4+24624;n===F.A.jd||n===F.A.qd?(h[e+1536]=s,h[e+1024+1]=s,h[e+512+2]=s,h[e+3]=s):(h[e]=s,h[e+512+1]=s,h[e+1024+2]=s,h[e+1536+3]=s)}}if(r=this.ln.Fd(s,t,i),0!==r){const s=e.A.get(r>>14&32767);if(-1!==s.Kd){const h=this.Ps[s.Kd];if(h){const e=(4*s.width-h.width)/2|0,n=(4*s.length-h.height)/2|0;h.draw(4*t+48+e,4*(G.A.dr-i-s.length)+n+48)}}}};Cd=()=>{if(this.Oh<2&&0===this.ve&&0===this.Ue)return;let t;t=1===this.ve&&this.Oh<2?'Use '+this.Se+' with...':1===this.Ue&&this.Oh<2?this.He+'...':this.bh[this.Oh-1],this.Oh>2&&(t=t+'@whi@ / '+(this.Oh-2)+' more options'),this.Di?.iw(4,15,t,m.A.Yl,!0,this.ii/1e3|0)};_d=()=>{const t=this.gh,i=this._h,s=this.Ch,h=this.Th,e=m.A.sw;u.A.fillRect(t,i,s,h,e),u.A.fillRect(t+1,i+1,s-2,16,m.A.la),u.A.Wl(t+1,i+18,s-2,h-19,m.A.la),this.Di?.ra(t+3,i+14,'Choose Option',e);let n=this.sa,r=this.ha;0===this.Eh&&(n-=8,r-=11),1===this.Eh&&(n-=562,r-=231),2===this.Eh&&(n-=22,r-=375);for(let h=0;ht&&ne-13&&r{if(0!==this.ge)return;let t=this.$c;if(1===this.Ue&&this.Jc>=520&&this.Qc>=165&&this.Jc<=788&&this.Qc<=230&&(t=0),this.Ih){if(1!==t){let t=this.sa,i=this.ha;0===this.Eh?(t-=8,i-=11):1===this.Eh?(t-=562,i-=231):2===this.Eh&&(t-=22,i-=375),(tthis.gh+this.Ch+10||ithis._h+this.Th+10)&&(this.Ih=!1,1===this.Eh&&(this.oh=!0),2===this.Eh&&(this.lh=!0))}if(1===t){const t=this.gh,i=this._h,s=this.Ch;let h=this.Jc,e=this.Qc;0===this.Eh?(h-=8,e-=11):1===this.Eh?(h-=562,e-=231):2===this.Eh&&(h-=22,e-=375);let n=-1;for(let r=0;rt&&ho-13&&e0){const t=this.Ye[this.Oh-1];if(602===t||596===t||22===t||892===t||415===t||405===t||38===t||422===t||478===t||347===t||188===t){const t=this.Ke[this.Oh-1],i=this.Xe[this.Oh-1];if(c.A.qo[i].draggable)return this.Oe=!1,this.Te=0,this.Ie=i,this.Ee=t,this.ge=2,this._e=this.Jc,this.Ce=this.Qc,c.A.qo[i].hw===this.uh&&(this.ge=1),void(c.A.qo[i].hw===this.Rh&&(this.ge=3))}}if(1===t&&(1===this.We||this.Rf(this.Oh-1))&&this.Oh>2&&(t=2),1===t&&this.Oh>0&&await this.Mf(this.Oh-1),2!==t||this.Oh<=0)return;this.Sf()}};Bf=()=>{if(1===this.$c&&this.qr){let t=this.Jc-21-561,i=this.Qc-9-5;if(t>=0&&i>=0&&t<146&&i<151){t-=73,i-=75;const s=this.sr+this.Dn&2047;let h=d.A.sin[s],e=d.A.cos[s];h=h*(this.Nn+256)>>8,e=e*(this.Nn+256)>>8;const n=i*h+t*e>>11,r=i*e-t*h>>11,o=this.qr.x+n>>7,l=this.qr.z-r>>7;this.Nf(this.qr.Pf[0],this.qr.Ff[0],o,l,1,0,0,0,0,0,!0)&&(this.ei.p1(t),this.ei.p1(i),this.ei.p2(this.sr),this.ei.p1(57),this.ei.p1(this.Dn),this.ei.p1(this.Nn),this.ei.p1(89),this.ei.p2(this.qr.x),this.ei.p2(this.qr.z),this.ei.p1(this.Zr),this.ei.p1(63))}}};Rf=t=>{if(t<0)return!1;let i=this.Ye[t];return i>=2e3&&(i-=2e3),406===i};Mf=async t=>{if(t<0)return;this.oe&&(this.oe=!1,this.lh=!0);let i=this.Ye[t];const s=this.Ve[t],h=this.Ke[t],r=this.Xe[t];if(i>=2e3&&(i-=2e3),903===i||363===i){let s=this.bh[t];const h=s.indexOf('@whi@');if(-1!==h){s=s.substring(h+5).trim();const t=M.A.Ka(M.A.Xa(M.A.Md(s)));let e=!1;for(let s=0;s=90&&this.ei.pf(O.A.aw),this.ei.pf(O.A.cw)):347===i?this.ei.pf(O.A.fw):422===i?this.ei.pf(O.A.uw):405===i?($.K.Gt+=s,$.K.Gt>=97&&(this.ei.pf(O.A.dw),this.ei.p3(14953816)),this.ei.pf(O.A.ww)):38===i&&this.ei.pf(O.A.yw),this.ei.p2(s),this.ei.p2(h),this.ei.p2(r),this.De=0,this.xe=r,this.ke=h,this.Me=2,c.A.qo[r].hw===this.uh&&(this.Me=1),c.A.qo[r].hw===this.Rh&&(this.Me=3);else if(728===i||542===i||6===i||963===i||245===i){const t=this.Nr[s];t&&this.qr&&(this.Nf(this.qr.Pf[0],this.qr.Ff[0],t.Pf[0],t.Ff[0],2,1,1,0,0,0,!1),this.Ah=this.Jc,this.ph=this.Qc,this.wh=2,this.yh=0,542===i?this.ei.pf(O.A.Aw):6===i?(3&s||$.K.Bt++,$.K.Bt>=124&&(this.ei.pf(O.A.pw),this.ei.p4(0)),this.ei.pf(O.A.mw)):963===i?this.ei.pf(O.A.Iw):728===i?this.ei.pf(O.A.Ew):245===i&&(3&s||$.K.Ht++,$.K.Ht>=85&&(this.ei.pf(O.A.gw),this.ei.p2(39596)),this.ei.pf(O.A._w)),this.ei.p2(s))}else if(217===i){if(this.qr){this.Nf(this.qr.Pf[0],this.qr.Ff[0],h,r,2,0,0,0,0,0,!1)||this.Nf(this.qr.Pf[0],this.qr.Ff[0],h,r,2,1,1,0,0,0,!1),this.Ah=this.Jc,this.ph=this.Qc,this.wh=2,this.yh=0,this.ei.pf(O.A.Cw),this.ei.p2(h+this.Yn),this.ei.p2(r+this.Vn),this.ei.p2(s),this.ei.p2(this.Re),this.ei.p2(this.be),this.ei.p2(this.Le)}}else if(1175===i){const t=s>>14&32767,i=e.A.get(t);let h;h=i.Tw?i.Tw:"It's a "+i.name+'.',this.rw(0,h,'')}else if(285===i)this.ow(O.A.Ow,h,r,s);else if(881===i)this.ei.pf(O.A.bw),this.ei.p2(s),this.ei.p2(h),this.ei.p2(r),this.ei.p2(this.Re),this.ei.p2(this.be),this.ei.p2(this.Le),this.De=0,this.xe=r,this.ke=h,this.Me=2,c.A.qo[r].hw===this.uh&&(this.Me=1),c.A.qo[r].hw===this.Rh&&(this.Me=3);else if(391===i)this.ei.pf(O.A.Lw),this.ei.p2(s),this.ei.p2(h),this.ei.p2(r),this.ei.p2(this.Be),this.De=0,this.xe=r,this.ke=h,this.Me=2,c.A.qo[r].hw===this.uh&&(this.Me=1),c.A.qo[r].hw===this.Rh&&(this.Me=3);else if(660===i)this.Ih?this.ln?.click(h-8,r-11):this.ln?.click(this.Jc-8,this.Qc-11);else{if(188===i)return this.ve=1,this.be=h,this.Le=r,this.Re=s,this.Se=n.A.get(s).name,void(this.Ue=0);if(44===i)this.Ne||(this.ei.pf(O.A.Rw),this.ei.p2(r),this.Ne=!0);else if(1773===i){const t=n.A.get(s);let i;i=r>=1e5?r+' x '+t.name:t.Tw?t.Tw:"It's a "+t.name+'.',this.rw(0,i,'')}else if(900===i){const t=this.Nr[s];t&&this.qr&&(this.Nf(this.qr.Pf[0],this.qr.Ff[0],t.Pf[0],t.Ff[0],2,1,1,0,0,0,!1),this.Ah=this.Jc,this.ph=this.Qc,this.wh=2,this.yh=0,this.ei.pf(O.A.Sw),this.ei.p2(s),this.ei.p2(this.Re),this.ei.p2(this.be),this.ei.p2(this.Le))}else if(1373===i||1544===i||151===i||1101===i){const t=this.vr[s];t&&this.qr&&(this.Nf(this.qr.Pf[0],this.qr.Ff[0],t.Pf[0],t.Ff[0],2,1,1,0,0,0,!1),this.Ah=this.Jc,this.ph=this.Qc,this.wh=2,this.yh=0,1101===i?this.ei.pf(O.A.nw):151===i?($.K.Kt++,$.K.Kt>=90&&(this.ei.pf(O.A.Mw),this.ei.p2(31114)),this.ei.pf(O.A.kw)):1373===i?this.ei.pf(O.A.ew):1544===i&&this.ei.pf(O.A.xw),this.ei.p2(s))}else if(265===i){const t=this.Nr[s];t&&this.qr&&(this.Nf(this.qr.Pf[0],this.qr.Ff[0],t.Pf[0],t.Ff[0],2,1,1,0,0,0,!1),this.Ah=this.Jc,this.ph=this.Qc,this.wh=2,this.yh=0,this.ei.pf(O.A.Dw),this.ei.p2(s),this.ei.p2(this.Be))}else if(679===i){const i=this.bh[t],s=i.indexOf('@whi@');if(-1!==s){const t=M.A.Md(i.substring(s+5).trim());let h=-1;for(let i=0;i0&&(this.lh=!0,this.oe=!1,this.se=!0,this.ee='',this.ne=3,this.Oo=this.Co[h],this.he='Enter message to send to '+this._o[h])}}else if(55===i)this.ow(O.A.Nw,h,r,s)&&this.ei.p2(this.Be);else if(224===i||993===i||99===i||746===i||877===i){if(this.qr){this.Nf(this.qr.Pf[0],this.qr.Ff[0],h,r,2,0,0,0,0,0,!1)||this.Nf(this.qr.Pf[0],this.qr.Ff[0],h,r,2,1,1,0,0,0,!1),this.Ah=this.Jc,this.ph=this.Qc,this.wh=2,this.yh=0,224===i?this.ei.pf(O.A.Pw):746===i?this.ei.pf(O.A.Fw):877===i?this.ei.pf(O.A.Uw):99===i?this.ei.pf(O.A.Bw):993===i&&this.ei.pf(O.A.Gw),this.ei.p2(h+this.Yn),this.ei.p2(r+this.Vn),this.ei.p2(s)}}else if(1607===i){const t=this.Nr[s];if(t&&t.type){let i;i=t.type.Tw?t.type.Tw:"It's a "+t.type.name+'.',this.rw(0,i,'')}}else if(504===i)this.ow(O.A.Hw,h,r,s);else{if(930===i){const t=c.A.qo[r];this.Ue=1,this.Be=r,this.Ge=t.Ww,this.ve=0;let i=t.Yw;i&&-1!==i.indexOf(' ')&&(i=i.substring(0,i.indexOf(' ')));let s=t.Yw;return s&&-1!==s.indexOf(' ')&&(s=s.substring(s.indexOf(' ')+1)),this.He=i+' '+t.action+' '+s,void(16===this.Ge&&(this.oh=!0,this.Zh=3,this.ah=!0))}if(951===i){const t=c.A.qo[r];let i=!0;t.Vl>0&&(i=this.Vw(t)),i&&(this.ei.pf(O.A.Kw),this.ei.p2(r))}else if(602===i||596===i||22===i||892===i||415===i)22===i?this.ei.pf(O.A.Xw):415===i?(3&r||$.K.Vt++,$.K.Vt>=55&&(this.ei.pf(O.A.zw),this.ei.p4(0)),this.ei.pf(O.A.jw)):602===i?this.ei.pf(O.A.Zw):892===i?(3&h||$.K.Xt++,$.K.Xt>=130&&(this.ei.pf(O.A.qw),this.ei.p1(177)),this.ei.pf(O.A.$w)):596===i&&this.ei.pf(O.A.Jw),this.ei.p2(s),this.ei.p2(h),this.ei.p2(r),this.De=0,this.xe=r,this.ke=h,this.Me=2,c.A.qo[r].hw===this.uh&&(this.Me=1),c.A.qo[r].hw===this.Rh&&(this.Me=3);else if(581===i)3&s||$.K.Ut++,$.K.Ut>=99&&(this.ei.pf(O.A.Qw),this.ei.p4(0)),this.ow(O.A.ty,h,r,s);else if(965===i){if(this.qr){this.Nf(this.qr.Pf[0],this.qr.Ff[0],h,r,2,0,0,0,0,0,!1)||this.Nf(this.qr.Pf[0],this.qr.Ff[0],h,r,2,1,1,0,0,0,!1),this.Ah=this.Jc,this.ph=this.Qc,this.wh=2,this.yh=0,this.ei.pf(O.A.iy),this.ei.p2(h+this.Yn),this.ei.p2(r+this.Vn),this.ei.p2(s),this.ei.p2(this.Be)}}else if(1501===i)$.K.Yt+=this.Vn,$.K.Yt>=92&&(this.ei.pf(O.A.sy),this.ei.p4(0)),this.ow(O.A.hy,h,r,s);else if(364===i)this.ow(O.A.ey,h,r,s);else if(1102===i){const t=n.A.get(s);let i;i=t.Tw?t.Tw:"It's a "+t.name+'.',this.rw(0,i,'')}else if(960===i){this.ei.pf(O.A.Kw),this.ei.p2(r);const t=c.A.qo[r];if(t.scripts&&t.scripts[0]&&5===t.scripts[0][0]){const i=t.scripts[0][1];t._l&&this.Pe[i]!==t._l[0]&&(this.Pe[i]=t._l[0],await this.ny(i),this.oh=!0)}}else if(34===i){const i=this.bh[t],s=i.indexOf('@whi@');if(-1!==s){this.oy(),this.qe=i.substring(s+5).trim(),this.$e=!1;for(let t=0;t{const i=t.Vl;if(i===c.A.my&&(this.lh=!0,this.oe=!1,this.se=!0,this.ee='',this.ne=1,this.he='Enter name of friend to add to list'),i===c.A.Iy&&(this.lh=!0,this.oe=!1,this.se=!0,this.ee='',this.ne=2,this.he='Enter name of friend to delete from list'),i===c.A.Ey)return this.li=250,!0;if(i===c.A.gy&&(this.lh=!0,this.oe=!1,this.se=!0,this.ee='',this.ne=4,this.he='Enter name of player to add to list'),i===c.A._y&&(this.lh=!0,this.oe=!1,this.se=!0,this.ee='',this.ne=5,this.he='Enter name of player to delete from list'),i>=c.A.Cy&&i<=c.A.Ty){const t=(i-300)/2|0,s=1&i;let h=this.lo[t];if(-1!==h)for(;;)if(0===s&&(h--,h<0&&(h=o.A.count-1)),1===s&&(h++,h>=o.A.count&&(h=0)),!o.A.qo[h].disable&&o.A.qo[h].type===t+(this.ro?0:7)){this.lo[t]=h,this.oo=!0;break}}if(i>=c.A.Oy&&i<=c.A.vy){const t=(i-314)/2|0,s=1&i;let h=this.ao[t];0===s&&(h--,h<0&&(h=W.A.$a[t].length-1)),1===s&&(h++,h>=W.A.$a[t].length&&(h=0)),this.ao[t]=h,this.oo=!0}if(i!==c.A.hc||this.ro||(this.ro=!0,this.df()),i===c.A.ec&&this.ro&&(this.ro=!1,this.df()),i===c.A.by){this.ei.pf(O.A.Ly),this.ei.p1(this.ro?0:1);for(let t=0;t<7;t++)this.ei.p1(this.lo[t]);for(let t=0;t<5;t++)this.ei.p1(this.ao[t]);return!0}return i===c.A.rc&&(this.$e=!this.$e),i>=c.A.Ry&&i<=c.A.Sy&&(this.oy(),this.qe.length>0&&(this.ei.pf(O.A.My),this.ei.ky(M.A.Md(this.qe)),this.ei.p1(i-601),this.ei.p1(this.$e?1:0))),!1};df=()=>{this.oo=!0;for(let t=0;t<7;t++){this.lo[t]=-1;for(let i=0;i{if(!this.qr||!this.ln)return!1;const n=h>>14&32767,r=this.ln.Vd(this.Qn,i,s,h);if(-1===r)return!1;const o=31&r,l=r>>6&3;if(o===P.A.xy.id||o===P.A.Dy.id||o===P.A.Ny.id){const t=e.A.get(n);let h,r;l===F.A.jd||l===F.A.qd?(h=t.width,r=t.length):(h=t.length,r=t.width);let o=t.Py;0!==l&&(o=(o<>4-l)),this.Nf(this.qr.Pf[0],this.qr.Ff[0],i,s,2,h,r,0,0,o,!1)}else this.Nf(this.qr.Pf[0],this.qr.Ff[0],i,s,2,0,0,l,o+1,0,!1);return this.Ah=this.Jc,this.ph=this.Qc,this.wh=2,this.yh=0,this.ei.pf(t),this.ei.p2(i+this.Yn),this.ei.p2(s+this.Vn),this.ei.p2(n),!0};Gf=()=>{1===this.$c&&(this.Jc>=549&&this.Jc<=583&&this.Qc>=195&&this.Qc<231&&-1!==this.qh[0]?(this.oh=!0,this.Zh=0,this.ah=!0):this.Jc>=579&&this.Jc<=609&&this.Qc>=194&&this.Qc<231&&-1!==this.qh[1]?(this.oh=!0,this.Zh=1,this.ah=!0):this.Jc>=607&&this.Jc<=637&&this.Qc>=194&&this.Qc<231&&-1!==this.qh[2]?(this.oh=!0,this.Zh=2,this.ah=!0):this.Jc>=635&&this.Jc<=679&&this.Qc>=194&&this.Qc<229&&-1!==this.qh[3]?(this.oh=!0,this.Zh=3,this.ah=!0):this.Jc>=676&&this.Jc<=706&&this.Qc>=194&&this.Qc<231&&-1!==this.qh[4]?(this.oh=!0,this.Zh=4,this.ah=!0):this.Jc>=704&&this.Jc<=734&&this.Qc>=194&&this.Qc<231&&-1!==this.qh[5]?(this.oh=!0,this.Zh=5,this.ah=!0):this.Jc>=732&&this.Jc<=766&&this.Qc>=195&&this.Qc<231&&-1!==this.qh[6]?(this.oh=!0,this.Zh=6,this.ah=!0):this.Jc>=550&&this.Jc<=584&&this.Qc>=492&&this.Qc<528&&-1!==this.qh[7]?(this.oh=!0,this.Zh=7,this.ah=!0):this.Jc>=582&&this.Jc<=612&&this.Qc>=492&&this.Qc<529&&-1!==this.qh[8]?(this.oh=!0,this.Zh=8,this.ah=!0):this.Jc>=609&&this.Jc<=639&&this.Qc>=492&&this.Qc<529&&-1!==this.qh[9]?(this.oh=!0,this.Zh=9,this.ah=!0):this.Jc>=637&&this.Jc<=681&&this.Qc>=493&&this.Qc<528&&-1!==this.qh[10]?(this.oh=!0,this.Zh=10,this.ah=!0):this.Jc>=679&&this.Jc<=709&&this.Qc>=492&&this.Qc<529&&-1!==this.qh[11]?(this.oh=!0,this.Zh=11,this.ah=!0):this.Jc>=706&&this.Jc<=736&&this.Qc>=492&&this.Qc<529&&-1!==this.qh[12]?(this.oh=!0,this.Zh=12,this.ah=!0):this.Jc>=734&&this.Jc<=768&&this.Qc>=492&&this.Qc<528&&-1!==this.qh[13]&&(this.oh=!0,this.Zh=13,this.ah=!0),$.K.kt++,$.K.kt>150&&($.K.kt=0,this.ei.pf(O.A.Fy),this.ei.p1(43)))};Kf=async()=>{for(;;){let t;do{for(;;){if(t=this.if(),-1===t)return;if(-1!==this.uh&&this.uh===this.Je){8===t&&this.qe.length>0&&(this.qe=this.qe.substring(0,this.qe.length-1));break}if(this.se){if(t>=32&&t<=122&&this.ee.length<80&&(this.ee=this.ee+String.fromCharCode(t),this.lh=!0),8===t&&this.ee.length>0&&(this.ee=this.ee.substring(0,this.ee.length-1),this.lh=!0),13===t||10===t){let t;if(this.se=!1,this.lh=!0,1===this.ne&&(t=M.A.Md(this.ee),this.uy(t)),2===this.ne&&this.co>0&&(t=M.A.Md(this.ee),this.yy(t)),3===this.ne&&this.ee.length>0&&this.Oo){this.ei.pf(O.A.Uy),this.ei.p1(0);const t=this.ei.ft;this.ei.ky(this.Oo),b.A.By(this.ei,this.ee),this.ei.au(this.ei.ft-t),this.ee=M.A.Gy(this.ee),this.ee=v.A.filter(this.ee),this.rw(6,this.ee,M.A.Ka(M.A.Xa(this.Oo))),2===this.Jh&&(this.Jh=1,this.fh=!0,this.ei.pf(O.A.Hy),this.ei.p1(this.$h),this.ei.p1(this.Jh),this.ei.p1(this.Qh))}4===this.ne&&this.xh<100&&(t=M.A.Md(this.ee),this.wy(t)),5===this.ne&&this.xh>0&&(t=M.A.Md(this.ee),this.Ay(t))}}else if(this.oe){if(t>=48&&t<=57&&this.re.length<10&&(this.re=this.re+String.fromCharCode(t),this.lh=!0),8===t&&this.re.length>0&&(this.re=this.re.substring(0,this.re.length-1),this.lh=!0),13===t||10===t){if(this.re.length>0){let t=0;try{t=parseInt(this.re,10)}catch(t){}this.ei.pf(O.A.Wy),this.ei.p4(t)}this.oe=!1,this.lh=!0}}else if(-1===this.Rh&&(t>=32&&t<=122&&this.ye.length<80&&(this.ye=this.ye+String.fromCharCode(t),this.lh=!0),8===t&&this.ye.length>0&&(this.ye=this.ye.substring(0,this.ye.length-1),this.lh=!0),(13===t||10===t)&&this.ye.length>0)){if('::clientdrop'===this.ye)await this.If();else if(this.no&&'::noclip'===this.ye)for(let t=0;t122)&&(t<65||t>90)&&(t<48||t>57)&&32!==t);this.qe.length<12&&(this.qe=this.qe+String.fromCharCode(t))}};Hf=()=>{if(1===this.$c)if(this.Jc>=8&&this.Jc<=108&&this.Qc>=490&&this.Qc<=522)this.$h=(this.$h+1)%4,this.fh=!0,this.lh=!0,this.ei.pf(O.A.Hy),this.ei.p1(this.$h),this.ei.p1(this.Jh),this.ei.p1(this.Qh);else if(this.Jc>=137&&this.Jc<=237&&this.Qc>=490&&this.Qc<=522)this.Jh=(this.Jh+1)%3,this.fh=!0,this.lh=!0,this.ei.pf(O.A.Hy),this.ei.p1(this.$h),this.ei.p1(this.Jh),this.ei.p1(this.Qh);else if(this.Jc>=275&&this.Jc<=375&&this.Qc>=490&&this.Qc<=522)this.Qh=(this.Qh+1)%3,this.fh=!0,this.lh=!0,this.ei.pf(O.A.Hy),this.ei.p1(this.$h),this.ei.p1(this.Jh),this.ei.p1(this.Qh);else if(this.Jc>=416&&this.Jc<=516&&this.Qc>=490&&this.Qc<=522){this.oy(),this.qe='',this.$e=!1;for(let t=0;t{if(this.te?this.ie=32:this.ie=0,this.te=!1,t>=n&&t=r&&i=n&&t=r+h-16&&i=n-this.ie&&t=r+16&&i0){let t=(h-32)*h/s|0;t<8&&(t=8);const n=i-r-(t/2|0)-16,l=h-t-32;o.zl=(s-h)*n/l|0,e&&(this.oh=!0),this.te=!0}};wf=()=>{this.hs||(this.Zo(),this.Jo=null,this.Ii=null,this.Ei=null,this.gi=null,this._i=null,this.Ci=null,this.Ti=null,this.Oi=null,this.vi=null,this.bi=null,this.hs=new f.A(479,96),this.ts=new f.A(168,160),u.A.clear(),this.Ls?.draw(0,0),this.Qi=new f.A(190,261),this.ss=new f.A(512,334),u.A.clear(),this.es=new f.A(501,61),this.ns=new f.A(288,40),this.rs=new f.A(269,66),this.Ai=!0)};Su=t=>{if(!t)return!1;for(let i=0;i{if(0n===t)return;if(this.co>=100)return void this.rw(0,'Your friends list is full. Max of 100 hit','');const i=M.A.Ka(M.A.Xa(t));for(let s=0;s{if(0n!==t)for(let i=0;i{if(0n===t)return;if(this.xh>=100)return void this.rw(0,'Your ignore list is full. Max of 100 hit','');const i=M.A.Ka(M.A.Xa(t));for(let s=0;s{if(0n!==t)for(let i=0;i{const s=this.Wr[this.Qn][t][i];if(!s)return void this.ln?.$y(this.Qn,t,i);let h=-99999999,e=null;for(let t=s.head();t;t=s.next()){const i=n.A.get(t.index);let s=i.Jy;i.Pa&&(s*=t.count+1),s>h&&(h=s,e=t)}if(!e)return;s.Qy(e);let r=-1,o=-1,l=0,a=0;for(let t=s.head();t;t=s.next())t.index!==e.index&&-1===r&&(r=t.index,l=t.count),t.index!==e.index&&t.index!==r&&-1===o&&(o=t.index,a=t.count);let c=null;-1!==r&&(c=n.A.get(r).tA(l));let f=null;-1!==o&&(f=n.A.get(o).tA(a));const u=t+(i<<7)+1610612736|0,d=n.A.get(e.index);this.ln?.iA(t,i,this.ou(this.Qn,128*t+64,128*i+64),this.Qn,u,d.tA(e.count),f,c)};sA=(t,i,s,h,n,r,o)=>{if(i<1||s<1||i>102||s>102)return;if($.K.Tt&&t!==this.Qn)return;if(!this.ln)return;let l=0;if(o===N.A.hA&&(l=this.ln.Yd(t,i,s)),o===N.A.eA&&(l=this.ln.nA(t,s,i)),o===N.A.rA&&(l=this.ln.Qd(t,i,s)),o===N.A.Ny&&(l=this.ln.Fd(t,i,s)),0!==l){const h=this.ln.Vd(t,i,s,l),n=l>>14&32767,r=31&h,a=h>>6;if(o===N.A.hA){this.ln?.oA(t,i,s,1);const h=e.A.get(n);h.lA&&this.$n[t]?.oA(i,s,r,a,h.aA)}if(o===N.A.eA&&this.ln?.cA(t,i,s),o===N.A.rA){this.ln.fA(t,i,s);const h=e.A.get(n);if(i+h.width>G.A.dr-1||s+h.width>G.A.dr-1||i+h.length>G.A.dr-1||s+h.length>G.A.dr-1)return;h.lA&&this.$n[t]?.fA(i,s,h.width,h.length,a,h.aA)}if(o===N.A.Ny){this.ln?.uA(t,i,s);const h=e.A.get(n);h.lA&&h.active&&this.$n[t]?.dA(i,s)}}if(h>=0){let e=t;this.ar&&t<3&&!(2&~this.ar[1][i][s])&&(e=t+1),this.lr&&D.A.sA(t,i,s,this.ln,this.lr,this.Gr,this.$n[t],h,r,n,e)}};oy=()=>{this.ei.pf(O.A.wA),-1!==this.Lh&&(this.Lh=-1,this.oh=!0,this.Ne=!1,this.ah=!0),-1!==this.Rh&&(this.Rh=-1,this.lh=!0,this.Ne=!1),this.uh=-1};If=async()=>{this.li>0?await this.yA():(this.ss?.bind(),this.xi?.Bc(257,144,'Connection lost',m.A.la),this.xi?.Bc(256,143,'Connection lost',m.A.Yl),this.xi?.Bc(257,159,'Please wait - attempting to reestablish',m.A.la),this.xi?.Bc(256,158,'Please wait - attempting to reestablish',m.A.Yl),this.ss?.draw(8,11),this.un=0,this.stream?.close(),this.xc=!1,await this.tf(this.username,this.password,!0),this.xc||await this.yA())};yA=async()=>{this.stream&&this.stream.close(),this.stream=null,this.xc=!1,this.pi=0,this.username='',this.password='',k.A.ff(),this.gu(),this.ln?.reset();for(let t=0;t{if(!this.stream)return!1;try{let t=this.stream.available;if(0===t)return!1;if(-1===this.fi&&(await this.stream.nf(this.in.data,0,1),this.fi=255&this.in.data[0],this.ci&&(this.fi=this.fi-this.ci.AA&255),this.packetSize=g.A.pA[this.fi],t--),-1===this.packetSize){if(t<=0)return!1;await this.stream.nf(this.in.data,0,1),this.packetSize=255&this.in.data[0],t--}if(-2===this.packetSize){if(t<=1)return!1;await this.stream.nf(this.in.data,0,2),this.in.ft=0,this.packetSize=this.in.ct,t-=2}if(t0&&this.rw(5,s+' has logged in.',''),0===i&&this.rw(5,s+' has logged out.','')),s=null;break}s&&this.co<100&&(this.Co[this.co]=t,this._o[this.co]=s,this.To[this.co]=i,this.co++,this.oh=!0);let h=!1;for(;!h;){h=!0;for(let t=0;t=0&&h>=0&&s=G.A.dr||t.z>=G.A.dr)&&t.LA();return 0!==this.un&&(this.un-=e,this.dn-=n),this.wn=!1,this.fi=-1,!0}if(this.fi===T.A.RA)return c.A.qo[this.in.ct].model=this.qr?.SA()||null,this.fi=-1,!0;if(this.fi===T.A.MA)return this.Nh=this.in.gA,1===this.Nh&&(this.Ph=this.in.ct),this.Nh>=2&&this.Nh<=6&&(2===this.Nh&&(this.Fh=64,this.Uh=64),3===this.Nh&&(this.Fh=0,this.Uh=64),4===this.Nh&&(this.Fh=128,this.Uh=64),5===this.Nh&&(this.Fh=64,this.Uh=0),6===this.Nh&&(this.Fh=64,this.Uh=128),this.Nh=2,this.Gh=this.in.ct,this.Hh=this.in.ct,this.Wh=this.in.gA),10===this.Nh&&(this.Bh=this.in.ct),this.fi=-1,!0;if(this.fi===T.A.kA){const t=this.in.xA,i=this.in.ut,s=this.in.ut;return t!==this.Uo&&this.Fo&&!$.K.Tt&&await this.wl(t,i,s,!0),this.Uo=t,this.Bo=i,this.Go=s,this.Po=0,this.fi=-1,!0}if(this.fi===T.A.DA)return await this.yA(),this.fi=-1,!1;if(this.fi===T.A.NA){const t=this.in.gA,i=this.in.gA;let s=-1;if(this.zn)for(let h=0;h=100&&(this.bn=128*this.gr+64,this.Rn=128*this._r+64,this.Ln=this.ou(this.Qn,this.gr,this._r)-this.Cr),this.fi=-1,!0;if(this.fi===T.A.Cp){this.Bn=this.in.gA,this.Gn=this.in.gA;for(let t=this.Bn;t=this.Bn&&t.x=this.Gn&&t.z1?this.rw(7,e,M.A.Ka(M.A.Xa(t))):this.rw(3,e,M.A.Ka(M.A.Xa(t)))}catch(t){}return this.fi=-1,!0}if(this.fi===T.A.Rp){for(let t=0;t=100){const t=128*this.Ar+64,i=128*this.pr+64,s=this.ou(this.Qn,this.Ar,this.pr)-this.mr,h=t-this.bn,e=s-this.Ln,n=i-this.Rn,r=0|Math.sqrt(h*h+n*n);this.Sn=325.949*Math.atan2(e,r)&2047,this.Mn=-325.949*Math.atan2(h,n)&2047,this.Sn<128&&(this.Sn=128),this.Sn>383&&(this.Sn=383)}return this.fi=-1,!0}if(this.fi===T.A.Dp)return this.Zh=this.in.gA,this.oh=!0,this.ah=!0,this.fi=-1,!0;if(this.fi===T.A.Np){const t=this.in.xA;let i;if(t.endsWith(':tradereq:')){const s=t.substring(0,t.indexOf(':'));i=M.A.Md(s);let h=!1;for(let t=0;t>10&31,h=i>>5&31,e=31&i;return c.A.qo[t].ua=(s<<19)+(h<<11)+(e<<3),this.fi=-1,!0}if(this.fi===T.A.Wp){for(let t=0;t=this.Xh[s]&&(this.Kh[t]=s+2);return this.fi=-1,!0}if(this.fi===T.A.Zp){for(this.Bn=this.in.gA,this.Gn=this.in.gA;this.in.ft=0&&t{try{this.Un=-1,this.Hr.clear(),this.Gr.clear(),this.Br.clear(),this.Ur.clear(),d.A.hm(),this.gu(),this.ln?.reset();for(let t=0;t>8,s=255&this.zn[t];if(33===i&&s>=71&&s<=73){D.A.Tt=!1;break}}if($.K.Tt?this.ln?.nm(this.Qn):this.ln?.nm(0),this.zn&&this.Kn){this.ei.pf(O.A.jf);for(let s=0;s>8)-this.Yn,h=64*(255&this.zn[s])-this.Vn,e=this.Kn[s];if(e){const s=new I.A(new Uint8Array(e)).ut,n=R.A.read(s,e,e.length-4,4);t.rm(8*(this.Hn-6),8*(this.Wn-6),i,h,n)}else this.Wn<800&&t.om(h,i,64,64)}}if(this.zn&&this.Xn){this.ei.pf(O.A.jf);for(let s=0;s>8)-this.Yn,r=64*(255&this.zn[s])-this.Vn;t.lm(this.ln,this.Gr,this.$n,e,n,r)}}}this.ei.pf(O.A.jf),t.am(this.ln,this.$n),this.ss?.bind(),this.ei.pf(O.A.jf);for(let t=this.Gr.head();t;t=this.Gr.next())2===(this.ar&&2&this.ar[1][t.fm][t.um])&&(t.dm--,t.dm<0&&t.LA());for(let t=0;t{const i=c.A.qo[t];if(i.Ml)for(let t=0;t{let t=0;for(let i=0;i<99;i++){const s=i+1;t+=s+300*Math.pow(2,s/7)|0,this.Xh[i]=t/4|0}};rw=(t,i,s)=>{0===t&&-1!==this.le&&(this.zh=i,this.$c=0),-1===this.Rh&&(this.lh=!0);for(let t=99;t>0;t--)this.messageType[t]=this.messageType[t-1],this.ce[t]=this.ce[t-1],this.ae[t]=this.ae[t-1];$.K.bt&&0===t&&(i='['+(this.ii/30|0)+']: '+i),this.messageType[0]=t,this.ce[0]=s,this.ae[0]=i};ny=async t=>{const i=a.A.qo[t].ym;if(0!==i){const s=this.Pe[t];if(1===i&&(1===s&&d.A.vc(.9),2===s&&d.A.vc(.8),3===s&&d.A.vc(.7),4===s&&d.A.vc(.6),n.A.Tu?.clear(),this.Ai=!0),3===i){const t=this.Fo;0===s&&(this.Ho=256,(0,j.Am)(256),this.Fo=!0),1===s&&(this.Ho=192,(0,j.Am)(192),this.Fo=!0),2===s&&(this.Ho=128,(0,j.Am)(128),this.Fo=!0),3===s&&(this.Ho=64,(0,j.Am)(64),this.Fo=!0),4===s&&(this.Fo=!1),this.Fo!==t&&(this.Fo&&this.Uo?await this.wl(this.Uo,this.Bo,this.Go,!1):(0,j.jo)(!1),this.Po=0)}4===i&&(0===s&&(this.Mo=256,(0,j.pm)(256),this.bo=!0),1===s&&(this.Mo=192,(0,j.pm)(192),this.bo=!0),2===s&&(this.Mo=128,(0,j.pm)(128),this.bo=!0),3===s&&(this.Mo=64,(0,j.pm)(64),this.bo=!0),4===s&&(this.bo=!1)),5===i&&(this.We=s),6===i&&(this.we=s),8===i&&(this.de=s,this.lh=!0)}};Im=(t,i)=>{let s=0;for(let t=0;t<100;t++){if(!this.ae[t])continue;const h=this.messageType[t],e=this.kh+70+4-14*s;if(e<-20)break;0===h&&s++,1!==h&&2!==h||!(1===h||0===this.$h||1===this.$h&&this.Su(this.ce[t]))||(i>e-14&&i<=e&&this.qr&&this.ce[t]!==this.qr.name&&(this.no&&(this.bh[this.Oh]='Report abuse @whi@'+this.ce[t],this.Ye[this.Oh]=34,this.Oh++),this.bh[this.Oh]='Add ignore @whi@'+this.ce[t],this.Ye[this.Oh]=436,this.Oh++,this.bh[this.Oh]='Add friend @whi@'+this.ce[t],this.Ye[this.Oh]=406,this.Oh++),s++),3!==h&&7!==h||0!==this.de||!(7===h||0===this.Jh||1===this.Jh&&this.Su(this.ce[t]))||(i>e-14&&i<=e&&(this.no&&(this.bh[this.Oh]='Report abuse @whi@'+this.ce[t],this.Ye[this.Oh]=34,this.Oh++),this.bh[this.Oh]='Add ignore @whi@'+this.ce[t],this.Ye[this.Oh]=436,this.Oh++,this.bh[this.Oh]='Add friend @whi@'+this.ce[t],this.Ye[this.Oh]=406,this.Oh++),s++),4===h&&(0===this.Qh||1===this.Qh&&this.Su(this.ce[t]))&&(i>e-14&&i<=e&&(this.bh[this.Oh]='Accept trade @whi@'+this.ce[t],this.Ye[this.Oh]=903,this.Oh++),s++),(5===h||6===h)&&0===this.de&&this.Jh<2&&s++,8===h&&(0===this.Qh||1===this.Qh&&this.Su(this.ce[t]))&&(i>e-14&&i<=e&&(this.bh[this.Oh]='Accept duel @whi@'+this.ce[t],this.Ye[this.Oh]=363,this.Oh++),s++)}};Em=t=>{if(0===this.de)return;let i=0;0!==this.ai&&(i=1);for(let s=0;s<100;s++)if(null!==this.ae[s]){const h=this.messageType[s];if((3===h||7===h)&&(7===h||0===this.Jh||1===this.Jh&&this.Su(this.ce[s]))){const h=329-13*i;if(this.sa>8&&this.sa<520&&t-11>h-10&&t-11<=h+3&&(this.no&&(this.bh[this.Oh]='Report abuse @whi@'+this.ce[s],this.Ye[this.Oh]=2034,this.Oh++),this.bh[this.Oh]='Add ignore @whi@'+this.ce[s],this.Ye[this.Oh]=2436,this.Oh++,this.bh[this.Oh]='Add friend @whi@'+this.ce[s],this.Ye[this.Oh]=2406,this.Oh++),i++,i>=5)return}if((5===h||6===h)&&this.Jh<2&&(i++,i>=5))return}};gm=(t,i,s,h,e,r)=>{if(0!==t.type||!t.Ml||t.hide||ih+t.width||s>e+t.height||!t.Gl||!t.Hl)return;const o=t.Ml.length;for(let l=0;l=0||0!==f.wa)&&i>=o&&s>=a&&i=0?this.Ze=f._m:this.Ze=f.id),0===f.type)this.gm(f,i,s,o,a,f.zl),f.scroll>f.height&&this.$f(i,s,f.scroll,f.height,!0,o+f.width,a,f);else if(2===f.type){let t=0;for(let h=0;h=r+32||s>=l+32){t++;continue}if(this.je=t,this.ze=f.id,!f.$l||f.$l[t]<=0){t++;continue}const c=n.A.get(f.$l[t]-1);if(1===this.ve&&f.Cm)f.id===this.Le&&t===this.be||(this.bh[this.Oh]='Use '+this.Se+' with @lre@'+c.name,this.Ye[this.Oh]=881,this.Ve[this.Oh]=c.id,this.Ke[this.Oh]=t,this.Xe[this.Oh]=f.id,this.Oh++);else if(1===this.Ue&&f.Cm)16&~this.Ge||(this.bh[this.Oh]=this.He+' @lre@'+c.name,this.Ye[this.Oh]=391,this.Ve[this.Oh]=c.id,this.Ke[this.Oh]=t,this.Xe[this.Oh]=f.id,this.Oh++);else{if(f.Cm)for(let i=4;i>=3;i--)c.Tm&&c.Tm[i]?(this.bh[this.Oh]=c.Tm[i]+' @lre@'+c.name,3===i?this.Ye[this.Oh]=478:4===i&&(this.Ye[this.Oh]=347),this.Ve[this.Oh]=c.id,this.Ke[this.Oh]=t,this.Xe[this.Oh]=f.id,this.Oh++):4===i&&(this.bh[this.Oh]='Drop @lre@'+c.name,this.Ye[this.Oh]=347,this.Ve[this.Oh]=c.id,this.Ke[this.Oh]=t,this.Xe[this.Oh]=f.id,this.Oh++);if(f.Om&&(this.bh[this.Oh]='Use @lre@'+c.name,this.Ye[this.Oh]=188,this.Ve[this.Oh]=c.id,this.Ke[this.Oh]=t,this.Xe[this.Oh]=f.id,this.Oh++),f.Cm&&c.Tm)for(let i=2;i>=0;i--)c.Tm[i]&&(this.bh[this.Oh]=c.Tm[i]+' @lre@'+c.name,0===i?this.Ye[this.Oh]=405:1===i?this.Ye[this.Oh]=38:2===i&&(this.Ye[this.Oh]=422),this.Ve[this.Oh]=c.id,this.Ke[this.Oh]=t,this.Xe[this.Oh]=f.id,this.Oh++);if(f.vm)for(let i=4;i>=0;i--)f.vm[i]&&(this.bh[this.Oh]=f.vm[i]+' @lre@'+c.name,0===i?this.Ye[this.Oh]=602:1===i?this.Ye[this.Oh]=596:2===i?this.Ye[this.Oh]=22:3===i?this.Ye[this.Oh]=892:4===i&&(this.Ye[this.Oh]=415),this.Ve[this.Oh]=c.id,this.Ke[this.Oh]=t,this.Xe[this.Oh]=f.id,this.Oh++);this.bh[this.Oh]='Examine @lre@'+c.name,$.K.bt&&(this.bh[this.Oh]+='@whi@ ('+c.id+')'),this.Ye[this.Oh]=1773,this.Ve[this.Oh]=c.id,f.Jl&&(this.Xe[this.Oh]=f.Jl[t]),this.Oh++}t++}}else if(i>=o&&s>=a&&i{let i=t.Vl;return i>=c.A.Ua&&i<=c.A.Ha?(i>=c.A.Ga?i-=c.A.Ga:i--,this.bh[this.Oh]='Remove @whi@'+this._o[i],this.Ye[this.Oh]=557,this.Oh++,this.bh[this.Oh]='Message @whi@'+this._o[i],this.Ye[this.Oh]=679,this.Oh++,!0):i>=c.A.Ya&&i<=c.A.Va&&(this.bh[this.Oh]='Remove @whi@'+t.text,this.Ye[this.Oh]=556,this.Oh++,!0)};Dm=()=>{0===this.ve&&0===this.Ue&&(this.bh[this.Oh]='Walk here',this.Ye[this.Oh]=660,this.Ke[this.Oh]=this.sa,this.Xe[this.Oh]=this.ha,this.Oh++);let t=-1;for(let i=0;i>7&127,o=s>>29&3,l=s>>14&32767;if(s!==t){if(t=s,2===o&&this.ln&&this.ln.Vd(this.Qn,h,r,s)>=0){const t=e.A.get(l);if(1===this.ve)this.bh[this.Oh]='Use '+this.Se+' with @cya@'+t.name,this.Ye[this.Oh]=450,this.Ve[this.Oh]=s,this.Ke[this.Oh]=h,this.Xe[this.Oh]=r,this.Oh++;else if(1!==this.Ue){if(t.Pm)for(let i=4;i>=0;i--)t.Pm[i]&&(this.bh[this.Oh]=t.Pm[i]+' @cya@'+t.name,0===i&&(this.Ye[this.Oh]=285),1===i&&(this.Ye[this.Oh]=504),2===i&&(this.Ye[this.Oh]=364),3===i&&(this.Ye[this.Oh]=581),4===i&&(this.Ye[this.Oh]=1501),this.Ve[this.Oh]=s,this.Ke[this.Oh]=h,this.Xe[this.Oh]=r,this.Oh++);this.bh[this.Oh]='Examine @cya@'+t.name,$.K.bt&&(this.bh[this.Oh]+='@whi@ ('+t.id+')'),this.Ye[this.Oh]=1175,this.Ve[this.Oh]=s,this.Ke[this.Oh]=h,this.Xe[this.Oh]=r,this.Oh++}else 4&~this.Ge||(this.bh[this.Oh]=this.He+' @cya@'+t.name,this.Ye[this.Oh]=55,this.Ve[this.Oh]=s,this.Ke[this.Oh]=h,this.Xe[this.Oh]=r,this.Oh++)}if(1===o){const t=this.Nr[l];if(t&&t.type&&1===t.type.size&&64==(127&t.x)&&64==(127&t.z))for(let i=0;i=0;s--)t.Pm&&t.Pm[s]?(this.bh[this.Oh]=t.Pm[s]+' @lre@'+t.name,0===s&&(this.Ye[this.Oh]=224),1===s&&(this.Ye[this.Oh]=993),2===s&&(this.Ye[this.Oh]=99),3===s&&(this.Ye[this.Oh]=746),4===s&&(this.Ye[this.Oh]=877),this.Ve[this.Oh]=i.index,this.Ke[this.Oh]=h,this.Xe[this.Oh]=r,this.Oh++):2===s&&(this.bh[this.Oh]='Take @lre@'+t.name,this.Ye[this.Oh]=99,this.Ve[this.Oh]=i.index,this.Ke[this.Oh]=h,this.Xe[this.Oh]=r,this.Oh++);this.bh[this.Oh]='Examine @lre@'+t.name,$.K.bt&&(this.bh[this.Oh]+='@whi@ ('+i.index+')'),this.Ye[this.Oh]=1102,this.Ve[this.Oh]=i.index,this.Ke[this.Oh]=h,this.Xe[this.Oh]=r,this.Oh++}else 1&~this.Ge||(this.bh[this.Oh]=this.He+' @lre@'+t.name,this.Ye[this.Oh]=965,this.Ve[this.Oh]=i.index,this.Ke[this.Oh]=h,this.Xe[this.Oh]=r,this.Oh++)}}}}};Fm=(t,i,s,h)=>{if(this.Oh>=400)return;let e=t.name;if(0!==t.Hm&&this.qr&&(e=e+this.Wm(this.qr.wc,t.Hm)+' (level-'+t.Hm+')'),1===this.ve)this.bh[this.Oh]='Use '+this.Se+' with @yel@'+e,this.Ye[this.Oh]=900,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++;else if(1!==this.Ue){let n;if(t.Pm)for(n=4;n>=0;n--)t.Pm[n]&&'attack'!==t.Pm[n]?.toLowerCase()&&(this.bh[this.Oh]=t.Pm[n]+' @yel@'+e,0===n?this.Ye[this.Oh]=728:1===n?this.Ye[this.Oh]=542:2===n?this.Ye[this.Oh]=6:3===n?this.Ye[this.Oh]=963:4===n&&(this.Ye[this.Oh]=245),this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++);if(t.Pm)for(n=4;n>=0;n--)if(t.Pm[n]&&'attack'===t.Pm[n]?.toLowerCase()){let r=0;this.qr&&t.Hm>this.qr.wc&&(r=2e3),this.bh[this.Oh]=t.Pm[n]+' @yel@'+e,0===n?this.Ye[this.Oh]=r+728:1===n?this.Ye[this.Oh]=r+542:2===n?this.Ye[this.Oh]=r+6:3===n?this.Ye[this.Oh]=r+963:4===n&&(this.Ye[this.Oh]=r+245),this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++}this.bh[this.Oh]='Examine @yel@'+e,$.K.bt&&(this.bh[this.Oh]+='@whi@ ('+t.id+')'),this.Ye[this.Oh]=1607,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++}else 2&~this.Ge||(this.bh[this.Oh]=this.He+' @yel@'+e,this.Ye[this.Oh]=265,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++)};Um=(t,i,s,h)=>{if(t===this.qr||this.Oh>=400)return;let e=null;this.qr&&(e=t.name+this.Wm(this.qr.wc,t.wc)+' (level-'+t.wc+')'),1===this.ve?(this.bh[this.Oh]='Use '+this.Se+' with @whi@'+e,this.Ye[this.Oh]=367,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++):1!==this.Ue?(this.bh[this.Oh]='Follow @whi@'+e,this.Ye[this.Oh]=1544,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++,0===this.mh&&(this.bh[this.Oh]='Trade with @whi@'+e,this.Ye[this.Oh]=1373,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++),this.ho>0&&(this.bh[this.Oh]='Attack @whi@'+e,this.qr&&this.qr.wc>=t.wc?this.Ye[this.Oh]=151:this.Ye[this.Oh]=2151,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++),1===this.eo&&(this.bh[this.Oh]='Fight @whi@'+e,this.Ye[this.Oh]=151,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++),2===this.eo&&(this.bh[this.Oh]='Duel-with @whi@'+e,this.Ye[this.Oh]=1101,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++)):8&~this.Ge||(this.bh[this.Oh]=this.He+' @whi@'+e,this.Ye[this.Oh]=651,this.Ve[this.Oh]=i,this.Ke[this.Oh]=s,this.Xe[this.Oh]=h,this.Oh++);for(let t=0;t{const s=t-i;return s<-9?'@red@':s<-6?'@or3@':s<-3?'@or2@':s<0?'@or1@':s>9?'@gre@':s>6?'@gr3@':s>3?'@gr2@':s>0?'@gr1@':'@yel@'};bf=()=>{if(0===this.ge){this.bh[0]='Cancel',this.Ye[0]=1252,this.Oh=1,this.Em(this.ha),this.Ze=0,this.sa>8&&this.ha>11&&this.sa<520&&this.ha<345&&(-1===this.uh?this.Dm():this.gm(c.A.qo[this.uh],this.sa,this.ha,8,11,0)),this.Ze!==this.Ae&&(this.Ae=this.Ze),this.Ze=0,this.sa>562&&this.ha>231&&this.sa<752&&this.ha<492&&(-1!==this.Lh?this.gm(c.A.qo[this.Lh],this.sa,this.ha,562,231,0):-1!==this.qh[this.Zh]&&this.gm(c.A.qo[this.qh[this.Zh]],this.sa,this.ha,562,231,0)),this.Ze!==this.pe&&(this.oh=!0,this.pe=this.Ze),this.Ze=0,this.sa>22&&this.ha>375&&this.sa<431&&this.ha<471&&(-1===this.Rh?this.Im(this.sa-22,this.ha-375):this.gm(c.A.qo[this.Rh],this.sa,this.ha,22,375,0)),-1!==this.Rh&&this.Ze!==this.me&&(this.lh=!0,this.me=this.Ze);let t=!1;for(;!t;){t=!0;for(let i=0;i1e3){const s=this.bh[i];this.bh[i]=this.bh[i+1],this.bh[i+1]=s;const h=this.Ye[i];this.Ye[i]=this.Ye[i+1],this.Ye[i+1]=h;const e=this.Ke[i];this.Ke[i]=this.Ke[i+1],this.Ke[i+1]=e;const n=this.Xe[i];this.Xe[i]=this.Xe[i+1],this.Xe[i+1]=n;const r=this.Ve[i];this.Ve[i]=this.Ve[i+1],this.Ve[i+1]=r,t=!1}}}};Sf=()=>{let t=0;if(this.Di){let i;t=this.Di.Mu('Choose Option');for(let s=0;st&&(t=i)}t+=8;const i=15*this.Oh+21;let s,h;this.Jc>8&&this.Qc>11&&this.Jc<520&&this.Qc<345&&(s=this.Jc-(t/2|0)-8,s+t>512?s=512-t:s<0&&(s=0),h=this.Qc-11,h+i>334?h=334-i:h<0&&(h=0),this.Ih=!0,this.Eh=0,this.gh=s,this._h=h,this.Ch=t,this.Th=15*this.Oh+22),this.Jc>562&&this.Qc>231&&this.Jc<752&&this.Qc<492&&(s=this.Jc-(t/2|0)-562,s<0?s=0:s+t>190&&(s=190-t),h=this.Qc-231,h<0?h=0:h+i>261&&(h=261-i),this.Ih=!0,this.Eh=1,this.gh=s,this._h=h,this.Ch=t,this.Th=15*this.Oh+22),this.Jc>22&&this.Qc>375&&this.Jc<501&&this.Qc<471&&(s=this.Jc-(t/2|0)-22,s<0?s=0:s+t>479&&(s=479-t),h=this.Qc-375,h<0?h=0:h+i>96&&(h=96-i),this.Ih=!0,this.Eh=2,this.gh=s,this._h=h,this.Ch=t,this.Th=15*this.Oh+22)};Nf=(t,i,s,h,e,n,r,o,l,a,c)=>{const f=this.$n[this.Qn];if(!f)return!1;const u=G.A.dr,d=G.A.dr;for(let t=0;t0&&0===this.zr[i]&&(g[i]&H.A.Bd)===H.A.OPEN&&(this.Kr[p]=w-1,this.Xr[p]=y,p=(p+1)%E,this.zr[i]=2,this.jr[i]=t),i=G.A.index(w+1,y),w0&&0===this.zr[i]&&(g[i]&H.A.Hd)===H.A.OPEN&&(this.Kr[p]=w,this.Xr[p]=y-1,p=(p+1)%E,this.zr[i]=1,this.jr[i]=t),i=G.A.index(w,y+1),y0&&y>0&&0===this.zr[i]&&!(g[i]&H.A.zm)&&(g[G.A.index(w-1,y)]&H.A.Bd)===H.A.OPEN&&(g[G.A.index(w,y-1)]&H.A.Hd)===H.A.OPEN&&(this.Kr[p]=w-1,this.Xr[p]=y-1,p=(p+1)%E,this.zr[i]=3,this.jr[i]=t),i=G.A.index(w+1,y-1),w0&&0===this.zr[i]&&!(g[i]&H.A.jm)&&(g[G.A.index(w+1,y)]&H.A.Gd)===H.A.OPEN&&(g[G.A.index(w,y-1)]&H.A.Hd)===H.A.OPEN&&(this.Kr[p]=w+1,this.Xr[p]=y-1,p=(p+1)%E,this.zr[i]=9,this.jr[i]=t),i=G.A.index(w-1,y+1),w>0&&y=0&&s>=0&&e0){E=Math.min(m,25),m--;const t=this.Kr[m],i=this.Xr[m];if($.K.bt&&1===this.Tf[6]&&1===this.Tf[7]){for(let t=0;t{this.Sr=0,this.Rr=0,this.tI(t),this.iI(t),this.sI(t,i),this.hI(t);for(let t=0;t{t.eI();if(0!==t.nI(1)){const i=t.nI(2);if(0===i)this.Mr[this.Rr++]=this.qt;else if(1===i){const i=t.nI(3);this.qr?.step(!1,i);1===t.nI(1)&&(this.Mr[this.Rr++]=this.qt)}else if(2===i){const i=t.nI(3);this.qr?.step(!0,i);const s=t.nI(3);this.qr?.step(!0,s);1===t.nI(1)&&(this.Mr[this.Rr++]=this.qt)}else if(3===i){this.Qn=t.nI(2);const i=t.nI(7),s=t.nI(7),h=t.nI(1);this.qr?.move(1===h,i,s);1===t.nI(1)&&(this.Mr[this.Rr++]=this.qt)}}};iI=t=>{const i=t.nI(8);if(ithis.br)throw new Error(`eek! ${this.username} Too many players`);this.br=0;for(let s=0;s{let s;for(;t.rI+10<8*i&&(s=t.nI(11),2047!==s);){if(!this.vr[s]){this.vr[s]=new W.A;const t=this.Dr[s];t&&this.vr[s]?.read(t)}this.Lr[this.br++]=s;const i=this.vr[s];i&&(i.uu=this.ii);let h=t.nI(5);h>15&&(h-=32);let e=t.nI(5);e>15&&(e-=32);const n=t.nI(1);this.qr&&i?.move(1===n,this.qr.Pf[0]+h,this.qr.Ff[0]+e);1===t.nI(1)&&(this.Mr[this.Rr++]=s)}t.oI()};hI=t=>{for(let i=0;i{if(t.Yu=s,t.Vu=this.ii,(s&W.A.Ku)===W.A.Ku){const s=e.gA,h=new Uint8Array(s),n=new I.A(h);e.tp(s,0,h),this.Dr[i]=n,t.read(n)}if((s&W.A.Xu)===W.A.Xu){let i=e.ct;65535===i&&(i=-1),i===t.zu&&(t.cI=0);const s=e.gA;(-1===i||-1===t.zu||h.A.qo[i].priority>h.A.qo[t.zu].priority||0===h.A.qo[t.zu].priority)&&(t.zu=i,t.fI=0,t.uI=0,t.dI=s,t.cI=0)}if((s&W.A.ju)===W.A.ju&&(t.Zu=e.ct,65535===t.Zu&&(t.Zu=-1)),(s&W.A.qu)===W.A.qu&&(t.Ru=e.xA,t.ku=0,t.xu=0,t.Du=150,t.name&&this.rw(2,t.Ru,t.name)),(s&W.A.$u)===W.A.$u&&(t.Bu=e.gA,t.Uu=e.gA,t.Nu=this.ii+400,t.Pu=e.gA,t.Fu=e.gA),(s&W.A.Ju)===W.A.Ju&&(t.wI=e.ct,t.yI=e.ct,t.Qu=t.wI,t.td=t.yI),(s&W.A.sd)===W.A.sd){const i=e.ct,s=e.gA,h=e.gA,n=e.ft;if(t.name){const n=M.A.Md(t.name);let r=!1;if(s<=1)for(let t=0;t>8,t.xu=255&i,t.Du=150,s>1?this.rw(1,r,t.name):this.rw(2,r,t.name)}catch(t){}}e.ft=n+h}if((s&W.A.hd)===W.A.hd){t.ed=e.ct;const i=e.ut;t.AI=i>>16,t.pI=this.ii+(65535&i),t.mI=0,t.II=0,t.pI>this.ii&&(t.mI=-1),65535===t.ed&&(t.ed=-1)}(s&W.A.nd)===W.A.nd&&(t.EI=e.gA,t.gI=e.gA,t._I=e.gA,t.CI=e.gA,t.Gu=e.ct+this.ii,t.Hu=e.ct+this.ii,t.TI=e.gA,t.pathLength=0,t.Pf[0]=t._I,t.Ff[0]=t.CI)};OA=(t,i)=>{this.Sr=0,this.Rr=0,this.OI(t),this.vI(t,i),this.bI(t);for(let t=0;t{t.eI();const i=t.nI(8);if(ithis.Pr)throw new Error(`eek! ${this.username} Too many npcs`);this.Pr=0;for(let s=0;s{for(;t.rI+21<8*i;){const i=t.nI(13);if(8191===i)break;this.Nr[i]||(this.Nr[i]=new Y.A);const s=this.Nr[i];this.Fr[this.Pr++]=i,s?(s.uu=this.ii,s.type=r.A.get(t.nI(11)),s.size=s.type.size,s.LI=s.type.RI,s.SI=s.type.MI,s.kI=s.type.xI,s.DI=s.type.NI,s.Qa=s.type.FI):t.nI(11);let h=t.nI(5);h>15&&(h-=32);let e=t.nI(5);e>15&&(e-=32),this.qr&&s?.move(!1,this.qr.Pf[0]+h,this.qr.Ff[0]+e);1===t.nI(1)&&(this.Mr[this.Rr++]=i)}t.oI()};bI=t=>{for(let i=0;ih.A.qo[e.zu].priority||0===h.A.qo[e.zu].priority)&&(e.zu=i,e.fI=0,e.uI=0,e.dI=s,e.cI=0)}if((n&Y.A.ju)===Y.A.ju&&(e.Zu=t.ct,65535===e.Zu&&(e.Zu=-1)),(n&Y.A.qu)===Y.A.qu&&(e.Ru=t.xA,e.Du=100),(n&Y.A.$u)===Y.A.$u&&(e.Bu=t.gA,e.Uu=t.gA,e.Nu=this.ii+400,e.Pu=t.gA,e.Fu=t.gA),(n&Y.A.rd)===Y.A.rd&&(e.type=r.A.get(t.ct),e.LI=e.type.RI,e.SI=e.type.MI,e.kI=e.type.xI,e.DI=e.type.NI,e.Qa=e.type.FI),(n&Y.A.hd)===Y.A.hd){e.ed=t.ct;const i=t.ut;e.AI=i>>16,e.pI=this.ii+(65535&i),e.mI=0,e.II=0,e.pI>this.ii&&(e.mI=-1),65535===e.ed&&(e.ed=-1)}(n&Y.A.Ju)===Y.A.Ju&&(e.wI=t.ct,e.yI=t.ct,e.Qu=e.wI,e.td=e.yI)}};Ef=()=>{for(let t=-1;t1406){$.K.Ft=0,this.ei.pf(O.A.BI),this.ei.p1(0);const t=this.ei.ft;this.ei.p1(162),this.ei.p1(22),2*Math.random()|0||this.ei.p1(84),this.ei.p2(31824),this.ei.p2(13490),2*Math.random()|0||this.ei.p1(123),2*Math.random()|0||this.ei.p1(134),this.ei.p1(100),this.ei.p1(94),this.ei.p2(35521),this.ei.au(this.ei.ft-t)}};UI=t=>{(t.x<128||t.z<128||t.x>=13184||t.z>=13184)&&(t.zu=-1,t.ed=-1,t.Gu=0,t.Hu=0,t.x=128*t.Pf[0]+64*t.size,t.z=128*t.Ff[0]+64*t.size,t.pathLength=0),t===this.qr&&(t.x<1536||t.z<1536||t.x>=11776||t.z>=11776)&&(t.zu=-1,t.ed=-1,t.Gu=0,t.Hu=0,t.x=128*t.Pf[0]+64*t.size,t.z=128*t.Ff[0]+64*t.size,t.pathLength=0),t.Gu>this.ii?this.GI(t):t.Hu>=this.ii?this.HI(t):this.WI(t),this.YI(t),this.VI(t)};iu=()=>{if(this.qr){this.qr.x>>7===this.un&&this.qr.z>>7===this.dn&&(this.un=0);for(let t=-1;t50||this.br>200)&&-1!==t&&i.KI===i.Qa;const h=i.x>>7,e=i.z>>7;if(!(h<0||h>=G.A.dr||e<0||e>=G.A.dr))if(!i.XI||this.ii=i.jI){if(64==(127&i.x)&&64==(127&i.z)){if(this.cr[h][e]===this.fn)continue;this.cr[h][e]=this.fn}i.y=this.ou(this.Qn,i.x,i.z),this.ln?.ZI(this.Qn,i.x,i.y,i.z,null,i,s,i.qI,60,i.$I)}else i.Tt=!1,i.y=this.ou(this.Qn,i.x,i.z),this.ln?.JI(this.Qn,i.x,i.y,i.z,i.QI,i.tE,i.iE,i.sE,null,i,s,i.qI)}}};gf=()=>{for(let t=0;t{for(let t=0;t>7,e=i.z>>7;if(!(h<0||h>=G.A.dr||e<0||e>=G.A.dr)){if(1===i.size&&64==(127&i.x)&&64==(127&i.z)){if(this.cr[h][e]===this.fn)continue;this.cr[h][e]=this.fn}this.ln?.ZI(this.Qn,i.x,this.ou(this.Qn,i.x,i.z),i.z,null,i,s,i.qI,64*(i.size-1)+60,i.$I)}}};hu=()=>{for(let t=this.Ur.head();t;t=this.Ur.next())if(t.level!==this.Qn||this.ii>t.hE)t.LA();else if(this.ii>=t.eE){if(t.target>0){const i=this.Nr[t.target-1];i&&t.nE(i.x,this.ou(t.level,i.x,i.z)-t.offsetY,i.z,this.ii)}if(t.target<0){const i=-t.target-1;let s;s=i===this.Qr?this.qr:this.vr[i],s&&t.nE(s.x,this.ou(t.level,s.x,s.z)-t.offsetY,s.z,this.ii)}t.update(this.cn),this.ln?.ZI(this.Qn,0|t.x,0|t.y,0|t.z,null,t,-1,t.qI,60,!1)}};eu=()=>{for(let t=this.Br.head();t;t=this.Br.next())t.level!==this.Qn||t.rE?t.LA():this.ii>=t.eE&&(t.update(this.cn),t.rE?t.LA():this.ln?.ZI(t.level,t.x,t.y,t.z,null,t,-1,0,60,!1))};nu=()=>{for(let t=this.Gr.head();t;t=this.Gr.next()){let i=!1;if(t.Dl+=this.cn,-1===t.Nl&&(t.Nl=0,i=!0),t.oE.delay)for(;t.Dl>t.oE.delay[t.Nl];)if(t.Dl-=t.oE.delay[t.Nl]+1,t.Nl++,i=!0,t.Nl>=t.oE.Pl&&(t.Nl-=t.oE.Fl,t.Nl<0||t.Nl>=t.oE.Pl)){t.LA(),i=!1;break}if(i&&this.ln){const i=t.dm,s=t.fm,h=t.um;let n=0;if(0===t.lE?n=this.ln.Yd(i,s,h):1===t.lE?n=this.ln.nA(i,h,s):2===t.lE?n=this.ln.Qd(i,s,h):3===t.lE&&(n=this.ln.Fd(i,s,h)),this.lr&&0!==n&&(n>>14&32767)===t.index){const r=this.lr[i][s][h],o=this.lr[i][s+1][h],l=this.lr[i][s+1][h+1],a=this.lr[i][s][h+1],c=e.A.get(t.index);let f=-1;if(-1!==t.Nl&&t.oE.frames&&(f=t.oE.frames[t.Nl]),2===t.lE){const t=this.ln.Vd(i,s,h,n);let e=31&t;const u=t>>6;e===P.A.Dy.id&&(e=P.A.xy.id),this.ln?.aE(i,s,h,c.Ma(e,u,r,o,l,a,f))}else if(1===t.lE)this.ln?.cE(i,s,h,c.Ma(P.A.fE.id,0,r,o,l,a,f));else if(0===t.lE){const t=this.ln.Vd(i,s,h,n),e=31&t,u=t>>6;if(e===P.A.zd.id){const t=u+1&3;this.ln?.uE(s,h,i,c.Ma(P.A.zd.id,u+4,r,o,l,a,f),c.Ma(P.A.zd.id,t,r,o,l,a,f))}else this.ln?.dE(i,s,h,c.Ma(e,u,r,o,l,a,f))}else if(3===t.lE){const t=this.ln.Vd(i,s,h,n)>>6;this.ln?.wE(i,s,h,c.Ma(P.A.Ny.id,t,r,o,l,a,f))}}else t.LA()}}};_f=()=>{for(let t=-1;t0&&(s.Du--,0===s.Du&&(s.Ru=null))}for(let t=0;t0&&(s.Du--,0===s.Du&&(s.Ru=null))}};Cf=()=>{if(2===this.an){for(let t=this.Hr.head();t;t=this.Hr.next())this.ii>=t.hE&&(this.sA(t.Tp,t.x,t.z,t.wm,t.angle,t.shape,t.hw),t.LA());$.K.Pt++,$.K.Pt>85&&($.K.Pt=0,this.ei.pf(O.A.yE))}};GI=t=>{const i=t.Gu-this.ii,s=128*t.EI+64*t.size,h=128*t.gI+64*t.size;t.x+=(s-t.x)/i|0,t.z+=(h-t.z)/i|0,t.AE=0,0===t.TI&&(t.pE=1024),1===t.TI&&(t.pE=1536),2===t.TI&&(t.pE=0),3===t.TI&&(t.pE=512)};HI=t=>{if(t.Hu===this.ii||-1===t.zu||0!==t.dI||t.uI+1>h.A.qo[t.zu].delay[t.fI]){const i=t.Hu-t.Gu,s=this.ii-t.Gu,h=128*t.EI+64*t.size,e=128*t.gI+64*t.size,n=128*t._I+64*t.size,r=128*t.CI+64*t.size;t.x=(h*(i-s)+n*s)/i|0,t.z=(e*(i-s)+r*s)/i|0}t.AE=0,0===t.TI&&(t.pE=1024),1===t.TI&&(t.pE=1536),2===t.TI&&(t.pE=0),3===t.TI&&(t.pE=512),t.qI=t.pE};YI=t=>{if(-1!==t.Zu&&t.Zu<32768){const i=this.Nr[t.Zu];if(i){const s=t.x-i.x,h=t.z-i.z;0===s&&0===h||(t.pE=325.949*Math.atan2(s,h)&2047)}}if(t.Zu>=32768){let i=t.Zu-32768;i===this.Qr&&(i=this.qt);const s=this.vr[i];if(s){const i=t.x-s.x,h=t.z-s.z;0===i&&0===h||(t.pE=325.949*Math.atan2(i,h)&2047)}}if((0!==t.wI||0!==t.yI)&&(0===t.pathLength||t.AE>0)){const i=t.x-64*(t.wI-this.Yn-this.Yn),s=t.z-64*(t.yI-this.Vn-this.Vn);0===i&&0===s||(t.pE=325.949*Math.atan2(i,s)&2047),t.wI=0,t.yI=0}const i=t.pE-t.qI&2047;if(0!==i&&(i<32||i>2016?t.qI=t.pE:i>1024?t.qI-=32:t.qI+=32,t.qI&=2047,t.KI===t.Qa&&t.qI!==t.pE)){if(-1!==t.mE)return void(t.KI=t.mE);t.KI=t.LI}};VI=t=>{let i;if(t.$I=!1,-1!==t.KI&&(i=h.A.qo[t.KI],t.IE++,i.delay&&t.EEi.delay[t.EE]&&(t.IE=0,t.EE++),t.EE>=i.Pl&&(t.IE=0,t.EE=0)),-1!==t.zu&&0===t.dI){for(i=h.A.qo[t.zu],t.uI++;i.delay&&t.fIi.delay[t.fI];)t.uI-=i.delay[t.fI],t.fI++;t.fI>=i.Pl&&(t.fI-=i.Fl,t.cI++,t.cI>=i.gE&&(t.zu=-1),(t.fI<0||t.fI>=i.Pl)&&(t.zu=-1)),t.$I=i._E}if(t.dI>0&&t.dI--,-1!==t.ed&&this.ii>=t.pI){for(t.mI<0&&(t.mI=0),i=l.A.qo[t.ed].oE,t.II++;i&&i.delay&&t.mIi.delay[t.mI];)t.II-=i.delay[t.mI],t.mI++;i&&t.mI>=i.Pl&&(t.mI<0||t.mI>=i.Pl)&&(t.ed=-1)}};WI=t=>{if(t.KI=t.Qa,0===t.pathLength)return void(t.AE=0);if(-1!==t.zu&&0===t.dI){if(!h.A.qo[t.zu].CE)return void t.AE++}const i=t.x,s=t.z,e=128*t.Pf[t.pathLength-1]+64*t.size,n=128*t.Ff[t.pathLength-1]+64*t.size;if(e-i<=256&&e-i>=-256&&n-s<=256&&n-s>=-256){t.pE=in?1792:1536:i>e?sn?256:512:s1024&&(h-=2048);let r=t.SI;h>=-256&&h<=256?r=t.LI:h>=256&&h<768?r=t.DI:h>=-768&&h<=-256&&(r=t.kI),-1===r&&(r=t.LI),t.KI=r;let o=4;t.qI!==t.pE&&-1===t.Zu&&(o=2),t.pathLength>2&&(o=6),t.pathLength>3&&(o=8),t.AE>0&&t.pathLength>1&&(o=8,t.AE--),t.TE[t.pathLength-1]&&(o<<=1),o>=8&&t.KI===t.LI&&-1!==t.OE&&(t.KI=t.OE),ie&&(t.x=e)):i>e&&(t.x-=o,t.xn&&(t.z=n)):s>n&&(t.z-=o,t.z{let t=3;if(this.Sn<310&&this.qr){let i=this.bn>>7,s=this.Rn>>7;const h=this.qr.x>>7,e=this.qr.z>>7;let n,r,o,l;if(this.ar&&4&this.ar[this.Qn][i][s]&&(t=this.Qn),n=h>i?h-i:i-h,r=e>s?e-s:s-e,n>r)for(o=65536*r/n|0,l=32768;i!==h;)ih&&i--,this.ar&&4&this.ar[this.Qn][i][s]&&(t=this.Qn),l+=o,l>=65536&&(l-=65536,se&&s--,this.ar&&4&this.ar[this.Qn][i][s]&&(t=this.Qn));else for(o=65536*n/r|0,l=32768;s!==e;)se&&s--,this.ar&&4&this.ar[this.Qn][i][s]&&(t=this.Qn),l+=o,l>=65536&&(l-=65536,ih&&i--,this.ar&&4&this.ar[this.Qn][i][s]&&(t=this.Qn))}return this.qr&&this.ar&&4&this.ar[this.Qn][this.qr.x>>7][this.qr.z>>7]&&(t=this.Qn),t};cu=()=>{if(!this.ar)return 0;return this.ou(this.Qn,this.bn,this.Rn)-this.Ln>=800||!(4&this.ar[this.Qn][this.bn>>7][this.Rn>>7])?3:this.Qn};ou=(t,i,s)=>{if(!this.lr)return 0;const h=Math.min(i>>7,G.A.dr-1),e=Math.min(s>>7,G.A.dr-1);let n=t;t<3&&this.ar&&!(2&~this.ar[1][h][e])&&(n=t+1);const r=127&i,o=127&s;return(this.lr[n][h][e]*(128-r)+this.lr[n][h+1][e]*r>>7)*(128-o)+(this.lr[n][h][e+1]*(128-r)+this.lr[n][h+1][e+1]*r>>7)*o>>7};ru=(t,i,s,h,e,n)=>{const r=2048-e&2047,o=2048-h&2047;let l,a,c,f=0,u=0,w=n;0!==r&&(l=d.A.sin[r],a=d.A.cos[r],c=u*a-n*l>>16,w=u*l+n*a>>16,u=c),0!==o&&(l=d.A.sin[o],a=d.A.cos[o],c=w*l+f*a>>16,w=w*a-f*l>>16,f=c),this.bn=t-f,this.Ln=i-u,this.Rn=s-w,this.Sn=e,this.Mn=h};Yf=()=>{if(!this.qr)return;const t=this.qr.x+this.An,i=this.qr.z+this.pn;(this.nr-t<-500||this.nr-t>500||this.rr-i<-500||this.rr-i>500)&&(this.nr=t,this.rr=i),this.nr!==t&&(this.nr+=(t-this.nr)/16|0),this.rr!==i&&(this.rr+=(i-this.rr)/16|0),1===this.Tf[1]?this.hr+=(-this.hr-24)/2|0:1===this.Tf[2]?this.hr+=(24-this.hr)/2|0:this.hr=this.hr/2|0,1===this.Tf[3]?this.er+=(12-this.er)/2|0:1===this.Tf[4]?this.er+=(-this.er-12)/2|0:this.er=this.er/2|0,this.sr=this.sr+this.hr/2&2047,this.ir+=this.er/2|0,this.ir<128&&(this.ir=128),this.ir>383&&(this.ir=383);const s=this.nr>>7,h=this.rr>>7,e=this.ou(this.Qn,this.nr,this.rr);let n=0;if(this.lr&&s>3&&h>3&&s<100&&h<100)for(let t=s-4;t<=s+4;t++)for(let i=h-4;i<=h+4;i++){let s=this.Qn;s<3&&this.ar&&!(2&~this.ar[1][t][i])&&s++;const h=e-this.lr[s][t][i];h>n&&(n=h)}let r=192*n;r>98048&&(r=98048),r<32768&&(r=32768),r>this.kn?this.kn+=(r-this.kn)/24|0:r{let t=128*this.gr+64,i=128*this._r+64,s=this.ou(this.Qn,this.gr,this._r)-this.Cr;this.bnt&&(this.bn=t)),this.bn>t&&(this.bn-=this.Tr+((this.bn-t)*this.Or/1e3|0),this.bns&&(this.Ln=s)),this.Ln>s&&(this.Ln-=this.Tr+((this.Ln-s)*this.Or/1e3|0),this.Lni&&(this.Rn=i)),this.Rn>i&&(this.Rn-=this.Tr+((this.Rn-i)*this.Or/1e3|0),this.Rn383&&(o=383),this.Sno&&(this.Sn=o)),this.Sn>o&&(this.Sn-=this.Ir+((this.Sn-o)*this.Er/1e3|0),this.Sn1024&&(a-=2048),a<-1024&&(a+=2048),a>0&&(this.Mn+=this.Ir+(a*this.Er/1e3|0),this.Mn&=2047),a<0&&(this.Mn-=this.Ir+(-a*this.Er/1e3|0),this.Mn&=2047);let c=l-this.Mn;c>1024&&(c-=2048),c<-1024&&(c+=2048),(c<0&&a>0||c>0&&a<0)&&(this.Mn=l)};jA=(t,i)=>{const s=t.gA;let n=this.Bn+(s>>4&7),r=this.Gn+(7&s);if(i===T.A.zA||i===T.A.XA){const s=t.gA,h=s>>2,e=3&s,o=P.A.of(h).hw;let l;if(l=i===T.A.XA?-1:t.ct,n>=0&&r>=0&&n>14&32767,h=31&t,e=t>>6}t=new U.A(this.Qn,o,n,r,0,F.A.jd,P.A.Xd.id,s,e,h),this.Vr.vE(t)}t&&(t.wm=l,t.shape=h,t.angle=e),this.sA(this.Qn,n,r,l,e,h,o)}}else if(i===T.A.KA){const i=t.gA>>2,s=P.A.of(i).hw,e=t.ct;if(n>=0&&r>=0&&n>14&32767,this.Qn,s,n,r,h.A.qo[e],!1);this.Gr.vE(i)}}}else if(i===T.A.VA){const i=t.ct,s=t.ct;if(n>=0&&r>=0&&n=0&&r>=0&&n=0&&r>=0&&n=0&&s>=0&&i=0&&r>=0&&n=0&&r>=0&&n>2,h=3&i,o=P.A.of(s).hw,l=t.ct,a=t.ct,c=t.ct,f=t.ct;let u,d=t.IA,w=t.IA,y=t.IA,A=t.IA;if(u=f===this.Qr?this.qr:this.vr[f],u&&this.lr){const t=new B.A(this.Qn,o,n,r,-1,h,s,a+this.ii);this.Hr.vE(t);const i=new B.A(this.Qn,o,n,r,l,h,s,c+this.ii);this.Hr.vE(i);const f=this.lr[this.Qn][n][r],p=this.lr[this.Qn][n+1][r],m=this.lr[this.Qn][n+1][r+1],I=this.lr[this.Qn][n][r+1],E=e.A.get(l);u.zI=a+this.ii,u.jI=c+this.ii,u.XI=E.Ma(s,h,f,p,m,I,-1);let g,_=E.width,C=E.length;h!==F.A.Zd&&h!==F.A.$d||(_=E.length,C=E.width),u.bE=128*n+64*_,u.LE=128*r+64*C,u.RE=this.ou(this.Qn,u.bE,u.LE),d>y&&(g=d,d=y,y=g),w>A&&(g=w,w=A,A=g),u.QI=n+d,u.iE=n+y,u.tE=r+w,u.sE=r+A}}else if(i===T.A.UA){const i=t.ct,s=t.ct,h=t.ct;if(n>=0&&r>=0&&n{if(!$.K.Tt){if(d.A.SE[17]>=t){const t=d.A.ME[17];if(!t)return;const i=t.width*t.height-1,s=t.width*this.cn*2,h=t.Rc,e=this.qn;for(let t=0;t<=i;t++)e[t]=h[t-s&i];t.Rc=e,this.qn=h,d.A.kE(17)}if(d.A.SE[24]>=t){const t=d.A.ME[24];if(!t)return;const i=t.width*t.height-1,s=t.width*this.cn*2,h=t.Rc,e=this.qn;for(let t=0;t<=i;t++)e[t]=h[t-s&i];t.Rc=e,this.qn=h,d.A.kE(24)}}};Wc=()=>{if(!(this.Wi&&this.Yi&&this.Hi&&this.ji))return;for(let t=10;t<117;t++){(100*Math.random()|0)<50&&(this.Wi[t+32512]=255)}for(let t=0;t<100;t++){const t=2+(124*Math.random()|0)+(128+(128*Math.random()|0)<<7);this.Wi[t]=192}for(let t=1;t<255;t++)for(let i=1;i<127;i++){const s=i+(t<<7);this.Yi[s]=(this.Wi[s-1]+this.Wi[s+1]+this.Wi[s-128]+this.Wi[s+128])/4|0}this.Zi+=128,this.Zi>this.Hi.length&&(this.Zi-=this.Hi.length,this.Kc(this.Pi[12*Math.random()|0]));for(let t=1;t<255;t++)for(let i=1;i<127;i++){const s=i+(t<<7);let h=this.Yi[s+128]-(this.Hi[s+this.Zi&this.Hi.length-1]/5|0);h<0&&(h=0),this.Wi[s]=h}for(let t=0;t<255;t++)this.ji[t]=this.ji[t+1];if(this.ji[255]=16*Math.sin(this.ii/14)+14*Math.sin(this.ii/15)+12*Math.sin(this.ii/16)|0,this.qi>0&&(this.qi-=4),this.$i>0&&(this.$i-=4),0===this.qi&&0===this.$i){const t=2e3*Math.random()|0;0===t?this.qi=1024:1===t&&(this.$i=1024)}};xE=(t,i,s)=>{const h=256-i;return((16711935&t)*h+(16711935&s)*i&4278255360)+((65280&t)*h+(65280&s)*i&16711680)>>8};Yc=()=>{if(!(this.Vi&&this.Ki&&this.Xi&&this.zi&&this.ji&&this.Wi))return;const t=256;if(this.qi>0)for(let t=0;t<256;t++)this.qi>768?this.Vi[t]=this.xE(this.Ki[t],1024-this.qi,this.Xi[t]):this.qi>256?this.Vi[t]=this.Xi[t]:this.Vi[t]=this.xE(this.Xi[t],256-this.qi,this.Ki[t]);else if(this.$i>0)for(let t=0;t<256;t++)this.$i>768?this.Vi[t]=this.xE(this.Ki[t],1024-this.$i,this.zi[t]):this.$i>256?this.Vi[t]=this.zi[t]:this.Vi[t]=this.xE(this.zi[t],256-this.$i,this.Ki[t]);else for(let t=0;t<256;t++)this.Vi[t]=this.Ki[t];for(let t=0;t<33920;t++)this._i&&this.Ui&&(this._i.Rc[t]=this.Ui.Rc[t]);let i=0,s=1152;for(let h=1;h<255;h++){let e=(this.ji[h]*(t-h)/t|0)+22;e<0&&(e=0),i+=e;for(let t=e;t<128;t++){let t=this.Wi[i++];if(0===t)s++;else{const i=t,h=256-t;if(t=this.Vi[t],this._i){const e=this._i.Rc[s];this._i.Rc[s++]=((16711935&t)*i+(16711935&e)*h&4278255360)+((65280&t)*i+(65280&e)*h&16711680)>>8}}}s+=e}this._i?.draw(0,0);for(let t=0;t<33920;t++)this.Ci&&this.Bi&&(this.Ci.Rc[t]=this.Bi.Rc[t]);i=0,s=1176;for(let h=1;h<255;h++){const e=this.ji[h]*(t-h)/t|0,n=103-e;s+=e;for(let t=0;t>8}}}i+=128-n,s+=128-n-e}this.Ci?.draw(661,0)}}console.log(`RS2 user client - release #${$.K._t}`),await(0,it.w)(),(new t).run().then((()=>{})),i()}catch(t){i(t)}}),1)},8370:(t,i,s)=>{s.d(i,{A:()=>c});var h=s(1183),e=s(4583),n=s(9234);const r=['F11','F12'],o={'Backspace':{code:8,ch:8},'Enter':{code:10,ch:10},'Shift':{code:16,ch:65535},'Escape':{code:27,ch:27},'Tab':{code:9,ch:9},'CapsLock':{code:20,ch:65535},' ':{code:32,ch:32},'Control':{code:17,ch:65535},'Alt':{code:18,ch:65535},'Meta':{code:524,ch:65535},'ArrowLeft':{code:37,ch:65535},'ArrowRight':{code:39,ch:65535},'ArrowUp':{code:38,ch:65535},'ArrowDown':{code:40,ch:65535},'Insert':{code:155,ch:65535},'Home':{code:36,ch:65535},'PageUp':{code:33,ch:65535},'Delete':{code:127,ch:127},'End':{code:35,ch:65535},'PageDown':{code:34,ch:65535},'`':{code:192,ch:96},'~':{code:192,ch:126},'!':{code:49,ch:33},'@':{code:50,ch:64},'#':{code:51,ch:35},'$':{code:52,ch:36},'%':{code:53,ch:37},'^':{code:54,ch:94},'&':{code:55,ch:38},'*':{code:56,ch:42},'(':{code:57,ch:40},')':{code:48,ch:41},'-':{code:45,ch:45},'_':{code:45,ch:95},'=':{code:61,ch:61},'+':{code:61,ch:43},'[':{code:91,ch:91},'{':{code:91,ch:123},']':{code:93,ch:93},'}':{code:93,ch:125},'\\':{code:92,ch:92},'|':{code:92,ch:124},';':{code:59,ch:59},':':{code:59,ch:58},"'":{code:222,ch:39},'"':{code:222,ch:34},',':{code:44,ch:44},'<':{code:44,ch:60},'.':{code:46,ch:46},'>':{code:46,ch:62},'/':{code:47,ch:47},'?':{code:47,ch:63},'F1':{code:112,ch:65535},'F2':{code:113,ch:65535},'F3':{code:114,ch:65535},'F4':{code:115,ch:65535},'F5':{code:116,ch:65535},'F6':{code:117,ch:65535},'F7':{code:118,ch:65535},'F8':{code:119,ch:65535},'F9':{code:120,ch:65535},'F10':{code:121,ch:65535},'F11':{code:122,ch:65535},'F12':{code:123,ch:65535},0:{code:48,ch:48},1:{code:49,ch:49},2:{code:50,ch:50},3:{code:51,ch:51},4:{code:52,ch:52},5:{code:53,ch:53},6:{code:54,ch:54},7:{code:55,ch:55},8:{code:56,ch:56},9:{code:57,ch:57},'a':{code:65,ch:97},'b':{code:66,ch:98},'c':{code:67,ch:99},'d':{code:68,ch:100},'e':{code:69,ch:101},'f':{code:70,ch:102},'g':{code:71,ch:103},'h':{code:72,ch:104},'i':{code:73,ch:105},'j':{code:74,ch:106},'k':{code:75,ch:107},'l':{code:76,ch:108},'m':{code:77,ch:109},'n':{code:78,ch:110},'o':{code:79,ch:111},'p':{code:80,ch:112},'q':{code:81,ch:113},'r':{code:82,ch:114},'s':{code:83,ch:115},'t':{code:84,ch:116},'u':{code:85,ch:117},'v':{code:86,ch:118},'w':{code:87,ch:119},'x':{code:88,ch:120},'y':{code:89,ch:121},'z':{code:90,ch:122},'A':{code:65,ch:65},'B':{code:66,ch:66},'C':{code:67,ch:67},'D':{code:68,ch:68},'E':{code:69,ch:69},'F':{code:70,ch:70},'G':{code:71,ch:71},'H':{code:72,ch:72},'I':{code:73,ch:73},'J':{code:74,ch:74},'K':{code:75,ch:75},'L':{code:76,ch:76},'M':{code:77,ch:77},'N':{code:78,ch:78},'O':{code:79,ch:79},'P':{code:80,ch:80},'Q':{code:81,ch:81},'R':{code:82,ch:82},'S':{code:83,ch:83},'T':{code:84,ch:84},'U':{code:85,ch:85},'V':{code:86,ch:86},'W':{code:87,ch:87},'X':{code:88,ch:88},'Y':{code:89,ch:89},'Z':{code:90,ch:90}};var l=s(2595),a=s(7854);class c{static getParameter(t){return new URLSearchParams(window.location.search).get(t)??''}static setParameter(t,i){const s=new URL(window.location.toString());s.searchParams.set(t,i),window.history.pushState(null,'',s.toString())}yd=0;DE=[];NE=0;Jo=null;state=0;dd=20;PE=1;FE=[];ud=0;UE=0;BE=[];GE=!0;HE=!1;WE=50;hasFocus=!0;xc=!1;uf=0;vf=0;sa=0;ha=0;$c=0;Jc=0;Qc=0;Tf=[];YE=[];VE=0;KE=0;input=null;XE=!1;zE=!1;jE=!1;time=-1;ZE=0;qE=0;$E=0;JE=0;QE=0;tg=0;constructor(t=!1){a.ig.tabIndex=-1,a.pl.fillStyle='black',a.pl.fillRect(0,0,a.ig.width,a.ig.height),this.HE=t,this.HE?this.resize(window.innerWidth,window.innerHeight):this.resize(a.ig.width,a.ig.height)}get width(){return a.ig.width}get height(){return a.ig.height}resize=(t,i)=>{a.ig.width=t,a.ig.height=i,this.Jo=new h.A(t,i),e.A.sg()};run=async()=>{a.ig.addEventListener('resize',(()=>{this.HE&&this.resize(window.innerWidth,window.innerHeight)}),!1),a.ig.onmousedown=this.onmousedown,a.ig.onmouseup=this.onmouseup,a.ig.onmouseenter=this.onmouseenter,a.ig.onmouseleave=this.onmouseleave,a.ig.onmousemove=this.onmousemove,window.onbeforeunload=this.zo,a.ig.onfocus=this.onfocus,a.ig.onblur=this.onblur,this.hg?(a.ig.ontouchstart=this.ontouchstart,a.ig.ontouchend=this.ontouchend,a.ig.ontouchmove=this.ontouchmove):(a.ig.onkeydown=this.onkeydown,a.ig.onkeyup=this.onkeyup),a.ig.oncontextmenu=t=>{t.preventDefault()},window.oncontextmenu=t=>{t.preventDefault()},this.hg&&'low'===c.getParameter('detail')&&(this.WE=30),await this.cl(0,'Loading...'),await this.load();for(let t=0;t<10;t++)this.FE[t]=performance.now();let t,i=0,s=256,h=1,e=0;for(;this.state>=0;){if(this.state>0&&(this.state--,0===this.state))return void this.eg();const r=s,o=h;s=300,h=1,t=performance.now();const l=this.FE[i];if(0===l?(s=r,h=o):t>l&&(s=2560*this.dd/(t-l)|0),s<25?s=25:s>256&&(s=256,h=this.dd-(t-l)/10|0),this.FE[i]=t,i=(i+1)%10,h>1)for(let t=0;t<10;t++)0!==this.FE[t]&&(this.FE[t]+=h);for(h0&&(this.ud=1e3*s/(256*this.dd)|0);const a=performance.now();if(this.GE&&this.refresh(),await this.draw(),this.BE[this.UE]=(performance.now()-a)/1e3,this.UE=(this.UE+1)%this.BE.length,this.WE<50){const i=1e3/this.WE-(performance.now()-t);i>0&&await(0,n.ul)(i)}}-1===this.state&&this.eg()};eg=()=>{this.state=-2,this.zo()};ml=t=>{this.dd=1e3/t|0};Yy=t=>{this.WE=Math.max(Math.min(50,0|t),0)};start=()=>{this.state>=0&&(this.state=0)};stop=()=>{this.state>=0&&(this.state=4e3/this.dd|0)};destroy=()=>{this.state=-1};load=async()=>{};update=async()=>{};zo=()=>{};draw=async()=>{};refresh=()=>{};async cl(t,i){const s=this.width,h=this.height;this.GE&&(a.pl.fillStyle='black',a.pl.fillRect(0,0,s,h),this.GE=!1);const e=h/2-18;a.pl.fillStyle='rgb(140, 17, 17)',a.pl.rect((s/2|0)-152,e,304,34),a.pl.fillRect((s/2|0)-150,e+2,3*t,30),a.pl.fillStyle='black',a.pl.fillRect((s/2|0)-150+3*t,e+2,300-3*t,30),a.pl.font='bold 13px helvetica, sans-serif',a.pl.textAlign='center',a.pl.fillStyle='white',a.pl.fillText(i,s/2|0,e+22),await(0,n.ul)(5)}if=()=>{let t=-1;return this.KE!==this.VE&&(t=this.YE[this.VE],this.VE=this.VE+1&127),t};get ms(){const t=this.BE.length;let i=0;for(let s=0;sthis.yd&&(this.yd=s),this.DE[this.NE]=s,this.NE=(this.NE+1)%250,s}get wd(){return this.DE.reduce(((t,i)=>t+i),0)/250}onkeydown=t=>{const i=t.key;this.uf=0;const s=o[i];if(!s||0===t.code.length&&!t.isTrusted)return void console.warn(`Unhandled key: ${i}`);const h=s.code;let e=s.ch;t.ctrlKey&&(e>='A'.charCodeAt(0)&&e<=']'.charCodeAt(0)||e=='_'.charCodeAt(0)?e-='A'.charCodeAt(0)-1:e>='a'.charCodeAt(0)&&e<='z'.charCodeAt(0)&&(e-='a'.charCodeAt(0)-1)),e<30&&(e=0),h===o.ArrowLeft.code?e=1:h===o.ArrowRight.code?e=2:h===o.ArrowUp.code?e=3:h===o.ArrowDown.code?e=4:h===o.Control.code?e=5:h===o.Shift.code?e=6:h===o.Alt.code?e=7:h===o.Backspace.code||h===o.Delete.code?e=8:h===o.Tab.code?e=9:h===o.Enter.code?e=10:h>=o.F1.code&&h<=o.F12.code?e=h+1008-o.F1.code:h===o.Home.code?e=1e3:h===o.End.code?e=1001:h===o.PageUp.code?e=1002:h===o.PageDown.code&&(e=1003),e>0&&e<128&&(this.Tf[e]=1),e>4&&(this.YE[this.KE]=e,this.KE=this.KE+1&127),l.A.enabled&&l.A.ng(e),r.includes(i)||t.preventDefault()};onkeyup=t=>{const i=t.key;this.uf=0;const s=o[i];if(!s||0===t.code.length&&!t.isTrusted)return void console.warn(`Unhandled key: ${i}`);const h=s.code;let e=s.ch;e<30&&(e=0),h===o.ArrowLeft.code?e=1:h===o.ArrowRight.code?e=2:h===o.ArrowUp.code?e=3:h===o.ArrowDown.code?e=4:h===o.Control.code?e=5:h===o.Shift.code?e=6:h===o.Alt.code?e=7:h===o.Backspace.code||h===o.Delete.code?e=8:h===o.Tab.code?e=9:h===o.Enter.code?e=10:h>=o.F1.code&&h<=o.F12.code?e=h+1008-o.F1.code:h===o.Home.code?e=1e3:h===o.End.code?e=1001:h===o.PageUp.code?e=1002:h===o.PageDown.code&&(e=1003),e>0&&e<128&&(this.Tf[e]=0),l.A.enabled&&l.A.rg(e),r.includes(i)||t.preventDefault()};onmousedown=t=>{if(this.XE=!1,(t.clientX>0||t.clientY>0)&&this.og(t),this.uf=0,this.Jc=this.sa,this.Qc=this.ha,this.hg&&!this.lg){if(this.ag()||this.cg()||this.fg())return this.$c=1,void(this.vf=1);t.timeStamp>=this.time+500?(this.$c=2,this.vf=2):(this.$c=1,this.vf=1)}else 2===t.button?(this.$c=2,this.vf=2):(this.$c=1,this.vf=1);l.A.enabled&&l.A.ug(this.Jc,this.Qc,t.buttons)};onmouseup=t=>{this.og(t),this.uf=0,this.vf=0,l.A.enabled&&l.A.dg(t.buttons)};onmouseenter=t=>{this.og(t),l.A.enabled&&l.A.wg()};onmouseleave=t=>{this.og(t),this.uf=0,this.sa=-1,this.ha=-1,this.vf=0,this.Jc=-1,this.Qc=-1,l.A.enabled&&l.A.yg()};onmousemove=t=>{this.og(t),this.uf=0,l.A.enabled&&l.A.Ag(this.sa,this.ha)};onfocus=t=>{this.hasFocus=!0,this.GE=!0,this.refresh(),l.A.enabled&&l.A.pg()};onblur=t=>{this.hasFocus=!1,l.A.enabled&&l.A.mg()};ontouchstart=t=>{if(!this.hg)return;null!==this.input&&(this.input.parentNode?.removeChild(this.input),this.input=null),this.XE=!0;const i=t.changedTouches[0],s=0|i.clientX,h=0|i.clientY;this.onmousemove(new MouseEvent('mousemove',{clientX:s,clientY:h})),this.ZE=this.QE=this.$E=0|i.screenX,this.qE=this.tg=this.JE=0|i.screenY,this.time=t.timeStamp,this.zE=this.Ig(),this.jE=this.Eg()};ontouchend=t=>{if(!this.hg||!this.XE)return;const i=t.changedTouches[0],s=0|i.clientX,h=0|i.clientY;if(this.onmousemove(new MouseEvent('mousemove',{clientX:s,clientY:h})),this.QE=0|i.screenX,this.tg=0|i.screenY,this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowLeft',code:'ArrowLeft'})),this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowUp',code:'ArrowUp'})),this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowRight',code:'ArrowRight'})),this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowDown',code:'ArrowDown'})),this.zE&&!this.Ig())return void(this.XE=!1);if(this.jE&&!this.Eg())return void(this.XE=!1);if(this.ag()||this.gg()||this.cg()||this.fg()){null!==this.input&&(this.input.parentNode?.contains(this.input)&&this.input.parentNode?.removeChild(this.input),this.input=null);const t=document.createElement('input');return this.cg()?(t.setAttribute('id','username'),t.setAttribute('placeholder','Username')):this.fg()?(t.setAttribute('id','password'),t.setAttribute('placeholder','Password')):this.ag()?(t.setAttribute('id','chatinput'),t.setAttribute('placeholder','Chatinput')):this.gg()&&(t.setAttribute('id','chatpopup'),t.setAttribute('placeholder','Chatpopup')),this._g?t.setAttribute('type','password'):t.setAttribute('type',this.fg()?'password':'text'),t.setAttribute('autofocus','autofocus'),t.setAttribute('spellcheck','false'),t.setAttribute('autocomplete','off'),t.setAttribute('style',`position: fixed; left: ${s}px; top: ${h}px; width: 1px; height: 1px; opacity: 0;`),document.body.appendChild(t),t.focus(),t.click(),this._g&&(t.oninput=t=>{if(!(t instanceof InputEvent))return;const i=t,s=i.data;null!==s&&'insertText'===i.inputType&&this.onkeydown(new KeyboardEvent('keydown',{key:s,code:s}))}),t.onkeydown=t=>{this._g&&'Enter'!==t.key&&'Backspace'!==t.key||this.onkeydown(new KeyboardEvent('keydown',{key:t.key,code:t.key}))},t.onkeyup=t=>{this._g&&'Enter'!==t.key&&'Backspace'!==t.key||this.onkeyup(new KeyboardEvent('keyup',{key:t.key,code:t.key}))},t.onfocus=t=>{this.input?.parentNode?.removeChild(this.input),this.input=null,this.onfocus(t)},this.input=t,void(this.XE=!1)}const e=t.timeStamp>=this.time+500,n=Math.abs(this.ZE-this.QE)>16||Math.abs(this.qE-this.tg)>16;e&&!n?(this.XE=!0,this.onmousedown(new MouseEvent('mousedown',{buttons:2}))):(this.vf=0,this.XE=!1)};ontouchmove=t=>{if(!this.hg||!this.XE)return;const i=t.changedTouches[0],s=0|i.clientX,h=0|i.clientY;this.onmousemove(new MouseEvent('mousemove',{clientX:s,clientY:h})),this.QE=0|i.screenX,this.tg=0|i.screenY,this.zE&&-1===this.hl()?(this.$E-this.QE>0?this.rotate(2):this.$E-this.QE<0&&this.rotate(0),this.JE-this.tg>0?this.rotate(3):this.JE-this.tg<0&&this.rotate(1)):(this.jE||-1!==this.hl())&&this.onmousedown(new MouseEvent('mousedown',{buttons:1})),this.$E=this.QE,this.JE=this.tg};get hg(){return['Android','webOS','iPhone','iPad','iPod','BlackBerry','Windows Phone'].some((t=>navigator.userAgent.includes(t)))}get _g(){return['Android'].some((t=>navigator.userAgent.includes(t)))}get lg(){return['Capacitor'].some((t=>navigator.userAgent.includes(t)))}Ig=()=>this.xc&&this.sa>=8&&this.sa<=520&&this.ha>=11&&this.ha<=345;ag=()=>this.xc&&-1===this.sl()&&!this.tl()&&!this.il()&&this.sa>=11&&this.sa<=506&&this.ha>=449&&this.ha<=482;gg=()=>this.xc&&(this.tl()||this.il())&&this.sa>=11&&this.sa<=506&&this.ha>=383&&this.ha<=482;Eg=()=>this.xc&&this.sa>=562&&this.sa<=752&&this.ha>=231&&this.ha<=492;cg=()=>!this.xc&&2===this.Qo()&&this.sa>=301&&this.sa<=562&&this.ha>=262&&this.ha<=279;fg=()=>!this.xc&&2===this.Qo()&&this.sa>=301&&this.sa<=562&&this.ha>=279&&this.ha<=296;rotate=t=>{0===t?(this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowRight',code:'ArrowRight'})),this.onkeydown(new KeyboardEvent('keydown',{key:'ArrowLeft',code:'ArrowLeft'}))):1===t?(this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowDown',code:'ArrowDown'})),this.onkeydown(new KeyboardEvent('keydown',{key:'ArrowUp',code:'ArrowUp'}))):2===t?(this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowLeft',code:'ArrowLeft'})),this.onkeydown(new KeyboardEvent('keydown',{key:'ArrowRight',code:'ArrowRight'}))):3===t&&(this.onkeyup(new KeyboardEvent('keyup',{key:'ArrowUp',code:'ArrowUp'})),this.onkeydown(new KeyboardEvent('keydown',{key:'ArrowDown',code:'ArrowDown'})))};Cg=()=>null!==document.fullscreenElement;og=t=>{if(this.Cg()){const i=t.target.getBoundingClientRect(),s=window.innerHeight/a.ig.height,h=(window.innerWidth-a.ig.width*s)/2;this.sa=0|this.Tg(t.clientX-i.left-h,0,a.ig.width*s,0,789),this.ha=0|this.Tg(t.clientY-i.top,0,a.ig.height*s,0,532)}else{const i=a.ig.getBoundingClientRect(),s=a.ig.width/i.width,h=a.ig.height/i.height;this.sa=(t.clientX-i.left)*s|0,this.ha=(t.clientY-i.top)*h|0}this.sa<0&&(this.sa=0),this.ha<0&&(this.ha=0),this.sa>789&&(this.sa=789),this.ha>532&&(this.ha=532)};Tg=(t,i,s,h,e)=>(t-i)*(e-h)/(s-i)+h}},2595:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1069);class e{static enabled=!1;static Og=null;static vg=null;static bg=0;static Lg=0;static Rg=0;static Sg=0;static Mg=0;static ep=()=>{this.Og=h.A.hi(1),this.vg=null,this.bg=performance.now(),this.enabled=!0};static ff=()=>{this.enabled=!1,this.Og=null};static flush=()=>{let t=null;return this.vg&&this.enabled&&(t=this.vg),this.vg=null,t};static stop=()=>{let t=null;return this.Og&&this.Og.ft>0&&this.enabled&&(t=this.Og),this.ff(),t};static ug=(t,i,s)=>{if(!(this.enabled&&t>=0&&t<789&&i>=0&&i<532))return;this.Lg++;const h=performance.now();let e=(h-this.bg)/10|0;e>250&&(e=250),this.bg=h,this.kg(5),1===s?this.Og?.p1(1):this.Og?.p1(2),this.Og?.p1(e),this.Og?.p3(t+(i<<10))};static dg=t=>{if(!this.enabled)return;this.Lg++;const i=performance.now();let s=(i-this.bg)/10|0;s>250&&(s=250),this.bg=i,this.kg(2),1===t?this.Og?.p1(3):this.Og?.p1(4),this.Og?.p1(s)};static Ag=(t,i)=>{if(!(this.enabled&&t>=0&&t<789&&i>=0&&i<532))return;const s=performance.now();if(s-this.Rg>=50){this.Rg=s,this.Lg++;let h=(s-this.bg)/10|0;h>250&&(h=250),this.bg=s,t-this.Sg<8&&t-this.Sg>=-8&&i-this.Mg<8&&i-this.Mg>=-8?(this.kg(3),this.Og?.p1(5),this.Og?.p1(h),this.Og?.p1(t+(i-this.Mg+8<<4)+8-this.Sg)):t-this.Sg<128&&t-this.Sg>=-128&&i-this.Mg<128&&i-this.Mg>=-128?(this.kg(4),this.Og?.p1(6),this.Og?.p1(h),this.Og?.p1(t+128-this.Sg),this.Og?.p1(i+128-this.Mg)):(this.kg(5),this.Og?.p1(7),this.Og?.p1(h),this.Og?.p3(t+(i<<10))),this.Sg=t,this.Mg=i}};static ng=t=>{if(!this.enabled)return;this.Lg++;const i=performance.now();let s=(i-this.bg)/10|0;s>250&&(s=250),this.bg=i,1e3===t?t=11:1001===t?t=12:1002===t?t=14:1003===t?t=15:t>=1008&&(t-=992),this.kg(3),this.Og?.p1(8),this.Og?.p1(s),this.Og?.p1(t)};static rg=t=>{if(!this.enabled)return;this.Lg++;const i=performance.now();let s=(i-this.bg)/10|0;s>250&&(s=250),this.bg=i,1e3===t?t=11:1001===t?t=12:1002===t?t=14:1003===t?t=15:t>=1008&&(t-=992),this.kg(3),this.Og?.p1(9),this.Og?.p1(s),this.Og?.p1(t)};static pg=()=>{if(!this.enabled)return;this.Lg++;const t=performance.now();let i=(t-this.bg)/10|0;i>250&&(i=250),this.bg=t,this.kg(2),this.Og?.p1(10),this.Og?.p1(i)};static mg=()=>{if(!this.enabled)return;this.Lg++;const t=performance.now();let i=(t-this.bg)/10|0;i>250&&(i=250),this.bg=t,this.kg(2),this.Og?.p1(11),this.Og?.p1(i)};static wg=()=>{if(!this.enabled)return;this.Lg++;const t=performance.now();let i=(t-this.bg)/10|0;i>250&&(i=250),this.bg=t,this.kg(2),this.Og?.p1(12),this.Og?.p1(i)};static yg=()=>{if(!this.enabled)return;this.Lg++;const t=performance.now();let i=(t-this.bg)/10|0;i>250&&(i=250),this.bg=t,this.kg(2),this.Og?.p1(13),this.Og?.p1(i)};static kg=t=>{if(this.Og&&this.Og.ft+t>=500){const t=this.Og;this.Og=h.A.hi(1),this.vg=t}}}},1120:(t,i,s)=>{s.d(i,{A:()=>c});var h=s(1069),e=s(8665),n=s(2031),r=s(1122),o=s(3819),l=s(3867),a=s(8950);class c{static qo=[];static xg=null;static $o=null;static Xl=0;static Dg=1;static jl=2;static fa=3;static da=4;static Ta=5;static ba=6;static Na=7;static bm=1;static Sm=2;static Mm=3;static km=4;static xm=5;static ma=6;static Ua=1;static Ba=100;static Ga=101;static Ha=200;static my=201;static Iy=202;static Wa=203;static Ey=205;static Cy=300;static Ng=301;static Pg=302;static Fg=303;static Ug=304;static Bg=305;static Gg=306;static Hg=307;static Wg=308;static Yg=309;static Vg=310;static Kg=311;static Xg=312;static Ty=313;static Oy=314;static zg=315;static jg=316;static Zg=317;static qg=318;static $g=319;static Jg=320;static Qg=321;static t_=322;static vy=323;static hc=324;static ec=325;static by=326;static ja=327;static Ya=401;static Va=500;static gy=501;static _y=502;static za=503;static nc=600;static Ry=601;static i_=602;static s_=603;static h_=604;static e_=605;static n_=606;static r_=607;static o_=608;static l_=609;static a_=610;static c_=611;static Sy=612;static rc=613;static oc=650;static cc=651;static fc=652;static uc=653;static dc=654;static lc=655;static Lc=(t,i,s)=>{this.xg=new n.A(5e4),this.$o=new n.A(5e4);const e=new h.A(t.read('data'));let r=-1;for(e.ft+=2;e.ft0){h.El=new Uint8Array(n),h._l=new Uint16Array(n);for(let t=0;t0){h.scripts=new l.xs(o,null);for(let t=0;t0){const e=s.lastIndexOf(',');h.ca[t]=this.f_(i,s.substring(0,e),parseInt(s.substring(e+1),10))}}h.vm=new l.xs(5,null);for(let t=0;t<5;t++){const i=e.xA;h.vm[t]=i,0===i.length&&(h.vm[t]=null)}}if(h.type===c.fa&&(h.fill=1===e.gA),h.type===c.da||h.type===c.Dg){h.Ea=1===e.gA;const t=e.gA;s&&(h.font=s[t]),h._a=1===e.gA}if(h.type===c.da&&(h.text=e.xA,h.Aa=e.xA),h.type!==c.Dg&&h.type!==c.fa&&h.type!==c.da||(h.ua=e.ut),h.type!==c.fa&&h.type!==c.da||(h.ya=e.ut,h.wa=e.ut),h.type===c.Ta){const t=e.xA;if(t.length>0){const s=t.lastIndexOf(',');h.va=this.f_(i,t.substring(0,s),parseInt(t.substring(s+1),10))}const s=e.xA;if(s.length>0){const t=s.lastIndexOf(',');h.Oa=this.f_(i,s.substring(0,t),parseInt(s.substring(t+1),10))}}if(h.type===c.ba){const t=e.gA;0!==t&&(h.model=this.Ma((t-1<<8)+e.gA));const i=e.gA;0!==i&&(h.u_=this.Ma((i-1<<8)+e.gA)),h.kl=e.gA,0===h.kl?h.kl=-1:h.kl=(h.kl-1<<8)+e.gA,h.xl=e.gA,0===h.xl?h.xl=-1:h.xl=(h.xl-1<<8)+e.gA,h.zoom=e.ct,h.Sa=e.ct,h.Da=e.ct}if(h.type===c.Na){h.$l=new Int32Array(h.width*h.height),h.Jl=new Int32Array(h.width*h.height),h.Ea=1===e.gA;const t=e.gA;s&&(h.font=s[t]),h._a=1===e.gA,h.ua=e.ut,h.Ql=e.gp,h.ta=e.gp,h.Cm=1===e.gA,h.vm=new l.xs(5,null);for(let t=0;t<5;t++){const i=e.xA;h.vm[t]=i,0===i.length&&(h.vm[t]=null)}}h.pa!==c.Sm&&h.type!==c.jl||(h.Yw=e.xA,h.action=e.xA,h.Ww=e.ct),h.pa!==c.bm&&h.pa!==c.km&&h.pa!==c.xm&&h.pa!==c.ma||(h.Rm=e.xA,0===h.Rm.length&&(h.pa===c.bm?h.Rm='Ok':h.pa===c.km||h.pa===c.xm?h.Rm='Select':h.pa===c.ma&&(h.Rm='Continue')))}this.xg=null,this.$o=null};static f_=(t,i,s)=>{const h=o.A.d_(i)<<8n|BigInt(s);if(this.xg){const t=this.xg.get(h);if(t)return t}let e;try{e=r.A.Ac(t,i,s),this.xg?.put(h,e)}catch(t){return null}return e};static Ma=t=>{if(this.$o){const i=this.$o.get(BigInt(t));if(i)return i}const i=e.A.model(t);return this.$o?.put(BigInt(t),i),i};id=-1;hw=-1;type=-1;pa=-1;Vl=0;width=0;height=0;_m=-1;El=null;_l=null;scripts=null;scroll=0;hide=!1;draggable=!1;Cm=!1;Om=!1;Ql=0;ta=0;Zl=null;ql=null;ca=null;vm=null;fill=!1;Ea=!1;font=null;_a=!1;text=null;Aa=null;ua=0;ya=0;wa=0;va=null;Oa=null;model=null;u_=null;kl=-1;xl=-1;zoom=0;Sa=0;Da=0;Yw=null;action=null;Ww=-1;Rm=null;Ml=null;Gl=null;Hl=null;x=0;y=0;zl=0;$l=null;Jl=null;Nl=0;Dl=0;Ma(t,i,s){let h=this.model;if(s&&(h=this.u_),!h)return null;if(-1===t&&-1===i&&!h.w_)return h;const n=e.A.y_(h,!0,!0,!1);return-1===t&&-1===i||n.tc(),-1!==t&&n.ic(t),-1!==i&&n.ic(i),n.sc(64,768,-50,-10,-50,!0),n}A_(){if(this.hw===this.id)return this.x;let t=c.qo[this.hw];if(!t.Ml||!t.Gl||!t.Hl)return this.x;let i=t.Ml.indexOf(this.id);if(-1===i)return this.x;let s=t.Gl[i];for(;t.hw!==t.id;){const h=c.qo[t.hw];h.Ml&&h.Gl&&h.Hl&&(i=h.Ml.indexOf(t.id),-1!==i&&(s+=h.Gl[i])),t=h}return s}p_(){if(this.hw===this.id)return this.y;let t=c.qo[this.hw];if(!t.Ml||!t.Gl||!t.Hl)return this.y;let i=t.Ml.indexOf(this.id);if(-1===i)return this.y;let s=t.Hl[i];for(;t.hw!==t.id;){const h=c.qo[t.hw];h.Ml&&h.Gl&&h.Hl&&(i=h.Ml.indexOf(t.id),-1!==i&&(s+=h.Hl[i])),t=h}return s}outline(t){const i=this.A_(),s=this.p_();a.A.Wl(i,s,this.width,this.height,t)}move(t,i){if(this.hw===this.id)return;this.x=0,this.y=0;const s=c.qo[this.hw];if(s.Ml&&s.Gl&&s.Hl){const h=s.Ml.indexOf(this.id);-1!==h&&(s.Gl[h]=t,s.Hl[h]=i)}}delete(){if(this.hw===this.id)return;const t=c.qo[this.hw];if(t.Ml&&t.Gl&&t.Hl){const i=t.Ml.indexOf(this.id);-1!==i&&(t.Ml.splice(i,1),t.Gl.splice(i,1),t.Hl.splice(i,1))}}}},6333:(t,i,s)=>{s.d(i,{$:()=>h});class h{id;m_=null;constructor(t){this.id=t}I_(t){for(;;){const i=t.gA;if(0===i)break;this.decode(i,t)}return this}}},2164:(t,i,s)=>{s.d(i,{A:()=>n});var h=s(1069),e=s(6333);class n extends e.${static count=0;static qo=[];static Lc=t=>{const i=new h.A(t.read('flo.dat'));this.count=i.ct;for(let t=0;t(s>179&&(i=i/2|0),s>192&&(i=i/2|0),s>217&&(i=i/2|0),s>243&&(i=i/2|0),(t/4<<10)+(i/32<<7)+(s/2|0));static g_=(t,i)=>-1===t?12345678:((i=i*(127&t)/128|0)<2?i=2:i>126&&(i=126),(65408&t)+i);static __=(t,i)=>-2===t?12345678:-1===t?(i<0?i=0:i>127&&(i=127),127-i):((i=i*(127&t)/128|0)<2?i=2:i>126&&(i=126),(65408&t)+i);C_=0;texture=-1;T_=!1;O_=!0;v_=0;b_=0;L_=0;R_=0;S_=0;M_=0;decode(t,i){1===t?(this.C_=i.lt,this.setColor(this.C_)):2===t?this.texture=i.gA:3===t?this.T_=!0:5===t?this.O_=!1:6===t?this.m_=i.xA:console.log('Error unrecognised config code: ',t)}setColor(t){const i=(t>>16&255)/256,s=(t>>8&255)/256,h=(255&t)/256;let e=i;si&&(r=s),h>r&&(r=h);let o=0,l=0;const a=(e+r)/2;e!==r&&(a<.5&&(l=(r-e)/(r+e)),a>=.5&&(l=(r-e)/(2-r-e)),i===r?o=(s-h)/(r-e):s===r?o=(h-i)/(r-e)+2:h===r&&(o=(i-s)/(r-e)+4)),o/=6,this.v_=256*o|0,this.b_=256*l|0,this.L_=256*a|0,this.b_<0?this.b_=0:this.b_>255&&(this.b_=255),this.L_<0?this.L_=0:this.L_>255&&(this.L_=255),this.R_=a>.5?(1-a)*l*512|0:a*l*512|0,this.R_<1&&(this.R_=1),this.S_=o*this.R_|0;let c=this.v_+(16*Math.random()|0)-8;c<0?c=0:c>255&&(c=255);let f=this.b_+(48*Math.random()|0)-24;f<0?f=0:f>255&&(f=255);let u=this.L_+(48*Math.random()|0)-24;u<0?u=0:u>255&&(u=255),this.M_=n.E_(c,f,u)}}},8317:(t,i,s)=>{s.d(i,{A:()=>o});var h=s(1069),e=s(6333),n=s(8665),r=s(3867);class o extends e.${static count=0;static qo=[];static Lc=t=>{const i=new h.A(t.read('idk.dat'));this.count=i.ct;for(let t=0;t=40&&t<50)this.D_[t-40]=i.ct;else if(t>=50&&t<60)this.N_[t-50]=i.ct;else{if(!(t>=60&&t<70))throw new Error(`Unrecognized idk config code: ${t}`);this.x_[t-60]=i.ct}}Ma(){if(!this.k_)return null;const t=new r.xs(this.k_.length,null);for(let i=0;i{s.d(i,{A:()=>c});var h=s(6333),e=s(1069),n=s(2031),r=s(8665),o=s(1023),l=s(6169),a=s(3867);class c extends h.${static count=0;static cache=null;static P_=null;static F_=null;static U_=0;static _u=new n.A(500);static Cu=new n.A(30);static Lc=t=>{this.P_=new e.A(t.read('loc.dat'));const i=new e.A(t.read('loc.idx'));this.count=i.ct,this.F_=new Int32Array(this.count);let s=2;for(let t=0;t{if(!this.cache||!this.F_||!this.P_)throw new Error('LocType not loaded!!!');for(let i=0;i<10;i++){const s=this.cache[i];if(s&&s.id===t)return s}this.U_=(this.U_+1)%10;const i=this.cache[this.U_];return this.P_.ft=this.F_[t],i.id=t,i.reset(),i.I_(this.P_),i.B_||(i.B_=new Int32Array(1)),-1===i.G_&&i.B_&&(i.active=i.B_.length>0&&i.B_[0]===o.A.xy.id,i.Pm&&(i.active=!0)),i};static zo=()=>{this._u=null,this.Cu=null,this.F_=null,this.cache=null,this.P_=null};k_=null;B_=null;name=null;Tw=null;D_=null;N_=null;width=1;length=1;lA=!0;aA=!0;active=!1;G_=-1;H_=!1;W_=!1;O_=!1;kl=-1;Y_=!1;V_=16;K_=0;X_=0;Pm=null;Ud=-1;Kd=-1;z_=!1;j_=!0;Z_=128;q_=128;J_=128;Py=0;Q_=0;tC=0;iC=0;sC=!1;decode(t,i){if(1===t){const t=i.gA;this.k_=new Int32Array(t),this.B_=new Int32Array(t);for(let s=0;s=30&&t<39)this.Pm||(this.Pm=new a.xs(5,null)),this.Pm[t-30]=i.xA,'hidden'===this.Pm[t-30]?.toLowerCase()&&(this.Pm[t-30]=null);else if(40===t){const t=i.gA;this.D_=new Uint16Array(t),this.N_=new Uint16Array(t);for(let s=0;s=this.k_.length)return null;let d=this.k_[a];if(-1===d)return null;const w=this.z_!==i>3;w&&(d+=65536);let y=c._u?.get(BigInt(d));y||(y=r.A.model(65535&d),w&&y.aC(),c._u?.put(BigInt(d),y));const A=128!==this.Z_||128!==this.q_||128!==this.J_,p=0!==this.Q_||0!==this.tC||0!==this.iC;let m=r.A.y_(y,!this.D_,!this.Y_,i===l.A.jd&&-1===o&&!A&&!p);for(-1!==o&&(m.tc(),m.ic(o),m.cC=null,m.fC=null);i-- >0;)m.uC();if(this.D_&&this.N_)for(let t=0;t{s.d(i,{A:()=>l});var h=s(6333),e=s(1069),n=s(2031),r=s(8665),o=s(3867);class l extends h.${static count=0;static cache=null;static P_=null;static F_=null;static U_=0;static $o=new n.A(30);static Lc=t=>{this.P_=new e.A(t.read('npc.dat'));const i=new e.A(t.read('npc.idx'));this.count=i.ct,this.F_=new Int32Array(this.count);let s=2;for(let t=0;t{if(!this.cache||!this.F_||!this.P_)throw new Error('NpcType not loaded!!!');for(let i=0;i<20;i++){const s=this.cache[i];if(s&&s.id===t)return s}this.U_=(this.U_+1)%20;const i=this.cache[this.U_]=new l(t);return this.P_.ft=this.F_[t],i.I_(this.P_),i};static zo=()=>{this.$o=null,this.F_=null,this.cache=null,this.P_=null};name=null;Tw=null;size=1;k_=null;x_=null;Y_=!1;FI=-1;RI=-1;MI=-1;xI=-1;NI=-1;D_=null;N_=null;Pm=null;Z_=-1;q_=-1;J_=-1;Sd=!0;Hm=-1;yC=128;AC=128;decode(t,i){if(1===t){const t=i.gA;this.k_=new Uint16Array(t);for(let s=0;s=30&&t<40)this.Pm||(this.Pm=new o.xs(5,null)),this.Pm[t-30]=i.xA,'hidden'===this.Pm[t-30]?.toLowerCase()&&(this.Pm[t-30]=null);else if(40===t){const t=i.gA;this.D_=new Uint16Array(t),this.N_=new Uint16Array(t);for(let s=0;s{s.d(i,{A:()=>u});var h=s(6333),e=s(1069),n=s(1122),r=s(2031),o=s(8665),l=s(4583),a=s(8950),c=s(9298),f=s(3867);class u extends h.${static count=0;static cache=null;static P_=null;static F_=null;static U_=0;static _C=!0;static $o=new r.A(50);static Tu=new r.A(200);static Lc=(t,i)=>{this._C=i,this.P_=new e.A(t.read('obj.dat'));const s=new e.A(t.read('obj.idx'));this.count=s.ct,this.F_=new Int32Array(this.count);let h=2;for(let t=0;t{if(!this.cache||!this.F_||!this.P_)throw new Error('ObjType not loaded!!!');for(let i=0;i<10;i++){const s=this.cache[i];if(s&&s.id===t)return s}this.U_=(this.U_+1)%10;const i=this.cache[this.U_];return this.P_.ft=this.F_[t],i.id=t,i.reset(),i.I_(this.P_),-1!==i.CC&&i.TC(),!this._C&&i.members&&(i.name='Members Object',i.Tw="Login to a members' server to use this object.",i.Pm=null,i.Tm=null),i};static zo=()=>{this.$o=null,this.Tu=null,this.F_=null,this.cache=null,this.P_=null};static ia=(t,i)=>{if(u.Tu){let s=u.Tu.get(BigInt(t));if(s&&s.xd!==i&&-1!==s.xd&&(s.LA(),s=null),s)return s}let s=u.get(t);if(s.OC||(i=-1),s.OC&&s.vC&&i>1){let t=-1;for(let h=0;h<10;h++)i>=s.vC[h]&&0!==s.vC[h]&&(t=s.OC[h]);-1!==t&&(s=u.get(t))}const h=new n.A(32,32),e=l.A.La,r=l.A.Ra,o=l.A.Mc,f=a.A.Rc,d=a.A.bC,w=a.A.LC,y=a.A.left,A=a.A.right,p=a.A.top,m=a.A.bottom;l.A.RC=!1,a.A.bind(h.Rc,32,32),a.A.fillRect(0,0,32,32,c.A.la),l.A.sg();const I=s.tA(1),E=l.A.sin[s.Fp]*s.Bp>>16,g=l.A.cos[s.Fp]*s.Bp>>16;I.xa(0,s.Up,s.SC,s.Fp,s.MC,E+(I.wC/2|0)+s.kC,g+s.kC);for(let t=31;t>=0;t--)for(let i=31;i>=0;i--)0===h.Rc[t+32*i]&&(t>0&&h.Rc[t+32*i-1]>1||i>0&&h.Rc[t+32*(i-1)]>1||t<31&&h.Rc[t+32*i+1]>1||i<31&&h.Rc[t+32*(i+1)]>1)&&(h.Rc[t+32*i]=1);for(let t=31;t>=0;t--)for(let i=31;i>=0;i--)0===h.Rc[t+32*i]&&t>0&&i>0&&h.Rc[t+32*(i-1)-1]>0&&(h.Rc[t+32*i]=3153952);if(-1!==s.CC){const t=this.ia(s.xC,10),i=t.na,h=t.xd;t.na=32,t.xd=32,t.DC(5,5,22,22),t.na=i,t.xd=h}return u.Tu?.put(BigInt(t),h),a.A.bind(f,d,w),a.A.Bl(y,p,A,m),l.A.La=e,l.A.Ra=r,l.A.Mc=o,l.A.RC=!0,s.Pa?h.na=33:h.na=32,h.xd=i,h};model=0;name=null;Tw=null;D_=null;N_=null;Bp=2e3;Fp=0;Up=0;SC=0;MC=0;kC=0;NC=!1;PC=-1;Pa=!1;Jy=1;members=!1;Pm=null;Tm=null;FC=-1;UC=-1;BC=0;GC=-1;HC=-1;WC=0;YC=-1;VC=-1;KC=-1;XC=-1;zC=-1;jC=-1;OC=null;vC=null;xC=-1;CC=-1;decode(t,i){if(1===t)this.model=i.ct;else if(2===t)this.name=i.xA;else if(3===t)this.Tw=i.xA;else if(4===t)this.Bp=i.ct;else if(5===t)this.Fp=i.ct;else if(6===t)this.Up=i.ct;else if(7===t)this.MC=i.gp,this.MC>32767&&(this.MC-=65536);else if(8===t)this.kC=i.gp,this.kC>32767&&(this.kC-=65536);else if(9===t)this.NC=!0;else if(10===t)this.PC=i.ct;else if(11===t)this.Pa=!0;else if(12===t)this.Jy=i.ut;else if(16===t)this.members=!0;else if(23===t)this.FC=i.ct,this.BC=i.IA;else if(24===t)this.UC=i.ct;else if(25===t)this.GC=i.ct,this.WC=i.IA;else if(26===t)this.HC=i.ct;else if(t>=30&&t<35)this.Pm||(this.Pm=new f.xs(5,null)),this.Pm[t-30]=i.xA,'hidden'===this.Pm[t-30]?.toLowerCase()&&(this.Pm[t-30]=null);else if(t>=35&&t<40)this.Tm||(this.Tm=new f.xs(5,null)),this.Tm[t-35]=i.xA;else if(40===t){const t=i.gA;this.D_=new Uint16Array(t),this.N_=new Uint16Array(t);for(let s=0;s=100&&t<110&&(this.OC&&this.vC||(this.OC=new Uint16Array(10),this.vC=new Uint16Array(10)),this.OC[t-100]=i.ct,this.vC[t-100]=i.ct)}ZC(t){let i=this.FC;if(1===t&&(i=this.GC),-1===i)return null;let s=this.UC,h=this.YC;1===t&&(s=this.HC,h=this.VC);let e=o.A.model(i);if(-1!==s){const t=o.A.model(s);if(-1===h){const i=[e,t];e=o.A.Za(i,2)}else{const i=[e,t,o.A.model(h)];e=o.A.Za(i,3)}}if(0===t&&0!==this.BC&&e.translate(this.BC,0,0),1===t&&0!==this.WC&&e.translate(this.WC,0,0),this.D_&&this.N_)for(let t=0;t1){let i=-1;for(let s=0;s<10;s++)t>=this.vC[s]&&0!==this.vC[s]&&(i=this.OC[s]);if(-1!==i)return u.get(i).tA(1)}if(u.$o){const t=u.$o.get(BigInt(this.id));if(t)return t}const i=o.A.model(this.model);if(this.D_&&this.N_)for(let t=0;t{s.d(i,{A:()=>r});var h=s(6333),e=s(1069),n=s(6730);class r extends h.${static count=0;static qo=[];static Lc=t=>{const i=new e.A(t.read('seq.dat'));this.count=i.ct;for(let t=0;t{s.d(i,{A:()=>l});var h=s(6333),e=s(1069),n=s(1312),r=s(8665),o=s(2031);class l extends h.${static count=0;static qo=[];static $o=new o.A(30);static Lc=t=>{const i=new e.A(t.read('spotanim.dat'));this.count=i.ct;for(let t=0;t=40&&t<50)this.D_[t-40]=i.ct;else{if(!(t>=50&&t<60))throw new Error(`Unrecognized spotanim config code: ${t}`);this.N_[t-50]=i.ct}}Ma(){let t=l.$o?.get(BigInt(this.id));if(t)return t;t=r.A.model(this.model);for(let i=0;i<6;i++)0!==this.D_[0]&&t.qa(this.D_[i],this.N_[i]);return l.$o?.put(BigInt(this.id),t),t}}},3764:(t,i,s)=>{s.d(i,{A:()=>n});var h=s(6333),e=s(1069);class n extends h.${static count=0;static qo=[];static JC=[];static QC=0;static Lc=t=>{const i=new e.A(t.read('varp.dat'));this.count=i.ct;for(let t=0;t{s.d(i,{A:()=>h});class h{static OPEN=0;static eT=1;static nT=2;static rT=4;static oT=8;static lT=h.eT<<4;static aT=h.nT<<4;static cT=h.rT<<4;static fT=h.oT<<4;static uT=256;static dT=512;static wT=1024;static yT=2048;static AT=4096;static pT=h.dT<<4;static mT=h.wT<<4;static IT=h.yT<<4;static ET=h.AT<<4;static gT=h.uT<<9;static _T=524288;static CT=2097152;static TT=h.CT|h._T;static OT=h.uT|h.TT;static Hd=h.nT|h.OT;static Bd=h.oT|h.OT;static zm=h.nT|h.rT|h.Bd;static Wd=h.aT|h.OT;static Zm=h.oT|h.lT|h.Wd;static Gd=h.fT|h.OT;static jm=h.eT|h.nT|h.Gd;static qm=h.aT|h.cT|h.Gd;static vT=16777215}},670:(t,i,s)=>{s.d(i,{A:()=>o});var h=s(9456),e=s(6169),n=s(1023),r=s(4909);class o{static Jn=4;static dr=104;static index=(t,i)=>t*o.dr+i;offsetX;bT;sizeX;sizeZ;flags;constructor(){this.offsetX=0,this.bT=0,this.sizeX=o.dr,this.sizeZ=o.dr,this.flags=new Int32Array(this.sizeX*this.sizeZ),this.reset()}reset=()=>{for(let t=0;t{this.flags[o.index(t-this.offsetX,i-this.bT)]|=h.A.CT};dA=(t,i)=>{this.flags[o.index(t-this.offsetX,i-this.bT)]&=~h.A.CT};sA=(t,i,s,n,r,o)=>{let l=h.A.uT;o&&(l|=h.A.gT);const a=t-this.offsetX,c=i-this.bT;if(r===e.A.Zd||r===e.A.$d){const t=s;s=n,n=t}for(let t=a;t=0&&t=0&&i{let l=h.A.uT;o&&(l|=h.A.gT);const a=t-this.offsetX,c=i-this.bT;if(r===e.A.Zd||r===e.A.$d){const t=s;s=n,n=t}for(let t=a;t=0&&t=0&&i{const l=t-this.offsetX,a=i-this.bT,c=o?h.A.ET:h.A.fT,f=o?h.A.AT:h.A.oT,u=o?h.A.wT:h.A.nT,d=o?h.A.mT:h.A.aT,w=o?h.A.dT:h.A.eT,y=o?h.A.pT:h.A.lT,A=o?h.A.yT:h.A.rT,p=o?h.A.IT:h.A.cT;s===n.A.Xd.id?r===e.A.jd?(this.add(l,a,c),this.add(l-1,a,f)):r===e.A.Zd?(this.add(l,a,u),this.add(l,a+1,d)):r===e.A.qd?(this.add(l,a,f),this.add(l+1,a,c)):r===e.A.$d&&(this.add(l,a,d),this.add(l,a-1,u)):s===n.A.ST.id||s===n.A.Jd.id?r===e.A.jd?(this.add(l,a,w),this.add(l-1,a+1,y)):r===e.A.Zd?(this.add(l,a,A),this.add(l+1,a+1,p)):r===e.A.qd?(this.add(l,a,y),this.add(l+1,a-1,w)):r===e.A.$d&&(this.add(l,a,p),this.add(l-1,a-1,A)):s===n.A.zd.id&&(r===e.A.jd?(this.add(l,a,u|c),this.add(l-1,a,f),this.add(l,a+1,d)):r===e.A.Zd?(this.add(l,a,u|f),this.add(l,a+1,d),this.add(l+1,a,c)):r===e.A.qd?(this.add(l,a,d|f),this.add(l+1,a,c),this.add(l,a-1,u)):r===e.A.$d&&(this.add(l,a,d|c),this.add(l,a-1,u),this.add(l-1,a,f))),o&&this.RT(t,i,s,r,!1)};oA=(t,i,s,r,o)=>{const l=t-this.offsetX,a=i-this.bT,c=o?h.A.ET:h.A.fT,f=o?h.A.AT:h.A.oT,u=o?h.A.wT:h.A.nT,d=o?h.A.mT:h.A.aT,w=o?h.A.dT:h.A.eT,y=o?h.A.pT:h.A.lT,A=o?h.A.yT:h.A.rT,p=o?h.A.IT:h.A.cT;s===n.A.Xd.id?r===e.A.jd?(this.remove(l,a,c),this.remove(l-1,a,f)):r===e.A.Zd?(this.remove(l,a,u),this.remove(l,a+1,d)):r===e.A.qd?(this.remove(l,a,f),this.remove(l+1,a,c)):r===e.A.$d&&(this.remove(l,a,d),this.remove(l,a-1,u)):s===n.A.ST.id||s===n.A.Jd.id?r===e.A.jd?(this.remove(l,a,w),this.remove(l-1,a+1,y)):r===e.A.Zd?(this.remove(l,a,A),this.remove(l+1,a+1,p)):r===e.A.qd?(this.remove(l,a,y),this.remove(l+1,a-1,w)):r===e.A.$d&&(this.remove(l,a,p),this.remove(l-1,a-1,A)):s===n.A.zd.id&&(r===e.A.jd?(this.remove(l,a,u|c),this.remove(l-1,a,f),this.remove(l,a+1,d)):r===e.A.Zd?(this.remove(l,a,u|f),this.remove(l,a+1,d),this.remove(l+1,a,c)):r===e.A.qd?(this.remove(l,a,d|f),this.remove(l+1,a,c),this.remove(l,a-1,u)):r===e.A.$d&&(this.remove(l,a,d|c),this.remove(l,a-1,u),this.remove(l-1,a,f))),o&&this.oA(t,i,s,r,!1)};Vm=(t,i,s,r,l,a)=>{if(t===s&&i===r)return!0;const c=t-this.offsetX,f=i-this.bT,u=s-this.offsetX,d=r-this.bT,w=o.index(c,f);if(l===n.A.Xd.id){if(a===e.A.jd){if(c===u-1&&f===d)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.Wd)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.Hd)===h.A.OPEN)return!0}else if(a===e.A.Zd){if(c===u&&f===d+1)return!0;if(c===u-1&&f===d&&(this.flags[w]&h.A.Bd)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.Gd)===h.A.OPEN)return!0}else if(a===e.A.qd){if(c===u+1&&f===d)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.Wd)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.Hd)===h.A.OPEN)return!0}else if(a===e.A.$d){if(c===u&&f===d-1)return!0;if(c===u-1&&f===d&&(this.flags[w]&h.A.Bd)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.Gd)===h.A.OPEN)return!0}}else if(l===n.A.zd.id){if(a===e.A.jd){if(c===u-1&&f===d)return!0;if(c===u&&f===d+1)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.Gd)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.Hd)===h.A.OPEN)return!0}else if(a===e.A.Zd){if(c===u-1&&f===d&&(this.flags[w]&h.A.Bd)===h.A.OPEN)return!0;if(c===u&&f===d+1)return!0;if(c===u+1&&f===d)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.Hd)===h.A.OPEN)return!0}else if(a===e.A.qd){if(c===u-1&&f===d&&(this.flags[w]&h.A.Bd)===h.A.OPEN)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.Wd)===h.A.OPEN)return!0;if(c===u+1&&f===d)return!0;if(c===u&&f===d-1)return!0}else if(a===e.A.$d){if(c===u-1&&f===d)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.Wd)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.Gd)===h.A.OPEN)return!0;if(c===u&&f===d-1)return!0}}else if(l===n.A.tw.id){if(c===u&&f===d+1&&(this.flags[w]&h.A.aT)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.nT)===h.A.OPEN)return!0;if(c===u-1&&f===d&&(this.flags[w]&h.A.oT)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.fT)===h.A.OPEN)return!0}return!1};Km=(t,i,s,r,l,a)=>{if(t===s&&i===r)return!0;const c=t-this.offsetX,f=i-this.bT,u=s-this.offsetX,d=r-this.bT,w=o.index(c,f);if(l===n.A.MT.id||l===n.A.kT.id){if(l===n.A.kT.id&&(a=a+2&3),a===e.A.jd){if(c===u+1&&f===d&&(this.flags[w]&h.A.fT)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.nT)===h.A.OPEN)return!0}else if(a===e.A.Zd){if(c===u-1&&f===d&&(this.flags[w]&h.A.oT)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.nT)===h.A.OPEN)return!0}else if(a===e.A.qd){if(c===u-1&&f===d&&(this.flags[w]&h.A.oT)===h.A.OPEN)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.aT)===h.A.OPEN)return!0}else if(a===e.A.$d){if(c===u+1&&f===d&&(this.flags[w]&h.A.fT)===h.A.OPEN)return!0;if(c===u&&f===d+1&&(this.flags[w]&h.A.aT)===h.A.OPEN)return!0}}else if(l===n.A.xT.id){if(c===u&&f===d+1&&(this.flags[w]&h.A.aT)===h.A.OPEN)return!0;if(c===u&&f===d-1&&(this.flags[w]&h.A.nT)===h.A.OPEN)return!0;if(c===u-1&&f===d&&(this.flags[w]&h.A.oT)===h.A.OPEN)return!0;if(c===u+1&&f===d&&(this.flags[w]&h.A.fT)===h.A.OPEN)return!0}return!1};Xm=(t,i,s,e,n,l,a)=>{const c=s+n-1,f=e+l-1,u=o.index(t-this.offsetX,i-this.bT);return t>=s&&t<=c&&i>=e&&i<=f||(t===s-1&&i>=e&&i<=f&&(this.flags[u]&h.A.oT)===h.A.OPEN&&(a&r.A.jd)===h.A.OPEN||(t===c+1&&i>=e&&i<=f&&(this.flags[u]&h.A.fT)===h.A.OPEN&&(a&r.A.qd)===h.A.OPEN||(i===e-1&&t>=s&&t<=c&&(this.flags[u]&h.A.nT)===h.A.OPEN&&(a&r.A.$d)===h.A.OPEN||i===f+1&&t>=s&&t<=c&&(this.flags[u]&h.A.aT)===h.A.OPEN&&(a&r.A.Zd)===h.A.OPEN)))};add=(t,i,s)=>{this.flags[o.index(t,i)]|=s};remove=(t,i,s)=>{this.flags[o.index(t,i)]&=h.A.vT-s}}},4909:(t,i,s)=>{s.d(i,{A:()=>h});class h{static Zd=1;static qd=2;static $d=4;static jd=8}},6169:(t,i,s)=>{s.d(i,{A:()=>h});class h{static jd=0;static Zd=1;static qd=2;static $d=3}},5599:(t,i,s)=>{s.d(i,{A:()=>h});class h{static hA=0;static eA=1;static rA=2;static Ny=3}},1023:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(5599);class e{static Xd=new e(0,h.A.hA);static ST=new e(1,h.A.hA);static zd=new e(2,h.A.hA);static Jd=new e(3,h.A.hA);static fE=new e(4,h.A.eA);static Ym=new e(5,h.A.eA);static MT=new e(6,h.A.eA);static kT=new e(7,h.A.eA);static xT=new e(8,h.A.eA);static tw=new e(9,h.A.rA);static xy=new e(10,h.A.rA);static Dy=new e(11,h.A.rA);static DT=new e(12,h.A.rA);static NT=new e(13,h.A.rA);static PT=new e(14,h.A.rA);static FT=new e(15,h.A.rA);static UT=new e(16,h.A.rA);static BT=new e(17,h.A.rA);static GT=new e(18,h.A.rA);static HT=new e(19,h.A.rA);static WT=new e(20,h.A.rA);static YT=new e(21,h.A.rA);static Ny=new e(22,h.A.Ny);static values(){return[this.Xd,this.ST,this.BT,this.FT,this.zd,this.PT,this.tw,this.Jd,this.Ny,this.DT,this.Dy,this.MT,this.WT,this.xy,this.Ym,this.NT,this.kT,this.fE,this.UT,this.xT,this.HT,this.YT,this.GT]}static of(t){const i=this.values();for(let s=0;s{s.d(i,{A:()=>A});var h=s(670),e=s(2164),n=s(1069),r=s(4583),o=s(198),l=s(5637),a=s(4197),c=s(1312),f=s(1023),u=s(6169),d=s(9298),w=s(5518),y=s(3867);class A{static VT=Int8Array.of(1,2,4,8);static KT=Uint8Array.of(16,32,64,128);static XT=Int8Array.of(1,0,-1,0);static zT=Int8Array.of(0,-1,0,1);static jT=(17*Math.random()|0)-8;static ZT=(33*Math.random()|0)-16;static Tt=!0;static im=0;static qT=!1;static $T=(t,i)=>{let s=this.JT(t+45365,i+91923,4)+(this.JT(t+10294,i+37821,2)-128>>1)+(this.JT(t,i,1)-128>>2)-128;return s=35+(.3*s|0),s<10?s=10:s>60&&(s=60),s};static JT=(t,i,s)=>{const h=t/s|0,e=t&s-1,n=i/s|0,r=i&s-1,o=this.QT(h,n),l=this.QT(h+1,n),a=this.QT(h,n+1),c=this.QT(h+1,n+1),f=this.tO(o,l,e,s),u=this.tO(a,c,e,s);return this.tO(f,u,r,s)};static tO=(t,i,s,h)=>{const e=65536-r.A.cos[1024*s/h|0]>>1;return(t*(65536-e)>>16)+(i*e>>16)};static QT=(t,i)=>((this.iO(t-1,i-1)+this.iO(t+1,i-1)+this.iO(t-1,i+1)+this.iO(t+1,i+1))/16|0)+((this.iO(t-1,i)+this.iO(t+1,i)+this.iO(t,i-1)+this.iO(t,i+1))/8|0)+(this.iO(t,i)/4|0);static iO=(t,i)=>{const s=t+57*i,h=BigInt(s<<13^s);return 255&Number((h*(h*h*15731n+789221n)+1376312589n&0x7fffffffn)>>19n)};static sA=(t,i,s,h,e,n,r,o,d,w,y)=>{const p=e[y][i][s],m=e[y][i+1][s],I=e[y][i+1][s+1],E=e[y][i][s+1],g=p+m+I+E>>2,_=l.A.get(o);let C=i+(s<<7)+(o<<14)+1073741824|0;_.active||(C+=-2147483648),C|=0;const T=(w<<6)+d<<24>>24;if(d===f.A.Ny.id)h?.sO(_.Ma(f.A.Ny.id,w,p,m,I,E,-1),t,i,s,g,C,T),_.lA&&_.active&&r?.LT(i,s),-1!==_.kl&&n.vE(new a.A(o,t,3,i,s,c.A.qo[_.kl],!0));else if(d===f.A.xy.id||d===f.A.Dy.id){const e=_.Ma(f.A.xy.id,w,p,m,I,E,-1);if(e){let n,r,o=0;d===f.A.Dy.id&&(o+=256),w===u.A.Zd||w===u.A.$d?(n=_.length,r=_.width):(n=_.width,r=_.length),h?.sA(t,i,s,g,e,null,C,T,n,r,o)}_.lA&&r?.sA(i,s,_.width,_.length,w,_.aA),-1!==_.kl&&n.vE(new a.A(o,t,2,i,s,c.A.qo[_.kl],!0))}else if(d>=f.A.DT.id)h?.sA(t,i,s,g,_.Ma(d,w,p,m,I,E,-1),null,C,T,1,1,0),_.lA&&r?.sA(i,s,_.width,_.length,w,_.aA),-1!==_.kl&&n.vE(new a.A(o,t,2,i,s,c.A.qo[_.kl],!0));else if(d===f.A.Xd.id)h?.RT(t,i,s,g,A.VT[w],0,_.Ma(f.A.Xd.id,w,p,m,I,E,-1),null,C,T),_.lA&&r?.RT(i,s,d,w,_.aA),-1!==_.kl&&n.vE(new a.A(o,t,0,i,s,c.A.qo[_.kl],!0));else if(d===f.A.ST.id)h?.RT(t,i,s,g,A.KT[w],0,_.Ma(f.A.ST.id,w,p,m,I,E,-1),null,C,T),_.lA&&r?.RT(i,s,d,w,_.aA),-1!==_.kl&&n.vE(new a.A(o,t,0,i,s,c.A.qo[_.kl],!0));else if(d===f.A.zd.id){const e=w+1&3;h?.RT(t,i,s,g,A.VT[w],A.VT[e],_.Ma(f.A.zd.id,w+4,p,m,I,E,-1),_.Ma(f.A.zd.id,e,p,m,I,E,-1),C,T),_.lA&&r?.RT(i,s,d,w,_.aA),-1!==_.kl&&n.vE(new a.A(o,t,0,i,s,c.A.qo[_.kl],!0))}else if(d===f.A.Jd.id)h?.RT(t,i,s,g,A.KT[w],0,_.Ma(f.A.Jd.id,w,p,m,I,E,-1),null,C,T),_.lA&&r?.RT(i,s,d,w,_.aA),-1!==_.kl&&n.vE(new a.A(o,t,0,i,s,c.A.qo[_.kl],!0));else if(d===f.A.tw.id)h?.sA(t,i,s,g,_.Ma(d,w,p,m,I,E,-1),null,C,T,1,1,0),_.lA&&r?.sA(i,s,_.width,_.length,w,_.aA),-1!==_.kl&&n.vE(new a.A(o,t,2,i,s,c.A.qo[_.kl],!0));else if(d===f.A.fE.id)h?.hO(t,i,s,g,0,0,C,_.Ma(f.A.fE.id,u.A.jd,p,m,I,E,-1),T,512*w,A.VT[w]),-1!==_.kl&&n.vE(new a.A(o,t,1,i,s,c.A.qo[_.kl],!0));else if(d===f.A.Ym.id){let e=16;if(h){const n=h.Yd(t,i,s);n>0&&(e=l.A.get(n>>14&32767).V_)}h?.hO(t,i,s,g,A.XT[w]*e,A.zT[w]*e,C,_.Ma(f.A.fE.id,u.A.jd,p,m,I,E,-1),T,512*w,A.VT[w]),-1!==_.kl&&n.vE(new a.A(o,t,1,i,s,c.A.qo[_.kl],!0))}else d===f.A.MT.id?(h?.hO(t,i,s,g,0,0,C,_.Ma(f.A.fE.id,u.A.jd,p,m,I,E,-1),T,w,256),-1!==_.kl&&n.vE(new a.A(o,t,1,i,s,c.A.qo[_.kl],!0))):d===f.A.kT.id?(h?.hO(t,i,s,g,0,0,C,_.Ma(f.A.fE.id,u.A.jd,p,m,I,E,-1),T,w,512),-1!==_.kl&&n.vE(new a.A(o,t,1,i,s,c.A.qo[_.kl],!0))):d===f.A.xT.id&&(h?.hO(t,i,s,g,0,0,C,_.Ma(f.A.fE.id,u.A.jd,p,m,I,E,-1),T,w,768),-1!==_.kl&&n.vE(new a.A(o,t,1,i,s,c.A.qo[_.kl],!0)))};iE;sE;lr;ar;eO;nO;rO;oO;lO;aO;cO;fO;uO;dO;wO;yO;constructor(t,i,s,e){this.iE=t,this.sE=i,this.lr=s,this.ar=e,this.eO=new y.Ec(h.A.Jn,t,i),this.nO=new y.Ec(h.A.Jn,t,i),this.rO=new y.Ec(h.A.Jn,t,i),this.oO=new y.Ec(h.A.Jn,t,i),this.yO=new y.gc(h.A.Jn,t+1,i+1),this.lO=new y.Ec(h.A.Jn,t+1,i+1),this.aO=new y.ur(t+1,i+1),this.cO=new Int32Array(i),this.fO=new Int32Array(i),this.uO=new Int32Array(i),this.dO=new Int32Array(i),this.wO=new Int32Array(i)}am=(t,i)=>{for(let t=0;t=0&&i[h]?.LT(s,e)}A.jT+=(5*Math.random()|0)-2,A.jT<-8?A.jT=-8:A.jT>8&&(A.jT=8),A.ZT+=(5*Math.random()|0)-2,A.ZT<-16?A.ZT=-16:A.ZT>16&&(A.ZT=16);for(let i=0;i>8;for(let t=1;t>2)+(s[e+1][t]>>3)+(s[e][t-1]>>2)+(s[e][t+1]>>3)+(s[e][t]>>1);this.aO[e][t]=u-d}for(let t=0;t=0&&h0){const i=e.A.qo[s-1];this.cO[t]+=i.S_,this.fO[t]+=i.b_,this.uO[t]+=i.L_,this.dO[t]+=i.R_,n=this.wO[t]++}}const r=s-5;if(r>=0&&r0){const i=e.A.qo[s-1];this.cO[t]-=i.S_,this.fO[t]-=i.b_,this.uO[t]-=i.L_,this.dO[t]-=i.R_,n=this.wO[t]--}}}if(s>=1&&s=0&&f=0&&y=1&&c0||y>0){const p=this.lr[i][s][c],m=this.lr[i][s+1][c],I=this.lr[i][s+1][c+1],E=this.lr[i][s][c+1],g=this.aO[s][c],_=this.aO[s+1][c],C=this.aO[s+1][c+1],T=this.aO[s][c+1];let O=-1,v=-1;if(f>0){const t=256*h/l|0,i=n/a|0;let s=o/a|0;O=e.A.E_(t,i,s);const r=t+A.jT&255;s+=A.ZT,s<0?s=0:s>255&&(s=255),v=e.A.E_(r,i,s)}if(i>0){let t=0!==f||this.rO[i][s][c]===w.A.pO;y>0&&!e.A.qo[y-1].O_&&(t=!1),t&&p===m&&p===I&&p===E&&(this.yO[i][s][c]|=2340)}let b=0;if(-1!==O&&(b=r.A.palette[e.A.g_(v,96)]),0===y)t?.mO(i,s,c,w.A.pO,u.A.jd,-1,p,m,I,E,e.A.g_(O,g),e.A.g_(O,_),e.A.g_(O,C),e.A.g_(O,T),d.A.la,d.A.la,d.A.la,d.A.la,b,d.A.la);else{const h=this.rO[i][s][c]+1,n=this.oO[i][s][c],o=e.A.qo[y-1];let l,a,f=o.texture;f>=0?(a=r.A.IO(f),l=-1):o.C_===d.A.qc?(a=0,l=-2,f=-1):(l=e.A.E_(o.v_,o.b_,o.L_),a=r.A.palette[e.A.__(o.M_,96)]),t?.mO(i,s,c,h,n,f,p,m,I,E,e.A.g_(O,g),e.A.g_(O,_),e.A.g_(O,C),e.A.g_(O,T),e.A.__(l,g),e.A.__(l,_),e.A.__(l,C),e.A.__(l,T),b,a)}}}}}}for(let s=1;s0&&(t<<=3,i<<=3,s<<=3);for(let h=0;h<=e;h++)for(let n=0;n<=this.sE;n++)for(let r=0;r<=this.iE;r++){if(this.yO[h][r][n]&t){let i=n,s=n,l=h,a=h;for(;i>0&&this.yO[h][r][i-1]&t;)i--;for(;s0;){for(let h=i;h<=s;h++)if(!(this.yO[l-1][r][h]&t))break t;l--}t:for(;a=8){const h=this.lr[a][r][i]-240,n=this.lr[l][r][i];o.A.CO(e,1,128*r,h,128*i,128*r,n,128*s+128);for(let h=l;h<=a;h++)for(let e=i;e<=s;e++)this.yO[h][r][e]&=~t}}if(this.yO[h][r][n]&i){let t=r,s=r,l=h,a=h;for(;t>0&&this.yO[h][t-1][n]&i;)t--;for(;s0;){for(let h=t;h<=s;h++)if(!(this.yO[l-1][h][n]&i))break t;l--}t:for(;a=8){const h=this.lr[a][t][n]-240,r=this.lr[l][t][n];o.A.CO(e,2,128*t,h,128*n,128*s+128,r,128*n);for(let h=l;h<=a;h++)for(let e=t;e<=s;e++)this.yO[h][e][n]&=~i}}if(this.yO[h][r][n]&s){let t=r,i=r,l=n,a=n;for(;l>0&&this.yO[h][r][l-1]&s;)l--;for(;a0;){for(let i=l;i<=a;i++)if(!(this.yO[h][t-1][i]&s))break t;t--}t:for(;i=4){const n=this.lr[h][t][l];o.A.CO(e,4,128*t,n,128*l,128*i+128,n,128*a+128);for(let e=t;e<=i;e++)for(let t=l;t<=a;t++)this.yO[h][e][t]&=~s}}}}}};om=(t,i,s,n)=>{let r=0;for(let t=0;t>24;break}for(let e=t;e=0&&t=0&&e{const o=new n.A(new Uint8Array(r));for(let n=0;n=0&&a=0&&c>24,this.oO[n][a][c]=(f-2&3)<<24>>24):f<=81?this.ar[n][a][c]=f-49<<24>>24:this.eO[n][a][c]=f-81<<24>>24}else for(;f=o.gA,0!==f;){if(1===f){o.gA;break}f<=49&&o.gA}}};lm=(t,i,s,e,r,o)=>{const l=new n.A(new Uint8Array(e));let a=-1;for(;;){const e=l.TO;if(0===e)return;a+=e;let n=0;for(;;){const e=l.TO;if(0===e)break;n+=e-1;const c=63&n,f=n>>6&63,u=n>>12,d=l.gA,w=d>>2,y=3&d,A=f+r,p=c+o;if(A>0&&p>0&&A=0&&(e=s[h]),this.sA(u,A,p,t,i,e,a,w,y)}}}};sA=(t,i,s,h,e,n,r,o,d)=>{if(A.Tt){if(16&this.ar[t][i][s])return;if(this.AO(t,i,s)!==A.im)return}const w=this.lr[t][i][s],y=this.lr[t][i+1][s],p=this.lr[t][i+1][s+1],m=this.lr[t][i][s+1],I=w+y+p+m>>2,E=l.A.get(r);let g=i+(s<<7)+(r<<14)+1073741824|0;E.active||(g+=-2147483648),g|=0;const _=(d<<6)+o<<24>>24;if(o===f.A.Ny.id)(!A.Tt||E.active||E.sC)&&(h?.sO(E.Ma(f.A.Ny.id,d,w,y,p,m,-1),t,i,s,I,g,_),E.lA&&E.active&&n?.LT(i,s),-1!==E.kl&&e.vE(new a.A(r,t,3,i,s,c.A.qo[E.kl],!0)));else if(o===f.A.xy.id||o===f.A.Dy.id){const l=E.Ma(f.A.xy.id,d,w,y,p,m,-1);if(l){let e,n,r=0;if(o===f.A.Dy.id&&(r+=256),d===u.A.Zd||d===u.A.$d?(e=E.length,n=E.width):(e=E.width,n=E.length),h?.sA(t,i,s,I,l,null,g,_,e,n,r)&&E.j_)for(let h=0;h<=e;h++)for(let e=0;e<=n;e++){let n=l.OO/4|0;n>30&&(n=30),n>this.lO[t][i+h][s+e]&&(this.lO[t][i+h][s+e]=n<<24>>24)}}E.lA&&n?.sA(i,s,E.width,E.length,d,E.aA),-1!==E.kl&&e.vE(new a.A(r,t,2,i,s,c.A.qo[E.kl],!0))}else if(o>=f.A.DT.id)h?.sA(t,i,s,I,E.Ma(o,d,w,y,p,m,-1),null,g,_,1,1,0),o>=f.A.DT.id&&o<=f.A.BT.id&&o!==f.A.NT.id&&t>0&&(this.yO[t][i][s]|=2340),E.lA&&n?.sA(i,s,E.width,E.length,d,E.aA),-1!==E.kl&&e.vE(new a.A(r,t,2,i,s,c.A.qo[E.kl],!0));else if(o===f.A.Xd.id)h?.RT(t,i,s,I,A.VT[d],0,E.Ma(f.A.Xd.id,d,w,y,p,m,-1),null,g,_),d===u.A.jd?(E.j_&&(this.lO[t][i][s]=50,this.lO[t][i][s+1]=50),E.O_&&(this.yO[t][i][s]|=585)):d===u.A.Zd?(E.j_&&(this.lO[t][i][s+1]=50,this.lO[t][i+1][s+1]=50),E.O_&&(this.yO[t][i][s+1]|=1170)):d===u.A.qd?(E.j_&&(this.lO[t][i+1][s]=50,this.lO[t][i+1][s+1]=50),E.O_&&(this.yO[t][i+1][s]|=585)):d===u.A.$d&&(E.j_&&(this.lO[t][i][s]=50,this.lO[t][i+1][s]=50),E.O_&&(this.yO[t][i][s]|=1170)),E.lA&&n?.RT(i,s,o,d,E.aA),-1!==E.kl&&e.vE(new a.A(r,t,0,i,s,c.A.qo[E.kl],!0)),16!==E.V_&&h?.vO(t,i,s,E.V_);else if(o===f.A.ST.id)h?.RT(t,i,s,I,A.KT[d],0,E.Ma(f.A.ST.id,d,w,y,p,m,-1),null,g,_),E.j_&&(d===u.A.jd?this.lO[t][i][s+1]=50:d===u.A.Zd?this.lO[t][i+1][s+1]=50:d===u.A.qd?this.lO[t][i+1][s]=50:d===u.A.$d&&(this.lO[t][i][s]=50)),E.lA&&n?.RT(i,s,o,d,E.aA),-1!==E.kl&&e.vE(new a.A(r,t,0,i,s,c.A.qo[E.kl],!0));else if(o===f.A.zd.id){const l=d+1&3;h?.RT(t,i,s,I,A.VT[d],A.VT[l],E.Ma(f.A.zd.id,d+4,w,y,p,m,-1),E.Ma(f.A.zd.id,l,w,y,p,m,-1),g,_),E.O_&&(d===u.A.jd?(this.yO[t][i][s]|=265,this.yO[t][i][s+1]|=1170):d===u.A.Zd?(this.yO[t][i][s+1]|=1170,this.yO[t][i+1][s]|=585):d===u.A.qd?(this.yO[t][i+1][s]|=585,this.yO[t][i][s]|=1170):d===u.A.$d&&(this.yO[t][i][s]|=1170,this.yO[t][i][s]|=585)),E.lA&&n?.RT(i,s,o,d,E.aA),-1!==E.kl&&e.vE(new a.A(r,t,0,i,s,c.A.qo[E.kl],!0)),16!==E.V_&&h?.vO(t,i,s,E.V_)}else if(o===f.A.Jd.id)h?.RT(t,i,s,I,A.KT[d],0,E.Ma(f.A.Jd.id,d,w,y,p,m,-1),null,g,_),E.j_&&(d===u.A.jd?this.lO[t][i][s+1]=50:d===u.A.Zd?this.lO[t][i+1][s+1]=50:d===u.A.qd?this.lO[t][i+1][s]=50:d===u.A.$d&&(this.lO[t][i][s]=50)),E.lA&&n?.RT(i,s,o,d,E.aA),-1!==E.kl&&e.vE(new a.A(r,t,0,i,s,c.A.qo[E.kl],!0));else if(o===f.A.tw.id)h?.sA(t,i,s,I,E.Ma(o,d,w,y,p,m,-1),null,g,_,1,1,0),E.lA&&n?.sA(i,s,E.width,E.length,d,E.aA),-1!==E.kl&&e.vE(new a.A(r,t,2,i,s,c.A.qo[E.kl],!0));else if(o===f.A.fE.id)h?.hO(t,i,s,I,0,0,g,E.Ma(f.A.fE.id,u.A.jd,w,y,p,m,-1),_,512*d,A.VT[d]),-1!==E.kl&&e.vE(new a.A(r,t,1,i,s,c.A.qo[E.kl],!0));else if(o===f.A.Ym.id){let n=16;if(h){const e=h.Yd(t,i,s);e>0&&(n=l.A.get(e>>14&32767).V_)}h?.hO(t,i,s,I,A.XT[d]*n,A.zT[d]*n,g,E.Ma(f.A.fE.id,u.A.jd,w,y,p,m,-1),_,512*d,A.VT[d]),-1!==E.kl&&e.vE(new a.A(r,t,1,i,s,c.A.qo[E.kl],!0))}else o===f.A.MT.id?(h?.hO(t,i,s,I,0,0,g,E.Ma(f.A.fE.id,u.A.jd,w,y,p,m,-1),_,d,256),-1!==E.kl&&e.vE(new a.A(r,t,1,i,s,c.A.qo[E.kl],!0))):o===f.A.kT.id?(h?.hO(t,i,s,I,0,0,g,E.Ma(f.A.fE.id,u.A.jd,w,y,p,m,-1),_,d,512),-1!==E.kl&&e.vE(new a.A(r,t,1,i,s,c.A.qo[E.kl],!0))):o===f.A.xT.id&&(h?.hO(t,i,s,I,0,0,g,E.Ma(f.A.fE.id,u.A.jd,w,y,p,m,-1),_,d,768),-1!==E.kl&&e.vE(new a.A(r,t,1,i,s,c.A.qo[E.kl],!0)))};AO=(t,i,s)=>8&this.ar[t][i][s]?0:t<=0||!(2&this.ar[1][i][s])?t:t-1}},198:(t,i,s)=>{s.d(i,{A:()=>I});var h=s(4583);class e{level;y;x;z;model;bO;qI;LO;RO;SO;MO;kO;info;xO=0;uu=0;constructor(t,i,s,h,e,n,r,o,l,a,c,f,u){this.level=t,this.y=i,this.x=s,this.z=h,this.model=e,this.bO=n,this.qI=r,this.LO=o,this.RO=l,this.SO=a,this.MO=c,this.kO=f,this.info=u}}var n=s(3795);class r{QI;iE;tE;sE;type;DO;NO;PO;FO;UO;wC;mode=0;BO=0;GO=0;HO=0;WO=0;YO=0;VO=0;constructor(t,i,s,h,e,n,r,o,l,a,c){this.QI=t,this.iE=i,this.tE=s,this.sE=h,this.type=e,this.DO=n,this.NO=r,this.PO=o,this.FO=l,this.UO=a,this.wC=c}}var o=s(670);class l{y;x;z;model;kO;info;constructor(t,i,s,h,e,n){this.y=t,this.x=i,this.z=s,this.model=h,this.kO=e,this.info=n}}class a{y;x;z;KO;XO;zO;jO;kO;info;constructor(t,i,s,h,e,n,r,o,l){this.y=t,this.x=i,this.z=s,this.KO=h,this.XO=e,this.zO=n,this.jO=r,this.kO=o,this.info=l}}class c{y;x;z;type;angle;model;kO;info;constructor(t,i,s,h,e,n,r,o){this.y=t,this.x=i,this.z=s,this.type=h,this.angle=e,this.model=n,this.kO=r,this.info=o}}var f=s(6666);class u{y;x;z;ZO;qO;$O;kO;offset;constructor(t,i,s,h,e,n,r,o){this.y=t,this.x=i,this.z=s,this.ZO=h,this.qO=e,this.$O=n,this.kO=r,this.offset=o}}class d{JO;QO;tv;iv;sv;color;flat;constructor(t,i,s,h,e,n,r){this.JO=t,this.QO=i,this.tv=s,this.iv=h,this.sv=e,this.color=n,this.flat=r}}var w=s(8950);class y{static hv=new Int32Array(6);static ev=new Int32Array(6);static nv=new Int32Array(6);static rv=new Int32Array(6);static ov=new Int32Array(6);static lv=[Int8Array.of(1,3,5,7),Int8Array.of(1,3,5,7),Int8Array.of(1,3,5,7),Int8Array.of(1,3,5,7,6),Int8Array.of(1,3,5,7,6),Int8Array.of(1,3,5,7,6),Int8Array.of(1,3,5,7,6),Int8Array.of(1,3,5,7,2,6),Int8Array.of(1,3,5,7,2,8),Int8Array.of(1,3,5,7,2,8),Int8Array.of(1,3,5,7,11,12),Int8Array.of(1,3,5,7,11,12),Int8Array.of(1,3,5,7,13,14)];static av=[Int8Array.of(0,1,2,3,0,0,1,3),Int8Array.of(1,1,2,3,1,0,1,3),Int8Array.of(0,1,2,3,1,0,1,3),Int8Array.of(0,0,1,2,0,0,2,4,1,0,4,3),Int8Array.of(0,0,1,4,0,0,4,3,1,1,2,4),Int8Array.of(0,0,4,3,1,0,1,2,1,0,2,4),Int8Array.of(0,1,2,4,1,0,1,4,1,0,4,3),Int8Array.of(0,4,1,2,0,4,2,5,1,0,4,5,1,0,5,3),Int8Array.of(0,4,1,2,0,4,2,3,0,4,3,5,1,0,4,5),Int8Array.of(0,0,4,5,1,4,1,2,1,4,2,3,1,4,3,5),Int8Array.of(0,0,1,5,0,1,4,5,0,1,2,4,1,0,5,3,1,5,4,3,1,4,2,3),Int8Array.of(1,0,1,5,1,1,4,5,1,1,2,4,0,0,5,3,0,5,4,3,0,4,2,3),Int8Array.of(1,0,5,4,1,0,1,5,0,0,4,3,0,4,5,3,0,5,2,3,0,1,2,5)];static cv=128;static fv=this.cv/2|0;static uv=this.cv/4|0;static dv=3*this.cv/4|0;nC;oC;rC;wv;yv;Av;pv;mv;Iv;Ev;flat;shape;angle;gv;_v;constructor(t,i,s,h,e,n,r,o,l,a,c,f,u,d,w,A,p,m,I){this.flat=!(p!==h||p!==d||p!==o),this.shape=i,this.angle=n,this.gv=u,this._v=l;const E=y.lv[i],g=E.length;this.nC=new Int32Array(g),this.oC=new Int32Array(g),this.rC=new Int32Array(g);const _=new Int32Array(g),C=new Int32Array(g),T=t*y.cv,O=m*y.cv;for(let t=0;t8&&g<=12&&(g=9+(g-n-9&3)),g>12&&g<=16&&(g=13+(g-n-13&3)),1===g?(i=T,l=O,c=p,u=r,m=a):2===g?(i=T+y.fv,l=O,c=p+h>>1,u=r+I>>1,m=a+s>>1):3===g?(i=T+y.cv,l=O,c=h,u=I,m=s):4===g?(i=T+y.cv,l=O+y.fv,c=h+d>>1,u=I+e>>1,m=s+w>>1):5===g?(i=T+y.cv,l=O+y.cv,c=d,u=e,m=w):6===g?(i=T+y.fv,l=O+y.cv,c=d+o>>1,u=e+A>>1,m=w+f>>1):7===g?(i=T,l=O+y.cv,c=o,u=A,m=f):8===g?(i=T,l=O+y.fv,c=o+p>>1,u=A+r>>1,m=f+a>>1):9===g?(i=T+y.fv,l=O+y.uv,c=p+h>>1,u=r+I>>1,m=a+s>>1):10===g?(i=T+y.dv,l=O+y.fv,c=h+d>>1,u=I+e>>1,m=s+w>>1):11===g?(i=T+y.fv,l=O+y.dv,c=d+o>>1,u=e+A>>1,m=w+f>>1):12===g?(i=T+y.uv,l=O+y.fv,c=o+p>>1,u=A+r>>1,m=f+a>>1):13===g?(i=T+y.uv,l=O+y.uv,c=p,u=r,m=a):14===g?(i=T+y.dv,l=O+y.uv,c=h,u=I,m=s):15===g?(i=T+y.dv,l=O+y.dv,c=d,u=e,m=w):(i=T+y.uv,l=O+y.dv,c=o,u=A,m=f),this.nC[t]=i,this.oC[t]=c,this.rC[t]=l,_[t]=u,C[t]=m}const v=y.av[i],b=v.length/4|0;this.pv=new Int32Array(b),this.mv=new Int32Array(b),this.Iv=new Int32Array(b),this.wv=new Int32Array(b),this.yv=new Int32Array(b),this.Av=new Int32Array(b),this.Ev=-1!==c?new Int32Array(b):null;let L=0;for(let t=0;t{this.Sv=0,this.Mv=0,this.kv=t,this.xv=i,this.Dv=t/2|0,this.Nv=i/2|0;const r=new m.Tv(9,32,53,53,!1);for(let t=128;t<=384;t+=32)for(let i=0;i<2048;i+=64){this.Pv=h.A.sin[t],this.Fv=h.A.cos[t],this.Uv=h.A.sin[i],this.Bv=h.A.cos[i];const o=(t-128)/32|0,l=i/64|0;for(let t=-26;t<=26;t++)for(let i=-26;i<=26;i++){const h=128*t,a=128*i;let c=!1;for(let t=-s;t<=e;t+=128)if(this.ub(h,a,n[o]+t)){c=!0;break}r[o][l][t+25+1][i+25+1]=c}}for(let t=0;t<8;t++)for(let i=0;i<32;i++)for(let s=-25;s<25;s++)for(let h=-25;h<25;h++){let e=!1;t:for(let n=-1;n<=1;n++)for(let o=-1;o<=1;o++){if(r[t][i][s+n+25+1][h+o+25+1]){e=!0;break t}if(r[t][(i+1)%31][s+n+25+1][h+o+25+1]){e=!0;break t}if(r[t+1][i][s+n+25+1][h+o+25+1]){e=!0;break t}if(r[t+1][(i+1)%31][s+n+25+1][h+o+25+1]){e=!0;break t}}this.Cv[t][i][s+25][h+25]=e}};static zo=()=>{this.Ov=null,this.Ad=null,this.vv=null,this.Rv=null,this.Cv=null,this.Lv=null,this.$v=null,console.log('World3D unloaded!')};static CO=(t,i,s,h,e,n,o,l)=>{I.vv[t][I.Ad[t]++]=new r(s/128|0,n/128|0,e/128|0,l/128|0,i,s,n,e,l,h,o)};static ub=(t,i,s)=>{const h=i*this.Uv+t*this.Bv>>16,e=i*this.Bv-t*this.Uv>>16,n=s*this.Pv+e*this.Fv>>16,r=s*this.Fv-e*this.Pv>>16;if(n<50||n>3500)return!1;const o=this.Dv+((h<<9)/n|0),l=this.Nv+((r<<9)/n|0);return o>=this.Sv&&o<=this.kv&&l>=this.Mv&&l<=this.xv};wb;iE;sE;yb;Ab;Hr;pb;mb;Ib;Eb=0;gb=0;_b=0;constructor(t,i,s,h){this.wb=s,this.iE=h,this.sE=i,this.Ab=new m.Yr(s,h,i,null),this.pb=new m.gc(s,h+1,i+1),this.yb=t,this.Hr=new m.xs(5e3,null),this.mb=new Int32Array(1e4),this.Ib=new Int32Array(1e4),this.reset()}reset=()=>{for(let t=0;t{this.gb=t;for(let i=0;i{const s=this.Ab[0][t][i];for(let s=0;s<3;s++){this.Ab[s][t][i]=this.Ab[s+1][t][i];const h=this.Ab[s][t][i];h&&h.level--}this.Ab[0][t][i]||(this.Ab[0][t][i]=new n.A(0,t,i));const h=this.Ab[0][t][i];h&&(h.Cb=s),this.Ab[3][t][i]=null};EO=(t,i,s,h)=>{const e=this.Ab[t][i][s];e&&(e.Tb=h)};mO=(t,i,s,h,e,r,o,l,a,c,f,u,w,p,m,I,E,g,_,C)=>{if(h===A.A.pO){for(let h=t;h>=0;h--)this.Ab[h][i][s]||(this.Ab[h][i][s]=new n.A(h,i,s));const h=this.Ab[t][i][s];h&&(h.Ob=new d(f,u,w,p,-1,_,!1))}else if(h===A.A.vb){for(let h=t;h>=0;h--)this.Ab[h][i][s]||(this.Ab[h][i][s]=new n.A(h,i,s));const h=this.Ab[t][i][s];h&&(h.Ob=new d(m,I,E,g,r,C,o===l&&o===a&&o===c))}else{for(let h=t;h>=0;h--)this.Ab[h][i][s]||(this.Ab[h][i][s]=new n.A(h,i,s));const d=this.Ab[t][i][s];d&&(d.bb=new y(i,h,I,l,w,e,f,c,C,m,r,g,_,a,E,p,o,s,u))}};sO=(t,i,s,h,e,r,o)=>{this.Ab[i][s][h]||(this.Ab[i][s][h]=new n.A(i,s,h));const a=this.Ab[i][s][h];a&&(a.Lb=new l(e,128*s+64,128*h+64,t,r,o))};uA=(t,i,s)=>{const h=this.Ab[t][i][s];h&&(h.Lb=null)};iA=(t,i,s,h,e,r,o,l)=>{let a=0;const c=this.Ab[h][t][i];if(c)for(let t=0;ta&&(a=s)}else this.Ab[h][t][i]=new n.A(h,t,i);const f=this.Ab[h][t][i];f&&(f.Mb=new u(s,128*t+64,128*i+64,r,o,l,e,a))};$y=(t,i,s)=>{const h=this.Ab[t][i][s];h&&(h.Mb=null)};RT=(t,i,s,h,e,r,o,l,c,f)=>{if(!o&&!l)return;for(let h=t;h>=0;h--)this.Ab[h][i][s]||(this.Ab[h][i][s]=new n.A(h,i,s));const u=this.Ab[t][i][s];u&&(u.kb=new a(h,128*i+64,128*s+64,e,r,o,l,c,f))};oA=(t,i,s,h)=>{const e=this.Ab[t][i][s];1===h&&e&&(e.kb=null)};hO=(t,i,s,h,e,r,o,l,a,f,u)=>{if(!l)return;for(let h=t;h>=0;h--)this.Ab[h][i][s]||(this.Ab[h][i][s]=new n.A(h,i,s));const d=this.Ab[t][i][s];d&&(d.xb=new c(h,128*i+e+64,128*s+r+64,u,f,l,o,a))};cA=(t,i,s)=>{const h=this.Ab[t][i][s];h&&(h.xb=null)};vO=(t,i,s,h)=>{const e=this.Ab[t][i][s];if(!e)return;const n=e.xb;if(!n)return;const r=128*i+64,o=128*s+64;n.x=r+((n.x-r)*h/16|0),n.z=o+((n.z-o)*h/16|0)};cE=(t,i,s,h)=>{if(!h)return;const e=this.Ab[t][i][s];if(!e)return;const n=e.xb;n&&(n.model=h)};wE=(t,i,s,h)=>{if(!h)return;const e=this.Ab[t][i][s];if(!e)return;const n=e.Lb;n&&(n.model=h)};dE=(t,i,s,h)=>{if(!h)return;const e=this.Ab[t][i][s];if(!e)return;const n=e.kb;n&&(n.zO=h)};uE=(t,i,s,h,e)=>{if(!h)return;const n=this.Ab[s][t][i];if(!n)return;const r=n.kb;r&&(r.zO=h,r.jO=e)};sA=(t,i,s,h,e,n,r,o,l,a,c)=>{if(!e&&!n)return!0;const f=128*i+64*l,u=128*s+64*a;return this.Db(f,u,h,t,i,s,l,a,e,n,r,o,c,!1)};ZI=(t,i,s,h,e,n,r,o,l,a)=>{if(!e&&!n)return!0;let c=i-l,f=h-l,u=i+l,d=h+l;return a&&(o>640&&o<1408&&(d+=128),o>1152&&o<1920&&(u+=128),(o>1664||o<384)&&(f-=128),o>128&&o<896&&(c-=128)),c=c/128|0,f=f/128|0,u=u/128|0,d=d/128|0,this.Db(i,h,s,t,c,f,u+1-c,d-f+1,e,n,r,0,o,!0)};JI=(t,i,s,h,e,n,r,o,l,a,c,f)=>!l&&!a||this.Db(i,h,s,t,e,n,r+1-e,o-n+1,l,a,c,0,f,!0);fA=(t,i,s)=>{const h=this.Ab[t][i][s];if(h)for(let t=0;t>29&3)&&e.LO===i&&e.SO===s)return void this.Nb(e)}};aE=(t,i,s,h)=>{if(!h)return;const e=this.Ab[t][i][s];if(e)for(let t=0;t>29&3))return void(i.model=h)}};yu=()=>{for(let t=0;t{const h=this.Ab[t][i][s];return h&&h.kb?h.kb.kO:0};nA=(t,i,s)=>{const h=this.Ab[t][s][i];return h&&h.xb?h.xb.kO:0};Qd=(t,i,s)=>{const h=this.Ab[t][i][s];if(!h)return 0;for(let t=0;t>29&3)&&e.LO===i&&e.SO===s)return e.kO}return 0};Fd=(t,i,s)=>{const h=this.Ab[t][i][s];return h&&h.Lb?h.Lb.kO:0};Vd=(t,i,s,h)=>{const e=this.Ab[t][i][s];if(e){if(e.kb&&e.kb.kO===h)return 255&e.kb.info;if(e.xb&&e.xb.kO===h)return 255&e.xb.info;if(e.Lb&&e.Lb.kO===h)return 255&e.Lb.info;for(let t=0;t{const n=i*(0|Math.sqrt(s*s+h*h+e*e))>>8;for(let i=0;i{if(i0){const e=this.Ab[t][i+1][s-1];e&&e.Lb&&e.Lb.model&&e.Lb.model.Pb&&this.Ub(h,e.Lb.model,128,0,-128,!0)}};Fb=(t,i,s,h,e,n)=>{let r=!0,o=i;const l=i+h,a=s-1,c=s+e;for(let f=t;f<=t+1;f++)if(f!==this.wb){for(let u=o;u<=l;u++)if(!(u<0||u>=this.iE))for(let o=a;o<=c;o++){if(o<0||o>=this.sE||r&&u=s||u===i))continue;const a=this.Ab[f][u][o];if(!a)continue;const d=128*(u-i)+64*(1-h),w=128*(o-s)+64*(1-e),y=((this.yb[f][u][o]+this.yb[f][u+1][o]+this.yb[f][u][o+1]+this.yb[f][u+1][o+1])/4|0)-((this.yb[t][i][s]+this.yb[t][i+1][s]+this.yb[t][i][s+1]+this.yb[t][i+1][s+1])/4|0),A=a.kb;A&&A.zO&&A.zO.Pb&&this.Ub(n,A.zO,d,y,w,r),A&&A.jO&&A.jO.Pb&&this.Ub(n,A.jO,d,y,w,r);for(let t=0;t{this._b++;let r=0;const o=i.nC,l=i.eC;if(t.Pb&&t.Hb)for(let n=0;ni.UO)continue;const u=t.nC[n]-s;if(ui.NO)continue;const d=t.rC[n]-e;if(di.FO)continue;if(i.Pb&&i.Hb)for(let t=0;t{const r=this.Ab[t][i][s];if(!r)return;const o=r.Ob;if(o){const t=o.color;if(0!==t)for(let i=0;i<4;i++)h[e]=t,h[e+1]=t,h[e+2]=t,h[e+3]=t,e+=n;return}const l=r.bb;if(!l)return;const a=l.shape,c=l.angle,f=l.gv,u=l._v,d=I.ab[a],w=I.cb[c];let y=0;if(0===f)for(let t=0;t<4;t++)0!==d[w[y++]]&&(h[e]=u),0!==d[w[y++]]&&(h[e+1]=u),0!==d[w[y++]]&&(h[e+2]=u),0!==d[w[y++]]&&(h[e+3]=u),e+=n;else for(let t=0;t<4;t++)h[e]=0===d[w[y++]]?f:u,h[e+1]=0===d[w[y++]]?f:u,h[e+2]=0===d[w[y++]]?f:u,h[e+3]=0===d[w[y++]]?f:u,e+=n};click=(t,i)=>{I.qv=!0,I.sa=t,I.ha=i,I.xf=-1,I.Df=-1};draw=(t,i,s,e,n,r,o)=>{t<0?t=0:t>=128*this.iE&&(t=128*this.iE-1),s<0?s=0:s>=128*this.sE&&(s=128*this.sE-1),I.uu++,I.Pv=h.A.sin[r],I.Fv=h.A.cos[r],I.Uv=h.A.sin[n],I.Bv=h.A.cos[n],I.$v=I.Cv[(r-128)/32|0][n/64|0],I.Gv=t,I.Hv=i,I.Wv=s,I.Yv=t/128|0,I.Vv=s/128|0,I.pd=e,I.Kv=I.Yv-25,I.Kv<0&&(I.Kv=0),I.zv=I.Vv-25,I.zv<0&&(I.zv=0),I.Xv=I.Yv+25,I.Xv>this.iE&&(I.Xv=this.iE),I.jv=I.Vv+25,I.jv>this.sE&&(I.jv=this.sE),this.zb(),I.Zv=0;for(let t=this.gb;t=2e3)?(r.visible=!0,r.update=!0,r.jb=r.Rb>0,I.Zv++):(r.visible=!1,r.update=!1,r.Zb=0))}}for(let t=this.gb;t=I.Xv))for(let t=-25;t<=0;t++){const e=I.Vv+t,n=I.Vv-t;let r;if(s>=I.Kv&&(e>=I.zv&&(r=i[s][e],r&&r.visible&&this.qb(r,!0,o)),n=I.zv&&(r=i[h][e],r&&r.visible&&this.qb(r,!0,o)),n=I.Xv))for(let t=-25;t<=0;t++){const e=I.Vv+t,n=I.Vv-t;let r;if(s>=I.Kv&&(e>=I.zv&&(r=i[s][e],r&&r.visible&&this.qb(r,!1,o)),n=I.zv&&(r=i[h][e],r&&r.visible&&this.qb(r,!1,o)),n{if(!c&&!f)return!1;for(let t=r;t=this.iE||i>=this.sE)return!1;const s=this.Ab[h][t][i];if(s&&s.Rb>=5)return!1}const A=new e(h,s,t,i,c,f,w,r,r+l-1,o,o+a-1,u,d);for(let t=r;tr&&(s|=1),to&&(s+=8),i=0;s--)this.Ab[s][t][i]||(this.Ab[s][t][i]=new n.A(s,t,i));const e=this.Ab[h][t][i];e&&(e.Sb[e.Rb]=A,e.$b[e.Rb]=s,e.Jb|=s,e.Rb++)}return y&&(this.Hr[this.Eb++]=A),!0};Nb=t=>{for(let i=t.LO;i<=t.RO;i++)for(let s=t.SO;s<=t.MO;s++){const h=this.Ab[t.level][i][s];if(h){for(let i=0;i{const t=I.Ad[I.pd],i=I.vv[I.pd];I.md=0;for(let s=0;s=0&&h<=50){e=t.tE+25-I.Vv,e<0&&(e=0),n=t.sE+25-I.Vv,n>50&&(n=50);let i=!1;for(;e<=n;)if(I.$v&&I.$v[h][e++]){i=!0;break}if(i){if(r=I.Gv-t.DO,r>32)t.mode=1;else{if(r>=-32)continue;t.mode=2,r=-r}t.HO=(t.PO-I.Wv<<8)/r|0,t.WO=(t.FO-I.Wv<<8)/r|0,t.YO=(t.UO-I.Hv<<8)/r|0,t.VO=(t.wC-I.Hv<<8)/r|0,I.Lv[I.md++]=t}}}else if(2===t.type){if(h=t.tE+25-I.Vv,h>=0&&h<=50){e=t.QI+25-I.Yv,e<0&&(e=0),n=t.iE+25-I.Yv,n>50&&(n=50);let i=!1;for(;e<=n;)if(I.$v&&I.$v[e++][h]){i=!0;break}if(i){if(r=I.Wv-t.PO,r>32)t.mode=3;else{if(r>=-32)continue;t.mode=4,r=-r}t.BO=(t.DO-I.Gv<<8)/r|0,t.GO=(t.NO-I.Gv<<8)/r|0,t.YO=(t.UO-I.Hv<<8)/r|0,t.VO=(t.wC-I.Hv<<8)/r|0,I.Lv[I.md++]=t}}}else if(4===t.type&&(h=t.UO-I.Hv,h>128&&(e=t.tE+25-I.Vv,e<0&&(e=0),n=t.sE+25-I.Vv,n>50&&(n=50),e<=n))){let i=t.QI+25-I.Yv;i<0&&(i=0),r=t.iE+25-I.Yv,r>50&&(r=50);let s=!1;t:for(let t=i;t<=r;t++)for(let i=e;i<=n;i++)if(I.$v&&I.$v[t][i]){s=!0;break t}s&&(t.mode=5,t.BO=(t.DO-I.Gv<<8)/h|0,t.GO=(t.NO-I.Gv<<8)/h|0,t.HO=(t.PO-I.Wv<<8)/h|0,t.WO=(t.FO-I.Wv<<8)/h|0,I.Lv[I.md++]=t)}}};qb=(t,i,s)=>{for(I.Rv.vE(t);;){let t;do{if(t=I.Rv.Qb(),!t)return}while(!t.update);const h=t.x,e=t.z,n=t.level,r=t.tL,o=this.Ab[n];if(t.visible){if(i){if(n>0){const t=this.Ab[n-1][h][e];if(t&&t.update)continue}if(h<=I.Yv&&h>I.Kv){const i=o[h-1][e];if(i&&i.update&&(i.visible||!(1&t.Jb)))continue}if(h>=I.Yv&&hI.zv){const i=o[h][e-1];if(i&&i.update&&(i.visible||!(8&t.Jb)))continue}if(e>=I.Vv&&ee&&(a+=6),c=I.Jv[a],t.eL=I.tb[a]),f&&(f.KO&I.Qv[a]?16===f.KO?(t.Zb=3,t.nL=I.ib[a],t.rL=3-t.nL):32===f.KO?(t.Zb=6,t.nL=I.sb[a],t.rL=6-t.nL):64===f.KO?(t.Zb=12,t.nL=I.hb[a],t.rL=12-t.nL):(t.Zb=9,t.nL=I.eb[a],t.rL=9-t.nL):t.Zb=0,f.KO&c&&!this.oL(r,h,e,f.KO)&&f.zO?.draw(0,I.Pv,I.Fv,I.Uv,I.Bv,f.x-I.Gv,f.y-I.Hv,f.z-I.Wv,f.kO),f.XO&c&&!this.oL(r,h,e,f.XO)&&f.jO?.draw(0,I.Pv,I.Fv,I.Uv,I.Bv,f.x-I.Gv,f.y-I.Hv,f.z-I.Wv,f.kO)),u&&!this.visible(r,h,e,u.model.wC))if(u.type&c)u.model.draw(u.angle,I.Pv,I.Fv,I.Uv,I.Bv,u.x-I.Gv,u.y-I.Hv,u.z-I.Wv,u.kO);else if(768&u.type){const t=u.x-I.Gv,i=u.y-I.Hv,s=u.z-I.Wv,h=u.angle;let e,n;if(e=h===p.A.Zd||h===p.A.qd?-t:t,n=h===p.A.qd||h===p.A.$d?-s:s,256&u.type&&ne){const e=t+I.ob[h],n=s+I.lb[h];u.model.draw(512*h+1280&2047,I.Pv,I.Fv,I.Uv,I.Bv,e,i,n,u.kO)}}if(l){const i=t.Lb;i&&i.model?.draw(0,I.Pv,I.Fv,I.Uv,I.Bv,i.x-I.Gv,i.y-I.Hv,i.z-I.Wv,i.kO);const s=t.Mb;s&&0===s.offset&&(s.$O&&s.$O.draw(0,I.Pv,I.Fv,I.Uv,I.Bv,s.x-I.Gv,s.y-I.Hv,s.z-I.Wv,s.kO),s.qO&&s.qO.draw(0,I.Pv,I.Fv,I.Uv,I.Bv,s.x-I.Gv,s.y-I.Hv,s.z-I.Wv,s.kO),s.ZO&&s.ZO.draw(0,I.Pv,I.Fv,I.Uv,I.Bv,s.x-I.Gv,s.y-I.Hv,s.z-I.Wv,s.kO))}const d=t.Jb;if(0!==d){if(hI.Yv&&1&d){const t=o[h-1][e];t&&t.update&&I.Rv.vE(t)}if(e>I.Vv&&8&d){const t=o[h][e-1];t&&t.update&&I.Rv.vE(t)}}}if(0!==t.Zb){let i=!0;for(let s=0;si.LO&&(n+=1),si.SO&&(n+=8),hh&&(h=e);const r=I.Vv-i.SO,l=i.MO-I.Vv;i.xO=l>r?h+l:h+r}for(;;){let t=-50,i=-1;for(let s=0;st&&(t=h.xO,i=s))}if(-1===i)break;const l=I.Ov[i];if(l){l.uu=I.uu;let t=l.model;t||(t=l.bO?.draw(s)??null),t&&!this.lL(r,l.LO,l.RO,l.SO,l.MO,t.wC)&&t.draw(l.qI,I.Pv,I.Fv,I.Uv,I.Bv,l.x-I.Gv,l.y-I.Hv,l.z-I.Wv,l.kO);for(let t=l.LO;t<=l.RO;t++)for(let i=l.SO;i<=l.MO;i++){const s=o[t][i];s&&(0!==s.Zb?I.Rv.vE(s):t===h&&i===e||!s.update||I.Rv.vE(s))}}}if(t.jb)continue}if(!t.update||0!==t.Zb)continue;if(h<=I.Yv&&h>I.Kv){const t=o[h-1][e];if(t&&t.update)continue}if(h>=I.Yv&&hI.zv){const t=o[h][e-1];if(t&&t.update)continue}if(e>=I.Vv&&e=n){const n=t+I.nb[e],r=h+I.rb[e];i.model.draw(512*e+256,I.Pv,I.Fv,I.Uv,I.Bv,n,s,r,i.kO)}if(512&i.type&&r<=n){const n=t+I.ob[e],r=h+I.lb[e];i.model.draw(512*e+1280&2047,I.Pv,I.Fv,I.Uv,I.Bv,n,s,r,i.kO)}}const s=t.kb;s&&(s.XO&t.eL&&!this.oL(r,h,e,s.XO)&&s.jO?.draw(0,I.Pv,I.Fv,I.Uv,I.Bv,s.x-I.Gv,s.y-I.Hv,s.z-I.Wv,s.kO),s.KO&t.eL&&!this.oL(r,h,e,s.KO)&&s.zO?.draw(0,I.Pv,I.Fv,I.Uv,I.Bv,s.x-I.Gv,s.y-I.Hv,s.z-I.Wv,s.kO))}if(nI.Yv){const t=o[h-1][e];t&&t.update&&I.Rv.vE(t)}if(e>I.Vv){const t=o[h][e-1];t&&t.update&&I.Rv.vE(t)}}};sL=(t,i,s,e,n,r,o,l)=>{let a,c,f,u,d=a=(s<<7)-I.Gv,y=c=(e<<7)-I.Wv,A=f=d+128,p=u=y+128,m=this.yb[i][s][e]-I.Hv,E=this.yb[i][s+1][e]-I.Hv,g=this.yb[i][s+1][e+1]-I.Hv,_=this.yb[i][s][e+1]-I.Hv,C=y*o+d*l>>16;if(y=y*l-d*o>>16,d=C,C=m*r-y*n>>16,y=m*n+y*r>>16,m=C,y<50)return;if(C=c*o+A*l>>16,c=c*l-A*o>>16,A=C,C=E*r-c*n>>16,c=E*n+c*r>>16,E=C,c<50)return;if(C=p*o+f*l>>16,p=p*l-f*o>>16,f=C,C=g*r-p*n>>16,p=g*n+p*r>>16,g=C,p<50)return;if(C=u*o+a*l>>16,u=u*l-a*o>>16,a=C,C=_*r-u*n>>16,u=_*n+u*r>>16,_=C,u<50)return;const T=h.A.La+((d<<9)/y|0),O=h.A.Ra+((m<<9)/y|0),v=h.A.La+((A<<9)/c|0),b=h.A.Ra+((E<<9)/c|0),L=h.A.La+((f<<9)/p|0),R=h.A.Ra+((g<<9)/p|0),S=h.A.La+((a<<9)/u|0),M=h.A.Ra+((_<<9)/u|0);if(h.A.alpha=0,(L-S)*(b-M)-(R-M)*(v-S)>0)if(h.A.aL=L<0||S<0||v<0||L>w.A.cL||S>w.A.cL||v>w.A.cL,I.qv&&this.fL(I.sa,I.ha,R,M,b,L,S,v)&&(I.xf=s,I.Df=e),-1===t.sv)12345678!==t.tv&&h.A.uL(L,S,v,R,M,b,t.tv,t.iv,t.QO);else if(I.Tt){const i=I.fb[t.sv];h.A.uL(L,S,v,R,M,b,this.dL(i,t.tv),this.dL(i,t.iv),this.dL(i,t.QO))}else t.flat?h.A.wL(L,S,v,R,M,b,t.tv,t.iv,t.QO,d,m,y,A,a,E,_,c,u,t.sv):h.A.wL(L,S,v,R,M,b,t.tv,t.iv,t.QO,f,g,p,a,A,_,E,u,c,t.sv);if(!((T-v)*(M-b)-(O-b)*(S-v)<=0))if(h.A.aL=T<0||v<0||S<0||T>w.A.cL||v>w.A.cL||S>w.A.cL,I.qv&&this.fL(I.sa,I.ha,O,b,M,T,v,S)&&(I.xf=s,I.Df=e),-1!==t.sv){if(!I.Tt)return void h.A.wL(T,v,S,O,b,M,t.JO,t.QO,t.iv,d,m,y,A,a,E,_,c,u,t.sv);const i=I.fb[t.sv];h.A.uL(T,v,S,O,b,M,this.dL(i,t.JO),this.dL(i,t.QO),this.dL(i,t.iv))}else 12345678!==t.JO&&h.A.uL(T,v,S,O,b,M,t.JO,t.QO,t.iv)};hL=(t,i,s,e,n,r,o)=>{let l=s.nC.length;for(let t=0;t>16;if(a=a*o-i*r>>16,i=c,c=l*n-a*e>>16,a=l*e+a*n>>16,l=c,a<50)return;s.Ev&&(y.nv[t]=i,y.rv[t]=l,y.ov[t]=a),y.hv[t]=h.A.La+((i<<9)/a|0),y.ev[t]=h.A.Ra+((l<<9)/a|0)}h.A.alpha=0,l=s.pv.length;for(let e=0;e0)if(h.A.aL=l<0||a<0||c<0||l>w.A.cL||a>w.A.cL||c>w.A.cL,I.qv&&this.fL(I.sa,I.ha,f,u,d,l,a,c)&&(I.xf=t,I.Df=i),s.Ev&&-1!==s.Ev[e])if(I.Tt){const t=I.fb[s.Ev[e]];h.A.uL(l,a,c,f,u,d,this.dL(t,s.wv[e]),this.dL(t,s.yv[e]),this.dL(t,s.Av[e]))}else s.flat?h.A.wL(l,a,c,f,u,d,s.wv[e],s.yv[e],s.Av[e],y.nv[0],y.rv[0],y.ov[0],y.nv[1],y.nv[3],y.rv[1],y.rv[3],y.ov[1],y.ov[3],s.Ev[e]):h.A.wL(l,a,c,f,u,d,s.wv[e],s.yv[e],s.Av[e],y.nv[n],y.rv[n],y.ov[n],y.nv[r],y.nv[o],y.rv[r],y.rv[o],y.ov[r],y.ov[o],s.Ev[e]);else 12345678!==s.wv[e]&&h.A.uL(l,a,c,f,u,d,s.wv[e],s.yv[e],s.Av[e])}};iL=(t,i,s)=>{const h=this.pb[t][i][s];if(h===-I.uu)return!1;if(h===I.uu)return!0;{const h=i<<7,e=s<<7;return this.yL(h+1,this.yb[t][i][s],e+1)&&this.yL(h+128-1,this.yb[t][i+1][s],e+1)&&this.yL(h+128-1,this.yb[t][i+1][s+1],e+128-1)&&this.yL(h+1,this.yb[t][i][s+1],e+128-1)?(this.pb[t][i][s]=I.uu,!0):(this.pb[t][i][s]=-I.uu,!1)}};oL=(t,i,s,h)=>{if(!this.iL(t,i,s))return!1;const e=i<<7,n=s<<7,r=this.yb[t][i][s]-1,o=r-120,l=r-230,a=r-238;if(h<16){if(1===h){if(e>I.Gv){if(!this.yL(e,r,n))return!1;if(!this.yL(e,r,n+128))return!1}if(t>0){if(!this.yL(e,o,n))return!1;if(!this.yL(e,o,n+128))return!1}return!!this.yL(e,l,n)&&this.yL(e,l,n+128)}if(2===h){if(n0){if(!this.yL(e,o,n+128))return!1;if(!this.yL(e+128,o,n+128))return!1}return!!this.yL(e,l,n+128)&&this.yL(e+128,l,n+128)}if(4===h){if(e0){if(!this.yL(e+128,o,n))return!1;if(!this.yL(e+128,o,n+128))return!1}return!!this.yL(e+128,l,n)&&this.yL(e+128,l,n+128)}if(8===h){if(n>I.Wv){if(!this.yL(e,r,n))return!1;if(!this.yL(e+128,r,n))return!1}if(t>0){if(!this.yL(e,o,n))return!1;if(!this.yL(e+128,o,n))return!1}return!!this.yL(e,l,n)&&this.yL(e+128,l,n)}}return!!this.yL(e+64,a,n+64)&&(16===h?this.yL(e,l,n+128):32===h?this.yL(e+128,l,n+128):64===h?this.yL(e+128,l,n):128===h?this.yL(e,l,n):(console.warn('Warning unsupported wall type!'),!0))};visible=(t,i,s,h)=>{if(this.iL(t,i,s)){const e=i<<7,n=s<<7;return this.yL(e+1,this.yb[t][i][s]-h,n+1)&&this.yL(e+128-1,this.yb[t][i+1][s]-h,n+1)&&this.yL(e+128-1,this.yb[t][i+1][s+1]-h,n+128-1)&&this.yL(e+1,this.yb[t][i][s+1]-h,n+128-1)}return!1};lL=(t,i,s,h,e,n)=>{let r,o;if(i!==s||h!==e){for(r=i;r<=s;r++)for(o=h;o<=e;o++)if(this.pb[t][r][o]===-I.uu)return!1;o=1+(i<<7);const l=2+(h<<7),a=this.yb[t][i][h]-n;if(!this.yL(o,a,l))return!1;const c=(s<<7)-1;if(!this.yL(c,a,l))return!1;const f=(e<<7)-1;return!!this.yL(o,a,f)&&this.yL(c,a,f)}return!!this.iL(t,i,h)&&(r=i<<7,o=h<<7,this.yL(r+1,this.yb[t][i][h]-n,o+1)&&this.yL(r+128-1,this.yb[t][i+1][h]-n,o+1)&&this.yL(r+128-1,this.yb[t][i+1][h+1]-n,o+128-1)&&this.yL(r+1,this.yb[t][i][h+1]-n,o+128-1))};yL=(t,i,s)=>{for(let h=0;h0){const t=e.PO+(e.HO*h>>8),n=e.FO+(e.WO*h>>8),r=e.UO+(e.YO*h>>8),o=e.wC+(e.VO*h>>8);if(s>=t&&s<=n&&i>=r&&i<=o)return!0}}else if(2===e.mode){const h=t-e.DO;if(h>0){const t=e.PO+(e.HO*h>>8),n=e.FO+(e.WO*h>>8),r=e.UO+(e.YO*h>>8),o=e.wC+(e.VO*h>>8);if(s>=t&&s<=n&&i>=r&&i<=o)return!0}}else if(3===e.mode){const h=e.PO-s;if(h>0){const s=e.DO+(e.BO*h>>8),n=e.NO+(e.GO*h>>8),r=e.UO+(e.YO*h>>8),o=e.wC+(e.VO*h>>8);if(t>=s&&t<=n&&i>=r&&i<=o)return!0}}else if(4===e.mode){const h=s-e.PO;if(h>0){const s=e.DO+(e.BO*h>>8),n=e.NO+(e.GO*h>>8),r=e.UO+(e.YO*h>>8),o=e.wC+(e.VO*h>>8);if(t>=s&&t<=n&&i>=r&&i<=o)return!0}}else if(5===e.mode){const h=i-e.UO;if(h>0){const i=e.DO+(e.BO*h>>8),n=e.NO+(e.GO*h>>8),r=e.PO+(e.HO*h>>8),o=e.FO+(e.WO*h>>8);if(t>=i&&t<=n&&s>=r&&s<=o)return!0}}}return!1};fL=(t,i,s,h,e,n,r,o)=>{if(is&&i>h&&i>e)return!1;if(tn&&t>r&&t>o)return!1;const l=(i-h)*(o-r)-(t-r)*(e-h);return((i-s)*(r-n)-(t-n)*(h-s))*l>0&&l*((i-e)*(n-o)-(t-o)*(s-e))>0};dL=(t,i)=>((i=(127-i)*(127&t)/160|0)<2?i=2:i>126&&(i=126),(65408&t)+i)}},7121:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{}},4197:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{dm;lE;fm;um;index;oE;Nl;Dl;constructor(t,i,s,h,e,n,r){super(),this.dm=i,this.lE=s,this.fm=h,this.um=e,this.index=t,this.oE=n,r&&-1!==n.Fl&&this.oE.delay?(this.Nl=Math.random()*this.oE.Pl|0,this.Dl=Math.random()*this.oE.delay[this.Nl]|0):(this.Nl=-1,this.Dl=0)}}},8412:(t,i,s)=>{s.d(i,{A:()=>o});var h=s(9418),e=s(8665),n=s(8738),r=s(1312);class o extends h.A{static Xu=2;static ju=4;static qu=8;static $u=16;static rd=32;static hd=64;static Ju=128;type=null;draw(t){if(!this.type)return null;if(-1===this.ed||-1===this.mI)return this.pC();const i=this.pC();if(!i)return null;const s=n.A.qo[this.ed],h=e.A.y_(s.Ma(),!0,!s.Y_,!1);h.translate(-this.AI,0,0),h.tc(),s.oE&&s.oE.frames&&h.ic(s.oE.frames[this.mI]),h.cC=null,h.fC=null,128===s.yC&&128===s.AC||h.scale(s.yC,s.AC,s.yC),h.sc(64+s.K_,850+s.X_,-30,-50,-30,!0);const r=[i,h],o=e.A.pL(r,2);return 1===this.type.size&&(o.gC=!0),o}isVisible(){return null!==this.type}pC(){if(!this.type)return null;if(this.zu>=0&&0===this.dI){const t=r.A.qo[this.zu].frames;if(t){const i=t[this.fI];let s=-1;if(this.KI>=0&&this.KI!==this.Qa){const t=r.A.qo[this.KI].frames;t&&(s=t[this.EE])}return this.type.pC(i,s,r.A.qo[this.zu].CE)}}let t=-1;if(this.KI>=0){const i=r.A.qo[this.KI].frames;i&&(t=i[this.EE])}const i=this.type.pC(t,-1,null);return i?(this.height=i.wC,i):null}}},3606:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{index;count;constructor(t,i){super(),this.index=t,this.count=i}}},9418:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(7121),e=s(1312),n=s(3867);class r extends h.A{x=0;z=0;qI=0;$I=!1;size=1;Qa=-1;mE=-1;LI=-1;SI=-1;kI=-1;DI=-1;OE=-1;Ru=null;Du=100;ku=0;xu=0;Bu=0;Uu=0;Nu=-1e3;Pu=0;Fu=0;Zu=-1;wI=0;yI=0;KI=-1;EE=0;IE=0;zu=-1;fI=0;uI=0;dI=0;cI=0;ed=-1;mI=0;II=0;pI=0;AI=0;EI=0;_I=0;gI=0;CI=0;Gu=0;Hu=0;TI=0;uu=0;height=0;pE=0;pathLength=0;Pf=new Int32Array(10);Ff=new Int32Array(10);TE=new n.xs(10,!1);AE=0;Yu=-1;Vu=-1;Qu=-1;td=-1;move(t,i,s){if(-1!==this.zu&&e.A.qo[this.zu].priority<=1&&(this.zu=-1),!t){const t=i-this.Pf[0],h=s-this.Ff[0];if(t>=-8&&t<=8&&h>=-8&&h<=8){this.pathLength<9&&this.pathLength++;for(let t=this.pathLength;t>0;t--)this.Pf[t]=this.Pf[t-1],this.Ff[t]=this.Ff[t-1],this.TE[t]=this.TE[t-1];return this.Pf[0]=i,this.Ff[0]=s,void(this.TE[0]=!1)}}this.pathLength=0,this.AE=0,this.Pf[0]=i,this.Ff[0]=s,this.x=128*this.Pf[0]+64*this.size,this.z=128*this.Ff[0]+64*this.size}step(t,i){let s=this.Pf[0],h=this.Ff[0];0===i?(s--,h++):1===i?h++:2===i?(s++,h++):3===i?s--:4===i?s++:5===i?(s--,h--):6===i?h--:7===i&&(s++,h--),-1!==this.zu&&e.A.qo[this.zu].priority<=1&&(this.zu=-1),this.pathLength<9&&this.pathLength++;for(let t=this.pathLength;t>0;t--)this.Pf[t]=this.Pf[t-1],this.Ff[t]=this.Ff[t-1],this.TE[t]=this.TE[t-1];this.Pf[0]=s,this.Ff[0]=h,this.TE[0]=t}}},8268:(t,i,s)=>{s.d(i,{A:()=>d});var h=s(9418),e=s(8665),n=s(2031),r=s(8738),o=s(1312),l=s(8317),a=s(1302),c=s(3819),f=s(3867),u=s(9298);class d extends h.A{static Ku=1;static Xu=2;static ju=4;static qu=8;static $u=16;static Ju=32;static sd=64;static lI=128;static hd=256;static nd=512;static Ja=[u.A.mL,u.A.IL,u.A.EL,u.A.gL,u.A._L,u.A.CL,u.A.TL,u.A.OL,u.A.vL,u.A.bL,u.A.LL,u.A.RL,u.A.SL,u.A.ML,u.A.kL,u.A.xL];static $a=[[u.A.DL,u.A.NL,u.A.PL,u.A.FL,u.A.UL,u.A.BL,u.A.HL,u.A.WL,u.A.YL,u.A.VL,u.A.KL,u.A.XL],[u.A.zL,u.A.jL,u.A.ZL,u.A.qL,u.A.$L,u.A.JL,u.A.QL,u.A.tR,u.A.iR,u.A.sR,u.A.hR,u.A.eR,u.A.nR,u.A.rR,u.A.oR,u.A.lR],[u.A.lR-1,u.A.zL+1,u.A.jL,u.A.ZL,u.A.qL,u.A.$L,u.A.JL,u.A.QL,u.A.tR,u.A.iR,u.A.sR,u.A.hR,u.A.eR,u.A.nR,u.A.rR,u.A.oR],[u.A.aR,u.A.cR,u.A.fR,u.A.uR,u.A.dR,u.A.wR],[u.A.yR,u.A.AR,u.A.pR,u.A.mR,u.A.IR,u.A.ER,u.A.gR,u.A._R]];static $o=new n.A(200);name=null;visible=!1;CR=0;Lu=0;TR=new Uint16Array(12);OR=new Uint16Array(5);wc=0;vR=0n;y=0;zI=0;jI=0;bE=0;RE=0;LE=0;XI=null;QI=0;tE=0;iE=0;sE=0;Tt=!1;draw(t){if(!this.visible)return null;let i=this.pC();if(this.height=i.wC,i.gC=!0,this.Tt)return i;if(-1!==this.ed&&-1!==this.mI){const t=r.A.qo[this.ed],s=e.A.y_(t.Ma(),!0,!t.Y_,!1);s.translate(-this.AI,0,0),s.tc(),t.oE&&t.oE.frames&&s.ic(t.oE.frames[this.mI]),s.cC=null,s.fC=null,128===t.yC&&128===t.AC||s.scale(t.yC,t.AC,t.yC),s.sc(t.K_+64,t.X_+850,-30,-50,-30,!0);const h=[i,s];i=e.A.pL(h,2)}if(this.XI&&(t>=this.jI&&(this.XI=null),t>=this.zI&&t=d.$a[i].length)&&(s=0),this.OR[i]=s}this.Qa=t.ct,65535===this.Qa&&(this.Qa=-1),this.mE=t.ct,65535===this.mE&&(this.mE=-1),this.LI=t.ct,65535===this.LI&&(this.LI=-1),this.SI=t.ct,65535===this.SI&&(this.SI=-1),this.kI=t.ct,65535===this.kI&&(this.kI=-1),this.DI=t.ct,65535===this.DI&&(this.DI=-1),this.OE=t.ct,65535===this.OE&&(this.OE=-1),this.name=c.A.Ka(c.A.Xa(t.rf)),this.wc=t.gA,this.visible=!0,this.vR=0n;for(let t=0;t<12;t++)this.vR<<=0x4n,this.TR[t]>=256&&(this.vR+=BigInt(this.TR[t])-256n);this.TR[0]>=256&&(this.vR+=BigInt(this.TR[0])-256n>>4n),this.TR[1]>=256&&(this.vR+=BigInt(this.TR[1])-256n>>8n);for(let t=0;t<5;t++)this.vR<<=0x3n,this.vR+=BigInt(this.OR[t]);this.vR<<=0x1n,this.vR+=BigInt(this.CR)}SA(){if(!this.visible)return null;const t=new f.xs(12,null);let i=0;for(let s=0;s<12;s++){const h=this.TR[s];if(h>=256&&h<512&&(t[i++]=l.A.qo[h-256].SA()),h>=512){const s=a.A.get(h-512).SA(this.CR);s&&(t[i++]=s)}}const s=e.A.Za(t,i);for(let t=0;t<5;t++)0!==this.OR[t]&&(s.qa(d.$a[t][0],d.$a[t][this.OR[t]]),1===t&&s.qa(d.Ja[0],d.Ja[this.OR[t]]));return s}pC(){let t=this.vR,i=-1,s=-1,h=-1,n=-1;if(this.zu>=0&&0===this.dI){const e=o.A.qo[this.zu];if(e.frames&&(i=e.frames[this.fI]),this.KI>=0&&this.KI!==this.Qa){const t=o.A.qo[this.KI].frames;t&&(s=t[this.EE])}e.qC>=0&&(h=e.qC,t+=BigInt(h-this.TR[5])<<8n),e.$C>=0&&(n=e.$C,t+=BigInt(n-this.TR[3])<<16n)}else if(this.KI>=0){const t=o.A.qo[this.KI].frames;t&&(i=t[this.EE])}let r=d.$o?.get(t);if(!r){const i=new f.xs(12,null);let s=0;for(let t=0;t<12;t++){let e=this.TR[t];if(n>=0&&3===t&&(e=n),h>=0&&5===t&&(e=h),e>=256&&e<512){const t=l.A.qo[e-256].Ma();t&&(i[s++]=t)}if(e>=512){const t=a.A.get(e-512).ZC(this.CR);t&&(i[s++]=t)}}r=e.A.Za(i,s);for(let t=0;t<5;t++)0!==this.OR[t]&&(r.qa(d.$a[t][0],d.$a[t][this.OR[t]]),1===t&&r.qa(d.Ja[0],d.Ja[this.OR[t]]));r.tc(),r.sc(64,850,-30,-50,-30,!0),d.$o?.put(t,r)}if(this.Tt)return r;const c=e.A.mC(r,!0);return-1!==i&&-1!==s?c.IC(i,s,o.A.qo[this.zu].CE):-1!==i&&c.ic(i),c.EC(),c.cC=null,c.fC=null,c}}},254:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(8738),e=s(7121),n=s(8665);class r extends e.A{bR;level;LR;RR;SR;offsetY;eE;hE;MR;arc;target;mobile=!1;x=0;z=0;y=0;velocityX=0;kR=0;xR=0;velocityY=0;DR=0;qI=0;pitch=0;Nl=0;Dl=0;constructor(t,i,s,e,n,r,o,l,a,c,f){super(),this.bR=h.A.qo[t],this.level=i,this.LR=s,this.RR=n,this.SR=e,this.eE=r,this.hE=o,this.MR=l,this.arc=a,this.target=c,this.offsetY=f}nE(t,i,s,h){if(!this.mobile){const i=t-this.LR,h=s-this.RR,e=Math.sqrt(i*i+h*h);this.x=this.LR+i*this.arc/e,this.z=this.RR+h*this.arc/e,this.y=this.SR}const e=this.hE+1-h;this.velocityX=(t-this.x)/e,this.kR=(s-this.z)/e,this.xR=Math.sqrt(this.velocityX*this.velocityX+this.kR*this.kR),this.mobile||(this.velocityY=-this.xR*Math.tan(.02454369*this.MR)),this.DR=2*(i-this.y-this.velocityY*e)/(e*e)}update(t){if(this.mobile=!0,this.x+=this.velocityX*t,this.z+=this.kR*t,this.y+=this.velocityY*t+.5*this.DR*t*t,this.velocityY+=this.DR*t,this.qI=325.949*Math.atan2(this.velocityX,this.kR)+1024&2047,this.pitch=325.949*Math.atan2(this.velocityY,this.xR)&2047,this.bR.oE&&this.bR.oE.delay)for(this.Dl+=t;this.Dl>this.bR.oE.delay[this.Nl];)this.Dl-=this.bR.oE.delay[this.Nl]+1,this.Nl++,this.Nl>=this.bR.oE.Pl&&(this.Nl=0)}draw(){const t=this.bR.Ma(),i=n.A.y_(t,!0,!this.bR.Y_,!1);return this.bR.oE&&this.bR.oE.frames&&(i.tc(),i.ic(this.bR.oE.frames[this.Nl]),i.cC=null,i.fC=null),128===this.bR.yC&&128===this.bR.AC||i.scale(this.bR.yC,this.bR.AC,this.bR.yC),i.NR(this.pitch),i.sc(64+this.bR.K_,850+this.bR.X_,-30,-50,-30,!0),i}}},7628:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(7121),e=s(8738),n=s(8665);class r extends h.A{type;level;x;z;y;eE;rE=!1;Nl=0;Dl=0;constructor(t,i,s,h,n,r,o){super(),this.type=e.A.qo[t],this.level=i,this.x=s,this.z=h,this.y=n,this.eE=r+o}update(t){if(this.type.oE&&this.type.oE.delay)for(this.Dl+=t;this.Dl>this.type.oE.delay[this.Nl];)this.Dl-=this.type.oE.delay[this.Nl]+1,this.Nl++,this.Nl>=this.type.oE.Pl&&(this.Nl=0,this.rE=!0)}draw(){const t=this.type.Ma(),i=n.A.y_(t,!0,!this.type.Y_,!1);return!this.rE&&this.type.oE&&this.type.oE.frames&&(i.tc(),i.ic(this.type.oE.frames[this.Nl]),i.cC=null,i.fC=null),128===this.type.yC&&128===this.type.AC||i.scale(this.type.yC,this.type.AC,this.type.yC),0!==this.type.orientation&&(90===this.type.orientation?i.uC():180===this.type.orientation?(i.uC(),i.uC()):270===this.type.orientation&&(i.uC(),i.uC(),i.uC())),i.sc(64+this.type.K_,850+this.type.X_,-30,-50,-30,!0),i}}},5327:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{Tp;hw;x;z;wm;angle;shape;hE;constructor(t,i,s,h,e,n,r,o){super(),this.Tp=t,this.hw=i,this.x=s,this.z=h,this.wm=e,this.angle=n,this.shape=r,this.hE=o}}},2630:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{Tp;hw;x;z;wm;angle;shape;Op;vp;bp;constructor(t,i,s,h,e,n,r,o,l,a){super(),this.Tp=t,this.hw=i,this.x=s,this.z=h,this.wm=e,this.angle=n,this.shape=r,this.Op=o,this.vp=l,this.bp=a}}},3795:(t,i,s)=>{s.d(i,{A:()=>n});var h=s(1982),e=s(3867);class n extends h.A{level;x;z;tL;Sb;$b;Ob=null;bb=null;kb=null;xb=null;Lb=null;Mb=null;Cb=null;Rb=0;Jb=0;Tb=0;visible=!1;update=!1;jb=!1;Zb=0;nL=0;rL=0;eL=0;constructor(t,i,s){super(),this.tL=this.level=t,this.x=i,this.z=s,this.Sb=new e.xs(5,null),this.$b=new Int32Array(5)}}},5518:(t,i,s)=>{s.d(i,{A:()=>h});class h{static pO=0;static vb=1;static PR=2;static FR=3;static UR=4;static BR=5;static fv=6;static uv=7;static dv=8;static GR=9;static HR=10;static WR=11}},4474:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e extends h.A{YR;VR;constructor(){super(),this.YR=this,this.VR=this}KR(){this.VR&&this.YR&&(this.VR.YR=this.YR,this.YR.VR=this.VR,this.YR=null,this.VR=null)}}},3819:(t,i,s)=>{s.d(i,{A:()=>h});class h{static XR=['_','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9'];static Md=t=>{t=t.trim();let i=0n;for(let s=0;s=65&&h<=90?i+=BigInt(h+1-65):h>=97&&h<=122?i+=BigInt(h+1-97):h>=48&&h<=57&&(i+=BigInt(h+27-48))}return i};static Xa=t=>{if(t<0n||t>=6582952005840035281n)return'invalid_name';if(t%37n===0n)return'invalid_name';let i=0;const s=Array(12);for(;0n!==t;){const h=t;t/=37n,s[11-i++]=this.XR[Number(h-37n*t)]}return s.slice(12-i).join('')};static Gy=t=>{const i=[...t.toLowerCase()];let s=!0;for(let t=0;t='a'&&h<='z'&&(i[t]=h.toUpperCase(),s=!1),'.'!==h&&'!'!==h||(s=!0)}return i.join('')};static hf=t=>{let i='';for(let s=0;s(t>>24&255)+'.'+(t>>16&255)+'.'+(t>>8&255)+'.'+(255&t);static Ka=t=>{if(0===t.length)return t;const i=[...t];for(let t=0;t='a'&&i[t+1]<='z'&&(i[t+1]=String.fromCharCode(i[t+1].charCodeAt(0)+'A'.charCodeAt(0)-97)));return i[0]>='a'&&i[0]<='z'&&(i[0]=String.fromCharCode(i[0].charCodeAt(0)+'A'.charCodeAt(0)-97)),i.join('')};static d_=t=>{const i=t.toUpperCase();let s=0n;for(let t=0;t>56n)&0xffffffffffffffn;return s}}},6666:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1982);class e{zR;cursor=null;constructor(){const t=new h.A;t.next=t,t.Gm=t,this.zR=t}vE(t){t.Gm&&t.LA(),t.Gm=this.zR.Gm,t.next=this.zR,t.Gm&&(t.Gm.next=t),t.next.Gm=t}Qy(t){t.Gm&&t.LA(),t.Gm=this.zR,t.next=this.zR.next,t.Gm.next=t,t.next&&(t.next.Gm=t)}Qb(){const t=this.zR.next;return t===this.zR?null:(t?.LA(),t)}head(){const t=this.zR.next;return t===this.zR?(this.cursor=null,null):(this.cursor=t?.next||null,t)}Bm(){const t=this.zR.Gm;return t===this.zR?(this.cursor=null,null):(this.cursor=t?.Gm||null,t)}next(){const t=this.cursor;return t===this.zR?(this.cursor=null,null):(this.cursor=t?.next||null,t)}Gm(){const t=this.cursor;return t===this.zR?(this.cursor=null,null):(this.cursor=t?.Gm||null,t)}clear(){for(;;){const t=this.zR.next;if(t===this.zR)return;t?.LA()}}}},1982:(t,i,s)=>{s.d(i,{A:()=>h});class h{key;next;Gm;constructor(){this.key=0n,this.next=this,this.Gm=this}LA(){this.Gm&&this.next&&(this.Gm.next=this.next,this.next.Gm=this.Gm,this.next=null,this.Gm=null)}}},2031:(t,i,s)=>{s.d(i,{A:()=>o});var h=s(4474);class e{head;constructor(){this.head=new h.A}push(t){t.VR&&t.KR(),t.VR=this.head.VR,t.YR=this.head,t.VR&&(t.VR.YR=t),t.YR.VR=t}pop(){const t=this.head.YR;return t===this.head?null:(t?.KR(),t)}}var n=s(1982);class r{jR;ZR;constructor(t){this.ZR=[],this.jR=t;for(let i=0;i{s.d(i,{A:()=>n});var h=s(1069),e=s(3867);class n{static qo=[];static Lc=t=>{const i=new h.A(t.read('base_head.dat')),s=new h.A(t.read('base_type.dat')),r=new h.A(t.read('base_label.dat')),o=i.ct;i.ft+=2;for(let t=0;t{s.d(i,{A:()=>n});var h=s(8534),e=s(1069);class n{static qo=[];static Lc=t=>{const i=new e.A(t.read('frame_head.dat')),s=new e.A(t.read('frame_tran1.dat')),r=new e.A(t.read('frame_tran2.dat')),o=new e.A(t.read('frame_del.dat')),l=i.ct;i.ft+=2;const a=new Int32Array(500),c=new Int32Array(500),f=new Int32Array(500),u=new Int32Array(500);for(let t=0;t0){if(0!==d.types[t])for(let i=t-1;i>y;i--)if(0===d.types[i]){a[A]=i,c[A]=0,f[A]=0,u[A]=0,A++;break}a[A]=t;let s=0;3===d.types[a[A]]&&(s=128),c[A]=1&i?r.QR:s,f[A]=2&i?r.QR:s,u[A]=4&i?r.QR:s,y=t,A++}}e.length=A,e.tS=new Int32Array(A),e.x=new Int32Array(A),e.y=new Int32Array(A),e.z=new Int32Array(A);for(let t=0;t{s.d(i,{ig:()=>h,pl:()=>e,iS:()=>o,sS:()=>r,hS:()=>n});const h=document.getElementById('canvas'),e=h.getContext('2d',{willReadFrequently:!0}),n=document.createElement('canvas'),r=document.createElement('img'),o=n.getContext('2d',{willReadFrequently:!0})},9298:(t,i,s)=>{s.d(i,{A:()=>h});class h{static RED=16711680;static GREEN=65280;static BLUE=255;static aa=16776960;static Zc=65535;static qc=16711935;static Yl=16777215;static la=0;static eS=16748608;static Od=8388608;static Td=128;static nS=16756736;static rS=16740352;static oS=16723968;static lS=12648192;static aS=8453888;static cS=4259584;static Gc=9179409;static sw=6116423;static Tl=2301979;static Ol=5063219;static bl=7759444;static Rl=3353893;static vd=8388736;static bd=13350793;static od=Int32Array.of(h.aa,h.RED,h.GREEN,h.Zc,h.qc,h.Yl);static DL=6798;static NL=107;static PL=10283;static FL=16;static UL=4797;static BL=7744;static HL=5799;static WL=4634;static YL=33697;static VL=22433;static KL=2983;static XL=54193;static zL=8741;static jL=12;static ZL=64030;static qL=43162;static $L=7735;static JL=8404;static QL=1701;static tR=38430;static iR=24094;static sR=10153;static hR=56621;static eR=4783;static nR=1341;static rR=16578;static oR=35003;static lR=25239;static mL=9104;static IL=10275;static EL=7595;static gL=3610;static _L=7975;static CL=8526;static TL=918;static OL=38802;static vL=24466;static bL=10145;static LL=58654;static RL=5027;static SL=1457;static ML=16565;static kL=34991;static xL=25486;static aR=4626;static cR=11146;static fR=6439;static uR=12;static dR=4758;static wR=10270;static _R=4574;static yR=4550;static AR=4537;static pR=5681;static mR=5673;static IR=5790;static ER=6806;static gR=8076}},8950:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(4474);class e extends h.A{static Rc=new Int32Array;static bC=0;static LC=0;static top=0;static bottom=0;static left=0;static right=0;static cL=0;static fS=0;static uS=0;static bind=(t,i,s)=>{this.Rc=t,this.bC=i,this.LC=s,this.Bl(0,0,i,s)};static ad=()=>{this.left=0,this.top=0,this.right=this.bC,this.bottom=this.LC,this.cL=this.right-1,this.fS=this.right/2|0};static Bl=(t,i,s,h)=>{t<0&&(t=0),i<0&&(i=0),s>this.bC&&(s=this.bC),h>this.LC&&(h=this.LC),this.top=i,this.bottom=h,this.left=t,this.right=s,this.cL=this.right-1,this.fS=this.right/2|0,this.uS=this.bottom/2|0};static clear=()=>{const t=this.bC*this.LC;for(let i=0;i{this.Ll(t,i,e,s),this.Ll(t,i+h-1,e,s),this.vl(t,i,e,h),this.vl(t+s-1,i,e,h)};static Ll=(t,i,s,h)=>{if(i=this.bottom)return;tthis.right&&(h=this.right-t);const e=t+i*this.bC;for(let t=0;t{if(t=this.right)return;ithis.bottom&&(h=this.bottom-i);const e=t+i*this.bC;for(let t=0;t{const n=Math.abs(s-t),r=Math.abs(h-i),o=t=this.left&&t=this.top&&i-r&&(a-=r,t+=o),s{tthis.right&&(s=this.right-t),i+h>this.bottom&&(h=this.bottom-i);const n=this.bC-s;let r=t+i*this.bC;for(let t=-h;t<0;t++){for(let t=-s;t<0;t++)this.Rc[r++]=e;r+=n}};static dS(t,i,s,h,e,n){tthis.right&&(s=this.right-t),i+h>this.bottom&&(h=this.bottom-i);const r=256-n,o=(e>>16&255)*n,l=(e>>8&255)*n,a=(255&e)*n,c=this.bC-s;let f=t+i*this.bC;for(let t=0;t>16&255)*r>>8<<16)+(l+(this.Rc[f]>>8&255)*r>>8<<8)+(a+(255&this.Rc[f])*r>>8);this.Rc[f++]=t}f+=c}}static wS(t,i,s,h,e){const n=256-e,r=(h>>16&255)*e,o=(h>>8&255)*e,l=(255&h)*e;let a=i-s;a<0&&(a=0);let c=i+s;c>=this.LC&&(c=this.LC-1);for(let h=a;h<=c;h++){const e=h-i,a=0|Math.sqrt(s*s-e*e);let c=t-a;c<0&&(c=0);let f=t+a;f>=this.bC&&(f=this.bC-1);let u=c+h*this.bC;for(let t=c;t<=f;t++){const t=(r+(this.Rc[u]>>16&255)*n>>8<<16)+(o+(this.Rc[u]>>8&255)*n>>8<<8)+(l+(255&this.Rc[u])*n>>8);this.Rc[u++]=t}}}static yS=(t,i,s)=>{t=this.right||i=this.bottom||(this.Rc[t+i*this.bC]=s)}}},4583:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(8950),e=s(1673),n=s(3867);class r extends h.A{static Tt=!1;static AS=new Int32Array(512);static pS=new Int32Array(2048);static sin=new Int32Array(2048);static cos=new Int32Array(2048);static palette=new Int32Array(65536);static ME=new n.xs(50,null);static mS=0;static Mc=new Int32Array;static La=0;static Ra=0;static RC=!0;static aL=!1;static alpha=0;static IS=null;static ES=new n.xs(50,null);static gS=0;static uu=0;static SE=new Int32Array(50);static _S=new n.xs(50,null);static CS=!1;static TS=new n.xs(50,!1);static OS=new Int32Array(50);static{for(let t=1;t<512;t++)this.AS[t]=32768/t|0;for(let t=1;t<2048;t++)this.pS[t]=65536/t|0;for(let t=0;t<2048;t++)this.sin[t]=65536*Math.sin(.0030679615757712823*t)|0,this.cos[t]=65536*Math.cos(.0030679615757712823*t)|0}static zo=()=>{this.AS=null,this.AS=null,this.sin=null,this.cos=null,this.Mc=null,this.ME=null,this.TS=null,this.OS=null,this.IS=null,this.ES=null,this.SE=null,this.palette=null,this._S=null,console.log('Draw3D unloaded!')};static sg=()=>{this.Mc=new Int32Array(h.A.LC);for(let t=0;t{this.Mc=new Int32Array(i);for(let s=0;s{this.IS=null,this.ES.fill(null)};static Oc=t=>{this.mS=0;for(let i=0;i<50;i++)try{this.ME[i]=e.A.Ac(t,i.toString()),this.Tt&&128===this.ME[i]?.na?this.ME[i]?.vS():this.ME[i]?.DC(),this.mS++}catch(t){}};static IO=t=>{if(0!==this.OS[t])return this.OS[t];const i=this._S[t];if(!i)return 0;let s=0,h=0,e=0;const n=i.length;for(let t=0;t>16&255,h+=i[t]>>8&255,e+=255&i[t];let r=(s/n<<16)+(h/n<<8)+(e/n|0);return r=this.bS(r,1.4),0===r&&(r=1),this.OS[t]=r,r};static vc=t=>{const i=t+.03*Math.random()-.015;let s=0;for(let t=0;t<512;t++){const h=(t/8|0)/64+.0078125,e=(7&t)/8+.0625;for(let t=0;t<128;t++){const n=t/128;let r=n,o=n,l=n;if(0!==e){let t;t=n<.5?n*(e+1):n+e-n*e;const i=2*n-t;let s=h+.3333333333333333;s>1&&s--;let a=h-.3333333333333333;a<0&&a++,r=6*s<1?i+6*(t-i)*s:2*s<1?t:3*s<2?i+(t-i)*(.6666666666666666-s)*6:i,o=6*h<1?i+6*(t-i)*h:2*h<1?t:3*h<2?i+(t-i)*(.6666666666666666-h)*6:i,l=6*a<1?i+6*(t-i)*a:2*a<1?t:3*a<2?i+(t-i)*(.6666666666666666-a)*6:i}const a=((256*r|0)<<16)+((256*o|0)<<8)+(256*l|0);this.palette[s++]=this.bS(a,i)}}for(let t=0;t<50;t++){const s=this.ME[t];if(!s)continue;const h=s.palette;this._S[t]=new Int32Array(h.length);for(let s=0;s{const s=(t>>16)/256,h=(t>>8&255)/256,e=(255&t)/256;return((256*Math.pow(s,i)|0)<<16)+((256*Math.pow(h,i)|0)<<8)+(256*Math.pow(e,i)|0)};static bc=t=>{this.IS||(this.gS=t,this.Tt?this.IS=new n.ur(t,16384):this.IS=new n.ur(t,65536),this.ES.fill(null))};static uL=(t,i,s,e,n,o,l,a,c)=>{let f=0,u=0;n!==e&&(f=(i-t<<16)/(n-e)|0,u=(a-l<<15)/(n-e)|0);let d=0,w=0;o!==n&&(d=(s-i<<16)/(o-n)|0,w=(c-a<<15)/(o-n)|0);let y=0,A=0;if(o!==e&&(y=(t-s<<16)/(e-o)|0,A=(l-c<<15)/(e-o)|0),e<=n&&e<=o){if(eh.A.bottom&&(n=h.A.bottom),o>h.A.bottom&&(o=h.A.bottom),nd)for(o-=n,n-=e,e=r.Mc[e];;){if(--n<0)for(;;){if(--o<0)return;this.LS(s>>16,i>>16,c>>7,a>>7,h.A.Rc,e,0),s+=y,i+=d,c+=A,a+=w,e+=h.A.bC}this.LS(s>>16,t>>16,c>>7,l>>7,h.A.Rc,e,0),s+=y,t+=f,c+=A,l+=u,e+=h.A.bC}else for(o-=n,n-=e,e=r.Mc[e];;){if(--n<0)for(;;){if(--o<0)return;this.LS(i>>16,s>>16,a>>7,c>>7,h.A.Rc,e,0),s+=y,i+=d,c+=A,a+=w,e+=h.A.bC}this.LS(t>>16,s>>16,l>>7,c>>7,h.A.Rc,e,0),s+=y,t+=f,c+=A,l+=u,e+=h.A.bC}else if(i=t<<=16,a=l<<=15,e<0&&(i-=y*e,t-=f*e,a-=A*e,l-=u*e,e=0),s<<=16,c<<=15,o<0&&(s-=d*o,c-=w*o,o=0),e!==o&&yf)for(n-=o,o-=e,e=r.Mc[e];;){if(--o<0)for(;;){if(--n<0)return;this.LS(s>>16,t>>16,c>>7,l>>7,h.A.Rc,e,0),s+=d,t+=f,c+=w,l+=u,e+=h.A.bC}this.LS(i>>16,t>>16,a>>7,l>>7,h.A.Rc,e,0),i+=y,t+=f,a+=A,l+=u,e+=h.A.bC}else for(n-=o,o-=e,e=r.Mc[e];;){if(--o<0)for(;;){if(--n<0)return;this.LS(t>>16,s>>16,l>>7,c>>7,h.A.Rc,e,0),s+=d,t+=f,c+=w,l+=u,e+=h.A.bC}this.LS(t>>16,i>>16,l>>7,a>>7,h.A.Rc,e,0),i+=y,t+=f,a+=A,l+=u,e+=h.A.bC}}else if(n<=o){if(nh.A.bottom&&(o=h.A.bottom),e>h.A.bottom&&(e=h.A.bottom),oy)for(e-=o,o-=n,n=r.Mc[n];;){if(--o<0)for(;;){if(--e<0)return;this.LS(t>>16,s>>16,l>>7,c>>7,h.A.Rc,n,0),t+=f,s+=y,l+=u,c+=A,n+=h.A.bC}this.LS(t>>16,i>>16,l>>7,a>>7,h.A.Rc,n,0),t+=f,i+=d,l+=u,a+=w,n+=h.A.bC}else for(e-=o,o-=n,n=r.Mc[n];;){if(--o<0)for(;;){if(--e<0)return;this.LS(s>>16,t>>16,c>>7,l>>7,h.A.Rc,n,0),t+=f,s+=y,l+=u,c+=A,n+=h.A.bC}this.LS(i>>16,t>>16,a>>7,l>>7,h.A.Rc,n,0),t+=f,i+=d,l+=u,a+=w,n+=h.A.bC}else if(s=i<<=16,c=a<<=15,n<0&&(s-=f*n,i-=d*n,c-=u*n,a-=w*n,n=0),t<<=16,l<<=15,e<0&&(t-=y*e,l-=A*e,e=0),o-=e,e-=n,n=r.Mc[n],f>16,i>>16,l>>7,a>>7,h.A.Rc,n,0),t+=y,i+=d,l+=A,a+=w,n+=h.A.bC}this.LS(s>>16,i>>16,c>>7,a>>7,h.A.Rc,n,0),s+=f,i+=d,c+=u,a+=w,n+=h.A.bC}else for(;;){if(--e<0)for(;;){if(--o<0)return;this.LS(i>>16,t>>16,a>>7,l>>7,h.A.Rc,n,0),t+=y,i+=d,l+=A,a+=w,n+=h.A.bC}this.LS(i>>16,s>>16,a>>7,c>>7,h.A.Rc,n,0),s+=f,i+=d,c+=u,a+=w,n+=h.A.bC}}else if(oh.A.bottom&&(e=h.A.bottom),n>h.A.bottom&&(n=h.A.bottom),e>16,t>>16,a>>7,l>>7,h.A.Rc,o,0),i+=d,t+=f,a+=w,l+=u,o+=h.A.bC}this.LS(i>>16,s>>16,a>>7,c>>7,h.A.Rc,o,0),i+=d,s+=y,a+=w,c+=A,o+=h.A.bC}else for(;;){if(--e<0)for(;;){if(--n<0)return;this.LS(t>>16,i>>16,l>>7,a>>7,h.A.Rc,o,0),i+=d,t+=f,a+=w,l+=u,o+=h.A.bC}this.LS(s>>16,i>>16,c>>7,a>>7,h.A.Rc,o,0),i+=d,s+=y,a+=w,c+=A,o+=h.A.bC}else if(t=s<<=16,l=c<<=15,o<0&&(t-=d*o,s-=y*o,l-=w*o,c-=A*o,o=0),i<<=16,a<<=15,n<0&&(i-=f*n,a-=u*n,n=0),e-=n,n-=o,o=r.Mc[o],d>16,s>>16,a>>7,c>>7,h.A.Rc,o,0),i+=f,s+=y,a+=u,c+=A,o+=h.A.bC}this.LS(t>>16,s>>16,l>>7,c>>7,h.A.Rc,o,0),t+=d,s+=y,l+=w,c+=A,o+=h.A.bC}else for(;;){if(--n<0)for(;;){if(--e<0)return;this.LS(s>>16,i>>16,c>>7,a>>7,h.A.Rc,o,0),i+=f,s+=y,a+=u,c+=A,o+=h.A.bC}this.LS(s>>16,t>>16,c>>7,l>>7,h.A.Rc,o,0),t+=d,s+=y,l+=w,c+=A,o+=h.A.bC}};static LS=(t,i,s,e,n,o,l)=>{let a;if(r.RC){let c;if(r.aL){if(c=i-t>3?(e-s)/(i-t)|0:0,i>h.A.cL&&(i=h.A.cL),t<0&&(s-=t*c,t=0),t>=i)return;o+=t,l=i-t>>2,c<<=2}else{if(!(t>2)>0?(e-s)*r.AS[l]>>15:0}if(0===r.alpha)for(;;){if(--l<0){if((l=i-t&3)>0){a=r.palette[s>>8];do{n[o++]=a,l--}while(l>0);return}break}a=r.palette[s>>8],s+=c,n[o++]=a,n[o++]=a,n[o++]=a,n[o++]=a}else{const h=r.alpha,e=256-r.alpha;for(;;){if(--l<0){if((l=i-t&3)>0){a=r.palette[s>>8],a=((16711935&a)*e>>8&16711935)+((65280&a)*e>>8&65280);do{n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280),l--}while(l>0)}break}a=r.palette[s>>8],s+=c,a=((16711935&a)*e>>8&16711935)+((65280&a)*e>>8&65280),n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280),n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280),n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280),n[o++]=a+((16711935&n[o])*h>>8&16711935)+((65280&n[o])*h>>8&65280)}}}else if(th.A.cL&&(i=h.A.cL),t<0&&(s-=t*c,t=0),t>=i))return;if(o+=t,l=i-t,0===r.alpha)do{n[o++]=r.palette[s>>8],s+=c,l--}while(l>0);else{const t=r.alpha,i=256-r.alpha;do{a=r.palette[s>>8],s+=c,a=((16711935&a)*i>>8&16711935)+((65280&a)*i>>8&65280),n[o++]=a+((16711935&n[o])*t>>8&16711935)+((65280&n[o])*t>>8&65280),l--}while(l>0)}}};static RS=(t,i,s,e,n,r,o)=>{let l=0;n!==e&&(l=(i-t<<16)/(n-e)|0);let a=0;r!==n&&(a=(s-i<<16)/(r-n)|0);let c=0;if(r!==e&&(c=(t-s<<16)/(e-r)|0),e<=n&&e<=r){if(eh.A.bottom&&(n=h.A.bottom),r>h.A.bottom&&(r=h.A.bottom),na)for(r-=n,n-=e,e=this.Mc[e];;){if(--n<0)for(;;){if(--r<0)return;this.SS(s>>16,i>>16,h.A.Rc,e,o),s+=c,i+=a,e+=h.A.bC}this.SS(s>>16,t>>16,h.A.Rc,e,o),s+=c,t+=l,e+=h.A.bC}else for(r-=n,n-=e,e=this.Mc[e];;){if(--n<0)for(;;){if(--r<0)return;this.SS(i>>16,s>>16,h.A.Rc,e,o),s+=c,i+=a,e+=h.A.bC}this.SS(t>>16,s>>16,h.A.Rc,e,o),s+=c,t+=l,e+=h.A.bC}else if(i=t<<=16,e<0&&(i-=c*e,t-=l*e,e=0),s<<=16,r<0&&(s-=a*r,r=0),e!==r&&cl)for(n-=r,r-=e,e=this.Mc[e];;){if(--r<0)for(;;){if(--n<0)return;this.SS(s>>16,t>>16,h.A.Rc,e,o),s+=a,t+=l,e+=h.A.bC}this.SS(i>>16,t>>16,h.A.Rc,e,o),i+=c,t+=l,e+=h.A.bC}else for(n-=r,r-=e,e=this.Mc[e];;){if(--r<0)for(;;){if(--n<0)return;this.SS(t>>16,s>>16,h.A.Rc,e,o),s+=a,t+=l,e+=h.A.bC}this.SS(t>>16,i>>16,h.A.Rc,e,o),i+=c,t+=l,e+=h.A.bC}}else if(n<=r){if(nh.A.bottom&&(r=h.A.bottom),e>h.A.bottom&&(e=h.A.bottom),rc)for(e-=r,r-=n,n=this.Mc[n];;){if(--r<0)for(;;){if(--e<0)return;this.SS(t>>16,s>>16,h.A.Rc,n,o),t+=l,s+=c,n+=h.A.bC}this.SS(t>>16,i>>16,h.A.Rc,n,o),t+=l,i+=a,n+=h.A.bC}else for(e-=r,r-=n,n=this.Mc[n];;){if(--r<0)for(;;){if(--e<0)return;this.SS(s>>16,t>>16,h.A.Rc,n,o),t+=l,s+=c,n+=h.A.bC}this.SS(i>>16,t>>16,h.A.Rc,n,o),t+=l,i+=a,n+=h.A.bC}else if(s=i<<=16,n<0&&(s-=l*n,i-=a*n,n=0),t<<=16,e<0&&(t-=c*e,e=0),l>16,i>>16,h.A.Rc,n,o),t+=c,i+=a,n+=h.A.bC}this.SS(s>>16,i>>16,h.A.Rc,n,o),s+=l,i+=a,n+=h.A.bC}else for(r-=e,e-=n,n=this.Mc[n];;){if(--e<0)for(;;){if(--r<0)return;this.SS(i>>16,t>>16,h.A.Rc,n,o),t+=c,i+=a,n+=h.A.bC}this.SS(i>>16,s>>16,h.A.Rc,n,o),s+=l,i+=a,n+=h.A.bC}}else if(rh.A.bottom&&(e=h.A.bottom),n>h.A.bottom&&(n=h.A.bottom),e>16,t>>16,h.A.Rc,r,o),i+=a,t+=l,r+=h.A.bC}this.SS(i>>16,s>>16,h.A.Rc,r,o),i+=a,s+=c,r+=h.A.bC}else for(n-=e,e-=r,r=this.Mc[r];;){if(--e<0)for(;;){if(--n<0)return;this.SS(t>>16,i>>16,h.A.Rc,r,o),i+=a,t+=l,r+=h.A.bC}this.SS(s>>16,i>>16,h.A.Rc,r,o),i+=a,s+=c,r+=h.A.bC}else if(t=s<<=16,r<0&&(t-=a*r,s-=c*r,r=0),i<<=16,n<0&&(i-=l*n,n=0),a>16,s>>16,h.A.Rc,r,o),i+=l,s+=c,r+=h.A.bC}this.SS(t>>16,s>>16,h.A.Rc,r,o),t+=a,s+=c,r+=h.A.bC}else for(e-=n,n-=r,r=this.Mc[r];;){if(--n<0)for(;;){if(--e<0)return;this.SS(s>>16,i>>16,h.A.Rc,r,o),i+=l,s+=c,r+=h.A.bC}this.SS(s>>16,t>>16,h.A.Rc,r,o),t+=a,s+=c,r+=h.A.bC}};static wL=(t,i,s,e,n,r,o,l,a,c,f,u,d,w,y,A,p,m,I)=>{const E=this.MS(I);this.CS=!this.TS[I];const g=c-d,_=f-y,C=u-p,T=w-c,O=A-f,v=m-u;let b=T*f-O*c<<14;const L=O*u-v*f<<8,R=v*c-T*u<<5;let S=g*f-_*c<<14;const M=_*u-C*f<<8,k=C*c-g*u<<5;let x=_*T-g*O<<14;const D=C*O-_*v<<8,N=g*v-C*T<<5;let P=0,F=0;n!==e&&(P=(i-t<<16)/(n-e)|0,F=(l-o<<16)/(n-e)|0);let U=0,B=0;r!==n&&(U=(s-i<<16)/(r-n)|0,B=(a-l<<16)/(r-n)|0);let G=0,H=0;if(r!==e&&(G=(t-s<<16)/(e-r)|0,H=(o-a<<16)/(e-r)|0),e<=n&&e<=r){if(eh.A.bottom&&(n=h.A.bottom),r>h.A.bottom&&(r=h.A.bottom),nU)for(r-=n,n-=e,e=this.Mc[e];;){if(--n<0)for(;;){if(--r<0)return;this.kS(s>>16,i>>16,h.A.Rc,e,E,0,0,b,S,x,L,M,D,a>>8,l>>8),s+=G,i+=U,a+=H,l+=B,e+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(s>>16,t>>16,h.A.Rc,e,E,0,0,b,S,x,L,M,D,a>>8,o>>8),s+=G,t+=P,a+=H,o+=F,e+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(r-=n,n-=e,e=this.Mc[e];;){if(--n<0)for(;;){if(--r<0)return;this.kS(i>>16,s>>16,h.A.Rc,e,E,0,0,b,S,x,L,M,D,l>>8,a>>8),s+=G,i+=U,a+=H,l+=B,e+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(t>>16,s>>16,h.A.Rc,e,E,0,0,b,S,x,L,M,D,o>>8,a>>8),s+=G,t+=P,a+=H,o+=F,e+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}else{i=t<<=16,l=o<<=16,e<0&&(i-=G*e,t-=P*e,l-=H*e,o-=F*e,e=0),s<<=16,a<<=16,r<0&&(s-=U*r,a-=B*r,r=0);const c=e-this.Ra;if(b+=R*c,S+=k*c,x+=N*c,b|=0,S|=0,x|=0,(e===r||G>=P)&&(e!==r||U<=P))for(n-=r,r-=e,e=this.Mc[e];;){if(--r<0)for(;;){if(--n<0)return;this.kS(t>>16,s>>16,h.A.Rc,e,E,0,0,b,S,x,L,M,D,o>>8,a>>8),s+=U,t+=P,a+=B,o+=F,e+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(t>>16,i>>16,h.A.Rc,e,E,0,0,b,S,x,L,M,D,o>>8,l>>8),i+=G,t+=P,l+=H,o+=F,e+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(n-=r,r-=e,e=this.Mc[e];;){if(--r<0)for(;;){if(--n<0)return;this.kS(s>>16,t>>16,h.A.Rc,e,E,0,0,b,S,x,L,M,D,a>>8,o>>8),s+=U,t+=P,a+=B,o+=F,e+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(i>>16,t>>16,h.A.Rc,e,E,0,0,b,S,x,L,M,D,l>>8,o>>8),i+=G,t+=P,l+=H,o+=F,e+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}}else if(n<=r){if(nh.A.bottom&&(r=h.A.bottom),e>h.A.bottom&&(e=h.A.bottom),rG)for(e-=r,r-=n,n=this.Mc[n];;){if(--r<0)for(;;){if(--e<0)return;this.kS(t>>16,s>>16,h.A.Rc,n,E,0,0,b,S,x,L,M,D,o>>8,a>>8),t+=P,s+=G,o+=F,a+=H,n+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(t>>16,i>>16,h.A.Rc,n,E,0,0,b,S,x,L,M,D,o>>8,l>>8),t+=P,i+=U,o+=F,l+=B,n+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(e-=r,r-=n,n=this.Mc[n];;){if(--r<0)for(;;){if(--e<0)return;this.kS(s>>16,t>>16,h.A.Rc,n,E,0,0,b,S,x,L,M,D,a>>8,o>>8),t+=P,s+=G,o+=F,a+=H,n+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(i>>16,t>>16,h.A.Rc,n,E,0,0,b,S,x,L,M,D,l>>8,o>>8),t+=P,i+=U,o+=F,l+=B,n+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}else{s=i<<=16,a=l<<=16,n<0&&(s-=P*n,i-=U*n,a-=F*n,l-=B*n,n=0),t<<=16,o<<=16,e<0&&(t-=G*e,o-=H*e,e=0);const c=n-this.Ra;if(b+=R*c,S+=k*c,x+=N*c,b|=0,S|=0,x|=0,r-=e,e-=n,n=this.Mc[n],P>16,i>>16,h.A.Rc,n,E,0,0,b,S,x,L,M,D,o>>8,l>>8),t+=G,i+=U,o+=H,l+=B,n+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(s>>16,i>>16,h.A.Rc,n,E,0,0,b,S,x,L,M,D,a>>8,l>>8),s+=P,i+=U,a+=F,l+=B,n+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(;;){if(--e<0)for(;;){if(--r<0)return;this.kS(i>>16,t>>16,h.A.Rc,n,E,0,0,b,S,x,L,M,D,l>>8,o>>8),t+=G,i+=U,o+=H,l+=B,n+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(i>>16,s>>16,h.A.Rc,n,E,0,0,b,S,x,L,M,D,l>>8,a>>8),s+=P,i+=U,a+=F,l+=B,n+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}}else if(rh.A.bottom&&(e=h.A.bottom),n>h.A.bottom&&(n=h.A.bottom),e>16,t>>16,h.A.Rc,r,E,0,0,b,S,x,L,M,D,l>>8,o>>8),i+=U,t+=P,l+=B,o+=F,r+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(i>>16,s>>16,h.A.Rc,r,E,0,0,b,S,x,L,M,D,l>>8,a>>8),i+=U,s+=G,l+=B,a+=H,r+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(;;){if(--e<0)for(;;){if(--n<0)return;this.kS(t>>16,i>>16,h.A.Rc,r,E,0,0,b,S,x,L,M,D,o>>8,l>>8),i+=U,t+=P,l+=B,o+=F,r+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(s>>16,i>>16,h.A.Rc,r,E,0,0,b,S,x,L,M,D,a>>8,l>>8),i+=U,s+=G,l+=B,a+=H,r+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}else{t=s<<=16,o=a<<=16,r<0&&(t-=U*r,s-=G*r,o-=B*r,a-=H*r,r=0),i<<=16,l<<=16,n<0&&(i-=P*n,l-=F*n,n=0);const c=r-this.Ra;if(b+=R*c,S+=k*c,x+=N*c,b|=0,S|=0,x|=0,e-=n,n-=r,r=this.Mc[r],U>16,s>>16,h.A.Rc,r,E,0,0,b,S,x,L,M,D,l>>8,a>>8),i+=P,s+=G,l+=F,a+=H,r+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(t>>16,s>>16,h.A.Rc,r,E,0,0,b,S,x,L,M,D,o>>8,a>>8),t+=U,s+=G,o+=B,a+=H,r+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}else for(;;){if(--n<0)for(;;){if(--e<0)return;this.kS(s>>16,i>>16,h.A.Rc,r,E,0,0,b,S,x,L,M,D,a>>8,l>>8),i+=P,s+=G,l+=F,a+=H,r+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}this.kS(s>>16,t>>16,h.A.Rc,r,E,0,0,b,S,x,L,M,D,a>>8,o>>8),t+=U,s+=G,o+=B,a+=H,r+=h.A.bC,b+=R,S+=k,x+=N,b|=0,S|=0,x|=0}}};static kS=(t,i,s,e,n,r,o,l,a,c,f,u,d,w,y)=>{if(t>=i)return;let A,p,m,I,E,g,_,C,T;if(this.aL){if(A=(y-w)/(i-t)|0,i>h.A.cL&&(i=h.A.cL),t<0&&(w-=t*A,t=0),t>=i)return;p=i-t>>3,A<<=12}else i-t>7?(p=i-t>>3,A=(y-w)*this.AS[p]>>6):(p=0,A=0);if(w<<=9,e+=t,this.Tt&&n)if(m=0,I=0,g=t-this.La,l+=(f>>3)*g,a+=(u>>3)*g,c+=(d>>3)*g,l|=0,a|=0,E=(c|=0)>>12,0!==E&&(o=a/E|0,(r=l/E|0)<0?r=0:r>4032&&(r=4032)),l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>12,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>4032&&(m=4032)),_=m-r>>3,C=I-o>>3,r+=w>>3&786432,T=w>>23,this.CS){for(;p-- >0;)s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C,s[e++]=n[(4032&o)+(r>>6)]>>>T,r=m,o=I,l+=f,a+=u,E=(c+=d)>>12,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>4032&&(m=4032)),_=m-r>>3,C=I-o>>3,r+=(w+=A)>>3&786432,T=w>>23;for(p=i-t&7;p-- >0;)s[e++]=n[(4032&o)+(r>>6)]>>>T,r+=_,o+=C}else{for(;p-- >0;){let t;0!=(t=n[(4032&o)+(r>>6)]>>>T)&&(s[e]=t),e+=1,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e++,0!=(t=n[(4032&(o+=C))+((r+=_)>>6)]>>>T)&&(s[e]=t),e+=1,r=m,o=I,l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>12,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>4032&&(m=4032)),_=m-r>>3,C=I-o>>3,r+=(w+=A)>>3&786432,T=w>>23}for(p=i-t&7;p-- >0;){let t;0!=(t=n[(4032&o)+(r>>6)]>>>T)&&(s[e]=t),e++,r+=_,o+=C}}else if(m=0,I=0,g=t-this.La,l+=(f>>3)*g,a+=(u>>3)*g,c+=(d>>3)*g,l|=0,a|=0,E=(c|=0)>>14,0!==E&&(o=a/E|0,(r=l/E|0)<0?r=0:r>16256&&(r=16256)),l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>14,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>16256&&(m=16256)),_=m-r>>3,C=I-o>>3,r+=6291456&w,T=w>>23,this.CS&&n){for(;p-- >0;)s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C,s[e++]=n[(16256&o)+(r>>7)]>>>T,r=m,o=I,l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>14,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>16256&&(m=16256)),_=m-r>>3,C=I-o>>3,r+=6291456&(w+=A),T=w>>23;for(p=i-t&7;p-- >0;)s[e++]=n[(16256&o)+(r>>7)]>>>T,r+=_,o+=C}else{for(;p-- >0&&n;){let t;0!=(t=n[(16256&o)+(r>>7)]>>>T)&&(s[e]=t),e+=1,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,0!=(t=n[(16256&(o+=C))+((r+=_)>>7)]>>>T)&&(s[e]=t),e++,r=m,o=I,l+=f,a+=u,c+=d,l|=0,a|=0,E=(c|=0)>>14,0!==E&&(m=l/E|0,I=a/E|0,m<7?m=7:m>16256&&(m=16256)),_=m-r>>3,C=I-o>>3,r+=6291456&(w+=A),T=w>>23}for(p=i-t&7;p-- >0&&n;){let t;0!=(t=n[(16256&o)+(r>>7)]>>>T)&&(s[e]=t),e++,r+=_,o+=C}}};static SS=(t,i,s,e,n)=>{if(this.aL&&(i>h.A.cL&&(i=h.A.cL),t<0&&(t=0)),t>=i)return;e+=t;let r=i-t>>2;if(0===this.alpha)for(;;){if(r--,r<0)for(r=i-t&3;;){if(r--,r<0)return;s[e++]=n}s[e++]=n,s[e++]=n,s[e++]=n,s[e++]=n}const o=this.alpha,l=256-this.alpha;for(n=((16711935&n)*l>>8&16711935)+((65280&n)*l>>8&65280);;){if(r--,r<0)for(r=i-t&3;;){if(r--,r<0)return;s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280)}s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280),s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280),s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280),s[e++]=n+((16711935&s[e])*o>>8&16711935)+((65280&s[e])*o>>8&65280)}};static kE=t=>{this.ES[t]&&this.IS&&(this.IS[this.gS++]=this.ES[t],this.ES[t]=null)};static MS=t=>{if(this.SE[t]=this.uu++,this.ES[t])return this.ES[t];let i;if(this.gS>0&&this.IS)i=this.IS[--this.gS],this.IS[this.gS]=null;else{let t=0,s=-1;for(let i=0;i>>3)&16316671,i[e+8192]=n-(n>>>2)&16316671,i[e+12288]=n-(n>>>2)-(n>>>3)&16316671}}else{if(64===s.width)for(let t=0;t<128;t++)for(let e=0;e<128;e++)i[e+(t<<7)]=h[s.Rc[(e>>1)+(t>>1<<6)]];else for(let t=0;t<16384;t++)i[t]=h[s.Rc[t]];this.TS[t]=!1;for(let s=0;s<16384;s++){i[s]&=16316671;const h=i[s];0===h&&(this.TS[t]=!0),i[s+16384]=h-(h>>>3)&16316671,i[s+32768]=h-(h>>>2)&16316671,i[s+49152]=h-(h>>>2)-(h>>>3)&16316671}}return i}}},8665:(t,i,s)=>{s.d(i,{A:()=>f});var h=s(1069),e=s(8950),n=s(4583),r=s(6730),o=s(4474),l=s(3867);class a{eC=0;Yb=0;xS=0;DS=-1;NS=-1;PS=-1;US=-1;BS=-1;GS=-1;HS=-1;WS=-1;YS=-1;VS=0;KS=-1;XS=-1;zS=-1;data=null}class c{x=0;y=0;z=0;w=0}class f extends o.A{static metadata=null;static head=null;static jS=null;static ZS=null;static qS=null;static $S=null;static JS=null;static QS=null;static tM=null;static iM=null;static sM=null;static hM=null;static eM=null;static nM=null;static axis=null;static rM=new l.xs(4096,!1);static oM=new l.xs(4096,!1);static lM=new Int32Array(4096);static aM=new Int32Array(4096);static cM=new Int32Array(4096);static fM=new Int32Array(4096);static uM=new Int32Array(4096);static dM=new Int32Array(4096);static wM=new Int32Array(1500);static yM=new l.ur(1500,512);static AM=new Int32Array(12);static pM=new l.ur(12,2e3);static mM=new Int32Array(2e3);static IM=new Int32Array(2e3);static EM=new Int32Array(12);static gM=new Int32Array(10);static _M=new Int32Array(10);static CM=new Int32Array(10);static Bn=0;static TM=0;static Gn=0;static du=!1;static sa=0;static ha=0;static wu=0;static Nm=new Int32Array(1e3);static OM=!1;static Lc(t){try{f.head=new h.A(t.read('ob_head.dat')),f.jS=new h.A(t.read('ob_face1.dat')),f.ZS=new h.A(t.read('ob_face2.dat')),f.qS=new h.A(t.read('ob_face3.dat')),f.$S=new h.A(t.read('ob_face4.dat')),f.JS=new h.A(t.read('ob_face5.dat')),f.QS=new h.A(t.read('ob_point1.dat')),f.tM=new h.A(t.read('ob_point2.dat')),f.iM=new h.A(t.read('ob_point3.dat')),f.sM=new h.A(t.read('ob_point4.dat')),f.hM=new h.A(t.read('ob_point5.dat')),f.eM=new h.A(t.read('ob_vertex1.dat')),f.nM=new h.A(t.read('ob_vertex2.dat')),f.axis=new h.A(t.read('ob_axis.dat')),f.head.ft=0,f.QS.ft=0,f.tM.ft=0,f.iM.ft=0,f.sM.ft=0,f.eM.ft=0,f.nM.ft=0;const i=f.head.ct;f.metadata=new l.xs(i+100,null);let s=0,e=0,n=0,r=0,o=0,c=0,u=0;for(let t=0;t>7)<2?i=2:i>126&&(i=126),(65408&t)+i):(i<0?i=0:i>127&&(i=127),127-i)}static hC=(t,i,s)=>{const h=t.eC,e=t.Yb,n=t.xS;let r,o,a,u,d;if(i){r=new Int32Array(h);for(let i=0;i{const e=t.eC,n=t.Yb,r=t.xS;let o,l,a,c,u;if(h)o=t.nC,l=t.oC,a=t.rC;else{o=new Int32Array(e),l=new Int32Array(e),a=new Int32Array(e);for(let i=0;i{const s=t.eC,h=t.Yb,e=t.xS,n=new Int32Array(s),r=new Int32Array(s),o=new Int32Array(s);for(let i=0;i{let s=!1,h=!1,e=!1,n=!1,r=0,o=0,l=0,a=-1;for(let c=0;c{let s=!1,h=!1,e=!1,n=!1,r=0,o=0,l=0,a=-1;for(let c=0;c{let o=-1;const l=t.nC[i],a=t.oC[i],c=t.rC[i];for(let t=0;t{if(!f.metadata)throw new Error('cant loading model metadata!!!!!');const i=f.metadata[t];if(!i)throw console.log(`Error model:${t} not found!`),new Error('cant loading model metadata!!!!!');if(!(f.head&&f.jS&&f.ZS&&f.qS&&f.$S&&f.JS&&f.QS&&f.tM&&f.iM&&f.sM&&f.hM&&f.eM&&f.nM&&f.axis))throw new Error('cant loading model!!!!!');const s=i.eC,h=i.Yb,e=i.xS,n=new Int32Array(s),r=new Int32Array(s),o=new Int32Array(s),l=new Int32Array(h),a=new Int32Array(h),c=new Int32Array(h),u=new Int32Array(e),d=new Int32Array(e),w=new Int32Array(e);let y=null;i.BS>=0&&(y=new Int32Array(s));let A=null;i.YS>=0&&(A=new Int32Array(h));let p=null,m=0;i.VS>=0?p=new Int32Array(h):m=-i.VS-1;let I=null;i.KS>=0&&(I=new Int32Array(h));let E=null;i.XS>=0&&(E=new Int32Array(h));const g=new Int32Array(h);f.QS.ft=i.DS,f.tM.ft=i.NS,f.iM.ft=i.PS,f.sM.ft=i.US,f.hM.ft=i.BS;let _,C,T,O=0,v=0,b=0;for(let t=0;t{if(!f.metadata||!f.metadata[i])throw new Error('No model metadata');const s=f.metadata[i];if(s.data=t,!s.data.length)throw new Error('No model data');const e=s.eC,n=s.Yb,r=s.xS,o=new Int32Array(e),l=new Int32Array(e),a=new Int32Array(e),c=new Int32Array(n),u=new Int32Array(n),d=new Int32Array(n),w=new Int32Array(r),y=new Int32Array(r),A=new Int32Array(r);let p=null;s.BS>=0&&(p=new Int32Array(e));let m=null;s.YS>=0&&(m=new Int32Array(n));let I=null,E=0;s.VS>=0?I=new Int32Array(n):E=-s.VS-1;let g=null;s.KS>=0&&(g=new Int32Array(n));let _=null;s.XS>=0&&(_=new Int32Array(n));const C=new Int32Array(n),T=new h.A(s.data);T.ft=s.DS;const O=new h.A(s.data);O.ft=s.NS;const v=new h.A(s.data);v.ft=s.PS;const b=new h.A(s.data);b.ft=s.US;const L=new h.A(s.data);L.ft=s.BS;let R,S,M,k=0,x=0,D=0;for(let t=0;tthis.wC&&(this.wC=-s),s>this.UO&&(this.UO=s);const e=i*i+h*h;e>this.OO&&(this.OO=e)}this.OO=Math.sqrt(this.OO)+.99|0,this.FM=Math.sqrt(this.OO*this.OO+this.wC*this.wC)+.99|0,this.PM=this.FM+(Math.sqrt(this.OO*this.OO+this.UO*this.UO)+.99|0)}lC(){this.wC=0,this.UO=0;for(let t=0;tthis.wC&&(this.wC=-i),i>this.UO&&(this.UO=i)}this.FM=Math.sqrt(this.OO*this.OO+this.wC*this.wC)+.99|0,this.PM=this.FM+(Math.sqrt(this.OO*this.OO+this.UO*this.UO)+.99|0)}tc(){if(this.UM){const t=new Int32Array(256);let i=0;for(let s=0;si&&(i=h)}this.fC=new l.xs(i+1,null);for(let s=0;s<=i;s++)this.fC[s]=new Int32Array(t[s]),t[s]=0;let s=0;for(;si&&(i=h)}this.cC=new l.xs(i+1,null);for(let s=0;s<=i;s++)this.cC[s]=new Int32Array(t[s]),t[s]=0;let s=0;for(;sl;)l=s[o++];n&&n.types&&h.x&&h.y&&h.z&&n.labels&&(i!==l||0===n.types[i])&&this.YM(h.x[t],h.y[t],h.z[t],n.labels[i],n.types[i])}f.Bn=0,f.TM=0,f.Gn=0,o=0,l=s[o++];for(let t=0;tl;)l=s[o++];n&&n.types&&e.x&&e.y&&e.z&&n.labels&&(i===l||0===n.types[i])&&this.YM(e.x[t],e.y[t],e.z[t],n.labels[i],n.types[i])}}else this.ic(t)}ic(t){if(!this.fC||-1===t||!r.A.qo[t])return;const i=r.A.qo[t],s=i.JR;f.Bn=0,f.TM=0,f.Gn=0;for(let t=0;t>16;this.rC[t]=this.oC[t]*i+this.rC[t]*s>>16,this.oC[t]=h}}translate(t,i,s){for(let h=0;h>8;if(this.LM&&this.RM&&this.SM||(this.LM=new Int32Array(this.Yb),this.RM=new Int32Array(this.Yb),this.SM=new Int32Array(this.Yb)),!this.Pb){this.Pb=new l.xs(this.eC,null);for(let t=0;t8192||p>8192||m>8192||A<-8192||p<-8192||m<-8192;)A>>=1,p>>=1,m>>=1;let I=0|Math.sqrt(A*A+p*p+m*m);if(I<=0&&(I=1),A=256*A/I|0,p=256*p/I|0,m=256*m/I|0,this.Wb&&1&this.Wb[i]){const n=t+((s*A+h*p+e*m)/(r+(r/2|0))|0);this.w_&&(this.LM[i]=f.bM(this.w_[i],n,this.Wb[i]))}else{let t=this.Pb[n];t&&(t.x+=A,t.y+=p,t.z+=m,t.w++),t=this.Pb[o],t&&(t.x+=A,t.y+=p,t.z+=m,t.w++),t=this.Pb[l],t&&(t.x+=A,t.y+=p,t.z+=m,t.w++)}}if(n)this.Bb(t,r,s,h,e);else{this.Hb=new l.xs(this.eC,null);for(let t=0;t>16;for(let h=0;h>16,E=E*w-I*d>>16,I=m),0!==t&&(m=E*a-g*l>>16,g=E*l+g*a>>16,E=m),0!==i&&(m=g*c+I*u>>16,g=g*u-I*c>>16,I=m),I+=e,E+=r,g+=o,m=E*A-g*y>>16,g=E*y+g*A>>16,E=m,f.lM&&f.aM&&f.cM&&(f.cM[h]=g-p,f.lM[h]=n.A.La+((I<<9)/g|0),f.aM[h]=n.A.Ra+((E<<9)/g|0)),this.xS>0&&f.fM&&f.uM&&f.dM&&(f.fM[h]=I,f.uM[h]=E,f.dM[h]=g)}try{this.KM(!1,!1,0)}catch(t){}}draw(t,i,s,h,r,o,l,a,c){const u=a*r-o*h>>16,d=l*i+u*s>>16,w=this.OO*s>>16,y=d+w;if(y<=50||d>=3500)return;const A=a*h+o*r>>16;let p=A-this.OO<<9;if((p/y|0)>=e.A.fS)return;let m=A+this.OO<<9;if((m/y|0)<=-e.A.fS)return;const I=l*s-u*i>>16,E=this.OO*i>>16;let g=I+E<<9;if((g/y|0)<=-e.A.uS)return;let _=I-(E+(this.wC*s>>16))<<9;if((_/y|0)>=e.A.uS)return;let C=d-(w+(this.wC*i>>16))<=50,T=!1;if(c>0&&f.du){let t=d-w;t<=50&&(t=50),A>0?(p=p/y|0,m=m/t|0):(m=m/y|0,p=p/t|0),I>0?(_=_/y|0,g=g/t|0):(g=g/y|0,_=_/t|0);const i=f.sa-n.A.La,s=f.ha-n.A.Ra;i>p&&i_&&s>16,w=w*L-c*b>>16,c=n),c+=o,u+=l,w+=a,n=w*h+c*r>>16,w=w*r-c*h>>16,c=n,n=u*s-w*i>>16,w=u*i+w*s>>16,u=n,f.cM&&(f.cM[e]=w-d),w>=50&&f.lM&&f.aM?(f.lM[e]=O+((c<<9)/w|0),f.aM[e]=v+((u<<9)/w|0)):f.lM&&(f.lM[e]=-5e3,C=!0),(C||this.xS>0)&&f.fM&&f.uM&&f.dM&&(f.fM[e]=c,f.uM[e]=u,f.dM[e]=w)}try{this.KM(C,T,c)}catch(t){}}KM(t,i,s,h=!1){f.OM&&(this.HM=-1,this.WM=-1);for(let t=0;te.A.cL||a>e.A.cL||c>e.A.cL),f.yM&&f.wM){const t=((y+A+p)/3|0)+this.FM;f.yM[t][f.wM[t]++]=h,f.OM&&this.XM(f.sa,f.ha,u,d,w,l,a,c)&&this.WM=0;t--){const i=f.wM[t];if(!(i<=0)&&f.yM){const s=f.yM[t];for(let t=0;t=0;t--){const i=f.wM[t];if(i>0&&f.yM){const s=f.yM[t];for(let h=0;h0||f.AM[2]>0)&&(n=(f.EM[1]+f.EM[2])/(f.AM[1]+f.AM[2])|0);let r=0;f.AM&&f.EM&&(f.AM[3]>0||f.AM[4]>0)&&(r=(f.EM[3]+f.EM[4])/(f.AM[3]+f.AM[4])|0);let o=0;if(f.AM&&f.EM&&(f.AM[6]>0||f.AM[8]>0)&&(o=(f.EM[6]+f.EM[8])/(f.AM[6]+f.AM[8])|0),f.AM&&f.pM){let t,i=0,s=f.AM[10],e=f.pM[10],l=f.mM;i===s&&(i=0,s=f.AM[11],e=f.pM[11],l=f.IM),t=in;)try{this.zM(e[i++],h),i===s&&e!==f.pM[11]&&(i=0,s=f.AM[11],e=f.pM[11],l=f.IM),t=ir;)try{this.zM(e[i++],h),i===s&&e!==f.pM[11]&&(i=0,s=f.AM[11],e=f.pM[11],l=f.IM),t=io;)try{this.zM(e[i++],h),i===s&&e!==f.pM[11]&&(i=0,s=f.AM[11],e=f.pM[11],l=f.IM),t=i>2,r=this.xM[i],o=this.DM[i],l=this.NM[i];n.A.wL(f.lM[s],f.lM[h],f.lM[e],f.aM[s],f.aM[h],f.aM[e],this.LM[t],this.RM[t],this.SM[t],f.fM[r],f.uM[r],f.dM[r],f.fM[o],f.fM[l],f.uM[o],f.uM[l],f.dM[o],f.dM[l],this.w_[t])}else if(3===r&&this.Wb&&this.w_&&this.LM&&f.lM&&f.aM&&f.fM&&f.uM&&f.dM){const i=this.Wb[t]>>2,r=this.xM[i],o=this.DM[i],l=this.NM[i];n.A.wL(f.lM[s],f.lM[h],f.lM[e],f.aM[s],f.aM[h],f.aM[e],this.LM[t],this.LM[t],this.LM[t],f.fM[r],f.uM[r],f.dM[r],f.fM[o],f.fM[l],f.uM[o],f.uM[l],f.dM[o],f.dM[l],this.w_[t])}}jM(t,i=!1){let s=0;if(f.dM){const i=n.A.La,h=n.A.Ra,e=this.Vb[t],r=this.Kb[t],o=this.Xb[t],l=f.dM[e],a=f.dM[r],c=f.dM[o];if(l>=50&&f.lM&&f.aM&&this.LM)f.gM[s]=f.lM[e],f._M[s]=f.aM[e],f.CM[s++]=this.LM[t];else if(f.fM&&f.uM&&this.LM){const u=f.fM[e],d=f.uM[e],w=this.LM[t];if(c>=50&&this.SM){const e=(50-l)*n.A.pS[c-l];f.gM[s]=i+((u+((f.fM[o]-u)*e>>16)<<9)/50|0),f._M[s]=h+((d+((f.uM[o]-d)*e>>16)<<9)/50|0),f.CM[s++]=w+((this.SM[t]-w)*e>>16)}if(a>=50&&this.RM){const e=(50-l)*n.A.pS[a-l];f.gM[s]=i+((u+((f.fM[r]-u)*e>>16)<<9)/50|0),f._M[s]=h+((d+((f.uM[r]-d)*e>>16)<<9)/50|0),f.CM[s++]=w+((this.RM[t]-w)*e>>16)}}if(a>=50&&f.lM&&f.aM&&this.RM)f.gM[s]=f.lM[r],f._M[s]=f.aM[r],f.CM[s++]=this.RM[t];else if(f.fM&&f.uM&&this.RM){const u=f.fM[r],d=f.uM[r],w=this.RM[t];if(l>=50&&this.LM){const r=(50-a)*n.A.pS[l-a];f.gM[s]=i+((u+((f.fM[e]-u)*r>>16)<<9)/50|0),f._M[s]=h+((d+((f.uM[e]-d)*r>>16)<<9)/50|0),f.CM[s++]=w+((this.LM[t]-w)*r>>16)}if(c>=50&&this.SM){const e=(50-a)*n.A.pS[c-a];f.gM[s]=i+((u+((f.fM[o]-u)*e>>16)<<9)/50|0),f._M[s]=h+((d+((f.uM[o]-d)*e>>16)<<9)/50|0),f.CM[s++]=w+((this.SM[t]-w)*e>>16)}}if(c>=50&&f.lM&&f.aM&&this.SM)f.gM[s]=f.lM[o],f._M[s]=f.aM[o],f.CM[s++]=this.SM[t];else if(f.fM&&f.uM&&this.SM){const u=f.fM[o],d=f.uM[o],w=this.SM[t];if(a>=50&&this.RM){const e=(50-c)*n.A.pS[a-c];f.gM[s]=i+((u+((f.fM[r]-u)*e>>16)<<9)/50|0),f._M[s]=h+((d+((f.uM[r]-d)*e>>16)<<9)/50|0),f.CM[s++]=w+((this.RM[t]-w)*e>>16)}if(l>=50&&this.LM){const r=(50-c)*n.A.pS[l-c];f.gM[s]=i+((u+((f.fM[e]-u)*r>>16)<<9)/50|0),f._M[s]=h+((d+((f.uM[e]-d)*r>>16)<<9)/50|0),f.CM[s++]=w+((this.LM[t]-w)*r>>16)}}}const h=f.gM[0],r=f.gM[1],o=f.gM[2],l=f._M[0],a=f._M[1],c=f._M[2];if(!((h-r)*(c-a)-(l-a)*(o-r)<=0))if(n.A.aL=!1,3===s){let s;if((h<0||r<0||o<0||h>e.A.cL||r>e.A.cL||o>e.A.cL)&&(n.A.aL=!0),s=this.Wb?3&this.Wb[t]:0,i)n.A.Id(h,r,l,a,f.CM[0]),n.A.Id(r,o,a,c,f.CM[1]),n.A.Id(o,h,c,l,f.CM[2]);else if(0===s)n.A.uL(h,r,o,l,a,c,f.CM[0],f.CM[1],f.CM[2]);else if(1===s&&this.LM)n.A.RS(h,r,o,l,a,c,n.A.palette[this.LM[t]]);else if(2===s&&this.Wb&&this.w_&&f.fM&&f.uM&&f.dM){const i=this.Wb[t]>>2,s=this.xM[i],e=this.DM[i],u=this.NM[i];n.A.wL(h,r,o,l,a,c,f.CM[0],f.CM[1],f.CM[2],f.fM[s],f.uM[s],f.dM[s],f.fM[e],f.fM[u],f.uM[e],f.uM[u],f.dM[e],f.dM[u],this.w_[t])}else if(3===s&&this.Wb&&this.w_&&this.LM&&f.fM&&f.uM&&f.dM){const i=this.Wb[t]>>2,s=this.xM[i],e=this.DM[i],u=this.NM[i];n.A.wL(h,r,o,l,a,c,this.LM[t],this.LM[t],this.LM[t],f.fM[s],f.uM[s],f.dM[s],f.fM[e],f.fM[u],f.uM[e],f.uM[u],f.dM[e],f.dM[u],this.w_[t])}}else if(4===s){let s;if((h<0||r<0||o<0||h>e.A.cL||r>e.A.cL||o>e.A.cL||f.gM[3]<0||f.gM[3]>e.A.cL)&&(n.A.aL=!0),s=this.Wb?3&this.Wb[t]:0,i)n.A.Id(h,r,l,a,f.CM[0]),n.A.Id(r,o,a,c,f.CM[1]),n.A.Id(o,f.gM[3],c,f._M[3],f.CM[2]),n.A.Id(f.gM[3],h,f._M[3],l,f.CM[3]);else if(0===s)n.A.uL(h,r,o,l,a,c,f.CM[0],f.CM[1],f.CM[2]),n.A.uL(h,o,f.gM[3],l,c,f._M[3],f.CM[0],f.CM[2],f.CM[3]);else if(1===s){if(this.LM){const i=n.A.palette[this.LM[t]];n.A.RS(h,r,o,l,a,c,i),n.A.RS(h,o,f.gM[3],l,c,f._M[3],i)}}else if(2===s&&this.Wb&&this.w_&&f.fM&&f.uM&&f.dM){const i=this.Wb[t]>>2,s=this.xM[i],e=this.DM[i],u=this.NM[i];n.A.wL(h,r,o,l,a,c,f.CM[0],f.CM[1],f.CM[2],f.fM[s],f.uM[s],f.dM[s],f.fM[e],f.fM[u],f.uM[e],f.uM[u],f.dM[e],f.dM[u],this.w_[t]),n.A.wL(h,o,f.gM[3],l,c,f._M[3],f.CM[0],f.CM[2],f.CM[3],f.fM[s],f.uM[s],f.dM[s],f.fM[e],f.fM[u],f.uM[e],f.uM[u],f.dM[e],f.dM[u],this.w_[t])}else if(3===s&&this.Wb&&this.w_&&this.LM&&f.fM&&f.uM&&f.dM){const i=this.Wb[t]>>2,s=this.xM[i],e=this.DM[i],u=this.NM[i];n.A.wL(h,r,o,l,a,c,this.LM[t],this.LM[t],this.LM[t],f.fM[s],f.uM[s],f.dM[s],f.fM[e],f.fM[u],f.uM[e],f.uM[u],f.dM[e],f.dM[u],this.w_[t]),n.A.wL(h,o,f.gM[3],l,c,f._M[3],this.LM[t],this.LM[t],this.LM[t],f.fM[s],f.uM[s],f.dM[s],f.fM[e],f.fM[u],f.uM[e],f.uM[u],f.dM[e],f.dM[u],this.w_[t])}}}YM(t,i,s,h,e){if(!h)return;const r=h.length;if(0===e){let e=0;f.Bn=0,f.TM=0,f.Gn=0;for(let t=0;t0?(f.Bn=(f.Bn/e|0)+t,f.TM=(f.TM/e|0)+i,f.Gn=(f.Gn/e|0)+s):(f.Bn=t,f.TM=i,f.Gn=s)}else if(1===e)for(let e=0;e=this.fC.length)continue;const r=this.fC[n];if(r)for(let h=0;h=this.fC.length)continue;const o=this.fC[r];if(o)for(let h=0;h>16;this.oC[e]=this.oC[e]*u-this.nC[e]*c>>16,this.nC[e]=t}if(0!==r){c=n.A.sin[r],u=n.A.cos[r];const t=this.oC[e]*u-this.rC[e]*c>>16;this.rC[e]=this.oC[e]*c+this.rC[e]*u>>16,this.oC[e]=t}if(0!==l){c=n.A.sin[l],u=n.A.cos[l];const t=this.rC[e]*c+this.nC[e]*u>>16;this.rC[e]=this.rC[e]*u-this.nC[e]*c>>16,this.nC[e]=t}this.nC[e]+=f.Bn,this.oC[e]+=f.TM,this.rC[e]+=f.Gn}}else if(3===e)for(let e=0;e=this.fC.length)continue;const r=this.fC[n];if(r)for(let h=0;h=this.cC.length)continue;const e=this.cC[s];if(e)for(let i=0;i255&&(this.kM[s]=255)}}}VM(){this.wC=0,this.OO=0,this.UO=0,this.DO=999999,this.NO=-999999,this.FO=-99999,this.PO=99999;for(let t=0;tthis.NO&&(this.NO=i),hthis.FO&&(this.FO=h),-s>this.wC&&(this.wC=-s),s>this.UO&&(this.UO=s);const e=i*i+h*h;e>this.OO&&(this.OO=e)}this.OO=0|Math.sqrt(this.OO),this.FM=0|Math.sqrt(this.OO*this.OO+this.wC*this.wC),this.PM=this.FM+(0|Math.sqrt(this.OO*this.OO+this.UO*this.UO))}XM(t,i,s,h,e,n,r,o){return!(is&&i>h&&i>e)&&(!(t{s.d(i,{A:()=>o});var h=s(8950),e=s(1069),n=s(4474),r=s(7854);class o extends n.A{Rc;width;height;Xc;zc;na;xd;constructor(t,i){super(),this.Rc=new Int32Array(t*i),this.width=this.na=t,this.height=this.xd=i,this.Xc=this.zc=0}static Vc=async(t,i)=>{const s=t.read(i+'.dat');if(!s)throw new Error(`${i} jpeg not found!`);const h=await(async t=>{255!==t[0]&&(t[0]=255),URL.revokeObjectURL(r.sS.src),r.sS.src=URL.createObjectURL(new Blob([t],{type:'image/jpeg'})),await new Promise((t=>r.sS.onload=()=>t())),r.iS.clearRect(0,0,r.hS.width,r.hS.height);const i=r.sS.naturalWidth,s=r.sS.naturalHeight;return r.hS.width=i,r.hS.height=s,r.iS.drawImage(r.sS,0,0),r.iS.getImageData(0,0,i,s)})(s),e=new o(h.width,h.height),n=new Uint32Array(h.data.buffer),l=e.Rc;for(let t=0;t>24&255)<<24|(255&i)<<16|(i>>8&255)<<8|i>>16&255}return e};static Ac=(t,i,s=0)=>{const h=new e.A(t.read(i+'.dat')),n=new e.A(t.read('index.dat'));n.ft=h.ct;const r=n.ct,l=n.ct,a=[],c=n.gA-1;for(let t=0;th.length||n.ft>n.length)throw new Error;const f=n.gA,u=n.gA,d=n.ct,w=n.ct,y=new o(d,w);y.Xc=f,y.zc=u,y.na=r,y.xd=l;const A=n.gA;if(0===A){const t=y.width*y.height;for(let i=0;ih.A.bottom&&(n-=i+n-h.A.bottom),th.A.right){const i=t+r-h.A.right;r-=i,l+=i,o+=i}r>0&&n>0&&this.qM(r,n,this.Rc,e,l,h.A.Rc,s,o)}ea(t,i,s){i|=0,s|=0;let e=(i+=this.Xc)+(s+=this.zc)*h.A.bC,n=0,r=this.height,o=this.width,l=h.A.bC-o,a=0;if(sh.A.bottom&&(r-=s+r-h.A.bottom),ih.A.right){const t=i+o-h.A.right;o-=t,a+=t,l+=t}o>0&&r>0&&this.$M(o,r,this.Rc,n,a,h.A.Rc,e,l,t)}Tc(t,i){t|=0,i|=0;let s=(t+=this.Xc)+(i+=this.zc)*h.A.bC,e=0,n=this.height,r=this.width,o=h.A.bC-r,l=0;if(ih.A.bottom&&(n-=i+n-h.A.bottom),th.A.right){const i=t+r-h.A.right;r-=i,l+=i,o+=i}r>0&&n>0&&this.JM(r,n,this.Rc,e,l,h.A.Rc,s,o)}_c(){const t=this.Rc,i=this.width,s=this.height;for(let h=0;h>16&255;n+=t,n<1?n=1:n>255&&(n=255);let r=e>>8&255;r+=i,r<1?r=1:r>255&&(r=255);let o=255&e;o+=s,o<1?o=1:o>255&&(o=255),this.Rc[h]=(n<<16)+(r<<8)+o}}}DC(t,i,s,e){t|=0,i|=0,s|=0,e|=0;try{const n=this.width;let r=0,o=0;const l=this.na,a=this.xd,c=(l<<16)/s|0,f=(a<<16)/e|0;t+=(this.Xc*s+l-1)/l|0,i+=(this.zc*e+a-1)/a|0,this.Xc*s%l!=0&&(r=(l-this.Xc*s%l<<16)/s|0),this.zc*e%a!=0&&(o=(a-this.zc*e%a<<16)/e|0),s=s*(this.width-(r>>16))/l|0,e=e*(this.height-(o>>16))/a|0;let u=t+i*h.A.bC,d=h.A.bC-s;if(ih.A.bottom&&(e-=i+e-h.A.bottom),th.A.right){const i=t+s-h.A.right;s-=i,d+=i}this.scale(s,e,this.Rc,r,o,h.A.Rc,d,u,n,c,f)}catch(t){console.error('error in sprite clipping routine')}}Ld(t,i,s,e,n,r,o,l,a,c){t|=0,i|=0,s|=0,e|=0;try{const f=-s/2|0,u=-e/2|0,d=65536*Math.sin(a/326.11)|0,w=65536*Math.cos(a/326.11)|0,y=d*c>>8,A=w*c>>8;let p=(o<<16)+u*y+f*A,m=u*A-f*y+(l<<16),I=t+i*h.A.bC;for(let t=0;t>16)+(o>>16)*this.width],e+=A,o-=y;p+=y,m+=A,I+=h.A.bC}}catch(t){}}kd(t,i,s){t|=0,i|=0;let e=(t+=this.Xc)+(i+=this.zc)*h.A.bC,n=0,r=this.height,o=this.width,l=h.A.bC-o,a=0;if(ih.A.bottom&&(r-=i+r-h.A.bottom),th.A.right){const i=t+o-h.A.right;o-=i,a+=i,l+=i}o>0&&r>0&&this.QM(o,r,this.Rc,a,n,h.A.Rc,e,l,s.Rc)}scale(t,i,s,h,e,n,r,o,l,a,c){try{const f=h;for(let u=-i;u<0;u++){const i=(e>>16)*l;for(let e=-t;e<0;e++){const t=s[(h>>16)+i];0===t?o++:n[o++]=t,h+=a}e+=c,h=f,o+=r}}catch(t){console.error('error in plot_scale')}}JM(t,i,s,h,e,n,r,o){const l=-(t>>2);t=-(3&t);for(let a=-i;a<0;a++){for(let t=l;t<0;t++)n[r++]=s[h++],n[r++]=s[h++],n[r++]=s[h++],n[r++]=s[h++];for(let i=t;i<0;i++)n[r++]=s[h++];r+=o,h+=e}}$M(t,i,s,h,e,n,r,o,l){const a=256-l;for(let c=-i;c<0;c++){for(let i=-t;i<0;i++){const t=s[h++];if(0===t)r++;else{const i=n[r];n[r++]=((16711935&t)*l+(16711935&i)*a&4278255360)+((65280&t)*l+(65280&i)*a&16711680)>>8}}r+=o,h+=e}}qM(t,i,s,h,e,n,r,o){const l=-(t>>2);t=-(3&t);for(let a=-i;a<0;a++){for(let t=l;t<0;t++){let t=s[h++];0===t?r++:n[r++]=t,t=s[h++],0===t?r++:n[r++]=t,t=s[h++],0===t?r++:n[r++]=t,t=s[h++],0===t?r++:n[r++]=t}for(let i=t;i<0;i++){const t=s[h++];0===t?r++:n[r++]=t}r+=o,h+=e}}QM(t,i,s,h,e,n,r,o,l){const a=-(t>>2);t=-(3&t);for(let c=-i;c<0;c++){for(let t=a;t<0;t++){let t=s[e++];0!==t&&0===l[r]?n[r++]=t:r++,t=s[e++],0!==t&&0===l[r]?n[r++]=t:r++,t=s[e++],0!==t&&0===l[r]?n[r++]=t:r++,t=s[e++],0!==t&&0===l[r]?n[r++]=t:r++}for(let i=t;i<0;i++){const t=s[e++];0!==t&&0===l[r]?n[r++]=t:r++}r+=o,e+=h}}}},1673:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(8950),e=s(1069),n=s(4474);class r extends n.A{Rc;width;height;Xc;zc;na;xd;palette;constructor(t,i,s){super(),this.Rc=new Int8Array(t*i),this.width=this.na=t,this.height=this.xd=i,this.Xc=this.zc=0,this.palette=s}static Ac=(t,i,s=0)=>{const h=new e.A(t.read(i+'.dat')),n=new e.A(t.read('index.dat'));n.ft=h.ct;const o=n.ct,l=n.ct,a=n.gA,c=new Int32Array(a);for(let t=1;th.length||n.ft>n.length)throw new Error;const f=n.gA,u=n.gA,d=n.ct,w=n.ct,y=new r(d,w,c);y.Xc=f,y.zc=u,y.na=o,y.xd=l;const A=y.Rc,p=n.gA;if(0===p){const t=y.width*y.height;for(let i=0;ih.A.bottom&&(n-=i+n-h.A.bottom),th.A.right){const i=t+r-h.A.right;r-=i,l+=i,o+=i}r>0&&n>0&&this.tk(r,n,this.Rc,e,l,h.A.Rc,s,o)}_c(){const t=this.Rc,i=this.width,s=this.height;for(let h=0;h>16&255;e+=t,e<0?e=0:e>255&&(e=255);let n=this.palette[h]>>8&255;n+=i,n<0?n=0:n>255&&(n=255);let r=255&this.palette[h];r+=s,r<0?r=0:r>255&&(r=255),this.palette[h]=(e<<16)+(n<<8)+r}}vS(){this.na|=0,this.xd|=0,this.na/=2,this.xd/=2,this.na|=0,this.xd|=0;const t=new Int8Array(this.na*this.xd);let i=0;for(let s=0;s>1)+(s+this.zc>>1)*this.na]=this.Rc[i++];this.Rc=t,this.width=this.na,this.height=this.xd,this.Xc=0,this.zc=0}DC(){if(this.width===this.na&&this.height===this.xd)return;const t=new Int8Array(this.na*this.xd);let i=0;for(let s=0;s>2);t=-(3&t);for(let a=-i;a<0;a++){for(let t=l;t<0;t++){let t=s[h++];0===t?r++:n[r++]=this.palette[255&t],t=s[h++],0===t?r++:n[r++]=this.palette[255&t],t=s[h++],0===t?r++:n[r++]=this.palette[255&t],t=s[h++],0===t?r++:n[r++]=this.palette[255&t]}for(let i=t;i<0;i++){const t=s[h++];0===t?r++:n[r++]=this.palette[255&t]}r+=o,h+=e}}clip(t,i,s,e){try{const n=this.width;this.height;let r=0,o=0;const l=this.na,a=this.xd,c=(l<<16)/s|0,f=(a<<16)/e|0;t=t+(this.Xc*s+l-1)/l|0,i=i+(this.zc*e+a-1)/a|0,this.Xc*s%l!=0&&(r=(l-this.Xc*s%l<<16)/s|0),this.zc*e%a!=0&&(o=(a-this.zc*e%a<<16)/e|0),s=s*(this.width-(r>>16))/l|0,e=e*(this.height-(o>>16))/a|0;let u,d=t+i*h.A.bC,w=h.A.bC-s;ih.A.bottom&&(e-=i+e-h.A.bottom),th.A.right&&(u=t+s-h.A.right,s-=u,w+=u),this.ik(h.A.Rc,this.Rc,this.palette,r,o,d,w,s,e,c,f,n)}catch(t){console.log('error in sprite clipping routine')}}ik(t,i,s,h,e,n,r,o,l,a,c,f){try{const u=h;for(let d=-l;d<0;d++){const l=(e>>16)*f;for(let e=-o;e<0;e++){const e=i[(h>>16)+l];0==e?n++:t[n++]=s[255&e],h+=a}e+=c,h=u,n+=r}}catch(t){console.log('error in plot_scale')}}}},2682:(t,i,s)=>{s.d(i,{A:()=>l});var h=s(8950),e=s(1069),n=s(4474);class r{seed;constructor(t){this.seed=(0x5deece66dn^t)&(1n<<48n)-1n}sk(t){this.seed=(0x5deece66dn^t)&(1n<<48n)-1n}AA(){return this.next(32)}next(t){return this.seed=0x5deece66dn*this.seed+0xbn&(1n<<48n)-1n,Number(this.seed)>>>48-t}}var o=s(9298);class l extends n.A{static sf='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!"£$%^&*()-_=+[{]};:\'@#~,<.>/?\\| ';static hk=[];static{const t=navigator.userAgent.includes('Capacitor');for(let i=0;i<256;i++){let s=l.sf.indexOf(String.fromCharCode(i));t&&s>=63&&s--,-1===s&&(s=74),l.hk[i]=s}}ek=[];nk=new Int32Array(94);rk=new Int32Array(94);lk=new Int32Array(94);ak=new Int32Array(94);ck=new Int32Array(95);fk=new Int32Array(256);random=new r(BigInt(Date.now()));height=0;static Ac=(t,i)=>{const s=new e.A(t.read(i+'.dat')),h=new e.A(t.read('index.dat'));h.ft=s.ct+4;const n=h.gA;n>0&&(h.ft+=3*(n-1));const r=new l;for(let t=0;t<94;t++){r.lk[t]=h.gA,r.ak[t]=h.gA;const i=r.nk[t]=h.ct,e=r.rk[t]=h.ct,n=h.gA,o=i*e;if(r.ek[t]=new Int8Array(o),0===n)for(let h=0;hr.height&&(r.height=e),r.lk[t]=1,r.ck[t]=i+2;{let s=0;for(let h=e/7|0;h=h.A.bottom&&(n-=s+n+1-h.A.bottom),i=h.A.right){const t=i+e+1-h.A.right;e-=t,a+=t,l+=t}e>0&&n>0&&this.yk(e,n,t,c,a,h.A.Rc,o,l,r)}wk(t,i,s,e,n,r,o){s|=0,e|=0;let l=(t|=0)+(i|=0)*h.A.bC,a=h.A.bC-s,c=0,f=0;if(i=h.A.bottom&&(e-=i+e+1-h.A.bottom),t=h.A.right){const i=t+s+1-h.A.right;s-=i,c+=i,a+=i}s>0&&e>0&&this.Ak(s,e,h.A.Rc,l,a,o,f,c,n,r)}yk(t,i,s,h,e,n,r,o,l){const a=-((t|=0)>>2);t=-(3&t);for(let c=-(i|=0);c<0;c++){for(let t=a;t<0;t++)0===s[h++]?r++:n[r++]=l,0===s[h++]?r++:n[r++]=l,0===s[h++]?r++:n[r++]=l,0===s[h++]?r++:n[r++]=l;for(let i=t;i<0;i++)0===s[h++]?r++:n[r++]=l;r+=o,h+=e}}Ak(t,i,s,h,e,n,r,o,l,a){t|=0;const c=((16711935&l)*a&4278255360)+((65280&l)*a&16711680)>>8,f=256-a;for(let l=-(i|=0);l<0;l++){for(let i=-t;i<0;i++)if(0===n[r++])h++;else{const t=s[h];s[h++]=(((16711935&t)*f&4278255360)+((65280&t)*f&16711680)>>8)+c}h+=e,r+=o}}dk(t){return'red'===t?o.A.RED:'gre'===t?o.A.GREEN:'blu'===t?o.A.BLUE:'yel'===t?o.A.aa:'cya'===t?o.A.Zc:'mag'===t?o.A.qc:'whi'===t?o.A.Yl:'bla'===t?o.A.la:'lre'===t?o.A.eS:'dre'===t?o.A.Od:'dbl'===t?o.A.Td:'or1'===t?o.A.nS:'or2'===t?o.A.rS:'or3'===t?o.A.oS:'gr1'===t?o.A.lS:'gr2'===t?o.A.aS:'gr3'===t?o.A.cS:o.A.la}split(t,i){if(0===t.length)return[t];const s=[];for(;t.length>0;){if(this.Mu(t)<=i&&-1===t.indexOf('|')){s.push(t);break}let h=t.length;for(let s=0;si)break;h=s}else if('|'===t[s]){h=s;break}s.push(t.substring(0,h)),t=t.substring(h+1)}return s}}},1183:(t,i,s)=>{s.d(i,{A:()=>n});var h=s(8950),e=s(7854);class n{pk;width;height;mk;Ik;Rc;constructor(t,i,s=e.pl){this.mk=s,this.pk=this.mk.getImageData(0,0,t,i),this.Ik=new Uint32Array(this.pk.data.buffer),this.Rc=new Int32Array(t*i),this.width=t,this.height=i,this.bind()}clear(){this.Rc.fill(0)}bind(){h.A.bind(this.Rc,this.width,this.height)}draw(t,i){this.#t(),this.mk.putImageData(this.pk,t,i)}#t(){const t=this.Rc.length,i=this.Rc,s=this.Ik;for(let h=0;h>16&255|(t>>8&255)<<8|(255&t)<<16|4278190080}}}},3955:(t,i,s)=>{s.d(i,{A:()=>h});class h{static bA=150;static jf=108;static Xf=70;static mf=81;static Of=189;static Qw=7;static pw=88;static dw=30;static gw=176;static aw=220;static sy=66;static zw=17;static Mw=2;static qw=238;static Fy=233;static lu=146;static kf=215;static zf=236;static yE=85;static BI=219;static Pw=140;static Gw=40;static Bw=200;static Fw=178;static Uw=247;static iy=138;static Cw=239;static Ew=194;static Aw=8;static mw=27;static Iw=113;static _w=100;static Dw=134;static Sw=202;static Ow=245;static Hw=172;static ey=96;static ty=97;static hy=116;static Nw=9;static lw=75;static nw=164;static kw=53;static xw=185;static ew=206;static py=177;static ly=248;static ww=195;static yw=71;static uw=133;static cw=157;static fw=211;static Lw=48;static bw=130;static Zw=31;static Jw=59;static Xw=212;static $w=38;static jw=6;static Kw=155;static Rw=235;static wA=231;static Wy=237;static tu=175;static Qm=93;static My=190;static Jm=165;static Lf=159;static Zy=171;static jy=79;static Ly=52;static Hy=244;static Uy=148;static zy=11;static Xy=118;static Vy=4;static Ky=158;static $m=181}},3554:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(6666),e=s(1982),n=s(9234);class r{Ek;gk;_k;closed=!1;Ck=!1;static ef=async t=>await new Promise(((i,s)=>{const h=t.host.startsWith('https'),e=h?'wss':'ws',n=t.host.substring(t.host.indexOf('//')+2),r=h?t.port+2:t.port+1,o=new WebSocket(`${e}://${n}:${r}`,'binary');o.addEventListener('open',(()=>{console.log('connection open!'),i(o)})),o.addEventListener('error',(()=>{console.log('connection error!'),s(o)}))}));constructor(t){t.onclose=this.onclose,t.onerror=this.onerror,this.gk=new a(t,5e3),this._k=new o(t,5e3),this.Ek=t}get host(){return this.Ek.url.split('/')[2]}get port(){return parseInt(this.Ek.url.split(':')[2],10)}get available(){return this.closed?0:this.gk.available}write(t,i){this._k.write(t,i)}async read(){return this.closed?0:this.gk.Tk()??await this.gk.Ok()}async nf(t,i,s){if(!this.closed)for(;s>0;){const h=this.gk.vk(t,i,s)??await this.gk.bk(t,i,s);if(h.length<=0)throw new Error('EOF');i+=h.length,s-=h.length}}close(){this.closed=!0,this.Ek.close(),this.gk.close(),this._k.close(),console.log('connection close!'),this.Ck&&console.log('connection error!')}onclose=t=>{this.closed||this.close()};onerror=t=>{this.closed||(this.Ck=!0,this.close())}}class o{Ek;Lk;closed=!1;Ck=!1;constructor(t,i){this.Ek=t,this.Lk=i}write(t,i){if(!this.closed){if(this.Ck)throw this.Ck=!1,new Error('Error in writer thread');if(i>this.Lk||t.length>this.Lk)throw new Error('buffer overflow');try{this.Ek.send(t.subarray(0,i))}catch(t){this.Ck=!0}}}close(){this.closed=!0}}class l extends e.A{oI;position;constructor(t){super(),this.oI=t,this.position=0}get available(){return this.oI.length-this.position}get read(){return this.oI[this.position++]}get Rk(){return this.oI.length}}class a{Lk;queue=new h.A;event=null;Sk=null;total=0;closed=!1;constructor(t,i){this.Lk=i,t.binaryType='arraybuffer',t.onmessage=this.onmessage}get available(){return this.total}onmessage=t=>{if(this.closed)throw new Error('WebSocketReader is closed!');const i=new l(new Uint8Array(t.data));if(this.event?this.queue.vE(i):this.event=i,this.total+=i.Rk,this.Sk&&(this.Sk(this.event),this.Sk=null,this.total>this.Lk))throw new Error('buffer overflow')};Mk(){return this.event&&this.event.available>0?this.event.read:null}async kk(t){for(this.event=this.queue.Qb();this.totalthis.Sk=t)),(0,n.ul)(2e3).then((()=>{if(this.closed)throw new Error('WebSocketReader closed while reading.')}))]);return this.event?this.event.read:this.kk(t)}vk(t,i,s){if(this.closed)throw new Error('WebSocketReader is closed!');if(!(this.event&&this.event.available>=s))return null;for(;s>0;){const h=this.Mk();if(null===h)throw new Error('EOF - tried to read a fast byte when there was not enough immediate bytes.');t[i++]=h,this.total--,s--}return t}async bk(t,i,s){if(this.closed)throw new Error('WebSocketReader is closed!');for(;s>0;)t[i++]=this.Mk()??await this.kk(s),this.total--,s--;return t}Tk(){if(this.closed)throw new Error('WebSocketReader is closed!');const t=this.Mk();return null===t?null:(this.total--,t)}async Ok(){if(this.closed)throw new Error('WebSocketReader is closed!');const t=await this.kk(1);return this.total--,t}close(){this.closed=!0,this.Sk=null,this.total=0,this.event=null,this.queue.clear()}}},296:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(6666),e=s(1982),n=s(9234);class r{yt;nl;xk;closed=!1;Ck=!1;constructor(t,i){this.yt=t,this.yt.onerror=this.onerror,this.yt.onmessageerror=this.onmessageerror,this.nl=new a(5e3),this.xk=new o(this.yt,5e3,i),this.yt.postMessage({type:'connection',id:i})}get available(){return this.closed?0:this.nl.available}write(t,i){this.xk.write(t,i)}async read(){return this.closed?0:this.nl.Tk()??await this.nl.Ok()}async nf(t,i,s){if(!this.closed)for(;s>0;){const h=this.nl.vk(t,i,s)??await this.nl.bk(t,i,s);if(h.length<=0)throw new Error('EOF');i+=h.length,s-=h.length}}close(){this.closed=!0,this.nl.close(),this.xk.close(),console.log('connection close!'),this.Ck&&console.log('connection error!')}onerror=t=>{this.closed||(this.Ck=!0,this.close())};onmessageerror=t=>{this.closed||(this.Ck=!0,this.close())}}class o{yt;Lk;At;closed=!1;Ck=!1;constructor(t,i,s){this.yt=t,this.Lk=i,this.At=s}write(t,i){if(!this.closed){if(this.Ck)throw this.Ck=!1,new Error('Error in writer thread');if(i>this.Lk||t.length>this.Lk)throw new Error('buffer overflow');try{this.yt.postMessage({type:'data',data:t.subarray(0,i),id:this.At})}catch(t){this.Ck=!0}}}close(){this.closed=!0}}class l extends e.A{oI;position;constructor(t){super(),this.oI=t,this.position=0}get available(){return this.oI.length-this.position}get read(){return this.oI[this.position++]}get Rk(){return this.oI.length}}class a{Lk;queue=new h.A;event=null;Sk=null;total=0;closed=!1;constructor(t){this.Lk=t}get available(){return this.total}onmessage=t=>{const i='string'==typeof t.data?JSON.parse(t.data):t;if('data'!==i.type)return void console.error('Unexpected message type: ',i.type);if(this.closed)throw new Error('WorkerReader is closed!');const s=new l(new Uint8Array(i.data));if(this.event?this.queue.vE(s):this.event=s,this.total+=s.Rk,this.Sk&&(this.Sk(this.event),this.Sk=null,this.total>this.Lk))throw new Error('buffer overflow')};Mk(){return this.event&&this.event.available>0?this.event.read:null}async kk(t){for(this.event=this.queue.Qb();this.totalthis.Sk=t)),(0,n.ul)(2e3).then((()=>{if(this.closed)throw new Error('WorkerReader closed while reading.')}))]);return this.event?this.event.read:this.kk(t)}vk(t,i,s){if(this.closed)throw new Error('WorkerReader is closed!');if(!(this.event&&this.event.available>=s))return null;for(;s>0;){const h=this.Mk();if(null===h)throw new Error('EOF - tried to read a fast byte when there was not enough immediate bytes.');t[i++]=h,this.total--,s--}return t}async bk(t,i,s){if(this.closed)throw new Error('WorkerReader is closed!');for(;s>0;)t[i++]=this.Mk()??await this.kk(s),this.total--,s--;return t}Tk(){if(this.closed)throw new Error('WorkerReader is closed!');const t=this.Mk();return null===t?null:(this.total--,t)}async Ok(){if(this.closed)throw new Error('WorkerReader is closed!');const t=await this.kk(1);return this.total--,t}close(){this.closed=!0,this.Sk=null,this.total=0,this.event=null,this.queue.clear()}}},4544:(t,i,s)=>{s.d(i,{A:()=>h});class h{db;constructor(t){t.onerror=this.onerror,t.onclose=this.onclose,this.db=t}static openDatabase=async()=>await new Promise(((t,i)=>{const s=indexedDB.open('lostcity',1);s.onsuccess=i=>{const s=i.target;console.log('database success!'),t(s.result)},s.onupgradeneeded=t=>{t.target.result.createObjectStore('cache')},s.onerror=t=>{const s=t.target;console.error('database error!: ',s.error),i(s.result)}}));ll=async t=>await new Promise((i=>{const s=this.db.transaction('cache','readonly').objectStore('cache').get(t);s.onsuccess=()=>{i(s.result)},s.onerror=t=>{i(void 0)}}));dl=async(t,i)=>await new Promise(((s,h)=>{const e=this.db.transaction('cache','readwrite').objectStore('cache').put(i,t);e.onsuccess=()=>{s()},e.onerror=t=>{h()}}));onclose=t=>{console.log('database close!')};onerror=t=>{console.log('database error!')};tt=t=>{const i=t.trim();let s=0;for(let t=0;t='A'&&h<='Z'?s+=h.charCodeAt(0)+1-65:h>='a'&&h<='z'?s+=h.charCodeAt(0)+1-97:h>='0'&&h<='9'&&(s+=h.charCodeAt(0)+27-48)}return s}}},2634:(t,i,s)=>{s.d(i,{A:()=>h});class h{count=0;Dk=new Int32Array(256);Nk=new Int32Array(256);a=0;b=0;c=0;constructor(t){for(let i=0;i>>2,e+=i,s+=h,s^=h<<8,n+=s,h+=e,h^=e>>>16,r+=h,e+=n,e^=n<<10,o+=e,n+=r,n^=r>>>4,t+=n,r+=o,r^=o<<8,i+=r,o+=t,o^=t>>>9,s+=o,t+=i;for(let l=0;l<256;l+=8)t+=this.Dk[l],i+=this.Dk[l+1],s+=this.Dk[l+2],h+=this.Dk[l+3],e+=this.Dk[l+4],n+=this.Dk[l+5],r+=this.Dk[l+6],o+=this.Dk[l+7],t^=i<<11,h+=t,i+=s,i^=s>>>2,e+=i,s+=h,s^=h<<8,n+=s,h+=e,h^=e>>>16,r+=h,e+=n,e^=n<<10,o+=e,n+=r,n^=r>>>4,t+=n,r+=o,r^=o<<8,i+=r,o+=t,o^=t>>>9,s+=o,t+=i,this.Nk[l]=t,this.Nk[l+1]=i,this.Nk[l+2]=s,this.Nk[l+3]=h,this.Nk[l+4]=e,this.Nk[l+5]=n,this.Nk[l+6]=r,this.Nk[l+7]=o;for(let l=0;l<256;l+=8)t+=this.Nk[l],i+=this.Nk[l+1],s+=this.Nk[l+2],h+=this.Nk[l+3],e+=this.Nk[l+4],n+=this.Nk[l+5],r+=this.Nk[l+6],o+=this.Nk[l+7],t^=i<<11,h+=t,i+=s,i^=s>>>2,e+=i,s+=h,s^=h<<8,n+=s,h+=e,h^=e>>>16,r+=h,e+=n,e^=n<<10,o+=e,n+=r,n^=r>>>4,t+=n,r+=o,r^=o<<8,i+=r,o+=t,o^=t>>>9,s+=o,t+=i,this.Nk[l]=t,this.Nk[l+1]=i,this.Nk[l+2]=s,this.Nk[l+3]=h,this.Nk[l+4]=e,this.Nk[l+5]=n,this.Nk[l+6]=r,this.Nk[l+7]=o;this.Pk(),this.count=256}Pk(){this.c++,this.b+=this.c;for(let t=0;t<256;t++){const i=this.Nk[t],s=3&t;let h;0===s?this.a^=this.a<<13:1===s?this.a^=this.a>>>6:2===s?this.a^=this.a<<2:3===s&&(this.a^=this.a>>>16),this.a+=this.Nk[t+128&255],this.Nk[t]=h=this.Nk[i>>>2&255]+this.a+this.b,this.Dk[t]=this.b=this.Nk[h>>>8>>>2&255]+i}}}},1069:(t,i,s)=>{s.d(i,{A:()=>r});var h=s(9234),e=s(6666),n=s(4474);class r extends n.A{static Fk=3988292384;static Uk=new Int32Array(256);static Bk=new Uint32Array(33);static Gk=new e.A;static Hk=new e.A;static Wk=new e.A;static Yk=0;static Vk=0;static Kk=0;static{for(let t=0;t<32;t++)r.Bk[t]=(1<>>=1:i=i>>>1^r.Fk;r.Uk[t]=i}}static al=t=>{let i=4294967295;for(let s=0;s>>8^r.Uk[255&(i^t[s])];return~i};view;data;ft=0;rI=0;random=null;constructor(t){if(!t)throw new Error('Input src packet array was null!');super(),t instanceof Int8Array?this.data=new Uint8Array(t):this.data=t,this.view=new DataView(this.data.buffer,this.data.byteOffset,this.data.byteLength)}get length(){return this.view.byteLength}get available(){return this.length-this.ft}static hi=t=>{let i=null;return 0===t&&r.Yk>0?(r.Yk--,i=r.Gk.Qb()):1===t&&r.Vk>0?(r.Vk--,i=r.Hk.Qb()):2===t&&r.Kk>0&&(r.Kk--,i=r.Wk.Qb()),i?(i.ft=0,i):new r(0===t?new Uint8Array(100):1===t?new Uint8Array(5e3):new Uint8Array(3e4))};release(){this.ft=0,100===this.view.byteLength&&r.Yk<1e3?(r.Gk.vE(this),r.Yk++):5e3===this.view.byteLength&&r.Vk<250?(r.Hk.vE(this),r.Vk++):3e4===this.view.byteLength&&r.Kk<50&&(r.Wk.vE(this),r.Kk++)}get gA(){return this.view.getUint8(this.ft++)}get IA(){return this.view.getInt8(this.ft++)}get ct(){const t=this.view.getUint16(this.ft);return this.ft+=2,t}get gp(){const t=this.view.getInt16(this.ft);return this.ft+=2,t}get lt(){const t=this.view.getUint8(this.ft++)<<16|this.view.getUint16(this.ft);return this.ft+=2,t}get ut(){const t=this.view.getInt32(this.ft);return this.ft+=4,t}get rf(){const t=this.view.getBigInt64(this.ft);return this.ft+=8,t}get QR(){return this.view.getUint8(this.ft)<128?this.gA-64:this.ct-49152}get TO(){return this.view.getUint8(this.ft)<128?this.gA:this.ct-32768}get xA(){const t=this.view,i=t.byteLength;let s,h='';for(;10!==(s=t.getUint8(this.ft++))&&this.ft>16),this.view.setUint16(this.ft,t),this.ft+=2}p4(t){this.view.setInt32(this.ft,t),this.ft+=4}zk(t){this.view.setInt32(this.ft,t,!0),this.ft+=4}ky(t){this.view.setBigInt64(this.ft,t),this.ft+=8}lf(t){const i=this.view,s=t.length;for(let h=0;h>>3}nI(t){let i=this.rI>>>3,s=8-(7&this.rI),h=0;for(this.rI+=t;t>s;s=8)h+=(this.view.getUint8(i++)&r.Bk[s])<>>s-t&r.Bk[t],h}af(t,i){const s=this.ft;this.ft=0;const e=new Uint8Array(s);this.tp(s,0,e);const n=(0,h.jk)(e),r=(0,h.Zk)(n,i,t),o=(0,h.qk)(r);this.ft=0,this.p1(o.length),this.cf(o,o.length,0)}}},353:(t,i,s)=>{s.d(i,{A:()=>h});class h{static $k=[95,218,67,50,253,222,194,60,101,128,8,251,92,111,24,33,223,66,232,59,227,113,153,105,126,98,167,102,177,238,62,190,147,23,150,151,156,144,193,155,81,0,198,22,137,210,179,16,168,170,32,181,248,141,58,87,208,106,180,191,221,241,40,176,196,154,65,145,230,78,30,161,188,41,14,129,18,199,47,247,225,34,51,10,159,75,12,56,61,31,39,91,46,242,134,5,122,123,209,228,104,195,21,3,11,44,107,172,6,186,110,215,205,103,27,185,124,77,252,117,86,115,127,207,52,79,43,97,219,116,169,7,118,162,108,36,20,233,88,135,80,19,42,237,57,152,71,9,250,17,4,119,234,130,26,200,189,163,254,245,197,171,220,235,140,244,184,94,211,231,99,246,121,212,112,204,63,148,83,178,1,255,131,13,183,142,236,45,55,35,243,136,37,85,100,160,38,224,146,174,82,48,109,132,125,90,143,138,240,173,165,164,192,175,29,74,28,114,213,73,64,206,76,139,96,2,229,15,93,25,239,202,49,70,214,201,72,203,68,89,69,157,216,217,249,120,226,84,149,187,54,53,158,166,182,133,0];static pA=[0,-2,4,6,-1,0,0,2,0,0,0,0,5,4,2,2,0,0,0,0,2,-2,2,14,0,6,3,0,4,0,0,0,3,0,0,0,0,0,0,0,0,-1,4,2,6,0,6,0,0,3,7,0,0,0,-1,0,0,0,0,4,0,0,0,0,0,0,0,0,1,15,0,0,0,0,6,0,2,0,0,0,2,0,0,0,1,0,0,4,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,-2,0,0,2,0,0,0,2,9,0,0,0,0,0,4,0,0,0,3,7,9,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,3,2,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,-2,2,0,0,0,0,0,6,0,0,0,2,0,2,0,0,0,-2,0,0,4,0,0,0,0,6,0,0,-2,-2,0,0,0,0,0,0,-2,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0]}},2215:(t,i,s)=>{s.d(i,{A:()=>h});class h{static Ip=14;static ZA=28;static Xp=129;static JA=167;static Gp=168;static pp=195;static Hp=2;static Yp=26;static Pp=46;static Dp=84;static Sp=87;static yp=103;static $A=146;static RA=197;static zp=201;static dp=204;static Ep=209;static lp=126;static Mp=185;static rp=15;static sp=98;static Jp=213;static xp=74;static $p=13;static _p=3;static Kp=239;static TA=1;static Qp=184;static ip=133;static hp=226;static Np=4;static Vp=21;static Ap=32;static Uy=41;static EA=152;static PA=19;static qp=22;static MA=25;static _A=43;static jp=44;static kp=68;static Wp=136;static FA=139;static op=140;static DA=142;static np=243;static cp=254;static NA=20;static CA=80;static Lp=132;static QA=220;static vA=237;static mA=150;static qA=175;static Rp=193;static fp=12;static kA=54;static ap=212;static wp=7;static Cp=135;static Zp=162;static BA=23;static KA=42;static YA=49;static GA=50;static zA=59;static WA=69;static XA=76;static UA=151;static HA=191;static VA=223}},3937:(t,i,s)=>{s.d(i,{A:()=>o});class h{start=0;end=0;form=0;length=0;Jk=null;Qk=null;threshold=0;position=0;delta=0;amplitude=0;tx=0;read(t){this.form=t.gA,this.start=t.ut,this.end=t.ut,this.length=t.gA,this.Jk=new Int32Array(this.length),this.Qk=new Int32Array(this.length);for(let i=0;i=this.threshold&&this.Qk&&this.Jk&&(this.amplitude=this.Qk[this.position++]<<15,this.position>=this.length&&(this.position=this.length-1),this.threshold=this.Jk[this.position]/65536*t|0,this.threshold>this.tx&&(this.delta=((this.Qk[this.position]<<15)-this.amplitude)/(this.threshold-this.tx)|0)),this.amplitude+=this.delta,this.tx++,this.amplitude-this.delta>>15}}class e{static buffer=null;static iO=null;static sin=null;static ix=new Int32Array(5);static sx=new Int32Array(5);static hx=new Int32Array(5);static nx=new Int32Array(5);static ox=new Int32Array(5);lx=null;ux=null;wx=null;yx=null;Ax=null;mx=null;release=null;attack=null;Ix=new Int32Array(5);Ex=new Int32Array(5);gx=new Int32Array(5);start=0;length=500;_x=100;Cx=0;static init=()=>{this.iO=new Int32Array(32768);for(let t=0;t<32768;t++)Math.random()>.5?this.iO[t]=1:this.iO[t]=-1;this.sin=new Int32Array(32768);for(let t=0;t<32768;t++)this.sin[t]=16384*Math.sin(t/5215.1903)|0;this.buffer=new Int32Array(220500)};yf(t,i){for(let i=0;i>1,r+=(i*h>>16)+n}if(this.Ax&&this.mx){const i=this.Ax.evaluate(t),s=this.mx.evaluate(t);c=c*(32768+(this.Tx(s,a,this.Ax.form)>>1))>>15,a+=(i*o>>16)+l}for(let h=0;h<5;h++)if(0!==this.Ix[h]){const n=i+e.sx[h];n>15,e.ix[h],this.lx.form),e.ix[h]+=(s*e.nx[h]>>16)+e.ox[h])}}if(this.release&&this.attack){this.release.reset(),this.attack.reset();let i=0,s=!0;for(let h=0;h>8):this.release.start+((this.release.end-this.release.start)*r>>8),i+=256,i>=o&&(i=0,s=!s),s&&(e.buffer[h]=0)}}if(this.Cx>0&&this._x>0){const i=this.Cx*s;for(let s=i;s32767&&(e.buffer[i]=32767);return e.buffer}Tx(t,i,s){return 1===s?(32767&i)<16384?t:-t:2===s?e.sin[32767&i]*t>>14:3===s?((32767&i)*t>>14)-t:4===s?e.iO[i/2607&32767]*t:0}read(t){this.lx=new h,this.lx.read(t),this.ux=new h,this.ux.read(t),0!==t.gA&&(t.ft--,this.wx=new h,this.wx.read(t),this.yx=new h,this.yx.read(t)),0!==t.gA&&(t.ft--,this.Ax=new h,this.Ax.read(t),this.mx=new h,this.mx.read(t)),0!==t.gA&&(t.ft--,this.release=new h,this.release.read(t),this.attack=new h,this.attack.read(t));for(let i=0;i<10;i++){const s=t.TO;if(0===s)break;this.Ix[i]=s,this.Ex[i]=t.QR,this.gx[i]=t.TO}this.Cx=t.TO,this._x=t.TO,this.length=t.ct,this.start=t.ct}}var n=s(1069),r=s(3867);class o{static up=new Int32Array(1e3);static Ox=null;static vx=null;static bx=new r.xs(1e3,null);Lx=new r.xs(10,null);Rx=0;loopEnd=0;static Lc=t=>{const i=new n.A(t.read('sounds.dat'));for(this.Ox=new Uint8Array(441e3),this.vx=new n.A(this.Ox),e.init();;){const t=i.ct;if(65535===t)break;const s=new o;s.read(i),this.bx[t]=s,this.up[t]=s.trim()}};static yf=(t,i)=>{if(!this.bx[t])return null;const s=this.bx[t];return s?.Sx(i)??null};read(t){for(let i=0;i<10;i++)0!==t.gA&&(t.ft--,this.Lx[i]=new e,this.Lx[i]?.read(t));this.Rx=t.ct,this.loopEnd=t.ct}trim(){let t=9999999;for(let i=0;i<10;i++)this.Lx[i]&&(this.Lx[i].start/20|0)i&&(i=this.Lx[t].length+this.Lx[t].start);if(0===i)return 0;let s=22050*i/1e3|0,h=22050*this.Rx/1e3|0,e=22050*this.loopEnd/1e3|0;(h<0||e<0||e>s||h>=e)&&(t=0);let n=s+(e-h)*(t-1);for(let t=44;t>8<<24>>24)}if(t>1){h+=44,e+=44,s+=44,n+=44;const i=n-s;for(let t=s-1;t>=e;t--)o.Ox&&(o.Ox[t+i]=o.Ox[t]);for(let i=1;i{s.d(i,{gc:()=>a,Ec:()=>o,xs:()=>h,bv:()=>e,Yr:()=>n,Tv:()=>r,ur:()=>l});class h extends Array{constructor(t,i){super(t);for(let s=0;s{s.d(i,{qk:()=>l,fl:()=>e,jk:()=>o,ul:()=>h,yc:()=>n,jc:()=>r,Zk:()=>a});const h=async t=>new Promise((i=>setTimeout(i,t))),e=async t=>new Int8Array(await(await fetch(t)).arrayBuffer()),n=async t=>(await fetch(t)).text();function r(t,i,s,h,e){for(;e--;)s[h++]=t[i++]}function o(t){let i=0n;for(let s=0;s0n;)i.unshift(Number(0xffn&t)),t>>=8n;return 128&i[0]&&i.unshift(0),new Uint8Array(i)}function a(t,i,s){let h=1n;for(;i>0n;)i%2n===1n&&(h=h*t%s),t=t*t%s,i>>=1n;return h}},7953:(t,i,s)=>{s.d(i,{A:()=>e});var h=s(1069);class e{static Mx=new Uint16Array(['d','o','t'].join('').split('').map((t=>t.charCodeAt(0))));static kx=new Uint16Array(['(','a',')'].join('').split('').map((t=>t.charCodeAt(0))));static xx=new Uint16Array(['s','l','a','s','h'].join('').split('').map((t=>t.charCodeAt(0))));static Dx=['cook',"cook's",'cooks','seeks','sheet'];static Nx=[];static Px=[];static Fx=[];static Ux=[];static Bx=[];static Gx=[];static Lc=t=>{const i=new h.A(t.read('fragmentsenc.txt')),s=new h.A(t.read('badenc.txt')),e=new h.A(t.read('domainenc.txt')),n=new h.A(t.read('tldlist.txt'));this.read(s,e,i,n)};static filter=t=>{const i=[...t];this.format(i);const s=i.join('').trim(),h=s.toLowerCase(),e=[...h];this.Hx(e),this.Wx(e),this.Yx(e),this.Vx(e);for(let t=0;t{this.zx(t),this.jx(i),this.Zx(s),this.qx(h)};static qx=t=>{const i=t.ut;for(let s=0;st.gA))};static zx=t=>{const i=t.ut;for(let s=0;st.gA));const i=new Array(t.gA).fill([]).map((()=>[t.IA,t.IA]));i.length>0&&(this.Ux[s]=i)}};static jx=t=>{const i=t.ut;for(let s=0;st.gA))};static Zx=t=>{const i=t.ut;for(let s=0;s{const i=[...t],s=[...t];this.$x(null,i,this.Mx),this.$x(null,s,this.xx);for(let h=0;h{for(let i=0;i<2;i++)for(let i=this.Fx.length-1;i>=0;i--)this.$x(this.Ux[i],t,this.Fx[i])};static Yx=t=>{const i=[...t],s=[...t];this.$x(null,i,this.kx),this.$x(null,s,this.Mx);for(let h=this.Bx.length-1;h>=0;h--)this.Qx(s,i,this.Bx[h],t)};static Vx=t=>{for(let i=0;i=0&&e{if(this.rD(t))return!0;const i=this.oD(t),s=this.Gx,h=s.length;if(i===s[0]||i===s[h-1])return!0;let e=0,n=h-1;for(;e<=n;){const t=(e+n)/2|0;if(i===s[t])return!0;i{if(t.length>6)return 0;let i=0;for(let s=0;s{for(let s=i;s=0;s++)if(this.aD(t[s]))return s;return-1};static eD=(t,i)=>{for(let s=t;s=0;s++)if(!this.aD(i[s]))return s;return i.length};static cD=(t,i,s)=>i===s||'o'===i&&'0'===s?1:'o'===i&&'('===s&&')'===t?2:'c'!==i||'('!==s&&'<'!==s&&'['!==s?'e'===i&&'€'===s||'s'===i&&'$'===s||'l'===i&&'i'===s?1:0:1;static Qx=(t,i,s,h)=>{const e=s.length,n=h.length;for(let r=0;r<=n-e;r++){const{fD:e,uD:n}=this.dD(r,s,h);if(!e)continue;const o=this.wD(r,h,3,i,['@']),l=this.yD(n-1,h,3,t,['.',',']);(o>2||l>2)&&this.hD(r,n,h)}};static dD=(t,i,s)=>{const h=i.length;let e=t,n=0;for(;e0)e+=l,n++;else{if(0===n)break;const s=this.cD(o,String.fromCharCode(i[n-1]),r);if(s>0)e+=s,1===n&&t++;else{if(n>=h||!this.iD(r))break;e++}}}return{fD:n>=h,uD:e}};static $x=(t,i,s)=>{if(!(s.length>i.length))for(let h=0;h<=i.length-s.length;h++){let e=h;const{uD:n,AD:r,pD:o,mD:l,ID:a}=this.ED(i,s,e);e=n;let c=i[e],f=e+1=s.length)||l&&a)continue;let u,d=!0;if(o){let t=!1,s=!1;if((h-1<0||this.iD(i[h-1])&&"'"!==i[h-1])&&(t=!0),(e>=i.length||this.iD(i[e])&&"'"!==i[e])&&(s=!0),!t||!s){let s=!1;for(u=h-2,t&&(u=h);!s&&u=0&&(!this.iD(i[u])||"'"===i[u])){const t=[];let h;for(h=0;h<3&&u+h=0&&(!this.iD(i[u-1])||"'"===i[u-1])&&(e=!1),e&&!this.nD(t)&&(s=!0)}u++}s||(d=!1)}}else{c=' ',h-1>=0&&(c=i[h-1]),f=' ',e{let h=s,e=0,n=0,r=!1,o=!1,l=!1;for(;h=t.length||o&&l);){const a=t[h],c=h+10)1===f&&this.aD(a)&&(o=!0),2===f&&(this.aD(a)||this.aD(c))&&(o=!0),h+=f,e++;else{if(0===e)break;let t;if((t=this.TD(c,String.fromCharCode(i[e-1]),a))>0)h+=t;else{if(e>=i.length||!this.sD(a))break;if(this.iD(a)&&"'"!==a&&(r=!0),this.aD(a)&&(l=!0),h++,n++,(100*n/(h-s)|0)>90)break}}}return{uD:h,AD:e,pD:r,mD:o,ID:l}};static TD=(t,i,s)=>{if(i===s)return 1;if(i>='a'&&i<='m'){if('a'===i)return'4'!==s&&'@'!==s&&'^'!==s?'/'===s&&'\\'===t?2:0:1;if('b'===i)return'6'!==s&&'8'!==s?'1'===s&&'3'===t?2:0:1;if('c'===i)return'('!==s&&'<'!==s&&'{'!==s&&'['!==s?0:1;if('d'===i)return'['===s&&')'===t?2:0;if('e'===i)return'3'!==s&&'€'!==s?0:1;if('f'===i)return'p'===s&&'h'===t?2:'£'===s?1:0;if('g'===i)return'9'!==s&&'6'!==s?0:1;if('h'===i)return'#'===s?1:0;if('i'===i)return'y'!==s&&'l'!==s&&'j'!==s&&'1'!==s&&'!'!==s&&':'!==s&&';'!==s&&'|'!==s?0:1;if('j'===i)return 0;if('k'===i)return 0;if('l'===i)return'1'!==s&&'|'!==s&&'i'!==s?0:1;if('m'===i)return 0}if(i>='n'&&i<='z'){if('n'===i)return 0;if('o'===i)return'0'!==s&&'*'!==s?'('===s&&')'===t||'['===s&&']'===t||'{'===s&&'}'===t||'<'===s&&'>'===t?2:0:1;if('p'===i)return 0;if('q'===i)return 0;if('r'===i)return 0;if('s'===i)return'5'!==s&&'z'!==s&&'$'!==s&&'2'!==s?0:1;if('t'===i)return'7'!==s&&'+'!==s?0:1;if('u'===i)return'v'===s?1:'\\'===s&&'/'===t||'\\'===s&&'|'===t||'|'===s&&'/'===t?2:0;if('v'===i)return'\\'===s&&'/'===t||'\\'===s&&'|'===t||'|'===s&&'/'===t?2:0;if('w'===i)return'v'===s&&'v'===t?2:0;if('x'===i)return')'===s&&'('===t||'}'===s&&'{'===t||']'===s&&'['===t||'>'===s&&'<'===t?2:0;if('y'===i)return 0;if('z'===i)return 0}return i>='0'&&i<='9'?'0'===i?'o'===s||'O'===s?1:'('===s&&')'===t||'{'===s&&'}'===t||'['===s&&']'===t?2:0:'1'===i&&'l'===s?1:0:','===i?'.'===s?1:0:'.'===i?','===s?1:0:'!'===i&&'i'===s?1:0};static _D=(t,i,s)=>{let h=0,e=i.length-1;for(;h<=e;){const n=(h+e)/2|0;if(i[n][0]===t&&i[n][1]===s)return!0;tthis.lD(t)?t.charCodeAt(0)+1-'a'.charCodeAt(0):"'"===t?28:this.aD(t)?t.charCodeAt(0)+29-'0'.charCodeAt(0):27;static Jx=(t,i,s,h,e)=>{if(!(h.length>s.length))for(let n=0;n<=s.length-h.length;n++){const{uD:r,OD:o}=this.vD(s,h,n);if(o0&&c>0&&(l=!0),2===i&&(a>2&&c>0||a>0&&c>2)&&(l=!0),3===i&&a>0&&c>2&&(l=!0),!l)continue;let f,u=n,d=r-1,w=!1;if(a>2){if(4===a)for(w=!1,f=n-1;f>=0;f--)if(w){if('*'!==e[f])break;u=f}else'*'===e[f]&&(u=f,w=!0);for(w=!1,f=u-1;f>=0;f--)if(w){if(this.iD(s[f]))break;u=f}else this.iD(s[f])||(w=!0,u=f)}if(c>2){if(4===c)for(w=!1,f=d+1;f{let h=0;for(;s0)s+=r,h++;else{if(0===h)break;let t;if((t=this.cD(n,String.fromCharCode(i[h-1]),e))>0)s+=t;else{if(!this.iD(e))break;s++}}}return{uD:s,OD:h}};static iD=t=>!this.CD(t)&&!this.aD(t);static sD=t=>!this.lD(t)||('v'===t||'x'===t||'j'===t||'q'===t||'z'===t);static CD=t=>this.lD(t)||this.bD(t);static aD=t=>t>='0'&&t<='9';static lD=t=>t>='a'&&t<='z';static bD=t=>t>='A'&&t<='Z';static rD=t=>{for(let i=0;i{for(let h=t;h{let s=0;for(let h=i-1;h>=0&&this.iD(t[h]);h--)'*'===t[h]&&s++;return s};static RD=(t,i)=>{let s=0;for(let h=i+1;h(e?this.LD(i,s):this.RD(i,s))>=h?4:this.iD(e?t[s-1]:t[s+1])?1:0;static wD=(t,i,s,h,e)=>{if(0===t)return 2;for(let s=t-1;s>=0&&this.iD(i[s]);s--)if(e.includes(i[s]))return 3;return this.SD(i,h,t,s,!0)};static yD=(t,i,s,h,e)=>{if(t+1===i.length)return 2;for(let s=t+1;s{let i=0;for(let s=0;st>=' '&&t<=''||' '===t||'\n'===t||'\t'===t||'£'===t||'€'===t;static Kx=(t,i)=>{for(let s=0;s{let i=!0;for(let s=0;s{s.d(i,{A:()=>h});class h{static kD=[' ','e','t','a','o','i','h','n','s','r','d','l','u','m','w','c','y','f','g','p','b','v','k','x','j','q','z','0','1','2','3','4','5','6','7','8','9',' ','!','?','.',',',':',';','(',')','-','&','*','\\','\'','@','#','+','=','£','$','%','"','[',']'];static xD=[];static Lc=(t,i)=>{let s,h=0,e=-1;for(let n=0;n>4&15,-1!==e?(this.xD[h++]=this.kD[(e<<4)+s-195],e=-1):s<13?this.xD[h++]=this.kD[s]:e=s,s=15&i,-1!==e?(this.xD[h++]=this.kD[(e<<4)+s-195],e=-1):s<13?this.xD[h++]=this.kD[s]:e=s}let n=!0;for(let t=0;t='a'&&i<='z'&&(this.xD[t]=i.toUpperCase(),n=!1),'.'!==i&&'!'!==i||(n=!0)}return this.xD.slice(0,h).join('')};static By=(t,i)=>{i.length>80&&(i=i.substring(0,80)),i=i.toLowerCase();let s=-1;for(let h=0;h12&&(n+=195),-1===s?n<13?s=n:t.p1(n):n<13?(t.p1((s<<4)+n),s=-1):(t.p1((s<<4)+(n>>4)),s=15&n)}-1!==s&&t.p1(s<<4)}}},4702:(t,i,s)=>{async function h(t,i={}){const s={env:Object.assign(Object.create(globalThis),i.env||{},{abort(t,i,s,h){t=r(t>>>0),i=r(i>>>0),s>>>=0,h>>>=0,(()=>{throw Error(`${t} in ${i}:${s}:${h}`)})()}})},{exports:h}=await WebAssembly.instantiate(t,s),e=h.memory||i.env.memory,n=Object.setPrototypeOf({read:(t,i,s,n)=>(i=function(t,i,s,n,r){if(null==n)return 0;const o=n.length,l=h.__pin(h.__new(o<>>0;if(r)new r(e.buffer,l,o).set(n);else for(let i=0;i>>0),n[i]);return h.__unpin(l),l}(l,6,0,i,Int8Array)||function(){throw TypeError("value must not be null")}(),function(t,i,s){if(!s)return null;const h=function(t){try{return o.getUint32(t,!0)}catch{return o=new DataView(e.buffer),o.getUint32(t,!0)}}(s-4)>>>i,n=new Array(h);for(let e=0;e>>0));return n}(a,0,h.read(t,i,s,n)>>>0))},h);function r(t){if(!t)return null;const i=t+new Uint32Array(e.buffer)[t-4>>>2]>>>1,s=new Uint16Array(e.buffer);let h=t>>>1,n="";for(;i-h>1024;)n+=String.fromCharCode(...s.subarray(h,h+=1024));return n+String.fromCharCode(...s.subarray(h,i))}let o=new DataView(e.buffer);function l(t,i){try{o.setUint8(t,i,!0)}catch{o=new DataView(e.buffer),o.setUint8(t,i,!0)}}function a(t){try{return o.getInt8(t,!0)}catch{return o=new DataView(e.buffer),o.getInt8(t,!0)}}return n}s.d(i,{A:()=>e});class e{static DD=null;static load=async t=>{this.DD=await h(new WebAssembly.Module(t),{env:void 0})};static read=(t,i,s,h)=>{if(!this.DD)throw new Error('bz2 not found!!');return Int8Array.from(this.DD.read(t,i,s,h))}}},123:(t,i,s)=>{let h;async function e(t,i){n(i);try{const i=await window.audioContext.decodeAudioData(Uint8Array.from(t).buffer);let s=window.audioContext.createBufferSource();s.buffer=i,s.connect(h),s.start()}catch(t){console.log(t)}}function n(t){h||(h=window.audioContext.createGain(),h.connect(window.audioContext.destination)),h.gain.value=t/256}function r(t,i,s){window._tinyMidiPlay&&window._tinyMidiPlay(t,i/256,s)}function o(t){window._tinyMidiVolume&&window._tinyMidiVolume(t/256)}function l(t){window._tinyMidiStop&&window._tinyMidiStop(t)}s.d(i,{Af:()=>e,yl:()=>r,pm:()=>n,jo:()=>l,Am:()=>o})},8902:(t,i,s)=>{var h;const e=(h="file:///home/runner/work/Client2/Client2/src/js/vendor/tinymidipcm/tinymidipcm.mjs",function(t){var i,e,n=void 0!==(t=t||{})?t:{};n.ready=new Promise((function(t,s){i=t,e=s})),["_tsf_load_memory","_tsf_set_output","_tsf_channel_set_bank_preset","_tsf_set_max_voices","_tsf_channel_set_presetnumber","_tsf_reset","_tsf_close","_tml_load_memory","_midi_render","_malloc","_realloc","_free","_fflush","onRuntimeInitialized"].forEach((t=>{Object.getOwnPropertyDescriptor(n.ready,t)||Object.defineProperty(n.ready,t,{get:()=>z('You are getting '+t+' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'),set:()=>z('You are setting '+t+' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js')})}));var r=Object.assign({},n),o=[],l='object'==typeof window,a='function'==typeof importScripts,c='object'==typeof process&&'object'==typeof process.versions&&'string'==typeof process.versions.node,f=!l&&!c&&!a;if(n.ENVIRONMENT)throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)');var u,d,w,y='';if(c){if('undefined'==typeof process||!process.release||'node'!==process.release.name)throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');var A,p;y=a?require('path').ND(y)+'/':__dirname+'/';var m=()=>{p||(A=require('fs'),p=require('path'))};u=(t,i)=>(m(),t=p.normalize(t),A.PD(t,i?void 0:'utf8')),w=t=>{var i=u(t,!0);return i.buffer||(i=new Uint8Array(i)),D(i.buffer),i},d=(t,i,s)=>{m(),t=p.normalize(t),A.FD(t,(function(t,h){t?s(t):i(h.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,'/'),o=process.argv.slice(2),process.on('uncaughtException',(function(t){if(!(t instanceof et))throw t})),process.on('unhandledRejection',(function(t){throw t})),n.inspect=function(){return'[Emscripten Module object]'}}else if(f){if('object'==typeof process&&'function'==typeof require||'object'==typeof window||'function'==typeof importScripts)throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');'undefined'!=typeof read&&(u=function(t){return read(t)}),w=function(t){let i;return'function'==typeof readbuffer?new Uint8Array(readbuffer(t)):(i=read(t,'binary'),D('object'==typeof i),i)},d=function(t,i,s){setTimeout((()=>i(w(t))),0)},'undefined'!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),'undefined'!=typeof print&&('undefined'==typeof console&&(console={}),console.log=print,console.warn=console.error='undefined'!=typeof printErr?printErr:print)}else{if(!l&&!a)throw new Error('environment detection error');if(a?y=self.location.href:'undefined'!=typeof document&&document.currentScript&&(y=document.currentScript.src),h&&(y=h),y=0!==y.indexOf('blob:')?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf('/')+1):'','object'!=typeof window&&'function'!=typeof importScripts)throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');u=t=>{var i=new XMLHttpRequest;return i.open('GET',t,!1),i.send(null),i.responseText},a&&(w=t=>{var i=new XMLHttpRequest;return i.open('GET',t,!1),i.responseType='arraybuffer',i.send(null),new Uint8Array(i.response)}),d=(t,i,s)=>{var h=new XMLHttpRequest;h.open('GET',t,!0),h.responseType='arraybuffer',h.onload=()=>{200==h.status||0==h.status&&h.response?i(h.response):s()},h.onerror=s,h.send(null)}}n.print||console.log.bind(console);var I,E,g=n.printErr||console.warn.bind(console);function _(t,i){Object.getOwnPropertyDescriptor(n,t)||Object.defineProperty(n,t,{configurable:!0,get:function(){z('Module.'+t+' has been replaced with plain '+i+' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)')}})}function C(t){return'FS_createPath'===t||'FS_createDataFile'===t||'FS_createPreloadedFile'===t||'FS_unlink'===t||'addRunDependency'===t||'FS_createLazyFile'===t||'FS_createDevice'===t||'removeRunDependency'===t}Object.assign(n,r),r=null,I='fetchSettings',Object.getOwnPropertyDescriptor(n,I)&&z('`Module.'+I+'` was supplied but `'+I+'` not included in INCOMING_MODULE_JS_API'),n.arguments&&(o=n.arguments),_('arguments','arguments_'),n.thisProgram&&n.thisProgram,_('thisProgram','thisProgram'),n.quit&&n.quit,_('quit','quit_'),D(void 0===n.memoryInitializerPrefixURL,'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead'),D(void 0===n.pthreadMainPrefixURL,'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead'),D(void 0===n.cdInitializerPrefixURL,'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead'),D(void 0===n.filePackagePrefixURL,'Module.filePackagePrefixURL option was removed, use Module.locateFile instead'),D(void 0===n.read,'Module.read option was removed (modify read_ in JS)'),D(void 0===n.readAsync,'Module.readAsync option was removed (modify readAsync in JS)'),D(void 0===n.readBinary,'Module.readBinary option was removed (modify readBinary in JS)'),D(void 0===n.setWindowTitle,'Module.setWindowTitle option was removed (modify setWindowTitle in JS)'),D(void 0===n.TOTAL_MEMORY,'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY'),_('read','read_'),_('readAsync','readAsync'),_('readBinary','readBinary'),_('setWindowTitle','setWindowTitle'),D(!f,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),n.wasmBinary&&(E=n.wasmBinary),_('wasmBinary','wasmBinary');var T;n.noExitRuntime;_('noExitRuntime','noExitRuntime'),'object'!=typeof WebAssembly&&z('no native wasm support detected');var O,v,b,L,R,S,M,k,x=!1;function D(t,i){t||z('Assertion failed'+(i?': '+i:''))}function N(t){O=t,n.HEAP8=v=new Int8Array(t),n.HEAP16=L=new Int16Array(t),n.HEAP32=R=new Int32Array(t),n.HEAPU8=b=new Uint8Array(t),n.HEAPU16=new Uint16Array(t),n.HEAPU32=S=new Uint32Array(t),n.HEAPF32=M=new Float32Array(t),n.HEAPF64=k=new Float64Array(t)}'undefined'!=typeof TextDecoder&&new TextDecoder('utf8');var P=5242880;n.TOTAL_STACK&&D(P===n.TOTAL_STACK,'the stack size can no longer be determined at runtime');var F=n.INITIAL_MEMORY||16777216;function U(){if(!x){var t=ft(),i=S[t>>2],s=S[t+4>>2];34821223==i&&2310721022==s||z('Stack overflow! Stack cookie has been overwritten at 0x'+t.toString(16)+', expected hex dwords 0x89BACDFE and 0x2135467, but received 0x'+s.toString(16)+' 0x'+i.toString(16)),1668509029!==S[0]&&z('Runtime error: The application has corrupted its heap memory area (address zero)!')}}_('INITIAL_MEMORY','INITIAL_MEMORY'),D(F>=P,'INITIAL_MEMORY should be larger than TOTAL_STACK, was '+F+'! (TOTAL_STACK='+P+')'),D('undefined'!=typeof Int32Array&&'undefined'!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,'JS engine does not provide full typed array support'),D(!n.wasmMemory,'Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally'),D(16777216==F,'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically'),function(){var t=new Int16Array(1),i=new Int8Array(t.buffer);if(t[0]=25459,115!==i[0]||99!==i[1])throw'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)'}();var B=[],G=[],H=[],W=!1;D(Math.imul,'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'),D(Math.fround,'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'),D(Math.clz32,'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill'),D(Math.trunc,'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');var Y=0,V=null,K=null,X={};function z(t){n.onAbort&&n.onAbort(t),g(t='Aborted('+t+')'),x=!0;var i=new WebAssembly.RuntimeError(t);throw e(i),i}var j={error:function(){z('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM')},init:function(){j.error()},UD:function(){j.error()},BD:function(){j.error()},GD:function(){j.error()},open:function(){j.error()},HD:function(){j.error()},WD:function(){j.error()},YD:function(){j.error()},VD:function(){j.error()},KD:function(){j.error()}};n.FS_createDataFile=j.UD,n.FS_createPreloadedFile=j.BD;var Z,q,$,J,Q='data:application/octet-stream;base64,';function tt(t){return t.startsWith(Q)}function it(t){return t.startsWith('file://')}function st(t,i){return function(){var s=t,h=i;return i||(h=n.asm),D(W,'native function `'+s+'` called before runtime initialization'),h[t]||D(h[t],'exported native function `'+s+'` not found'),h[t].apply(null,arguments)}}function ht(t){try{if(t==Z&&E)return new Uint8Array(E);if(w)return w(t);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}function et(t){this.name='ExitStatus',this.message='Program terminated with exit('+t+')',this.status=t}function nt(t){for(;t.length>0;)t.shift()(n)}function rt(t){rt.XD||(rt.XD={}),rt.XD[t]||(rt.XD[t]=1,c&&(t='warning: '+t),g(t))}function ot(t){try{return T.grow(t-O.byteLength+65535>>>16),N(T.buffer),1}catch(i){g('emscripten_realloc_buffer: Attempted to grow heap from '+O.byteLength+' bytes to '+t+' bytes, but got error: '+i)}}n.locateFile?tt(Z='tinymidipcm.wasm')||(q=Z,Z=n.locateFile?n.locateFile(q,y):y+q):Z=new URL(s(8227),s.b).toString();var lt,at={"emscripten_memcpy_big":function(t,i,s){b.copyWithin(t,i,i+s)},"emscripten_resize_heap":function(t){var i=b.length;D((t>>>=0)>i);var s,h,e=2147483648;if(t>e)return g('Cannot enlarge memory, asked to go up to '+t+' bytes, but the limit is '+e+' bytes!'),!1;for(var n=1;n<=4;n*=2){var r=i*(1+.2/n);r=Math.min(r,t+100663296);var o=Math.min(e,(s=Math.max(t,r))+((h=65536)-s%h)%h);if(ot(o))return!0}return g('Failed to grow the heap from '+i+' bytes to '+o+' bytes, not enough memory!'),!1}},ct=(function(){var t,i={'env':at,'wasi_snapshot_preview1':at};function s(t,i){var s,h=t.exports;n.asm=h,D(T=n.asm.memory,"memory not found in wasm exports"),N(T.buffer),D(n.asm.__indirect_function_table,"table not found in wasm exports"),s=n.asm.__wasm_call_ctors,G.unshift(s),function(t){if(Y--,n.monitorRunDependencies&&n.monitorRunDependencies(Y),t?(D(X[t]),delete X[t]):g('warning: run dependency removed without ID'),0==Y&&(null!==V&&(clearInterval(V),V=null),K)){var i=K;K=null,i()}}('wasm-instantiate')}t='wasm-instantiate',Y++,n.monitorRunDependencies&&n.monitorRunDependencies(Y),t?(D(!X[t]),X[t]=1,null===V&&'undefined'!=typeof setInterval&&(V=setInterval((function(){if(x)return clearInterval(V),void(V=null);var t=!1;for(var i in X)t||(t=!0,g('still waiting on run dependencies:')),g('dependency: '+i);t&&g('(end of list)')}),1e4))):g('warning: run dependency added without ID');var h=n;function r(t){D(n===h,'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?'),h=null,s(t.instance)}function o(t){return function(){if(!E&&(l||a)){if('function'==typeof fetch&&!it(Z))return fetch(Z,{credentials:'same-origin'}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+Z+"'";return t.arrayBuffer()})).catch((function(){return ht(Z)}));if(d)return new Promise((function(t,i){d(Z,(function(i){t(new Uint8Array(i))}),i)}))}return Promise.resolve().then((function(){return ht(Z)}))}().then((function(t){return WebAssembly.instantiate(t,i)})).then((function(t){return t})).then(t,(function(t){g('failed to asynchronously prepare wasm: '+t),it(Z)&&g('warning: Loading from a file URI ('+Z+') is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing'),z(t)}))}if(n.instantiateWasm)try{return n.instantiateWasm(i,s)}catch(t){g('Module.instantiateWasm callback failed with error: '+t),e(t)}(E||'function'!=typeof WebAssembly.instantiateStreaming||tt(Z)||it(Z)||c||'function'!=typeof fetch?o(r):fetch(Z,{credentials:'same-origin'}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(r,(function(t){return g('wasm streaming compile failed: '+t),g('falling back to ArrayBuffer instantiation'),o(r)}))}))).catch(e)}(),n.___wasm_call_ctors=st("__wasm_call_ctors"),n._malloc=st("malloc"),n._free=st("free"),n._tsf_load_memory=st("tsf_load_memory"),n._tsf_close=st("tsf_close"),n._tsf_reset=st("tsf_reset"),n._tsf_set_output=st("tsf_set_output"),n._tsf_set_max_voices=st("tsf_set_max_voices"),n._realloc=st("realloc"),n._tsf_channel_set_presetnumber=st("tsf_channel_set_presetnumber"),n._tsf_channel_set_bank_preset=st("tsf_channel_set_bank_preset"),n._tml_load_memory=st("tml_load_memory"),n._midi_render=st("midi_render"),n.___errno_location=st("__errno_location"),n._fflush=st("fflush"),n._emscripten_stack_init=function(){return(ct=n._emscripten_stack_init=n.asm.emscripten_stack_init).apply(null,arguments)}),ft=(n._emscripten_stack_get_free=function(){return(n._emscripten_stack_get_free=n.asm.emscripten_stack_get_free).apply(null,arguments)},n._emscripten_stack_get_base=function(){return(n._emscripten_stack_get_base=n.asm.emscripten_stack_get_base).apply(null,arguments)},n._emscripten_stack_get_end=function(){return(ft=n._emscripten_stack_get_end=n.asm.emscripten_stack_get_end).apply(null,arguments)});function ut(){var t;ct(),D(!(3&(t=ft()))),S[t>>2]=34821223,S[t+4>>2]=2310721022,S[0]=1668509029}function dt(t){function s(){lt||(lt=!0,n.calledRun=!0,x||(D(!W),W=!0,U(),nt(G),i(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),D(!n._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(U(),n.postRun)for('function'==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),H.unshift(t);var t;nt(H)}()))}t=t||o,Y>0||(ut(),function(){if(n.preRun)for('function'==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)t=n.preRun.shift(),B.unshift(t);var t;nt(B)}(),Y>0||(n.setStatus?(n.setStatus('Running...'),setTimeout((function(){setTimeout((function(){n.setStatus('')}),1),s()}),1)):s(),U()))}if(n.stackSave=st("stackSave"),n.stackRestore=st("stackRestore"),n.stackAlloc=st("stackAlloc"),n.setValue=function(t,i,s="i8"){switch(s.endsWith('*')&&(s='*'),s){case'i1':case'i8':v[0|t]=i;break;case'i16':L[t>>1]=i;break;case'i32':R[t>>2]=i;break;case'i64':J=[i>>>0,($=i,+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],R[t>>2]=J[0],R[t+4>>2]=J[1];break;case'float':M[t>>2]=i;break;case'double':k[t>>3]=i;break;case'*':S[t>>2]=i;break;default:z('invalid type for setValue: '+s)}},n.getValue=function(t,i="i8"){switch(i.endsWith('*')&&(i='*'),i){case'i1':case'i8':return v[0|t];case'i16':return L[t>>1];case'i32':case'i64':return R[t>>2];case'float':return M[t>>2];case'double':return k[t>>3];case'*':return S[t>>2];default:z('invalid type for getValue: '+i)}return null},['run','UTF8ArrayToString','UTF8ToString','stringToUTF8Array','stringToUTF8','lengthBytesUTF8','addOnPreRun','addOnInit','addOnPreMain','addOnExit','addOnPostRun','addRunDependency','removeRunDependency','FS_createFolder','FS_createPath','FS_createDataFile','FS_createPreloadedFile','FS_createLazyFile','FS_createLink','FS_createDevice','FS_unlink','getLEB','getFunctionTables','alignFunctionTables','registerFunctions','prettyPrint','getCompilerSetting','print','printErr','callMain','abort','keepRuntimeAlive','wasmMemory','stackAlloc','stackSave','stackRestore','getTempRet0','setTempRet0','writeStackCookie','checkStackCookie','ptrToString','zeroMemory','stringToNewUTF8','exitJS','getHeapMax','emscripten_realloc_buffer','ENV','ERRNO_CODES','ERRNO_MESSAGES','setErrNo','inetPton4','inetNtop4','inetPton6','inetNtop6','readSockaddr','writeSockaddr','DNS','getHostByName','Protocols','Sockets','getRandomDevice','warnOnce','traverseStack','UNWIND_CACHE','convertPCtoSourceLocation','readAsmConstArgsArray','readAsmConstArgs','mainThreadEM_ASM','jstoi_q','jstoi_s','getExecutableName','listenOnce','autoResumeAudioContext','dynCallLegacy','getDynCaller','dynCall','handleException','runtimeKeepalivePush','runtimeKeepalivePop','callUserCallback','maybeExit','safeSetTimeout','asmjsMangle','asyncLoad','alignMemory','mmapAlloc','writeI53ToI64','writeI53ToI64Clamped','writeI53ToI64Signaling','writeI53ToU64Clamped','writeI53ToU64Signaling','readI53FromI64','readI53FromU64','convertI32PairToI53','convertI32PairToI53Checked','convertU32PairToI53','getCFunc','ccall','cwrap','uleb128Encode','sigToWasmTypes','generateFuncType','convertJsFunctionToWasm','freeTableIndexes','functionsInTableMap','getEmptyTableSlot','updateTableMap','addFunction','removeFunction','reallyNegative','unSign','strLen','reSign','formatString','PATH','PATH_FS','intArrayFromString','intArrayToString','AsciiToString','stringToAscii','UTF16Decoder','UTF16ToString','stringToUTF16','lengthBytesUTF16','UTF32ToString','stringToUTF32','lengthBytesUTF32','allocateUTF8','allocateUTF8OnStack','writeStringToMemory','writeArrayToMemory','writeAsciiToMemory','SYSCALLS','getSocketFromFD','getSocketAddress','JSEvents','registerKeyEventCallback','specialHTMLTargets','maybeCStringToJsString','findEventTarget','findCanvasEventTarget','getBoundingClientRect','fillMouseEventData','registerMouseEventCallback','registerWheelEventCallback','registerUiEventCallback','registerFocusEventCallback','fillDeviceOrientationEventData','registerDeviceOrientationEventCallback','fillDeviceMotionEventData','registerDeviceMotionEventCallback','screenOrientation','fillOrientationChangeEventData','registerOrientationChangeEventCallback','fillFullscreenChangeEventData','registerFullscreenChangeEventCallback','JSEvents_requestFullscreen','JSEvents_resizeCanvasForFullscreen','registerRestoreOldStyle','hideEverythingExceptGivenElement','restoreHiddenElements','setLetterbox','currentFullscreenStrategy','restoreOldWindowedStyle','softFullscreenResizeWebGLRenderTarget','doRequestFullscreen','fillPointerlockChangeEventData','registerPointerlockChangeEventCallback','registerPointerlockErrorEventCallback','requestPointerLock','fillVisibilityChangeEventData','registerVisibilityChangeEventCallback','registerTouchEventCallback','fillGamepadEventData','registerGamepadEventCallback','registerBeforeUnloadEventCallback','fillBatteryEventData','battery','registerBatteryEventCallback','setCanvasElementSize','getCanvasElementSize','demangle','demangleAll','jsStackTrace','stackTrace','ExitStatus','getEnvStrings','checkWasiClock','flush_NO_FILESYSTEM','dlopenMissingError','createDyncallWrapper','setImmediateWrapped','clearImmediateWrapped','polyfillSetImmediate','uncaughtExceptionCount','exceptionLast','exceptionCaught','ExceptionInfo','exception_addRef','exception_decRef','Browser','setMainLoop','wget','FS','MEMFS','TTY','PIPEFS','SOCKFS','_setNetworkCallback','tempFixedLengthArray','miniTempWebGLFloatBuffers','heapObjectForWebGLType','heapAccessShiftForWebGLHeap','GL','emscriptenWebGLGet','computeUnpackAlignedImageSize','emscriptenWebGLGetTexPixelData','emscriptenWebGLGetUniform','webglGetUniformLocation','webglPrepareUniformLocationsBeforeFirstUse','webglGetLeftBracePos','emscriptenWebGLGetVertexAttrib','writeGLArray','AL','SDL_unicode','SDL_ttfContext','SDL_audio','SDL','SDL_gfx','GLUT','EGL','GLFW_Window','GLFW','GLEW','IDBStore','runAndAbortIfError','ALLOC_NORMAL','ALLOC_STACK','allocate'].forEach((function(t){Object.getOwnPropertyDescriptor(n,t)||Object.defineProperty(n,t,{configurable:!0,get:function(){var i="'"+t+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";C(t)&&(i+='. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'),z(i)}})})),['ptrToString','zeroMemory','stringToNewUTF8','exitJS','setErrNo','inetPton4','inetNtop4','inetPton6','inetNtop6','readSockaddr','writeSockaddr','getHostByName','getRandomDevice','traverseStack','convertPCtoSourceLocation','readAsmConstArgs','mainThreadEM_ASM','jstoi_q','jstoi_s','getExecutableName','listenOnce','autoResumeAudioContext','dynCallLegacy','getDynCaller','dynCall','runtimeKeepalivePush','runtimeKeepalivePop','callUserCallback','maybeExit','safeSetTimeout','asmjsMangle','asyncLoad','alignMemory','mmapAlloc','writeI53ToI64','writeI53ToI64Clamped','writeI53ToI64Signaling','writeI53ToU64Clamped','writeI53ToU64Signaling','readI53FromI64','readI53FromU64','convertI32PairToI53','convertI32PairToI53Checked','convertU32PairToI53','getCFunc','ccall','cwrap','uleb128Encode','sigToWasmTypes','generateFuncType','convertJsFunctionToWasm','getEmptyTableSlot','updateTableMap','addFunction','removeFunction','reallyNegative','unSign','strLen','reSign','formatString','intArrayFromString','intArrayToString','AsciiToString','stringToAscii','UTF16ToString','stringToUTF16','lengthBytesUTF16','UTF32ToString','stringToUTF32','lengthBytesUTF32','allocateUTF8','allocateUTF8OnStack','writeStringToMemory','writeAsciiToMemory','getSocketFromFD','getSocketAddress','registerKeyEventCallback','maybeCStringToJsString','findEventTarget','findCanvasEventTarget','getBoundingClientRect','fillMouseEventData','registerMouseEventCallback','registerWheelEventCallback','registerUiEventCallback','registerFocusEventCallback','fillDeviceOrientationEventData','registerDeviceOrientationEventCallback','fillDeviceMotionEventData','registerDeviceMotionEventCallback','screenOrientation','fillOrientationChangeEventData','registerOrientationChangeEventCallback','fillFullscreenChangeEventData','registerFullscreenChangeEventCallback','JSEvents_requestFullscreen','JSEvents_resizeCanvasForFullscreen','registerRestoreOldStyle','hideEverythingExceptGivenElement','restoreHiddenElements','setLetterbox','softFullscreenResizeWebGLRenderTarget','doRequestFullscreen','fillPointerlockChangeEventData','registerPointerlockChangeEventCallback','registerPointerlockErrorEventCallback','requestPointerLock','fillVisibilityChangeEventData','registerVisibilityChangeEventCallback','registerTouchEventCallback','fillGamepadEventData','registerGamepadEventCallback','registerBeforeUnloadEventCallback','fillBatteryEventData','battery','registerBatteryEventCallback','setCanvasElementSize','getCanvasElementSize','getEnvStrings','checkWasiClock','flush_NO_FILESYSTEM','createDyncallWrapper','setImmediateWrapped','clearImmediateWrapped','polyfillSetImmediate','ExceptionInfo','exception_addRef','exception_decRef','setMainLoop','_setNetworkCallback','heapObjectForWebGLType','heapAccessShiftForWebGLHeap','emscriptenWebGLGet','computeUnpackAlignedImageSize','emscriptenWebGLGetTexPixelData','emscriptenWebGLGetUniform','webglGetUniformLocation','webglPrepareUniformLocationsBeforeFirstUse','webglGetLeftBracePos','emscriptenWebGLGetVertexAttrib','writeGLArray','SDL_unicode','SDL_ttfContext','SDL_audio','GLFW_Window','runAndAbortIfError','ALLOC_NORMAL','ALLOC_STACK','allocate'].forEach((function(t){'undefined'==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,t)||Object.defineProperty(globalThis,t,{configurable:!0,get:function(){var i='`'+t+'` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line';C(t)&&(i+='. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you'),rt(i)}})})),K=function t(){lt||dt(),lt||(K=t)},n.preInit)for('function'==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return dt(),t.ready});const n=class{constructor(t={}){this.zD=void 0,this.jD=0,this.ZD=0,this.qD=0,this.$D=t.$D||100,this.sampleRate=t.sampleRate||44100,this.JD=t.JD||2,this.gain=t.gain||0,t.bufferSize?this.bufferSize=t.bufferSize:this.QD(1),this.tN=t.tN||(()=>{}),this.iN=t.iN||(()=>{}),this.sN=void 0,this.test=0}async init(){if(!this.zD){if('undefined'!=typeof process){const{ND:t}=await import('path'),{hN:i}=await import('module');globalThis.__dirname=t("file:///home/runner/work/Client2/Client2/src/js/vendor/tinymidipcm/index.js"),globalThis.require=i("file:///home/runner/work/Client2/Client2/src/js/vendor/tinymidipcm/index.js")}this.zD=await e(),this.eN=this.zD._malloc(this.bufferSize),this.nN=this.zD._malloc(8)}}QD(t){this.bufferSize=4*this.sampleRate*this.JD*t}rN(){if(!this.zD)throw new Error(`${this.constructor.name} not initalized. call .init()`)}oN(t){this.rN();const{_malloc:i,_free:s,_tsf_load_memory:h,_tsf_set_output:e,_tsf_channel_set_bank_preset:n,_tsf_set_max_voices:r,_tsf_channel_set_presetnumber:o}=this.zD;s(this.jD),this.jD=i(t.length),this.zD.HEAPU8.set(t,this.jD),this.ZD=h(this.jD,t.length),e(this.ZD,2===this.JD?0:2,this.sampleRate,this.gain)}lN(){this.rN();const t=new Uint8Array(this.bufferSize);return t.set(this.zD.HEAPU8.subarray(this.eN,this.eN+this.bufferSize)),t}aN(t){const{_malloc:i,_free:s,_tml_load_memory:h}=this.zD;return s(this.qD),this.qD=i(t.length),this.zD.HEAPU8.set(t,this.qD),h(this.qD,t.length)}cN(t){const{_midi_render:i}=this.zD;return i(this.ZD,t,this.JD,this.sampleRate,this.eN,this.bufferSize,this.nN)}fN(t){if(this.rN(),!this.ZD)throw new Error('no soundfont buffer set. call .setSoundfont');window.clearTimeout(this.sN);const{setValue:i,getValue:s}=this.zD;i(this.nN,0,'double'),this.zD._tsf_reset(this.ZD),this.zD._tsf_channel_set_bank_preset(this.ZD,9,128,0),t[0]==='R'.charCodeAt(0)&&(t=t.slice(20));let h=this.aN(t);const e=()=>{h=this.cN(h);const t=this.lN();this.tN(t),h?this.sN=setTimeout(e,this.$D):this.iN(s(this.nN,'double'))};this.sN=setTimeout(e,16)}};!function(){window.AudioContext=window.AudioContext||window.webkitAudioContext,window.AudioContext&&(window.audioContext=new window.AudioContext);var t=function(i){if(window.audioContext){var s=window.audioContext.createBuffer(1,1,22050),h=window.audioContext.createBufferSource();h.buffer=s,h.connect(window.audioContext.destination),h.start?h.start(0):h.play?h.play(0):h.noteOn&&h.noteOn(0)}document.removeEventListener('touchstart',t),document.removeEventListener('touchend',t),document.removeEventListener('click',t)};document.addEventListener('touchstart',t),document.addEventListener('touchend',t),document.addEventListener('click',t)}(),(async()=>{const t=2,i=44100;let s=new Float32Array,h=window.audioContext.createGain();h.gain.value=.1,h.connect(window.audioContext.destination);let e=window.audioContext.currentTime,r=[];const o=new n({$D:30,tN:t=>{let i=new Float32Array(t.buffer),h=new Float32Array(s.length+i.length);h.set(s,0),h.set(i,s.length),s=h},iN:t=>{},bufferSize:102400});await o.init();const l=await fetch('./SCC1_Florestan.sf2'),a=new Uint8Array(await l.arrayBuffer());function c(){if(!window.audioContext||!s.length)return;let n=window.audioContext.createBufferSource();const o=s.length/t,l=window.audioContext.createBuffer(t,o,i);for(let i=0;i{t.stop(window.audioContext.currentTime)})),r=[],h.gain.value=t}}function d(t,i){-1!==t&&window._tinyMidiVolume(t),e=window.audioContext.currentTime,f=setInterval(c,250),o.fN(i)}o.oN(a),window._tinyMidiStop=async t=>{t?function(t,i){const s=window.audioContext.currentTime;h.gain.cancelScheduledValues(s),h.gain.setValueAtTime(h.gain.value,s),h.gain.linearRampToValueAtTime(t,s+2),setTimeout(i,2e3)}(0,(()=>{u()})):u()},window._tinyMidiVolume=(t=1)=>{h.gain.value=t},window._tinyMidiPlay=async(t,i,s)=>{t&&(await window._tinyMidiStop(s),s?setTimeout((()=>{d(i,t)}),2e3):d(i,t))}})()},8227:(t,i,s)=>{t.exports=s.p+"9f86b5397894e28b5ae2.wasm"}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var s=n[t]={exports:{}};return e[t](s,s.exports,r),s.exports}r.m=e,t="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",i="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",s="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",h=t=>{t&&t.d<1&&(t.d=1,t.forEach((t=>t.r--)),t.forEach((t=>t.r--?t.r++:t())))},r.a=(e,n,r)=>{var o;r&&((o=[]).d=-1);var l,a,c,f=new Set,u=e.exports,d=new Promise(((t,i)=>{c=i,a=t}));d[i]=u,d[t]=t=>(o&&t(o),f.forEach(t),d.catch((t=>{}))),e.exports=d,n((e=>{var n;l=(e=>e.map((e=>{if(null!==e&&"object"==typeof e){if(e[t])return e;if(e.then){var n=[];n.d=0,e.then((t=>{r[i]=t,h(n)}),(t=>{r[s]=t,h(n)}));var r={};return r[t]=t=>t(n),r}}var o={};return o[t]=t=>{},o[i]=e,o})))(e);var r=()=>l.map((t=>{if(t[s])throw t[s];return t[i]})),a=new Promise((i=>{(n=()=>i(r)).r=0;var s=t=>t!==o&&!f.has(t)&&(f.add(t),t&&!t.d&&(n.r++,t.push(n)));l.map((i=>i[t](s)))}));return n.r?a:r()}),(t=>(t?c(d[s]=t):a(u),h(o)))),o&&o.d<0&&(o.d=0)},r.d=(t,i)=>{for(var s in i)r.o(i,s)&&!r.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},r.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r.p="/Client2/",r.b=document.baseURI||self.location.href;r(7906)})(); \ No newline at end of file