minecraft-renderer 0.1.39 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var bs=Object.create;var He=Object.defineProperty;var ys=Object.getOwnPropertyDescriptor;var ws=Object.getOwnPropertyNames;var _s=Object.getPrototypeOf,As=Object.prototype.hasOwnProperty;var Es=(r,t,e)=>t in r?He(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var xs=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var ut=(r,t)=>()=>(r&&(t=r(r=0)),t);var Z0=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),w5=(r,t)=>{for(var e in t)He(r,e,{get:t[e],enumerable:!0})},f2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ws(t))!As.call(r,n)&&n!==e&&He(r,n,{get:()=>t[n],enumerable:!(i=ys(t,n))||i.enumerable});return r};var ze=(r,t,e)=>(e=r!=null?bs(_s(r)):{},f2(t||!r||!r.__esModule?He(e,"default",{value:r,enumerable:!0}):e,r)),Rs=r=>f2(He({},"__esModule",{value:!0}),r);var u=(r,t,e)=>(Es(r,typeof t!="symbol"?t+"":t,e),e);var x=ut(()=>{});var R=ut(()=>{});var D={};w5(D,{_debugEnd:()=>nn,_debugProcess:()=>en,_events:()=>yn,_eventsCount:()=>wn,_exiting:()=>O2,_fatalExceptions:()=>Z2,_getActiveHandles:()=>U2,_getActiveRequests:()=>F2,_kill:()=>W2,_linkedBinding:()=>H2,_maxListeners:()=>bn,_preload_modules:()=>mn,_rawDebug:()=>B2,_startProfilerIdleNotifier:()=>rn,_stopProfilerIdleNotifier:()=>sn,_tickCallback:()=>tn,abort:()=>ln,addListener:()=>_n,allowedNodeEnvironmentFlags:()=>K2,arch:()=>b2,argv:()=>_2,argv0:()=>hn,assert:()=>J2,binding:()=>k2,browser:()=>P2,chdir:()=>S2,config:()=>D2,cpuUsage:()=>E5,cwd:()=>M2,debugPort:()=>fn,default:()=>Cn,dlopen:()=>L2,domain:()=>z2,emit:()=>kn,emitWarning:()=>R2,env:()=>w2,execArgv:()=>A2,execPath:()=>un,exit:()=>Y2,features:()=>q2,hasUncaughtExceptionCaptureCallback:()=>$2,hrtime:()=>A5,kill:()=>j2,listeners:()=>Sn,memoryUsage:()=>V2,moduleLoadList:()=>I2,nextTick:()=>m2,off:()=>En,on:()=>ht,once:()=>An,openStdin:()=>Q2,pid:()=>cn,platform:()=>y2,ppid:()=>dn,prependListener:()=>Tn,prependOnceListener:()=>Mn,reallyExit:()=>G2,release:()=>C2,removeAllListeners:()=>Rn,removeListener:()=>xn,resourceUsage:()=>N2,setSourceMapsEnabled:()=>pn,setUncaughtExceptionCaptureCallback:()=>X2,stderr:()=>an,stdin:()=>vn,stdout:()=>on,title:()=>g2,umask:()=>T2,uptime:()=>gn,version:()=>E2,versions:()=>x2});function I1(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}function ks(){!oe||!Ft||(oe=!1,Ft.length?ft=Ft.concat(ft):_5=-1,ft.length&&h2())}function h2(){if(!oe){var r=setTimeout(ks,0);oe=!0;for(var t=ft.length;t;){for(Ft=ft,ft=[];++_5<t;)Ft&&Ft[_5].run();_5=-1,t=ft.length}Ft=null,oe=!1,clearTimeout(r)}}function m2(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];ft.push(new p2(r,t)),ft.length===1&&!oe&&setTimeout(h2,0)}function p2(r,t){this.fun=r,this.array=t}function D0(){}function H2(r){I1("_linkedBinding")}function L2(r){I1("dlopen")}function F2(){return[]}function U2(){return[]}function J2(r,t){if(!r)throw new Error(t||"assertion error")}function $2(){return!1}function gn(){return Et.now()/1e3}function A5(r){var t=Math.floor((Date.now()-Et.now())*.001),e=Et.now()*.001,i=Math.floor(e)+t,n=Math.floor(e%1*1e9);return r&&(i=i-r[0],n=n-r[1],n<0&&(i--,n+=B1)),[i,n]}function ht(){return Cn}function Sn(r){return[]}var ft,oe,Ft,_5,g2,b2,y2,w2,_2,A2,E2,x2,R2,k2,T2,M2,S2,C2,P2,B2,I2,z2,O2,D2,G2,W2,E5,N2,V2,j2,Y2,Q2,K2,q2,Z2,X2,tn,en,nn,rn,sn,on,an,vn,ln,cn,dn,un,fn,hn,mn,pn,Et,P1,B1,bn,yn,wn,_n,An,En,xn,Rn,kn,Tn,Mn,Cn,Pn=ut(()=>{x();R();T();k();ft=[],oe=!1,_5=-1;p2.prototype.run=function(){this.fun.apply(null,this.array)};g2="browser",b2="x64",y2="browser",w2={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},_2=["/usr/bin/node"],A2=[],E2="v16.8.0",x2={},R2=function(r,t){},k2=function(r){I1("binding")},T2=function(r){return 0},M2=function(){return"/"},S2=function(r){},C2={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};P2=!0,B2=D0,I2=[];z2={},O2=!1,D2={};G2=D0,W2=D0,E5=function(){return{}},N2=E5,V2=E5,j2=D0,Y2=D0,Q2=D0,K2={};q2={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Z2=D0,X2=D0;tn=D0,en=D0,nn=D0,rn=D0,sn=D0,on=void 0,an=void 0,vn=void 0,ln=D0,cn=2,dn=1,un="/bin/usr/node",fn=9229,hn="node",mn=[],pn=D0,Et={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Et.now===void 0&&(P1=Date.now(),Et.timing&&Et.timing.navigationStart&&(P1=Et.timing.navigationStart),Et.now=()=>Date.now()-P1);B1=1e9;A5.bigint=function(r){var t=A5(r);return typeof BigInt>"u"?t[0]*B1+t[1]:BigInt(t[0]*B1)+BigInt(t[1])};bn=10,yn={},wn=0;_n=ht,An=ht,En=ht,xn=ht,Rn=ht,kn=D0,Tn=ht,Mn=ht;Cn={version:E2,versions:x2,arch:b2,platform:y2,browser:P2,release:C2,_rawDebug:B2,moduleLoadList:I2,binding:k2,_linkedBinding:H2,_events:yn,_eventsCount:wn,_maxListeners:bn,on:ht,addListener:_n,once:An,off:En,removeListener:xn,removeAllListeners:Rn,emit:kn,prependListener:Tn,prependOnceListener:Mn,listeners:Sn,domain:z2,_exiting:O2,config:D2,dlopen:L2,uptime:gn,_getActiveRequests:F2,_getActiveHandles:U2,reallyExit:G2,_kill:W2,cpuUsage:E5,resourceUsage:N2,memoryUsage:V2,kill:j2,exit:Y2,openStdin:Q2,allowedNodeEnvironmentFlags:K2,assert:J2,features:q2,_fatalExceptions:Z2,setUncaughtExceptionCaptureCallback:X2,hasUncaughtExceptionCaptureCallback:$2,emitWarning:R2,nextTick:m2,_tickCallback:tn,_debugProcess:en,_debugEnd:nn,_startProfilerIdleNotifier:rn,_stopProfilerIdleNotifier:sn,stdout:on,stdin:vn,stderr:an,abort:ln,umask:T2,chdir:S2,cwd:M2,env:w2,title:g2,argv:_2,execArgv:A2,pid:cn,ppid:dn,execPath:un,debugPort:fn,hrtime:A5,argv0:hn,_preload_modules:mn,setSourceMapsEnabled:pn}});var k=ut(()=>{Pn()});function Ts(){if(Bn)return Oe;Bn=!0,Oe.byteLength=a,Oe.toByteArray=l,Oe.fromByteArray=h;for(var r=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,s=i.length;n<s;++n)r[n]=i[n],t[i.charCodeAt(n)]=n;t[45]=62,t[95]=63;function o(p){var g=p.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=p.indexOf("=");b===-1&&(b=g);var A=b===g?0:4-b%4;return[b,A]}function a(p){var g=o(p),b=g[0],A=g[1];return(b+A)*3/4-A}function v(p,g,b){return(g+b)*3/4-b}function l(p){var g,b=o(p),A=b[0],w=b[1],_=new e(v(p,A,w)),S=0,M=w>0?A-4:A,C;for(C=0;C<M;C+=4)g=t[p.charCodeAt(C)]<<18|t[p.charCodeAt(C+1)]<<12|t[p.charCodeAt(C+2)]<<6|t[p.charCodeAt(C+3)],_[S++]=g>>16&255,_[S++]=g>>8&255,_[S++]=g&255;return w===2&&(g=t[p.charCodeAt(C)]<<2|t[p.charCodeAt(C+1)]>>4,_[S++]=g&255),w===1&&(g=t[p.charCodeAt(C)]<<10|t[p.charCodeAt(C+1)]<<4|t[p.charCodeAt(C+2)]>>2,_[S++]=g>>8&255,_[S++]=g&255),_}function c(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[p&63]}function d(p,g,b){for(var A,w=[],_=g;_<b;_+=3)A=(p[_]<<16&16711680)+(p[_+1]<<8&65280)+(p[_+2]&255),w.push(c(A));return w.join("")}function h(p){for(var g,b=p.length,A=b%3,w=[],_=16383,S=0,M=b-A;S<M;S+=_)w.push(d(p,S,S+_>M?M:S+_));return A===1?(g=p[b-1],w.push(r[g>>2]+r[g<<4&63]+"==")):A===2&&(g=(p[b-2]<<8)+p[b-1],w.push(r[g>>10]+r[g>>4&63]+r[g<<2&63]+"=")),w.join("")}return Oe}function Ms(){if(In)return x5;In=!0;return x5.read=function(r,t,e,i,n){var s,o,a=n*8-i-1,v=(1<<a)-1,l=v>>1,c=-7,d=e?n-1:0,h=e?-1:1,p=r[t+d];for(d+=h,s=p&(1<<-c)-1,p>>=-c,c+=a;c>0;s=s*256+r[t+d],d+=h,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=i;c>0;o=o*256+r[t+d],d+=h,c-=8);if(s===0)s=1-l;else{if(s===v)return o?NaN:(p?-1:1)*(1/0);o=o+Math.pow(2,i),s=s-l}return(p?-1:1)*o*Math.pow(2,s-i)},x5.write=function(r,t,e,i,n,s){var o,a,v,l=s*8-n-1,c=(1<<l)-1,d=c>>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,g=i?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(v=Math.pow(2,-o))<1&&(o--,v*=2),o+d>=1?t+=h/v:t+=h*Math.pow(2,1-d),t*v>=2&&(o++,v/=2),o+d>=c?(a=0,o=c):o+d>=1?(a=(t*v-1)*Math.pow(2,n),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;r[e+p]=a&255,p+=g,a/=256,n-=8);for(o=o<<n|a,l+=n;l>0;r[e+p]=o&255,p+=g,o/=256,l-=8);r[e+p-g]|=b*128},x5}function zn(){if(Hn)return Ut;Hn=!0;let r=Ts(),t=Ms(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ut.Buffer=o,Ut.SlowBuffer=w,Ut.INSPECT_MAX_BYTES=50;let i=2147483647;Ut.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=n(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u";function n(){try{let y=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(y,f),y.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(y){if(y>i)throw new RangeError('The value "'+y+'" is invalid for option "size"');let f=new Uint8Array(y);return Object.setPrototypeOf(f,o.prototype),f}function o(y,f,m){if(typeof y=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(y)}return a(y,f,m)}o.poolSize=8192;function a(y,f,m){if(typeof y=="string")return d(y,f);if(ArrayBuffer.isView(y))return p(y);if(y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y);if(et(y,ArrayBuffer)||y&&et(y.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(et(y,SharedArrayBuffer)||y&&et(y.buffer,SharedArrayBuffer)))return g(y,f,m);if(typeof y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let E=y.valueOf&&y.valueOf();if(E!=null&&E!==y)return o.from(E,f,m);let P=b(y);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof y[Symbol.toPrimitive]=="function")return o.from(y[Symbol.toPrimitive]("string"),f,m);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y)}o.from=function(y,f,m){return a(y,f,m)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function v(y){if(typeof y!="number")throw new TypeError('"size" argument must be of type number');if(y<0)throw new RangeError('The value "'+y+'" is invalid for option "size"')}function l(y,f,m){return v(y),y<=0?s(y):f!==void 0?typeof m=="string"?s(y).fill(f,m):s(y).fill(f):s(y)}o.alloc=function(y,f,m){return l(y,f,m)};function c(y){return v(y),s(y<0?0:A(y)|0)}o.allocUnsafe=function(y){return c(y)},o.allocUnsafeSlow=function(y){return c(y)};function d(y,f){if((typeof f!="string"||f==="")&&(f="utf8"),!o.isEncoding(f))throw new TypeError("Unknown encoding: "+f);let m=_(y,f)|0,E=s(m),P=E.write(y,f);return P!==m&&(E=E.slice(0,P)),E}function h(y){let f=y.length<0?0:A(y.length)|0,m=s(f);for(let E=0;E<f;E+=1)m[E]=y[E]&255;return m}function p(y){if(et(y,Uint8Array)){let f=new Uint8Array(y);return g(f.buffer,f.byteOffset,f.byteLength)}return h(y)}function g(y,f,m){if(f<0||y.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(y.byteLength<f+(m||0))throw new RangeError('"length" is outside of buffer bounds');let E;return f===void 0&&m===void 0?E=new Uint8Array(y):m===void 0?E=new Uint8Array(y,f):E=new Uint8Array(y,f,m),Object.setPrototypeOf(E,o.prototype),E}function b(y){if(o.isBuffer(y)){let f=A(y.length)|0,m=s(f);return m.length===0||y.copy(m,0,0,f),m}if(y.length!==void 0)return typeof y.length!="number"||Be(y.length)?s(0):h(y);if(y.type==="Buffer"&&Array.isArray(y.data))return h(y.data)}function A(y){if(y>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return y|0}function w(y){return+y!=y&&(y=0),o.alloc(+y)}o.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==o.prototype},o.compare=function(f,m){if(et(f,Uint8Array)&&(f=o.from(f,f.offset,f.byteLength)),et(m,Uint8Array)&&(m=o.from(m,m.offset,m.byteLength)),!o.isBuffer(f)||!o.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===m)return 0;let E=f.length,P=m.length;for(let O=0,G=Math.min(E,P);O<G;++O)if(f[O]!==m[O]){E=f[O],P=m[O];break}return E<P?-1:P<E?1:0},o.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(f,m){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return o.alloc(0);let E;if(m===void 0)for(m=0,E=0;E<f.length;++E)m+=f[E].length;let P=o.allocUnsafe(m),O=0;for(E=0;E<f.length;++E){let G=f[E];if(et(G,Uint8Array))O+G.length>P.length?(o.isBuffer(G)||(G=o.from(G)),G.copy(P,O)):Uint8Array.prototype.set.call(P,G,O);else if(o.isBuffer(G))G.copy(P,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=G.length}return P};function _(y,f){if(o.isBuffer(y))return y.length;if(ArrayBuffer.isView(y)||et(y,ArrayBuffer))return y.byteLength;if(typeof y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof y);let m=y.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&m===0)return 0;let P=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":return Lt(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return y5(y).length;default:if(P)return E?-1:Lt(y).length;f=(""+f).toLowerCase(),P=!0}}o.byteLength=_;function S(y,f,m){let E=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,f>>>=0,m<=f))return"";for(y||(y="utf8");;)switch(y){case"hex":return s0(this,f,m);case"utf8":case"utf-8":return e0(this,f,m);case"ascii":return K(this,f,m);case"latin1":case"binary":return n0(this,f,m);case"base64":return q(this,f,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l0(this,f,m);default:if(E)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function M(y,f,m){let E=y[f];y[f]=y[m],y[m]=E}o.prototype.swap16=function(){let f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<f;m+=2)M(this,m,m+1);return this},o.prototype.swap32=function(){let f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<f;m+=4)M(this,m,m+3),M(this,m+1,m+2);return this},o.prototype.swap64=function(){let f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<f;m+=8)M(this,m,m+7),M(this,m+1,m+6),M(this,m+2,m+5),M(this,m+3,m+4);return this},o.prototype.toString=function(){let f=this.length;return f===0?"":arguments.length===0?e0(this,0,f):S.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(f){if(!o.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:o.compare(this,f)===0},o.prototype.inspect=function(){let f="",m=Ut.INSPECT_MAX_BYTES;return f=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(f+=" ... "),"<Buffer "+f+">"},e&&(o.prototype[e]=o.prototype.inspect),o.prototype.compare=function(f,m,E,P,O){if(et(f,Uint8Array)&&(f=o.from(f,f.offset,f.byteLength)),!o.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(m===void 0&&(m=0),E===void 0&&(E=f?f.length:0),P===void 0&&(P=0),O===void 0&&(O=this.length),m<0||E>f.length||P<0||O>this.length)throw new RangeError("out of range index");if(P>=O&&m>=E)return 0;if(P>=O)return-1;if(m>=E)return 1;if(m>>>=0,E>>>=0,P>>>=0,O>>>=0,this===f)return 0;let G=O-P,o0=E-m,y0=Math.min(G,o0),f0=this.slice(P,O),w0=f.slice(m,E);for(let d0=0;d0<y0;++d0)if(f0[d0]!==w0[d0]){G=f0[d0],o0=w0[d0];break}return G<o0?-1:o0<G?1:0};function C(y,f,m,E,P){if(y.length===0)return-1;if(typeof m=="string"?(E=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,Be(m)&&(m=P?0:y.length-1),m<0&&(m=y.length+m),m>=y.length){if(P)return-1;m=y.length-1}else if(m<0)if(P)m=0;else return-1;if(typeof f=="string"&&(f=o.from(f,E)),o.isBuffer(f))return f.length===0?-1:H(y,f,m,E,P);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(y,f,m):Uint8Array.prototype.lastIndexOf.call(y,f,m):H(y,[f],m,E,P);throw new TypeError("val must be string, number or Buffer")}function H(y,f,m,E,P){let O=1,G=y.length,o0=f.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(y.length<2||f.length<2)return-1;O=2,G/=2,o0/=2,m/=2}function y0(w0,d0){return O===1?w0[d0]:w0.readUInt16BE(d0*O)}let f0;if(P){let w0=-1;for(f0=m;f0<G;f0++)if(y0(y,f0)===y0(f,w0===-1?0:f0-w0)){if(w0===-1&&(w0=f0),f0-w0+1===o0)return w0*O}else w0!==-1&&(f0-=f0-w0),w0=-1}else for(m+o0>G&&(m=G-o0),f0=m;f0>=0;f0--){let w0=!0;for(let d0=0;d0<o0;d0++)if(y0(y,f0+d0)!==y0(f,d0)){w0=!1;break}if(w0)return f0}return-1}o.prototype.includes=function(f,m,E){return this.indexOf(f,m,E)!==-1},o.prototype.indexOf=function(f,m,E){return C(this,f,m,E,!0)},o.prototype.lastIndexOf=function(f,m,E){return C(this,f,m,E,!1)};function B(y,f,m,E){m=Number(m)||0;let P=y.length-m;E?(E=Number(E),E>P&&(E=P)):E=P;let O=f.length;E>O/2&&(E=O/2);let G;for(G=0;G<E;++G){let o0=parseInt(f.substr(G*2,2),16);if(Be(o0))return G;y[m+G]=o0}return G}function I(y,f,m,E){return se(Lt(f,y.length-m),y,m,E)}function W(y,f,m,E){return se(Pe(f),y,m,E)}function z(y,f,m,E){return se(y5(f),y,m,E)}function j(y,f,m,E){return se(re(f,y.length-m),y,m,E)}o.prototype.write=function(f,m,E,P){if(m===void 0)P="utf8",E=this.length,m=0;else if(E===void 0&&typeof m=="string")P=m,E=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(E)?(E=E>>>0,P===void 0&&(P="utf8")):(P=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let O=this.length-m;if((E===void 0||E>O)&&(E=O),f.length>0&&(E<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let G=!1;for(;;)switch(P){case"hex":return B(this,f,m,E);case"utf8":case"utf-8":return I(this,f,m,E);case"ascii":case"latin1":case"binary":return W(this,f,m,E);case"base64":return z(this,f,m,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,f,m,E);default:if(G)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),G=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(y,f,m){return f===0&&m===y.length?r.fromByteArray(y):r.fromByteArray(y.slice(f,m))}function e0(y,f,m){m=Math.min(y.length,m);let E=[],P=f;for(;P<m;){let O=y[P],G=null,o0=O>239?4:O>223?3:O>191?2:1;if(P+o0<=m){let y0,f0,w0,d0;switch(o0){case 1:O<128&&(G=O);break;case 2:y0=y[P+1],(y0&192)===128&&(d0=(O&31)<<6|y0&63,d0>127&&(G=d0));break;case 3:y0=y[P+1],f0=y[P+2],(y0&192)===128&&(f0&192)===128&&(d0=(O&15)<<12|(y0&63)<<6|f0&63,d0>2047&&(d0<55296||d0>57343)&&(G=d0));break;case 4:y0=y[P+1],f0=y[P+2],w0=y[P+3],(y0&192)===128&&(f0&192)===128&&(w0&192)===128&&(d0=(O&15)<<18|(y0&63)<<12|(f0&63)<<6|w0&63,d0>65535&&d0<1114112&&(G=d0))}}G===null?(G=65533,o0=1):G>65535&&(G-=65536,E.push(G>>>10&1023|55296),G=56320|G&1023),E.push(G),P+=o0}return Z(E)}let V=4096;function Z(y){let f=y.length;if(f<=V)return String.fromCharCode.apply(String,y);let m="",E=0;for(;E<f;)m+=String.fromCharCode.apply(String,y.slice(E,E+=V));return m}function K(y,f,m){let E="";m=Math.min(y.length,m);for(let P=f;P<m;++P)E+=String.fromCharCode(y[P]&127);return E}function n0(y,f,m){let E="";m=Math.min(y.length,m);for(let P=f;P<m;++P)E+=String.fromCharCode(y[P]);return E}function s0(y,f,m){let E=y.length;(!f||f<0)&&(f=0),(!m||m<0||m>E)&&(m=E);let P="";for(let O=f;O<m;++O)P+=Ie[y[O]];return P}function l0(y,f,m){let E=y.slice(f,m),P="";for(let O=0;O<E.length-1;O+=2)P+=String.fromCharCode(E[O]+E[O+1]*256);return P}o.prototype.slice=function(f,m){let E=this.length;f=~~f,m=m===void 0?E:~~m,f<0?(f+=E,f<0&&(f=0)):f>E&&(f=E),m<0?(m+=E,m<0&&(m=0)):m>E&&(m=E),m<f&&(m=f);let P=this.subarray(f,m);return Object.setPrototypeOf(P,o.prototype),P};function $(y,f,m){if(y%1!==0||y<0)throw new RangeError("offset is not uint");if(y+f>m)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(f,m,E){f=f>>>0,m=m>>>0,E||$(f,m,this.length);let P=this[f],O=1,G=0;for(;++G<m&&(O*=256);)P+=this[f+G]*O;return P},o.prototype.readUintBE=o.prototype.readUIntBE=function(f,m,E){f=f>>>0,m=m>>>0,E||$(f,m,this.length);let P=this[f+--m],O=1;for(;m>0&&(O*=256);)P+=this[f+--m]*O;return P},o.prototype.readUint8=o.prototype.readUInt8=function(f,m){return f=f>>>0,m||$(f,1,this.length),this[f]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(f,m){return f=f>>>0,m||$(f,2,this.length),this[f]|this[f+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(f,m){return f=f>>>0,m||$(f,2,this.length),this[f]<<8|this[f+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(f,m){return f=f>>>0,m||$(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(f,m){return f=f>>>0,m||$(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},o.prototype.readBigUInt64LE=st(function(f){f=f>>>0,Dt(f,"offset");let m=this[f],E=this[f+7];(m===void 0||E===void 0)&&O0(f,this.length-8);let P=m+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,O=this[++f]+this[++f]*2**8+this[++f]*2**16+E*2**24;return BigInt(P)+(BigInt(O)<<BigInt(32))}),o.prototype.readBigUInt64BE=st(function(f){f=f>>>0,Dt(f,"offset");let m=this[f],E=this[f+7];(m===void 0||E===void 0)&&O0(f,this.length-8);let P=m*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],O=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+E;return(BigInt(P)<<BigInt(32))+BigInt(O)}),o.prototype.readIntLE=function(f,m,E){f=f>>>0,m=m>>>0,E||$(f,m,this.length);let P=this[f],O=1,G=0;for(;++G<m&&(O*=256);)P+=this[f+G]*O;return O*=128,P>=O&&(P-=Math.pow(2,8*m)),P},o.prototype.readIntBE=function(f,m,E){f=f>>>0,m=m>>>0,E||$(f,m,this.length);let P=m,O=1,G=this[f+--P];for(;P>0&&(O*=256);)G+=this[f+--P]*O;return O*=128,G>=O&&(G-=Math.pow(2,8*m)),G},o.prototype.readInt8=function(f,m){return f=f>>>0,m||$(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},o.prototype.readInt16LE=function(f,m){f=f>>>0,m||$(f,2,this.length);let E=this[f]|this[f+1]<<8;return E&32768?E|4294901760:E},o.prototype.readInt16BE=function(f,m){f=f>>>0,m||$(f,2,this.length);let E=this[f+1]|this[f]<<8;return E&32768?E|4294901760:E},o.prototype.readInt32LE=function(f,m){return f=f>>>0,m||$(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},o.prototype.readInt32BE=function(f,m){return f=f>>>0,m||$(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},o.prototype.readBigInt64LE=st(function(f){f=f>>>0,Dt(f,"offset");let m=this[f],E=this[f+7];(m===void 0||E===void 0)&&O0(f,this.length-8);let P=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(E<<24);return(BigInt(P)<<BigInt(32))+BigInt(m+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),o.prototype.readBigInt64BE=st(function(f){f=f>>>0,Dt(f,"offset");let m=this[f],E=this[f+7];(m===void 0||E===void 0)&&O0(f,this.length-8);let P=(m<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(P)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+E)}),o.prototype.readFloatLE=function(f,m){return f=f>>>0,m||$(f,4,this.length),t.read(this,f,!0,23,4)},o.prototype.readFloatBE=function(f,m){return f=f>>>0,m||$(f,4,this.length),t.read(this,f,!1,23,4)},o.prototype.readDoubleLE=function(f,m){return f=f>>>0,m||$(f,8,this.length),t.read(this,f,!0,52,8)},o.prototype.readDoubleBE=function(f,m){return f=f>>>0,m||$(f,8,this.length),t.read(this,f,!1,52,8)};function u0(y,f,m,E,P,O){if(!o.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>P||f<O)throw new RangeError('"value" argument is out of bounds');if(m+E>y.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(f,m,E,P){if(f=+f,m=m>>>0,E=E>>>0,!P){let o0=Math.pow(2,8*E)-1;u0(this,f,m,E,o0,0)}let O=1,G=0;for(this[m]=f&255;++G<E&&(O*=256);)this[m+G]=f/O&255;return m+E},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(f,m,E,P){if(f=+f,m=m>>>0,E=E>>>0,!P){let o0=Math.pow(2,8*E)-1;u0(this,f,m,E,o0,0)}let O=E-1,G=1;for(this[m+O]=f&255;--O>=0&&(G*=256);)this[m+O]=f/G&255;return m+E},o.prototype.writeUint8=o.prototype.writeUInt8=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,1,255,0),this[m]=f&255,m+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,2,65535,0),this[m]=f&255,this[m+1]=f>>>8,m+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,2,65535,0),this[m]=f>>>8,this[m+1]=f&255,m+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,4,4294967295,0),this[m+3]=f>>>24,this[m+2]=f>>>16,this[m+1]=f>>>8,this[m]=f&255,m+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,4,4294967295,0),this[m]=f>>>24,this[m+1]=f>>>16,this[m+2]=f>>>8,this[m+3]=f&255,m+4};function $0(y,f,m,E,P){Ce(f,E,P,y,m,7);let O=Number(f&BigInt(4294967295));y[m++]=O,O=O>>8,y[m++]=O,O=O>>8,y[m++]=O,O=O>>8,y[m++]=O;let G=Number(f>>BigInt(32)&BigInt(4294967295));return y[m++]=G,G=G>>8,y[m++]=G,G=G>>8,y[m++]=G,G=G>>8,y[m++]=G,m}function z0(y,f,m,E,P){Ce(f,E,P,y,m,7);let O=Number(f&BigInt(4294967295));y[m+7]=O,O=O>>8,y[m+6]=O,O=O>>8,y[m+5]=O,O=O>>8,y[m+4]=O;let G=Number(f>>BigInt(32)&BigInt(4294967295));return y[m+3]=G,G=G>>8,y[m+2]=G,G=G>>8,y[m+1]=G,G=G>>8,y[m]=G,m+8}o.prototype.writeBigUInt64LE=st(function(f,m=0){return $0(this,f,m,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=st(function(f,m=0){return z0(this,f,m,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(f,m,E,P){if(f=+f,m=m>>>0,!P){let y0=Math.pow(2,8*E-1);u0(this,f,m,E,y0-1,-y0)}let O=0,G=1,o0=0;for(this[m]=f&255;++O<E&&(G*=256);)f<0&&o0===0&&this[m+O-1]!==0&&(o0=1),this[m+O]=(f/G>>0)-o0&255;return m+E},o.prototype.writeIntBE=function(f,m,E,P){if(f=+f,m=m>>>0,!P){let y0=Math.pow(2,8*E-1);u0(this,f,m,E,y0-1,-y0)}let O=E-1,G=1,o0=0;for(this[m+O]=f&255;--O>=0&&(G*=256);)f<0&&o0===0&&this[m+O+1]!==0&&(o0=1),this[m+O]=(f/G>>0)-o0&255;return m+E},o.prototype.writeInt8=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,1,127,-128),f<0&&(f=255+f+1),this[m]=f&255,m+1},o.prototype.writeInt16LE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,2,32767,-32768),this[m]=f&255,this[m+1]=f>>>8,m+2},o.prototype.writeInt16BE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,2,32767,-32768),this[m]=f>>>8,this[m+1]=f&255,m+2},o.prototype.writeInt32LE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,4,2147483647,-2147483648),this[m]=f&255,this[m+1]=f>>>8,this[m+2]=f>>>16,this[m+3]=f>>>24,m+4},o.prototype.writeInt32BE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[m]=f>>>24,this[m+1]=f>>>16,this[m+2]=f>>>8,this[m+3]=f&255,m+4},o.prototype.writeBigInt64LE=st(function(f,m=0){return $0(this,f,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=st(function(f,m=0){return z0(this,f,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y0(y,f,m,E,P,O){if(m+E>y.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function ct(y,f,m,E,P){return f=+f,m=m>>>0,P||Y0(y,f,m,4),t.write(y,f,m,E,23,4),m+4}o.prototype.writeFloatLE=function(f,m,E){return ct(this,f,m,!0,E)},o.prototype.writeFloatBE=function(f,m,E){return ct(this,f,m,!1,E)};function dt(y,f,m,E,P){return f=+f,m=m>>>0,P||Y0(y,f,m,8),t.write(y,f,m,E,52,8),m+8}o.prototype.writeDoubleLE=function(f,m,E){return dt(this,f,m,!0,E)},o.prototype.writeDoubleBE=function(f,m,E){return dt(this,f,m,!1,E)},o.prototype.copy=function(f,m,E,P){if(!o.isBuffer(f))throw new TypeError("argument should be a Buffer");if(E||(E=0),!P&&P!==0&&(P=this.length),m>=f.length&&(m=f.length),m||(m=0),P>0&&P<E&&(P=E),P===E||f.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),f.length-m<P-E&&(P=f.length-m+E);let O=P-E;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,E,P):Uint8Array.prototype.set.call(f,this.subarray(E,P),m),O},o.prototype.fill=function(f,m,E,P){if(typeof f=="string"){if(typeof m=="string"?(P=m,m=0,E=this.length):typeof E=="string"&&(P=E,E=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!o.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(f.length===1){let G=f.charCodeAt(0);(P==="utf8"&&G<128||P==="latin1")&&(f=G)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(m<0||this.length<m||this.length<E)throw new RangeError("Out of range index");if(E<=m)return this;m=m>>>0,E=E===void 0?this.length:E>>>0,f||(f=0);let O;if(typeof f=="number")for(O=m;O<E;++O)this[O]=f;else{let G=o.isBuffer(f)?f:o.from(f,P),o0=G.length;if(o0===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(O=0;O<E-m;++O)this[O+m]=G[O%o0]}return this};let M0={};function K0(y,f,m){M0[y]=class extends m{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${y}]`,this.stack,delete this.name}get code(){return y}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${y}]: ${this.message}`}}}K0("ERR_BUFFER_OUT_OF_BOUNDS",function(y){return y?`${y} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),K0("ERR_INVALID_ARG_TYPE",function(y,f){return`The "${y}" argument must be of type number. Received type ${typeof f}`},TypeError),K0("ERR_OUT_OF_RANGE",function(y,f,m){let E=`The value of "${y}" is out of range.`,P=m;return Number.isInteger(m)&&Math.abs(m)>2**32?P=Se(String(m)):typeof m=="bigint"&&(P=String(m),(m>BigInt(2)**BigInt(32)||m<-(BigInt(2)**BigInt(32)))&&(P=Se(P)),P+="n"),E+=` It must be ${f}. Received ${P}`,E},RangeError);function Se(y){let f="",m=y.length,E=y[0]==="-"?1:0;for(;m>=E+4;m-=3)f=`_${y.slice(m-3,m)}${f}`;return`${y.slice(0,m)}${f}`}function g5(y,f,m){Dt(f,"offset"),(y[f]===void 0||y[f+m]===void 0)&&O0(f,y.length-(m+1))}function Ce(y,f,m,E,P,O){if(y>m||y<f){let G=typeof f=="bigint"?"n":"",o0;throw f===0||f===BigInt(0)?o0=`>= 0${G} and < 2${G} ** ${(O+1)*8}${G}`:o0=`>= -(2${G} ** ${(O+1)*8-1}${G}) and < 2 ** ${(O+1)*8-1}${G}`,new M0.ERR_OUT_OF_RANGE("value",o0,y)}g5(E,P,O)}function Dt(y,f){if(typeof y!="number")throw new M0.ERR_INVALID_ARG_TYPE(f,"number",y)}function O0(y,f,m){throw Math.floor(y)!==y?(Dt(y,m),new M0.ERR_OUT_OF_RANGE("offset","an integer",y)):f<0?new M0.ERR_BUFFER_OUT_OF_BOUNDS:new M0.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${f}`,y)}let tt=/[^+/0-9A-Za-z-_]/g;function b5(y){if(y=y.split("=")[0],y=y.trim().replace(tt,""),y.length<2)return"";for(;y.length%4!==0;)y=y+"=";return y}function Lt(y,f){f=f||1/0;let m,E=y.length,P=null,O=[];for(let G=0;G<E;++G){if(m=y.charCodeAt(G),m>55295&&m<57344){if(!P){if(m>56319){(f-=3)>-1&&O.push(239,191,189);continue}else if(G+1===E){(f-=3)>-1&&O.push(239,191,189);continue}P=m;continue}if(m<56320){(f-=3)>-1&&O.push(239,191,189),P=m;continue}m=(P-55296<<10|m-56320)+65536}else P&&(f-=3)>-1&&O.push(239,191,189);if(P=null,m<128){if((f-=1)<0)break;O.push(m)}else if(m<2048){if((f-=2)<0)break;O.push(m>>6|192,m&63|128)}else if(m<65536){if((f-=3)<0)break;O.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((f-=4)<0)break;O.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return O}function Pe(y){let f=[];for(let m=0;m<y.length;++m)f.push(y.charCodeAt(m)&255);return f}function re(y,f){let m,E,P,O=[];for(let G=0;G<y.length&&!((f-=2)<0);++G)m=y.charCodeAt(G),E=m>>8,P=m%256,O.push(P),O.push(E);return O}function y5(y){return r.toByteArray(b5(y))}function se(y,f,m,E){let P;for(P=0;P<E&&!(P+m>=f.length||P>=y.length);++P)f[P+m]=y[P];return P}function et(y,f){return y instanceof f||y!=null&&y.constructor!=null&&y.constructor.name!=null&&y.constructor.name===f.name}function Be(y){return y!==y}let Ie=function(){let y="0123456789abcdef",f=new Array(256);for(let m=0;m<16;++m){let E=m*16;for(let P=0;P<16;++P)f[E+P]=y[m]+y[P]}return f}();function st(y){return typeof BigInt>"u"?C1:y}function C1(){throw new Error("BigInt not supported")}return Ut}var Oe,Bn,x5,In,Ut,Hn,On=ut(()=>{x();R();T();k();Oe={},Bn=!1;x5={},In=!1;Ut={},Hn=!1});var Gt,L,Dv,Lv,Dn=ut(()=>{x();R();T();k();On();Gt=zn();Gt.Buffer;Gt.SlowBuffer;Gt.INSPECT_MAX_BYTES;Gt.kMaxLength;L=Gt.Buffer,Dv=Gt.INSPECT_MAX_BYTES,Lv=Gt.kMaxLength});var T=ut(()=>{Dn()});var or=Z0((L1,F1)=>{x();R();T();k();(function(r,t){typeof L1=="object"&&typeof F1<"u"?F1.exports=t():typeof define=="function"&&define.amd?define(t):r.Stats=t()})(L1,function(){var r=function(){function t(d){return n.appendChild(d.dom),d}function e(d){for(var h=0;h<n.children.length;h++)n.children[h].style.display=h===d?"block":"none";i=d}var i=0,n=document.createElement("div");n.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",n.addEventListener("click",function(d){d.preventDefault(),e(++i%n.children.length)},!1);var s=(performance||Date).now(),o=s,a=0,v=t(new r.Panel("FPS","#0ff","#002")),l=t(new r.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=t(new r.Panel("MB","#f08","#201"));return e(0),{REVISION:16,dom:n,addPanel:t,showPanel:e,begin:function(){s=(performance||Date).now()},end:function(){a++;var d=(performance||Date).now();if(l.update(d-s,200),d>o+1e3&&(v.update(1e3*a/(d-o),100),o=d,a=0,c)){var h=performance.memory;c.update(h.usedJSHeapSize/1048576,h.jsHeapSizeLimit/1048576)}return d},update:function(){s=this.end()},domElement:n,setMode:e}};return r.Panel=function(t,e,i){var n=1/0,s=0,o=Math.round,a=o(window.devicePixelRatio||1),v=80*a,l=48*a,c=3*a,d=2*a,h=3*a,p=15*a,g=74*a,b=30*a,A=document.createElement("canvas");A.width=v,A.height=l,A.style.cssText="width:80px;height:48px";var w=A.getContext("2d");return w.font="bold "+9*a+"px Helvetica,Arial,sans-serif",w.textBaseline="top",w.fillStyle=i,w.fillRect(0,0,v,l),w.fillStyle=e,w.fillText(t,c,d),w.fillRect(h,p,g,b),w.fillStyle=i,w.globalAlpha=.9,w.fillRect(h,p,g,b),{dom:A,update:function(_,S){n=Math.min(n,_),s=Math.max(s,_),w.fillStyle=i,w.globalAlpha=1,w.fillRect(0,0,v,p),w.fillStyle=e,w.fillText(o(_)+" "+t+" ("+o(n)+"-"+o(s)+")",c,d),w.drawImage(A,h+a,p,g-a,b,h,p,g-a,b),w.fillRect(h+g-a,p,a,b),w.fillStyle=i,w.globalAlpha=.9,w.fillRect(h+g-a,p,a,o((1-_/S)*b))}}},r})});var Er=Z0((Ar,V5)=>{x();R();T();k();(function(r,t){typeof V5=="object"&&V5.exports?V5.exports=t():r.nearley=t()})(Ar,function(){function r(v,l,c){return this.id=++r.highestId,this.name=v,this.symbols=l,this.postprocess=c,this}r.highestId=0,r.prototype.toString=function(v){var l=typeof v>"u"?this.symbols.map(a).join(" "):this.symbols.slice(0,v).map(a).join(" ")+" \u25CF "+this.symbols.slice(v).map(a).join(" ");return this.name+" \u2192 "+l};function t(v,l,c,d){this.rule=v,this.dot=l,this.reference=c,this.data=[],this.wantedBy=d,this.isComplete=this.dot===v.symbols.length}t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(v){var l=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return l.left=this,l.right=v,l.isComplete&&(l.data=l.build(),l.right=void 0),l},t.prototype.build=function(){var v=[],l=this;do v.push(l.right.data),l=l.left;while(l.left);return v.reverse(),v},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))};function e(v,l){this.grammar=v,this.index=l,this.states=[],this.wants={},this.scannable=[],this.completed={}}e.prototype.process=function(v){for(var l=this.states,c=this.wants,d=this.completed,h=0;h<l.length;h++){var p=l[h];if(p.isComplete){if(p.finish(),p.data!==s.fail){for(var g=p.wantedBy,b=g.length;b--;){var A=g[b];this.complete(A,p)}if(p.reference===this.index){var w=p.rule.name;(this.completed[w]=this.completed[w]||[]).push(p)}}}else{var w=p.rule.symbols[p.dot];if(typeof w!="string"){this.scannable.push(p);continue}if(c[w]){if(c[w].push(p),d.hasOwnProperty(w))for(var _=d[w],b=0;b<_.length;b++){var S=_[b];this.complete(p,S)}}else c[w]=[p],this.predict(w)}}},e.prototype.predict=function(v){for(var l=this.grammar.byName[v]||[],c=0;c<l.length;c++){var d=l[c],h=this.wants[v],p=new t(d,0,this.index,h);this.states.push(p)}},e.prototype.complete=function(v,l){var c=v.nextState(l);this.states.push(c)};function i(v,l){this.rules=v,this.start=l||this.rules[0].name;var c=this.byName={};this.rules.forEach(function(d){c.hasOwnProperty(d.name)||(c[d.name]=[]),c[d.name].push(d)})}i.fromCompiled=function(d,l){var c=d.Lexer;d.ParserStart&&(l=d.ParserStart,d=d.ParserRules);var d=d.map(function(p){return new r(p.name,p.symbols,p.postprocess)}),h=new i(d,l);return h.lexer=c,h};function n(){this.reset("")}n.prototype.reset=function(v,l){this.buffer=v,this.index=0,this.line=l?l.line:1,this.lastLineBreak=l?-l.col:0},n.prototype.next=function(){if(this.index<this.buffer.length){var v=this.buffer[this.index++];return v===`
1
+ var bs=Object.create;var He=Object.defineProperty;var ys=Object.getOwnPropertyDescriptor;var ws=Object.getOwnPropertyNames;var _s=Object.getPrototypeOf,As=Object.prototype.hasOwnProperty;var Es=(r,t,e)=>t in r?He(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var xs=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var ut=(r,t)=>()=>(r&&(t=r(r=0)),t);var Z0=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),_5=(r,t)=>{for(var e in t)He(r,e,{get:t[e],enumerable:!0})},h2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ws(t))!As.call(r,n)&&n!==e&&He(r,n,{get:()=>t[n],enumerable:!(i=ys(t,n))||i.enumerable});return r};var ze=(r,t,e)=>(e=r!=null?bs(_s(r)):{},h2(t||!r||!r.__esModule?He(e,"default",{value:r,enumerable:!0}):e,r)),Rs=r=>h2(He({},"__esModule",{value:!0}),r);var u=(r,t,e)=>(Es(r,typeof t!="symbol"?t+"":t,e),e);var x=ut(()=>{});var R=ut(()=>{});var D={};_5(D,{_debugEnd:()=>rn,_debugProcess:()=>nn,_events:()=>wn,_eventsCount:()=>_n,_exiting:()=>D2,_fatalExceptions:()=>X2,_getActiveHandles:()=>G2,_getActiveRequests:()=>U2,_kill:()=>N2,_linkedBinding:()=>z2,_maxListeners:()=>yn,_preload_modules:()=>pn,_rawDebug:()=>I2,_startProfilerIdleNotifier:()=>sn,_stopProfilerIdleNotifier:()=>on,_tickCallback:()=>en,abort:()=>cn,addListener:()=>An,allowedNodeEnvironmentFlags:()=>J2,arch:()=>y2,argv:()=>A2,argv0:()=>mn,assert:()=>q2,binding:()=>T2,browser:()=>B2,chdir:()=>C2,config:()=>L2,cpuUsage:()=>x5,cwd:()=>S2,debugPort:()=>hn,default:()=>Pn,dlopen:()=>F2,domain:()=>O2,emit:()=>Tn,emitWarning:()=>k2,env:()=>_2,execArgv:()=>E2,execPath:()=>fn,exit:()=>Q2,features:()=>Z2,hasUncaughtExceptionCaptureCallback:()=>tn,hrtime:()=>E5,kill:()=>Y2,listeners:()=>Cn,memoryUsage:()=>j2,moduleLoadList:()=>H2,nextTick:()=>p2,off:()=>xn,on:()=>ht,once:()=>En,openStdin:()=>K2,pid:()=>dn,platform:()=>w2,ppid:()=>un,prependListener:()=>Mn,prependOnceListener:()=>Sn,reallyExit:()=>W2,release:()=>P2,removeAllListeners:()=>kn,removeListener:()=>Rn,resourceUsage:()=>V2,setSourceMapsEnabled:()=>gn,setUncaughtExceptionCaptureCallback:()=>$2,stderr:()=>vn,stdin:()=>ln,stdout:()=>an,title:()=>b2,umask:()=>M2,uptime:()=>bn,version:()=>x2,versions:()=>R2});function H1(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}function ks(){!oe||!Ft||(oe=!1,Ft.length?ft=Ft.concat(ft):A5=-1,ft.length&&m2())}function m2(){if(!oe){var r=setTimeout(ks,0);oe=!0;for(var t=ft.length;t;){for(Ft=ft,ft=[];++A5<t;)Ft&&Ft[A5].run();A5=-1,t=ft.length}Ft=null,oe=!1,clearTimeout(r)}}function p2(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];ft.push(new g2(r,t)),ft.length===1&&!oe&&setTimeout(m2,0)}function g2(r,t){this.fun=r,this.array=t}function D0(){}function z2(r){H1("_linkedBinding")}function F2(r){H1("dlopen")}function U2(){return[]}function G2(){return[]}function q2(r,t){if(!r)throw new Error(t||"assertion error")}function tn(){return!1}function bn(){return Et.now()/1e3}function E5(r){var t=Math.floor((Date.now()-Et.now())*.001),e=Et.now()*.001,i=Math.floor(e)+t,n=Math.floor(e%1*1e9);return r&&(i=i-r[0],n=n-r[1],n<0&&(i--,n+=I1)),[i,n]}function ht(){return Pn}function Cn(r){return[]}var ft,oe,Ft,A5,b2,y2,w2,_2,A2,E2,x2,R2,k2,T2,M2,S2,C2,P2,B2,I2,H2,O2,D2,L2,W2,N2,x5,V2,j2,Y2,Q2,K2,J2,Z2,X2,$2,en,nn,rn,sn,on,an,vn,ln,cn,dn,un,fn,hn,mn,pn,gn,Et,B1,I1,yn,wn,_n,An,En,xn,Rn,kn,Tn,Mn,Sn,Pn,Bn=ut(()=>{x();R();T();k();ft=[],oe=!1,A5=-1;g2.prototype.run=function(){this.fun.apply(null,this.array)};b2="browser",y2="x64",w2="browser",_2={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},A2=["/usr/bin/node"],E2=[],x2="v16.8.0",R2={},k2=function(r,t){},T2=function(r){H1("binding")},M2=function(r){return 0},S2=function(){return"/"},C2=function(r){},P2={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};B2=!0,I2=D0,H2=[];O2={},D2=!1,L2={};W2=D0,N2=D0,x5=function(){return{}},V2=x5,j2=x5,Y2=D0,Q2=D0,K2=D0,J2={};Z2={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},X2=D0,$2=D0;en=D0,nn=D0,rn=D0,sn=D0,on=D0,an=void 0,vn=void 0,ln=void 0,cn=D0,dn=2,un=1,fn="/bin/usr/node",hn=9229,mn="node",pn=[],gn=D0,Et={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Et.now===void 0&&(B1=Date.now(),Et.timing&&Et.timing.navigationStart&&(B1=Et.timing.navigationStart),Et.now=()=>Date.now()-B1);I1=1e9;E5.bigint=function(r){var t=E5(r);return typeof BigInt>"u"?t[0]*I1+t[1]:BigInt(t[0]*I1)+BigInt(t[1])};yn=10,wn={},_n=0;An=ht,En=ht,xn=ht,Rn=ht,kn=ht,Tn=D0,Mn=ht,Sn=ht;Pn={version:x2,versions:R2,arch:y2,platform:w2,browser:B2,release:P2,_rawDebug:I2,moduleLoadList:H2,binding:T2,_linkedBinding:z2,_events:wn,_eventsCount:_n,_maxListeners:yn,on:ht,addListener:An,once:En,off:xn,removeListener:Rn,removeAllListeners:kn,emit:Tn,prependListener:Mn,prependOnceListener:Sn,listeners:Cn,domain:O2,_exiting:D2,config:L2,dlopen:F2,uptime:bn,_getActiveRequests:U2,_getActiveHandles:G2,reallyExit:W2,_kill:N2,cpuUsage:x5,resourceUsage:V2,memoryUsage:j2,kill:Y2,exit:Q2,openStdin:K2,allowedNodeEnvironmentFlags:J2,assert:q2,features:Z2,_fatalExceptions:X2,setUncaughtExceptionCaptureCallback:$2,hasUncaughtExceptionCaptureCallback:tn,emitWarning:k2,nextTick:p2,_tickCallback:en,_debugProcess:nn,_debugEnd:rn,_startProfilerIdleNotifier:sn,_stopProfilerIdleNotifier:on,stdout:an,stdin:ln,stderr:vn,abort:cn,umask:M2,chdir:C2,cwd:S2,env:_2,title:b2,argv:A2,execArgv:E2,pid:dn,ppid:un,execPath:fn,debugPort:hn,hrtime:E5,argv0:mn,_preload_modules:pn,setSourceMapsEnabled:gn}});var k=ut(()=>{Bn()});function Ts(){if(In)return Oe;In=!0,Oe.byteLength=a,Oe.toByteArray=l,Oe.fromByteArray=h;for(var r=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,s=i.length;n<s;++n)r[n]=i[n],t[i.charCodeAt(n)]=n;t[45]=62,t[95]=63;function o(p){var g=p.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=p.indexOf("=");b===-1&&(b=g);var A=b===g?0:4-b%4;return[b,A]}function a(p){var g=o(p),b=g[0],A=g[1];return(b+A)*3/4-A}function v(p,g,b){return(g+b)*3/4-b}function l(p){var g,b=o(p),A=b[0],w=b[1],_=new e(v(p,A,w)),S=0,M=w>0?A-4:A,C;for(C=0;C<M;C+=4)g=t[p.charCodeAt(C)]<<18|t[p.charCodeAt(C+1)]<<12|t[p.charCodeAt(C+2)]<<6|t[p.charCodeAt(C+3)],_[S++]=g>>16&255,_[S++]=g>>8&255,_[S++]=g&255;return w===2&&(g=t[p.charCodeAt(C)]<<2|t[p.charCodeAt(C+1)]>>4,_[S++]=g&255),w===1&&(g=t[p.charCodeAt(C)]<<10|t[p.charCodeAt(C+1)]<<4|t[p.charCodeAt(C+2)]>>2,_[S++]=g>>8&255,_[S++]=g&255),_}function c(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[p&63]}function d(p,g,b){for(var A,w=[],_=g;_<b;_+=3)A=(p[_]<<16&16711680)+(p[_+1]<<8&65280)+(p[_+2]&255),w.push(c(A));return w.join("")}function h(p){for(var g,b=p.length,A=b%3,w=[],_=16383,S=0,M=b-A;S<M;S+=_)w.push(d(p,S,S+_>M?M:S+_));return A===1?(g=p[b-1],w.push(r[g>>2]+r[g<<4&63]+"==")):A===2&&(g=(p[b-2]<<8)+p[b-1],w.push(r[g>>10]+r[g>>4&63]+r[g<<2&63]+"=")),w.join("")}return Oe}function Ms(){if(Hn)return R5;Hn=!0;return R5.read=function(r,t,e,i,n){var s,o,a=n*8-i-1,v=(1<<a)-1,l=v>>1,c=-7,d=e?n-1:0,h=e?-1:1,p=r[t+d];for(d+=h,s=p&(1<<-c)-1,p>>=-c,c+=a;c>0;s=s*256+r[t+d],d+=h,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=i;c>0;o=o*256+r[t+d],d+=h,c-=8);if(s===0)s=1-l;else{if(s===v)return o?NaN:(p?-1:1)*(1/0);o=o+Math.pow(2,i),s=s-l}return(p?-1:1)*o*Math.pow(2,s-i)},R5.write=function(r,t,e,i,n,s){var o,a,v,l=s*8-n-1,c=(1<<l)-1,d=c>>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,g=i?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(v=Math.pow(2,-o))<1&&(o--,v*=2),o+d>=1?t+=h/v:t+=h*Math.pow(2,1-d),t*v>=2&&(o++,v/=2),o+d>=c?(a=0,o=c):o+d>=1?(a=(t*v-1)*Math.pow(2,n),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;r[e+p]=a&255,p+=g,a/=256,n-=8);for(o=o<<n|a,l+=n;l>0;r[e+p]=o&255,p+=g,o/=256,l-=8);r[e+p-g]|=b*128},R5}function On(){if(zn)return Ut;zn=!0;let r=Ts(),t=Ms(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ut.Buffer=o,Ut.SlowBuffer=w,Ut.INSPECT_MAX_BYTES=50;let i=2147483647;Ut.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=n(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u";function n(){try{let y=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(y,f),y.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(y){if(y>i)throw new RangeError('The value "'+y+'" is invalid for option "size"');let f=new Uint8Array(y);return Object.setPrototypeOf(f,o.prototype),f}function o(y,f,m){if(typeof y=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(y)}return a(y,f,m)}o.poolSize=8192;function a(y,f,m){if(typeof y=="string")return d(y,f);if(ArrayBuffer.isView(y))return p(y);if(y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y);if(et(y,ArrayBuffer)||y&&et(y.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(et(y,SharedArrayBuffer)||y&&et(y.buffer,SharedArrayBuffer)))return g(y,f,m);if(typeof y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let E=y.valueOf&&y.valueOf();if(E!=null&&E!==y)return o.from(E,f,m);let P=b(y);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof y[Symbol.toPrimitive]=="function")return o.from(y[Symbol.toPrimitive]("string"),f,m);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof y)}o.from=function(y,f,m){return a(y,f,m)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function v(y){if(typeof y!="number")throw new TypeError('"size" argument must be of type number');if(y<0)throw new RangeError('The value "'+y+'" is invalid for option "size"')}function l(y,f,m){return v(y),y<=0?s(y):f!==void 0?typeof m=="string"?s(y).fill(f,m):s(y).fill(f):s(y)}o.alloc=function(y,f,m){return l(y,f,m)};function c(y){return v(y),s(y<0?0:A(y)|0)}o.allocUnsafe=function(y){return c(y)},o.allocUnsafeSlow=function(y){return c(y)};function d(y,f){if((typeof f!="string"||f==="")&&(f="utf8"),!o.isEncoding(f))throw new TypeError("Unknown encoding: "+f);let m=_(y,f)|0,E=s(m),P=E.write(y,f);return P!==m&&(E=E.slice(0,P)),E}function h(y){let f=y.length<0?0:A(y.length)|0,m=s(f);for(let E=0;E<f;E+=1)m[E]=y[E]&255;return m}function p(y){if(et(y,Uint8Array)){let f=new Uint8Array(y);return g(f.buffer,f.byteOffset,f.byteLength)}return h(y)}function g(y,f,m){if(f<0||y.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(y.byteLength<f+(m||0))throw new RangeError('"length" is outside of buffer bounds');let E;return f===void 0&&m===void 0?E=new Uint8Array(y):m===void 0?E=new Uint8Array(y,f):E=new Uint8Array(y,f,m),Object.setPrototypeOf(E,o.prototype),E}function b(y){if(o.isBuffer(y)){let f=A(y.length)|0,m=s(f);return m.length===0||y.copy(m,0,0,f),m}if(y.length!==void 0)return typeof y.length!="number"||Be(y.length)?s(0):h(y);if(y.type==="Buffer"&&Array.isArray(y.data))return h(y.data)}function A(y){if(y>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return y|0}function w(y){return+y!=y&&(y=0),o.alloc(+y)}o.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==o.prototype},o.compare=function(f,m){if(et(f,Uint8Array)&&(f=o.from(f,f.offset,f.byteLength)),et(m,Uint8Array)&&(m=o.from(m,m.offset,m.byteLength)),!o.isBuffer(f)||!o.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===m)return 0;let E=f.length,P=m.length;for(let O=0,G=Math.min(E,P);O<G;++O)if(f[O]!==m[O]){E=f[O],P=m[O];break}return E<P?-1:P<E?1:0},o.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(f,m){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return o.alloc(0);let E;if(m===void 0)for(m=0,E=0;E<f.length;++E)m+=f[E].length;let P=o.allocUnsafe(m),O=0;for(E=0;E<f.length;++E){let G=f[E];if(et(G,Uint8Array))O+G.length>P.length?(o.isBuffer(G)||(G=o.from(G)),G.copy(P,O)):Uint8Array.prototype.set.call(P,G,O);else if(o.isBuffer(G))G.copy(P,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=G.length}return P};function _(y,f){if(o.isBuffer(y))return y.length;if(ArrayBuffer.isView(y)||et(y,ArrayBuffer))return y.byteLength;if(typeof y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof y);let m=y.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&m===0)return 0;let P=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":return Lt(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return w5(y).length;default:if(P)return E?-1:Lt(y).length;f=(""+f).toLowerCase(),P=!0}}o.byteLength=_;function S(y,f,m){let E=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,f>>>=0,m<=f))return"";for(y||(y="utf8");;)switch(y){case"hex":return s0(this,f,m);case"utf8":case"utf-8":return e0(this,f,m);case"ascii":return K(this,f,m);case"latin1":case"binary":return n0(this,f,m);case"base64":return q(this,f,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l0(this,f,m);default:if(E)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function M(y,f,m){let E=y[f];y[f]=y[m],y[m]=E}o.prototype.swap16=function(){let f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<f;m+=2)M(this,m,m+1);return this},o.prototype.swap32=function(){let f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<f;m+=4)M(this,m,m+3),M(this,m+1,m+2);return this},o.prototype.swap64=function(){let f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<f;m+=8)M(this,m,m+7),M(this,m+1,m+6),M(this,m+2,m+5),M(this,m+3,m+4);return this},o.prototype.toString=function(){let f=this.length;return f===0?"":arguments.length===0?e0(this,0,f):S.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(f){if(!o.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:o.compare(this,f)===0},o.prototype.inspect=function(){let f="",m=Ut.INSPECT_MAX_BYTES;return f=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(f+=" ... "),"<Buffer "+f+">"},e&&(o.prototype[e]=o.prototype.inspect),o.prototype.compare=function(f,m,E,P,O){if(et(f,Uint8Array)&&(f=o.from(f,f.offset,f.byteLength)),!o.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(m===void 0&&(m=0),E===void 0&&(E=f?f.length:0),P===void 0&&(P=0),O===void 0&&(O=this.length),m<0||E>f.length||P<0||O>this.length)throw new RangeError("out of range index");if(P>=O&&m>=E)return 0;if(P>=O)return-1;if(m>=E)return 1;if(m>>>=0,E>>>=0,P>>>=0,O>>>=0,this===f)return 0;let G=O-P,o0=E-m,y0=Math.min(G,o0),f0=this.slice(P,O),w0=f.slice(m,E);for(let d0=0;d0<y0;++d0)if(f0[d0]!==w0[d0]){G=f0[d0],o0=w0[d0];break}return G<o0?-1:o0<G?1:0};function C(y,f,m,E,P){if(y.length===0)return-1;if(typeof m=="string"?(E=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,Be(m)&&(m=P?0:y.length-1),m<0&&(m=y.length+m),m>=y.length){if(P)return-1;m=y.length-1}else if(m<0)if(P)m=0;else return-1;if(typeof f=="string"&&(f=o.from(f,E)),o.isBuffer(f))return f.length===0?-1:H(y,f,m,E,P);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(y,f,m):Uint8Array.prototype.lastIndexOf.call(y,f,m):H(y,[f],m,E,P);throw new TypeError("val must be string, number or Buffer")}function H(y,f,m,E,P){let O=1,G=y.length,o0=f.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(y.length<2||f.length<2)return-1;O=2,G/=2,o0/=2,m/=2}function y0(w0,d0){return O===1?w0[d0]:w0.readUInt16BE(d0*O)}let f0;if(P){let w0=-1;for(f0=m;f0<G;f0++)if(y0(y,f0)===y0(f,w0===-1?0:f0-w0)){if(w0===-1&&(w0=f0),f0-w0+1===o0)return w0*O}else w0!==-1&&(f0-=f0-w0),w0=-1}else for(m+o0>G&&(m=G-o0),f0=m;f0>=0;f0--){let w0=!0;for(let d0=0;d0<o0;d0++)if(y0(y,f0+d0)!==y0(f,d0)){w0=!1;break}if(w0)return f0}return-1}o.prototype.includes=function(f,m,E){return this.indexOf(f,m,E)!==-1},o.prototype.indexOf=function(f,m,E){return C(this,f,m,E,!0)},o.prototype.lastIndexOf=function(f,m,E){return C(this,f,m,E,!1)};function B(y,f,m,E){m=Number(m)||0;let P=y.length-m;E?(E=Number(E),E>P&&(E=P)):E=P;let O=f.length;E>O/2&&(E=O/2);let G;for(G=0;G<E;++G){let o0=parseInt(f.substr(G*2,2),16);if(Be(o0))return G;y[m+G]=o0}return G}function I(y,f,m,E){return se(Lt(f,y.length-m),y,m,E)}function W(y,f,m,E){return se(Pe(f),y,m,E)}function z(y,f,m,E){return se(w5(f),y,m,E)}function j(y,f,m,E){return se(re(f,y.length-m),y,m,E)}o.prototype.write=function(f,m,E,P){if(m===void 0)P="utf8",E=this.length,m=0;else if(E===void 0&&typeof m=="string")P=m,E=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(E)?(E=E>>>0,P===void 0&&(P="utf8")):(P=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let O=this.length-m;if((E===void 0||E>O)&&(E=O),f.length>0&&(E<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let G=!1;for(;;)switch(P){case"hex":return B(this,f,m,E);case"utf8":case"utf-8":return I(this,f,m,E);case"ascii":case"latin1":case"binary":return W(this,f,m,E);case"base64":return z(this,f,m,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,f,m,E);default:if(G)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),G=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(y,f,m){return f===0&&m===y.length?r.fromByteArray(y):r.fromByteArray(y.slice(f,m))}function e0(y,f,m){m=Math.min(y.length,m);let E=[],P=f;for(;P<m;){let O=y[P],G=null,o0=O>239?4:O>223?3:O>191?2:1;if(P+o0<=m){let y0,f0,w0,d0;switch(o0){case 1:O<128&&(G=O);break;case 2:y0=y[P+1],(y0&192)===128&&(d0=(O&31)<<6|y0&63,d0>127&&(G=d0));break;case 3:y0=y[P+1],f0=y[P+2],(y0&192)===128&&(f0&192)===128&&(d0=(O&15)<<12|(y0&63)<<6|f0&63,d0>2047&&(d0<55296||d0>57343)&&(G=d0));break;case 4:y0=y[P+1],f0=y[P+2],w0=y[P+3],(y0&192)===128&&(f0&192)===128&&(w0&192)===128&&(d0=(O&15)<<18|(y0&63)<<12|(f0&63)<<6|w0&63,d0>65535&&d0<1114112&&(G=d0))}}G===null?(G=65533,o0=1):G>65535&&(G-=65536,E.push(G>>>10&1023|55296),G=56320|G&1023),E.push(G),P+=o0}return Z(E)}let V=4096;function Z(y){let f=y.length;if(f<=V)return String.fromCharCode.apply(String,y);let m="",E=0;for(;E<f;)m+=String.fromCharCode.apply(String,y.slice(E,E+=V));return m}function K(y,f,m){let E="";m=Math.min(y.length,m);for(let P=f;P<m;++P)E+=String.fromCharCode(y[P]&127);return E}function n0(y,f,m){let E="";m=Math.min(y.length,m);for(let P=f;P<m;++P)E+=String.fromCharCode(y[P]);return E}function s0(y,f,m){let E=y.length;(!f||f<0)&&(f=0),(!m||m<0||m>E)&&(m=E);let P="";for(let O=f;O<m;++O)P+=Ie[y[O]];return P}function l0(y,f,m){let E=y.slice(f,m),P="";for(let O=0;O<E.length-1;O+=2)P+=String.fromCharCode(E[O]+E[O+1]*256);return P}o.prototype.slice=function(f,m){let E=this.length;f=~~f,m=m===void 0?E:~~m,f<0?(f+=E,f<0&&(f=0)):f>E&&(f=E),m<0?(m+=E,m<0&&(m=0)):m>E&&(m=E),m<f&&(m=f);let P=this.subarray(f,m);return Object.setPrototypeOf(P,o.prototype),P};function $(y,f,m){if(y%1!==0||y<0)throw new RangeError("offset is not uint");if(y+f>m)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(f,m,E){f=f>>>0,m=m>>>0,E||$(f,m,this.length);let P=this[f],O=1,G=0;for(;++G<m&&(O*=256);)P+=this[f+G]*O;return P},o.prototype.readUintBE=o.prototype.readUIntBE=function(f,m,E){f=f>>>0,m=m>>>0,E||$(f,m,this.length);let P=this[f+--m],O=1;for(;m>0&&(O*=256);)P+=this[f+--m]*O;return P},o.prototype.readUint8=o.prototype.readUInt8=function(f,m){return f=f>>>0,m||$(f,1,this.length),this[f]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(f,m){return f=f>>>0,m||$(f,2,this.length),this[f]|this[f+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(f,m){return f=f>>>0,m||$(f,2,this.length),this[f]<<8|this[f+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(f,m){return f=f>>>0,m||$(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(f,m){return f=f>>>0,m||$(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},o.prototype.readBigUInt64LE=st(function(f){f=f>>>0,Dt(f,"offset");let m=this[f],E=this[f+7];(m===void 0||E===void 0)&&O0(f,this.length-8);let P=m+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,O=this[++f]+this[++f]*2**8+this[++f]*2**16+E*2**24;return BigInt(P)+(BigInt(O)<<BigInt(32))}),o.prototype.readBigUInt64BE=st(function(f){f=f>>>0,Dt(f,"offset");let m=this[f],E=this[f+7];(m===void 0||E===void 0)&&O0(f,this.length-8);let P=m*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],O=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+E;return(BigInt(P)<<BigInt(32))+BigInt(O)}),o.prototype.readIntLE=function(f,m,E){f=f>>>0,m=m>>>0,E||$(f,m,this.length);let P=this[f],O=1,G=0;for(;++G<m&&(O*=256);)P+=this[f+G]*O;return O*=128,P>=O&&(P-=Math.pow(2,8*m)),P},o.prototype.readIntBE=function(f,m,E){f=f>>>0,m=m>>>0,E||$(f,m,this.length);let P=m,O=1,G=this[f+--P];for(;P>0&&(O*=256);)G+=this[f+--P]*O;return O*=128,G>=O&&(G-=Math.pow(2,8*m)),G},o.prototype.readInt8=function(f,m){return f=f>>>0,m||$(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},o.prototype.readInt16LE=function(f,m){f=f>>>0,m||$(f,2,this.length);let E=this[f]|this[f+1]<<8;return E&32768?E|4294901760:E},o.prototype.readInt16BE=function(f,m){f=f>>>0,m||$(f,2,this.length);let E=this[f+1]|this[f]<<8;return E&32768?E|4294901760:E},o.prototype.readInt32LE=function(f,m){return f=f>>>0,m||$(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},o.prototype.readInt32BE=function(f,m){return f=f>>>0,m||$(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},o.prototype.readBigInt64LE=st(function(f){f=f>>>0,Dt(f,"offset");let m=this[f],E=this[f+7];(m===void 0||E===void 0)&&O0(f,this.length-8);let P=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(E<<24);return(BigInt(P)<<BigInt(32))+BigInt(m+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),o.prototype.readBigInt64BE=st(function(f){f=f>>>0,Dt(f,"offset");let m=this[f],E=this[f+7];(m===void 0||E===void 0)&&O0(f,this.length-8);let P=(m<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(P)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+E)}),o.prototype.readFloatLE=function(f,m){return f=f>>>0,m||$(f,4,this.length),t.read(this,f,!0,23,4)},o.prototype.readFloatBE=function(f,m){return f=f>>>0,m||$(f,4,this.length),t.read(this,f,!1,23,4)},o.prototype.readDoubleLE=function(f,m){return f=f>>>0,m||$(f,8,this.length),t.read(this,f,!0,52,8)},o.prototype.readDoubleBE=function(f,m){return f=f>>>0,m||$(f,8,this.length),t.read(this,f,!1,52,8)};function u0(y,f,m,E,P,O){if(!o.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>P||f<O)throw new RangeError('"value" argument is out of bounds');if(m+E>y.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(f,m,E,P){if(f=+f,m=m>>>0,E=E>>>0,!P){let o0=Math.pow(2,8*E)-1;u0(this,f,m,E,o0,0)}let O=1,G=0;for(this[m]=f&255;++G<E&&(O*=256);)this[m+G]=f/O&255;return m+E},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(f,m,E,P){if(f=+f,m=m>>>0,E=E>>>0,!P){let o0=Math.pow(2,8*E)-1;u0(this,f,m,E,o0,0)}let O=E-1,G=1;for(this[m+O]=f&255;--O>=0&&(G*=256);)this[m+O]=f/G&255;return m+E},o.prototype.writeUint8=o.prototype.writeUInt8=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,1,255,0),this[m]=f&255,m+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,2,65535,0),this[m]=f&255,this[m+1]=f>>>8,m+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,2,65535,0),this[m]=f>>>8,this[m+1]=f&255,m+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,4,4294967295,0),this[m+3]=f>>>24,this[m+2]=f>>>16,this[m+1]=f>>>8,this[m]=f&255,m+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,4,4294967295,0),this[m]=f>>>24,this[m+1]=f>>>16,this[m+2]=f>>>8,this[m+3]=f&255,m+4};function $0(y,f,m,E,P){Ce(f,E,P,y,m,7);let O=Number(f&BigInt(4294967295));y[m++]=O,O=O>>8,y[m++]=O,O=O>>8,y[m++]=O,O=O>>8,y[m++]=O;let G=Number(f>>BigInt(32)&BigInt(4294967295));return y[m++]=G,G=G>>8,y[m++]=G,G=G>>8,y[m++]=G,G=G>>8,y[m++]=G,m}function z0(y,f,m,E,P){Ce(f,E,P,y,m,7);let O=Number(f&BigInt(4294967295));y[m+7]=O,O=O>>8,y[m+6]=O,O=O>>8,y[m+5]=O,O=O>>8,y[m+4]=O;let G=Number(f>>BigInt(32)&BigInt(4294967295));return y[m+3]=G,G=G>>8,y[m+2]=G,G=G>>8,y[m+1]=G,G=G>>8,y[m]=G,m+8}o.prototype.writeBigUInt64LE=st(function(f,m=0){return $0(this,f,m,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=st(function(f,m=0){return z0(this,f,m,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(f,m,E,P){if(f=+f,m=m>>>0,!P){let y0=Math.pow(2,8*E-1);u0(this,f,m,E,y0-1,-y0)}let O=0,G=1,o0=0;for(this[m]=f&255;++O<E&&(G*=256);)f<0&&o0===0&&this[m+O-1]!==0&&(o0=1),this[m+O]=(f/G>>0)-o0&255;return m+E},o.prototype.writeIntBE=function(f,m,E,P){if(f=+f,m=m>>>0,!P){let y0=Math.pow(2,8*E-1);u0(this,f,m,E,y0-1,-y0)}let O=E-1,G=1,o0=0;for(this[m+O]=f&255;--O>=0&&(G*=256);)f<0&&o0===0&&this[m+O+1]!==0&&(o0=1),this[m+O]=(f/G>>0)-o0&255;return m+E},o.prototype.writeInt8=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,1,127,-128),f<0&&(f=255+f+1),this[m]=f&255,m+1},o.prototype.writeInt16LE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,2,32767,-32768),this[m]=f&255,this[m+1]=f>>>8,m+2},o.prototype.writeInt16BE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,2,32767,-32768),this[m]=f>>>8,this[m+1]=f&255,m+2},o.prototype.writeInt32LE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,4,2147483647,-2147483648),this[m]=f&255,this[m+1]=f>>>8,this[m+2]=f>>>16,this[m+3]=f>>>24,m+4},o.prototype.writeInt32BE=function(f,m,E){return f=+f,m=m>>>0,E||u0(this,f,m,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[m]=f>>>24,this[m+1]=f>>>16,this[m+2]=f>>>8,this[m+3]=f&255,m+4},o.prototype.writeBigInt64LE=st(function(f,m=0){return $0(this,f,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=st(function(f,m=0){return z0(this,f,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y0(y,f,m,E,P,O){if(m+E>y.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function ct(y,f,m,E,P){return f=+f,m=m>>>0,P||Y0(y,f,m,4),t.write(y,f,m,E,23,4),m+4}o.prototype.writeFloatLE=function(f,m,E){return ct(this,f,m,!0,E)},o.prototype.writeFloatBE=function(f,m,E){return ct(this,f,m,!1,E)};function dt(y,f,m,E,P){return f=+f,m=m>>>0,P||Y0(y,f,m,8),t.write(y,f,m,E,52,8),m+8}o.prototype.writeDoubleLE=function(f,m,E){return dt(this,f,m,!0,E)},o.prototype.writeDoubleBE=function(f,m,E){return dt(this,f,m,!1,E)},o.prototype.copy=function(f,m,E,P){if(!o.isBuffer(f))throw new TypeError("argument should be a Buffer");if(E||(E=0),!P&&P!==0&&(P=this.length),m>=f.length&&(m=f.length),m||(m=0),P>0&&P<E&&(P=E),P===E||f.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),f.length-m<P-E&&(P=f.length-m+E);let O=P-E;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,E,P):Uint8Array.prototype.set.call(f,this.subarray(E,P),m),O},o.prototype.fill=function(f,m,E,P){if(typeof f=="string"){if(typeof m=="string"?(P=m,m=0,E=this.length):typeof E=="string"&&(P=E,E=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!o.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(f.length===1){let G=f.charCodeAt(0);(P==="utf8"&&G<128||P==="latin1")&&(f=G)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(m<0||this.length<m||this.length<E)throw new RangeError("Out of range index");if(E<=m)return this;m=m>>>0,E=E===void 0?this.length:E>>>0,f||(f=0);let O;if(typeof f=="number")for(O=m;O<E;++O)this[O]=f;else{let G=o.isBuffer(f)?f:o.from(f,P),o0=G.length;if(o0===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(O=0;O<E-m;++O)this[O+m]=G[O%o0]}return this};let M0={};function K0(y,f,m){M0[y]=class extends m{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${y}]`,this.stack,delete this.name}get code(){return y}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${y}]: ${this.message}`}}}K0("ERR_BUFFER_OUT_OF_BOUNDS",function(y){return y?`${y} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),K0("ERR_INVALID_ARG_TYPE",function(y,f){return`The "${y}" argument must be of type number. Received type ${typeof f}`},TypeError),K0("ERR_OUT_OF_RANGE",function(y,f,m){let E=`The value of "${y}" is out of range.`,P=m;return Number.isInteger(m)&&Math.abs(m)>2**32?P=Se(String(m)):typeof m=="bigint"&&(P=String(m),(m>BigInt(2)**BigInt(32)||m<-(BigInt(2)**BigInt(32)))&&(P=Se(P)),P+="n"),E+=` It must be ${f}. Received ${P}`,E},RangeError);function Se(y){let f="",m=y.length,E=y[0]==="-"?1:0;for(;m>=E+4;m-=3)f=`_${y.slice(m-3,m)}${f}`;return`${y.slice(0,m)}${f}`}function b5(y,f,m){Dt(f,"offset"),(y[f]===void 0||y[f+m]===void 0)&&O0(f,y.length-(m+1))}function Ce(y,f,m,E,P,O){if(y>m||y<f){let G=typeof f=="bigint"?"n":"",o0;throw f===0||f===BigInt(0)?o0=`>= 0${G} and < 2${G} ** ${(O+1)*8}${G}`:o0=`>= -(2${G} ** ${(O+1)*8-1}${G}) and < 2 ** ${(O+1)*8-1}${G}`,new M0.ERR_OUT_OF_RANGE("value",o0,y)}b5(E,P,O)}function Dt(y,f){if(typeof y!="number")throw new M0.ERR_INVALID_ARG_TYPE(f,"number",y)}function O0(y,f,m){throw Math.floor(y)!==y?(Dt(y,m),new M0.ERR_OUT_OF_RANGE("offset","an integer",y)):f<0?new M0.ERR_BUFFER_OUT_OF_BOUNDS:new M0.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${f}`,y)}let tt=/[^+/0-9A-Za-z-_]/g;function y5(y){if(y=y.split("=")[0],y=y.trim().replace(tt,""),y.length<2)return"";for(;y.length%4!==0;)y=y+"=";return y}function Lt(y,f){f=f||1/0;let m,E=y.length,P=null,O=[];for(let G=0;G<E;++G){if(m=y.charCodeAt(G),m>55295&&m<57344){if(!P){if(m>56319){(f-=3)>-1&&O.push(239,191,189);continue}else if(G+1===E){(f-=3)>-1&&O.push(239,191,189);continue}P=m;continue}if(m<56320){(f-=3)>-1&&O.push(239,191,189),P=m;continue}m=(P-55296<<10|m-56320)+65536}else P&&(f-=3)>-1&&O.push(239,191,189);if(P=null,m<128){if((f-=1)<0)break;O.push(m)}else if(m<2048){if((f-=2)<0)break;O.push(m>>6|192,m&63|128)}else if(m<65536){if((f-=3)<0)break;O.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((f-=4)<0)break;O.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return O}function Pe(y){let f=[];for(let m=0;m<y.length;++m)f.push(y.charCodeAt(m)&255);return f}function re(y,f){let m,E,P,O=[];for(let G=0;G<y.length&&!((f-=2)<0);++G)m=y.charCodeAt(G),E=m>>8,P=m%256,O.push(P),O.push(E);return O}function w5(y){return r.toByteArray(y5(y))}function se(y,f,m,E){let P;for(P=0;P<E&&!(P+m>=f.length||P>=y.length);++P)f[P+m]=y[P];return P}function et(y,f){return y instanceof f||y!=null&&y.constructor!=null&&y.constructor.name!=null&&y.constructor.name===f.name}function Be(y){return y!==y}let Ie=function(){let y="0123456789abcdef",f=new Array(256);for(let m=0;m<16;++m){let E=m*16;for(let P=0;P<16;++P)f[E+P]=y[m]+y[P]}return f}();function st(y){return typeof BigInt>"u"?P1:y}function P1(){throw new Error("BigInt not supported")}return Ut}var Oe,In,R5,Hn,Ut,zn,Dn=ut(()=>{x();R();T();k();Oe={},In=!1;R5={},Hn=!1;Ut={},zn=!1});var Gt,L,Dv,Lv,Ln=ut(()=>{x();R();T();k();Dn();Gt=On();Gt.Buffer;Gt.SlowBuffer;Gt.INSPECT_MAX_BYTES;Gt.kMaxLength;L=Gt.Buffer,Dv=Gt.INSPECT_MAX_BYTES,Lv=Gt.kMaxLength});var T=ut(()=>{Ln()});var ar=Z0((F1,U1)=>{x();R();T();k();(function(r,t){typeof F1=="object"&&typeof U1<"u"?U1.exports=t():typeof define=="function"&&define.amd?define(t):r.Stats=t()})(F1,function(){var r=function(){function t(d){return n.appendChild(d.dom),d}function e(d){for(var h=0;h<n.children.length;h++)n.children[h].style.display=h===d?"block":"none";i=d}var i=0,n=document.createElement("div");n.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",n.addEventListener("click",function(d){d.preventDefault(),e(++i%n.children.length)},!1);var s=(performance||Date).now(),o=s,a=0,v=t(new r.Panel("FPS","#0ff","#002")),l=t(new r.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=t(new r.Panel("MB","#f08","#201"));return e(0),{REVISION:16,dom:n,addPanel:t,showPanel:e,begin:function(){s=(performance||Date).now()},end:function(){a++;var d=(performance||Date).now();if(l.update(d-s,200),d>o+1e3&&(v.update(1e3*a/(d-o),100),o=d,a=0,c)){var h=performance.memory;c.update(h.usedJSHeapSize/1048576,h.jsHeapSizeLimit/1048576)}return d},update:function(){s=this.end()},domElement:n,setMode:e}};return r.Panel=function(t,e,i){var n=1/0,s=0,o=Math.round,a=o(window.devicePixelRatio||1),v=80*a,l=48*a,c=3*a,d=2*a,h=3*a,p=15*a,g=74*a,b=30*a,A=document.createElement("canvas");A.width=v,A.height=l,A.style.cssText="width:80px;height:48px";var w=A.getContext("2d");return w.font="bold "+9*a+"px Helvetica,Arial,sans-serif",w.textBaseline="top",w.fillStyle=i,w.fillRect(0,0,v,l),w.fillStyle=e,w.fillText(t,c,d),w.fillRect(h,p,g,b),w.fillStyle=i,w.globalAlpha=.9,w.fillRect(h,p,g,b),{dom:A,update:function(_,S){n=Math.min(n,_),s=Math.max(s,_),w.fillStyle=i,w.globalAlpha=1,w.fillRect(0,0,v,p),w.fillStyle=e,w.fillText(o(_)+" "+t+" ("+o(n)+"-"+o(s)+")",c,d),w.drawImage(A,h+a,p,g-a,b,h,p,g-a,b),w.fillRect(h+g-a,p,a,b),w.fillStyle=i,w.globalAlpha=.9,w.fillRect(h+g-a,p,a,o((1-_/S)*b))}}},r})});var Er=Z0((Ar,j5)=>{x();R();T();k();(function(r,t){typeof j5=="object"&&j5.exports?j5.exports=t():r.nearley=t()})(Ar,function(){function r(v,l,c){return this.id=++r.highestId,this.name=v,this.symbols=l,this.postprocess=c,this}r.highestId=0,r.prototype.toString=function(v){var l=typeof v>"u"?this.symbols.map(a).join(" "):this.symbols.slice(0,v).map(a).join(" ")+" \u25CF "+this.symbols.slice(v).map(a).join(" ");return this.name+" \u2192 "+l};function t(v,l,c,d){this.rule=v,this.dot=l,this.reference=c,this.data=[],this.wantedBy=d,this.isComplete=this.dot===v.symbols.length}t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(v){var l=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return l.left=this,l.right=v,l.isComplete&&(l.data=l.build(),l.right=void 0),l},t.prototype.build=function(){var v=[],l=this;do v.push(l.right.data),l=l.left;while(l.left);return v.reverse(),v},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))};function e(v,l){this.grammar=v,this.index=l,this.states=[],this.wants={},this.scannable=[],this.completed={}}e.prototype.process=function(v){for(var l=this.states,c=this.wants,d=this.completed,h=0;h<l.length;h++){var p=l[h];if(p.isComplete){if(p.finish(),p.data!==s.fail){for(var g=p.wantedBy,b=g.length;b--;){var A=g[b];this.complete(A,p)}if(p.reference===this.index){var w=p.rule.name;(this.completed[w]=this.completed[w]||[]).push(p)}}}else{var w=p.rule.symbols[p.dot];if(typeof w!="string"){this.scannable.push(p);continue}if(c[w]){if(c[w].push(p),d.hasOwnProperty(w))for(var _=d[w],b=0;b<_.length;b++){var S=_[b];this.complete(p,S)}}else c[w]=[p],this.predict(w)}}},e.prototype.predict=function(v){for(var l=this.grammar.byName[v]||[],c=0;c<l.length;c++){var d=l[c],h=this.wants[v],p=new t(d,0,this.index,h);this.states.push(p)}},e.prototype.complete=function(v,l){var c=v.nextState(l);this.states.push(c)};function i(v,l){this.rules=v,this.start=l||this.rules[0].name;var c=this.byName={};this.rules.forEach(function(d){c.hasOwnProperty(d.name)||(c[d.name]=[]),c[d.name].push(d)})}i.fromCompiled=function(d,l){var c=d.Lexer;d.ParserStart&&(l=d.ParserStart,d=d.ParserRules);var d=d.map(function(p){return new r(p.name,p.symbols,p.postprocess)}),h=new i(d,l);return h.lexer=c,h};function n(){this.reset("")}n.prototype.reset=function(v,l){this.buffer=v,this.index=0,this.line=l?l.line:1,this.lastLineBreak=l?-l.col:0},n.prototype.next=function(){if(this.index<this.buffer.length){var v=this.buffer[this.index++];return v===`
2
2
  `&&(this.line+=1,this.lastLineBreak=this.index),{value:v}}},n.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},n.prototype.formatError=function(v,l){var c=this.buffer;if(typeof c=="string"){var d=c.split(`
3
3
  `).slice(Math.max(0,this.line-5),this.line),h=c.indexOf(`
4
4
  `,this.index);h===-1&&(h=c.length);var p=this.index-this.lastLineBreak,g=String(this.line).length;return l+=" at line "+this.line+" col "+p+`:
@@ -9,11 +9,11 @@ var bs=Object.create;var He=Object.defineProperty;var ys=Object.getOwnPropertyDe
9
9
  `,l}else return l+" at index "+(this.index-1);function b(A,w){var _=String(A);return Array(w-_.length+1).join(" ")+_}};function s(v,l,c){if(v instanceof i)var d=v,c=l;else var d=i.fromCompiled(v,l);this.grammar=d,this.options={keepHistory:!1,lexer:d.lexer||new n};for(var h in c||{})this.options[h]=c[h];this.lexer=this.options.lexer,this.lexerState=void 0;var p=new e(d,0),g=this.table=[p];p.wants[d.start]=[],p.predict(d.start),p.process(),this.current=0}s.fail={},s.prototype.feed=function(v){var l=this.lexer;l.reset(v,this.lexerState);for(var c;;){try{if(c=l.next(),!c)break}catch(H){var g=new e(this.grammar,this.current+1);this.table.push(g);var d=new Error(this.reportLexerError(H));throw d.offset=this.current,d.token=H.token,d}var h=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var p=this.current+1,g=new e(this.grammar,p);this.table.push(g);for(var b=c.text!==void 0?c.text:c.value,A=l.constructor===n?c.value:c,w=h.scannable,_=w.length;_--;){var S=w[_],M=S.rule.symbols[S.dot];if(M.test?M.test(A):M.type?M.type===c.type:M.literal===b){var C=S.nextState({data:A,token:c,isToken:!0,reference:p-1});g.states.push(C)}}if(g.process(),g.states.length===0){var d=new Error(this.reportError(c));throw d.offset=this.current,d.token=c,d}this.options.keepHistory&&(h.lexerState=l.save()),this.current++}return h&&(this.lexerState=l.save()),this.results=this.finish(),this},s.prototype.reportLexerError=function(v){var l,c,d=v.token;return d?(l="input "+JSON.stringify(d.text[0])+" (lexer error)",c=this.lexer.formatError(d,"Syntax error")):(l="input (lexer error)",c=v.message),this.reportErrorCommon(c,l)},s.prototype.reportError=function(v){var l=(v.type?v.type+" token: ":"")+JSON.stringify(v.value!==void 0?v.value:v),c=this.lexer.formatError(v,"Syntax error");return this.reportErrorCommon(c,l)},s.prototype.reportErrorCommon=function(v,l){var c=[];c.push(v);var d=this.table.length-2,h=this.table[d],p=h.states.filter(function(b){var A=b.rule.symbols[b.dot];return A&&typeof A!="string"});if(p.length===0)c.push("Unexpected "+l+`. I did not expect any more input. Here is the state of my parse table:
10
10
  `),this.displayStateStack(h.states,c);else{c.push("Unexpected "+l+`. Instead, I was expecting to see one of the following:
11
11
  `);var g=p.map(function(b){return this.buildFirstStateStack(b,[])||[b]},this);g.forEach(function(b){var A=b[0],w=A.rule.symbols[A.dot],_=this.getSymbolDisplay(w);c.push("A "+_+" based on:"),this.displayStateStack(b,c)},this)}return c.push(""),c.join(`
12
- `)},s.prototype.displayStateStack=function(v,l){for(var c,d=0,h=0;h<v.length;h++){var p=v[h],g=p.rule.toString(p.dot);g===c?d++:(d>0&&l.push(" ^ "+d+" more lines identical to this"),d=0,l.push(" "+g)),c=g}},s.prototype.getSymbolDisplay=function(v){return o(v)},s.prototype.buildFirstStateStack=function(v,l){if(l.indexOf(v)!==-1)return null;if(v.wantedBy.length===0)return[v];var c=v.wantedBy[0],d=[v].concat(l),h=this.buildFirstStateStack(c,d);return h===null?null:[v].concat(h)},s.prototype.save=function(){var v=this.table[this.current];return v.lexerState=this.lexerState,v},s.prototype.restore=function(v){var l=v.index;this.current=l,this.table[l]=v,this.table.splice(l+1),this.lexerState=v.lexerState,this.results=this.finish()},s.prototype.rewind=function(v){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[v])},s.prototype.finish=function(){var v=[],l=this.grammar.start,c=this.table[this.table.length-1];return c.states.forEach(function(d){d.rule.name===l&&d.dot===d.rule.symbols.length&&d.reference===0&&d.data!==s.fail&&v.push(d)}),v.map(function(d){return d.data})};function o(v){var l=typeof v;if(l==="string")return v;if(l==="object"){if(v.literal)return JSON.stringify(v.literal);if(v instanceof RegExp)return"character matching "+v;if(v.type)return v.type+" token";if(v.test)return"token matching "+String(v.test);throw new Error("Unknown symbol type: "+v)}}function a(v){var l=typeof v;if(l==="string")return v;if(l==="object"){if(v.literal)return JSON.stringify(v.literal);if(v instanceof RegExp)return v.toString();if(v.type)return"%"+v.type;if(v.test)return"<"+String(v.test)+">";throw new Error("Unknown symbol type: "+v)}}return{Parser:s,Grammar:i,Rule:r}})});var xr=Z0((Th,j5)=>{x();R();T();k();(function(){function r(v){return v[0]}function t(v){if(v==="true")return{type:"boolean",value:!0};if(v==="false")return{type:"boolean",value:!1};let l="bslfdi",c={b:"byte",s:"short",l:"long",f:"float",d:"double",i:"int"},d=v.charAt(v.length-1).toLowerCase();if(l.indexOf(d)!==-1){let b=parseFloat(v.substring(0,v.length-1));return isNaN(b)?{value:v,type:"string"}:{value:b,type:c[d]}}let h=parseFloat(v),p=v.includes("."),g=h>>0===h;return!isNaN(v)&&(p||g)?{value:h,type:p?"double":"int"}:{value:v,type:"string"}}function e(v,l){v[0]!==void 0&&(l[v[0]]=v[1])}function i(v){let l={};e(v[2],l);for(let c in v[3])e(v[3][c][3],l);return{type:"compound",value:l}}function n(v){let l=[v[6]];for(let d in v[7])l.push(v[7][d][3]);return{type:{B:"byteArray",I:"intArray",L:"longArray"}[v[2]],value:{type:l[0].type,value:l.map(d=>d.value)}}}function s(v){let l=[v[2]];for(let c in v[3])l.push(v[3][c][3]);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}function o(v){let l=[];e(v[2],l);for(let c in v[3])e(v[3][c][3],l);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}var a={Lexer:void 0,ParserRules:[{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","wschar"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"_",symbols:["_$ebnf$1"],postprocess:function(v){return null}},{name:"__$ebnf$1",symbols:["wschar"]},{name:"__$ebnf$1",symbols:["__$ebnf$1","wschar"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"__",symbols:["__$ebnf$1"],postprocess:function(v){return null}},{name:"wschar",symbols:[/[ \t\n\v\f]/],postprocess:r},{name:"MAIN",symbols:["_","JVALUE","_"],postprocess:v=>v[1]},{name:"JVALUE",symbols:["JOBJECT"],postprocess:v=>v[0]},{name:"JVALUE",symbols:[{literal:"'"},"_","JOBJECT","_",{literal:"'"}],postprocess:v=>v[2]},{name:"JVALUE",symbols:["JARRAY"],postprocess:v=>v[0]},{name:"JVALUE",symbols:["STRING"],postprocess:v=>v[0]},{name:"JVALUE$string$1",symbols:[{literal:"n"},{literal:"u"},{literal:"l"},{literal:"l"}],postprocess:function(l){return l.join("")}},{name:"JVALUE",symbols:["JVALUE$string$1"],postprocess:v=>null},{name:"JOBJECT",symbols:[{literal:"{"},"_",{literal:"}"}],postprocess:v=>({type:"compound",value:{}})},{name:"JOBJECT$ebnf$1",symbols:[]},{name:"JOBJECT$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","PAIR"]},{name:"JOBJECT$ebnf$1",symbols:["JOBJECT$ebnf$1","JOBJECT$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JOBJECT$ebnf$2$subexpression$1",symbols:["_",{literal:","}]},{name:"JOBJECT$ebnf$2",symbols:["JOBJECT$ebnf$2$subexpression$1"],postprocess:r},{name:"JOBJECT$ebnf$2",symbols:[],postprocess:function(v){return null}},{name:"JOBJECT",symbols:[{literal:"{"},"_","PAIR","JOBJECT$ebnf$1","JOBJECT$ebnf$2",{literal:"}"}],postprocess:i},{name:"JARRAY",symbols:[{literal:"["},"_",{literal:"]"}],postprocess:v=>({type:"list",value:{}})},{name:"JARRAY$ebnf$1",symbols:[]},{name:"JARRAY$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","JVALUE"]},{name:"JARRAY$ebnf$1",symbols:["JARRAY$ebnf$1","JARRAY$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$2$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$2",symbols:["JARRAY$ebnf$2$subexpression$1"],postprocess:r},{name:"JARRAY$ebnf$2",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_",/[BIL]/,"_",{literal:";"},"_","JVALUE","JARRAY$ebnf$1","JARRAY$ebnf$2","_",{literal:"]"}],postprocess:n},{name:"JARRAY$ebnf$3",symbols:[]},{name:"JARRAY$ebnf$3$subexpression$1",symbols:["_",{literal:","},"_","JVALUE"]},{name:"JARRAY$ebnf$3",symbols:["JARRAY$ebnf$3","JARRAY$ebnf$3$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$4$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$4",symbols:["JARRAY$ebnf$4$subexpression$1"],postprocess:r},{name:"JARRAY$ebnf$4",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","JVALUE","JARRAY$ebnf$3","JARRAY$ebnf$4","_",{literal:"]"}],postprocess:s},{name:"JARRAY$ebnf$5",symbols:[]},{name:"JARRAY$ebnf$5$subexpression$1",symbols:["_",{literal:","},"_","PAIR"]},{name:"JARRAY$ebnf$5",symbols:["JARRAY$ebnf$5","JARRAY$ebnf$5$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$6$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$6",symbols:["JARRAY$ebnf$6$subexpression$1"],postprocess:r},{name:"JARRAY$ebnf$6",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","PAIR","JARRAY$ebnf$5","JARRAY$ebnf$6","_",{literal:"]"}],postprocess:o},{name:"PAIR",symbols:["STRING","_",{literal:":"},"_","JVALUE"],postprocess:v=>[v[0].value,v[4]]},{name:"STRING$ebnf$1",symbols:[]},{name:"STRING$ebnf$1$subexpression$1",symbols:[/[^\\"]/]},{name:"STRING$ebnf$1$subexpression$1",symbols:[{literal:"\\"},/["bfnrt\/\\]/]},{name:"STRING$ebnf$1$subexpression$1$string$1",symbols:[{literal:"\\"},{literal:"u"}],postprocess:function(l){return l.join("")}},{name:"STRING$ebnf$1$subexpression$1",symbols:["STRING$ebnf$1$subexpression$1$string$1",/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/]},{name:"STRING$ebnf$1",symbols:["STRING$ebnf$1","STRING$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"STRING",symbols:[{literal:'"'},"STRING$ebnf$1",{literal:'"'}],postprocess:v=>t(JSON.parse(v.flat(3).map(l=>l.replace(`
13
- `,"\\n")).join("")))},{name:"STRING$ebnf$2",symbols:[/[^\"\'}\]:;,\s]/]},{name:"STRING$ebnf$2",symbols:["STRING$ebnf$2",/[^\"\'}\]:;,\s]/],postprocess:function(l){return l[0].concat([l[1]])}},{name:"STRING",symbols:["STRING$ebnf$2"],postprocess:v=>t(v[0].join(""))}],ParserStart:"MAIN"};typeof j5<"u"&&typeof j5.exports<"u"?j5.exports=a:window.grammar=a})()});var fi=Z0((Bh,Cr)=>{x();R();T();k();var Rr=Er(),Ao=xr();function Mr(r){function t(e,i){return i==="compound"?Object.keys(e).reduce(function(n,s){return n[s]=Mr(e[s]),n},{}):i==="list"?Array.isArray(e.value)?e.value.map(function(n){return t(n,e.type)}):[]:e}return t(r.value,r.type)}function Y5({value:r,type:t}){if(t==="compound"){let i=[],n=Object.entries(r);for(let s=0;s<n.length;s++){let o=n[s][0],a=Y5(n[s][1]);o==="string"&&(a=kr(a)),i.push(`${o}:${a}`)}return`{${i.join(",")}}`}else{if(t==="list")return Array.isArray(r.value)?`[${Tr(r)}]`:"[]";if(t==="byteArray"||t==="intArray"||t==="longArray"){let i=xo(t),n=Tr(r);return`[${i}${n}]`}}let e=r+Ro(r,t);return t==="string"&&(e=kr(e)),e}function kr(r){return r=r.replace(/"/g,'\\"'),(/'|{|}|\[|\]|:|;|,|\(|\)|§|=/g.test(r)||r==="")&&(r=`"${r}"`),r}function Tr({value:r,type:t}){let e=Eo(r),i=[];for(let n=0;n<r.length;n++){let s=r[n];s!==void 0&&(s=Y5({value:s,type:t}),e?i.push(`${n}:${s}`):i.push(s))}return i.join(",")}function Eo(r){for(let t=0;t<r.length;t++)if(r[t]===void 0)return!0;return!1}var xo=r=>r.charAt(0).toUpperCase()+";";function Ro(r,t){return t==="double"?r>>0===r?"d":"":{int:"",byte:"b",short:"s",float:"f",long:"l",string:""}[t]}function ko(r){return Y5(Sr(r))}function Sr(r){try{let t=new Rr.Parser(Rr.Grammar.fromCompiled(Ao));return t.feed(r),t.results[0]}catch(t){throw t.message=`Error parsing text '${r}'`,t}}Cr.exports={parse:Sr,simplify:Mr,stringify:Y5,normalize:ko}});var zr={};w5(zr,{camelCase:()=>Po,capitalCase:()=>mi,constantCase:()=>Ho,dotCase:()=>zo,kebabCase:()=>Oo,noCase:()=>Ke,pascalCase:()=>Bo,pascalSnakeCase:()=>Io,pathCase:()=>Do,sentenceCase:()=>Lo,snakeCase:()=>pi,split:()=>hi,splitSeparateNumbers:()=>Ir,trainCase:()=>Fo});function hi(r){let t=r.trim();t=t.replace(To,Pr).replace(Mo,Pr),t=t.replace(Co,"\0");let e=0,i=t.length;for(;t.charAt(e)==="\0";)e++;if(e===i)return[];for(;t.charAt(i-1)==="\0";)i--;return t.slice(e,i).split(/\0/g)}function Ir(r){let t=hi(r);for(let e=0;e<t.length;e++){let i=t[e],n=So.exec(i);if(n){let s=n.index+(n[1]??n[2]).length;t.splice(e,1,i.slice(0,s),i.slice(s))}}return t}function Ke(r,t){let[e,i,n]=he(r,t);return e+i.map(Je(t?.locale)).join(t?.delimiter??" ")+n}function Po(r,t){let[e,i,n]=he(r,t),s=Je(t?.locale),o=qe(t?.locale),a=t?.mergeAmbiguousCharacters?Q5(s,o):Hr(s,o);return e+i.map((v,l)=>l===0?s(v):a(v,l)).join(t?.delimiter??"")+n}function Bo(r,t){let[e,i,n]=he(r,t),s=Je(t?.locale),o=qe(t?.locale),a=t?.mergeAmbiguousCharacters?Q5(s,o):Hr(s,o);return e+i.map(a).join(t?.delimiter??"")+n}function Io(r,t){return mi(r,{delimiter:"_",...t})}function mi(r,t){let[e,i,n]=he(r,t),s=Je(t?.locale),o=qe(t?.locale);return e+i.map(Q5(s,o)).join(t?.delimiter??" ")+n}function Ho(r,t){let[e,i,n]=he(r,t);return e+i.map(qe(t?.locale)).join(t?.delimiter??"_")+n}function zo(r,t){return Ke(r,{delimiter:".",...t})}function Oo(r,t){return Ke(r,{delimiter:"-",...t})}function Do(r,t){return Ke(r,{delimiter:"/",...t})}function Lo(r,t){let[e,i,n]=he(r,t),s=Je(t?.locale),o=qe(t?.locale),a=Q5(s,o);return e+i.map((v,l)=>l===0?a(v):s(v)).join(t?.delimiter??" ")+n}function pi(r,t){return Ke(r,{delimiter:"_",...t})}function Fo(r,t){return mi(r,{delimiter:"-",...t})}function Je(r){return r===!1?t=>t.toLowerCase():t=>t.toLocaleLowerCase(r)}function qe(r){return r===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(r)}function Q5(r,t){return e=>`${t(e[0])}${r(e.slice(1))}`}function Hr(r,t){return(e,i)=>{let n=e[0];return(i>0&&n>="0"&&n<="9"?"_"+n:t(n))+r(e.slice(1))}}function he(r,t={}){let e=t.split??(t.separateNumbers?Ir:hi),i=t.prefixCharacters??Br,n=t.suffixCharacters??Br,s=0,o=r.length;for(;s<r.length;){let a=r.charAt(s);if(!i.includes(a))break;s++}for(;o>s;){let a=o-1,v=r.charAt(a);if(!n.includes(v))break;o=a}return[r.slice(0,s),e(r.slice(s,o)),r.slice(o)]}var To,Mo,So,Co,Pr,Br,gi=ut(()=>{x();R();T();k();To=/([\p{Ll}\d])(\p{Lu})/gu,Mo=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,So=/(\d)\p{Ll}|(\p{L})\d/u,Co=/[^\p{L}\d]+/giu,Pr="$1\0$2",Br=""});var Or=Z0((Gh,Uo)=>{Uo.exports={version:"1.21.4",attackable:["acacia_boat","acacia_chest_boat","allay","armadillo","armor_stand","axolotl","bamboo_chest_raft","bamboo_raft","bat","bee","birch_boat","birch_chest_boat","blaze","bogged","breeze","camel","cat","cave_spider","cherry_boat","cherry_chest_boat","chest_minecart","chicken","cod","command_block_minecart","cow","creaking","creeper","dark_oak_boat","dark_oak_chest_boat","dolphin","donkey","drowned","elder_guardian","end_crystal","ender_dragon","enderman","endermite","evoker","falling_block","fox","frog","furnace_minecart","ghast","giant","glow_item_frame","glow_squid","goat","guardian","hoglin","hopper_minecart","horse","husk","illusioner","iron_golem","item_frame","jungle_boat","jungle_chest_boat","leash_knot","llama","magma_cube","mangrove_boat","mangrove_chest_boat","minecart","mooshroom","mule","oak_boat","oak_chest_boat","ocelot","painting","pale_oak_boat","pale_oak_chest_boat","panda","parrot","phantom","pig","piglin","piglin_brute","pillager","player","polar_bear","pufferfish","rabbit","ravager","salmon","sheep","shulker","shulker_bullet","silverfish","skeleton","skeleton_horse","slime","sniffer","snow_golem","spawner_minecart","spider","spruce_boat","spruce_chest_boat","squid","stray","strider","tadpole","tnt","tnt_minecart","trader_llama","tropical_fish","turtle","vex","villager","vindicator","wandering_trader","warden","wind_charge","witch","wither","wither_skeleton","wolf","zoglin","zombie","zombie_horse","zombie_villager","zombified_piglin"],notAttackable:["area_effect_cloud","arrow","block_display","breeze_wind_charge","dragon_fireball","egg","ender_pearl","evoker_fangs","experience_bottle","experience_orb","eye_of_ender","fireball","firework_rocket","fishing_bobber","interaction","item","item_display","lightning_bolt","llama_spit","marker","ominous_item_spawner","potion","small_fireball","snowball","spectral_arrow","text_display","trident","wither_skull"],entityRenames:{Boat:"oak_boat",EnderCrystal:"end_crystal",EntityHorse:"horse",EyeOfEnderSignal:"eye_of_ender",FallingSand:"falling_block",FireworksRocketEntity:"firework_rocket","Fishing Float":"fishing_bobber","Fishing Hook":"fishing_bobber",LavaSlime:"magma_cube",MinecartRideable:"minecart",Mob:!1,Monster:!1,MushroomCow:"mooshroom",Ozelot:"ocelot",PigZombie:"zombified_piglin",PrimedTnt:"tnt",SnowMan:"snow_golem",ThrownEgg:"egg",ThrownEnderpearl:"ender_pearl",ThrownExpBottle:"experience_bottle",ThrownPotion:"potion",VillagerGolem:"iron_golem",WitherBoss:"wither",XPOrb:"experience_orb",activated_tnt:"tnt",armorstand:"armor_stand",boat:"oak_boat",chest_boat:"oak_chest_boat",commandblock_minecart:"command_block_minecart",creaking_transient:"creaking",ender_crystal:"end_crystal",endercrystal:"end_crystal",evocation_fangs:"evoker_fangs",evocation_illager:"evoker",eye_of_ender_signal:"eye_of_ender",falling_objects:"falling_block",firecharge:"fireball",fireworks_rocket:"firework_rocket",fishing_hook:"fishing_bobber",illusion_illager:"illusioner",item_frames:"item_frame",item_stack:"item",snowman:"snow_golem",thrown_enderpearl:"ender_pearl","thrown_exp bottle":"experience_bottle",thrown_exp_bottle:"experience_bottle",thrown_potion:"potion",tipped_arrow:"arrow",villager_golem:"iron_golem",vindication_illager:"vindicator",xp_bottle:"experience_bottle",xp_orb:"experience_orb",zombie_pigman:"zombified_piglin"}}});var Lr=Z0((Wh,Dr)=>{x();R();T();k();var me=1e3,pe=me*60,ge=pe*60,Kt=ge*24,Go=Kt*7,Wo=Kt*365.25;Dr.exports=function(r,t){t=t||{};var e=typeof r;if(e==="string"&&r.length>0)return No(r);if(e==="number"&&isFinite(r))return t.long?jo(r):Vo(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function No(r){if(r=String(r),!(r.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(t){var e=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return e*Wo;case"weeks":case"week":case"w":return e*Go;case"days":case"day":case"d":return e*Kt;case"hours":case"hour":case"hrs":case"hr":case"h":return e*ge;case"minutes":case"minute":case"mins":case"min":case"m":return e*pe;case"seconds":case"second":case"secs":case"sec":case"s":return e*me;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function Vo(r){var t=Math.abs(r);return t>=Kt?Math.round(r/Kt)+"d":t>=ge?Math.round(r/ge)+"h":t>=pe?Math.round(r/pe)+"m":t>=me?Math.round(r/me)+"s":r+"ms"}function jo(r){var t=Math.abs(r);return t>=Kt?K5(r,t,Kt,"day"):t>=ge?K5(r,t,ge,"hour"):t>=pe?K5(r,t,pe,"minute"):t>=me?K5(r,t,me,"second"):r+" ms"}function K5(r,t,e,i){var n=t>=e*1.5;return Math.round(r/e)+" "+i+(n?"s":"")}});var Ur=Z0((Qh,Fr)=>{x();R();T();k();function Yo(r){e.debug=e,e.default=e,e.coerce=v,e.disable=o,e.enable=n,e.enabled=a,e.humanize=Lr(),e.destroy=l,Object.keys(r).forEach(c=>{e[c]=r[c]}),e.names=[],e.skips=[],e.formatters={};function t(c){let d=0;for(let h=0;h<c.length;h++)d=(d<<5)-d+c.charCodeAt(h),d|=0;return e.colors[Math.abs(d)%e.colors.length]}e.selectColor=t;function e(c){let d,h=null,p,g;function b(...A){if(!b.enabled)return;let w=b,_=Number(new Date),S=_-(d||_);w.diff=S,w.prev=d,w.curr=_,d=_,A[0]=e.coerce(A[0]),typeof A[0]!="string"&&A.unshift("%O");let M=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,(H,B)=>{if(H==="%%")return"%";M++;let I=e.formatters[B];if(typeof I=="function"){let W=A[M];H=I.call(w,W),A.splice(M,1),M--}return H}),e.formatArgs.call(w,A),(w.log||e.log).apply(w,A)}return b.namespace=c,b.useColors=e.useColors(),b.color=e.selectColor(c),b.extend=i,b.destroy=e.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(p!==e.namespaces&&(p=e.namespaces,g=e.enabled(c)),g),set:A=>{h=A}}),typeof e.init=="function"&&e.init(b),b}function i(c,d){let h=e(this.namespace+(typeof d>"u"?":":d)+c);return h.log=this.log,h}function n(c){e.save(c),e.namespaces=c,e.names=[],e.skips=[];let d=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let h of d)h[0]==="-"?e.skips.push(h.slice(1)):e.names.push(h)}function s(c,d){let h=0,p=0,g=-1,b=0;for(;h<c.length;)if(p<d.length&&(d[p]===c[h]||d[p]==="*"))d[p]==="*"?(g=p,b=h,p++):(h++,p++);else if(g!==-1)p=g+1,b++,h=b;else return!1;for(;p<d.length&&d[p]==="*";)p++;return p===d.length}function o(){let c=[...e.names,...e.skips.map(d=>"-"+d)].join(",");return e.enable(""),c}function a(c){for(let d of e.skips)if(s(c,d))return!1;for(let d of e.names)if(s(c,d))return!0;return!1}function v(c){return c instanceof Error?c.stack||c.message:c}function l(){}return e.enable(e.load()),e}Fr.exports=Yo});var Gr=Z0((J0,J5)=>{x();R();T();k();J0.formatArgs=Ko;J0.save=Jo;J0.load=qo;J0.useColors=Qo;J0.storage=Zo();J0.destroy=(()=>{let r=!1;return()=>{r||(r=!0)}})();J0.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Qo(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ko(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+J5.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;r.splice(1,0,t,"color: inherit");let e=0,i=0;r[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(e++,n==="%c"&&(i=e))}),r.splice(i,0,t)}J0.log=console.debug||console.log||(()=>{});function Jo(r){try{r?J0.storage.setItem("debug",r):J0.storage.removeItem("debug")}catch{}}function qo(){let r;try{r=J0.storage.getItem("debug")||J0.storage.getItem("DEBUG")}catch{}return!r&&typeof D<"u"&&"env"in D&&(r=D.env.DEBUG),r}function Zo(){try{return localStorage}catch{}}J5.exports=Ur()(J0);var{formatters:Xo}=J5.exports;Xo.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Wr=Z0(be=>{"use strict";x();R();T();k();var $o=be&&be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(be,"__esModule",{value:!0});be.debug=void 0;var ta=$o(Gr());be.debug=(0,ta.default)("mineflayer-mouse")});var Yr=Z0(Jt=>{"use strict";x();R();T();k();var ea=Jt&&Jt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.isEntityAttackable=void 0;Jt.isArmorStandAttackable=jr;var Nr=(gi(),Rs(zr)),Ze=ea(Or()),ia=Wr(),Vr=Object.fromEntries([...Ze.default.attackable,...Ze.default.notAttackable].map(r=>[r,!0])),na=Ze.default.attackable,ra=(r,t)=>{if(!t.name)throw new Error("Entity has no name");let e=r.entitiesByName[t.name],n=Ze.default.entityRenames[t.name]||Ze.default.entityRenames[(0,Nr.snakeCase)(t.name)]||t.name;if(!Vr[n]&&(n=(0,Nr.snakeCase)(n),!Vr[n]))return(0,ia.debug)(`Cannot find entity ${n} in entityData.json`),!1;let s=sa[n];return s?s(t,e):na.includes(n)};Jt.isEntityAttackable=ra;var sa={armor_stand:jr};function jr(r,t){let e=Number(r.metadata?.[t.metadataKeys?.indexOf("client_flags")??14]??0),i=(e&16)!==0,n=(e&8)!==0,s=(e&4)!==0,o=(e&1)!==0;return!i}});var M6=Z0((R_,E8)=>{E8.exports={version:"1.20.4","1.8":{blocks:[["wood_planks","planks"],["large_flowers","double_plant"]]},"1.12":{items:[["totem","totem_of_undying"]]},"1.13":{blocks:[["grass","grass_block"],["planks","oak_planks"],["planks","spruce_planks"],["planks","birch_planks"],["planks","jungle_planks"],["planks","acacia_planks"],["planks","dark_oak_planks"],["sapling","oak_sapling"],["sapling","spruce_sapling"],["sapling","birch_sapling"],["sapling","jungle_sapling"],["sapling","acacia_sapling"],["sapling","dark_oak_sapling"],["sand","red_sand"],["log","oak_log"],["log","spruce_log"],["log","birch_log"],["log","jungle_log"],["log","oak_wood"],["log","spruce_wood"],["log","birch_wood"],["log","jungle_wood"],["leaves","oak_leaves"],["leaves","spruce_leaves"],["leaves","birch_leaves"],["leaves","jungle_leaves"],["sponge","wet_sponge"],["sandstone","chiseled_sandstone"],["sandstone","cut_sandstone"],["noteblock","note_block"],["bed","red_bed"],["golden_rail","powered_rail"],["web","cobweb"],["tallgrass","dead_bush"],["tallgrass","grass"],["tallgrass","fern"],["deadbush","dead_bush"],["wool","white_wool"],["wool","orange_wool"],["wool","magenta_wool"],["wool","light_blue_wool"],["wool","yellow_wool"],["wool","lime_wool"],["wool","pink_wool"],["wool","gray_wool"],["wool","light_gray_wool"],["wool","cyan_wool"],["wool","purple_wool"],["wool","blue_wool"],["wool","brown_wool"],["wool","green_wool"],["wool","red_wool"],["wool","black_wool"],["piston_extension","moving_piston"],["yellow_flower","dandelion"],["red_flower","poppy"],["red_flower","blue_orchid"],["red_flower","allium"],["red_flower","azure_bluet"],["red_flower","red_tulip"],["red_flower","orange_tulip"],["red_flower","white_tulip"],["red_flower","pink_tulip"],["red_flower","oxeye_daisy"],["double_stone_slab","stone_slab"],["double_stone_slab","sandstone_slab"],["double_stone_slab","petrified_oak_slab"],["double_stone_slab","cobblestone_slab"],["double_stone_slab","brick_slab"],["double_stone_slab","stone_brick_slab"],["double_stone_slab","nether_brick_slab"],["double_stone_slab","quartz_slab"],["double_stone_slab","smooth_stone"],["double_stone_slab","smooth_sandstone"],["double_stone_slab","smooth_quartz"],["stone_slab","sandstone_slab"],["stone_slab","petrified_oak_slab"],["stone_slab","cobblestone_slab"],["stone_slab","brick_slab"],["stone_slab","stone_brick_slab"],["stone_slab","nether_brick_slab"],["stone_slab","quartz_slab"],["brick_block","bricks"],["mob_spawner","spawner"],["lit_furnace","furnace"],["standing_sign","sign"],["wooden_door","oak_door"],["stone_stairs","cobblestone_stairs"],["wooden_pressure_plate","oak_pressure_plate"],["lit_redstone_ore","redstone_ore"],["unlit_redstone_torch","redstone_wall_torch"],["unlit_redstone_torch","redstone_torch"],["redstone_torch","redstone_wall_torch"],["snow_layer","snow"],["snow","snow_block"],["reeds","sugar_cane"],["fence","oak_fence"],["pumpkin","carved_pumpkin"],["portal","nether_portal"],["lit_pumpkin","jack_o_lantern"],["unpowered_repeater","repeater"],["powered_repeater","repeater"],["stained_glass","white_stained_glass"],["stained_glass","orange_stained_glass"],["stained_glass","magenta_stained_glass"],["stained_glass","light_blue_stained_glass"],["stained_glass","yellow_stained_glass"],["stained_glass","lime_stained_glass"],["stained_glass","pink_stained_glass"],["stained_glass","gray_stained_glass"],["stained_glass","light_gray_stained_glass"],["stained_glass","cyan_stained_glass"],["stained_glass","purple_stained_glass"],["stained_glass","blue_stained_glass"],["stained_glass","brown_stained_glass"],["stained_glass","green_stained_glass"],["stained_glass","red_stained_glass"],["stained_glass","black_stained_glass"],["trapdoor","oak_trapdoor"],["monster_egg","infested_stone"],["monster_egg","infested_cobblestone"],["monster_egg","infested_stone_bricks"],["monster_egg","infested_mossy_stone_bricks"],["monster_egg","infested_cracked_stone_bricks"],["monster_egg","infested_chiseled_stone_bricks"],["stonebrick","stone_bricks"],["stonebrick","mossy_stone_bricks"],["stonebrick","cracked_stone_bricks"],["stonebrick","chiseled_stone_bricks"],["brown_mushroom_block","mushroom_stem"],["red_mushroom_block","mushroom_stem"],["melon_block","melon"],["fence_gate","oak_fence_gate"],["waterlily","lily_pad"],["nether_brick","nether_bricks"],["lit_redstone_lamp","redstone_lamp"],["double_wooden_slab","oak_slab"],["double_wooden_slab","spruce_slab"],["double_wooden_slab","birch_slab"],["double_wooden_slab","jungle_slab"],["double_wooden_slab","acacia_slab"],["double_wooden_slab","dark_oak_slab"],["wooden_slab","oak_slab"],["wooden_slab","spruce_slab"],["wooden_slab","birch_slab"],["wooden_slab","jungle_slab"],["wooden_slab","acacia_slab"],["wooden_slab","dark_oak_slab"],["cobblestone_wall","mossy_cobblestone_wall"],["flower_pot","potted_poppy"],["flower_pot","potted_dandelion"],["flower_pot","potted_oak_sapling"],["flower_pot","potted_spruce_sapling"],["flower_pot","potted_birch_sapling"],["flower_pot","potted_jungle_sapling"],["flower_pot","potted_red_mushroom"],["flower_pot","potted_brown_mushroom"],["flower_pot","potted_cactus"],["flower_pot","potted_dead_bush"],["flower_pot","potted_fern"],["flower_pot","potted_acacia_sapling"],["flower_pot","potted_dark_oak_sapling"],["flower_pot","potted_blue_orchid"],["flower_pot","potted_allium"],["wooden_button","oak_button"],["skull","skeleton_skull"],["skull","skeleton_wall_skull"],["anvil","chipped_anvil"],["anvil","damaged_anvil"],["unpowered_comparator","comparator"],["powered_comparator","comparator"],["quartz_ore","nether_quartz_ore"],["quartz_block","chiseled_quartz_block"],["quartz_block","quartz_pillar"],["stained_hardened_clay","white_terracotta"],["stained_hardened_clay","orange_terracotta"],["stained_hardened_clay","magenta_terracotta"],["stained_hardened_clay","light_blue_terracotta"],["stained_hardened_clay","yellow_terracotta"],["stained_hardened_clay","lime_terracotta"],["stained_hardened_clay","pink_terracotta"],["stained_hardened_clay","gray_terracotta"],["stained_hardened_clay","light_gray_terracotta"],["stained_hardened_clay","cyan_terracotta"],["stained_hardened_clay","purple_terracotta"],["stained_hardened_clay","blue_terracotta"],["stained_hardened_clay","brown_terracotta"],["stained_hardened_clay","green_terracotta"],["stained_hardened_clay","red_terracotta"],["stained_hardened_clay","black_terracotta"],["stained_glass_pane","white_stained_glass_pane"],["stained_glass_pane","orange_stained_glass_pane"],["stained_glass_pane","magenta_stained_glass_pane"],["stained_glass_pane","light_blue_stained_glass_pane"],["stained_glass_pane","yellow_stained_glass_pane"],["stained_glass_pane","lime_stained_glass_pane"],["stained_glass_pane","pink_stained_glass_pane"],["stained_glass_pane","gray_stained_glass_pane"],["stained_glass_pane","light_gray_stained_glass_pane"],["stained_glass_pane","cyan_stained_glass_pane"],["stained_glass_pane","purple_stained_glass_pane"],["stained_glass_pane","blue_stained_glass_pane"],["stained_glass_pane","brown_stained_glass_pane"],["stained_glass_pane","green_stained_glass_pane"],["stained_glass_pane","red_stained_glass_pane"],["stained_glass_pane","black_stained_glass_pane"],["leaves2","acacia_leaves"],["leaves2","dark_oak_leaves"],["log2","acacia_log"],["log2","dark_oak_log"],["log2","acacia_wood"],["log2","dark_oak_wood"],["slime","slime_block"],["prismarine","prismarine_bricks"],["prismarine","dark_prismarine"],["carpet","white_carpet"],["carpet","orange_carpet"],["carpet","magenta_carpet"],["carpet","light_blue_carpet"],["carpet","yellow_carpet"],["carpet","lime_carpet"],["carpet","pink_carpet"],["carpet","gray_carpet"],["carpet","light_gray_carpet"],["carpet","cyan_carpet"],["carpet","purple_carpet"],["carpet","blue_carpet"],["carpet","brown_carpet"],["carpet","green_carpet"],["carpet","red_carpet"],["carpet","black_carpet"],["hardened_clay","terracotta"],["double_plant","sunflower"],["double_plant","lilac"],["double_plant","tall_grass"],["double_plant","large_fern"],["double_plant","rose_bush"],["double_plant","peony"],["standing_banner","white_banner"],["wall_banner","white_wall_banner"],["daylight_detector_inverted","daylight_detector"],["red_sandstone","chiseled_red_sandstone"],["red_sandstone","cut_red_sandstone"],["double_stone_slab2","red_sandstone_slab"],["double_stone_slab2","smooth_red_sandstone"],["stone_slab2","red_sandstone_slab"],["purpur_double_slab","purpur_slab"],["end_bricks","end_stone_bricks"],["magma","magma_block"],["red_nether_brick","red_nether_bricks"],["concrete","white_concrete"],["concrete","orange_concrete"],["concrete","magenta_concrete"],["concrete","light_blue_concrete"],["concrete","yellow_concrete"],["concrete","lime_concrete"],["concrete","pink_concrete"],["concrete","gray_concrete"],["concrete","light_gray_concrete"],["concrete","cyan_concrete"],["concrete","purple_concrete"],["concrete","blue_concrete"],["concrete","brown_concrete"],["concrete","green_concrete"],["concrete","red_concrete"],["concrete","black_concrete"],["concrete_powder","white_concrete_powder"],["concrete_powder","orange_concrete_powder"],["concrete_powder","magenta_concrete_powder"],["concrete_powder","light_blue_concrete_powder"],["concrete_powder","yellow_concrete_powder"],["concrete_powder","lime_concrete_powder"],["concrete_powder","pink_concrete_powder"],["concrete_powder","gray_concrete_powder"],["concrete_powder","light_gray_concrete_powder"],["concrete_powder","cyan_concrete_powder"],["concrete_powder","purple_concrete_powder"],["concrete_powder","blue_concrete_powder"],["concrete_powder","brown_concrete_powder"],["concrete_powder","green_concrete_powder"],["concrete_powder","red_concrete_powder"],["concrete_powder","black_concrete_powder"]],items:[["stone","granite"],["stone","polished_granite"],["stone","diorite"],["stone","polished_diorite"],["stone","andesite"],["stone","polished_andesite"],["grass","grass_block"],["dirt","coarse_dirt"],["dirt","podzol"],["planks","oak_planks"],["planks","spruce_planks"],["planks","birch_planks"],["planks","jungle_planks"],["planks","acacia_planks"],["planks","dark_oak_planks"],["sapling","oak_sapling"],["sapling","spruce_sapling"],["sapling","birch_sapling"],["sapling","jungle_sapling"],["sapling","acacia_sapling"],["sapling","dark_oak_sapling"],["sand","red_sand"],["log","oak_log"],["log","spruce_log"],["log","birch_log"],["log","jungle_log"],["leaves","oak_leaves"],["leaves","spruce_leaves"],["leaves","birch_leaves"],["leaves","jungle_leaves"],["sponge","wet_sponge"],["sandstone","chiseled_sandstone"],["sandstone","cut_sandstone"],["noteblock","note_block"],["golden_rail","powered_rail"],["web","cobweb"],["tallgrass","grass"],["tallgrass","fern"],["deadbush","dead_bush"],["wool","white_wool"],["wool","orange_wool"],["wool","magenta_wool"],["wool","light_blue_wool"],["wool","yellow_wool"],["wool","lime_wool"],["wool","pink_wool"],["wool","gray_wool"],["wool","light_gray_wool"],["wool","cyan_wool"],["wool","purple_wool"],["wool","blue_wool"],["wool","brown_wool"],["wool","green_wool"],["wool","red_wool"],["wool","black_wool"],["yellow_flower","dandelion"],["red_flower","poppy"],["red_flower","blue_orchid"],["red_flower","allium"],["red_flower","azure_bluet"],["red_flower","red_tulip"],["red_flower","orange_tulip"],["red_flower","white_tulip"],["red_flower","pink_tulip"],["red_flower","oxeye_daisy"],["stone_slab","sandstone_slab"],["stone_slab","cobblestone_slab"],["stone_slab","brick_slab"],["stone_slab","stone_brick_slab"],["stone_slab","nether_brick_slab"],["stone_slab","quartz_slab"],["brick_block","bricks"],["mob_spawner","spawner"],["stone_stairs","cobblestone_stairs"],["wooden_pressure_plate","oak_pressure_plate"],["snow_layer","snow"],["snow","snow_block"],["fence","oak_fence"],["pumpkin","carved_pumpkin"],["lit_pumpkin","jack_o_lantern"],["stained_glass","white_stained_glass"],["stained_glass","orange_stained_glass"],["stained_glass","magenta_stained_glass"],["stained_glass","light_blue_stained_glass"],["stained_glass","yellow_stained_glass"],["stained_glass","lime_stained_glass"],["stained_glass","pink_stained_glass"],["stained_glass","gray_stained_glass"],["stained_glass","light_gray_stained_glass"],["stained_glass","cyan_stained_glass"],["stained_glass","purple_stained_glass"],["stained_glass","blue_stained_glass"],["stained_glass","brown_stained_glass"],["stained_glass","green_stained_glass"],["stained_glass","red_stained_glass"],["stained_glass","black_stained_glass"],["trapdoor","oak_trapdoor"],["monster_egg","infested_stone"],["monster_egg","infested_cobblestone"],["monster_egg","infested_stone_bricks"],["monster_egg","infested_mossy_stone_bricks"],["monster_egg","infested_cracked_stone_bricks"],["monster_egg","infested_chiseled_stone_bricks"],["stonebrick","stone_bricks"],["stonebrick","mossy_stone_bricks"],["stonebrick","cracked_stone_bricks"],["stonebrick","chiseled_stone_bricks"],["melon_block","melon"],["fence_gate","oak_fence_gate"],["waterlily","lily_pad"],["nether_brick","nether_bricks"],["wooden_slab","oak_slab"],["wooden_slab","spruce_slab"],["wooden_slab","birch_slab"],["wooden_slab","jungle_slab"],["wooden_slab","acacia_slab"],["wooden_slab","dark_oak_slab"],["cobblestone_wall","mossy_cobblestone_wall"],["wooden_button","oak_button"],["anvil","chipped_anvil"],["anvil","damaged_anvil"],["quartz_ore","nether_quartz_ore"],["quartz_block","chiseled_quartz_block"],["quartz_block","quartz_pillar"],["stained_hardened_clay","white_terracotta"],["stained_hardened_clay","orange_terracotta"],["stained_hardened_clay","magenta_terracotta"],["stained_hardened_clay","light_blue_terracotta"],["stained_hardened_clay","yellow_terracotta"],["stained_hardened_clay","lime_terracotta"],["stained_hardened_clay","pink_terracotta"],["stained_hardened_clay","gray_terracotta"],["stained_hardened_clay","light_gray_terracotta"],["stained_hardened_clay","cyan_terracotta"],["stained_hardened_clay","purple_terracotta"],["stained_hardened_clay","blue_terracotta"],["stained_hardened_clay","brown_terracotta"],["stained_hardened_clay","green_terracotta"],["stained_hardened_clay","red_terracotta"],["stained_hardened_clay","black_terracotta"],["stained_glass_pane","white_stained_glass_pane"],["stained_glass_pane","orange_stained_glass_pane"],["stained_glass_pane","magenta_stained_glass_pane"],["stained_glass_pane","light_blue_stained_glass_pane"],["stained_glass_pane","yellow_stained_glass_pane"],["stained_glass_pane","lime_stained_glass_pane"],["stained_glass_pane","pink_stained_glass_pane"],["stained_glass_pane","gray_stained_glass_pane"],["stained_glass_pane","light_gray_stained_glass_pane"],["stained_glass_pane","cyan_stained_glass_pane"],["stained_glass_pane","purple_stained_glass_pane"],["stained_glass_pane","blue_stained_glass_pane"],["stained_glass_pane","brown_stained_glass_pane"],["stained_glass_pane","green_stained_glass_pane"],["stained_glass_pane","red_stained_glass_pane"],["stained_glass_pane","black_stained_glass_pane"],["leaves2","acacia_leaves"],["leaves2","dark_oak_leaves"],["log2","acacia_log"],["log2","dark_oak_log"],["slime","slime_block"],["prismarine","prismarine_bricks"],["prismarine","dark_prismarine"],["carpet","white_carpet"],["carpet","orange_carpet"],["carpet","magenta_carpet"],["carpet","light_blue_carpet"],["carpet","yellow_carpet"],["carpet","lime_carpet"],["carpet","pink_carpet"],["carpet","gray_carpet"],["carpet","light_gray_carpet"],["carpet","cyan_carpet"],["carpet","purple_carpet"],["carpet","blue_carpet"],["carpet","brown_carpet"],["carpet","green_carpet"],["carpet","red_carpet"],["carpet","black_carpet"],["hardened_clay","terracotta"],["double_plant","sunflower"],["double_plant","lilac"],["double_plant","tall_grass"],["double_plant","large_fern"],["double_plant","rose_bush"],["double_plant","peony"],["red_sandstone","chiseled_red_sandstone"],["red_sandstone","cut_red_sandstone"],["stone_slab2","red_sandstone_slab"],["end_bricks","end_stone_bricks"],["magma","magma_block"],["red_nether_brick","red_nether_bricks"],["silver_shulker_box","light_gray_shulker_box"],["silver_glazed_terracotta","light_gray_glazed_terracotta"],["concrete","white_concrete"],["concrete","orange_concrete"],["concrete","magenta_concrete"],["concrete","light_blue_concrete"],["concrete","yellow_concrete"],["concrete","lime_concrete"],["concrete","pink_concrete"],["concrete","gray_concrete"],["concrete","light_gray_concrete"],["concrete","cyan_concrete"],["concrete","purple_concrete"],["concrete","blue_concrete"],["concrete","brown_concrete"],["concrete","green_concrete"],["concrete","red_concrete"],["concrete","black_concrete"],["concrete_powder","white_concrete_powder"],["concrete_powder","orange_concrete_powder"],["concrete_powder","magenta_concrete_powder"],["concrete_powder","light_blue_concrete_powder"],["concrete_powder","yellow_concrete_powder"],["concrete_powder","lime_concrete_powder"],["concrete_powder","pink_concrete_powder"],["concrete_powder","gray_concrete_powder"],["concrete_powder","light_gray_concrete_powder"],["concrete_powder","cyan_concrete_powder"],["concrete_powder","purple_concrete_powder"],["concrete_powder","blue_concrete_powder"],["concrete_powder","brown_concrete_powder"],["concrete_powder","green_concrete_powder"],["concrete_powder","red_concrete_powder"],["concrete_powder","black_concrete_powder"],["coal","charcoal"],["golden_apple","enchanted_golden_apple"],["wooden_door","oak_door"],["boat","oak_boat"],["reeds","sugar_cane"],["fish","cod"],["fish","salmon"],["fish","tropical_fish"],["fish","pufferfish"],["cooked_fish","cooked_cod"],["cooked_fish","cooked_salmon"],["dye","ink_sac"],["dye","rose_red"],["dye","cactus_green"],["dye","cocoa_beans"],["dye","lapis_lazuli"],["dye","purple_dye"],["dye","cyan_dye"],["dye","light_gray_dye"],["dye","gray_dye"],["dye","pink_dye"],["dye","lime_dye"],["dye","dandelion_yellow"],["dye","light_blue_dye"],["dye","magenta_dye"],["dye","orange_dye"],["dye","bone_meal"],["bed","white_bed"],["bed","orange_bed"],["bed","magenta_bed"],["bed","light_blue_bed"],["bed","yellow_bed"],["bed","lime_bed"],["bed","pink_bed"],["bed","gray_bed"],["bed","light_gray_bed"],["bed","cyan_bed"],["bed","purple_bed"],["bed","blue_bed"],["bed","brown_bed"],["bed","green_bed"],["bed","red_bed"],["bed","black_bed"],["melon","melon_slice"],["speckled_melon","glistering_melon_slice"],["spawn_egg","pig_spawn_egg"],["skull","skeleton_skull"],["skull","wither_skeleton_skull"],["skull","zombie_head"],["skull","player_head"],["skull","creeper_head"],["skull","dragon_head"],["fireworks","firework_rocket"],["firework_charge","firework_star"],["netherbrick","nether_brick"],["banner","black_banner"],["banner","red_banner"],["banner","green_banner"],["banner","brown_banner"],["banner","blue_banner"],["banner","purple_banner"],["banner","cyan_banner"],["banner","light_gray_banner"],["banner","gray_banner"],["banner","pink_banner"],["banner","lime_banner"],["banner","yellow_banner"],["banner","light_blue_banner"],["banner","magenta_banner"],["banner","orange_banner"],["banner","white_banner"],["chorus_fruit_popped","popped_chorus_fruit"],["record_13","music_disc_13"],["record_cat","music_disc_cat"],["record_blocks","music_disc_blocks"],["record_chirp","music_disc_chirp"],["record_far","music_disc_far"],["record_mall","music_disc_mall"],["record_mellohi","music_disc_mellohi"],["record_stal","music_disc_stal"],["record_strad","music_disc_strad"],["record_ward","music_disc_ward"],["record_11","music_disc_11"],["record_wait","music_disc_wait"]]},"1.14":{blocks:[["sign","oak_sign"],["wall_sign","oak_wall_sign"]],items:[["sign","oak_sign"],["rose_red","red_dye"],["cactus_green","green_dye"],["dandelion_yellow","yellow_dye"]]},"1.15.2":{blocks:[],items:[]},"1.16.1":{blocks:[],items:[["zombie_pigman_spawn_egg","zombified_piglin_spawn_egg"]]},"1.16.2":{blocks:[],items:[]},"1.17":{blocks:[["grass_path","dirt_path"]],items:[["grass_path","dirt_path"]]},"1.18":{blocks:[],items:[]},"1.19":{blocks:[],items:[]},"1.19.3":{blocks:[],items:[]},"1.19.4":{blocks:[],items:[]},"1.20":{blocks:[],items:[["pottery_shard_archer","archer_pottery_sherd"],["pottery_shard_prize","prize_pottery_sherd"],["pottery_shard_arms_up","arms_up_pottery_sherd"],["pottery_shard_skull","skull_pottery_sherd"]]},"1.16":{items:[["zombie_pigman_spawn_egg","zombified_piglin_spawn_egg"]]},"1.20.3":{blocks:[["grass","short_grass"]],items:[["grass","short_grass"]]}}});var S6=Z0(l1=>{"use strict";x();R();T();k();Object.defineProperty(l1,"__esModule",{value:!0});l1.versionToNumber=void 0;var x8=r=>{let[t,e="0",i="0"]=r.split(".");return+`${t.padStart(2,"0")}${parseInt(e).toString().padStart(2,"0")}${parseInt(i).toString().padStart(2,"0")}`};l1.versionToNumber=x8});var P6=Z0(Re=>{"use strict";x();R();T();k();var R8=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0});Re.getRenamedData=void 0;var C6=R8(M6()),Pt=S6(),k8=(r,t,e,i)=>{let n=(0,Pt.versionToNumber)(e),s=(0,Pt.versionToNumber)(i),o=n<s?1:-1,a=o>0?1:0,v=t,l=Object.keys(C6.default).sort((h,p)=>o*((0,Pt.versionToNumber)(h)-(0,Pt.versionToNumber)(p))),c=o>0?s:n,d=o>0?n:s;for(let h of l.filter(p=>(0,Pt.versionToNumber)(p)<=c&&(0,Pt.versionToNumber)(p)>=d)){if(o>0&&(0,Pt.versionToNumber)(h)>=c||o<0&&(0,Pt.versionToNumber)(h)<=d)break;let p=C6.default[h][r];if(p)for(let g of p){let b=g[a],A=g[1-a];if(Array.isArray(v))v.includes(A)&&(v=v.map(w=>w===A?b:w));else if(v===A){v=b;break}}}return v};Re.getRenamedData=k8});var W6={};w5(W6,{applyWorldGeometryExport:()=>O8,createMeshesFromExport:()=>U6,downloadWorldGeometry:()=>Yi,exportWorldGeometry:()=>F6,loadTextureFromDataUrl:()=>G6,loadWorldGeometryFromUrl:()=>H8});import*as R0 from"three";function F6(r,t,e,i=!1){let n=[];for(let[o,a]of Object.entries(r.sectionObjects)){let v=a.children.find(A=>A.name==="mesh");if(!v?.geometry)continue;let{geometry:l}=v,c=l.getAttribute("position"),d=l.getAttribute("normal"),h=l.getAttribute("color"),p=l.getAttribute("uv"),g=l.index;if(!c||!g)continue;let b=r.sceneOrigin.getWorldPosition(v);n.push({key:o,position:{x:b?.x??r.sceneOrigin.toWorldX(v.position.x),y:b?.y??r.sceneOrigin.toWorldY(v.position.y),z:b?.z??r.sceneOrigin.toWorldZ(v.position.z)},geometry:{positions:[...c.array],normals:d?[...d.array]:[],colors:h?[...h.array]:[],uvs:p?[...p.array]:[],indices:[...g.array]}})}let s={version:r.version??"unknown",exportedAt:new Date().toISOString(),camera:{position:t,rotation:e},sections:n};if(i&&r.material.map){let o=document.createElement("canvas"),a=r.material.map,{image:v}=a;v&&(o.width=v.width,o.height=v.height,o.getContext("2d").drawImage(v,0,0),s.textureAtlasDataUrl=o.toDataURL("image/png"))}return s}function Yi(r,t,e,i="world-geometry.json",n=!1){let s=F6(r,t,e,n),o=JSON.stringify(s),a=new Blob([o],{type:"application/json"}),v=URL.createObjectURL(a),l=document.createElement("a");l.href=v,l.download=i,l.click(),URL.revokeObjectURL(v)}async function H8(r){let t=await fetch(r);if(!t.ok)throw new Error(`Failed to fetch world geometry: ${t.statusText}`);return t.json()}function U6(r,t){let e=[];for(let i of r.sections){let n=new R0.BufferGeometry;n.setAttribute("position",new R0.Float32BufferAttribute(i.geometry.positions,3)),i.geometry.normals.length&&n.setAttribute("normal",new R0.Float32BufferAttribute(i.geometry.normals,3)),i.geometry.colors.length&&n.setAttribute("color",new R0.Float32BufferAttribute(i.geometry.colors,3)),i.geometry.uvs.length&&n.setAttribute("uv",new R0.Float32BufferAttribute(i.geometry.uvs,2));let o=Math.max(...i.geometry.indices)>65535?Uint32Array:Uint16Array;n.setIndex(new R0.BufferAttribute(new o(i.geometry.indices),1));let a=new R0.Mesh(n,t);a.position.set(i.position.x,i.position.y,i.position.z),a.name="mesh";let v=new R0.Group;v.name="chunk",v.add(a),e.push(v)}return e}async function G6(r){return new Promise((t,e)=>{let i=new Image;i.onload=()=>{let n=new R0.Texture(i);n.magFilter=R0.NearestFilter,n.minFilter=R0.NearestFilter,n.needsUpdate=!0,n.flipY=!1,t(n)},i.onerror=e,i.src=r})}async function O8(r,t){let{scene:e,renderUpdateEmitter:i,material:n}=r,s=e.getObjectByName(L6);s&&(e.remove(s),z8(s));let o=!!t.textureAtlasDataUrl,a;if(o&&t.textureAtlasDataUrl){let c=await G6(t.textureAtlasDataUrl);a=new R0.MeshLambertMaterial({map:c,vertexColors:!0,transparent:!0,alphaTest:.1}),a.name="geometry-export-material"}else a=n;let v=U6(t,a),l=new R0.Group;l.name=L6,o&&(l.userData.geometryExportMaterial=a);for(let c of v)l.add(c);return e.add(l),i.emit("update"),v.length}var L6,z8,Qi=ut(()=>{"use strict";x();R();T();k();L6="geometry-export-root";z8=r=>{r.traverse(e=>{e.isMesh&&e.geometry?.dispose()});let t=r.userData?.geometryExportMaterial;t&&(t.map?.dispose?.(),t.dispose?.())}});x();R();T();k();x();R();T();k();x();R();T();k();x();R();T();k();import{proxy as Ln}from"valtio";var De={paused:!1,showChunkBorders:!1,enableDebugOverlay:!1,debugWasmPerf:!1,debugModelVariant:void 0,futuristicReveal:!1,wasmMesher:!1,mesherWorkers:1,addChunksBatchWaitTime:200,_experimentalSmoothChunkLoading:!0,_renderByChunks:!1,autoLowerRenderDistance:!1,disableMesherConversionCache:!1,shadingTheme:"high-contrast",cardinalLight:"default",dayCycle:!0,smoothLighting:!0,enableLighting:!0,starfield:!0,defaultSkybox:!0,renderEntities:!0,extraBlockRenderers:!0,foreground:!0,fov:75,volume:1,showHand:!1,viewBobbing:!1,handRenderer:"vanilla",renderEars:!0,highlightBlockColor:"blue",fetchPlayerSkins:!0,skinTexturesProxy:void 0,vrSupport:!0,vrPageGameRendering:!0,clipWorldBelowY:void 0,isPlayground:!1,instantCameraUpdate:!1,isRaining:!1,moduleStates:{}},Fn={fpsLimit:void 0,powerPreference:void 0,sceneBackground:"lightblue",timeoutRendering:!1},Zv=(r={})=>Ln({...De,...r}),Wt=()=>({reactive:Ln({world:{chunksLoaded:new Set,heightmaps:new Map,allChunksLoaded:!1,mesherWork:!1,intersectMedia:null},renderer:"...",preventEscapeMenu:!1}),nonReactive:{fps:0,worstRenderTime:0,avgRenderTime:0,world:{chunksLoaded:new Set,chunksTotalNumber:0},renderer:{timeline:{live:[],frozen:[],lastSecond:[]}}}});x();R();T();k();import{proxy as Ss}from"valtio";var H1=()=>Ss({playerSkin:void 0,inWater:!1,waterBreathing:!1,backgroundColor:[0,0,0],ambientLight:0,directionalLight:0,eyeHeight:0,gameMode:void 0,lookingAtBlock:void 0,diggingBlock:void 0,movementState:"NOT_MOVING",onGround:!0,sneaking:!1,flying:!1,sprinting:!1,walkDist:0,prevWalkDist:0,bob:0,prevBob:0,itemUsageTicks:0,username:"",onlineMode:!1,cardinalLight:"default",lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,cameraSpectatingEntity:void 0,team:void 0}),Un=r=>({isSpectator(){return r.gameMode==="spectator"},isSpectatingEntity(){return r.cameraSpectatingEntity!==void 0&&r.gameMode==="spectator"},isThirdPerson(){return this.isSpectatingEntity()?!1:r.perspective==="third_person_back"||r.perspective==="third_person_front"}}),Gn=()=>({reactive:H1()});x();R();T();k();import{Vec3 as Vs}from"vec3";import{proxy as jn}from"valtio";x();R();T();k();x();R();T();k();x();R();T();k();x();R();T();k();var R5={},Wn=!1;function Cs(){if(Wn)return R5;Wn=!0;var r=typeof Reflect=="object"?Reflect:null,t=r&&typeof r.apply=="function"?r.apply:function(C,H,B){return Function.prototype.apply.call(C,H,B)},e;r&&typeof r.ownKeys=="function"?e=r.ownKeys:Object.getOwnPropertySymbols?e=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:e=function(C){return Object.getOwnPropertyNames(C)};function i(M){}var n=Number.isNaN||function(C){return C!==C};function s(){s.init.call(this)}R5=s,R5.once=w,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(M){if(typeof M!="number"||M<0||n(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");o=M}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||n(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function v(M){return M._maxListeners===void 0?s.defaultMaxListeners:M._maxListeners}s.prototype.getMaxListeners=function(){return v(this)},s.prototype.emit=function(C){for(var H=[],B=1;B<arguments.length;B++)H.push(arguments[B]);var I=C==="error",W=this._events;if(W!==void 0)I=I&&W.error===void 0;else if(!I)return!1;if(I){var z;if(H.length>0&&(z=H[0]),z instanceof Error)throw z;var j=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw j.context=z,j}var q=W[C];if(q===void 0)return!1;if(typeof q=="function")t(q,this,H);else for(var e0=q.length,V=g(q,e0),B=0;B<e0;++B)t(V[B],this,H);return!0};function l(M,C,H,B){var I,W,z;if(a(H),W=M._events,W===void 0?(W=M._events=Object.create(null),M._eventsCount=0):(W.newListener!==void 0&&(M.emit("newListener",C,H.listener?H.listener:H),W=M._events),z=W[C]),z===void 0)z=W[C]=H,++M._eventsCount;else if(typeof z=="function"?z=W[C]=B?[H,z]:[z,H]:B?z.unshift(H):z.push(H),I=v(M),I>0&&z.length>I&&!z.warned){z.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=M,j.type=C,j.count=z.length}return M}s.prototype.addListener=function(C,H){return l(this,C,H,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(C,H){return l(this,C,H,!0)};function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(M,C,H){var B={fired:!1,wrapFn:void 0,target:M,type:C,listener:H},I=c.bind(B);return I.listener=H,B.wrapFn=I,I}s.prototype.once=function(C,H){return a(H),this.on(C,d(this,C,H)),this},s.prototype.prependOnceListener=function(C,H){return a(H),this.prependListener(C,d(this,C,H)),this},s.prototype.removeListener=function(C,H){var B,I,W,z,j;if(a(H),I=this._events,I===void 0)return this;if(B=I[C],B===void 0)return this;if(B===H||B.listener===H)--this._eventsCount===0?this._events=Object.create(null):(delete I[C],I.removeListener&&this.emit("removeListener",C,B.listener||H));else if(typeof B!="function"){for(W=-1,z=B.length-1;z>=0;z--)if(B[z]===H||B[z].listener===H){j=B[z].listener,W=z;break}if(W<0)return this;W===0?B.shift():b(B,W),B.length===1&&(I[C]=B[0]),I.removeListener!==void 0&&this.emit("removeListener",C,j||H)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(C){var H,B,I;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[C]),this;if(arguments.length===0){var W=Object.keys(B),z;for(I=0;I<W.length;++I)z=W[I],z!=="removeListener"&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(H=B[C],typeof H=="function")this.removeListener(C,H);else if(H!==void 0)for(I=H.length-1;I>=0;I--)this.removeListener(C,H[I]);return this};function h(M,C,H){var B=M._events;if(B===void 0)return[];var I=B[C];return I===void 0?[]:typeof I=="function"?H?[I.listener||I]:[I]:H?A(I):g(I,I.length)}s.prototype.listeners=function(C){return h(this,C,!0)},s.prototype.rawListeners=function(C){return h(this,C,!1)},s.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):p.call(M,C)},s.prototype.listenerCount=p;function p(M){var C=this._events;if(C!==void 0){var H=C[M];if(typeof H=="function")return 1;if(H!==void 0)return H.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function g(M,C){for(var H=new Array(C),B=0;B<C;++B)H[B]=M[B];return H}function b(M,C){for(;C+1<M.length;C++)M[C]=M[C+1];M.pop()}function A(M){for(var C=new Array(M.length),H=0;H<C.length;++H)C[H]=M[H].listener||M[H];return C}function w(M,C){return new Promise(function(H,B){function I(z){M.removeListener(C,W),B(z)}function W(){typeof M.removeListener=="function"&&M.removeListener("error",I),H([].slice.call(arguments))}S(M,C,W,{once:!0}),C!=="error"&&_(M,I,{once:!0})})}function _(M,C,H){typeof M.on=="function"&&S(M,"error",C,H)}function S(M,C,H,B){if(typeof M.on=="function")B.once?M.once(C,H):M.on(C,H);else if(typeof M.addEventListener=="function")M.addEventListener(C,function I(W){B.once&&M.removeEventListener(C,I),H(W)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}return R5}var k5=Cs();k5.once;k5.once=function(r,t){return new Promise((e,i)=>{function n(...o){s!==void 0&&r.removeListener("error",s),e(o)}let s;t!=="error"&&(s=o=>{r.removeListener(name,n),i(o)},r.once("error",s)),r.once(t,n)})};k5.on=function(r,t){let e=[],i=[],n=null,s=!1,o={async next(){let l=e.shift();if(l)return createIterResult(l,!1);if(n){let c=Promise.reject(n);return n=null,c}return s?createIterResult(void 0,!0):new Promise((c,d)=>i.push({resolve:c,reject:d}))},async return(){r.removeListener(t,a),r.removeListener("error",v),s=!0;for(let l of i)l.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(l){n=l,r.removeListener(t,a),r.removeListener("error",v)},[Symbol.asyncIterator](){return this}};return r.on(t,a),r.on("error",v),o;function a(...l){let c=i.shift();c?c.resolve(createIterResult(l,!1)):e.push(l)}function v(l){s=!0;let c=i.shift();c?c.reject(l):n=l,o.return()}};var{EventEmitter:Nt,defaultMaxListeners:f9,init:h9,listenerCount:m9,on:p9,once:g9}=k5;import{Vec3 as Vt}from"vec3";x();R();T();k();function Le(r){let t=r*2+1;if(t<=0)return[];let e=[],i=0,n=0,s=0,o=-1;for(let a=0;a<t*t;a++){if(Math.abs(i)<=t/2&&Math.abs(n)<=t/2&&e.push([i,n]),i===n||i<0&&i===-n||i>0&&i===1-n){let v=s;s=-o,o=v}i+=s,n+=o}return e}var ae=r=>[Math.floor(r.x/16),Math.floor(r.z/16)],Ps=r=>[Math.floor(r.x/16),Math.floor(r.y/16),Math.floor(r.z/16)],Nn=async(r,t,e,i=1)=>{for(let n=0;n<r.length;n+=i)t&&await new Promise(s=>setTimeout(s,t)),await e(r[n],n)},Fe=class Fe extends Nt{static restoreTransferred(t,e){let i=new Fe;return e&&e.addEventListener("message",({data:n})=>{n.class===Fe.restorerName&&n.type==="event"&&i.emit(n.eventName,...n.args)}),i}};u(Fe,"restorerName","WorldViewWorker");var jt=Fe,Yt=class extends Nt{constructor(e,i,n=new Vt(0,0,0)){super();this.world=e;this.viewDistance=i;u(this,"spiralNumber",0);u(this,"gotPanicLastTime",!1);u(this,"panicChunksReload",()=>{});u(this,"loadedChunks",{});u(this,"inLoading",!1);u(this,"chunkReceiveTimes",[]);u(this,"lastChunkReceiveTime",0);u(this,"lastChunkReceiveTimeAvg",0);u(this,"panicTimeout");u(this,"lastPos");u(this,"eventListeners",{});u(this,"debugChunksInfo",{});u(this,"waitingSpiralChunksLoad",{});u(this,"addWaitTime",1);u(this,"keepChunksDistance",0);u(this,"isPlayground",!1);u(this,"allowPositionUpdate",!0);u(this,"lastBiomeId",null);u(this,"lastPosCheck",null);this.lastPos=new Vt(0,0,0).update(n)}prepareForTransfer(e){if(e){let i=this.emit.bind(this);this.emit=(n,...s)=>{i(n,...s),e.postMessage({class:jt.restorerName,type:"event",eventName:n,args:s})}}return{__restorer:jt.restorerName}}setBlockStateId(e,i){let n=this.world.setBlockStateId(e,i);if(n&&typeof n.then=="function")throw new Error("setBlockStateId returned promise (not supported)");this.emit("blockUpdate",{pos:e,stateId:i})}updateViewDistance(e){this.viewDistance=e,this.emit("renderDistance",e)}async init(e,i){this.updateViewDistance(this.viewDistance),this.emit("chunkPosUpdate",{pos:e}),i?.time?.timeOfDay!==void 0&&this.emit("time",i.time.timeOfDay),i?.entity&&this.emit("playerEntity",i.entity),this.emitterGotConnected(i);let[n,s]=ae(e),o=Le(this.viewDistance).map(([a,v])=>new Vt((n+a)*16,0,(s+v)*16));this.lastPos.update(e),await this._loadChunks(o,e)}chunkProgress(){if(this.panicTimeout&&clearTimeout(this.panicTimeout),this.chunkReceiveTimes.length>=5){let e=this.chunkReceiveTimes.reduce((n,s)=>n+s,0)/this.chunkReceiveTimes.length;this.lastChunkReceiveTimeAvg=e;let i=e*2+1e3;this.panicTimeout&&clearTimeout(this.panicTimeout),this.panicTimeout=setTimeout(()=>{!this.gotPanicLastTime&&this.inLoading&&(this.gotPanicLastTime=!0,this.panicChunksReload())},i)}}async _loadChunks(e,i){this.spiralNumber++;let{spiralNumber:n}=this;for(let o of Object.keys(this.waitingSpiralChunksLoad))this.waitingSpiralChunksLoad[o](!1),delete this.waitingSpiralChunksLoad[o];let s=!0;this.inLoading=!0,await Nn(e,this.addWaitTime,async o=>{!s||this.loadedChunks[`${o.x},${o.z}`]||(this.world.getColumnAt(o)||(s=await new Promise(a=>{this.waitingSpiralChunksLoad[`${o.x},${o.z}`]=a})),s&&(await this.loadChunk(o,void 0,`spiral ${n} from ${i.x},${i.z}`),this.chunkProgress()))}),this.panicTimeout&&clearTimeout(this.panicTimeout),this.inLoading=!1,this.gotPanicLastTime=!1,this.chunkReceiveTimes=[],this.lastChunkReceiveTime=0}async loadChunk(e,i=!1,n="spiral"){var l,c;let[s,o]=ae(this.lastPos),a=Math.abs(s-Math.floor(e.x/16)),v=Math.abs(o-Math.floor(e.z/16));if(a<=this.viewDistance&&v<=this.viewDistance){let d=await this.world.getColumnAt(e.y!==void 0?e:new Vt(e.x,0,e.z));if(d){let h=d.toJson(),p={minY:d.minY??0,worldHeight:d.worldHeight??256};this.emit("loadChunk",{x:e.x,z:e.z,chunk:h,blockEntities:d.blockEntities,worldConfig:p,isLightUpdate:i}),this.loadedChunks[`${e.x},${e.z}`]=!0,(l=this.debugChunksInfo)[c=`${e.x},${e.z}`]??(l[c]={loads:[]}),this.debugChunksInfo[`${e.x},${e.z}`].loads.push({dataLength:h.length,reason:n,time:Date.now()})}else this.isPlayground&&this.emit("markAsLoaded",{x:e.x,z:e.z})}}unloadAllChunks(){for(let e of Object.keys(this.loadedChunks)){let[i,n]=e.split(",").map(Number);this.unloadChunk({x:i,z:n})}}unloadChunk(e){this.emit("unloadChunk",{x:e.x,z:e.z}),delete this.loadedChunks[`${e.x},${e.z}`],delete this.debugChunksInfo[`${e.x},${e.z}`]}emitterGotConnected(e){typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope||!e||this.emit("blockEntities",new Proxy({},{get(n,s,o){if(typeof s!="string")return;let[a,v,l]=s.split(",").map(Number);return e.world.getBlock(new Vt(a,v,l))?.entity}}))}updateBiome(e){try{if(!this.world.getBiome)return;let i=this.world.getBiome(e);i!==this.lastBiomeId&&(this.lastBiomeId=i,this.emit("biomeReset"))}catch{}}async updatePosition(e,i=!1){if(!this.allowPositionUpdate)return;let n=e.floored();if(!i&&this.lastPosCheck&&this.lastPosCheck.equals(n))return;this.lastPosCheck=n,this.updateBiome(e);let[s,o]=ae(this.lastPos),[a,v]=ae(e);if(s!==a||o!==v||i){this.emit("chunkPosUpdate",{pos:e});let l=[],c=i?this.viewDistance:this.viewDistance+this.keepChunksDistance;for(let h of Object.keys(this.loadedChunks)){let[p,g]=h.split(",").map(Number),b=new Vt(p,0,g),[A,w]=ae(b),_=Math.abs(a-A),S=Math.abs(v-w);(_>c||S>c)&&l.push(b)}for(let h of l)this.unloadChunk(h);let d=Le(this.viewDistance).map(([h,p])=>{let g=new Vt((a+h)*16,0,(v+p)*16);if(!this.loadedChunks[`${g.x},${g.z}`])return g}).filter(h=>!!h);this.lastPos.update(e),this._loadChunks(d,e)}else this.emit("chunkPosUpdate",{pos:e}),this.lastPos.update(e)}};x();R();T();k();x();R();T();k();import Vn from"minecraft-data";import Bs from"mc-assets/dist/blocksAtlases.json";import Is from"mc-assets/dist/itemsAtlases.json";import Hs from"mc-assets/dist/itemDefinitions.json";import zs from"mc-assets/dist/blocksAtlasLatest.png";import Os from"mc-assets/dist/blocksAtlasLegacy.png";import Ds from"mc-assets/dist/itemsAtlasLatest.png";import Ls from"mc-assets/dist/itemsAtlasLegacy.png";import Fs from"mc-assets/dist/textureReplacements/christmas";import{AtlasParser as T5}from"mc-assets/dist/atlasParser";import Us from"mc-assets/dist/worldBlockProvider";import{ItemsRenderer as Gs}from"mc-assets/dist/itemsRenderer";import{getLoadedItemDefinitionsStore as Ws}from"mc-assets";var ve=class{constructor(t){u(this,"sourceItemDefinitionsJson",Hs);u(this,"itemsDefinitionsStore",Ws(this.sourceItemDefinitionsJson));u(this,"allReady",!1);u(this,"itemsAtlasImage");u(this,"blocksAtlasImage");u(this,"blocksAtlasJson");u(this,"customBlockStates");u(this,"customModels");u(this,"customItemModelNames",{});u(this,"customTextures",{});u(this,"guiAtlas",null);u(this,"guiAtlasVersion",0);u(this,"itemsRenderer");u(this,"worldBlockProvider");u(this,"blockstatesModels",null);u(this,"version");u(this,"texturesVersion");u(this,"mcData");t&&(Object.assign(this,t),this.mcData=Vn(this.version))}prepareForTransfer(){let t={};for(let e in this)Object.prototype.hasOwnProperty.call(this,e)&&typeof this[e]!="function"&&(e==="itemsRenderer"||e==="worldBlockProvider"||e==="mcData"||(t[e]=this[e]));return t.customTextures={},t}},Ns="1.21.4",xt=class xt extends Nt{constructor(){super(...arguments);u(this,"sourceBlockStatesModels",null);u(this,"sourceBlocksAtlases",Bs);u(this,"sourceItemsAtlases",Is);u(this,"currentResources");u(this,"itemsAtlasParser");u(this,"blocksAtlasParser");u(this,"currentConfig");u(this,"abortController",new AbortController);u(this,"_promiseAssetsReadyResolvers",Promise.withResolvers())}static restoreTransferred(e,i){let n=new xt,s=o=>{n.currentResources=new ve(o)};return s(e.currentResources),i&&i.addEventListener("message",({data:o})=>{o.class===xt.restorerName&&(o.type==="newResources"&&s(o.currentResources),o.type==="event"&&n.emit(o.eventName,...o.args))}),n}prepareForTransfer(e){if(e){let i=this.emit.bind(this);this.emit=(n,...s)=>{i(n,...s),e.postMessage({class:xt.restorerName,type:"event",eventName:n,args:s}),(n==="assetsTexturesUpdated"||n==="assetsInventoryReady")&&e.postMessage({class:xt.restorerName,type:"newResources",currentResources:this.currentResources?.prepareForTransfer()})}}return{__restorer:xt.restorerName,currentResources:this.currentResources?.prepareForTransfer()}}get promiseAssetsReady(){return this._promiseAssetsReadyResolvers.promise}async loadSourceData(e=this.currentConfig?.version){if(!e)throw new Error("No version loaded");this.sourceBlockStatesModels??(this.sourceBlockStatesModels=(await import("mc-assets/dist/blockStatesModels.json")).default)}resetResources(){this.currentResources=new ve}async updateAssetsData(e,i=!1){if(!this.currentConfig)throw new Error("No config loaded");this._promiseAssetsReadyResolvers=Promise.withResolvers();let n=new AbortController;if(await this.loadSourceData(this.currentConfig.version),n.signal.aborted)return;let s=this.currentResources??new ve;s.version=this.currentConfig.version,s.texturesVersion=this.currentConfig.texturesVersion??s.version,s.mcData=Vn(s.version),s.blockstatesModels={blockstates:{},models:{}},s.blockstatesModels.blockstates.latest={...this.sourceBlockStatesModels.blockstates.latest,...s.customBlockStates},s.blockstatesModels.models.latest={...this.sourceBlockStatesModels.models.latest,...s.customModels},await Promise.all([this.recreateBlockAtlas(s),this.recreateItemsAtlas(s)]),!n.signal.aborted&&(s.version&&s.blockstatesModels&&this.itemsAtlasParser&&this.blocksAtlasParser&&(s.itemsRenderer=new Gs(s.version,s.blockstatesModels,this.itemsAtlasParser,this.blocksAtlasParser)),!n.signal.aborted&&(this.currentResources=s,s.allReady=!0,i||this.emit("assetsTexturesUpdated"),this.currentConfig.noInventoryGui?this._promiseAssetsReadyResolvers.resolve():(this.emit("assetsInventoryStarted"),this.generateGuiTextures().then(()=>{n.signal.aborted||(i||this.emit("assetsInventoryReady"),this._promiseAssetsReadyResolvers.resolve())}))))}async recreateBlockAtlas(e=this.currentResources){let i={},n=new Date;(n.getMonth()===11&&n.getDate()>=24||n.getMonth()===0&&n.getDate()<=6)&&Object.assign(i,Fs);let s=new T5(this.sourceBlocksAtlases,zs,Os),o=Object.keys(e.customTextures.blocks?.textures??{}),{atlas:a,canvas:v}=await s.makeNewAtlas(e.texturesVersion,l=>{if(this.currentConfig.includeOnlyBlocks&&!this.currentConfig.includeOnlyBlocks.includes(l))return!1;let c=e.customTextures.blocks?.textures[l];return i[l]??c},void 0,void 0,o,{needHorizontalIndexes:!!this.currentConfig.includeOnlyBlocks});this.blocksAtlasParser=new T5({latest:a},v.toDataURL()),e.blocksAtlasImage=await createImageBitmap(v),e.blocksAtlasJson=this.blocksAtlasParser.atlas.latest,e.worldBlockProvider=Us(e.blockstatesModels,this.blocksAtlasParser.atlas,Ns)}async recreateItemsAtlas(e=this.currentResources){let i=new T5(this.sourceItemsAtlases,Ds,Ls),n=Object.keys(e.customTextures.items?.textures??{}),{atlas:s,canvas:o}=await i.makeNewAtlas(e.texturesVersion,a=>{let v=e.customTextures.items?.textures[a];if(v)return v},e.customTextures.items?.tileSize,void 0,n);this.itemsAtlasParser=new T5({latest:s},o.toDataURL()),e.itemsAtlasImage=await createImageBitmap(o)}async generateGuiTextures(){}async downloadDebugAtlas(e=!1){if(!this.currentResources)throw new Error("No resources loaded");let s=await(e?this.itemsAtlasParser:this.blocksAtlasParser).createDebugImage(!0),o=document.createElement("a");o.href=s,o.download=`atlas-debug-${e?"items":"blocks"}.png`,o.click()}destroy(){this.abortController.abort(),this.currentResources=void 0,this.abortController=new AbortController}};u(xt,"restorerName","ResourcesManager");var mt=xt;var Yn=class{constructor(t={},e=new mt){this.resourcesManager=e;u(this,"waitBackendLoadPromises",[]);u(this,"onWorldStart");u(this,"onBeforeWorldStart");u(this,"worldView");u(this,"config");u(this,"inWorldRenderingConfig");u(this,"backend");u(this,"backendLoader");u(this,"currentState");u(this,"currentDisplay",null);u(this,"playerState",{reactive:H1()});u(this,"rendererState");u(this,"nonReactiveState");u(this,"worldReady");u(this,"resolveWorldReady");u(this,"lastCamUpdate",0);this.config={...Fn,...t.config},this.inWorldRenderingConfig=jn({...De,...t.rendererConfig});let i=Wt();this.rendererState=i.reactive,this.nonReactiveState=i.nonReactive,this.initWorldReadyPromise()}initWorldReadyPromise(){let{promise:t,resolve:e}=Promise.withResolvers();this.worldReady=t,this.resolveWorldReady=e}async loadBackend(t){this.backend&&this.disconnectBackend(),await Promise.all(this.waitBackendLoadPromises),this.waitBackendLoadPromises=[],this.backendLoader=t;let e={config:this.config,callbacks:{displayCriticalError:n=>{},setRendererSpecificSettings:(n,s)=>{},fireCustomEvent:(n,...s)=>{}},rendererSpecificSettings:{}},i=t(e);if(this.backend=await Promise.resolve(i),this.currentState)if(this.currentState.method==="startPanorama")this.startPanorama();else{let{method:n,args:s}=this.currentState;this.backend[n](...s)}}async startWorld(t,e,i=this.playerState.reactive,n){if(this.currentDisplay==="world")throw new Error("World already started");this.currentDisplay="world";let s=n??new Vs(0,64,0);this.worldView=new Yt(t,e,s),this.worldView.isPlayground=this.inWorldRenderingConfig.isPlayground;let o={version:this.resourcesManager?.currentConfig?.version??"1.20.4",worldView:this.worldView,inWorldRenderingConfig:this.inWorldRenderingConfig,playerStateReactive:i,rendererState:this.rendererState,nonReactiveState:this.nonReactiveState,resourcesManager:this.resourcesManager};this.onBeforeWorldStart?.();let a;if(this.backend){let v=this.backend.startWorld(o);v&&typeof v.then=="function"&&(a=v)}return this.currentState={method:"startWorld",args:[o]},await a,this.resolveWorldReady(),this.onWorldStart?.(),!!a}startPanorama(){this.currentDisplay!=="menu"&&(this.backend&&(this.currentDisplay="menu",this.backend.startPanorama()),this.currentState={method:"startPanorama",args:[]})}resetBackend(t=!1){this.disconnectBackend(t),this.backendLoader&&this.loadBackend(this.backendLoader)}disconnectBackend(t=!1){t&&(this.currentState=void 0,this.currentDisplay=null,this.worldView=void 0),this.backend&&(this.backend.disconnect(),this.backend=void 0),this.currentDisplay=null,this.initWorldReadyPromise(),this.rendererState=jn(Wt().reactive),this.nonReactiveState=Wt().nonReactive}updateCamera(t,e,i){this.backend?.updateCamera(t,e,i)}setRendering(t){this.backend?.setRendering(t)}async startWithBot(t,e){await this.startWorld(t.world,e),this.worldView&&typeof this.worldView.listenToBot=="function"&&this.worldView.listenToBot(t)}destroyAll(){this.disconnectBackend(!0),this.resourcesManager&&typeof this.resourcesManager.destroy=="function"&&this.resourcesManager.destroy()}get utils(){let t=this.backend;return{async waitingForChunks(){if(!t?.worldState?.allChunksLoaded)return new Promise(e=>{let i=setInterval(()=>{t?.worldState?.allChunksLoaded&&(clearInterval(i),e())},100)})}}}destroy(){this.disconnectBackend(!0)}};x();R();T();k();import{proxy as js}from"valtio";var Qn=()=>js({playerSkin:void 0,inWater:!1,waterBreathing:!1,backgroundColor:[0,0,0],ambientLight:0,directionalLight:0,eyeHeight:0,gameMode:void 0,lookingAtBlock:void 0,diggingBlock:void 0,movementState:"NOT_MOVING",onGround:!0,sneaking:!1,flying:!1,sprinting:!1,walkDist:0,prevWalkDist:0,bob:0,prevBob:0,itemUsageTicks:0,username:"",onlineMode:!1,cardinalLight:"default",lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,cameraSpectatingEntity:void 0,team:void 0}),Ys=r=>({isSpectator(){return r.gameMode==="spectator"},isSpectatingEntity(){return r.cameraSpectatingEntity!==void 0&&r.gameMode==="spectator"},isThirdPerson(){return this.isSpectatingEntity()?!1:r.perspective==="third_person_back"||r.perspective==="third_person_front"}}),Qs=()=>({reactive:Qn()}),Kn=(r,t,e)=>({...t,"minecraft:date":new Date});x();R();T();k();x();R();T();k();import*as p5 from"three";import{Vec3 as bv}from"vec3";x();R();T();k();import{proxy as Ks,getVersion as qn,subscribe as Zn}from"valtio";import{Vec3 as Xn}from"vec3";function $n(r,t){let e=t??globalThis;return e.addEventListener("message",i=>{let{type:n,args:s,msgId:o}=i.data;if(r[n]){let a=r[n](...s);a instanceof Promise&&a.then(v=>{e.postMessage({type:"result",msgId:o,args:[v]})})}}),null}var tr=(r,t=!0)=>{let e=0;return new Proxy({},{get(i,n){return n==="transfer"?(...s)=>new Proxy({},{get(o,a){return(...v)=>{r.postMessage({type:a,args:v},s)}}}):(...s)=>{let o=e++,a=t?s.filter(v=>v instanceof ArrayBuffer||v instanceof MessagePort||typeof ImageBitmap<"u"&&v instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&v instanceof OffscreenCanvas||typeof ImageData<"u"&&v instanceof ImageData):[];return r.postMessage({type:n,msgId:o,args:s},a),{then(v){let l=({data:c})=>{c.type==="result"&&c.msgId===o&&(v(c.args[0]),r.removeEventListener("message",l))};r.addEventListener("message",l)}}}}})};var er=(r,t,e,i)=>{try{e.postMessage({type:"sync",syncId:r,value:M5(t)}),Ue.toWorker++,globalThis.debugSyncMessagesOutgoing??(globalThis.debugSyncMessagesOutgoing=0),globalThis.debugSyncMessagesOutgoing++}catch{Ge(t)}},Ue={toWorker:0,fromWorker:0};typeof window<"u"&&setInterval(()=>{globalThis.debugWorkerSyncStats={...Ue},Ue.toWorker=0,Ue.fromWorker=0},1e3);var Js=()=>Math.random().toString(36).slice(2,15)+Math.random().toString(36).slice(2,15),Jn=(r,t,e,i,n)=>{if(!r.__syncToWorker&&!r.__syncFromWorker&&!i)return;let s=Js();if(r.__syncId=s,r.__syncToWorker||i){let o=()=>{er(s,t,e,`toWorker:${n}`)};i&&Zn(t,o);let a=r.__syncToWorkerInterval??0;a>0&&setInterval(o,a)}t.__syncFromWorker&&e.addEventListener("message",o=>{o.data.type==="sync"&&o.data.syncId===s&&(Ue.fromWorker++,Object.assign(t,o.data.value))})},M5=r=>{if(qn(r)===void 0)return r;if(Array.isArray(r))return r.map(M5);if(typeof r=="object"&&r!==null){let t={};for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=M5(r[e]));return t}return r},S5=(r,t,e=!0,i=!0,n=!1)=>{var a,v;let s=r,o={};for(let l in r)if(Object.prototype.hasOwnProperty.call(r,l)){if(e&&typeof r[l]=="function")continue;if(r[l]instanceof Date||r[l]instanceof RegExp||r[l]instanceof Map||r[l]instanceof WeakMap||r[l]instanceof WeakSet,r[l]instanceof Set){o[l]=[...r[l]],o[l].__restorer="Set";continue}if(r[l]instanceof Xn){o[l]={x:r[l].x,y:r[l].y,z:r[l].z},o[l].__restorer="Vec3";continue}if(o[l]=r[l],typeof r[l]=="object"&&r[l]!==null){if(r[l].prepareForTransfer){o[l]=r[l].prepareForTransfer(t);continue}let c=qn(r[l])!==void 0;o[l]=c?M5(r[l]):r[l];let d=r[l].__syncToWorker!==!1&&!n&&c&&!r[l].__syncFromWorker;if((a=o[l]).__syncToWorker??(a.__syncToWorker=d),c&&((v=o[l]).__valtio??(v.__valtio=!0)),o[l].__syncToWorker&&c){Jn(o[l],s[l],t,!0,l);continue}Jn(o[l],s[l],t,!1,l),o[l]=S5(o[l],t,e,!1,c)}}return o},Ge=(r,t=[])=>{for(let e in r)if(Object.prototype.hasOwnProperty.call(r,e)){if(!r[e])continue;typeof r[e]=="object"&&r[e]!==null&&Ge(r[e],[...t,e]);try{structuredClone(r[e])}catch{}}},qs=(r,t,e)=>{if(!r.__syncId)return;let i=r.__syncId;if(r.__syncToWorker&&t.addEventListener("message",n=>{n.data.type==="sync"&&n.data.syncId===i&&Object.assign(r,n.data.value)}),r.__syncFromWorker){let n=()=>{er(i,r,t,`fromWorker:${e}`)};r.__valtio&&Zn(r,n);let s=r.__syncFromWorkerInterval??0;s>0&&setInterval(n,s)}},Zs=[{restorerName:"Set",restoreTransferred(r,t){return new Set(r)}},{restorerName:"Vec3",restoreTransferred(r,t){return new Xn(r.x,r.y,r.z)}}];var C5=(r,t,e,i=!0)=>{let n=[...Zs,...t];for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s)){if(!r[s])continue;if(typeof r[s]=="object"&&r[s]!==null&&C5(r[s],n,e,i),r[s].__restorer){let o=n.find(a=>a.restorerName?a.restorerName===r[s].__restorer:a.name===r[s].__restorer);if(o)r[s]=o.restoreTransferred(r[s],e);else{let a=new Error(`Restorer ${r[s].__restorer} not found`);if(typeof i=="function")i(a);else if(i)throw a}}r[s].__valtio&&(r[s]=Ks(r[s])),qs(r[s],e,s)}return r};x();R();T();k();var P5=class{constructor(t){this.nonReactiveState=t;u(this,"events",[]);u(this,"frozenEvents",[]);u(this,"lastSecondEvents",[]);u(this,"currentFrameStartTime",null);u(this,"lastInteractionTime",0);u(this,"lastSecondUpdateTime",0);u(this,"timeWindowMs",5e3);u(this,"lastSecondWindowMs",1e3);u(this,"maxEvents",500);u(this,"lastSecondUpdateInterval",1e3);this.nonReactiveState.renderer||(this.nonReactiveState.renderer={timeline:{live:[],frozen:[],lastSecond:[]}}),this.nonReactiveState.renderer.timeline||(this.nonReactiveState.renderer.timeline={live:[],frozen:[],lastSecond:[]}),setInterval(()=>{this.updateLastSecondTimeline()},this.lastSecondUpdateInterval)}markFrameStart(){this.currentFrameStartTime=performance.now(),this.addEvent({type:"frameStart",timestamp:this.currentFrameStartTime})}markFrameEnd(){if(!this.currentFrameStartTime)return;let t=performance.now(),e=t-this.currentFrameStartTime;this.addEvent({type:"frameEnd",timestamp:t,duration:e}),this.currentFrameStartTime=null}markCameraUpdate(t){if(!t)return;let e=performance.now();this.lastInteractionTime=e,this.addEvent({type:"cameraUpdate",timestamp:e}),this.frozenEvents=[...this.events],this.trimEvents(this.frozenEvents),this.syncFrozenEvents()}markFrameDisplay(){this.addEvent({type:"frameDisplay",timestamp:performance.now()})}addEvent(t){this.events.push(t),this.lastSecondEvents.push(t),this.trimEvents(this.events),this.trimLastSecondEvents(),this.syncLiveEvents()}trimEvents(t){let i=performance.now()-this.timeWindowMs;for(;t.length>0&&t[0].timestamp<i;)t.shift();t.length>this.maxEvents&&t.splice(0,t.length-this.maxEvents)}trimLastSecondEvents(){let e=performance.now()-this.lastSecondWindowMs;for(;this.lastSecondEvents.length>0&&this.lastSecondEvents[0].timestamp<e;)this.lastSecondEvents.shift()}updateLastSecondTimeline(){let t=performance.now();t-this.lastSecondUpdateTime<this.lastSecondUpdateInterval||(this.lastSecondUpdateTime=t,this.trimLastSecondEvents(),this.syncLastSecondEvents())}syncLiveEvents(){this.nonReactiveState.renderer.timeline.live=[...this.events]}syncFrozenEvents(){this.nonReactiveState.renderer.timeline.frozen=[...this.frozenEvents]}syncLastSecondEvents(){this.nonReactiveState.renderer.timeline.lastSecond=[...this.lastSecondEvents]}clear(){this.events=[],this.frozenEvents=[],this.lastSecondEvents=[],this.syncLiveEvents(),this.syncFrozenEvents(),this.syncLastSecondEvents()}};x();R();T();k();import*as Y from"three";import{Vec3 as Ht}from"vec3";import $8 from"prismarine-chat";x();R();T();k();var k0=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return this.None(r)},Out:function(r){return this.None(r)},InOut:function(r){return this.None(r)}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-k0.Bounce.Out(1-r)},Out:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},InOut:function(r){return r<.5?k0.Bounce.In(r*2)*.5:k0.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),We=function(){return performance.now()},ce=function(){function r(){this._tweens={},this._tweensAddedDuringUpdate={}}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},r.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},r.prototype.update=function(t,e){t===void 0&&(t=We()),e===void 0&&(e=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n<i.length;n++){var s=this._tweens[i[n]],o=!e;s&&s.update(t,o)===!1&&!e&&delete this._tweens[i[n]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},r}(),le={Linear:function(r,t){var e=r.length-1,i=e*t,n=Math.floor(i),s=le.Utils.Linear;return t<0?s(r[0],r[1],i):t>1?s(r[e],r[e-1],e-i):s(r[n],r[n+1>e?e:n+1],i-n)},Bezier:function(r,t){for(var e=0,i=r.length-1,n=Math.pow,s=le.Utils.Bernstein,o=0;o<=i;o++)e+=n(1-t,i-o)*n(t,o)*r[o]*s(i,o);return e},CatmullRom:function(r,t){var e=r.length-1,i=e*t,n=Math.floor(i),s=le.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(n=Math.floor(i=e*(1+t))),s(r[(n-1+e)%e],r[n],r[(n+1)%e],r[(n+2)%e],i-n)):t<0?r[0]-(s(r[0],r[0],r[1],r[1],-i)-r[0]):t>1?r[e]-(s(r[e],r[e],r[e-1],r[e-1],i-e)-r[e]):s(r[n?n-1:0],r[n],r[e<n+1?e:n+1],r[e<n+2?e:n+2],i-n)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=le.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var i=t;i>1;i--)e*=i;return r[t]=e,e}}(),CatmullRom:function(r,t,e,i,n){var s=(e-r)*.5,o=(i-t)*.5,a=n*n,v=n*a;return(2*t-2*e+s+o)*v+(-3*t+3*e-2*s-o)*a+s*n+t}}},ir=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),z1=new ce,S0=function(){function r(t,e){e===void 0&&(e=z1),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=k0.Linear.None,this._interpolationFunction=le.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=ir.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=We()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var n={};for(var s in this._valuesEnd)n[s]=this._valuesEnd[s];this._valuesEnd=n}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,i,n,s){for(var o in i){var a=t[o],v=Array.isArray(a),l=v?"array":typeof a,c=!v&&Array.isArray(i[o]);if(!(l==="undefined"||l==="function")){if(c){var d=i[o];if(d.length===0)continue;for(var h=[a],p=0,g=d.length;p<g;p+=1){var b=this._handleRelativeValue(a,d[p]);if(isNaN(b)){c=!1;break}h.push(b)}c&&(i[o]=h)}if((l==="object"||v)&&a&&!c){e[o]=v?[]:{};var A=a;for(var w in A)e[o][w]=A[w];n[o]=v?[]:{};var d=i[o];if(!this._isDynamic){var _={};for(var w in d)_[w]=d[w];i[o]=d=_}this._setupProperties(A,e[o],d,n[o],s)}else(typeof e[o]>"u"||s)&&(e[o]=a),v||(e[o]*=1),c?n[o]=i[o].slice().reverse():n[o]=e[o]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},r.prototype.pause=function(t){return t===void 0&&(t=We()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},r.prototype.resume=function(t){return t===void 0&&(t=We()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t===void 0&&(t=z1),this._group=t,this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=k0.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=le.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){if(t===void 0&&(t=We()),e===void 0&&(e=!0),this._isPaused)return!0;var i,n,s=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>s)return!1;e&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=this._duration===0||n>1?1:n;var o=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),n===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,v=this._chainedTweens.length;a<v;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,i,n){for(var s in i)if(e[s]!==void 0){var o=e[s]||0,a=i[s],v=Array.isArray(t[s]),l=Array.isArray(a),c=!v&&l;c?t[s]=this._interpolationFunction(a,n):typeof a=="object"&&a?this._updateProperties(t[s],o,a,n):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[s]=o+(a-o)*n))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r}();var lc=ir.nextId,at=z1,cc=at.getAll.bind(at),dc=at.removeAll.bind(at),uc=at.add.bind(at),fc=at.remove.bind(at),nr=at.update.bind(at);x();R();T();k();x();R();T();k();var Xs=()=>{if(typeof OffscreenCanvas>"u")return!1;try{let r=new OffscreenCanvas(1,1);return(r.getContext("webgl2")||r.getContext("webgl"))!==null}catch{return!1}},$s=Xs(),L0=(r,t)=>{if($s)return new OffscreenCanvas(r,t);let e=document.createElement("canvas");return e.width=r,e.height=t,e};async function B5(r){let e=await(await fetch(r)).blob();return createImageBitmap(e)}var to=(r,t)=>{try{return JSON.parse(r)}catch{return null}},eo={black:"#000000",dark_blue:"#0000AA",dark_green:"#00AA00",dark_aqua:"#00AAAA",dark_red:"#AA0000",dark_purple:"#AA00AA",gold:"#FFAA00",gray:"#AAAAAA",dark_gray:"#555555",blue:"#5555FF",green:"#55FF55",aqua:"#55FFFF",red:"#FF5555",light_purple:"#FF55FF",yellow:"#FFFF55",white:"#FFFFFF"},I5=(r,t,e,i=s=>{},n=(s,o)=>L0(s,o))=>{let a=[16,9],v=a[0]-a[1],l=v/16,c="front_text"in r?r.front_text.messages:[r.Text1,r.Text2,r.Text3,r.Text4];if(!c.some(g=>g!=="null"))return;let d=n(16*40,v*40),h=d.getContext("2d");i(h);let p=("front_text"in r?r.front_text.color:r.Color)||"black";for(let[g,b]of c.slice(0,4).entries())b!=="null"&&O1(b,e,d,64,p,64*(g+1)+(t?0:-8));return d},O1=(r,t,e,i,n,s=0)=>{let o=!1,a=typeof r=="string"&&(r?.startsWith("{")||r?.startsWith('"'))?to(r??'""',"sign text"):r;if(!a||typeof a!="object"&&typeof a!="string")return;let v=e.getContext("2d");if(!v)throw new Error("Could not get 2d context");v.imageSmoothingEnabled=!1,v.font=`${i}px mojangles`;let l=new t(a),c=[],d=!1,h="",p=s,g=[],b=(S,M)=>{S.text!==null&&S.text!==void 0&&S.text;let C=S.text===null||S.text===void 0?void 0:String(S.text),H={color:S.color??M?.color,underlined:S.underlined??M?.underlined,strikethrough:S.strikethrough??M?.strikethrough,bold:S.bold??M?.bold,italic:S.italic??M?.italic};if(d=d||H.underlined||H.strikethrough||!1,C?.includes(`
12
+ `)},s.prototype.displayStateStack=function(v,l){for(var c,d=0,h=0;h<v.length;h++){var p=v[h],g=p.rule.toString(p.dot);g===c?d++:(d>0&&l.push(" ^ "+d+" more lines identical to this"),d=0,l.push(" "+g)),c=g}},s.prototype.getSymbolDisplay=function(v){return o(v)},s.prototype.buildFirstStateStack=function(v,l){if(l.indexOf(v)!==-1)return null;if(v.wantedBy.length===0)return[v];var c=v.wantedBy[0],d=[v].concat(l),h=this.buildFirstStateStack(c,d);return h===null?null:[v].concat(h)},s.prototype.save=function(){var v=this.table[this.current];return v.lexerState=this.lexerState,v},s.prototype.restore=function(v){var l=v.index;this.current=l,this.table[l]=v,this.table.splice(l+1),this.lexerState=v.lexerState,this.results=this.finish()},s.prototype.rewind=function(v){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[v])},s.prototype.finish=function(){var v=[],l=this.grammar.start,c=this.table[this.table.length-1];return c.states.forEach(function(d){d.rule.name===l&&d.dot===d.rule.symbols.length&&d.reference===0&&d.data!==s.fail&&v.push(d)}),v.map(function(d){return d.data})};function o(v){var l=typeof v;if(l==="string")return v;if(l==="object"){if(v.literal)return JSON.stringify(v.literal);if(v instanceof RegExp)return"character matching "+v;if(v.type)return v.type+" token";if(v.test)return"token matching "+String(v.test);throw new Error("Unknown symbol type: "+v)}}function a(v){var l=typeof v;if(l==="string")return v;if(l==="object"){if(v.literal)return JSON.stringify(v.literal);if(v instanceof RegExp)return v.toString();if(v.type)return"%"+v.type;if(v.test)return"<"+String(v.test)+">";throw new Error("Unknown symbol type: "+v)}}return{Parser:s,Grammar:i,Rule:r}})});var xr=Z0((Th,Y5)=>{x();R();T();k();(function(){function r(v){return v[0]}function t(v){if(v==="true")return{type:"boolean",value:!0};if(v==="false")return{type:"boolean",value:!1};let l="bslfdi",c={b:"byte",s:"short",l:"long",f:"float",d:"double",i:"int"},d=v.charAt(v.length-1).toLowerCase();if(l.indexOf(d)!==-1){let b=parseFloat(v.substring(0,v.length-1));return isNaN(b)?{value:v,type:"string"}:{value:b,type:c[d]}}let h=parseFloat(v),p=v.includes("."),g=h>>0===h;return!isNaN(v)&&(p||g)?{value:h,type:p?"double":"int"}:{value:v,type:"string"}}function e(v,l){v[0]!==void 0&&(l[v[0]]=v[1])}function i(v){let l={};e(v[2],l);for(let c in v[3])e(v[3][c][3],l);return{type:"compound",value:l}}function n(v){let l=[v[6]];for(let d in v[7])l.push(v[7][d][3]);return{type:{B:"byteArray",I:"intArray",L:"longArray"}[v[2]],value:{type:l[0].type,value:l.map(d=>d.value)}}}function s(v){let l=[v[2]];for(let c in v[3])l.push(v[3][c][3]);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}function o(v){let l=[];e(v[2],l);for(let c in v[3])e(v[3][c][3],l);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}var a={Lexer:void 0,ParserRules:[{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","wschar"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"_",symbols:["_$ebnf$1"],postprocess:function(v){return null}},{name:"__$ebnf$1",symbols:["wschar"]},{name:"__$ebnf$1",symbols:["__$ebnf$1","wschar"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"__",symbols:["__$ebnf$1"],postprocess:function(v){return null}},{name:"wschar",symbols:[/[ \t\n\v\f]/],postprocess:r},{name:"MAIN",symbols:["_","JVALUE","_"],postprocess:v=>v[1]},{name:"JVALUE",symbols:["JOBJECT"],postprocess:v=>v[0]},{name:"JVALUE",symbols:[{literal:"'"},"_","JOBJECT","_",{literal:"'"}],postprocess:v=>v[2]},{name:"JVALUE",symbols:["JARRAY"],postprocess:v=>v[0]},{name:"JVALUE",symbols:["STRING"],postprocess:v=>v[0]},{name:"JVALUE$string$1",symbols:[{literal:"n"},{literal:"u"},{literal:"l"},{literal:"l"}],postprocess:function(l){return l.join("")}},{name:"JVALUE",symbols:["JVALUE$string$1"],postprocess:v=>null},{name:"JOBJECT",symbols:[{literal:"{"},"_",{literal:"}"}],postprocess:v=>({type:"compound",value:{}})},{name:"JOBJECT$ebnf$1",symbols:[]},{name:"JOBJECT$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","PAIR"]},{name:"JOBJECT$ebnf$1",symbols:["JOBJECT$ebnf$1","JOBJECT$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JOBJECT$ebnf$2$subexpression$1",symbols:["_",{literal:","}]},{name:"JOBJECT$ebnf$2",symbols:["JOBJECT$ebnf$2$subexpression$1"],postprocess:r},{name:"JOBJECT$ebnf$2",symbols:[],postprocess:function(v){return null}},{name:"JOBJECT",symbols:[{literal:"{"},"_","PAIR","JOBJECT$ebnf$1","JOBJECT$ebnf$2",{literal:"}"}],postprocess:i},{name:"JARRAY",symbols:[{literal:"["},"_",{literal:"]"}],postprocess:v=>({type:"list",value:{}})},{name:"JARRAY$ebnf$1",symbols:[]},{name:"JARRAY$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","JVALUE"]},{name:"JARRAY$ebnf$1",symbols:["JARRAY$ebnf$1","JARRAY$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$2$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$2",symbols:["JARRAY$ebnf$2$subexpression$1"],postprocess:r},{name:"JARRAY$ebnf$2",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_",/[BIL]/,"_",{literal:";"},"_","JVALUE","JARRAY$ebnf$1","JARRAY$ebnf$2","_",{literal:"]"}],postprocess:n},{name:"JARRAY$ebnf$3",symbols:[]},{name:"JARRAY$ebnf$3$subexpression$1",symbols:["_",{literal:","},"_","JVALUE"]},{name:"JARRAY$ebnf$3",symbols:["JARRAY$ebnf$3","JARRAY$ebnf$3$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$4$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$4",symbols:["JARRAY$ebnf$4$subexpression$1"],postprocess:r},{name:"JARRAY$ebnf$4",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","JVALUE","JARRAY$ebnf$3","JARRAY$ebnf$4","_",{literal:"]"}],postprocess:s},{name:"JARRAY$ebnf$5",symbols:[]},{name:"JARRAY$ebnf$5$subexpression$1",symbols:["_",{literal:","},"_","PAIR"]},{name:"JARRAY$ebnf$5",symbols:["JARRAY$ebnf$5","JARRAY$ebnf$5$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$6$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$6",symbols:["JARRAY$ebnf$6$subexpression$1"],postprocess:r},{name:"JARRAY$ebnf$6",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","PAIR","JARRAY$ebnf$5","JARRAY$ebnf$6","_",{literal:"]"}],postprocess:o},{name:"PAIR",symbols:["STRING","_",{literal:":"},"_","JVALUE"],postprocess:v=>[v[0].value,v[4]]},{name:"STRING$ebnf$1",symbols:[]},{name:"STRING$ebnf$1$subexpression$1",symbols:[/[^\\"]/]},{name:"STRING$ebnf$1$subexpression$1",symbols:[{literal:"\\"},/["bfnrt\/\\]/]},{name:"STRING$ebnf$1$subexpression$1$string$1",symbols:[{literal:"\\"},{literal:"u"}],postprocess:function(l){return l.join("")}},{name:"STRING$ebnf$1$subexpression$1",symbols:["STRING$ebnf$1$subexpression$1$string$1",/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/]},{name:"STRING$ebnf$1",symbols:["STRING$ebnf$1","STRING$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"STRING",symbols:[{literal:'"'},"STRING$ebnf$1",{literal:'"'}],postprocess:v=>t(JSON.parse(v.flat(3).map(l=>l.replace(`
13
+ `,"\\n")).join("")))},{name:"STRING$ebnf$2",symbols:[/[^\"\'}\]:;,\s]/]},{name:"STRING$ebnf$2",symbols:["STRING$ebnf$2",/[^\"\'}\]:;,\s]/],postprocess:function(l){return l[0].concat([l[1]])}},{name:"STRING",symbols:["STRING$ebnf$2"],postprocess:v=>t(v[0].join(""))}],ParserStart:"MAIN"};typeof Y5<"u"&&typeof Y5.exports<"u"?Y5.exports=a:window.grammar=a})()});var hi=Z0((Bh,Cr)=>{x();R();T();k();var Rr=Er(),Ao=xr();function Mr(r){function t(e,i){return i==="compound"?Object.keys(e).reduce(function(n,s){return n[s]=Mr(e[s]),n},{}):i==="list"?Array.isArray(e.value)?e.value.map(function(n){return t(n,e.type)}):[]:e}return t(r.value,r.type)}function Q5({value:r,type:t}){if(t==="compound"){let i=[],n=Object.entries(r);for(let s=0;s<n.length;s++){let o=n[s][0],a=Q5(n[s][1]);o==="string"&&(a=kr(a)),i.push(`${o}:${a}`)}return`{${i.join(",")}}`}else{if(t==="list")return Array.isArray(r.value)?`[${Tr(r)}]`:"[]";if(t==="byteArray"||t==="intArray"||t==="longArray"){let i=xo(t),n=Tr(r);return`[${i}${n}]`}}let e=r+Ro(r,t);return t==="string"&&(e=kr(e)),e}function kr(r){return r=r.replace(/"/g,'\\"'),(/'|{|}|\[|\]|:|;|,|\(|\)|§|=/g.test(r)||r==="")&&(r=`"${r}"`),r}function Tr({value:r,type:t}){let e=Eo(r),i=[];for(let n=0;n<r.length;n++){let s=r[n];s!==void 0&&(s=Q5({value:s,type:t}),e?i.push(`${n}:${s}`):i.push(s))}return i.join(",")}function Eo(r){for(let t=0;t<r.length;t++)if(r[t]===void 0)return!0;return!1}var xo=r=>r.charAt(0).toUpperCase()+";";function Ro(r,t){return t==="double"?r>>0===r?"d":"":{int:"",byte:"b",short:"s",float:"f",long:"l",string:""}[t]}function ko(r){return Q5(Sr(r))}function Sr(r){try{let t=new Rr.Parser(Rr.Grammar.fromCompiled(Ao));return t.feed(r),t.results[0]}catch(t){throw t.message=`Error parsing text '${r}'`,t}}Cr.exports={parse:Sr,simplify:Mr,stringify:Q5,normalize:ko}});var zr={};_5(zr,{camelCase:()=>Po,capitalCase:()=>pi,constantCase:()=>Ho,dotCase:()=>zo,kebabCase:()=>Oo,noCase:()=>Je,pascalCase:()=>Bo,pascalSnakeCase:()=>Io,pathCase:()=>Do,sentenceCase:()=>Lo,snakeCase:()=>gi,split:()=>mi,splitSeparateNumbers:()=>Ir,trainCase:()=>Fo});function mi(r){let t=r.trim();t=t.replace(To,Pr).replace(Mo,Pr),t=t.replace(Co,"\0");let e=0,i=t.length;for(;t.charAt(e)==="\0";)e++;if(e===i)return[];for(;t.charAt(i-1)==="\0";)i--;return t.slice(e,i).split(/\0/g)}function Ir(r){let t=mi(r);for(let e=0;e<t.length;e++){let i=t[e],n=So.exec(i);if(n){let s=n.index+(n[1]??n[2]).length;t.splice(e,1,i.slice(0,s),i.slice(s))}}return t}function Je(r,t){let[e,i,n]=he(r,t);return e+i.map(qe(t?.locale)).join(t?.delimiter??" ")+n}function Po(r,t){let[e,i,n]=he(r,t),s=qe(t?.locale),o=Ze(t?.locale),a=t?.mergeAmbiguousCharacters?K5(s,o):Hr(s,o);return e+i.map((v,l)=>l===0?s(v):a(v,l)).join(t?.delimiter??"")+n}function Bo(r,t){let[e,i,n]=he(r,t),s=qe(t?.locale),o=Ze(t?.locale),a=t?.mergeAmbiguousCharacters?K5(s,o):Hr(s,o);return e+i.map(a).join(t?.delimiter??"")+n}function Io(r,t){return pi(r,{delimiter:"_",...t})}function pi(r,t){let[e,i,n]=he(r,t),s=qe(t?.locale),o=Ze(t?.locale);return e+i.map(K5(s,o)).join(t?.delimiter??" ")+n}function Ho(r,t){let[e,i,n]=he(r,t);return e+i.map(Ze(t?.locale)).join(t?.delimiter??"_")+n}function zo(r,t){return Je(r,{delimiter:".",...t})}function Oo(r,t){return Je(r,{delimiter:"-",...t})}function Do(r,t){return Je(r,{delimiter:"/",...t})}function Lo(r,t){let[e,i,n]=he(r,t),s=qe(t?.locale),o=Ze(t?.locale),a=K5(s,o);return e+i.map((v,l)=>l===0?a(v):s(v)).join(t?.delimiter??" ")+n}function gi(r,t){return Je(r,{delimiter:"_",...t})}function Fo(r,t){return pi(r,{delimiter:"-",...t})}function qe(r){return r===!1?t=>t.toLowerCase():t=>t.toLocaleLowerCase(r)}function Ze(r){return r===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(r)}function K5(r,t){return e=>`${t(e[0])}${r(e.slice(1))}`}function Hr(r,t){return(e,i)=>{let n=e[0];return(i>0&&n>="0"&&n<="9"?"_"+n:t(n))+r(e.slice(1))}}function he(r,t={}){let e=t.split??(t.separateNumbers?Ir:mi),i=t.prefixCharacters??Br,n=t.suffixCharacters??Br,s=0,o=r.length;for(;s<r.length;){let a=r.charAt(s);if(!i.includes(a))break;s++}for(;o>s;){let a=o-1,v=r.charAt(a);if(!n.includes(v))break;o=a}return[r.slice(0,s),e(r.slice(s,o)),r.slice(o)]}var To,Mo,So,Co,Pr,Br,bi=ut(()=>{x();R();T();k();To=/([\p{Ll}\d])(\p{Lu})/gu,Mo=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,So=/(\d)\p{Ll}|(\p{L})\d/u,Co=/[^\p{L}\d]+/giu,Pr="$1\0$2",Br=""});var Or=Z0((Gh,Uo)=>{Uo.exports={version:"1.21.4",attackable:["acacia_boat","acacia_chest_boat","allay","armadillo","armor_stand","axolotl","bamboo_chest_raft","bamboo_raft","bat","bee","birch_boat","birch_chest_boat","blaze","bogged","breeze","camel","cat","cave_spider","cherry_boat","cherry_chest_boat","chest_minecart","chicken","cod","command_block_minecart","cow","creaking","creeper","dark_oak_boat","dark_oak_chest_boat","dolphin","donkey","drowned","elder_guardian","end_crystal","ender_dragon","enderman","endermite","evoker","falling_block","fox","frog","furnace_minecart","ghast","giant","glow_item_frame","glow_squid","goat","guardian","hoglin","hopper_minecart","horse","husk","illusioner","iron_golem","item_frame","jungle_boat","jungle_chest_boat","leash_knot","llama","magma_cube","mangrove_boat","mangrove_chest_boat","minecart","mooshroom","mule","oak_boat","oak_chest_boat","ocelot","painting","pale_oak_boat","pale_oak_chest_boat","panda","parrot","phantom","pig","piglin","piglin_brute","pillager","player","polar_bear","pufferfish","rabbit","ravager","salmon","sheep","shulker","shulker_bullet","silverfish","skeleton","skeleton_horse","slime","sniffer","snow_golem","spawner_minecart","spider","spruce_boat","spruce_chest_boat","squid","stray","strider","tadpole","tnt","tnt_minecart","trader_llama","tropical_fish","turtle","vex","villager","vindicator","wandering_trader","warden","wind_charge","witch","wither","wither_skeleton","wolf","zoglin","zombie","zombie_horse","zombie_villager","zombified_piglin"],notAttackable:["area_effect_cloud","arrow","block_display","breeze_wind_charge","dragon_fireball","egg","ender_pearl","evoker_fangs","experience_bottle","experience_orb","eye_of_ender","fireball","firework_rocket","fishing_bobber","interaction","item","item_display","lightning_bolt","llama_spit","marker","ominous_item_spawner","potion","small_fireball","snowball","spectral_arrow","text_display","trident","wither_skull"],entityRenames:{Boat:"oak_boat",EnderCrystal:"end_crystal",EntityHorse:"horse",EyeOfEnderSignal:"eye_of_ender",FallingSand:"falling_block",FireworksRocketEntity:"firework_rocket","Fishing Float":"fishing_bobber","Fishing Hook":"fishing_bobber",LavaSlime:"magma_cube",MinecartRideable:"minecart",Mob:!1,Monster:!1,MushroomCow:"mooshroom",Ozelot:"ocelot",PigZombie:"zombified_piglin",PrimedTnt:"tnt",SnowMan:"snow_golem",ThrownEgg:"egg",ThrownEnderpearl:"ender_pearl",ThrownExpBottle:"experience_bottle",ThrownPotion:"potion",VillagerGolem:"iron_golem",WitherBoss:"wither",XPOrb:"experience_orb",activated_tnt:"tnt",armorstand:"armor_stand",boat:"oak_boat",chest_boat:"oak_chest_boat",commandblock_minecart:"command_block_minecart",creaking_transient:"creaking",ender_crystal:"end_crystal",endercrystal:"end_crystal",evocation_fangs:"evoker_fangs",evocation_illager:"evoker",eye_of_ender_signal:"eye_of_ender",falling_objects:"falling_block",firecharge:"fireball",fireworks_rocket:"firework_rocket",fishing_hook:"fishing_bobber",illusion_illager:"illusioner",item_frames:"item_frame",item_stack:"item",snowman:"snow_golem",thrown_enderpearl:"ender_pearl","thrown_exp bottle":"experience_bottle",thrown_exp_bottle:"experience_bottle",thrown_potion:"potion",tipped_arrow:"arrow",villager_golem:"iron_golem",vindication_illager:"vindicator",xp_bottle:"experience_bottle",xp_orb:"experience_orb",zombie_pigman:"zombified_piglin"}}});var Lr=Z0((Wh,Dr)=>{x();R();T();k();var me=1e3,pe=me*60,ge=pe*60,Kt=ge*24,Go=Kt*7,Wo=Kt*365.25;Dr.exports=function(r,t){t=t||{};var e=typeof r;if(e==="string"&&r.length>0)return No(r);if(e==="number"&&isFinite(r))return t.long?jo(r):Vo(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function No(r){if(r=String(r),!(r.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(t){var e=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return e*Wo;case"weeks":case"week":case"w":return e*Go;case"days":case"day":case"d":return e*Kt;case"hours":case"hour":case"hrs":case"hr":case"h":return e*ge;case"minutes":case"minute":case"mins":case"min":case"m":return e*pe;case"seconds":case"second":case"secs":case"sec":case"s":return e*me;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function Vo(r){var t=Math.abs(r);return t>=Kt?Math.round(r/Kt)+"d":t>=ge?Math.round(r/ge)+"h":t>=pe?Math.round(r/pe)+"m":t>=me?Math.round(r/me)+"s":r+"ms"}function jo(r){var t=Math.abs(r);return t>=Kt?J5(r,t,Kt,"day"):t>=ge?J5(r,t,ge,"hour"):t>=pe?J5(r,t,pe,"minute"):t>=me?J5(r,t,me,"second"):r+" ms"}function J5(r,t,e,i){var n=t>=e*1.5;return Math.round(r/e)+" "+i+(n?"s":"")}});var Ur=Z0((Qh,Fr)=>{x();R();T();k();function Yo(r){e.debug=e,e.default=e,e.coerce=v,e.disable=o,e.enable=n,e.enabled=a,e.humanize=Lr(),e.destroy=l,Object.keys(r).forEach(c=>{e[c]=r[c]}),e.names=[],e.skips=[],e.formatters={};function t(c){let d=0;for(let h=0;h<c.length;h++)d=(d<<5)-d+c.charCodeAt(h),d|=0;return e.colors[Math.abs(d)%e.colors.length]}e.selectColor=t;function e(c){let d,h=null,p,g;function b(...A){if(!b.enabled)return;let w=b,_=Number(new Date),S=_-(d||_);w.diff=S,w.prev=d,w.curr=_,d=_,A[0]=e.coerce(A[0]),typeof A[0]!="string"&&A.unshift("%O");let M=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,(H,B)=>{if(H==="%%")return"%";M++;let I=e.formatters[B];if(typeof I=="function"){let W=A[M];H=I.call(w,W),A.splice(M,1),M--}return H}),e.formatArgs.call(w,A),(w.log||e.log).apply(w,A)}return b.namespace=c,b.useColors=e.useColors(),b.color=e.selectColor(c),b.extend=i,b.destroy=e.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(p!==e.namespaces&&(p=e.namespaces,g=e.enabled(c)),g),set:A=>{h=A}}),typeof e.init=="function"&&e.init(b),b}function i(c,d){let h=e(this.namespace+(typeof d>"u"?":":d)+c);return h.log=this.log,h}function n(c){e.save(c),e.namespaces=c,e.names=[],e.skips=[];let d=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let h of d)h[0]==="-"?e.skips.push(h.slice(1)):e.names.push(h)}function s(c,d){let h=0,p=0,g=-1,b=0;for(;h<c.length;)if(p<d.length&&(d[p]===c[h]||d[p]==="*"))d[p]==="*"?(g=p,b=h,p++):(h++,p++);else if(g!==-1)p=g+1,b++,h=b;else return!1;for(;p<d.length&&d[p]==="*";)p++;return p===d.length}function o(){let c=[...e.names,...e.skips.map(d=>"-"+d)].join(",");return e.enable(""),c}function a(c){for(let d of e.skips)if(s(c,d))return!1;for(let d of e.names)if(s(c,d))return!0;return!1}function v(c){return c instanceof Error?c.stack||c.message:c}function l(){}return e.enable(e.load()),e}Fr.exports=Yo});var Gr=Z0((J0,q5)=>{x();R();T();k();J0.formatArgs=Ko;J0.save=Jo;J0.load=qo;J0.useColors=Qo;J0.storage=Zo();J0.destroy=(()=>{let r=!1;return()=>{r||(r=!0)}})();J0.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Qo(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ko(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+q5.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;r.splice(1,0,t,"color: inherit");let e=0,i=0;r[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(e++,n==="%c"&&(i=e))}),r.splice(i,0,t)}J0.log=console.debug||console.log||(()=>{});function Jo(r){try{r?J0.storage.setItem("debug",r):J0.storage.removeItem("debug")}catch{}}function qo(){let r;try{r=J0.storage.getItem("debug")||J0.storage.getItem("DEBUG")}catch{}return!r&&typeof D<"u"&&"env"in D&&(r=D.env.DEBUG),r}function Zo(){try{return localStorage}catch{}}q5.exports=Ur()(J0);var{formatters:Xo}=q5.exports;Xo.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Wr=Z0(be=>{"use strict";x();R();T();k();var $o=be&&be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(be,"__esModule",{value:!0});be.debug=void 0;var ta=$o(Gr());be.debug=(0,ta.default)("mineflayer-mouse")});var Yr=Z0(Jt=>{"use strict";x();R();T();k();var ea=Jt&&Jt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.isEntityAttackable=void 0;Jt.isArmorStandAttackable=jr;var Nr=(bi(),Rs(zr)),Xe=ea(Or()),ia=Wr(),Vr=Object.fromEntries([...Xe.default.attackable,...Xe.default.notAttackable].map(r=>[r,!0])),na=Xe.default.attackable,ra=(r,t)=>{if(!t.name)throw new Error("Entity has no name");let e=r.entitiesByName[t.name],n=Xe.default.entityRenames[t.name]||Xe.default.entityRenames[(0,Nr.snakeCase)(t.name)]||t.name;if(!Vr[n]&&(n=(0,Nr.snakeCase)(n),!Vr[n]))return(0,ia.debug)(`Cannot find entity ${n} in entityData.json`),!1;let s=sa[n];return s?s(t,e):na.includes(n)};Jt.isEntityAttackable=ra;var sa={armor_stand:jr};function jr(r,t){let e=Number(r.metadata?.[t.metadataKeys?.indexOf("client_flags")??14]??0),i=(e&16)!==0,n=(e&8)!==0,s=(e&4)!==0,o=(e&1)!==0;return!i}});var M6=Z0((R_,E8)=>{E8.exports={version:"1.20.4","1.8":{blocks:[["wood_planks","planks"],["large_flowers","double_plant"]]},"1.12":{items:[["totem","totem_of_undying"]]},"1.13":{blocks:[["grass","grass_block"],["planks","oak_planks"],["planks","spruce_planks"],["planks","birch_planks"],["planks","jungle_planks"],["planks","acacia_planks"],["planks","dark_oak_planks"],["sapling","oak_sapling"],["sapling","spruce_sapling"],["sapling","birch_sapling"],["sapling","jungle_sapling"],["sapling","acacia_sapling"],["sapling","dark_oak_sapling"],["sand","red_sand"],["log","oak_log"],["log","spruce_log"],["log","birch_log"],["log","jungle_log"],["log","oak_wood"],["log","spruce_wood"],["log","birch_wood"],["log","jungle_wood"],["leaves","oak_leaves"],["leaves","spruce_leaves"],["leaves","birch_leaves"],["leaves","jungle_leaves"],["sponge","wet_sponge"],["sandstone","chiseled_sandstone"],["sandstone","cut_sandstone"],["noteblock","note_block"],["bed","red_bed"],["golden_rail","powered_rail"],["web","cobweb"],["tallgrass","dead_bush"],["tallgrass","grass"],["tallgrass","fern"],["deadbush","dead_bush"],["wool","white_wool"],["wool","orange_wool"],["wool","magenta_wool"],["wool","light_blue_wool"],["wool","yellow_wool"],["wool","lime_wool"],["wool","pink_wool"],["wool","gray_wool"],["wool","light_gray_wool"],["wool","cyan_wool"],["wool","purple_wool"],["wool","blue_wool"],["wool","brown_wool"],["wool","green_wool"],["wool","red_wool"],["wool","black_wool"],["piston_extension","moving_piston"],["yellow_flower","dandelion"],["red_flower","poppy"],["red_flower","blue_orchid"],["red_flower","allium"],["red_flower","azure_bluet"],["red_flower","red_tulip"],["red_flower","orange_tulip"],["red_flower","white_tulip"],["red_flower","pink_tulip"],["red_flower","oxeye_daisy"],["double_stone_slab","stone_slab"],["double_stone_slab","sandstone_slab"],["double_stone_slab","petrified_oak_slab"],["double_stone_slab","cobblestone_slab"],["double_stone_slab","brick_slab"],["double_stone_slab","stone_brick_slab"],["double_stone_slab","nether_brick_slab"],["double_stone_slab","quartz_slab"],["double_stone_slab","smooth_stone"],["double_stone_slab","smooth_sandstone"],["double_stone_slab","smooth_quartz"],["stone_slab","sandstone_slab"],["stone_slab","petrified_oak_slab"],["stone_slab","cobblestone_slab"],["stone_slab","brick_slab"],["stone_slab","stone_brick_slab"],["stone_slab","nether_brick_slab"],["stone_slab","quartz_slab"],["brick_block","bricks"],["mob_spawner","spawner"],["lit_furnace","furnace"],["standing_sign","sign"],["wooden_door","oak_door"],["stone_stairs","cobblestone_stairs"],["wooden_pressure_plate","oak_pressure_plate"],["lit_redstone_ore","redstone_ore"],["unlit_redstone_torch","redstone_wall_torch"],["unlit_redstone_torch","redstone_torch"],["redstone_torch","redstone_wall_torch"],["snow_layer","snow"],["snow","snow_block"],["reeds","sugar_cane"],["fence","oak_fence"],["pumpkin","carved_pumpkin"],["portal","nether_portal"],["lit_pumpkin","jack_o_lantern"],["unpowered_repeater","repeater"],["powered_repeater","repeater"],["stained_glass","white_stained_glass"],["stained_glass","orange_stained_glass"],["stained_glass","magenta_stained_glass"],["stained_glass","light_blue_stained_glass"],["stained_glass","yellow_stained_glass"],["stained_glass","lime_stained_glass"],["stained_glass","pink_stained_glass"],["stained_glass","gray_stained_glass"],["stained_glass","light_gray_stained_glass"],["stained_glass","cyan_stained_glass"],["stained_glass","purple_stained_glass"],["stained_glass","blue_stained_glass"],["stained_glass","brown_stained_glass"],["stained_glass","green_stained_glass"],["stained_glass","red_stained_glass"],["stained_glass","black_stained_glass"],["trapdoor","oak_trapdoor"],["monster_egg","infested_stone"],["monster_egg","infested_cobblestone"],["monster_egg","infested_stone_bricks"],["monster_egg","infested_mossy_stone_bricks"],["monster_egg","infested_cracked_stone_bricks"],["monster_egg","infested_chiseled_stone_bricks"],["stonebrick","stone_bricks"],["stonebrick","mossy_stone_bricks"],["stonebrick","cracked_stone_bricks"],["stonebrick","chiseled_stone_bricks"],["brown_mushroom_block","mushroom_stem"],["red_mushroom_block","mushroom_stem"],["melon_block","melon"],["fence_gate","oak_fence_gate"],["waterlily","lily_pad"],["nether_brick","nether_bricks"],["lit_redstone_lamp","redstone_lamp"],["double_wooden_slab","oak_slab"],["double_wooden_slab","spruce_slab"],["double_wooden_slab","birch_slab"],["double_wooden_slab","jungle_slab"],["double_wooden_slab","acacia_slab"],["double_wooden_slab","dark_oak_slab"],["wooden_slab","oak_slab"],["wooden_slab","spruce_slab"],["wooden_slab","birch_slab"],["wooden_slab","jungle_slab"],["wooden_slab","acacia_slab"],["wooden_slab","dark_oak_slab"],["cobblestone_wall","mossy_cobblestone_wall"],["flower_pot","potted_poppy"],["flower_pot","potted_dandelion"],["flower_pot","potted_oak_sapling"],["flower_pot","potted_spruce_sapling"],["flower_pot","potted_birch_sapling"],["flower_pot","potted_jungle_sapling"],["flower_pot","potted_red_mushroom"],["flower_pot","potted_brown_mushroom"],["flower_pot","potted_cactus"],["flower_pot","potted_dead_bush"],["flower_pot","potted_fern"],["flower_pot","potted_acacia_sapling"],["flower_pot","potted_dark_oak_sapling"],["flower_pot","potted_blue_orchid"],["flower_pot","potted_allium"],["wooden_button","oak_button"],["skull","skeleton_skull"],["skull","skeleton_wall_skull"],["anvil","chipped_anvil"],["anvil","damaged_anvil"],["unpowered_comparator","comparator"],["powered_comparator","comparator"],["quartz_ore","nether_quartz_ore"],["quartz_block","chiseled_quartz_block"],["quartz_block","quartz_pillar"],["stained_hardened_clay","white_terracotta"],["stained_hardened_clay","orange_terracotta"],["stained_hardened_clay","magenta_terracotta"],["stained_hardened_clay","light_blue_terracotta"],["stained_hardened_clay","yellow_terracotta"],["stained_hardened_clay","lime_terracotta"],["stained_hardened_clay","pink_terracotta"],["stained_hardened_clay","gray_terracotta"],["stained_hardened_clay","light_gray_terracotta"],["stained_hardened_clay","cyan_terracotta"],["stained_hardened_clay","purple_terracotta"],["stained_hardened_clay","blue_terracotta"],["stained_hardened_clay","brown_terracotta"],["stained_hardened_clay","green_terracotta"],["stained_hardened_clay","red_terracotta"],["stained_hardened_clay","black_terracotta"],["stained_glass_pane","white_stained_glass_pane"],["stained_glass_pane","orange_stained_glass_pane"],["stained_glass_pane","magenta_stained_glass_pane"],["stained_glass_pane","light_blue_stained_glass_pane"],["stained_glass_pane","yellow_stained_glass_pane"],["stained_glass_pane","lime_stained_glass_pane"],["stained_glass_pane","pink_stained_glass_pane"],["stained_glass_pane","gray_stained_glass_pane"],["stained_glass_pane","light_gray_stained_glass_pane"],["stained_glass_pane","cyan_stained_glass_pane"],["stained_glass_pane","purple_stained_glass_pane"],["stained_glass_pane","blue_stained_glass_pane"],["stained_glass_pane","brown_stained_glass_pane"],["stained_glass_pane","green_stained_glass_pane"],["stained_glass_pane","red_stained_glass_pane"],["stained_glass_pane","black_stained_glass_pane"],["leaves2","acacia_leaves"],["leaves2","dark_oak_leaves"],["log2","acacia_log"],["log2","dark_oak_log"],["log2","acacia_wood"],["log2","dark_oak_wood"],["slime","slime_block"],["prismarine","prismarine_bricks"],["prismarine","dark_prismarine"],["carpet","white_carpet"],["carpet","orange_carpet"],["carpet","magenta_carpet"],["carpet","light_blue_carpet"],["carpet","yellow_carpet"],["carpet","lime_carpet"],["carpet","pink_carpet"],["carpet","gray_carpet"],["carpet","light_gray_carpet"],["carpet","cyan_carpet"],["carpet","purple_carpet"],["carpet","blue_carpet"],["carpet","brown_carpet"],["carpet","green_carpet"],["carpet","red_carpet"],["carpet","black_carpet"],["hardened_clay","terracotta"],["double_plant","sunflower"],["double_plant","lilac"],["double_plant","tall_grass"],["double_plant","large_fern"],["double_plant","rose_bush"],["double_plant","peony"],["standing_banner","white_banner"],["wall_banner","white_wall_banner"],["daylight_detector_inverted","daylight_detector"],["red_sandstone","chiseled_red_sandstone"],["red_sandstone","cut_red_sandstone"],["double_stone_slab2","red_sandstone_slab"],["double_stone_slab2","smooth_red_sandstone"],["stone_slab2","red_sandstone_slab"],["purpur_double_slab","purpur_slab"],["end_bricks","end_stone_bricks"],["magma","magma_block"],["red_nether_brick","red_nether_bricks"],["concrete","white_concrete"],["concrete","orange_concrete"],["concrete","magenta_concrete"],["concrete","light_blue_concrete"],["concrete","yellow_concrete"],["concrete","lime_concrete"],["concrete","pink_concrete"],["concrete","gray_concrete"],["concrete","light_gray_concrete"],["concrete","cyan_concrete"],["concrete","purple_concrete"],["concrete","blue_concrete"],["concrete","brown_concrete"],["concrete","green_concrete"],["concrete","red_concrete"],["concrete","black_concrete"],["concrete_powder","white_concrete_powder"],["concrete_powder","orange_concrete_powder"],["concrete_powder","magenta_concrete_powder"],["concrete_powder","light_blue_concrete_powder"],["concrete_powder","yellow_concrete_powder"],["concrete_powder","lime_concrete_powder"],["concrete_powder","pink_concrete_powder"],["concrete_powder","gray_concrete_powder"],["concrete_powder","light_gray_concrete_powder"],["concrete_powder","cyan_concrete_powder"],["concrete_powder","purple_concrete_powder"],["concrete_powder","blue_concrete_powder"],["concrete_powder","brown_concrete_powder"],["concrete_powder","green_concrete_powder"],["concrete_powder","red_concrete_powder"],["concrete_powder","black_concrete_powder"]],items:[["stone","granite"],["stone","polished_granite"],["stone","diorite"],["stone","polished_diorite"],["stone","andesite"],["stone","polished_andesite"],["grass","grass_block"],["dirt","coarse_dirt"],["dirt","podzol"],["planks","oak_planks"],["planks","spruce_planks"],["planks","birch_planks"],["planks","jungle_planks"],["planks","acacia_planks"],["planks","dark_oak_planks"],["sapling","oak_sapling"],["sapling","spruce_sapling"],["sapling","birch_sapling"],["sapling","jungle_sapling"],["sapling","acacia_sapling"],["sapling","dark_oak_sapling"],["sand","red_sand"],["log","oak_log"],["log","spruce_log"],["log","birch_log"],["log","jungle_log"],["leaves","oak_leaves"],["leaves","spruce_leaves"],["leaves","birch_leaves"],["leaves","jungle_leaves"],["sponge","wet_sponge"],["sandstone","chiseled_sandstone"],["sandstone","cut_sandstone"],["noteblock","note_block"],["golden_rail","powered_rail"],["web","cobweb"],["tallgrass","grass"],["tallgrass","fern"],["deadbush","dead_bush"],["wool","white_wool"],["wool","orange_wool"],["wool","magenta_wool"],["wool","light_blue_wool"],["wool","yellow_wool"],["wool","lime_wool"],["wool","pink_wool"],["wool","gray_wool"],["wool","light_gray_wool"],["wool","cyan_wool"],["wool","purple_wool"],["wool","blue_wool"],["wool","brown_wool"],["wool","green_wool"],["wool","red_wool"],["wool","black_wool"],["yellow_flower","dandelion"],["red_flower","poppy"],["red_flower","blue_orchid"],["red_flower","allium"],["red_flower","azure_bluet"],["red_flower","red_tulip"],["red_flower","orange_tulip"],["red_flower","white_tulip"],["red_flower","pink_tulip"],["red_flower","oxeye_daisy"],["stone_slab","sandstone_slab"],["stone_slab","cobblestone_slab"],["stone_slab","brick_slab"],["stone_slab","stone_brick_slab"],["stone_slab","nether_brick_slab"],["stone_slab","quartz_slab"],["brick_block","bricks"],["mob_spawner","spawner"],["stone_stairs","cobblestone_stairs"],["wooden_pressure_plate","oak_pressure_plate"],["snow_layer","snow"],["snow","snow_block"],["fence","oak_fence"],["pumpkin","carved_pumpkin"],["lit_pumpkin","jack_o_lantern"],["stained_glass","white_stained_glass"],["stained_glass","orange_stained_glass"],["stained_glass","magenta_stained_glass"],["stained_glass","light_blue_stained_glass"],["stained_glass","yellow_stained_glass"],["stained_glass","lime_stained_glass"],["stained_glass","pink_stained_glass"],["stained_glass","gray_stained_glass"],["stained_glass","light_gray_stained_glass"],["stained_glass","cyan_stained_glass"],["stained_glass","purple_stained_glass"],["stained_glass","blue_stained_glass"],["stained_glass","brown_stained_glass"],["stained_glass","green_stained_glass"],["stained_glass","red_stained_glass"],["stained_glass","black_stained_glass"],["trapdoor","oak_trapdoor"],["monster_egg","infested_stone"],["monster_egg","infested_cobblestone"],["monster_egg","infested_stone_bricks"],["monster_egg","infested_mossy_stone_bricks"],["monster_egg","infested_cracked_stone_bricks"],["monster_egg","infested_chiseled_stone_bricks"],["stonebrick","stone_bricks"],["stonebrick","mossy_stone_bricks"],["stonebrick","cracked_stone_bricks"],["stonebrick","chiseled_stone_bricks"],["melon_block","melon"],["fence_gate","oak_fence_gate"],["waterlily","lily_pad"],["nether_brick","nether_bricks"],["wooden_slab","oak_slab"],["wooden_slab","spruce_slab"],["wooden_slab","birch_slab"],["wooden_slab","jungle_slab"],["wooden_slab","acacia_slab"],["wooden_slab","dark_oak_slab"],["cobblestone_wall","mossy_cobblestone_wall"],["wooden_button","oak_button"],["anvil","chipped_anvil"],["anvil","damaged_anvil"],["quartz_ore","nether_quartz_ore"],["quartz_block","chiseled_quartz_block"],["quartz_block","quartz_pillar"],["stained_hardened_clay","white_terracotta"],["stained_hardened_clay","orange_terracotta"],["stained_hardened_clay","magenta_terracotta"],["stained_hardened_clay","light_blue_terracotta"],["stained_hardened_clay","yellow_terracotta"],["stained_hardened_clay","lime_terracotta"],["stained_hardened_clay","pink_terracotta"],["stained_hardened_clay","gray_terracotta"],["stained_hardened_clay","light_gray_terracotta"],["stained_hardened_clay","cyan_terracotta"],["stained_hardened_clay","purple_terracotta"],["stained_hardened_clay","blue_terracotta"],["stained_hardened_clay","brown_terracotta"],["stained_hardened_clay","green_terracotta"],["stained_hardened_clay","red_terracotta"],["stained_hardened_clay","black_terracotta"],["stained_glass_pane","white_stained_glass_pane"],["stained_glass_pane","orange_stained_glass_pane"],["stained_glass_pane","magenta_stained_glass_pane"],["stained_glass_pane","light_blue_stained_glass_pane"],["stained_glass_pane","yellow_stained_glass_pane"],["stained_glass_pane","lime_stained_glass_pane"],["stained_glass_pane","pink_stained_glass_pane"],["stained_glass_pane","gray_stained_glass_pane"],["stained_glass_pane","light_gray_stained_glass_pane"],["stained_glass_pane","cyan_stained_glass_pane"],["stained_glass_pane","purple_stained_glass_pane"],["stained_glass_pane","blue_stained_glass_pane"],["stained_glass_pane","brown_stained_glass_pane"],["stained_glass_pane","green_stained_glass_pane"],["stained_glass_pane","red_stained_glass_pane"],["stained_glass_pane","black_stained_glass_pane"],["leaves2","acacia_leaves"],["leaves2","dark_oak_leaves"],["log2","acacia_log"],["log2","dark_oak_log"],["slime","slime_block"],["prismarine","prismarine_bricks"],["prismarine","dark_prismarine"],["carpet","white_carpet"],["carpet","orange_carpet"],["carpet","magenta_carpet"],["carpet","light_blue_carpet"],["carpet","yellow_carpet"],["carpet","lime_carpet"],["carpet","pink_carpet"],["carpet","gray_carpet"],["carpet","light_gray_carpet"],["carpet","cyan_carpet"],["carpet","purple_carpet"],["carpet","blue_carpet"],["carpet","brown_carpet"],["carpet","green_carpet"],["carpet","red_carpet"],["carpet","black_carpet"],["hardened_clay","terracotta"],["double_plant","sunflower"],["double_plant","lilac"],["double_plant","tall_grass"],["double_plant","large_fern"],["double_plant","rose_bush"],["double_plant","peony"],["red_sandstone","chiseled_red_sandstone"],["red_sandstone","cut_red_sandstone"],["stone_slab2","red_sandstone_slab"],["end_bricks","end_stone_bricks"],["magma","magma_block"],["red_nether_brick","red_nether_bricks"],["silver_shulker_box","light_gray_shulker_box"],["silver_glazed_terracotta","light_gray_glazed_terracotta"],["concrete","white_concrete"],["concrete","orange_concrete"],["concrete","magenta_concrete"],["concrete","light_blue_concrete"],["concrete","yellow_concrete"],["concrete","lime_concrete"],["concrete","pink_concrete"],["concrete","gray_concrete"],["concrete","light_gray_concrete"],["concrete","cyan_concrete"],["concrete","purple_concrete"],["concrete","blue_concrete"],["concrete","brown_concrete"],["concrete","green_concrete"],["concrete","red_concrete"],["concrete","black_concrete"],["concrete_powder","white_concrete_powder"],["concrete_powder","orange_concrete_powder"],["concrete_powder","magenta_concrete_powder"],["concrete_powder","light_blue_concrete_powder"],["concrete_powder","yellow_concrete_powder"],["concrete_powder","lime_concrete_powder"],["concrete_powder","pink_concrete_powder"],["concrete_powder","gray_concrete_powder"],["concrete_powder","light_gray_concrete_powder"],["concrete_powder","cyan_concrete_powder"],["concrete_powder","purple_concrete_powder"],["concrete_powder","blue_concrete_powder"],["concrete_powder","brown_concrete_powder"],["concrete_powder","green_concrete_powder"],["concrete_powder","red_concrete_powder"],["concrete_powder","black_concrete_powder"],["coal","charcoal"],["golden_apple","enchanted_golden_apple"],["wooden_door","oak_door"],["boat","oak_boat"],["reeds","sugar_cane"],["fish","cod"],["fish","salmon"],["fish","tropical_fish"],["fish","pufferfish"],["cooked_fish","cooked_cod"],["cooked_fish","cooked_salmon"],["dye","ink_sac"],["dye","rose_red"],["dye","cactus_green"],["dye","cocoa_beans"],["dye","lapis_lazuli"],["dye","purple_dye"],["dye","cyan_dye"],["dye","light_gray_dye"],["dye","gray_dye"],["dye","pink_dye"],["dye","lime_dye"],["dye","dandelion_yellow"],["dye","light_blue_dye"],["dye","magenta_dye"],["dye","orange_dye"],["dye","bone_meal"],["bed","white_bed"],["bed","orange_bed"],["bed","magenta_bed"],["bed","light_blue_bed"],["bed","yellow_bed"],["bed","lime_bed"],["bed","pink_bed"],["bed","gray_bed"],["bed","light_gray_bed"],["bed","cyan_bed"],["bed","purple_bed"],["bed","blue_bed"],["bed","brown_bed"],["bed","green_bed"],["bed","red_bed"],["bed","black_bed"],["melon","melon_slice"],["speckled_melon","glistering_melon_slice"],["spawn_egg","pig_spawn_egg"],["skull","skeleton_skull"],["skull","wither_skeleton_skull"],["skull","zombie_head"],["skull","player_head"],["skull","creeper_head"],["skull","dragon_head"],["fireworks","firework_rocket"],["firework_charge","firework_star"],["netherbrick","nether_brick"],["banner","black_banner"],["banner","red_banner"],["banner","green_banner"],["banner","brown_banner"],["banner","blue_banner"],["banner","purple_banner"],["banner","cyan_banner"],["banner","light_gray_banner"],["banner","gray_banner"],["banner","pink_banner"],["banner","lime_banner"],["banner","yellow_banner"],["banner","light_blue_banner"],["banner","magenta_banner"],["banner","orange_banner"],["banner","white_banner"],["chorus_fruit_popped","popped_chorus_fruit"],["record_13","music_disc_13"],["record_cat","music_disc_cat"],["record_blocks","music_disc_blocks"],["record_chirp","music_disc_chirp"],["record_far","music_disc_far"],["record_mall","music_disc_mall"],["record_mellohi","music_disc_mellohi"],["record_stal","music_disc_stal"],["record_strad","music_disc_strad"],["record_ward","music_disc_ward"],["record_11","music_disc_11"],["record_wait","music_disc_wait"]]},"1.14":{blocks:[["sign","oak_sign"],["wall_sign","oak_wall_sign"]],items:[["sign","oak_sign"],["rose_red","red_dye"],["cactus_green","green_dye"],["dandelion_yellow","yellow_dye"]]},"1.15.2":{blocks:[],items:[]},"1.16.1":{blocks:[],items:[["zombie_pigman_spawn_egg","zombified_piglin_spawn_egg"]]},"1.16.2":{blocks:[],items:[]},"1.17":{blocks:[["grass_path","dirt_path"]],items:[["grass_path","dirt_path"]]},"1.18":{blocks:[],items:[]},"1.19":{blocks:[],items:[]},"1.19.3":{blocks:[],items:[]},"1.19.4":{blocks:[],items:[]},"1.20":{blocks:[],items:[["pottery_shard_archer","archer_pottery_sherd"],["pottery_shard_prize","prize_pottery_sherd"],["pottery_shard_arms_up","arms_up_pottery_sherd"],["pottery_shard_skull","skull_pottery_sherd"]]},"1.16":{items:[["zombie_pigman_spawn_egg","zombified_piglin_spawn_egg"]]},"1.20.3":{blocks:[["grass","short_grass"]],items:[["grass","short_grass"]]}}});var S6=Z0(c1=>{"use strict";x();R();T();k();Object.defineProperty(c1,"__esModule",{value:!0});c1.versionToNumber=void 0;var x8=r=>{let[t,e="0",i="0"]=r.split(".");return+`${t.padStart(2,"0")}${parseInt(e).toString().padStart(2,"0")}${parseInt(i).toString().padStart(2,"0")}`};c1.versionToNumber=x8});var P6=Z0(Re=>{"use strict";x();R();T();k();var R8=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0});Re.getRenamedData=void 0;var C6=R8(M6()),Pt=S6(),k8=(r,t,e,i)=>{let n=(0,Pt.versionToNumber)(e),s=(0,Pt.versionToNumber)(i),o=n<s?1:-1,a=o>0?1:0,v=t,l=Object.keys(C6.default).sort((h,p)=>o*((0,Pt.versionToNumber)(h)-(0,Pt.versionToNumber)(p))),c=o>0?s:n,d=o>0?n:s;for(let h of l.filter(p=>(0,Pt.versionToNumber)(p)<=c&&(0,Pt.versionToNumber)(p)>=d)){if(o>0&&(0,Pt.versionToNumber)(h)>=c||o<0&&(0,Pt.versionToNumber)(h)<=d)break;let p=C6.default[h][r];if(p)for(let g of p){let b=g[a],A=g[1-a];if(Array.isArray(v))v.includes(A)&&(v=v.map(w=>w===A?b:w));else if(v===A){v=b;break}}}return v};Re.getRenamedData=k8});var W6={};_5(W6,{applyWorldGeometryExport:()=>O8,createMeshesFromExport:()=>U6,downloadWorldGeometry:()=>Qi,exportWorldGeometry:()=>F6,loadTextureFromDataUrl:()=>G6,loadWorldGeometryFromUrl:()=>H8});import*as R0 from"three";function F6(r,t,e,i=!1){let n=[];for(let[o,a]of Object.entries(r.sectionObjects)){let v=a.children.find(A=>A.name==="mesh");if(!v?.geometry)continue;let{geometry:l}=v,c=l.getAttribute("position"),d=l.getAttribute("normal"),h=l.getAttribute("color"),p=l.getAttribute("uv"),g=l.index;if(!c||!g)continue;let b=r.sceneOrigin.getWorldPosition(v);n.push({key:o,position:{x:b?.x??r.sceneOrigin.toWorldX(v.position.x),y:b?.y??r.sceneOrigin.toWorldY(v.position.y),z:b?.z??r.sceneOrigin.toWorldZ(v.position.z)},geometry:{positions:[...c.array],normals:d?[...d.array]:[],colors:h?[...h.array]:[],uvs:p?[...p.array]:[],indices:[...g.array]}})}let s={version:r.version??"unknown",exportedAt:new Date().toISOString(),camera:{position:t,rotation:e},sections:n};if(i&&r.material.map){let o=document.createElement("canvas"),a=r.material.map,{image:v}=a;v&&(o.width=v.width,o.height=v.height,o.getContext("2d").drawImage(v,0,0),s.textureAtlasDataUrl=o.toDataURL("image/png"))}return s}function Qi(r,t,e,i="world-geometry.json",n=!1){let s=F6(r,t,e,n),o=JSON.stringify(s),a=new Blob([o],{type:"application/json"}),v=URL.createObjectURL(a),l=document.createElement("a");l.href=v,l.download=i,l.click(),URL.revokeObjectURL(v)}async function H8(r){let t=await fetch(r);if(!t.ok)throw new Error(`Failed to fetch world geometry: ${t.statusText}`);return t.json()}function U6(r,t){let e=[];for(let i of r.sections){let n=new R0.BufferGeometry;n.setAttribute("position",new R0.Float32BufferAttribute(i.geometry.positions,3)),i.geometry.normals.length&&n.setAttribute("normal",new R0.Float32BufferAttribute(i.geometry.normals,3)),i.geometry.colors.length&&n.setAttribute("color",new R0.Float32BufferAttribute(i.geometry.colors,3)),i.geometry.uvs.length&&n.setAttribute("uv",new R0.Float32BufferAttribute(i.geometry.uvs,2));let o=Math.max(...i.geometry.indices)>65535?Uint32Array:Uint16Array;n.setIndex(new R0.BufferAttribute(new o(i.geometry.indices),1));let a=new R0.Mesh(n,t);a.position.set(i.position.x,i.position.y,i.position.z),a.name="mesh";let v=new R0.Group;v.name="chunk",v.add(a),e.push(v)}return e}async function G6(r){return new Promise((t,e)=>{let i=new Image;i.onload=()=>{let n=new R0.Texture(i);n.magFilter=R0.NearestFilter,n.minFilter=R0.NearestFilter,n.needsUpdate=!0,n.flipY=!1,t(n)},i.onerror=e,i.src=r})}async function O8(r,t){let{scene:e,renderUpdateEmitter:i,material:n}=r,s=e.getObjectByName(L6);s&&(e.remove(s),z8(s));let o=!!t.textureAtlasDataUrl,a;if(o&&t.textureAtlasDataUrl){let c=await G6(t.textureAtlasDataUrl);a=new R0.MeshLambertMaterial({map:c,vertexColors:!0,transparent:!0,alphaTest:.1}),a.name="geometry-export-material"}else a=n;let v=U6(t,a),l=new R0.Group;l.name=L6,o&&(l.userData.geometryExportMaterial=a);for(let c of v)l.add(c);return e.add(l),i.emit("update"),v.length}var L6,z8,Ki=ut(()=>{"use strict";x();R();T();k();L6="geometry-export-root";z8=r=>{r.traverse(e=>{e.isMesh&&e.geometry?.dispose()});let t=r.userData?.geometryExportMaterial;t&&(t.map?.dispose?.(),t.dispose?.())}});x();R();T();k();x();R();T();k();x();R();T();k();x();R();T();k();import{proxy as Fn}from"valtio";var De={paused:!1,showChunkBorders:!1,enableDebugOverlay:!1,debugWasmPerf:!1,debugModelVariant:void 0,futuristicReveal:!1,wasmMesher:!1,mesherWorkers:1,addChunksBatchWaitTime:200,_experimentalSmoothChunkLoading:!0,_renderByChunks:!1,autoLowerRenderDistance:!1,disableMesherConversionCache:!1,dedicatedChangeWorker:!1,shadingTheme:"high-contrast",cardinalLight:"default",dayCycle:!0,smoothLighting:!0,enableLighting:!0,starfield:!0,defaultSkybox:!0,renderEntities:!0,extraBlockRenderers:!0,foreground:!0,fov:75,volume:1,showHand:!1,viewBobbing:!1,handRenderer:"vanilla",renderEars:!0,highlightBlockColor:"blue",fetchPlayerSkins:!0,skinTexturesProxy:void 0,vrSupport:!0,vrPageGameRendering:!0,clipWorldBelowY:void 0,isPlayground:!1,instantCameraUpdate:!1,isRaining:!1,moduleStates:{}},Un={fpsLimit:void 0,powerPreference:void 0,sceneBackground:"lightblue",timeoutRendering:!1},Zv=(r={})=>Fn({...De,...r}),Wt=()=>({reactive:Fn({world:{chunksLoaded:new Set,heightmaps:new Map,allChunksLoaded:!1,mesherWork:!1,intersectMedia:null},renderer:"...",preventEscapeMenu:!1}),nonReactive:{fps:0,worstRenderTime:0,avgRenderTime:0,world:{chunksLoaded:new Set,chunksTotalNumber:0},renderer:{timeline:{live:[],frozen:[],lastSecond:[]}}}});x();R();T();k();import{proxy as Ss}from"valtio";var z1=()=>Ss({playerSkin:void 0,inWater:!1,waterBreathing:!1,backgroundColor:[0,0,0],ambientLight:0,directionalLight:0,eyeHeight:0,gameMode:void 0,lookingAtBlock:void 0,diggingBlock:void 0,movementState:"NOT_MOVING",onGround:!0,sneaking:!1,flying:!1,sprinting:!1,walkDist:0,prevWalkDist:0,bob:0,prevBob:0,itemUsageTicks:0,username:"",onlineMode:!1,cardinalLight:"default",lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,cameraSpectatingEntity:void 0,team:void 0}),Gn=r=>({isSpectator(){return r.gameMode==="spectator"},isSpectatingEntity(){return r.cameraSpectatingEntity!==void 0&&r.gameMode==="spectator"},isThirdPerson(){return this.isSpectatingEntity()?!1:r.perspective==="third_person_back"||r.perspective==="third_person_front"}}),Wn=()=>({reactive:z1()});x();R();T();k();import{Vec3 as Vs}from"vec3";import{proxy as Yn}from"valtio";x();R();T();k();x();R();T();k();x();R();T();k();x();R();T();k();var k5={},Nn=!1;function Cs(){if(Nn)return k5;Nn=!0;var r=typeof Reflect=="object"?Reflect:null,t=r&&typeof r.apply=="function"?r.apply:function(C,H,B){return Function.prototype.apply.call(C,H,B)},e;r&&typeof r.ownKeys=="function"?e=r.ownKeys:Object.getOwnPropertySymbols?e=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:e=function(C){return Object.getOwnPropertyNames(C)};function i(M){}var n=Number.isNaN||function(C){return C!==C};function s(){s.init.call(this)}k5=s,k5.once=w,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(M){if(typeof M!="number"||M<0||n(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");o=M}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||n(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function v(M){return M._maxListeners===void 0?s.defaultMaxListeners:M._maxListeners}s.prototype.getMaxListeners=function(){return v(this)},s.prototype.emit=function(C){for(var H=[],B=1;B<arguments.length;B++)H.push(arguments[B]);var I=C==="error",W=this._events;if(W!==void 0)I=I&&W.error===void 0;else if(!I)return!1;if(I){var z;if(H.length>0&&(z=H[0]),z instanceof Error)throw z;var j=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw j.context=z,j}var q=W[C];if(q===void 0)return!1;if(typeof q=="function")t(q,this,H);else for(var e0=q.length,V=g(q,e0),B=0;B<e0;++B)t(V[B],this,H);return!0};function l(M,C,H,B){var I,W,z;if(a(H),W=M._events,W===void 0?(W=M._events=Object.create(null),M._eventsCount=0):(W.newListener!==void 0&&(M.emit("newListener",C,H.listener?H.listener:H),W=M._events),z=W[C]),z===void 0)z=W[C]=H,++M._eventsCount;else if(typeof z=="function"?z=W[C]=B?[H,z]:[z,H]:B?z.unshift(H):z.push(H),I=v(M),I>0&&z.length>I&&!z.warned){z.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=M,j.type=C,j.count=z.length}return M}s.prototype.addListener=function(C,H){return l(this,C,H,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(C,H){return l(this,C,H,!0)};function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(M,C,H){var B={fired:!1,wrapFn:void 0,target:M,type:C,listener:H},I=c.bind(B);return I.listener=H,B.wrapFn=I,I}s.prototype.once=function(C,H){return a(H),this.on(C,d(this,C,H)),this},s.prototype.prependOnceListener=function(C,H){return a(H),this.prependListener(C,d(this,C,H)),this},s.prototype.removeListener=function(C,H){var B,I,W,z,j;if(a(H),I=this._events,I===void 0)return this;if(B=I[C],B===void 0)return this;if(B===H||B.listener===H)--this._eventsCount===0?this._events=Object.create(null):(delete I[C],I.removeListener&&this.emit("removeListener",C,B.listener||H));else if(typeof B!="function"){for(W=-1,z=B.length-1;z>=0;z--)if(B[z]===H||B[z].listener===H){j=B[z].listener,W=z;break}if(W<0)return this;W===0?B.shift():b(B,W),B.length===1&&(I[C]=B[0]),I.removeListener!==void 0&&this.emit("removeListener",C,j||H)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(C){var H,B,I;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[C]),this;if(arguments.length===0){var W=Object.keys(B),z;for(I=0;I<W.length;++I)z=W[I],z!=="removeListener"&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(H=B[C],typeof H=="function")this.removeListener(C,H);else if(H!==void 0)for(I=H.length-1;I>=0;I--)this.removeListener(C,H[I]);return this};function h(M,C,H){var B=M._events;if(B===void 0)return[];var I=B[C];return I===void 0?[]:typeof I=="function"?H?[I.listener||I]:[I]:H?A(I):g(I,I.length)}s.prototype.listeners=function(C){return h(this,C,!0)},s.prototype.rawListeners=function(C){return h(this,C,!1)},s.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):p.call(M,C)},s.prototype.listenerCount=p;function p(M){var C=this._events;if(C!==void 0){var H=C[M];if(typeof H=="function")return 1;if(H!==void 0)return H.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function g(M,C){for(var H=new Array(C),B=0;B<C;++B)H[B]=M[B];return H}function b(M,C){for(;C+1<M.length;C++)M[C]=M[C+1];M.pop()}function A(M){for(var C=new Array(M.length),H=0;H<C.length;++H)C[H]=M[H].listener||M[H];return C}function w(M,C){return new Promise(function(H,B){function I(z){M.removeListener(C,W),B(z)}function W(){typeof M.removeListener=="function"&&M.removeListener("error",I),H([].slice.call(arguments))}S(M,C,W,{once:!0}),C!=="error"&&_(M,I,{once:!0})})}function _(M,C,H){typeof M.on=="function"&&S(M,"error",C,H)}function S(M,C,H,B){if(typeof M.on=="function")B.once?M.once(C,H):M.on(C,H);else if(typeof M.addEventListener=="function")M.addEventListener(C,function I(W){B.once&&M.removeEventListener(C,I),H(W)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}return k5}var T5=Cs();T5.once;T5.once=function(r,t){return new Promise((e,i)=>{function n(...o){s!==void 0&&r.removeListener("error",s),e(o)}let s;t!=="error"&&(s=o=>{r.removeListener(name,n),i(o)},r.once("error",s)),r.once(t,n)})};T5.on=function(r,t){let e=[],i=[],n=null,s=!1,o={async next(){let l=e.shift();if(l)return createIterResult(l,!1);if(n){let c=Promise.reject(n);return n=null,c}return s?createIterResult(void 0,!0):new Promise((c,d)=>i.push({resolve:c,reject:d}))},async return(){r.removeListener(t,a),r.removeListener("error",v),s=!0;for(let l of i)l.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(l){n=l,r.removeListener(t,a),r.removeListener("error",v)},[Symbol.asyncIterator](){return this}};return r.on(t,a),r.on("error",v),o;function a(...l){let c=i.shift();c?c.resolve(createIterResult(l,!1)):e.push(l)}function v(l){s=!0;let c=i.shift();c?c.reject(l):n=l,o.return()}};var{EventEmitter:Nt,defaultMaxListeners:f9,init:h9,listenerCount:m9,on:p9,once:g9}=T5;import{Vec3 as Vt}from"vec3";x();R();T();k();function Le(r){let t=r*2+1;if(t<=0)return[];let e=[],i=0,n=0,s=0,o=-1;for(let a=0;a<t*t;a++){if(Math.abs(i)<=t/2&&Math.abs(n)<=t/2&&e.push([i,n]),i===n||i<0&&i===-n||i>0&&i===1-n){let v=s;s=-o,o=v}i+=s,n+=o}return e}var ae=r=>[Math.floor(r.x/16),Math.floor(r.z/16)],Ps=r=>[Math.floor(r.x/16),Math.floor(r.y/16),Math.floor(r.z/16)],Vn=async(r,t,e,i=1)=>{for(let n=0;n<r.length;n+=i)t&&await new Promise(s=>setTimeout(s,t)),await e(r[n],n)},Fe=class Fe extends Nt{static restoreTransferred(t,e){let i=new Fe;return e&&e.addEventListener("message",({data:n})=>{n.class===Fe.restorerName&&n.type==="event"&&i.emit(n.eventName,...n.args)}),i}};u(Fe,"restorerName","WorldViewWorker");var jt=Fe,Yt=class extends Nt{constructor(e,i,n=new Vt(0,0,0)){super();this.world=e;this.viewDistance=i;u(this,"spiralNumber",0);u(this,"gotPanicLastTime",!1);u(this,"panicChunksReload",()=>{});u(this,"loadedChunks",{});u(this,"inLoading",!1);u(this,"chunkReceiveTimes",[]);u(this,"lastChunkReceiveTime",0);u(this,"lastChunkReceiveTimeAvg",0);u(this,"panicTimeout");u(this,"lastPos");u(this,"eventListeners",{});u(this,"debugChunksInfo",{});u(this,"waitingSpiralChunksLoad",{});u(this,"addWaitTime",1);u(this,"keepChunksDistance",0);u(this,"isPlayground",!1);u(this,"allowPositionUpdate",!0);u(this,"lastBiomeId",null);u(this,"lastPosCheck",null);this.lastPos=new Vt(0,0,0).update(n)}prepareForTransfer(e){if(e){let i=this.emit.bind(this);this.emit=(n,...s)=>{i(n,...s),e.postMessage({class:jt.restorerName,type:"event",eventName:n,args:s})}}return{__restorer:jt.restorerName}}setBlockStateId(e,i){let n=this.world.setBlockStateId(e,i);if(n&&typeof n.then=="function")throw new Error("setBlockStateId returned promise (not supported)");this.emit("blockUpdate",{pos:e,stateId:i})}updateViewDistance(e){this.viewDistance=e,this.emit("renderDistance",e)}async init(e,i){this.updateViewDistance(this.viewDistance),this.emit("chunkPosUpdate",{pos:e}),i?.time?.timeOfDay!==void 0&&this.emit("time",i.time.timeOfDay),i?.entity&&this.emit("playerEntity",i.entity),this.emitterGotConnected(i);let[n,s]=ae(e),o=Le(this.viewDistance).map(([a,v])=>new Vt((n+a)*16,0,(s+v)*16));this.lastPos.update(e),await this._loadChunks(o,e)}chunkProgress(){if(this.panicTimeout&&clearTimeout(this.panicTimeout),this.chunkReceiveTimes.length>=5){let e=this.chunkReceiveTimes.reduce((n,s)=>n+s,0)/this.chunkReceiveTimes.length;this.lastChunkReceiveTimeAvg=e;let i=e*2+1e3;this.panicTimeout&&clearTimeout(this.panicTimeout),this.panicTimeout=setTimeout(()=>{!this.gotPanicLastTime&&this.inLoading&&(this.gotPanicLastTime=!0,this.panicChunksReload())},i)}}async _loadChunks(e,i){this.spiralNumber++;let{spiralNumber:n}=this;for(let o of Object.keys(this.waitingSpiralChunksLoad))this.waitingSpiralChunksLoad[o](!1),delete this.waitingSpiralChunksLoad[o];let s=!0;this.inLoading=!0,await Vn(e,this.addWaitTime,async o=>{!s||this.loadedChunks[`${o.x},${o.z}`]||(this.world.getColumnAt(o)||(s=await new Promise(a=>{this.waitingSpiralChunksLoad[`${o.x},${o.z}`]=a})),s&&(await this.loadChunk(o,void 0,`spiral ${n} from ${i.x},${i.z}`),this.chunkProgress()))}),this.panicTimeout&&clearTimeout(this.panicTimeout),this.inLoading=!1,this.gotPanicLastTime=!1,this.chunkReceiveTimes=[],this.lastChunkReceiveTime=0}async loadChunk(e,i=!1,n="spiral"){var l,c;let[s,o]=ae(this.lastPos),a=Math.abs(s-Math.floor(e.x/16)),v=Math.abs(o-Math.floor(e.z/16));if(a<=this.viewDistance&&v<=this.viewDistance){let d=await this.world.getColumnAt(e.y!==void 0?e:new Vt(e.x,0,e.z));if(d){let h=d.toJson(),p={minY:d.minY??0,worldHeight:d.worldHeight??256};this.emit("loadChunk",{x:e.x,z:e.z,chunk:h,blockEntities:d.blockEntities,worldConfig:p,isLightUpdate:i}),this.loadedChunks[`${e.x},${e.z}`]=!0,(l=this.debugChunksInfo)[c=`${e.x},${e.z}`]??(l[c]={loads:[]}),this.debugChunksInfo[`${e.x},${e.z}`].loads.push({dataLength:h.length,reason:n,time:Date.now()})}else this.isPlayground&&this.emit("markAsLoaded",{x:e.x,z:e.z})}}unloadAllChunks(){for(let e of Object.keys(this.loadedChunks)){let[i,n]=e.split(",").map(Number);this.unloadChunk({x:i,z:n})}}unloadChunk(e){this.emit("unloadChunk",{x:e.x,z:e.z}),delete this.loadedChunks[`${e.x},${e.z}`],delete this.debugChunksInfo[`${e.x},${e.z}`]}emitterGotConnected(e){typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope||!e||this.emit("blockEntities",new Proxy({},{get(n,s,o){if(typeof s!="string")return;let[a,v,l]=s.split(",").map(Number);return e.world.getBlock(new Vt(a,v,l))?.entity}}))}updateBiome(e){try{if(!this.world.getBiome)return;let i=this.world.getBiome(e);i!==this.lastBiomeId&&(this.lastBiomeId=i,this.emit("biomeReset"))}catch{}}async updatePosition(e,i=!1){if(!this.allowPositionUpdate)return;let n=e.floored();if(!i&&this.lastPosCheck&&this.lastPosCheck.equals(n))return;this.lastPosCheck=n,this.updateBiome(e);let[s,o]=ae(this.lastPos),[a,v]=ae(e);if(s!==a||o!==v||i){this.emit("chunkPosUpdate",{pos:e});let l=[],c=i?this.viewDistance:this.viewDistance+this.keepChunksDistance;for(let h of Object.keys(this.loadedChunks)){let[p,g]=h.split(",").map(Number),b=new Vt(p,0,g),[A,w]=ae(b),_=Math.abs(a-A),S=Math.abs(v-w);(_>c||S>c)&&l.push(b)}for(let h of l)this.unloadChunk(h);let d=Le(this.viewDistance).map(([h,p])=>{let g=new Vt((a+h)*16,0,(v+p)*16);if(!this.loadedChunks[`${g.x},${g.z}`])return g}).filter(h=>!!h);this.lastPos.update(e),this._loadChunks(d,e)}else this.emit("chunkPosUpdate",{pos:e}),this.lastPos.update(e)}};x();R();T();k();x();R();T();k();import jn from"minecraft-data";import Bs from"mc-assets/dist/blocksAtlases.json";import Is from"mc-assets/dist/itemsAtlases.json";import Hs from"mc-assets/dist/itemDefinitions.json";import zs from"mc-assets/dist/blocksAtlasLatest.png";import Os from"mc-assets/dist/blocksAtlasLegacy.png";import Ds from"mc-assets/dist/itemsAtlasLatest.png";import Ls from"mc-assets/dist/itemsAtlasLegacy.png";import Fs from"mc-assets/dist/textureReplacements/christmas";import{AtlasParser as M5}from"mc-assets/dist/atlasParser";import Us from"mc-assets/dist/worldBlockProvider";import{ItemsRenderer as Gs}from"mc-assets/dist/itemsRenderer";import{getLoadedItemDefinitionsStore as Ws}from"mc-assets";var ve=class{constructor(t){u(this,"sourceItemDefinitionsJson",Hs);u(this,"itemsDefinitionsStore",Ws(this.sourceItemDefinitionsJson));u(this,"allReady",!1);u(this,"itemsAtlasImage");u(this,"blocksAtlasImage");u(this,"blocksAtlasJson");u(this,"customBlockStates");u(this,"customModels");u(this,"customItemModelNames",{});u(this,"customTextures",{});u(this,"guiAtlas",null);u(this,"guiAtlasVersion",0);u(this,"itemsRenderer");u(this,"worldBlockProvider");u(this,"blockstatesModels",null);u(this,"version");u(this,"texturesVersion");u(this,"mcData");t&&(Object.assign(this,t),this.mcData=jn(this.version))}prepareForTransfer(){let t={};for(let e in this)Object.prototype.hasOwnProperty.call(this,e)&&typeof this[e]!="function"&&(e==="itemsRenderer"||e==="worldBlockProvider"||e==="mcData"||(t[e]=this[e]));return t.customTextures={},t}},Ns="1.21.4",xt=class xt extends Nt{constructor(){super(...arguments);u(this,"sourceBlockStatesModels",null);u(this,"sourceBlocksAtlases",Bs);u(this,"sourceItemsAtlases",Is);u(this,"currentResources");u(this,"itemsAtlasParser");u(this,"blocksAtlasParser");u(this,"currentConfig");u(this,"abortController",new AbortController);u(this,"_promiseAssetsReadyResolvers",Promise.withResolvers())}static restoreTransferred(e,i){let n=new xt,s=o=>{n.currentResources=new ve(o)};return s(e.currentResources),i&&i.addEventListener("message",({data:o})=>{o.class===xt.restorerName&&(o.type==="newResources"&&s(o.currentResources),o.type==="event"&&n.emit(o.eventName,...o.args))}),n}prepareForTransfer(e){if(e){let i=this.emit.bind(this);this.emit=(n,...s)=>{i(n,...s),e.postMessage({class:xt.restorerName,type:"event",eventName:n,args:s}),(n==="assetsTexturesUpdated"||n==="assetsInventoryReady")&&e.postMessage({class:xt.restorerName,type:"newResources",currentResources:this.currentResources?.prepareForTransfer()})}}return{__restorer:xt.restorerName,currentResources:this.currentResources?.prepareForTransfer()}}get promiseAssetsReady(){return this._promiseAssetsReadyResolvers.promise}async loadSourceData(e=this.currentConfig?.version){if(!e)throw new Error("No version loaded");this.sourceBlockStatesModels??(this.sourceBlockStatesModels=(await import("mc-assets/dist/blockStatesModels.json")).default)}resetResources(){this.currentResources=new ve}async updateAssetsData(e,i=!1){if(!this.currentConfig)throw new Error("No config loaded");this._promiseAssetsReadyResolvers=Promise.withResolvers();let n=new AbortController;if(await this.loadSourceData(this.currentConfig.version),n.signal.aborted)return;let s=this.currentResources??new ve;s.version=this.currentConfig.version,s.texturesVersion=this.currentConfig.texturesVersion??s.version,s.mcData=jn(s.version),s.blockstatesModels={blockstates:{},models:{}},s.blockstatesModels.blockstates.latest={...this.sourceBlockStatesModels.blockstates.latest,...s.customBlockStates},s.blockstatesModels.models.latest={...this.sourceBlockStatesModels.models.latest,...s.customModels},await Promise.all([this.recreateBlockAtlas(s),this.recreateItemsAtlas(s)]),!n.signal.aborted&&(s.version&&s.blockstatesModels&&this.itemsAtlasParser&&this.blocksAtlasParser&&(s.itemsRenderer=new Gs(s.version,s.blockstatesModels,this.itemsAtlasParser,this.blocksAtlasParser)),!n.signal.aborted&&(this.currentResources=s,s.allReady=!0,i||this.emit("assetsTexturesUpdated"),this.currentConfig.noInventoryGui?this._promiseAssetsReadyResolvers.resolve():(this.emit("assetsInventoryStarted"),this.generateGuiTextures().then(()=>{n.signal.aborted||(i||this.emit("assetsInventoryReady"),this._promiseAssetsReadyResolvers.resolve())}))))}async recreateBlockAtlas(e=this.currentResources){let i={},n=new Date;(n.getMonth()===11&&n.getDate()>=24||n.getMonth()===0&&n.getDate()<=6)&&Object.assign(i,Fs);let s=new M5(this.sourceBlocksAtlases,zs,Os),o=Object.keys(e.customTextures.blocks?.textures??{}),{atlas:a,canvas:v}=await s.makeNewAtlas(e.texturesVersion,l=>{if(this.currentConfig.includeOnlyBlocks&&!this.currentConfig.includeOnlyBlocks.includes(l))return!1;let c=e.customTextures.blocks?.textures[l];return i[l]??c},void 0,void 0,o,{needHorizontalIndexes:!!this.currentConfig.includeOnlyBlocks});this.blocksAtlasParser=new M5({latest:a},v.toDataURL()),e.blocksAtlasImage=await createImageBitmap(v),e.blocksAtlasJson=this.blocksAtlasParser.atlas.latest,e.worldBlockProvider=Us(e.blockstatesModels,this.blocksAtlasParser.atlas,Ns)}async recreateItemsAtlas(e=this.currentResources){let i=new M5(this.sourceItemsAtlases,Ds,Ls),n=Object.keys(e.customTextures.items?.textures??{}),{atlas:s,canvas:o}=await i.makeNewAtlas(e.texturesVersion,a=>{let v=e.customTextures.items?.textures[a];if(v)return v},e.customTextures.items?.tileSize,void 0,n);this.itemsAtlasParser=new M5({latest:s},o.toDataURL()),e.itemsAtlasImage=await createImageBitmap(o)}async generateGuiTextures(){}async downloadDebugAtlas(e=!1){if(!this.currentResources)throw new Error("No resources loaded");let s=await(e?this.itemsAtlasParser:this.blocksAtlasParser).createDebugImage(!0),o=document.createElement("a");o.href=s,o.download=`atlas-debug-${e?"items":"blocks"}.png`,o.click()}destroy(){this.abortController.abort(),this.currentResources=void 0,this.abortController=new AbortController}};u(xt,"restorerName","ResourcesManager");var mt=xt;var Qn=class{constructor(t={},e=new mt){this.resourcesManager=e;u(this,"waitBackendLoadPromises",[]);u(this,"onWorldStart");u(this,"onBeforeWorldStart");u(this,"worldView");u(this,"config");u(this,"inWorldRenderingConfig");u(this,"backend");u(this,"backendLoader");u(this,"currentState");u(this,"currentDisplay",null);u(this,"playerState",{reactive:z1()});u(this,"rendererState");u(this,"nonReactiveState");u(this,"worldReady");u(this,"resolveWorldReady");u(this,"lastCamUpdate",0);this.config={...Un,...t.config},this.inWorldRenderingConfig=Yn({...De,...t.rendererConfig});let i=Wt();this.rendererState=i.reactive,this.nonReactiveState=i.nonReactive,this.initWorldReadyPromise()}initWorldReadyPromise(){let{promise:t,resolve:e}=Promise.withResolvers();this.worldReady=t,this.resolveWorldReady=e}async loadBackend(t){this.backend&&this.disconnectBackend(),await Promise.all(this.waitBackendLoadPromises),this.waitBackendLoadPromises=[],this.backendLoader=t;let e={config:this.config,callbacks:{displayCriticalError:n=>{},setRendererSpecificSettings:(n,s)=>{},fireCustomEvent:(n,...s)=>{}},rendererSpecificSettings:{}},i=t(e);if(this.backend=await Promise.resolve(i),this.currentState)if(this.currentState.method==="startPanorama")this.startPanorama();else{let{method:n,args:s}=this.currentState;this.backend[n](...s)}}async startWorld(t,e,i=this.playerState.reactive,n){if(this.currentDisplay==="world")throw new Error("World already started");this.currentDisplay="world";let s=n??new Vs(0,64,0);this.worldView=new Yt(t,e,s),this.worldView.isPlayground=this.inWorldRenderingConfig.isPlayground;let o={version:this.resourcesManager?.currentConfig?.version??"1.20.4",worldView:this.worldView,inWorldRenderingConfig:this.inWorldRenderingConfig,playerStateReactive:i,rendererState:this.rendererState,nonReactiveState:this.nonReactiveState,resourcesManager:this.resourcesManager};this.onBeforeWorldStart?.();let a;if(this.backend){let v=this.backend.startWorld(o);v&&typeof v.then=="function"&&(a=v)}return this.currentState={method:"startWorld",args:[o]},await a,this.resolveWorldReady(),this.onWorldStart?.(),!!a}startPanorama(){this.currentDisplay!=="menu"&&(this.backend&&(this.currentDisplay="menu",this.backend.startPanorama()),this.currentState={method:"startPanorama",args:[]})}resetBackend(t=!1){this.disconnectBackend(t),this.backendLoader&&this.loadBackend(this.backendLoader)}disconnectBackend(t=!1){t&&(this.currentState=void 0,this.currentDisplay=null,this.worldView=void 0),this.backend&&(this.backend.disconnect(),this.backend=void 0),this.currentDisplay=null,this.initWorldReadyPromise(),this.rendererState=Yn(Wt().reactive),this.nonReactiveState=Wt().nonReactive}updateCamera(t,e,i){this.backend?.updateCamera(t,e,i)}setRendering(t){this.backend?.setRendering(t)}async startWithBot(t,e){await this.startWorld(t.world,e),this.worldView&&typeof this.worldView.listenToBot=="function"&&this.worldView.listenToBot(t)}destroyAll(){this.disconnectBackend(!0),this.resourcesManager&&typeof this.resourcesManager.destroy=="function"&&this.resourcesManager.destroy()}get utils(){let t=this.backend;return{async waitingForChunks(){if(!t?.worldState?.allChunksLoaded)return new Promise(e=>{let i=setInterval(()=>{t?.worldState?.allChunksLoaded&&(clearInterval(i),e())},100)})}}}destroy(){this.disconnectBackend(!0)}};x();R();T();k();import{proxy as js}from"valtio";var Kn=()=>js({playerSkin:void 0,inWater:!1,waterBreathing:!1,backgroundColor:[0,0,0],ambientLight:0,directionalLight:0,eyeHeight:0,gameMode:void 0,lookingAtBlock:void 0,diggingBlock:void 0,movementState:"NOT_MOVING",onGround:!0,sneaking:!1,flying:!1,sprinting:!1,walkDist:0,prevWalkDist:0,bob:0,prevBob:0,itemUsageTicks:0,username:"",onlineMode:!1,cardinalLight:"default",lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,cameraSpectatingEntity:void 0,team:void 0}),Ys=r=>({isSpectator(){return r.gameMode==="spectator"},isSpectatingEntity(){return r.cameraSpectatingEntity!==void 0&&r.gameMode==="spectator"},isThirdPerson(){return this.isSpectatingEntity()?!1:r.perspective==="third_person_back"||r.perspective==="third_person_front"}}),Qs=()=>({reactive:Kn()}),Jn=(r,t,e)=>({...t,"minecraft:date":new Date});x();R();T();k();x();R();T();k();import*as g5 from"three";import{Vec3 as bv}from"vec3";x();R();T();k();import{proxy as Ks,getVersion as Zn,subscribe as Xn}from"valtio";import{Vec3 as $n}from"vec3";function tr(r,t){let e=t??globalThis;return e.addEventListener("message",i=>{let{type:n,args:s,msgId:o}=i.data;if(r[n]){let a=r[n](...s);a instanceof Promise&&a.then(v=>{e.postMessage({type:"result",msgId:o,args:[v]})})}}),null}var er=(r,t=!0)=>{let e=0;return new Proxy({},{get(i,n){return n==="transfer"?(...s)=>new Proxy({},{get(o,a){return(...v)=>{r.postMessage({type:a,args:v},s)}}}):(...s)=>{let o=e++,a=t?s.filter(v=>v instanceof ArrayBuffer||v instanceof MessagePort||typeof ImageBitmap<"u"&&v instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&v instanceof OffscreenCanvas||typeof ImageData<"u"&&v instanceof ImageData):[];return r.postMessage({type:n,msgId:o,args:s},a),{then(v){let l=({data:c})=>{c.type==="result"&&c.msgId===o&&(v(c.args[0]),r.removeEventListener("message",l))};r.addEventListener("message",l)}}}}})};var ir=(r,t,e,i)=>{try{e.postMessage({type:"sync",syncId:r,value:S5(t)}),Ue.toWorker++,globalThis.debugSyncMessagesOutgoing??(globalThis.debugSyncMessagesOutgoing=0),globalThis.debugSyncMessagesOutgoing++}catch{Ge(t)}},Ue={toWorker:0,fromWorker:0};typeof window<"u"&&setInterval(()=>{globalThis.debugWorkerSyncStats={...Ue},Ue.toWorker=0,Ue.fromWorker=0},1e3);var Js=()=>Math.random().toString(36).slice(2,15)+Math.random().toString(36).slice(2,15),qn=(r,t,e,i,n)=>{if(!r.__syncToWorker&&!r.__syncFromWorker&&!i)return;let s=Js();if(r.__syncId=s,r.__syncToWorker||i){let o=()=>{ir(s,t,e,`toWorker:${n}`)};i&&Xn(t,o);let a=r.__syncToWorkerInterval??0;a>0&&setInterval(o,a)}t.__syncFromWorker&&e.addEventListener("message",o=>{o.data.type==="sync"&&o.data.syncId===s&&(Ue.fromWorker++,Object.assign(t,o.data.value))})},S5=r=>{if(Zn(r)===void 0)return r;if(Array.isArray(r))return r.map(S5);if(typeof r=="object"&&r!==null){let t={};for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=S5(r[e]));return t}return r},C5=(r,t,e=!0,i=!0,n=!1)=>{var a,v;let s=r,o={};for(let l in r)if(Object.prototype.hasOwnProperty.call(r,l)){if(e&&typeof r[l]=="function")continue;if(r[l]instanceof Date||r[l]instanceof RegExp||r[l]instanceof Map||r[l]instanceof WeakMap||r[l]instanceof WeakSet,r[l]instanceof Set){o[l]=[...r[l]],o[l].__restorer="Set";continue}if(r[l]instanceof $n){o[l]={x:r[l].x,y:r[l].y,z:r[l].z},o[l].__restorer="Vec3";continue}if(o[l]=r[l],typeof r[l]=="object"&&r[l]!==null){if(r[l].prepareForTransfer){o[l]=r[l].prepareForTransfer(t);continue}let c=Zn(r[l])!==void 0;o[l]=c?S5(r[l]):r[l];let d=r[l].__syncToWorker!==!1&&!n&&c&&!r[l].__syncFromWorker;if((a=o[l]).__syncToWorker??(a.__syncToWorker=d),c&&((v=o[l]).__valtio??(v.__valtio=!0)),o[l].__syncToWorker&&c){qn(o[l],s[l],t,!0,l);continue}qn(o[l],s[l],t,!1,l),o[l]=C5(o[l],t,e,!1,c)}}return o},Ge=(r,t=[])=>{for(let e in r)if(Object.prototype.hasOwnProperty.call(r,e)){if(!r[e])continue;typeof r[e]=="object"&&r[e]!==null&&Ge(r[e],[...t,e]);try{structuredClone(r[e])}catch{}}},qs=(r,t,e)=>{if(!r.__syncId)return;let i=r.__syncId;if(r.__syncToWorker&&t.addEventListener("message",n=>{n.data.type==="sync"&&n.data.syncId===i&&Object.assign(r,n.data.value)}),r.__syncFromWorker){let n=()=>{ir(i,r,t,`fromWorker:${e}`)};r.__valtio&&Xn(r,n);let s=r.__syncFromWorkerInterval??0;s>0&&setInterval(n,s)}},Zs=[{restorerName:"Set",restoreTransferred(r,t){return new Set(r)}},{restorerName:"Vec3",restoreTransferred(r,t){return new $n(r.x,r.y,r.z)}}];var P5=(r,t,e,i=!0)=>{let n=[...Zs,...t];for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s)){if(!r[s])continue;if(typeof r[s]=="object"&&r[s]!==null&&P5(r[s],n,e,i),r[s].__restorer){let o=n.find(a=>a.restorerName?a.restorerName===r[s].__restorer:a.name===r[s].__restorer);if(o)r[s]=o.restoreTransferred(r[s],e);else{let a=new Error(`Restorer ${r[s].__restorer} not found`);if(typeof i=="function")i(a);else if(i)throw a}}r[s].__valtio&&(r[s]=Ks(r[s])),qs(r[s],e,s)}return r};x();R();T();k();var B5=class{constructor(t){this.nonReactiveState=t;u(this,"events",[]);u(this,"frozenEvents",[]);u(this,"lastSecondEvents",[]);u(this,"currentFrameStartTime",null);u(this,"lastInteractionTime",0);u(this,"lastSecondUpdateTime",0);u(this,"timeWindowMs",5e3);u(this,"lastSecondWindowMs",1e3);u(this,"maxEvents",500);u(this,"lastSecondUpdateInterval",1e3);this.nonReactiveState.renderer||(this.nonReactiveState.renderer={timeline:{live:[],frozen:[],lastSecond:[]}}),this.nonReactiveState.renderer.timeline||(this.nonReactiveState.renderer.timeline={live:[],frozen:[],lastSecond:[]}),setInterval(()=>{this.updateLastSecondTimeline()},this.lastSecondUpdateInterval)}markFrameStart(){this.currentFrameStartTime=performance.now(),this.addEvent({type:"frameStart",timestamp:this.currentFrameStartTime})}markFrameEnd(){if(!this.currentFrameStartTime)return;let t=performance.now(),e=t-this.currentFrameStartTime;this.addEvent({type:"frameEnd",timestamp:t,duration:e}),this.currentFrameStartTime=null}markCameraUpdate(t){if(!t)return;let e=performance.now();this.lastInteractionTime=e,this.addEvent({type:"cameraUpdate",timestamp:e}),this.frozenEvents=[...this.events],this.trimEvents(this.frozenEvents),this.syncFrozenEvents()}markFrameDisplay(){this.addEvent({type:"frameDisplay",timestamp:performance.now()})}addEvent(t){this.events.push(t),this.lastSecondEvents.push(t),this.trimEvents(this.events),this.trimLastSecondEvents(),this.syncLiveEvents()}trimEvents(t){let i=performance.now()-this.timeWindowMs;for(;t.length>0&&t[0].timestamp<i;)t.shift();t.length>this.maxEvents&&t.splice(0,t.length-this.maxEvents)}trimLastSecondEvents(){let e=performance.now()-this.lastSecondWindowMs;for(;this.lastSecondEvents.length>0&&this.lastSecondEvents[0].timestamp<e;)this.lastSecondEvents.shift()}updateLastSecondTimeline(){let t=performance.now();t-this.lastSecondUpdateTime<this.lastSecondUpdateInterval||(this.lastSecondUpdateTime=t,this.trimLastSecondEvents(),this.syncLastSecondEvents())}syncLiveEvents(){this.nonReactiveState.renderer.timeline.live=[...this.events]}syncFrozenEvents(){this.nonReactiveState.renderer.timeline.frozen=[...this.frozenEvents]}syncLastSecondEvents(){this.nonReactiveState.renderer.timeline.lastSecond=[...this.lastSecondEvents]}clear(){this.events=[],this.frozenEvents=[],this.lastSecondEvents=[],this.syncLiveEvents(),this.syncFrozenEvents(),this.syncLastSecondEvents()}};x();R();T();k();import*as Y from"three";import{Vec3 as Ht}from"vec3";import $8 from"prismarine-chat";x();R();T();k();var k0=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return this.None(r)},Out:function(r){return this.None(r)},InOut:function(r){return this.None(r)}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-k0.Bounce.Out(1-r)},Out:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},InOut:function(r){return r<.5?k0.Bounce.In(r*2)*.5:k0.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),We=function(){return performance.now()},ce=function(){function r(){this._tweens={},this._tweensAddedDuringUpdate={}}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},r.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},r.prototype.update=function(t,e){t===void 0&&(t=We()),e===void 0&&(e=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n<i.length;n++){var s=this._tweens[i[n]],o=!e;s&&s.update(t,o)===!1&&!e&&delete this._tweens[i[n]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},r}(),le={Linear:function(r,t){var e=r.length-1,i=e*t,n=Math.floor(i),s=le.Utils.Linear;return t<0?s(r[0],r[1],i):t>1?s(r[e],r[e-1],e-i):s(r[n],r[n+1>e?e:n+1],i-n)},Bezier:function(r,t){for(var e=0,i=r.length-1,n=Math.pow,s=le.Utils.Bernstein,o=0;o<=i;o++)e+=n(1-t,i-o)*n(t,o)*r[o]*s(i,o);return e},CatmullRom:function(r,t){var e=r.length-1,i=e*t,n=Math.floor(i),s=le.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(n=Math.floor(i=e*(1+t))),s(r[(n-1+e)%e],r[n],r[(n+1)%e],r[(n+2)%e],i-n)):t<0?r[0]-(s(r[0],r[0],r[1],r[1],-i)-r[0]):t>1?r[e]-(s(r[e],r[e],r[e-1],r[e-1],i-e)-r[e]):s(r[n?n-1:0],r[n],r[e<n+1?e:n+1],r[e<n+2?e:n+2],i-n)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=le.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var i=t;i>1;i--)e*=i;return r[t]=e,e}}(),CatmullRom:function(r,t,e,i,n){var s=(e-r)*.5,o=(i-t)*.5,a=n*n,v=n*a;return(2*t-2*e+s+o)*v+(-3*t+3*e-2*s-o)*a+s*n+t}}},nr=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),O1=new ce,S0=function(){function r(t,e){e===void 0&&(e=O1),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=k0.Linear.None,this._interpolationFunction=le.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=nr.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=We()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var n={};for(var s in this._valuesEnd)n[s]=this._valuesEnd[s];this._valuesEnd=n}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,i,n,s){for(var o in i){var a=t[o],v=Array.isArray(a),l=v?"array":typeof a,c=!v&&Array.isArray(i[o]);if(!(l==="undefined"||l==="function")){if(c){var d=i[o];if(d.length===0)continue;for(var h=[a],p=0,g=d.length;p<g;p+=1){var b=this._handleRelativeValue(a,d[p]);if(isNaN(b)){c=!1;break}h.push(b)}c&&(i[o]=h)}if((l==="object"||v)&&a&&!c){e[o]=v?[]:{};var A=a;for(var w in A)e[o][w]=A[w];n[o]=v?[]:{};var d=i[o];if(!this._isDynamic){var _={};for(var w in d)_[w]=d[w];i[o]=d=_}this._setupProperties(A,e[o],d,n[o],s)}else(typeof e[o]>"u"||s)&&(e[o]=a),v||(e[o]*=1),c?n[o]=i[o].slice().reverse():n[o]=e[o]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},r.prototype.pause=function(t){return t===void 0&&(t=We()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},r.prototype.resume=function(t){return t===void 0&&(t=We()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t===void 0&&(t=O1),this._group=t,this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=k0.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=le.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){if(t===void 0&&(t=We()),e===void 0&&(e=!0),this._isPaused)return!0;var i,n,s=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>s)return!1;e&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=this._duration===0||n>1?1:n;var o=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),n===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,v=this._chainedTweens.length;a<v;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,i,n){for(var s in i)if(e[s]!==void 0){var o=e[s]||0,a=i[s],v=Array.isArray(t[s]),l=Array.isArray(a),c=!v&&l;c?t[s]=this._interpolationFunction(a,n):typeof a=="object"&&a?this._updateProperties(t[s],o,a,n):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[s]=o+(a-o)*n))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r}();var lc=nr.nextId,at=O1,cc=at.getAll.bind(at),dc=at.removeAll.bind(at),uc=at.add.bind(at),fc=at.remove.bind(at),rr=at.update.bind(at);x();R();T();k();x();R();T();k();var Xs=()=>{if(typeof OffscreenCanvas>"u")return!1;try{let r=new OffscreenCanvas(1,1);return(r.getContext("webgl2")||r.getContext("webgl"))!==null}catch{return!1}},$s=Xs(),L0=(r,t)=>{if($s)return new OffscreenCanvas(r,t);let e=document.createElement("canvas");return e.width=r,e.height=t,e};async function I5(r){let e=await(await fetch(r)).blob();return createImageBitmap(e)}var to=(r,t)=>{try{return JSON.parse(r)}catch{return null}},eo={black:"#000000",dark_blue:"#0000AA",dark_green:"#00AA00",dark_aqua:"#00AAAA",dark_red:"#AA0000",dark_purple:"#AA00AA",gold:"#FFAA00",gray:"#AAAAAA",dark_gray:"#555555",blue:"#5555FF",green:"#55FF55",aqua:"#55FFFF",red:"#FF5555",light_purple:"#FF55FF",yellow:"#FFFF55",white:"#FFFFFF"},H5=(r,t,e,i=s=>{},n=(s,o)=>L0(s,o))=>{let a=[16,9],v=a[0]-a[1],l=v/16,c="front_text"in r?r.front_text.messages:[r.Text1,r.Text2,r.Text3,r.Text4];if(!c.some(g=>g!=="null"))return;let d=n(16*40,v*40),h=d.getContext("2d");i(h);let p=("front_text"in r?r.front_text.color:r.Color)||"black";for(let[g,b]of c.slice(0,4).entries())b!=="null"&&D1(b,e,d,64,p,64*(g+1)+(t?0:-8));return d},D1=(r,t,e,i,n,s=0)=>{let o=!1,a=typeof r=="string"&&(r?.startsWith("{")||r?.startsWith('"'))?to(r??'""',"sign text"):r;if(!a||typeof a!="object"&&typeof a!="string")return;let v=e.getContext("2d");if(!v)throw new Error("Could not get 2d context");v.imageSmoothingEnabled=!1,v.font=`${i}px mojangles`;let l=new t(a),c=[],d=!1,h="",p=s,g=[],b=(S,M)=>{S.text!==null&&S.text!==void 0&&S.text;let C=S.text===null||S.text===void 0?void 0:String(S.text),H={color:S.color??M?.color,underlined:S.underlined??M?.underlined,strikethrough:S.strikethrough??M?.strikethrough,bold:S.bold??M?.bold,italic:S.italic??M?.italic};if(d=d||H.underlined||H.strikethrough||!1,C?.includes(`
14
14
  `))for(let B of C.split(`
15
- `))A(B,H),p+=i,h="";else C&&A(C,H);if(S.extra)for(let B of S.extra)b(B,H)},A=(S,M)=>{o||(o=S.trim()!==""),h+=S,g[p]=v.measureText(h).width;let C=M.color??n;C.startsWith("#")||(C=eo[C.toLowerCase()]||C),c.push({fontStyle:`${M.bold?"bold":""} ${M.italic?"italic":""}`,fillStyle:C,underlineStyle:M.underlined??!1,strikeStyle:M.strikethrough??!1,offset:p,text:S})};if(b(l),!d&&!l.toString().trim())return;let w=0,_=0;for(let{fillStyle:S,fontStyle:M,underlineStyle:C,strikeStyle:H,offset:B,text:I}of c){_!==B&&(w=0),_=B,v.fillStyle=S,v.textRendering="optimizeLegibility",v.font=`${M} ${i}px mojangles`;let W=g[B]??v.measureText(I).width,z=(e.width-W)/2+w;v.fillText(I,z,B),H&&(v.lineWidth=i/8,v.strokeStyle=S,v.beginPath(),v.moveTo(z,B-v.lineWidth*2.5),v.lineTo(z+v.measureText(I).width,B-v.lineWidth*2.5),v.stroke()),C&&(v.lineWidth=i/8,v.strokeStyle=S,v.beginPath(),v.moveTo(z,B+v.lineWidth),v.lineTo(z+v.measureText(I).width,B+v.lineWidth),v.stroke()),w+=v.measureText(I).width}return o};x();R();T();k();function de(r){let t=Math.floor(r.x/16),e=Math.floor(r.z/16);return[t,e]}function D1(r){let t=Math.floor(r.x/16),e=Math.floor(r.y/16),i=Math.floor(r.z/16);return[t,e,i]}x();R();T();k();import{Vec3 as je}from"vec3";import{subscribeKey as $1}from"valtio/utils";import{proxy as fo,subscribe as ho}from"valtio";x();R();T();k();var Ne={blocks:"blocksArray",blockCollisionShapes:"blockCollisionShapes",biomes:"biomesArray"};x();R();T();k();var rr=16;var sr=(r,t)=>t?`${r}:${t}`:String(r);x();R();T();k();x();R();T();k();var U1=ze(or(),1);import*as O5 from"three";x();R();T();k();x();R();T();k();var H5=class{constructor(t,e,i){this.name=t,this.fg=e,this.bg=i,this.PR=Math.round(window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=document.createElement("canvas"),this.canvas.width=90*this.PR,this.canvas.height=48*this.PR,this.canvas.style.width="90px",this.canvas.style.position="absolute",this.canvas.style.height="48px",this.canvas.style.cssText="width:90px;height:48px",this.context=this.canvas.getContext("2d"),this.context&&(this.context.font="bold "+9*this.PR+"px Helvetica,Arial,sans-serif",this.context.textBaseline="top",this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(t,e,i,n,s=0){let o=1/0,a=0;this.context&&(o=Math.min(o,t),a=Math.max(i,t),n=Math.max(n,e),this.context.fillStyle=this.bg,this.context.globalAlpha=1,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(t.toFixed(s)+" "+this.name+" ("+o.toFixed(s)+"-"+parseFloat(a.toFixed(s))+")",this.TEXT_X,this.TEXT_Y),this.context.drawImage(this.canvas,this.GRAPH_X+this.PR,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT,this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT),this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y,this.PR,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y,this.PR,(1-e/n)*this.GRAPH_HEIGHT))}};var ar=class z5{constructor({logsPerSecond:t=20,samplesLog:e=100,samplesGraph:i=10,precision:n=2,minimal:s=!1,horizontal:o=!0,mode:a=0}={}){this.mode=a,this.horizontal=o,this.container=document.createElement("div"),this.container.style.cssText="position:fixed;top:0;left:0;opacity:0.9;z-index:10000;",s&&(this.container.style.cssText+="cursor:pointer"),this.gl=null,this.query=null,this.minimal=s,this.beginTime=(performance||Date).now(),this.prevTime=this.beginTime,this.prevCpuTime=this.beginTime,this.frames=0,this.averageCpu={logs:[],graph:[]},this.averageGpu={logs:[],graph:[]},this.queryCreated=!1,this.fpsPanel=this.addPanel(new z5.Panel("FPS","#0ff","#002"),0),this.msPanel=this.addPanel(new z5.Panel("CPU","#0f0","#020"),1),this.gpuPanel=null,this.samplesLog=e,this.samplesGraph=i,this.precision=n,this.logsPerSecond=t,this.minimal?(this.container.addEventListener("click",v=>{v.preventDefault(),this.showPanel(++this.mode%this.container.children.length)},!1),this.mode=a,this.showPanel(this.mode)):window.addEventListener("resize",()=>{this.resizePanel(this.fpsPanel,0),this.resizePanel(this.msPanel,1),this.gpuPanel&&this.resizePanel(this.gpuPanel,2)})}resizePanel(t,e){t.canvas.style.position="absolute",this.minimal?t.canvas.style.display="none":(t.canvas.style.display="block",this.horizontal?(t.canvas.style.top="0px",t.canvas.style.left=e*t.WIDTH/t.PR+"px"):(t.canvas.style.left="0px",t.canvas.style.top=e*t.HEIGHT/t.PR+"px"))}addPanel(t,e){return t.canvas&&(this.container.appendChild(t.canvas),this.resizePanel(t,e)),t}showPanel(t){for(let e=0;e<this.container.children.length;e++){let i=this.container.children[e];i.style.display=e===t?"block":"none"}this.mode=t}init(t){if(t){if(t instanceof WebGL2RenderingContext)this.gl=t;else if(t instanceof HTMLCanvasElement||t instanceof OffscreenCanvas){if(this.gl=t.getContext("webgl2"),!this.gl)return}else return;this.ext=this.gl.getExtension("EXT_disjoint_timer_query_webgl2"),this.ext&&(this.gpuPanel=this.addPanel(new z5.Panel("GPU","#ff0","#220"),2))}}begin(){if(this.beginProfiling("cpu-started"),!(!this.gl||!this.ext)){if(this.query){let t=this.gl.getQueryParameter(this.query,this.gl.QUERY_RESULT_AVAILABLE);if(this.disjoint=this.gl.getParameter(this.ext.GPU_DISJOINT_EXT),t&&!this.disjoint){this.ns=this.gl.getQueryParameter(this.query,this.gl.QUERY_RESULT);let e=this.ns*1e-6;(t||this.disjoint)&&(this.gl.deleteQuery(this.query),this.query=null),t&&this.addToAverage(e,this.averageGpu)}}this.query||(this.queryCreated=!0,this.query=this.gl.createQuery(),this.query&&this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,this.query))}}end(){this.beginTime=this.endInternal(),this.endProfiling("cpu-started","cpu-finished","cpu-duration",this.averageCpu),!(!this.gl||!this.ext)&&this.queryCreated&&this.gl.getQuery(this.ext.TIME_ELAPSED_EXT,this.gl.CURRENT_QUERY)&&this.gl.endQuery(this.ext.TIME_ELAPSED_EXT)}endInternal(){this.frames++;let t=(performance||Date).now();if(t>=this.prevCpuTime+1e3/this.logsPerSecond&&(this.updatePanel(this.msPanel,this.averageCpu),this.updatePanel(this.gpuPanel,this.averageGpu),this.prevCpuTime=t),t>=this.prevTime+1e3){let e=this.frames*1e3/(t-this.prevTime);this.fpsPanel.update(e,e,100,100,0),this.prevTime=t,this.frames=0}return t}addToAverage(t,e){e.logs.push(t),e.logs.length>this.samplesLog&&e.logs.shift(),e.graph.push(t),e.graph.length>this.samplesGraph&&e.graph.shift()}beginProfiling(t){window.performance&&window.performance.mark(t)}endProfiling(t,e,i,n){if(window.performance&&e){window.performance.mark(e);let s=performance.measure(i,t,e);this.addToAverage(s.duration,n)}}updatePanel(t,e){if(e.logs.length>0){let i=0,n=.01;for(let a=0;a<e.logs.length;a++)i+=e.logs[a],e.logs[a]>n&&(n=e.logs[a]);let s=0,o=.01;for(let a=0;a<e.graph.length;a++)s+=e.graph[a],e.graph[a]>o&&(o=e.graph[a]);t&&t.update(i/Math.min(e.logs.length,this.samplesLog),s/Math.min(e.graph.length,this.samplesGraph),n,o,this.precision)}}};ar.Panel=H5;var vr=ar;var _0=typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope,G1=class{constructor(t,e=0){this.canvas=t;u(this,"stats");u(this,"stats2");u(this,"statsGl");u(this,"total",0);u(this,"denseMode");this.stats=new U1.default,this.stats2=new U1.default,this.statsGl=new vr({minimal:!0}),this.stats2.showPanel(2),this.denseMode=typeof D<"u"&&!0||typeof window<"u"&&window.innerHeight<500,this.initStats(),this.setVisibility(e)}addStat(t,e=80){t.style.position="absolute",this.denseMode&&(t.style.height="12px"),t.style.overflow="hidden",t.style.left="",t.style.top="0",t.style.right=`${this.total}px`,t.style.width="80px",t.style.zIndex="1",t.style.opacity="0.8";let i=document.getElementById("corner-indicator-stats"),n=i??document.body;i&&(t.style.position="relative"),n.appendChild(t),this.total+=e}initStats(){let t=this.stats2.dom.children.length===3;this.addStat(this.stats.dom),t&&this.addStat(this.stats2.dom),this.statsGl.init(this.canvas),this.statsGl.container.style.display="flex",this.statsGl.container.style.justifyContent="flex-end";let e=0;for(let i of this.statsGl.container.children){let n=i;e++===0&&(n.style.display="none"),n.style.position=""}}setVisibility(t){t>0?(this.stats.dom.style.display="block",this.stats2.dom.style.display=t>=2?"block":"none",this.statsGl.container.style.display=t>=2?"block":"none"):(this.stats.dom.style.display="none",this.stats2.dom.style.display="none",this.statsGl.container.style.display="none")}markStart(){this.stats.begin(),this.stats2.begin(),this.statsGl.begin()}markEnd(){this.stats.end(),this.stats2.end(),this.statsGl.end()}dispose(){this.stats.dom.remove(),this.stats2.dom.remove(),this.statsGl.container.remove()}},Ve=class{constructor(t,e,i){this.initOptions=t;this.externalCanvas=e;u(this,"canvas");u(this,"renderer");u(this,"animationFrameId");u(this,"timeoutId");u(this,"lastRenderTime",0);u(this,"previousCanvasWidth",0);u(this,"previousCanvasHeight",0);u(this,"currentWidth",0);u(this,"currentHeight",0);u(this,"pendingResize",!1);u(this,"renderedFps",0);u(this,"fpsInterval");u(this,"stats");u(this,"paused",!1);u(this,"disconnected",!1);u(this,"preRender",()=>{});u(this,"render",t=>{});u(this,"postRender",()=>{});u(this,"sizeChanged",()=>{});u(this,"droppedFpsPercentage",0);u(this,"config");u(this,"onRender",[]);u(this,"inWorldRenderingConfig");u(this,"nonReactiveState");this.config=t.config,e?this.canvas=e:this.addToPage();try{this.renderer=new O5.WebGLRenderer({canvas:this.canvas,preserveDrawingBuffer:!0,logarithmicDepthBuffer:!0,powerPreference:this.config.powerPreference})}catch(s){throw t.callbacks.displayCriticalError(new Error(`Failed to create WebGL context, not possible to render (restart browser): ${s.message}`)),s}this.renderer.useLegacyLights=!0,this.renderer.outputColorSpace=O5.LinearSRGBColorSpace,e||(this.updatePixelRatio(),this.setupResizeListener()),this.sizeUpdated(),this.previousCanvasWidth=this.canvas.width,this.previousCanvasHeight=this.canvas.height;let n="WebGL2RenderingContext"in globalThis;!e&&n&&!_0&&(this.stats=new G1(this.canvas,this.config.statsVisible)),this.setupFpsTracking(),this.startRenderLoop()}setupResizeListener(){if(typeof window>"u")return;let t,e=()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.pendingResize=!0},16)};window.addEventListener("resize",e,{passive:!0})}updatePixelRatio(){if(typeof window>"u")return;let t=window.devicePixelRatio||1;this.renderer.capabilities.isWebGL2||(t=1),this.renderer.setPixelRatio(t)}sizeUpdated(){this.renderer.setSize(this.currentWidth,this.currentHeight,!1)}addToPage(){this.canvas=lr(),this.updateCanvasSize()}updateSizeExternal(t,e,i){this.currentWidth=t,this.currentHeight=e,this.renderer.setPixelRatio(i),this.sizeUpdated()}updateCanvasSize(){if(this.externalCanvas||typeof document>"u")return;let t=document.body.offsetWidth,e=document.body.offsetHeight;this.currentWidth!==t&&(this.currentWidth=t),this.currentHeight!==e&&(this.currentHeight=e)}setupFpsTracking(){let t=0;this.fpsInterval=setInterval(()=>{t>0&&(this.droppedFpsPercentage=this.renderedFps/t),t=Math.max(this.renderedFps,t),this.nonReactiveState&&(this.nonReactiveState.fps=this.renderedFps),this.renderedFps=0},1e3)}startRenderLoop(){let t=()=>{if(this.disconnected)return;if(this.config.timeoutRendering){let n=1e3/(this.config.fpsLimit?Math.min(this.config.fpsLimit,60):60);this.timeoutId=setTimeout(t,n)}else this.animationFrameId=requestAnimationFrame(t);if(this.paused||this.renderer.xr.isPresenting&&!this.inWorldRenderingConfig?.vrPageGameRendering)return;if(!this.config.timeoutRendering&&this.config.fpsLimit){let i=performance.now(),n=i-this.lastRenderTime,s=1e3/this.config.fpsLimit;if(n<s)return;this.lastRenderTime=i-n%s}let e=!1;this.pendingResize&&(this.updateCanvasSize(),this.pendingResize=!1),(this.previousCanvasWidth!==this.currentWidth||this.previousCanvasHeight!==this.currentHeight)&&(this.previousCanvasWidth=this.currentWidth,this.previousCanvasHeight=this.currentHeight,this.sizeUpdated(),e=!0),this.frameRender(e),this.config.statsVisible!==void 0&&this.stats?.setVisibility(this.config.statsVisible)};t()}frameRender(t){this.preRender(),this.stats?.markStart(),nr(),globalThis.freezeRender||this.render(t);for(let e of this.onRender)e(t);this.renderedFps++,this.stats?.markEnd(),this.postRender()}setPaused(t){this.paused=t}dispose(){this.disconnected=!0,this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.timeoutId&&clearTimeout(this.timeoutId),this.canvas instanceof HTMLCanvasElement&&this.canvas.remove(),clearInterval(this.fpsInterval),this.stats?.dispose(),this.renderer.dispose()}};function lr(){let r=document.createElement("canvas");return r.id="viewer-canvas",document.body.appendChild(r),r}var W1=()=>{let r=lr(),t=r.transferControlToOffscreen(),e=!1,i=(o,a)=>{},n={width:0,height:0},s=()=>{e||((n.width!==window.innerWidth||n.height!==window.innerHeight)&&(i(window.innerWidth,window.innerHeight),n={width:window.innerWidth,height:window.innerHeight}),requestAnimationFrame(s))};return requestAnimationFrame(s),{canvas:t,destroy(){e=!0,r.remove()},onSizeChanged(o){i=o},get size(){return{width:window.innerWidth,height:window.innerHeight}}}};var cr=0,pt={},N1=40,ue=(r,t=80,e=cr,i=N1)=>{if(_0)return{updateText(){},setVisibility(){}};let n=document.createElement("div");return n.style.position="fixed",n.style.top=`${i??N1}px`,n.style.right=`${e}px`,n.style.backgroundColor="rgba(0, 0, 0, 0.7)",n.style.color="white",n.style.padding="2px",n.style.fontFamily="monospace",n.style.fontSize="12px",n.style.zIndex="100",n.style.pointerEvents="none",document.body.appendChild(n),pt[r]=n,i===void 0&&e===cr&&(N1+=20),{updateText(s){n.innerText!==s&&(n.innerText=s)},setVisibility(s){n.style.display=s?"block":"none"}}};var V1=(r,t)=>{_0||!pt[r]||(pt[r].innerText=t)},dr=r=>{if(!_0)for(let t in pt)pt[t].style.display=r?"block":"none"},ur=()=>{if(!_0)for(let r in pt)io(r)},io=r=>{_0||!pt[r]||(pt[r].remove(),delete pt[r])};x();R();T();k();x();R();T();k();x();R();T();k();x();R();T();k();function j1(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let a=0;a<n;a++){let v=(o+a*i)*4;if(s.data[v+3]!==255)return!0}return!1}function D5(r){return r/64}function fr(r,t,e){if(e){if(j1(r,0,0,t,t))return}else if(j1(r,0,0,t,t/2))return;let i=D5(t),n=(s,o,a,v)=>r.clearRect(s*i,o*i,a*i,v*i);n(40,0,8,8),n(48,0,8,8),n(32,8,8,8),n(40,8,8,8),n(48,8,8,8),n(56,8,8,8),e&&(n(4,32,4,4),n(8,32,4,4),n(0,36,4,12),n(4,36,4,12),n(8,36,4,12),n(12,36,4,12),n(20,32,8,4),n(28,32,8,4),n(16,36,4,12),n(20,36,8,12),n(28,36,4,12),n(32,36,8,12),n(44,32,4,4),n(48,32,4,4),n(40,36,4,12),n(44,36,4,12),n(48,36,4,12),n(52,36,12,12),n(4,48,4,4),n(8,48,4,4),n(0,52,4,12),n(4,52,4,12),n(8,52,4,12),n(12,52,4,12),n(52,48,4,4),n(56,48,4,4),n(48,52,4,12),n(52,52,4,12),n(56,52,4,12),n(60,52,4,12))}function no(r,t){r.save(),r.scale(-1,1);let e=D5(t),i=(n,s,o,a,v,l)=>r.drawImage(r.canvas,n*e,s*e,o*e,a*e,-v*e,l*e,-o*e,a*e);i(4,16,4,4,20,48),i(8,16,4,4,24,48),i(0,20,4,12,24,52),i(4,20,4,12,20,52),i(8,20,4,12,16,52),i(12,20,4,12,28,52),i(44,16,4,4,36,48),i(48,16,4,4,40,48),i(40,20,4,12,40,52),i(44,20,4,12,36,52),i(48,20,4,12,32,52),i(52,20,4,12,44,52),r.restore()}function Y1(r,t){let e=!1;if(t.width!==t.height)if(t.width===2*t.height)e=!0;else throw new Error(`Bad skin size: ${t.width}x${t.height}`);let i=r.getContext("2d",{willReadFrequently:!0});if(e){let n=t.width;r.width=n,r.height=n,i.clearRect(0,0,n,n),i.drawImage(t,0,0,n,n/2),no(i,n),fr(i,r.width,!1)}else r.width=t.width,r.height=t.height,i.clearRect(0,0,t.width,t.height),i.drawImage(t,0,0,r.width,r.height),fr(i,r.width,!0)}function ro(r){if(r.width===2*r.height)return r.width/64;if(r.width*17===r.height*22)return r.width/22;if(r.width*11===r.height*23)return r.width/46;throw new Error(`Bad cape size: ${r.width}x${r.height}`)}function Q1(r,t){let e=ro(t);r.width=64*e,r.height=32*e;let i=r.getContext("2d",{willReadFrequently:!0});i.clearRect(0,0,r.width,r.height),i.drawImage(t,0,0,t.width,t.height)}function so(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let a=0;a<n;a++){let v=(o+a*i)*4;if(!(s.data[v+0]===0&&s.data[v+1]===0&&s.data[v+2]===0&&s.data[v+3]===255))return!1}return!0}function oo(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let a=0;a<n;a++){let v=(o+a*i)*4;if(!(s.data[v+0]===255&&s.data[v+1]===255&&s.data[v+2]===255&&s.data[v+3]===255))return!1}return!0}function K1(r){let t=D5(r.width),e=r.getContext("2d",{willReadFrequently:!0}),i=(a,v,l,c)=>j1(e,a*t,v*t,l*t,c*t),n=(a,v,l,c)=>so(e,a*t,v*t,l*t,c*t),s=(a,v,l,c)=>oo(e,a*t,v*t,l*t,c*t);return i(50,16,2,4)||i(54,20,2,12)||i(42,48,2,4)||i(46,52,2,12)||n(50,16,2,4)&&n(54,20,2,12)&&n(42,48,2,4)&&n(46,52,2,12)||s(50,16,2,4)&&s(54,20,2,12)&&s(42,48,2,4)&&s(46,52,2,12)?"slim":"default"}function J1(r,t){if(t.width!==t.height&&t.width!==2*t.height)throw new Error(`Bad skin size: ${t.width}x${t.height}`);let e=D5(t.width),i=14*e,n=7*e;r.width=i,r.height=n;let s=r.getContext("2d",{willReadFrequently:!0});s.clearRect(0,0,i,n),s.drawImage(t,24*e,0,i,n,0,0,i,n)}x();R();T();k();import ao from"mc-assets/dist/other-textures/latest/entity/player/wide/steve.png";x();R();T();k();import*as gt from"three";var A0=(r,t=!1)=>{r instanceof gt.Mesh&&(r.geometry?.dispose?.(),r.material?.dispose?.()),r.children&&r.children.forEach(e=>A0(e,t)),t&&r instanceof gt.Mesh&&r.material?.map?.dispose?.()},q1={},hr={},L5=r=>{let t=new gt.Texture,e=B5(r).then(i=>{let n=new OffscreenCanvas(i.width,i.height);return n.getContext("2d").drawImage(i,0,0),t.source.data=n,t.needsUpdate=!0,t});return{texture:t,promise:e}},kt=async r=>L5(r).texture,Z1=r=>{let t=L0(r.width,r.height);t.getContext("2d").drawImage(r,0,0);let i=new gt.Texture(t);return i.magFilter=gt.NearestFilter,i.minFilter=gt.NearestFilter,i};async function F5(r,t,e){if(!q1[r]){let{promise:n,resolve:s}=Promise.withResolvers(),o=L5(r);q1[r]=o.texture,o.promise.then(s),hr[r]=n}t(q1[r]),hr[r].then(()=>{e?.()})}var vt=ao,Zd=kt(vt),mr={apiEnabled:!0},pr=r=>{Object.assign(mr,r)};async function Tt(r,t){if(!mr.apiEnabled||t==="cape")return;let e=`https://playerdb.co/api/player/minecraft/${r}`,i=await fetch(e);return i.ok?(await i.json()).data.player.skin_texture:void 0}async function Qt(r){r.startsWith("data:")||(r=await vo(r.replace("http://","https://")));let t=await B5(r),e=L0(64,64);return Y1(e,t),{canvas:e,image:t}}var vo=async r=>{let e=await(await fetch(r,{})).arrayBuffer();return`data:image/png;base64,${L.from(e).toString("base64")}`};x();R();T();k();var lo=r=>{let t=r%24e3/24e3-.25;return t<0&&(t+=1),t>1&&(t-=1),t+(1-Math.cos(t*Math.PI))/2},co=r=>{let t=(r%24e3+24e3)%24e3,e=lo(t),n=Math.cos(e*Math.PI*2)*.5+.5,s=Math.round(4+n*11);return Math.max(4,Math.min(15,s))},X1=r=>{let t=(r%24e3+24e3)%24e3;if(t>=0&&t<12e3)return 15;if(t>=12e3&&t<13e3){let e=(t-12e3)/1e3;return Math.round(15-e*11)}else{if(t>=13e3&&t<23e3)return 4;{let e=(t-23e3)/1e3;return Math.round(4+e*11)}}},uo=()=>{let r=[{ticks:0,label:"6:00 AM (sunrise)"},{ticks:6e3,label:"12:00 PM (noon)"},{ticks:12e3,label:"6:00 PM (sunset starts)"},{ticks:12500,label:"6:30 PM (sunset mid)"},{ticks:13e3,label:"7:00 PM (night begins)"},{ticks:18e3,label:"12:00 AM (midnight)"},{ticks:19e3,label:"1:00 AM"},{ticks:23e3,label:"5:00 AM (dawn begins)"},{ticks:23500,label:"5:30 AM (dawn mid)"}];for(let{ticks:t,label:e}of r){let i=co(t),n=X1(t)}};typeof window<"u"&&(window.debugSkyLight=uo);function gr(r,t){return(r%t+t)%t}var bt=class bt{constructor(t,e,i){this.resourcesManager=t;this.displayOptions=e;this.initOptions=i;u(this,"worldReadyResolvers",Promise.withResolvers());u(this,"worldReadyPromise",this.worldReadyResolvers.promise);u(this,"timeOfTheDay",0);u(this,"worldSizeParams",{minY:0,worldHeight:256});u(this,"reactiveDebugParams",fo({stopRendering:!1,chunksRenderAboveOverride:void 0,chunksRenderAboveEnabled:!1,chunksRenderBelowOverride:void 0,chunksRenderBelowEnabled:!1,chunksRenderDistanceOverride:void 0,chunksRenderDistanceEnabled:!1,disableEntities:!1}));u(this,"active",!1);u(this,"loadedChunks",{});u(this,"finishedChunks",{});u(this,"finishedSections",{});u(this,"sectionsWaiting",new Map);u(this,"queuedChunks",new Set);u(this,"queuedFunctions",[]);u(this,"renderUpdateEmitter",new Nt);u(this,"customTexturesDataUrl");u(this,"workers",[]);u(this,"viewerChunkPosition");u(this,"lastViewerChunkGridX");u(this,"lastViewerChunkGridZ");u(this,"lastCamUpdate",0);u(this,"droppedFpsPercentage",0);u(this,"initialChunkLoadWasStartedIn");u(this,"initialChunksLoad",!0);u(this,"enableChunksLoadDelay",!1);u(this,"texturesVersion");u(this,"viewDistance",-1);u(this,"onRenderDistanceChanged");u(this,"chunksLength",0);u(this,"allChunksFinished",!1);u(this,"messageQueue",[]);u(this,"isProcessingQueue",!1);u(this,"ONMESSAGE_TIME_LIMIT",30);u(this,"handleResize",()=>{});u(this,"highestBlocksByChunks",new Map);u(this,"blockEntities",{});u(this,"workersProcessAverageTime",0);u(this,"workersProcessAverageTimeCount",0);u(this,"maxWorkersProcessTime",0);u(this,"workersPreAverageTime",0);u(this,"workersWasmAverageTime",0);u(this,"workersPostAverageTime",0);u(this,"workersPhaseSampleCount",0);u(this,"workersPreTargetConvertAverageTime",0);u(this,"workersPreNeighborConvertAverageTime",0);u(this,"workersPreNeighborCountAverage",0);u(this,"workersPreTypedArrayBuildAverageTime",0);u(this,"workersPreOtherAverageTime",0);u(this,"workersPreCacheHitsTotal",0);u(this,"workersPreCacheMissesTotal",0);u(this,"geometryReceiveCount",{});u(this,"allLoadedIn");u(this,"onWorldSwitched",[]);u(this,"renderTimeMax",0);u(this,"renderTimeAvg",0);u(this,"renderTimeAvgCount",0);u(this,"edgeChunks",{});u(this,"lastAddChunk",null);u(this,"neighborChunkUpdates",!0);u(this,"lastChunkDistance",0);u(this,"debugStopGeometryUpdate",!1);u(this,"protocolCustomBlocks",new Map);u(this,"heightmapDebounceTimers",new Map);u(this,"sectionDirtyCount",new Map);u(this,"sectionDirtyTimers",new Map);u(this,"sectionDirtyPendingArgs",new Map);u(this,"blockStateModelInfo",new Map);u(this,"worldBlockProvider");u(this,"soundSystem");u(this,"worldRendererConfig");u(this,"playerStateReactive");u(this,"playerStateUtils");u(this,"reactiveState");u(this,"mesherLogReader");u(this,"forceCallFromMesherReplayer",!1);u(this,"stopMesherMessagesProcessing",!1);u(this,"abortController",new AbortController);u(this,"lastRendered",0);u(this,"renderingActive",!0);u(this,"geometryReceiveCountPerSec",0);u(this,"mesherLogger",{contents:[],active:new URL(location.href).searchParams.get("mesherlog")==="true"});u(this,"currentRenderedFrames",0);u(this,"fpsAverage",0);u(this,"lastFps",0);u(this,"fpsWorst");u(this,"fpsSamples",0);u(this,"backendInfoReport","-");u(this,"chunksFullInfo","-");u(this,"workerCustomHandleTime",0);u(this,"queueAwaited",!1);u(this,"toWorkerMessagesQueue",{});this.snapshotInitialValues(),this.worldRendererConfig=e.inWorldRenderingConfig,this.playerStateReactive=e.playerStateReactive,this.playerStateUtils=Un(this.playerStateReactive),this.reactiveState=e.rendererState,this.renderUpdateEmitter.on("update",()=>{let o=Object.keys(this.finishedChunks).length;V1("loaded-chunks",`${o}/${this.chunksLength} chunks (${this.lastChunkDistance}/${this.viewDistance})`)}),ue("downloaded-chunks",100,140,20),this.connect(this.displayOptions.worldView);let n=setInterval(()=>{this.geometryReceiveCountPerSec=Object.values(this.geometryReceiveCount).reduce((o,a)=>o+a,0),this.geometryReceiveCount={},dr(this.displayAdvancedStats),this.updateChunksStats()},500),s=setInterval(()=>{this.fpsUpdate()},1e3);this.abortController.signal.addEventListener("abort",()=>{clearInterval(n),clearInterval(s)})}anyModuleRequiresHeightmap(){return!1}get version(){return this.displayOptions.version}get displayAdvancedStats(){return(this.initOptions.config.statsVisible??0)>1}fpsUpdate(){this.fpsSamples++,this.fpsAverage=(this.fpsAverage*(this.fpsSamples-1)+this.currentRenderedFrames)/this.fpsSamples,this.fpsWorst===void 0?this.fpsWorst=this.currentRenderedFrames:this.fpsWorst=Math.min(this.fpsWorst,this.currentRenderedFrames),this.lastFps=this.currentRenderedFrames,this.displayOptions.nonReactiveState.fps=this.currentRenderedFrames,this.displayOptions.nonReactiveState.worstRenderTime=this.renderTimeMax,this.displayOptions.nonReactiveState.avgRenderTime=this.renderTimeAvg,this.currentRenderedFrames=0}logWorkerWork(t){this.mesherLogger.active&&this.mesherLogger.contents.push(typeof t=="function"?t():t)}async init(){if(this.active)throw new Error("WorldRendererCommon is already initialized");await Promise.all([this.resetWorkers(),(async()=>{this.resourcesManager.currentResources?.allReady&&await this.updateAssetsData()})()]),this.resourcesManager.on("assetsTexturesUpdated",async()=>{this.active&&await this.updateAssetsData()}),this.watchReactivePlayerState(),this.watchReactiveConfig(),this.worldReadyResolvers.resolve()}snapshotInitialValues(){}wasChunkSentToWorker(t){return this.loadedChunks[t]}async getHighestBlocks(t){return this.highestBlocksByChunks.get(t)}updateCustomBlock(t,e,i){if(this.protocolCustomBlocks.set(t,{...this.protocolCustomBlocks.get(t),[e]:i}),this.logWorkerWork(()=>`-> updateCustomBlock ${t} ${e} ${i} ${this.wasChunkSentToWorker(t)}`),this.wasChunkSentToWorker(t)){let[n,s,o]=e.split(",").map(Number);this.setBlockStateId(new je(n,s,o),void 0)}}async getBlockInfo(t,e){let n=`${Math.floor(t.x/16)*16},${Math.floor(t.z/16)*16}`,s=this.protocolCustomBlocks.get(n)?.[`${t.x},${t.y},${t.z}`],o=sr(e,s),a=this.blockStateModelInfo.get(o);return{customBlockName:s,modelInfo:a}}initWorkers(t=this.worldRendererConfig.mesherWorkers){for(let e=0;e<t+0;e++){let i=mo(n=>{Array.isArray(n)?this.messageQueue.push(...n):this.messageQueue.push(n),this.processMessageQueue("worker")},this.worldRendererConfig.wasmMesher?"mesherWasm.js":"mesher.js");this.workers.push(i)}}onReactivePlayerStateUpdated(t,e,i=!0){return i&&e(this.playerStateReactive[t]),$1(this.playerStateReactive,t,e)}onReactiveConfigUpdated(t,e){e(this.worldRendererConfig[t]),t==="*"?ho(this.worldRendererConfig,e):$1(this.worldRendererConfig,t,e)}onReactiveDebugUpdated(t,e){e(this.reactiveDebugParams[t]),$1(this.reactiveDebugParams,t,e)}watchReactivePlayerState(){this.onReactivePlayerStateUpdated("backgroundColor",t=>{this.changeBackgroundColor(t)}),this.onReactivePlayerStateUpdated("cardinalLight",t=>{this.changeCardinalLight(t)})}watchReactiveConfig(){this.onReactiveConfigUpdated("fetchPlayerSkins",t=>{pr({apiEnabled:t})})}async processMessageQueue(t){if(this.isProcessingQueue||this.messageQueue.length===0)return;if(this.logWorkerWork(`# ${t} processing queue`),this.lastRendered&&performance.now()-this.lastRendered>this.ONMESSAGE_TIME_LIMIT&&this.worldRendererConfig._experimentalSmoothChunkLoading&&this.renderingActive){let n=performance.now();await new Promise(s=>{requestAnimationFrame(s)}),this.logWorkerWork(`# processing got delayed by ${performance.now()-n}ms`)}this.isProcessingQueue=!0;let e=performance.now(),i=0;for(;this.messageQueue.length>0;){let n=this.stopMesherMessagesProcessing;if(!n){let s=this.messageQueue.shift();this.handleMessage(s),i++}if(n||performance.now()-e>this.ONMESSAGE_TIME_LIMIT&&this.renderingActive&&this.worldRendererConfig._experimentalSmoothChunkLoading){if(this.messageQueue.length>0){requestAnimationFrame(async()=>{this.isProcessingQueue=!1,this.processMessageQueue("queue-delay")});return}break}}this.isProcessingQueue=!1}handleMessage(t){var i,n;let e=t;if(this.active){if(this.mesherLogReader?.workerMessageReceived(e.type,e),e.type!=="geometry"||!this.debugStopGeometryUpdate){let s=performance.now();this.handleWorkerMessage(e),this.workerCustomHandleTime+=performance.now()-s}if(e.type==="geometry"){this.logWorkerWork(()=>`-> ${e.workerIndex} geometry ${e.key} ${JSON.stringify({dataSize:JSON.stringify(e).length})}`),(i=this.geometryReceiveCount)[n=e.workerIndex]??(i[n]=0),this.geometryReceiveCount[e.workerIndex]++;let s=e.key.split(",").map(Number);this.lastChunkDistance=Math.max(...this.getDistance(new je(s[0],0,s[2])))}if(e.type==="sectionFinished"){if(this.logWorkerWork(`<- ${e.workerIndex} sectionFinished ${e.key} ${JSON.stringify({processTime:e.processTime})}`),!this.sectionsWaiting.has(e.key))throw new Error(`sectionFinished event for non-outstanding section ${e.key}`);this.sectionsWaiting.set(e.key,this.sectionsWaiting.get(e.key)-1),this.sectionsWaiting.get(e.key)===0&&(this.sectionsWaiting.delete(e.key),this.finishedSections[e.key]=!0);let s=e.key.split(",").map(Number),o=`${s[0]},${s[2]}`;if(this.loadedChunks[o]){let a=!0,v=this.getSectionHeight();for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=v)if(!this.finishedSections[`${s[0]},${l},${s[2]}`]){a=!1;break}if(a){this.finishedChunks[o]=!0;let l=16;this.reactiveState.world.chunksLoaded.add(`${Math.floor(s[0]/l)},${Math.floor(s[2]/l)}`),this.renderUpdateEmitter.emit("chunkFinished",`${s[0]},${s[2]}`),this.checkAllFinished()}}if(this.renderUpdateEmitter.emit("update"),e.processTime&&(this.workersProcessAverageTimeCount++,this.workersProcessAverageTime=(this.workersProcessAverageTime*(this.workersProcessAverageTimeCount-1)+e.processTime)/this.workersProcessAverageTimeCount,this.maxWorkersProcessTime=Math.max(this.maxWorkersProcessTime,e.processTime)),typeof e.pre=="number"&&typeof e.wasm=="number"&&typeof e.post=="number"&&(e.pre>0||e.wasm>0||e.post>0)){let a=++this.workersPhaseSampleCount;this.workersPreAverageTime=(this.workersPreAverageTime*(a-1)+e.pre)/a,this.workersWasmAverageTime=(this.workersWasmAverageTime*(a-1)+e.wasm)/a,this.workersPostAverageTime=(this.workersPostAverageTime*(a-1)+e.post)/a;let v=typeof e.preTargetConvert=="number"?e.preTargetConvert:0,l=typeof e.preNeighborConvert=="number"?e.preNeighborConvert:0,c=typeof e.preNeighborCount=="number"?e.preNeighborCount:0,d=typeof e.preTypedArrayBuild=="number"?e.preTypedArrayBuild:0,h=typeof e.preOther=="number"?e.preOther:0,p=typeof e.preCacheHits=="number"?e.preCacheHits:0,g=typeof e.preCacheMisses=="number"?e.preCacheMisses:0;if(this.workersPreTargetConvertAverageTime=(this.workersPreTargetConvertAverageTime*(a-1)+v)/a,this.workersPreNeighborConvertAverageTime=(this.workersPreNeighborConvertAverageTime*(a-1)+l)/a,this.workersPreNeighborCountAverage=(this.workersPreNeighborCountAverage*(a-1)+c)/a,this.workersPreTypedArrayBuildAverageTime=(this.workersPreTypedArrayBuildAverageTime*(a-1)+d)/a,this.workersPreOtherAverageTime=(this.workersPreOtherAverageTime*(a-1)+h)/a,this.workersPreCacheHitsTotal+=p,this.workersPreCacheMissesTotal+=g,this.worldRendererConfig.debugWasmPerf&&a%bt.PHASE_PERF_LOG_INTERVAL===0){let b=this.workersPreAverageTime+this.workersWasmAverageTime+this.workersPostAverageTime,A=b>0?this.workersPreAverageTime/b*100:0,w=b>0?this.workersWasmAverageTime/b*100:0,_=b>0?this.workersPostAverageTime/b*100:0,S=this.workersPreAverageTime,M=S>0?this.workersPreTargetConvertAverageTime/S*100:0,C=S>0?this.workersPreNeighborConvertAverageTime/S*100:0,H=S>0?this.workersPreTypedArrayBuildAverageTime/S*100:0,B=S>0?this.workersPreOtherAverageTime/S*100:0,I=this.workersPreNeighborCountAverage,W=I>0?this.workersPreNeighborConvertAverageTime/I:0,z=this.workersPreCacheHitsTotal+this.workersPreCacheMissesTotal,j=z>0?this.workersPreCacheHitsTotal/z*100:0}}}if(e.type==="blockStateModelInfo")for(let[s,o]of Object.entries(e.info))this.blockStateModelInfo.set(s,o);e.type==="heightmap"&&this.reactiveState.world.heightmaps.set(e.key,new Int16Array(e.heightmap))}}downloadMesherLog(){let t=document.createElement("a");t.href="data:text/plain;charset=utf-8,"+encodeURIComponent(this.mesherLogger.contents.join(`
16
- `)),t.download="mesher.log",t.click()}checkAllFinished(){this.sectionsWaiting.size===0&&(this.reactiveState.world.mesherWork=!1),Object.keys(this.finishedChunks).length>=this.chunksLength&&(this.allChunksLoaded?.(),this.allChunksFinished=!0,this.allLoadedIn??(this.allLoadedIn=Date.now()-this.initialChunkLoadWasStartedIn)),this.updateChunksStats()}changeHandSwingingState(t,e){}updateViewerPosition(t){this.viewerChunkPosition=t;for(let[n,s]of Object.entries(this.loadedChunks))s&&this.updatePosDataChunk?.(n);let e=Math.floor(t.x/16),i=Math.floor(t.z/16);(e!==this.lastViewerChunkGridX||i!==this.lastViewerChunkGridZ)&&(this.lastViewerChunkGridX=e,this.lastViewerChunkGridZ=i,this.onViewerChunkPositionChanged())}onViewerChunkPositionChanged(){}sendWorkers(t){for(let e of this.workers)e.postMessage(t)}getDistance(t){let[e,i]=de(this.viewerChunkPosition),n=16,s=Math.abs(e-Math.floor(t.x/n)),o=Math.abs(i-Math.floor(t.z/n));return[s,o]}resetWorld(){for(let t of this.workers)t.terminate();this.workers=[]}async resetWorkers(){this.resetWorld(),typeof document<"u"&&document?.readyState==="loading"&&await new Promise(t=>{document.addEventListener("DOMContentLoaded",t)}),this.initWorkers(),this.active=!0,this.sendMesherMcData()}getMesherConfig(){let t=this.timeOfTheDay,e=t<0||t>24e3?15:X1(t);return{version:this.version,enableLighting:this.worldRendererConfig.enableLighting,skyLight:e,smoothLighting:this.worldRendererConfig.smoothLighting,shadingTheme:this.worldRendererConfig.shadingTheme,cardinalLight:this.worldRendererConfig.cardinalLight,outputFormat:this.outputFormat,debugModelVariant:this.worldRendererConfig.debugModelVariant,clipWorldBelowY:this.worldRendererConfig.clipWorldBelowY,disableBlockEntityTextures:!this.worldRendererConfig.extraBlockRenderers,worldMinY:this.worldMinYRender,worldMaxY:this.worldMinYRender+this.worldSizeParams.worldHeight,disableConversionCache:this.worldRendererConfig.disableMesherConversionCache}}sendMesherMcData(){let t=this.resourcesManager.currentResources.mcData;ti(this.workers,this.version,Ne,t),this.logWorkerWork("# mcData sent")}async updateAssetsData(){let t=this.resourcesManager.currentResources;if(this.workers.length===0)throw new Error("workers not initialized yet");for(let[e,i]of this.workers.entries()){let{blockstatesModels:n}=t;i.postMessage({type:"mesherData",workerIndex:e,blocksAtlas:{latest:t.blocksAtlasJson},blockstatesModels:n,config:this.getMesherConfig()})}this.logWorkerWork("# mesherData sent")}getSectionHeight(){return rr}get worldMinYRender(){let t=this.getSectionHeight();return Math.floor(Math.max(this.worldSizeParams.minY,this.worldRendererConfig.clipWorldBelowY??-1/0)/t)*t}updateChunksStats(){let t=Object.keys(this.finishedChunks);this.displayOptions.nonReactiveState.world.chunksLoaded=new Set(t),this.displayOptions.nonReactiveState.world.chunksTotalNumber=this.chunksLength,this.reactiveState.world.allChunksLoaded=this.allChunksFinished;let e=`Q: ${this.messageQueue.length} ${Object.keys(this.loadedChunks).length}/${Object.keys(this.finishedChunks).length}/${this.chunksLength} chunks (${this.workers.length}:${this.workersProcessAverageTime.toFixed(0)}ms/${this.geometryReceiveCountPerSec}ss/${this.allLoadedIn?.toFixed(1)??"-"}s)`;this.chunksFullInfo=e,V1("downloaded-chunks",e)}addColumn(t,e,i,n){if(!this.active)return;if(this.workers.length===0)throw new Error("workers not initialized yet");this.initialChunksLoad=!1,this.initialChunkLoadWasStartedIn??(this.initialChunkLoadWasStartedIn=Date.now()),this.loadedChunks[`${t},${e}`]=!0,this.updateChunksStats();let s=`${t},${e}`,o=this.protocolCustomBlocks.get(s);for(let l of this.workers)l.postMessage({type:"chunk",x:t,z:e,chunk:i,customBlockModels:o||void 0});this.worldRendererConfig.wasmMesher||this.workers[0].postMessage({type:"getHeightmap",x:t,z:e}),this.logWorkerWork(()=>`-> chunk ${JSON.stringify({x:t,z:e,chunkLength:i.length,customBlockModelsLength:o?Object.keys(o).length:0})}`),this.mesherLogReader?.chunkReceived(t,e,i.length);let a=this.getSectionHeight(),v=16;for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=a){let c=new je(t,l,e);this.setSectionDirty(c),this.neighborChunkUpdates&&(!n||this.worldRendererConfig.smoothLighting)&&(this.setSectionDirty(c.offset(-v,0,0)),this.setSectionDirty(c.offset(v,0,0)),this.setSectionDirty(c.offset(0,0,-v)),this.setSectionDirty(c.offset(0,0,v)))}}markAsLoaded(t,e){this.loadedChunks[`${t},${e}`]=!0,this.finishedChunks[`${t},${e}`]=!0,this.logWorkerWork(`-> markAsLoaded ${JSON.stringify({x:t,z:e})}`),this.renderUpdateEmitter.emit("chunkFinished",`${t},${e}`),this.checkAllFinished()}removeColumn(t,e){delete this.loadedChunks[`${t},${e}`];let i=`${t},${e}`,n=this.heightmapDebounceTimers.get(i);n&&(clearTimeout(n),this.heightmapDebounceTimers.delete(i));for(let[o,a]of this.sectionDirtyTimers)o.startsWith(`${t},`)&&o.endsWith(`,${e}`)&&(clearTimeout(a),this.sectionDirtyTimers.delete(o),this.sectionDirtyCount.delete(o),this.sectionDirtyPendingArgs.delete(o));for(let o of this.workers)o.postMessage({type:"unloadChunk",x:t,z:e});this.logWorkerWork(`-> unloadChunk ${JSON.stringify({x:t,z:e})}`),delete this.finishedChunks[`${t},${e}`],this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength,Object.keys(this.finishedChunks).length===0&&(this.allLoadedIn=void 0,this.initialChunkLoadWasStartedIn=void 0);let s=this.getSectionHeight();for(let o=this.worldSizeParams.minY;o<this.worldSizeParams.worldHeight;o+=s)this.setSectionDirty(new je(t,o,e),!1),delete this.finishedSections[`${t},${o},${e}`];this.highestBlocksByChunks.delete(`${t},${e}`),this.reactiveState.world.heightmaps.delete(`${Math.floor(t/16)},${Math.floor(e/16)}`),this.updateChunksStats(),Object.keys(this.loadedChunks).length===0&&(this.mesherLogger.contents=[],this.logWorkerWork("# all chunks unloaded. New log started"),this.mesherLogReader?.maybeStartReplay())}setBlockStateId(t,e,i=!0){(async()=>{let o=Math.floor(t.x/16)*16,a=Math.floor(t.z/16)*16;this.queuedChunks.has(`${o},${a}`)&&await new Promise(v=>{this.queuedFunctions.push(()=>{v()})}),this.loadedChunks[`${o},${a}`],this.setBlockStateIdInner(t,e,i)})()}updateEntity(t,e=!1){}lightUpdate(t,e){}connect(t){let e=t;e.on("entity",n=>{this.updateEntity(n,!1)}),e.on("entityMoved",n=>{this.updateEntity(n,!0)}),e.on("playerEntity",n=>{this.updatePlayerEntity?.(n)});let i=null;e.on("loadChunk",({x:n,z:s,chunk:o,worldConfig:a,isLightUpdate:v})=>{this.worldSizeParams=a,this.queuedChunks.add(`${n},${s}`);let l=[n,s,o,v];i||(i={data:[],timeout:setTimeout(()=>{for(let c of i.data)this.queuedChunks.delete(`${c[0]},${c[1]}`),this.addColumn(...c);for(let c of this.queuedFunctions)c();this.queuedFunctions=[],i=null},this.worldRendererConfig.addChunksBatchWaitTime)}),i.data.push(l)}),e.on("blockEntities",n=>{this.blockEntities=n}),e.on("unloadChunk",({x:n,z:s})=>{this.removeColumn(n,s)}),e.on("blockUpdate",({pos:n,stateId:s})=>{this.setBlockStateId(new je(n.x,n.y,n.z),s)}),e.on("chunkPosUpdate",({pos:n})=>{this.updateViewerPosition(n)}),e.on("end",()=>{this.worldStop?.()}),e.on("renderDistance",n=>{this.viewDistance=n,this.chunksLength=n===0?1:Le(n).length,this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength,this.onRenderDistanceChanged?.(n)}),e.on("markAsLoaded",({x:n,z:s})=>{this.markAsLoaded(n,s)}),e.on("updateLight",({pos:n})=>{this.lightUpdate(n.x,n.z)}),e.on("onWorldSwitch",()=>{for(let n of this.onWorldSwitched)try{n()}catch(s){setTimeout(()=>{throw s},0)}}),e.on("time",n=>{this.worldRendererConfig.dayCycle&&(this.timeUpdated?.(n),this.timeOfTheDay=n)}),e.on("biomeUpdate",({biome:n})=>{this.biomeUpdated?.(n)}),e.on("biomeReset",()=>{this.biomeReset?.()})}setBlockStateIdInner(t,e,i=!0){let s=`${Math.floor(t.x/16)*16},${Math.floor(t.z/16)*16}`,o=`${t.x},${t.y},${t.z}`,a=this.protocolCustomBlocks.get(s)||{};for(let v of this.workers)v.postMessage({type:"blockUpdate",pos:t,stateId:e,customBlockModels:a});if(this.anyModuleRequiresHeightmap()){let v=Math.floor(t.x/16)*16,l=Math.floor(t.z/16)*16,c=`${v},${l}`;if(!this.worldRendererConfig.wasmMesher){let d=this.heightmapDebounceTimers.get(c);d&&clearTimeout(d),this.heightmapDebounceTimers.set(c,setTimeout(()=>{this.heightmapDebounceTimers.delete(c),this.workers[0]?.postMessage({type:"getHeightmap",x:v,z:l})},100))}}if(this.logWorkerWork(`-> blockUpdate ${JSON.stringify({pos:t,stateId:e,customBlockModels:a})}`),this.setSectionDirty(t,!0,!0),this.neighborChunkUpdates){let l=this.getSectionHeight();t.x&15||this.setSectionDirty(t.offset(-16,0,0),!0,!0),(t.x&15)===15&&this.setSectionDirty(t.offset(16,0,0),!0,!0),t.y&l-1||this.setSectionDirty(t.offset(0,-l,0),!0,!0),(t.y&l-1)===l-1&&this.setSectionDirty(t.offset(0,l,0),!0,!0),t.z&15||this.setSectionDirty(t.offset(0,0,-16),!0,!0),(t.z&15)===15&&this.setSectionDirty(t.offset(0,0,16),!0,!0),i&&(!(t.x&15)&&!(t.z&15)&&this.setSectionDirty(t.offset(-16,0,-16),!0,!0),(t.x&15)===15&&!(t.z&15)&&this.setSectionDirty(t.offset(16,0,-16),!0,!0),!(t.x&15)&&(t.z&15)===15&&this.setSectionDirty(t.offset(-16,0,16),!0,!0),(t.x&15)===15&&(t.z&15)===15&&this.setSectionDirty(t.offset(16,0,16),!0,!0),!(t.x&15)&&!(t.y&l-1)&&this.setSectionDirty(t.offset(-16,-l,0),!0,!0),(t.x&15)===15&&!(t.y&l-1)&&this.setSectionDirty(t.offset(16,-l,0),!0,!0),!(t.z&15)&&!(t.y&l-1)&&this.setSectionDirty(t.offset(0,-l,-16),!0,!0),(t.z&15)===15&&!(t.y&l-1)&&this.setSectionDirty(t.offset(0,-l,16),!0,!0),!(t.y&l-1)&&!(t.x&15)&&!(t.z&15)&&this.setSectionDirty(t.offset(-16,-l,-16),!0,!0),!(t.y&l-1)&&(t.x&15)===15&&!(t.z&15)&&this.setSectionDirty(t.offset(16,-l,-16),!0,!0),!(t.y&l-1)&&!(t.x&15)&&(t.z&15)===15&&this.setSectionDirty(t.offset(-16,-l,16),!0,!0),!(t.y&l-1)&&(t.x&15)===15&&(t.z&15)===15&&this.setSectionDirty(t.offset(16,-l,16),!0,!0))}}getWorkerNumber(t,e=!1){let n=this.getSectionHeight();if(this.worldRendererConfig.wasmMesher)return gr(Math.floor(t.x/16)+Math.floor(t.z/16),this.workers.length);if(e){let s=`${Math.floor(t.x/16)*16},${Math.floor(t.y/n)*n},${Math.floor(t.z/16)*16}`;if(!(this.sectionsWaiting.get(s)&&!this.finishedSections[s]))return 0}return gr(Math.floor(t.x/16)+Math.floor(t.y/n)+Math.floor(t.z/16),this.workers.length)}async debugGetWorkerCustomBlockModel(t){let e=[];for(let i of this.workers)e.push(new Promise(n=>{i.addEventListener("message",s=>{s.data.type==="customBlockModel"&&n(s.data.customBlockModel)})})),i.postMessage({type:"getCustomBlockModel",pos:t});return Promise.all(e)}setSectionDirty(t,e=!0,i=!1){if(!this.forceCallFromMesherReplayer&&this.mesherLogReader)return;if(this.viewDistance===-1)throw new Error("viewDistance not set");let n=this.getDistance(t);if(!this.workers.length||n[0]>this.viewDistance||n[1]>this.viewDistance)return;if(!e){this._dispatchDirtyImmediate(t,e,i);return}let s=16,o=this.getSectionHeight(),a=`${Math.floor(t.x/s)*s},${Math.floor(t.y/o)*o},${Math.floor(t.z/s)*s}`,v=(this.sectionDirtyCount.get(a)??0)+1;this.sectionDirtyCount.set(a,v),v<=bt.GEOMETRY_THROTTLE_THRESHOLD?(this._dispatchDirtyImmediate(t,e,i),this.sectionDirtyTimers.has(a)||this.sectionDirtyTimers.set(a,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(a);this.sectionDirtyCount.delete(a),this.sectionDirtyTimers.delete(a),this.sectionDirtyPendingArgs.delete(a),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},bt.GEOMETRY_THROTTLE_DELAY))):(this.sectionDirtyPendingArgs.set(a,{pos:t,value:e,useChangeWorker:i}),this.sectionDirtyTimers.has(a)||this.sectionDirtyTimers.set(a,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(a);this.sectionDirtyCount.delete(a),this.sectionDirtyTimers.delete(a),this.sectionDirtyPendingArgs.delete(a),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},bt.GEOMETRY_THROTTLE_DELAY)))}_dispatchDirtyImmediate(t,e,i){var v;this.reactiveState.world.mesherWork=!0;let n=16,s=this.getSectionHeight(),o=`${Math.floor(t.x/n)*n},${Math.floor(t.y/s)*s},${Math.floor(t.z/n)*n}`;this.renderUpdateEmitter.emit("dirty",t,e);let a=this.getWorkerNumber(t,i&&this.mesherLogger.active);this.sectionsWaiting.set(o,(this.sectionsWaiting.get(o)??0)+1),this.forceCallFromMesherReplayer?this.workers[a].postMessage({type:"dirty",x:t.x,y:t.y,z:t.z,value:e,config:this.getMesherConfig()}):((v=this.toWorkerMessagesQueue)[a]??(v[a]=[]),this.toWorkerMessagesQueue[a].push({type:"dirty",x:t.x,y:t.y,z:t.z,value:e,config:this.getMesherConfig()}),this.dispatchMessages())}dispatchMessages(){this.queueAwaited||(this.queueAwaited=!0,setTimeout(()=>{for(let t in this.toWorkerMessagesQueue){let e=this.workers[Number(t)],i=this.toWorkerMessagesQueue[t];e.postMessage(i);for(let n of i)this.logWorkerWork(`-> ${t} dispatchMessages ${n.type} ${JSON.stringify({x:n.x,y:n.y,z:n.z,value:n.value})}`)}this.toWorkerMessagesQueue={},this.queueAwaited=!1}))}async waitForChunksToRender(){return new Promise((t,e)=>{if([...this.sectionsWaiting].length===0){t();return}let i=()=>{this.sectionsWaiting.size===0&&(this.renderUpdateEmitter.removeListener("update",i),t())};this.renderUpdateEmitter.on("update",i)})}async waitForChunkToLoad(t){return new Promise((e,i)=>{let s=`${Math.floor(t.x/16)*16},${Math.floor(t.z/16)*16}`;if(this.loadedChunks[s]){e();return}let o=()=>{this.loadedChunks[s]&&(this.renderUpdateEmitter.removeListener("update",o),e())};this.renderUpdateEmitter.on("update",o)})}destroy(){for(let t of this.heightmapDebounceTimers.values())clearTimeout(t);this.heightmapDebounceTimers.clear();for(let t of this.sectionDirtyTimers.values())clearTimeout(t);this.sectionDirtyTimers.clear(),this.sectionDirtyCount.clear(),this.sectionDirtyPendingArgs.clear();for(let t of this.workers)t.terminate();this.workers=[],this.soundSystem&&(this.soundSystem.destroy(),this.soundSystem=void 0),this.active=!1,this.loadedChunks={},this.finishedChunks={},this.finishedSections={},this.sectionsWaiting.clear(),this.queuedChunks.clear(),this.blockStateModelInfo.clear(),this.renderUpdateEmitter.removeAllListeners(),this.abortController.abort(),ur()}};u(bt,"PHASE_PERF_LOG_INTERVAL",64),u(bt,"GEOMETRY_THROTTLE_THRESHOLD",1),u(bt,"GEOMETRY_THROTTLE_DELAY",100);var U5=bt,mo=(r,t="mesher.js")=>{let e;if(D.env.SINGLE_FILE_BUILD){let i=document.getElementById("mesher-worker-code").textContent,n=new Blob([i],{type:"text/javascript"});e=new Worker(window.URL.createObjectURL(n))}else e=new Worker(t);return e.onmessage=({data:i})=>{r(i)},e.on&&e.on("message",i=>{e.onmessage({data:i})}),e},ti=(r,t,e=Ne,i)=>{let n={version:JSON.parse(JSON.stringify(i.version))};for(let[s,o]of Object.entries(e))n[s]=i[o];for(let s of r)s.postMessage({type:"mcData",mcData:n})};x();R();T();k();import{Vec3 as po}from"vec3";import*as X0 from"three";x();R();T();k();function G5(r,t){let e=t/180*Math.PI,i=Math.cos(e),n=Math.sin(e),s={x:0,y:1,z:2}[r],o=(s+1)%3,a=(s+2)%3,v=[[0,0,0],[0,0,0],[0,0,0]];return v[s][s]=1,v[o][o]=i,v[o][a]=-n,v[a][o]=+n,v[a][a]=i,v}function ei(r,t){return t?[r[0]+t[0],r[1]+t[1],r[2]+t[2]]:r}function ii(r,t){return t?[r[0]-t[0],r[1]-t[1],r[2]-t[2]]:r}function fe(r,t){return r?[r[0][0]*t[0]+r[0][1]*t[1]+r[0][2]*t[2],r[1][0]*t[0]+r[1][1]*t[1]+r[1][2]*t[2],r[2][0]*t[0]+r[2][1]*t[1]+r[2][2]*t[2]]:t}function br(r,t){let e=[[0,0,0],[0,0,0],[0,0,0]],i=r[0][0],n=r[1][0],s=r[2][0],o=r[0][1],a=r[1][1],v=r[2][1],l=r[0][2],c=r[1][2],d=r[2][2],h=t[0][0],p=t[1][0],g=t[2][0],b=t[0][1],A=t[1][1],w=t[2][1],_=t[0][2],S=t[1][2],M=t[2][2];return e[0][0]=i*h+n*b+s*_,e[1][0]=i*p+n*A+s*S,e[2][0]=i*g+n*w+s*M,e[0][1]=o*h+a*b+v*_,e[1][1]=o*p+a*A+v*S,e[2][1]=o*g+a*w+v*M,e[0][2]=l*h+c*b+d*_,e[1][2]=l*p+c*A+d*S,e[2][2]=l*g+c*w+d*M,e}var ni={up:{dir:[0,1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[0,1,1,0,1],[1,1,1,1,1],[0,1,0,0,0],[1,1,0,1,0]]},down:{dir:[0,-1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[1,0,1,0,1],[0,0,1,1,1],[1,0,0,0,0],[0,0,0,1,0]]},east:{dir:[1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],mask1:[1,0,1],mask2:[0,1,1],corners:[[1,0,0,1,1],[0,0,0,0,1],[1,1,0,1,0],[0,1,0,0,0]]},south:{dir:[0,0,1],mask1:[1,0,1],mask2:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};function go(r,t,e,i,n,s,o,a){let v=new po(0,0,0);for(let l in r.faces){let c=r.faces[l],{corners:d,mask1:h,mask2:p}=ni[l],g=fe(i,ni[l].dir);if(c.cullface&&a[l])continue;let b=r.from[0],A=r.from[1],w=r.from[2],_=r.to[0],S=r.to[1],M=r.to[2],C=c.texture,{u:H}=C,{v:B}=C,{su:I}=C,{sv:W}=C,z=Math.floor(e.positions.length/3),j=[1,1,1];c.tintindex!==void 0&&c.tintindex===0&&(j=[.5686274509803921,.7411764705882353,.34901960784313724]);let q=c.rotation||0,e0=Math.cos(q*Math.PI/180),V=-Math.sin(q*Math.PI/180),Z=null,K=null;r.rotation&&(Z=G5(r.rotation.axis,r.rotation.angle),K=ii(r.rotation.origin,fe(Z,r.rotation.origin)));let n0=[],s0=1;for(let l0 of d){let $=[l0[0]?_:b,l0[1]?S:A,l0[2]?M:w];$=ei(fe(Z,$),K),$=ei(fe(i,$),n),$=$.map(Y0=>Y0/16),e.positions.push($[0],$[1],$[2]),e.normals.push(...g);let u0=(l0[3]-.5)*e0-(l0[4]-.5)*V+.5,$0=(l0[3]-.5)*V+(l0[4]-.5)*e0+.5;e.uvs.push(u0*I+H,$0*W+B);let z0=1;t&&(z0=4/4*(15/15),n0.push(3)),e.colors.push(s0*j[0]*z0,s0*j[1]*z0,s0*j[2]*z0)}t&&n0[0]+n0[3]>=n0[1]+n0[2]?e.indices.push(z,z+3,z+2,z,z+1,z+3):e.indices.push(z,z+1,z+2,z+2,z+1,z+3)}}var bo=(r,t,e,i,n=[],s={})=>{let l={sx:.5,sy:.5,sz:.5,positions:[],normals:[],colors:[],uvs:[],t_positions:[],t_normals:[],t_colors:[],t_uvs:[],indices:[],tiles:{}};for(let[d,h]of r.entries()){let p=h[n[d]]??h[0];if(!p)continue;let g=null,b=null;for(let w of["x","y","z"])w in p&&(g?g=br(g,G5(w,-(p[w]??0))):g=G5(w,-(p[w]??0)));g&&(b=[8,8,8],b=ii(b,fe(g,b)));let A=p.ao??!0;for(let w of p.elements??[])go(w,A,l,g,b,t,e,s)}let c=l.positions.length/3;for(let d=0;d<l.t_positions.length/12;d++)l.indices.push(c,c+1,c+2,c+2,c+1,c+3,c,c+2,c+1,c+2,c+3,c+1),c+=4;return l.positions.push(...l.t_positions),l.normals.push(...l.t_normals),l.colors.push(...l.t_colors),l.uvs.push(...l.t_uvs),delete l.t_positions,delete l.t_normals,delete l.t_colors,delete l.t_uvs,l.positions=new Float32Array(l.positions),l.normals=new Float32Array(l.normals),l.colors=new Float32Array(l.colors),l.uvs=new Float32Array(l.uvs),l},yo=(...r)=>{let e={geometry:bo(...r)},i=new X0.BufferGeometry;return i.setAttribute("position",new X0.BufferAttribute(e.geometry.positions,3)),i.setAttribute("normal",new X0.BufferAttribute(e.geometry.normals,3)),i.setAttribute("color",new X0.BufferAttribute(e.geometry.colors,3)),i.setAttribute("uv",new X0.BufferAttribute(e.geometry.uvs,2)),i.setIndex(e.geometry.indices),i.name="block-geometry",i},ri=(r,...t)=>{let e=yo(...t),i=new X0.Mesh(e,r);i.position.set(-.5,-.5,-.5);let n=new X0.Group;return n.add(i),n.rotation.set(0,-X0.MathUtils.degToRad(90),0,"ZYX"),globalThis.mesh=n,n},yr=(r,t)=>{r.position.set(t.x+.5,t.y+.5,t.z+.5)};x();R();T();k();import*as H0 from"three";x();R();T();k();import Di from"prismarine-nbt";import*as N from"three";x();R();T();k();x();R();T();k();import{BoxGeometry as F0,DoubleSide as ci,FrontSide as _r,Group as nt,Mesh as I0,MeshStandardMaterial as Ye,Vector2 as W5}from"three";function di(r,t,e,i,n,s,o,a){let v=(B,I,W,z)=>[new W5(B/o,1-z/a),new W5(W/o,1-z/a),new W5(W/o,1-I/a),new W5(B/o,1-I/a)],l=v(t+s,e,t+i+s,e+s),c=v(t+i+s,e,t+i*2+s,e+s),d=v(t,e+s,t+s,e+s+n),h=v(t+s,e+s,t+i+s,e+s+n),p=v(t+i+s,e+s,t+i+s*2,e+n+s),g=v(t+i+s*2,e+s,t+i*2+s*2,e+n+s),b=r.attributes.uv,A=[p[3],p[2],p[0],p[1]],w=[d[3],d[2],d[0],d[1]],_=[l[3],l[2],l[0],l[1]],S=[c[0],c[1],c[3],c[2]],M=[h[3],h[2],h[0],h[1]],C=[g[3],g[2],g[0],g[1]],H=[];for(let B of[A,w,_,S,M,C])for(let I of B)H.push(I.x,I.y);b.set(new Float32Array(H)),b.needsUpdate=!0}function it(r,t,e,i,n,s){di(r,t,e,i,n,s,64,64)}function si(r,t,e,i,n,s){di(r,t,e,i,n,s,64,32)}var yt=class extends nt{constructor(t,e){super(),Object.defineProperty(this,"innerLayer",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"outerLayer",{enumerable:!0,configurable:!0,writable:!0,value:e}),t.name="inner",e.name="outer"}},oi=class extends nt{constructor(){super(),Object.defineProperty(this,"head",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightArm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftArm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightLeg",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftLeg",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"modelListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"slim",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_map",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"layer1Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer1MaterialBiased",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer2Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer2MaterialBiased",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.layer1Material=new Ye({side:_r}),this.layer2Material=new Ye({side:ci,transparent:!0,alphaTest:1e-5}),this.layer1MaterialBiased=this.layer1Material.clone(),this.layer1MaterialBiased.polygonOffset=!0,this.layer1MaterialBiased.polygonOffsetFactor=1,this.layer1MaterialBiased.polygonOffsetUnits=1,this.layer2MaterialBiased=this.layer2Material.clone(),this.layer2MaterialBiased.polygonOffset=!0,this.layer2MaterialBiased.polygonOffsetFactor=1,this.layer2MaterialBiased.polygonOffsetUnits=1;let t=new F0(8,8,8);it(t,0,0,8,8,8);let e=new I0(t,this.layer1Material),i=new F0(9,9,9);it(i,32,0,8,8,8);let n=new I0(i,this.layer2Material);this.head=new yt(e,n),this.head.name="head",this.head.add(e,n),e.position.y=4,n.position.y=4,this.add(this.head);let s=new F0(8,12,4);it(s,16,16,8,12,4);let o=new I0(s,this.layer1Material),a=new F0(8.5,12.5,4.5);it(a,16,32,8,12,4);let v=new I0(a,this.layer2Material);this.body=new yt(o,v),this.body.name="body",this.body.add(o,v),this.body.position.y=-6,this.add(this.body);let l=new F0,c=new I0(l,this.layer1MaterialBiased);this.modelListeners.push(()=>{c.scale.x=this.slim?3:4,c.scale.y=12,c.scale.z=4,it(l,40,16,this.slim?3:4,12,4)});let d=new F0,h=new I0(d,this.layer2MaterialBiased);this.modelListeners.push(()=>{h.scale.x=this.slim?3.5:4.5,h.scale.y=12.5,h.scale.z=4.5,it(d,40,32,this.slim?3:4,12,4)});let p=new nt;p.add(c,h),this.modelListeners.push(()=>{p.position.x=this.slim?-.5:-1}),p.position.y=-4,this.rightArm=new yt(c,h),this.rightArm.name="rightArm",this.rightArm.add(p),this.rightArm.position.x=-5,this.rightArm.position.y=-2,this.add(this.rightArm);let g=new F0,b=new I0(g,this.layer1MaterialBiased);this.modelListeners.push(()=>{b.scale.x=this.slim?3:4,b.scale.y=12,b.scale.z=4,it(g,32,48,this.slim?3:4,12,4)});let A=new F0,w=new I0(A,this.layer2MaterialBiased);this.modelListeners.push(()=>{w.scale.x=this.slim?3.5:4.5,w.scale.y=12.5,w.scale.z=4.5,it(A,48,48,this.slim?3:4,12,4)});let _=new nt;_.add(b,w),this.modelListeners.push(()=>{_.position.x=this.slim?.5:1}),_.position.y=-4,this.leftArm=new yt(b,w),this.leftArm.name="leftArm",this.leftArm.add(_),this.leftArm.position.x=5,this.leftArm.position.y=-2,this.add(this.leftArm);let S=new F0(4,12,4);it(S,0,16,4,12,4);let M=new I0(S,this.layer1MaterialBiased),C=new F0(4.5,12.5,4.5);it(C,0,32,4,12,4);let H=new I0(C,this.layer2MaterialBiased),B=new nt;B.add(M,H),B.position.y=-6,this.rightLeg=new yt(M,H),this.rightLeg.name="rightLeg",this.rightLeg.add(B),this.rightLeg.position.x=-1.9,this.rightLeg.position.y=-12,this.rightLeg.position.z=-.1,this.add(this.rightLeg);let I=new F0(4,12,4);it(I,16,48,4,12,4);let W=new I0(I,this.layer1MaterialBiased),z=new F0(4.5,12.5,4.5);it(z,0,48,4,12,4);let j=new I0(z,this.layer2MaterialBiased),q=new nt;q.add(W,j),q.position.y=-6,this.leftLeg=new yt(W,j),this.leftLeg.name="leftLeg",this.leftLeg.add(q),this.leftLeg.position.x=1.9,this.leftLeg.position.y=-12,this.leftLeg.position.z=-.1,this.add(this.leftLeg),this.modelType="default"}get map(){return this._map}set map(t){this._map=t,this.layer1Material.map=t,this.layer1Material.needsUpdate=!0,this.layer1MaterialBiased.map=t,this.layer1MaterialBiased.needsUpdate=!0,this.layer2Material.map=t,this.layer2Material.needsUpdate=!0,this.layer2MaterialBiased.map=t,this.layer2MaterialBiased.needsUpdate=!0}get modelType(){return this.slim?"slim":"default"}set modelType(t){this.slim=t==="slim",this.modelListeners.forEach(e=>e())}getBodyParts(){return this.children.filter(t=>t instanceof yt)}setInnerLayerVisible(t){this.getBodyParts().forEach(e=>e.innerLayer.visible=t)}setOuterLayerVisible(t){this.getBodyParts().forEach(e=>e.outerLayer.visible=t)}resetJoints(){this.head.rotation.set(0,0,0),this.leftArm.rotation.set(0,0,0),this.rightArm.rotation.set(0,0,0),this.leftLeg.rotation.set(0,0,0),this.rightLeg.rotation.set(0,0,0),this.body.rotation.set(0,0,0),this.head.position.y=0,this.body.position.y=-6,this.body.position.z=0,this.rightArm.position.x=-5,this.rightArm.position.y=-2,this.rightArm.position.z=0,this.leftArm.position.x=5,this.leftArm.position.y=-2,this.leftArm.position.z=0,this.rightLeg.position.x=-1.9,this.rightLeg.position.y=-12,this.rightLeg.position.z=-.1,this.leftLeg.position.x=1.9,this.leftLeg.position.y=-12,this.leftLeg.position.z=-.1}},ai=class extends nt{constructor(){super(),Object.defineProperty(this,"cape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new Ye({side:ci,transparent:!0,alphaTest:1e-5});let t=new F0(10,16,1);si(t,0,0,10,16,1),this.cape=new I0(t,this.material),this.cape.position.y=-8,this.cape.position.z=.5,this.add(this.cape)}get map(){return this.material.map}set map(t){this.material.map=t,this.material.needsUpdate=!0}},vi=class extends nt{constructor(){super(),Object.defineProperty(this,"leftWing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightWing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new Ye({side:ci,transparent:!0,alphaTest:1e-5});let t=new F0(12,22,4);si(t,22,0,10,20,2);let e=new I0(t,this.material);e.position.x=-5,e.position.y=-10,e.position.z=-1,this.leftWing=new nt,this.leftWing.add(e),this.add(this.leftWing);let i=new F0(12,22,4);si(i,22,0,10,20,2);let n=new I0(i,this.material);n.scale.x=-1,n.position.x=5,n.position.y=-10,n.position.z=-1,this.rightWing=new nt,this.rightWing.add(n),this.add(this.rightWing),this.leftWing.position.x=5,this.leftWing.rotation.x=.2617994,this.resetJoints()}resetJoints(){this.leftWing.rotation.y=.01,this.leftWing.rotation.z=.2617994,this.updateRightWing()}updateRightWing(){this.rightWing.position.x=-this.leftWing.position.x,this.rightWing.position.y=this.leftWing.position.y,this.rightWing.rotation.x=this.leftWing.rotation.x,this.rightWing.rotation.y=-this.leftWing.rotation.y,this.rightWing.rotation.z=-this.leftWing.rotation.z}get map(){return this.material.map}set map(t){this.material.map=t,this.material.needsUpdate=!0}},li=class extends nt{constructor(){super(),Object.defineProperty(this,"rightEar",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftEar",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new Ye({side:_r});let t=new F0(8,8,4/3);di(t,0,0,6,6,1,14,7),this.rightEar=new I0(t,this.material),this.rightEar.name="rightEar",this.rightEar.position.x=-6,this.add(this.rightEar),this.leftEar=new I0(t,this.material),this.leftEar.name="leftEar",this.leftEar.position.x=6,this.add(this.leftEar)}get map(){return this.material.map}set map(t){this.material.map=t,this.material.needsUpdate=!0}},wr=10.8*Math.PI/180,Qe=class extends nt{constructor(){super(),Object.defineProperty(this,"skin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"elytra",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ears",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.skin=new oi,this.skin.name="skin",this.skin.position.y=8,this.add(this.skin),this.cape=new ai,this.cape.name="cape",this.cape.position.y=8,this.cape.position.z=-2,this.cape.rotation.x=wr,this.cape.rotation.y=Math.PI,this.add(this.cape),this.elytra=new vi,this.elytra.name="elytra",this.elytra.position.y=8,this.elytra.position.z=-2,this.elytra.visible=!1,this.add(this.elytra),this.ears=new li,this.ears.name="ears",this.ears.position.y=10,this.ears.position.z=2/3,this.ears.visible=!1,this.skin.head.add(this.ears)}get backEquipment(){return this.cape.visible?"cape":this.elytra.visible?"elytra":null}set backEquipment(t){this.cape.visible=t==="cape",this.elytra.visible=t==="elytra"}resetJoints(){this.skin.resetJoints(),this.cape.rotation.x=wr,this.cape.position.y=8,this.cape.position.z=-2,this.elytra.position.y=8,this.elytra.position.z=-2,this.elytra.rotation.x=0,this.elytra.resetJoints()}};x();R();T();k();import{Color as Ef,PointLight as xf,EquirectangularReflectionMapping as Rf,Group as kf,NearestFilter as Tf,PerspectiveCamera as Mf,Scene as Sf,Texture as Cf,Vector2 as Pf,WebGLRenderer as Bf,AmbientLight as If,CanvasTexture as Hf,WebGLRenderTarget as zf,FloatType as Of,DepthTexture as Df,Clock as Lf,Object3D as Ff,ColorManagement as Uf}from"three";import{OrbitControls as Wf}from"three/examples/jsm/controls/OrbitControls.js";import{EffectComposer as Vf}from"three/examples/jsm/postprocessing/EffectComposer.js";import"three/examples/jsm/postprocessing/Pass.js";import{RenderPass as Kf}from"three/examples/jsm/postprocessing/RenderPass.js";import{ShaderPass as qf}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Xf}from"three/examples/jsm/shaders/FXAAShader.js";x();R();T();k();var N5=class{constructor(){Object.defineProperty(this,"speed",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"paused",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"progress",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"currentId",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"progress0",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"animationObjects",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}update(t,e){if(this.paused)return;let i=e*this.speed;this.animate(t,i),this.animationObjects.forEach((n,s)=>{let o=this.progress0.get(s);n(t,this.progress-o,s)}),this.progress+=i}addAnimation(t){let e=this.currentId++;return this.progress0.set(e,this.progress),this.animationObjects.set(e,t),e}removeAnimation(t){t!=null&&(this.animationObjects.delete(t),this.progress0.delete(t))}};x();R();T();k();import{CanvasTexture as vf,NearestFilter as lf,Sprite as cf,SpriteMaterial as df}from"three";x();R();T();k();var wo=Object.defineProperty,_o=(r,t,e)=>t in r?wo(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,h0=(r,t,e)=>(_o(r,typeof t!="symbol"?t+"":t,e),e);function ui(r){let t=[r];if(r.extra&&r.extra.length!==0)for(let e of r.extra)t.push(...ui(e));return t}var X=class{constructor(r,t,e,i,n,s){this.key=r,this.value=t,this.name=e,this.code=i,this.cssForeground=n,this.cssBackground=s}applyToStyle(r){r[this.key]=this.value}matchStyle(r){return r[this.key]===this.value}static fromCode(r){let e="0123456789abcdefklmnor".indexOf(r);if(e)return this.list[e]}toString(){return`${X.CONTROL_STRING}${this.code}`}},m0=X;h0(m0,"CONTROL_STRING","\xA7");h0(m0,"BLACK",new X("color","black","BLACK","0",{color:"#000000"},{color:"#000000"}));h0(m0,"DARK_BLUE",new X("color","dark_blue","DARK_BLUE","1",{color:"#0000AA"},{color:"#00002A"}));h0(m0,"DARK_GREEN",new X("color","dark_green","DARK_GREEN","2",{color:"#00AA00"},{color:"#002A00"}));h0(m0,"DARK_AQUA",new X("color","dark_aqua","DARK_AQUA","3",{color:"#00AAAA"},{color:"#002A2A"}));h0(m0,"DARK_RED",new X("color","dark_red","DARK_RED","4",{color:"#AA0000"},{color:"#2A0000"}));h0(m0,"DARK_PURPLE",new X("color","dark_purple","DARK_PURPLE","5",{color:"#AA00AA"},{color:"#2A002A"}));h0(m0,"GOLD",new X("color","gold","GOLD","6",{color:"#FFAA00"},{color:"#2A2A00"}));h0(m0,"GRAY",new X("color","gray","GRAY","7",{color:"#AAAAAA"},{color:"#2A2A2A"}));h0(m0,"DARK_GRAY",new X("color","dark_gray","DARK_GRAY","8",{color:"#555555"},{color:"#151515"}));h0(m0,"BLUE",new X("color","blue","BLUE","9",{color:"#5555FF"},{color:"#15153F"}));h0(m0,"GREEN",new X("color","green","GREEN","a",{color:"#55FF55"},{color:"#153F15"}));h0(m0,"AQUA",new X("color","aqua","AQUA","b",{color:"#55FFFF"},{color:"#153F3F"}));h0(m0,"RED",new X("color","red","RED","c",{color:"#FF5555"},{color:"#3F1515"}));h0(m0,"LIGHT_PURPLE",new X("color","light_purple","LIGHT_PURPLE","d",{color:"#FF55FF"},{color:"#3F153F"}));h0(m0,"YELLOW",new X("color","yellow","YELLOW","e",{color:"#FFFF55"},{color:"#3F3F15"}));h0(m0,"WHITE",new X("color","white","WHITE","f",{color:"#FFFFFF"},{color:"#3F3F3F"}));h0(m0,"OBFUSCATED",new X("obfuscated",!0,"OBFUSCATED","k",{}));h0(m0,"BOLD",new X("bold",!0,"BOLD","l",{"font-weight":"bold"}));h0(m0,"STRIKETHROUGH",new X("strikethrough",!0,"STRIKETHROUGH","m",{"text-decoration":"line-through"}));h0(m0,"UNDERLINE",new X("underlined",!0,"UNDERLINE","n",{"text-decoration":"underline"}));h0(m0,"ITALIC",new X("italic",!0,"ITALIC","o",{"font-style":"italic"}));h0(m0,"RESET",{name:"RESET",code:"r",applyToStyle(r){r.bold=!1,r.strikethrough=!1,r.underlined=!1,r.italic=!1,r.obfuscated=!1,r.color=void 0},matchStyle(r){return!1},cssBackground:{},cssForeground:{},toString(){return`${X.CONTROL_STRING}r`}});h0(m0,"list",[X.BLACK,X.DARK_BLUE,X.DARK_GREEN,X.DARK_AQUA,X.DARK_RED,X.DARK_PURPLE,X.GOLD,X.GRAY,X.DARK_GRAY,X.BLUE,X.GREEN,X.AQUA,X.RED,X.LIGHT_PURPLE,X.YELLOW,X.WHITE,X.OBFUSCATED,X.BOLD,X.STRIKETHROUGH,X.UNDERLINE,X.ITALIC,X.RESET]);var r5=ze(fi(),1);gi();var c6=ze(Yr(),1);import d6 from"prismarine-chat";x();R();T();k();import*as x0 from"three";x();R();T();k();x();R();T();k();var Mt=class r{constructor(t,e,i,n,s="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),r.nextNameID=r.nextNameID||0,this.$name.id=`lil-gui-name-${++r.nextNameID}`,this.$widget=document.createElement(s),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",o=>o.stopPropagation()),this.domElement.addEventListener("keyup",o=>o.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.innerHTML=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled?this:(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t),this)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){let e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.object[this.property]=t,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},bi=class extends Mt{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function yi(r){let t,e;return(t=r.match(/(#|0x)?([a-f0-9]{6})/i))?e=t[2]:(t=r.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?e=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=r.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(e=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),e?"#"+e:!1}var oa={isPrimitive:!0,match:r=>typeof r=="string",fromHexString:yi,toHexString:yi},$e={isPrimitive:!0,match:r=>typeof r=="number",fromHexString:r=>parseInt(r.substring(1),16),toHexString:r=>"#"+r.toString(16).padStart(6,0)},aa={isPrimitive:!1,match:r=>Array.isArray(r),fromHexString(r,t,e=1){let i=$e.fromHexString(r);t[0]=(i>>16&255)/255*e,t[1]=(i>>8&255)/255*e,t[2]=(i&255)/255*e},toHexString([r,t,e],i=1){i=255/i;let n=r*i<<16^t*i<<8^e*i<<0;return $e.toHexString(n)}},va={isPrimitive:!1,match:r=>Object(r)===r,fromHexString(r,t,e=1){let i=$e.fromHexString(r);t.r=(i>>16&255)/255*e,t.g=(i>>8&255)/255*e,t.b=(i&255)/255*e},toHexString({r,g:t,b:e},i=1){i=255/i;let n=r*i<<16^t*i<<8^e*i<<0;return $e.toHexString(n)}},la=[oa,$e,aa,va];function ca(r){return la.find(t=>t.match(r))}var wi=class extends Mt{constructor(t,e,i,n){super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=ca(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let s=yi(this.$text.value);s&&this._setValueFromHexString(s)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){let e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},Xe=class extends Mt{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},_i=class extends Mt{constructor(t,e,i,n,s,o){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(s);let a=o!==void 0;this.step(a?o:this._getImplicitStep(),a),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){let t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=e*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let e=()=>{let _=parseFloat(this.$input.value);isNaN(_)||(this._stepExplicit&&(_=this._snap(_)),this.setValue(this._clamp(_)))},i=_=>{let S=parseFloat(this.$input.value);isNaN(S)||(this._snapClampSetValue(S+_),this.$input.value=this.getValue())},n=_=>{_.key==="Enter"&&this.$input.blur(),_.code==="ArrowUp"&&(_.preventDefault(),i(this._step*this._arrowKeyMultiplier(_))),_.code==="ArrowDown"&&(_.preventDefault(),i(this._step*this._arrowKeyMultiplier(_)*-1))},s=_=>{this._inputFocused&&(_.preventDefault(),i(this._step*this._normalizeMouseWheel(_)))},o=!1,a,v,l,c,d,h=5,p=_=>{a=_.clientX,v=l=_.clientY,o=!0,c=this.getValue(),d=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",b)},g=_=>{if(o){let S=_.clientX-a,M=_.clientY-v;Math.abs(M)>h?(_.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(S)>h&&b()}if(!o){let S=_.clientY-l;d-=S*this._step*this._arrowKeyMultiplier(_),c+d>this._max?d=this._max-c:c+d<this._min&&(d=this._min-c),this._snapClampSetValue(c+d)}l=_.clientY},b=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",b)},A=()=>{this._inputFocused=!0},w=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",e),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",s,{passive:!1}),this.$input.addEventListener("mousedown",p),this.$input.addEventListener("focus",A),this.$input.addEventListener("blur",w)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let t=(w,_,S,M,C)=>(w-_)/(S-_)*(C-M)+M,e=w=>{let _=this.$slider.getBoundingClientRect(),S=t(w,_.left,_.right,this._min,this._max);this._snapClampSetValue(S)},i=w=>{this._setDraggingStyle(!0),e(w.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",s)},n=w=>{e(w.clientX)},s=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",s)},o=!1,a,v,l=w=>{w.preventDefault(),this._setDraggingStyle(!0),e(w.touches[0].clientX),o=!1},c=w=>{w.touches.length>1||(this._hasScrollBar?(a=w.touches[0].clientX,v=w.touches[0].clientY,o=!0):l(w),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("touchend",h))},d=w=>{if(o){let _=w.touches[0].clientX-a,S=w.touches[0].clientY-v;Math.abs(_)>Math.abs(S)?l(w):(window.removeEventListener("touchmove",d),window.removeEventListener("touchend",h))}else w.preventDefault(),e(w.touches[0].clientX)},h=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",d),window.removeEventListener("touchend",h)},p=this._callOnFinishChange.bind(this),g=400,b,A=w=>{if(Math.abs(w.deltaX)<Math.abs(w.deltaY)&&this._hasScrollBar)return;w.preventDefault();let S=this._normalizeMouseWheel(w)*this._step;this._snapClampSetValue(this.getValue()+S),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(p,g)};this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",A,{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10),e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=Math.round(t/this._step)*this._step;return parseFloat(e.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){let t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},Ai=class extends Mt{constructor(t,e,i,n){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(n)?n:Object.values(n),this._names=Array.isArray(n)?n:Object.keys(n),this._names.forEach(s=>{let o=document.createElement("option");o.innerHTML=s,this.$select.appendChild(o)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){let t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.innerHTML=e===-1?t:this._names[e],this}},Ei=class extends Mt{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},da=`.lil-gui {
15
+ `))A(B,H),p+=i,h="";else C&&A(C,H);if(S.extra)for(let B of S.extra)b(B,H)},A=(S,M)=>{o||(o=S.trim()!==""),h+=S,g[p]=v.measureText(h).width;let C=M.color??n;C.startsWith("#")||(C=eo[C.toLowerCase()]||C),c.push({fontStyle:`${M.bold?"bold":""} ${M.italic?"italic":""}`,fillStyle:C,underlineStyle:M.underlined??!1,strikeStyle:M.strikethrough??!1,offset:p,text:S})};if(b(l),!d&&!l.toString().trim())return;let w=0,_=0;for(let{fillStyle:S,fontStyle:M,underlineStyle:C,strikeStyle:H,offset:B,text:I}of c){_!==B&&(w=0),_=B,v.fillStyle=S,v.textRendering="optimizeLegibility",v.font=`${M} ${i}px mojangles`;let W=g[B]??v.measureText(I).width,z=(e.width-W)/2+w;v.fillText(I,z,B),H&&(v.lineWidth=i/8,v.strokeStyle=S,v.beginPath(),v.moveTo(z,B-v.lineWidth*2.5),v.lineTo(z+v.measureText(I).width,B-v.lineWidth*2.5),v.stroke()),C&&(v.lineWidth=i/8,v.strokeStyle=S,v.beginPath(),v.moveTo(z,B+v.lineWidth),v.lineTo(z+v.measureText(I).width,B+v.lineWidth),v.stroke()),w+=v.measureText(I).width}return o};x();R();T();k();function de(r){let t=Math.floor(r.x/16),e=Math.floor(r.z/16);return[t,e]}function L1(r){let t=Math.floor(r.x/16),e=Math.floor(r.y/16),i=Math.floor(r.z/16);return[t,e,i]}x();R();T();k();import{Vec3 as je}from"vec3";import{subscribeKey as ti}from"valtio/utils";import{proxy as fo,subscribe as ho}from"valtio";x();R();T();k();var Ne={blocks:"blocksArray",blockCollisionShapes:"blockCollisionShapes",biomes:"biomesArray"};x();R();T();k();var sr=16;var or=(r,t)=>t?`${r}:${t}`:String(r);x();R();T();k();x();R();T();k();var G1=ze(ar(),1);import*as D5 from"three";x();R();T();k();x();R();T();k();var z5=class{constructor(t,e,i){this.name=t,this.fg=e,this.bg=i,this.PR=Math.round(window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=document.createElement("canvas"),this.canvas.width=90*this.PR,this.canvas.height=48*this.PR,this.canvas.style.width="90px",this.canvas.style.position="absolute",this.canvas.style.height="48px",this.canvas.style.cssText="width:90px;height:48px",this.context=this.canvas.getContext("2d"),this.context&&(this.context.font="bold "+9*this.PR+"px Helvetica,Arial,sans-serif",this.context.textBaseline="top",this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(t,e,i,n,s=0){let o=1/0,a=0;this.context&&(o=Math.min(o,t),a=Math.max(i,t),n=Math.max(n,e),this.context.fillStyle=this.bg,this.context.globalAlpha=1,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(t.toFixed(s)+" "+this.name+" ("+o.toFixed(s)+"-"+parseFloat(a.toFixed(s))+")",this.TEXT_X,this.TEXT_Y),this.context.drawImage(this.canvas,this.GRAPH_X+this.PR,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT,this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT),this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y,this.PR,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y,this.PR,(1-e/n)*this.GRAPH_HEIGHT))}};var vr=class O5{constructor({logsPerSecond:t=20,samplesLog:e=100,samplesGraph:i=10,precision:n=2,minimal:s=!1,horizontal:o=!0,mode:a=0}={}){this.mode=a,this.horizontal=o,this.container=document.createElement("div"),this.container.style.cssText="position:fixed;top:0;left:0;opacity:0.9;z-index:10000;",s&&(this.container.style.cssText+="cursor:pointer"),this.gl=null,this.query=null,this.minimal=s,this.beginTime=(performance||Date).now(),this.prevTime=this.beginTime,this.prevCpuTime=this.beginTime,this.frames=0,this.averageCpu={logs:[],graph:[]},this.averageGpu={logs:[],graph:[]},this.queryCreated=!1,this.fpsPanel=this.addPanel(new O5.Panel("FPS","#0ff","#002"),0),this.msPanel=this.addPanel(new O5.Panel("CPU","#0f0","#020"),1),this.gpuPanel=null,this.samplesLog=e,this.samplesGraph=i,this.precision=n,this.logsPerSecond=t,this.minimal?(this.container.addEventListener("click",v=>{v.preventDefault(),this.showPanel(++this.mode%this.container.children.length)},!1),this.mode=a,this.showPanel(this.mode)):window.addEventListener("resize",()=>{this.resizePanel(this.fpsPanel,0),this.resizePanel(this.msPanel,1),this.gpuPanel&&this.resizePanel(this.gpuPanel,2)})}resizePanel(t,e){t.canvas.style.position="absolute",this.minimal?t.canvas.style.display="none":(t.canvas.style.display="block",this.horizontal?(t.canvas.style.top="0px",t.canvas.style.left=e*t.WIDTH/t.PR+"px"):(t.canvas.style.left="0px",t.canvas.style.top=e*t.HEIGHT/t.PR+"px"))}addPanel(t,e){return t.canvas&&(this.container.appendChild(t.canvas),this.resizePanel(t,e)),t}showPanel(t){for(let e=0;e<this.container.children.length;e++){let i=this.container.children[e];i.style.display=e===t?"block":"none"}this.mode=t}init(t){if(t){if(t instanceof WebGL2RenderingContext)this.gl=t;else if(t instanceof HTMLCanvasElement||t instanceof OffscreenCanvas){if(this.gl=t.getContext("webgl2"),!this.gl)return}else return;this.ext=this.gl.getExtension("EXT_disjoint_timer_query_webgl2"),this.ext&&(this.gpuPanel=this.addPanel(new O5.Panel("GPU","#ff0","#220"),2))}}begin(){if(this.beginProfiling("cpu-started"),!(!this.gl||!this.ext)){if(this.query){let t=this.gl.getQueryParameter(this.query,this.gl.QUERY_RESULT_AVAILABLE);if(this.disjoint=this.gl.getParameter(this.ext.GPU_DISJOINT_EXT),t&&!this.disjoint){this.ns=this.gl.getQueryParameter(this.query,this.gl.QUERY_RESULT);let e=this.ns*1e-6;(t||this.disjoint)&&(this.gl.deleteQuery(this.query),this.query=null),t&&this.addToAverage(e,this.averageGpu)}}this.query||(this.queryCreated=!0,this.query=this.gl.createQuery(),this.query&&this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,this.query))}}end(){this.beginTime=this.endInternal(),this.endProfiling("cpu-started","cpu-finished","cpu-duration",this.averageCpu),!(!this.gl||!this.ext)&&this.queryCreated&&this.gl.getQuery(this.ext.TIME_ELAPSED_EXT,this.gl.CURRENT_QUERY)&&this.gl.endQuery(this.ext.TIME_ELAPSED_EXT)}endInternal(){this.frames++;let t=(performance||Date).now();if(t>=this.prevCpuTime+1e3/this.logsPerSecond&&(this.updatePanel(this.msPanel,this.averageCpu),this.updatePanel(this.gpuPanel,this.averageGpu),this.prevCpuTime=t),t>=this.prevTime+1e3){let e=this.frames*1e3/(t-this.prevTime);this.fpsPanel.update(e,e,100,100,0),this.prevTime=t,this.frames=0}return t}addToAverage(t,e){e.logs.push(t),e.logs.length>this.samplesLog&&e.logs.shift(),e.graph.push(t),e.graph.length>this.samplesGraph&&e.graph.shift()}beginProfiling(t){window.performance&&window.performance.mark(t)}endProfiling(t,e,i,n){if(window.performance&&e){window.performance.mark(e);let s=performance.measure(i,t,e);this.addToAverage(s.duration,n)}}updatePanel(t,e){if(e.logs.length>0){let i=0,n=.01;for(let a=0;a<e.logs.length;a++)i+=e.logs[a],e.logs[a]>n&&(n=e.logs[a]);let s=0,o=.01;for(let a=0;a<e.graph.length;a++)s+=e.graph[a],e.graph[a]>o&&(o=e.graph[a]);t&&t.update(i/Math.min(e.logs.length,this.samplesLog),s/Math.min(e.graph.length,this.samplesGraph),n,o,this.precision)}}};vr.Panel=z5;var lr=vr;var _0=typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope,W1=class{constructor(t,e=0){this.canvas=t;u(this,"stats");u(this,"stats2");u(this,"statsGl");u(this,"total",0);u(this,"denseMode");this.stats=new G1.default,this.stats2=new G1.default,this.statsGl=new lr({minimal:!0}),this.stats2.showPanel(2),this.denseMode=typeof D<"u"&&!0||typeof window<"u"&&window.innerHeight<500,this.initStats(),this.setVisibility(e)}addStat(t,e=80){t.style.position="absolute",this.denseMode&&(t.style.height="12px"),t.style.overflow="hidden",t.style.left="",t.style.top="0",t.style.right=`${this.total}px`,t.style.width="80px",t.style.zIndex="1",t.style.opacity="0.8";let i=document.getElementById("corner-indicator-stats"),n=i??document.body;i&&(t.style.position="relative"),n.appendChild(t),this.total+=e}initStats(){let t=this.stats2.dom.children.length===3;this.addStat(this.stats.dom),t&&this.addStat(this.stats2.dom),this.statsGl.init(this.canvas),this.statsGl.container.style.display="flex",this.statsGl.container.style.justifyContent="flex-end";let e=0;for(let i of this.statsGl.container.children){let n=i;e++===0&&(n.style.display="none"),n.style.position=""}}setVisibility(t){t>0?(this.stats.dom.style.display="block",this.stats2.dom.style.display=t>=2?"block":"none",this.statsGl.container.style.display=t>=2?"block":"none"):(this.stats.dom.style.display="none",this.stats2.dom.style.display="none",this.statsGl.container.style.display="none")}markStart(){this.stats.begin(),this.stats2.begin(),this.statsGl.begin()}markEnd(){this.stats.end(),this.stats2.end(),this.statsGl.end()}dispose(){this.stats.dom.remove(),this.stats2.dom.remove(),this.statsGl.container.remove()}},Ve=class{constructor(t,e,i){this.initOptions=t;this.externalCanvas=e;u(this,"canvas");u(this,"renderer");u(this,"animationFrameId");u(this,"timeoutId");u(this,"lastRenderTime",0);u(this,"previousCanvasWidth",0);u(this,"previousCanvasHeight",0);u(this,"currentWidth",0);u(this,"currentHeight",0);u(this,"pendingResize",!1);u(this,"renderedFps",0);u(this,"fpsInterval");u(this,"stats");u(this,"paused",!1);u(this,"disconnected",!1);u(this,"preRender",()=>{});u(this,"render",t=>{});u(this,"postRender",()=>{});u(this,"sizeChanged",()=>{});u(this,"droppedFpsPercentage",0);u(this,"config");u(this,"onRender",[]);u(this,"inWorldRenderingConfig");u(this,"nonReactiveState");this.config=t.config,e?this.canvas=e:this.addToPage();try{this.renderer=new D5.WebGLRenderer({canvas:this.canvas,preserveDrawingBuffer:!0,logarithmicDepthBuffer:!0,powerPreference:this.config.powerPreference})}catch(s){throw t.callbacks.displayCriticalError(new Error(`Failed to create WebGL context, not possible to render (restart browser): ${s.message}`)),s}this.renderer.useLegacyLights=!0,this.renderer.outputColorSpace=D5.LinearSRGBColorSpace,e||(this.updatePixelRatio(),this.setupResizeListener()),this.sizeUpdated(),this.previousCanvasWidth=this.canvas.width,this.previousCanvasHeight=this.canvas.height;let n="WebGL2RenderingContext"in globalThis;!e&&n&&!_0&&(this.stats=new W1(this.canvas,this.config.statsVisible)),this.setupFpsTracking(),this.startRenderLoop()}setupResizeListener(){if(typeof window>"u")return;let t,e=()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.pendingResize=!0},16)};window.addEventListener("resize",e,{passive:!0})}updatePixelRatio(){if(typeof window>"u")return;let t=window.devicePixelRatio||1;this.renderer.capabilities.isWebGL2||(t=1),this.renderer.setPixelRatio(t)}sizeUpdated(){this.renderer.setSize(this.currentWidth,this.currentHeight,!1)}addToPage(){this.canvas=cr(),this.updateCanvasSize()}updateSizeExternal(t,e,i){this.currentWidth=t,this.currentHeight=e,this.renderer.setPixelRatio(i),this.sizeUpdated()}updateCanvasSize(){if(this.externalCanvas||typeof document>"u")return;let t=document.body.offsetWidth,e=document.body.offsetHeight;this.currentWidth!==t&&(this.currentWidth=t),this.currentHeight!==e&&(this.currentHeight=e)}setupFpsTracking(){let t=0;this.fpsInterval=setInterval(()=>{t>0&&(this.droppedFpsPercentage=this.renderedFps/t),t=Math.max(this.renderedFps,t),this.nonReactiveState&&(this.nonReactiveState.fps=this.renderedFps),this.renderedFps=0},1e3)}startRenderLoop(){let t=()=>{if(this.disconnected)return;if(this.config.timeoutRendering){let n=1e3/(this.config.fpsLimit?Math.min(this.config.fpsLimit,60):60);this.timeoutId=setTimeout(t,n)}else this.animationFrameId=requestAnimationFrame(t);if(this.paused||this.renderer.xr.isPresenting&&!this.inWorldRenderingConfig?.vrPageGameRendering)return;if(!this.config.timeoutRendering&&this.config.fpsLimit){let i=performance.now(),n=i-this.lastRenderTime,s=1e3/this.config.fpsLimit;if(n<s)return;this.lastRenderTime=i-n%s}let e=!1;this.pendingResize&&(this.updateCanvasSize(),this.pendingResize=!1),(this.previousCanvasWidth!==this.currentWidth||this.previousCanvasHeight!==this.currentHeight)&&(this.previousCanvasWidth=this.currentWidth,this.previousCanvasHeight=this.currentHeight,this.sizeUpdated(),e=!0),this.frameRender(e),this.config.statsVisible!==void 0&&this.stats?.setVisibility(this.config.statsVisible)};t()}frameRender(t){this.preRender(),this.stats?.markStart(),rr(),globalThis.freezeRender||this.render(t);for(let e of this.onRender)e(t);this.renderedFps++,this.stats?.markEnd(),this.postRender()}setPaused(t){this.paused=t}dispose(){this.disconnected=!0,this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.timeoutId&&clearTimeout(this.timeoutId),this.canvas instanceof HTMLCanvasElement&&this.canvas.remove(),clearInterval(this.fpsInterval),this.stats?.dispose(),this.renderer.dispose()}};function cr(){let r=document.createElement("canvas");return r.id="viewer-canvas",document.body.appendChild(r),r}var N1=()=>{let r=cr(),t=r.transferControlToOffscreen(),e=!1,i=(o,a)=>{},n={width:0,height:0},s=()=>{e||((n.width!==window.innerWidth||n.height!==window.innerHeight)&&(i(window.innerWidth,window.innerHeight),n={width:window.innerWidth,height:window.innerHeight}),requestAnimationFrame(s))};return requestAnimationFrame(s),{canvas:t,destroy(){e=!0,r.remove()},onSizeChanged(o){i=o},get size(){return{width:window.innerWidth,height:window.innerHeight}}}};var dr=0,pt={},V1=40,ue=(r,t=80,e=dr,i=V1)=>{if(_0)return{updateText(){},setVisibility(){}};let n=document.createElement("div");return n.style.position="fixed",n.style.top=`${i??V1}px`,n.style.right=`${e}px`,n.style.backgroundColor="rgba(0, 0, 0, 0.7)",n.style.color="white",n.style.padding="2px",n.style.fontFamily="monospace",n.style.fontSize="12px",n.style.zIndex="100",n.style.pointerEvents="none",document.body.appendChild(n),pt[r]=n,i===void 0&&e===dr&&(V1+=20),{updateText(s){n.innerText!==s&&(n.innerText=s)},setVisibility(s){n.style.display=s?"block":"none"}}};var j1=(r,t)=>{_0||!pt[r]||(pt[r].innerText=t)},ur=r=>{if(!_0)for(let t in pt)pt[t].style.display=r?"block":"none"},fr=()=>{if(!_0)for(let r in pt)io(r)},io=r=>{_0||!pt[r]||(pt[r].remove(),delete pt[r])};x();R();T();k();x();R();T();k();x();R();T();k();x();R();T();k();function Y1(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let a=0;a<n;a++){let v=(o+a*i)*4;if(s.data[v+3]!==255)return!0}return!1}function L5(r){return r/64}function hr(r,t,e){if(e){if(Y1(r,0,0,t,t))return}else if(Y1(r,0,0,t,t/2))return;let i=L5(t),n=(s,o,a,v)=>r.clearRect(s*i,o*i,a*i,v*i);n(40,0,8,8),n(48,0,8,8),n(32,8,8,8),n(40,8,8,8),n(48,8,8,8),n(56,8,8,8),e&&(n(4,32,4,4),n(8,32,4,4),n(0,36,4,12),n(4,36,4,12),n(8,36,4,12),n(12,36,4,12),n(20,32,8,4),n(28,32,8,4),n(16,36,4,12),n(20,36,8,12),n(28,36,4,12),n(32,36,8,12),n(44,32,4,4),n(48,32,4,4),n(40,36,4,12),n(44,36,4,12),n(48,36,4,12),n(52,36,12,12),n(4,48,4,4),n(8,48,4,4),n(0,52,4,12),n(4,52,4,12),n(8,52,4,12),n(12,52,4,12),n(52,48,4,4),n(56,48,4,4),n(48,52,4,12),n(52,52,4,12),n(56,52,4,12),n(60,52,4,12))}function no(r,t){r.save(),r.scale(-1,1);let e=L5(t),i=(n,s,o,a,v,l)=>r.drawImage(r.canvas,n*e,s*e,o*e,a*e,-v*e,l*e,-o*e,a*e);i(4,16,4,4,20,48),i(8,16,4,4,24,48),i(0,20,4,12,24,52),i(4,20,4,12,20,52),i(8,20,4,12,16,52),i(12,20,4,12,28,52),i(44,16,4,4,36,48),i(48,16,4,4,40,48),i(40,20,4,12,40,52),i(44,20,4,12,36,52),i(48,20,4,12,32,52),i(52,20,4,12,44,52),r.restore()}function Q1(r,t){let e=!1;if(t.width!==t.height)if(t.width===2*t.height)e=!0;else throw new Error(`Bad skin size: ${t.width}x${t.height}`);let i=r.getContext("2d",{willReadFrequently:!0});if(e){let n=t.width;r.width=n,r.height=n,i.clearRect(0,0,n,n),i.drawImage(t,0,0,n,n/2),no(i,n),hr(i,r.width,!1)}else r.width=t.width,r.height=t.height,i.clearRect(0,0,t.width,t.height),i.drawImage(t,0,0,r.width,r.height),hr(i,r.width,!0)}function ro(r){if(r.width===2*r.height)return r.width/64;if(r.width*17===r.height*22)return r.width/22;if(r.width*11===r.height*23)return r.width/46;throw new Error(`Bad cape size: ${r.width}x${r.height}`)}function K1(r,t){let e=ro(t);r.width=64*e,r.height=32*e;let i=r.getContext("2d",{willReadFrequently:!0});i.clearRect(0,0,r.width,r.height),i.drawImage(t,0,0,t.width,t.height)}function so(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let a=0;a<n;a++){let v=(o+a*i)*4;if(!(s.data[v+0]===0&&s.data[v+1]===0&&s.data[v+2]===0&&s.data[v+3]===255))return!1}return!0}function oo(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let a=0;a<n;a++){let v=(o+a*i)*4;if(!(s.data[v+0]===255&&s.data[v+1]===255&&s.data[v+2]===255&&s.data[v+3]===255))return!1}return!0}function J1(r){let t=L5(r.width),e=r.getContext("2d",{willReadFrequently:!0}),i=(a,v,l,c)=>Y1(e,a*t,v*t,l*t,c*t),n=(a,v,l,c)=>so(e,a*t,v*t,l*t,c*t),s=(a,v,l,c)=>oo(e,a*t,v*t,l*t,c*t);return i(50,16,2,4)||i(54,20,2,12)||i(42,48,2,4)||i(46,52,2,12)||n(50,16,2,4)&&n(54,20,2,12)&&n(42,48,2,4)&&n(46,52,2,12)||s(50,16,2,4)&&s(54,20,2,12)&&s(42,48,2,4)&&s(46,52,2,12)?"slim":"default"}function q1(r,t){if(t.width!==t.height&&t.width!==2*t.height)throw new Error(`Bad skin size: ${t.width}x${t.height}`);let e=L5(t.width),i=14*e,n=7*e;r.width=i,r.height=n;let s=r.getContext("2d",{willReadFrequently:!0});s.clearRect(0,0,i,n),s.drawImage(t,24*e,0,i,n,0,0,i,n)}x();R();T();k();import ao from"mc-assets/dist/other-textures/latest/entity/player/wide/steve.png";x();R();T();k();import*as gt from"three";var A0=(r,t=!1)=>{r instanceof gt.Mesh&&(r.geometry?.dispose?.(),r.material?.dispose?.()),r.children&&r.children.forEach(e=>A0(e,t)),t&&r instanceof gt.Mesh&&r.material?.map?.dispose?.()},Z1={},mr={},F5=r=>{let t=new gt.Texture,e=I5(r).then(i=>{let n=new OffscreenCanvas(i.width,i.height);return n.getContext("2d").drawImage(i,0,0),t.source.data=n,t.needsUpdate=!0,t});return{texture:t,promise:e}},kt=async r=>F5(r).texture,X1=r=>{let t=L0(r.width,r.height);t.getContext("2d").drawImage(r,0,0);let i=new gt.Texture(t);return i.magFilter=gt.NearestFilter,i.minFilter=gt.NearestFilter,i};async function U5(r,t,e){if(!Z1[r]){let{promise:n,resolve:s}=Promise.withResolvers(),o=F5(r);Z1[r]=o.texture,o.promise.then(s),mr[r]=n}t(Z1[r]),mr[r].then(()=>{e?.()})}var vt=ao,Zd=kt(vt),pr={apiEnabled:!0},gr=r=>{Object.assign(pr,r)};async function Tt(r,t){if(!pr.apiEnabled||t==="cape")return;let e=`https://playerdb.co/api/player/minecraft/${r}`,i=await fetch(e);return i.ok?(await i.json()).data.player.skin_texture:void 0}async function Qt(r){r.startsWith("data:")||(r=await vo(r.replace("http://","https://")));let t=await I5(r),e=L0(64,64);return Q1(e,t),{canvas:e,image:t}}var vo=async r=>{let e=await(await fetch(r,{})).arrayBuffer();return`data:image/png;base64,${L.from(e).toString("base64")}`};x();R();T();k();var lo=r=>{let t=r%24e3/24e3-.25;return t<0&&(t+=1),t>1&&(t-=1),t+(1-Math.cos(t*Math.PI))/2},co=r=>{let t=(r%24e3+24e3)%24e3,e=lo(t),n=Math.cos(e*Math.PI*2)*.5+.5,s=Math.round(4+n*11);return Math.max(4,Math.min(15,s))},$1=r=>{let t=(r%24e3+24e3)%24e3;if(t>=0&&t<12e3)return 15;if(t>=12e3&&t<13e3){let e=(t-12e3)/1e3;return Math.round(15-e*11)}else{if(t>=13e3&&t<23e3)return 4;{let e=(t-23e3)/1e3;return Math.round(4+e*11)}}},uo=()=>{let r=[{ticks:0,label:"6:00 AM (sunrise)"},{ticks:6e3,label:"12:00 PM (noon)"},{ticks:12e3,label:"6:00 PM (sunset starts)"},{ticks:12500,label:"6:30 PM (sunset mid)"},{ticks:13e3,label:"7:00 PM (night begins)"},{ticks:18e3,label:"12:00 AM (midnight)"},{ticks:19e3,label:"1:00 AM"},{ticks:23e3,label:"5:00 AM (dawn begins)"},{ticks:23500,label:"5:30 AM (dawn mid)"}];for(let{ticks:t,label:e}of r){let i=co(t),n=$1(t)}};typeof window<"u"&&(window.debugSkyLight=uo);function Ye(r,t){return(r%t+t)%t}var bt=class bt{constructor(t,e,i){this.resourcesManager=t;this.displayOptions=e;this.initOptions=i;u(this,"worldReadyResolvers",Promise.withResolvers());u(this,"worldReadyPromise",this.worldReadyResolvers.promise);u(this,"timeOfTheDay",0);u(this,"worldSizeParams",{minY:0,worldHeight:256});u(this,"reactiveDebugParams",fo({stopRendering:!1,chunksRenderAboveOverride:void 0,chunksRenderAboveEnabled:!1,chunksRenderBelowOverride:void 0,chunksRenderBelowEnabled:!1,chunksRenderDistanceOverride:void 0,chunksRenderDistanceEnabled:!1,disableEntities:!1}));u(this,"active",!1);u(this,"loadedChunks",{});u(this,"finishedChunks",{});u(this,"finishedSections",{});u(this,"sectionsWaiting",new Map);u(this,"queuedChunks",new Set);u(this,"queuedFunctions",[]);u(this,"renderUpdateEmitter",new Nt);u(this,"customTexturesDataUrl");u(this,"workers",[]);u(this,"viewerChunkPosition");u(this,"lastViewerChunkGridX");u(this,"lastViewerChunkGridZ");u(this,"lastCamUpdate",0);u(this,"droppedFpsPercentage",0);u(this,"initialChunkLoadWasStartedIn");u(this,"initialChunksLoad",!0);u(this,"enableChunksLoadDelay",!1);u(this,"texturesVersion");u(this,"viewDistance",-1);u(this,"onRenderDistanceChanged");u(this,"chunksLength",0);u(this,"allChunksFinished",!1);u(this,"messageQueue",[]);u(this,"isProcessingQueue",!1);u(this,"ONMESSAGE_TIME_LIMIT",30);u(this,"handleResize",()=>{});u(this,"highestBlocksByChunks",new Map);u(this,"blockEntities",{});u(this,"workersProcessAverageTime",0);u(this,"workersProcessAverageTimeCount",0);u(this,"maxWorkersProcessTime",0);u(this,"workersPreAverageTime",0);u(this,"workersWasmAverageTime",0);u(this,"workersPostAverageTime",0);u(this,"workersPhaseSampleCount",0);u(this,"workersPreTargetConvertAverageTime",0);u(this,"workersPreNeighborConvertAverageTime",0);u(this,"workersPreNeighborCountAverage",0);u(this,"workersPreTypedArrayBuildAverageTime",0);u(this,"workersPreOtherAverageTime",0);u(this,"workersPreCacheHitsTotal",0);u(this,"workersPreCacheMissesTotal",0);u(this,"geometryReceiveCount",{});u(this,"allLoadedIn");u(this,"onWorldSwitched",[]);u(this,"renderTimeMax",0);u(this,"renderTimeAvg",0);u(this,"renderTimeAvgCount",0);u(this,"edgeChunks",{});u(this,"lastAddChunk",null);u(this,"neighborChunkUpdates",!0);u(this,"lastChunkDistance",0);u(this,"debugStopGeometryUpdate",!1);u(this,"protocolCustomBlocks",new Map);u(this,"heightmapDebounceTimers",new Map);u(this,"sectionDirtyCount",new Map);u(this,"sectionDirtyTimers",new Map);u(this,"sectionDirtyPendingArgs",new Map);u(this,"blockStateModelInfo",new Map);u(this,"worldBlockProvider");u(this,"soundSystem");u(this,"worldRendererConfig");u(this,"playerStateReactive");u(this,"playerStateUtils");u(this,"reactiveState");u(this,"mesherLogReader");u(this,"forceCallFromMesherReplayer",!1);u(this,"stopMesherMessagesProcessing",!1);u(this,"abortController",new AbortController);u(this,"lastRendered",0);u(this,"renderingActive",!0);u(this,"geometryReceiveCountPerSec",0);u(this,"mesherLogger",{contents:[],active:new URL(location.href).searchParams.get("mesherlog")==="true"});u(this,"currentRenderedFrames",0);u(this,"fpsAverage",0);u(this,"lastFps",0);u(this,"fpsWorst");u(this,"fpsSamples",0);u(this,"backendInfoReport","-");u(this,"chunksFullInfo","-");u(this,"workerCustomHandleTime",0);u(this,"queueAwaited",!1);u(this,"toWorkerMessagesQueue",{});this.snapshotInitialValues(),this.worldRendererConfig=e.inWorldRenderingConfig,this.playerStateReactive=e.playerStateReactive,this.playerStateUtils=Gn(this.playerStateReactive),this.reactiveState=e.rendererState,this.renderUpdateEmitter.on("update",()=>{let o=Object.keys(this.finishedChunks).length;j1("loaded-chunks",`${o}/${this.chunksLength} chunks (${this.lastChunkDistance}/${this.viewDistance})`)}),ue("downloaded-chunks",100,140,20),this.connect(this.displayOptions.worldView);let n=setInterval(()=>{this.geometryReceiveCountPerSec=Object.values(this.geometryReceiveCount).reduce((o,a)=>o+a,0),this.geometryReceiveCount={},ur(this.displayAdvancedStats),this.updateChunksStats()},500),s=setInterval(()=>{this.fpsUpdate()},1e3);this.abortController.signal.addEventListener("abort",()=>{clearInterval(n),clearInterval(s)})}anyModuleRequiresHeightmap(){return!1}get version(){return this.displayOptions.version}get displayAdvancedStats(){return(this.initOptions.config.statsVisible??0)>1}fpsUpdate(){this.fpsSamples++,this.fpsAverage=(this.fpsAverage*(this.fpsSamples-1)+this.currentRenderedFrames)/this.fpsSamples,this.fpsWorst===void 0?this.fpsWorst=this.currentRenderedFrames:this.fpsWorst=Math.min(this.fpsWorst,this.currentRenderedFrames),this.lastFps=this.currentRenderedFrames,this.displayOptions.nonReactiveState.fps=this.currentRenderedFrames,this.displayOptions.nonReactiveState.worstRenderTime=this.renderTimeMax,this.displayOptions.nonReactiveState.avgRenderTime=this.renderTimeAvg,this.currentRenderedFrames=0}logWorkerWork(t){this.mesherLogger.active&&this.mesherLogger.contents.push(typeof t=="function"?t():t)}async init(){if(this.active)throw new Error("WorldRendererCommon is already initialized");await Promise.all([this.resetWorkers(),(async()=>{this.resourcesManager.currentResources?.allReady&&await this.updateAssetsData()})()]),this.resourcesManager.on("assetsTexturesUpdated",async()=>{this.active&&await this.updateAssetsData()}),this.watchReactivePlayerState(),this.watchReactiveConfig(),this.worldReadyResolvers.resolve()}snapshotInitialValues(){}wasChunkSentToWorker(t){return this.loadedChunks[t]}async getHighestBlocks(t){return this.highestBlocksByChunks.get(t)}updateCustomBlock(t,e,i){if(this.protocolCustomBlocks.set(t,{...this.protocolCustomBlocks.get(t),[e]:i}),this.logWorkerWork(()=>`-> updateCustomBlock ${t} ${e} ${i} ${this.wasChunkSentToWorker(t)}`),this.wasChunkSentToWorker(t)){let[n,s,o]=e.split(",").map(Number);this.setBlockStateId(new je(n,s,o),void 0)}}async getBlockInfo(t,e){let n=`${Math.floor(t.x/16)*16},${Math.floor(t.z/16)*16}`,s=this.protocolCustomBlocks.get(n)?.[`${t.x},${t.y},${t.z}`],o=or(e,s),a=this.blockStateModelInfo.get(o);return{customBlockName:s,modelInfo:a}}initWorkers(t=this.worldRendererConfig.mesherWorkers){for(let e=0;e<t+0;e++){let i=mo(n=>{Array.isArray(n)?this.messageQueue.push(...n):this.messageQueue.push(n),this.processMessageQueue("worker")},this.worldRendererConfig.wasmMesher?"mesherWasm.js":"mesher.js");this.workers.push(i)}}onReactivePlayerStateUpdated(t,e,i=!0){return i&&e(this.playerStateReactive[t]),ti(this.playerStateReactive,t,e)}onReactiveConfigUpdated(t,e){e(this.worldRendererConfig[t]),t==="*"?ho(this.worldRendererConfig,e):ti(this.worldRendererConfig,t,e)}onReactiveDebugUpdated(t,e){e(this.reactiveDebugParams[t]),ti(this.reactiveDebugParams,t,e)}watchReactivePlayerState(){this.onReactivePlayerStateUpdated("backgroundColor",t=>{this.changeBackgroundColor(t)}),this.onReactivePlayerStateUpdated("cardinalLight",t=>{this.changeCardinalLight(t)})}watchReactiveConfig(){this.onReactiveConfigUpdated("fetchPlayerSkins",t=>{gr({apiEnabled:t})})}async processMessageQueue(t){if(this.isProcessingQueue||this.messageQueue.length===0)return;if(this.logWorkerWork(`# ${t} processing queue`),this.lastRendered&&performance.now()-this.lastRendered>this.ONMESSAGE_TIME_LIMIT&&this.worldRendererConfig._experimentalSmoothChunkLoading&&this.renderingActive){let n=performance.now();await new Promise(s=>{requestAnimationFrame(s)}),this.logWorkerWork(`# processing got delayed by ${performance.now()-n}ms`)}this.isProcessingQueue=!0;let e=performance.now(),i=0;for(;this.messageQueue.length>0;){let n=this.stopMesherMessagesProcessing;if(!n){let s=this.messageQueue.shift();this.handleMessage(s),i++}if(n||performance.now()-e>this.ONMESSAGE_TIME_LIMIT&&this.renderingActive&&this.worldRendererConfig._experimentalSmoothChunkLoading){if(this.messageQueue.length>0){requestAnimationFrame(async()=>{this.isProcessingQueue=!1,this.processMessageQueue("queue-delay")});return}break}}this.isProcessingQueue=!1}handleMessage(t){var i,n;let e=t;if(this.active){if(this.mesherLogReader?.workerMessageReceived(e.type,e),e.type!=="geometry"||!this.debugStopGeometryUpdate){let s=performance.now();this.handleWorkerMessage(e),this.workerCustomHandleTime+=performance.now()-s}if(e.type==="geometry"){this.logWorkerWork(()=>`-> ${e.workerIndex} geometry ${e.key} ${JSON.stringify({dataSize:JSON.stringify(e).length})}`),(i=this.geometryReceiveCount)[n=e.workerIndex]??(i[n]=0),this.geometryReceiveCount[e.workerIndex]++;let s=e.key.split(",").map(Number);this.lastChunkDistance=Math.max(...this.getDistance(new je(s[0],0,s[2])))}if(e.type==="sectionFinished"){if(this.logWorkerWork(`<- ${e.workerIndex} sectionFinished ${e.key} ${JSON.stringify({processTime:e.processTime})}`),!this.sectionsWaiting.has(e.key))throw new Error(`sectionFinished event for non-outstanding section ${e.key}`);this.sectionsWaiting.set(e.key,this.sectionsWaiting.get(e.key)-1),this.sectionsWaiting.get(e.key)===0&&(this.sectionsWaiting.delete(e.key),this.finishedSections[e.key]=!0);let s=e.key.split(",").map(Number),o=`${s[0]},${s[2]}`;if(this.loadedChunks[o]){let a=!0,v=this.getSectionHeight();for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=v)if(!this.finishedSections[`${s[0]},${l},${s[2]}`]){a=!1;break}if(a){this.finishedChunks[o]=!0;let l=16;this.reactiveState.world.chunksLoaded.add(`${Math.floor(s[0]/l)},${Math.floor(s[2]/l)}`),this.renderUpdateEmitter.emit("chunkFinished",`${s[0]},${s[2]}`),this.checkAllFinished()}}if(this.renderUpdateEmitter.emit("update"),e.processTime&&(this.workersProcessAverageTimeCount++,this.workersProcessAverageTime=(this.workersProcessAverageTime*(this.workersProcessAverageTimeCount-1)+e.processTime)/this.workersProcessAverageTimeCount,this.maxWorkersProcessTime=Math.max(this.maxWorkersProcessTime,e.processTime)),typeof e.pre=="number"&&typeof e.wasm=="number"&&typeof e.post=="number"&&(e.pre>0||e.wasm>0||e.post>0)){let a=++this.workersPhaseSampleCount;this.workersPreAverageTime=(this.workersPreAverageTime*(a-1)+e.pre)/a,this.workersWasmAverageTime=(this.workersWasmAverageTime*(a-1)+e.wasm)/a,this.workersPostAverageTime=(this.workersPostAverageTime*(a-1)+e.post)/a;let v=typeof e.preTargetConvert=="number"?e.preTargetConvert:0,l=typeof e.preNeighborConvert=="number"?e.preNeighborConvert:0,c=typeof e.preNeighborCount=="number"?e.preNeighborCount:0,d=typeof e.preTypedArrayBuild=="number"?e.preTypedArrayBuild:0,h=typeof e.preOther=="number"?e.preOther:0,p=typeof e.preCacheHits=="number"?e.preCacheHits:0,g=typeof e.preCacheMisses=="number"?e.preCacheMisses:0;if(this.workersPreTargetConvertAverageTime=(this.workersPreTargetConvertAverageTime*(a-1)+v)/a,this.workersPreNeighborConvertAverageTime=(this.workersPreNeighborConvertAverageTime*(a-1)+l)/a,this.workersPreNeighborCountAverage=(this.workersPreNeighborCountAverage*(a-1)+c)/a,this.workersPreTypedArrayBuildAverageTime=(this.workersPreTypedArrayBuildAverageTime*(a-1)+d)/a,this.workersPreOtherAverageTime=(this.workersPreOtherAverageTime*(a-1)+h)/a,this.workersPreCacheHitsTotal+=p,this.workersPreCacheMissesTotal+=g,this.worldRendererConfig.debugWasmPerf&&a%bt.PHASE_PERF_LOG_INTERVAL===0){let b=this.workersPreAverageTime+this.workersWasmAverageTime+this.workersPostAverageTime,A=b>0?this.workersPreAverageTime/b*100:0,w=b>0?this.workersWasmAverageTime/b*100:0,_=b>0?this.workersPostAverageTime/b*100:0,S=this.workersPreAverageTime,M=S>0?this.workersPreTargetConvertAverageTime/S*100:0,C=S>0?this.workersPreNeighborConvertAverageTime/S*100:0,H=S>0?this.workersPreTypedArrayBuildAverageTime/S*100:0,B=S>0?this.workersPreOtherAverageTime/S*100:0,I=this.workersPreNeighborCountAverage,W=I>0?this.workersPreNeighborConvertAverageTime/I:0,z=this.workersPreCacheHitsTotal+this.workersPreCacheMissesTotal,j=z>0?this.workersPreCacheHitsTotal/z*100:0}}}if(e.type==="blockStateModelInfo")for(let[s,o]of Object.entries(e.info))this.blockStateModelInfo.set(s,o);e.type==="heightmap"&&this.reactiveState.world.heightmaps.set(e.key,new Int16Array(e.heightmap))}}downloadMesherLog(){let t=document.createElement("a");t.href="data:text/plain;charset=utf-8,"+encodeURIComponent(this.mesherLogger.contents.join(`
16
+ `)),t.download="mesher.log",t.click()}checkAllFinished(){this.sectionsWaiting.size===0&&(this.reactiveState.world.mesherWork=!1),Object.keys(this.finishedChunks).length>=this.chunksLength&&(this.allChunksLoaded?.(),this.allChunksFinished=!0,this.allLoadedIn??(this.allLoadedIn=Date.now()-this.initialChunkLoadWasStartedIn)),this.updateChunksStats()}changeHandSwingingState(t,e){}updateViewerPosition(t){this.viewerChunkPosition=t;for(let[n,s]of Object.entries(this.loadedChunks))s&&this.updatePosDataChunk?.(n);let e=Math.floor(t.x/16),i=Math.floor(t.z/16);(e!==this.lastViewerChunkGridX||i!==this.lastViewerChunkGridZ)&&(this.lastViewerChunkGridX=e,this.lastViewerChunkGridZ=i,this.onViewerChunkPositionChanged())}onViewerChunkPositionChanged(){}sendWorkers(t){for(let e of this.workers)e.postMessage(t)}getDistance(t){let[e,i]=de(this.viewerChunkPosition),n=16,s=Math.abs(e-Math.floor(t.x/n)),o=Math.abs(i-Math.floor(t.z/n));return[s,o]}resetWorld(){for(let t of this.workers)t.terminate();this.workers=[]}async resetWorkers(){this.resetWorld(),typeof document<"u"&&document?.readyState==="loading"&&await new Promise(t=>{document.addEventListener("DOMContentLoaded",t)}),this.initWorkers(),this.active=!0,this.sendMesherMcData()}getMesherConfig(){let t=this.timeOfTheDay,e=t<0||t>24e3?15:$1(t);return{version:this.version,enableLighting:this.worldRendererConfig.enableLighting,skyLight:e,smoothLighting:this.worldRendererConfig.smoothLighting,shadingTheme:this.worldRendererConfig.shadingTheme,cardinalLight:this.worldRendererConfig.cardinalLight,outputFormat:this.outputFormat,debugModelVariant:this.worldRendererConfig.debugModelVariant,clipWorldBelowY:this.worldRendererConfig.clipWorldBelowY,disableBlockEntityTextures:!this.worldRendererConfig.extraBlockRenderers,worldMinY:this.worldMinYRender,worldMaxY:this.worldMinYRender+this.worldSizeParams.worldHeight,disableConversionCache:this.worldRendererConfig.disableMesherConversionCache}}sendMesherMcData(){let t=this.resourcesManager.currentResources.mcData;ei(this.workers,this.version,Ne,t),this.logWorkerWork("# mcData sent")}async updateAssetsData(){let t=this.resourcesManager.currentResources;if(this.workers.length===0)throw new Error("workers not initialized yet");for(let[e,i]of this.workers.entries()){let{blockstatesModels:n}=t;i.postMessage({type:"mesherData",workerIndex:e,blocksAtlas:{latest:t.blocksAtlasJson},blockstatesModels:n,config:this.getMesherConfig()})}this.logWorkerWork("# mesherData sent")}getSectionHeight(){return sr}get worldMinYRender(){let t=this.getSectionHeight();return Math.floor(Math.max(this.worldSizeParams.minY,this.worldRendererConfig.clipWorldBelowY??-1/0)/t)*t}updateChunksStats(){let t=Object.keys(this.finishedChunks);this.displayOptions.nonReactiveState.world.chunksLoaded=new Set(t),this.displayOptions.nonReactiveState.world.chunksTotalNumber=this.chunksLength,this.reactiveState.world.allChunksLoaded=this.allChunksFinished;let e=`Q: ${this.messageQueue.length} ${Object.keys(this.loadedChunks).length}/${Object.keys(this.finishedChunks).length}/${this.chunksLength} chunks (${this.workers.length}:${this.workersProcessAverageTime.toFixed(0)}ms/${this.geometryReceiveCountPerSec}ss/${this.allLoadedIn?.toFixed(1)??"-"}s)`;this.chunksFullInfo=e,j1("downloaded-chunks",e)}addColumn(t,e,i,n){if(!this.active)return;if(this.workers.length===0)throw new Error("workers not initialized yet");this.initialChunksLoad=!1,this.initialChunkLoadWasStartedIn??(this.initialChunkLoadWasStartedIn=Date.now()),this.loadedChunks[`${t},${e}`]=!0,this.updateChunksStats();let s=`${t},${e}`,o=this.protocolCustomBlocks.get(s);for(let l of this.workers)l.postMessage({type:"chunk",x:t,z:e,chunk:i,customBlockModels:o||void 0});this.worldRendererConfig.wasmMesher||this.workers[0].postMessage({type:"getHeightmap",x:t,z:e}),this.logWorkerWork(()=>`-> chunk ${JSON.stringify({x:t,z:e,chunkLength:i.length,customBlockModelsLength:o?Object.keys(o).length:0})}`),this.mesherLogReader?.chunkReceived(t,e,i.length);let a=this.getSectionHeight(),v=16;for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=a){let c=new je(t,l,e);this.setSectionDirty(c),this.neighborChunkUpdates&&(!n||this.worldRendererConfig.smoothLighting)&&(this.setSectionDirty(c.offset(-v,0,0)),this.setSectionDirty(c.offset(v,0,0)),this.setSectionDirty(c.offset(0,0,-v)),this.setSectionDirty(c.offset(0,0,v)))}}markAsLoaded(t,e){this.loadedChunks[`${t},${e}`]=!0,this.finishedChunks[`${t},${e}`]=!0,this.logWorkerWork(`-> markAsLoaded ${JSON.stringify({x:t,z:e})}`),this.renderUpdateEmitter.emit("chunkFinished",`${t},${e}`),this.checkAllFinished()}removeColumn(t,e){delete this.loadedChunks[`${t},${e}`];let i=`${t},${e}`,n=this.heightmapDebounceTimers.get(i);n&&(clearTimeout(n),this.heightmapDebounceTimers.delete(i));for(let[o,a]of this.sectionDirtyTimers)o.startsWith(`${t},`)&&o.endsWith(`,${e}`)&&(clearTimeout(a),this.sectionDirtyTimers.delete(o),this.sectionDirtyCount.delete(o),this.sectionDirtyPendingArgs.delete(o));for(let o of this.workers)o.postMessage({type:"unloadChunk",x:t,z:e});this.logWorkerWork(`-> unloadChunk ${JSON.stringify({x:t,z:e})}`),delete this.finishedChunks[`${t},${e}`],this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength,Object.keys(this.finishedChunks).length===0&&(this.allLoadedIn=void 0,this.initialChunkLoadWasStartedIn=void 0);let s=this.getSectionHeight();for(let o=this.worldSizeParams.minY;o<this.worldSizeParams.worldHeight;o+=s)this.setSectionDirty(new je(t,o,e),!1),delete this.finishedSections[`${t},${o},${e}`];this.highestBlocksByChunks.delete(`${t},${e}`),this.reactiveState.world.heightmaps.delete(`${Math.floor(t/16)},${Math.floor(e/16)}`),this.updateChunksStats(),Object.keys(this.loadedChunks).length===0&&(this.mesherLogger.contents=[],this.logWorkerWork("# all chunks unloaded. New log started"),this.mesherLogReader?.maybeStartReplay())}setBlockStateId(t,e,i=!0){(async()=>{let o=Math.floor(t.x/16)*16,a=Math.floor(t.z/16)*16;this.queuedChunks.has(`${o},${a}`)&&await new Promise(v=>{this.queuedFunctions.push(()=>{v()})}),this.loadedChunks[`${o},${a}`],this.setBlockStateIdInner(t,e,i)})()}updateEntity(t,e=!1){}lightUpdate(t,e){}connect(t){let e=t;e.on("entity",n=>{this.updateEntity(n,!1)}),e.on("entityMoved",n=>{this.updateEntity(n,!0)}),e.on("playerEntity",n=>{this.updatePlayerEntity?.(n)});let i=null;e.on("loadChunk",({x:n,z:s,chunk:o,worldConfig:a,isLightUpdate:v})=>{this.worldSizeParams=a,this.queuedChunks.add(`${n},${s}`);let l=[n,s,o,v];i||(i={data:[],timeout:setTimeout(()=>{for(let c of i.data)this.queuedChunks.delete(`${c[0]},${c[1]}`),this.addColumn(...c);for(let c of this.queuedFunctions)c();this.queuedFunctions=[],i=null},this.worldRendererConfig.addChunksBatchWaitTime)}),i.data.push(l)}),e.on("blockEntities",n=>{this.blockEntities=n}),e.on("unloadChunk",({x:n,z:s})=>{this.removeColumn(n,s)}),e.on("blockUpdate",({pos:n,stateId:s})=>{this.setBlockStateId(new je(n.x,n.y,n.z),s)}),e.on("chunkPosUpdate",({pos:n})=>{this.updateViewerPosition(n)}),e.on("end",()=>{this.worldStop?.()}),e.on("renderDistance",n=>{this.viewDistance=n,this.chunksLength=n===0?1:Le(n).length,this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength,this.onRenderDistanceChanged?.(n)}),e.on("markAsLoaded",({x:n,z:s})=>{this.markAsLoaded(n,s)}),e.on("updateLight",({pos:n})=>{this.lightUpdate(n.x,n.z)}),e.on("onWorldSwitch",()=>{for(let n of this.onWorldSwitched)try{n()}catch(s){setTimeout(()=>{throw s},0)}}),e.on("time",n=>{this.worldRendererConfig.dayCycle&&(this.timeUpdated?.(n),this.timeOfTheDay=n)}),e.on("biomeUpdate",({biome:n})=>{this.biomeUpdated?.(n)}),e.on("biomeReset",()=>{this.biomeReset?.()})}setBlockStateIdInner(t,e,i=!0){let s=`${Math.floor(t.x/16)*16},${Math.floor(t.z/16)*16}`,o=`${t.x},${t.y},${t.z}`,a=this.protocolCustomBlocks.get(s)||{};for(let v of this.workers)v.postMessage({type:"blockUpdate",pos:t,stateId:e,customBlockModels:a});if(this.anyModuleRequiresHeightmap()){let v=Math.floor(t.x/16)*16,l=Math.floor(t.z/16)*16,c=`${v},${l}`;if(!this.worldRendererConfig.wasmMesher){let d=this.heightmapDebounceTimers.get(c);d&&clearTimeout(d),this.heightmapDebounceTimers.set(c,setTimeout(()=>{this.heightmapDebounceTimers.delete(c),this.workers[0]?.postMessage({type:"getHeightmap",x:v,z:l})},100))}}if(this.logWorkerWork(`-> blockUpdate ${JSON.stringify({pos:t,stateId:e,customBlockModels:a})}`),this.setSectionDirty(t,!0,!0),this.neighborChunkUpdates){let l=this.getSectionHeight();t.x&15||this.setSectionDirty(t.offset(-16,0,0),!0,!0),(t.x&15)===15&&this.setSectionDirty(t.offset(16,0,0),!0,!0),t.y&l-1||this.setSectionDirty(t.offset(0,-l,0),!0,!0),(t.y&l-1)===l-1&&this.setSectionDirty(t.offset(0,l,0),!0,!0),t.z&15||this.setSectionDirty(t.offset(0,0,-16),!0,!0),(t.z&15)===15&&this.setSectionDirty(t.offset(0,0,16),!0,!0),i&&(!(t.x&15)&&!(t.z&15)&&this.setSectionDirty(t.offset(-16,0,-16),!0,!0),(t.x&15)===15&&!(t.z&15)&&this.setSectionDirty(t.offset(16,0,-16),!0,!0),!(t.x&15)&&(t.z&15)===15&&this.setSectionDirty(t.offset(-16,0,16),!0,!0),(t.x&15)===15&&(t.z&15)===15&&this.setSectionDirty(t.offset(16,0,16),!0,!0),!(t.x&15)&&!(t.y&l-1)&&this.setSectionDirty(t.offset(-16,-l,0),!0,!0),(t.x&15)===15&&!(t.y&l-1)&&this.setSectionDirty(t.offset(16,-l,0),!0,!0),!(t.z&15)&&!(t.y&l-1)&&this.setSectionDirty(t.offset(0,-l,-16),!0,!0),(t.z&15)===15&&!(t.y&l-1)&&this.setSectionDirty(t.offset(0,-l,16),!0,!0),!(t.y&l-1)&&!(t.x&15)&&!(t.z&15)&&this.setSectionDirty(t.offset(-16,-l,-16),!0,!0),!(t.y&l-1)&&(t.x&15)===15&&!(t.z&15)&&this.setSectionDirty(t.offset(16,-l,-16),!0,!0),!(t.y&l-1)&&!(t.x&15)&&(t.z&15)===15&&this.setSectionDirty(t.offset(-16,-l,16),!0,!0),!(t.y&l-1)&&(t.x&15)===15&&(t.z&15)===15&&this.setSectionDirty(t.offset(16,-l,16),!0,!0))}}getWorkerNumber(t,e=!1){let n=this.getSectionHeight();if(this.worldRendererConfig.dedicatedChangeWorker&&this.workers.length>1){if(this.worldRendererConfig.wasmMesher)return Ye(Math.floor(t.x/16)+Math.floor(t.z/16),this.workers.length);if(e){let a=`${Math.floor(t.x/16)*16},${Math.floor(t.y/n)*n},${Math.floor(t.z/16)*16}`;if(this.sectionsWaiting.get(a)&&!this.finishedSections[a]){let l=this.workers.length-1;return Ye(Math.floor(t.x/16)+Math.floor(t.y/n)+Math.floor(t.z/16),l)}return this.workers.length-1}let o=this.workers.length-1;return Ye(Math.floor(t.x/16)+Math.floor(t.y/n)+Math.floor(t.z/16),o)}if(this.worldRendererConfig.wasmMesher)return Ye(Math.floor(t.x/16)+Math.floor(t.z/16),this.workers.length);if(e){let o=`${Math.floor(t.x/16)*16},${Math.floor(t.y/n)*n},${Math.floor(t.z/16)*16}`;if(!(this.sectionsWaiting.get(o)&&!this.finishedSections[o]))return 0}return Ye(Math.floor(t.x/16)+Math.floor(t.y/n)+Math.floor(t.z/16),this.workers.length)}async debugGetWorkerCustomBlockModel(t){let e=[];for(let i of this.workers)e.push(new Promise(n=>{i.addEventListener("message",s=>{s.data.type==="customBlockModel"&&n(s.data.customBlockModel)})})),i.postMessage({type:"getCustomBlockModel",pos:t});return Promise.all(e)}setSectionDirty(t,e=!0,i=!1){if(!this.forceCallFromMesherReplayer&&this.mesherLogReader)return;if(this.viewDistance===-1)throw new Error("viewDistance not set");let n=this.getDistance(t);if(!this.workers.length||n[0]>this.viewDistance||n[1]>this.viewDistance)return;if(!e){this._dispatchDirtyImmediate(t,e,i);return}let s=16,o=this.getSectionHeight(),a=`${Math.floor(t.x/s)*s},${Math.floor(t.y/o)*o},${Math.floor(t.z/s)*s}`,v=(this.sectionDirtyCount.get(a)??0)+1;this.sectionDirtyCount.set(a,v),v<=bt.GEOMETRY_THROTTLE_THRESHOLD?(this._dispatchDirtyImmediate(t,e,i),this.sectionDirtyTimers.has(a)||this.sectionDirtyTimers.set(a,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(a);this.sectionDirtyCount.delete(a),this.sectionDirtyTimers.delete(a),this.sectionDirtyPendingArgs.delete(a),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},bt.GEOMETRY_THROTTLE_DELAY))):(this.sectionDirtyPendingArgs.set(a,{pos:t,value:e,useChangeWorker:i}),this.sectionDirtyTimers.has(a)||this.sectionDirtyTimers.set(a,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(a);this.sectionDirtyCount.delete(a),this.sectionDirtyTimers.delete(a),this.sectionDirtyPendingArgs.delete(a),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},bt.GEOMETRY_THROTTLE_DELAY)))}_dispatchDirtyImmediate(t,e,i){var v;this.reactiveState.world.mesherWork=!0;let n=16,s=this.getSectionHeight(),o=`${Math.floor(t.x/n)*n},${Math.floor(t.y/s)*s},${Math.floor(t.z/n)*n}`;this.renderUpdateEmitter.emit("dirty",t,e);let a=this.getWorkerNumber(t,i&&(this.mesherLogger.active||this.worldRendererConfig.dedicatedChangeWorker));this.sectionsWaiting.set(o,(this.sectionsWaiting.get(o)??0)+1),this.forceCallFromMesherReplayer?this.workers[a].postMessage({type:"dirty",x:t.x,y:t.y,z:t.z,value:e,config:this.getMesherConfig()}):((v=this.toWorkerMessagesQueue)[a]??(v[a]=[]),this.toWorkerMessagesQueue[a].push({type:"dirty",x:t.x,y:t.y,z:t.z,value:e,config:this.getMesherConfig()}),this.dispatchMessages())}dispatchMessages(){this.queueAwaited||(this.queueAwaited=!0,setTimeout(()=>{for(let t in this.toWorkerMessagesQueue){let e=this.workers[Number(t)],i=this.toWorkerMessagesQueue[t];e.postMessage(i);for(let n of i)this.logWorkerWork(`-> ${t} dispatchMessages ${n.type} ${JSON.stringify({x:n.x,y:n.y,z:n.z,value:n.value})}`)}this.toWorkerMessagesQueue={},this.queueAwaited=!1}))}async waitForChunksToRender(){return new Promise((t,e)=>{if([...this.sectionsWaiting].length===0){t();return}let i=()=>{this.sectionsWaiting.size===0&&(this.renderUpdateEmitter.removeListener("update",i),t())};this.renderUpdateEmitter.on("update",i)})}async waitForChunkToLoad(t){return new Promise((e,i)=>{let s=`${Math.floor(t.x/16)*16},${Math.floor(t.z/16)*16}`;if(this.loadedChunks[s]){e();return}let o=()=>{this.loadedChunks[s]&&(this.renderUpdateEmitter.removeListener("update",o),e())};this.renderUpdateEmitter.on("update",o)})}destroy(){for(let t of this.heightmapDebounceTimers.values())clearTimeout(t);this.heightmapDebounceTimers.clear();for(let t of this.sectionDirtyTimers.values())clearTimeout(t);this.sectionDirtyTimers.clear(),this.sectionDirtyCount.clear(),this.sectionDirtyPendingArgs.clear();for(let t of this.workers)t.terminate();this.workers=[],this.soundSystem&&(this.soundSystem.destroy(),this.soundSystem=void 0),this.active=!1,this.loadedChunks={},this.finishedChunks={},this.finishedSections={},this.sectionsWaiting.clear(),this.queuedChunks.clear(),this.blockStateModelInfo.clear(),this.renderUpdateEmitter.removeAllListeners(),this.abortController.abort(),fr()}};u(bt,"PHASE_PERF_LOG_INTERVAL",64),u(bt,"GEOMETRY_THROTTLE_THRESHOLD",1),u(bt,"GEOMETRY_THROTTLE_DELAY",100);var G5=bt,mo=(r,t="mesher.js")=>{let e;if(D.env.SINGLE_FILE_BUILD){let i=document.getElementById("mesher-worker-code").textContent,n=new Blob([i],{type:"text/javascript"});e=new Worker(window.URL.createObjectURL(n))}else e=new Worker(t);return e.onmessage=({data:i})=>{r(i)},e.on&&e.on("message",i=>{e.onmessage({data:i})}),e},ei=(r,t,e=Ne,i)=>{let n={version:JSON.parse(JSON.stringify(i.version))};for(let[s,o]of Object.entries(e))n[s]=i[o];for(let s of r)s.postMessage({type:"mcData",mcData:n})};x();R();T();k();import{Vec3 as po}from"vec3";import*as X0 from"three";x();R();T();k();function W5(r,t){let e=t/180*Math.PI,i=Math.cos(e),n=Math.sin(e),s={x:0,y:1,z:2}[r],o=(s+1)%3,a=(s+2)%3,v=[[0,0,0],[0,0,0],[0,0,0]];return v[s][s]=1,v[o][o]=i,v[o][a]=-n,v[a][o]=+n,v[a][a]=i,v}function ii(r,t){return t?[r[0]+t[0],r[1]+t[1],r[2]+t[2]]:r}function ni(r,t){return t?[r[0]-t[0],r[1]-t[1],r[2]-t[2]]:r}function fe(r,t){return r?[r[0][0]*t[0]+r[0][1]*t[1]+r[0][2]*t[2],r[1][0]*t[0]+r[1][1]*t[1]+r[1][2]*t[2],r[2][0]*t[0]+r[2][1]*t[1]+r[2][2]*t[2]]:t}function br(r,t){let e=[[0,0,0],[0,0,0],[0,0,0]],i=r[0][0],n=r[1][0],s=r[2][0],o=r[0][1],a=r[1][1],v=r[2][1],l=r[0][2],c=r[1][2],d=r[2][2],h=t[0][0],p=t[1][0],g=t[2][0],b=t[0][1],A=t[1][1],w=t[2][1],_=t[0][2],S=t[1][2],M=t[2][2];return e[0][0]=i*h+n*b+s*_,e[1][0]=i*p+n*A+s*S,e[2][0]=i*g+n*w+s*M,e[0][1]=o*h+a*b+v*_,e[1][1]=o*p+a*A+v*S,e[2][1]=o*g+a*w+v*M,e[0][2]=l*h+c*b+d*_,e[1][2]=l*p+c*A+d*S,e[2][2]=l*g+c*w+d*M,e}var ri={up:{dir:[0,1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[0,1,1,0,1],[1,1,1,1,1],[0,1,0,0,0],[1,1,0,1,0]]},down:{dir:[0,-1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[1,0,1,0,1],[0,0,1,1,1],[1,0,0,0,0],[0,0,0,1,0]]},east:{dir:[1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],mask1:[1,0,1],mask2:[0,1,1],corners:[[1,0,0,1,1],[0,0,0,0,1],[1,1,0,1,0],[0,1,0,0,0]]},south:{dir:[0,0,1],mask1:[1,0,1],mask2:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};function go(r,t,e,i,n,s,o,a){let v=new po(0,0,0);for(let l in r.faces){let c=r.faces[l],{corners:d,mask1:h,mask2:p}=ri[l],g=fe(i,ri[l].dir);if(c.cullface&&a[l])continue;let b=r.from[0],A=r.from[1],w=r.from[2],_=r.to[0],S=r.to[1],M=r.to[2],C=c.texture,{u:H}=C,{v:B}=C,{su:I}=C,{sv:W}=C,z=Math.floor(e.positions.length/3),j=[1,1,1];c.tintindex!==void 0&&c.tintindex===0&&(j=[.5686274509803921,.7411764705882353,.34901960784313724]);let q=c.rotation||0,e0=Math.cos(q*Math.PI/180),V=-Math.sin(q*Math.PI/180),Z=null,K=null;r.rotation&&(Z=W5(r.rotation.axis,r.rotation.angle),K=ni(r.rotation.origin,fe(Z,r.rotation.origin)));let n0=[],s0=1;for(let l0 of d){let $=[l0[0]?_:b,l0[1]?S:A,l0[2]?M:w];$=ii(fe(Z,$),K),$=ii(fe(i,$),n),$=$.map(Y0=>Y0/16),e.positions.push($[0],$[1],$[2]),e.normals.push(...g);let u0=(l0[3]-.5)*e0-(l0[4]-.5)*V+.5,$0=(l0[3]-.5)*V+(l0[4]-.5)*e0+.5;e.uvs.push(u0*I+H,$0*W+B);let z0=1;t&&(z0=4/4*(15/15),n0.push(3)),e.colors.push(s0*j[0]*z0,s0*j[1]*z0,s0*j[2]*z0)}t&&n0[0]+n0[3]>=n0[1]+n0[2]?e.indices.push(z,z+3,z+2,z,z+1,z+3):e.indices.push(z,z+1,z+2,z+2,z+1,z+3)}}var bo=(r,t,e,i,n=[],s={})=>{let l={sx:.5,sy:.5,sz:.5,positions:[],normals:[],colors:[],uvs:[],t_positions:[],t_normals:[],t_colors:[],t_uvs:[],indices:[],tiles:{}};for(let[d,h]of r.entries()){let p=h[n[d]]??h[0];if(!p)continue;let g=null,b=null;for(let w of["x","y","z"])w in p&&(g?g=br(g,W5(w,-(p[w]??0))):g=W5(w,-(p[w]??0)));g&&(b=[8,8,8],b=ni(b,fe(g,b)));let A=p.ao??!0;for(let w of p.elements??[])go(w,A,l,g,b,t,e,s)}let c=l.positions.length/3;for(let d=0;d<l.t_positions.length/12;d++)l.indices.push(c,c+1,c+2,c+2,c+1,c+3,c,c+2,c+1,c+2,c+3,c+1),c+=4;return l.positions.push(...l.t_positions),l.normals.push(...l.t_normals),l.colors.push(...l.t_colors),l.uvs.push(...l.t_uvs),delete l.t_positions,delete l.t_normals,delete l.t_colors,delete l.t_uvs,l.positions=new Float32Array(l.positions),l.normals=new Float32Array(l.normals),l.colors=new Float32Array(l.colors),l.uvs=new Float32Array(l.uvs),l},yo=(...r)=>{let e={geometry:bo(...r)},i=new X0.BufferGeometry;return i.setAttribute("position",new X0.BufferAttribute(e.geometry.positions,3)),i.setAttribute("normal",new X0.BufferAttribute(e.geometry.normals,3)),i.setAttribute("color",new X0.BufferAttribute(e.geometry.colors,3)),i.setAttribute("uv",new X0.BufferAttribute(e.geometry.uvs,2)),i.setIndex(e.geometry.indices),i.name="block-geometry",i},si=(r,...t)=>{let e=yo(...t),i=new X0.Mesh(e,r);i.position.set(-.5,-.5,-.5);let n=new X0.Group;return n.add(i),n.rotation.set(0,-X0.MathUtils.degToRad(90),0,"ZYX"),globalThis.mesh=n,n},yr=(r,t)=>{r.position.set(t.x+.5,t.y+.5,t.z+.5)};x();R();T();k();import*as H0 from"three";x();R();T();k();import Li from"prismarine-nbt";import*as N from"three";x();R();T();k();x();R();T();k();import{BoxGeometry as F0,DoubleSide as di,FrontSide as _r,Group as nt,Mesh as I0,MeshStandardMaterial as Qe,Vector2 as N5}from"three";function ui(r,t,e,i,n,s,o,a){let v=(B,I,W,z)=>[new N5(B/o,1-z/a),new N5(W/o,1-z/a),new N5(W/o,1-I/a),new N5(B/o,1-I/a)],l=v(t+s,e,t+i+s,e+s),c=v(t+i+s,e,t+i*2+s,e+s),d=v(t,e+s,t+s,e+s+n),h=v(t+s,e+s,t+i+s,e+s+n),p=v(t+i+s,e+s,t+i+s*2,e+n+s),g=v(t+i+s*2,e+s,t+i*2+s*2,e+n+s),b=r.attributes.uv,A=[p[3],p[2],p[0],p[1]],w=[d[3],d[2],d[0],d[1]],_=[l[3],l[2],l[0],l[1]],S=[c[0],c[1],c[3],c[2]],M=[h[3],h[2],h[0],h[1]],C=[g[3],g[2],g[0],g[1]],H=[];for(let B of[A,w,_,S,M,C])for(let I of B)H.push(I.x,I.y);b.set(new Float32Array(H)),b.needsUpdate=!0}function it(r,t,e,i,n,s){ui(r,t,e,i,n,s,64,64)}function oi(r,t,e,i,n,s){ui(r,t,e,i,n,s,64,32)}var yt=class extends nt{constructor(t,e){super(),Object.defineProperty(this,"innerLayer",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"outerLayer",{enumerable:!0,configurable:!0,writable:!0,value:e}),t.name="inner",e.name="outer"}},ai=class extends nt{constructor(){super(),Object.defineProperty(this,"head",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightArm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftArm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightLeg",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftLeg",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"modelListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"slim",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_map",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"layer1Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer1MaterialBiased",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer2Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer2MaterialBiased",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.layer1Material=new Qe({side:_r}),this.layer2Material=new Qe({side:di,transparent:!0,alphaTest:1e-5}),this.layer1MaterialBiased=this.layer1Material.clone(),this.layer1MaterialBiased.polygonOffset=!0,this.layer1MaterialBiased.polygonOffsetFactor=1,this.layer1MaterialBiased.polygonOffsetUnits=1,this.layer2MaterialBiased=this.layer2Material.clone(),this.layer2MaterialBiased.polygonOffset=!0,this.layer2MaterialBiased.polygonOffsetFactor=1,this.layer2MaterialBiased.polygonOffsetUnits=1;let t=new F0(8,8,8);it(t,0,0,8,8,8);let e=new I0(t,this.layer1Material),i=new F0(9,9,9);it(i,32,0,8,8,8);let n=new I0(i,this.layer2Material);this.head=new yt(e,n),this.head.name="head",this.head.add(e,n),e.position.y=4,n.position.y=4,this.add(this.head);let s=new F0(8,12,4);it(s,16,16,8,12,4);let o=new I0(s,this.layer1Material),a=new F0(8.5,12.5,4.5);it(a,16,32,8,12,4);let v=new I0(a,this.layer2Material);this.body=new yt(o,v),this.body.name="body",this.body.add(o,v),this.body.position.y=-6,this.add(this.body);let l=new F0,c=new I0(l,this.layer1MaterialBiased);this.modelListeners.push(()=>{c.scale.x=this.slim?3:4,c.scale.y=12,c.scale.z=4,it(l,40,16,this.slim?3:4,12,4)});let d=new F0,h=new I0(d,this.layer2MaterialBiased);this.modelListeners.push(()=>{h.scale.x=this.slim?3.5:4.5,h.scale.y=12.5,h.scale.z=4.5,it(d,40,32,this.slim?3:4,12,4)});let p=new nt;p.add(c,h),this.modelListeners.push(()=>{p.position.x=this.slim?-.5:-1}),p.position.y=-4,this.rightArm=new yt(c,h),this.rightArm.name="rightArm",this.rightArm.add(p),this.rightArm.position.x=-5,this.rightArm.position.y=-2,this.add(this.rightArm);let g=new F0,b=new I0(g,this.layer1MaterialBiased);this.modelListeners.push(()=>{b.scale.x=this.slim?3:4,b.scale.y=12,b.scale.z=4,it(g,32,48,this.slim?3:4,12,4)});let A=new F0,w=new I0(A,this.layer2MaterialBiased);this.modelListeners.push(()=>{w.scale.x=this.slim?3.5:4.5,w.scale.y=12.5,w.scale.z=4.5,it(A,48,48,this.slim?3:4,12,4)});let _=new nt;_.add(b,w),this.modelListeners.push(()=>{_.position.x=this.slim?.5:1}),_.position.y=-4,this.leftArm=new yt(b,w),this.leftArm.name="leftArm",this.leftArm.add(_),this.leftArm.position.x=5,this.leftArm.position.y=-2,this.add(this.leftArm);let S=new F0(4,12,4);it(S,0,16,4,12,4);let M=new I0(S,this.layer1MaterialBiased),C=new F0(4.5,12.5,4.5);it(C,0,32,4,12,4);let H=new I0(C,this.layer2MaterialBiased),B=new nt;B.add(M,H),B.position.y=-6,this.rightLeg=new yt(M,H),this.rightLeg.name="rightLeg",this.rightLeg.add(B),this.rightLeg.position.x=-1.9,this.rightLeg.position.y=-12,this.rightLeg.position.z=-.1,this.add(this.rightLeg);let I=new F0(4,12,4);it(I,16,48,4,12,4);let W=new I0(I,this.layer1MaterialBiased),z=new F0(4.5,12.5,4.5);it(z,0,48,4,12,4);let j=new I0(z,this.layer2MaterialBiased),q=new nt;q.add(W,j),q.position.y=-6,this.leftLeg=new yt(W,j),this.leftLeg.name="leftLeg",this.leftLeg.add(q),this.leftLeg.position.x=1.9,this.leftLeg.position.y=-12,this.leftLeg.position.z=-.1,this.add(this.leftLeg),this.modelType="default"}get map(){return this._map}set map(t){this._map=t,this.layer1Material.map=t,this.layer1Material.needsUpdate=!0,this.layer1MaterialBiased.map=t,this.layer1MaterialBiased.needsUpdate=!0,this.layer2Material.map=t,this.layer2Material.needsUpdate=!0,this.layer2MaterialBiased.map=t,this.layer2MaterialBiased.needsUpdate=!0}get modelType(){return this.slim?"slim":"default"}set modelType(t){this.slim=t==="slim",this.modelListeners.forEach(e=>e())}getBodyParts(){return this.children.filter(t=>t instanceof yt)}setInnerLayerVisible(t){this.getBodyParts().forEach(e=>e.innerLayer.visible=t)}setOuterLayerVisible(t){this.getBodyParts().forEach(e=>e.outerLayer.visible=t)}resetJoints(){this.head.rotation.set(0,0,0),this.leftArm.rotation.set(0,0,0),this.rightArm.rotation.set(0,0,0),this.leftLeg.rotation.set(0,0,0),this.rightLeg.rotation.set(0,0,0),this.body.rotation.set(0,0,0),this.head.position.y=0,this.body.position.y=-6,this.body.position.z=0,this.rightArm.position.x=-5,this.rightArm.position.y=-2,this.rightArm.position.z=0,this.leftArm.position.x=5,this.leftArm.position.y=-2,this.leftArm.position.z=0,this.rightLeg.position.x=-1.9,this.rightLeg.position.y=-12,this.rightLeg.position.z=-.1,this.leftLeg.position.x=1.9,this.leftLeg.position.y=-12,this.leftLeg.position.z=-.1}},vi=class extends nt{constructor(){super(),Object.defineProperty(this,"cape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new Qe({side:di,transparent:!0,alphaTest:1e-5});let t=new F0(10,16,1);oi(t,0,0,10,16,1),this.cape=new I0(t,this.material),this.cape.position.y=-8,this.cape.position.z=.5,this.add(this.cape)}get map(){return this.material.map}set map(t){this.material.map=t,this.material.needsUpdate=!0}},li=class extends nt{constructor(){super(),Object.defineProperty(this,"leftWing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightWing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new Qe({side:di,transparent:!0,alphaTest:1e-5});let t=new F0(12,22,4);oi(t,22,0,10,20,2);let e=new I0(t,this.material);e.position.x=-5,e.position.y=-10,e.position.z=-1,this.leftWing=new nt,this.leftWing.add(e),this.add(this.leftWing);let i=new F0(12,22,4);oi(i,22,0,10,20,2);let n=new I0(i,this.material);n.scale.x=-1,n.position.x=5,n.position.y=-10,n.position.z=-1,this.rightWing=new nt,this.rightWing.add(n),this.add(this.rightWing),this.leftWing.position.x=5,this.leftWing.rotation.x=.2617994,this.resetJoints()}resetJoints(){this.leftWing.rotation.y=.01,this.leftWing.rotation.z=.2617994,this.updateRightWing()}updateRightWing(){this.rightWing.position.x=-this.leftWing.position.x,this.rightWing.position.y=this.leftWing.position.y,this.rightWing.rotation.x=this.leftWing.rotation.x,this.rightWing.rotation.y=-this.leftWing.rotation.y,this.rightWing.rotation.z=-this.leftWing.rotation.z}get map(){return this.material.map}set map(t){this.material.map=t,this.material.needsUpdate=!0}},ci=class extends nt{constructor(){super(),Object.defineProperty(this,"rightEar",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftEar",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new Qe({side:_r});let t=new F0(8,8,4/3);ui(t,0,0,6,6,1,14,7),this.rightEar=new I0(t,this.material),this.rightEar.name="rightEar",this.rightEar.position.x=-6,this.add(this.rightEar),this.leftEar=new I0(t,this.material),this.leftEar.name="leftEar",this.leftEar.position.x=6,this.add(this.leftEar)}get map(){return this.material.map}set map(t){this.material.map=t,this.material.needsUpdate=!0}},wr=10.8*Math.PI/180,Ke=class extends nt{constructor(){super(),Object.defineProperty(this,"skin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"elytra",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ears",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.skin=new ai,this.skin.name="skin",this.skin.position.y=8,this.add(this.skin),this.cape=new vi,this.cape.name="cape",this.cape.position.y=8,this.cape.position.z=-2,this.cape.rotation.x=wr,this.cape.rotation.y=Math.PI,this.add(this.cape),this.elytra=new li,this.elytra.name="elytra",this.elytra.position.y=8,this.elytra.position.z=-2,this.elytra.visible=!1,this.add(this.elytra),this.ears=new ci,this.ears.name="ears",this.ears.position.y=10,this.ears.position.z=2/3,this.ears.visible=!1,this.skin.head.add(this.ears)}get backEquipment(){return this.cape.visible?"cape":this.elytra.visible?"elytra":null}set backEquipment(t){this.cape.visible=t==="cape",this.elytra.visible=t==="elytra"}resetJoints(){this.skin.resetJoints(),this.cape.rotation.x=wr,this.cape.position.y=8,this.cape.position.z=-2,this.elytra.position.y=8,this.elytra.position.z=-2,this.elytra.rotation.x=0,this.elytra.resetJoints()}};x();R();T();k();import{Color as Ef,PointLight as xf,EquirectangularReflectionMapping as Rf,Group as kf,NearestFilter as Tf,PerspectiveCamera as Mf,Scene as Sf,Texture as Cf,Vector2 as Pf,WebGLRenderer as Bf,AmbientLight as If,CanvasTexture as Hf,WebGLRenderTarget as zf,FloatType as Of,DepthTexture as Df,Clock as Lf,Object3D as Ff,ColorManagement as Uf}from"three";import{OrbitControls as Wf}from"three/examples/jsm/controls/OrbitControls.js";import{EffectComposer as Vf}from"three/examples/jsm/postprocessing/EffectComposer.js";import"three/examples/jsm/postprocessing/Pass.js";import{RenderPass as Kf}from"three/examples/jsm/postprocessing/RenderPass.js";import{ShaderPass as qf}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Xf}from"three/examples/jsm/shaders/FXAAShader.js";x();R();T();k();var V5=class{constructor(){Object.defineProperty(this,"speed",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"paused",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"progress",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"currentId",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"progress0",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"animationObjects",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}update(t,e){if(this.paused)return;let i=e*this.speed;this.animate(t,i),this.animationObjects.forEach((n,s)=>{let o=this.progress0.get(s);n(t,this.progress-o,s)}),this.progress+=i}addAnimation(t){let e=this.currentId++;return this.progress0.set(e,this.progress),this.animationObjects.set(e,t),e}removeAnimation(t){t!=null&&(this.animationObjects.delete(t),this.progress0.delete(t))}};x();R();T();k();import{CanvasTexture as vf,NearestFilter as lf,Sprite as cf,SpriteMaterial as df}from"three";x();R();T();k();var wo=Object.defineProperty,_o=(r,t,e)=>t in r?wo(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,h0=(r,t,e)=>(_o(r,typeof t!="symbol"?t+"":t,e),e);function fi(r){let t=[r];if(r.extra&&r.extra.length!==0)for(let e of r.extra)t.push(...fi(e));return t}var X=class{constructor(r,t,e,i,n,s){this.key=r,this.value=t,this.name=e,this.code=i,this.cssForeground=n,this.cssBackground=s}applyToStyle(r){r[this.key]=this.value}matchStyle(r){return r[this.key]===this.value}static fromCode(r){let e="0123456789abcdefklmnor".indexOf(r);if(e)return this.list[e]}toString(){return`${X.CONTROL_STRING}${this.code}`}},m0=X;h0(m0,"CONTROL_STRING","\xA7");h0(m0,"BLACK",new X("color","black","BLACK","0",{color:"#000000"},{color:"#000000"}));h0(m0,"DARK_BLUE",new X("color","dark_blue","DARK_BLUE","1",{color:"#0000AA"},{color:"#00002A"}));h0(m0,"DARK_GREEN",new X("color","dark_green","DARK_GREEN","2",{color:"#00AA00"},{color:"#002A00"}));h0(m0,"DARK_AQUA",new X("color","dark_aqua","DARK_AQUA","3",{color:"#00AAAA"},{color:"#002A2A"}));h0(m0,"DARK_RED",new X("color","dark_red","DARK_RED","4",{color:"#AA0000"},{color:"#2A0000"}));h0(m0,"DARK_PURPLE",new X("color","dark_purple","DARK_PURPLE","5",{color:"#AA00AA"},{color:"#2A002A"}));h0(m0,"GOLD",new X("color","gold","GOLD","6",{color:"#FFAA00"},{color:"#2A2A00"}));h0(m0,"GRAY",new X("color","gray","GRAY","7",{color:"#AAAAAA"},{color:"#2A2A2A"}));h0(m0,"DARK_GRAY",new X("color","dark_gray","DARK_GRAY","8",{color:"#555555"},{color:"#151515"}));h0(m0,"BLUE",new X("color","blue","BLUE","9",{color:"#5555FF"},{color:"#15153F"}));h0(m0,"GREEN",new X("color","green","GREEN","a",{color:"#55FF55"},{color:"#153F15"}));h0(m0,"AQUA",new X("color","aqua","AQUA","b",{color:"#55FFFF"},{color:"#153F3F"}));h0(m0,"RED",new X("color","red","RED","c",{color:"#FF5555"},{color:"#3F1515"}));h0(m0,"LIGHT_PURPLE",new X("color","light_purple","LIGHT_PURPLE","d",{color:"#FF55FF"},{color:"#3F153F"}));h0(m0,"YELLOW",new X("color","yellow","YELLOW","e",{color:"#FFFF55"},{color:"#3F3F15"}));h0(m0,"WHITE",new X("color","white","WHITE","f",{color:"#FFFFFF"},{color:"#3F3F3F"}));h0(m0,"OBFUSCATED",new X("obfuscated",!0,"OBFUSCATED","k",{}));h0(m0,"BOLD",new X("bold",!0,"BOLD","l",{"font-weight":"bold"}));h0(m0,"STRIKETHROUGH",new X("strikethrough",!0,"STRIKETHROUGH","m",{"text-decoration":"line-through"}));h0(m0,"UNDERLINE",new X("underlined",!0,"UNDERLINE","n",{"text-decoration":"underline"}));h0(m0,"ITALIC",new X("italic",!0,"ITALIC","o",{"font-style":"italic"}));h0(m0,"RESET",{name:"RESET",code:"r",applyToStyle(r){r.bold=!1,r.strikethrough=!1,r.underlined=!1,r.italic=!1,r.obfuscated=!1,r.color=void 0},matchStyle(r){return!1},cssBackground:{},cssForeground:{},toString(){return`${X.CONTROL_STRING}r`}});h0(m0,"list",[X.BLACK,X.DARK_BLUE,X.DARK_GREEN,X.DARK_AQUA,X.DARK_RED,X.DARK_PURPLE,X.GOLD,X.GRAY,X.DARK_GRAY,X.BLUE,X.GREEN,X.AQUA,X.RED,X.LIGHT_PURPLE,X.YELLOW,X.WHITE,X.OBFUSCATED,X.BOLD,X.STRIKETHROUGH,X.UNDERLINE,X.ITALIC,X.RESET]);var s5=ze(hi(),1);bi();var c6=ze(Yr(),1);import d6 from"prismarine-chat";x();R();T();k();import*as x0 from"three";x();R();T();k();x();R();T();k();var Mt=class r{constructor(t,e,i,n,s="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),r.nextNameID=r.nextNameID||0,this.$name.id=`lil-gui-name-${++r.nextNameID}`,this.$widget=document.createElement(s),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",o=>o.stopPropagation()),this.domElement.addEventListener("keyup",o=>o.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.innerHTML=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled?this:(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t),this)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){let e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.object[this.property]=t,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},yi=class extends Mt{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function wi(r){let t,e;return(t=r.match(/(#|0x)?([a-f0-9]{6})/i))?e=t[2]:(t=r.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?e=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=r.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(e=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),e?"#"+e:!1}var oa={isPrimitive:!0,match:r=>typeof r=="string",fromHexString:wi,toHexString:wi},t5={isPrimitive:!0,match:r=>typeof r=="number",fromHexString:r=>parseInt(r.substring(1),16),toHexString:r=>"#"+r.toString(16).padStart(6,0)},aa={isPrimitive:!1,match:r=>Array.isArray(r),fromHexString(r,t,e=1){let i=t5.fromHexString(r);t[0]=(i>>16&255)/255*e,t[1]=(i>>8&255)/255*e,t[2]=(i&255)/255*e},toHexString([r,t,e],i=1){i=255/i;let n=r*i<<16^t*i<<8^e*i<<0;return t5.toHexString(n)}},va={isPrimitive:!1,match:r=>Object(r)===r,fromHexString(r,t,e=1){let i=t5.fromHexString(r);t.r=(i>>16&255)/255*e,t.g=(i>>8&255)/255*e,t.b=(i&255)/255*e},toHexString({r,g:t,b:e},i=1){i=255/i;let n=r*i<<16^t*i<<8^e*i<<0;return t5.toHexString(n)}},la=[oa,t5,aa,va];function ca(r){return la.find(t=>t.match(r))}var _i=class extends Mt{constructor(t,e,i,n){super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=ca(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let s=wi(this.$text.value);s&&this._setValueFromHexString(s)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){let e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},$e=class extends Mt{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},Ai=class extends Mt{constructor(t,e,i,n,s,o){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(s);let a=o!==void 0;this.step(a?o:this._getImplicitStep(),a),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){let t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=e*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let e=()=>{let _=parseFloat(this.$input.value);isNaN(_)||(this._stepExplicit&&(_=this._snap(_)),this.setValue(this._clamp(_)))},i=_=>{let S=parseFloat(this.$input.value);isNaN(S)||(this._snapClampSetValue(S+_),this.$input.value=this.getValue())},n=_=>{_.key==="Enter"&&this.$input.blur(),_.code==="ArrowUp"&&(_.preventDefault(),i(this._step*this._arrowKeyMultiplier(_))),_.code==="ArrowDown"&&(_.preventDefault(),i(this._step*this._arrowKeyMultiplier(_)*-1))},s=_=>{this._inputFocused&&(_.preventDefault(),i(this._step*this._normalizeMouseWheel(_)))},o=!1,a,v,l,c,d,h=5,p=_=>{a=_.clientX,v=l=_.clientY,o=!0,c=this.getValue(),d=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",b)},g=_=>{if(o){let S=_.clientX-a,M=_.clientY-v;Math.abs(M)>h?(_.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(S)>h&&b()}if(!o){let S=_.clientY-l;d-=S*this._step*this._arrowKeyMultiplier(_),c+d>this._max?d=this._max-c:c+d<this._min&&(d=this._min-c),this._snapClampSetValue(c+d)}l=_.clientY},b=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",b)},A=()=>{this._inputFocused=!0},w=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",e),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",s,{passive:!1}),this.$input.addEventListener("mousedown",p),this.$input.addEventListener("focus",A),this.$input.addEventListener("blur",w)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let t=(w,_,S,M,C)=>(w-_)/(S-_)*(C-M)+M,e=w=>{let _=this.$slider.getBoundingClientRect(),S=t(w,_.left,_.right,this._min,this._max);this._snapClampSetValue(S)},i=w=>{this._setDraggingStyle(!0),e(w.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",s)},n=w=>{e(w.clientX)},s=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",s)},o=!1,a,v,l=w=>{w.preventDefault(),this._setDraggingStyle(!0),e(w.touches[0].clientX),o=!1},c=w=>{w.touches.length>1||(this._hasScrollBar?(a=w.touches[0].clientX,v=w.touches[0].clientY,o=!0):l(w),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("touchend",h))},d=w=>{if(o){let _=w.touches[0].clientX-a,S=w.touches[0].clientY-v;Math.abs(_)>Math.abs(S)?l(w):(window.removeEventListener("touchmove",d),window.removeEventListener("touchend",h))}else w.preventDefault(),e(w.touches[0].clientX)},h=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",d),window.removeEventListener("touchend",h)},p=this._callOnFinishChange.bind(this),g=400,b,A=w=>{if(Math.abs(w.deltaX)<Math.abs(w.deltaY)&&this._hasScrollBar)return;w.preventDefault();let S=this._normalizeMouseWheel(w)*this._step;this._snapClampSetValue(this.getValue()+S),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(p,g)};this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",A,{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10),e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=Math.round(t/this._step)*this._step;return parseFloat(e.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){let t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},Ei=class extends Mt{constructor(t,e,i,n){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(n)?n:Object.values(n),this._names=Array.isArray(n)?n:Object.keys(n),this._names.forEach(s=>{let o=document.createElement("option");o.innerHTML=s,this.$select.appendChild(o)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){let t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.innerHTML=e===-1?t:this._names[e],this}},xi=class extends Mt{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},da=`.lil-gui {
17
17
  font-family: var(--font-family);
18
18
  font-size: var(--font-size);
19
19
  line-height: 1;
@@ -444,11 +444,11 @@ var bs=Object.create;var He=Object.defineProperty;var ys=Object.getOwnPropertyDe
444
444
  @font-face {
445
445
  font-family: "lil-gui";
446
446
  src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");
447
- }`;function ua(r){let t=document.createElement("style");t.innerHTML=r;let e=document.querySelector("head link[rel=stylesheet], head style");e?document.head.insertBefore(t,e):document.head.appendChild(t)}var Qr=!1,xi=class r{constructor({parent:t,autoPlace:e=t===void 0,container:i,width:n,title:s="Controls",closeFolders:o=!1,injectStyles:a=!0,touchStyles:v=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",l=>{(l.code==="Enter"||l.code==="Space")&&(l.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(s),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),v&&this.domElement.classList.add("allow-touch-styles"),!Qr&&a&&(ua(da),Qr=!0),i?i.appendChild(this.domElement):e&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=o}add(t,e,i,n,s){if(Object(i)===i)return new Ai(this,t,e,i);switch(typeof t[e]){case"number":return new _i(this,t,e,i,n,s);case"boolean":return new bi(this,t,e);case"string":return new Ei(this,t,e);case"function":return new Xe(this,t,e)}}addColor(t,e,i=1){return new wi(this,t,e,i)}addFolder(t){let e=new r({parent:this,title:t});return this.root._closeFolders&&e.close(),e}load(t,e=!0){return t.controllers&&this.controllers.forEach(i=>{i instanceof Xe||i._name in t.controllers&&i.load(t.controllers[i._name])}),e&&t.folders&&this.folders.forEach(i=>{i._title in t.folders&&i.load(t.folders[i._title])}),this}save(t=!0){let e={controllers:{},folders:{}};return this.controllers.forEach(i=>{if(!(i instanceof Xe)){if(i._name in e.controllers)throw new Error(`Cannot save GUI with duplicate property "${i._name}"`);e.controllers[i._name]=i.save()}}),t&&this.folders.forEach(i=>{if(i._title in e.folders)throw new Error(`Cannot save GUI with duplicate folder "${i._title}"`);e.folders[i._title]=i.save()}),e}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let e=this.$children.clientHeight;this.$children.style.height=e+"px",this.domElement.classList.add("transition");let i=s=>{s.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);let n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame(()=>{this.$children.style.height=n+"px"})}),this}title(t){return this._title=t,this.$title.innerHTML=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach(i=>i.reset()),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),this._onChange!==void 0&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),this._onOpenClose!==void 0&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(t=>t.destroy())}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach(e=>{t=t.concat(e.controllersRecursive())}),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach(e=>{t=t.concat(e.foldersRecursive())}),t}},Ri=xi;var wt=class{constructor(t,e,i,n){u(this,"gui",null);u(this,"storageKey","");u(this,"target");u(this,"params",[]);u(this,"paramsMeta",{});u(this,"_visible",!1);u(this,"initialValues",{});u(this,"initialized",!1);if(!_0){this.gui=new Ri,this.storageKey=`debug_params_${t}`,this.target=e,this.paramsMeta=n??{},this.params=i??Object.keys(e);for(let s of this.params)this.initialValues[s]=e[s];this.gui.domElement.style.display="none"}}activate(){return _0?this:(!this.initialized&&this.gui&&(this.loadSavedValues(),this.setupControls(),this.initialized=!0),this.show(),this)}get visible(){return _0?!1:this._visible}set visible(t){_0||!this.gui||(this._visible=t,this.gui.domElement.style.display=t?"block":"none",this.saveVisibility())}loadSavedValues(){if(!_0)try{let t=localStorage.getItem(this.storageKey);if(t){let e=JSON.parse(t);for(let i of this.params)if(i in e){let n=e[i];n!==null&&(this.target[i]=n)}}}catch{}}saveValues(t=!1){if(!_0)try{let e={};for(let i of this.params)e[i]=this.target[i];t?localStorage.removeItem(this.storageKey):localStorage.setItem(this.storageKey,JSON.stringify(e))}catch{}}saveVisibility(){if(!_0)try{localStorage.setItem(`${this.storageKey}_visible`,this._visible.toString())}catch{}}setupControls(){if(!(_0||!this.gui)){this.gui.add(this,"visible").name("Show Controls"),this.gui.add({resetAll:()=>{if(this.gui){for(let t of this.params)this.target[t]=this.initialValues[t];this.saveValues(!0),this.gui.destroy(),this.gui=new Ri,this.setupControls()}}},"resetAll").name("Reset All Parameters");for(let t of this.params){let e=this.target[t],i=this.paramsMeta[t]??{};if(typeof e=="number"){let n=i.min??e-Math.abs(e*2),s=i.max??e+Math.abs(e*2),o=i.step??Math.abs(e)/100;this.gui.add(this.target,t,n,s,o).onChange(()=>this.saveValues())}else if(typeof e=="boolean")this.gui.add(this.target,t).onChange(()=>this.saveValues());else if(typeof e=="string"&&["x","y","z"].includes(t)){let n=i.min??-10,s=i.max??10,o=i.step??.1;this.gui.add(this.target,t,n,s,o).onChange(()=>this.saveValues())}else Array.isArray(e)&&this.gui.add(this.target,t,e).onChange(()=>this.saveValues())}}}save(){_0||(this.saveValues(),this.saveVisibility())}destroy(){_0||!this.gui||(this.saveVisibility(),this.gui.destroy())}toggle(){this.visible=!this.visible}show(){this.visible=!0}hide(){this.visible=!1}};x();R();T();k();x();R();T();k();var q5=class{constructor(){u(this,"currentAnimation",null);u(this,"isAnimating",!1);u(this,"cancelRequested",!1);u(this,"completionCallbacks",[]);u(this,"currentCancelCallback",null)}async startAnimation(t,e){return this.isAnimating&&await this.cancelCurrentAnimation(),new Promise(i=>{this.isAnimating=!0,this.cancelRequested=!1,this.currentCancelCallback=e??null,this.currentAnimation=t(),this.completionCallbacks.push(()=>{this.isAnimating=!1,this.currentAnimation=null,i()})})}async cancelCurrentAnimation(){if(this.isAnimating){if(this.currentCancelCallback){let t=this.currentCancelCallback;this.currentCancelCallback=null,t()}return new Promise(t=>{this.cancelRequested=!0,this.completionCallbacks.push(()=>{t()})})}}animationCycleFinish(){this.cancelRequested&&this.forceFinish()}forceFinish(t=!0){if(!this.isAnimating)return;if(this.currentAnimation){for(let i of this.currentAnimation.getAll())i.stop();this.currentAnimation.removeAll(),this.currentAnimation=null}this.isAnimating=!1,this.cancelRequested=!1;let e=[...this.completionCallbacks];if(this.completionCallbacks=[],t)for(let i of e)i()}update(){this.currentAnimation&&this.currentAnimation.update()}get isActive(){return this.isAnimating}get shouldCancel(){return this.cancelRequested}};var fa={x:3e3,y:3e3,z:3e3,rotation:Math.PI,scale:1,default:3e3},qt=class{constructor(t,e,i){this.getState=t;this.setState=e;u(this,"animationController",new q5);u(this,"defaultState");u(this,"speeds");u(this,"currentStateName","");u(this,"transitioningToStateName","");this.speeds={...fa},i&&Object.assign(this.speeds,i),this.defaultState=this.getState()}calculateDuration(t){let e=0,i=this.getState();for(let[n,s]of Object.entries(t)){let o=i[n],a=Math.abs(s-o),v=this.getPropertySpeed(n),l=a/v*1e3;e=Math.max(e,l)}return Math.min(Math.max(e,200),2e3)}getPropertySpeed(t){return t in this.speeds?this.speeds[t]:t.toLowerCase().includes("rotation")?this.speeds.rotation:t.toLowerCase().includes("scale")?this.speeds.scale:t.toLowerCase()==="x"||t.toLowerCase()==="y"||t.toLowerCase()==="z"?this.speeds[t]:this.speeds.default}startTransition(t,e,i,n=k0.Linear.None,s){this.isTransitioning&&this.animationController.forceFinish(!1),this.transitioningToStateName=e??"";let o=this.getState(),a=this.calculateDuration(t);this.animationController.startAnimation(()=>{let v=new ce;return new S0(o,v).to(t,a).easing(n).onUpdate(l=>{for(let c of Object.keys(l))this.setState(c,l[c])}).onComplete(()=>{this.animationController.forceFinish(),this.currentStateName=this.transitioningToStateName,this.transitioningToStateName="",i?.()}).start(),v},s)}reset(){this.startTransition(this.defaultState)}update(){this.animationController.update()}forceFinish(){this.animationController.forceFinish()}transitionTo(t,e,i,n){this.startTransition(t,e,i,k0.Linear.None,n)}getCurrentValue(t){return this.getState()[t]}get isTransitioning(){return this.animationController.isActive}};x();R();T();k();import{subscribeKey as ha}from"valtio/utils";function Z5(r,t,e,i,n){let s=0,o,a=async()=>{let v=++s,l=await r(t[e]);v===s?(o&&n?.(o),i(l),o=l):n?.(l)};return a(),ha(t,e,a)}x();R();T();k();var Kr=Math.PI/180;function X5(r){let{walkDist:t,prevWalkDist:e,bob:i,prevBob:n,partialTick:s}=r,o=t-e,a=-(t+o*s),v=n+(i-n)*s,l=Math.sin(a*Math.PI),c=Math.cos(a*Math.PI);return{position:{x:l*v*.5,y:-Math.abs(c*v)},rotation:{x:Math.abs(Math.cos(a*Math.PI-.2)*v)*5*Kr,z:l*v*3*Kr}}}x();R();T();k();var $5=r=>({"minecraft:display_context":"firstperson","minecraft:use_duration":r.playerStateReactive.itemUsageTicks,"minecraft:using_item":!!r.playerStateReactive.itemUsageTicks}),ma=()=>({"minecraft:display_context":"firstperson"}),ye=(r,t)=>{if(!t)return"empty";if(t.type==="hand")return"hand";let e=t.name??(t.id!==void 0?`#${t.id}`:"unknown");if(!r.resourcesManager.currentResources)return`${t.type}:${e}`;let i=r.getItemRenderData({...t.fullItem,itemId:t.id},ma());return`${t.type}:${e}:${i.modelName}`};var U0=new x0.Matrix4,Jr=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function pa(r,t){let e=new x0.Matrix4,i=1,n=Math.sqrt(r),s=-.3*Math.sin(n*Math.PI),o=.4*Math.sin(n*2*Math.PI),a=-.4*Math.sin(r*Math.PI);return e.multiply(U0.makeTranslation(i*(s+.64),o-.6+t*-.6,a-.72)),e.multiply(U0.makeRotationY(i*45*Math.PI/180)),e.multiply(U0.makeRotationY(i*Math.sin(n*Math.PI)*70*Math.PI/180)),e.multiply(U0.makeRotationZ(i*Math.sin(r*r*Math.PI)*-20*Math.PI/180)),e.multiply(U0.makeTranslation(i*-1,3.6,3.5)),e.multiply(U0.makeRotationZ(i*120*Math.PI/180)),e.multiply(U0.makeRotationX(200*Math.PI/180)),e.multiply(U0.makeRotationY(i*-135*Math.PI/180)),e.multiply(U0.makeTranslation(i*5.6,0,0)),e.multiply(U0.makeTranslation(i*-5/16,2/16,0)),e}function ga(r,t){let e=new x0.Matrix4,i=1,n=Math.sqrt(r),s=-.4*Math.sin(n*Math.PI),o=.2*Math.sin(n*2*Math.PI),a=-.2*Math.sin(r*Math.PI);e.multiply(U0.makeTranslation(i*s,o,a)),e.multiply(U0.makeTranslation(i*.56,-.52+t*-.6,-.72));let v=Math.sin(r*r*Math.PI),l=Math.sin(n*Math.PI);return e.multiply(U0.makeRotationY(i*(45+v*-20)*Math.PI/180)),e.multiply(U0.makeRotationZ(i*l*-20*Math.PI/180)),e.multiply(U0.makeRotationX(l*-80*Math.PI/180)),e.multiply(U0.makeRotationY(i*-45*Math.PI/180)),e}var t5=class{constructor(t,e=!1){this.worldRenderer=t;this.offHand=e;u(this,"holdingBlock");u(this,"blockSwapAnimation");u(this,"cameraGroup",new x0.Mesh);u(this,"armTransformGroup",new x0.Group);u(this,"camera",new x0.PerspectiveCamera(70,1,.05,100));u(this,"equipProgress",0);u(this,"stopUpdate",!1);u(this,"lastHeldItem");u(this,"lastHeldItemRenderKey");u(this,"currentDisplayType","hand");u(this,"isSwinging",!1);u(this,"nextIterStopCallbacks");u(this,"idleAnimator");u(this,"ready",!1);u(this,"lastUpdate",0);u(this,"xBob",0);u(this,"yBob",0);u(this,"lastBobUpdateTime",0);u(this,"lastBobWalkDist",0);u(this,"lastBobTickTime",0);u(this,"playerHand");u(this,"offHandDisplay",!1);u(this,"offHandModeLegacy",!1);u(this,"swingAnimator");u(this,"config");u(this,"disposed",!1);u(this,"unsubs",[]);u(this,"lastItemModelName");u(this,"switchRequest",0);this.initCameraGroup(),this.swingAnimator=new ki,this.unsubs.push(this.worldRenderer.onReactivePlayerStateUpdated("heldItemMain",()=>{this.offHand||this.updateItem()},!1),this.worldRenderer.onReactivePlayerStateUpdated("heldItemOff",()=>{this.offHand&&this.updateItem()},!1)),this.config=t.displayOptions.inWorldRenderingConfig,this.offHandDisplay=this.offHand,this.offHand||e5().then(i=>{this.disposed||(this.playerHand=i,this.updateItem())}).then(()=>{if(this.disposed)return;let i=Z5(async()=>e5(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",n=>{n&&(this.playerHand=n,this.updateItem())},n=>{A0(n,!0)});this.unsubs.push(i)})}dispose(){this.disposed=!0,this.unsubs.forEach(t=>t()),this.unsubs=[],this.idleAnimator?.destroy(),this.idleAnimator=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.blockSwapAnimation?.switcher.forceFinish(),this.blockSwapAnimation=void 0,A0(this.cameraGroup,!0),this.holdingBlock&&this.holdingBlock!==this.playerHand&&A0(this.holdingBlock,!0),this.holdingBlock=void 0,this.playerHand&&(A0(this.playerHand,!0),this.playerHand=void 0),this.ready=!1}updateItem(){if(!this.ready)return;let t=this.offHand?this.worldRenderer.playerStateReactive.heldItemOff:this.worldRenderer.playerStateReactive.heldItemMain;t?this.setNewItem(t):this.offHand?this.setNewItem():this.setNewItem({type:"hand"})}initCameraGroup(){this.cameraGroup=new x0.Mesh,this.armTransformGroup=new x0.Group,this.armTransformGroup.matrixAutoUpdate=!1,this.cameraGroup.add(this.armTransformGroup)}startSwing(){this.swingAnimator?.startSwing()}stopSwing(){this.swingAnimator?.stopSwing()}render(t,e,i,n){if(!this.lastHeldItem)return;let s=performance.now();this.lastUpdate&&s-this.lastUpdate>50&&this.replaceItemModel(this.lastHeldItem),(this.swingAnimator?.isCurrentlySwinging()||this.swingAnimator?.debugParams.animationStage)&&this.swingAnimator?.update(),this.blockSwapAnimation?.switcher.update();let o=new x0.Scene;o.add(this.cameraGroup);let a=e.getSize(new x0.Vector2),v=a.height>a.width;v?this.camera.aspect!==1&&(this.camera.aspect=1,this.camera.updateProjectionMatrix()):this.camera.aspect!==t.aspect&&(this.camera.aspect=t.aspect,this.camera.updateProjectionMatrix()),this.updateCameraGroup(),o.add(i.clone()),o.add(n.clone());let{offHandDisplay:l}=this;if(l&&(this.cameraGroup.scale.x=-1),e.autoClear=!1,e.clearDepth(),v){let c=Math.min(a.width,a.height);l?e.setViewport(0,0,c,c):e.setViewport(a.width-c,0,c,c)}e.render(o,this.camera),v&&e.setViewport(0,0,a.width,a.height),l&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(t){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new qt(()=>({progress:this.equipProgress}),(n,s)=>{n==="progress"&&(this.equipProgress=s)},{progress:4})});let e=t==="disappeared"?1:0,i=!1;return new Promise(n=>{this.blockSwapAnimation.switcher.transitionTo({progress:e},t,()=>{i||n(!0)},()=>{i=!0,n(!1)})})}isDifferentItem(t){return this.lastHeldItemRenderKey!==ye(this.worldRenderer,t)}updateCameraGroup(){if(this.stopUpdate)return;let{camera:t}=this,e=performance.now(),i=this.worldRenderer.cameraShake.getBaseRotation(),n=i.pitch,s=i.yaw;if(this.lastBobUpdateTime===0)this.xBob=n,this.yBob=s;else{let h=Math.min((e-this.lastBobUpdateTime)/1e3,.1),p=1-Math.pow(.5,h*28),g=1-Math.pow(.5,h*36);this.xBob+=(n-this.xBob)*p,this.yBob+=Jr(s-this.yBob)*g}this.lastBobUpdateTime=e;let o=(n-this.xBob)*-.05,a=Jr(s-this.yBob)*-.035;if(this.cameraGroup.position.copy(t.position),this.cameraGroup.rotation.copy(t.rotation),this.worldRenderer.displayOptions.inWorldRenderingConfig.viewBobbing){let h=this.worldRenderer.playerStateReactive;h.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=e,this.lastBobWalkDist=h.walkDist);let p=Math.min((e-this.lastBobTickTime)/50,1),g=1.8,b=X5({walkDist:h.walkDist*g,prevWalkDist:h.prevWalkDist*g,bob:h.bob,prevBob:h.prevBob,partialTick:p});this.cameraGroup.position.x+=b.position.x,this.cameraGroup.position.y+=b.position.y,this.cameraGroup.rotation.z+=b.rotation.z,this.cameraGroup.rotation.x+=b.rotation.x}this.cameraGroup.rotation.x+=o,this.cameraGroup.rotation.y+=a;let l=this.currentDisplayType,c=this.swingAnimator?.getSwingProgress()??0,d;l==="hand"?d=pa(c,this.equipProgress):d=ga(c,this.equipProgress),this.armTransformGroup.matrix.copy(d),this.armTransformGroup.matrixWorldNeedsUpdate=!0}async createItemModel(t){if(this.lastUpdate=performance.now(),!t||t.type==="hand"&&!this.playerHand)return;let e;if(t.type==="item"||t.type==="block"){let i=this.worldRenderer.entities.getItemMesh({...t.fullItem,itemId:t.id},$5(this.worldRenderer),!1,this.lastItemModelName);if(i){let{mesh:n,isBlock:s,modelName:o}=i;s?(e=n,t.type="block"):(e=n,t.type="item"),this.lastItemModelName=o}}else e=this.playerHand;if(e){if(t.type==="item"||t.type==="block"){let i=new x0.Group;i.name="displayTransform",t.type==="item"?(i.position.set(1.13/16,3.2/16,1.13/16),i.rotation.set(0,x0.MathUtils.degToRad(-90),x0.MathUtils.degToRad(25),"XYZ"),i.scale.set(.68,.68,.68)):(i.rotation.set(0,x0.MathUtils.degToRad(45),0,"XYZ"),i.scale.set(.4,.4,.4)),i.add(e),e=i}return e.name="holdingBlock",{model:e,type:t.type}}}async replaceItemModel(t){if(this.blockSwapAnimation?.switcher.isTransitioning)return;if(!t){this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0,this.currentDisplayType="hand";let i=this.swingAnimator;i?.stopSwing(),i&&(i.type="hand"),this.idleAnimator=void 0;return}let e=await this.createItemModel(t);e&&(this.holdingBlock?.removeFromParent(),this.holdingBlock=e.model,this.currentDisplayType=e.type,this.armTransformGroup.add(e.model))}testUnknownBlockSwitch(){this.setNewItem({type:"item",name:"minecraft:some-unknown-block",id:0,fullItem:{}})}async setNewItem(t){let e=ye(this.worldRenderer,t),i=this.lastHeldItemRenderKey!==e;if(this.lastHeldItem=t,!i)return;this.lastHeldItemRenderKey=e,this.lastItemModelName=void 0;let n=++this.switchRequest,s=!1;if(this.holdingBlock){if(s=!0,!await this.playBlockSwapAnimation("disappeared"))return;this.holdingBlock.removeFromParent(),this.holdingBlock!==this.playerHand&&A0(this.holdingBlock,!1),this.holdingBlock=void 0}if(!t){this.currentDisplayType="hand";let v=this.swingAnimator;v?.stopSwing(),v&&(v.type="hand"),this.idleAnimator=void 0,this.blockSwapAnimation=void 0;return}if(n!==this.switchRequest)return;let o=await this.createItemModel(t);if(!o||n!==this.switchRequest)return;this.holdingBlock=o.model,this.currentDisplayType=o.type,this.armTransformGroup.add(this.holdingBlock),s&&await this.playBlockSwapAnimation("appeared");let a=this.swingAnimator;a&&(a.type=o.type),this.idleAnimator=void 0}};var ki=class{constructor(){u(this,"animationTimer",0);u(this,"lastTime",0);u(this,"isAnimating",!1);u(this,"stopRequested",!1);u(this,"swingProgress",0);u(this,"type","hand");u(this,"debugParams",{animationTime:250,animationStage:0});u(this,"debugGui");this.debugGui=new wt("hand_animator",this.debugParams,void 0,{animationStage:{min:0,max:1,step:.01}})}update(){if(!this.isAnimating&&!this.debugParams.animationStage){this.swingProgress=0;return}let t=performance.now(),e=(t-this.lastTime)/1e3;this.lastTime=t,this.animationTimer+=e*1e3;let i=this.debugParams.animationStage||Math.min(this.animationTimer/this.debugParams.animationTime,1);if(i>=1){if(this.stopRequested){this.isAnimating=!1,this.stopRequested=!1,this.animationTimer=0,this.swingProgress=0;return}this.animationTimer=0,this.swingProgress=0;return}this.swingProgress=i}getSwingProgress(){return this.swingProgress}startSwing(){this.stopRequested=!1,!this.isAnimating&&(this.isAnimating=!0,this.animationTimer=0,this.lastTime=performance.now())}stopSwing(){this.isAnimating&&(this.stopRequested=!0)}isCurrentlySwinging(){return this.isAnimating}},qr=(r,t,e,i,n)=>{let s=i.transformModel(t,{name:e,properties:{}});return ri(r,[[s]],void 0,"plains",n)};x();R();T();k();import*as a0 from"three";function ba(r,t){let{depth:e,pixelSize:i}=t;if(r.width<=0||r.height<=0)throw new Error(`Invalid canvas dimensions: ${r.width}x${r.height}`);let s=r.getContext("2d").getImageData(0,0,r.width,r.height),{data:o}=s,a=r.width,v=r.height,l=e/2,c=i??1/Math.max(a,v),d=(B,I)=>{if(B<0||I<0||B>=a||I>=v)return!1;let W=(I*a+B)*4;return o[W+3]>128},h=[],p=[],g=[],b=[],A=0,w=(B,I,W,z,j,q,e0,V)=>(h.push(B,I,W),g.push(z,j),b.push(q,e0,V),A++),_=(B,I,W,z)=>{p.push(B,I,W,B,W,z)},S=(B,I)=>{let W=(B/a-.5)*c*a,z=-(I/v-.5)*c*v;return{x:W,y:z}},M=Array.from({length:v+1},()=>Array.from({length:a+1},()=>null)),C=Array.from({length:v+1},()=>Array.from({length:a+1},()=>null));for(let B=0;B<=v;B++)for(let I=0;I<=a;I++){let{x:W,y:z}=S(I-.5,B-.5),j=I/a,q=B/v,e0=!1,V=[[I-1,B-1],[I,B-1],[I-1,B],[I,B]];for(let[Z,K]of V)if(d(Z,K)){e0=!0;break}e0&&(M[B][I]=w(W,z,l,j,q,0,0,1),C[B][I]=w(W,z,-l,j,q,0,0,-1))}for(let B=0;B<v;B++)for(let I=0;I<a;I++){if(!d(I,B))continue;let W=M[B][I],z=M[B][I+1],j=M[B+1][I+1],q=M[B+1][I],e0=C[B][I],V=C[B][I+1],Z=C[B+1][I+1],K=C[B+1][I];W!==null&&z!==null&&j!==null&&q!==null&&_(W,z,j,q),e0!==null&&V!==null&&Z!==null&&K!==null&&_(V,e0,K,Z)}for(let B=0;B<v;B++)for(let I=0;I<a;I++){if(!d(I,B))continue;let W=(I+.5)/a,z=(B+.5)/v;if(!d(I-1,B)){let j=M[B][I],q=M[B+1][I],e0=C[B][I],V=C[B+1][I];if(j!==null&&q!==null&&e0!==null&&V!==null){let Z=w(h[j*3],h[j*3+1],h[j*3+2],W,z,-1,0,0),K=w(h[q*3],h[q*3+1],h[q*3+2],W,z,-1,0,0),n0=w(h[V*3],h[V*3+1],h[V*3+2],W,z,-1,0,0),s0=w(h[e0*3],h[e0*3+1],h[e0*3+2],W,z,-1,0,0);_(Z,K,n0,s0)}}if(!d(I+1,B)){let j=M[B+1][I+1],q=M[B][I+1],e0=C[B+1][I+1],V=C[B][I+1];if(j!==null&&q!==null&&e0!==null&&V!==null){let Z=w(h[j*3],h[j*3+1],h[j*3+2],W,z,1,0,0),K=w(h[q*3],h[q*3+1],h[q*3+2],W,z,1,0,0),n0=w(h[V*3],h[V*3+1],h[V*3+2],W,z,1,0,0),s0=w(h[e0*3],h[e0*3+1],h[e0*3+2],W,z,1,0,0);_(Z,K,n0,s0)}}if(!d(I,B-1)){let j=M[B][I],q=M[B][I+1],e0=C[B][I],V=C[B][I+1];if(j!==null&&q!==null&&e0!==null&&V!==null){let Z=w(h[j*3],h[j*3+1],h[j*3+2],W,z,0,-1,0),K=w(h[q*3],h[q*3+1],h[q*3+2],W,z,0,-1,0),n0=w(h[V*3],h[V*3+1],h[V*3+2],W,z,0,-1,0),s0=w(h[e0*3],h[e0*3+1],h[e0*3+2],W,z,0,-1,0);_(Z,K,n0,s0)}}if(!d(I,B+1)){let j=M[B+1][I+1],q=M[B+1][I],e0=C[B+1][I+1],V=C[B+1][I];if(j!==null&&q!==null&&e0!==null&&V!==null){let Z=w(h[j*3],h[j*3+1],h[j*3+2],W,z,0,1,0),K=w(h[q*3],h[q*3+1],h[q*3+2],W,z,0,1,0),n0=w(h[V*3],h[V*3+1],h[V*3+2],W,z,0,1,0),s0=w(h[e0*3],h[e0*3+1],h[e0*3+2],W,z,0,1,0);_(Z,K,n0,s0)}}}let H=new a0.BufferGeometry;return H.setAttribute("position",new a0.Float32BufferAttribute(h,3)),H.setAttribute("uv",new a0.Float32BufferAttribute(g,2)),H.setAttribute("normal",new a0.Float32BufferAttribute(b,3)),H.setIndex(p),H.computeVertexNormals(),{geometry:H,totalVertices:A,totalTriangles:p.length/3}}function ya(r,t){let{u:e,v:i,sizeX:n,sizeY:s}=t,o=Math.max(1,Math.floor(n*r.image.width)),a=Math.max(1,Math.floor(s*r.image.height)),v=document.createElement("canvas");v.width=o,v.height=a;let l=v.getContext("2d");return l.imageSmoothingEnabled=!1,l.drawImage(r.image,e*r.image.width,i*r.image.height,n*r.image.width,s*r.image.height,0,0,v.width,v.height),v}function Zr(r,t,e={}){let{faceCamera:i=!1,use3D:n=!0,depth:s=.04}=e,{u:o,v:a,sizeX:v,sizeY:l}=t;if(i){let b=r.clone();b.flipY=!0,b.offset.set(o,1-a-l),b.repeat.set(v,l),b.needsUpdate=!0,b.magFilter=a0.NearestFilter,b.minFilter=a0.NearestFilter;let A=new a0.SpriteMaterial({map:b,transparent:!0,alphaTest:.1});return{mesh:new a0.Sprite(A),itemsTexture:b,cleanup(){b.dispose()}}}if(n)try{let b=ya(r,t),{geometry:A}=ba(b,{depth:s}),w=new a0.CanvasTexture(b);w.magFilter=a0.NearestFilter,w.minFilter=a0.NearestFilter,w.wrapS=w.wrapT=a0.ClampToEdgeWrapping,w.flipY=!1,w.needsUpdate=!0;let _=new a0.MeshStandardMaterial({map:w,side:a0.DoubleSide,transparent:!0,alphaTest:.1});return{mesh:new a0.Mesh(A,_),itemsTexture:w,cleanup(){w.dispose(),A.dispose(),_.map&&_.map.dispose(),_.dispose()}}}catch{}let c=r.clone();c.flipY=!0,c.offset.set(o,1-a-l),c.repeat.set(v,l),c.needsUpdate=!0,c.magFilter=a0.NearestFilter,c.minFilter=a0.NearestFilter;let d=c.clone();d.repeat.x*=-1,d.needsUpdate=!0,d.offset.set(o+v,1-a-l);let h=new a0.MeshStandardMaterial({map:c,transparent:!0,alphaTest:.1}),p=new a0.MeshStandardMaterial({map:d,transparent:!0,alphaTest:.1});return{mesh:new a0.Mesh(new a0.BoxGeometry(1,1,0),[new a0.MeshBasicMaterial({color:0}),new a0.MeshBasicMaterial({color:0}),new a0.MeshBasicMaterial({color:0}),new a0.MeshBasicMaterial({color:0}),h,p]),itemsTexture:c,itemsTextureFlipped:d,cleanup(){c.dispose(),d.dispose(),h.dispose(),p.dispose()}}}x();R();T();k();import*as J from"three";x();R();T();k();x();R();T();k();import{REVISION as wa}from"three";var Xr=parseInt(wa.replace(/\D+/g,""));x();R();T();k();import{Loader as _a,FileLoader as Aa,Group as Ea,BufferGeometry as $r,Float32BufferAttribute as we,LineBasicMaterial as Ti,Material as t3,PointsMaterial as t1,MeshPhongMaterial as xa,LineSegments as e3,Points as Mi,Mesh as i3,Vector3 as i5}from"three";var Ra=/^[og]\s*(.+)?/,ka=/^mtllib /,Ta=/^usemtl /,Ma=/^usemap /,n3=new i5,Si=new i5,r3=new i5,s3=new i5,rt=new i5;function Sa(){let r={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,e){if(this.object&&this.object.fromDeclaration===!1){this.object.name=t,this.object.fromDeclaration=e!==!1;return}let i=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:e!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(n,s){let o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);let a={index:this.materials.length,name:n||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:o!==void 0?o.smooth:this.smooth,groupStart:o!==void 0?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(v){let l={index:typeof v=="number"?v:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return l.clone=this.clone.bind(l),l}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(n){let s=this.currentMaterial();if(s&&s.groupEnd===-1&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),n&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return n&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),s}},i&&i.name&&typeof i.clone=="function"){let n=i.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(t,e){let i=parseInt(t,10);return(i>=0?i-1:i+e/3)*3},parseNormalIndex:function(t,e){let i=parseInt(t,10);return(i>=0?i-1:i+e/3)*3},parseUVIndex:function(t,e){let i=parseInt(t,10);return(i>=0?i-1:i+e/2)*2},addVertex:function(t,e,i){let n=this.vertices,s=this.object.geometry.vertices;s.push(n[t+0],n[t+1],n[t+2]),s.push(n[e+0],n[e+1],n[e+2]),s.push(n[i+0],n[i+1],n[i+2])},addVertexPoint:function(t){let e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){let e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,i){let n=this.normals,s=this.object.geometry.normals;s.push(n[t+0],n[t+1],n[t+2]),s.push(n[e+0],n[e+1],n[e+2]),s.push(n[i+0],n[i+1],n[i+2])},addFaceNormal:function(t,e,i){let n=this.vertices,s=this.object.geometry.normals;n3.fromArray(n,t),Si.fromArray(n,e),r3.fromArray(n,i),rt.subVectors(r3,Si),s3.subVectors(n3,Si),rt.cross(s3),rt.normalize(),s.push(rt.x,rt.y,rt.z),s.push(rt.x,rt.y,rt.z),s.push(rt.x,rt.y,rt.z)},addColor:function(t,e,i){let n=this.colors,s=this.object.geometry.colors;n[t]!==void 0&&s.push(n[t+0],n[t+1],n[t+2]),n[e]!==void 0&&s.push(n[e+0],n[e+1],n[e+2]),n[i]!==void 0&&s.push(n[i+0],n[i+1],n[i+2])},addUV:function(t,e,i){let n=this.uvs,s=this.object.geometry.uvs;s.push(n[t+0],n[t+1]),s.push(n[e+0],n[e+1]),s.push(n[i+0],n[i+1])},addDefaultUV:function(){let t=this.object.geometry.uvs;t.push(0,0),t.push(0,0),t.push(0,0)},addUVLine:function(t){let e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,i,n,s,o,a,v,l){let c=this.vertices.length,d=this.parseVertexIndex(t,c),h=this.parseVertexIndex(e,c),p=this.parseVertexIndex(i,c);if(this.addVertex(d,h,p),this.addColor(d,h,p),a!==void 0&&a!==""){let g=this.normals.length;d=this.parseNormalIndex(a,g),h=this.parseNormalIndex(v,g),p=this.parseNormalIndex(l,g),this.addNormal(d,h,p)}else this.addFaceNormal(d,h,p);if(n!==void 0&&n!==""){let g=this.uvs.length;d=this.parseUVIndex(n,g),h=this.parseUVIndex(s,g),p=this.parseUVIndex(o,g),this.addUV(d,h,p),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";let e=this.vertices.length;for(let i=0,n=t.length;i<n;i++){let s=this.parseVertexIndex(t[i],e);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(t,e){this.object.geometry.type="Line";let i=this.vertices.length,n=this.uvs.length;for(let s=0,o=t.length;s<o;s++)this.addVertexLine(this.parseVertexIndex(t[s],i));for(let s=0,o=e.length;s<o;s++)this.addUVLine(this.parseUVIndex(e[s],n))}};return r.startObject("",!1),r}var _e=class extends _a{constructor(t){super(t),this.materials=null}load(t,e,i,n){let s=this,o=new Aa(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(a){try{e(s.parse(a))}catch(v){n&&n(v),s.manager.itemError(t)}},i,n)}setMaterials(t){return this.materials=t,this}parse(t){let e=new Sa;t.indexOf(`\r
447
+ }`;function ua(r){let t=document.createElement("style");t.innerHTML=r;let e=document.querySelector("head link[rel=stylesheet], head style");e?document.head.insertBefore(t,e):document.head.appendChild(t)}var Qr=!1,Ri=class r{constructor({parent:t,autoPlace:e=t===void 0,container:i,width:n,title:s="Controls",closeFolders:o=!1,injectStyles:a=!0,touchStyles:v=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",l=>{(l.code==="Enter"||l.code==="Space")&&(l.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(s),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),v&&this.domElement.classList.add("allow-touch-styles"),!Qr&&a&&(ua(da),Qr=!0),i?i.appendChild(this.domElement):e&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=o}add(t,e,i,n,s){if(Object(i)===i)return new Ei(this,t,e,i);switch(typeof t[e]){case"number":return new Ai(this,t,e,i,n,s);case"boolean":return new yi(this,t,e);case"string":return new xi(this,t,e);case"function":return new $e(this,t,e)}}addColor(t,e,i=1){return new _i(this,t,e,i)}addFolder(t){let e=new r({parent:this,title:t});return this.root._closeFolders&&e.close(),e}load(t,e=!0){return t.controllers&&this.controllers.forEach(i=>{i instanceof $e||i._name in t.controllers&&i.load(t.controllers[i._name])}),e&&t.folders&&this.folders.forEach(i=>{i._title in t.folders&&i.load(t.folders[i._title])}),this}save(t=!0){let e={controllers:{},folders:{}};return this.controllers.forEach(i=>{if(!(i instanceof $e)){if(i._name in e.controllers)throw new Error(`Cannot save GUI with duplicate property "${i._name}"`);e.controllers[i._name]=i.save()}}),t&&this.folders.forEach(i=>{if(i._title in e.folders)throw new Error(`Cannot save GUI with duplicate folder "${i._title}"`);e.folders[i._title]=i.save()}),e}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let e=this.$children.clientHeight;this.$children.style.height=e+"px",this.domElement.classList.add("transition");let i=s=>{s.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);let n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame(()=>{this.$children.style.height=n+"px"})}),this}title(t){return this._title=t,this.$title.innerHTML=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach(i=>i.reset()),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),this._onChange!==void 0&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),this._onOpenClose!==void 0&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(t=>t.destroy())}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach(e=>{t=t.concat(e.controllersRecursive())}),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach(e=>{t=t.concat(e.foldersRecursive())}),t}},ki=Ri;var wt=class{constructor(t,e,i,n){u(this,"gui",null);u(this,"storageKey","");u(this,"target");u(this,"params",[]);u(this,"paramsMeta",{});u(this,"_visible",!1);u(this,"initialValues",{});u(this,"initialized",!1);if(!_0){this.gui=new ki,this.storageKey=`debug_params_${t}`,this.target=e,this.paramsMeta=n??{},this.params=i??Object.keys(e);for(let s of this.params)this.initialValues[s]=e[s];this.gui.domElement.style.display="none"}}activate(){return _0?this:(!this.initialized&&this.gui&&(this.loadSavedValues(),this.setupControls(),this.initialized=!0),this.show(),this)}get visible(){return _0?!1:this._visible}set visible(t){_0||!this.gui||(this._visible=t,this.gui.domElement.style.display=t?"block":"none",this.saveVisibility())}loadSavedValues(){if(!_0)try{let t=localStorage.getItem(this.storageKey);if(t){let e=JSON.parse(t);for(let i of this.params)if(i in e){let n=e[i];n!==null&&(this.target[i]=n)}}}catch{}}saveValues(t=!1){if(!_0)try{let e={};for(let i of this.params)e[i]=this.target[i];t?localStorage.removeItem(this.storageKey):localStorage.setItem(this.storageKey,JSON.stringify(e))}catch{}}saveVisibility(){if(!_0)try{localStorage.setItem(`${this.storageKey}_visible`,this._visible.toString())}catch{}}setupControls(){if(!(_0||!this.gui)){this.gui.add(this,"visible").name("Show Controls"),this.gui.add({resetAll:()=>{if(this.gui){for(let t of this.params)this.target[t]=this.initialValues[t];this.saveValues(!0),this.gui.destroy(),this.gui=new ki,this.setupControls()}}},"resetAll").name("Reset All Parameters");for(let t of this.params){let e=this.target[t],i=this.paramsMeta[t]??{};if(typeof e=="number"){let n=i.min??e-Math.abs(e*2),s=i.max??e+Math.abs(e*2),o=i.step??Math.abs(e)/100;this.gui.add(this.target,t,n,s,o).onChange(()=>this.saveValues())}else if(typeof e=="boolean")this.gui.add(this.target,t).onChange(()=>this.saveValues());else if(typeof e=="string"&&["x","y","z"].includes(t)){let n=i.min??-10,s=i.max??10,o=i.step??.1;this.gui.add(this.target,t,n,s,o).onChange(()=>this.saveValues())}else Array.isArray(e)&&this.gui.add(this.target,t,e).onChange(()=>this.saveValues())}}}save(){_0||(this.saveValues(),this.saveVisibility())}destroy(){_0||!this.gui||(this.saveVisibility(),this.gui.destroy())}toggle(){this.visible=!this.visible}show(){this.visible=!0}hide(){this.visible=!1}};x();R();T();k();x();R();T();k();var Z5=class{constructor(){u(this,"currentAnimation",null);u(this,"isAnimating",!1);u(this,"cancelRequested",!1);u(this,"completionCallbacks",[]);u(this,"currentCancelCallback",null)}async startAnimation(t,e){return this.isAnimating&&await this.cancelCurrentAnimation(),new Promise(i=>{this.isAnimating=!0,this.cancelRequested=!1,this.currentCancelCallback=e??null,this.currentAnimation=t(),this.completionCallbacks.push(()=>{this.isAnimating=!1,this.currentAnimation=null,i()})})}async cancelCurrentAnimation(){if(this.isAnimating){if(this.currentCancelCallback){let t=this.currentCancelCallback;this.currentCancelCallback=null,t()}return new Promise(t=>{this.cancelRequested=!0,this.completionCallbacks.push(()=>{t()})})}}animationCycleFinish(){this.cancelRequested&&this.forceFinish()}forceFinish(t=!0){if(!this.isAnimating)return;if(this.currentAnimation){for(let i of this.currentAnimation.getAll())i.stop();this.currentAnimation.removeAll(),this.currentAnimation=null}this.isAnimating=!1,this.cancelRequested=!1;let e=[...this.completionCallbacks];if(this.completionCallbacks=[],t)for(let i of e)i()}update(){this.currentAnimation&&this.currentAnimation.update()}get isActive(){return this.isAnimating}get shouldCancel(){return this.cancelRequested}};var fa={x:3e3,y:3e3,z:3e3,rotation:Math.PI,scale:1,default:3e3},qt=class{constructor(t,e,i){this.getState=t;this.setState=e;u(this,"animationController",new Z5);u(this,"defaultState");u(this,"speeds");u(this,"currentStateName","");u(this,"transitioningToStateName","");this.speeds={...fa},i&&Object.assign(this.speeds,i),this.defaultState=this.getState()}calculateDuration(t){let e=0,i=this.getState();for(let[n,s]of Object.entries(t)){let o=i[n],a=Math.abs(s-o),v=this.getPropertySpeed(n),l=a/v*1e3;e=Math.max(e,l)}return Math.min(Math.max(e,200),2e3)}getPropertySpeed(t){return t in this.speeds?this.speeds[t]:t.toLowerCase().includes("rotation")?this.speeds.rotation:t.toLowerCase().includes("scale")?this.speeds.scale:t.toLowerCase()==="x"||t.toLowerCase()==="y"||t.toLowerCase()==="z"?this.speeds[t]:this.speeds.default}startTransition(t,e,i,n=k0.Linear.None,s){this.isTransitioning&&this.animationController.forceFinish(!1),this.transitioningToStateName=e??"";let o=this.getState(),a=this.calculateDuration(t);this.animationController.startAnimation(()=>{let v=new ce;return new S0(o,v).to(t,a).easing(n).onUpdate(l=>{for(let c of Object.keys(l))this.setState(c,l[c])}).onComplete(()=>{this.animationController.forceFinish(),this.currentStateName=this.transitioningToStateName,this.transitioningToStateName="",i?.()}).start(),v},s)}reset(){this.startTransition(this.defaultState)}update(){this.animationController.update()}forceFinish(){this.animationController.forceFinish()}transitionTo(t,e,i,n){this.startTransition(t,e,i,k0.Linear.None,n)}getCurrentValue(t){return this.getState()[t]}get isTransitioning(){return this.animationController.isActive}};x();R();T();k();import{subscribeKey as ha}from"valtio/utils";function X5(r,t,e,i,n){let s=0,o,a=async()=>{let v=++s,l=await r(t[e]);v===s?(o&&n?.(o),i(l),o=l):n?.(l)};return a(),ha(t,e,a)}x();R();T();k();var Kr=Math.PI/180;function $5(r){let{walkDist:t,prevWalkDist:e,bob:i,prevBob:n,partialTick:s}=r,o=t-e,a=-(t+o*s),v=n+(i-n)*s,l=Math.sin(a*Math.PI),c=Math.cos(a*Math.PI);return{position:{x:l*v*.5,y:-Math.abs(c*v)},rotation:{x:Math.abs(Math.cos(a*Math.PI-.2)*v)*5*Kr,z:l*v*3*Kr}}}x();R();T();k();var t1=r=>({"minecraft:display_context":"firstperson","minecraft:use_duration":r.playerStateReactive.itemUsageTicks,"minecraft:using_item":!!r.playerStateReactive.itemUsageTicks}),ma=()=>({"minecraft:display_context":"firstperson"}),ye=(r,t)=>{if(!t)return"empty";if(t.type==="hand")return"hand";let e=t.name??(t.id!==void 0?`#${t.id}`:"unknown");if(!r.resourcesManager.currentResources)return`${t.type}:${e}`;let i=r.getItemRenderData({...t.fullItem,itemId:t.id},ma());return`${t.type}:${e}:${i.modelName}`};var U0=new x0.Matrix4,Jr=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function pa(r,t){let e=new x0.Matrix4,i=1,n=Math.sqrt(r),s=-.3*Math.sin(n*Math.PI),o=.4*Math.sin(n*2*Math.PI),a=-.4*Math.sin(r*Math.PI);return e.multiply(U0.makeTranslation(i*(s+.64),o-.6+t*-.6,a-.72)),e.multiply(U0.makeRotationY(i*45*Math.PI/180)),e.multiply(U0.makeRotationY(i*Math.sin(n*Math.PI)*70*Math.PI/180)),e.multiply(U0.makeRotationZ(i*Math.sin(r*r*Math.PI)*-20*Math.PI/180)),e.multiply(U0.makeTranslation(i*-1,3.6,3.5)),e.multiply(U0.makeRotationZ(i*120*Math.PI/180)),e.multiply(U0.makeRotationX(200*Math.PI/180)),e.multiply(U0.makeRotationY(i*-135*Math.PI/180)),e.multiply(U0.makeTranslation(i*5.6,0,0)),e.multiply(U0.makeTranslation(i*-5/16,2/16,0)),e}function ga(r,t){let e=new x0.Matrix4,i=1,n=Math.sqrt(r),s=-.4*Math.sin(n*Math.PI),o=.2*Math.sin(n*2*Math.PI),a=-.2*Math.sin(r*Math.PI);e.multiply(U0.makeTranslation(i*s,o,a)),e.multiply(U0.makeTranslation(i*.56,-.52+t*-.6,-.72));let v=Math.sin(r*r*Math.PI),l=Math.sin(n*Math.PI);return e.multiply(U0.makeRotationY(i*(45+v*-20)*Math.PI/180)),e.multiply(U0.makeRotationZ(i*l*-20*Math.PI/180)),e.multiply(U0.makeRotationX(l*-80*Math.PI/180)),e.multiply(U0.makeRotationY(i*-45*Math.PI/180)),e}var e5=class{constructor(t,e=!1){this.worldRenderer=t;this.offHand=e;u(this,"holdingBlock");u(this,"blockSwapAnimation");u(this,"cameraGroup",new x0.Mesh);u(this,"armTransformGroup",new x0.Group);u(this,"camera",new x0.PerspectiveCamera(70,1,.05,100));u(this,"equipProgress",0);u(this,"stopUpdate",!1);u(this,"lastHeldItem");u(this,"lastHeldItemRenderKey");u(this,"currentDisplayType","hand");u(this,"isSwinging",!1);u(this,"nextIterStopCallbacks");u(this,"idleAnimator");u(this,"ready",!1);u(this,"lastUpdate",0);u(this,"xBob",0);u(this,"yBob",0);u(this,"lastBobUpdateTime",0);u(this,"lastBobWalkDist",0);u(this,"lastBobTickTime",0);u(this,"playerHand");u(this,"offHandDisplay",!1);u(this,"offHandModeLegacy",!1);u(this,"swingAnimator");u(this,"config");u(this,"disposed",!1);u(this,"unsubs",[]);u(this,"lastItemModelName");u(this,"switchRequest",0);this.initCameraGroup(),this.swingAnimator=new Ti,this.unsubs.push(this.worldRenderer.onReactivePlayerStateUpdated("heldItemMain",()=>{this.offHand||this.updateItem()},!1),this.worldRenderer.onReactivePlayerStateUpdated("heldItemOff",()=>{this.offHand&&this.updateItem()},!1)),this.config=t.displayOptions.inWorldRenderingConfig,this.offHandDisplay=this.offHand,this.offHand||i5().then(i=>{this.disposed||(this.playerHand=i,this.updateItem())}).then(()=>{if(this.disposed)return;let i=X5(async()=>i5(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",n=>{n&&(this.playerHand=n,this.updateItem())},n=>{A0(n,!0)});this.unsubs.push(i)})}dispose(){this.disposed=!0,this.unsubs.forEach(t=>t()),this.unsubs=[],this.idleAnimator?.destroy(),this.idleAnimator=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.blockSwapAnimation?.switcher.forceFinish(),this.blockSwapAnimation=void 0,A0(this.cameraGroup,!0),this.holdingBlock&&this.holdingBlock!==this.playerHand&&A0(this.holdingBlock,!0),this.holdingBlock=void 0,this.playerHand&&(A0(this.playerHand,!0),this.playerHand=void 0),this.ready=!1}updateItem(){if(!this.ready)return;let t=this.offHand?this.worldRenderer.playerStateReactive.heldItemOff:this.worldRenderer.playerStateReactive.heldItemMain;t?this.setNewItem(t):this.offHand?this.setNewItem():this.setNewItem({type:"hand"})}initCameraGroup(){this.cameraGroup=new x0.Mesh,this.armTransformGroup=new x0.Group,this.armTransformGroup.matrixAutoUpdate=!1,this.cameraGroup.add(this.armTransformGroup)}startSwing(){this.swingAnimator?.startSwing()}stopSwing(){this.swingAnimator?.stopSwing()}render(t,e,i,n){if(!this.lastHeldItem)return;let s=performance.now();this.lastUpdate&&s-this.lastUpdate>50&&this.replaceItemModel(this.lastHeldItem),(this.swingAnimator?.isCurrentlySwinging()||this.swingAnimator?.debugParams.animationStage)&&this.swingAnimator?.update(),this.blockSwapAnimation?.switcher.update();let o=new x0.Scene;o.add(this.cameraGroup);let a=e.getSize(new x0.Vector2),v=a.height>a.width;v?this.camera.aspect!==1&&(this.camera.aspect=1,this.camera.updateProjectionMatrix()):this.camera.aspect!==t.aspect&&(this.camera.aspect=t.aspect,this.camera.updateProjectionMatrix()),this.updateCameraGroup(),o.add(i.clone()),o.add(n.clone());let{offHandDisplay:l}=this;if(l&&(this.cameraGroup.scale.x=-1),e.autoClear=!1,e.clearDepth(),v){let c=Math.min(a.width,a.height);l?e.setViewport(0,0,c,c):e.setViewport(a.width-c,0,c,c)}e.render(o,this.camera),v&&e.setViewport(0,0,a.width,a.height),l&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(t){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new qt(()=>({progress:this.equipProgress}),(n,s)=>{n==="progress"&&(this.equipProgress=s)},{progress:4})});let e=t==="disappeared"?1:0,i=!1;return new Promise(n=>{this.blockSwapAnimation.switcher.transitionTo({progress:e},t,()=>{i||n(!0)},()=>{i=!0,n(!1)})})}isDifferentItem(t){return this.lastHeldItemRenderKey!==ye(this.worldRenderer,t)}updateCameraGroup(){if(this.stopUpdate)return;let{camera:t}=this,e=performance.now(),i=this.worldRenderer.cameraShake.getBaseRotation(),n=i.pitch,s=i.yaw;if(this.lastBobUpdateTime===0)this.xBob=n,this.yBob=s;else{let h=Math.min((e-this.lastBobUpdateTime)/1e3,.1),p=1-Math.pow(.5,h*28),g=1-Math.pow(.5,h*36);this.xBob+=(n-this.xBob)*p,this.yBob+=Jr(s-this.yBob)*g}this.lastBobUpdateTime=e;let o=(n-this.xBob)*-.05,a=Jr(s-this.yBob)*-.035;if(this.cameraGroup.position.copy(t.position),this.cameraGroup.rotation.copy(t.rotation),this.worldRenderer.displayOptions.inWorldRenderingConfig.viewBobbing){let h=this.worldRenderer.playerStateReactive;h.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=e,this.lastBobWalkDist=h.walkDist);let p=Math.min((e-this.lastBobTickTime)/50,1),g=1.8,b=$5({walkDist:h.walkDist*g,prevWalkDist:h.prevWalkDist*g,bob:h.bob,prevBob:h.prevBob,partialTick:p});this.cameraGroup.position.x+=b.position.x,this.cameraGroup.position.y+=b.position.y,this.cameraGroup.rotation.z+=b.rotation.z,this.cameraGroup.rotation.x+=b.rotation.x}this.cameraGroup.rotation.x+=o,this.cameraGroup.rotation.y+=a;let l=this.currentDisplayType,c=this.swingAnimator?.getSwingProgress()??0,d;l==="hand"?d=pa(c,this.equipProgress):d=ga(c,this.equipProgress),this.armTransformGroup.matrix.copy(d),this.armTransformGroup.matrixWorldNeedsUpdate=!0}async createItemModel(t){if(this.lastUpdate=performance.now(),!t||t.type==="hand"&&!this.playerHand)return;let e;if(t.type==="item"||t.type==="block"){let i=this.worldRenderer.entities.getItemMesh({...t.fullItem,itemId:t.id},t1(this.worldRenderer),!1,this.lastItemModelName);if(i){let{mesh:n,isBlock:s,modelName:o}=i;s?(e=n,t.type="block"):(e=n,t.type="item"),this.lastItemModelName=o}}else e=this.playerHand;if(e){if(t.type==="item"||t.type==="block"){let i=new x0.Group;i.name="displayTransform",t.type==="item"?(i.position.set(1.13/16,3.2/16,1.13/16),i.rotation.set(0,x0.MathUtils.degToRad(-90),x0.MathUtils.degToRad(25),"XYZ"),i.scale.set(.68,.68,.68)):(i.rotation.set(0,x0.MathUtils.degToRad(45),0,"XYZ"),i.scale.set(.4,.4,.4)),i.add(e),e=i}return e.name="holdingBlock",{model:e,type:t.type}}}async replaceItemModel(t){if(this.blockSwapAnimation?.switcher.isTransitioning)return;if(!t){this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0,this.currentDisplayType="hand";let i=this.swingAnimator;i?.stopSwing(),i&&(i.type="hand"),this.idleAnimator=void 0;return}let e=await this.createItemModel(t);e&&(this.holdingBlock?.removeFromParent(),this.holdingBlock=e.model,this.currentDisplayType=e.type,this.armTransformGroup.add(e.model))}testUnknownBlockSwitch(){this.setNewItem({type:"item",name:"minecraft:some-unknown-block",id:0,fullItem:{}})}async setNewItem(t){let e=ye(this.worldRenderer,t),i=this.lastHeldItemRenderKey!==e;if(this.lastHeldItem=t,!i)return;this.lastHeldItemRenderKey=e,this.lastItemModelName=void 0;let n=++this.switchRequest,s=!1;if(this.holdingBlock){if(s=!0,!await this.playBlockSwapAnimation("disappeared"))return;this.holdingBlock.removeFromParent(),this.holdingBlock!==this.playerHand&&A0(this.holdingBlock,!1),this.holdingBlock=void 0}if(!t){this.currentDisplayType="hand";let v=this.swingAnimator;v?.stopSwing(),v&&(v.type="hand"),this.idleAnimator=void 0,this.blockSwapAnimation=void 0;return}if(n!==this.switchRequest)return;let o=await this.createItemModel(t);if(!o||n!==this.switchRequest)return;this.holdingBlock=o.model,this.currentDisplayType=o.type,this.armTransformGroup.add(this.holdingBlock),s&&await this.playBlockSwapAnimation("appeared");let a=this.swingAnimator;a&&(a.type=o.type),this.idleAnimator=void 0}};var Ti=class{constructor(){u(this,"animationTimer",0);u(this,"lastTime",0);u(this,"isAnimating",!1);u(this,"stopRequested",!1);u(this,"swingProgress",0);u(this,"type","hand");u(this,"debugParams",{animationTime:250,animationStage:0});u(this,"debugGui");this.debugGui=new wt("hand_animator",this.debugParams,void 0,{animationStage:{min:0,max:1,step:.01}})}update(){if(!this.isAnimating&&!this.debugParams.animationStage){this.swingProgress=0;return}let t=performance.now(),e=(t-this.lastTime)/1e3;this.lastTime=t,this.animationTimer+=e*1e3;let i=this.debugParams.animationStage||Math.min(this.animationTimer/this.debugParams.animationTime,1);if(i>=1){if(this.stopRequested){this.isAnimating=!1,this.stopRequested=!1,this.animationTimer=0,this.swingProgress=0;return}this.animationTimer=0,this.swingProgress=0;return}this.swingProgress=i}getSwingProgress(){return this.swingProgress}startSwing(){this.stopRequested=!1,!this.isAnimating&&(this.isAnimating=!0,this.animationTimer=0,this.lastTime=performance.now())}stopSwing(){this.isAnimating&&(this.stopRequested=!0)}isCurrentlySwinging(){return this.isAnimating}},qr=(r,t,e,i,n)=>{let s=i.transformModel(t,{name:e,properties:{}});return si(r,[[s]],void 0,"plains",n)};x();R();T();k();import*as a0 from"three";function ba(r,t){let{depth:e,pixelSize:i}=t;if(r.width<=0||r.height<=0)throw new Error(`Invalid canvas dimensions: ${r.width}x${r.height}`);let s=r.getContext("2d").getImageData(0,0,r.width,r.height),{data:o}=s,a=r.width,v=r.height,l=e/2,c=i??1/Math.max(a,v),d=(B,I)=>{if(B<0||I<0||B>=a||I>=v)return!1;let W=(I*a+B)*4;return o[W+3]>128},h=[],p=[],g=[],b=[],A=0,w=(B,I,W,z,j,q,e0,V)=>(h.push(B,I,W),g.push(z,j),b.push(q,e0,V),A++),_=(B,I,W,z)=>{p.push(B,I,W,B,W,z)},S=(B,I)=>{let W=(B/a-.5)*c*a,z=-(I/v-.5)*c*v;return{x:W,y:z}},M=Array.from({length:v+1},()=>Array.from({length:a+1},()=>null)),C=Array.from({length:v+1},()=>Array.from({length:a+1},()=>null));for(let B=0;B<=v;B++)for(let I=0;I<=a;I++){let{x:W,y:z}=S(I-.5,B-.5),j=I/a,q=B/v,e0=!1,V=[[I-1,B-1],[I,B-1],[I-1,B],[I,B]];for(let[Z,K]of V)if(d(Z,K)){e0=!0;break}e0&&(M[B][I]=w(W,z,l,j,q,0,0,1),C[B][I]=w(W,z,-l,j,q,0,0,-1))}for(let B=0;B<v;B++)for(let I=0;I<a;I++){if(!d(I,B))continue;let W=M[B][I],z=M[B][I+1],j=M[B+1][I+1],q=M[B+1][I],e0=C[B][I],V=C[B][I+1],Z=C[B+1][I+1],K=C[B+1][I];W!==null&&z!==null&&j!==null&&q!==null&&_(W,z,j,q),e0!==null&&V!==null&&Z!==null&&K!==null&&_(V,e0,K,Z)}for(let B=0;B<v;B++)for(let I=0;I<a;I++){if(!d(I,B))continue;let W=(I+.5)/a,z=(B+.5)/v;if(!d(I-1,B)){let j=M[B][I],q=M[B+1][I],e0=C[B][I],V=C[B+1][I];if(j!==null&&q!==null&&e0!==null&&V!==null){let Z=w(h[j*3],h[j*3+1],h[j*3+2],W,z,-1,0,0),K=w(h[q*3],h[q*3+1],h[q*3+2],W,z,-1,0,0),n0=w(h[V*3],h[V*3+1],h[V*3+2],W,z,-1,0,0),s0=w(h[e0*3],h[e0*3+1],h[e0*3+2],W,z,-1,0,0);_(Z,K,n0,s0)}}if(!d(I+1,B)){let j=M[B+1][I+1],q=M[B][I+1],e0=C[B+1][I+1],V=C[B][I+1];if(j!==null&&q!==null&&e0!==null&&V!==null){let Z=w(h[j*3],h[j*3+1],h[j*3+2],W,z,1,0,0),K=w(h[q*3],h[q*3+1],h[q*3+2],W,z,1,0,0),n0=w(h[V*3],h[V*3+1],h[V*3+2],W,z,1,0,0),s0=w(h[e0*3],h[e0*3+1],h[e0*3+2],W,z,1,0,0);_(Z,K,n0,s0)}}if(!d(I,B-1)){let j=M[B][I],q=M[B][I+1],e0=C[B][I],V=C[B][I+1];if(j!==null&&q!==null&&e0!==null&&V!==null){let Z=w(h[j*3],h[j*3+1],h[j*3+2],W,z,0,-1,0),K=w(h[q*3],h[q*3+1],h[q*3+2],W,z,0,-1,0),n0=w(h[V*3],h[V*3+1],h[V*3+2],W,z,0,-1,0),s0=w(h[e0*3],h[e0*3+1],h[e0*3+2],W,z,0,-1,0);_(Z,K,n0,s0)}}if(!d(I,B+1)){let j=M[B+1][I+1],q=M[B+1][I],e0=C[B+1][I+1],V=C[B+1][I];if(j!==null&&q!==null&&e0!==null&&V!==null){let Z=w(h[j*3],h[j*3+1],h[j*3+2],W,z,0,1,0),K=w(h[q*3],h[q*3+1],h[q*3+2],W,z,0,1,0),n0=w(h[V*3],h[V*3+1],h[V*3+2],W,z,0,1,0),s0=w(h[e0*3],h[e0*3+1],h[e0*3+2],W,z,0,1,0);_(Z,K,n0,s0)}}}let H=new a0.BufferGeometry;return H.setAttribute("position",new a0.Float32BufferAttribute(h,3)),H.setAttribute("uv",new a0.Float32BufferAttribute(g,2)),H.setAttribute("normal",new a0.Float32BufferAttribute(b,3)),H.setIndex(p),H.computeVertexNormals(),{geometry:H,totalVertices:A,totalTriangles:p.length/3}}function ya(r,t){let{u:e,v:i,sizeX:n,sizeY:s}=t,o=Math.max(1,Math.floor(n*r.image.width)),a=Math.max(1,Math.floor(s*r.image.height)),v=document.createElement("canvas");v.width=o,v.height=a;let l=v.getContext("2d");return l.imageSmoothingEnabled=!1,l.drawImage(r.image,e*r.image.width,i*r.image.height,n*r.image.width,s*r.image.height,0,0,v.width,v.height),v}function Zr(r,t,e={}){let{faceCamera:i=!1,use3D:n=!0,depth:s=.04}=e,{u:o,v:a,sizeX:v,sizeY:l}=t;if(i){let b=r.clone();b.flipY=!0,b.offset.set(o,1-a-l),b.repeat.set(v,l),b.needsUpdate=!0,b.magFilter=a0.NearestFilter,b.minFilter=a0.NearestFilter;let A=new a0.SpriteMaterial({map:b,transparent:!0,alphaTest:.1});return{mesh:new a0.Sprite(A),itemsTexture:b,cleanup(){b.dispose()}}}if(n)try{let b=ya(r,t),{geometry:A}=ba(b,{depth:s}),w=new a0.CanvasTexture(b);w.magFilter=a0.NearestFilter,w.minFilter=a0.NearestFilter,w.wrapS=w.wrapT=a0.ClampToEdgeWrapping,w.flipY=!1,w.needsUpdate=!0;let _=new a0.MeshStandardMaterial({map:w,side:a0.DoubleSide,transparent:!0,alphaTest:.1});return{mesh:new a0.Mesh(A,_),itemsTexture:w,cleanup(){w.dispose(),A.dispose(),_.map&&_.map.dispose(),_.dispose()}}}catch{}let c=r.clone();c.flipY=!0,c.offset.set(o,1-a-l),c.repeat.set(v,l),c.needsUpdate=!0,c.magFilter=a0.NearestFilter,c.minFilter=a0.NearestFilter;let d=c.clone();d.repeat.x*=-1,d.needsUpdate=!0,d.offset.set(o+v,1-a-l);let h=new a0.MeshStandardMaterial({map:c,transparent:!0,alphaTest:.1}),p=new a0.MeshStandardMaterial({map:d,transparent:!0,alphaTest:.1});return{mesh:new a0.Mesh(new a0.BoxGeometry(1,1,0),[new a0.MeshBasicMaterial({color:0}),new a0.MeshBasicMaterial({color:0}),new a0.MeshBasicMaterial({color:0}),new a0.MeshBasicMaterial({color:0}),h,p]),itemsTexture:c,itemsTextureFlipped:d,cleanup(){c.dispose(),d.dispose(),h.dispose(),p.dispose()}}}x();R();T();k();import*as J from"three";x();R();T();k();x();R();T();k();import{REVISION as wa}from"three";var Xr=parseInt(wa.replace(/\D+/g,""));x();R();T();k();import{Loader as _a,FileLoader as Aa,Group as Ea,BufferGeometry as $r,Float32BufferAttribute as we,LineBasicMaterial as Mi,Material as t3,PointsMaterial as e1,MeshPhongMaterial as xa,LineSegments as e3,Points as Si,Mesh as i3,Vector3 as n5}from"three";var Ra=/^[og]\s*(.+)?/,ka=/^mtllib /,Ta=/^usemtl /,Ma=/^usemap /,n3=new n5,Ci=new n5,r3=new n5,s3=new n5,rt=new n5;function Sa(){let r={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,e){if(this.object&&this.object.fromDeclaration===!1){this.object.name=t,this.object.fromDeclaration=e!==!1;return}let i=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:e!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(n,s){let o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);let a={index:this.materials.length,name:n||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:o!==void 0?o.smooth:this.smooth,groupStart:o!==void 0?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(v){let l={index:typeof v=="number"?v:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return l.clone=this.clone.bind(l),l}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(n){let s=this.currentMaterial();if(s&&s.groupEnd===-1&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),n&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return n&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),s}},i&&i.name&&typeof i.clone=="function"){let n=i.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(t,e){let i=parseInt(t,10);return(i>=0?i-1:i+e/3)*3},parseNormalIndex:function(t,e){let i=parseInt(t,10);return(i>=0?i-1:i+e/3)*3},parseUVIndex:function(t,e){let i=parseInt(t,10);return(i>=0?i-1:i+e/2)*2},addVertex:function(t,e,i){let n=this.vertices,s=this.object.geometry.vertices;s.push(n[t+0],n[t+1],n[t+2]),s.push(n[e+0],n[e+1],n[e+2]),s.push(n[i+0],n[i+1],n[i+2])},addVertexPoint:function(t){let e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){let e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,i){let n=this.normals,s=this.object.geometry.normals;s.push(n[t+0],n[t+1],n[t+2]),s.push(n[e+0],n[e+1],n[e+2]),s.push(n[i+0],n[i+1],n[i+2])},addFaceNormal:function(t,e,i){let n=this.vertices,s=this.object.geometry.normals;n3.fromArray(n,t),Ci.fromArray(n,e),r3.fromArray(n,i),rt.subVectors(r3,Ci),s3.subVectors(n3,Ci),rt.cross(s3),rt.normalize(),s.push(rt.x,rt.y,rt.z),s.push(rt.x,rt.y,rt.z),s.push(rt.x,rt.y,rt.z)},addColor:function(t,e,i){let n=this.colors,s=this.object.geometry.colors;n[t]!==void 0&&s.push(n[t+0],n[t+1],n[t+2]),n[e]!==void 0&&s.push(n[e+0],n[e+1],n[e+2]),n[i]!==void 0&&s.push(n[i+0],n[i+1],n[i+2])},addUV:function(t,e,i){let n=this.uvs,s=this.object.geometry.uvs;s.push(n[t+0],n[t+1]),s.push(n[e+0],n[e+1]),s.push(n[i+0],n[i+1])},addDefaultUV:function(){let t=this.object.geometry.uvs;t.push(0,0),t.push(0,0),t.push(0,0)},addUVLine:function(t){let e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,i,n,s,o,a,v,l){let c=this.vertices.length,d=this.parseVertexIndex(t,c),h=this.parseVertexIndex(e,c),p=this.parseVertexIndex(i,c);if(this.addVertex(d,h,p),this.addColor(d,h,p),a!==void 0&&a!==""){let g=this.normals.length;d=this.parseNormalIndex(a,g),h=this.parseNormalIndex(v,g),p=this.parseNormalIndex(l,g),this.addNormal(d,h,p)}else this.addFaceNormal(d,h,p);if(n!==void 0&&n!==""){let g=this.uvs.length;d=this.parseUVIndex(n,g),h=this.parseUVIndex(s,g),p=this.parseUVIndex(o,g),this.addUV(d,h,p),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";let e=this.vertices.length;for(let i=0,n=t.length;i<n;i++){let s=this.parseVertexIndex(t[i],e);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(t,e){this.object.geometry.type="Line";let i=this.vertices.length,n=this.uvs.length;for(let s=0,o=t.length;s<o;s++)this.addVertexLine(this.parseVertexIndex(t[s],i));for(let s=0,o=e.length;s<o;s++)this.addUVLine(this.parseUVIndex(e[s],n))}};return r.startObject("",!1),r}var _e=class extends _a{constructor(t){super(t),this.materials=null}load(t,e,i,n){let s=this,o=new Aa(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(a){try{e(s.parse(a))}catch(v){n&&n(v),s.manager.itemError(t)}},i,n)}setMaterials(t){return this.materials=t,this}parse(t){let e=new Sa;t.indexOf(`\r
448
448
  `)!==-1&&(t=t.replace(/\r\n/g,`
449
449
  `)),t.indexOf(`\\
450
450
  `)!==-1&&(t=t.replace(/\\\n/g,""));let i=t.split(`
451
- `),n="",s="",o=0,a=[],v=typeof"".trimLeft=="function";for(let d=0,h=i.length;d<h;d++)if(n=i[d],n=v?n.trimLeft():n.trim(),o=n.length,o!==0&&(s=n.charAt(0),s!=="#")){if(s==="v"){let p=n.split(/\s+/);switch(p[0]){case"v":e.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),p.length>=7?e.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6])):e.colors.push(void 0,void 0,void 0);break;case"vn":e.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":e.uvs.push(parseFloat(p[1]),parseFloat(p[2]));break}}else if(s==="f"){let g=n.substr(1).trim().split(/\s+/),b=[];for(let w=0,_=g.length;w<_;w++){let S=g[w];if(S.length>0){let M=S.split("/");b.push(M)}}let A=b[0];for(let w=1,_=b.length-1;w<_;w++){let S=b[w],M=b[w+1];e.addFace(A[0],S[0],M[0],A[1],S[1],M[1],A[2],S[2],M[2])}}else if(s==="l"){let p=n.substring(1).trim().split(" "),g=[],b=[];if(n.indexOf("/")===-1)g=p;else for(let A=0,w=p.length;A<w;A++){let _=p[A].split("/");_[0]!==""&&g.push(_[0]),_[1]!==""&&b.push(_[1])}e.addLineGeometry(g,b)}else if(s==="p"){let g=n.substr(1).trim().split(" ");e.addPointGeometry(g)}else if((a=Ra.exec(n))!==null){let p=(" "+a[0].substr(1).trim()).substr(1);e.startObject(p)}else if(Ta.test(n))e.object.startMaterial(n.substring(7).trim(),e.materialLibraries);else if(ka.test(n))e.materialLibraries.push(n.substring(7).trim());else if(!Ma.test(n)){if(s==="s"){if(a=n.split(" "),a.length>1){let g=a[1].trim().toLowerCase();e.object.smooth=g!=="0"&&g!=="off"}else e.object.smooth=!0;let p=e.object.currentMaterial();p&&(p.smooth=e.object.smooth)}else if(n==="\0")continue}}e.finalize();let l=new Ea;if(l.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let d=0,h=e.objects.length;d<h;d++){let p=e.objects[d],g=p.geometry,b=p.materials,A=g.type==="Line",w=g.type==="Points",_=!1;if(g.vertices.length===0)continue;let S=new $r;S.setAttribute("position",new we(g.vertices,3)),g.normals.length>0&&S.setAttribute("normal",new we(g.normals,3)),g.colors.length>0&&(_=!0,S.setAttribute("color",new we(g.colors,3))),g.hasUVIndices===!0&&S.setAttribute("uv",new we(g.uvs,2));let M=[];for(let H=0,B=b.length;H<B;H++){let I=b[H],W=I.name+"_"+I.smooth+"_"+_,z=e.materials[W];if(this.materials!==null){if(z=this.materials.create(I.name),A&&z&&!(z instanceof Ti)){let j=new Ti;t3.prototype.copy.call(j,z),j.color.copy(z.color),z=j}else if(w&&z&&!(z instanceof t1)){let j=new t1({size:10,sizeAttenuation:!1});t3.prototype.copy.call(j,z),j.color.copy(z.color),j.map=z.map,z=j}}z===void 0&&(A?z=new Ti:w?z=new t1({size:1,sizeAttenuation:!1}):z=new xa,z.name=I.name,z.flatShading=!I.smooth,z.vertexColors=_,e.materials[W]=z),M.push(z)}let C;if(M.length>1){for(let H=0,B=b.length;H<B;H++){let I=b[H];S.addGroup(I.groupStart,I.groupCount,H)}A?C=new e3(S,M):w?C=new Mi(S,M):C=new i3(S,M)}else A?C=new e3(S,M[0]):w?C=new Mi(S,M[0]):C=new i3(S,M[0]);C.name=p.name,l.add(C)}else if(e.vertices.length>0){let d=new t1({size:1,sizeAttenuation:!1}),h=new $r;h.setAttribute("position",new we(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(h.setAttribute("color",new we(e.colors,3)),d.vertexColors=!0);let p=new Mi(h,d);l.add(p)}return l}};x();R();T();k();import{InstancedBufferGeometry as Ca,Float32BufferAttribute as o3,InstancedInterleavedBuffer as a3,InterleavedBufferAttribute as e1,WireframeGeometry as Pa,Box3 as l3,Sphere as Ba,Vector3 as Ia}from"three";var v3=new l3,i1=new Ia,Zt=class extends Ca{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";let t=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],e=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new o3(t,3)),this.setAttribute("uv",new o3(e,2))}applyMatrix4(t){let e=this.attributes.instanceStart,i=this.attributes.instanceEnd;return e!==void 0&&(e.applyMatrix4(t),i.applyMatrix4(t),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(t){let e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));let i=new a3(e,6,1);return this.setAttribute("instanceStart",new e1(i,3,0)),this.setAttribute("instanceEnd",new e1(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(t,e=3){let i;t instanceof Float32Array?i=t:Array.isArray(t)&&(i=new Float32Array(t));let n=new a3(i,e*2,1);return this.setAttribute("instanceColorStart",new e1(n,e,0)),this.setAttribute("instanceColorEnd",new e1(n,e,e)),this}fromWireframeGeometry(t){return this.setPositions(t.attributes.position.array),this}fromEdgesGeometry(t){return this.setPositions(t.attributes.position.array),this}fromMesh(t){return this.fromWireframeGeometry(new Pa(t.geometry)),this}fromLineSegments(t){let e=t.geometry;return this.setPositions(e.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new l3);let t=this.attributes.instanceStart,e=this.attributes.instanceEnd;t!==void 0&&e!==void 0&&(this.boundingBox.setFromBufferAttribute(t),v3.setFromBufferAttribute(e),this.boundingBox.union(v3))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ba),this.boundingBox===null&&this.computeBoundingBox();let t=this.attributes.instanceStart,e=this.attributes.instanceEnd;if(t!==void 0&&e!==void 0){let i=this.boundingSphere.center;this.boundingBox.getCenter(i);let n=0;for(let s=0,o=t.count;s<o;s++)i1.fromBufferAttribute(t,s),n=Math.max(n,i.distanceToSquared(i1)),i1.fromBufferAttribute(e,s),n=Math.max(n,i.distanceToSquared(i1));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)}}toJSON(){}applyMatrix(t){return this.applyMatrix4(t)}};x();R();T();k();import{Mesh as Oa,InstancedInterleavedBuffer as Da,InterleavedBufferAttribute as u3,Vector3 as m3,Vector4 as La}from"three";x();R();T();k();import{ShaderMaterial as Ha,UniformsUtils as c3,UniformsLib as d3,Vector2 as za}from"three";var Xt=class extends Ha{constructor(t){super({type:"LineMaterial",uniforms:c3.clone(c3.merge([d3.common,d3.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new za(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
451
+ `),n="",s="",o=0,a=[],v=typeof"".trimLeft=="function";for(let d=0,h=i.length;d<h;d++)if(n=i[d],n=v?n.trimLeft():n.trim(),o=n.length,o!==0&&(s=n.charAt(0),s!=="#")){if(s==="v"){let p=n.split(/\s+/);switch(p[0]){case"v":e.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),p.length>=7?e.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6])):e.colors.push(void 0,void 0,void 0);break;case"vn":e.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":e.uvs.push(parseFloat(p[1]),parseFloat(p[2]));break}}else if(s==="f"){let g=n.substr(1).trim().split(/\s+/),b=[];for(let w=0,_=g.length;w<_;w++){let S=g[w];if(S.length>0){let M=S.split("/");b.push(M)}}let A=b[0];for(let w=1,_=b.length-1;w<_;w++){let S=b[w],M=b[w+1];e.addFace(A[0],S[0],M[0],A[1],S[1],M[1],A[2],S[2],M[2])}}else if(s==="l"){let p=n.substring(1).trim().split(" "),g=[],b=[];if(n.indexOf("/")===-1)g=p;else for(let A=0,w=p.length;A<w;A++){let _=p[A].split("/");_[0]!==""&&g.push(_[0]),_[1]!==""&&b.push(_[1])}e.addLineGeometry(g,b)}else if(s==="p"){let g=n.substr(1).trim().split(" ");e.addPointGeometry(g)}else if((a=Ra.exec(n))!==null){let p=(" "+a[0].substr(1).trim()).substr(1);e.startObject(p)}else if(Ta.test(n))e.object.startMaterial(n.substring(7).trim(),e.materialLibraries);else if(ka.test(n))e.materialLibraries.push(n.substring(7).trim());else if(!Ma.test(n)){if(s==="s"){if(a=n.split(" "),a.length>1){let g=a[1].trim().toLowerCase();e.object.smooth=g!=="0"&&g!=="off"}else e.object.smooth=!0;let p=e.object.currentMaterial();p&&(p.smooth=e.object.smooth)}else if(n==="\0")continue}}e.finalize();let l=new Ea;if(l.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let d=0,h=e.objects.length;d<h;d++){let p=e.objects[d],g=p.geometry,b=p.materials,A=g.type==="Line",w=g.type==="Points",_=!1;if(g.vertices.length===0)continue;let S=new $r;S.setAttribute("position",new we(g.vertices,3)),g.normals.length>0&&S.setAttribute("normal",new we(g.normals,3)),g.colors.length>0&&(_=!0,S.setAttribute("color",new we(g.colors,3))),g.hasUVIndices===!0&&S.setAttribute("uv",new we(g.uvs,2));let M=[];for(let H=0,B=b.length;H<B;H++){let I=b[H],W=I.name+"_"+I.smooth+"_"+_,z=e.materials[W];if(this.materials!==null){if(z=this.materials.create(I.name),A&&z&&!(z instanceof Mi)){let j=new Mi;t3.prototype.copy.call(j,z),j.color.copy(z.color),z=j}else if(w&&z&&!(z instanceof e1)){let j=new e1({size:10,sizeAttenuation:!1});t3.prototype.copy.call(j,z),j.color.copy(z.color),j.map=z.map,z=j}}z===void 0&&(A?z=new Mi:w?z=new e1({size:1,sizeAttenuation:!1}):z=new xa,z.name=I.name,z.flatShading=!I.smooth,z.vertexColors=_,e.materials[W]=z),M.push(z)}let C;if(M.length>1){for(let H=0,B=b.length;H<B;H++){let I=b[H];S.addGroup(I.groupStart,I.groupCount,H)}A?C=new e3(S,M):w?C=new Si(S,M):C=new i3(S,M)}else A?C=new e3(S,M[0]):w?C=new Si(S,M[0]):C=new i3(S,M[0]);C.name=p.name,l.add(C)}else if(e.vertices.length>0){let d=new e1({size:1,sizeAttenuation:!1}),h=new $r;h.setAttribute("position",new we(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(h.setAttribute("color",new we(e.colors,3)),d.vertexColors=!0);let p=new Si(h,d);l.add(p)}return l}};x();R();T();k();import{InstancedBufferGeometry as Ca,Float32BufferAttribute as o3,InstancedInterleavedBuffer as a3,InterleavedBufferAttribute as i1,WireframeGeometry as Pa,Box3 as l3,Sphere as Ba,Vector3 as Ia}from"three";var v3=new l3,n1=new Ia,Zt=class extends Ca{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";let t=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],e=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new o3(t,3)),this.setAttribute("uv",new o3(e,2))}applyMatrix4(t){let e=this.attributes.instanceStart,i=this.attributes.instanceEnd;return e!==void 0&&(e.applyMatrix4(t),i.applyMatrix4(t),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(t){let e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));let i=new a3(e,6,1);return this.setAttribute("instanceStart",new i1(i,3,0)),this.setAttribute("instanceEnd",new i1(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(t,e=3){let i;t instanceof Float32Array?i=t:Array.isArray(t)&&(i=new Float32Array(t));let n=new a3(i,e*2,1);return this.setAttribute("instanceColorStart",new i1(n,e,0)),this.setAttribute("instanceColorEnd",new i1(n,e,e)),this}fromWireframeGeometry(t){return this.setPositions(t.attributes.position.array),this}fromEdgesGeometry(t){return this.setPositions(t.attributes.position.array),this}fromMesh(t){return this.fromWireframeGeometry(new Pa(t.geometry)),this}fromLineSegments(t){let e=t.geometry;return this.setPositions(e.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new l3);let t=this.attributes.instanceStart,e=this.attributes.instanceEnd;t!==void 0&&e!==void 0&&(this.boundingBox.setFromBufferAttribute(t),v3.setFromBufferAttribute(e),this.boundingBox.union(v3))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ba),this.boundingBox===null&&this.computeBoundingBox();let t=this.attributes.instanceStart,e=this.attributes.instanceEnd;if(t!==void 0&&e!==void 0){let i=this.boundingSphere.center;this.boundingBox.getCenter(i);let n=0;for(let s=0,o=t.count;s<o;s++)n1.fromBufferAttribute(t,s),n=Math.max(n,i.distanceToSquared(n1)),n1.fromBufferAttribute(e,s),n=Math.max(n,i.distanceToSquared(n1));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)}}toJSON(){}applyMatrix(t){return this.applyMatrix4(t)}};x();R();T();k();import{Mesh as Oa,InstancedInterleavedBuffer as Da,InterleavedBufferAttribute as u3,Vector3 as m3,Vector4 as La}from"three";x();R();T();k();import{ShaderMaterial as Ha,UniformsUtils as c3,UniformsLib as d3,Vector2 as za}from"three";var Xt=class extends Ha{constructor(t){super({type:"LineMaterial",uniforms:c3.clone(c3.merge([d3.common,d3.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new za(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
452
452
  #include <common>
453
453
  #include <fog_pars_vertex>
454
454
  #include <logdepthbuf_pars_vertex>
@@ -856,7 +856,7 @@ var bs=Object.create;var He=Object.defineProperty;var ys=Object.getOwnPropertyDe
856
856
  #include <premultiplied_alpha_fragment>
857
857
 
858
858
  }
859
- `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(e){!!e!="USE_DASH"in this.defines&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(e){!!e!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(t)}};var f3=new m3,h3=new m3,Ci=new La,n5=class extends Oa{constructor(t=new Zt,e=new Xt({color:Math.random()*16777215})){super(t,e),this.isWireframe=!0,this.type="Wireframe"}computeLineDistances(){let t=this.geometry,e=t.attributes.instanceStart,i=t.attributes.instanceEnd,n=new Float32Array(2*e.count);for(let o=0,a=0,v=e.count;o<v;o++,a+=2)f3.fromBufferAttribute(e,o),h3.fromBufferAttribute(i,o),n[a]=a===0?0:n[a-1],n[a+1]=n[a]+f3.distanceTo(h3);let s=new Da(n,2,1);return t.setAttribute("instanceDistanceStart",new u3(s,1,0)),t.setAttribute("instanceDistanceEnd",new u3(s,1,1)),this}onBeforeRender(t){let e=this.material.uniforms;e&&e.resolution&&(t.getViewport(Ci),this.material.uniforms.resolution.value.set(Ci.z,Ci.w))}};import{GLTFLoader as x7}from"three/examples/jsm/loaders/GLTFLoader.js";import R7 from"mc-assets/dist/other-textures/latest/entity/zombie/husk.png";import{Vec3 as n1}from"vec3";import k7 from"mc-assets/dist/other-textures/latest/entity/cat/ocelot.png";import T7 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/arrow.png";import M7 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/spectral_arrow.png";import S7 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/tipped_arrow.png";var p3={armor_stand:{identifier:"minecraft:armor_stand",min_engine_version:"1.8.0",materials:{default:"armor_stand"},textures:{default:"textures/entity/armorstand/wood"},geometry:{default:{bones:[{name:"baseplate",parent:"waist",cubes:[{origin:[-6,0,-6],size:[12,1,12],uv:[0,32]}]},{name:"waist",pivot:[0,12,0]},{name:"body",parent:"waist",pivot:[0,13,0],cubes:[{origin:[-6,21,-1.5],size:[12,3,3],uv:[0,26]},{origin:[-3,14,-1],size:[2,7,2],uv:[16,0]},{origin:[1,14,-1],size:[2,7,2],uv:[48,16]},{origin:[-4,12,-1],size:[8,2,2],uv:[0,48]}]},{name:"head",parent:"waist",pivot:[0,12,0],cubes:[{origin:[-1,24,-1],size:[2,7,2],uv:[0,0]}]},{name:"hat",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0]}]},{name:"leftarm",parent:"waist",mirror:!0,pivot:[5,10,0],cubes:[{origin:[5,12,-1],size:[2,12,2],uv:[32,16]}]},{name:"leftitem",parent:"leftarm",pivot:[1,-9,-5]},{name:"leftleg",parent:"waist",mirror:!0,pivot:[1.9,1,0],cubes:[{origin:[.9,1,-1],size:[2,11,2],uv:[40,16]}]},{name:"rightarm",parent:"waist",pivot:[-5,10,0],cubes:[{origin:[-7,12,-1],size:[2,12,2],uv:[24,0]}]},{name:"rightitem",parent:"rightarm",pivot:[-1,-9,-5]},{name:"rightleg",parent:"waist",pivot:[-1.9,1,0],cubes:[{origin:[-2.9,1,-1],size:[2,11,2],uv:[8,0]}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64}},render_controllers:["controller.render.armor_stand"],enable_attachables:!0},arrow:{identifier:"minecraft:arrow",materials:{default:"arrow"},textures:{default:"textures/entity/arrow"},geometry:{default:{bones:[{name:"body",pivot:[0,1,0],cubes:[{origin:[0,-2.5,-3],rotation:[0,0,45],size:[0,5,16],uv:{east:{uv:[0,0]}}},{origin:[0,-2.5,-3],rotation:[0,0,-45],size:[0,5,16],uv:{east:{uv:[0,0]}}},{origin:[-2.5,-2.5,12],rotation:[0,0,45],size:[5,5,0],uv:{south:{uv:[0,5]}}}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.arrow"]},bat:{_comment:"Wing tip mirror flags are swapped vs vanilla Bedrock model: our addCube() mirror implementation flips UVs in the opposite direction, so rightWingTip needs mirror=true and leftWingTip needs mirror=false to render correctly.",identifier:"minecraft:bat",materials:{default:"bat"},textures:{default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAALHSURBVHja7VrBSiQxFJybHvci6G1gF2TBwyoKelnWy55kWYS9ePDmD+in+KcevLb7GgpqipeeTkzPpGdewSNJmx6nKtXJS3oWiwTOv33pbs6Ou9vr731YHddQ5/ZiAHa/9cXnjLln62DyLALIL48P+4AIQ+RZAP2cnO909/PH4uvRQcdh1zSqwCMPIiDPIqwT8uHufMVJuDfnOxnhq9OT7vHPZR9WZxEgSjUBUi7IcQBG++XpphfB6rgvVwCQ//f7og8WAeL8F6Kr6oD7X8s+PPuOmQNYAAsIUOIAkDeSLIK1LeCMagIweZQ8iRkBlJuYl5gwSlxjZ2R9KM/2XBphsyxEQGhfOCEVNQXQ0UZdo2i21+edR57DmxjZFRpTCaD2/7QAXsAFcEKq3zYEGHJBtgCeC97f3vtnG0uY1e1aavQ3/QgMuaBoDtCsDyWv3yqSlxhpTClAygXZArAILIaS8ezOo52TIJVA1/sqAswRnhCfEoAnuqGkZwpbZxJfyflTQuysAN7GxxNiZ62fEoCFMBGqpcK8h8ckqIkRoiU3VPkHIM/2R4rMaTLK0pGr9oVrw9v7Iy/QDLFEAH5umxTAW9utreTHOuD1+e/KaQ4mrGrb1ykE0L07HODFmKMsJs1b2GYfAc0MdYPEThiTvIA8DjWayNxSs3pJePPDOvJNCKDL27r22L95AlRJXaewuh57cVuPx7Acen1VlNkIoKR0++udCer84PXn42wj660EW38BooS99rqTn1R/FkCTnibyAH3l5bW9GOqjx+Wa8TWVCXpn/NzW63oIote1bH6HlSKUK0BKkFkIgDSX01+taz9+vTV0X/MC6Hu+1OFmSb9tHp6MRopIrQgBAjMDtr2bfOvb3KTIP2vZy9HnvH6vXJD6ZdheOYAJl/yOZ/YCMOFYygKBQCAQCAQCgUAgEAgEAoFAIBDYKXwAXSs8dJ1Ggb4AAAAASUVORK5CYII="},geometry:{default:{texturewidth:64,textureheight:64,visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],bones:[{name:"head",pivot:[0,24,0],cubes:[{origin:[-3,21,-3],size:[6,6,6],uv:[0,0]}]},{name:"rightEar",pivot:[0,24,0],cubes:[{origin:[-4,26,-2],size:[3,4,1],uv:[24,0]}],parent:"head"},{name:"leftEar",mirror:!0,pivot:[0,24,0],cubes:[{origin:[1,26,-2],size:[3,4,1],uv:[24,0]}],parent:"head"},{name:"body",pivot:[0,24,0],cubes:[{origin:[-3,8,-3],size:[6,12,6],uv:[0,16]},{origin:[-5,-8,0],size:[10,16,1],uv:[0,34]}]},{name:"rightWing",pivot:[0,24,0],cubes:[{origin:[-12,7,1.5],size:[10,16,1],uv:[42,0]}],parent:"body"},{name:"rightWingTip",mirror:!0,pivot:[-12,23,1.5],cubes:[{origin:[-20,10,1.5],size:[8,12,1],uv:[24,16]}],parent:"rightWing"},{name:"leftWing",mirror:!0,pivot:[0,24,0],cubes:[{origin:[2,7,1.5],size:[10,16,1],uv:[42,0]}],parent:"body"},{name:"leftWingTip",pivot:[12,23,1.5],cubes:[{origin:[12,10,1.5],size:[8,12,1],uv:[24,16]}],parent:"leftWing"}]}},render_controllers:["controller.render.bat"],spawn_egg:{texture:"spawn_egg",texture_index:18}},bee:{identifier:"minecraft:bee",materials:{default:"bee"},textures:{default:"textures/entity/bee/bee",angry:"textures/entity/bee/bee_angry",nectar:"textures/entity/bee/bee_nectar",angry_nectar:"textures/entity/bee/bee_angry_nectar"},geometry:{default:{texturewidth:64,textureheight:64,visible_bounds_width:1.5,visible_bounds_height:1.5,visible_bounds_offset:[0,.25,0],bones:[{name:"body",pivot:[.5,5,0],cubes:[{origin:[-3,2,-5],size:[7,7,10],uv:[0,0]},{origin:[2,7,-8],size:[1,2,3],uv:[2,0]},{origin:[-2,7,-8],size:[1,2,3],uv:[2,3]}],locators:{lead:[0,4,-1]}},{name:"stinger",parent:"body",pivot:[.5,6,1],cubes:[{origin:[.5,5,5],size:[0,1,2],uv:[26,7]}]},{name:"rightwing_bone",parent:"body",pivot:[-1,9,-3],rotation:[15,-15,0],cubes:[{origin:[-10,9,-3],size:[9,0,6],uv:[0,18]}]},{name:"leftwing_bone",parent:"body",pivot:[2,9,-3],rotation:[15,15,0],cubes:[{origin:[2,9,-3],size:[9,0,6],uv:[9,24]}]},{name:"leg_front",parent:"body",pivot:[2,2,-2],cubes:[{origin:[-3,0,-2],size:[7,2,0],uv:[26,1]}]},{name:"leg_mid",parent:"body",pivot:[2,2,0],cubes:[{origin:[-3,0,0],size:[7,2,0],uv:[26,3]}]},{name:"leg_back",parent:"body",pivot:[2,2,2],cubes:[{origin:[-3,0,2],size:[7,2,0],uv:[26,5]}]}]}},particle_effects:{nectar_dripping:"minecraft:nectar_drip_particle"},render_controllers:["controller.render.bee"],spawn_egg:{texture:"egg_bee",texture_index:0}},cave_spider:{identifier:"minecraft:cave_spider",min_engine_version:"1.8.0",materials:{default:"spider",invisible:"spider_invisible"},textures:{default:"textures/entity/spider/cave_spider"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"head",pivot:[0,9,-3],cubes:[{origin:[-4,5,-11],size:[8,8,8],uv:[32,4]}],parent:"body0"},{name:"body0",pivot:[0,9,0],cubes:[{origin:[-3,6,-3],size:[6,6,6],uv:[0,0]}]},{name:"body1",pivot:[0,9,9],cubes:[{origin:[-5,5,3],size:[10,8,12],uv:[0,12]}],parent:"body0"},{name:"leg0",pivot:[-4,9,2],cubes:[{origin:[-19,8,1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg1",pivot:[4,9,2],cubes:[{origin:[3,8,1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg2",pivot:[-4,9,1],cubes:[{origin:[-19,8,0],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg3",pivot:[4,9,1],cubes:[{origin:[3,8,0],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg4",pivot:[-4,9,0],cubes:[{origin:[-19,8,-1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg5",pivot:[4,9,0],cubes:[{origin:[3,8,-1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg6",pivot:[-4,9,-1],cubes:[{origin:[-19,8,-2],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg7",pivot:[4,9,-1],cubes:[{origin:[3,8,-2],size:[16,2,2],uv:[18,0]}],parent:"body0"}]}},render_controllers:["controller.render.spider"],spawn_egg:{texture:"spawn_egg",texture_index:22}},chest_minecart:{identifier:"minecraft:chest_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},command_block_minecart:{identifier:"minecraft:command_block_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},cow:{identifier:"minecraft:cow",min_engine_version:"1.8.0",materials:{default:"cow"},textures:{default:"textures/entity/cow/cow"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.75,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-6,11,-5],size:[12,18,10],uv:[18,4]},{origin:[-2,11,-6],size:[4,6,1],uv:[52,0]}]},{name:"head",parent:"body",pivot:[0,20,-8],locators:{lead:[0,20,-8]},cubes:[{origin:[-4,16,-14],size:[8,8,6],uv:[0,0]},{origin:[-5,22,-12],size:[1,3,1],uv:[22,0]},{origin:[4,22,-12],size:[1,3,1],uv:[22,0]}]},{name:"leg0",parent:"body",pivot:[-4,12,7],cubes:[{origin:[-6,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[4,12,7],cubes:[{origin:[2,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-4,12,-6],cubes:[{origin:[-6,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[4,12,-6],cubes:[{origin:[2,0,-7],size:[4,12,4],uv:[0,16]}]}]}},render_controllers:["controller.render.cow"],spawn_egg:{texture:"spawn_egg",texture_index:1}},dragon_fireball:{identifier:"minecraft:dragon_fireball",materials:{default:"fireball"},textures:{default:"textures/entity/enderdragon/dragon_fireball"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},drowned:{identifier:"minecraft:drowned",min_engine_version:"1.16.0",materials:{default:"drowned"},textures:{default:"textures/entity/zombie/drowned"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}]},{name:"jacket",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.5}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0],inflate:.5}]},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:1}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-7,12,-2],size:[4,12,4],uv:[0,16]}]},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16],mirror:!0}]},{name:"rightSleeve",parent:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-7,12,-2],size:[4,12,4],uv:[48,48],inflate:.5}]},{name:"leftSleeve",parent:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,32],inflate:.5,mirror:!0}]},{name:"rightLeg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4.05,0,-2],size:[4,12,4],uv:[16,48]}]},{name:"leftLeg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[.05,0,-2],size:[4,12,4],uv:[32,48],mirror:!0}]},{name:"rightPants",parent:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-4.25,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]},{name:"leftPants",parent:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[.25,0,-2],size:[4,12,4],uv:[0,32],inflate:.25,mirror:!0}]},{name:"waist",parent:"body",pivot:[0,12,0]},{name:"rightItem",parent:"rightArm",pivot:[-1,-45,-5]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]}],visible_bounds_width:2.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64}},render_controllers:["controller.render.drowned"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:48}},egg:{identifier:"minecraft:egg",materials:{default:"egg"},textures:{default:"textures/items/egg"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},elder_guardian:{identifier:"minecraft:elder_guardian",min_engine_version:"1.8.0",materials:{default:"guardian",ghost:"guardian_ghost"},textures:{default:"textures/entity/guardian",elder:"textures/entity/guardian_elder",beam:"textures/entity/guardian_beam"},geometry:{default:{visible_bounds_width:3.5,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,0,0],mirror:!0,cubes:[{mirror:!1,origin:[-6,2,-8],size:[12,12,16],uv:[0,0]},{mirror:!1,origin:[-8,2,-6],size:[2,12,12],uv:[0,28]},{origin:[6,2,-6],size:[2,12,12],uv:[0,28]},{origin:[-6,14,-6],size:[12,2,12],uv:[16,40]},{origin:[-6,0,-6],size:[12,2,12],uv:[16,40]}]},{name:"eye",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,6,0],size:[2,2,1],uv:[8,0]}]},{name:"tailpart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-2,6,7],size:[4,4,8],uv:[40,0]}]},{name:"tailpart1",parent:"tailpart0",pivot:[0,24,0],cubes:[{origin:[0,7,0],size:[3,3,7],uv:[0,54]}]},{name:"tailpart2",parent:"tailpart1",pivot:[0,24,0],cubes:[{origin:[0,8,0],size:[2,2,6],uv:[41,32]},{origin:[1,4.5,3],size:[1,9,9],uv:[25,19]}]},{name:"spikepart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart1",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart2",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart3",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart4",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart5",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart6",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart7",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart8",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart9",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart10",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart11",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]}]},ghost:{visible_bounds_width:3.5,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,24,0],mirror:!0,cubes:[{mirror:!1,origin:[-6,2,-8],size:[12,12,16],uv:[0,0]},{mirror:!1,origin:[-8,2,-6],size:[2,12,12],uv:[0,28]},{origin:[6,2,-6],size:[2,12,12],uv:[0,28]},{origin:[-6,14,-6],size:[12,2,12],uv:[16,40]},{origin:[-6,0,-6],size:[12,2,12],uv:[16,40]}]},{name:"eye",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,7,0],size:[2,2,1],uv:[8,0]}]},{name:"tailpart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-2,6,7],size:[4,4,8],uv:[40,0]}]},{name:"tailpart1",parent:"tailpart0",pivot:[0,24,0],cubes:[{origin:[0,7,0],size:[3,3,7],uv:[0,54]}]},{name:"tailpart2",parent:"tailpart1",pivot:[0,24,0],cubes:[{origin:[0,8,0],size:[2,2,6],uv:[41,32]},{origin:[1,4.5,3],size:[1,9,9],uv:[25,19]}]},{name:"spikepart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart1",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart2",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart3",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart4",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart5",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart6",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart7",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart8",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart9",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart10",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart11",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]}]}},render_controllers:["controller.render.guardian"],spawn_egg:{texture:"spawn_egg",texture_index:36}},eye_of_ender:{identifier:"minecraft:eye_of_ender_signal",materials:{default:"eye_of_ender_signal"},textures:{default:"textures/items/ender_eye"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},ender_pearl:{identifier:"minecraft:ender_pearl",materials:{default:"ender_pearl"},textures:{default:"textures/items/ender_pearl"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},evoker_fangs:{identifier:"minecraft:evocation_fang",materials:{default:"fang"},textures:{default:"textures/entity/illager/evoker_fangs"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:64,textureheight:32,bones:[{name:"upper_jaw",parent:"base",pivot:[0,11,0],cubes:[{origin:[-1.5,0,-4],size:[4,14,8],uv:[40,0],inflate:.01}]},{name:"lower_jaw",parent:"base",pivot:[0,11,0],bind_pose_rotation:[0,180,0],cubes:[{origin:[-1.5,0,-4],size:[4,14,8],uv:[40,0]}]},{name:"base",pivot:[0,0,0],bind_pose_rotation:[0,90,0],cubes:[{origin:[-5,0,-5],size:[10,12,10],uv:[0,0]}]}]}},render_controllers:["controller.render.evocation_fang"]},evoker:{identifier:"minecraft:evocation_illager",min_engine_version:"1.8.0",materials:{default:"evoker"},textures:{default:"textures/entity/illager/evoker"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22]},{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]}]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],mirror:!0,cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],locators:{right_hand:[-6,12,0]},cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,46]}]},{name:"rightItem",pivot:[-5.5,16,.5],neverRender:!0,parent:"rightArm"},{name:"leftArm",parent:"body",pivot:[5,22,0],locators:{left_hand:[6,12,0]},mirror:!0,cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,46]}]}]}},particle_effects:{spell:"minecraft:evoker_spell"},render_controllers:["controller.render.evoker"],spawn_egg:{texture:"spawn_egg",texture_index:40}},experience_bottle:{identifier:"minecraft:xp_bottle",materials:{default:"xp_bottle"},textures:{default:"textures/items/experience_bottle",enchanted:"textures/misc/enchanted_item_glint"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.experience_bottle"]},experience_orb:{identifier:"minecraft:xp_orb",materials:{default:"experience_orb"},textures:{default:"textures/entity/experience_orb"},geometry:{default:{bones:[{name:"body",pivot:[8,8,0],cubes:[{origin:[0,0,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:64,textureheight:64}},render_controllers:["controller.render.experience_orb"]},fireball:{identifier:"minecraft:fireball",materials:{default:"fireball"},textures:{default:"textures/items/fire_charge"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},firework_rocket:{identifier:"minecraft:fireworks_rocket",materials:{default:"fireworks_rocket"},textures:{default:"textures/entity/fireworks"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],rotation:[0,90,0],size:[16,16,0],uv:{north:{uv:[0,0]}}},{origin:[-8,-8,0],rotation:[90,90,0],size:[16,16,0],uv:{north:{uv:[0,0]}}}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.fireworks_rocket"]},fishing_bobber:{identifier:"minecraft:fishing_hook",materials:{default:"fishing_hook"},textures:{default:"textures/entity/fishing_hook"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-1.5,-1.5,-1.5],size:[3,3,3],rotation:[0,0,180],uv:{up:{uv:[0,0]},down:{uv:[3,0]},south:{uv:[9,0],uv_size:[-3,3]},north:{uv:[9,0]},east:{uv:[12,0]},west:{uv:[15,0]}}},{origin:[0,-4.5,-.5],size:[0,3,3],uv:{east:{uv:[18,0]}}},{origin:[0,1.5,-1.5],size:[0,3,3],uv:{east:{uv:[21,0]}}},{origin:[-1.5,1.5,0],size:[3,3,0],uv:{north:{uv:[21,0]}}}]}],texturewidth:24,textureheight:3}},render_controllers:["controller.render.fishing_hook"]},hoglin:{identifier:"minecraft:hoglin",materials:{default:"hoglin"},textures:{default:"textures/entity/hoglin/hoglin"},geometry:{default:{bones:[{name:"body",pivot:[0,19,-3],cubes:[{origin:[-8,11,-7],size:[16,14,26],inflate:.02,uv:[1,1]},{origin:[0,22,-10],size:[0,10,19],inflate:.02,uv:[90,33]}],locators:{lead:[0,20,-5]}},{name:"head",parent:"body",pivot:[0,22,-5],rotation:[50,0,0],cubes:[{origin:[-7,21,-24],size:[14,6,19],uv:[61,1]},{origin:[-8,22,-19],size:[2,11,2],uv:[1,13]},{origin:[6,22,-19],size:[2,11,2],uv:[1,13]}]},{name:"right_ear",parent:"head",pivot:[-7,27,-7],rotation:[0,0,-50],cubes:[{origin:[-13,26,-10],size:[6,1,4],uv:[1,1]}]},{name:"left_ear",parent:"head",pivot:[7,27,-7],rotation:[0,0,50],cubes:[{origin:[7,26,-10],size:[6,1,4],uv:[1,6]}]},{name:"leg_back_right",pivot:[6,8,17],cubes:[{origin:[-8,0,13],size:[5,11,5],uv:[21,45]}]},{name:"leg_back_left",pivot:[-6,8,17],cubes:[{origin:[3,0,13],size:[5,11,5],uv:[0,45]}]},{name:"leg_front_right",pivot:[-6,12,-3],cubes:[{origin:[-8,0,-6],size:[6,14,6],uv:[66,42]}]},{name:"leg_front_left",pivot:[6,12,-3],cubes:[{origin:[2,0,-6],size:[6,14,6],uv:[41,42]}]}],visible_bounds_width:4,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:64}},spawn_egg:{base_color:"#C66E55",overlay_color:"#5f6464"},render_controllers:["controller.render.hoglin"]},hopper_minecart:{identifier:"minecraft:hopper_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},husk:{identifier:"minecraft:husk",min_engine_version:"1.8.0",materials:{default:"husk"},textures:{default:"textures/entity/zombie/husk"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],mirror:!0,parent:"body"}]}},scripts:{pre_animation:["variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"]},animations:{humanoid_big_head:{loop:!0,bones:{head:{scale:1.4}}},look_at_target_default:{loop:!0,bones:{head:{relative_to:{rotation:"entity"},rotation:["query.target_x_rotation","query.target_y_rotation",0]}}},look_at_target_gliding:{loop:!0,bones:{head:{rotation:[-45,"query.target_y_rotation",0]}}},look_at_target_swimming:{loop:!0,bones:{head:{rotation:["math.lerp(query.target_x_rotation, -45.0, variable.swim_amount)","query.target_y_rotation",0]}}},move:{loop:!0,bones:{leftarm:{rotation:["variable.tcos0",0,0]},leftleg:{rotation:["variable.tcos0 * -1.4",0,0]},rightarm:{rotation:["-variable.tcos0",0,0]},rightleg:{rotation:["variable.tcos0 * 1.4",0,0]}}},"riding.arms":{loop:!0,bones:{leftarm:{rotation:[-36,0,0]},rightarm:{rotation:[-36,0,0]}}},"riding.legs":{loop:!0,bones:{leftleg:{rotation:["-72.0 - this","-18.0 - this","-this"]},rightleg:{rotation:["-72.0 - this","18.0 - this","-this"]}}},holding:{loop:!0,bones:{leftarm:{rotation:["variable.is_holding_left ? (-this * 0.5 - 18.0) : 0.0",0,0]},rightarm:{rotation:["variable.is_holding_right ? (-this * 0.5 - 18.0) : 0.0",0,0]}}},brandish_spear:{loop:!0,bones:{rightarm:{rotation:["this * -0.5 - 157.5 - 22.5 * variable.charge_amount","-this",0]}}},charging:{loop:!0,bones:{rightarm:{rotation:["22.5 * variable.charge_amount - this","-this",0]}}},"attack.rotations":{loop:!0,bones:{body:{rotation:[0,"math.sin(math.sqrt(variable.attack_time) * 360) * 11.46 - this",0]},leftarm:{rotation:["math.sin(math.sqrt(variable.attack_time) * 360) * 11.46",0,0]},rightarm:{rotation:["math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * (variable.is_brandishing_spear ? -1.0 : 1.0 )","variable.is_brandishing_spear ? 0.0 : (math.sin(math.sqrt(variable.attack_time) * 360) * 11.46) * 2.0",0]}}},sneaking:{loop:!0,bones:{body:{rotation:["0.5 - this",0,0]},head:{position:[0,1,0]},leftarm:{rotation:[72,0,0]},leftleg:{position:[0,-3,4]},rightarm:{rotation:[72,0,0]},rightleg:{position:[0,-3,4]}}},bob:{loop:!0,bones:{leftarm:{rotation:[0,0,"((math.cos(query.life_time * 103.2) * 2.865) + 2.865) *-1.0"]},rightarm:{rotation:[0,0,"(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},damage_nearby_mobs:{loop:!0,bones:{leftarm:{rotation:["-45.0-this","-this","-this"]},leftleg:{rotation:["45.0-this","-this","-this"]},rightarm:{rotation:["45.0-this","-this","-this"]},rightleg:{rotation:["-45.0-this","-this","-this"]}}},bow_and_arrow:{loop:!0,bones:{leftarm:{rotation:["query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation + 28.65","-(math.cos(query.life_time * 103.2) * 2.865) - 2.865"]},rightarm:{rotation:["query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation - 5.73","(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},use_item_progress:{loop:!0,bones:{rightarm:{rotation:["variable.use_item_startup_progress * -60.0 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -22.5 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -5.625 + variable.use_item_interval_progress * 11.25"]}}},zombie_attack_bare_hand:{loop:!0,bones:{leftarm:{rotation:["-90.0 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) - (math.sin(query.life_time * 76.776372) * 2.865) - this","5.73 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 0.6) - this","math.cos(query.life_time * 103.13244) * -2.865 - 2.865 - this"]},rightarm:{rotation:["90.0 * (variable.is_brandishing_spear - 1.0) - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) + (math.sin(query.life_time * 76.776372) * 2.865) - this","(math.sin(variable.attack_time * 180.0) * 57.3) * 0.6 - 5.73 - this","math.cos(query.life_time * 103.13244) * 2.865 + 2.865 - this"]}}},swimming:{loop:!0,bones:{body:{position:[0,"variable.swim_amount * -10.0 - this","variable.swim_amount * 9.0 - this"],rotation:["variable.swim_amount * (90.0 + query.target_x_rotation)",0,0]},leftarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) - (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, 14.325, variable.swim_amount) - (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},leftleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0 + 180.0) * 0.3, variable.swim_amount)",0,0]},rightarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) + (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, -14.325, variable.swim_amount) + (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},rightleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0) * 0.3, variable.swim_amount)",0,0]}}}},animation_controllers:{humanoid_baby_big_head:{initial_state:"default",states:{baby:{animations:["humanoid_big_head"],transitions:[{default:"!query.is_baby"}]},default:{transitions:[{baby:"query.is_baby"}]}}},look_at_target:{initial_state:"default",states:{default:{animations:["look_at_target_default"],transitions:[{gliding:"query.is_gliding"},{swimming:"query.is_swimming"}]},gliding:{animations:["look_at_target_gliding"],transitions:[{swimming:"query.is_swimming"},{default:"!query.is_gliding"}]},swimming:{animations:["look_at_target_swimming"],transitions:[{gliding:"query.is_gliding"},{default:"!query.is_swimming"}]}}},move:{initial_state:"default",states:{default:{animations:["move"]}}},riding:{initial_state:"default",states:{default:{transitions:[{riding:"query.is_riding"}]},riding:{animations:["riding.arms","riding.legs"],transitions:[{default:"!query.is_riding"}]}}},holding:{initial_state:"default",states:{default:{animations:["holding"]}}},brandish_spear:{initial_state:"default",states:{brandish_spear:{animations:["brandish_spear"],transitions:[{default:"!variable.is_brandishing_spear"}]},default:{transitions:[{brandish_spear:"variable.is_brandishing_spear"}]}}},charging:{initial_state:"default",states:{charging:{animations:["charging"],transitions:[{default:"!query.is_charging"}]},default:{transitions:[{charging:"query.is_charging"}]}}},attack:{initial_state:"default",states:{attacking:{animations:["attack.rotations"],transitions:[{default:"variable.attack_time < 0.0"}]},default:{transitions:[{attacking:"variable.attack_time >= 0.0"}]}}},sneaking:{initial_state:"default",states:{default:{transitions:[{sneaking:"query.is_sneaking"}]},sneaking:{animations:["sneaking"],transitions:[{default:"!query.is_sneaking"}]}}},bob:{initial_state:"default",states:{default:{animations:["bob"]}}},damage_nearby_mobs:{initial_state:"default",states:{damage_nearby_mobs:{animations:["damage_nearby_mobs"],transitions:[{default:"!variable.damage_nearby_mobs"}]},default:{transitions:[{damage_nearby_mobs:"variable.damage_nearby_mobs"}]}}},bow_and_arrow:{initial_state:"default",states:{bow_and_arrow:{animations:["bow_and_arrow"],transitions:[{default:"!query.has_target"}]},default:{transitions:[{bow_and_arrow:"query.has_target"}]}}},use_item_progress:{initial_state:"default",states:{default:{transitions:[{use_item_progress:"( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 )"}]},use_item_progress:{animations:["use_item_progress"],transitions:[{default:"( variable.use_item_interval_progress <= 0.0 ) && ( variable.use_item_startup_progress <= 0.0 )"}]}}},zombie_attack_bare_hand:{initial_state:"default",states:{default:{transitions:[{is_bare_hand:"variable.is_holding_left != 1.0"}]},is_bare_hand:{animations:["zombie_attack_bare_hand"],transitions:[{default:"variable.is_holding_left == 1.0"}]}}},swimming:{initial_state:"default",states:{default:{transitions:[{is_swimming:"variable.swim_amount > 0.0"}]},is_swimming:{animations:["swimming"],transitions:[{default:"variable.swim_amount <= 0.0"}]}}}},render_controllers:["controller.render.husk"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:28}},iron_golem:{identifier:"minecraft:iron_golem",materials:{default:"iron_golem"},textures:{default:"textures/entity/iron_golem/iron_golem"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:128,bones:[{name:"body",pivot:[0,31,0],cubes:[{origin:[-9,21,-6],size:[18,12,11],uv:[0,40]},{origin:[-4.5,16,-3],size:[9,5,6],uv:[0,70],inflate:.5}]},{name:"head",parent:"body",pivot:[0,31,-2],locators:{lead:[0,31,-2]},cubes:[{origin:[-4,33,-7.5],size:[8,10,8],uv:[0,0]},{origin:[-1,32,-9.5],size:[2,4,2],uv:[24,0]}]},{name:"arm0",parent:"body",pivot:[0,31,0],cubes:[{origin:[-13,3.5,-3],size:[4,30,6],uv:[60,21]}]},{name:"arm1",parent:"body",pivot:[0,31,0],cubes:[{origin:[9,3.5,-3],size:[4,30,6],uv:[60,58]}]},{name:"leg0",parent:"body",pivot:[-4,13,0],cubes:[{origin:[-7.5,0,-3],size:[6,16,5],uv:[37,0]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[5,13,0],cubes:[{origin:[1.5,0,-3],size:[6,16,5],uv:[60,0]}]}]}},render_controllers:["controller.render.iron_golem"]},item_frame:{identifier:"minecraft:item_frame",materials:{default:"item_frame"},textures:{background:"block:item_frame",frame:"block:oak_planks"},geometry:{background:{bones:[{name:"base"},{name:"background",parent:"base",rotation:[0,180,0],pivot:[0,0,0],cubes:[{origin:[-5,-5,-8],size:[10,10,.5],uv:[3,3]}]}],texturewidth:16,textureheight:16},frame:{bones:[{name:"frame",parent:"base",rotation:[0,180,0],pivot:[0,0,0],cubes:[{origin:[-6,-6,-8],size:[12,1,1],uv:[2,2]},{origin:[-6,5,-8],size:[12,1,1],uv:[2,13]},{origin:[-6,-5,-8],size:[1,10,1],uv:[2,3]},{origin:[5,-5,-8],size:[1,10,1],uv:[13,3]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_frame"]},leash_knot:{identifier:"minecraft:leash_knot",materials:{default:"leash_knot"},textures:{default:"textures/entity/lead_knot"},geometry:{default:{bones:[{name:"knot",rotation:[0,180,0],cubes:[{origin:[5,6,5],size:[6,8,6],uv:[0,0]}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.leash_knot"]},llama_spit:{identifier:"minecraft:llama_spit",materials:{default:"llama_spit"},textures:{default:"textures/entity/llama/spit"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,22,0],size:[2,2,2],uv:[0,0]},{origin:[0,26,0],size:[2,2,2],uv:[0,0]},{origin:[0,22,-4],size:[2,2,2],uv:[0,0]},{origin:[0,22,0],size:[2,2,2],uv:[0,0]},{origin:[2,22,0],size:[2,2,2],uv:[0,0]},{origin:[0,20,0],size:[2,2,2],uv:[0,0]},{origin:[0,22,2],size:[2,2,2],uv:[0,0]}]}]}},render_controllers:["controller.render.llama_spit"]},magma_cube:{identifier:"minecraft:magma_cube",materials:{default:"magma_cube"},textures:{default:"textures/entity/slime/magmacube"},geometry:{default:{visible_bounds_width:2.5,visible_bounds_height:5,visible_bounds_offset:[0,2.5,0],texturewidth:64,textureheight:32,bones:[{name:"bodyCube_0",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,7,-4],size:[8,1,8],uv:[0,0]}]},{name:"bodyCube_1",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,6,-4],size:[8,1,8],uv:[0,1]}]},{name:"bodyCube_2",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,5,-4],size:[8,1,8],uv:[24,10]}]},{name:"bodyCube_3",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,4,-4],size:[8,1,8],uv:[24,19]}]},{name:"bodyCube_4",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,3,-4],size:[8,1,8],uv:[0,4]}]},{name:"bodyCube_5",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,2,-4],size:[8,1,8],uv:[0,5]}]},{name:"bodyCube_6",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,1,-4],size:[8,1,8],uv:[0,6]}]},{name:"bodyCube_7",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,0,-4],size:[8,1,8],uv:[0,7]}]},{name:"insideCube",pivot:[0,0,0],cubes:[{origin:[-2,2,-2],size:[4,4,4],uv:[0,16]}]}]}},render_controllers:["controller.render.magma_cube"],spawn_egg:{texture:"spawn_egg",texture_index:20}},mooshroom:{identifier:"minecraft:mooshroom",min_engine_version:"1.8.0",materials:{default:"mooshroom"},textures:{default:"textures/entity/cow/red_mooshroom",brown:"textures/entity/cow/brown_mooshroom"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-6,11,-5],size:[12,18,10],uv:[18,4]},{origin:[-2,11,-6],size:[4,6,1],uv:[52,0]}]},{name:"head",pivot:[0,20,-8],locators:{lead:[0,20,-8]},cubes:[{origin:[-4,16,-14],size:[8,8,6],uv:[0,0]},{origin:[-5,22,-12],size:[1,3,1],uv:[22,0]},{origin:[4,22,-12],size:[1,3,1],uv:[22,0]}]},{name:"leg0",parent:"body",pivot:[-4,12,7],cubes:[{origin:[-6,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[4,12,7],cubes:[{origin:[2,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-4,12,-6],cubes:[{origin:[-6,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[4,12,-6],cubes:[{origin:[2,0,-7],size:[4,12,4],uv:[0,16]}]}]}},render_controllers:["controller.render.mooshroom"],spawn_egg:{texture:"spawn_egg",texture_index:5}},panda:{identifier:"minecraft:panda",materials:{default:"panda"},textures:{default:"textures/entity/panda/panda",lazy:"textures/entity/panda/lazy_panda",worried:"textures/entity/panda/worried_panda",playful:"textures/entity/panda/playful_panda",brown:"textures/entity/panda/brown_panda",weak:"textures/entity/panda/weak_panda",aggressive:"textures/entity/panda/aggressive_panda"},geometry:{default:{texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,12.5,-17],locators:{lead:[0,14,-16]},cubes:[{origin:[-6.5,7.5,-21],size:[13,10,9],uv:[0,6]},{origin:[-3.5,7.5,-23],size:[7,5,2],uv:[45,16]},{origin:[-8.5,16.5,-18],size:[5,4,1],uv:[52,25]},{origin:[3.5,16.5,-18],size:[5,4,1],uv:[52,25]}]},{name:"body",pivot:[0,14,0],bind_pose_rotation:[90,0,0],cubes:[{origin:[-9.5,1,-6.5],size:[19,26,13],uv:[0,25]}]},{name:"leg0",parent:"body",pivot:[-5.5,9,9],cubes:[{origin:[-8.5,0,6],size:[6,9,6],uv:[40,0]}]},{name:"leg1",parent:"body",pivot:[5.5,9,9],cubes:[{origin:[2.5,0,6],size:[6,9,6],uv:[40,0]}]},{name:"leg2",parent:"body",pivot:[-5.5,9,-9],cubes:[{origin:[-8.5,0,-12],size:[6,9,6],uv:[40,0]}]},{name:"leg3",parent:"body",pivot:[5.5,9,-9],cubes:[{origin:[2.5,0,-12],size:[6,9,6],uv:[40,0]}]}]}},render_controllers:["controller.render.panda"],spawn_egg:{texture:"spawn_egg",texture_index:54}},phantom:{identifier:"minecraft:phantom",materials:{default:"phantom",invisible:"phantom_invisible"},textures:{default:"textures/entity/phantom"},geometry:{default:{texturewidth:64,textureheight:64,bones:[{name:"body",pivot:[0,24,0],bind_pose_rotation:[0,0,0],cubes:[{origin:[-3,23,-8],size:[5,3,9],uv:[0,8]}]},{name:"wing0",pivot:[2,26,-8],bind_pose_rotation:[0,0,5.7],cubes:[{origin:[2,24,-8],size:[6,2,9],uv:[23,12]}],parent:"body"},{name:"wingtip0",pivot:[8,26,-8],bind_pose_rotation:[0,0,5.7],locators:{left_wing:[21,26,0]},cubes:[{origin:[8,25,-8],size:[13,1,9],uv:[16,24]}],parent:"wing0"},{name:"wing1",pivot:[-3,26,-8],bind_pose_rotation:[0,0,-5.7],mirror:!0,cubes:[{origin:[-9,24,-8],size:[6,2,9],uv:[23,12]}],parent:"body"},{name:"wingtip1",pivot:[-9,24,-8],bind_pose_rotation:[0,0,-5.7],locators:{right_wing:[-22,24,0]},mirror:!0,cubes:[{origin:[-22,25,-8],size:[13,1,9],uv:[16,24]}],parent:"wing1"},{name:"head",pivot:[0,23,-7],bind_pose_rotation:[11.5,0,0],cubes:[{origin:[-4,22,-12],size:[7,3,5],uv:[0,0]}],parent:"body"},{name:"tail",pivot:[0,26,1],bind_pose_rotation:[0,0,0],cubes:[{origin:[-2,24,1],size:[3,2,6],uv:[3,20]}],parent:"body"},{name:"tailtip",pivot:[0,25.5,7],bind_pose_rotation:[0,0,0],cubes:[{origin:[-1,24.5,7],size:[1,1,6],uv:[4,29]}],parent:"tail"}]}},particle_effects:{wing_dust:"minecraft:phantom_trail_particle"},sound_effects:{flap:"mob.phantom.flap"},render_controllers:["controller.render.phantom"],spawn_egg:{texture:"spawn_egg",texture_index:51}},pig:{identifier:"minecraft:pig",min_engine_version:"1.8.0",materials:{default:"pig"},textures:{default:"textures/entity/pig/pig",saddled:"textures/entity/pig/pig_saddle"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,13,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-5,7,-5],size:[10,16,8],uv:[28,8]}]},{name:"head",parent:"body",pivot:[0,12,-6],locators:{lead:[0,14,-6]},cubes:[{origin:[-4,8,-14],size:[8,8,8],uv:[0,0]},{origin:[-2,9,-15],size:[4,3,1],uv:[16,16]}]},{name:"leg0",parent:"body",pivot:[-3,6,7],cubes:[{origin:[-5,0,5],size:[4,6,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[3,6,7],cubes:[{origin:[1,0,5],size:[4,6,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-3,6,-5],cubes:[{origin:[-5,0,-7],size:[4,6,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[3,6,-5],cubes:[{origin:[1,0,-7],size:[4,6,4],uv:[0,16]}]}]}},render_controllers:["controller.render.pig"],spawn_egg:{texture:"spawn_egg",texture_index:2}},piglin_brute:{identifier:"minecraft:piglin_brute",materials:{default:"piglin_brute"},textures:{default:"textures/entity/piglin/piglin_brute"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]},{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.25}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-5,24,-4],size:[10,8,8],uv:[0,0],inflate:-.02},{origin:[-2,24,-5],size:[4,4,1],uv:[31,1]},{origin:[2,24,-5],size:[1,2,1],uv:[2,4]},{origin:[-3,24,-5],size:[1,2,1],uv:[2,0]}],inflate:-.02},{name:"leftear",parent:"head",pivot:[5,30,0],rotation:[0,0,-30],cubes:[{origin:[4,25,-2],size:[1,5,4],uv:[51,6]}]},{name:"rightear",parent:"head",pivot:[-5,30,0],rotation:[0,0,30],cubes:[{origin:[-5,25,-2],size:[1,5,4],uv:[39,6]}]},{name:"hat",parent:"head",pivot:[0,24,0]},{name:"rightarm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]},{origin:[-8,12,-2],size:[4,12,4],uv:[40,32],inflate:.25}]},{name:"rightItem",parent:"rightarm",pivot:[-1,-45,-5]},{name:"leftarm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[32,48]},{origin:[4,12,-2],size:[4,12,4],uv:[48,48],inflate:.25}]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]},{name:"rightleg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,16]},{origin:[-4,0,-2],size:[4,12,4],uv:[0,32],inflate:.25}]},{name:"leftleg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[16,48]},{origin:[0,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]}],visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:64}},spawn_egg:{base_color:"#592A10",overlay_color:"#F9F3A4"},render_controllers:["controller.render.piglin_brute"],enable_attachables:!0},polar_bear:{identifier:"minecraft:polar_bear",materials:{default:"polar_bear"},textures:{default:"textures/entity/bear/polarbear"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:128,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,14,-16],locators:{lead:[0,14,-16]},mirror:!0,cubes:[{mirror:!1,origin:[-3.5,10,-19],size:[7,7,7],uv:[0,0]},{mirror:!1,origin:[-2.5,10,-22],size:[5,3,3],uv:[0,44]},{mirror:!1,origin:[-4.5,16,-17],size:[2,2,1],uv:[26,0]},{origin:[2.5,16,-17],size:[2,2,1],uv:[26,0]}]},{name:"body",pivot:[-2,15,12],bind_pose_rotation:[90,0,0],cubes:[{origin:[-7,14,5],size:[14,14,11],uv:[0,19]},{origin:[-6,28,5],size:[12,12,10],uv:[39,0]}]},{name:"leg0",parent:"body",pivot:[-4.5,10,6],cubes:[{origin:[-6.5,0,4],size:[4,10,8],uv:[50,22]}]},{name:"leg1",parent:"body",pivot:[4.5,10,6],cubes:[{origin:[2.5,0,4],size:[4,10,8],uv:[50,22]}]},{name:"leg2",parent:"body",pivot:[-3.5,10,-8],cubes:[{origin:[-5.5,0,-10],size:[4,10,6],uv:[50,40]}]},{name:"leg3",parent:"body",pivot:[3.5,10,-8],cubes:[{origin:[1.5,0,-10],size:[4,10,6],uv:[50,40]}]}]}},render_controllers:["controller.render.polarbear"],spawn_egg:{texture:"spawn_egg",texture_index:37}},pufferfish:{identifier:"minecraft:pufferfish",min_engine_version:"1.8.0",materials:{default:"pufferfish"},textures:{default:"textures/entity/fish/pufferfish"},geometry:{default:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-1.5,0,-1.5],size:[3,2,3],uv:[0,27]},{origin:[.5,2,-1.5],size:[1,1,1],uv:[24,6]},{origin:[-1.5,2,-1.5],size:[1,1,1],uv:[28,6]}],locators:{lead:[0,0,0]}},{name:"tailfin",parent:"body",cubes:[{origin:[-1.5,1,1.5],size:[3,0,3],uv:[-3,0]}]},{name:"leftFin",parent:"body",pivot:[6.5,5,.5],cubes:[{origin:[1.5,0,-1.5],size:[1,1,2],uv:[25,0],mirror:!0}]},{name:"rightFin",parent:"body",pivot:[-6.5,5,.5],cubes:[{origin:[-2.5,0,-1.5],size:[1,1,2],uv:[25,0]}]}]},mid:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-2.5,1,-2.5],size:[5,5,5],uv:[12,22]}]},{name:"leftFin",parent:"body",pivot:[2.5,5,.5],cubes:[{origin:[2.5,4,-1.5],size:[2,1,2],uv:[24,3]}]},{name:"rightFin",parent:"body",pivot:[-2.5,5,.5],cubes:[{origin:[-4.5,4,-1.5],size:[2,1,2],uv:[24,0]}]},{name:"spines_top_front",parent:"body",bind_pose_rotation:[45,0,0],pivot:[0,6,-2.5],cubes:[{origin:[-2.5,6,-2.5],size:[5,1,0],uv:[19,17]}]},{name:"spines_top_back",parent:"body",bind_pose_rotation:[-45,0,0],pivot:[0,6,2.5],cubes:[{origin:[-2.5,6,2.5],size:[5,1,0],uv:[11,17]}]},{name:"spines_bottom_front",parent:"body",bind_pose_rotation:[-45,0,0],pivot:[0,1,-2.5],cubes:[{origin:[-2.5,0,-2.5],size:[5,1,0],uv:[18,20]}]},{name:"spines_bottom_back",parent:"body",bind_pose_rotation:[45,0,0],pivot:[0,1,2.5],rotation:[45,0,0],cubes:[{origin:[-2.5,0,2.5],size:[5,1,0],uv:[18,20]}]},{name:"spines_left_front",parent:"body",bind_pose_rotation:[0,45,0],pivot:[2.5,0,-2.5],rotation:[0,45,0],cubes:[{origin:[2.5,1,-2.5],size:[1,5,0],uv:[1,17]}]},{name:"spines_left_back",parent:"body",bind_pose_rotation:[0,-45,0],pivot:[2.5,0,2.5],rotation:[0,-45,0],cubes:[{origin:[2.5,1,2.5],size:[1,5,0],uv:[1,17]}]},{name:"spines_right_front",parent:"body",bind_pose_rotation:[0,-45,0],pivot:[-2.5,0,-2.5],rotation:[0,-45,0],cubes:[{origin:[-3.5,1,-2.5],size:[1,5,0],uv:[5,17]}]},{name:"spines_right_back",parent:"body",bind_pose_rotation:[0,45,0],pivot:[-2.5,0,2.5],rotation:[0,45,0],cubes:[{origin:[-3.5,1,2.5],size:[1,5,0],uv:[9,17]}]}]},large:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0]}]},{name:"leftFin",parent:"body",pivot:[4,7,1],cubes:[{origin:[4,6,-2.9904],size:[2,1,2],uv:[24,3]}]},{name:"rightFin",parent:"body",pivot:[-4,7,1],cubes:[{origin:[-5.9968,6,-2.992],size:[2,1,2],uv:[24,0]}]},{name:"spines_top_front",parent:"body",pivot:[-4,8,-4],bind_pose_rotation:[45,0,0],cubes:[{origin:[-4,8,-4],size:[8,1,1],uv:[14,16]}]},{name:"spines_top_mid",parent:"body",pivot:[0,8,0],cubes:[{origin:[-4,8,0],size:[8,1,1],uv:[14,16]}]},{name:"spines_top_back",parent:"body",pivot:[0,8,4],bind_pose_rotation:[-45,0,0],cubes:[{origin:[-4,8,4],size:[8,1,1],uv:[14,16]}]},{name:"spines_bottom_front",parent:"body",pivot:[0,0,-4],bind_pose_rotation:[-45,0,0],cubes:[{origin:[-4,-1,-4],size:[8,1,1],uv:[14,19]}]},{name:"spines_bottom_mid",parent:"body",pivot:[0,-1,0],cubes:[{origin:[-4,-1,0],size:[8,1,1],uv:[14,19]}]},{name:"spines_bottom_back",parent:"body",pivot:[0,0,4],bind_pose_rotation:[45,0,0],cubes:[{origin:[-4,-1,4],size:[8,1,1],uv:[14,19]}]},{name:"spines_left_front",parent:"body",pivot:[4,0,-4],bind_pose_rotation:[0,45,0],cubes:[{origin:[4,0,-4],size:[1,8,1],uv:[0,16]}]},{name:"spines_left_mid",parent:"body",pivot:[4,0,0],cubes:[{origin:[4,0,0],size:[1,8,1],uv:[4,16],mirror:!0}]},{name:"spines_left_back",parent:"body",pivot:[4,0,4],bind_pose_rotation:[0,-45,0],cubes:[{origin:[4,0,4],size:[1,8,1],uv:[8,16],mirror:!0}]},{name:"spines_right_front",parent:"body",pivot:[-4,0,-4],bind_pose_rotation:[0,-45,0],cubes:[{origin:[-5,0,-4],size:[1,8,1],uv:[4,16]}]},{name:"spines_right_mid",parent:"body",pivot:[-4,0,0],cubes:[{origin:[-5,0,0],size:[1,8,1],uv:[8,16]}]},{name:"spines_right_back",parent:"body",pivot:[-4,0,4],bind_pose_rotation:[0,45,0],cubes:[{origin:[-5,0,4],size:[1,8,1],uv:[8,16]}]}]}},render_controllers:[{"controller.render.pufferfish.small":"query.variant == 0"},{"controller.render.pufferfish.medium":"query.variant == 1"},{"controller.render.pufferfish.large":"query.variant == 2"}],spawn_egg:{texture:"spawn_egg",texture_index:46}},rabbit:{identifier:"minecraft:rabbit",min_engine_version:"1.8.0",materials:{default:"rabbit"},textures:{brown:"textures/entity/rabbit/brown",white:"textures/entity/rabbit/white",black:"textures/entity/rabbit/black",white_splotched:"textures/entity/rabbit/white_splotched",gold:"textures/entity/rabbit/gold",salt:"textures/entity/rabbit/salt",toast:"textures/entity/rabbit/toast"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"rearFootLeft",pivot:[3,6.5,3.7],mirror:!0,parent:"body",cubes:[{origin:[2,0,0],size:[2,1,7],uv:[8,24]}]},{name:"rearFootRight",pivot:[-3,6.5,3.7],mirror:!0,parent:"body",cubes:[{origin:[-4,0,0],size:[2,1,7],uv:[26,24]}]},{name:"haunchLeft",pivot:[3,6.5,3.7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[2,2.5,3.7],size:[2,4,5],uv:[16,15]}]},{name:"haunchRight",pivot:[-3,6.5,3.7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[-4,2.5,3.7],size:[2,4,5],uv:[30,15]}]},{name:"body",pivot:[0,5,8],bind_pose_rotation:[-20,0,0],mirror:!0,cubes:[{origin:[-3,2,-2],size:[6,5,10],uv:[0,0]}]},{name:"frontLegLeft",pivot:[3,7,-1],bind_pose_rotation:[-10,0,0],mirror:!0,parent:"body",cubes:[{origin:[2,0,-2],size:[2,7,2],uv:[8,15]}]},{name:"frontLegRight",pivot:[-3,7,-1],bind_pose_rotation:[-10,0,0],mirror:!0,parent:"body",cubes:[{origin:[-4,0,-2],size:[2,7,2],uv:[0,15]}]},{name:"head",pivot:[0,8,-1],locators:{lead:[0,8,-1]},mirror:!0,parent:"body",cubes:[{origin:[-2.5,8,-6],size:[5,4,5],uv:[32,0]}]},{name:"earRight",pivot:[0,8,-1],bind_pose_rotation:[0,-15,0],mirror:!0,parent:"body",cubes:[{origin:[-2.5,12,-2],size:[2,5,1],uv:[58,0]}]},{name:"earLeft",pivot:[0,8,-1],bind_pose_rotation:[0,15,0],mirror:!0,parent:"body",cubes:[{origin:[.5,12,-2],size:[2,5,1],uv:[52,0]}]},{name:"tail",pivot:[0,4,7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[-1.5,2.5,7],size:[3,3,2],uv:[52,6]}]},{name:"nose",pivot:[0,8,-1],mirror:!0,parent:"body",cubes:[{origin:[-.5,9.5,-6.5],size:[1,1,1],uv:[32,9]}]}]}},render_controllers:["controller.render.rabbit"],spawn_egg:{texture:"spawn_egg",texture_index:24}},ravager:{identifier:"minecraft:ravager",textures:{default:"textures/entity/illager/ravager"},materials:{default:"ravager"},geometry:{default:{bones:[{pivot:[0,19,2],rotation:[90,0,0],cubes:[{origin:[-7,10,-2],size:[14,16,20],uv:[0,55]},{origin:[-6,-3,-2],size:[12,13,18],uv:[0,91]}],name:"body"},{pivot:[0,15,-10],cubes:[{origin:[-8,13,-24],size:[16,3,16],uv:[0,36]}],name:"mouth",parent:"head"},{pivot:[0,20,-20],cubes:[{origin:[-5,21,-10],size:[10,10,18],uv:[68,73]}],name:"neck"},{locators:{stun:[0,32,-15]},pivot:[0,28,-10],cubes:[{origin:[-8,14,-24],size:[16,20,16],uv:[0,0]},{origin:[-2,12,-28],size:[4,8,4],uv:[0,0]}],name:"head",parent:"neck"},{pivot:[-12,30,22],cubes:[{origin:[-12,0,17],size:[8,37,8],uv:[96,0]}],name:"leg0"},{pivot:[4,30,22],cubes:[{origin:[4,0,17],size:[8,37,8],uv:[96,0]}],name:"leg1"},{pivot:[-4,26,-4],cubes:[{origin:[-12,0,-8],size:[8,37,8],uv:[64,0]}],name:"leg2"},{pivot:[-4,26,-4],cubes:[{origin:[4,0,-8],size:[8,37,8],uv:[64,0]}],name:"leg3"},{pivot:[-5,27,-19],rotation:[60,0,0],cubes:[{origin:[-10,27,-20],size:[2,14,4],uv:[74,55]},{origin:[8,27,-20],size:[2,14,4],uv:[74,55]}],name:"horns",parent:"head"}],texturewidth:128,textureheight:128,visible_bounds_width:4,visible_bounds_height:3.5,visible_bounds_offset:[0,1.25,0]}},render_controllers:["controller.render.ravager"],spawn_egg:{texture:"spawn_egg",texture_index:57},particle_effects:{stun_particles:"minecraft:stunned_emitter"}},salmon:{identifier:"minecraft:salmon",materials:{default:"salmon"},textures:{default:"textures/entity/fish/salmon"},geometry:{default:{visible_bounds_width:.5,visible_bounds_height:.5,visible_bounds_offset:[0,.5,0],texturewidth:32,textureheight:32,bones:[{name:"body_front",pivot:[0,0,-4],cubes:[{origin:[-1.5,3.5,-4],size:[3,5,8],uv:[0,0]}]},{name:"body_back",parent:"body_front",pivot:[0,0,4],cubes:[{origin:[-1.5,3.5,4],size:[3,5,8],uv:[0,13]}]},{name:"dorsal_front",parent:"body_front",pivot:[0,5,2],cubes:[{origin:[0,8.5,2],size:[0,2,2],uv:[4,2]}]},{name:"dorsal_back",parent:"body_back",pivot:[0,5,4],cubes:[{origin:[0,8.5,4],size:[0,2,3],uv:[2,3]}]},{name:"tailfin",parent:"body_back",pivot:[0,0,12],cubes:[{origin:[0,3.5,12],size:[0,5,6],uv:[20,10]}]},{name:"head",parent:"body_front",pivot:[0,3,-4],locators:{lead:[0,3,-4]},cubes:[{origin:[-1,4.5,-7],size:[2,4,3],uv:[22,0]}]},{name:"leftFin",parent:"body_front",pivot:[1.5,1,-4],rotation:[0,0,35],cubes:[{origin:[-.50752,3.86703,-4],size:[2,0,2],uv:[2,0]}]},{name:"rightFin",parent:"body_front",pivot:[-1.5,1,-4],rotation:[0,0,-35],cubes:[{origin:[-1.49258,3.86703,-4],size:[2,0,2],uv:[-2,0]}]}]}},render_controllers:["controller.render.salmon"],spawn_egg:{texture:"spawn_egg",texture_index:47}},sheep:{identifier:"minecraft:sheep",materials:{default:"sheep"},textures:{default:"textures/entity/sheep/sheep",wool:"textures/entity/sheep/sheep_fur"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-4,13,-5],size:[8,16,6],uv:[28,8]}]},{name:"head",pivot:[0,18,-8],cubes:[{origin:[-3,16,-14],size:[6,6,8],uv:[0,0]}]},{name:"leg0",parent:"body",pivot:[-3,12,7],cubes:[{origin:[-5,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",pivot:[3,12,7],cubes:[{origin:[1,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-3,12,-5],cubes:[{origin:[-5,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",pivot:[3,12,-5],cubes:[{origin:[1,0,-7],size:[4,12,4],uv:[0,16]}]}]},wool:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,18,-8],cubes:[{origin:[-3,16,-12],size:[6,6,6],uv:[0,32],inflate:.6}]},{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-4,13,-5],size:[8,16,6],uv:[28,40],inflate:1.75}]},{name:"leg0",parent:"body",pivot:[-3,12,7],cubes:[{origin:[-5,6,5],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg1",parent:"body",pivot:[3,12,7],cubes:[{origin:[1,6,5],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg2",parent:"body",pivot:[-3,12,-5],cubes:[{origin:[-5,6,-7],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg3",parent:"body",pivot:[3,12,-5],cubes:[{origin:[1,6,-7],size:[4,6,4],uv:[0,48],inflate:.5}]}]}}},shulker_bullet:{identifier:"minecraft:shulker_bullet",materials:{default:"shulker_bullet"},textures:{default:"textures/entity/shulker/spark"},geometry:{default:{texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-4,-4,-1],size:[8,8,2],uv:[0,0]},{origin:[-1,-4,-4],size:[2,8,8],uv:[0,10]},{origin:[-4,-1,-4],size:[8,2,8],uv:[20,0]}]}]}},render_controllers:["controller.render.shulker_bullet"]},silverfish:{identifier:"minecraft:silverfish",materials:{default:"silverfish",body_layer:"silverfish_layers"},textures:{default:"textures/entity/silverfish"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"bodyPart_0",parent:"bodyPart_2",pivot:[0,2,-3.5],cubes:[{origin:[-1.5,0,-4.5],size:[3,2,2],uv:[0,0]}]},{name:"bodyPart_1",parent:"bodyPart_2",pivot:[0,3,-1.5],cubes:[{origin:[-2,0,-2.5],size:[4,3,2],uv:[0,4]}]},{name:"bodyPart_2",pivot:[0,4,1],cubes:[{origin:[-3,0,-.5],size:[6,4,3],uv:[0,9]}]},{name:"bodyPart_3",parent:"bodyPart_2",pivot:[0,3,4],cubes:[{origin:[-1.5,0,2.5],size:[3,3,3],uv:[0,16]}]},{name:"bodyPart_4",parent:"bodyPart_2",pivot:[0,2,7],cubes:[{origin:[-1,0,5.5],size:[2,2,3],uv:[0,22]}]},{name:"bodyPart_5",parent:"bodyPart_2",pivot:[0,1,9.5],cubes:[{origin:[-1,0,8.5],size:[2,1,2],uv:[11,0]}]},{name:"bodyPart_6",parent:"bodyPart_2",pivot:[0,1,11.5],cubes:[{origin:[-.5,0,10.5],size:[1,1,2],uv:[13,4]}]},{name:"bodyLayer_0",parent:"bodyPart_2",pivot:[0,8,1],cubes:[{origin:[-5,0,-.5],size:[10,8,3],uv:[20,0]}]},{name:"bodyLayer_1",parent:"bodyPart_4",pivot:[0,4,7],cubes:[{origin:[-3,0,5.5],size:[6,4,3],uv:[20,11]}]},{name:"bodyLayer_2",parent:"bodyPart_1",pivot:[0,5,-1.5],cubes:[{origin:[-3,0,-3],size:[6,5,2],uv:[20,18]}]}]}},render_controllers:["controller.render.silverfish"],spawn_egg:{texture:"spawn_egg",texture_index:8}},skeleton:{identifier:"minecraft:skeleton",min_engine_version:"1.8.0",materials:{default:"skeleton"},textures:{default:"textures/entity/skeleton/skeleton"},geometry:{default:{texturewidth:64,textureheight:32,visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0,parent:"body"}]}},spawn_egg:{texture:"spawn_egg",texture_index:9},render_controllers:["controller.render.skeleton"],enable_attachables:!0},skeleton_horse:{identifier:"minecraft:skeleton_horse",textures:{base_brown:"textures/entity/horse/horse_brown",base_white:"textures/entity/horse/horse_white",base_chestnut:"textures/entity/horse/horse_chestnut",base_creamy:"textures/entity/horse/horse_creamy",base_black:"textures/entity/horse/horse_black",base_gray:"textures/entity/horse/horse_gray",base_darkbrown:"textures/entity/horse/horse_darkbrown",markings_none:"textures/entity/horse/horse_markings_none",markings_white:"textures/entity/horse/horse_markings_white",markings_whitefield:"textures/entity/horse/horse_markings_whitefield",markings_whitedots:"textures/entity/horse/horse_markings_whitedots",markings_blackdots:"textures/entity/horse/horse_markings_blackdots",mule:"textures/entity/horse/mule",donkey:"textures/entity/horse/donkey",skeleton:"textures/entity/horse/horse_skeleton",zombie:"textures/entity/horse/horse_zombie",armor_none:"textures/entity/horse/armor/horse_armor_none",armor_leather:"textures/entity/horse/armor/horse_armor_leather",armor_iron:"textures/entity/horse/armor/horse_armor_iron",armor_gold:"textures/entity/horse/armor/horse_armor_gold",armor_diamond:"textures/entity/horse/armor/horse_armor_diamond"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:3,visible_bounds_offset:[0,1,0],texturewidth:128,textureheight:128,bones:[{name:"Body",pivot:[0,13,9],rotation:[0,0,0],cubes:[{origin:[-5,11,-10],size:[10,10,24],uv:[0,34]}]},{name:"TailA",pivot:[0,21,14],rotation:[-65,0,0],cubes:[{origin:[-1,20,14],size:[2,2,3],uv:[44,0]}]},{name:"TailB",pivot:[0,21,14],rotation:[-65,0,0],cubes:[{origin:[-1.5,19,17],size:[3,4,7],uv:[38,7]}]},{name:"TailC",pivot:[0,21,14],rotation:[-80.34,0,0],cubes:[{origin:[-1.5,21.5,23],size:[3,4,7],uv:[24,3]}]},{name:"Leg1A",pivot:[4,15,11],rotation:[0,0,0],cubes:[{origin:[1.5,8,8.5],size:[4,9,5],uv:[78,29]}]},{name:"Leg1B",pivot:[4,8,11],rotation:[0,0,0],cubes:[{origin:[2,3,9.5],size:[3,5,3],uv:[78,43]}]},{name:"Leg1C",pivot:[4,8,11],rotation:[0,0,0],cubes:[{origin:[1.5,-.1,9],size:[4,3,4],uv:[78,51]}]},{name:"Leg2A",pivot:[-4,15,11],rotation:[0,0,0],cubes:[{origin:[-5.5,8,8.5],size:[4,9,5],uv:[96,29]}]},{name:"Leg2B",pivot:[-4,8,11],rotation:[0,0,0],cubes:[{origin:[-5,3,9.5],size:[3,5,3],uv:[96,43]}]},{name:"Leg2C",pivot:[-4,8,11],rotation:[0,0,0],cubes:[{origin:[-5.5,-.1,9],size:[4,3,4],uv:[96,51]}]},{name:"Leg3A",pivot:[4,15,-8],rotation:[0,0,0],cubes:[{origin:[2.1,8,-10.1],size:[3,8,4],uv:[44,29]}]},{name:"Leg3B",pivot:[4,8,-8],rotation:[0,0,0],cubes:[{origin:[2.1,3,-9.6],size:[3,5,3],uv:[44,41]}]},{name:"Leg3C",pivot:[4,8,-8],rotation:[0,0,0],cubes:[{origin:[1.6,-.1,-10.1],size:[4,3,4],uv:[44,51]}]},{name:"Leg4A",pivot:[-4,15,-8],rotation:[0,0,0],cubes:[{origin:[-5.1,8,-10.1],size:[3,8,4],uv:[60,29]}]},{name:"Leg4B",pivot:[-4,8,-8],rotation:[0,0,0],cubes:[{origin:[-5.1,3,-9.6],size:[3,5,3],uv:[60,41]}]},{name:"Leg4C",pivot:[-4,8,-8],rotation:[0,0,0],cubes:[{origin:[-5.6,-.1,-10.1],size:[4,3,4],uv:[60,51]}]},{name:"Head",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,25,-11.5],size:[5,5,7],uv:[0,0]}]},{name:"UMouth",pivot:[0,20.05,-10],rotation:[30,0,0],cubes:[{origin:[-2,27.05,-17],size:[4,3,6],uv:[24,18]}]},{name:"LMouth",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2,25,-16.5],size:[4,2,5],uv:[24,27]}]},{name:"Ear1",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[.45,29,-6],size:[2,3,1],uv:[0,0]}]},{name:"Ear2",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.45,29,-6],size:[2,3,1],uv:[0,0]}]},{name:"MuleEarL",pivot:[0,20,-10],rotation:[30,0,15],cubes:[{origin:[-2,29,-6],size:[2,7,1],uv:[0,12]}]},{name:"MuleEarR",pivot:[0,20,-10],rotation:[30,0,-15],cubes:[{origin:[0,29,-6],size:[2,7,1],uv:[0,12]}]},{name:"Neck",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.05,15.8,-12],size:[4,14,8],uv:[0,12]}]},{name:"Bag1",pivot:[-7.5,21,10],rotation:[0,90,0],cubes:[{origin:[-10.5,13,10],size:[8,8,3],uv:[0,34]}]},{name:"Bag2",pivot:[4.5,21,10],rotation:[0,90,0],cubes:[{origin:[1.5,13,10],size:[8,8,3],uv:[0,47]}]},{name:"Saddle",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-5,21,-1],size:[10,1,8],uv:[80,0]}]},{name:"SaddleB",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-1.5,22,-1],size:[3,1,2],uv:[106,9]}]},{name:"SaddleC",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-4,22,5],size:[8,1,2],uv:[80,9]}]},{name:"SaddleL2",pivot:[5,21,2],rotation:[0,0,0],cubes:[{origin:[4.5,13,1],size:[1,2,2],uv:[74,0]}]},{name:"SaddleL",pivot:[5,21,2],rotation:[0,0,0],cubes:[{origin:[4.5,15,1.5],size:[1,6,1],uv:[70,0]}]},{name:"SaddleR2",pivot:[-5,21,2],rotation:[0,0,0],cubes:[{origin:[-5.5,13,1],size:[1,2,2],uv:[74,4]}]},{name:"SaddleR",pivot:[-5,21,2],rotation:[0,0,0],cubes:[{origin:[-5.5,15,1.5],size:[1,6,1],uv:[80,0]}]},{name:"SaddleMouthL",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[1.5,26,-14],size:[1,2,2],uv:[74,13]}]},{name:"SaddleMouthR",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,26,-14],size:[1,2,2],uv:[74,13]}]},{name:"SaddleMouthLine",pivot:[0,20,-10],rotation:[0,0,0],cubes:[{origin:[2.6,23,-16],size:[0,3,16],uv:[44,10]}]},{name:"SaddleMouthLineR",pivot:[0,20,-10],rotation:[0,0,0],cubes:[{origin:[-2.6,23,-16],size:[0,3,16],uv:[44,5]}]},{name:"Mane",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-1,15.5,-5],size:[2,16,4],uv:[58,0]}]},{name:"HeadSaddle",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,25.1,-17],size:[5,5,12],uv:[80,12],inflate:.05}]}]}},spawn_egg:{texture:"spawn_egg",texture_index:32}},slime:{identifier:"minecraft:slime",materials:{default:"slime",outer:"slime_outer"},textures:{default:"textures/entity/slime/slime"},geometry:{default:{visible_bounds_width:5,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"cube",pivot:[0,24,0],cubes:[{origin:[-3,1,-3],size:[6,6,6],uv:[0,16]}]},{name:"eye0",parent:"cube",pivot:[0,24,0],cubes:[{origin:[-3.3,4,-3.5],size:[2,2,2],uv:[32,0]}]},{name:"eye1",parent:"cube",pivot:[0,24,0],cubes:[{origin:[1.3,4,-3.5],size:[2,2,2],uv:[32,4]}]},{name:"mouth",parent:"cube",pivot:[0,24,0],cubes:[{origin:[0,2,-3.5],size:[1,1,1],uv:[32,8]}]}]},armor:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"cube",pivot:[0,24,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0]}]},{name:"eye0",parent:"cube",pivot:[0,24,0],cubes:[{origin:[-3.3,4,-3.5],size:[2,2,2],uv:[32,0]}]},{name:"eye1",parent:"cube",pivot:[0,24,0],cubes:[{origin:[1.3,4,-3.5],size:[2,2,2],uv:[32,4]}]},{name:"mouth",parent:"cube",pivot:[0,24,0],cubes:[{origin:[0,2,-3.5],size:[1,1,1],uv:[32,8]}]}]}},render_controllers:["controller.render.slime","controller.render.slime_armor"],spawn_egg:{texture:"spawn_egg",texture_index:10}},small_fireball:{identifier:"minecraft:small_fireball",materials:{default:"fireball"},textures:{default:"textures/items/fire_charge"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},snow_golem:{identifier:"minecraft:snow_golem",min_engine_version:"1.8.0",materials:{default:"snow_golem",head:"snow_golem_pumpkin"},textures:{default:"textures/entity/snow_golem"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:2,visible_bounds_offset:[0,1,0],bones:[{name:"head",parent:"piece1",pivot:[0,20,0],locators:{lead:[0,20,0]},cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0],inflate:-.5}]},{name:"arm1",parent:"piece1",pivot:[0,18,0],bind_pose_rotation:[0,0,57.3],cubes:[{origin:[1,20,-1],size:[12,2,2],uv:[32,0],inflate:-.5}]},{name:"arm2",parent:"piece1",pivot:[0,18,0],bind_pose_rotation:[0,180,-57.3],cubes:[{origin:[1,20,-1],size:[12,2,2],uv:[32,0],inflate:-.5}]},{name:"piece1",parent:"piece2",pivot:[0,11,0],cubes:[{origin:[-5,11,-5],size:[10,10,10],uv:[0,16],inflate:-.5}]},{name:"piece2",pivot:[0,0,0],cubes:[{origin:[-6,0,-6],size:[12,12,12],uv:[0,36],inflate:-.5}]}]}},render_controllers:["controller.render.snowgolem"]},snowball:{identifier:"minecraft:snowball",materials:{default:"snowball"},textures:{default:"textures/items/snowball"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},potion:{identifier:"minecraft:splash_potion",materials:{default:"splash_potion_enchanted"},textures:{moveSlowdown:"textures/items/potion_bottle_splash_moveSlowdown",moveSpeed:"textures/items/potion_bottle_splash_moveSpeed",digSlowdown:"textures/items/potion_bottle_splash_digSlowdown",digSpeed:"textures/items/potion_bottle_splash_digSpeed",damageBoost:"textures/items/potion_bottle_splash_damageBoost",heal:"textures/items/potion_bottle_splash_heal",harm:"textures/items/potion_bottle_splash_harm",jump:"textures/items/potion_bottle_splash_jump",confusion:"textures/items/potion_bottle_splash_confusion",regeneration:"textures/items/potion_bottle_splash_regeneration",resistance:"textures/items/potion_bottle_splash_resistance",fireResistance:"textures/items/potion_bottle_splash_fireResistance",waterBreathing:"textures/items/potion_bottle_splash_waterBreathing",invisibility:"textures/items/potion_bottle_splash_invisibility",blindness:"textures/items/potion_bottle_splash_blindness",nightVision:"textures/items/potion_bottle_splash_nightVision",hunger:"textures/items/potion_bottle_splash_hunger",weakness:"textures/items/potion_bottle_splash_weakness",poison:"textures/items/potion_bottle_splash_poison",wither:"textures/items/potion_bottle_splash_wither",healthBoost:"textures/items/potion_bottle_splash_healthBoost",absorption:"textures/items/potion_bottle_splash_absorption",saturation:"textures/items/potion_bottle_splash_saturation",levitation:"textures/items/potion_bottle_splash_levitation",turtleMaster:"textures/items/potion_bottle_splash_turtleMaster",slowFall:"textures/items/potion_bottle_splash_slowFall",default:"textures/items/potion_bottle_splash",enchanted:"textures/misc/enchanted_item_glint"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.splash_potion"]},squid:{identifier:"minecraft:squid",materials:{default:"squid"},textures:{default:"textures/entity/squid"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",cubes:[{origin:[-6,-8,-6],size:[12,16,12],uv:[0,0]}]},{name:"tentacle1",parent:"body",pivot:[5,-7,0],cubes:[{origin:[4,-25,-1],size:[2,18,2],uv:[48,0]}],rotation:[0,90,0]},{name:"tentacle2",parent:"body",pivot:[3.5,-7,3.5],cubes:[{origin:[2.5,-25,2.5],size:[2,18,2],uv:[48,0]}],rotation:[0,45,0]},{name:"tentacle3",parent:"body",pivot:[0,-7,5],cubes:[{origin:[-1,-25,4],size:[2,18,2],uv:[48,0]}],rotation:[0,0,0]},{name:"tentacle4",parent:"body",pivot:[-3.5,-7,3.5],cubes:[{origin:[-4.5,-25,2.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-45,0]},{name:"tentacle5",parent:"body",pivot:[-5,-7,0],cubes:[{origin:[-6,-25,-1],size:[2,18,2],uv:[48,0]}],rotation:[0,-90,0]},{name:"tentacle6",parent:"body",pivot:[-3.5,-7,-3.5],cubes:[{origin:[-4.5,-25,-4.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-135,0]},{name:"tentacle7",parent:"body",pivot:[0,-7,-5],cubes:[{origin:[-1,-25,-6],size:[2,18,2],uv:[48,0]}],rotation:[0,-180,0]},{name:"tentacle8",parent:"body",pivot:[3.5,-7,-3.5],cubes:[{origin:[2.5,-25,-4.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-225,0]}]}},render_controllers:["controller.render.squid"],spawn_egg:{texture:"spawn_egg",texture_index:15}},stray:{identifier:"minecraft:stray",min_engine_version:"1.8.0",materials:{default:"stray",overlay:"stray_clothes"},textures:{default:"textures/entity/skeleton/stray",overlay:"textures/entity/skeleton/stray_overlay"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",pivot:[0,12,0]},{name:"head",pivot:[0,24,0],locators:{lead:[0,24,0]},cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0,parent:"body"}]},overlay:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",parent:"waist",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],inflate:.25},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],inflate:.25},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],inflate:.25},{name:"rightItem",parent:"rightArm",pivot:[-6,15,1],neverRender:!0},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,inflate:.25},{name:"rightLeg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],inflate:.25},{name:"leftLeg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],inflate:.25,mirror:!0}]}},spawn_egg:{texture:"spawn_egg",texture_index:27},render_controllers:["controller.render.stray_clothes","controller.render.stray"],enable_attachables:!0},strider:{identifier:"minecraft:strider",materials:{default:"strider"},textures:{default:"textures/entity/strider/strider",saddled:"textures/entity/strider/strider",suffocated:"textures/entity/strider/strider_cold",suffocated_saddled:"textures/entity/strider/strider_cold"},geometry:{default:{bones:[{name:"right_leg",pivot:[-4,16,0],cubes:[{origin:[-6,0,-2],size:[4,16,4],uv:[0,32]}]},{name:"left_leg",pivot:[4,16,0],cubes:[{origin:[2,0,-2],size:[4,16,4],uv:[0,55]}]},{name:"body",pivot:[0,16,0],cubes:[{origin:[-8,14,-8],size:[16,14,16],uv:[0,0]}],locators:{lead:[0,15,-1]}},{name:"bristle5",parent:"body",pivot:[8,19,0],cubes:[{origin:[8,19,-8],size:[12,0,16],pivot:[8,19,0],rotation:[0,0,70],uv:[16,65]}]},{name:"bristle4",parent:"body",pivot:[8,24,0],cubes:[{origin:[8,24,-8],size:[12,0,16],pivot:[8,24,0],rotation:[0,0,65],uv:[16,49]}]},{name:"bristle3",parent:"body",pivot:[8,28,0],cubes:[{origin:[8,28,-8],size:[12,0,16],pivot:[8,28,0],rotation:[0,0,50],uv:[16,33]}]},{name:"bristle2",parent:"body",pivot:[-8,28,0],cubes:[{origin:[-20,28,-8],size:[12,0,16],pivot:[-8,28,0],rotation:[0,0,-50],uv:[16,33],mirror:!0}]},{name:"bristle1",parent:"body",pivot:[-8,24,0],cubes:[{origin:[-20,24,-8],size:[12,0,16],pivot:[-8,24,0],rotation:[0,0,-65],uv:[16,49],mirror:!0}]},{name:"bristle0",parent:"body",pivot:[-8,19,0],cubes:[{origin:[-20,19,-8],size:[12,0,16],pivot:[-8,19,0],rotation:[0,0,-70],uv:[16,65],mirror:!0}]}],visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:128}},spawn_egg:{base_color:"#9c3436",overlay_color:"#4d494d"},render_controllers:["controller.render.strider"]},text_display:{identifier:"minecraft:text_display",geometry:{}},trident:{identifier:"minecraft:thrown_trident",textures:{default:"textures/entity/trident",loyalty_rope:"textures/entity/lead_knot"},geometry:{default:{texturewidth:32,textureheight:32,bones:[{name:"pole",pivot:[0,24,0],cubes:[{origin:[-.5,-3,-.5],size:[1,31,1],inflate:.01,uv:[0,0]},{origin:[-1.5,22,-.5],size:[3,2,1],uv:[4,0]},{origin:[-2.5,23,-.5],size:[1,4,1],uv:[4,3]},{origin:[1.5,23,-.5],size:[1,4,1],uv:[4,3]}]}]}}},tnt_minecart:{identifier:"minecraft:tnt_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},tropical_fish:{identifier:"minecraft:tropicalfish",materials:{default:"tropicalfish"},textures:{typeA:"textures/entity/fish/tropical_a",typeB:"textures/entity/fish/tropical_b",aPattern1:"textures/entity/fish/tropical_a_pattern_1",aPattern2:"textures/entity/fish/tropical_a_pattern_2",aPattern3:"textures/entity/fish/tropical_a_pattern_3",aPattern4:"textures/entity/fish/tropical_a_pattern_4",aPattern5:"textures/entity/fish/tropical_a_pattern_5",aPattern6:"textures/entity/fish/tropical_a_pattern_6",bPattern1:"textures/entity/fish/tropical_b_pattern_1",bPattern2:"textures/entity/fish/tropical_b_pattern_2",bPattern3:"textures/entity/fish/tropical_b_pattern_3",bPattern4:"textures/entity/fish/tropical_b_pattern_4",bPattern5:"textures/entity/fish/tropical_b_pattern_5",bPattern6:"textures/entity/fish/tropical_b_pattern_6"},geometry:{typeA:{visible_bounds_width:.5,visible_bounds_height:.5,bones:[{pivot:[-.5,0,0],cubes:[{origin:[-1,0,-3],size:[2,3,6],uv:[0,0]},{origin:[0,3,-2.9992],size:[0,4,6],uv:[10,-6]}],name:"body"},{pivot:[0,0,3],cubes:[{origin:[0,0,3],size:[0,3,4],uv:[24,-4]}],name:"tailfin",parent:"body"},{pivot:[.5,0,1],bind_pose_rotation:[0,-35,0],cubes:[{origin:[.336,0,-.10594],size:[2,2,0],uv:[2,12]}],name:"leftFin",parent:"body"},{pivot:[-.5,0,1],bind_pose_rotation:[0,35,0],cubes:[{origin:[-2.336,0,-.10594],size:[2,2,0],uv:[2,16]}],name:"rightFin",parent:"body"}],texturewidth:32,textureheight:32},typeB:{visible_bounds_width:.5,visible_bounds_height:.5,bones:[{pivot:[-.5,0,0],cubes:[{origin:[-1,0,-8e-4],size:[2,6,6],uv:[0,20]},{origin:[0,-5,-8e-4],size:[0,5,6],uv:[20,21]},{origin:[0,6,-8e-4],size:[0,5,6],uv:[20,10]}],name:"body"},{pivot:[0,0,6],cubes:[{origin:[0,8e-4,6],size:[0,6,5],uv:[21,16]}],name:"tailfin",parent:"body"},{pivot:[.5,0,1],bind_pose_rotation:[0,-35,0],cubes:[{origin:[2.05673,0,2.35152],size:[2,2,0],uv:[2,12]}],name:"leftFin",parent:"body"},{pivot:[-.5,0,1],bind_pose_rotation:[0,35,0],cubes:[{origin:[-4.05673,0,2.35152],size:[2,2,0],uv:[2,16]}],name:"rightFin",parent:"body"}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.tropicalfish"],spawn_egg:{texture:"spawn_egg",texture_index:44}},vindicator:{identifier:"minecraft:vindicator",min_engine_version:"1.8.0",materials:{default:"vindicator"},textures:{default:"textures/entity/illager/vindicator"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22]},{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]}]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],mirror:!0,cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,46]}]},{name:"rightItem",pivot:[-5.5,16,.5],neverRender:!0,parent:"rightArm"},{name:"leftArm",parent:"body",pivot:[5,22,0],mirror:!0,cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,46]}]}]}},spawn_egg:{texture:"spawn_egg",texture_index:39},render_controllers:["controller.render.vindicator"],enable_attachables:!0},wandering_trader:{identifier:"minecraft:wandering_trader",materials:{default:"wandering_trader"},textures:{default:"textures/entity/wandering_trader"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"helmet",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[32,0],inflate:.5}]},{name:"brim",parent:"head",pivot:[0,24,0],bind_pose_rotation:[-90,0,0],cubes:[{origin:[-8,16,-6],size:[16,16,1],uv:[30,47],inflate:.1}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",locators:{lead_hold:[0,40,0]},cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]},{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22],mirror:!0}]},{name:"held_item",parent:"arms",pivot:[0,0,0]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22],mirror:!0}]}]}},render_controllers:["controller.render.wandering_trader"],spawn_egg:{texture:"spawn_egg_wandering_trader"}},wither:{identifier:"minecraft:wither",min_engine_version:"1.8.0",materials:{default:"wither_boss",armor:"wither_boss_armor"},textures:{default:"textures/entity/wither/wither",armor_white:"textures/entity/wither/wither_armor",armor_blue:"textures/entity/wither/wither_armor",invulnerable:"textures/entity/wither/wither_invulnerable"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:4,visible_bounds_offset:[0,2,0],texturewidth:64,textureheight:64,bones:[{name:"upperBodyPart1",cubes:[{origin:[-10,17.1,-.5],size:[20,3,3],uv:[0,16]}]},{name:"upperBodyPart2",parent:"upperBodyPart1",pivot:[-2,17.1,-.5],cubes:[{origin:[-2,7.1,-.5],size:[3,10,3],uv:[0,22]},{origin:[-6,13.6,0],size:[11,2,2],uv:[24,22]},{origin:[-6,11.1,0],size:[11,2,2],uv:[24,22]},{origin:[-6,8.6,0],size:[11,2,2],uv:[24,22]}]},{name:"upperBodyPart3",parent:"upperBodyPart2",pivot:[0,24,0],cubes:[{origin:[0,18,0],size:[3,6,3],uv:[12,22]}]},{name:"head1",parent:"upperBodyPart1",pivot:[0,20,0],cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0]}]},{name:"head2",parent:"upperBodyPart1",pivot:[-9,18,-1],cubes:[{origin:[-12,18,-4],size:[6,6,6],uv:[32,0]}]},{name:"head3",parent:"upperBodyPart1",pivot:[9,18,-1],cubes:[{origin:[6,18,-4],size:[6,6,6],uv:[32,0]}]}]},armor:{visible_bounds_width:3,visible_bounds_height:4,visible_bounds_offset:[0,2,0],texturewidth:64,textureheight:64,bones:[{name:"upperBodyPart1",cubes:[{origin:[-10,17.1,-.5],size:[20,3,3],uv:[0,16]}],inflate:2},{name:"upperBodyPart2",parent:"upperBodyPart1",pivot:[-2,17.1,-.5],cubes:[{origin:[-2,7.1,-.5],size:[3,10,3],uv:[0,22]},{origin:[-6,13.6,0],size:[11,2,2],uv:[24,22]},{origin:[-6,11.1,0],size:[11,2,2],uv:[24,22]},{origin:[-6,8.6,0],size:[11,2,2],uv:[24,22]}],inflate:2},{name:"upperBodyPart3",parent:"upperBodyPart2",pivot:[0,24,0],cubes:[{origin:[0,18,0],size:[3,6,3],uv:[12,22]}],inflate:2},{name:"head1",parent:"upperBodyPart1",pivot:[0,20,0],cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0]}],inflate:2},{name:"head2",parent:"upperBodyPart1",pivot:[-9,18,-1],cubes:[{origin:[-12,18,-4],size:[6,6,6],uv:[32,0]}],inflate:2},{name:"head3",parent:"upperBodyPart1",pivot:[9,18,-1],cubes:[{origin:[6,18,-4],size:[6,6,6],uv:[32,0]}],inflate:2}]}},render_controllers:["controller.render.wither_boss","controller.render.wither_boss_armor_white","controller.render.wither_boss_armor_blue"]},wither_skeleton:{identifier:"minecraft:wither_skeleton",min_engine_version:"1.8.0",materials:{default:"skeleton"},textures:{default:"textures/entity/skeleton/wither_skeleton"},geometry:{default:{texturewidth:64,textureheight:32,visible_bounds_width:1.5,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],bones:[{name:"body",parent:"waist",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}]},{name:"waist",pivot:[0,12,0]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}]},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}]},{name:"rightItem",parent:"rightArm",pivot:[-1,-45,-5],neverRender:!0},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5],neverRender:!0},{name:"rightLeg",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}]},{name:"leftLeg",parent:"body",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0}]}},render_controllers:["controller.render.wither_skeleton"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:29}},wither_skull:{identifier:"minecraft:wither_skull",materials:{default:"wither_skull"},textures:{default:"textures/entity/wither/wither"},geometry:{default:{bones:[{name:"head",cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,35]}]}],visible_bounds_width:1,visible_bounds_height:1,texturewidth:64,textureheight:64}},render_controllers:["controller.render.wither_skull"]},zoglin:{identifier:"minecraft:zoglin",materials:{default:"zoglin"},textures:{default:"textures/entity/hoglin/zoglin"},geometry:{default:{bones:[{name:"body",pivot:[0,19,-3],cubes:[{origin:[-8,11,-7],size:[16,14,26],inflate:.02,uv:[1,1]},{origin:[0,22,-10],size:[0,10,19],inflate:.02,uv:[90,33]}],locators:{lead:[0,20,-5]}},{name:"head",parent:"body",pivot:[0,22,-5],rotation:[50,0,0],cubes:[{origin:[-7,21,-24],size:[14,6,19],uv:[61,1]},{origin:[-8,22,-19],size:[2,11,2],uv:[1,13]},{origin:[6,22,-19],size:[2,11,2],uv:[1,13]}]},{name:"right_ear",parent:"head",pivot:[-7,27,-7],rotation:[0,0,-50],cubes:[{origin:[-13,26,-10],size:[6,1,4],uv:[1,1]}]},{name:"left_ear",parent:"head",pivot:[7,27,-7],rotation:[0,0,50],cubes:[{origin:[7,26,-10],size:[6,1,4],uv:[1,6]}]},{name:"leg_back_right",pivot:[6,8,17],cubes:[{origin:[-8,0,13],size:[5,11,5],uv:[21,45]}]},{name:"leg_back_left",pivot:[-6,8,17],cubes:[{origin:[3,0,13],size:[5,11,5],uv:[0,45]}]},{name:"leg_front_right",pivot:[-6,12,-3],cubes:[{origin:[-8,0,-6],size:[6,14,6],uv:[66,42]}]},{name:"leg_front_left",pivot:[6,12,-3],cubes:[{origin:[2,0,-6],size:[6,14,6],uv:[41,42]}]}],visible_bounds_width:4,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:64}},spawn_egg:{base_color:"#c66e55",overlay_color:"#e6e6e6"},render_controllers:["controller.render.zoglin"]},zombie:{identifier:"minecraft:zombie",min_engine_version:"1.8.0",materials:{default:"zombie"},textures:{default:"textures/entity/zombie/zombie"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],mirror:!0,parent:"body"}]}},spawn_egg:{texture:"spawn_egg",texture_index:12},scripts:{pre_animation:["variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"]},animations:{humanoid_big_head:{loop:!0,bones:{head:{scale:1.4}}},look_at_target_default:{loop:!0,bones:{head:{relative_to:{rotation:"entity"},rotation:["query.target_x_rotation","query.target_y_rotation",0]}}},look_at_target_gliding:{loop:!0,bones:{head:{rotation:[-45,"query.target_y_rotation",0]}}},look_at_target_swimming:{loop:!0,bones:{head:{rotation:["math.lerp(query.target_x_rotation, -45.0, variable.swim_amount)","query.target_y_rotation",0]}}},move:{loop:!0,bones:{leftarm:{rotation:["variable.tcos0",0,0]},leftleg:{rotation:["variable.tcos0 * -1.4",0,0]},rightarm:{rotation:["-variable.tcos0",0,0]},rightleg:{rotation:["variable.tcos0 * 1.4",0,0]}}},"riding.arms":{loop:!0,bones:{leftarm:{rotation:[-36,0,0]},rightarm:{rotation:[-36,0,0]}}},"riding.legs":{loop:!0,bones:{leftleg:{rotation:["-72.0 - this","-18.0 - this","-this"]},rightleg:{rotation:["-72.0 - this","18.0 - this","-this"]}}},holding:{loop:!0,bones:{leftarm:{rotation:["variable.is_holding_left ? (-this * 0.5 - 18.0) : 0.0",0,0]},rightarm:{rotation:["variable.is_holding_right ? (-this * 0.5 - 18.0) : 0.0",0,0]}}},brandish_spear:{loop:!0,bones:{rightarm:{rotation:["this * -0.5 - 157.5 - 22.5 * variable.charge_amount","-this",0]}}},charging:{loop:!0,bones:{rightarm:{rotation:["22.5 * variable.charge_amount - this","-this",0]}}},"attack.rotations":{loop:!0,bones:{body:{rotation:[0,"math.sin(math.sqrt(variable.attack_time) * 360) * 11.46 - this",0]},leftarm:{rotation:["math.sin(math.sqrt(variable.attack_time) * 360) * 11.46",0,0]},rightarm:{rotation:["math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * (variable.is_brandishing_spear ? -1.0 : 1.0 )","variable.is_brandishing_spear ? 0.0 : (math.sin(math.sqrt(variable.attack_time) * 360) * 11.46) * 2.0",0]}}},sneaking:{loop:!0,bones:{body:{rotation:["0.5 - this",0,0]},head:{position:[0,1,0]},leftarm:{rotation:[72,0,0]},leftleg:{position:[0,-3,4]},rightarm:{rotation:[72,0,0]},rightleg:{position:[0,-3,4]}}},bob:{loop:!0,bones:{leftarm:{rotation:[0,0,"((math.cos(query.life_time * 103.2) * 2.865) + 2.865) *-1.0"]},rightarm:{rotation:[0,0,"(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},damage_nearby_mobs:{loop:!0,bones:{leftarm:{rotation:["-45.0-this","-this","-this"]},leftleg:{rotation:["45.0-this","-this","-this"]},rightarm:{rotation:["45.0-this","-this","-this"]},rightleg:{rotation:["-45.0-this","-this","-this"]}}},bow_and_arrow:{loop:!0,bones:{leftarm:{rotation:["query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation + 28.65","-(math.cos(query.life_time * 103.2) * 2.865) - 2.865"]},rightarm:{rotation:["query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation - 5.73","(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},use_item_progress:{loop:!0,bones:{rightarm:{rotation:["variable.use_item_startup_progress * -60.0 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -22.5 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -5.625 + variable.use_item_interval_progress * 11.25"]}}},zombie_attack_bare_hand:{loop:!0,bones:{leftarm:{rotation:["-90.0 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) - (math.sin(query.life_time * 76.776372) * 2.865) - this","5.73 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 0.6) - this","math.cos(query.life_time * 103.13244) * -2.865 - 2.865 - this"]},rightarm:{rotation:["90.0 * (variable.is_brandishing_spear - 1.0) - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) + (math.sin(query.life_time * 76.776372) * 2.865) - this","(math.sin(variable.attack_time * 180.0) * 57.3) * 0.6 - 5.73 - this","math.cos(query.life_time * 103.13244) * 2.865 + 2.865 - this"]}}},swimming:{loop:!0,bones:{body:{position:[0,"variable.swim_amount * -10.0 - this","variable.swim_amount * 9.0 - this"],rotation:["variable.swim_amount * (90.0 + query.target_x_rotation)",0,0]},leftarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) - (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, 14.325, variable.swim_amount) - (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},leftleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0 + 180.0) * 0.3, variable.swim_amount)",0,0]},rightarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) + (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, -14.325, variable.swim_amount) + (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},rightleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0) * 0.3, variable.swim_amount)",0,0]}}}},animation_controllers:{humanoid_baby_big_head:{initial_state:"default",states:{baby:{animations:["humanoid_big_head"],transitions:[{default:"!query.is_baby"}]},default:{transitions:[{baby:"query.is_baby"}]}}},look_at_target:{initial_state:"default",states:{default:{animations:["look_at_target_default"],transitions:[{gliding:"query.is_gliding"},{swimming:"query.is_swimming"}]},gliding:{animations:["look_at_target_gliding"],transitions:[{swimming:"query.is_swimming"},{default:"!query.is_gliding"}]},swimming:{animations:["look_at_target_swimming"],transitions:[{gliding:"query.is_gliding"},{default:"!query.is_swimming"}]}}},move:{initial_state:"default",states:{default:{animations:["move"]}}},riding:{initial_state:"default",states:{default:{transitions:[{riding:"query.is_riding"}]},riding:{animations:["riding.arms","riding.legs"],transitions:[{default:"!query.is_riding"}]}}},holding:{initial_state:"default",states:{default:{animations:["holding"]}}},brandish_spear:{initial_state:"default",states:{brandish_spear:{animations:["brandish_spear"],transitions:[{default:"!variable.is_brandishing_spear"}]},default:{transitions:[{brandish_spear:"variable.is_brandishing_spear"}]}}},charging:{initial_state:"default",states:{charging:{animations:["charging"],transitions:[{default:"!query.is_charging"}]},default:{transitions:[{charging:"query.is_charging"}]}}},attack:{initial_state:"default",states:{attacking:{animations:["attack.rotations"],transitions:[{default:"variable.attack_time < 0.0"}]},default:{transitions:[{attacking:"variable.attack_time >= 0.0"}]}}},sneaking:{initial_state:"default",states:{default:{transitions:[{sneaking:"query.is_sneaking"}]},sneaking:{animations:["sneaking"],transitions:[{default:"!query.is_sneaking"}]}}},bob:{initial_state:"default",states:{default:{animations:["bob"]}}},damage_nearby_mobs:{initial_state:"default",states:{damage_nearby_mobs:{animations:["damage_nearby_mobs"],transitions:[{default:"!variable.damage_nearby_mobs"}]},default:{transitions:[{damage_nearby_mobs:"variable.damage_nearby_mobs"}]}}},bow_and_arrow:{initial_state:"default",states:{bow_and_arrow:{animations:["bow_and_arrow"],transitions:[{default:"!query.has_target"}]},default:{transitions:[{bow_and_arrow:"query.has_target"}]}}},use_item_progress:{initial_state:"default",states:{default:{transitions:[{use_item_progress:"( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 )"}]},use_item_progress:{animations:["use_item_progress"],transitions:[{default:"( variable.use_item_interval_progress <= 0.0 ) && ( variable.use_item_startup_progress <= 0.0 )"}]}}},zombie_attack_bare_hand:{initial_state:"default",states:{default:{transitions:[{is_bare_hand:"variable.is_holding_left != 1.0"}]},is_bare_hand:{animations:["zombie_attack_bare_hand"],transitions:[{default:"variable.is_holding_left == 1.0"}]}}},swimming:{initial_state:"default",states:{default:{transitions:[{is_swimming:"variable.swim_amount > 0.0"}]},is_swimming:{animations:["swimming"],transitions:[{default:"variable.swim_amount <= 0.0"}]}}}},render_controllers:["controller.render.zombie"],enable_attachables:!0},zombified_piglin:{identifier:"minecraft:zombie_pigman",min_engine_version:"1.8.0",materials:{default:"zombie"},textures:{default:"textures/entity/piglin/zombified_piglin"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]},{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.25}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-5,24,-4],size:[10,8,8],uv:[0,0],inflate:-.02},{origin:[-2,24,-5],size:[4,4,1],uv:[31,1]},{origin:[2,24,-5],size:[1,2,1],uv:[2,4]},{origin:[-3,24,-5],size:[1,2,1],uv:[2,0]}],inflate:-.02},{name:"leftear",parent:"head",pivot:[5,30,0],rotation:[0,0,-30],cubes:[{origin:[4,25,-2],size:[1,5,4],uv:[51,6]}]},{name:"rightear",parent:"head",pivot:[-5,30,0],rotation:[0,0,30],cubes:[{origin:[-5,25,-2],size:[1,5,4],uv:[39,6]}]},{name:"hat",parent:"head",pivot:[0,24,0]},{name:"rightarm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]},{origin:[-8,12,-2],size:[4,12,4],uv:[40,32],inflate:.25}]},{name:"rightItem",parent:"rightarm",pivot:[-1,-45,-5]},{name:"leftarm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[32,48]},{origin:[4,12,-2],size:[4,12,4],uv:[48,48],inflate:.25}]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]},{name:"rightleg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,16]},{origin:[-4,0,-2],size:[4,12,4],uv:[0,32],inflate:.25}]},{name:"leftleg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[16,48]},{origin:[0,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]}],visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:64}},spawn_egg:{texture:"spawn_egg",texture_index:13},render_controllers:["controller.render.zombie_pigman"],enable_attachables:!0}};x();R();T();k();var Ae={};w5(Ae,{allay:()=>g3,arrow:()=>G3,axolotl:()=>b3,blaze:()=>y3,boat:()=>$3,camel:()=>w3,cat:()=>_3,chicken:()=>A3,cod:()=>E3,creeper:()=>x3,dolphin:()=>R3,ender_dragon:()=>k3,enderman:()=>T3,endermite:()=>M3,fox:()=>S3,frog:()=>C3,ghast:()=>P3,goat:()=>B3,guardian:()=>I3,horse:()=>H3,llama:()=>z3,minecart:()=>O3,parrot:()=>D3,piglin:()=>L3,pillager:()=>F3,rabbit:()=>U3,shulker:()=>W3,sniffer:()=>N3,spider:()=>V3,tadpole:()=>j3,turtle:()=>Y3,vex:()=>Q3,villager:()=>K3,warden:()=>J3,witch:()=>q3,wolf:()=>Z3,zombie_villager:()=>X3});x();R();T();k();var g3=`# Made in Blockbench 4.9.4
859
+ `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(e){!!e!="USE_DASH"in this.defines&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(e){!!e!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(t)}};var f3=new m3,h3=new m3,Pi=new La,r5=class extends Oa{constructor(t=new Zt,e=new Xt({color:Math.random()*16777215})){super(t,e),this.isWireframe=!0,this.type="Wireframe"}computeLineDistances(){let t=this.geometry,e=t.attributes.instanceStart,i=t.attributes.instanceEnd,n=new Float32Array(2*e.count);for(let o=0,a=0,v=e.count;o<v;o++,a+=2)f3.fromBufferAttribute(e,o),h3.fromBufferAttribute(i,o),n[a]=a===0?0:n[a-1],n[a+1]=n[a]+f3.distanceTo(h3);let s=new Da(n,2,1);return t.setAttribute("instanceDistanceStart",new u3(s,1,0)),t.setAttribute("instanceDistanceEnd",new u3(s,1,1)),this}onBeforeRender(t){let e=this.material.uniforms;e&&e.resolution&&(t.getViewport(Pi),this.material.uniforms.resolution.value.set(Pi.z,Pi.w))}};import{GLTFLoader as x7}from"three/examples/jsm/loaders/GLTFLoader.js";import R7 from"mc-assets/dist/other-textures/latest/entity/zombie/husk.png";import{Vec3 as r1}from"vec3";import k7 from"mc-assets/dist/other-textures/latest/entity/cat/ocelot.png";import T7 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/arrow.png";import M7 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/spectral_arrow.png";import S7 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/tipped_arrow.png";var p3={armor_stand:{identifier:"minecraft:armor_stand",min_engine_version:"1.8.0",materials:{default:"armor_stand"},textures:{default:"textures/entity/armorstand/wood"},geometry:{default:{bones:[{name:"baseplate",parent:"waist",cubes:[{origin:[-6,0,-6],size:[12,1,12],uv:[0,32]}]},{name:"waist",pivot:[0,12,0]},{name:"body",parent:"waist",pivot:[0,13,0],cubes:[{origin:[-6,21,-1.5],size:[12,3,3],uv:[0,26]},{origin:[-3,14,-1],size:[2,7,2],uv:[16,0]},{origin:[1,14,-1],size:[2,7,2],uv:[48,16]},{origin:[-4,12,-1],size:[8,2,2],uv:[0,48]}]},{name:"head",parent:"waist",pivot:[0,12,0],cubes:[{origin:[-1,24,-1],size:[2,7,2],uv:[0,0]}]},{name:"hat",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0]}]},{name:"leftarm",parent:"waist",mirror:!0,pivot:[5,10,0],cubes:[{origin:[5,12,-1],size:[2,12,2],uv:[32,16]}]},{name:"leftitem",parent:"leftarm",pivot:[1,-9,-5]},{name:"leftleg",parent:"waist",mirror:!0,pivot:[1.9,1,0],cubes:[{origin:[.9,1,-1],size:[2,11,2],uv:[40,16]}]},{name:"rightarm",parent:"waist",pivot:[-5,10,0],cubes:[{origin:[-7,12,-1],size:[2,12,2],uv:[24,0]}]},{name:"rightitem",parent:"rightarm",pivot:[-1,-9,-5]},{name:"rightleg",parent:"waist",pivot:[-1.9,1,0],cubes:[{origin:[-2.9,1,-1],size:[2,11,2],uv:[8,0]}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64}},render_controllers:["controller.render.armor_stand"],enable_attachables:!0},arrow:{identifier:"minecraft:arrow",materials:{default:"arrow"},textures:{default:"textures/entity/arrow"},geometry:{default:{bones:[{name:"body",pivot:[0,1,0],cubes:[{origin:[0,-2.5,-3],rotation:[0,0,45],size:[0,5,16],uv:{east:{uv:[0,0]}}},{origin:[0,-2.5,-3],rotation:[0,0,-45],size:[0,5,16],uv:{east:{uv:[0,0]}}},{origin:[-2.5,-2.5,12],rotation:[0,0,45],size:[5,5,0],uv:{south:{uv:[0,5]}}}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.arrow"]},bat:{_comment:"Wing tip mirror flags are swapped vs vanilla Bedrock model: our addCube() mirror implementation flips UVs in the opposite direction, so rightWingTip needs mirror=true and leftWingTip needs mirror=false to render correctly.",identifier:"minecraft:bat",materials:{default:"bat"},textures:{default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAALHSURBVHja7VrBSiQxFJybHvci6G1gF2TBwyoKelnWy55kWYS9ePDmD+in+KcevLb7GgpqipeeTkzPpGdewSNJmx6nKtXJS3oWiwTOv33pbs6Ou9vr731YHddQ5/ZiAHa/9cXnjLln62DyLALIL48P+4AIQ+RZAP2cnO909/PH4uvRQcdh1zSqwCMPIiDPIqwT8uHufMVJuDfnOxnhq9OT7vHPZR9WZxEgSjUBUi7IcQBG++XpphfB6rgvVwCQ//f7og8WAeL8F6Kr6oD7X8s+PPuOmQNYAAsIUOIAkDeSLIK1LeCMagIweZQ8iRkBlJuYl5gwSlxjZ2R9KM/2XBphsyxEQGhfOCEVNQXQ0UZdo2i21+edR57DmxjZFRpTCaD2/7QAXsAFcEKq3zYEGHJBtgCeC97f3vtnG0uY1e1aavQ3/QgMuaBoDtCsDyWv3yqSlxhpTClAygXZArAILIaS8ezOo52TIJVA1/sqAswRnhCfEoAnuqGkZwpbZxJfyflTQuysAN7GxxNiZ62fEoCFMBGqpcK8h8ckqIkRoiU3VPkHIM/2R4rMaTLK0pGr9oVrw9v7Iy/QDLFEAH5umxTAW9utreTHOuD1+e/KaQ4mrGrb1ykE0L07HODFmKMsJs1b2GYfAc0MdYPEThiTvIA8DjWayNxSs3pJePPDOvJNCKDL27r22L95AlRJXaewuh57cVuPx7Acen1VlNkIoKR0++udCer84PXn42wj660EW38BooS99rqTn1R/FkCTnibyAH3l5bW9GOqjx+Wa8TWVCXpn/NzW63oIote1bH6HlSKUK0BKkFkIgDSX01+taz9+vTV0X/MC6Hu+1OFmSb9tHp6MRopIrQgBAjMDtr2bfOvb3KTIP2vZy9HnvH6vXJD6ZdheOYAJl/yOZ/YCMOFYygKBQCAQCAQCgUAgEAgEAoFAIBDYKXwAXSs8dJ1Ggb4AAAAASUVORK5CYII="},geometry:{default:{texturewidth:64,textureheight:64,visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],bones:[{name:"head",pivot:[0,24,0],cubes:[{origin:[-3,21,-3],size:[6,6,6],uv:[0,0]}]},{name:"rightEar",pivot:[0,24,0],cubes:[{origin:[-4,26,-2],size:[3,4,1],uv:[24,0]}],parent:"head"},{name:"leftEar",mirror:!0,pivot:[0,24,0],cubes:[{origin:[1,26,-2],size:[3,4,1],uv:[24,0]}],parent:"head"},{name:"body",pivot:[0,24,0],cubes:[{origin:[-3,8,-3],size:[6,12,6],uv:[0,16]},{origin:[-5,-8,0],size:[10,16,1],uv:[0,34]}]},{name:"rightWing",pivot:[0,24,0],cubes:[{origin:[-12,7,1.5],size:[10,16,1],uv:[42,0]}],parent:"body"},{name:"rightWingTip",mirror:!0,pivot:[-12,23,1.5],cubes:[{origin:[-20,10,1.5],size:[8,12,1],uv:[24,16]}],parent:"rightWing"},{name:"leftWing",mirror:!0,pivot:[0,24,0],cubes:[{origin:[2,7,1.5],size:[10,16,1],uv:[42,0]}],parent:"body"},{name:"leftWingTip",pivot:[12,23,1.5],cubes:[{origin:[12,10,1.5],size:[8,12,1],uv:[24,16]}],parent:"leftWing"}]}},render_controllers:["controller.render.bat"],spawn_egg:{texture:"spawn_egg",texture_index:18}},bee:{identifier:"minecraft:bee",materials:{default:"bee"},textures:{default:"textures/entity/bee/bee",angry:"textures/entity/bee/bee_angry",nectar:"textures/entity/bee/bee_nectar",angry_nectar:"textures/entity/bee/bee_angry_nectar"},geometry:{default:{texturewidth:64,textureheight:64,visible_bounds_width:1.5,visible_bounds_height:1.5,visible_bounds_offset:[0,.25,0],bones:[{name:"body",pivot:[.5,5,0],cubes:[{origin:[-3,2,-5],size:[7,7,10],uv:[0,0]},{origin:[2,7,-8],size:[1,2,3],uv:[2,0]},{origin:[-2,7,-8],size:[1,2,3],uv:[2,3]}],locators:{lead:[0,4,-1]}},{name:"stinger",parent:"body",pivot:[.5,6,1],cubes:[{origin:[.5,5,5],size:[0,1,2],uv:[26,7]}]},{name:"rightwing_bone",parent:"body",pivot:[-1,9,-3],rotation:[15,-15,0],cubes:[{origin:[-10,9,-3],size:[9,0,6],uv:[0,18]}]},{name:"leftwing_bone",parent:"body",pivot:[2,9,-3],rotation:[15,15,0],cubes:[{origin:[2,9,-3],size:[9,0,6],uv:[9,24]}]},{name:"leg_front",parent:"body",pivot:[2,2,-2],cubes:[{origin:[-3,0,-2],size:[7,2,0],uv:[26,1]}]},{name:"leg_mid",parent:"body",pivot:[2,2,0],cubes:[{origin:[-3,0,0],size:[7,2,0],uv:[26,3]}]},{name:"leg_back",parent:"body",pivot:[2,2,2],cubes:[{origin:[-3,0,2],size:[7,2,0],uv:[26,5]}]}]}},particle_effects:{nectar_dripping:"minecraft:nectar_drip_particle"},render_controllers:["controller.render.bee"],spawn_egg:{texture:"egg_bee",texture_index:0}},cave_spider:{identifier:"minecraft:cave_spider",min_engine_version:"1.8.0",materials:{default:"spider",invisible:"spider_invisible"},textures:{default:"textures/entity/spider/cave_spider"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"head",pivot:[0,9,-3],cubes:[{origin:[-4,5,-11],size:[8,8,8],uv:[32,4]}],parent:"body0"},{name:"body0",pivot:[0,9,0],cubes:[{origin:[-3,6,-3],size:[6,6,6],uv:[0,0]}]},{name:"body1",pivot:[0,9,9],cubes:[{origin:[-5,5,3],size:[10,8,12],uv:[0,12]}],parent:"body0"},{name:"leg0",pivot:[-4,9,2],cubes:[{origin:[-19,8,1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg1",pivot:[4,9,2],cubes:[{origin:[3,8,1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg2",pivot:[-4,9,1],cubes:[{origin:[-19,8,0],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg3",pivot:[4,9,1],cubes:[{origin:[3,8,0],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg4",pivot:[-4,9,0],cubes:[{origin:[-19,8,-1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg5",pivot:[4,9,0],cubes:[{origin:[3,8,-1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg6",pivot:[-4,9,-1],cubes:[{origin:[-19,8,-2],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg7",pivot:[4,9,-1],cubes:[{origin:[3,8,-2],size:[16,2,2],uv:[18,0]}],parent:"body0"}]}},render_controllers:["controller.render.spider"],spawn_egg:{texture:"spawn_egg",texture_index:22}},chest_minecart:{identifier:"minecraft:chest_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},command_block_minecart:{identifier:"minecraft:command_block_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},cow:{identifier:"minecraft:cow",min_engine_version:"1.8.0",materials:{default:"cow"},textures:{default:"textures/entity/cow/cow"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.75,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-6,11,-5],size:[12,18,10],uv:[18,4]},{origin:[-2,11,-6],size:[4,6,1],uv:[52,0]}]},{name:"head",parent:"body",pivot:[0,20,-8],locators:{lead:[0,20,-8]},cubes:[{origin:[-4,16,-14],size:[8,8,6],uv:[0,0]},{origin:[-5,22,-12],size:[1,3,1],uv:[22,0]},{origin:[4,22,-12],size:[1,3,1],uv:[22,0]}]},{name:"leg0",parent:"body",pivot:[-4,12,7],cubes:[{origin:[-6,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[4,12,7],cubes:[{origin:[2,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-4,12,-6],cubes:[{origin:[-6,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[4,12,-6],cubes:[{origin:[2,0,-7],size:[4,12,4],uv:[0,16]}]}]}},render_controllers:["controller.render.cow"],spawn_egg:{texture:"spawn_egg",texture_index:1}},dragon_fireball:{identifier:"minecraft:dragon_fireball",materials:{default:"fireball"},textures:{default:"textures/entity/enderdragon/dragon_fireball"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},drowned:{identifier:"minecraft:drowned",min_engine_version:"1.16.0",materials:{default:"drowned"},textures:{default:"textures/entity/zombie/drowned"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}]},{name:"jacket",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.5}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0],inflate:.5}]},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:1}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-7,12,-2],size:[4,12,4],uv:[0,16]}]},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16],mirror:!0}]},{name:"rightSleeve",parent:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-7,12,-2],size:[4,12,4],uv:[48,48],inflate:.5}]},{name:"leftSleeve",parent:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,32],inflate:.5,mirror:!0}]},{name:"rightLeg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4.05,0,-2],size:[4,12,4],uv:[16,48]}]},{name:"leftLeg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[.05,0,-2],size:[4,12,4],uv:[32,48],mirror:!0}]},{name:"rightPants",parent:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-4.25,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]},{name:"leftPants",parent:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[.25,0,-2],size:[4,12,4],uv:[0,32],inflate:.25,mirror:!0}]},{name:"waist",parent:"body",pivot:[0,12,0]},{name:"rightItem",parent:"rightArm",pivot:[-1,-45,-5]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]}],visible_bounds_width:2.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64}},render_controllers:["controller.render.drowned"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:48}},egg:{identifier:"minecraft:egg",materials:{default:"egg"},textures:{default:"textures/items/egg"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},elder_guardian:{identifier:"minecraft:elder_guardian",min_engine_version:"1.8.0",materials:{default:"guardian",ghost:"guardian_ghost"},textures:{default:"textures/entity/guardian",elder:"textures/entity/guardian_elder",beam:"textures/entity/guardian_beam"},geometry:{default:{visible_bounds_width:3.5,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,0,0],mirror:!0,cubes:[{mirror:!1,origin:[-6,2,-8],size:[12,12,16],uv:[0,0]},{mirror:!1,origin:[-8,2,-6],size:[2,12,12],uv:[0,28]},{origin:[6,2,-6],size:[2,12,12],uv:[0,28]},{origin:[-6,14,-6],size:[12,2,12],uv:[16,40]},{origin:[-6,0,-6],size:[12,2,12],uv:[16,40]}]},{name:"eye",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,6,0],size:[2,2,1],uv:[8,0]}]},{name:"tailpart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-2,6,7],size:[4,4,8],uv:[40,0]}]},{name:"tailpart1",parent:"tailpart0",pivot:[0,24,0],cubes:[{origin:[0,7,0],size:[3,3,7],uv:[0,54]}]},{name:"tailpart2",parent:"tailpart1",pivot:[0,24,0],cubes:[{origin:[0,8,0],size:[2,2,6],uv:[41,32]},{origin:[1,4.5,3],size:[1,9,9],uv:[25,19]}]},{name:"spikepart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart1",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart2",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart3",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart4",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart5",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart6",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart7",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart8",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart9",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart10",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart11",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]}]},ghost:{visible_bounds_width:3.5,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,24,0],mirror:!0,cubes:[{mirror:!1,origin:[-6,2,-8],size:[12,12,16],uv:[0,0]},{mirror:!1,origin:[-8,2,-6],size:[2,12,12],uv:[0,28]},{origin:[6,2,-6],size:[2,12,12],uv:[0,28]},{origin:[-6,14,-6],size:[12,2,12],uv:[16,40]},{origin:[-6,0,-6],size:[12,2,12],uv:[16,40]}]},{name:"eye",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,7,0],size:[2,2,1],uv:[8,0]}]},{name:"tailpart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-2,6,7],size:[4,4,8],uv:[40,0]}]},{name:"tailpart1",parent:"tailpart0",pivot:[0,24,0],cubes:[{origin:[0,7,0],size:[3,3,7],uv:[0,54]}]},{name:"tailpart2",parent:"tailpart1",pivot:[0,24,0],cubes:[{origin:[0,8,0],size:[2,2,6],uv:[41,32]},{origin:[1,4.5,3],size:[1,9,9],uv:[25,19]}]},{name:"spikepart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart1",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart2",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart3",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart4",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart5",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart6",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart7",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart8",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart9",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart10",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart11",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]}]}},render_controllers:["controller.render.guardian"],spawn_egg:{texture:"spawn_egg",texture_index:36}},eye_of_ender:{identifier:"minecraft:eye_of_ender_signal",materials:{default:"eye_of_ender_signal"},textures:{default:"textures/items/ender_eye"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},ender_pearl:{identifier:"minecraft:ender_pearl",materials:{default:"ender_pearl"},textures:{default:"textures/items/ender_pearl"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},evoker_fangs:{identifier:"minecraft:evocation_fang",materials:{default:"fang"},textures:{default:"textures/entity/illager/evoker_fangs"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:64,textureheight:32,bones:[{name:"upper_jaw",parent:"base",pivot:[0,11,0],cubes:[{origin:[-1.5,0,-4],size:[4,14,8],uv:[40,0],inflate:.01}]},{name:"lower_jaw",parent:"base",pivot:[0,11,0],bind_pose_rotation:[0,180,0],cubes:[{origin:[-1.5,0,-4],size:[4,14,8],uv:[40,0]}]},{name:"base",pivot:[0,0,0],bind_pose_rotation:[0,90,0],cubes:[{origin:[-5,0,-5],size:[10,12,10],uv:[0,0]}]}]}},render_controllers:["controller.render.evocation_fang"]},evoker:{identifier:"minecraft:evocation_illager",min_engine_version:"1.8.0",materials:{default:"evoker"},textures:{default:"textures/entity/illager/evoker"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22]},{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]}]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],mirror:!0,cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],locators:{right_hand:[-6,12,0]},cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,46]}]},{name:"rightItem",pivot:[-5.5,16,.5],neverRender:!0,parent:"rightArm"},{name:"leftArm",parent:"body",pivot:[5,22,0],locators:{left_hand:[6,12,0]},mirror:!0,cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,46]}]}]}},particle_effects:{spell:"minecraft:evoker_spell"},render_controllers:["controller.render.evoker"],spawn_egg:{texture:"spawn_egg",texture_index:40}},experience_bottle:{identifier:"minecraft:xp_bottle",materials:{default:"xp_bottle"},textures:{default:"textures/items/experience_bottle",enchanted:"textures/misc/enchanted_item_glint"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.experience_bottle"]},experience_orb:{identifier:"minecraft:xp_orb",materials:{default:"experience_orb"},textures:{default:"textures/entity/experience_orb"},geometry:{default:{bones:[{name:"body",pivot:[8,8,0],cubes:[{origin:[0,0,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:64,textureheight:64}},render_controllers:["controller.render.experience_orb"]},fireball:{identifier:"minecraft:fireball",materials:{default:"fireball"},textures:{default:"textures/items/fire_charge"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},firework_rocket:{identifier:"minecraft:fireworks_rocket",materials:{default:"fireworks_rocket"},textures:{default:"textures/entity/fireworks"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],rotation:[0,90,0],size:[16,16,0],uv:{north:{uv:[0,0]}}},{origin:[-8,-8,0],rotation:[90,90,0],size:[16,16,0],uv:{north:{uv:[0,0]}}}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.fireworks_rocket"]},fishing_bobber:{identifier:"minecraft:fishing_hook",materials:{default:"fishing_hook"},textures:{default:"textures/entity/fishing_hook"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-1.5,-1.5,-1.5],size:[3,3,3],rotation:[0,0,180],uv:{up:{uv:[0,0]},down:{uv:[3,0]},south:{uv:[9,0],uv_size:[-3,3]},north:{uv:[9,0]},east:{uv:[12,0]},west:{uv:[15,0]}}},{origin:[0,-4.5,-.5],size:[0,3,3],uv:{east:{uv:[18,0]}}},{origin:[0,1.5,-1.5],size:[0,3,3],uv:{east:{uv:[21,0]}}},{origin:[-1.5,1.5,0],size:[3,3,0],uv:{north:{uv:[21,0]}}}]}],texturewidth:24,textureheight:3}},render_controllers:["controller.render.fishing_hook"]},hoglin:{identifier:"minecraft:hoglin",materials:{default:"hoglin"},textures:{default:"textures/entity/hoglin/hoglin"},geometry:{default:{bones:[{name:"body",pivot:[0,19,-3],cubes:[{origin:[-8,11,-7],size:[16,14,26],inflate:.02,uv:[1,1]},{origin:[0,22,-10],size:[0,10,19],inflate:.02,uv:[90,33]}],locators:{lead:[0,20,-5]}},{name:"head",parent:"body",pivot:[0,22,-5],rotation:[50,0,0],cubes:[{origin:[-7,21,-24],size:[14,6,19],uv:[61,1]},{origin:[-8,22,-19],size:[2,11,2],uv:[1,13]},{origin:[6,22,-19],size:[2,11,2],uv:[1,13]}]},{name:"right_ear",parent:"head",pivot:[-7,27,-7],rotation:[0,0,-50],cubes:[{origin:[-13,26,-10],size:[6,1,4],uv:[1,1]}]},{name:"left_ear",parent:"head",pivot:[7,27,-7],rotation:[0,0,50],cubes:[{origin:[7,26,-10],size:[6,1,4],uv:[1,6]}]},{name:"leg_back_right",pivot:[6,8,17],cubes:[{origin:[-8,0,13],size:[5,11,5],uv:[21,45]}]},{name:"leg_back_left",pivot:[-6,8,17],cubes:[{origin:[3,0,13],size:[5,11,5],uv:[0,45]}]},{name:"leg_front_right",pivot:[-6,12,-3],cubes:[{origin:[-8,0,-6],size:[6,14,6],uv:[66,42]}]},{name:"leg_front_left",pivot:[6,12,-3],cubes:[{origin:[2,0,-6],size:[6,14,6],uv:[41,42]}]}],visible_bounds_width:4,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:64}},spawn_egg:{base_color:"#C66E55",overlay_color:"#5f6464"},render_controllers:["controller.render.hoglin"]},hopper_minecart:{identifier:"minecraft:hopper_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},husk:{identifier:"minecraft:husk",min_engine_version:"1.8.0",materials:{default:"husk"},textures:{default:"textures/entity/zombie/husk"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],mirror:!0,parent:"body"}]}},scripts:{pre_animation:["variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"]},animations:{humanoid_big_head:{loop:!0,bones:{head:{scale:1.4}}},look_at_target_default:{loop:!0,bones:{head:{relative_to:{rotation:"entity"},rotation:["query.target_x_rotation","query.target_y_rotation",0]}}},look_at_target_gliding:{loop:!0,bones:{head:{rotation:[-45,"query.target_y_rotation",0]}}},look_at_target_swimming:{loop:!0,bones:{head:{rotation:["math.lerp(query.target_x_rotation, -45.0, variable.swim_amount)","query.target_y_rotation",0]}}},move:{loop:!0,bones:{leftarm:{rotation:["variable.tcos0",0,0]},leftleg:{rotation:["variable.tcos0 * -1.4",0,0]},rightarm:{rotation:["-variable.tcos0",0,0]},rightleg:{rotation:["variable.tcos0 * 1.4",0,0]}}},"riding.arms":{loop:!0,bones:{leftarm:{rotation:[-36,0,0]},rightarm:{rotation:[-36,0,0]}}},"riding.legs":{loop:!0,bones:{leftleg:{rotation:["-72.0 - this","-18.0 - this","-this"]},rightleg:{rotation:["-72.0 - this","18.0 - this","-this"]}}},holding:{loop:!0,bones:{leftarm:{rotation:["variable.is_holding_left ? (-this * 0.5 - 18.0) : 0.0",0,0]},rightarm:{rotation:["variable.is_holding_right ? (-this * 0.5 - 18.0) : 0.0",0,0]}}},brandish_spear:{loop:!0,bones:{rightarm:{rotation:["this * -0.5 - 157.5 - 22.5 * variable.charge_amount","-this",0]}}},charging:{loop:!0,bones:{rightarm:{rotation:["22.5 * variable.charge_amount - this","-this",0]}}},"attack.rotations":{loop:!0,bones:{body:{rotation:[0,"math.sin(math.sqrt(variable.attack_time) * 360) * 11.46 - this",0]},leftarm:{rotation:["math.sin(math.sqrt(variable.attack_time) * 360) * 11.46",0,0]},rightarm:{rotation:["math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * (variable.is_brandishing_spear ? -1.0 : 1.0 )","variable.is_brandishing_spear ? 0.0 : (math.sin(math.sqrt(variable.attack_time) * 360) * 11.46) * 2.0",0]}}},sneaking:{loop:!0,bones:{body:{rotation:["0.5 - this",0,0]},head:{position:[0,1,0]},leftarm:{rotation:[72,0,0]},leftleg:{position:[0,-3,4]},rightarm:{rotation:[72,0,0]},rightleg:{position:[0,-3,4]}}},bob:{loop:!0,bones:{leftarm:{rotation:[0,0,"((math.cos(query.life_time * 103.2) * 2.865) + 2.865) *-1.0"]},rightarm:{rotation:[0,0,"(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},damage_nearby_mobs:{loop:!0,bones:{leftarm:{rotation:["-45.0-this","-this","-this"]},leftleg:{rotation:["45.0-this","-this","-this"]},rightarm:{rotation:["45.0-this","-this","-this"]},rightleg:{rotation:["-45.0-this","-this","-this"]}}},bow_and_arrow:{loop:!0,bones:{leftarm:{rotation:["query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation + 28.65","-(math.cos(query.life_time * 103.2) * 2.865) - 2.865"]},rightarm:{rotation:["query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation - 5.73","(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},use_item_progress:{loop:!0,bones:{rightarm:{rotation:["variable.use_item_startup_progress * -60.0 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -22.5 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -5.625 + variable.use_item_interval_progress * 11.25"]}}},zombie_attack_bare_hand:{loop:!0,bones:{leftarm:{rotation:["-90.0 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) - (math.sin(query.life_time * 76.776372) * 2.865) - this","5.73 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 0.6) - this","math.cos(query.life_time * 103.13244) * -2.865 - 2.865 - this"]},rightarm:{rotation:["90.0 * (variable.is_brandishing_spear - 1.0) - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) + (math.sin(query.life_time * 76.776372) * 2.865) - this","(math.sin(variable.attack_time * 180.0) * 57.3) * 0.6 - 5.73 - this","math.cos(query.life_time * 103.13244) * 2.865 + 2.865 - this"]}}},swimming:{loop:!0,bones:{body:{position:[0,"variable.swim_amount * -10.0 - this","variable.swim_amount * 9.0 - this"],rotation:["variable.swim_amount * (90.0 + query.target_x_rotation)",0,0]},leftarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) - (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, 14.325, variable.swim_amount) - (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},leftleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0 + 180.0) * 0.3, variable.swim_amount)",0,0]},rightarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) + (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, -14.325, variable.swim_amount) + (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},rightleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0) * 0.3, variable.swim_amount)",0,0]}}}},animation_controllers:{humanoid_baby_big_head:{initial_state:"default",states:{baby:{animations:["humanoid_big_head"],transitions:[{default:"!query.is_baby"}]},default:{transitions:[{baby:"query.is_baby"}]}}},look_at_target:{initial_state:"default",states:{default:{animations:["look_at_target_default"],transitions:[{gliding:"query.is_gliding"},{swimming:"query.is_swimming"}]},gliding:{animations:["look_at_target_gliding"],transitions:[{swimming:"query.is_swimming"},{default:"!query.is_gliding"}]},swimming:{animations:["look_at_target_swimming"],transitions:[{gliding:"query.is_gliding"},{default:"!query.is_swimming"}]}}},move:{initial_state:"default",states:{default:{animations:["move"]}}},riding:{initial_state:"default",states:{default:{transitions:[{riding:"query.is_riding"}]},riding:{animations:["riding.arms","riding.legs"],transitions:[{default:"!query.is_riding"}]}}},holding:{initial_state:"default",states:{default:{animations:["holding"]}}},brandish_spear:{initial_state:"default",states:{brandish_spear:{animations:["brandish_spear"],transitions:[{default:"!variable.is_brandishing_spear"}]},default:{transitions:[{brandish_spear:"variable.is_brandishing_spear"}]}}},charging:{initial_state:"default",states:{charging:{animations:["charging"],transitions:[{default:"!query.is_charging"}]},default:{transitions:[{charging:"query.is_charging"}]}}},attack:{initial_state:"default",states:{attacking:{animations:["attack.rotations"],transitions:[{default:"variable.attack_time < 0.0"}]},default:{transitions:[{attacking:"variable.attack_time >= 0.0"}]}}},sneaking:{initial_state:"default",states:{default:{transitions:[{sneaking:"query.is_sneaking"}]},sneaking:{animations:["sneaking"],transitions:[{default:"!query.is_sneaking"}]}}},bob:{initial_state:"default",states:{default:{animations:["bob"]}}},damage_nearby_mobs:{initial_state:"default",states:{damage_nearby_mobs:{animations:["damage_nearby_mobs"],transitions:[{default:"!variable.damage_nearby_mobs"}]},default:{transitions:[{damage_nearby_mobs:"variable.damage_nearby_mobs"}]}}},bow_and_arrow:{initial_state:"default",states:{bow_and_arrow:{animations:["bow_and_arrow"],transitions:[{default:"!query.has_target"}]},default:{transitions:[{bow_and_arrow:"query.has_target"}]}}},use_item_progress:{initial_state:"default",states:{default:{transitions:[{use_item_progress:"( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 )"}]},use_item_progress:{animations:["use_item_progress"],transitions:[{default:"( variable.use_item_interval_progress <= 0.0 ) && ( variable.use_item_startup_progress <= 0.0 )"}]}}},zombie_attack_bare_hand:{initial_state:"default",states:{default:{transitions:[{is_bare_hand:"variable.is_holding_left != 1.0"}]},is_bare_hand:{animations:["zombie_attack_bare_hand"],transitions:[{default:"variable.is_holding_left == 1.0"}]}}},swimming:{initial_state:"default",states:{default:{transitions:[{is_swimming:"variable.swim_amount > 0.0"}]},is_swimming:{animations:["swimming"],transitions:[{default:"variable.swim_amount <= 0.0"}]}}}},render_controllers:["controller.render.husk"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:28}},iron_golem:{identifier:"minecraft:iron_golem",materials:{default:"iron_golem"},textures:{default:"textures/entity/iron_golem/iron_golem"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:128,bones:[{name:"body",pivot:[0,31,0],cubes:[{origin:[-9,21,-6],size:[18,12,11],uv:[0,40]},{origin:[-4.5,16,-3],size:[9,5,6],uv:[0,70],inflate:.5}]},{name:"head",parent:"body",pivot:[0,31,-2],locators:{lead:[0,31,-2]},cubes:[{origin:[-4,33,-7.5],size:[8,10,8],uv:[0,0]},{origin:[-1,32,-9.5],size:[2,4,2],uv:[24,0]}]},{name:"arm0",parent:"body",pivot:[0,31,0],cubes:[{origin:[-13,3.5,-3],size:[4,30,6],uv:[60,21]}]},{name:"arm1",parent:"body",pivot:[0,31,0],cubes:[{origin:[9,3.5,-3],size:[4,30,6],uv:[60,58]}]},{name:"leg0",parent:"body",pivot:[-4,13,0],cubes:[{origin:[-7.5,0,-3],size:[6,16,5],uv:[37,0]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[5,13,0],cubes:[{origin:[1.5,0,-3],size:[6,16,5],uv:[60,0]}]}]}},render_controllers:["controller.render.iron_golem"]},item_frame:{identifier:"minecraft:item_frame",materials:{default:"item_frame"},textures:{background:"block:item_frame",frame:"block:oak_planks"},geometry:{background:{bones:[{name:"base"},{name:"background",parent:"base",rotation:[0,180,0],pivot:[0,0,0],cubes:[{origin:[-5,-5,-8],size:[10,10,.5],uv:[3,3]}]}],texturewidth:16,textureheight:16},frame:{bones:[{name:"frame",parent:"base",rotation:[0,180,0],pivot:[0,0,0],cubes:[{origin:[-6,-6,-8],size:[12,1,1],uv:[2,2]},{origin:[-6,5,-8],size:[12,1,1],uv:[2,13]},{origin:[-6,-5,-8],size:[1,10,1],uv:[2,3]},{origin:[5,-5,-8],size:[1,10,1],uv:[13,3]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_frame"]},leash_knot:{identifier:"minecraft:leash_knot",materials:{default:"leash_knot"},textures:{default:"textures/entity/lead_knot"},geometry:{default:{bones:[{name:"knot",rotation:[0,180,0],cubes:[{origin:[5,6,5],size:[6,8,6],uv:[0,0]}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.leash_knot"]},llama_spit:{identifier:"minecraft:llama_spit",materials:{default:"llama_spit"},textures:{default:"textures/entity/llama/spit"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,22,0],size:[2,2,2],uv:[0,0]},{origin:[0,26,0],size:[2,2,2],uv:[0,0]},{origin:[0,22,-4],size:[2,2,2],uv:[0,0]},{origin:[0,22,0],size:[2,2,2],uv:[0,0]},{origin:[2,22,0],size:[2,2,2],uv:[0,0]},{origin:[0,20,0],size:[2,2,2],uv:[0,0]},{origin:[0,22,2],size:[2,2,2],uv:[0,0]}]}]}},render_controllers:["controller.render.llama_spit"]},magma_cube:{identifier:"minecraft:magma_cube",materials:{default:"magma_cube"},textures:{default:"textures/entity/slime/magmacube"},geometry:{default:{visible_bounds_width:2.5,visible_bounds_height:5,visible_bounds_offset:[0,2.5,0],texturewidth:64,textureheight:32,bones:[{name:"bodyCube_0",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,7,-4],size:[8,1,8],uv:[0,0]}]},{name:"bodyCube_1",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,6,-4],size:[8,1,8],uv:[0,1]}]},{name:"bodyCube_2",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,5,-4],size:[8,1,8],uv:[24,10]}]},{name:"bodyCube_3",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,4,-4],size:[8,1,8],uv:[24,19]}]},{name:"bodyCube_4",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,3,-4],size:[8,1,8],uv:[0,4]}]},{name:"bodyCube_5",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,2,-4],size:[8,1,8],uv:[0,5]}]},{name:"bodyCube_6",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,1,-4],size:[8,1,8],uv:[0,6]}]},{name:"bodyCube_7",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,0,-4],size:[8,1,8],uv:[0,7]}]},{name:"insideCube",pivot:[0,0,0],cubes:[{origin:[-2,2,-2],size:[4,4,4],uv:[0,16]}]}]}},render_controllers:["controller.render.magma_cube"],spawn_egg:{texture:"spawn_egg",texture_index:20}},mooshroom:{identifier:"minecraft:mooshroom",min_engine_version:"1.8.0",materials:{default:"mooshroom"},textures:{default:"textures/entity/cow/red_mooshroom",brown:"textures/entity/cow/brown_mooshroom"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-6,11,-5],size:[12,18,10],uv:[18,4]},{origin:[-2,11,-6],size:[4,6,1],uv:[52,0]}]},{name:"head",pivot:[0,20,-8],locators:{lead:[0,20,-8]},cubes:[{origin:[-4,16,-14],size:[8,8,6],uv:[0,0]},{origin:[-5,22,-12],size:[1,3,1],uv:[22,0]},{origin:[4,22,-12],size:[1,3,1],uv:[22,0]}]},{name:"leg0",parent:"body",pivot:[-4,12,7],cubes:[{origin:[-6,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[4,12,7],cubes:[{origin:[2,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-4,12,-6],cubes:[{origin:[-6,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[4,12,-6],cubes:[{origin:[2,0,-7],size:[4,12,4],uv:[0,16]}]}]}},render_controllers:["controller.render.mooshroom"],spawn_egg:{texture:"spawn_egg",texture_index:5}},panda:{identifier:"minecraft:panda",materials:{default:"panda"},textures:{default:"textures/entity/panda/panda",lazy:"textures/entity/panda/lazy_panda",worried:"textures/entity/panda/worried_panda",playful:"textures/entity/panda/playful_panda",brown:"textures/entity/panda/brown_panda",weak:"textures/entity/panda/weak_panda",aggressive:"textures/entity/panda/aggressive_panda"},geometry:{default:{texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,12.5,-17],locators:{lead:[0,14,-16]},cubes:[{origin:[-6.5,7.5,-21],size:[13,10,9],uv:[0,6]},{origin:[-3.5,7.5,-23],size:[7,5,2],uv:[45,16]},{origin:[-8.5,16.5,-18],size:[5,4,1],uv:[52,25]},{origin:[3.5,16.5,-18],size:[5,4,1],uv:[52,25]}]},{name:"body",pivot:[0,14,0],bind_pose_rotation:[90,0,0],cubes:[{origin:[-9.5,1,-6.5],size:[19,26,13],uv:[0,25]}]},{name:"leg0",parent:"body",pivot:[-5.5,9,9],cubes:[{origin:[-8.5,0,6],size:[6,9,6],uv:[40,0]}]},{name:"leg1",parent:"body",pivot:[5.5,9,9],cubes:[{origin:[2.5,0,6],size:[6,9,6],uv:[40,0]}]},{name:"leg2",parent:"body",pivot:[-5.5,9,-9],cubes:[{origin:[-8.5,0,-12],size:[6,9,6],uv:[40,0]}]},{name:"leg3",parent:"body",pivot:[5.5,9,-9],cubes:[{origin:[2.5,0,-12],size:[6,9,6],uv:[40,0]}]}]}},render_controllers:["controller.render.panda"],spawn_egg:{texture:"spawn_egg",texture_index:54}},phantom:{identifier:"minecraft:phantom",materials:{default:"phantom",invisible:"phantom_invisible"},textures:{default:"textures/entity/phantom"},geometry:{default:{texturewidth:64,textureheight:64,bones:[{name:"body",pivot:[0,24,0],bind_pose_rotation:[0,0,0],cubes:[{origin:[-3,23,-8],size:[5,3,9],uv:[0,8]}]},{name:"wing0",pivot:[2,26,-8],bind_pose_rotation:[0,0,5.7],cubes:[{origin:[2,24,-8],size:[6,2,9],uv:[23,12]}],parent:"body"},{name:"wingtip0",pivot:[8,26,-8],bind_pose_rotation:[0,0,5.7],locators:{left_wing:[21,26,0]},cubes:[{origin:[8,25,-8],size:[13,1,9],uv:[16,24]}],parent:"wing0"},{name:"wing1",pivot:[-3,26,-8],bind_pose_rotation:[0,0,-5.7],mirror:!0,cubes:[{origin:[-9,24,-8],size:[6,2,9],uv:[23,12]}],parent:"body"},{name:"wingtip1",pivot:[-9,24,-8],bind_pose_rotation:[0,0,-5.7],locators:{right_wing:[-22,24,0]},mirror:!0,cubes:[{origin:[-22,25,-8],size:[13,1,9],uv:[16,24]}],parent:"wing1"},{name:"head",pivot:[0,23,-7],bind_pose_rotation:[11.5,0,0],cubes:[{origin:[-4,22,-12],size:[7,3,5],uv:[0,0]}],parent:"body"},{name:"tail",pivot:[0,26,1],bind_pose_rotation:[0,0,0],cubes:[{origin:[-2,24,1],size:[3,2,6],uv:[3,20]}],parent:"body"},{name:"tailtip",pivot:[0,25.5,7],bind_pose_rotation:[0,0,0],cubes:[{origin:[-1,24.5,7],size:[1,1,6],uv:[4,29]}],parent:"tail"}]}},particle_effects:{wing_dust:"minecraft:phantom_trail_particle"},sound_effects:{flap:"mob.phantom.flap"},render_controllers:["controller.render.phantom"],spawn_egg:{texture:"spawn_egg",texture_index:51}},pig:{identifier:"minecraft:pig",min_engine_version:"1.8.0",materials:{default:"pig"},textures:{default:"textures/entity/pig/pig",saddled:"textures/entity/pig/pig_saddle"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,13,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-5,7,-5],size:[10,16,8],uv:[28,8]}]},{name:"head",parent:"body",pivot:[0,12,-6],locators:{lead:[0,14,-6]},cubes:[{origin:[-4,8,-14],size:[8,8,8],uv:[0,0]},{origin:[-2,9,-15],size:[4,3,1],uv:[16,16]}]},{name:"leg0",parent:"body",pivot:[-3,6,7],cubes:[{origin:[-5,0,5],size:[4,6,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[3,6,7],cubes:[{origin:[1,0,5],size:[4,6,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-3,6,-5],cubes:[{origin:[-5,0,-7],size:[4,6,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[3,6,-5],cubes:[{origin:[1,0,-7],size:[4,6,4],uv:[0,16]}]}]}},render_controllers:["controller.render.pig"],spawn_egg:{texture:"spawn_egg",texture_index:2}},piglin_brute:{identifier:"minecraft:piglin_brute",materials:{default:"piglin_brute"},textures:{default:"textures/entity/piglin/piglin_brute"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]},{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.25}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-5,24,-4],size:[10,8,8],uv:[0,0],inflate:-.02},{origin:[-2,24,-5],size:[4,4,1],uv:[31,1]},{origin:[2,24,-5],size:[1,2,1],uv:[2,4]},{origin:[-3,24,-5],size:[1,2,1],uv:[2,0]}],inflate:-.02},{name:"leftear",parent:"head",pivot:[5,30,0],rotation:[0,0,-30],cubes:[{origin:[4,25,-2],size:[1,5,4],uv:[51,6]}]},{name:"rightear",parent:"head",pivot:[-5,30,0],rotation:[0,0,30],cubes:[{origin:[-5,25,-2],size:[1,5,4],uv:[39,6]}]},{name:"hat",parent:"head",pivot:[0,24,0]},{name:"rightarm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]},{origin:[-8,12,-2],size:[4,12,4],uv:[40,32],inflate:.25}]},{name:"rightItem",parent:"rightarm",pivot:[-1,-45,-5]},{name:"leftarm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[32,48]},{origin:[4,12,-2],size:[4,12,4],uv:[48,48],inflate:.25}]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]},{name:"rightleg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,16]},{origin:[-4,0,-2],size:[4,12,4],uv:[0,32],inflate:.25}]},{name:"leftleg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[16,48]},{origin:[0,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]}],visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:64}},spawn_egg:{base_color:"#592A10",overlay_color:"#F9F3A4"},render_controllers:["controller.render.piglin_brute"],enable_attachables:!0},polar_bear:{identifier:"minecraft:polar_bear",materials:{default:"polar_bear"},textures:{default:"textures/entity/bear/polarbear"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:128,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,14,-16],locators:{lead:[0,14,-16]},mirror:!0,cubes:[{mirror:!1,origin:[-3.5,10,-19],size:[7,7,7],uv:[0,0]},{mirror:!1,origin:[-2.5,10,-22],size:[5,3,3],uv:[0,44]},{mirror:!1,origin:[-4.5,16,-17],size:[2,2,1],uv:[26,0]},{origin:[2.5,16,-17],size:[2,2,1],uv:[26,0]}]},{name:"body",pivot:[-2,15,12],bind_pose_rotation:[90,0,0],cubes:[{origin:[-7,14,5],size:[14,14,11],uv:[0,19]},{origin:[-6,28,5],size:[12,12,10],uv:[39,0]}]},{name:"leg0",parent:"body",pivot:[-4.5,10,6],cubes:[{origin:[-6.5,0,4],size:[4,10,8],uv:[50,22]}]},{name:"leg1",parent:"body",pivot:[4.5,10,6],cubes:[{origin:[2.5,0,4],size:[4,10,8],uv:[50,22]}]},{name:"leg2",parent:"body",pivot:[-3.5,10,-8],cubes:[{origin:[-5.5,0,-10],size:[4,10,6],uv:[50,40]}]},{name:"leg3",parent:"body",pivot:[3.5,10,-8],cubes:[{origin:[1.5,0,-10],size:[4,10,6],uv:[50,40]}]}]}},render_controllers:["controller.render.polarbear"],spawn_egg:{texture:"spawn_egg",texture_index:37}},pufferfish:{identifier:"minecraft:pufferfish",min_engine_version:"1.8.0",materials:{default:"pufferfish"},textures:{default:"textures/entity/fish/pufferfish"},geometry:{default:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-1.5,0,-1.5],size:[3,2,3],uv:[0,27]},{origin:[.5,2,-1.5],size:[1,1,1],uv:[24,6]},{origin:[-1.5,2,-1.5],size:[1,1,1],uv:[28,6]}],locators:{lead:[0,0,0]}},{name:"tailfin",parent:"body",cubes:[{origin:[-1.5,1,1.5],size:[3,0,3],uv:[-3,0]}]},{name:"leftFin",parent:"body",pivot:[6.5,5,.5],cubes:[{origin:[1.5,0,-1.5],size:[1,1,2],uv:[25,0],mirror:!0}]},{name:"rightFin",parent:"body",pivot:[-6.5,5,.5],cubes:[{origin:[-2.5,0,-1.5],size:[1,1,2],uv:[25,0]}]}]},mid:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-2.5,1,-2.5],size:[5,5,5],uv:[12,22]}]},{name:"leftFin",parent:"body",pivot:[2.5,5,.5],cubes:[{origin:[2.5,4,-1.5],size:[2,1,2],uv:[24,3]}]},{name:"rightFin",parent:"body",pivot:[-2.5,5,.5],cubes:[{origin:[-4.5,4,-1.5],size:[2,1,2],uv:[24,0]}]},{name:"spines_top_front",parent:"body",bind_pose_rotation:[45,0,0],pivot:[0,6,-2.5],cubes:[{origin:[-2.5,6,-2.5],size:[5,1,0],uv:[19,17]}]},{name:"spines_top_back",parent:"body",bind_pose_rotation:[-45,0,0],pivot:[0,6,2.5],cubes:[{origin:[-2.5,6,2.5],size:[5,1,0],uv:[11,17]}]},{name:"spines_bottom_front",parent:"body",bind_pose_rotation:[-45,0,0],pivot:[0,1,-2.5],cubes:[{origin:[-2.5,0,-2.5],size:[5,1,0],uv:[18,20]}]},{name:"spines_bottom_back",parent:"body",bind_pose_rotation:[45,0,0],pivot:[0,1,2.5],rotation:[45,0,0],cubes:[{origin:[-2.5,0,2.5],size:[5,1,0],uv:[18,20]}]},{name:"spines_left_front",parent:"body",bind_pose_rotation:[0,45,0],pivot:[2.5,0,-2.5],rotation:[0,45,0],cubes:[{origin:[2.5,1,-2.5],size:[1,5,0],uv:[1,17]}]},{name:"spines_left_back",parent:"body",bind_pose_rotation:[0,-45,0],pivot:[2.5,0,2.5],rotation:[0,-45,0],cubes:[{origin:[2.5,1,2.5],size:[1,5,0],uv:[1,17]}]},{name:"spines_right_front",parent:"body",bind_pose_rotation:[0,-45,0],pivot:[-2.5,0,-2.5],rotation:[0,-45,0],cubes:[{origin:[-3.5,1,-2.5],size:[1,5,0],uv:[5,17]}]},{name:"spines_right_back",parent:"body",bind_pose_rotation:[0,45,0],pivot:[-2.5,0,2.5],rotation:[0,45,0],cubes:[{origin:[-3.5,1,2.5],size:[1,5,0],uv:[9,17]}]}]},large:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0]}]},{name:"leftFin",parent:"body",pivot:[4,7,1],cubes:[{origin:[4,6,-2.9904],size:[2,1,2],uv:[24,3]}]},{name:"rightFin",parent:"body",pivot:[-4,7,1],cubes:[{origin:[-5.9968,6,-2.992],size:[2,1,2],uv:[24,0]}]},{name:"spines_top_front",parent:"body",pivot:[-4,8,-4],bind_pose_rotation:[45,0,0],cubes:[{origin:[-4,8,-4],size:[8,1,1],uv:[14,16]}]},{name:"spines_top_mid",parent:"body",pivot:[0,8,0],cubes:[{origin:[-4,8,0],size:[8,1,1],uv:[14,16]}]},{name:"spines_top_back",parent:"body",pivot:[0,8,4],bind_pose_rotation:[-45,0,0],cubes:[{origin:[-4,8,4],size:[8,1,1],uv:[14,16]}]},{name:"spines_bottom_front",parent:"body",pivot:[0,0,-4],bind_pose_rotation:[-45,0,0],cubes:[{origin:[-4,-1,-4],size:[8,1,1],uv:[14,19]}]},{name:"spines_bottom_mid",parent:"body",pivot:[0,-1,0],cubes:[{origin:[-4,-1,0],size:[8,1,1],uv:[14,19]}]},{name:"spines_bottom_back",parent:"body",pivot:[0,0,4],bind_pose_rotation:[45,0,0],cubes:[{origin:[-4,-1,4],size:[8,1,1],uv:[14,19]}]},{name:"spines_left_front",parent:"body",pivot:[4,0,-4],bind_pose_rotation:[0,45,0],cubes:[{origin:[4,0,-4],size:[1,8,1],uv:[0,16]}]},{name:"spines_left_mid",parent:"body",pivot:[4,0,0],cubes:[{origin:[4,0,0],size:[1,8,1],uv:[4,16],mirror:!0}]},{name:"spines_left_back",parent:"body",pivot:[4,0,4],bind_pose_rotation:[0,-45,0],cubes:[{origin:[4,0,4],size:[1,8,1],uv:[8,16],mirror:!0}]},{name:"spines_right_front",parent:"body",pivot:[-4,0,-4],bind_pose_rotation:[0,-45,0],cubes:[{origin:[-5,0,-4],size:[1,8,1],uv:[4,16]}]},{name:"spines_right_mid",parent:"body",pivot:[-4,0,0],cubes:[{origin:[-5,0,0],size:[1,8,1],uv:[8,16]}]},{name:"spines_right_back",parent:"body",pivot:[-4,0,4],bind_pose_rotation:[0,45,0],cubes:[{origin:[-5,0,4],size:[1,8,1],uv:[8,16]}]}]}},render_controllers:[{"controller.render.pufferfish.small":"query.variant == 0"},{"controller.render.pufferfish.medium":"query.variant == 1"},{"controller.render.pufferfish.large":"query.variant == 2"}],spawn_egg:{texture:"spawn_egg",texture_index:46}},rabbit:{identifier:"minecraft:rabbit",min_engine_version:"1.8.0",materials:{default:"rabbit"},textures:{brown:"textures/entity/rabbit/brown",white:"textures/entity/rabbit/white",black:"textures/entity/rabbit/black",white_splotched:"textures/entity/rabbit/white_splotched",gold:"textures/entity/rabbit/gold",salt:"textures/entity/rabbit/salt",toast:"textures/entity/rabbit/toast"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"rearFootLeft",pivot:[3,6.5,3.7],mirror:!0,parent:"body",cubes:[{origin:[2,0,0],size:[2,1,7],uv:[8,24]}]},{name:"rearFootRight",pivot:[-3,6.5,3.7],mirror:!0,parent:"body",cubes:[{origin:[-4,0,0],size:[2,1,7],uv:[26,24]}]},{name:"haunchLeft",pivot:[3,6.5,3.7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[2,2.5,3.7],size:[2,4,5],uv:[16,15]}]},{name:"haunchRight",pivot:[-3,6.5,3.7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[-4,2.5,3.7],size:[2,4,5],uv:[30,15]}]},{name:"body",pivot:[0,5,8],bind_pose_rotation:[-20,0,0],mirror:!0,cubes:[{origin:[-3,2,-2],size:[6,5,10],uv:[0,0]}]},{name:"frontLegLeft",pivot:[3,7,-1],bind_pose_rotation:[-10,0,0],mirror:!0,parent:"body",cubes:[{origin:[2,0,-2],size:[2,7,2],uv:[8,15]}]},{name:"frontLegRight",pivot:[-3,7,-1],bind_pose_rotation:[-10,0,0],mirror:!0,parent:"body",cubes:[{origin:[-4,0,-2],size:[2,7,2],uv:[0,15]}]},{name:"head",pivot:[0,8,-1],locators:{lead:[0,8,-1]},mirror:!0,parent:"body",cubes:[{origin:[-2.5,8,-6],size:[5,4,5],uv:[32,0]}]},{name:"earRight",pivot:[0,8,-1],bind_pose_rotation:[0,-15,0],mirror:!0,parent:"body",cubes:[{origin:[-2.5,12,-2],size:[2,5,1],uv:[58,0]}]},{name:"earLeft",pivot:[0,8,-1],bind_pose_rotation:[0,15,0],mirror:!0,parent:"body",cubes:[{origin:[.5,12,-2],size:[2,5,1],uv:[52,0]}]},{name:"tail",pivot:[0,4,7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[-1.5,2.5,7],size:[3,3,2],uv:[52,6]}]},{name:"nose",pivot:[0,8,-1],mirror:!0,parent:"body",cubes:[{origin:[-.5,9.5,-6.5],size:[1,1,1],uv:[32,9]}]}]}},render_controllers:["controller.render.rabbit"],spawn_egg:{texture:"spawn_egg",texture_index:24}},ravager:{identifier:"minecraft:ravager",textures:{default:"textures/entity/illager/ravager"},materials:{default:"ravager"},geometry:{default:{bones:[{pivot:[0,19,2],rotation:[90,0,0],cubes:[{origin:[-7,10,-2],size:[14,16,20],uv:[0,55]},{origin:[-6,-3,-2],size:[12,13,18],uv:[0,91]}],name:"body"},{pivot:[0,15,-10],cubes:[{origin:[-8,13,-24],size:[16,3,16],uv:[0,36]}],name:"mouth",parent:"head"},{pivot:[0,20,-20],cubes:[{origin:[-5,21,-10],size:[10,10,18],uv:[68,73]}],name:"neck"},{locators:{stun:[0,32,-15]},pivot:[0,28,-10],cubes:[{origin:[-8,14,-24],size:[16,20,16],uv:[0,0]},{origin:[-2,12,-28],size:[4,8,4],uv:[0,0]}],name:"head",parent:"neck"},{pivot:[-12,30,22],cubes:[{origin:[-12,0,17],size:[8,37,8],uv:[96,0]}],name:"leg0"},{pivot:[4,30,22],cubes:[{origin:[4,0,17],size:[8,37,8],uv:[96,0]}],name:"leg1"},{pivot:[-4,26,-4],cubes:[{origin:[-12,0,-8],size:[8,37,8],uv:[64,0]}],name:"leg2"},{pivot:[-4,26,-4],cubes:[{origin:[4,0,-8],size:[8,37,8],uv:[64,0]}],name:"leg3"},{pivot:[-5,27,-19],rotation:[60,0,0],cubes:[{origin:[-10,27,-20],size:[2,14,4],uv:[74,55]},{origin:[8,27,-20],size:[2,14,4],uv:[74,55]}],name:"horns",parent:"head"}],texturewidth:128,textureheight:128,visible_bounds_width:4,visible_bounds_height:3.5,visible_bounds_offset:[0,1.25,0]}},render_controllers:["controller.render.ravager"],spawn_egg:{texture:"spawn_egg",texture_index:57},particle_effects:{stun_particles:"minecraft:stunned_emitter"}},salmon:{identifier:"minecraft:salmon",materials:{default:"salmon"},textures:{default:"textures/entity/fish/salmon"},geometry:{default:{visible_bounds_width:.5,visible_bounds_height:.5,visible_bounds_offset:[0,.5,0],texturewidth:32,textureheight:32,bones:[{name:"body_front",pivot:[0,0,-4],cubes:[{origin:[-1.5,3.5,-4],size:[3,5,8],uv:[0,0]}]},{name:"body_back",parent:"body_front",pivot:[0,0,4],cubes:[{origin:[-1.5,3.5,4],size:[3,5,8],uv:[0,13]}]},{name:"dorsal_front",parent:"body_front",pivot:[0,5,2],cubes:[{origin:[0,8.5,2],size:[0,2,2],uv:[4,2]}]},{name:"dorsal_back",parent:"body_back",pivot:[0,5,4],cubes:[{origin:[0,8.5,4],size:[0,2,3],uv:[2,3]}]},{name:"tailfin",parent:"body_back",pivot:[0,0,12],cubes:[{origin:[0,3.5,12],size:[0,5,6],uv:[20,10]}]},{name:"head",parent:"body_front",pivot:[0,3,-4],locators:{lead:[0,3,-4]},cubes:[{origin:[-1,4.5,-7],size:[2,4,3],uv:[22,0]}]},{name:"leftFin",parent:"body_front",pivot:[1.5,1,-4],rotation:[0,0,35],cubes:[{origin:[-.50752,3.86703,-4],size:[2,0,2],uv:[2,0]}]},{name:"rightFin",parent:"body_front",pivot:[-1.5,1,-4],rotation:[0,0,-35],cubes:[{origin:[-1.49258,3.86703,-4],size:[2,0,2],uv:[-2,0]}]}]}},render_controllers:["controller.render.salmon"],spawn_egg:{texture:"spawn_egg",texture_index:47}},sheep:{identifier:"minecraft:sheep",materials:{default:"sheep"},textures:{default:"textures/entity/sheep/sheep",wool:"textures/entity/sheep/sheep_fur"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-4,13,-5],size:[8,16,6],uv:[28,8]}]},{name:"head",pivot:[0,18,-8],cubes:[{origin:[-3,16,-14],size:[6,6,8],uv:[0,0]}]},{name:"leg0",parent:"body",pivot:[-3,12,7],cubes:[{origin:[-5,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",pivot:[3,12,7],cubes:[{origin:[1,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-3,12,-5],cubes:[{origin:[-5,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",pivot:[3,12,-5],cubes:[{origin:[1,0,-7],size:[4,12,4],uv:[0,16]}]}]},wool:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,18,-8],cubes:[{origin:[-3,16,-12],size:[6,6,6],uv:[0,32],inflate:.6}]},{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-4,13,-5],size:[8,16,6],uv:[28,40],inflate:1.75}]},{name:"leg0",parent:"body",pivot:[-3,12,7],cubes:[{origin:[-5,6,5],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg1",parent:"body",pivot:[3,12,7],cubes:[{origin:[1,6,5],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg2",parent:"body",pivot:[-3,12,-5],cubes:[{origin:[-5,6,-7],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg3",parent:"body",pivot:[3,12,-5],cubes:[{origin:[1,6,-7],size:[4,6,4],uv:[0,48],inflate:.5}]}]}}},shulker_bullet:{identifier:"minecraft:shulker_bullet",materials:{default:"shulker_bullet"},textures:{default:"textures/entity/shulker/spark"},geometry:{default:{texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-4,-4,-1],size:[8,8,2],uv:[0,0]},{origin:[-1,-4,-4],size:[2,8,8],uv:[0,10]},{origin:[-4,-1,-4],size:[8,2,8],uv:[20,0]}]}]}},render_controllers:["controller.render.shulker_bullet"]},silverfish:{identifier:"minecraft:silverfish",materials:{default:"silverfish",body_layer:"silverfish_layers"},textures:{default:"textures/entity/silverfish"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"bodyPart_0",parent:"bodyPart_2",pivot:[0,2,-3.5],cubes:[{origin:[-1.5,0,-4.5],size:[3,2,2],uv:[0,0]}]},{name:"bodyPart_1",parent:"bodyPart_2",pivot:[0,3,-1.5],cubes:[{origin:[-2,0,-2.5],size:[4,3,2],uv:[0,4]}]},{name:"bodyPart_2",pivot:[0,4,1],cubes:[{origin:[-3,0,-.5],size:[6,4,3],uv:[0,9]}]},{name:"bodyPart_3",parent:"bodyPart_2",pivot:[0,3,4],cubes:[{origin:[-1.5,0,2.5],size:[3,3,3],uv:[0,16]}]},{name:"bodyPart_4",parent:"bodyPart_2",pivot:[0,2,7],cubes:[{origin:[-1,0,5.5],size:[2,2,3],uv:[0,22]}]},{name:"bodyPart_5",parent:"bodyPart_2",pivot:[0,1,9.5],cubes:[{origin:[-1,0,8.5],size:[2,1,2],uv:[11,0]}]},{name:"bodyPart_6",parent:"bodyPart_2",pivot:[0,1,11.5],cubes:[{origin:[-.5,0,10.5],size:[1,1,2],uv:[13,4]}]},{name:"bodyLayer_0",parent:"bodyPart_2",pivot:[0,8,1],cubes:[{origin:[-5,0,-.5],size:[10,8,3],uv:[20,0]}]},{name:"bodyLayer_1",parent:"bodyPart_4",pivot:[0,4,7],cubes:[{origin:[-3,0,5.5],size:[6,4,3],uv:[20,11]}]},{name:"bodyLayer_2",parent:"bodyPart_1",pivot:[0,5,-1.5],cubes:[{origin:[-3,0,-3],size:[6,5,2],uv:[20,18]}]}]}},render_controllers:["controller.render.silverfish"],spawn_egg:{texture:"spawn_egg",texture_index:8}},skeleton:{identifier:"minecraft:skeleton",min_engine_version:"1.8.0",materials:{default:"skeleton"},textures:{default:"textures/entity/skeleton/skeleton"},geometry:{default:{texturewidth:64,textureheight:32,visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0,parent:"body"}]}},spawn_egg:{texture:"spawn_egg",texture_index:9},render_controllers:["controller.render.skeleton"],enable_attachables:!0},skeleton_horse:{identifier:"minecraft:skeleton_horse",textures:{base_brown:"textures/entity/horse/horse_brown",base_white:"textures/entity/horse/horse_white",base_chestnut:"textures/entity/horse/horse_chestnut",base_creamy:"textures/entity/horse/horse_creamy",base_black:"textures/entity/horse/horse_black",base_gray:"textures/entity/horse/horse_gray",base_darkbrown:"textures/entity/horse/horse_darkbrown",markings_none:"textures/entity/horse/horse_markings_none",markings_white:"textures/entity/horse/horse_markings_white",markings_whitefield:"textures/entity/horse/horse_markings_whitefield",markings_whitedots:"textures/entity/horse/horse_markings_whitedots",markings_blackdots:"textures/entity/horse/horse_markings_blackdots",mule:"textures/entity/horse/mule",donkey:"textures/entity/horse/donkey",skeleton:"textures/entity/horse/horse_skeleton",zombie:"textures/entity/horse/horse_zombie",armor_none:"textures/entity/horse/armor/horse_armor_none",armor_leather:"textures/entity/horse/armor/horse_armor_leather",armor_iron:"textures/entity/horse/armor/horse_armor_iron",armor_gold:"textures/entity/horse/armor/horse_armor_gold",armor_diamond:"textures/entity/horse/armor/horse_armor_diamond"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:3,visible_bounds_offset:[0,1,0],texturewidth:128,textureheight:128,bones:[{name:"Body",pivot:[0,13,9],rotation:[0,0,0],cubes:[{origin:[-5,11,-10],size:[10,10,24],uv:[0,34]}]},{name:"TailA",pivot:[0,21,14],rotation:[-65,0,0],cubes:[{origin:[-1,20,14],size:[2,2,3],uv:[44,0]}]},{name:"TailB",pivot:[0,21,14],rotation:[-65,0,0],cubes:[{origin:[-1.5,19,17],size:[3,4,7],uv:[38,7]}]},{name:"TailC",pivot:[0,21,14],rotation:[-80.34,0,0],cubes:[{origin:[-1.5,21.5,23],size:[3,4,7],uv:[24,3]}]},{name:"Leg1A",pivot:[4,15,11],rotation:[0,0,0],cubes:[{origin:[1.5,8,8.5],size:[4,9,5],uv:[78,29]}]},{name:"Leg1B",pivot:[4,8,11],rotation:[0,0,0],cubes:[{origin:[2,3,9.5],size:[3,5,3],uv:[78,43]}]},{name:"Leg1C",pivot:[4,8,11],rotation:[0,0,0],cubes:[{origin:[1.5,-.1,9],size:[4,3,4],uv:[78,51]}]},{name:"Leg2A",pivot:[-4,15,11],rotation:[0,0,0],cubes:[{origin:[-5.5,8,8.5],size:[4,9,5],uv:[96,29]}]},{name:"Leg2B",pivot:[-4,8,11],rotation:[0,0,0],cubes:[{origin:[-5,3,9.5],size:[3,5,3],uv:[96,43]}]},{name:"Leg2C",pivot:[-4,8,11],rotation:[0,0,0],cubes:[{origin:[-5.5,-.1,9],size:[4,3,4],uv:[96,51]}]},{name:"Leg3A",pivot:[4,15,-8],rotation:[0,0,0],cubes:[{origin:[2.1,8,-10.1],size:[3,8,4],uv:[44,29]}]},{name:"Leg3B",pivot:[4,8,-8],rotation:[0,0,0],cubes:[{origin:[2.1,3,-9.6],size:[3,5,3],uv:[44,41]}]},{name:"Leg3C",pivot:[4,8,-8],rotation:[0,0,0],cubes:[{origin:[1.6,-.1,-10.1],size:[4,3,4],uv:[44,51]}]},{name:"Leg4A",pivot:[-4,15,-8],rotation:[0,0,0],cubes:[{origin:[-5.1,8,-10.1],size:[3,8,4],uv:[60,29]}]},{name:"Leg4B",pivot:[-4,8,-8],rotation:[0,0,0],cubes:[{origin:[-5.1,3,-9.6],size:[3,5,3],uv:[60,41]}]},{name:"Leg4C",pivot:[-4,8,-8],rotation:[0,0,0],cubes:[{origin:[-5.6,-.1,-10.1],size:[4,3,4],uv:[60,51]}]},{name:"Head",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,25,-11.5],size:[5,5,7],uv:[0,0]}]},{name:"UMouth",pivot:[0,20.05,-10],rotation:[30,0,0],cubes:[{origin:[-2,27.05,-17],size:[4,3,6],uv:[24,18]}]},{name:"LMouth",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2,25,-16.5],size:[4,2,5],uv:[24,27]}]},{name:"Ear1",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[.45,29,-6],size:[2,3,1],uv:[0,0]}]},{name:"Ear2",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.45,29,-6],size:[2,3,1],uv:[0,0]}]},{name:"MuleEarL",pivot:[0,20,-10],rotation:[30,0,15],cubes:[{origin:[-2,29,-6],size:[2,7,1],uv:[0,12]}]},{name:"MuleEarR",pivot:[0,20,-10],rotation:[30,0,-15],cubes:[{origin:[0,29,-6],size:[2,7,1],uv:[0,12]}]},{name:"Neck",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.05,15.8,-12],size:[4,14,8],uv:[0,12]}]},{name:"Bag1",pivot:[-7.5,21,10],rotation:[0,90,0],cubes:[{origin:[-10.5,13,10],size:[8,8,3],uv:[0,34]}]},{name:"Bag2",pivot:[4.5,21,10],rotation:[0,90,0],cubes:[{origin:[1.5,13,10],size:[8,8,3],uv:[0,47]}]},{name:"Saddle",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-5,21,-1],size:[10,1,8],uv:[80,0]}]},{name:"SaddleB",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-1.5,22,-1],size:[3,1,2],uv:[106,9]}]},{name:"SaddleC",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-4,22,5],size:[8,1,2],uv:[80,9]}]},{name:"SaddleL2",pivot:[5,21,2],rotation:[0,0,0],cubes:[{origin:[4.5,13,1],size:[1,2,2],uv:[74,0]}]},{name:"SaddleL",pivot:[5,21,2],rotation:[0,0,0],cubes:[{origin:[4.5,15,1.5],size:[1,6,1],uv:[70,0]}]},{name:"SaddleR2",pivot:[-5,21,2],rotation:[0,0,0],cubes:[{origin:[-5.5,13,1],size:[1,2,2],uv:[74,4]}]},{name:"SaddleR",pivot:[-5,21,2],rotation:[0,0,0],cubes:[{origin:[-5.5,15,1.5],size:[1,6,1],uv:[80,0]}]},{name:"SaddleMouthL",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[1.5,26,-14],size:[1,2,2],uv:[74,13]}]},{name:"SaddleMouthR",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,26,-14],size:[1,2,2],uv:[74,13]}]},{name:"SaddleMouthLine",pivot:[0,20,-10],rotation:[0,0,0],cubes:[{origin:[2.6,23,-16],size:[0,3,16],uv:[44,10]}]},{name:"SaddleMouthLineR",pivot:[0,20,-10],rotation:[0,0,0],cubes:[{origin:[-2.6,23,-16],size:[0,3,16],uv:[44,5]}]},{name:"Mane",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-1,15.5,-5],size:[2,16,4],uv:[58,0]}]},{name:"HeadSaddle",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,25.1,-17],size:[5,5,12],uv:[80,12],inflate:.05}]}]}},spawn_egg:{texture:"spawn_egg",texture_index:32}},slime:{identifier:"minecraft:slime",materials:{default:"slime",outer:"slime_outer"},textures:{default:"textures/entity/slime/slime"},geometry:{default:{visible_bounds_width:5,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"cube",pivot:[0,24,0],cubes:[{origin:[-3,1,-3],size:[6,6,6],uv:[0,16]}]},{name:"eye0",parent:"cube",pivot:[0,24,0],cubes:[{origin:[-3.3,4,-3.5],size:[2,2,2],uv:[32,0]}]},{name:"eye1",parent:"cube",pivot:[0,24,0],cubes:[{origin:[1.3,4,-3.5],size:[2,2,2],uv:[32,4]}]},{name:"mouth",parent:"cube",pivot:[0,24,0],cubes:[{origin:[0,2,-3.5],size:[1,1,1],uv:[32,8]}]}]},armor:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"cube",pivot:[0,24,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0]}]},{name:"eye0",parent:"cube",pivot:[0,24,0],cubes:[{origin:[-3.3,4,-3.5],size:[2,2,2],uv:[32,0]}]},{name:"eye1",parent:"cube",pivot:[0,24,0],cubes:[{origin:[1.3,4,-3.5],size:[2,2,2],uv:[32,4]}]},{name:"mouth",parent:"cube",pivot:[0,24,0],cubes:[{origin:[0,2,-3.5],size:[1,1,1],uv:[32,8]}]}]}},render_controllers:["controller.render.slime","controller.render.slime_armor"],spawn_egg:{texture:"spawn_egg",texture_index:10}},small_fireball:{identifier:"minecraft:small_fireball",materials:{default:"fireball"},textures:{default:"textures/items/fire_charge"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},snow_golem:{identifier:"minecraft:snow_golem",min_engine_version:"1.8.0",materials:{default:"snow_golem",head:"snow_golem_pumpkin"},textures:{default:"textures/entity/snow_golem"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:2,visible_bounds_offset:[0,1,0],bones:[{name:"head",parent:"piece1",pivot:[0,20,0],locators:{lead:[0,20,0]},cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0],inflate:-.5}]},{name:"arm1",parent:"piece1",pivot:[0,18,0],bind_pose_rotation:[0,0,57.3],cubes:[{origin:[1,20,-1],size:[12,2,2],uv:[32,0],inflate:-.5}]},{name:"arm2",parent:"piece1",pivot:[0,18,0],bind_pose_rotation:[0,180,-57.3],cubes:[{origin:[1,20,-1],size:[12,2,2],uv:[32,0],inflate:-.5}]},{name:"piece1",parent:"piece2",pivot:[0,11,0],cubes:[{origin:[-5,11,-5],size:[10,10,10],uv:[0,16],inflate:-.5}]},{name:"piece2",pivot:[0,0,0],cubes:[{origin:[-6,0,-6],size:[12,12,12],uv:[0,36],inflate:-.5}]}]}},render_controllers:["controller.render.snowgolem"]},snowball:{identifier:"minecraft:snowball",materials:{default:"snowball"},textures:{default:"textures/items/snowball"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},potion:{identifier:"minecraft:splash_potion",materials:{default:"splash_potion_enchanted"},textures:{moveSlowdown:"textures/items/potion_bottle_splash_moveSlowdown",moveSpeed:"textures/items/potion_bottle_splash_moveSpeed",digSlowdown:"textures/items/potion_bottle_splash_digSlowdown",digSpeed:"textures/items/potion_bottle_splash_digSpeed",damageBoost:"textures/items/potion_bottle_splash_damageBoost",heal:"textures/items/potion_bottle_splash_heal",harm:"textures/items/potion_bottle_splash_harm",jump:"textures/items/potion_bottle_splash_jump",confusion:"textures/items/potion_bottle_splash_confusion",regeneration:"textures/items/potion_bottle_splash_regeneration",resistance:"textures/items/potion_bottle_splash_resistance",fireResistance:"textures/items/potion_bottle_splash_fireResistance",waterBreathing:"textures/items/potion_bottle_splash_waterBreathing",invisibility:"textures/items/potion_bottle_splash_invisibility",blindness:"textures/items/potion_bottle_splash_blindness",nightVision:"textures/items/potion_bottle_splash_nightVision",hunger:"textures/items/potion_bottle_splash_hunger",weakness:"textures/items/potion_bottle_splash_weakness",poison:"textures/items/potion_bottle_splash_poison",wither:"textures/items/potion_bottle_splash_wither",healthBoost:"textures/items/potion_bottle_splash_healthBoost",absorption:"textures/items/potion_bottle_splash_absorption",saturation:"textures/items/potion_bottle_splash_saturation",levitation:"textures/items/potion_bottle_splash_levitation",turtleMaster:"textures/items/potion_bottle_splash_turtleMaster",slowFall:"textures/items/potion_bottle_splash_slowFall",default:"textures/items/potion_bottle_splash",enchanted:"textures/misc/enchanted_item_glint"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.splash_potion"]},squid:{identifier:"minecraft:squid",materials:{default:"squid"},textures:{default:"textures/entity/squid"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",cubes:[{origin:[-6,-8,-6],size:[12,16,12],uv:[0,0]}]},{name:"tentacle1",parent:"body",pivot:[5,-7,0],cubes:[{origin:[4,-25,-1],size:[2,18,2],uv:[48,0]}],rotation:[0,90,0]},{name:"tentacle2",parent:"body",pivot:[3.5,-7,3.5],cubes:[{origin:[2.5,-25,2.5],size:[2,18,2],uv:[48,0]}],rotation:[0,45,0]},{name:"tentacle3",parent:"body",pivot:[0,-7,5],cubes:[{origin:[-1,-25,4],size:[2,18,2],uv:[48,0]}],rotation:[0,0,0]},{name:"tentacle4",parent:"body",pivot:[-3.5,-7,3.5],cubes:[{origin:[-4.5,-25,2.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-45,0]},{name:"tentacle5",parent:"body",pivot:[-5,-7,0],cubes:[{origin:[-6,-25,-1],size:[2,18,2],uv:[48,0]}],rotation:[0,-90,0]},{name:"tentacle6",parent:"body",pivot:[-3.5,-7,-3.5],cubes:[{origin:[-4.5,-25,-4.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-135,0]},{name:"tentacle7",parent:"body",pivot:[0,-7,-5],cubes:[{origin:[-1,-25,-6],size:[2,18,2],uv:[48,0]}],rotation:[0,-180,0]},{name:"tentacle8",parent:"body",pivot:[3.5,-7,-3.5],cubes:[{origin:[2.5,-25,-4.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-225,0]}]}},render_controllers:["controller.render.squid"],spawn_egg:{texture:"spawn_egg",texture_index:15}},stray:{identifier:"minecraft:stray",min_engine_version:"1.8.0",materials:{default:"stray",overlay:"stray_clothes"},textures:{default:"textures/entity/skeleton/stray",overlay:"textures/entity/skeleton/stray_overlay"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",pivot:[0,12,0]},{name:"head",pivot:[0,24,0],locators:{lead:[0,24,0]},cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0,parent:"body"}]},overlay:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",parent:"waist",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],inflate:.25},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],inflate:.25},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],inflate:.25},{name:"rightItem",parent:"rightArm",pivot:[-6,15,1],neverRender:!0},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,inflate:.25},{name:"rightLeg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],inflate:.25},{name:"leftLeg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],inflate:.25,mirror:!0}]}},spawn_egg:{texture:"spawn_egg",texture_index:27},render_controllers:["controller.render.stray_clothes","controller.render.stray"],enable_attachables:!0},strider:{identifier:"minecraft:strider",materials:{default:"strider"},textures:{default:"textures/entity/strider/strider",saddled:"textures/entity/strider/strider",suffocated:"textures/entity/strider/strider_cold",suffocated_saddled:"textures/entity/strider/strider_cold"},geometry:{default:{bones:[{name:"right_leg",pivot:[-4,16,0],cubes:[{origin:[-6,0,-2],size:[4,16,4],uv:[0,32]}]},{name:"left_leg",pivot:[4,16,0],cubes:[{origin:[2,0,-2],size:[4,16,4],uv:[0,55]}]},{name:"body",pivot:[0,16,0],cubes:[{origin:[-8,14,-8],size:[16,14,16],uv:[0,0]}],locators:{lead:[0,15,-1]}},{name:"bristle5",parent:"body",pivot:[8,19,0],cubes:[{origin:[8,19,-8],size:[12,0,16],pivot:[8,19,0],rotation:[0,0,70],uv:[16,65]}]},{name:"bristle4",parent:"body",pivot:[8,24,0],cubes:[{origin:[8,24,-8],size:[12,0,16],pivot:[8,24,0],rotation:[0,0,65],uv:[16,49]}]},{name:"bristle3",parent:"body",pivot:[8,28,0],cubes:[{origin:[8,28,-8],size:[12,0,16],pivot:[8,28,0],rotation:[0,0,50],uv:[16,33]}]},{name:"bristle2",parent:"body",pivot:[-8,28,0],cubes:[{origin:[-20,28,-8],size:[12,0,16],pivot:[-8,28,0],rotation:[0,0,-50],uv:[16,33],mirror:!0}]},{name:"bristle1",parent:"body",pivot:[-8,24,0],cubes:[{origin:[-20,24,-8],size:[12,0,16],pivot:[-8,24,0],rotation:[0,0,-65],uv:[16,49],mirror:!0}]},{name:"bristle0",parent:"body",pivot:[-8,19,0],cubes:[{origin:[-20,19,-8],size:[12,0,16],pivot:[-8,19,0],rotation:[0,0,-70],uv:[16,65],mirror:!0}]}],visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:128}},spawn_egg:{base_color:"#9c3436",overlay_color:"#4d494d"},render_controllers:["controller.render.strider"]},text_display:{identifier:"minecraft:text_display",geometry:{}},trident:{identifier:"minecraft:thrown_trident",textures:{default:"textures/entity/trident",loyalty_rope:"textures/entity/lead_knot"},geometry:{default:{texturewidth:32,textureheight:32,bones:[{name:"pole",pivot:[0,24,0],cubes:[{origin:[-.5,-3,-.5],size:[1,31,1],inflate:.01,uv:[0,0]},{origin:[-1.5,22,-.5],size:[3,2,1],uv:[4,0]},{origin:[-2.5,23,-.5],size:[1,4,1],uv:[4,3]},{origin:[1.5,23,-.5],size:[1,4,1],uv:[4,3]}]}]}}},tnt_minecart:{identifier:"minecraft:tnt_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},tropical_fish:{identifier:"minecraft:tropicalfish",materials:{default:"tropicalfish"},textures:{typeA:"textures/entity/fish/tropical_a",typeB:"textures/entity/fish/tropical_b",aPattern1:"textures/entity/fish/tropical_a_pattern_1",aPattern2:"textures/entity/fish/tropical_a_pattern_2",aPattern3:"textures/entity/fish/tropical_a_pattern_3",aPattern4:"textures/entity/fish/tropical_a_pattern_4",aPattern5:"textures/entity/fish/tropical_a_pattern_5",aPattern6:"textures/entity/fish/tropical_a_pattern_6",bPattern1:"textures/entity/fish/tropical_b_pattern_1",bPattern2:"textures/entity/fish/tropical_b_pattern_2",bPattern3:"textures/entity/fish/tropical_b_pattern_3",bPattern4:"textures/entity/fish/tropical_b_pattern_4",bPattern5:"textures/entity/fish/tropical_b_pattern_5",bPattern6:"textures/entity/fish/tropical_b_pattern_6"},geometry:{typeA:{visible_bounds_width:.5,visible_bounds_height:.5,bones:[{pivot:[-.5,0,0],cubes:[{origin:[-1,0,-3],size:[2,3,6],uv:[0,0]},{origin:[0,3,-2.9992],size:[0,4,6],uv:[10,-6]}],name:"body"},{pivot:[0,0,3],cubes:[{origin:[0,0,3],size:[0,3,4],uv:[24,-4]}],name:"tailfin",parent:"body"},{pivot:[.5,0,1],bind_pose_rotation:[0,-35,0],cubes:[{origin:[.336,0,-.10594],size:[2,2,0],uv:[2,12]}],name:"leftFin",parent:"body"},{pivot:[-.5,0,1],bind_pose_rotation:[0,35,0],cubes:[{origin:[-2.336,0,-.10594],size:[2,2,0],uv:[2,16]}],name:"rightFin",parent:"body"}],texturewidth:32,textureheight:32},typeB:{visible_bounds_width:.5,visible_bounds_height:.5,bones:[{pivot:[-.5,0,0],cubes:[{origin:[-1,0,-8e-4],size:[2,6,6],uv:[0,20]},{origin:[0,-5,-8e-4],size:[0,5,6],uv:[20,21]},{origin:[0,6,-8e-4],size:[0,5,6],uv:[20,10]}],name:"body"},{pivot:[0,0,6],cubes:[{origin:[0,8e-4,6],size:[0,6,5],uv:[21,16]}],name:"tailfin",parent:"body"},{pivot:[.5,0,1],bind_pose_rotation:[0,-35,0],cubes:[{origin:[2.05673,0,2.35152],size:[2,2,0],uv:[2,12]}],name:"leftFin",parent:"body"},{pivot:[-.5,0,1],bind_pose_rotation:[0,35,0],cubes:[{origin:[-4.05673,0,2.35152],size:[2,2,0],uv:[2,16]}],name:"rightFin",parent:"body"}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.tropicalfish"],spawn_egg:{texture:"spawn_egg",texture_index:44}},vindicator:{identifier:"minecraft:vindicator",min_engine_version:"1.8.0",materials:{default:"vindicator"},textures:{default:"textures/entity/illager/vindicator"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22]},{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]}]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],mirror:!0,cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,46]}]},{name:"rightItem",pivot:[-5.5,16,.5],neverRender:!0,parent:"rightArm"},{name:"leftArm",parent:"body",pivot:[5,22,0],mirror:!0,cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,46]}]}]}},spawn_egg:{texture:"spawn_egg",texture_index:39},render_controllers:["controller.render.vindicator"],enable_attachables:!0},wandering_trader:{identifier:"minecraft:wandering_trader",materials:{default:"wandering_trader"},textures:{default:"textures/entity/wandering_trader"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"helmet",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[32,0],inflate:.5}]},{name:"brim",parent:"head",pivot:[0,24,0],bind_pose_rotation:[-90,0,0],cubes:[{origin:[-8,16,-6],size:[16,16,1],uv:[30,47],inflate:.1}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",locators:{lead_hold:[0,40,0]},cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]},{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22],mirror:!0}]},{name:"held_item",parent:"arms",pivot:[0,0,0]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22],mirror:!0}]}]}},render_controllers:["controller.render.wandering_trader"],spawn_egg:{texture:"spawn_egg_wandering_trader"}},wither:{identifier:"minecraft:wither",min_engine_version:"1.8.0",materials:{default:"wither_boss",armor:"wither_boss_armor"},textures:{default:"textures/entity/wither/wither",armor_white:"textures/entity/wither/wither_armor",armor_blue:"textures/entity/wither/wither_armor",invulnerable:"textures/entity/wither/wither_invulnerable"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:4,visible_bounds_offset:[0,2,0],texturewidth:64,textureheight:64,bones:[{name:"upperBodyPart1",cubes:[{origin:[-10,17.1,-.5],size:[20,3,3],uv:[0,16]}]},{name:"upperBodyPart2",parent:"upperBodyPart1",pivot:[-2,17.1,-.5],cubes:[{origin:[-2,7.1,-.5],size:[3,10,3],uv:[0,22]},{origin:[-6,13.6,0],size:[11,2,2],uv:[24,22]},{origin:[-6,11.1,0],size:[11,2,2],uv:[24,22]},{origin:[-6,8.6,0],size:[11,2,2],uv:[24,22]}]},{name:"upperBodyPart3",parent:"upperBodyPart2",pivot:[0,24,0],cubes:[{origin:[0,18,0],size:[3,6,3],uv:[12,22]}]},{name:"head1",parent:"upperBodyPart1",pivot:[0,20,0],cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0]}]},{name:"head2",parent:"upperBodyPart1",pivot:[-9,18,-1],cubes:[{origin:[-12,18,-4],size:[6,6,6],uv:[32,0]}]},{name:"head3",parent:"upperBodyPart1",pivot:[9,18,-1],cubes:[{origin:[6,18,-4],size:[6,6,6],uv:[32,0]}]}]},armor:{visible_bounds_width:3,visible_bounds_height:4,visible_bounds_offset:[0,2,0],texturewidth:64,textureheight:64,bones:[{name:"upperBodyPart1",cubes:[{origin:[-10,17.1,-.5],size:[20,3,3],uv:[0,16]}],inflate:2},{name:"upperBodyPart2",parent:"upperBodyPart1",pivot:[-2,17.1,-.5],cubes:[{origin:[-2,7.1,-.5],size:[3,10,3],uv:[0,22]},{origin:[-6,13.6,0],size:[11,2,2],uv:[24,22]},{origin:[-6,11.1,0],size:[11,2,2],uv:[24,22]},{origin:[-6,8.6,0],size:[11,2,2],uv:[24,22]}],inflate:2},{name:"upperBodyPart3",parent:"upperBodyPart2",pivot:[0,24,0],cubes:[{origin:[0,18,0],size:[3,6,3],uv:[12,22]}],inflate:2},{name:"head1",parent:"upperBodyPart1",pivot:[0,20,0],cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0]}],inflate:2},{name:"head2",parent:"upperBodyPart1",pivot:[-9,18,-1],cubes:[{origin:[-12,18,-4],size:[6,6,6],uv:[32,0]}],inflate:2},{name:"head3",parent:"upperBodyPart1",pivot:[9,18,-1],cubes:[{origin:[6,18,-4],size:[6,6,6],uv:[32,0]}],inflate:2}]}},render_controllers:["controller.render.wither_boss","controller.render.wither_boss_armor_white","controller.render.wither_boss_armor_blue"]},wither_skeleton:{identifier:"minecraft:wither_skeleton",min_engine_version:"1.8.0",materials:{default:"skeleton"},textures:{default:"textures/entity/skeleton/wither_skeleton"},geometry:{default:{texturewidth:64,textureheight:32,visible_bounds_width:1.5,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],bones:[{name:"body",parent:"waist",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}]},{name:"waist",pivot:[0,12,0]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}]},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}]},{name:"rightItem",parent:"rightArm",pivot:[-1,-45,-5],neverRender:!0},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5],neverRender:!0},{name:"rightLeg",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}]},{name:"leftLeg",parent:"body",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0}]}},render_controllers:["controller.render.wither_skeleton"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:29}},wither_skull:{identifier:"minecraft:wither_skull",materials:{default:"wither_skull"},textures:{default:"textures/entity/wither/wither"},geometry:{default:{bones:[{name:"head",cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,35]}]}],visible_bounds_width:1,visible_bounds_height:1,texturewidth:64,textureheight:64}},render_controllers:["controller.render.wither_skull"]},zoglin:{identifier:"minecraft:zoglin",materials:{default:"zoglin"},textures:{default:"textures/entity/hoglin/zoglin"},geometry:{default:{bones:[{name:"body",pivot:[0,19,-3],cubes:[{origin:[-8,11,-7],size:[16,14,26],inflate:.02,uv:[1,1]},{origin:[0,22,-10],size:[0,10,19],inflate:.02,uv:[90,33]}],locators:{lead:[0,20,-5]}},{name:"head",parent:"body",pivot:[0,22,-5],rotation:[50,0,0],cubes:[{origin:[-7,21,-24],size:[14,6,19],uv:[61,1]},{origin:[-8,22,-19],size:[2,11,2],uv:[1,13]},{origin:[6,22,-19],size:[2,11,2],uv:[1,13]}]},{name:"right_ear",parent:"head",pivot:[-7,27,-7],rotation:[0,0,-50],cubes:[{origin:[-13,26,-10],size:[6,1,4],uv:[1,1]}]},{name:"left_ear",parent:"head",pivot:[7,27,-7],rotation:[0,0,50],cubes:[{origin:[7,26,-10],size:[6,1,4],uv:[1,6]}]},{name:"leg_back_right",pivot:[6,8,17],cubes:[{origin:[-8,0,13],size:[5,11,5],uv:[21,45]}]},{name:"leg_back_left",pivot:[-6,8,17],cubes:[{origin:[3,0,13],size:[5,11,5],uv:[0,45]}]},{name:"leg_front_right",pivot:[-6,12,-3],cubes:[{origin:[-8,0,-6],size:[6,14,6],uv:[66,42]}]},{name:"leg_front_left",pivot:[6,12,-3],cubes:[{origin:[2,0,-6],size:[6,14,6],uv:[41,42]}]}],visible_bounds_width:4,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:64}},spawn_egg:{base_color:"#c66e55",overlay_color:"#e6e6e6"},render_controllers:["controller.render.zoglin"]},zombie:{identifier:"minecraft:zombie",min_engine_version:"1.8.0",materials:{default:"zombie"},textures:{default:"textures/entity/zombie/zombie"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],mirror:!0,parent:"body"}]}},spawn_egg:{texture:"spawn_egg",texture_index:12},scripts:{pre_animation:["variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"]},animations:{humanoid_big_head:{loop:!0,bones:{head:{scale:1.4}}},look_at_target_default:{loop:!0,bones:{head:{relative_to:{rotation:"entity"},rotation:["query.target_x_rotation","query.target_y_rotation",0]}}},look_at_target_gliding:{loop:!0,bones:{head:{rotation:[-45,"query.target_y_rotation",0]}}},look_at_target_swimming:{loop:!0,bones:{head:{rotation:["math.lerp(query.target_x_rotation, -45.0, variable.swim_amount)","query.target_y_rotation",0]}}},move:{loop:!0,bones:{leftarm:{rotation:["variable.tcos0",0,0]},leftleg:{rotation:["variable.tcos0 * -1.4",0,0]},rightarm:{rotation:["-variable.tcos0",0,0]},rightleg:{rotation:["variable.tcos0 * 1.4",0,0]}}},"riding.arms":{loop:!0,bones:{leftarm:{rotation:[-36,0,0]},rightarm:{rotation:[-36,0,0]}}},"riding.legs":{loop:!0,bones:{leftleg:{rotation:["-72.0 - this","-18.0 - this","-this"]},rightleg:{rotation:["-72.0 - this","18.0 - this","-this"]}}},holding:{loop:!0,bones:{leftarm:{rotation:["variable.is_holding_left ? (-this * 0.5 - 18.0) : 0.0",0,0]},rightarm:{rotation:["variable.is_holding_right ? (-this * 0.5 - 18.0) : 0.0",0,0]}}},brandish_spear:{loop:!0,bones:{rightarm:{rotation:["this * -0.5 - 157.5 - 22.5 * variable.charge_amount","-this",0]}}},charging:{loop:!0,bones:{rightarm:{rotation:["22.5 * variable.charge_amount - this","-this",0]}}},"attack.rotations":{loop:!0,bones:{body:{rotation:[0,"math.sin(math.sqrt(variable.attack_time) * 360) * 11.46 - this",0]},leftarm:{rotation:["math.sin(math.sqrt(variable.attack_time) * 360) * 11.46",0,0]},rightarm:{rotation:["math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * (variable.is_brandishing_spear ? -1.0 : 1.0 )","variable.is_brandishing_spear ? 0.0 : (math.sin(math.sqrt(variable.attack_time) * 360) * 11.46) * 2.0",0]}}},sneaking:{loop:!0,bones:{body:{rotation:["0.5 - this",0,0]},head:{position:[0,1,0]},leftarm:{rotation:[72,0,0]},leftleg:{position:[0,-3,4]},rightarm:{rotation:[72,0,0]},rightleg:{position:[0,-3,4]}}},bob:{loop:!0,bones:{leftarm:{rotation:[0,0,"((math.cos(query.life_time * 103.2) * 2.865) + 2.865) *-1.0"]},rightarm:{rotation:[0,0,"(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},damage_nearby_mobs:{loop:!0,bones:{leftarm:{rotation:["-45.0-this","-this","-this"]},leftleg:{rotation:["45.0-this","-this","-this"]},rightarm:{rotation:["45.0-this","-this","-this"]},rightleg:{rotation:["-45.0-this","-this","-this"]}}},bow_and_arrow:{loop:!0,bones:{leftarm:{rotation:["query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation + 28.65","-(math.cos(query.life_time * 103.2) * 2.865) - 2.865"]},rightarm:{rotation:["query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation - 5.73","(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},use_item_progress:{loop:!0,bones:{rightarm:{rotation:["variable.use_item_startup_progress * -60.0 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -22.5 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -5.625 + variable.use_item_interval_progress * 11.25"]}}},zombie_attack_bare_hand:{loop:!0,bones:{leftarm:{rotation:["-90.0 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) - (math.sin(query.life_time * 76.776372) * 2.865) - this","5.73 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 0.6) - this","math.cos(query.life_time * 103.13244) * -2.865 - 2.865 - this"]},rightarm:{rotation:["90.0 * (variable.is_brandishing_spear - 1.0) - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) + (math.sin(query.life_time * 76.776372) * 2.865) - this","(math.sin(variable.attack_time * 180.0) * 57.3) * 0.6 - 5.73 - this","math.cos(query.life_time * 103.13244) * 2.865 + 2.865 - this"]}}},swimming:{loop:!0,bones:{body:{position:[0,"variable.swim_amount * -10.0 - this","variable.swim_amount * 9.0 - this"],rotation:["variable.swim_amount * (90.0 + query.target_x_rotation)",0,0]},leftarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) - (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, 14.325, variable.swim_amount) - (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},leftleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0 + 180.0) * 0.3, variable.swim_amount)",0,0]},rightarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) + (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, -14.325, variable.swim_amount) + (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},rightleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0) * 0.3, variable.swim_amount)",0,0]}}}},animation_controllers:{humanoid_baby_big_head:{initial_state:"default",states:{baby:{animations:["humanoid_big_head"],transitions:[{default:"!query.is_baby"}]},default:{transitions:[{baby:"query.is_baby"}]}}},look_at_target:{initial_state:"default",states:{default:{animations:["look_at_target_default"],transitions:[{gliding:"query.is_gliding"},{swimming:"query.is_swimming"}]},gliding:{animations:["look_at_target_gliding"],transitions:[{swimming:"query.is_swimming"},{default:"!query.is_gliding"}]},swimming:{animations:["look_at_target_swimming"],transitions:[{gliding:"query.is_gliding"},{default:"!query.is_swimming"}]}}},move:{initial_state:"default",states:{default:{animations:["move"]}}},riding:{initial_state:"default",states:{default:{transitions:[{riding:"query.is_riding"}]},riding:{animations:["riding.arms","riding.legs"],transitions:[{default:"!query.is_riding"}]}}},holding:{initial_state:"default",states:{default:{animations:["holding"]}}},brandish_spear:{initial_state:"default",states:{brandish_spear:{animations:["brandish_spear"],transitions:[{default:"!variable.is_brandishing_spear"}]},default:{transitions:[{brandish_spear:"variable.is_brandishing_spear"}]}}},charging:{initial_state:"default",states:{charging:{animations:["charging"],transitions:[{default:"!query.is_charging"}]},default:{transitions:[{charging:"query.is_charging"}]}}},attack:{initial_state:"default",states:{attacking:{animations:["attack.rotations"],transitions:[{default:"variable.attack_time < 0.0"}]},default:{transitions:[{attacking:"variable.attack_time >= 0.0"}]}}},sneaking:{initial_state:"default",states:{default:{transitions:[{sneaking:"query.is_sneaking"}]},sneaking:{animations:["sneaking"],transitions:[{default:"!query.is_sneaking"}]}}},bob:{initial_state:"default",states:{default:{animations:["bob"]}}},damage_nearby_mobs:{initial_state:"default",states:{damage_nearby_mobs:{animations:["damage_nearby_mobs"],transitions:[{default:"!variable.damage_nearby_mobs"}]},default:{transitions:[{damage_nearby_mobs:"variable.damage_nearby_mobs"}]}}},bow_and_arrow:{initial_state:"default",states:{bow_and_arrow:{animations:["bow_and_arrow"],transitions:[{default:"!query.has_target"}]},default:{transitions:[{bow_and_arrow:"query.has_target"}]}}},use_item_progress:{initial_state:"default",states:{default:{transitions:[{use_item_progress:"( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 )"}]},use_item_progress:{animations:["use_item_progress"],transitions:[{default:"( variable.use_item_interval_progress <= 0.0 ) && ( variable.use_item_startup_progress <= 0.0 )"}]}}},zombie_attack_bare_hand:{initial_state:"default",states:{default:{transitions:[{is_bare_hand:"variable.is_holding_left != 1.0"}]},is_bare_hand:{animations:["zombie_attack_bare_hand"],transitions:[{default:"variable.is_holding_left == 1.0"}]}}},swimming:{initial_state:"default",states:{default:{transitions:[{is_swimming:"variable.swim_amount > 0.0"}]},is_swimming:{animations:["swimming"],transitions:[{default:"variable.swim_amount <= 0.0"}]}}}},render_controllers:["controller.render.zombie"],enable_attachables:!0},zombified_piglin:{identifier:"minecraft:zombie_pigman",min_engine_version:"1.8.0",materials:{default:"zombie"},textures:{default:"textures/entity/piglin/zombified_piglin"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]},{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.25}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-5,24,-4],size:[10,8,8],uv:[0,0],inflate:-.02},{origin:[-2,24,-5],size:[4,4,1],uv:[31,1]},{origin:[2,24,-5],size:[1,2,1],uv:[2,4]},{origin:[-3,24,-5],size:[1,2,1],uv:[2,0]}],inflate:-.02},{name:"leftear",parent:"head",pivot:[5,30,0],rotation:[0,0,-30],cubes:[{origin:[4,25,-2],size:[1,5,4],uv:[51,6]}]},{name:"rightear",parent:"head",pivot:[-5,30,0],rotation:[0,0,30],cubes:[{origin:[-5,25,-2],size:[1,5,4],uv:[39,6]}]},{name:"hat",parent:"head",pivot:[0,24,0]},{name:"rightarm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]},{origin:[-8,12,-2],size:[4,12,4],uv:[40,32],inflate:.25}]},{name:"rightItem",parent:"rightarm",pivot:[-1,-45,-5]},{name:"leftarm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[32,48]},{origin:[4,12,-2],size:[4,12,4],uv:[48,48],inflate:.25}]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]},{name:"rightleg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,16]},{origin:[-4,0,-2],size:[4,12,4],uv:[0,32],inflate:.25}]},{name:"leftleg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[16,48]},{origin:[0,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]}],visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:64}},spawn_egg:{texture:"spawn_egg",texture_index:13},render_controllers:["controller.render.zombie_pigman"],enable_attachables:!0}};x();R();T();k();var Ae={};_5(Ae,{allay:()=>g3,arrow:()=>G3,axolotl:()=>b3,blaze:()=>y3,boat:()=>$3,camel:()=>w3,cat:()=>_3,chicken:()=>A3,cod:()=>E3,creeper:()=>x3,dolphin:()=>R3,ender_dragon:()=>k3,enderman:()=>T3,endermite:()=>M3,fox:()=>S3,frog:()=>C3,ghast:()=>P3,goat:()=>B3,guardian:()=>I3,horse:()=>H3,llama:()=>z3,minecart:()=>O3,parrot:()=>D3,piglin:()=>L3,pillager:()=>F3,rabbit:()=>U3,shulker:()=>W3,sniffer:()=>N3,spider:()=>V3,tadpole:()=>j3,turtle:()=>Y3,vex:()=>Q3,villager:()=>K3,warden:()=>J3,witch:()=>q3,wolf:()=>Z3,zombie_villager:()=>X3});x();R();T();k();var g3=`# Made in Blockbench 4.9.4
860
860
  mtllib materials.mtl
861
861
 
862
862
  o head
@@ -21182,9 +21182,9 @@ f 67/200/50 68/199/50 66/198/50 65/197/50
21182
21182
  f 72/204/51 67/203/51 65/202/51 70/201/51
21183
21183
  f 71/208/52 72/207/52 70/206/52 69/205/52
21184
21184
  f 70/212/53 65/211/53 66/210/53 69/209/53
21185
- f 71/216/54 68/215/54 67/214/54 72/213/54`;var Pi={allay:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAV1BMVEUAAAA4jNkuh9Ypg9FBnNpCm9r///+c/P+A/P9k+/9N8/hM6f9Q2f8+5eo94PdG0P821+4s1ewiz/8syf8ox/8bxPNNq+wQwf8os+hCnNpCm9oep9s0h8D7j8AO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CJi8zcc4eAo+QroBsC7hC4AMOAspxGQNAUZdTDwAtkdAQrTdALQAMYX4FkIYA1VwoNZ+CynqCLeuIOSkAYyAqRZjFyDNAe8FytIOLuoCNv3hkLPtkP3k8xNc1RthZ6YiPwAMmmoAHUC028DGCKevkwg8DnxafwDmO/uHwDebkIAap1EwrQAAAABJRU5ErkJggg==",chicken:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgBAMAAABQs2O3AAAALVBMVEUAAAD////i4uL85XDT09PhzGLGxsbgu2nTrlrQqT/Bk0OWcjRjVkH/AAAAAADtfCsnAAAAAXRSTlMAQObYZgAAAO9JREFUeNrtzMFJxFAQxvFZrGAewaMwwxQg2IA7fMzZElQecxZswHZc7CAd2MM72IlJVoXEbATP+7998OMj2kmHW6LXQ9/T0AUt25UuB/D+dgQ317+AXLZ7OgxN4vmJ5vGxforGXhbgSj9ElFqjrxYXomN+GriqmqG1H3E3B7DmQN0A0Wpk0laqKlw2gKv9AdycbRNE1dgA1SOy0hTWQCIrgqaUlnGBqkLY4aeAq0FYfT/OFRBQVGERWQddAKh7ZuFVUCwqorow8166jgVzoBaZWV2FRZS5iM2BYwKwBzEfjJSYg/zOIx7hDk86948+AcUmS5dD8ZFCAAAAAElFTkSuQmCC",cod:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAJFBMVEX///8AAADr2sPWxa3KtJXCqIW2lmusiVmScVqEZVEiHyYAAAB2QJV6AAAAAnRSTlMAAHaTzTgAAACbSURBVHja7coxCsJAEIXh5w18RSRiZQT7sAS8Rgyz2kbYIN5CiDBbx8CewHM6QS3sLf1hivl4yMc626+ZCgKQzENVF6eSsaCVkRCRfCiZhFYwcM4t+13SqFdOwS6/Vw+5HA3qFyz7beOqriX9ezFsKmlcySn4lFKMMQiJGYWwR9VQyTnGmggh3M7eeyGBQ0u4TwZkR/C7P/weVk/OOkCzBdD8ogAAAABJRU5ErkJggg==",creeper:"data:image/png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ASUVORK5CYII=",vex:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAMFBMVEUAAABthJtgeY9Ta4H////z+Pzg6fHG2eqivNWUrMOGn7eCl6t5kqp6j6RthJtgcoMKluMvAAAABHRSTlMAoKCgEjok+wAAAPlJREFUeNq1yL1Kw1AAhuE3hxYrRYm5gmivQL0Hwa1LnAtCFpdOjuKY4KBjfnYhIUPWEnIBhgxZRSjHC8hp3KWxkg5ndfD5pu8FDqNAKQkwKXIE9Fuj3zCQjECYDCaPs4tOQP9pDME4B1MAbIwTgJEwv2yixPcCPw2igGkcljlZ3YfP33WSJTB9yhG25HaJPLUBtkCdvl5fpVlVVRy3ntdQZW+eX6e77UIcNqAke0eq+JCgGvam4apoUGqtHtC067K9Q1O+l2WMJl9RvPAnl7+0L5Ao9NBB16GxZpZloTGFeWYC47l7DzrXcUF3sHTQjW9YoHMW4zn/5QeNK1xt8XQSVQAAAABJRU5ErkJggg==",villager:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAbFBMVEX///++iGy3gnKze2J6enpra2thYWFUVFRUU1NISElMODM9LSkAAAD///++iGy3gnKUj4m1e2eze2KBfXl/e3eja01vbWqQXkNjYmAAlhFUU1N1Ry93QjVcQjpISElMODM9LSkzJBEjIyMjGBTjk4HHAAAADXRSTlMAAAAAAAAAAAAAAAAA7Uh4SAAAAn9JREFUeNrtlN1ymzAQRm3cuG5C9oMFJIW0idu+/zt2/wieiTNAk0ufgdEKs0cryWJXB0RguUEO1/Xzc871Irs3AViTQdnYLgAzGfmPkFnT9V4tiAI+IyCB/19AVgA+KyCaF9FZL3iDlfUCAl0AjpYmFgWagjkJfjNCtCwgml7niyrmcJ0gho7mQkDrBJALsAhwyYY1IAP4bahgdmKFgBme8PjE/PRI3mMGG1gWxMpnE3GetmFiWQA/yJl/CpzJutggYAYYIjAyQfu8XlAv8DWCb5sFqW2Btk2llJSKctwqIAFJ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2w/fTpeUBt6ro6r4yWwtnZycnJ2dmrgwHMwqjODbmADgeIqrx6Q5XBKvALSlRyOCZjAJM5ZyJig0dgKkN3sw4HjwMEwTAFNlRfuIpDnkIF4DAOMAsRgGAMuYvzEBwmQRTG0SGAGlYX5hfv8AjfzYMT54QzwJ4OAkRFHc//Kc2ZhJQ9xvHCBwDCAkGE3r4P4f1bkuxB9ThRFR4FNCVFqQ9zFHp8wr7OX616XBsFUt+vUwbmf6M5ZtI6rYHgwqpfrQ4BUhb6eanv0rpba5dS32G8GwdOT1+f5iYjjQG/PvmHTwE/o5/Q5EFWhVnUNnc9FxBCfChgUd91/et7gDGu9AjgyNHnm8833wIQvgDoe7+A6to9CnQQvgQYgDwCmLqmGwhjS1Bh4scAMiQPgCZnse2zdmqbiHkS2Qm2URG11iEict47T6gAbRObaNvYNjhpbIyxzIsw42War8a4U/M8Nod5vQdibNs4DC0MGzNgpzGlJEiTLfMQUIwYNo68I3WexO2BdgCgQ3awNVlJuzrcGpP5FVkhckCIRLGLuwVaTaopJLyBGuK9gPmptRbfNFMc1qozZfFCglQKoIgDOeagA7Ym3zEOXa7MN1gASBBRlQwZQ96JOBwF4MCeidg5puQ4YMELPNgO5UeXsWVEgAYVJlMALkIBKIAAwHnH0SI8FE2xybddYr5tmzZFJAwAeWYIorcACzE5KC4wBwDLYVgu24gwPeR57KlFHpN1XRsiZgehACKz2wUJ+xnOF7uu/1pcL77Kq6caZUD2/0ZFAk9zM9XrfYvrb1L1TPXvNbFnhwqQEPOKZbVKaZW0aWIpvy+bZVOypUYT7vFx9tGz9zOcFuDN/+gIHIEjcASOwBH44cB/1lQM4ZNhKecAAAAASUVORK5CYII="};x();R();T();k();import*as C0 from"three";var Bi=class{constructor(t,e){this.object=t;this.animations=e;u(this,"clock",new C0.Clock);u(this,"animatedObjects",new Set);u(this,"state")}createAnimationState(){let t=new C0.AnimationMixer(this.object),e=new Map;for(let i of this.animations)e.set(i.name,t.clipAction(i));return this.state={mixer:t,animations:this.animations,actions:e,speed:1,loop:!0},this.object.traverse(i=>{if(i instanceof C0.Mesh||i instanceof C0.Line||i instanceof C0.Points||i instanceof C0.Sprite){let n=i.onBeforeRender;i.onBeforeRender=(s,o,a,v,l,c)=>{let d=this.clock.getDelta();t.update(d),n?.(s,o,a,v,l,c)}}}),this.animatedObjects.add(this.object),this.state}playAnimation(t,e,i){let n=this.state.actions.get(t);if(!n)return!1;this.state.mixer.stopAllAction();let s=e??this.state.loop;return n.setLoop(s?C0.LoopRepeat:C0.LoopOnce,1/0),n.clampWhenFinished=!s,i===void 0?n.timeScale=this.state.speed:n.timeScale=i,n.reset().fadeIn(.1).play(),!0}updateAnimationParams(t,e){t!==void 0&&(this.state.speed=t),e!==void 0&&(this.state.loop=e);for(let i of this.state.actions.values())t!==void 0&&(i.timeScale=t),e!==void 0&&(i.setLoop(e?C0.LoopRepeat:C0.LoopOnce,1/0),i.clampWhenFinished=!e)}stopAnimations(){this.state.mixer.stopAllAction()}getDelta(){return this.clock.getDelta()}};function t6(r,t){let e=new Bi(r,t);return e.createAnimationState(),e}var C7={up:{dir:[0,1,0],u0:[0,0,1],v0:[0,0,0],u1:[1,0,1],v1:[0,0,1],corners:[[0,1,1,0,0],[1,1,1,1,0],[0,1,0,0,1],[1,1,0,1,1]]},down:{dir:[0,-1,0],u0:[1,0,1],v0:[0,0,0],u1:[2,0,1],v1:[0,0,1],corners:[[1,0,1,0,0],[0,0,1,1,0],[1,0,0,0,1],[0,0,0,1,1]]},east:{dir:[1,0,0],u0:[0,0,0],v0:[0,0,1],u1:[0,0,1],v1:[0,1,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],u0:[1,0,1],v0:[0,0,1],u1:[1,0,2],v1:[0,1,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],u0:[0,0,1],v0:[0,0,1],u1:[1,0,1],v1:[0,1,1],corners:[[1,0,0,0,1],[0,0,0,1,1],[1,1,0,0,0],[0,1,0,1,0]]},south:{dir:[0,0,1],u0:[1,0,2],v0:[0,0,1],u1:[2,0,2],v1:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};function e6(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function P7(r,t,e,i,n=!1,s=64,o=64,a=!1,v=[]){let l=new J.Euler(0,0,0);i.rotation&&(l.x=-i.rotation[0]*Math.PI/180,l.y=-i.rotation[1]*Math.PI/180,l.z=-i.rotation[2]*Math.PI/180);for(let{dir:c,corners:d,u0:h,v0:p,u1:g,v1:b}of Object.values(C7)){let A=Math.floor(r.positions.length/3),w=c[0]!==0,_=[];for(let S of d){let M,C;n?(M=(i.uv[0]+S[3]*i.size[0])/s,C=(i.uv[1]+S[4]*i.size[1])/o):(M=(i.uv[0]+e6(S[3]?g:h,i.size))/s,C=(i.uv[1]+e6(S[4]?b:p,i.size))/o);let H=w&&a?S[0]^1:S[0],B=S[1],I=w&&a?S[2]^1:S[2],W=i.inflate??0,z=new J.Vector3(i.origin[0]+H*i.size[0]+(H?W:-W),i.origin[1]+B*i.size[1]+(B?W:-W),i.origin[2]+I*i.size[2]+(I?W:-W));z=z.applyEuler(l),z=z.sub(e.position),z=z.applyEuler(e.rotation),z=z.add(e.position),r.positions.push(z.x,z.y,z.z),r.normals.push(c[0],c[1],c[2]),_.push(M,C),r.skinIndices.push(t,0,0,0),r.skinWeights.push(1,0,0,0)}if(a)for(let S=0;S+1<d.length;S+=2){let M=S*2,C=_.slice(M,M+4);_[M]=C[2],_[M+1]=C[w?1:3],_[M+2]=C[0],_[M+3]=C[w?3:1]}r.uvs.push(..._),r.indices.push(A,A+1,A+2,A+2,A+1,A+3)}}function St(r,t,e,i={},n={}){let s=e.texturewidth??64,o=e.textureheight??64,a,v=t.startsWith("block:"),l=r?.material.map;if(v){if(!r)throw new Error("worldRenderer is required for block textures");let _=t.slice(6),S=r.resourcesManager.currentResources.blocksAtlasJson.textures[_];S&&(s=l?.image.width??s,o=l?.image.height??o,a=[S.u,S.v])}let c={},d={positions:[],normals:[],uvs:[],indices:[],skinIndices:[],skinWeights:[]},h=0;for(let _ of e.bones){let S=new J.Bone;if(_.pivot&&(S.position.x=_.pivot[0],S.position.y=_.pivot[1],S.position.z=_.pivot[2]),_.bind_pose_rotation?(S.rotation.x=-_.bind_pose_rotation[0]*Math.PI/180,S.rotation.y=-_.bind_pose_rotation[1]*Math.PI/180,S.rotation.z=-_.bind_pose_rotation[2]*Math.PI/180):_.rotation&&(S.rotation.x=-_.rotation[0]*Math.PI/180,S.rotation.y=-_.rotation[1]*Math.PI/180,S.rotation.z=-_.rotation[2]*Math.PI/180),i.rotation?.[_.name]&&(S.rotation.x-=(i.rotation[_.name].x??0)*Math.PI/180,S.rotation.y-=(i.rotation[_.name].y??0)*Math.PI/180,S.rotation.z-=(i.rotation[_.name].z??0)*Math.PI/180),S.name=`bone_${_.name}`,c[_.name]=S,_.cubes)for(let M of _.cubes){let C=[];P7(d,h,S,M,v,s,o,_.mirror,C),C.length&&(n.errors??(n.errors=[]),n.errors.push(...C.map(H=>`Bone ${_.name}: ${H}`)))}h++}let p=[];for(let _ of e.bones)_.parent&&c[_.parent]?c[_.parent].add(c[_.name]):p.push(c[_.name]);let g=new J.Skeleton(Object.values(c)),b=new J.BufferGeometry;b.setAttribute("position",new J.Float32BufferAttribute(d.positions,3)),b.setAttribute("normal",new J.Float32BufferAttribute(d.normals,3)),b.setAttribute("uv",new J.Float32BufferAttribute(d.uvs,2)),b.setAttribute("skinIndex",new J.Uint16BufferAttribute(d.skinIndices,4)),b.setAttribute("skinWeight",new J.Float32BufferAttribute(d.skinWeights,4)),b.setIndex(d.indices);let A=new J.MeshLambertMaterial({transparent:!0,alphaTest:.1,side:J.DoubleSide}),w=new J.SkinnedMesh(b,A);if(w.add(...p),w.bind(g),w.scale.set(1/16,1/16,1/16),a){let _=l.clone();_.offset.set(a[0],a[1]),_.needsUpdate=!0,A.map=_}else F5(t,_=>{A.map||(_.magFilter=J.NearestFilter,_.minFilter=J.NearestFilter,_.flipY=!1,_.wrapS=J.RepeatWrapping,_.wrapT=J.RepeatWrapping,A.map=_)},()=>{let _=A.map.image.width;_&&s!==_&&(A.map.repeat.x=s/_);let S=A.map.image.height;S&&o!==S&&(A.map.repeat.y=o/S),A.needsUpdate=!0});return w}var B7=[{pattern:"furnace_minecart",target:"minecart"},{pattern:"spawner_minecart",target:"minecart"},{pattern:"chest_minecart",target:"minecart"},{pattern:"hopper_minecart",target:"minecart"},{pattern:"command_block_minecart",target:"minecart"},{pattern:"tnt_minecart",target:"minecart"},{pattern:"glow_item_frame",target:"item_frame"},{pattern:"glow_squid",target:"squid"},{pattern:"trader_llama",target:"llama"},{pattern:"chest_boat",target:"boat"},{pattern:"spectral_arrow",target:"arrow"},{pattern:"husk",target:"zombie"},{pattern:"zombie_horse",target:"horse"},{pattern:"donkey",target:"horse"},{pattern:"skeleton_horse",target:"horse"},{pattern:"mule",target:"horse"},{pattern:"ocelot",target:"cat"},{pattern:/_minecraft$/,target:"minecraft"},{pattern:/_boat$/,target:"boat"},{pattern:/_raft$/,target:"boat"},{pattern:/_horse$/,target:"horse"},{pattern:/_zombie$/,target:"zombie"},{pattern:/_arrow$/,target:"zombie"}];function i6(r){for(let t of B7)if(typeof t.pattern=="string"){if(t.pattern===r)return t.target}else if(t.pattern.test(r))return t.target}var n6=r=>p3[r],r6={zombie:1.85,husk:1.85,arrow:.0025},I7={zombie:new n1(0,1,0),husk:new n1(0,1,0),boat:new n1(0,-1,0),arrow:new n1(0,-.9,0)},_t=class{constructor(t,e,i,n={},s={}){u(this,"mesh");u(this,"animations");u(this,"animationController");u(this,"initialAnimation");u(this,"initialLoop");let o=e,a=i6(e);if(a&&(e=a,s.tempMap=a),n.customModel){this.mesh=new J.Object3D;let{modelPath:l,modelType:c,metadata:d}=n.customModel;switch(c){case"gltf":{new x7().parseAsync(l,"").then(g=>{if(this.mesh.add(g.scene),this.animations=g.animations,d?.scale){let{scale:b}=d;this.mesh.scale.set(b,b,b)}if(d?.offset){let{x:b=0,y:A=0,z:w=0}=d.offset;this.mesh.position.set(b,A,w)}if(d?.texture){let b=new J.TextureLoader().load(d.texture);b.minFilter=J.NearestFilter,b.magFilter=J.NearestFilter,this.mesh.traverse(A=>{A instanceof J.Mesh&&(A.material=new J.MeshBasicMaterial({map:b,transparent:!0,alphaTest:.1}))})}if(g.animations&&g.animations.length>0){this.animations=g.animations;let b=d?.animation,A=d?.animationLoop??!0;if(this.initialAnimation=b,this.initialLoop=A,this.animationController=t6(this.mesh,g.animations),b)this.playAnimation(b,A);else{let w=g.animations[0];this.animationController.playAnimation(w.name,A)}}}).catch(g=>{});return}case"obj":{let p=new _e().parse(l);if(d?.scale){let{scale:g}=d;p.scale.set(g,g,g)}if(d?.offset){let{x:g=0,y:b=0,z:A=0}=d.offset;p.position.set(g,b,A)}if(d?.texture){let g=new J.TextureLoader().load(d.texture);g.minFilter=J.NearestFilter,g.magFilter=J.NearestFilter;let b=new J.MeshBasicMaterial({map:g,transparent:!0,alphaTest:.1});p.traverse(A=>{A instanceof J.Mesh&&(A.material=b)})}this.mesh=p,s.type="obj";return}case"bedrock":{let h=JSON.parse(l);if(this.mesh=new J.Object3D,d?.scale&&this.mesh.scale.set(d.scale,d.scale,d.scale),d?.offset){let{x:p=0,y:g=0,z:b=0}=d.offset;this.mesh.position.set(p,g,b)}for(let[p,g]of Object.entries(h.geometry)){let b=d?.textures?.[p]??h.textures?.[p];if(!b)continue;let A=St(i,b.endsWith(".png")||b.startsWith("data:image/")||b.startsWith("block:")?b:b+".png",g,n,s);A.name=`geometry_${p}`,this.mesh.add(A)}s.type="bedrock";return}}}if(Ae[e]){let l=new _e,c={zombie_horse:`textures/${t}/entity/horse/horse_zombie.png`,husk:R7,skeleton_horse:`textures/${t}/entity/horse/horse_skeleton.png`,donkey:`textures/${t}/entity/horse/donkey.png`,mule:`textures/${t}/entity/horse/mule.png`,ocelot:k7,arrow:T7,spectral_arrow:M7,tipped_arrow:S7},d=c[o]||c[e];d&&(s.textureMap=!0);let h=d||Pi[e];if(Pi[e]&&(s.isHardcodedTexture=!0),!h)throw new Error(`No texture for ${e}`);let p=new J.TextureLoader().load(h);p.minFilter=J.NearestFilter,p.magFilter=J.NearestFilter;let g=new J.MeshBasicMaterial({map:p,transparent:!0,alphaTest:.1}),b=l.parse(Ae[e]),A=r6[o]||r6[e];A&&b.scale.set(A,A,A);let w=I7[o];w&&b.position.set(w.x,w.y,w.z),b.traverse(_=>{_ instanceof J.Mesh&&(_.material=g,_.name==="Head layer"&&(_.visible=!1),_.name==="Head"&&n.rotation?.head&&(_.rotation.x-=(n.rotation.head.x??0)*Math.PI/180,_.rotation.y-=(n.rotation.head.y??0)*Math.PI/180,_.rotation.z-=(n.rotation.head.z??0)*Math.PI/180))}),this.mesh=b,s.type="obj";return}let v=n6(e);if(v){this.mesh=new J.Object3D;for(let[l,c]of Object.entries(v.geometry)){let d=n.textures?.[l]??v.textures[l];if(!d)continue;let h=St(i,d.endsWith(".png")||d.startsWith("data:image/")||d.startsWith("block:")?d:d+".png",c,n,s);h.name=`geometry_${l}`,this.mesh.add(h)}s.type="bedrock"}}playAnimation(t,e=!1){if(!this.animationController||!this.animations)return;let i=this.animationController.playAnimation(t,e)}update(t){}static getStaticData(t){if(t=i6(t)||t,Ae[t])return{boneNames:[]};let e=n6(t);if(!e)throw new Error(`Unknown entity ${t}`);return{boneNames:Object.values(e.geometry).flatMap(i=>i.name)}}};globalThis.EntityMesh=_t;x();R();T();k();var Ee=r=>Math.max(0,Math.min(1,r)),s6=(r,t,e)=>Math.max(t,Math.min(e,r)),q0=(r,t,e)=>r+(t-r)*e,z7=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function O7(r){let t=r?.elytra;if(!t)return;if(typeof t.updateRightWing=="function"){t.updateRightWing();return}if(typeof t.updateRightWingRotation=="function"){t.updateRightWingRotation();return}let e=t.leftWing,i=t.rightWing;!e?.rotation||!i?.rotation||typeof i.rotation.copy=="function"&&(i.rotation.copy(e.rotation),i.rotation.z*=-1)}var r1=class extends N5{constructor(){super(...arguments);u(this,"switchAnimationCallback");u(this,"isRunning",!1);u(this,"isMoving",!0);u(this,"isCrouched",!1);u(this,"moveAmount",0);u(this,"runAmount",0);u(this,"lookYaw",0);u(this,"lookPitch",0);u(this,"_dt",0);u(this,"_phase",0);u(this,"_idlePhase",0);u(this,"_moveBlend",0);u(this,"_runBlend",0);u(this,"_crouchBlend",0);u(this,"_lookYawBlend",0);u(this,"_lookPitchBlend",0);u(this,"_swingTime",null);u(this,"_swingDuration",.25);u(this,"_defaults",null)}update(e,i){this._dt=i,super.update(e,i)}swingArm(){this._swingTime=0}resetLocomotion(){this._moveBlend=0,this._runBlend=0,this._crouchBlend=0,this._phase=0}_captureDefaults(e){let i=e?.skin;this._defaults={playerRot:e?.rotation?.clone?.(),bodyPos:i?.body?.position?.clone?.(),bodyRot:i?.body?.rotation?.clone?.(),leftArmPos:i?.leftArm?.position?.clone?.(),leftArmRot:i?.leftArm?.rotation?.clone?.(),rightArmPos:i?.rightArm?.position?.clone?.(),rightArmRot:i?.rightArm?.rotation?.clone?.(),leftLegPos:i?.leftLeg?.position?.clone?.(),leftLegRot:i?.leftLeg?.rotation?.clone?.(),rightLegPos:i?.rightLeg?.position?.clone?.(),rightLegRot:i?.rightLeg?.rotation?.clone?.(),headPos:i?.head?.position?.clone?.(),headRot:i?.head?.rotation?.clone?.(),capePos:e?.cape?.position?.clone?.(),capeRot:e?.cape?.rotation?.clone?.(),elytraPos:e?.elytra?.position?.clone?.(),elytraRot:e?.elytra?.rotation?.clone?.()}}_applyDefaults(e){let i=this._defaults;if(!i)return;let n=e?.skin,s=e?.cape,o=e?.elytra;i.playerRot&&e?.rotation&&e.rotation.copy(i.playerRot),i.bodyPos&&n?.body?.position&&n.body.position.copy(i.bodyPos),i.bodyRot&&n?.body?.rotation&&n.body.rotation.copy(i.bodyRot),i.leftArmPos&&n?.leftArm?.position&&n.leftArm.position.copy(i.leftArmPos),i.leftArmRot&&n?.leftArm?.rotation&&n.leftArm.rotation.copy(i.leftArmRot),i.rightArmPos&&n?.rightArm?.position&&n.rightArm.position.copy(i.rightArmPos),i.rightArmRot&&n?.rightArm?.rotation&&n.rightArm.rotation.copy(i.rightArmRot),i.leftLegPos&&n?.leftLeg?.position&&n.leftLeg.position.copy(i.leftLegPos),i.leftLegRot&&n?.leftLeg?.rotation&&n.leftLeg.rotation.copy(i.leftLegRot),i.rightLegPos&&n?.rightLeg?.position&&n.rightLeg.position.copy(i.rightLegPos),i.rightLegRot&&n?.rightLeg?.rotation&&n.rightLeg.rotation.copy(i.rightLegRot),i.headPos&&n?.head?.position&&n.head.position.copy(i.headPos),i.headRot&&n?.head?.rotation&&n.head.rotation.copy(i.headRot),i.capePos&&s?.position&&s.position.copy(i.capePos),i.capeRot&&s?.rotation&&s.rotation.copy(i.capeRot),i.elytraPos&&o?.position&&o.position.copy(i.elytraPos),i.elytraRot&&o?.rotation&&o.rotation.copy(i.elytraRot)}animate(e){let i=this._dt||0;this._defaults||this._captureDefaults(e),this._applyDefaults(e);let n=typeof this.moveAmount=="number"?this.moveAmount:this.isMoving?1:0,s=typeof this.runAmount=="number"?this.runAmount:this.isRunning?1:0,o=Ee(n),a=Ee(s),v=this.isCrouched?1:0,l=Math.min(1,i*8),c=Math.min(1,i*6),d=Math.min(1,i*7);this._moveBlend+=(o-this._moveBlend)*l,this._runBlend+=(a-this._runBlend)*c,this._crouchBlend+=(v-this._crouchBlend)*d;let h=Ee(this._moveBlend),p=Ee(this._runBlend),g=Ee(this._crouchBlend),b=q0(8,10,p),A=q0(1,.55,g),w=b*A;this._phase+=i*w*h,this._phase+=i*w*h,this._idlePhase+=i*1.15;let _=this._phase+(p>.5?Math.PI*.5:0);if(this.switchAnimationCallback&&Math.abs(Math.sin(_))<.02){let z=this.switchAnimationCallback;this.switchAnimationCallback=null,z?.()}L7(e,g);let S=80*Math.PI/180,M=75*Math.PI/180,C=s6(z7(this.lookYaw||0),-S,S),H=s6(this.lookPitch||0,-M,M),B=Math.min(1,i*14);this._lookYawBlend+=(C-this._lookYawBlend)*B,this._lookPitchBlend+=(H-this._lookPitchBlend)*B,e?.skin?.head?.rotation&&(e.skin.head.rotation.y+=this._lookYawBlend,e.skin.head.rotation.x+=this._lookPitchBlend);let I=(1-h)*(1-.25*p);if(I>1e-4&&e?.skin){let W=Math.sin(this._idlePhase);e.skin.body.rotation.x+=W*.02*I,e.skin.head.rotation.x+=-W*.015*I,e.skin.leftArm.rotation.x+=W*.03*I,e.skin.rightArm.rotation.x+=-W*.03*I,e?.cape?.rotation&&(e.cape.rotation.x+=Math.sin(this._idlePhase*.7)*.03*I)}if(h>1e-4&&e?.skin){let W=q0(1,.85,g),z=q0(1,.7,g),j=Math.sin(_)*.5,q=Math.sin(_+Math.PI)*.5,e0=Math.cos(_+Math.PI)*1.3,V=Math.cos(_)*1.3;e.skin.leftLeg.rotation.x+=q0(j,e0,p)*h*W,e.skin.rightLeg.rotation.x+=q0(q,V,p)*h*W;let Z=Math.sin(_+Math.PI)*.5,K=Math.sin(_)*.5,n0=Math.cos(_)*1.5,s0=Math.cos(_+Math.PI)*1.5;e.skin.leftArm.rotation.x+=q0(Z,n0,p)*h*z,e.skin.rightArm.rotation.x+=q0(K,s0,p)*h*z;let l0=Math.PI*.02,$=Math.PI*.1,u0=q0(l0,$,p),$0=Math.cos(_)*.03+l0,z0=Math.cos(_+Math.PI)*.03-l0,Y0=Math.cos(_)*.1+$,ct=Math.cos(_+Math.PI)*.1-$;e.skin.leftArm.rotation.z+=(q0($0,Y0,p)*h+u0*.15*h)*z,e.skin.rightArm.rotation.z+=(q0(z0,ct,p)*h-u0*.15*h)*z,this._defaults?.playerRot&&(e.rotation.z=this._defaults.playerRot.z+Math.cos(_+Math.PI)*.01*p*h);let dt=q0(Math.PI*.06,Math.PI*.3,p),M0=q0(Math.sin(_/1.5)*.06,Math.sin(_*2)*.1,p);e?.cape?.rotation&&(e.cape.rotation.x+=(dt+M0)*h)}if(this._swingTime!==null){this._swingTime+=i;let W=Math.min(this._swingTime/this._swingDuration,1);D7.animate(W,e,h>.2),W>=1&&(this._swingTime=null)}}},D7={animate(r,t,e){if(!t?.skin?.rightArm?.rotation)return;let i=r*18;if(t.skin.rightArm.rotation.x=-.4537860552*2+2*Math.sin(i+Math.PI)*.3,!e){let n=.01*Math.PI+.06;t.skin.rightArm.rotation.z=-Math.cos(i)*.403+n,t.skin.body.rotation.y=-Math.cos(i)*.06,t.skin.leftArm.rotation.x=Math.sin(i+Math.PI)*.077,t.skin.leftArm.rotation.z=-Math.cos(i)*.015+.13-.05,t.skin.leftArm.position.z=Math.cos(i)*.3,t.skin.leftArm.position.x=5-Math.cos(i)*.05}}};function L7(r,t){let e=r?.skin,i=r?.cape,n=r?.elytra;if(!e||!i)return;let s=Ee(t),o=Math.abs(Math.sin(s*Math.PI/2));if(o<=1e-6)return;e.body.rotation.x+=.4537860552*o,e.body.position.z+=(1.3256181-3.4500310377)*o,e.body.position.y+=-2.103677462*o,i.position.y+=-1.851236166577372*o,i.rotation.x+=.294220265771*o,i.position.z+=(3.786619432-3.4500310377)*o,n?.position&&n.position.copy(i.position),n?.rotation&&n.rotation.copy(i.rotation),n?.rotation&&(n.rotation.x-=10.8*Math.PI/180),n?.leftWing?.rotation&&(n.leftWing.rotation.z=q0(.72,.26179944+.4582006,o)),O7(r),e.head.position.y+=-3.618325234674*o;let a=.1*o,v=(3.618325234674-3.4500310377)*o,l=-2.53943318*o;e.leftArm.position.z+=v,e.rightArm.position.z+=v,e.leftArm.rotation.x+=.410367746202*o,e.rightArm.rotation.x+=.410367746202*o,e.leftArm.rotation.z+=a,e.rightArm.rotation.z+=-a,e.leftArm.position.y+=l,e.rightArm.position.y+=l,e.rightLeg.position.z+=-3.4500310377*o,e.leftLeg.position.z+=-3.4500310377*o}x();R();T();k();import{default as U7}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_1.png";import{default as G7}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_2.png";import{default as W7}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_1.png";import{default as N7}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_2.png";import{default as V7}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_1.png";import{default as j7}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_2.png";import{default as Y7}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_1.png";import{default as Q7}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_2.png";import{default as K7}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1.png";import{default as J7}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1_overlay.png";import{default as q7}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2.png";import{default as Z7}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2_overlay.png";import{default as X7}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_1.png";import{default as $7}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_2.png";import{default as t8}from"mc-assets/dist/other-textures/latest/models/armor/turtle_layer_1.png";import{default as a6}from"mc-assets/dist/other-textures/latest/entity/elytra.png";var Ct={skull:{bones:[{name:"head",pivot:[0,12,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0],inflate:1}]},{name:"overlay",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[32,0],inflate:1.2}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},head:{bones:[{name:"armor",pivot:[0,12,0]},{name:"head",parent:"armor",pivot:[0,12,0],cubes:[{origin:[-4,23,-4],size:[8,8,8],uv:[0,0],inflate:1}]},{name:"overlay",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,23,-4],size:[8,8,8],uv:[32,0],inflate:1.2}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},chest:{bones:[{name:"armor",pivot:[0,12,0]},{name:"body",parent:"armor",pivot:[0,13,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16],inflate:1}]},{name:"leftarm",parent:"armor",pivot:[5,10,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16],inflate:.85}]},{name:"rightarm",parent:"armor",pivot:[-5,10,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16],inflate:.85}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},legs:{bones:[{name:"armor",pivot:[0,12,0]},{name:"body",parent:"armor",pivot:[0,13,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16],inflate:.5}]},{name:"leftleg",parent:"armor",pivot:[1.9,1,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16],inflate:.5}]},{name:"rightleg",parent:"armor",pivot:[-1.9,1,0],cubes:[{origin:[-3.9,0,-2.01],size:[4,12,4],uv:[0,16],inflate:.5}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},feet:{bones:[{name:"armor",pivot:[0,12,0]},{name:"leftleg",parent:"armor",pivot:[1.9,1,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16],inflate:.8}]},{name:"rightleg",parent:"armor",pivot:[-1.9,1,0],cubes:[{origin:[-3.9,.01,-2.01],size:[4,12,4],uv:[0,16],inflate:.8}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32}};var o6={leather_layer_1:K7,leather_layer_1_overlay:J7,leather_layer_2:q7,leather_layer_2_overlay:Z7,chainmail_layer_1:U7,chainmail_layer_2:G7,iron_layer_1:Y7,iron_layer_2:Q7,diamond_layer_1:W7,diamond_layer_2:N7,golden_layer_1:V7,golden_layer_2:j7,netherite_layer_1:X7,netherite_layer_2:$7,turtle_layer_1:t8};var o5=kt(vt),e8=120,Ii=r=>r*(Math.PI/180),Hi=r=>Math.max(0,Math.min(1,r)),zi=(r,t,e)=>Math.max(t,Math.min(e,r)),xe=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function i8(r){return r<0&&(r=4294967295+r+1>>>0),r.toString(16)}function n8(r){if(r===void 0)return;if(parseInt(r,10)===0)return"rgba(0, 0, 0, 0)";let t=i8(parseInt(r,10));return t.length===8?`#${t.slice(2,8)}${t.slice(0,2)}`:`#${t}`}function v6(r,t){return r===void 0?t:r instanceof N.Quaternion?r:Array.isArray(r)?new N.Quaternion(r[0],r[1],r[2],r[3]):new N.Quaternion(r.x,r.y,r.z,r.w)}function lt(r,t){return r===void 0?t??new N.Euler:r instanceof N.Euler?r:r.yaw!==void 0&&r.pitch!==void 0&&r.roll!==void 0?new N.Euler(-Ii(r.pitch),-Ii(r.yaw),Ii(r.roll),"ZYX"):r.x!==void 0&&r.y!==void 0&&r.z!==void 0?new N.Euler(r.z,r.y,r.x,"ZYX"):Array.isArray(r)?new N.Euler(r[0],r[1],r[2]):t??new N.Euler}function u6({username:r,nameTagBackgroundColor:t="rgba(0, 0, 0, 0.3)",nameTagTextOpacity:e=255},{fontFamily:i="mojangles"},n){let s=L0(64,64),o=d6(n),a=s.getContext("2d");if(!a)throw new Error("Could not get 2d context");let v=48,l=5;a.font=`${v}px ${i}`;let c=String(typeof r=="string"?r:new o(r).toString()).split(`
21186
- `),d=0;for(let p of c){let g=a.measureText(p).width+l*2;g>d&&(d=g)}if(s.width=d,s.height=(v+l)*c.length,a.fillStyle=t,a.fillRect(0,0,s.width,s.height),a.globalAlpha=e/255,!!O1(r,o,s,v,"white",-l+v))return a.globalAlpha=1,s}globalThis.getUsernameTexture=u6;var o1=(r,t,e,i)=>{for(let v of e.children)v.name==="nametag"&&v.removeFromParent();if(r.username===void 0||r.username===null||(typeof r.username=="string"?r.username:new(d6(i))(r.username).toString()).startsWith("EMPTY"))return;let s=u6(r,t,i);if(!s)return;let o=new N.Texture(s);o.needsUpdate=!0;let a;if(r.nameTagFixed){let v=new N.PlaneGeometry,l=new N.MeshBasicMaterial({map:o});l.transparent=!0,a=new N.Mesh(v,l),a.rotation.set(r.pitch,N.MathUtils.degToRad(r.yaw+180),0),a.position.y+=r.height+.3}else{let v=new N.SpriteMaterial({map:o});a=new N.Sprite(v),a.position.y+=r.height+.6}return a.renderOrder=1e3,a.scale.set(s.width*.005,s.height*.005,1),r.nameTagRotationRight&&a.applyQuaternion(r.nameTagRotationRight),r.nameTagScale&&a.scale.multiply(r.nameTagScale),r.nameTagRotationLeft&&a.applyQuaternion(r.nameTagRotationLeft),r.nameTagTranslation&&a.position.add(r.nameTagTranslation),a.name="nametag",e.add(a),a},l6={},r8=r=>r.charAt(0)===r.charAt(0).toUpperCase();function s8(r,t,e,i,n){if(t.name)try{let l=(r8(t.name)?pi(t.name):t.name).toLowerCase(),c=new _t("1.16.4",l,e,n);if(c.mesh)return o1(t,i,c.mesh,e.version),c.mesh}catch(l){reportError?.(l)}if(!r||!(0,c6.isEntityAttackable)(r,t))return;let s=new N.BoxGeometry(t.width,t.height,t.width);s.translate(0,t.height/2,0);let o=new N.MeshBasicMaterial({color:16711935}),a=new N.Mesh(s,o);return(l6[t.name]=(l6[t.name]||0)+1)<6&&o1({username:t.name,height:t.height},i,a,e.version),a}var a1=class{constructor(t,e){this.worldRenderer=t;this.mcData=e;u(this,"entities",{});u(this,"playerEntity",null);u(this,"entitiesOptions",{fontFamily:"mojangles"});u(this,"debugMode");u(this,"onSkinUpdate");u(this,"clock",new N.Clock);u(this,"currentlyRendering",!0);u(this,"cachedMapsImages",{});u(this,"itemFrameMaps",{});u(this,"pendingModelOverrides",new Map);u(this,"motionCache",new Map);u(this,"_wasThirdPerson",!1);u(this,"_tpBodyYaw",0);u(this,"_tpHasBodyYaw",!1);u(this,"uuidPerSkinUrlsCache",{});u(this,"currentSkinUrls",{});u(this,"loadedSkinEntityIds",new Set);u(this,"playerPerAnimation",{});this.debugMode="none",this.onSkinUpdate=()=>{},this.watchResourcesUpdates()}updateAutoWalkFlags(t,e,i,n){if(!e.playerObject?.animation)return;let s=e.playerObject.animation;if(i<=0)return;let o=n??e.position,a=this.motionCache.get(t);if(!a){this.motionCache.set(t,{pos:o.clone(),speed:0}),s.isMoving=!1,s.isRunning=!1,s.moveAmount=0,s.runAmount=0;return}let v=o.x-a.pos.x,l=o.z-a.pos.z;a.pos.copy(o);let c=Math.hypot(v,l)/Math.max(i,1e-6),d=1-Math.exp(-i*12);a.speed+=(c-a.speed)*d;let h=a.speed,p=(M,C,H)=>{let B=Hi((H-M)/(C-M));return B*B*(3-2*B)},g=.08,b=.6,A=4.3,w=5.6,_=p(g,b,h),S=p(A,w,h);s.moveAmount=_,s.runAmount=S,s.isMoving=_>.15,s.isRunning=S>.55}getLocalSneak(){let t=this.worldRenderer.playerStateReactive;return t?.movementState==="SNEAKING"||t?.movementState==="CROUCHING"||!!t?.isSneaking||!!t?.sneaking||!!t?.isCrouching||!!t?.crouching||!!t?.controls?.sneak||!!t?.controlState?.sneak}updateThirdPersonHeadAndBody(t,e){let i=t.playerObject?.animation,n=this.worldRenderer.cameraShake.getBaseRotation(),s=n.yaw,o=n.pitch,a=Hi(i?.moveAmount??(i?.isMoving?1:0)),v=Hi(i?.runAmount??(i?.isRunning?1:0)),l=a>.15;if(this._tpHasBodyYaw||(this._tpHasBodyYaw=!0,this._tpBodyYaw=s),l){let g=1-Math.exp(-e*(18+10*v));this._tpBodyYaw=this._tpBodyYaw+xe(s-this._tpBodyYaw)*g,t.rotation.set(0,this._tpBodyYaw,0);let b=(25-8*v)*Math.PI/180,A=zi(xe(s-this._tpBodyYaw),-b,b);i&&"lookYaw"in i&&(i.lookYaw=A),i&&"lookPitch"in i&&(i.lookPitch=-o);return}let c=85*Math.PI/180,d=55*Math.PI/180,h=xe(s-this._tpBodyYaw);h=zi(h,-c,c);let p=Math.abs(h)-d;if(p>0){let g=p/(c-d),b=s-Math.sign(h)*d,A=1-Math.exp(-e*(6+10*g));this._tpBodyYaw=this._tpBodyYaw+xe(b-this._tpBodyYaw)*A,h=xe(s-this._tpBodyYaw),h=zi(h,-c,c)}else{let g=1-Math.exp(-e*5);this._tpBodyYaw=this._tpBodyYaw+xe(s-this._tpBodyYaw)*(g*.15)}t.rotation.set(0,this._tpBodyYaw,0),i&&"lookYaw"in i&&(i.lookYaw=h),i&&"lookPitch"in i&&(i.lookPitch=-o)}get entitiesByName(){let t={};for(let e of Object.values(this.entities))e.realName&&(t[e.realName]=t[e.realName]||[],t[e.realName].push(e));return t}get entitiesRenderingCount(){return Object.values(this.entities).filter(t=>t.visible).length}getDebugString(){let t=Object.keys(this.entities).length,e=this.entitiesRenderingCount,i=Object.values(this.entities).filter(s=>s.playerObject),n=i.filter(s=>s.visible);return`${e}/${t} ${n.length}/${i.length}`}handlePlayerEntity(t){if(!this.playerEntity){let e=new N.Group;e.originalEntity={...t,name:"player"};let i=new N.Group,n=this.setupPlayerObject(t,i,{});e.playerObject=n,e.add(i),e.name="player_entity",this.playerEntity=e,this.worldRenderer.scene.add(e),this.updatePlayerSkin(t.id,t.username,t.uuid??void 0,vt)}this.playerEntity.originalEntity={...t,name:"player"},t.position&&(this.worldRenderer.sceneOrigin.getWorldPosition(this.playerEntity)||this.worldRenderer.sceneOrigin.track(this.playerEntity),this.playerEntity.position.set(t.position.x,t.position.y,t.position.z)),t.yaw!==void 0&&(this.playerEntity.rotation.y=t.yaw),this.updateEntityEquipment(this.playerEntity,t)}clear(){for(let t of Object.values(this.entities))this.worldRenderer.sceneOrigin.removeAndUntrack(t),A0(t);this.entities={},this.currentSkinUrls={},this.motionCache.clear(),this._wasThirdPerson=!1,this._tpHasBodyYaw=!1,this.playerEntity&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.playerEntity),A0(this.playerEntity),this.playerEntity=null)}reloadEntities(){for(let t of Object.values(this.entities))this.update({...t.originalEntity,delete:!0},{}),this.update(t.originalEntity,{})}watchResourcesUpdates(){this.worldRenderer.resourcesManager.on("assetsTexturesUpdated",()=>this.reloadEntities()),this.worldRenderer.resourcesManager.on("assetsInventoryReady",()=>this.reloadEntities())}setDebugMode(t,e=null){this.debugMode=t;for(let i of e?[e]:Object.values(this.entities)){let n=i.children.find(s=>s.name==="debug");n.visible=!1,this.debugMode==="basic"&&(n.visible=!0)}}setRendering(t,e=null){this.currentlyRendering=t;for(let i of e?[e]:Object.values(this.entities))t?this.worldRenderer.scene.children.includes(i)||this.worldRenderer.scene.add(i):this.worldRenderer.scene.remove(i)}playEntityModelAnimation(t,e,i=!1){let n=this.entities[t];n&&n.traverse(s=>{s instanceof _t&&s.playAnimation(e,i)})}render(){let t=this.worldRenderer.worldRendererConfig.renderEntities;t!==this.currentlyRendering&&this.setRendering(t);let e=this.clock.getDelta(),i=Math.min(e,1/30),n=this.worldRenderer.viewerChunkPosition,s=10*10,o=this.worldRenderer.playerStateUtils.isThirdPerson();if(o!==this._wasThirdPerson){this._wasThirdPerson=o;let a=String(this.playerEntity?.originalEntity.id??"player_entity");this.motionCache.delete(a);let v=this.playerEntity?.playerObject?.animation;v?.resetLocomotion&&v.resetLocomotion(),this._tpHasBodyYaw=!1}for(let[a,v]of[...Object.entries(this.entities),["player_entity",this.playerEntity]]){if(!v)continue;let l=a==="player_entity",c=String(l?this.playerEntity?.originalEntity.id??"player_entity":a);if(l)if(v.visible=o,o){let h=this.worldRenderer.playerStateReactive.eyeHeight;v.position.set(this.worldRenderer.cameraWorldPos.x,this.worldRenderer.cameraWorldPos.y-h,this.worldRenderer.cameraWorldPos.z);let p=this.worldRenderer.playerStateReactive.position;if(p&&typeof p.x=="number")this.updateAutoWalkFlags(c,v,e,new N.Vector3(p.x,p.y,p.z));else{let g=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,e,g?new N.Vector3(g.x,g.y,g.z):v.position)}this.updateThirdPersonHeadAndBody(v,i)}else{let h=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,e,h?new N.Vector3(h.x,h.y,h.z):v.position)}else{let h=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,e,h?new N.Vector3(h.x,h.y,h.z):v.position)}let{playerObject:d}=v;if(d?.animation){let h=d.animation,g=(Number(v.originalEntity?.metadata?.[0]??0)&2)!==0,b=this.getLocalSneak();"isCrouched"in h&&(h.isCrouched=l?b:g),d.animation.update(d,i)}if(v.traverse(h=>{h instanceof _t&&h.update(i)}),!l&&n&&v.position){let h=v.position.x-n.x,p=v.position.y-n.y,g=v.position.z-n.z,b=h*h+p*p+g*g;v.visible=!!(b<s||this.worldRenderer.shouldObjectVisible(v)),this.maybeRenderPlayerSkin(a)}v.visible&&this.syncArmorPositions(v)}}syncArmorPositions(t){t.playerObject&&t.traverse(e=>{if(!e.name.startsWith("geometry_armor_"))return;let{skin:i}=t.playerObject;switch(e.name){case"geometry_armor_head":e.children[0]?.children[0]&&e.children[0].children[0].rotation.set(-i.head.rotation.x,i.head.rotation.y,i.head.rotation.z,i.head.rotation.order);break;case"geometry_armor_legs":e.children[0]&&(e.children[0].children[2]&&e.children[0].children[2].rotation.set(-i.leftLeg.rotation.x,i.leftLeg.rotation.y,i.leftLeg.rotation.z,i.leftLeg.rotation.order),e.children[0].children[1]&&e.children[0].children[1].rotation.set(-i.rightLeg.rotation.x,i.rightLeg.rotation.y,i.rightLeg.rotation.z,i.rightLeg.rotation.order));break;case"geometry_armor_feet":e.children[0]&&(e.children[0].children[0]&&e.children[0].children[0].rotation.set(-i.rightLeg.rotation.x,i.rightLeg.rotation.y,i.rightLeg.rotation.z,i.rightLeg.rotation.order),e.children[0].children[1]&&e.children[0].children[1].rotation.set(-i.leftLeg.rotation.x,i.leftLeg.rotation.y,-i.leftLeg.rotation.z,i.leftLeg.rotation.order));break}})}getPlayerObject(t){return this.playerEntity?.originalEntity.id===t?this.playerEntity?.playerObject:this.entities[t]?.playerObject}isCanvasBlank(t){return!t.getContext("2d")?.getImageData(0,0,t.width,t.height).data.some(e=>e!==0)}async updatePlayerSkin(t,e,i,n,s=void 0){n!==vt&&this.loadedSkinEntityIds.add(String(t)),i&&((typeof n=="string"||typeof s=="string")&&(this.uuidPerSkinUrlsCache[i]={}),typeof n=="string"&&(this.uuidPerSkinUrlsCache[i].skinUrl=n),typeof s=="string"&&(this.uuidPerSkinUrlsCache[i].capeUrl=s),n===!0&&(n=this.uuidPerSkinUrlsCache[i]?.skinUrl??n),s??(s=this.uuidPerSkinUrlsCache[i]?.capeUrl));let a=this.getPlayerObject(t);if(!a)return;if(n===!0){if(!e)return;let l=await Tt(e,"skin");if(!this.getPlayerObject(t)||!l)return;n=l}if(typeof n!="string")throw new Error("Invalid skin url");if(this.currentSkinUrls[String(t)]===n){if(s){if(s===!0&&e){let l=await Tt(e,"cape");if(!this.getPlayerObject(t)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(t,s)}return}n!==vt&&(this.currentSkinUrls[String(t)]=n);let v=this.worldRenderer.worldRendererConfig.renderEars||e==="deadmau5";this.loadAndApplySkin(t,n,v).then(async()=>{if(s){if(s===!0&&e){let l=await Tt(e,"cape");if(!this.getPlayerObject(t)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(t,s)}}),a.cape.visible=!1,s||(a.backEquipment=null,a.elytra.map=null,a.cape.map&&a.cape.map.dispose(),a.cape.map=null)}async loadAndApplySkin(t,e,i){let n=this.getPlayerObject(t);if(n)try{let s;if(n=this.getPlayerObject(t),!n)return;let o,a;if(e===vt){o=await o5;let l=L0(64,64),c=l.getContext("2d");if(!c)throw new Error("Failed to get context");c.drawImage(o.image,0,0),a=l}else{let{canvas:l,image:c}=await Qt(e);s=c,o=new N.CanvasTexture(l),a=l}o.magFilter=N.NearestFilter,o.minFilter=N.NearestFilter,o.needsUpdate=!0,n.skin.map=o,n.skin.modelType=K1(a),n.skin.isCustom=e!==vt;let v;if(s?i&&(v=document.createElement("canvas"),J1(v,s),i=!this.isCanvasBlank(v)):i=!1,i){let l=new N.CanvasTexture(v);l.magFilter=N.NearestFilter,l.minFilter=N.NearestFilter,l.needsUpdate=!0,n.ears.map=l,n.ears.visible=!0}else n.ears.map=null,n.ears.visible=!1;this.onSkinUpdate?.()}catch{}}async loadAndApplyCape(t,e){let i=this.getPlayerObject(t);if(i)try{let{canvas:n,image:s}=await Qt(e);if(i=this.getPlayerObject(t),!i)return;Q1(n,s);let o=new N.CanvasTexture(n);o.magFilter=N.NearestFilter,o.minFilter=N.NearestFilter,o.needsUpdate=!0,i.cape.map=o,i.cape.visible=!0,i.elytra.map=o,this.onSkinUpdate?.(),i.backEquipment||(i.backEquipment="cape")}catch{}}debugSwingArm(){let t=Object.values(this.entities).find(i=>i.playerObject?.animation);if(!t||!t.playerObject?.animation)return;let e=t.playerObject.animation;e.swingArm&&e.swingArm()}playAnimation(t,e){let i=String(t);if(this.playerPerAnimation[i]===e)return;if(this.playerPerAnimation[i]=e,t==="player_entity"&&this.playerEntity?.playerObject){let{playerObject:s}=this.playerEntity;if(e==="oneSwing"){s.animation&&s.animation.swingArm&&s.animation.swingArm();return}s.animation&&s.animation.switchAnimationCallback!==void 0&&(s.animation.switchAnimationCallback=()=>{let o=s.animation;o&&(o.isMoving=e==="walking"||e==="running"||e==="crouchWalking",o.isRunning=e==="running",o.isCrouched=e==="crouch"||e==="crouchWalking")});return}let n=this.getPlayerObject(t);if(n){if(e==="oneSwing"){n.animation&&n.animation.swingArm&&n.animation.swingArm();return}n.animation&&n.animation.switchAnimationCallback!==void 0&&(n.animation.switchAnimationCallback=()=>{let s=n.animation;s&&(s.isMoving=e==="walking"||e==="running"||e==="crouchWalking",s.isRunning=e==="running",s.isCrouched=e==="crouch"||e==="crouchWalking")});return}if(this.playerEntity?.playerObject){let{playerObject:s}=this.playerEntity;if(e==="oneSwing"){s.animation&&s.animation.swingArm&&s.animation.swingArm();return}s.animation&&s.animation.switchAnimationCallback!==void 0&&(s.animation.switchAnimationCallback=()=>{let o=s.animation;o&&(o.isMoving=e==="walking"||e==="running"||e==="crouchWalking",o.isRunning=e==="running",o.isCrouched=e==="crouch"||e==="crouchWalking")})}}parseEntityLabel(t){if(t)try{if(t.type==="string")return t.value;let e=typeof t=="string"?r5.default.simplify(r5.default.parse(t)):Di.simplify(t);return ui(e).map(this.textFromComponent).join("")}catch{return t}}textFromComponent(t){return typeof t=="string"?t:t.text??""}getItemMesh(t,e,i=!1,n){!t.nbt&&t.nbtData&&(t.nbt=t.nbtData);let s=this.worldRenderer.getItemRenderData(t,e);if(!(n&&n===s?.modelName)){if(s&&"resolvedModel"in s){let o=qr(this.worldRenderer.material,s.resolvedModel,s.modelName,this.worldRenderer.resourcesManager.currentResources.worldBlockProvider,this.worldRenderer.resourcesManager.currentResources.mcData),a=1;e["minecraft:display_context"]==="ground"?a=.5:e["minecraft:display_context"]==="thirdperson"&&(a=6),o.scale.set(a,a,a);let v=new N.Group;return v.add(o),{mesh:v,isBlock:!0,modelName:s.modelName}}if(s){let o=s.renderInfo?.texture==="blocks"?this.worldRenderer.material.map:this.worldRenderer.itemsTexture,{u:a,v,su:l,sv:c}=s,p=Zr(o,{u:a,v,sizeX:l??1,sizeY:c??1},{faceCamera:i,use3D:!i}),g=1;return e["minecraft:display_context"]==="ground"?g=.5:e["minecraft:display_context"]==="thirdperson"&&(g=6),p.mesh.scale.set(g,g,g),{mesh:p.mesh,isBlock:!1,modelName:s.modelName,cleanup:p.cleanup}}}}setVisible(t,e){e?t.scale.set(1,1,1):t.scale.set(0,0,0)}update(t,e){let i=t.name==="player";(t.name==="zombie_villager"||t.name==="husk")&&(e.texture=`textures/1.16.4/entity/${t.name==="zombie_villager"?"zombie_villager/zombie_villager.png":`zombie/${t.name}.png`}`),t.name==="glow_item_frame"&&(e.textures||(e.textures=[]),e.textures.background="block:glow_item_frame");let n=this.entities[t.id],s=!n;if(t.delete){if(!n)return;n.userData._posTween?.stop(),n.additionalCleanup&&n.additionalCleanup(),n.traverse(p=>{p.additionalCleanup&&p.additionalCleanup()}),this.onRemoveEntity(t),this.worldRenderer.sceneOrigin.removeAndUntrack(n),A0(n),delete this.entities[t.id];return}let o;if(n===void 0){this.beforeEntityAdded(t);let p=new N.Group;if(p.originalEntity=t,t.name==="item"||t.name==="tnt"||t.name==="falling_block"||t.name==="snowball"||t.name==="egg"||t.name==="ender_pearl"||t.name==="experience_bottle"||t.name==="splash_potion"||t.name==="lingering_potion"){let A=t.name==="tnt"||t.type==="projectile"?{name:t.name}:t.name==="falling_block"?{blockState:t.objectData}:t.metadata?.find(w=>typeof w=="object"&&w?.itemCount);if(A){let w=this.getItemMesh(A,{"minecraft:display_context":"ground"},t.type==="projectile");if(w){if(o=w.mesh,t.name==="item"||t.type==="projectile"?(o.scale.set(.5,.5,.5),o.position.set(0,t.name==="item"?.2:.1,0)):(o.scale.set(2,2,2),o.position.set(0,.5,0)),t.name==="item"){let _=new N.Clock;o.onBeforeRender=()=>{let S=_.getDelta();o.rotation.y+=S}}p.additionalCleanup=()=>{w.cleanup&&w.cleanup()}}}}else if(i){let A=new N.Group,w=this.setupPlayerObject(t,A,e);if(p.playerObject=w,o=A,t.username){let _=o1(t,{fontFamily:"mojangles"},A,this.worldRenderer.version);_&&(_.position.y=w.position.y+w.scale.y*16+3,_.scale.multiplyScalar(12))}}else o=s8(this.mcData,t,this.worldRenderer,this.entitiesOptions,{...e,customModel:t.customModel});if(!o)return;o.name="mesh";let g=t.pos??t.position;this.worldRenderer.sceneOrigin.track(p),p.position.set(g.x,g.y,g.z);let b=new N.BoxHelper(o,t.type==="hostile"?16711680:t.type==="mob"?65280:t.type==="player"?255:16753920);b.name="debug",p.add(o),p.add(b),b.visible=!1,this.worldRenderer.scene.add(p),n=p,n.name="entity",n.realName=t.name,this.entities[t.id]=n,i&&this.updatePlayerSkin(t.id,t.username,e?.texture?t.uuid:void 0,e?.texture||vt),this.setDebugMode(this.debugMode,p),this.setRendering(this.currentlyRendering,p),this.afterAddEntity(t)}else o=n.children.find(p=>p.name==="mesh");this.updateEntityEquipment(n,t);let a=f6(t,this.mcData),v=(t.metadata?.[0]??0)&32||this.worldRenderer.playerStateReactive.cameraSpectatingEntity===t.id&&this.worldRenderer.playerStateUtils.isSpectator();for(let p of o.children??[])p.name!=="nametag"&&(p.visible=!v);a.baby?n.scale.set(.5,.5,.5):n.scale.set(1,1,1);let l=s1("text_display",t,this.mcData),c=l?.text||a.custom_name_visible&&a.custom_name;if(t.name!=="player"&&c){let p=l&&(l.billboard_render_constraints==="fixed"||!l.billboard_render_constraints),g=l&&!(parseInt(l.style_flags,10)&4)?n8(l.background_color):void 0,b;if(l?.text_opacity){let A=parseInt(l?.text_opacity,10);b=A>0?A:256-A}o1({...t,username:typeof c=="string"?r5.default.simplify(r5.default.parse(c)):Di.simplify(c),nameTagBackgroundColor:g,nameTagTextOpacity:b,nameTagFixed:p,nameTagScale:l?.scale,nameTagTranslation:l&&(l.translation||new N.Vector3(0,0,0)),nameTagRotationLeft:v6(l?.left_rotation),nameTagRotationRight:v6(l?.right_rotation)},this.entitiesOptions,o,this.worldRenderer.version)}let d=s1("armor_stand",t,this.mcData);if(d){let p=(parseInt(d.client_flags,10)&1)!==0,g=(parseInt(d.client_flags,10)&4)!==0,b=(parseInt(d.client_flags,10)&8)===0,A=(parseInt(d.client_flags,10)&16)!==0;o.castShadow=!A,o.receiveShadow=!A,p?n.scale.set(.5,.5,.5):n.scale.set(1,1,1),n.traverse(w=>{switch(w.name){case"bone_baseplate":this.setVisible(w,b),w.rotation.y=-n.rotation.y;break;case"bone_head":d.head_pose&&w.setRotationFromEuler(lt(d.head_pose));break;case"bone_body":d.body_pose&&w.setRotationFromEuler(lt(d.body_pose));break;case"bone_rightarm":w.parent?.name!=="bone_armor"&&this.setVisible(w,g),d.left_arm_pose?w.setRotationFromEuler(lt(d.left_arm_pose)):w.setRotationFromEuler(lt({yaw:-10,pitch:-10,roll:0}));break;case"bone_leftarm":w.parent?.name!=="bone_armor"&&this.setVisible(w,g),d.right_arm_pose?w.setRotationFromEuler(lt(d.right_arm_pose)):w.setRotationFromEuler(lt({yaw:10,pitch:-10,roll:0}));break;case"bone_rightleg":d.left_leg_pose?w.setRotationFromEuler(lt(d.left_leg_pose)):w.setRotationFromEuler(lt({yaw:-1,pitch:-1,roll:0}));break;case"bone_leftleg":d.right_leg_pose?w.setRotationFromEuler(lt(d.right_leg_pose)):w.setRotationFromEuler(lt({yaw:1,pitch:1,roll:0}));break}})}let h=s1("item_frame",t,this.mcData);if(h||(h=s1("glow_item_frame",t,this.mcData)),h){let p=h?.item??t.metadata?.[8];if(o.scale.set(1,1,1),o.position.set(0,0,-.5),n.rotation.x=-t.pitch,n.children.find(g=>{if(g.name.startsWith("map_")){A0(g);let b=parseInt(g.name.split("_")[1],10);return this.itemFrameMaps[b]=this.itemFrameMaps[b]?.filter(A=>A!==g),g instanceof N.Mesh&&g.material?.map?.dispose(),!0}else if(g.name==="item")return A0(g),!0;return!1})?.removeFromParent(),p&&(p.itemId??p.blockId??0)!==0){let g=h.rotation??0,b=p.nbtData?.value?.map?.value??p.components?.find(A=>A.type==="map_id")?.data;if(b)o.scale.set(16/12,16/12,1),this.addMapModel(n,b,g);else{let A=this.getItemMesh(p,{"minecraft:display_context":"fixed"});A&&(A.mesh.position.set(0,0,-.05),A.isBlock?A.mesh.scale.set(.25,.25,.25):A.mesh.scale.set(.5,.5,.5),A.mesh.rotateY(Math.PI),A.mesh.rotateZ(-g*Math.PI/4),A.mesh.name="item",n.add(A.mesh))}}}t.username!==void 0&&(n.username=t.username),this.updateNameTagVisibility(n),this.updateEntityPosition(t,s,e)}updateEntityPosition(t,e,i){let n=this.entities[t.id];if(!n)return;let s=e?0:e8;if(t.position){let o=this.worldRenderer.sceneOrigin.getWorldPosition(n)??{x:t.position.x,y:t.position.y,z:t.position.z};n.userData._tweenTarget||(n.userData._tweenTarget={x:o.x,y:o.y,z:o.z}),n.userData._posTween?.stop(),n.userData._posTween=new S0(n.userData._tweenTarget).to({x:t.position.x,y:t.position.y,z:t.position.z},s).onUpdate(()=>{n.position.set(n.userData._tweenTarget.x,n.userData._tweenTarget.y,n.userData._tweenTarget.z)}).start()}if(t.yaw){let o=(t.yaw-n.rotation.y)%(Math.PI*2),a=2*o%(Math.PI*2)-o;new S0(n.rotation).to({y:n.rotation.y+a},s).start()}if(n?.playerObject&&i?.rotation?.head){let{playerObject:o}=n,a=i.rotation.head.y?i.rotation.head.y-t.yaw:0;o.skin.head.rotation.y=-a,o.skin.head.rotation.x=i.rotation.head.x?-i.rotation.head.x:0}}afterAddEntity(t){}beforeEntityAdded(t){let e=this.pendingModelOverrides.get(t.id.toString());if(e){let{modelPath:i,modelType:n,metadata:s}=e;t.customModel={modelPath:i,modelType:n,metadata:s},this.pendingModelOverrides.delete(t.id.toString())}}maybeRenderPlayerSkin(t){let e=this.entities[t];if(t==="player_entity"&&(e=this.playerEntity,t=this.playerEntity?.originalEntity.id),!e||!e.playerObject||!e.visible)return;let i=128,n=this.worldRenderer.getCameraPosition(),s=this.worldRenderer.sceneOrigin.getWorldPosition(e),a=(s?new N.Vector3(s.x,s.y,s.z):e.position.clone().add(new N.Vector3(this.worldRenderer.sceneOrigin.x,this.worldRenderer.sceneOrigin.y,this.worldRenderer.sceneOrigin.z))).distanceTo(n);if(a<i&&a<this.worldRenderer.viewDistance*16){if(this.loadedSkinEntityIds.has(String(t)))return;this.updatePlayerSkin(t,e.playerObject.realUsername,e.playerObject.realPlayerUuid,!0,!0)}}onRemoveEntity(t){this.loadedSkinEntityIds.delete(t.id.toString()),delete this.currentSkinUrls[t.id.toString()],this.motionCache.delete(t.id.toString())}updateMap(t,e){this.cachedMapsImages[t]=e;let i=this.itemFrameMaps[t];if(i&&(i=i.filter(n=>n.parent),this.itemFrameMaps[t]=i,i))for(let n of i)n.material.map=this.loadMap(e),n.material.needsUpdate=!0,n.visible=!0}updateNameTagVisibility(t){let e=this.worldRenderer.playerStateReactive.team,i=t.originalEntity.team,n=i?.nameTagVisibility||"always",s=n==="always"||n==="hideForOwnTeam"&&i?.team!==e?.team||n==="hideForOtherTeams"&&(i?.team===e?.team||e===void 0);t.traverse(o=>{o.name==="nametag"&&(o.visible=s)})}addMapModel(t,e,i){let n=this.cachedMapsImages?.[e],s=null;n&&(s=this.loadMap(n));let o={transparent:!0,alphaTest:.1};s&&(o.map=s);let a=new N.MeshLambertMaterial(o),v=new N.Mesh(new N.PlaneGeometry(1,1),a);v.rotation.set(0,Math.PI,0),t.add(v);let l=!0;t.traverseVisible(c=>{c.name==="geometry_frame"&&(l=!1)}),l?v.position.set(0,0,.499):v.position.set(0,0,.437),v.rotateZ(Math.PI*2-i*Math.PI/2),v.name=`map_${e}`,s||(v.visible=!1),this.itemFrameMaps[e]||(this.itemFrameMaps[e]=[]),this.itemFrameMaps[e].push(v)}loadMap(t){let e=new N.TextureLoader().load(t);return e&&(e.magFilter=N.NearestFilter,e.minFilter=N.NearestFilter,e.needsUpdate=!0),e}addItemModel(t,e,i,n=!1){let s=`bone_${e}item`,o=`custom_item_${e}`;if(t.traverse(v=>{v.name===o&&(v.removeFromParent(),v.additionalCleanup&&v.additionalCleanup())}),!i)return;let a=this.getItemMesh(i,{"minecraft:display_context":"thirdperson"});a?.mesh&&t.traverse(v=>{if(v.name.toLowerCase()===s||v.name===`${e}Arm`){let l=new N.Object3D;l.additionalCleanup=()=>{a.cleanup&&a.cleanup()};let c=a.mesh;l.rotation.z=-Math.PI/16,a.isBlock?l.rotation.y=Math.PI/4:(c.rotation.z=-Math.PI/4,l.rotation.y=Math.PI/2,l.scale.multiplyScalar(2)),n&&(l.position.y=-8,l.position.z=5,l.position.x=e==="left"?1:-1,l.rotation.x=Math.PI),l.add(c),l.name=o,v.add(l)}})}handleDamageEvent(t,e){let i=this.entities[t]?.children.find(n=>n.name==="mesh");i&&i.traverse(n=>{if(n instanceof N.Mesh&&n.material.clone){n.material.clone().dispose(),n.material=n.material.clone();let o=n.material.color.clone();n.material.color.set(16711680),new S0(n.material.color).to(o,500).start()}})}raycastSceneDebug(){let t=new N.Raycaster;return t.setFromCamera(new N.Vector2(0,0),this.worldRenderer.camera),t.intersectObjects(this.worldRenderer.scene.children)[0]?.object}updateEntityModel(t,e,i,n){this.pendingModelOverrides.set(t,{modelPath:e,modelType:i,metadata:n});let s=this.entities[t];s&&(this.update({...s.originalEntity,delete:!0},{}),this.update(s.originalEntity,{}))}setupPlayerObject(t,e,i){let n=new Qe;n.realPlayerUuid=t.uuid??"",n.realUsername=t.username??"",n.position.set(0,16,0),n.traverse(o=>{o instanceof N.Mesh&&o.material instanceof N.MeshStandardMaterial&&(o.material.transparent=!0)}),e.add(n);let s=1/16;return e.scale.set(s,s,s),e.rotation.set(0,Math.PI,0),n.animation=new r1,n.animation.isMoving=!1,n}updateEntityEquipment(t,e){if(!t||!e.equipment)return;let i=e.type==="player";if(this.addItemModel(t,i?"right":"left",e.equipment[0],i),this.addItemModel(t,i?"left":"right",e.equipment[1],i),s5(this.worldRenderer,t,"feet",e.equipment[2]),s5(this.worldRenderer,t,"legs",e.equipment[3],2),s5(this.worldRenderer,t,"chest",e.equipment[4]),s5(this.worldRenderer,t,"head",e.equipment[5]),i&&t.playerObject){let{playerObject:n}=t;n.backEquipment=e.equipment.some(s=>s?.name==="elytra")?"elytra":"cape",n.backEquipment==="elytra"&&this.loadAndApplyCape(e.id,a6),n.cape.map===null&&(n.cape.visible=!1)}}};function f6(r,t){let e=t?.entitiesByName[r.name];return new Proxy({},{get(i,n,s){if(typeof n!="string"||!e)return;let o=e.metadataKeys?.indexOf(n);return r.metadata?.[o??-1]}})}function s1(r,t,e){if(t.name===r)return f6(t,e)}function s5(r,t,e,i,n=1,s=!1){if(!i){Oi(t,e);return}let o=i.name.split("_"),a,v=e==="head"&&i.name==="player_head";if(v)if(Oi(t,e),i.nbt){let g=Di.simplify(i.nbt);try{let b;if(g.SkullOwner?b=g.SkullOwner.Properties.textures[0]?.Value:b=g["minecraft:profile"]?.Properties?.find(A=>A.name==="textures")?.value,b){a=JSON.parse(L.from(b,"base64").toString()).textures?.SKIN?.url;let{skinTexturesProxy:w}=r.worldRendererConfig;w&&(a=a?.replace("http://textures.minecraft.net/",w).replace("https://textures.minecraft.net/",w))}}catch{}}else a=vt;let l=o[0];if(!a){let g=`${l}_layer_${n}${s?"_overlay":""}`;a=r.resourcesManager.currentResources.customTextures.armor?.textures[g]?.src??o6[g]}if(!a||!Ct[e]){Oi(t,e);return}let c=`geometry_armor_${e}${s?"_overlay":""}`,d=t.children.findLast(g=>g.name===c),h;if(d?(h=d.material,F5(a,g=>{g.magFilter=N.NearestFilter,g.minFilter=N.NearestFilter,g.flipY=!1,g.wrapS=N.MirroredRepeatWrapping,g.wrapT=N.MirroredRepeatWrapping,h.map=g})):(d=St(r,a,Ct[e]),e==="head"&&(d.children[0].position.y+=.01),d.name=c,h=d.material,v||(h.side=N.DoubleSide)),l==="leather"&&!s){let g=i.nbt?.value?.display?.value?.color?.value;if(g){let b=g>>16&255,A=g>>8&255,w=g&255;h.color.setRGB(b/255,A/255,w/255)}else h.color.setHex(11890001);s5(r,t,e,i,n,!0)}else h.color.setHex(16777215);let p=new N.Object3D;p.name=`armor_${e}${s?"_overlay":""}`,p.add(d),t.add(d)}function Oi(r,t){for(let e of r.children)(e.name===`geometry_armor_${t}`||e.name===`geometry_armor_${t}_overlay`)&&e.removeFromParent()}var e5=async(r,t)=>{let e;if(!r&&!t)e=await o5;else{if(r||(r=await Tt(t,"skin")),!r)return;let{canvas:l}=await Qt(r);e=new H0.CanvasTexture(l)}e.magFilter=H0.NearestFilter,e.minFilter=H0.NearestFilter;let i=!1,s=o8(40,16,i?-2:-3,-2,-2,i?3:4,12,4,64,64),o=new H0.MeshStandardMaterial;o.map=e,o.needsUpdate=!0;let a=new H0.Mesh(s,o),v=new H0.Group;return v.add(a),v};function o8(r,t,e,i,n,s,o,a,v,l,c=!1){let d=e/16,h=i/16,p=n/16,g=(e+s)/16,b=(i+o)/16,A=(n+a)/16;c&&([d,g]=[g,d]);let w=[[d,h,p],[g,h,p],[g,b,p],[d,b,p],[d,h,A],[g,h,A],[g,b,A],[d,b,A]],_=r,S=r+a,M=r+a+s,C=r+a+s+s,H=r+a+s+a,B=r+a+s+a+s,I=t,W=t+a,z=t+a+o,j=[{vi:[5,4,0,1],uv:[S,I,M,W],n:[0,-1,0]},{vi:[2,3,7,6],uv:[M,W,C,I],n:[0,1,0]},{vi:[0,4,7,3],uv:[_,W,S,z],n:[-1,0,0]},{vi:[1,0,3,2],uv:[S,W,M,z],n:[0,0,-1]},{vi:[5,1,2,6],uv:[M,W,H,z],n:[1,0,0]},{vi:[4,5,6,7],uv:[H,W,B,z],n:[0,0,1]}],q=[],e0=[],V=[],Z=[];for(let n0=0;n0<j.length;n0++){let s0=j[n0],l0=n0*4,[$,u0,$0,z0]=s0.uv,Y0=[[$0/v,1-u0/l],[$/v,1-u0/l],[$/v,1-z0/l],[$0/v,1-z0/l]],ct=c?[3,2,1,0]:[0,1,2,3],dt=c?-s0.n[0]:s0.n[0];for(let M0=0;M0<4;M0++){let K0=w[s0.vi[ct[M0]]];q.push(K0[0],K0[1],K0[2]),e0.push(Y0[M0][0],Y0[M0][1]),V.push(dt,s0.n[1],s0.n[2])}Z.push(l0,l0+1,l0+2,l0,l0+2,l0+3)}let K=new H0.BufferGeometry;return K.setAttribute("position",new H0.Float32BufferAttribute(q,3)),K.setAttribute("uv",new H0.Float32BufferAttribute(e0,2)),K.setAttribute("normal",new H0.Float32BufferAttribute(V,3)),K.setIndex(Z),K}x();R();T();k();x();R();T();k();import*as c0 from"three";import{subscribeKey as h6}from"valtio/utils";x();R();T();k();import*as P0 from"three";var Li=async(r,t)=>{let e;if(!r&&!t)e=await o5;else{if(r||(r=await Tt(t,"skin")),!r)return;let{canvas:v}=await Qt(r);e=new P0.CanvasTexture(v)}e.magFilter=P0.NearestFilter,e.minFilter=P0.NearestFilter;let i=new P0.BoxGeometry,n=new P0.MeshStandardMaterial,s=!1,o=new P0.Mesh(i,n);o.scale.x=s?3:4,o.scale.y=12,o.scale.z=4,v8(i,40,16,s?3:4,12,4),n.map=e,n.needsUpdate=!0;let a=new P0.Group;return a.add(o),a.scale.set(.1,.1,.1),o.rotation.z=Math.PI,a};function a8(r,t,e,i,n,s,o,a){let v=(B,I,W,z)=>[new P0.Vector2(B/o,1-z/a),new P0.Vector2(W/o,1-z/a),new P0.Vector2(W/o,1-I/a),new P0.Vector2(B/o,1-I/a)],l=v(t+s,e,t+i+s,e+s),c=v(t+i+s,e,t+i*2+s,e+s),d=v(t,e+s,t+s,e+s+n),h=v(t+s,e+s,t+i+s,e+s+n),p=v(t+i+s,e+s,t+i+s*2,e+n+s),g=v(t+i+s*2,e+s,t+i*2+s*2,e+n+s),b=r.attributes.uv,A=[p[3],p[2],p[0],p[1]],w=[d[3],d[2],d[0],d[1]],_=[l[3],l[2],l[0],l[1]],S=[c[0],c[1],c[3],c[2]],M=[h[3],h[2],h[0],h[1]],C=[g[3],g[2],g[0],g[1]],H=[];for(let B of[A,w,_,S,M,C])for(let I of B)H.push(I.x,I.y);b.set(new Float32Array(H)),b.needsUpdate=!0}function v8(r,t,e,i,n,s){a8(r,t,e,i,n,s,64,64)}var m6={itemRight:{rotation:[0,-90,25],translation:[1.13,3.2,1.13],scale:[.68,.68,.68]},itemLeft:{rotation:[0,90,-25],translation:[1.13,3.2,1.13],scale:[.68,.68,.68]},blockRight:{rotation:[0,45,0],translation:[0,0,0],scale:[.4,.4,.4]},blockLeft:{rotation:[0,225,0],translation:[0,0,0],scale:[.4,.4,.4]}},a5=class{constructor(t,e=!1){this.worldRenderer=t;this.offHand=e;u(this,"holdingBlock");u(this,"blockSwapAnimation");u(this,"cameraGroup",new c0.Mesh);u(this,"objectOuterGroup",new c0.Group);u(this,"objectInnerGroup",new c0.Group);u(this,"holdingBlockInnerGroup",new c0.Group);u(this,"camera",new c0.PerspectiveCamera(75,1,.1,100));u(this,"stopUpdate",!1);u(this,"lastHeldItem");u(this,"lastHeldItemRenderKey");u(this,"isSwinging",!1);u(this,"nextIterStopCallbacks");u(this,"idleAnimator");u(this,"ready",!1);u(this,"lastUpdate",0);u(this,"playerHand");u(this,"offHandDisplay",!1);u(this,"offHandModeLegacy",!1);u(this,"swingAnimator");u(this,"config");u(this,"disposed",!1);u(this,"unsubs",[]);u(this,"lastItemModelName");u(this,"switchRequest",0);this.initCameraGroup(),this.unsubs.push(h6(this.worldRenderer.playerStateReactive,"heldItemMain",()=>{this.offHand||this.updateItem()})),this.unsubs.push(h6(this.worldRenderer.playerStateReactive,"heldItemOff",()=>{this.offHand&&this.updateItem()})),this.config=t.displayOptions.inWorldRenderingConfig,this.offHandDisplay=this.offHand,this.offHand||Li().then(i=>{this.disposed||(this.playerHand=i,this.updateItem())}).then(()=>{if(this.disposed)return;let i=Z5(async()=>Li(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",n=>{n&&(this.playerHand=n,this.updateItem())},n=>{A0(n,!0)});this.unsubs.push(i)})}updateItem(){if(!this.ready)return;let t=this.offHand?this.worldRenderer.playerStateReactive.heldItemOff:this.worldRenderer.playerStateReactive.heldItemMain;t?this.setNewItem(t):this.offHand?this.setNewItem():this.setNewItem({type:"hand"})}initCameraGroup(){this.cameraGroup=new c0.Mesh}startSwing(){this.swingAnimator?.startSwing()}stopSwing(){this.swingAnimator?.stopSwing()}render(t,e,i,n){if(!this.lastHeldItem)return;let s=performance.now();this.lastUpdate&&s-this.lastUpdate>50&&this.replaceItemModel(this.lastHeldItem),this.swingAnimator?.isCurrentlySwinging()||this.swingAnimator?.debugParams.animationStage?this.swingAnimator?.update():this.idleAnimator?.update(),this.blockSwapAnimation?.switcher.update();let o=new c0.Scene;o.add(this.cameraGroup),this.updateCameraGroup(),o.add(i.clone()),o.add(n.clone());let a=e.getSize(new c0.Vector2),v=Math.min(a.width,a.height),l=a.width-v,{offHandDisplay:c}=this;if(c&&(this.cameraGroup.scale.x=-1),e.autoClear=!1,e.clearDepth(),this.offHandDisplay)e.setViewport(0,0,v,v);else{let d=a.width-v;e.setViewport(d,0,v,v)}e.render(o,this.camera),e.setViewport(0,0,a.width,a.height),c&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(t){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new qt(()=>({y:this.objectInnerGroup.position.y}),(s,o)=>{s==="y"&&(this.objectInnerGroup.position.y=o)},{y:16})});let e=t,i=this.objectInnerGroup.position.y+this.objectInnerGroup.scale.y*1.5*(e==="appeared"?1:-1),n=!1;return new Promise(s=>{this.blockSwapAnimation.switcher.transitionTo({y:i},e,()=>{n||s(!0)},()=>{n=!0,s(!1)})})}isDifferentItem(t){return this.lastHeldItemRenderKey!==ye(this.worldRenderer,t)}updateCameraGroup(){if(this.stopUpdate)return;let{camera:t}=this;this.cameraGroup.position.copy(t.position),this.cameraGroup.rotation.copy(t.rotation);let e=1,{position:i,scale:n}=this.getHandHeld3d(),s=-i.z,o=this.offHandModeLegacy?-1:1;this.objectOuterGroup.position.set(s*i.x*e*o,s*i.y,-s);let a=n*2.22*.2;this.objectOuterGroup.scale.set(a,a,a)}async createItemModel(t){if(this.lastUpdate=performance.now(),!t||t.type==="hand"&&!this.playerHand)return;let e;if(t.type==="item"||t.type==="block"){let n=this.worldRenderer.entities.getItemMesh({...t.fullItem,itemId:t.id},$5(this.worldRenderer),!1,this.lastItemModelName);if(n){let{mesh:s,isBlock:o,modelName:a}=n;o?(e=s,t.type="block"):(s.position.set(.5,.5,.5),e=s,t.type="item"),this.lastItemModelName=a}}else e=this.playerHand;if(!e)return;e.name="holdingBlock";let i=this.getHandHeld3d().rotation;return e.rotation.x=c0.MathUtils.degToRad(i.x),e.rotation.y=c0.MathUtils.degToRad(i.y),e.rotation.z=c0.MathUtils.degToRad(i.z),{model:e,type:t.type}}async replaceItemModel(t){if(this.blockSwapAnimation?.switcher.isTransitioning)return;if(!t){this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.idleAnimator=void 0;return}let e=await this.createItemModel(t);e&&(this.holdingBlock?.removeFromParent(),this.holdingBlock=e.model,this.holdingBlockInnerGroup.add(e.model))}testUnknownBlockSwitch(){this.setNewItem({type:"item",name:"minecraft:some-unknown-block",id:0,fullItem:{}})}async setNewItem(t){let e=ye(this.worldRenderer,t),i=this.lastHeldItemRenderKey!==e;if(this.lastHeldItem=t,!i)return;this.lastHeldItemRenderKey=e,this.lastItemModelName=void 0;let n=++this.switchRequest,s=!1;if(this.holdingBlock){if(s=!0,!await this.playBlockSwapAnimation("disappeared"))return;this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0}if(!t){this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.idleAnimator=void 0,this.blockSwapAnimation=void 0;return}if(n!==this.switchRequest)return;let o=await this.createItemModel(t);if(!o||n!==this.switchRequest)return;let a=new c0.Group;this.holdingBlockInnerGroup.removeFromParent(),this.holdingBlockInnerGroup=new c0.Group,this.holdingBlockInnerGroup.add(o.model),a.add(this.holdingBlockInnerGroup),this.holdingBlock=o.model,this.objectInnerGroup=new c0.Group,this.objectInnerGroup.add(a),this.objectInnerGroup.position.set(-.5,-.5,-.5),s&&(this.objectInnerGroup.position.y-=this.objectInnerGroup.scale.y*1.5),Object.assign(a.position,{x:.5,y:.5,z:.5}),this.objectOuterGroup=new c0.Group,this.objectOuterGroup.add(this.objectInnerGroup),this.cameraGroup.add(this.objectOuterGroup);let v=this.getHandHeld3d().rotation;this.objectOuterGroup.rotation.y=c0.MathUtils.degToRad(v.yOuter),s&&await this.playBlockSwapAnimation("appeared"),this.swingAnimator??(this.swingAnimator=new Ui(this.holdingBlockInnerGroup)),this.swingAnimator.setHandMesh(this.holdingBlockInnerGroup),this.swingAnimator.type=o.type,this.config.viewBobbing&&(this.idleAnimator=new Fi(this.holdingBlockInnerGroup,this.worldRenderer.playerStateReactive))}getHandHeld3d(){let t=this.lastHeldItem?.type??"hand",e=this.offHandModeLegacy?"Left":"Right",i=.8*1.15,n={x:.4,y:-.7,z:-.45},s={x:-32.4,y:42.8,z:-41.3,yOuter:0};if(t==="item"){let o=m6[`item${e}`];n={x:-.05,y:-.7,z:-.45},s={x:o.rotation[0],y:o.rotation[1],z:o.rotation[2],yOuter:0},i=o.scale[0]*1.15}else if(t==="block"){let o=m6[`block${e}`];n={x:.4,y:-.7,z:-.45},s={x:o.rotation[0],y:o.rotation[1],z:o.rotation[2],yOuter:0},i=o.scale[0]*1.15}return{rotation:s,position:n,scale:i}}dispose(){this.disposed=!0,this.ready=!1,this.unsubs.forEach(t=>t()),this.unsubs=[],this.idleAnimator?.destroy(),this.idleAnimator=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.blockSwapAnimation?.switcher.forceFinish(),this.blockSwapAnimation=void 0,A0(this.cameraGroup,!0),A0(this.objectOuterGroup,!0),A0(this.objectInnerGroup,!0),A0(this.holdingBlockInnerGroup,!0),this.holdingBlock=void 0,this.playerHand&&(A0(this.playerHand,!0),this.playerHand=void 0)}},Fi=class{constructor(t,e){this.handMesh=t;this.playerState=e;u(this,"globalTime",0);u(this,"lastTime",0);u(this,"currentState");u(this,"targetState");u(this,"defaultPosition");u(this,"idleOffset",{y:0,rotationZ:0});u(this,"tween",new ce);u(this,"idleTween",null);u(this,"stateSwitcher");u(this,"debugParams",{walkingSpeed:8,sprintingSpeed:16,walkingAmplitude:{x:1/30,y:1/10,rotationZ:.25},sprintingAmplitude:{x:1/30,y:1/10,rotationZ:.4}});u(this,"debugGui");u(this,"updated",!1);this.handMesh=t,this.globalTime=0,this.currentState="NOT_MOVING",this.targetState="NOT_MOVING",this.defaultPosition={x:t.position.x,y:t.position.y,z:t.position.z,rotationX:t.rotation.x,rotationY:t.rotation.y,rotationZ:t.rotation.z},this.stateSwitcher=new qt(()=>({x:this.handMesh.position.x,y:this.handMesh.position.y,z:this.handMesh.position.z,rotationX:this.handMesh.rotation.x,rotationY:this.handMesh.rotation.y,rotationZ:this.handMesh.rotation.z}),(i,n)=>{switch(i){case"x":this.handMesh.position.x=n;break;case"y":this.handMesh.position.y=n;break;case"z":this.handMesh.position.z=n;break;case"rotationX":this.handMesh.rotation.x=n;break;case"rotationY":this.handMesh.rotation.y=n;break;case"rotationZ":this.handMesh.rotation.z=n;break}},{x:2,y:2,z:2,rotation:Math.PI}),this.debugGui=new wt("idle_animator",this.debugParams)}startIdleAnimation(){this.idleTween&&this.idleTween.stop(),this.idleOffset.y=this.handMesh.position.y-this.defaultPosition.y,this.idleOffset.rotationZ=this.handMesh.rotation.z-this.defaultPosition.rotationZ,this.idleTween=new S0(this.idleOffset,this.tween).to({y:.05,rotationZ:.05},3e3).easing(k0.Sinusoidal.InOut).yoyo(!0).repeat(1/0).start()}stopIdleAnimation(){this.idleTween&&(this.idleTween.stop(),this.idleOffset.y=0,this.idleOffset.rotationZ=0)}getStateTransform(t,e){switch(t){case"NOT_MOVING":case"SNEAKING":return{x:this.defaultPosition.x,y:this.defaultPosition.y,z:this.defaultPosition.z,rotationX:this.defaultPosition.rotationX,rotationY:this.defaultPosition.rotationY,rotationZ:this.defaultPosition.rotationZ};case"WALKING":case"SPRINTING":{let i=t==="SPRINTING"?this.debugParams.sprintingSpeed:this.debugParams.walkingSpeed,n=t==="SPRINTING"?this.debugParams.sprintingAmplitude:this.debugParams.walkingAmplitude;return{x:this.defaultPosition.x+Math.sin(e*i)*n.x,y:this.defaultPosition.y-Math.abs(Math.cos(e*i))*n.y,z:this.defaultPosition.z,rotationX:this.defaultPosition.rotationX,rotationY:this.defaultPosition.rotationY,rotationZ:this.defaultPosition.rotationZ}}}}setState(t){if(t===this.targetState)return;this.targetState=t;let e=!1;if(this.currentState!==t){if(this.stopIdleAnimation(),!e){let i=this.getStateTransform(t,this.globalTime);this.stateSwitcher.transitionTo(i,t)}this.currentState=t}}update(){this.stateSwitcher.update();let t=performance.now(),e=(t-this.lastTime)/1e3;if(this.lastTime=t,!this.stateSwitcher.isTransitioning)switch(this.currentState){case"NOT_MOVING":case"SNEAKING":this.globalTime=Math.PI/4;break;case"SPRINTING":case"WALKING":this.globalTime+=e;break}if(this.playerState){let i=this.playerState.movementState;i!==this.targetState&&this.setState(i)}if(!this.stateSwitcher.isTransitioning&&(this.currentState==="NOT_MOVING"||this.currentState==="SNEAKING")&&(this.idleTween?.isPlaying()||this.startIdleAnimation(),this.tween.update(),this.handMesh.position.y=this.defaultPosition.y+this.idleOffset.y,this.handMesh.rotation.z=this.defaultPosition.rotationZ+this.idleOffset.rotationZ),!this.stateSwitcher.isTransitioning&&(this.currentState==="WALKING"||this.currentState==="SPRINTING")){let i=this.getStateTransform(this.currentState,this.globalTime);Object.assign(this.handMesh.position,i),Object.assign(this.handMesh.rotation,{x:i.rotationX,y:i.rotationY,z:i.rotationZ})}}getCurrentState(){return this.currentState}destroy(){this.stopIdleAnimation(),this.stateSwitcher.forceFinish()}},Ui=class{constructor(t){this.handMesh=t;u(this,"PI",Math.PI);u(this,"animationTimer",0);u(this,"lastTime",0);u(this,"isAnimating",!1);u(this,"stopRequested",!1);u(this,"originalRotation");u(this,"originalPosition");u(this,"originalScale");u(this,"debugParams",{animationTime:250,animationStage:0,useClassicSwing:!0,itemSwingXPosScale:-.8,itemSwingYPosScale:.2,itemSwingZPosScale:-.2,itemHeightScale:-.6,itemPreswingRotY:45,itemSwingXRotAmount:-30,itemSwingYRotAmount:-35,itemSwingZRotAmount:-5,armSwingXPosScale:-.3,armSwingYPosScale:.4,armSwingZPosScale:-.4,armSwingYRotAmount:70,armSwingZRotAmount:-20,armHeightScale:-.6});u(this,"debugGui");u(this,"type","hand");this.handMesh=t,this.originalRotation=t.rotation.clone(),this.originalPosition=t.position.clone(),this.originalScale=t.scale.clone(),this.debugGui=new wt("hand_animator",this.debugParams,void 0,{animationStage:{min:0,max:1,step:.01},itemSwingXPosScale:{min:-2,max:2,step:.1},itemSwingYPosScale:{min:-2,max:2,step:.1},itemSwingZPosScale:{min:-2,max:2,step:.1},itemHeightScale:{min:-2,max:2,step:.1},itemPreswingRotY:{min:-180,max:180,step:5},itemSwingXRotAmount:{min:-180,max:180,step:5},itemSwingYRotAmount:{min:-180,max:180,step:5},itemSwingZRotAmount:{min:-180,max:180,step:5},armSwingXPosScale:{min:-2,max:2,step:.1},armSwingYPosScale:{min:-2,max:2,step:.1},armSwingZPosScale:{min:-2,max:2,step:.1},armSwingYRotAmount:{min:-180,max:180,step:5},armSwingZRotAmount:{min:-180,max:180,step:5},armHeightScale:{min:-2,max:2,step:.1}})}setHandMesh(t){this.handMesh=t,this.originalRotation.copy(t.rotation),this.originalPosition.copy(t.position),this.originalScale.copy(t.scale)}update(){if(!this.isAnimating&&!this.debugParams.animationStage){this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);return}let t=performance.now(),e=(t-this.lastTime)/1e3;this.lastTime=t,this.animationTimer+=e*1e3;let i=this.debugParams.animationStage||Math.min(this.animationTimer/this.debugParams.animationTime,1);if(i>=1){if(this.stopRequested){this.isAnimating=!1,this.stopRequested=!1,this.animationTimer=0,this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);return}this.animationTimer=0;return}this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);let n=i,s=Math.sqrt(n),o=Math.sin(n*this.PI),a=Math.sin(s*this.PI);if(this.type==="hand"){let v=this.debugParams.armSwingXPosScale*a,l=this.debugParams.armSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.armSwingZPosScale*o;this.handMesh.position.x+=v,this.handMesh.position.y+=l+this.debugParams.armHeightScale*n,this.handMesh.position.z+=c,this.handMesh.rotation.y+=c0.MathUtils.degToRad(this.debugParams.armSwingYRotAmount*a),this.handMesh.rotation.z+=c0.MathUtils.degToRad(this.debugParams.armSwingZRotAmount*o)}else{let v=this.debugParams.itemSwingXPosScale*a,l=this.debugParams.itemSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.itemSwingZPosScale*o;this.handMesh.position.x+=v,this.handMesh.position.y+=l+this.debugParams.itemHeightScale*n,this.handMesh.position.z+=c,this.handMesh.rotation.y+=c0.MathUtils.degToRad(this.debugParams.itemPreswingRotY),this.handMesh.rotation.x+=c0.MathUtils.degToRad(this.debugParams.itemSwingXRotAmount*o),this.handMesh.rotation.y+=c0.MathUtils.degToRad(this.debugParams.itemSwingYRotAmount*a),this.handMesh.rotation.z+=c0.MathUtils.degToRad(this.debugParams.itemSwingZRotAmount*o)}}startSwing(){this.stopRequested=!1,!this.isAnimating&&(this.isAnimating=!0,this.animationTimer=0,this.lastTime=performance.now())}stopSwing(){this.isAnimating&&(this.stopRequested=!0)}isCurrentlySwinging(){return this.isAnimating}};function v5(r,t=!1){return r.displayOptions.inWorldRenderingConfig.handRenderer==="legacy"?new a5(r,t):new t5(r,t)}x();R();T();k();import*as G0 from"three";import{Vec3 as Gi}from"vec3";var p6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAALUlEQVR42mP4//8/IyWYYdSAwW6Ara3tf4oMmD179n9ChhD0AsiQ0Wgc7AYAAOqH+zNQ3r9kAAAAAElFTkSuQmCC";var g6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAOklEQVR42mP4//8/IyWYYdQA3AbY2tr+H1gDZs+e/R9mCD7D8IYBzBAQTXYgEvIKQQPw2T6aEqlkAADEA/W3ycLXvwAAAABJRU5ErkJggg==";var b6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVR42mP4//8/IyWYYRgbYGtr+39wGQDiYzMUpwGzZ8+GawDRID4IkxSIMEOwaSQ6FgiFBW0NIOR8osJgBOQFALo37sVTOo/LAAAAAElFTkSuQmCC";var y6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWElEQVR42mP4//8/IyWYYXAbYGtr+59sA0CaZ8+eTZkBhNg4DQApQlYIcglMDN1VWA0AKYJpQvYONi/hDUSYIfjCgmA0EooJ2hmAK9CINgBXoA2xvEAMBgBGPud3dYZtOQAAAABJRU5ErkJggg==";var w6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAYklEQVR42r1TQQrAMAxyD8tL89iMHgQJoQxHewi0UsWYFFX1/CkcF4iIsgUWOTM9ASV3F3rHF+v9rK4wEVnEFoFYbwmTbRZFFN9m0B9QZBfk2THaAhqktQdTkHYL9iZe+40vs7nda+BuVOMAAAAASUVORK5CYII=";var _6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAcElEQVR42rWTWwpAIQhEbWGu1MUaXRgQcXpyP8SIPI1jibu3l5DfAKrqyFgfAczsKxx5xJUCFGYFUZXMpOe9CAa8BOS+0U5UVbYQ6Siqbi0BFT0auTSRHZqNkE6BGXgEYKYtAczIbQAz8ukzXT3l3egz49IXvXQCVAAAAABJRU5ErkJggg==";var A6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAeElEQVQ4jaWSQQ4AIQgD9WG8tI/tnkgaUgmuBw8YHcqERXK/nOUuI4JPAABMSESwA1qAQgAQwBygnfNjTaCpWoBzUlNZQJ07x9FUdgSlV5FaW4Cjq8isW8BJ2GgPtEuVdr0HKvLXHjiRI0An8jTKqo9dF000cnBzPgKuxXtbq/m1AAAAAElFTkSuQmCC";var E6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhUlEQVR42qWTSRKAMAgE8WF5KY/FygEL2yEp9cAhCz0wJBYRx58wbowxYsZngLvHjITsgNYpJySBrPIBUMqZSHhdSw+oQlgVa01U7VRQ7huTk67aUWZaVyaNZFsSQBCTVBW3KahLyo/lQ6KR1Y+2BTUyGqke1AXoxsSzpYlU3FW0/Exv1ie0hq53Bf15aAAAAABJRU5ErkJggg==";var x6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAmklEQVR42o2SYQ6FMAiDeQfbSXdYXjSpqd869QeZQiilpbr7l2KM0cc75+xUV77YpGCjAPUqitMU3uCAXrsAlPSCcgJMbG4M0mQ1Etz/i0KlXQnmwyqpv1uH4h7fiws7ISneTYNEk0ImCxcAArGJrE4AXhypPtl7AqTdeJG8k3gHb0L6QfmK9WQTa59cSFdHRssKFHHngteV/wPDepaHIu0QVAAAAABJRU5ErkJggg==";var R6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAoUlEQVR42n2Tyw3AIAxD3cGYlGFTUSmV+2o4IEEAf2JQVV1rjDGq576ec5avWVdfWIW12aMPEJBEImoPv+CAvvcCODsVNWBS8wA4A5ndv1/ytciQvBLMyeTSHD3ZYXPXXH7Y0ZMdJvCxQJls5O6tKHlPPWGEfU58WZR6ive1kKSleFNC2kXGRnrcDqhTTOmPeP3pAZnTq6Oin4X0oXbfnNZu626Io6lqGCwAAAAASUVORK5CYII=";var v1=class{constructor(t){this.worldRenderer=t;u(this,"_cursorLinesHidden",!1);u(this,"cursorLineMaterial");u(this,"interactionLines",null);u(this,"prevColor");u(this,"blockBreakMesh");u(this,"breakTextures",[]);let e=[p6,g6,b6,y6,w6,_6,A6,E6,x6,R6];for(let n=0;n<10;n++)kt(e[n]).then(s=>{s.magFilter=G0.NearestFilter,s.minFilter=G0.NearestFilter,this.breakTextures.push(s)});let i=new G0.MeshBasicMaterial({transparent:!0,blending:G0.MultiplyBlending,alphaTest:.5});this.blockBreakMesh=new G0.Mesh(new G0.BoxGeometry(1,1,1),i),this.blockBreakMesh.visible=!1,this.blockBreakMesh.renderOrder=999,this.blockBreakMesh.name="blockBreakMesh",this.worldRenderer.sceneOrigin.addAndTrack(this.blockBreakMesh),this.worldRenderer.onReactivePlayerStateUpdated("gameMode",()=>{this.updateLineMaterial()}),setTimeout(()=>{this.updateLineMaterial(),this.interactionLines&&this.setHighlightCursorBlock(this.interactionLines.blockPos,this.interactionLines.shapePositions,!0)})}get cursorLinesHidden(){return this._cursorLinesHidden}set cursorLinesHidden(t){this.interactionLines&&(this.interactionLines.mesh.visible=!t),this._cursorLinesHidden=t}updateLineMaterial(){let t=this.worldRenderer.playerStateReactive.gameMode==="creative",e=this.worldRenderer.renderer.getPixelRatio();this.cursorLineMaterial&&this.cursorLineMaterial.dispose(),this.cursorLineMaterial=new Xt({color:(()=>{switch(this.worldRenderer.worldRendererConfig.highlightBlockColor){case"blue":return 4227327;case"classic":return 0;default:return t?4227327:0}})(),linewidth:Math.max(e*.7,1)*2}),this.prevColor=this.worldRenderer.worldRendererConfig.highlightBlockColor}updateBreakAnimation(t,e,i){if(this.hideBreakAnimation(),e===null||!t||!i)return;let{position:n,width:s,height:o,depth:a}=i,v=new Gi(n.x,n.y,n.z);this.blockBreakMesh.scale.set(s*1.001,o*1.001,a*1.001),v.add(new Gi(t.x,t.y,t.z)),this.blockBreakMesh.position.set(v.x,v.y,v.z),this.blockBreakMesh.visible=!0,this.blockBreakMesh.material.map=this.breakTextures[e]??this.breakTextures.at(-1),this.blockBreakMesh.material.needsUpdate=!0}hideBreakAnimation(){this.blockBreakMesh&&(this.blockBreakMesh.visible=!1)}updateDisplay(){if(this.cursorLineMaterial){let{renderer:t}=this.worldRenderer;this.cursorLineMaterial.resolution.set(t.domElement.width,t.domElement.height),this.cursorLineMaterial.dashOffset=performance.now()/750}}setHighlightCursorBlock(t,e,i=!1){if(t&&this.interactionLines&&t.equals(this.interactionLines.blockPos)&&y8(e??[],this.interactionLines.shapePositions??[])&&!i||(this.interactionLines!==null&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.interactionLines.mesh),this.interactionLines=null),t===null))return;let n=new G0.Group;for(let{position:s,width:o,height:a,depth:v}of e??[]){let l=new Gi(s.x,s.y,s.z),c=[1.0001*o,1.0001*a,1.0001*v],d=new G0.BoxGeometry(...c),h=new Zt().fromEdgesGeometry(new G0.EdgesGeometry(d)),p=new n5(h,this.cursorLineMaterial);p.position.set(l.x,l.y,l.z),p.computeLineDistances(),n.add(p)}this.worldRenderer.sceneOrigin.addAndTrack(n),n.position.set(t.x,t.y,t.z),n.visible=!this.cursorLinesHidden,this.interactionLines={blockPos:t,mesh:n,shapePositions:e}}render(){this.prevColor!==this.worldRenderer.worldRendererConfig.highlightBlockColor&&this.updateLineMaterial(),this.updateDisplay()}},y8=(r,t)=>{if(r.length!==t.length)return!1;for(let[e,i]of r.entries())if(i!==t[e])return!1;return!0};x();R();T();k();x();R();T();k();var w8=ze(fi(),1);import k6 from"prismarine-nbt";import{getItemDefinition as _8}from"mc-assets/dist/itemDefinitions";var A8=(r,t)=>{let e,i,n=r.name;n.includes(":")||(n=`minecraft:${n}`);let s=t.currentResources?.customItemModelNames[n];if(r.components){let o=new Map;for(let c of r.components)o.set(c.type,c);let a=o.get("custom_name")||o.get("item_name");a&&(e=typeof a.data=="string"?a.data:k6.simplify(a.data));let v=o.get("item_model");if(v&&(i=v.data),s){let c=o.get("custom_model_data");if(c?.data){let d;typeof c.data=="number"?d=c.data:typeof c.data=="object"&&"floats"in c.data&&Array.isArray(c.data.floats)&&c.data.floats.length>0&&(d=c.data.floats[0]),d&&s[d]&&(i=s[d])}}let l=o.get("lore");l&&(e??(e=r.displayName??r.name),e+=`
21187
- ${JSON.stringify(l.data)}`)}if(r.nbt){let o=k6.simplify(r.nbt),a=o.display?.Name;a&&(e=a),s&&o.CustomModelData&&s[o.CustomModelData]&&(i=s[o.CustomModelData])}return{customText:e,customModel:i}};var T6=(r,t,e,i)=>{let n=r.name,{customModel:s}=A8(r,e);s&&(n=s);let o=Kn(i,{...t}),a=_8(e.currentResources.itemsDefinitionsStore,{name:n,version:e.currentResources.version,properties:o})?.model;return(a==="minecraft:special"?void 0:a)??n};x();R();T();k();var I6=ze(P6(),1);import{versionToNumber as B6}from"mc-assets/dist/utils";var H6=(r,t,e=!1,i=!1)=>{let n=r.modelName,s=globalThis.loadedData.itemsByName[n];B6(t.currentResources.version)<B6("1.13")&&(n=(0,I6.getRenamedData)(s?"items":"blocks",n,t.currentResources.version,"1.13.1"));let o;if(!i){let v=t.currentResources?.guiAtlas?.json,l=d=>d&&v?.textures[d.replace("minecraft:","").replace("block/","").replace("blocks/","").replace("item/","").replace("items/","").replace("_inventory","")],c=l(n)??l(r.originalItemName);if(c){let d=c.u*v.width,h=c.v*v.height;return{texture:"gui",slice:[d,h,v.tileSize,v.tileSize],scale:.25,blockData:null,modelName:null}}}let a=v=>v.top??v;try{if(!t.currentResources?.itemsRenderer)throw new Error("Items renderer is not available");o=t.currentResources.itemsRenderer.getItemTexture(n,{},!1,i)??(r.originalItemName?t.currentResources.itemsRenderer.getItemTexture(r.originalItemName,{},!1,i):void 0)??t.currentResources.itemsRenderer.getItemTexture("item/missing_texture")}catch(v){reportError?.(`Failed to render item ${n} (original: ${r.originalItemName}) on ${t.currentResources.version} (resourcepack: TODO!): ${v.stack}`),o=a(t.currentResources.itemsRenderer.getItemTexture("errored"))}return o??(o=a(t.currentResources.itemsRenderer.getItemTexture("unknown"))),"type"in o?{texture:o.type,slice:o.slice,modelName:n,blockData:null,scale:null}:{texture:"blocks",blockData:o,modelName:n,slice:null,scale:null}};var z6=(r,t,e,i)=>{let n=e.currentResources;if(!n)throw new Error("Resources not loaded");let s=r.itemId??r.blockId??r.name,{blockState:o}=r;try{let a=o?globalThis.loadedData.blocksByStateId[o]?.name:typeof s=="number"?globalThis.loadedData.items[s]?.name:s;if(!a)throw new Error(`Item not found: ${s}`);let v=T6({...r,name:a},t,e,i),l=H6({modelName:v},e,!1,!0);if(!l)throw new Error(`Failed to get render info for item ${a}`);let c=l.texture==="blocks"?n.blocksAtlasImage:n.itemsAtlasImage;if(l.blockData)return{resolvedModel:l.blockData.resolvedModel,modelName:l.modelName};if(l.slice){let[d,h,p,g]=l.slice,[b,A,w,_]=[d/c.width,h/c.height,p/c.width,g/c.height];return{u:b,v:A,su:w,sv:_,renderInfo:l,modelName:l.modelName}}throw new Error(`Invalid render info for item ${a}`)}catch(a){return reportError?.(a),{u:0,v:0,su:16/n.blocksAtlasImage.width,sv:16/n.blocksAtlasImage.width,modelName:"missing"}}};x();R();T();k();import*as ke from"three";var c1=class{constructor(t){this.worldRenderer=t;u(this,"audioListener");u(this,"activeSounds",new Set);u(this,"audioContext");u(this,"soundVolumes",new Map);u(this,"baseVolume",1);t.onWorldSwitched.push(()=>{this.stopAll()}),t.onReactiveConfigUpdated("volume",e=>{this.changeVolume(e)})}initAudioListener(){this.audioListener||(this.audioListener=new ke.AudioListener,this.worldRenderer.camera.add(this.audioListener))}playSound(t,e,i=1,n=1,s=500){this.initAudioListener();let o=new ke.PositionalAudio(this.audioListener);this.activeSounds.add(o),this.soundVolumes.set(o,i);let a=new ke.AudioLoader,v=Date.now();a.loadAsync(e).then(l=>{Date.now()-v>s||(o.setBuffer(l),o.setRefDistance(20),o.setVolume(i*this.baseVolume),o.setPlaybackRate(n),this.worldRenderer.sceneOrigin.addAndTrack(o),o.position.set(t.x,t.y,t.z),o.onEnded=()=>{this.worldRenderer.sceneOrigin.removeAndUntrack(o),o.source&&o.disconnect(),this.activeSounds.delete(o),this.soundVolumes.delete(o),a.manager.itemEnd(e)},o.play())})}stopAll(){for(let t of this.activeSounds)t&&(t.stop(),t.source&&t.disconnect(),this.worldRenderer.sceneOrigin.removeAndUntrack(t));this.activeSounds.clear(),this.soundVolumes.clear()}changeVolume(t){this.baseVolume=t;for(let[e,i]of this.soundVolumes)e.setVolume(i*this.baseVolume)}destroy(){this.stopAll(),this.audioListener&&(this.audioListener.removeFromParent(),this.audioListener=void 0)}playTestSound(){this.playSound(this.worldRenderer.camera.position,"/sound.mp3")}};x();R();T();k();import*as B0 from"three";var d1=class{constructor(t,e){this.worldRenderer=t;this.onRenderCallbacks=e;u(this,"rollAngle",0);u(this,"rollAnimation");u(this,"basePitch",0);u(this,"baseYaw",0);u(this,"cameraBobInput",null);e.push(()=>{this.update()})}get damageRollAmount(){return 5}get damageAnimDuration(){return 200}setCameraBobInput(t){this.cameraBobInput=t}setBaseRotation(t,e){this.basePitch=t,this.baseYaw=e,this.update()}getBaseRotation(){return{pitch:this.basePitch,yaw:this.baseYaw}}shakeFromDamage(t){let e=this.rollAngle,i=e+(t??(Math.random()<.5?-1:1))*this.damageRollAmount;this.rollAnimation={startTime:performance.now(),startRoll:e,targetRoll:i,duration:this.damageAnimDuration/2}}update(){if(this.worldRenderer.playerStateUtils.isSpectatingEntity()&&(this.rollAngle=0,this.rollAnimation=void 0),this.rollAnimation){let e=performance.now(),i=e-this.rollAnimation.startTime,n=Math.min(i/this.rollAnimation.duration,1);this.rollAnimation.returnToZero?(this.rollAngle=this.rollAnimation.startRoll*(1-this.easeInOut(n)),n===1&&(this.rollAnimation=void 0)):(this.rollAngle=this.rollAnimation.startRoll+(this.rollAnimation.targetRoll-this.rollAnimation.startRoll)*this.easeOut(n),n===1&&(this.rollAnimation={startTime:e,startRoll:this.rollAngle,targetRoll:0,duration:this.damageAnimDuration/2,returnToZero:!0}))}let t=this.worldRenderer.cameraObject;if(this.worldRenderer.cameraGroupVr){let e=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(0,1,0),this.baseYaw);t.setRotationFromQuaternion(e)}else{let e=this.addAntiZfightingOffset(this.basePitch),i=this.addAntiZfightingOffset(this.baseYaw),n=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(1,0,0),e),s=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(0,1,0),i),o=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(0,0,1),B0.MathUtils.degToRad(this.rollAngle)),a=new B0.Quaternion,v=new B0.Quaternion,l=this.worldRenderer.playerStateReactive.perspective;if(this.cameraBobInput){let d=X5(this.cameraBobInput);a=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(0,0,1),d.rotation.z),v=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(1,0,0),d.rotation.x),l==="first_person"&&this.worldRenderer.camera.position.set(d.position.x,d.position.y,0)}else l==="first_person"&&this.worldRenderer.camera.position.set(0,0,0);let c=s.multiply(n).multiply(o).multiply(a).multiply(v);t.setRotationFromQuaternion(c)}}easeOut(t){return 1-(1-t)*(1-t)}easeInOut(t){return t<.5?2*t*t:1-(-2*t+2)**2/2}addAntiZfightingOffset(t){let i=(t%(Math.PI*2)+Math.PI*2)%(Math.PI*2),n=.01;return Math.abs(i)<n||Math.abs(i-Math.PI/2)<n||Math.abs(i-Math.PI)<n||Math.abs(i-3*Math.PI/2)<n?t+.001:t}};x();R();T();k();import*as Q from"three";var u1=class{constructor(t){this.worldRenderer=t;u(this,"customMedia",new Map);u(this,"lastCheck",0);u(this,"THROTTLE_TIME",100);this.worldRenderer.onWorldSwitched.push(()=>{this.onWorldGone()}),this.worldRenderer.onRender.push(()=>{this.render()}),this.worldRenderer.onReactiveConfigUpdated("volume",()=>{let{volume:e}=this.worldRenderer.worldRendererConfig;for(let[i,n]of this.customMedia.entries())n.positionalAudio&&n.positionalAudio.setVolume((n.props.volume??1)*e)})}onWorldGone(){for(let[t,e]of this.customMedia.entries())this.destroyMedia(t)}onWorldStop(){for(let[t,e]of this.customMedia.entries())this.setVideoPlaying(t,!1)}createErrorTexture(t,e,i=16777215,n="Failed to load"){let s=new OffscreenCanvas(100,100),o=100;s.width=o,s.height=o;let a=s.getContext("2d");if(!a)return new Q.CanvasTexture(s);a.clearRect(0,0,s.width,s.height),a.fillStyle=`rgba(${i>>16&255}, ${i>>8&255}, ${i&255}, 1)`,a.fillRect(0,0,s.width,s.height),a.fillStyle="#ff0000",a.font="bold 10px sans-serif",a.textAlign="center",a.textBaseline="middle",a.fillText(n,s.width/2,s.height/2,s.width);let v=new Q.CanvasTexture(s);return v.minFilter=Q.LinearFilter,v.magFilter=Q.LinearFilter,v}createBackgroundTexture(t,e,i=0,n=1){let s=new OffscreenCanvas(1,1);s.width=1,s.height=1;let o=s.getContext("2d");if(!o)return new Q.CanvasTexture(s);let a=i>>16&255,v=i>>8&255,l=i&255;o.fillStyle=`rgba(${a}, ${v}, ${l}, ${n})`,o.fillRect(0,0,1,1);let c=new Q.CanvasTexture(s);return c.minFilter=Q.NearestFilter,c.magFilter=Q.NearestFilter,c}validateOrigin(t,e){if(e===!0)return!0;if(e===!1)return!1;let i=new URL(t);return e.some(n=>i.origin.endsWith(n))}onPageInteraction(){for(let[t,e]of this.customMedia.entries())e.hadAutoPlayError&&(e.hadAutoPlayError=!1,this.playVideo(t))}addMedia(t,e){let i=structuredClone(e);this.destroyMedia(t);let n=!1;e.src.startsWith("https://disk.yandex.ru/i/")&&(n=!0,e.src=`/ya-image?url=${e.src}`);let{scene:s}=this.worldRenderer;e.allowOrigins!==void 0&&!this.validateOrigin(e.src,e.allowOrigins)&&(e.src="");let a=e.src.endsWith(".png")||e.src.endsWith(".jpg")||e.src.endsWith(".jpeg")||e.imageOverride;n&&!e.imageOverride&&fetch(e.src,{method:"HEAD"}).then(M=>{M.headers.get("content-type")?.startsWith("image/")&&(this.destroyMedia(t),this.addMedia(t,{...i,src:e.src,imageOverride:!0}))}).catch(console.error);let v,l;if(!a){v=document.createElement("video"),v.src=e.src.endsWith(".gif")?e.src.replace(".gif",".mp4"):e.src,v.loop=e.loop??!0;let M=(e.volume??1)*this.worldRenderer.worldRendererConfig.volume;v.volume=Math.min(M,1),v.playsInline=!0,v.crossOrigin="anonymous";let C=this.worldRenderer.soundSystem;if(C.initAudioListener(),!C.audioListener)throw new Error("Audio listener not initialized");l=new Q.PositionalAudio(C.audioListener),l.setRefDistance(6),l.setVolume(M),this.worldRenderer.sceneOrigin.addAndTrack(l),l.position.set(e.position.x,e.position.y,e.position.z),l.setMediaElementSource(v),l.connect(),v.addEventListener("pause",()=>{l?.pause(),globalThis.tempSendVideoStop?.(t,"paused",v.currentTime)}),v.addEventListener("play",()=>{l?.play(),globalThis.tempSendVideoPlay?.(t)}),v.addEventListener("seeked",()=>{l&&v&&(l.offset=v.currentTime)}),v.addEventListener("stalled",()=>{globalThis.tempSendVideoStop?.(t,"stalled",v.currentTime)}),v.addEventListener("waiting",()=>{globalThis.tempSendVideoStop?.(t,"waiting",v.currentTime)}),v.addEventListener("error",({error:H})=>{globalThis.tempSendVideoStop?.(t,`error: ${H}`,v.currentTime)}),v.addEventListener("ended",()=>{globalThis.tempSendVideoStop?.(t,"ended",v.currentTime),e.loop||(v.currentTime=0,S.ended=!0)})}let c=this.createBackgroundTexture(e.size.width,e.size.height,e.background),d=M=>{let C=this.createErrorTexture(e.size.width,e.size.height,e.background,M);g.map=C,g.needsUpdate=!0},h=new Q.PlaneGeometry(1,1),p=e.allowLighting?Q.MeshLambertMaterial:Q.MeshBasicMaterial,g=new p({map:c,transparent:!0,side:e.doubleSide?Q.DoubleSide:Q.FrontSide,alphaTest:.1}),b=v?new Q.VideoTexture(v):new Q.TextureLoader().load(e.src,()=>{this.customMedia.get(t)?.texture===b&&(g.map=b,g.needsUpdate=!0)},void 0,()=>d());b.minFilter=Q.NearestFilter,b.magFilter=Q.NearestFilter,b.generateMipmaps=!1;let A=new Q.Mesh(h,g),{mesh:w}=this.positionMeshExact(A,Q.MathUtils.degToRad((e.rotation??0)*90),e.position,e.size.width,e.size.height);s.add(w),v&&(A.onBeforeRender=()=>{v.readyState===v.HAVE_ENOUGH_DATA&&(!v.paused||!S?.hadAutoPlayError)&&(g.map!==b&&(g.map=b,g.needsUpdate=!0),b.needsUpdate=!0,l&&(l.position.copy(w.position),l.rotation.copy(w.rotation)))});let _=M=>{let C=h.attributes.uv.array;C[0]=M.startU,C[1]=M.startV,C[2]=M.endU,C[3]=M.startV,C[4]=M.endU,C[5]=M.endV,C[6]=M.startU,C[7]=M.endV,h.attributes.uv.needsUpdate=!0};e.uvMapping&&_(e.uvMapping);let S={mesh:w,video:v,texture:b,updateUVMapping:_,positionalAudio:l,props:i,hadAutoPlayError:!1,pausedBecuaseHidden:!1,ended:!1,handleError(M){if(S.destroyed)return;let C=H=>H;d(M.name==="NotAllowedError"||M.name==="AbortError"?C("Waiting for user interaction"):C("Failed to auto play"))}};return this.customMedia.set(t,S),v&&e.autoPlay&&this.playVideo(t,!0),t}playVideo(t,e=!1){let i=this.customMedia.get(t);if(i?.video){if(!e&&i.positionalAudio&&i.video.currentTime<1){let n=i.video.currentTime;this.addMedia(t,i.props),i.video.currentTime=n,i.props.autoPlay||this.playVideo(t,!0);return}i.video.play().then(()=>{i.hadAutoPlayError=!1}).catch(n=>{i.pausedBecuaseHidden||((n.name==="NotAllowedError"||n.name==="AbortError"||n.message?.includes("not allowed")&&!i.pausedBecuaseHidden)&&(i.hadAutoPlayError=!0),i.handleError(n))})}}render(){for(let[t,e]of this.customMedia.entries()){let i=e.mesh.visible;e.mesh.visible=this.worldRenderer.shouldObjectVisible(e.mesh)&&!e.mesh.forceHide,i!==e.mesh.visible&&e.video&&(e.mesh.visible?e.pausedBecuaseHidden&&(this.playVideo(t),e.pausedBecuaseHidden=!1):e.video.paused||(e.video.pause(),e.pausedBecuaseHidden=!0))}}setVideoPlaying(t,e){let i=this.customMedia.get(t);i?.video&&(e?this.playVideo(t):i.video.pause())}setVideoSeeking(t,e){let i=this.customMedia.get(t);i?.video&&(i.video.currentTime=e)}setVideoVolume(t,e){let i=this.customMedia.get(t);i?.video&&(i.video.volume=e)}setVideoSpeed(t,e){let i=this.customMedia.get(t);i?.video&&(i.video.playbackRate=e)}setControlMode(t,e,i){let n=this.customMedia.get(t);n?.video&&(n.props.controlMode={mouseButton:e,controlMode:i})}destroyMedia(t){let{scene:e}=this.worldRenderer,i=this.customMedia.get(t);if(i){i.destroyed=!0,i.video&&(i.video.pause(),i.video.src="",i.video.remove()),i.positionalAudio&&this.worldRenderer.sceneOrigin.removeAndUntrack(i.positionalAudio),this.worldRenderer.sceneOrigin.removeAndUntrack(i.mesh),i.texture.dispose();let n=i.mesh.children[0];n&&(n.geometry.dispose(),n.material instanceof Q.Material&&n.material.dispose()),this.customMedia.delete(t)}}positionMeshExact(t,e,i,n,s,o=1){e===0&&(i.z+=.001),e===Math.PI/2&&(i.x-=.001),e===Math.PI&&(i.z-=.001),e===3*Math.PI/2&&(i.x+=.001),e===0&&(i.z+=1),e===Math.PI&&(i.x+=1),e===3*Math.PI/2&&(i.z+=1,i.x+=1),t.matrix.identity(),t.position.set(0,0,0),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.rotateY(e),(e===Math.PI/2||e===3*Math.PI/2)&&(t.rotateZ(-Math.PI),t.rotateX(-Math.PI)),t.scale.set(n,s,o),t.geometry.translate(.5,.5,0),t.geometry.attributes.position.needsUpdate=!0,this.worldRenderer.sceneOrigin.track(t),t.position.set(i.x,i.y,i.z);let a=new Q.Group;a.add(t);let v=new Q.Mesh(new Q.BoxGeometry(.1,.1,.1),new Q.MeshBasicMaterial({color:16711680}));v.position.set(i.x,i.y,i.z),a.add(v);let l=i.x+Math.cos(e)*n,c=i.z+Math.sin(e)*n,d=new Q.Mesh(new Q.BoxGeometry(.1,.1,.1),new Q.MeshBasicMaterial({color:255}));d.position.set(i.x,i.y+s,i.z),a.add(d);let h=new Q.Mesh(new Q.BoxGeometry(.1,.1,.1),new Q.MeshBasicMaterial({color:16776960}));h.position.set(l,i.y,c),a.add(h);let p=new Q.Mesh(new Q.BoxGeometry(.1,.1,.1),new Q.MeshBasicMaterial({color:16711935}));p.position.set(l,i.y+s,c),a.add(p);let g=new Q.Vector3(this.worldRenderer.sceneOrigin.toSceneX(i.x),this.worldRenderer.sceneOrigin.toSceneY(i.y),this.worldRenderer.sceneOrigin.toSceneZ(i.z)),b=new Q.ArrowHelper(new Q.Vector3(Math.cos(e),0,Math.sin(e)),g,1,16711680);return a.add(b),{mesh:t,debugGroup:a}}createTestCanvasTexture(){let t=new OffscreenCanvas(100,100);t.width=100,t.height=100;let e=t.getContext("2d");return e?(e.font="10px Arial",e.fillStyle="red",e.fillText("Hello World",0,10),new Q.CanvasTexture(t)):null}tryIntersectMedia(){if(Date.now()-this.lastCheck<this.THROTTLE_TIME)return;if(this.customMedia.size===0){this.worldRenderer.reactiveState.world.intersectMedia=null,this.worldRenderer.debugVideo=null,this.worldRenderer.cursorBlock.cursorLinesHidden=!1;return}this.lastCheck=Date.now();let{camera:t,scene:e}=this.worldRenderer,i=new Q.Raycaster,n=new Q.Vector2(0,0);i.setFromCamera(n,t);let s=i.intersectObjects(e.children,!0);if(s.length>0){let o=s[0],a=o.object;for(let[v,l]of this.customMedia.entries())if(a===l.mesh||l.mesh.children.includes(a)){let{uv:c}=o;if(c){let d={id:v,x:c.x,y:c.y};this.worldRenderer.reactiveState.world.intersectMedia=d,this.worldRenderer.debugVideo=l,this.worldRenderer.cursorBlock.cursorLinesHidden=!0;return}}}this.worldRenderer.reactiveState.world.intersectMedia=null,this.worldRenderer.debugVideo=null,this.worldRenderer.cursorBlock.cursorLinesHidden=!1}handleUserClick(t){let e=this.worldRenderer.reactiveState.world.intersectMedia;if(e){let{id:i,x:n,y:s}=e,o=this.customMedia.get(i),a=o?.props.controlMode;if(o?.video&&(a?.mouseButton==="both"||a?.mouseButton===t))switch(a?.controlMode){case"play_pause":{this.setVideoPlaying(i,o.video.paused);break}case"play_if_ended":{o.ended&&this.setVideoPlaying(i,!0);break}case"toggle_mute":{o.video.muted=!o.video.muted;break}}}}};x();R();T();k();import*as Bt from"three";x();R();T();k();import*as p0 from"three";var ot={TARGET_SCREEN_PX:150,CANVAS_SIZE:256,LAYOUT:{DOT_Y:.3,NAME_Y:.45,DISTANCE_Y:.55},CANVAS_SCALE:2,ARROW:{enabledDefault:!1,pixelSize:50,paddingPx:50},DEFAULT_VISUAL_SCALE:1,DEFAULT_OPACITY:1};function O6(r){let t=r.color??16711680,e=r.depthTest??!1,i=r.labelYOffset??1.5,n=r.visualScale??r.metadata?.visualScale??(typeof window>"u"?void 0:window.serverMetadata?.waypointVisualScale)??ot.DEFAULT_VISUAL_SCALE,s=r.opacity??r.metadata?.opacity??(typeof window>"u"?void 0:window.serverMetadata?.waypointOpacity)??ot.DEFAULT_OPACITY,o=T8(t,r.label??"","0m",e,n);o.renderOrder=10,o.material.opacity=s;let a=r.label??"",v="0m",l=0,c,d=null,h=ot.ARROW.enabledDefault,p=new p0.Group;p.add(o);let{x:g,y:b,z:A}=r.position;p.position.set(g,b,A);function w(V){let Z=f1(V,a,"0m",n),K=new p0.CanvasTexture(Z),n0=o.material;n0.map?.dispose(),n0.map=K,n0.needsUpdate=!0}function _(V){a=V??"";let Z=f1(t,a,"0m",n),K=new p0.CanvasTexture(Z),n0=o.material;n0.map?.dispose(),n0.map=K,n0.needsUpdate=!0}function S(V,Z){if(Z===v)return;v=Z;let K=f1(t,V,Z,n),n0=new p0.CanvasTexture(K),s0=o.material;s0.map?.dispose(),s0.map=n0,s0.needsUpdate=!0}function M(V){o.visible=V}function C(V,Z,K){p.position.set(V,Z,K)}function H(V,Z,K,n0){let s0=Z*Math.PI/180,$=Math.tan(s0/2)*2*K*(ot.TARGET_SCREEN_PX*n/n0);o.scale.set($,$,1)}function B(){if(c)return;let V=128,Z=L0(V,V),K=Z.getContext("2d");K.clearRect(0,0,V,V),K.beginPath(),K.moveTo(V*.15,V*.5),K.lineTo(V*.85,V*.5),K.lineTo(V*.5,V*.15),K.closePath();let n0=`#${t.toString(16).padStart(6,"0")}`;K.lineWidth=6,K.strokeStyle="black",K.stroke(),K.fillStyle=n0,K.fill();let s0=new p0.CanvasTexture(Z),l0=new p0.SpriteMaterial({map:s0,transparent:!0,depthTest:!1,depthWrite:!1,opacity:s});c=new p0.Sprite(l0),c.renderOrder=12,c.visible=!1,d&&d.add(c)}function I(V){h=V,!V&&c&&(c.visible=!1)}function W(V){c?.parent&&c.parent.remove(c),d=V,c&&V&&V.add(c)}function z(V,Z,K){if(!h||(B(),!c))return!0;let n0=r.metadata?.onlyLeftRight===!0,s0=new p0.Vector3;V.getWorldDirection(s0);let l0=V.up.clone().normalize(),$=new p0.Vector3().copy(s0).cross(l0).normalize(),u0=new p0.Vector3().copy($).cross(s0).normalize(),$0=new p0.Vector3().setFromMatrixPosition(V.matrixWorld),z0=new p0.Vector3(p.position.x,p.position.y,p.position.z).sub($0),Y0=z0.dot(s0),ct=z0.dot($),dt=z0.dot(u0),M0=Z/K,K0=V.fov*Math.PI/180,Se=2*Math.atan(Math.tan(K0/2)*M0),g5=Math.atan2(ct,Y0),Ce=Math.atan2(dt,Y0);if(Y0>0&&Math.abs(g5)<=Se/2&&Math.abs(Ce)<=K0/2)return c.visible=!1,!0;let O0=g5/(Se/2),tt=Ce/(K0/2);Y0<=0&&(Math.abs(O0)>Math.abs(tt)?(O0=Math.sign(O0),tt=0):(O0=0,tt=Math.sign(tt))),n0&&(Math.abs(O0)>Math.abs(tt)||(O0=O0>=0?1:-1),tt=0);let b5=Math.max(Math.abs(O0),Math.abs(tt))||1,Lt=O0/b5,Pe=tt/b5,re=ot.ARROW.paddingPx,y5=(Lt+1)*.5*Z,se=(1-Pe)*.5*K,et=Math.min(Math.max(y5,re),Z-re),Be=Math.min(Math.max(se,re),K-re);Lt=et/Z*2-1,Pe=-(Be/K)*2+1;let Ie=Math.max(2,V.near*4),st=Math.tan(K0/2)*Ie,C1=st*M0,y=$0.clone().add(s0.clone().multiplyScalar(Ie)).add($.clone().multiplyScalar(Lt*C1)).add(u0.clone().multiplyScalar(Pe*st));c.visible=!0,c.position.copy(y);let f=Math.atan2(tt,O0);c.material.rotation=f-Math.PI/2;let E=Math.tan(K0/2)*2*Ie*(ot.ARROW.pixelSize*n/K);return c.scale.set(E,E,1),!1}function j(V){return p.position.length()}function q(V,Z,K,n0){let s0=j(V);H(V,Z.fov,s0,n0);let l0=Math.round(s0);Math.abs(l0-l)>=1&&(l=l0,S(a,`${l0}m`));let $=z(Z,K,n0);return M($),$}function e0(){let V=o.material;if(V.map?.dispose(),V.dispose(),c){c.parent&&c.parent.remove(c);let Z=c.material;Z.map?.dispose(),Z.dispose()}}return{group:p,sprite:o,enableOffscreenArrow:I,setArrowParent:W,updateForCamera:q,setColor:w,setLabel:_,updateDistanceText:S,setVisible:M,setPosition:C,dispose:e0}}function f1(r,t,e,i=1){let n=ot.CANVAS_SCALE*(globalThis.devicePixelRatio||1),s=ot.CANVAS_SIZE*n,o=L0(s,s),a=o.getContext("2d");a.clearRect(0,0,s,s);let v=s/2,l=Math.round(s*ot.LAYOUT.DOT_Y),c=Math.round(s*.05*i),d=Math.max(2,Math.round(4*n*i));a.beginPath(),a.arc(v,l,c+d,0,Math.PI*2),a.fillStyle="black",a.fill(),a.beginPath(),a.arc(v,l,c,0,Math.PI*2),a.fillStyle=`#${r.toString(16).padStart(6,"0")}`,a.fill(),a.textAlign="center",a.textBaseline="middle";let h=Math.round(s*.08*i),p=Math.round(s*.06*i);a.font=`bold ${h}px mojangles`,a.lineWidth=Math.max(2,Math.round(3*n*i));let g=Math.round(s*ot.LAYOUT.NAME_Y);a.strokeStyle="black",a.strokeText(t,v,g),a.fillStyle="white",a.fillText(t,v,g),a.font=`bold ${p}px mojangles`,a.lineWidth=Math.max(2,Math.round(2*n*i));let b=Math.round(s*ot.LAYOUT.DISTANCE_Y);return a.strokeStyle="black",a.strokeText(e,v,b),a.fillStyle="#CCCCCC",a.fillText(e,v,b),o}function T8(r,t,e,i,n=1){let s=f1(r,t,e,n),o=new p0.CanvasTexture(s);o.anisotropy=1,o.magFilter=p0.LinearFilter,o.minFilter=p0.LinearFilter;let a=new p0.SpriteMaterial({map:o,transparent:!0,opacity:1,depthTest:i,depthWrite:!1}),v=new p0.Sprite(a);return v.position.set(0,0,0),v}var h1=class{constructor(t){this.worldRenderer=t;u(this,"waypoints",new Map);u(this,"waypointScene",new Bt.Scene);u(this,"lastCameraPosition",new Bt.Vector3);u(this,"lastUpdateTime",0);u(this,"UPDATE_THROTTLE_MS",16)}updateWaypoints(){let t=performance.now(),e=this.worldRenderer.getCameraPosition(),i=this.lastCameraPosition.distanceTo(e)>.5,n=t-this.lastUpdateTime>this.UPDATE_THROTTLE_MS;if(!i&&!n)return;this.lastCameraPosition.copy(e),this.lastUpdateTime=t;let s=this.worldRenderer.renderer.getSize(new Bt.Vector2);for(let o of this.waypoints.values()){let a=new Bt.Vector3(o.x,o.y,o.z),v=e.distanceTo(a),l=(!o.minDistance||v>=o.minDistance)&&(o.maxDistance===1/0||v<=o.maxDistance);o.sprite.setVisible(l),l&&(o.sprite.setPosition(this.worldRenderer.sceneOrigin.toSceneX(o.x),this.worldRenderer.sceneOrigin.toSceneY(o.y),this.worldRenderer.sceneOrigin.toSceneZ(o.z)),o.sprite.updateForCamera(this.worldRenderer.getCameraPosition(),this.worldRenderer.camera,s.width,s.height))}}render(){this.waypoints.size!==0&&(this.updateWaypoints(),this.worldRenderer.renderer.render(this.waypointScene,this.worldRenderer.camera))}addWaypoint(t,e,i,n,s={}){this.removeWaypoint(t);let o=s.color??16711680,{label:a,metadata:v}=s,l=s.minDistance??0,c=s.maxDistance??1/0,d=O6({position:new Bt.Vector3(e,i,n),color:o,label:a||t,metadata:v});d.enableOffscreenArrow(!0),d.setArrowParent(this.waypointScene),this.waypointScene.add(d.group),this.waypoints.set(t,{id:t,x:e+.5,y:i+.5,z:n+.5,minDistance:l,maxDistance:c,color:o,label:a,sprite:d})}removeWaypoint(t){let e=this.waypoints.get(t);e&&(this.waypointScene.remove(e.sprite.group),e.sprite.dispose(),this.waypoints.delete(t))}clear(){for(let t of this.waypoints.keys())this.removeWaypoint(t)}testWaypoint(){this.addWaypoint("Test Point",0,70,0,{color:65280,label:"Test Point"}),this.addWaypoint("Spawn",0,64,0,{color:16776960,label:"Spawn"}),this.addWaypoint("Far Point",100,70,100,{color:255,label:"Far Point"}),this.addWaypoint("Far Point 2",180,170,100,{color:255,label:"Far Point 2"}),this.addWaypoint("Far Point 3",1e3,100,1e3,{color:255,label:"Far Point 3"})}getWaypoint(t){return this.waypoints.get(t)}getAllWaypoints(){return[...this.waypoints.values()]}setWaypointColor(t,e){let i=this.waypoints.get(t);i&&(i.sprite.setColor(e),i.color=e)}setWaypointLabel(t,e){let i=this.waypoints.get(t);i&&(i.label=e,i.sprite.setLabel(e))}};x();R();T();k();import*as b0 from"three";import{Vec3 as l5}from"vec3";var g0=class g0{constructor(t){this.worldRenderer=t;u(this,"explosions",new Map);u(this,"particleGeometry");u(this,"particleMaterials",[]);u(this,"testModeTimer");u(this,"explosionCounter",0);this.particleGeometry=new b0.BoxGeometry(g0.DEFAULT_PARTICLE_SIZE,g0.DEFAULT_PARTICLE_SIZE,g0.DEFAULT_PARTICLE_SIZE),this.createParticleMaterials()}createParticleMaterials(){let t=[16711680,65280,255,16776960,16711935,65535,16753920,8388736,16761035,16777215];for(let e of t){let i=new b0.MeshBasicMaterial({color:e,transparent:!0,opacity:1});this.particleMaterials.push(i)}}getRandomMaterial(){return this.particleMaterials[Math.floor(Math.random()*this.particleMaterials.length)]}createExplosion(t,e=1,i,n=g0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],a=Math.floor(g0.DEFAULT_PARTICLE_COUNT*e),v;if(g0.DEBUG_SHOW_EXPLOSION_CENTER){let c=.5*e,d=new b0.SphereGeometry(c,8,8),h=new b0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});v=new b0.Mesh(d,h),v.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(v),v.position.set(t.x,t.y,t.z)}for(let c=0;c<a;c++){let d=Math.random()*Math.PI*2,h=Math.sqrt(Math.random())*g0.VELOCITY_FACTOR*e,p=new l5(h*Math.cos(d),Math.random()*.5-.25,h*Math.sin(d));c<5;let g=i===void 0?this.getRandomMaterial().clone():new b0.MeshBasicMaterial({color:i,transparent:!0,opacity:1}),b=new b0.Mesh(this.particleGeometry,g);b.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(b),b.position.set(t.x,t.y,t.z),c<5;let A={position:t.clone(),velocity:p,color:new b0.Color(g.color),life:1,maxLife:1,mesh:b};o.push(A)}let l={id:s,position:t.clone(),particles:o,startTime:Date.now(),duration:n,size:e,debugSphere:v};return this.explosions.set(s,l),l}createExplosionFacingCamera(t,e=1,i,n=g0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],a=Math.floor(g0.DEFAULT_PARTICLE_COUNT*e),v;if(g0.DEBUG_SHOW_EXPLOSION_CENTER){let h=.5*e,p=new b0.SphereGeometry(h,8,8),g=new b0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});v=new b0.Mesh(p,g),v.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(v),v.position.set(t.x,t.y,t.z)}let l=this.worldRenderer.getCameraPosition(),c=new l5(l.x-t.x,l.y-t.y,l.z-t.z).normalize();for(let h=0;h<a;h++){let p=Math.random()*Math.PI*2,g=Math.sqrt(Math.random())*g0.VELOCITY_FACTOR*e,b=new l5(g*Math.cos(p),g*Math.sin(p),0),A=new l5(b.x*c.x-b.z*c.z,b.y,b.x*c.z+b.z*c.x);h<5;let w=i===void 0?this.getRandomMaterial().clone():new b0.MeshBasicMaterial({color:i,transparent:!0,opacity:1}),_=new b0.Mesh(this.particleGeometry,w);_.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(_),_.position.set(t.x,t.y,t.z);let S={position:t.clone(),velocity:A,color:new b0.Color(w.color),life:1,maxLife:1,mesh:_};o.push(S)}let d={id:s,position:t.clone(),particles:o,startTime:Date.now(),duration:n,size:e,debugSphere:v};return this.explosions.set(s,d),d}explode(t,e=1,i,n){return this.createExplosion(t,e,i,n).id}explodeFacingCamera(t,e=1,i,n){return this.createExplosionFacingCamera(t,e,i,n).id}startTestMode(){let t=this.worldRenderer.getCameraPosition(),e=new l5(t.x,t.y+10,t.z);this.testModeTimer=setInterval(()=>{let i=.8+Math.random()*.4,n=[16711680,65280,255,16776960,16711935,65535,16753920],s=n[Math.floor(Math.random()*n.length)];this.explodeFacingCamera(e,i,s)},g0.TEST_INTERVAL)}updateParticle(t,e,i){let n=t.mesh.position.x===t.position.x&&t.mesh.position.y===t.position.y&&t.mesh.position.z===t.position.z;n&&t.life>.95,t.velocity.y+=g0.GRAVITY;let s=t.position.clone(),o=e/1e3;t.position.add(t.velocity.scaled(o)),t.mesh.position.set(t.position.x,t.position.y,t.position.z);let a=t.life;t.life-=e/i;let v=Math.max(0,t.life);if(t.mesh.material instanceof b0.MeshBasicMaterial&&(t.mesh.material.opacity=v),n&&a>.95){let l=t.position.distanceTo(s)}return t.life>0}render(){let t=Date.now(),e=16.67;this.explosions.size>0&&Math.random()<.01;for(let[i,n]of this.explosions.entries()){let s=t-n.startTime;if(s>=n.duration){this.removeExplosion(i);continue}s%2e3<16,n.particles=n.particles.filter(o=>this.updateParticle(o,e,n.duration)),n.particles.length===0&&this.removeExplosion(i)}}removeExplosion(t){let e=this.explosions.get(t);if(e){for(let i of e.particles)this.worldRenderer.sceneOrigin.removeAndUntrack(i.mesh),i.mesh.material instanceof b0.Material&&i.mesh.material.dispose();e.debugSphere&&(this.worldRenderer.sceneOrigin.removeAndUntrack(e.debugSphere),e.debugSphere.geometry.dispose(),e.debugSphere.material instanceof b0.Material&&e.debugSphere.material.dispose()),this.explosions.delete(t)}}stopTestMode(){this.testModeTimer&&(clearInterval(this.testModeTimer),this.testModeTimer=void 0)}destroy(){this.stopTestMode();for(let t of this.explosions.keys())this.removeExplosion(t);for(let t of this.particleMaterials)t.dispose();this.particleGeometry.dispose()}};u(g0,"DEFAULT_PARTICLE_COUNT",50),u(g0,"DEFAULT_PARTICLE_SIZE",.05),u(g0,"DEFAULT_EXPLOSION_DURATION",6e3),u(g0,"GRAVITY",-.005),u(g0,"VELOCITY_FACTOR",1.5),u(g0,"TEST_INTERVAL",1e3),u(g0,"DEBUG_SHOW_EXPLOSION_CENTER",!0),u(g0,"DEBUG_SHOW_PARTICLE_TRAILS",!1);var m1=g0;x();R();T();k();import*as $t from"three";import{Vec3 as Wi}from"vec3";var p1=class r{constructor(t,e,i,n){this.worldRenderer=t;this.updateCamera=e;this.updateFov=i;this.getInitialState=n;u(this,"isRunning",!1);u(this,"currentScript",null);u(this,"currentPointIndex",0);u(this,"currentTweens",[]);u(this,"startTime",0);u(this,"totalDuration",0);u(this,"currentPosition",{x:0,y:0,z:0});u(this,"currentRotation",{yaw:0,pitch:0});u(this,"currentFov",75)}startScript(t){if(this.isRunning||!t.points||t.points.length===0)return!1;this.currentScript=t,this.isRunning=!0,this.currentPointIndex=0,this.startTime=performance.now(),this.totalDuration=t.points.reduce((i,n)=>i+n.duration,0);let e=this.getInitialState();return this.currentPosition={x:e.position.x,y:e.position.y,z:e.position.z},this.currentRotation={yaw:e.yaw,pitch:e.pitch},this.currentFov=e.fov,this.moveToPoint(0),!0}stopScript(){if(this.isRunning){for(let t of this.currentTweens)t.stop();this.currentTweens=[],this.isRunning=!1,this.currentScript=null,this.currentPointIndex=0}}runExampleScripts(t){let e=this.worldRenderer.getCameraPosition(),i=new Wi(e.x,e.y,e.z),n=r.createCircularFlyby(i,30,20,15e3),s=r.createSpiralDescent(i.offset(0,50,0),i,3,12e3),o=r.createBuildingTour([{pos:i.offset(-20,10,-20),lookAt:i,duration:3e3},{pos:i.offset(20,15,-20),lookAt:i,duration:3e3},{pos:i.offset(20,20,20),lookAt:i,duration:3e3},{pos:i.offset(-20,25,20),lookAt:i,duration:3e3}]),a=[n,s,o];return this.startScript(a[t]),{circular:n,spiral:s,buildingTour:o}}moveToPoint(t){if(!this.currentScript||t>=this.currentScript.points.length){this.handleScriptComplete();return}let e=this.currentScript.points[t],{duration:i}=e,n={x:e.x,y:e.y,z:e.z},s={yaw:e.yaw,pitch:e.pitch},o=e.fov??this.currentFov;if(e.lookAt){let d=new $t.Vector3(e.lookAt.x,e.lookAt.y,e.lookAt.z),h=new $t.Vector3(e.x,e.y,e.z),p=d.sub(h).normalize();s.yaw=Math.atan2(-p.x,-p.z),s.pitch=Math.asin(p.y)}let a=this.getEasingFunction(e.easing||"easeInOut"),v=new S0(this.currentPosition).to(n,i).easing(a).onUpdate(()=>{this.updateCamera(new Wi(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),l=new S0(this.currentRotation).to(this.wrapRotation(s),i).easing(a).onUpdate(()=>{this.updateCamera(new Wi(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),c=null;if(Math.abs(o-this.currentFov)>.1){let d={fov:this.currentFov};c=new S0(d).to({fov:o},i).easing(a).onUpdate(()=>{this.currentFov=d.fov,this.updateFov(this.currentFov)})}this.currentTweens=[v,l],c&&this.currentTweens.push(c),v.start(),l.start(),c?.start(),v.onComplete(()=>{this.currentPointIndex++,this.currentScript?.onPointReached?.(t,e),this.isRunning&&this.moveToPoint(this.currentPointIndex)})}wrapRotation(t){let e=t.yaw,i=e-this.currentRotation.yaw;i>Math.PI?e-=2*Math.PI:i<-Math.PI&&(e+=2*Math.PI);let n=Math.max(-Math.PI/2+.01,Math.min(Math.PI/2-.01,t.pitch));return{yaw:e,pitch:n}}getEasingFunction(t){switch(t){case"linear":return k0.Linear.None;case"easeIn":return k0.Quadratic.In;case"easeOut":return k0.Quadratic.Out;case"easeInOut":return k0.Quadratic.InOut;case"smoothstep":return k0.Cubic.InOut;case"bounce":return k0.Bounce.Out;default:return k0.Quadratic.InOut}}handleScriptComplete(){if(!this.currentScript)return;let t=this.currentScript;t.loop?(this.currentPointIndex=0,this.moveToPoint(0)):(t.onComplete?.(),this.stopScript())}get running(){return this.isRunning}get progress(){if(!this.isRunning||this.totalDuration===0)return 0;let t=performance.now()-this.startTime;return Math.min(t/this.totalDuration,1)}get currentScriptName(){return this.currentScript?.name}static createCircularFlyby(t,e,i,n){let s=[];for(let a=0;a<=8;a++){let v=a/8*Math.PI*2,l=t.x+Math.cos(v)*e,c=t.z+Math.sin(v)*e,d=t.y+i;s.push({x:l,y:d,z:c,yaw:v+Math.PI/2,pitch:-.2,duration:n/8,easing:"smoothstep",lookAt:{x:t.x,y:t.y,z:t.z}})}return{name:"Circular Flyby",points:s,loop:!1}}static createSpiralDescent(t,e,i,n){let s=[],o=i*8,a=20;for(let v=0;v<=o;v++){let l=v/o,c=l*i*Math.PI*2,d=$t.MathUtils.lerp(t.x,e.x,l)+Math.cos(c)*a*(1-l),h=$t.MathUtils.lerp(t.z,e.z,l)+Math.sin(c)*a*(1-l),p=$t.MathUtils.lerp(t.y,e.y,l);s.push({x:d,y:p,z:h,yaw:c+Math.PI/2,pitch:-.3*l,duration:n/o,easing:"easeInOut"})}return{name:"Spiral Descent",points:s,loop:!1}}static createBuildingTour(t){return{name:"Building Tour",points:t.map((i,n)=>({x:i.pos.x,y:i.pos.y,z:i.pos.z,yaw:0,pitch:0,duration:i.duration||3e3,easing:"smoothstep",lookAt:i.lookAt?{x:i.lookAt.x,y:i.lookAt.y,z:i.lookAt.z}:void 0})),loop:!1}}};x();R();T();k();import*as i0 from"three";var Ni=.75,g1=class{constructor(t,e,i){this.scene=t;this.defaultSkybox=e;this.initialImage=i;u(this,"texture",null);u(this,"mesh",null);u(this,"skyMesh",null);u(this,"voidMesh",null);u(this,"worldTime",0);u(this,"partialTicks",0);u(this,"viewDistance",4);u(this,"temperature",Ni);u(this,"inWater",!1);u(this,"waterBreathing",!1);u(this,"fogBrightness",0);u(this,"prevFogBrightness",0);u(this,"fogOrangeness",0);u(this,"distanceFactor",2.7);u(this,"brightnessAtPosition",1);u(this,"debugGui");this.debugGui=new wt("skybox_renderer",this,["temperature","worldTime","inWater","waterBreathing","fogOrangeness","brightnessAtPosition","distanceFactor"],{brightnessAtPosition:{min:0,max:1,step:.01},temperature:{min:0,max:1,step:.01},worldTime:{min:0,max:24e3,step:1},fogOrangeness:{min:-1,max:1,step:.01},distanceFactor:{min:0,max:5,step:.01}}),i||this.createGradientSky()}async init(){this.initialImage&&await this.setSkyboxImage(this.initialImage)}async setSkyboxImage(t){this.texture&&this.texture.dispose();let e=new i0.TextureLoader;if(this.texture=await new Promise(i=>{e.load(t,n=>{n.mapping=i0.EquirectangularReflectionMapping,n.encoding=i0.sRGBEncoding,n.minFilter=i0.NearestFilter,n.magFilter=i0.NearestFilter,n.needsUpdate=!0,i(n)})}),this.mesh)this.mesh.material.map=this.texture,this.mesh.material.needsUpdate=!0;else{let i=new i0.SphereGeometry(500,60,40);i.scale(-1,1,1);let n=new i0.MeshBasicMaterial({map:this.texture,side:i0.FrontSide});this.mesh=new i0.Mesh(i,n),this.scene.add(this.mesh)}}update(t,e){e!==this.viewDistance&&(this.viewDistance=e,this.updateSkyColors()),this.mesh?this.mesh.position.set(0,0,0):this.skyMesh&&(this.skyMesh.position.set(0,0,0),this.voidMesh?.position.set(0,0,0),this.updateSkyColors())}updateTime(t,e=0){this.debugGui.visible||(this.worldTime=t,this.partialTicks=e,this.updateSkyColors())}updateViewDistance(t){this.viewDistance=t,this.updateSkyColors()}updateTemperature(t){this.debugGui.visible||(this.temperature=t,this.updateSkyColors())}updateWaterState(t,e){this.debugGui.visible||(this.inWater=t,this.waterBreathing=e,this.updateSkyColors())}updateDefaultSkybox(t){this.debugGui.visible||(this.defaultSkybox=t,this.updateSkyColors())}createGradientSky(){{let i=new i0.PlaneGeometry(768,768);i.rotateX(-Math.PI/2),i.translate(0,16,0);let n=new i0.MeshBasicMaterial({color:16777215,side:i0.DoubleSide,depthTest:!1});this.skyMesh=new i0.Mesh(i,n),this.scene.add(this.skyMesh)}{let i=new i0.PlaneGeometry(768,768);i.rotateX(-Math.PI/2),i.translate(0,-16,0);let n=new i0.MeshBasicMaterial({color:16777215,side:i0.DoubleSide,depthTest:!1});this.voidMesh=new i0.Mesh(i,n),this.scene.add(this.voidMesh)}this.updateSkyColors()}getFogColor(t=0){let e=this.getCelestialAngle(t),i=Math.cos(e*Math.PI*2)*2+.5;i=Math.max(0,Math.min(1,i));let n=.7529412,s=.84705883,o=1;return n*=i*.94+.06,s*=i*.94+.06,o*=i*.91+.09,new i0.Vector3(n,s,o)}getSkyColor(t=0,e=0,i=0){let n=this.getCelestialAngle(i),s=Math.cos(n*3.141593*2)*2+.5;s<0&&(s=0),s>1&&(s=1);let o=this.getTemperature(t,e),a=this.getSkyColorByTemp(o),v=(a>>16&255)/255,l=(a>>8&255)/255,c=(a&255)/255;return new i0.Vector3(v*s,l*s,c*s)}calculateCelestialAngle(t,e){let n=(t%24e3+e)/24e3-.25;return n<0&&n++,n>1&&n--,n=1-(Math.cos(n*Math.PI)+1)/2,n+=(n-n)/3,n}getCelestialAngle(t){return this.calculateCelestialAngle(this.worldTime,t)}getTemperature(t,e){return this.temperature}getSkyColorByTemp(t){t/=3,t<-1&&(t=-1),t>1&&(t=1);let e=.6222222-t*.05,n=this.fogOrangeness>0?e+(.12-e)*this.fogOrangeness*.8:e+this.fogOrangeness*.1,s=.5+t*.1+Math.abs(this.fogOrangeness)*.3;return this.hsbToRgb(n,s,1)}hsbToRgb(t,e,i){let n=0,s=0,o=0;if(e===0)n=s=o=Math.floor(i*255+.5);else{let a=(t-Math.floor(t))*6,v=a-Math.floor(a),l=i*(1-e),c=i*(1-e*v),d=i*(1-e*(1-v));switch(Math.floor(a)){case 0:n=Math.floor(i*255+.5),s=Math.floor(d*255+.5),o=Math.floor(l*255+.5);break;case 1:n=Math.floor(c*255+.5),s=Math.floor(i*255+.5),o=Math.floor(l*255+.5);break;case 2:n=Math.floor(l*255+.5),s=Math.floor(i*255+.5),o=Math.floor(d*255+.5);break;case 3:n=Math.floor(l*255+.5),s=Math.floor(c*255+.5),o=Math.floor(i*255+.5);break;case 4:n=Math.floor(d*255+.5),s=Math.floor(l*255+.5),o=Math.floor(i*255+.5);break;case 5:n=Math.floor(i*255+.5),s=Math.floor(l*255+.5),o=Math.floor(c*255+.5);break}}return 4278190080|n<<16|s<<8|Math.trunc(o)}updateSkyColors(){if(!this.skyMesh||!this.voidMesh)return;if(!this.defaultSkybox){this.skyMesh.visible=!1,this.voidMesh.visible=!1,this.mesh&&(this.mesh.visible=!1);return}this.skyMesh.visible=!0,this.voidMesh.visible=!0,this.mesh&&(this.mesh.visible=!0),this.prevFogBrightness=this.fogBrightness;let t=this.viewDistance/32,e=this.brightnessAtPosition*(1-t)+t;if(this.fogBrightness+=(e-this.fogBrightness)*.1,this.inWater){let g=this.waterBreathing?100:5;this.scene.fog=new i0.Fog(new i0.Color(0,0,1),.0025,g),this.scene.background=new i0.Color(0,0,1),this.skyMesh.material.color.set(new i0.Color(0,0,1)),this.voidMesh.material.color.set(new i0.Color(0,0,.6));return}let i=this.viewDistance*16,n=1-(.25+.75*this.viewDistance/32)**.25,s=this.getCelestialAngle(this.partialTicks),o=this.getSkyColor(0,0,this.partialTicks),a=this.getFogColor(this.partialTicks),v=Math.cos(s*Math.PI*2)*2+.5,l=Math.max(0,Math.min(1,v)),c=this.prevFogBrightness+(this.fogBrightness-this.prevFogBrightness)*this.partialTicks,d=(a.x+(o.x-a.x)*n)*l*c,h=(a.y+(o.y-a.y)*n)*l*c,p=(a.z+(o.z-a.z)*n)*l*c;this.scene.background=new i0.Color(d,h,p),this.scene.fog=new i0.Fog(new i0.Color(d,h,p),.0025,i*this.distanceFactor),this.skyMesh.material.color.set(new i0.Color(o.x,o.y,o.z)),this.voidMesh.material.color.set(new i0.Color(o.x*.2+.04,o.y*.2+.04,o.z*.6+.1))}dispose(){this.texture&&this.texture.dispose(),this.mesh&&(this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.scene.remove(this.mesh)),this.skyMesh&&(this.skyMesh.geometry.dispose(),this.skyMesh.material.dispose(),this.scene.remove(this.skyMesh)),this.voidMesh&&(this.voidMesh.geometry.dispose(),this.voidMesh.material.dispose(),this.scene.remove(this.voidMesh))}};x();R();T();k();import*as r0 from"three";var M8=`
21185
+ f 71/216/54 68/215/54 67/214/54 72/213/54`;var Bi={allay:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAV1BMVEUAAAA4jNkuh9Ypg9FBnNpCm9r///+c/P+A/P9k+/9N8/h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zro8hrtuIKkC3Cr53dPFIqcxG9EjaPTIPb1DGpVmlEaUNHa924dfgHfQFwmyc0LyT5NwAAAABJRU5ErkJggg==",ghast:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgBAMAAABQs2O3AAAAIVBMVEUAAAD////5+fnw8PDl5OTk4uLd2trYzMydmZlzc3NLSkr5ldknAAAAAXRSTlMAQObYZgAAAYdJREFUeNp9ksGN2zAQRdmDO5iBfN95JlWAgeRuAkLOZuRNzgrcQYLdBoJVOoirjCmRYDYy8i//wIc/n+Q4J7gs6YgdJxFRBBNXVQENRE8yZZG187sKkEIGLi/z/HL5D/Blvt3mH+8Ay044ZgBeb3e90QDVCkz94QFgpbGugOmvDPy2vxNYgMPnDFCAloCoLgDXqf9wfJBgKwAfU/+M8S9AGQH9MXzDSskGYJQRgcMEurkmDSCxfSiABtCeegsssuJbQETFTKS6q6r/v/FOl/1wXSrRtQOESDh1F6aeZG12mKBvC6N9Bq6nBtA8xApM5vCJRxpXAAdgEfg6f/80/wS8wggrMCwjbCl33T09Zw+6dqolB5/Yw45p9xRAORMiaB2hQLTRlLSWHNTXBHICwD6Jv0Qg3E3CGTDWLffOJ7B9NFkTRP1ZYbTRkyCaUxiS6TCyaBhNwwgoOQGcMsp+RBRe38CE4axrhxhKAlYqALmEEqIpRA9D+SwTikQpt1n93R5IcTOKi/wBKsTOnkkgxrkAAAAASUVORK5CYII=",goat:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAMFBMVEUAAAD////6+vrw7+zq597b1cLArJCenp6ciHaDg4OFcmF0c3NXV1dNTU1APj40MzImjJ+xAAAAAXRSTlMAQObYZgAAA5JJREFUeNqNk71u7EQUx0eb9YqKZ4jOeFPchjAze4s0rObDQrcy9ngU3QKixDNaueAFaChIFFHQR4IGci2078ADoER5g0g8ANqKHs7YeONsyIqf5HP88fP5j3dt8r+ZAAOokPxVQaDgvc/J9Q8bgsQ24oCnlFehfV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mCC",guardian:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAhFBMVEX///+rjEZQjnQtWUcAAADX1c/Y1cvX1czX1MzX08vW083X08rW08vX0snW0snV0crAuq7Auq3Auaq+ua3dkET/gi+DpZy5k2Syk0/wdyjecipqlYPsZCqFhmBmiYDLZSNdf3XeSSh4dVCmXCxOeWbUQSDKPBxBcVpkW1BgVko5ZVJ5CxKoxgN0AAAABXRSTlMAAAAAAMJrBrEAAAOASURBVHjapZaJcttIDAW5lvfIHtnLYiLDee4kzwsL+///F45I66AkW467akSoIHRhhjOkuq5bLper4fL/wHAhiscBItiMIYSgm+j76GOga1xdXXWD4PNy2epHQ9q1HrAz0+mneCswfeB+K/i8Wi6HsZoEA4vFojtP4E1vO8GmvvWw5QUBEd4TrFabBj53F9LbEfZOcLt8WN2ubi8WTEu7J1g9DPUPt5cLPBM83N3e3g2C6+tu4PqYmaCPxk5w99/9XRsvCaLR9+G0Y8ID3f3916/DuO8azwmMgTA4WuQWp7uvEy8KYFObOQpsR4K7S4kJ7Izod1MYaSvwetoivk2wWAyCGR4PUNmZbawHnOWLBTQeqxgZj3PBWQEHbhPRD2TfrlNuOqCmPQs2I6M/I0hCAleAgtwKNrmeMhIux1lBLwklknpy1l0rbfXinMD0SEDTxDwXLlVt2tubwrrbY02fNZFxlEMoKpB2gsfDHz2G/fev735+/6/NcU6yC0lxVtDbv7z78aff39s6EiRylRFxdgoB//z25x/v/kKa5ygD0T778/tAYMCS5rmKsoTKz9wFYRc4kee3OBU0byJtBZr9SFkViAqsnG8yQGpDz0whWqmi0DynPU4eJmy6xUDLffz06UueP+xnBMkueXPz4UvW9ws+thZEveaBkmV2325ubj59gXqFgPV6r4OhhQ9DD4cCIZ0XPK7Xj/MO8lDgFwWzNcjZDBC6cArddBcOkcyld6Htgx+6GXq+g2z6Z8HivEDPCSyxGchInN3K50A22Iim8ZNAESnFgKTjg5URaEyiAZA4mEK4CtPcCs97rngqEuk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icRCFjL4fJRdkuXPfngCi54uxP1hEzonQX4v7sRMLnMefhfpIwXrAFhXyw4P7/kgmYSeJwxJwAAAAASUVORK5CYII=",vex:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAMFBMVEUAAABthJtgeY9Ta4H////z+Pzg6fHG2eqivNWUrMOGn7eCl6t5kqp6j6RthJtgcoMKluMvAAAABHRSTlMAoKCgEjok+wAAAPlJREFUeNq1yL1Kw1AAhuE3hxYrRYm5gmivQL0Hwa1LnAtCFpdOjuKY4KBjfnYhIUPWEnIBhgxZRSjHC8hp3KWxkg5ndfD5pu8FDqNAKQkwKXIE9Fuj3zCQjECYDCaPs4tOQP9pDME4B1MAbIwTgJEwv2yixPcCPw2igGkcljlZ3YfP33WSJTB9yhG25HaJPLUBtkCdvl5fpVlVVRy3ntdQZW+eX6e77UIcNqAke0eq+JCgGvam4apoUGqtHtC067K9Q1O+l2WMJl9RvPAnl7+0L5Ao9NBB16GxZpZloTGFeWYC47l7DzrXcUF3sHTQjW9YoHMW4zn/5QeNK1xt8XQSVQAAAABJRU5ErkJggg==",villager:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAbFBMVEX///++iGy3gnKze2J6enpra2thYWFUVFRUU1NISElMODM9LSkAAAD///++iGy3gnKUj4m1e2eze2KBfXl/e3eja01vbWqQXkNjYmAAlhFUU1N1Ry93QjVcQjpISElMODM9LSkzJBEjIyMjGBTjk4HHAAAADXRSTlMAAAAAAAAAAAAAAAAA7Uh4SAAAAn9JREFUeNrtlN1ymzAQRm3cuG5C9oMFJIW0idu+/zt2/wieiTNAk0ufgdEKs0cryWJXB0RguUEO1/Xzc871Irs3AViTQdnYLgAzGfmPkFnT9V4tiAI+IyCB/19AVgA+KyCaF9FZL3iDlfUCAl0AjpYmFgWagjkJfjNCtCwgml7niyrmcJ0gho7mQkDrBJALsAhwyYY1IAP4bahgdmKFgBme8PjE/PRI3mM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1c/vEMgMkgItV/kYbN5upys/nw4dWhAOarGkS4Ay6vthmYfL8HAHNViD2w3VxdbbfPAGoMV1VVuz2w/fTpeUBt6ro6r4yWwtnZycnJ2dmrgwHMwqjODbmADgeIqrx6Q5XBKvALSlRyOCZjAJM5ZyJig0dgKkN3sw4HjwMEwTAFNlRfuIpDnkIF4DAOMAsRgGAMuYvzEBwmQRTG0SGAGlYX5hfv8AjfzYMT54QzwJ4OAkRFHc//Kc2ZhJQ9xvHCBwDCAkGE3r4P4f1bkuxB9ThRFR4FNCVFqQ9zFHp8wr7OX616XBsFUt+vUwbmf6M5ZtI6rYHgwqpfrQ4BUhb6eanv0rpba5dS32G8GwdOT1+f5iYjjQG/PvmHTwE/o5/Q5EFWhVnUNnc9FxBCfChgUd91/et7gDGu9AjgyNHnm8833wIQvgDoe7+A6to9CnQQvgQYgDwCmLqmGwhjS1Bh4scAMiQPgCZnse2zdmqbiHkS2Qm2URG11iEict47T6gAbRObaNvYNjhpbIyxzIsw42War8a4U/M8Nod5vQdibNs4DC0MGzNgpzGlJEiTLfMQUIwYNo68I3WexO2BdgCgQ3awNVlJuzrcGpP5FVkhckCIRLGLuwVaTaopJLyBGuK9gPmptRbfNFMc1qozZfFCglQKoIgDOeagA7Ym3zEOXa7MN1gASBBRlQwZQ96JOBwF4MCeidg5puQ4YMELPNgO5UeXsWVEgAYVJlMALkIBKIAAwHnH0SI8FE2xybddYr5tmzZFJAwAeWYIorcACzE5KC4wBwDLYVgu24gwPeR57KlFHpN1XRsiZgehACKz2wUJ+xnOF7uu/1pcL77Kq6caZUD2/0ZFAk9zM9XrfYvrb1L1TPXvNbFnhwqQEPOKZbVKaZW0aWIpvy+bZVOypUYT7vFx9tGz9zOcFuDN/+gIHIEjcASOwBH44cB/1lQM4ZNhKecAAAAASUVORK5CYII="};x();R();T();k();import*as C0 from"three";var Ii=class{constructor(t,e){this.object=t;this.animations=e;u(this,"clock",new C0.Clock);u(this,"animatedObjects",new Set);u(this,"state")}createAnimationState(){let t=new C0.AnimationMixer(this.object),e=new Map;for(let i of this.animations)e.set(i.name,t.clipAction(i));return this.state={mixer:t,animations:this.animations,actions:e,speed:1,loop:!0},this.object.traverse(i=>{if(i instanceof C0.Mesh||i instanceof C0.Line||i instanceof C0.Points||i instanceof C0.Sprite){let n=i.onBeforeRender;i.onBeforeRender=(s,o,a,v,l,c)=>{let d=this.clock.getDelta();t.update(d),n?.(s,o,a,v,l,c)}}}),this.animatedObjects.add(this.object),this.state}playAnimation(t,e,i){let n=this.state.actions.get(t);if(!n)return!1;this.state.mixer.stopAllAction();let s=e??this.state.loop;return n.setLoop(s?C0.LoopRepeat:C0.LoopOnce,1/0),n.clampWhenFinished=!s,i===void 0?n.timeScale=this.state.speed:n.timeScale=i,n.reset().fadeIn(.1).play(),!0}updateAnimationParams(t,e){t!==void 0&&(this.state.speed=t),e!==void 0&&(this.state.loop=e);for(let i of this.state.actions.values())t!==void 0&&(i.timeScale=t),e!==void 0&&(i.setLoop(e?C0.LoopRepeat:C0.LoopOnce,1/0),i.clampWhenFinished=!e)}stopAnimations(){this.state.mixer.stopAllAction()}getDelta(){return this.clock.getDelta()}};function t6(r,t){let e=new Ii(r,t);return e.createAnimationState(),e}var C7={up:{dir:[0,1,0],u0:[0,0,1],v0:[0,0,0],u1:[1,0,1],v1:[0,0,1],corners:[[0,1,1,0,0],[1,1,1,1,0],[0,1,0,0,1],[1,1,0,1,1]]},down:{dir:[0,-1,0],u0:[1,0,1],v0:[0,0,0],u1:[2,0,1],v1:[0,0,1],corners:[[1,0,1,0,0],[0,0,1,1,0],[1,0,0,0,1],[0,0,0,1,1]]},east:{dir:[1,0,0],u0:[0,0,0],v0:[0,0,1],u1:[0,0,1],v1:[0,1,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],u0:[1,0,1],v0:[0,0,1],u1:[1,0,2],v1:[0,1,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],u0:[0,0,1],v0:[0,0,1],u1:[1,0,1],v1:[0,1,1],corners:[[1,0,0,0,1],[0,0,0,1,1],[1,1,0,0,0],[0,1,0,1,0]]},south:{dir:[0,0,1],u0:[1,0,2],v0:[0,0,1],u1:[2,0,2],v1:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};function e6(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function P7(r,t,e,i,n=!1,s=64,o=64,a=!1,v=[]){let l=new J.Euler(0,0,0);i.rotation&&(l.x=-i.rotation[0]*Math.PI/180,l.y=-i.rotation[1]*Math.PI/180,l.z=-i.rotation[2]*Math.PI/180);for(let{dir:c,corners:d,u0:h,v0:p,u1:g,v1:b}of Object.values(C7)){let A=Math.floor(r.positions.length/3),w=c[0]!==0,_=[];for(let S of d){let M,C;n?(M=(i.uv[0]+S[3]*i.size[0])/s,C=(i.uv[1]+S[4]*i.size[1])/o):(M=(i.uv[0]+e6(S[3]?g:h,i.size))/s,C=(i.uv[1]+e6(S[4]?b:p,i.size))/o);let H=w&&a?S[0]^1:S[0],B=S[1],I=w&&a?S[2]^1:S[2],W=i.inflate??0,z=new J.Vector3(i.origin[0]+H*i.size[0]+(H?W:-W),i.origin[1]+B*i.size[1]+(B?W:-W),i.origin[2]+I*i.size[2]+(I?W:-W));z=z.applyEuler(l),z=z.sub(e.position),z=z.applyEuler(e.rotation),z=z.add(e.position),r.positions.push(z.x,z.y,z.z),r.normals.push(c[0],c[1],c[2]),_.push(M,C),r.skinIndices.push(t,0,0,0),r.skinWeights.push(1,0,0,0)}if(a)for(let S=0;S+1<d.length;S+=2){let M=S*2,C=_.slice(M,M+4);_[M]=C[2],_[M+1]=C[w?1:3],_[M+2]=C[0],_[M+3]=C[w?3:1]}r.uvs.push(..._),r.indices.push(A,A+1,A+2,A+2,A+1,A+3)}}function St(r,t,e,i={},n={}){let s=e.texturewidth??64,o=e.textureheight??64,a,v=t.startsWith("block:"),l=r?.material.map;if(v){if(!r)throw new Error("worldRenderer is required for block textures");let _=t.slice(6),S=r.resourcesManager.currentResources.blocksAtlasJson.textures[_];S&&(s=l?.image.width??s,o=l?.image.height??o,a=[S.u,S.v])}let c={},d={positions:[],normals:[],uvs:[],indices:[],skinIndices:[],skinWeights:[]},h=0;for(let _ of e.bones){let S=new J.Bone;if(_.pivot&&(S.position.x=_.pivot[0],S.position.y=_.pivot[1],S.position.z=_.pivot[2]),_.bind_pose_rotation?(S.rotation.x=-_.bind_pose_rotation[0]*Math.PI/180,S.rotation.y=-_.bind_pose_rotation[1]*Math.PI/180,S.rotation.z=-_.bind_pose_rotation[2]*Math.PI/180):_.rotation&&(S.rotation.x=-_.rotation[0]*Math.PI/180,S.rotation.y=-_.rotation[1]*Math.PI/180,S.rotation.z=-_.rotation[2]*Math.PI/180),i.rotation?.[_.name]&&(S.rotation.x-=(i.rotation[_.name].x??0)*Math.PI/180,S.rotation.y-=(i.rotation[_.name].y??0)*Math.PI/180,S.rotation.z-=(i.rotation[_.name].z??0)*Math.PI/180),S.name=`bone_${_.name}`,c[_.name]=S,_.cubes)for(let M of _.cubes){let C=[];P7(d,h,S,M,v,s,o,_.mirror,C),C.length&&(n.errors??(n.errors=[]),n.errors.push(...C.map(H=>`Bone ${_.name}: ${H}`)))}h++}let p=[];for(let _ of e.bones)_.parent&&c[_.parent]?c[_.parent].add(c[_.name]):p.push(c[_.name]);let g=new J.Skeleton(Object.values(c)),b=new J.BufferGeometry;b.setAttribute("position",new J.Float32BufferAttribute(d.positions,3)),b.setAttribute("normal",new J.Float32BufferAttribute(d.normals,3)),b.setAttribute("uv",new J.Float32BufferAttribute(d.uvs,2)),b.setAttribute("skinIndex",new J.Uint16BufferAttribute(d.skinIndices,4)),b.setAttribute("skinWeight",new J.Float32BufferAttribute(d.skinWeights,4)),b.setIndex(d.indices);let A=new J.MeshLambertMaterial({transparent:!0,alphaTest:.1,side:J.DoubleSide}),w=new J.SkinnedMesh(b,A);if(w.add(...p),w.bind(g),w.scale.set(1/16,1/16,1/16),a){let _=l.clone();_.offset.set(a[0],a[1]),_.needsUpdate=!0,A.map=_}else U5(t,_=>{A.map||(_.magFilter=J.NearestFilter,_.minFilter=J.NearestFilter,_.flipY=!1,_.wrapS=J.RepeatWrapping,_.wrapT=J.RepeatWrapping,A.map=_)},()=>{let _=A.map.image.width;_&&s!==_&&(A.map.repeat.x=s/_);let S=A.map.image.height;S&&o!==S&&(A.map.repeat.y=o/S),A.needsUpdate=!0});return w}var B7=[{pattern:"furnace_minecart",target:"minecart"},{pattern:"spawner_minecart",target:"minecart"},{pattern:"chest_minecart",target:"minecart"},{pattern:"hopper_minecart",target:"minecart"},{pattern:"command_block_minecart",target:"minecart"},{pattern:"tnt_minecart",target:"minecart"},{pattern:"glow_item_frame",target:"item_frame"},{pattern:"glow_squid",target:"squid"},{pattern:"trader_llama",target:"llama"},{pattern:"chest_boat",target:"boat"},{pattern:"spectral_arrow",target:"arrow"},{pattern:"husk",target:"zombie"},{pattern:"zombie_horse",target:"horse"},{pattern:"donkey",target:"horse"},{pattern:"skeleton_horse",target:"horse"},{pattern:"mule",target:"horse"},{pattern:"ocelot",target:"cat"},{pattern:/_minecraft$/,target:"minecraft"},{pattern:/_boat$/,target:"boat"},{pattern:/_raft$/,target:"boat"},{pattern:/_horse$/,target:"horse"},{pattern:/_zombie$/,target:"zombie"},{pattern:/_arrow$/,target:"zombie"}];function i6(r){for(let t of B7)if(typeof t.pattern=="string"){if(t.pattern===r)return t.target}else if(t.pattern.test(r))return t.target}var n6=r=>p3[r],r6={zombie:1.85,husk:1.85,arrow:.0025},I7={zombie:new r1(0,1,0),husk:new r1(0,1,0),boat:new r1(0,-1,0),arrow:new r1(0,-.9,0)},_t=class{constructor(t,e,i,n={},s={}){u(this,"mesh");u(this,"animations");u(this,"animationController");u(this,"initialAnimation");u(this,"initialLoop");let o=e,a=i6(e);if(a&&(e=a,s.tempMap=a),n.customModel){this.mesh=new J.Object3D;let{modelPath:l,modelType:c,metadata:d}=n.customModel;switch(c){case"gltf":{new x7().parseAsync(l,"").then(g=>{if(this.mesh.add(g.scene),this.animations=g.animations,d?.scale){let{scale:b}=d;this.mesh.scale.set(b,b,b)}if(d?.offset){let{x:b=0,y:A=0,z:w=0}=d.offset;this.mesh.position.set(b,A,w)}if(d?.texture){let b=new J.TextureLoader().load(d.texture);b.minFilter=J.NearestFilter,b.magFilter=J.NearestFilter,this.mesh.traverse(A=>{A instanceof J.Mesh&&(A.material=new J.MeshBasicMaterial({map:b,transparent:!0,alphaTest:.1}))})}if(g.animations&&g.animations.length>0){this.animations=g.animations;let b=d?.animation,A=d?.animationLoop??!0;if(this.initialAnimation=b,this.initialLoop=A,this.animationController=t6(this.mesh,g.animations),b)this.playAnimation(b,A);else{let w=g.animations[0];this.animationController.playAnimation(w.name,A)}}}).catch(g=>{});return}case"obj":{let p=new _e().parse(l);if(d?.scale){let{scale:g}=d;p.scale.set(g,g,g)}if(d?.offset){let{x:g=0,y:b=0,z:A=0}=d.offset;p.position.set(g,b,A)}if(d?.texture){let g=new J.TextureLoader().load(d.texture);g.minFilter=J.NearestFilter,g.magFilter=J.NearestFilter;let b=new J.MeshBasicMaterial({map:g,transparent:!0,alphaTest:.1});p.traverse(A=>{A instanceof J.Mesh&&(A.material=b)})}this.mesh=p,s.type="obj";return}case"bedrock":{let h=JSON.parse(l);if(this.mesh=new J.Object3D,d?.scale&&this.mesh.scale.set(d.scale,d.scale,d.scale),d?.offset){let{x:p=0,y:g=0,z:b=0}=d.offset;this.mesh.position.set(p,g,b)}for(let[p,g]of Object.entries(h.geometry)){let b=d?.textures?.[p]??h.textures?.[p];if(!b)continue;let A=St(i,b.endsWith(".png")||b.startsWith("data:image/")||b.startsWith("block:")?b:b+".png",g,n,s);A.name=`geometry_${p}`,this.mesh.add(A)}s.type="bedrock";return}}}if(Ae[e]){let l=new _e,c={zombie_horse:`textures/${t}/entity/horse/horse_zombie.png`,husk:R7,skeleton_horse:`textures/${t}/entity/horse/horse_skeleton.png`,donkey:`textures/${t}/entity/horse/donkey.png`,mule:`textures/${t}/entity/horse/mule.png`,ocelot:k7,arrow:T7,spectral_arrow:M7,tipped_arrow:S7},d=c[o]||c[e];d&&(s.textureMap=!0);let h=d||Bi[e];if(Bi[e]&&(s.isHardcodedTexture=!0),!h)throw new Error(`No texture for ${e}`);let p=new J.TextureLoader().load(h);p.minFilter=J.NearestFilter,p.magFilter=J.NearestFilter;let g=new J.MeshBasicMaterial({map:p,transparent:!0,alphaTest:.1}),b=l.parse(Ae[e]),A=r6[o]||r6[e];A&&b.scale.set(A,A,A);let w=I7[o];w&&b.position.set(w.x,w.y,w.z),b.traverse(_=>{_ instanceof J.Mesh&&(_.material=g,_.name==="Head layer"&&(_.visible=!1),_.name==="Head"&&n.rotation?.head&&(_.rotation.x-=(n.rotation.head.x??0)*Math.PI/180,_.rotation.y-=(n.rotation.head.y??0)*Math.PI/180,_.rotation.z-=(n.rotation.head.z??0)*Math.PI/180))}),this.mesh=b,s.type="obj";return}let v=n6(e);if(v){this.mesh=new J.Object3D;for(let[l,c]of Object.entries(v.geometry)){let d=n.textures?.[l]??v.textures[l];if(!d)continue;let h=St(i,d.endsWith(".png")||d.startsWith("data:image/")||d.startsWith("block:")?d:d+".png",c,n,s);h.name=`geometry_${l}`,this.mesh.add(h)}s.type="bedrock"}}playAnimation(t,e=!1){if(!this.animationController||!this.animations)return;let i=this.animationController.playAnimation(t,e)}update(t){}static getStaticData(t){if(t=i6(t)||t,Ae[t])return{boneNames:[]};let e=n6(t);if(!e)throw new Error(`Unknown entity ${t}`);return{boneNames:Object.values(e.geometry).flatMap(i=>i.name)}}};globalThis.EntityMesh=_t;x();R();T();k();var Ee=r=>Math.max(0,Math.min(1,r)),s6=(r,t,e)=>Math.max(t,Math.min(e,r)),q0=(r,t,e)=>r+(t-r)*e,z7=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function O7(r){let t=r?.elytra;if(!t)return;if(typeof t.updateRightWing=="function"){t.updateRightWing();return}if(typeof t.updateRightWingRotation=="function"){t.updateRightWingRotation();return}let e=t.leftWing,i=t.rightWing;!e?.rotation||!i?.rotation||typeof i.rotation.copy=="function"&&(i.rotation.copy(e.rotation),i.rotation.z*=-1)}var s1=class extends V5{constructor(){super(...arguments);u(this,"switchAnimationCallback");u(this,"isRunning",!1);u(this,"isMoving",!0);u(this,"isCrouched",!1);u(this,"moveAmount",0);u(this,"runAmount",0);u(this,"lookYaw",0);u(this,"lookPitch",0);u(this,"_dt",0);u(this,"_phase",0);u(this,"_idlePhase",0);u(this,"_moveBlend",0);u(this,"_runBlend",0);u(this,"_crouchBlend",0);u(this,"_lookYawBlend",0);u(this,"_lookPitchBlend",0);u(this,"_swingTime",null);u(this,"_swingDuration",.25);u(this,"_defaults",null)}update(e,i){this._dt=i,super.update(e,i)}swingArm(){this._swingTime=0}resetLocomotion(){this._moveBlend=0,this._runBlend=0,this._crouchBlend=0,this._phase=0}_captureDefaults(e){let i=e?.skin;this._defaults={playerRot:e?.rotation?.clone?.(),bodyPos:i?.body?.position?.clone?.(),bodyRot:i?.body?.rotation?.clone?.(),leftArmPos:i?.leftArm?.position?.clone?.(),leftArmRot:i?.leftArm?.rotation?.clone?.(),rightArmPos:i?.rightArm?.position?.clone?.(),rightArmRot:i?.rightArm?.rotation?.clone?.(),leftLegPos:i?.leftLeg?.position?.clone?.(),leftLegRot:i?.leftLeg?.rotation?.clone?.(),rightLegPos:i?.rightLeg?.position?.clone?.(),rightLegRot:i?.rightLeg?.rotation?.clone?.(),headPos:i?.head?.position?.clone?.(),headRot:i?.head?.rotation?.clone?.(),capePos:e?.cape?.position?.clone?.(),capeRot:e?.cape?.rotation?.clone?.(),elytraPos:e?.elytra?.position?.clone?.(),elytraRot:e?.elytra?.rotation?.clone?.()}}_applyDefaults(e){let i=this._defaults;if(!i)return;let n=e?.skin,s=e?.cape,o=e?.elytra;i.playerRot&&e?.rotation&&e.rotation.copy(i.playerRot),i.bodyPos&&n?.body?.position&&n.body.position.copy(i.bodyPos),i.bodyRot&&n?.body?.rotation&&n.body.rotation.copy(i.bodyRot),i.leftArmPos&&n?.leftArm?.position&&n.leftArm.position.copy(i.leftArmPos),i.leftArmRot&&n?.leftArm?.rotation&&n.leftArm.rotation.copy(i.leftArmRot),i.rightArmPos&&n?.rightArm?.position&&n.rightArm.position.copy(i.rightArmPos),i.rightArmRot&&n?.rightArm?.rotation&&n.rightArm.rotation.copy(i.rightArmRot),i.leftLegPos&&n?.leftLeg?.position&&n.leftLeg.position.copy(i.leftLegPos),i.leftLegRot&&n?.leftLeg?.rotation&&n.leftLeg.rotation.copy(i.leftLegRot),i.rightLegPos&&n?.rightLeg?.position&&n.rightLeg.position.copy(i.rightLegPos),i.rightLegRot&&n?.rightLeg?.rotation&&n.rightLeg.rotation.copy(i.rightLegRot),i.headPos&&n?.head?.position&&n.head.position.copy(i.headPos),i.headRot&&n?.head?.rotation&&n.head.rotation.copy(i.headRot),i.capePos&&s?.position&&s.position.copy(i.capePos),i.capeRot&&s?.rotation&&s.rotation.copy(i.capeRot),i.elytraPos&&o?.position&&o.position.copy(i.elytraPos),i.elytraRot&&o?.rotation&&o.rotation.copy(i.elytraRot)}animate(e){let i=this._dt||0;this._defaults||this._captureDefaults(e),this._applyDefaults(e);let n=typeof this.moveAmount=="number"?this.moveAmount:this.isMoving?1:0,s=typeof this.runAmount=="number"?this.runAmount:this.isRunning?1:0,o=Ee(n),a=Ee(s),v=this.isCrouched?1:0,l=Math.min(1,i*8),c=Math.min(1,i*6),d=Math.min(1,i*7);this._moveBlend+=(o-this._moveBlend)*l,this._runBlend+=(a-this._runBlend)*c,this._crouchBlend+=(v-this._crouchBlend)*d;let h=Ee(this._moveBlend),p=Ee(this._runBlend),g=Ee(this._crouchBlend),b=q0(8,10,p),A=q0(1,.55,g),w=b*A;this._phase+=i*w*h,this._phase+=i*w*h,this._idlePhase+=i*1.15;let _=this._phase+(p>.5?Math.PI*.5:0);if(this.switchAnimationCallback&&Math.abs(Math.sin(_))<.02){let z=this.switchAnimationCallback;this.switchAnimationCallback=null,z?.()}L7(e,g);let S=80*Math.PI/180,M=75*Math.PI/180,C=s6(z7(this.lookYaw||0),-S,S),H=s6(this.lookPitch||0,-M,M),B=Math.min(1,i*14);this._lookYawBlend+=(C-this._lookYawBlend)*B,this._lookPitchBlend+=(H-this._lookPitchBlend)*B,e?.skin?.head?.rotation&&(e.skin.head.rotation.y+=this._lookYawBlend,e.skin.head.rotation.x+=this._lookPitchBlend);let I=(1-h)*(1-.25*p);if(I>1e-4&&e?.skin){let W=Math.sin(this._idlePhase);e.skin.body.rotation.x+=W*.02*I,e.skin.head.rotation.x+=-W*.015*I,e.skin.leftArm.rotation.x+=W*.03*I,e.skin.rightArm.rotation.x+=-W*.03*I,e?.cape?.rotation&&(e.cape.rotation.x+=Math.sin(this._idlePhase*.7)*.03*I)}if(h>1e-4&&e?.skin){let W=q0(1,.85,g),z=q0(1,.7,g),j=Math.sin(_)*.5,q=Math.sin(_+Math.PI)*.5,e0=Math.cos(_+Math.PI)*1.3,V=Math.cos(_)*1.3;e.skin.leftLeg.rotation.x+=q0(j,e0,p)*h*W,e.skin.rightLeg.rotation.x+=q0(q,V,p)*h*W;let Z=Math.sin(_+Math.PI)*.5,K=Math.sin(_)*.5,n0=Math.cos(_)*1.5,s0=Math.cos(_+Math.PI)*1.5;e.skin.leftArm.rotation.x+=q0(Z,n0,p)*h*z,e.skin.rightArm.rotation.x+=q0(K,s0,p)*h*z;let l0=Math.PI*.02,$=Math.PI*.1,u0=q0(l0,$,p),$0=Math.cos(_)*.03+l0,z0=Math.cos(_+Math.PI)*.03-l0,Y0=Math.cos(_)*.1+$,ct=Math.cos(_+Math.PI)*.1-$;e.skin.leftArm.rotation.z+=(q0($0,Y0,p)*h+u0*.15*h)*z,e.skin.rightArm.rotation.z+=(q0(z0,ct,p)*h-u0*.15*h)*z,this._defaults?.playerRot&&(e.rotation.z=this._defaults.playerRot.z+Math.cos(_+Math.PI)*.01*p*h);let dt=q0(Math.PI*.06,Math.PI*.3,p),M0=q0(Math.sin(_/1.5)*.06,Math.sin(_*2)*.1,p);e?.cape?.rotation&&(e.cape.rotation.x+=(dt+M0)*h)}if(this._swingTime!==null){this._swingTime+=i;let W=Math.min(this._swingTime/this._swingDuration,1);D7.animate(W,e,h>.2),W>=1&&(this._swingTime=null)}}},D7={animate(r,t,e){if(!t?.skin?.rightArm?.rotation)return;let i=r*18;if(t.skin.rightArm.rotation.x=-.4537860552*2+2*Math.sin(i+Math.PI)*.3,!e){let n=.01*Math.PI+.06;t.skin.rightArm.rotation.z=-Math.cos(i)*.403+n,t.skin.body.rotation.y=-Math.cos(i)*.06,t.skin.leftArm.rotation.x=Math.sin(i+Math.PI)*.077,t.skin.leftArm.rotation.z=-Math.cos(i)*.015+.13-.05,t.skin.leftArm.position.z=Math.cos(i)*.3,t.skin.leftArm.position.x=5-Math.cos(i)*.05}}};function L7(r,t){let e=r?.skin,i=r?.cape,n=r?.elytra;if(!e||!i)return;let s=Ee(t),o=Math.abs(Math.sin(s*Math.PI/2));if(o<=1e-6)return;e.body.rotation.x+=.4537860552*o,e.body.position.z+=(1.3256181-3.4500310377)*o,e.body.position.y+=-2.103677462*o,i.position.y+=-1.851236166577372*o,i.rotation.x+=.294220265771*o,i.position.z+=(3.786619432-3.4500310377)*o,n?.position&&n.position.copy(i.position),n?.rotation&&n.rotation.copy(i.rotation),n?.rotation&&(n.rotation.x-=10.8*Math.PI/180),n?.leftWing?.rotation&&(n.leftWing.rotation.z=q0(.72,.26179944+.4582006,o)),O7(r),e.head.position.y+=-3.618325234674*o;let a=.1*o,v=(3.618325234674-3.4500310377)*o,l=-2.53943318*o;e.leftArm.position.z+=v,e.rightArm.position.z+=v,e.leftArm.rotation.x+=.410367746202*o,e.rightArm.rotation.x+=.410367746202*o,e.leftArm.rotation.z+=a,e.rightArm.rotation.z+=-a,e.leftArm.position.y+=l,e.rightArm.position.y+=l,e.rightLeg.position.z+=-3.4500310377*o,e.leftLeg.position.z+=-3.4500310377*o}x();R();T();k();import{default as U7}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_1.png";import{default as G7}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_2.png";import{default as W7}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_1.png";import{default as N7}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_2.png";import{default as V7}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_1.png";import{default as j7}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_2.png";import{default as Y7}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_1.png";import{default as Q7}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_2.png";import{default as K7}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1.png";import{default as J7}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1_overlay.png";import{default as q7}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2.png";import{default as Z7}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2_overlay.png";import{default as X7}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_1.png";import{default as $7}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_2.png";import{default as t8}from"mc-assets/dist/other-textures/latest/models/armor/turtle_layer_1.png";import{default as a6}from"mc-assets/dist/other-textures/latest/entity/elytra.png";var Ct={skull:{bones:[{name:"head",pivot:[0,12,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0],inflate:1}]},{name:"overlay",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[32,0],inflate:1.2}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},head:{bones:[{name:"armor",pivot:[0,12,0]},{name:"head",parent:"armor",pivot:[0,12,0],cubes:[{origin:[-4,23,-4],size:[8,8,8],uv:[0,0],inflate:1}]},{name:"overlay",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,23,-4],size:[8,8,8],uv:[32,0],inflate:1.2}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},chest:{bones:[{name:"armor",pivot:[0,12,0]},{name:"body",parent:"armor",pivot:[0,13,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16],inflate:1}]},{name:"leftarm",parent:"armor",pivot:[5,10,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16],inflate:.85}]},{name:"rightarm",parent:"armor",pivot:[-5,10,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16],inflate:.85}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},legs:{bones:[{name:"armor",pivot:[0,12,0]},{name:"body",parent:"armor",pivot:[0,13,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16],inflate:.5}]},{name:"leftleg",parent:"armor",pivot:[1.9,1,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16],inflate:.5}]},{name:"rightleg",parent:"armor",pivot:[-1.9,1,0],cubes:[{origin:[-3.9,0,-2.01],size:[4,12,4],uv:[0,16],inflate:.5}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},feet:{bones:[{name:"armor",pivot:[0,12,0]},{name:"leftleg",parent:"armor",pivot:[1.9,1,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16],inflate:.8}]},{name:"rightleg",parent:"armor",pivot:[-1.9,1,0],cubes:[{origin:[-3.9,.01,-2.01],size:[4,12,4],uv:[0,16],inflate:.8}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32}};var o6={leather_layer_1:K7,leather_layer_1_overlay:J7,leather_layer_2:q7,leather_layer_2_overlay:Z7,chainmail_layer_1:U7,chainmail_layer_2:G7,iron_layer_1:Y7,iron_layer_2:Q7,diamond_layer_1:W7,diamond_layer_2:N7,golden_layer_1:V7,golden_layer_2:j7,netherite_layer_1:X7,netherite_layer_2:$7,turtle_layer_1:t8};var a5=kt(vt),e8=120,Hi=r=>r*(Math.PI/180),zi=r=>Math.max(0,Math.min(1,r)),Oi=(r,t,e)=>Math.max(t,Math.min(e,r)),xe=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function i8(r){return r<0&&(r=4294967295+r+1>>>0),r.toString(16)}function n8(r){if(r===void 0)return;if(parseInt(r,10)===0)return"rgba(0, 0, 0, 0)";let t=i8(parseInt(r,10));return t.length===8?`#${t.slice(2,8)}${t.slice(0,2)}`:`#${t}`}function v6(r,t){return r===void 0?t:r instanceof N.Quaternion?r:Array.isArray(r)?new N.Quaternion(r[0],r[1],r[2],r[3]):new N.Quaternion(r.x,r.y,r.z,r.w)}function lt(r,t){return r===void 0?t??new N.Euler:r instanceof N.Euler?r:r.yaw!==void 0&&r.pitch!==void 0&&r.roll!==void 0?new N.Euler(-Hi(r.pitch),-Hi(r.yaw),Hi(r.roll),"ZYX"):r.x!==void 0&&r.y!==void 0&&r.z!==void 0?new N.Euler(r.z,r.y,r.x,"ZYX"):Array.isArray(r)?new N.Euler(r[0],r[1],r[2]):t??new N.Euler}function u6({username:r,nameTagBackgroundColor:t="rgba(0, 0, 0, 0.3)",nameTagTextOpacity:e=255},{fontFamily:i="mojangles"},n){let s=L0(64,64),o=d6(n),a=s.getContext("2d");if(!a)throw new Error("Could not get 2d context");let v=48,l=5;a.font=`${v}px ${i}`;let c=String(typeof r=="string"?r:new o(r).toString()).split(`
21186
+ `),d=0;for(let p of c){let g=a.measureText(p).width+l*2;g>d&&(d=g)}if(s.width=d,s.height=(v+l)*c.length,a.fillStyle=t,a.fillRect(0,0,s.width,s.height),a.globalAlpha=e/255,!!D1(r,o,s,v,"white",-l+v))return a.globalAlpha=1,s}globalThis.getUsernameTexture=u6;var a1=(r,t,e,i)=>{for(let v of e.children)v.name==="nametag"&&v.removeFromParent();if(r.username===void 0||r.username===null||(typeof r.username=="string"?r.username:new(d6(i))(r.username).toString()).startsWith("EMPTY"))return;let s=u6(r,t,i);if(!s)return;let o=new N.Texture(s);o.needsUpdate=!0;let a;if(r.nameTagFixed){let v=new N.PlaneGeometry,l=new N.MeshBasicMaterial({map:o});l.transparent=!0,a=new N.Mesh(v,l),a.rotation.set(r.pitch,N.MathUtils.degToRad(r.yaw+180),0),a.position.y+=r.height+.3}else{let v=new N.SpriteMaterial({map:o});a=new N.Sprite(v),a.position.y+=r.height+.6}return a.renderOrder=1e3,a.scale.set(s.width*.005,s.height*.005,1),r.nameTagRotationRight&&a.applyQuaternion(r.nameTagRotationRight),r.nameTagScale&&a.scale.multiply(r.nameTagScale),r.nameTagRotationLeft&&a.applyQuaternion(r.nameTagRotationLeft),r.nameTagTranslation&&a.position.add(r.nameTagTranslation),a.name="nametag",e.add(a),a},l6={},r8=r=>r.charAt(0)===r.charAt(0).toUpperCase();function s8(r,t,e,i,n){if(t.name)try{let l=(r8(t.name)?gi(t.name):t.name).toLowerCase(),c=new _t("1.16.4",l,e,n);if(c.mesh)return a1(t,i,c.mesh,e.version),c.mesh}catch(l){reportError?.(l)}if(!r||!(0,c6.isEntityAttackable)(r,t))return;let s=new N.BoxGeometry(t.width,t.height,t.width);s.translate(0,t.height/2,0);let o=new N.MeshBasicMaterial({color:16711935}),a=new N.Mesh(s,o);return(l6[t.name]=(l6[t.name]||0)+1)<6&&a1({username:t.name,height:t.height},i,a,e.version),a}var v1=class{constructor(t,e){this.worldRenderer=t;this.mcData=e;u(this,"entities",{});u(this,"playerEntity",null);u(this,"entitiesOptions",{fontFamily:"mojangles"});u(this,"debugMode");u(this,"onSkinUpdate");u(this,"clock",new N.Clock);u(this,"currentlyRendering",!0);u(this,"cachedMapsImages",{});u(this,"itemFrameMaps",{});u(this,"pendingModelOverrides",new Map);u(this,"motionCache",new Map);u(this,"_wasThirdPerson",!1);u(this,"_tpBodyYaw",0);u(this,"_tpHasBodyYaw",!1);u(this,"uuidPerSkinUrlsCache",{});u(this,"currentSkinUrls",{});u(this,"loadedSkinEntityIds",new Set);u(this,"playerPerAnimation",{});this.debugMode="none",this.onSkinUpdate=()=>{},this.watchResourcesUpdates()}updateAutoWalkFlags(t,e,i,n){if(!e.playerObject?.animation)return;let s=e.playerObject.animation;if(i<=0)return;let o=n??e.position,a=this.motionCache.get(t);if(!a){this.motionCache.set(t,{pos:o.clone(),speed:0}),s.isMoving=!1,s.isRunning=!1,s.moveAmount=0,s.runAmount=0;return}let v=o.x-a.pos.x,l=o.z-a.pos.z;a.pos.copy(o);let c=Math.hypot(v,l)/Math.max(i,1e-6),d=1-Math.exp(-i*12);a.speed+=(c-a.speed)*d;let h=a.speed,p=(M,C,H)=>{let B=zi((H-M)/(C-M));return B*B*(3-2*B)},g=.08,b=.6,A=4.3,w=5.6,_=p(g,b,h),S=p(A,w,h);s.moveAmount=_,s.runAmount=S,s.isMoving=_>.15,s.isRunning=S>.55}getLocalSneak(){let t=this.worldRenderer.playerStateReactive;return t?.movementState==="SNEAKING"||t?.movementState==="CROUCHING"||!!t?.isSneaking||!!t?.sneaking||!!t?.isCrouching||!!t?.crouching||!!t?.controls?.sneak||!!t?.controlState?.sneak}updateThirdPersonHeadAndBody(t,e){let i=t.playerObject?.animation,n=this.worldRenderer.cameraShake.getBaseRotation(),s=n.yaw,o=n.pitch,a=zi(i?.moveAmount??(i?.isMoving?1:0)),v=zi(i?.runAmount??(i?.isRunning?1:0)),l=a>.15;if(this._tpHasBodyYaw||(this._tpHasBodyYaw=!0,this._tpBodyYaw=s),l){let g=1-Math.exp(-e*(18+10*v));this._tpBodyYaw=this._tpBodyYaw+xe(s-this._tpBodyYaw)*g,t.rotation.set(0,this._tpBodyYaw,0);let b=(25-8*v)*Math.PI/180,A=Oi(xe(s-this._tpBodyYaw),-b,b);i&&"lookYaw"in i&&(i.lookYaw=A),i&&"lookPitch"in i&&(i.lookPitch=-o);return}let c=85*Math.PI/180,d=55*Math.PI/180,h=xe(s-this._tpBodyYaw);h=Oi(h,-c,c);let p=Math.abs(h)-d;if(p>0){let g=p/(c-d),b=s-Math.sign(h)*d,A=1-Math.exp(-e*(6+10*g));this._tpBodyYaw=this._tpBodyYaw+xe(b-this._tpBodyYaw)*A,h=xe(s-this._tpBodyYaw),h=Oi(h,-c,c)}else{let g=1-Math.exp(-e*5);this._tpBodyYaw=this._tpBodyYaw+xe(s-this._tpBodyYaw)*(g*.15)}t.rotation.set(0,this._tpBodyYaw,0),i&&"lookYaw"in i&&(i.lookYaw=h),i&&"lookPitch"in i&&(i.lookPitch=-o)}get entitiesByName(){let t={};for(let e of Object.values(this.entities))e.realName&&(t[e.realName]=t[e.realName]||[],t[e.realName].push(e));return t}get entitiesRenderingCount(){return Object.values(this.entities).filter(t=>t.visible).length}getDebugString(){let t=Object.keys(this.entities).length,e=this.entitiesRenderingCount,i=Object.values(this.entities).filter(s=>s.playerObject),n=i.filter(s=>s.visible);return`${e}/${t} ${n.length}/${i.length}`}handlePlayerEntity(t){if(!this.playerEntity){let e=new N.Group;e.originalEntity={...t,name:"player"};let i=new N.Group,n=this.setupPlayerObject(t,i,{});e.playerObject=n,e.add(i),e.name="player_entity",this.playerEntity=e,this.worldRenderer.scene.add(e),this.updatePlayerSkin(t.id,t.username,t.uuid??void 0,vt)}this.playerEntity.originalEntity={...t,name:"player"},t.position&&(this.worldRenderer.sceneOrigin.getWorldPosition(this.playerEntity)||this.worldRenderer.sceneOrigin.track(this.playerEntity),this.playerEntity.position.set(t.position.x,t.position.y,t.position.z)),t.yaw!==void 0&&(this.playerEntity.rotation.y=t.yaw),this.updateEntityEquipment(this.playerEntity,t)}clear(){for(let t of Object.values(this.entities))this.worldRenderer.sceneOrigin.removeAndUntrack(t),A0(t);this.entities={},this.currentSkinUrls={},this.motionCache.clear(),this._wasThirdPerson=!1,this._tpHasBodyYaw=!1,this.playerEntity&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.playerEntity),A0(this.playerEntity),this.playerEntity=null)}reloadEntities(){for(let t of Object.values(this.entities))this.update({...t.originalEntity,delete:!0},{}),this.update(t.originalEntity,{})}watchResourcesUpdates(){this.worldRenderer.resourcesManager.on("assetsTexturesUpdated",()=>this.reloadEntities()),this.worldRenderer.resourcesManager.on("assetsInventoryReady",()=>this.reloadEntities())}setDebugMode(t,e=null){this.debugMode=t;for(let i of e?[e]:Object.values(this.entities)){let n=i.children.find(s=>s.name==="debug");n.visible=!1,this.debugMode==="basic"&&(n.visible=!0)}}setRendering(t,e=null){this.currentlyRendering=t;for(let i of e?[e]:Object.values(this.entities))t?this.worldRenderer.scene.children.includes(i)||this.worldRenderer.scene.add(i):this.worldRenderer.scene.remove(i)}playEntityModelAnimation(t,e,i=!1){let n=this.entities[t];n&&n.traverse(s=>{s instanceof _t&&s.playAnimation(e,i)})}render(){let t=this.worldRenderer.worldRendererConfig.renderEntities;t!==this.currentlyRendering&&this.setRendering(t);let e=this.clock.getDelta(),i=Math.min(e,1/30),n=this.worldRenderer.viewerChunkPosition,s=10*10,o=this.worldRenderer.playerStateUtils.isThirdPerson();if(o!==this._wasThirdPerson){this._wasThirdPerson=o;let a=String(this.playerEntity?.originalEntity.id??"player_entity");this.motionCache.delete(a);let v=this.playerEntity?.playerObject?.animation;v?.resetLocomotion&&v.resetLocomotion(),this._tpHasBodyYaw=!1}for(let[a,v]of[...Object.entries(this.entities),["player_entity",this.playerEntity]]){if(!v)continue;let l=a==="player_entity",c=String(l?this.playerEntity?.originalEntity.id??"player_entity":a);if(l)if(v.visible=o,o){let h=this.worldRenderer.playerStateReactive.eyeHeight;v.position.set(this.worldRenderer.cameraWorldPos.x,this.worldRenderer.cameraWorldPos.y-h,this.worldRenderer.cameraWorldPos.z);let p=this.worldRenderer.playerStateReactive.position;if(p&&typeof p.x=="number")this.updateAutoWalkFlags(c,v,e,new N.Vector3(p.x,p.y,p.z));else{let g=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,e,g?new N.Vector3(g.x,g.y,g.z):v.position)}this.updateThirdPersonHeadAndBody(v,i)}else{let h=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,e,h?new N.Vector3(h.x,h.y,h.z):v.position)}else{let h=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,e,h?new N.Vector3(h.x,h.y,h.z):v.position)}let{playerObject:d}=v;if(d?.animation){let h=d.animation,g=(Number(v.originalEntity?.metadata?.[0]??0)&2)!==0,b=this.getLocalSneak();"isCrouched"in h&&(h.isCrouched=l?b:g),d.animation.update(d,i)}if(v.traverse(h=>{h instanceof _t&&h.update(i)}),!l&&n&&v.position){let h=v.position.x-n.x,p=v.position.y-n.y,g=v.position.z-n.z,b=h*h+p*p+g*g;v.visible=!!(b<s||this.worldRenderer.shouldObjectVisible(v)),this.maybeRenderPlayerSkin(a)}v.visible&&this.syncArmorPositions(v)}}syncArmorPositions(t){t.playerObject&&t.traverse(e=>{if(!e.name.startsWith("geometry_armor_"))return;let{skin:i}=t.playerObject;switch(e.name){case"geometry_armor_head":e.children[0]?.children[0]&&e.children[0].children[0].rotation.set(-i.head.rotation.x,i.head.rotation.y,i.head.rotation.z,i.head.rotation.order);break;case"geometry_armor_legs":e.children[0]&&(e.children[0].children[2]&&e.children[0].children[2].rotation.set(-i.leftLeg.rotation.x,i.leftLeg.rotation.y,i.leftLeg.rotation.z,i.leftLeg.rotation.order),e.children[0].children[1]&&e.children[0].children[1].rotation.set(-i.rightLeg.rotation.x,i.rightLeg.rotation.y,i.rightLeg.rotation.z,i.rightLeg.rotation.order));break;case"geometry_armor_feet":e.children[0]&&(e.children[0].children[0]&&e.children[0].children[0].rotation.set(-i.rightLeg.rotation.x,i.rightLeg.rotation.y,i.rightLeg.rotation.z,i.rightLeg.rotation.order),e.children[0].children[1]&&e.children[0].children[1].rotation.set(-i.leftLeg.rotation.x,i.leftLeg.rotation.y,-i.leftLeg.rotation.z,i.leftLeg.rotation.order));break}})}getPlayerObject(t){return this.playerEntity?.originalEntity.id===t?this.playerEntity?.playerObject:this.entities[t]?.playerObject}isCanvasBlank(t){return!t.getContext("2d")?.getImageData(0,0,t.width,t.height).data.some(e=>e!==0)}async updatePlayerSkin(t,e,i,n,s=void 0){n!==vt&&this.loadedSkinEntityIds.add(String(t)),i&&((typeof n=="string"||typeof s=="string")&&(this.uuidPerSkinUrlsCache[i]={}),typeof n=="string"&&(this.uuidPerSkinUrlsCache[i].skinUrl=n),typeof s=="string"&&(this.uuidPerSkinUrlsCache[i].capeUrl=s),n===!0&&(n=this.uuidPerSkinUrlsCache[i]?.skinUrl??n),s??(s=this.uuidPerSkinUrlsCache[i]?.capeUrl));let a=this.getPlayerObject(t);if(!a)return;if(n===!0){if(!e)return;let l=await Tt(e,"skin");if(!this.getPlayerObject(t)||!l)return;n=l}if(typeof n!="string")throw new Error("Invalid skin url");if(this.currentSkinUrls[String(t)]===n){if(s){if(s===!0&&e){let l=await Tt(e,"cape");if(!this.getPlayerObject(t)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(t,s)}return}n!==vt&&(this.currentSkinUrls[String(t)]=n);let v=this.worldRenderer.worldRendererConfig.renderEars||e==="deadmau5";this.loadAndApplySkin(t,n,v).then(async()=>{if(s){if(s===!0&&e){let l=await Tt(e,"cape");if(!this.getPlayerObject(t)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(t,s)}}),a.cape.visible=!1,s||(a.backEquipment=null,a.elytra.map=null,a.cape.map&&a.cape.map.dispose(),a.cape.map=null)}async loadAndApplySkin(t,e,i){let n=this.getPlayerObject(t);if(n)try{let s;if(n=this.getPlayerObject(t),!n)return;let o,a;if(e===vt){o=await a5;let l=L0(64,64),c=l.getContext("2d");if(!c)throw new Error("Failed to get context");c.drawImage(o.image,0,0),a=l}else{let{canvas:l,image:c}=await Qt(e);s=c,o=new N.CanvasTexture(l),a=l}o.magFilter=N.NearestFilter,o.minFilter=N.NearestFilter,o.needsUpdate=!0,n.skin.map=o,n.skin.modelType=J1(a),n.skin.isCustom=e!==vt;let v;if(s?i&&(v=document.createElement("canvas"),q1(v,s),i=!this.isCanvasBlank(v)):i=!1,i){let l=new N.CanvasTexture(v);l.magFilter=N.NearestFilter,l.minFilter=N.NearestFilter,l.needsUpdate=!0,n.ears.map=l,n.ears.visible=!0}else n.ears.map=null,n.ears.visible=!1;this.onSkinUpdate?.()}catch{}}async loadAndApplyCape(t,e){let i=this.getPlayerObject(t);if(i)try{let{canvas:n,image:s}=await Qt(e);if(i=this.getPlayerObject(t),!i)return;K1(n,s);let o=new N.CanvasTexture(n);o.magFilter=N.NearestFilter,o.minFilter=N.NearestFilter,o.needsUpdate=!0,i.cape.map=o,i.cape.visible=!0,i.elytra.map=o,this.onSkinUpdate?.(),i.backEquipment||(i.backEquipment="cape")}catch{}}debugSwingArm(){let t=Object.values(this.entities).find(i=>i.playerObject?.animation);if(!t||!t.playerObject?.animation)return;let e=t.playerObject.animation;e.swingArm&&e.swingArm()}playAnimation(t,e){let i=String(t);if(this.playerPerAnimation[i]===e)return;if(this.playerPerAnimation[i]=e,t==="player_entity"&&this.playerEntity?.playerObject){let{playerObject:s}=this.playerEntity;if(e==="oneSwing"){s.animation&&s.animation.swingArm&&s.animation.swingArm();return}s.animation&&s.animation.switchAnimationCallback!==void 0&&(s.animation.switchAnimationCallback=()=>{let o=s.animation;o&&(o.isMoving=e==="walking"||e==="running"||e==="crouchWalking",o.isRunning=e==="running",o.isCrouched=e==="crouch"||e==="crouchWalking")});return}let n=this.getPlayerObject(t);if(n){if(e==="oneSwing"){n.animation&&n.animation.swingArm&&n.animation.swingArm();return}n.animation&&n.animation.switchAnimationCallback!==void 0&&(n.animation.switchAnimationCallback=()=>{let s=n.animation;s&&(s.isMoving=e==="walking"||e==="running"||e==="crouchWalking",s.isRunning=e==="running",s.isCrouched=e==="crouch"||e==="crouchWalking")});return}if(this.playerEntity?.playerObject){let{playerObject:s}=this.playerEntity;if(e==="oneSwing"){s.animation&&s.animation.swingArm&&s.animation.swingArm();return}s.animation&&s.animation.switchAnimationCallback!==void 0&&(s.animation.switchAnimationCallback=()=>{let o=s.animation;o&&(o.isMoving=e==="walking"||e==="running"||e==="crouchWalking",o.isRunning=e==="running",o.isCrouched=e==="crouch"||e==="crouchWalking")})}}parseEntityLabel(t){if(t)try{if(t.type==="string")return t.value;let e=typeof t=="string"?s5.default.simplify(s5.default.parse(t)):Li.simplify(t);return fi(e).map(this.textFromComponent).join("")}catch{return t}}textFromComponent(t){return typeof t=="string"?t:t.text??""}getItemMesh(t,e,i=!1,n){!t.nbt&&t.nbtData&&(t.nbt=t.nbtData);let s=this.worldRenderer.getItemRenderData(t,e);if(!(n&&n===s?.modelName)){if(s&&"resolvedModel"in s){let o=qr(this.worldRenderer.material,s.resolvedModel,s.modelName,this.worldRenderer.resourcesManager.currentResources.worldBlockProvider,this.worldRenderer.resourcesManager.currentResources.mcData),a=1;e["minecraft:display_context"]==="ground"?a=.5:e["minecraft:display_context"]==="thirdperson"&&(a=6),o.scale.set(a,a,a);let v=new N.Group;return v.add(o),{mesh:v,isBlock:!0,modelName:s.modelName}}if(s){let o=s.renderInfo?.texture==="blocks"?this.worldRenderer.material.map:this.worldRenderer.itemsTexture,{u:a,v,su:l,sv:c}=s,p=Zr(o,{u:a,v,sizeX:l??1,sizeY:c??1},{faceCamera:i,use3D:!i}),g=1;return e["minecraft:display_context"]==="ground"?g=.5:e["minecraft:display_context"]==="thirdperson"&&(g=6),p.mesh.scale.set(g,g,g),{mesh:p.mesh,isBlock:!1,modelName:s.modelName,cleanup:p.cleanup}}}}setVisible(t,e){e?t.scale.set(1,1,1):t.scale.set(0,0,0)}update(t,e){let i=t.name==="player";(t.name==="zombie_villager"||t.name==="husk")&&(e.texture=`textures/1.16.4/entity/${t.name==="zombie_villager"?"zombie_villager/zombie_villager.png":`zombie/${t.name}.png`}`),t.name==="glow_item_frame"&&(e.textures||(e.textures=[]),e.textures.background="block:glow_item_frame");let n=this.entities[t.id],s=!n;if(t.delete){if(!n)return;n.userData._posTween?.stop(),n.additionalCleanup&&n.additionalCleanup(),n.traverse(p=>{p.additionalCleanup&&p.additionalCleanup()}),this.onRemoveEntity(t),this.worldRenderer.sceneOrigin.removeAndUntrack(n),A0(n),delete this.entities[t.id];return}let o;if(n===void 0){this.beforeEntityAdded(t);let p=new N.Group;if(p.originalEntity=t,t.name==="item"||t.name==="tnt"||t.name==="falling_block"||t.name==="snowball"||t.name==="egg"||t.name==="ender_pearl"||t.name==="experience_bottle"||t.name==="splash_potion"||t.name==="lingering_potion"){let A=t.name==="tnt"||t.type==="projectile"?{name:t.name}:t.name==="falling_block"?{blockState:t.objectData}:t.metadata?.find(w=>typeof w=="object"&&w?.itemCount);if(A){let w=this.getItemMesh(A,{"minecraft:display_context":"ground"},t.type==="projectile");if(w){if(o=w.mesh,t.name==="item"||t.type==="projectile"?(o.scale.set(.5,.5,.5),o.position.set(0,t.name==="item"?.2:.1,0)):(o.scale.set(2,2,2),o.position.set(0,.5,0)),t.name==="item"){let _=new N.Clock;o.onBeforeRender=()=>{let S=_.getDelta();o.rotation.y+=S}}p.additionalCleanup=()=>{w.cleanup&&w.cleanup()}}}}else if(i){let A=new N.Group,w=this.setupPlayerObject(t,A,e);if(p.playerObject=w,o=A,t.username){let _=a1(t,{fontFamily:"mojangles"},A,this.worldRenderer.version);_&&(_.position.y=w.position.y+w.scale.y*16+3,_.scale.multiplyScalar(12))}}else o=s8(this.mcData,t,this.worldRenderer,this.entitiesOptions,{...e,customModel:t.customModel});if(!o)return;o.name="mesh";let g=t.pos??t.position;this.worldRenderer.sceneOrigin.track(p),p.position.set(g.x,g.y,g.z);let b=new N.BoxHelper(o,t.type==="hostile"?16711680:t.type==="mob"?65280:t.type==="player"?255:16753920);b.name="debug",p.add(o),p.add(b),b.visible=!1,this.worldRenderer.scene.add(p),n=p,n.name="entity",n.realName=t.name,this.entities[t.id]=n,i&&this.updatePlayerSkin(t.id,t.username,e?.texture?t.uuid:void 0,e?.texture||vt),this.setDebugMode(this.debugMode,p),this.setRendering(this.currentlyRendering,p),this.afterAddEntity(t)}else o=n.children.find(p=>p.name==="mesh");this.updateEntityEquipment(n,t);let a=f6(t,this.mcData),v=(t.metadata?.[0]??0)&32||this.worldRenderer.playerStateReactive.cameraSpectatingEntity===t.id&&this.worldRenderer.playerStateUtils.isSpectator();for(let p of o.children??[])p.name!=="nametag"&&(p.visible=!v);a.baby?n.scale.set(.5,.5,.5):n.scale.set(1,1,1);let l=o1("text_display",t,this.mcData),c=l?.text||a.custom_name_visible&&a.custom_name;if(t.name!=="player"&&c){let p=l&&(l.billboard_render_constraints==="fixed"||!l.billboard_render_constraints),g=l&&!(parseInt(l.style_flags,10)&4)?n8(l.background_color):void 0,b;if(l?.text_opacity){let A=parseInt(l?.text_opacity,10);b=A>0?A:256-A}a1({...t,username:typeof c=="string"?s5.default.simplify(s5.default.parse(c)):Li.simplify(c),nameTagBackgroundColor:g,nameTagTextOpacity:b,nameTagFixed:p,nameTagScale:l?.scale,nameTagTranslation:l&&(l.translation||new N.Vector3(0,0,0)),nameTagRotationLeft:v6(l?.left_rotation),nameTagRotationRight:v6(l?.right_rotation)},this.entitiesOptions,o,this.worldRenderer.version)}let d=o1("armor_stand",t,this.mcData);if(d){let p=(parseInt(d.client_flags,10)&1)!==0,g=(parseInt(d.client_flags,10)&4)!==0,b=(parseInt(d.client_flags,10)&8)===0,A=(parseInt(d.client_flags,10)&16)!==0;o.castShadow=!A,o.receiveShadow=!A,p?n.scale.set(.5,.5,.5):n.scale.set(1,1,1),n.traverse(w=>{switch(w.name){case"bone_baseplate":this.setVisible(w,b),w.rotation.y=-n.rotation.y;break;case"bone_head":d.head_pose&&w.setRotationFromEuler(lt(d.head_pose));break;case"bone_body":d.body_pose&&w.setRotationFromEuler(lt(d.body_pose));break;case"bone_rightarm":w.parent?.name!=="bone_armor"&&this.setVisible(w,g),d.left_arm_pose?w.setRotationFromEuler(lt(d.left_arm_pose)):w.setRotationFromEuler(lt({yaw:-10,pitch:-10,roll:0}));break;case"bone_leftarm":w.parent?.name!=="bone_armor"&&this.setVisible(w,g),d.right_arm_pose?w.setRotationFromEuler(lt(d.right_arm_pose)):w.setRotationFromEuler(lt({yaw:10,pitch:-10,roll:0}));break;case"bone_rightleg":d.left_leg_pose?w.setRotationFromEuler(lt(d.left_leg_pose)):w.setRotationFromEuler(lt({yaw:-1,pitch:-1,roll:0}));break;case"bone_leftleg":d.right_leg_pose?w.setRotationFromEuler(lt(d.right_leg_pose)):w.setRotationFromEuler(lt({yaw:1,pitch:1,roll:0}));break}})}let h=o1("item_frame",t,this.mcData);if(h||(h=o1("glow_item_frame",t,this.mcData)),h){let p=h?.item??t.metadata?.[8];if(o.scale.set(1,1,1),o.position.set(0,0,-.5),n.rotation.x=-t.pitch,n.children.find(g=>{if(g.name.startsWith("map_")){A0(g);let b=parseInt(g.name.split("_")[1],10);return this.itemFrameMaps[b]=this.itemFrameMaps[b]?.filter(A=>A!==g),g instanceof N.Mesh&&g.material?.map?.dispose(),!0}else if(g.name==="item")return A0(g),!0;return!1})?.removeFromParent(),p&&(p.itemId??p.blockId??0)!==0){let g=h.rotation??0,b=p.nbtData?.value?.map?.value??p.components?.find(A=>A.type==="map_id")?.data;if(b)o.scale.set(16/12,16/12,1),this.addMapModel(n,b,g);else{let A=this.getItemMesh(p,{"minecraft:display_context":"fixed"});A&&(A.mesh.position.set(0,0,-.05),A.isBlock?A.mesh.scale.set(.25,.25,.25):A.mesh.scale.set(.5,.5,.5),A.mesh.rotateY(Math.PI),A.mesh.rotateZ(-g*Math.PI/4),A.mesh.name="item",n.add(A.mesh))}}}t.username!==void 0&&(n.username=t.username),this.updateNameTagVisibility(n),this.updateEntityPosition(t,s,e)}updateEntityPosition(t,e,i){let n=this.entities[t.id];if(!n)return;let s=e?0:e8;if(t.position){let o=this.worldRenderer.sceneOrigin.getWorldPosition(n)??{x:t.position.x,y:t.position.y,z:t.position.z};n.userData._tweenTarget||(n.userData._tweenTarget={x:o.x,y:o.y,z:o.z}),n.userData._posTween?.stop(),n.userData._posTween=new S0(n.userData._tweenTarget).to({x:t.position.x,y:t.position.y,z:t.position.z},s).onUpdate(()=>{n.position.set(n.userData._tweenTarget.x,n.userData._tweenTarget.y,n.userData._tweenTarget.z)}).start()}if(t.yaw){let o=(t.yaw-n.rotation.y)%(Math.PI*2),a=2*o%(Math.PI*2)-o;new S0(n.rotation).to({y:n.rotation.y+a},s).start()}if(n?.playerObject&&i?.rotation?.head){let{playerObject:o}=n,a=i.rotation.head.y?i.rotation.head.y-t.yaw:0;o.skin.head.rotation.y=-a,o.skin.head.rotation.x=i.rotation.head.x?-i.rotation.head.x:0}}afterAddEntity(t){}beforeEntityAdded(t){let e=this.pendingModelOverrides.get(t.id.toString());if(e){let{modelPath:i,modelType:n,metadata:s}=e;t.customModel={modelPath:i,modelType:n,metadata:s},this.pendingModelOverrides.delete(t.id.toString())}}maybeRenderPlayerSkin(t){let e=this.entities[t];if(t==="player_entity"&&(e=this.playerEntity,t=this.playerEntity?.originalEntity.id),!e||!e.playerObject||!e.visible)return;let i=128,n=this.worldRenderer.getCameraPosition(),s=this.worldRenderer.sceneOrigin.getWorldPosition(e),a=(s?new N.Vector3(s.x,s.y,s.z):e.position.clone().add(new N.Vector3(this.worldRenderer.sceneOrigin.x,this.worldRenderer.sceneOrigin.y,this.worldRenderer.sceneOrigin.z))).distanceTo(n);if(a<i&&a<this.worldRenderer.viewDistance*16){if(this.loadedSkinEntityIds.has(String(t)))return;this.updatePlayerSkin(t,e.playerObject.realUsername,e.playerObject.realPlayerUuid,!0,!0)}}onRemoveEntity(t){this.loadedSkinEntityIds.delete(t.id.toString()),delete this.currentSkinUrls[t.id.toString()],this.motionCache.delete(t.id.toString())}updateMap(t,e){this.cachedMapsImages[t]=e;let i=this.itemFrameMaps[t];if(i&&(i=i.filter(n=>n.parent),this.itemFrameMaps[t]=i,i))for(let n of i)n.material.map=this.loadMap(e),n.material.needsUpdate=!0,n.visible=!0}updateNameTagVisibility(t){let e=this.worldRenderer.playerStateReactive.team,i=t.originalEntity.team,n=i?.nameTagVisibility||"always",s=n==="always"||n==="hideForOwnTeam"&&i?.team!==e?.team||n==="hideForOtherTeams"&&(i?.team===e?.team||e===void 0);t.traverse(o=>{o.name==="nametag"&&(o.visible=s)})}addMapModel(t,e,i){let n=this.cachedMapsImages?.[e],s=null;n&&(s=this.loadMap(n));let o={transparent:!0,alphaTest:.1};s&&(o.map=s);let a=new N.MeshLambertMaterial(o),v=new N.Mesh(new N.PlaneGeometry(1,1),a);v.rotation.set(0,Math.PI,0),t.add(v);let l=!0;t.traverseVisible(c=>{c.name==="geometry_frame"&&(l=!1)}),l?v.position.set(0,0,.499):v.position.set(0,0,.437),v.rotateZ(Math.PI*2-i*Math.PI/2),v.name=`map_${e}`,s||(v.visible=!1),this.itemFrameMaps[e]||(this.itemFrameMaps[e]=[]),this.itemFrameMaps[e].push(v)}loadMap(t){let e=new N.TextureLoader().load(t);return e&&(e.magFilter=N.NearestFilter,e.minFilter=N.NearestFilter,e.needsUpdate=!0),e}addItemModel(t,e,i,n=!1){let s=`bone_${e}item`,o=`custom_item_${e}`;if(t.traverse(v=>{v.name===o&&(v.removeFromParent(),v.additionalCleanup&&v.additionalCleanup())}),!i)return;let a=this.getItemMesh(i,{"minecraft:display_context":"thirdperson"});a?.mesh&&t.traverse(v=>{if(v.name.toLowerCase()===s||v.name===`${e}Arm`){let l=new N.Object3D;l.additionalCleanup=()=>{a.cleanup&&a.cleanup()};let c=a.mesh;l.rotation.z=-Math.PI/16,a.isBlock?l.rotation.y=Math.PI/4:(c.rotation.z=-Math.PI/4,l.rotation.y=Math.PI/2,l.scale.multiplyScalar(2)),n&&(l.position.y=-8,l.position.z=5,l.position.x=e==="left"?1:-1,l.rotation.x=Math.PI),l.add(c),l.name=o,v.add(l)}})}handleDamageEvent(t,e){let i=this.entities[t]?.children.find(n=>n.name==="mesh");i&&i.traverse(n=>{if(n instanceof N.Mesh&&n.material.clone){n.material.clone().dispose(),n.material=n.material.clone();let o=n.material.color.clone();n.material.color.set(16711680),new S0(n.material.color).to(o,500).start()}})}raycastSceneDebug(){let t=new N.Raycaster;return t.setFromCamera(new N.Vector2(0,0),this.worldRenderer.camera),t.intersectObjects(this.worldRenderer.scene.children)[0]?.object}updateEntityModel(t,e,i,n){this.pendingModelOverrides.set(t,{modelPath:e,modelType:i,metadata:n});let s=this.entities[t];s&&(this.update({...s.originalEntity,delete:!0},{}),this.update(s.originalEntity,{}))}setupPlayerObject(t,e,i){let n=new Ke;n.realPlayerUuid=t.uuid??"",n.realUsername=t.username??"",n.position.set(0,16,0),n.traverse(o=>{o instanceof N.Mesh&&o.material instanceof N.MeshStandardMaterial&&(o.material.transparent=!0)}),e.add(n);let s=1/16;return e.scale.set(s,s,s),e.rotation.set(0,Math.PI,0),n.animation=new s1,n.animation.isMoving=!1,n}updateEntityEquipment(t,e){if(!t||!e.equipment)return;let i=e.type==="player";if(this.addItemModel(t,i?"right":"left",e.equipment[0],i),this.addItemModel(t,i?"left":"right",e.equipment[1],i),o5(this.worldRenderer,t,"feet",e.equipment[2]),o5(this.worldRenderer,t,"legs",e.equipment[3],2),o5(this.worldRenderer,t,"chest",e.equipment[4]),o5(this.worldRenderer,t,"head",e.equipment[5]),i&&t.playerObject){let{playerObject:n}=t;n.backEquipment=e.equipment.some(s=>s?.name==="elytra")?"elytra":"cape",n.backEquipment==="elytra"&&this.loadAndApplyCape(e.id,a6),n.cape.map===null&&(n.cape.visible=!1)}}};function f6(r,t){let e=t?.entitiesByName[r.name];return new Proxy({},{get(i,n,s){if(typeof n!="string"||!e)return;let o=e.metadataKeys?.indexOf(n);return r.metadata?.[o??-1]}})}function o1(r,t,e){if(t.name===r)return f6(t,e)}function o5(r,t,e,i,n=1,s=!1){if(!i){Di(t,e);return}let o=i.name.split("_"),a,v=e==="head"&&i.name==="player_head";if(v)if(Di(t,e),i.nbt){let g=Li.simplify(i.nbt);try{let b;if(g.SkullOwner?b=g.SkullOwner.Properties.textures[0]?.Value:b=g["minecraft:profile"]?.Properties?.find(A=>A.name==="textures")?.value,b){a=JSON.parse(L.from(b,"base64").toString()).textures?.SKIN?.url;let{skinTexturesProxy:w}=r.worldRendererConfig;w&&(a=a?.replace("http://textures.minecraft.net/",w).replace("https://textures.minecraft.net/",w))}}catch{}}else a=vt;let l=o[0];if(!a){let g=`${l}_layer_${n}${s?"_overlay":""}`;a=r.resourcesManager.currentResources.customTextures.armor?.textures[g]?.src??o6[g]}if(!a||!Ct[e]){Di(t,e);return}let c=`geometry_armor_${e}${s?"_overlay":""}`,d=t.children.findLast(g=>g.name===c),h;if(d?(h=d.material,U5(a,g=>{g.magFilter=N.NearestFilter,g.minFilter=N.NearestFilter,g.flipY=!1,g.wrapS=N.MirroredRepeatWrapping,g.wrapT=N.MirroredRepeatWrapping,h.map=g})):(d=St(r,a,Ct[e]),e==="head"&&(d.children[0].position.y+=.01),d.name=c,h=d.material,v||(h.side=N.DoubleSide)),l==="leather"&&!s){let g=i.nbt?.value?.display?.value?.color?.value;if(g){let b=g>>16&255,A=g>>8&255,w=g&255;h.color.setRGB(b/255,A/255,w/255)}else h.color.setHex(11890001);o5(r,t,e,i,n,!0)}else h.color.setHex(16777215);let p=new N.Object3D;p.name=`armor_${e}${s?"_overlay":""}`,p.add(d),t.add(d)}function Di(r,t){for(let e of r.children)(e.name===`geometry_armor_${t}`||e.name===`geometry_armor_${t}_overlay`)&&e.removeFromParent()}var i5=async(r,t)=>{let e;if(!r&&!t)e=await a5;else{if(r||(r=await Tt(t,"skin")),!r)return;let{canvas:l}=await Qt(r);e=new H0.CanvasTexture(l)}e.magFilter=H0.NearestFilter,e.minFilter=H0.NearestFilter;let i=!1,s=o8(40,16,i?-2:-3,-2,-2,i?3:4,12,4,64,64),o=new H0.MeshStandardMaterial;o.map=e,o.needsUpdate=!0;let a=new H0.Mesh(s,o),v=new H0.Group;return v.add(a),v};function o8(r,t,e,i,n,s,o,a,v,l,c=!1){let d=e/16,h=i/16,p=n/16,g=(e+s)/16,b=(i+o)/16,A=(n+a)/16;c&&([d,g]=[g,d]);let w=[[d,h,p],[g,h,p],[g,b,p],[d,b,p],[d,h,A],[g,h,A],[g,b,A],[d,b,A]],_=r,S=r+a,M=r+a+s,C=r+a+s+s,H=r+a+s+a,B=r+a+s+a+s,I=t,W=t+a,z=t+a+o,j=[{vi:[5,4,0,1],uv:[S,I,M,W],n:[0,-1,0]},{vi:[2,3,7,6],uv:[M,W,C,I],n:[0,1,0]},{vi:[0,4,7,3],uv:[_,W,S,z],n:[-1,0,0]},{vi:[1,0,3,2],uv:[S,W,M,z],n:[0,0,-1]},{vi:[5,1,2,6],uv:[M,W,H,z],n:[1,0,0]},{vi:[4,5,6,7],uv:[H,W,B,z],n:[0,0,1]}],q=[],e0=[],V=[],Z=[];for(let n0=0;n0<j.length;n0++){let s0=j[n0],l0=n0*4,[$,u0,$0,z0]=s0.uv,Y0=[[$0/v,1-u0/l],[$/v,1-u0/l],[$/v,1-z0/l],[$0/v,1-z0/l]],ct=c?[3,2,1,0]:[0,1,2,3],dt=c?-s0.n[0]:s0.n[0];for(let M0=0;M0<4;M0++){let K0=w[s0.vi[ct[M0]]];q.push(K0[0],K0[1],K0[2]),e0.push(Y0[M0][0],Y0[M0][1]),V.push(dt,s0.n[1],s0.n[2])}Z.push(l0,l0+1,l0+2,l0,l0+2,l0+3)}let K=new H0.BufferGeometry;return K.setAttribute("position",new H0.Float32BufferAttribute(q,3)),K.setAttribute("uv",new H0.Float32BufferAttribute(e0,2)),K.setAttribute("normal",new H0.Float32BufferAttribute(V,3)),K.setIndex(Z),K}x();R();T();k();x();R();T();k();import*as c0 from"three";import{subscribeKey as h6}from"valtio/utils";x();R();T();k();import*as P0 from"three";var Fi=async(r,t)=>{let e;if(!r&&!t)e=await a5;else{if(r||(r=await Tt(t,"skin")),!r)return;let{canvas:v}=await Qt(r);e=new P0.CanvasTexture(v)}e.magFilter=P0.NearestFilter,e.minFilter=P0.NearestFilter;let i=new P0.BoxGeometry,n=new P0.MeshStandardMaterial,s=!1,o=new P0.Mesh(i,n);o.scale.x=s?3:4,o.scale.y=12,o.scale.z=4,v8(i,40,16,s?3:4,12,4),n.map=e,n.needsUpdate=!0;let a=new P0.Group;return a.add(o),a.scale.set(.1,.1,.1),o.rotation.z=Math.PI,a};function a8(r,t,e,i,n,s,o,a){let v=(B,I,W,z)=>[new P0.Vector2(B/o,1-z/a),new P0.Vector2(W/o,1-z/a),new P0.Vector2(W/o,1-I/a),new P0.Vector2(B/o,1-I/a)],l=v(t+s,e,t+i+s,e+s),c=v(t+i+s,e,t+i*2+s,e+s),d=v(t,e+s,t+s,e+s+n),h=v(t+s,e+s,t+i+s,e+s+n),p=v(t+i+s,e+s,t+i+s*2,e+n+s),g=v(t+i+s*2,e+s,t+i*2+s*2,e+n+s),b=r.attributes.uv,A=[p[3],p[2],p[0],p[1]],w=[d[3],d[2],d[0],d[1]],_=[l[3],l[2],l[0],l[1]],S=[c[0],c[1],c[3],c[2]],M=[h[3],h[2],h[0],h[1]],C=[g[3],g[2],g[0],g[1]],H=[];for(let B of[A,w,_,S,M,C])for(let I of B)H.push(I.x,I.y);b.set(new Float32Array(H)),b.needsUpdate=!0}function v8(r,t,e,i,n,s){a8(r,t,e,i,n,s,64,64)}var m6={itemRight:{rotation:[0,-90,25],translation:[1.13,3.2,1.13],scale:[.68,.68,.68]},itemLeft:{rotation:[0,90,-25],translation:[1.13,3.2,1.13],scale:[.68,.68,.68]},blockRight:{rotation:[0,45,0],translation:[0,0,0],scale:[.4,.4,.4]},blockLeft:{rotation:[0,225,0],translation:[0,0,0],scale:[.4,.4,.4]}},v5=class{constructor(t,e=!1){this.worldRenderer=t;this.offHand=e;u(this,"holdingBlock");u(this,"blockSwapAnimation");u(this,"cameraGroup",new c0.Mesh);u(this,"objectOuterGroup",new c0.Group);u(this,"objectInnerGroup",new c0.Group);u(this,"holdingBlockInnerGroup",new c0.Group);u(this,"camera",new c0.PerspectiveCamera(75,1,.1,100));u(this,"stopUpdate",!1);u(this,"lastHeldItem");u(this,"lastHeldItemRenderKey");u(this,"isSwinging",!1);u(this,"nextIterStopCallbacks");u(this,"idleAnimator");u(this,"ready",!1);u(this,"lastUpdate",0);u(this,"playerHand");u(this,"offHandDisplay",!1);u(this,"offHandModeLegacy",!1);u(this,"swingAnimator");u(this,"config");u(this,"disposed",!1);u(this,"unsubs",[]);u(this,"lastItemModelName");u(this,"switchRequest",0);this.initCameraGroup(),this.unsubs.push(h6(this.worldRenderer.playerStateReactive,"heldItemMain",()=>{this.offHand||this.updateItem()})),this.unsubs.push(h6(this.worldRenderer.playerStateReactive,"heldItemOff",()=>{this.offHand&&this.updateItem()})),this.config=t.displayOptions.inWorldRenderingConfig,this.offHandDisplay=this.offHand,this.offHand||Fi().then(i=>{this.disposed||(this.playerHand=i,this.updateItem())}).then(()=>{if(this.disposed)return;let i=X5(async()=>Fi(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",n=>{n&&(this.playerHand=n,this.updateItem())},n=>{A0(n,!0)});this.unsubs.push(i)})}updateItem(){if(!this.ready)return;let t=this.offHand?this.worldRenderer.playerStateReactive.heldItemOff:this.worldRenderer.playerStateReactive.heldItemMain;t?this.setNewItem(t):this.offHand?this.setNewItem():this.setNewItem({type:"hand"})}initCameraGroup(){this.cameraGroup=new c0.Mesh}startSwing(){this.swingAnimator?.startSwing()}stopSwing(){this.swingAnimator?.stopSwing()}render(t,e,i,n){if(!this.lastHeldItem)return;let s=performance.now();this.lastUpdate&&s-this.lastUpdate>50&&this.replaceItemModel(this.lastHeldItem),this.swingAnimator?.isCurrentlySwinging()||this.swingAnimator?.debugParams.animationStage?this.swingAnimator?.update():this.idleAnimator?.update(),this.blockSwapAnimation?.switcher.update();let o=new c0.Scene;o.add(this.cameraGroup),this.updateCameraGroup(),o.add(i.clone()),o.add(n.clone());let a=e.getSize(new c0.Vector2),v=Math.min(a.width,a.height),l=a.width-v,{offHandDisplay:c}=this;if(c&&(this.cameraGroup.scale.x=-1),e.autoClear=!1,e.clearDepth(),this.offHandDisplay)e.setViewport(0,0,v,v);else{let d=a.width-v;e.setViewport(d,0,v,v)}e.render(o,this.camera),e.setViewport(0,0,a.width,a.height),c&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(t){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new qt(()=>({y:this.objectInnerGroup.position.y}),(s,o)=>{s==="y"&&(this.objectInnerGroup.position.y=o)},{y:16})});let e=t,i=this.objectInnerGroup.position.y+this.objectInnerGroup.scale.y*1.5*(e==="appeared"?1:-1),n=!1;return new Promise(s=>{this.blockSwapAnimation.switcher.transitionTo({y:i},e,()=>{n||s(!0)},()=>{n=!0,s(!1)})})}isDifferentItem(t){return this.lastHeldItemRenderKey!==ye(this.worldRenderer,t)}updateCameraGroup(){if(this.stopUpdate)return;let{camera:t}=this;this.cameraGroup.position.copy(t.position),this.cameraGroup.rotation.copy(t.rotation);let e=1,{position:i,scale:n}=this.getHandHeld3d(),s=-i.z,o=this.offHandModeLegacy?-1:1;this.objectOuterGroup.position.set(s*i.x*e*o,s*i.y,-s);let a=n*2.22*.2;this.objectOuterGroup.scale.set(a,a,a)}async createItemModel(t){if(this.lastUpdate=performance.now(),!t||t.type==="hand"&&!this.playerHand)return;let e;if(t.type==="item"||t.type==="block"){let n=this.worldRenderer.entities.getItemMesh({...t.fullItem,itemId:t.id},t1(this.worldRenderer),!1,this.lastItemModelName);if(n){let{mesh:s,isBlock:o,modelName:a}=n;o?(e=s,t.type="block"):(s.position.set(.5,.5,.5),e=s,t.type="item"),this.lastItemModelName=a}}else e=this.playerHand;if(!e)return;e.name="holdingBlock";let i=this.getHandHeld3d().rotation;return e.rotation.x=c0.MathUtils.degToRad(i.x),e.rotation.y=c0.MathUtils.degToRad(i.y),e.rotation.z=c0.MathUtils.degToRad(i.z),{model:e,type:t.type}}async replaceItemModel(t){if(this.blockSwapAnimation?.switcher.isTransitioning)return;if(!t){this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.idleAnimator=void 0;return}let e=await this.createItemModel(t);e&&(this.holdingBlock?.removeFromParent(),this.holdingBlock=e.model,this.holdingBlockInnerGroup.add(e.model))}testUnknownBlockSwitch(){this.setNewItem({type:"item",name:"minecraft:some-unknown-block",id:0,fullItem:{}})}async setNewItem(t){let e=ye(this.worldRenderer,t),i=this.lastHeldItemRenderKey!==e;if(this.lastHeldItem=t,!i)return;this.lastHeldItemRenderKey=e,this.lastItemModelName=void 0;let n=++this.switchRequest,s=!1;if(this.holdingBlock){if(s=!0,!await this.playBlockSwapAnimation("disappeared"))return;this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0}if(!t){this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.idleAnimator=void 0,this.blockSwapAnimation=void 0;return}if(n!==this.switchRequest)return;let o=await this.createItemModel(t);if(!o||n!==this.switchRequest)return;let a=new c0.Group;this.holdingBlockInnerGroup.removeFromParent(),this.holdingBlockInnerGroup=new c0.Group,this.holdingBlockInnerGroup.add(o.model),a.add(this.holdingBlockInnerGroup),this.holdingBlock=o.model,this.objectInnerGroup=new c0.Group,this.objectInnerGroup.add(a),this.objectInnerGroup.position.set(-.5,-.5,-.5),s&&(this.objectInnerGroup.position.y-=this.objectInnerGroup.scale.y*1.5),Object.assign(a.position,{x:.5,y:.5,z:.5}),this.objectOuterGroup=new c0.Group,this.objectOuterGroup.add(this.objectInnerGroup),this.cameraGroup.add(this.objectOuterGroup);let v=this.getHandHeld3d().rotation;this.objectOuterGroup.rotation.y=c0.MathUtils.degToRad(v.yOuter),s&&await this.playBlockSwapAnimation("appeared"),this.swingAnimator??(this.swingAnimator=new Gi(this.holdingBlockInnerGroup)),this.swingAnimator.setHandMesh(this.holdingBlockInnerGroup),this.swingAnimator.type=o.type,this.config.viewBobbing&&(this.idleAnimator=new Ui(this.holdingBlockInnerGroup,this.worldRenderer.playerStateReactive))}getHandHeld3d(){let t=this.lastHeldItem?.type??"hand",e=this.offHandModeLegacy?"Left":"Right",i=.8*1.15,n={x:.4,y:-.7,z:-.45},s={x:-32.4,y:42.8,z:-41.3,yOuter:0};if(t==="item"){let o=m6[`item${e}`];n={x:-.05,y:-.7,z:-.45},s={x:o.rotation[0],y:o.rotation[1],z:o.rotation[2],yOuter:0},i=o.scale[0]*1.15}else if(t==="block"){let o=m6[`block${e}`];n={x:.4,y:-.7,z:-.45},s={x:o.rotation[0],y:o.rotation[1],z:o.rotation[2],yOuter:0},i=o.scale[0]*1.15}return{rotation:s,position:n,scale:i}}dispose(){this.disposed=!0,this.ready=!1,this.unsubs.forEach(t=>t()),this.unsubs=[],this.idleAnimator?.destroy(),this.idleAnimator=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.blockSwapAnimation?.switcher.forceFinish(),this.blockSwapAnimation=void 0,A0(this.cameraGroup,!0),A0(this.objectOuterGroup,!0),A0(this.objectInnerGroup,!0),A0(this.holdingBlockInnerGroup,!0),this.holdingBlock=void 0,this.playerHand&&(A0(this.playerHand,!0),this.playerHand=void 0)}},Ui=class{constructor(t,e){this.handMesh=t;this.playerState=e;u(this,"globalTime",0);u(this,"lastTime",0);u(this,"currentState");u(this,"targetState");u(this,"defaultPosition");u(this,"idleOffset",{y:0,rotationZ:0});u(this,"tween",new ce);u(this,"idleTween",null);u(this,"stateSwitcher");u(this,"debugParams",{walkingSpeed:8,sprintingSpeed:16,walkingAmplitude:{x:1/30,y:1/10,rotationZ:.25},sprintingAmplitude:{x:1/30,y:1/10,rotationZ:.4}});u(this,"debugGui");u(this,"updated",!1);this.handMesh=t,this.globalTime=0,this.currentState="NOT_MOVING",this.targetState="NOT_MOVING",this.defaultPosition={x:t.position.x,y:t.position.y,z:t.position.z,rotationX:t.rotation.x,rotationY:t.rotation.y,rotationZ:t.rotation.z},this.stateSwitcher=new qt(()=>({x:this.handMesh.position.x,y:this.handMesh.position.y,z:this.handMesh.position.z,rotationX:this.handMesh.rotation.x,rotationY:this.handMesh.rotation.y,rotationZ:this.handMesh.rotation.z}),(i,n)=>{switch(i){case"x":this.handMesh.position.x=n;break;case"y":this.handMesh.position.y=n;break;case"z":this.handMesh.position.z=n;break;case"rotationX":this.handMesh.rotation.x=n;break;case"rotationY":this.handMesh.rotation.y=n;break;case"rotationZ":this.handMesh.rotation.z=n;break}},{x:2,y:2,z:2,rotation:Math.PI}),this.debugGui=new wt("idle_animator",this.debugParams)}startIdleAnimation(){this.idleTween&&this.idleTween.stop(),this.idleOffset.y=this.handMesh.position.y-this.defaultPosition.y,this.idleOffset.rotationZ=this.handMesh.rotation.z-this.defaultPosition.rotationZ,this.idleTween=new S0(this.idleOffset,this.tween).to({y:.05,rotationZ:.05},3e3).easing(k0.Sinusoidal.InOut).yoyo(!0).repeat(1/0).start()}stopIdleAnimation(){this.idleTween&&(this.idleTween.stop(),this.idleOffset.y=0,this.idleOffset.rotationZ=0)}getStateTransform(t,e){switch(t){case"NOT_MOVING":case"SNEAKING":return{x:this.defaultPosition.x,y:this.defaultPosition.y,z:this.defaultPosition.z,rotationX:this.defaultPosition.rotationX,rotationY:this.defaultPosition.rotationY,rotationZ:this.defaultPosition.rotationZ};case"WALKING":case"SPRINTING":{let i=t==="SPRINTING"?this.debugParams.sprintingSpeed:this.debugParams.walkingSpeed,n=t==="SPRINTING"?this.debugParams.sprintingAmplitude:this.debugParams.walkingAmplitude;return{x:this.defaultPosition.x+Math.sin(e*i)*n.x,y:this.defaultPosition.y-Math.abs(Math.cos(e*i))*n.y,z:this.defaultPosition.z,rotationX:this.defaultPosition.rotationX,rotationY:this.defaultPosition.rotationY,rotationZ:this.defaultPosition.rotationZ}}}}setState(t){if(t===this.targetState)return;this.targetState=t;let e=!1;if(this.currentState!==t){if(this.stopIdleAnimation(),!e){let i=this.getStateTransform(t,this.globalTime);this.stateSwitcher.transitionTo(i,t)}this.currentState=t}}update(){this.stateSwitcher.update();let t=performance.now(),e=(t-this.lastTime)/1e3;if(this.lastTime=t,!this.stateSwitcher.isTransitioning)switch(this.currentState){case"NOT_MOVING":case"SNEAKING":this.globalTime=Math.PI/4;break;case"SPRINTING":case"WALKING":this.globalTime+=e;break}if(this.playerState){let i=this.playerState.movementState;i!==this.targetState&&this.setState(i)}if(!this.stateSwitcher.isTransitioning&&(this.currentState==="NOT_MOVING"||this.currentState==="SNEAKING")&&(this.idleTween?.isPlaying()||this.startIdleAnimation(),this.tween.update(),this.handMesh.position.y=this.defaultPosition.y+this.idleOffset.y,this.handMesh.rotation.z=this.defaultPosition.rotationZ+this.idleOffset.rotationZ),!this.stateSwitcher.isTransitioning&&(this.currentState==="WALKING"||this.currentState==="SPRINTING")){let i=this.getStateTransform(this.currentState,this.globalTime);Object.assign(this.handMesh.position,i),Object.assign(this.handMesh.rotation,{x:i.rotationX,y:i.rotationY,z:i.rotationZ})}}getCurrentState(){return this.currentState}destroy(){this.stopIdleAnimation(),this.stateSwitcher.forceFinish()}},Gi=class{constructor(t){this.handMesh=t;u(this,"PI",Math.PI);u(this,"animationTimer",0);u(this,"lastTime",0);u(this,"isAnimating",!1);u(this,"stopRequested",!1);u(this,"originalRotation");u(this,"originalPosition");u(this,"originalScale");u(this,"debugParams",{animationTime:250,animationStage:0,useClassicSwing:!0,itemSwingXPosScale:-.8,itemSwingYPosScale:.2,itemSwingZPosScale:-.2,itemHeightScale:-.6,itemPreswingRotY:45,itemSwingXRotAmount:-30,itemSwingYRotAmount:-35,itemSwingZRotAmount:-5,armSwingXPosScale:-.3,armSwingYPosScale:.4,armSwingZPosScale:-.4,armSwingYRotAmount:70,armSwingZRotAmount:-20,armHeightScale:-.6});u(this,"debugGui");u(this,"type","hand");this.handMesh=t,this.originalRotation=t.rotation.clone(),this.originalPosition=t.position.clone(),this.originalScale=t.scale.clone(),this.debugGui=new wt("hand_animator",this.debugParams,void 0,{animationStage:{min:0,max:1,step:.01},itemSwingXPosScale:{min:-2,max:2,step:.1},itemSwingYPosScale:{min:-2,max:2,step:.1},itemSwingZPosScale:{min:-2,max:2,step:.1},itemHeightScale:{min:-2,max:2,step:.1},itemPreswingRotY:{min:-180,max:180,step:5},itemSwingXRotAmount:{min:-180,max:180,step:5},itemSwingYRotAmount:{min:-180,max:180,step:5},itemSwingZRotAmount:{min:-180,max:180,step:5},armSwingXPosScale:{min:-2,max:2,step:.1},armSwingYPosScale:{min:-2,max:2,step:.1},armSwingZPosScale:{min:-2,max:2,step:.1},armSwingYRotAmount:{min:-180,max:180,step:5},armSwingZRotAmount:{min:-180,max:180,step:5},armHeightScale:{min:-2,max:2,step:.1}})}setHandMesh(t){this.handMesh=t,this.originalRotation.copy(t.rotation),this.originalPosition.copy(t.position),this.originalScale.copy(t.scale)}update(){if(!this.isAnimating&&!this.debugParams.animationStage){this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);return}let t=performance.now(),e=(t-this.lastTime)/1e3;this.lastTime=t,this.animationTimer+=e*1e3;let i=this.debugParams.animationStage||Math.min(this.animationTimer/this.debugParams.animationTime,1);if(i>=1){if(this.stopRequested){this.isAnimating=!1,this.stopRequested=!1,this.animationTimer=0,this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);return}this.animationTimer=0;return}this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);let n=i,s=Math.sqrt(n),o=Math.sin(n*this.PI),a=Math.sin(s*this.PI);if(this.type==="hand"){let v=this.debugParams.armSwingXPosScale*a,l=this.debugParams.armSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.armSwingZPosScale*o;this.handMesh.position.x+=v,this.handMesh.position.y+=l+this.debugParams.armHeightScale*n,this.handMesh.position.z+=c,this.handMesh.rotation.y+=c0.MathUtils.degToRad(this.debugParams.armSwingYRotAmount*a),this.handMesh.rotation.z+=c0.MathUtils.degToRad(this.debugParams.armSwingZRotAmount*o)}else{let v=this.debugParams.itemSwingXPosScale*a,l=this.debugParams.itemSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.itemSwingZPosScale*o;this.handMesh.position.x+=v,this.handMesh.position.y+=l+this.debugParams.itemHeightScale*n,this.handMesh.position.z+=c,this.handMesh.rotation.y+=c0.MathUtils.degToRad(this.debugParams.itemPreswingRotY),this.handMesh.rotation.x+=c0.MathUtils.degToRad(this.debugParams.itemSwingXRotAmount*o),this.handMesh.rotation.y+=c0.MathUtils.degToRad(this.debugParams.itemSwingYRotAmount*a),this.handMesh.rotation.z+=c0.MathUtils.degToRad(this.debugParams.itemSwingZRotAmount*o)}}startSwing(){this.stopRequested=!1,!this.isAnimating&&(this.isAnimating=!0,this.animationTimer=0,this.lastTime=performance.now())}stopSwing(){this.isAnimating&&(this.stopRequested=!0)}isCurrentlySwinging(){return this.isAnimating}};function l5(r,t=!1){return r.displayOptions.inWorldRenderingConfig.handRenderer==="legacy"?new v5(r,t):new e5(r,t)}x();R();T();k();import*as G0 from"three";import{Vec3 as Wi}from"vec3";var p6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAALUlEQVR42mP4//8/IyWYYdSAwW6Ara3tf4oMmD179n9ChhD0AsiQ0Wgc7AYAAOqH+zNQ3r9kAAAAAElFTkSuQmCC";var g6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAOklEQVR42mP4//8/IyWYYdQA3AbY2tr+H1gDZs+e/R9mCD7D8IYBzBAQTXYgEvIKQQPw2T6aEqlkAADEA/W3ycLXvwAAAABJRU5ErkJggg==";var b6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVR42mP4//8/IyWYYRgbYGtr+39wGQDiYzMUpwGzZ8+GawDRID4IkxSIMEOwaSQ6FgiFBW0NIOR8osJgBOQFALo37sVTOo/LAAAAAElFTkSuQmCC";var y6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWElEQVR42mP4//8/IyWYYXAbYGtr+59sA0CaZ8+eTZkBhNg4DQApQlYIcglMDN1VWA0AKYJpQvYONi/hDUSYIfjCgmA0EooJ2hmAK9CINgBXoA2xvEAMBgBGPud3dYZtOQAAAABJRU5ErkJggg==";var w6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAYklEQVR42r1TQQrAMAxyD8tL89iMHgQJoQxHewi0UsWYFFX1/CkcF4iIsgUWOTM9ASV3F3rHF+v9rK4wEVnEFoFYbwmTbRZFFN9m0B9QZBfk2THaAhqktQdTkHYL9iZe+40vs7nda+BuVOMAAAAASUVORK5CYII=";var _6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAcElEQVR42rWTWwpAIQhEbWGu1MUaXRgQcXpyP8SIPI1jibu3l5DfAKrqyFgfAczsKxx5xJUCFGYFUZXMpOe9CAa8BOS+0U5UVbYQ6Siqbi0BFT0auTSRHZqNkE6BGXgEYKYtAczIbQAz8ukzXT3l3egz49IXvXQCVAAAAABJRU5ErkJggg==";var A6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAeElEQVQ4jaWSQQ4AIQgD9WG8tI/tnkgaUgmuBw8YHcqERXK/nOUuI4JPAABMSESwA1qAQgAQwBygnfNjTaCpWoBzUlNZQJ07x9FUdgSlV5FaW4Cjq8isW8BJ2GgPtEuVdr0HKvLXHjiRI0An8jTKqo9dF000cnBzPgKuxXtbq/m1AAAAAElFTkSuQmCC";var E6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhUlEQVR42qWTSRKAMAgE8WF5KY/FygEL2yEp9cAhCz0wJBYRx58wbowxYsZngLvHjITsgNYpJySBrPIBUMqZSHhdSw+oQlgVa01U7VRQ7huTk67aUWZaVyaNZFsSQBCTVBW3KahLyo/lQ6KR1Y+2BTUyGqke1AXoxsSzpYlU3FW0/Exv1ie0hq53Bf15aAAAAABJRU5ErkJggg==";var x6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAmklEQVR42o2SYQ6FMAiDeQfbSXdYXjSpqd869QeZQiilpbr7l2KM0cc75+xUV77YpGCjAPUqitMU3uCAXrsAlPSCcgJMbG4M0mQ1Etz/i0KlXQnmwyqpv1uH4h7fiws7ISneTYNEk0ImCxcAArGJrE4AXhypPtl7AqTdeJG8k3gHb0L6QfmK9WQTa59cSFdHRssKFHHngteV/wPDepaHIu0QVAAAAABJRU5ErkJggg==";var R6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAoUlEQVR42n2Tyw3AIAxD3cGYlGFTUSmV+2o4IEEAf2JQVV1rjDGq576ec5avWVdfWIW12aMPEJBEImoPv+CAvvcCODsVNWBS8wA4A5ndv1/ytciQvBLMyeTSHD3ZYXPXXH7Y0ZMdJvCxQJls5O6tKHlPPWGEfU58WZR6ive1kKSleFNC2kXGRnrcDqhTTOmPeP3pAZnTq6Oin4X0oXbfnNZu626Io6lqGCwAAAAASUVORK5CYII=";var l1=class{constructor(t){this.worldRenderer=t;u(this,"_cursorLinesHidden",!1);u(this,"cursorLineMaterial");u(this,"interactionLines",null);u(this,"prevColor");u(this,"blockBreakMesh");u(this,"breakTextures",[]);let e=[p6,g6,b6,y6,w6,_6,A6,E6,x6,R6];for(let n=0;n<10;n++)kt(e[n]).then(s=>{s.magFilter=G0.NearestFilter,s.minFilter=G0.NearestFilter,this.breakTextures.push(s)});let i=new G0.MeshBasicMaterial({transparent:!0,blending:G0.MultiplyBlending,alphaTest:.5});this.blockBreakMesh=new G0.Mesh(new G0.BoxGeometry(1,1,1),i),this.blockBreakMesh.visible=!1,this.blockBreakMesh.renderOrder=999,this.blockBreakMesh.name="blockBreakMesh",this.worldRenderer.sceneOrigin.addAndTrack(this.blockBreakMesh),this.worldRenderer.onReactivePlayerStateUpdated("gameMode",()=>{this.updateLineMaterial()}),setTimeout(()=>{this.updateLineMaterial(),this.interactionLines&&this.setHighlightCursorBlock(this.interactionLines.blockPos,this.interactionLines.shapePositions,!0)})}get cursorLinesHidden(){return this._cursorLinesHidden}set cursorLinesHidden(t){this.interactionLines&&(this.interactionLines.mesh.visible=!t),this._cursorLinesHidden=t}updateLineMaterial(){let t=this.worldRenderer.playerStateReactive.gameMode==="creative",e=this.worldRenderer.renderer.getPixelRatio();this.cursorLineMaterial&&this.cursorLineMaterial.dispose(),this.cursorLineMaterial=new Xt({color:(()=>{switch(this.worldRenderer.worldRendererConfig.highlightBlockColor){case"blue":return 4227327;case"classic":return 0;default:return t?4227327:0}})(),linewidth:Math.max(e*.7,1)*2}),this.prevColor=this.worldRenderer.worldRendererConfig.highlightBlockColor}updateBreakAnimation(t,e,i){if(this.hideBreakAnimation(),e===null||!t||!i)return;let{position:n,width:s,height:o,depth:a}=i,v=new Wi(n.x,n.y,n.z);this.blockBreakMesh.scale.set(s*1.001,o*1.001,a*1.001),v.add(new Wi(t.x,t.y,t.z)),this.blockBreakMesh.position.set(v.x,v.y,v.z),this.blockBreakMesh.visible=!0,this.blockBreakMesh.material.map=this.breakTextures[e]??this.breakTextures.at(-1),this.blockBreakMesh.material.needsUpdate=!0}hideBreakAnimation(){this.blockBreakMesh&&(this.blockBreakMesh.visible=!1)}updateDisplay(){if(this.cursorLineMaterial){let{renderer:t}=this.worldRenderer;this.cursorLineMaterial.resolution.set(t.domElement.width,t.domElement.height),this.cursorLineMaterial.dashOffset=performance.now()/750}}setHighlightCursorBlock(t,e,i=!1){if(t&&this.interactionLines&&t.equals(this.interactionLines.blockPos)&&y8(e??[],this.interactionLines.shapePositions??[])&&!i||(this.interactionLines!==null&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.interactionLines.mesh),this.interactionLines=null),t===null))return;let n=new G0.Group;for(let{position:s,width:o,height:a,depth:v}of e??[]){let l=new Wi(s.x,s.y,s.z),c=[1.0001*o,1.0001*a,1.0001*v],d=new G0.BoxGeometry(...c),h=new Zt().fromEdgesGeometry(new G0.EdgesGeometry(d)),p=new r5(h,this.cursorLineMaterial);p.position.set(l.x,l.y,l.z),p.computeLineDistances(),n.add(p)}this.worldRenderer.sceneOrigin.addAndTrack(n),n.position.set(t.x,t.y,t.z),n.visible=!this.cursorLinesHidden,this.interactionLines={blockPos:t,mesh:n,shapePositions:e}}render(){this.prevColor!==this.worldRenderer.worldRendererConfig.highlightBlockColor&&this.updateLineMaterial(),this.updateDisplay()}},y8=(r,t)=>{if(r.length!==t.length)return!1;for(let[e,i]of r.entries())if(i!==t[e])return!1;return!0};x();R();T();k();x();R();T();k();var w8=ze(hi(),1);import k6 from"prismarine-nbt";import{getItemDefinition as _8}from"mc-assets/dist/itemDefinitions";var A8=(r,t)=>{let e,i,n=r.name;n.includes(":")||(n=`minecraft:${n}`);let s=t.currentResources?.customItemModelNames[n];if(r.components){let o=new Map;for(let c of r.components)o.set(c.type,c);let a=o.get("custom_name")||o.get("item_name");a&&(e=typeof a.data=="string"?a.data:k6.simplify(a.data));let v=o.get("item_model");if(v&&(i=v.data),s){let c=o.get("custom_model_data");if(c?.data){let d;typeof c.data=="number"?d=c.data:typeof c.data=="object"&&"floats"in c.data&&Array.isArray(c.data.floats)&&c.data.floats.length>0&&(d=c.data.floats[0]),d&&s[d]&&(i=s[d])}}let l=o.get("lore");l&&(e??(e=r.displayName??r.name),e+=`
21187
+ ${JSON.stringify(l.data)}`)}if(r.nbt){let o=k6.simplify(r.nbt),a=o.display?.Name;a&&(e=a),s&&o.CustomModelData&&s[o.CustomModelData]&&(i=s[o.CustomModelData])}return{customText:e,customModel:i}};var T6=(r,t,e,i)=>{let n=r.name,{customModel:s}=A8(r,e);s&&(n=s);let o=Jn(i,{...t}),a=_8(e.currentResources.itemsDefinitionsStore,{name:n,version:e.currentResources.version,properties:o})?.model;return(a==="minecraft:special"?void 0:a)??n};x();R();T();k();var I6=ze(P6(),1);import{versionToNumber as B6}from"mc-assets/dist/utils";var H6=(r,t,e=!1,i=!1)=>{let n=r.modelName,s=globalThis.loadedData.itemsByName[n];B6(t.currentResources.version)<B6("1.13")&&(n=(0,I6.getRenamedData)(s?"items":"blocks",n,t.currentResources.version,"1.13.1"));let o;if(!i){let v=t.currentResources?.guiAtlas?.json,l=d=>d&&v?.textures[d.replace("minecraft:","").replace("block/","").replace("blocks/","").replace("item/","").replace("items/","").replace("_inventory","")],c=l(n)??l(r.originalItemName);if(c){let d=c.u*v.width,h=c.v*v.height;return{texture:"gui",slice:[d,h,v.tileSize,v.tileSize],scale:.25,blockData:null,modelName:null}}}let a=v=>v.top??v;try{if(!t.currentResources?.itemsRenderer)throw new Error("Items renderer is not available");o=t.currentResources.itemsRenderer.getItemTexture(n,{},!1,i)??(r.originalItemName?t.currentResources.itemsRenderer.getItemTexture(r.originalItemName,{},!1,i):void 0)??t.currentResources.itemsRenderer.getItemTexture("item/missing_texture")}catch(v){reportError?.(`Failed to render item ${n} (original: ${r.originalItemName}) on ${t.currentResources.version} (resourcepack: TODO!): ${v.stack}`),o=a(t.currentResources.itemsRenderer.getItemTexture("errored"))}return o??(o=a(t.currentResources.itemsRenderer.getItemTexture("unknown"))),"type"in o?{texture:o.type,slice:o.slice,modelName:n,blockData:null,scale:null}:{texture:"blocks",blockData:o,modelName:n,slice:null,scale:null}};var z6=(r,t,e,i)=>{let n=e.currentResources;if(!n)throw new Error("Resources not loaded");let s=r.itemId??r.blockId??r.name,{blockState:o}=r;try{let a=o?globalThis.loadedData.blocksByStateId[o]?.name:typeof s=="number"?globalThis.loadedData.items[s]?.name:s;if(!a)throw new Error(`Item not found: ${s}`);let v=T6({...r,name:a},t,e,i),l=H6({modelName:v},e,!1,!0);if(!l)throw new Error(`Failed to get render info for item ${a}`);let c=l.texture==="blocks"?n.blocksAtlasImage:n.itemsAtlasImage;if(l.blockData)return{resolvedModel:l.blockData.resolvedModel,modelName:l.modelName};if(l.slice){let[d,h,p,g]=l.slice,[b,A,w,_]=[d/c.width,h/c.height,p/c.width,g/c.height];return{u:b,v:A,su:w,sv:_,renderInfo:l,modelName:l.modelName}}throw new Error(`Invalid render info for item ${a}`)}catch(a){return reportError?.(a),{u:0,v:0,su:16/n.blocksAtlasImage.width,sv:16/n.blocksAtlasImage.width,modelName:"missing"}}};x();R();T();k();import*as ke from"three";var d1=class{constructor(t){this.worldRenderer=t;u(this,"audioListener");u(this,"activeSounds",new Set);u(this,"audioContext");u(this,"soundVolumes",new Map);u(this,"baseVolume",1);t.onWorldSwitched.push(()=>{this.stopAll()}),t.onReactiveConfigUpdated("volume",e=>{this.changeVolume(e)})}initAudioListener(){this.audioListener||(this.audioListener=new ke.AudioListener,this.worldRenderer.camera.add(this.audioListener))}playSound(t,e,i=1,n=1,s=500){this.initAudioListener();let o=new ke.PositionalAudio(this.audioListener);this.activeSounds.add(o),this.soundVolumes.set(o,i);let a=new ke.AudioLoader,v=Date.now();a.loadAsync(e).then(l=>{Date.now()-v>s||(o.setBuffer(l),o.setRefDistance(20),o.setVolume(i*this.baseVolume),o.setPlaybackRate(n),this.worldRenderer.sceneOrigin.addAndTrack(o),o.position.set(t.x,t.y,t.z),o.onEnded=()=>{this.worldRenderer.sceneOrigin.removeAndUntrack(o),o.source&&o.disconnect(),this.activeSounds.delete(o),this.soundVolumes.delete(o),a.manager.itemEnd(e)},o.play())})}stopAll(){for(let t of this.activeSounds)t&&(t.stop(),t.source&&t.disconnect(),this.worldRenderer.sceneOrigin.removeAndUntrack(t));this.activeSounds.clear(),this.soundVolumes.clear()}changeVolume(t){this.baseVolume=t;for(let[e,i]of this.soundVolumes)e.setVolume(i*this.baseVolume)}destroy(){this.stopAll(),this.audioListener&&(this.audioListener.removeFromParent(),this.audioListener=void 0)}playTestSound(){this.playSound(this.worldRenderer.camera.position,"/sound.mp3")}};x();R();T();k();import*as B0 from"three";var u1=class{constructor(t,e){this.worldRenderer=t;this.onRenderCallbacks=e;u(this,"rollAngle",0);u(this,"rollAnimation");u(this,"basePitch",0);u(this,"baseYaw",0);u(this,"cameraBobInput",null);e.push(()=>{this.update()})}get damageRollAmount(){return 5}get damageAnimDuration(){return 200}setCameraBobInput(t){this.cameraBobInput=t}setBaseRotation(t,e){this.basePitch=t,this.baseYaw=e,this.update()}getBaseRotation(){return{pitch:this.basePitch,yaw:this.baseYaw}}shakeFromDamage(t){let e=this.rollAngle,i=e+(t??(Math.random()<.5?-1:1))*this.damageRollAmount;this.rollAnimation={startTime:performance.now(),startRoll:e,targetRoll:i,duration:this.damageAnimDuration/2}}update(){if(this.worldRenderer.playerStateUtils.isSpectatingEntity()&&(this.rollAngle=0,this.rollAnimation=void 0),this.rollAnimation){let e=performance.now(),i=e-this.rollAnimation.startTime,n=Math.min(i/this.rollAnimation.duration,1);this.rollAnimation.returnToZero?(this.rollAngle=this.rollAnimation.startRoll*(1-this.easeInOut(n)),n===1&&(this.rollAnimation=void 0)):(this.rollAngle=this.rollAnimation.startRoll+(this.rollAnimation.targetRoll-this.rollAnimation.startRoll)*this.easeOut(n),n===1&&(this.rollAnimation={startTime:e,startRoll:this.rollAngle,targetRoll:0,duration:this.damageAnimDuration/2,returnToZero:!0}))}let t=this.worldRenderer.cameraObject;if(this.worldRenderer.cameraGroupVr){let e=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(0,1,0),this.baseYaw);t.setRotationFromQuaternion(e)}else{let e=this.addAntiZfightingOffset(this.basePitch),i=this.addAntiZfightingOffset(this.baseYaw),n=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(1,0,0),e),s=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(0,1,0),i),o=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(0,0,1),B0.MathUtils.degToRad(this.rollAngle)),a=new B0.Quaternion,v=new B0.Quaternion,l=this.worldRenderer.playerStateReactive.perspective;if(this.cameraBobInput){let d=$5(this.cameraBobInput);a=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(0,0,1),d.rotation.z),v=new B0.Quaternion().setFromAxisAngle(new B0.Vector3(1,0,0),d.rotation.x),l==="first_person"&&this.worldRenderer.camera.position.set(d.position.x,d.position.y,0)}else l==="first_person"&&this.worldRenderer.camera.position.set(0,0,0);let c=s.multiply(n).multiply(o).multiply(a).multiply(v);t.setRotationFromQuaternion(c)}}easeOut(t){return 1-(1-t)*(1-t)}easeInOut(t){return t<.5?2*t*t:1-(-2*t+2)**2/2}addAntiZfightingOffset(t){let i=(t%(Math.PI*2)+Math.PI*2)%(Math.PI*2),n=.01;return Math.abs(i)<n||Math.abs(i-Math.PI/2)<n||Math.abs(i-Math.PI)<n||Math.abs(i-3*Math.PI/2)<n?t+.001:t}};x();R();T();k();import*as Q from"three";var f1=class{constructor(t){this.worldRenderer=t;u(this,"customMedia",new Map);u(this,"lastCheck",0);u(this,"THROTTLE_TIME",100);this.worldRenderer.onWorldSwitched.push(()=>{this.onWorldGone()}),this.worldRenderer.onRender.push(()=>{this.render()}),this.worldRenderer.onReactiveConfigUpdated("volume",()=>{let{volume:e}=this.worldRenderer.worldRendererConfig;for(let[i,n]of this.customMedia.entries())n.positionalAudio&&n.positionalAudio.setVolume((n.props.volume??1)*e)})}onWorldGone(){for(let[t,e]of this.customMedia.entries())this.destroyMedia(t)}onWorldStop(){for(let[t,e]of this.customMedia.entries())this.setVideoPlaying(t,!1)}createErrorTexture(t,e,i=16777215,n="Failed to load"){let s=new OffscreenCanvas(100,100),o=100;s.width=o,s.height=o;let a=s.getContext("2d");if(!a)return new Q.CanvasTexture(s);a.clearRect(0,0,s.width,s.height),a.fillStyle=`rgba(${i>>16&255}, ${i>>8&255}, ${i&255}, 1)`,a.fillRect(0,0,s.width,s.height),a.fillStyle="#ff0000",a.font="bold 10px sans-serif",a.textAlign="center",a.textBaseline="middle",a.fillText(n,s.width/2,s.height/2,s.width);let v=new Q.CanvasTexture(s);return v.minFilter=Q.LinearFilter,v.magFilter=Q.LinearFilter,v}createBackgroundTexture(t,e,i=0,n=1){let s=new OffscreenCanvas(1,1);s.width=1,s.height=1;let o=s.getContext("2d");if(!o)return new Q.CanvasTexture(s);let a=i>>16&255,v=i>>8&255,l=i&255;o.fillStyle=`rgba(${a}, ${v}, ${l}, ${n})`,o.fillRect(0,0,1,1);let c=new Q.CanvasTexture(s);return c.minFilter=Q.NearestFilter,c.magFilter=Q.NearestFilter,c}validateOrigin(t,e){if(e===!0)return!0;if(e===!1)return!1;let i=new URL(t);return e.some(n=>i.origin.endsWith(n))}onPageInteraction(){for(let[t,e]of this.customMedia.entries())e.hadAutoPlayError&&(e.hadAutoPlayError=!1,this.playVideo(t))}addMedia(t,e){let i=structuredClone(e);this.destroyMedia(t);let n=!1;e.src.startsWith("https://disk.yandex.ru/i/")&&(n=!0,e.src=`/ya-image?url=${e.src}`);let{scene:s}=this.worldRenderer;e.allowOrigins!==void 0&&!this.validateOrigin(e.src,e.allowOrigins)&&(e.src="");let a=e.src.endsWith(".png")||e.src.endsWith(".jpg")||e.src.endsWith(".jpeg")||e.imageOverride;n&&!e.imageOverride&&fetch(e.src,{method:"HEAD"}).then(M=>{M.headers.get("content-type")?.startsWith("image/")&&(this.destroyMedia(t),this.addMedia(t,{...i,src:e.src,imageOverride:!0}))}).catch(console.error);let v,l;if(!a){v=document.createElement("video"),v.src=e.src.endsWith(".gif")?e.src.replace(".gif",".mp4"):e.src,v.loop=e.loop??!0;let M=(e.volume??1)*this.worldRenderer.worldRendererConfig.volume;v.volume=Math.min(M,1),v.playsInline=!0,v.crossOrigin="anonymous";let C=this.worldRenderer.soundSystem;if(C.initAudioListener(),!C.audioListener)throw new Error("Audio listener not initialized");l=new Q.PositionalAudio(C.audioListener),l.setRefDistance(6),l.setVolume(M),this.worldRenderer.sceneOrigin.addAndTrack(l),l.position.set(e.position.x,e.position.y,e.position.z),l.setMediaElementSource(v),l.connect(),v.addEventListener("pause",()=>{l?.pause(),globalThis.tempSendVideoStop?.(t,"paused",v.currentTime)}),v.addEventListener("play",()=>{l?.play(),globalThis.tempSendVideoPlay?.(t)}),v.addEventListener("seeked",()=>{l&&v&&(l.offset=v.currentTime)}),v.addEventListener("stalled",()=>{globalThis.tempSendVideoStop?.(t,"stalled",v.currentTime)}),v.addEventListener("waiting",()=>{globalThis.tempSendVideoStop?.(t,"waiting",v.currentTime)}),v.addEventListener("error",({error:H})=>{globalThis.tempSendVideoStop?.(t,`error: ${H}`,v.currentTime)}),v.addEventListener("ended",()=>{globalThis.tempSendVideoStop?.(t,"ended",v.currentTime),e.loop||(v.currentTime=0,S.ended=!0)})}let c=this.createBackgroundTexture(e.size.width,e.size.height,e.background),d=M=>{let C=this.createErrorTexture(e.size.width,e.size.height,e.background,M);g.map=C,g.needsUpdate=!0},h=new Q.PlaneGeometry(1,1),p=e.allowLighting?Q.MeshLambertMaterial:Q.MeshBasicMaterial,g=new p({map:c,transparent:!0,side:e.doubleSide?Q.DoubleSide:Q.FrontSide,alphaTest:.1}),b=v?new Q.VideoTexture(v):new Q.TextureLoader().load(e.src,()=>{this.customMedia.get(t)?.texture===b&&(g.map=b,g.needsUpdate=!0)},void 0,()=>d());b.minFilter=Q.NearestFilter,b.magFilter=Q.NearestFilter,b.generateMipmaps=!1;let A=new Q.Mesh(h,g),{mesh:w}=this.positionMeshExact(A,Q.MathUtils.degToRad((e.rotation??0)*90),e.position,e.size.width,e.size.height);s.add(w),v&&(A.onBeforeRender=()=>{v.readyState===v.HAVE_ENOUGH_DATA&&(!v.paused||!S?.hadAutoPlayError)&&(g.map!==b&&(g.map=b,g.needsUpdate=!0),b.needsUpdate=!0,l&&(l.position.copy(w.position),l.rotation.copy(w.rotation)))});let _=M=>{let C=h.attributes.uv.array;C[0]=M.startU,C[1]=M.startV,C[2]=M.endU,C[3]=M.startV,C[4]=M.endU,C[5]=M.endV,C[6]=M.startU,C[7]=M.endV,h.attributes.uv.needsUpdate=!0};e.uvMapping&&_(e.uvMapping);let S={mesh:w,video:v,texture:b,updateUVMapping:_,positionalAudio:l,props:i,hadAutoPlayError:!1,pausedBecuaseHidden:!1,ended:!1,handleError(M){if(S.destroyed)return;let C=H=>H;d(M.name==="NotAllowedError"||M.name==="AbortError"?C("Waiting for user interaction"):C("Failed to auto play"))}};return this.customMedia.set(t,S),v&&e.autoPlay&&this.playVideo(t,!0),t}playVideo(t,e=!1){let i=this.customMedia.get(t);if(i?.video){if(!e&&i.positionalAudio&&i.video.currentTime<1){let n=i.video.currentTime;this.addMedia(t,i.props),i.video.currentTime=n,i.props.autoPlay||this.playVideo(t,!0);return}i.video.play().then(()=>{i.hadAutoPlayError=!1}).catch(n=>{i.pausedBecuaseHidden||((n.name==="NotAllowedError"||n.name==="AbortError"||n.message?.includes("not allowed")&&!i.pausedBecuaseHidden)&&(i.hadAutoPlayError=!0),i.handleError(n))})}}render(){for(let[t,e]of this.customMedia.entries()){let i=e.mesh.visible;e.mesh.visible=this.worldRenderer.shouldObjectVisible(e.mesh)&&!e.mesh.forceHide,i!==e.mesh.visible&&e.video&&(e.mesh.visible?e.pausedBecuaseHidden&&(this.playVideo(t),e.pausedBecuaseHidden=!1):e.video.paused||(e.video.pause(),e.pausedBecuaseHidden=!0))}}setVideoPlaying(t,e){let i=this.customMedia.get(t);i?.video&&(e?this.playVideo(t):i.video.pause())}setVideoSeeking(t,e){let i=this.customMedia.get(t);i?.video&&(i.video.currentTime=e)}setVideoVolume(t,e){let i=this.customMedia.get(t);i?.video&&(i.video.volume=e)}setVideoSpeed(t,e){let i=this.customMedia.get(t);i?.video&&(i.video.playbackRate=e)}setControlMode(t,e,i){let n=this.customMedia.get(t);n?.video&&(n.props.controlMode={mouseButton:e,controlMode:i})}destroyMedia(t){let{scene:e}=this.worldRenderer,i=this.customMedia.get(t);if(i){i.destroyed=!0,i.video&&(i.video.pause(),i.video.src="",i.video.remove()),i.positionalAudio&&this.worldRenderer.sceneOrigin.removeAndUntrack(i.positionalAudio),this.worldRenderer.sceneOrigin.removeAndUntrack(i.mesh),i.texture.dispose();let n=i.mesh.children[0];n&&(n.geometry.dispose(),n.material instanceof Q.Material&&n.material.dispose()),this.customMedia.delete(t)}}positionMeshExact(t,e,i,n,s,o=1){e===0&&(i.z+=.001),e===Math.PI/2&&(i.x-=.001),e===Math.PI&&(i.z-=.001),e===3*Math.PI/2&&(i.x+=.001),e===0&&(i.z+=1),e===Math.PI&&(i.x+=1),e===3*Math.PI/2&&(i.z+=1,i.x+=1),t.matrix.identity(),t.position.set(0,0,0),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.rotateY(e),(e===Math.PI/2||e===3*Math.PI/2)&&(t.rotateZ(-Math.PI),t.rotateX(-Math.PI)),t.scale.set(n,s,o),t.geometry.translate(.5,.5,0),t.geometry.attributes.position.needsUpdate=!0,this.worldRenderer.sceneOrigin.track(t),t.position.set(i.x,i.y,i.z);let a=new Q.Group;a.add(t);let v=new Q.Mesh(new Q.BoxGeometry(.1,.1,.1),new Q.MeshBasicMaterial({color:16711680}));v.position.set(i.x,i.y,i.z),a.add(v);let l=i.x+Math.cos(e)*n,c=i.z+Math.sin(e)*n,d=new Q.Mesh(new Q.BoxGeometry(.1,.1,.1),new Q.MeshBasicMaterial({color:255}));d.position.set(i.x,i.y+s,i.z),a.add(d);let h=new Q.Mesh(new Q.BoxGeometry(.1,.1,.1),new Q.MeshBasicMaterial({color:16776960}));h.position.set(l,i.y,c),a.add(h);let p=new Q.Mesh(new Q.BoxGeometry(.1,.1,.1),new Q.MeshBasicMaterial({color:16711935}));p.position.set(l,i.y+s,c),a.add(p);let g=new Q.Vector3(this.worldRenderer.sceneOrigin.toSceneX(i.x),this.worldRenderer.sceneOrigin.toSceneY(i.y),this.worldRenderer.sceneOrigin.toSceneZ(i.z)),b=new Q.ArrowHelper(new Q.Vector3(Math.cos(e),0,Math.sin(e)),g,1,16711680);return a.add(b),{mesh:t,debugGroup:a}}createTestCanvasTexture(){let t=new OffscreenCanvas(100,100);t.width=100,t.height=100;let e=t.getContext("2d");return e?(e.font="10px Arial",e.fillStyle="red",e.fillText("Hello World",0,10),new Q.CanvasTexture(t)):null}tryIntersectMedia(){if(Date.now()-this.lastCheck<this.THROTTLE_TIME)return;if(this.customMedia.size===0){this.worldRenderer.reactiveState.world.intersectMedia=null,this.worldRenderer.debugVideo=null,this.worldRenderer.cursorBlock.cursorLinesHidden=!1;return}this.lastCheck=Date.now();let{camera:t,scene:e}=this.worldRenderer,i=new Q.Raycaster,n=new Q.Vector2(0,0);i.setFromCamera(n,t);let s=i.intersectObjects(e.children,!0);if(s.length>0){let o=s[0],a=o.object;for(let[v,l]of this.customMedia.entries())if(a===l.mesh||l.mesh.children.includes(a)){let{uv:c}=o;if(c){let d={id:v,x:c.x,y:c.y};this.worldRenderer.reactiveState.world.intersectMedia=d,this.worldRenderer.debugVideo=l,this.worldRenderer.cursorBlock.cursorLinesHidden=!0;return}}}this.worldRenderer.reactiveState.world.intersectMedia=null,this.worldRenderer.debugVideo=null,this.worldRenderer.cursorBlock.cursorLinesHidden=!1}handleUserClick(t){let e=this.worldRenderer.reactiveState.world.intersectMedia;if(e){let{id:i,x:n,y:s}=e,o=this.customMedia.get(i),a=o?.props.controlMode;if(o?.video&&(a?.mouseButton==="both"||a?.mouseButton===t))switch(a?.controlMode){case"play_pause":{this.setVideoPlaying(i,o.video.paused);break}case"play_if_ended":{o.ended&&this.setVideoPlaying(i,!0);break}case"toggle_mute":{o.video.muted=!o.video.muted;break}}}}};x();R();T();k();import*as Bt from"three";x();R();T();k();import*as p0 from"three";var ot={TARGET_SCREEN_PX:150,CANVAS_SIZE:256,LAYOUT:{DOT_Y:.3,NAME_Y:.45,DISTANCE_Y:.55},CANVAS_SCALE:2,ARROW:{enabledDefault:!1,pixelSize:50,paddingPx:50},DEFAULT_VISUAL_SCALE:1,DEFAULT_OPACITY:1};function O6(r){let t=r.color??16711680,e=r.depthTest??!1,i=r.labelYOffset??1.5,n=r.visualScale??r.metadata?.visualScale??(typeof window>"u"?void 0:window.serverMetadata?.waypointVisualScale)??ot.DEFAULT_VISUAL_SCALE,s=r.opacity??r.metadata?.opacity??(typeof window>"u"?void 0:window.serverMetadata?.waypointOpacity)??ot.DEFAULT_OPACITY,o=T8(t,r.label??"","0m",e,n);o.renderOrder=10,o.material.opacity=s;let a=r.label??"",v="0m",l=0,c,d=null,h=ot.ARROW.enabledDefault,p=new p0.Group;p.add(o);let{x:g,y:b,z:A}=r.position;p.position.set(g,b,A);function w(V){let Z=h1(V,a,"0m",n),K=new p0.CanvasTexture(Z),n0=o.material;n0.map?.dispose(),n0.map=K,n0.needsUpdate=!0}function _(V){a=V??"";let Z=h1(t,a,"0m",n),K=new p0.CanvasTexture(Z),n0=o.material;n0.map?.dispose(),n0.map=K,n0.needsUpdate=!0}function S(V,Z){if(Z===v)return;v=Z;let K=h1(t,V,Z,n),n0=new p0.CanvasTexture(K),s0=o.material;s0.map?.dispose(),s0.map=n0,s0.needsUpdate=!0}function M(V){o.visible=V}function C(V,Z,K){p.position.set(V,Z,K)}function H(V,Z,K,n0){let s0=Z*Math.PI/180,$=Math.tan(s0/2)*2*K*(ot.TARGET_SCREEN_PX*n/n0);o.scale.set($,$,1)}function B(){if(c)return;let V=128,Z=L0(V,V),K=Z.getContext("2d");K.clearRect(0,0,V,V),K.beginPath(),K.moveTo(V*.15,V*.5),K.lineTo(V*.85,V*.5),K.lineTo(V*.5,V*.15),K.closePath();let n0=`#${t.toString(16).padStart(6,"0")}`;K.lineWidth=6,K.strokeStyle="black",K.stroke(),K.fillStyle=n0,K.fill();let s0=new p0.CanvasTexture(Z),l0=new p0.SpriteMaterial({map:s0,transparent:!0,depthTest:!1,depthWrite:!1,opacity:s});c=new p0.Sprite(l0),c.renderOrder=12,c.visible=!1,d&&d.add(c)}function I(V){h=V,!V&&c&&(c.visible=!1)}function W(V){c?.parent&&c.parent.remove(c),d=V,c&&V&&V.add(c)}function z(V,Z,K){if(!h||(B(),!c))return!0;let n0=r.metadata?.onlyLeftRight===!0,s0=new p0.Vector3;V.getWorldDirection(s0);let l0=V.up.clone().normalize(),$=new p0.Vector3().copy(s0).cross(l0).normalize(),u0=new p0.Vector3().copy($).cross(s0).normalize(),$0=new p0.Vector3().setFromMatrixPosition(V.matrixWorld),z0=new p0.Vector3(p.position.x,p.position.y,p.position.z).sub($0),Y0=z0.dot(s0),ct=z0.dot($),dt=z0.dot(u0),M0=Z/K,K0=V.fov*Math.PI/180,Se=2*Math.atan(Math.tan(K0/2)*M0),b5=Math.atan2(ct,Y0),Ce=Math.atan2(dt,Y0);if(Y0>0&&Math.abs(b5)<=Se/2&&Math.abs(Ce)<=K0/2)return c.visible=!1,!0;let O0=b5/(Se/2),tt=Ce/(K0/2);Y0<=0&&(Math.abs(O0)>Math.abs(tt)?(O0=Math.sign(O0),tt=0):(O0=0,tt=Math.sign(tt))),n0&&(Math.abs(O0)>Math.abs(tt)||(O0=O0>=0?1:-1),tt=0);let y5=Math.max(Math.abs(O0),Math.abs(tt))||1,Lt=O0/y5,Pe=tt/y5,re=ot.ARROW.paddingPx,w5=(Lt+1)*.5*Z,se=(1-Pe)*.5*K,et=Math.min(Math.max(w5,re),Z-re),Be=Math.min(Math.max(se,re),K-re);Lt=et/Z*2-1,Pe=-(Be/K)*2+1;let Ie=Math.max(2,V.near*4),st=Math.tan(K0/2)*Ie,P1=st*M0,y=$0.clone().add(s0.clone().multiplyScalar(Ie)).add($.clone().multiplyScalar(Lt*P1)).add(u0.clone().multiplyScalar(Pe*st));c.visible=!0,c.position.copy(y);let f=Math.atan2(tt,O0);c.material.rotation=f-Math.PI/2;let E=Math.tan(K0/2)*2*Ie*(ot.ARROW.pixelSize*n/K);return c.scale.set(E,E,1),!1}function j(V){return p.position.length()}function q(V,Z,K,n0){let s0=j(V);H(V,Z.fov,s0,n0);let l0=Math.round(s0);Math.abs(l0-l)>=1&&(l=l0,S(a,`${l0}m`));let $=z(Z,K,n0);return M($),$}function e0(){let V=o.material;if(V.map?.dispose(),V.dispose(),c){c.parent&&c.parent.remove(c);let Z=c.material;Z.map?.dispose(),Z.dispose()}}return{group:p,sprite:o,enableOffscreenArrow:I,setArrowParent:W,updateForCamera:q,setColor:w,setLabel:_,updateDistanceText:S,setVisible:M,setPosition:C,dispose:e0}}function h1(r,t,e,i=1){let n=ot.CANVAS_SCALE*(globalThis.devicePixelRatio||1),s=ot.CANVAS_SIZE*n,o=L0(s,s),a=o.getContext("2d");a.clearRect(0,0,s,s);let v=s/2,l=Math.round(s*ot.LAYOUT.DOT_Y),c=Math.round(s*.05*i),d=Math.max(2,Math.round(4*n*i));a.beginPath(),a.arc(v,l,c+d,0,Math.PI*2),a.fillStyle="black",a.fill(),a.beginPath(),a.arc(v,l,c,0,Math.PI*2),a.fillStyle=`#${r.toString(16).padStart(6,"0")}`,a.fill(),a.textAlign="center",a.textBaseline="middle";let h=Math.round(s*.08*i),p=Math.round(s*.06*i);a.font=`bold ${h}px mojangles`,a.lineWidth=Math.max(2,Math.round(3*n*i));let g=Math.round(s*ot.LAYOUT.NAME_Y);a.strokeStyle="black",a.strokeText(t,v,g),a.fillStyle="white",a.fillText(t,v,g),a.font=`bold ${p}px mojangles`,a.lineWidth=Math.max(2,Math.round(2*n*i));let b=Math.round(s*ot.LAYOUT.DISTANCE_Y);return a.strokeStyle="black",a.strokeText(e,v,b),a.fillStyle="#CCCCCC",a.fillText(e,v,b),o}function T8(r,t,e,i,n=1){let s=h1(r,t,e,n),o=new p0.CanvasTexture(s);o.anisotropy=1,o.magFilter=p0.LinearFilter,o.minFilter=p0.LinearFilter;let a=new p0.SpriteMaterial({map:o,transparent:!0,opacity:1,depthTest:i,depthWrite:!1}),v=new p0.Sprite(a);return v.position.set(0,0,0),v}var m1=class{constructor(t){this.worldRenderer=t;u(this,"waypoints",new Map);u(this,"waypointScene",new Bt.Scene);u(this,"lastCameraPosition",new Bt.Vector3);u(this,"lastUpdateTime",0);u(this,"UPDATE_THROTTLE_MS",16)}updateWaypoints(){let t=performance.now(),e=this.worldRenderer.getCameraPosition(),i=this.lastCameraPosition.distanceTo(e)>.5,n=t-this.lastUpdateTime>this.UPDATE_THROTTLE_MS;if(!i&&!n)return;this.lastCameraPosition.copy(e),this.lastUpdateTime=t;let s=this.worldRenderer.renderer.getSize(new Bt.Vector2);for(let o of this.waypoints.values()){let a=new Bt.Vector3(o.x,o.y,o.z),v=e.distanceTo(a),l=(!o.minDistance||v>=o.minDistance)&&(o.maxDistance===1/0||v<=o.maxDistance);o.sprite.setVisible(l),l&&(o.sprite.setPosition(this.worldRenderer.sceneOrigin.toSceneX(o.x),this.worldRenderer.sceneOrigin.toSceneY(o.y),this.worldRenderer.sceneOrigin.toSceneZ(o.z)),o.sprite.updateForCamera(this.worldRenderer.getCameraPosition(),this.worldRenderer.camera,s.width,s.height))}}render(){this.waypoints.size!==0&&(this.updateWaypoints(),this.worldRenderer.renderer.render(this.waypointScene,this.worldRenderer.camera))}addWaypoint(t,e,i,n,s={}){this.removeWaypoint(t);let o=s.color??16711680,{label:a,metadata:v}=s,l=s.minDistance??0,c=s.maxDistance??1/0,d=O6({position:new Bt.Vector3(e,i,n),color:o,label:a||t,metadata:v});d.enableOffscreenArrow(!0),d.setArrowParent(this.waypointScene),this.waypointScene.add(d.group),this.waypoints.set(t,{id:t,x:e+.5,y:i+.5,z:n+.5,minDistance:l,maxDistance:c,color:o,label:a,sprite:d})}removeWaypoint(t){let e=this.waypoints.get(t);e&&(this.waypointScene.remove(e.sprite.group),e.sprite.dispose(),this.waypoints.delete(t))}clear(){for(let t of this.waypoints.keys())this.removeWaypoint(t)}testWaypoint(){this.addWaypoint("Test Point",0,70,0,{color:65280,label:"Test Point"}),this.addWaypoint("Spawn",0,64,0,{color:16776960,label:"Spawn"}),this.addWaypoint("Far Point",100,70,100,{color:255,label:"Far Point"}),this.addWaypoint("Far Point 2",180,170,100,{color:255,label:"Far Point 2"}),this.addWaypoint("Far Point 3",1e3,100,1e3,{color:255,label:"Far Point 3"})}getWaypoint(t){return this.waypoints.get(t)}getAllWaypoints(){return[...this.waypoints.values()]}setWaypointColor(t,e){let i=this.waypoints.get(t);i&&(i.sprite.setColor(e),i.color=e)}setWaypointLabel(t,e){let i=this.waypoints.get(t);i&&(i.label=e,i.sprite.setLabel(e))}};x();R();T();k();import*as b0 from"three";import{Vec3 as c5}from"vec3";var g0=class g0{constructor(t){this.worldRenderer=t;u(this,"explosions",new Map);u(this,"particleGeometry");u(this,"particleMaterials",[]);u(this,"testModeTimer");u(this,"explosionCounter",0);this.particleGeometry=new b0.BoxGeometry(g0.DEFAULT_PARTICLE_SIZE,g0.DEFAULT_PARTICLE_SIZE,g0.DEFAULT_PARTICLE_SIZE),this.createParticleMaterials()}createParticleMaterials(){let t=[16711680,65280,255,16776960,16711935,65535,16753920,8388736,16761035,16777215];for(let e of t){let i=new b0.MeshBasicMaterial({color:e,transparent:!0,opacity:1});this.particleMaterials.push(i)}}getRandomMaterial(){return this.particleMaterials[Math.floor(Math.random()*this.particleMaterials.length)]}createExplosion(t,e=1,i,n=g0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],a=Math.floor(g0.DEFAULT_PARTICLE_COUNT*e),v;if(g0.DEBUG_SHOW_EXPLOSION_CENTER){let c=.5*e,d=new b0.SphereGeometry(c,8,8),h=new b0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});v=new b0.Mesh(d,h),v.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(v),v.position.set(t.x,t.y,t.z)}for(let c=0;c<a;c++){let d=Math.random()*Math.PI*2,h=Math.sqrt(Math.random())*g0.VELOCITY_FACTOR*e,p=new c5(h*Math.cos(d),Math.random()*.5-.25,h*Math.sin(d));c<5;let g=i===void 0?this.getRandomMaterial().clone():new b0.MeshBasicMaterial({color:i,transparent:!0,opacity:1}),b=new b0.Mesh(this.particleGeometry,g);b.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(b),b.position.set(t.x,t.y,t.z),c<5;let A={position:t.clone(),velocity:p,color:new b0.Color(g.color),life:1,maxLife:1,mesh:b};o.push(A)}let l={id:s,position:t.clone(),particles:o,startTime:Date.now(),duration:n,size:e,debugSphere:v};return this.explosions.set(s,l),l}createExplosionFacingCamera(t,e=1,i,n=g0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],a=Math.floor(g0.DEFAULT_PARTICLE_COUNT*e),v;if(g0.DEBUG_SHOW_EXPLOSION_CENTER){let h=.5*e,p=new b0.SphereGeometry(h,8,8),g=new b0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});v=new b0.Mesh(p,g),v.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(v),v.position.set(t.x,t.y,t.z)}let l=this.worldRenderer.getCameraPosition(),c=new c5(l.x-t.x,l.y-t.y,l.z-t.z).normalize();for(let h=0;h<a;h++){let p=Math.random()*Math.PI*2,g=Math.sqrt(Math.random())*g0.VELOCITY_FACTOR*e,b=new c5(g*Math.cos(p),g*Math.sin(p),0),A=new c5(b.x*c.x-b.z*c.z,b.y,b.x*c.z+b.z*c.x);h<5;let w=i===void 0?this.getRandomMaterial().clone():new b0.MeshBasicMaterial({color:i,transparent:!0,opacity:1}),_=new b0.Mesh(this.particleGeometry,w);_.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(_),_.position.set(t.x,t.y,t.z);let S={position:t.clone(),velocity:A,color:new b0.Color(w.color),life:1,maxLife:1,mesh:_};o.push(S)}let d={id:s,position:t.clone(),particles:o,startTime:Date.now(),duration:n,size:e,debugSphere:v};return this.explosions.set(s,d),d}explode(t,e=1,i,n){return this.createExplosion(t,e,i,n).id}explodeFacingCamera(t,e=1,i,n){return this.createExplosionFacingCamera(t,e,i,n).id}startTestMode(){let t=this.worldRenderer.getCameraPosition(),e=new c5(t.x,t.y+10,t.z);this.testModeTimer=setInterval(()=>{let i=.8+Math.random()*.4,n=[16711680,65280,255,16776960,16711935,65535,16753920],s=n[Math.floor(Math.random()*n.length)];this.explodeFacingCamera(e,i,s)},g0.TEST_INTERVAL)}updateParticle(t,e,i){let n=t.mesh.position.x===t.position.x&&t.mesh.position.y===t.position.y&&t.mesh.position.z===t.position.z;n&&t.life>.95,t.velocity.y+=g0.GRAVITY;let s=t.position.clone(),o=e/1e3;t.position.add(t.velocity.scaled(o)),t.mesh.position.set(t.position.x,t.position.y,t.position.z);let a=t.life;t.life-=e/i;let v=Math.max(0,t.life);if(t.mesh.material instanceof b0.MeshBasicMaterial&&(t.mesh.material.opacity=v),n&&a>.95){let l=t.position.distanceTo(s)}return t.life>0}render(){let t=Date.now(),e=16.67;this.explosions.size>0&&Math.random()<.01;for(let[i,n]of this.explosions.entries()){let s=t-n.startTime;if(s>=n.duration){this.removeExplosion(i);continue}s%2e3<16,n.particles=n.particles.filter(o=>this.updateParticle(o,e,n.duration)),n.particles.length===0&&this.removeExplosion(i)}}removeExplosion(t){let e=this.explosions.get(t);if(e){for(let i of e.particles)this.worldRenderer.sceneOrigin.removeAndUntrack(i.mesh),i.mesh.material instanceof b0.Material&&i.mesh.material.dispose();e.debugSphere&&(this.worldRenderer.sceneOrigin.removeAndUntrack(e.debugSphere),e.debugSphere.geometry.dispose(),e.debugSphere.material instanceof b0.Material&&e.debugSphere.material.dispose()),this.explosions.delete(t)}}stopTestMode(){this.testModeTimer&&(clearInterval(this.testModeTimer),this.testModeTimer=void 0)}destroy(){this.stopTestMode();for(let t of this.explosions.keys())this.removeExplosion(t);for(let t of this.particleMaterials)t.dispose();this.particleGeometry.dispose()}};u(g0,"DEFAULT_PARTICLE_COUNT",50),u(g0,"DEFAULT_PARTICLE_SIZE",.05),u(g0,"DEFAULT_EXPLOSION_DURATION",6e3),u(g0,"GRAVITY",-.005),u(g0,"VELOCITY_FACTOR",1.5),u(g0,"TEST_INTERVAL",1e3),u(g0,"DEBUG_SHOW_EXPLOSION_CENTER",!0),u(g0,"DEBUG_SHOW_PARTICLE_TRAILS",!1);var p1=g0;x();R();T();k();import*as $t from"three";import{Vec3 as Ni}from"vec3";var g1=class r{constructor(t,e,i,n){this.worldRenderer=t;this.updateCamera=e;this.updateFov=i;this.getInitialState=n;u(this,"isRunning",!1);u(this,"currentScript",null);u(this,"currentPointIndex",0);u(this,"currentTweens",[]);u(this,"startTime",0);u(this,"totalDuration",0);u(this,"currentPosition",{x:0,y:0,z:0});u(this,"currentRotation",{yaw:0,pitch:0});u(this,"currentFov",75)}startScript(t){if(this.isRunning||!t.points||t.points.length===0)return!1;this.currentScript=t,this.isRunning=!0,this.currentPointIndex=0,this.startTime=performance.now(),this.totalDuration=t.points.reduce((i,n)=>i+n.duration,0);let e=this.getInitialState();return this.currentPosition={x:e.position.x,y:e.position.y,z:e.position.z},this.currentRotation={yaw:e.yaw,pitch:e.pitch},this.currentFov=e.fov,this.moveToPoint(0),!0}stopScript(){if(this.isRunning){for(let t of this.currentTweens)t.stop();this.currentTweens=[],this.isRunning=!1,this.currentScript=null,this.currentPointIndex=0}}runExampleScripts(t){let e=this.worldRenderer.getCameraPosition(),i=new Ni(e.x,e.y,e.z),n=r.createCircularFlyby(i,30,20,15e3),s=r.createSpiralDescent(i.offset(0,50,0),i,3,12e3),o=r.createBuildingTour([{pos:i.offset(-20,10,-20),lookAt:i,duration:3e3},{pos:i.offset(20,15,-20),lookAt:i,duration:3e3},{pos:i.offset(20,20,20),lookAt:i,duration:3e3},{pos:i.offset(-20,25,20),lookAt:i,duration:3e3}]),a=[n,s,o];return this.startScript(a[t]),{circular:n,spiral:s,buildingTour:o}}moveToPoint(t){if(!this.currentScript||t>=this.currentScript.points.length){this.handleScriptComplete();return}let e=this.currentScript.points[t],{duration:i}=e,n={x:e.x,y:e.y,z:e.z},s={yaw:e.yaw,pitch:e.pitch},o=e.fov??this.currentFov;if(e.lookAt){let d=new $t.Vector3(e.lookAt.x,e.lookAt.y,e.lookAt.z),h=new $t.Vector3(e.x,e.y,e.z),p=d.sub(h).normalize();s.yaw=Math.atan2(-p.x,-p.z),s.pitch=Math.asin(p.y)}let a=this.getEasingFunction(e.easing||"easeInOut"),v=new S0(this.currentPosition).to(n,i).easing(a).onUpdate(()=>{this.updateCamera(new Ni(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),l=new S0(this.currentRotation).to(this.wrapRotation(s),i).easing(a).onUpdate(()=>{this.updateCamera(new Ni(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),c=null;if(Math.abs(o-this.currentFov)>.1){let d={fov:this.currentFov};c=new S0(d).to({fov:o},i).easing(a).onUpdate(()=>{this.currentFov=d.fov,this.updateFov(this.currentFov)})}this.currentTweens=[v,l],c&&this.currentTweens.push(c),v.start(),l.start(),c?.start(),v.onComplete(()=>{this.currentPointIndex++,this.currentScript?.onPointReached?.(t,e),this.isRunning&&this.moveToPoint(this.currentPointIndex)})}wrapRotation(t){let e=t.yaw,i=e-this.currentRotation.yaw;i>Math.PI?e-=2*Math.PI:i<-Math.PI&&(e+=2*Math.PI);let n=Math.max(-Math.PI/2+.01,Math.min(Math.PI/2-.01,t.pitch));return{yaw:e,pitch:n}}getEasingFunction(t){switch(t){case"linear":return k0.Linear.None;case"easeIn":return k0.Quadratic.In;case"easeOut":return k0.Quadratic.Out;case"easeInOut":return k0.Quadratic.InOut;case"smoothstep":return k0.Cubic.InOut;case"bounce":return k0.Bounce.Out;default:return k0.Quadratic.InOut}}handleScriptComplete(){if(!this.currentScript)return;let t=this.currentScript;t.loop?(this.currentPointIndex=0,this.moveToPoint(0)):(t.onComplete?.(),this.stopScript())}get running(){return this.isRunning}get progress(){if(!this.isRunning||this.totalDuration===0)return 0;let t=performance.now()-this.startTime;return Math.min(t/this.totalDuration,1)}get currentScriptName(){return this.currentScript?.name}static createCircularFlyby(t,e,i,n){let s=[];for(let a=0;a<=8;a++){let v=a/8*Math.PI*2,l=t.x+Math.cos(v)*e,c=t.z+Math.sin(v)*e,d=t.y+i;s.push({x:l,y:d,z:c,yaw:v+Math.PI/2,pitch:-.2,duration:n/8,easing:"smoothstep",lookAt:{x:t.x,y:t.y,z:t.z}})}return{name:"Circular Flyby",points:s,loop:!1}}static createSpiralDescent(t,e,i,n){let s=[],o=i*8,a=20;for(let v=0;v<=o;v++){let l=v/o,c=l*i*Math.PI*2,d=$t.MathUtils.lerp(t.x,e.x,l)+Math.cos(c)*a*(1-l),h=$t.MathUtils.lerp(t.z,e.z,l)+Math.sin(c)*a*(1-l),p=$t.MathUtils.lerp(t.y,e.y,l);s.push({x:d,y:p,z:h,yaw:c+Math.PI/2,pitch:-.3*l,duration:n/o,easing:"easeInOut"})}return{name:"Spiral Descent",points:s,loop:!1}}static createBuildingTour(t){return{name:"Building Tour",points:t.map((i,n)=>({x:i.pos.x,y:i.pos.y,z:i.pos.z,yaw:0,pitch:0,duration:i.duration||3e3,easing:"smoothstep",lookAt:i.lookAt?{x:i.lookAt.x,y:i.lookAt.y,z:i.lookAt.z}:void 0})),loop:!1}}};x();R();T();k();import*as i0 from"three";var Vi=.75,b1=class{constructor(t,e,i){this.scene=t;this.defaultSkybox=e;this.initialImage=i;u(this,"texture",null);u(this,"mesh",null);u(this,"skyMesh",null);u(this,"voidMesh",null);u(this,"worldTime",0);u(this,"partialTicks",0);u(this,"viewDistance",4);u(this,"temperature",Vi);u(this,"inWater",!1);u(this,"waterBreathing",!1);u(this,"fogBrightness",0);u(this,"prevFogBrightness",0);u(this,"fogOrangeness",0);u(this,"distanceFactor",2.7);u(this,"brightnessAtPosition",1);u(this,"debugGui");this.debugGui=new wt("skybox_renderer",this,["temperature","worldTime","inWater","waterBreathing","fogOrangeness","brightnessAtPosition","distanceFactor"],{brightnessAtPosition:{min:0,max:1,step:.01},temperature:{min:0,max:1,step:.01},worldTime:{min:0,max:24e3,step:1},fogOrangeness:{min:-1,max:1,step:.01},distanceFactor:{min:0,max:5,step:.01}}),i||this.createGradientSky()}async init(){this.initialImage&&await this.setSkyboxImage(this.initialImage)}async setSkyboxImage(t){this.texture&&this.texture.dispose();let e=new i0.TextureLoader;if(this.texture=await new Promise(i=>{e.load(t,n=>{n.mapping=i0.EquirectangularReflectionMapping,n.encoding=i0.sRGBEncoding,n.minFilter=i0.NearestFilter,n.magFilter=i0.NearestFilter,n.needsUpdate=!0,i(n)})}),this.mesh)this.mesh.material.map=this.texture,this.mesh.material.needsUpdate=!0;else{let i=new i0.SphereGeometry(500,60,40);i.scale(-1,1,1);let n=new i0.MeshBasicMaterial({map:this.texture,side:i0.FrontSide});this.mesh=new i0.Mesh(i,n),this.scene.add(this.mesh)}}update(t,e){e!==this.viewDistance&&(this.viewDistance=e,this.updateSkyColors()),this.mesh?this.mesh.position.set(0,0,0):this.skyMesh&&(this.skyMesh.position.set(0,0,0),this.voidMesh?.position.set(0,0,0),this.updateSkyColors())}updateTime(t,e=0){this.debugGui.visible||(this.worldTime=t,this.partialTicks=e,this.updateSkyColors())}updateViewDistance(t){this.viewDistance=t,this.updateSkyColors()}updateTemperature(t){this.debugGui.visible||(this.temperature=t,this.updateSkyColors())}updateWaterState(t,e){this.debugGui.visible||(this.inWater=t,this.waterBreathing=e,this.updateSkyColors())}updateDefaultSkybox(t){this.debugGui.visible||(this.defaultSkybox=t,this.updateSkyColors())}createGradientSky(){{let i=new i0.PlaneGeometry(768,768);i.rotateX(-Math.PI/2),i.translate(0,16,0);let n=new i0.MeshBasicMaterial({color:16777215,side:i0.DoubleSide,depthTest:!1});this.skyMesh=new i0.Mesh(i,n),this.scene.add(this.skyMesh)}{let i=new i0.PlaneGeometry(768,768);i.rotateX(-Math.PI/2),i.translate(0,-16,0);let n=new i0.MeshBasicMaterial({color:16777215,side:i0.DoubleSide,depthTest:!1});this.voidMesh=new i0.Mesh(i,n),this.scene.add(this.voidMesh)}this.updateSkyColors()}getFogColor(t=0){let e=this.getCelestialAngle(t),i=Math.cos(e*Math.PI*2)*2+.5;i=Math.max(0,Math.min(1,i));let n=.7529412,s=.84705883,o=1;return n*=i*.94+.06,s*=i*.94+.06,o*=i*.91+.09,new i0.Vector3(n,s,o)}getSkyColor(t=0,e=0,i=0){let n=this.getCelestialAngle(i),s=Math.cos(n*3.141593*2)*2+.5;s<0&&(s=0),s>1&&(s=1);let o=this.getTemperature(t,e),a=this.getSkyColorByTemp(o),v=(a>>16&255)/255,l=(a>>8&255)/255,c=(a&255)/255;return new i0.Vector3(v*s,l*s,c*s)}calculateCelestialAngle(t,e){let n=(t%24e3+e)/24e3-.25;return n<0&&n++,n>1&&n--,n=1-(Math.cos(n*Math.PI)+1)/2,n+=(n-n)/3,n}getCelestialAngle(t){return this.calculateCelestialAngle(this.worldTime,t)}getTemperature(t,e){return this.temperature}getSkyColorByTemp(t){t/=3,t<-1&&(t=-1),t>1&&(t=1);let e=.6222222-t*.05,n=this.fogOrangeness>0?e+(.12-e)*this.fogOrangeness*.8:e+this.fogOrangeness*.1,s=.5+t*.1+Math.abs(this.fogOrangeness)*.3;return this.hsbToRgb(n,s,1)}hsbToRgb(t,e,i){let n=0,s=0,o=0;if(e===0)n=s=o=Math.floor(i*255+.5);else{let a=(t-Math.floor(t))*6,v=a-Math.floor(a),l=i*(1-e),c=i*(1-e*v),d=i*(1-e*(1-v));switch(Math.floor(a)){case 0:n=Math.floor(i*255+.5),s=Math.floor(d*255+.5),o=Math.floor(l*255+.5);break;case 1:n=Math.floor(c*255+.5),s=Math.floor(i*255+.5),o=Math.floor(l*255+.5);break;case 2:n=Math.floor(l*255+.5),s=Math.floor(i*255+.5),o=Math.floor(d*255+.5);break;case 3:n=Math.floor(l*255+.5),s=Math.floor(c*255+.5),o=Math.floor(i*255+.5);break;case 4:n=Math.floor(d*255+.5),s=Math.floor(l*255+.5),o=Math.floor(i*255+.5);break;case 5:n=Math.floor(i*255+.5),s=Math.floor(l*255+.5),o=Math.floor(c*255+.5);break}}return 4278190080|n<<16|s<<8|Math.trunc(o)}updateSkyColors(){if(!this.skyMesh||!this.voidMesh)return;if(!this.defaultSkybox){this.skyMesh.visible=!1,this.voidMesh.visible=!1,this.mesh&&(this.mesh.visible=!1);return}this.skyMesh.visible=!0,this.voidMesh.visible=!0,this.mesh&&(this.mesh.visible=!0),this.prevFogBrightness=this.fogBrightness;let t=this.viewDistance/32,e=this.brightnessAtPosition*(1-t)+t;if(this.fogBrightness+=(e-this.fogBrightness)*.1,this.inWater){let g=this.waterBreathing?100:5;this.scene.fog=new i0.Fog(new i0.Color(0,0,1),.0025,g),this.scene.background=new i0.Color(0,0,1),this.skyMesh.material.color.set(new i0.Color(0,0,1)),this.voidMesh.material.color.set(new i0.Color(0,0,.6));return}let i=this.viewDistance*16,n=1-(.25+.75*this.viewDistance/32)**.25,s=this.getCelestialAngle(this.partialTicks),o=this.getSkyColor(0,0,this.partialTicks),a=this.getFogColor(this.partialTicks),v=Math.cos(s*Math.PI*2)*2+.5,l=Math.max(0,Math.min(1,v)),c=this.prevFogBrightness+(this.fogBrightness-this.prevFogBrightness)*this.partialTicks,d=(a.x+(o.x-a.x)*n)*l*c,h=(a.y+(o.y-a.y)*n)*l*c,p=(a.z+(o.z-a.z)*n)*l*c;this.scene.background=new i0.Color(d,h,p),this.scene.fog=new i0.Fog(new i0.Color(d,h,p),.0025,i*this.distanceFactor),this.skyMesh.material.color.set(new i0.Color(o.x,o.y,o.z)),this.voidMesh.material.color.set(new i0.Color(o.x*.2+.04,o.y*.2+.04,o.z*.6+.1))}dispose(){this.texture&&this.texture.dispose(),this.mesh&&(this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.scene.remove(this.mesh)),this.skyMesh&&(this.skyMesh.geometry.dispose(),this.skyMesh.material.dispose(),this.scene.remove(this.skyMesh)),this.voidMesh&&(this.voidMesh.geometry.dispose(),this.voidMesh.material.dispose(),this.scene.remove(this.voidMesh))}};x();R();T();k();import*as r0 from"three";var M8=`
21188
21188
  precision highp float;
21189
21189
  attribute vec3 position;
21190
21190
  attribute vec4 color;
@@ -21213,7 +21213,7 @@ void main() {
21213
21213
  vec4 texColor = texture2D(texture, gl_PointCoord);
21214
21214
  gl_FragColor = vColor * texColor;
21215
21215
  }
21216
- `,W0={textureSize:128,gravity:new r0.Vector3(0,-.005,0),friction:.998,defaultParticleSize:300,maxActiveFireworks:5},c5=r=>{let e=r*3;return{x:e,y:e+1,z:e+2}},d5=r=>{let e=r*4;return{r:e,g:e+1,b:e+2,a:e+3}},te=(r=0,t=0)=>Math.floor(Math.random()*(r+1-t))+t,C8=(r,t,e,i)=>{r.save();let n=r.createRadialGradient(t,t,0,t,t,t);n.addColorStop(0,"rgba(255,255,255,1.0)"),n.addColorStop(.5,"rgba(255,255,255,0.5)"),n.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=n,r.fillRect(0,0,e,i),r.restore()},P8=()=>{let r=W0.textureSize,t=L0(r,r),e=t.getContext("2d"),i=r/2;C8(e,i,t.width,t.height);let n=new r0.Texture(t);return n.needsUpdate=!0,n},B8=(r,t,e,i,n=W0.defaultParticleSize)=>{let s=new r0.BufferGeometry,o=[],a=[],v=[],l=[],c=[],d=Math.random()>.3?"single":"multiple",h=te(100,20)*.01,p=()=>te(100,1)*.01,g="red",b=Math.random();b>.66?g="red":b>.33?g="green":g="blue";for(let w=0;w<r;w++){let _=new r0.Vector3(0,0,0);if(o.push(_.x,_.y,_.z),a.push(t[w].x,t[w].y,t[w].z),e==="seed"){let S=t[w].y**2*.04;w===0&&(S*=1.1),l.push(S),c.push(S*.017),v.push(1,1,1,1)}else if(e==="trail"){let S=Math.random()*.1+.1;l.push(S),c.push(S*.017),v.push(1,1,1,1)}else{let S=te(n,10)*.001;if(l.push(S),c.push(S*.017),d==="multiple")v.push(p(),p(),p(),1);else switch(g){case"red":v.push(h,.1,.1,1);break;case"green":v.push(.1,h,.1,1);break;case"blue":v.push(.1,.1,h,1);break}}}s.setAttribute("position",new r0.Float32BufferAttribute(o,3)),s.setAttribute("velocity",new r0.Float32BufferAttribute(a,3)),s.setAttribute("color",new r0.Float32BufferAttribute(v,4)),s.setAttribute("adjustSize",new r0.Float32BufferAttribute(l,1)),s.setAttribute("mass",new r0.Float32BufferAttribute(c,1));let A=new r0.RawShaderMaterial({uniforms:{size:{value:W0.textureSize},texture:{value:i}},transparent:!0,depthWrite:!1,blending:r0.AdditiveBlending,vertexShader:M8,fragmentShader:S8});return new r0.Points(s,A)},u5=class{constructor(t,e,i,n,s){u(this,"particleNum");u(this,"timerStartFading");u(this,"mesh");this.particleNum=t,this.timerStartFading=10,this.mesh=B8(t,e,i,n,s)}update(t){this.timerStartFading>0&&(this.timerStartFading-=.3);let e=this.mesh.geometry.attributes.position,i=this.mesh.geometry.attributes.velocity,n=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.5?.98:.96,a=v=>Math.random()>.5?0:(1-v)*.1;for(let v=0;v<this.particleNum;v++){let{x:l,y:c,z:d}=c5(v);i.array[c]+=t.y-s.array[v],i.array[l]*=W0.friction,i.array[d]*=W0.friction,i.array[c]*=W0.friction,e.array[l]+=i.array[l],e.array[c]+=i.array[c],e.array[d]+=i.array[d];let{a:h}=d5(v);this.timerStartFading<=0&&(n.array[h]*=o()-a(n.array[h]),n.array[h]<.001&&(n.array[h]=0))}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}disposeAll(){this.mesh.geometry.dispose(),this.mesh.material.dispose()}},Vi=class extends u5{constructor(t,e,i){super(t,e,"seed",i)}update(t){let e=this.mesh.geometry.attributes.position,i=this.mesh.geometry.attributes.velocity,n=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.3?.99:.96,a=d=>Math.random()>.3?0:(1-d)*.1,v=()=>Math.random()>.5?.05:-.05,l=()=>Math.random()>.1,c=W0.friction*.98;for(let d=0;d<this.particleNum;d++){let{x:h,y:p,z:g}=c5(d);i.array[p]+=t.y-s.array[d],i.array[h]*=c,i.array[g]*=c,i.array[p]*=c,e.array[h]+=i.array[h],e.array[p]+=i.array[p],e.array[g]+=i.array[g],l()&&(e.array[h]+=v()),l()&&(e.array[g]+=v());let{a:b}=d5(d);n.array[b]*=o()-a(n.array[b]),n.array[b]<.001&&(n.array[b]=0)}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},ji=class extends u5{constructor(t,e,i){super(t,e,"trail",i)}update(t){let e=this.mesh.geometry.attributes.position,i=this.mesh.geometry.attributes.velocity,n=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.3?.98:.95,a=()=>Math.random()>.5?.05:-.05,v=()=>Math.random()>.2;for(let l=0;l<this.particleNum;l++){let{x:c,y:d,z:h}=c5(l);i.array[d]+=t.y-s.array[l],i.array[c]*=W0.friction,i.array[h]*=W0.friction,i.array[d]*=W0.friction,e.array[c]+=i.array[c],e.array[d]+=i.array[d],e.array[h]+=i.array[h],v()&&(e.array[c]+=a()),v()&&(e.array[h]+=a());let{a:p}=d5(l);n.array[p]*=o(),n.array[p]<.001&&(n.array[p]=0)}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},f5=class{constructor(t,e=W0.defaultParticleSize,i){u(this,"meshGroup");u(this,"isExplode");u(this,"petalsNum");u(this,"life");u(this,"seed");u(this,"flowerSizeRate");u(this,"flower");u(this,"texture");u(this,"particleSize");this.meshGroup=new r0.Group,this.isExplode=!1,this.texture=t,this.particleSize=e;let n=400,s=150;this.petalsNum=te(n,s),this.life=150,this.seed=this.getSeed(i),this.meshGroup.add(this.seed.mesh),this.flowerSizeRate=r0.MathUtils.mapLinear(this.petalsNum,s,n,.4,.7)}getSeed(t){let i=[];for(let s=0;s<40;s++){let a=s===0?Math.random()*2.5+.9:Math.random()*2+.4,v=0;i.push(new r0.Vector3(0,a,v))}let n=new Vi(40,i,this.texture);if(t)n.mesh.position.set(0,0,0);else{let s=Math.random()*80-40,o=-50,a=Math.random()*80-40;n.mesh.position.set(s,o,a)}return n}explode(t){this.isExplode=!0,this.flower=this.getFlower(t),this.meshGroup.add(this.flower.mesh),this.meshGroup.remove(this.seed.mesh),this.seed.disposeAll()}getFlower(t){let e=this.petalsNum,i=[],n;if(Math.random()>.5)for(let a=0;a<e;a++){n=te(120,60)*.01;let v=r0.MathUtils.degToRad(Math.random()*180),l=r0.MathUtils.degToRad(Math.random()*360),c=Math.sin(v)*Math.cos(l)*n,d=Math.sin(v)*Math.sin(l)*n,h=Math.cos(v)*n,p=new r0.Vector3(c,d,h);p.multiplyScalar(this.flowerSizeRate),i.push(p)}else{let a=180/e,v=360*(Math.random()*20+1)/e,l=v,c=v;n=te(120,60)*.01;for(let d=0;d<e;d++){let h=Math.sin(r0.MathUtils.degToRad(a*d)),p=Math.cos(r0.MathUtils.degToRad(a*d))*n,g=Math.cos(r0.MathUtils.degToRad(l*d))*h*n,b=Math.sin(r0.MathUtils.degToRad(c*d))*h*n,A=new r0.Vector3(g,b,p);A.multiplyScalar(this.flowerSizeRate),i.push(A)}}let o=new u5(e,i,"default",this.texture,this.particleSize);return o.mesh.position.set(t.x,t.y,t.z),o}update(t){this.isExplode?(this.flower.update(t),this.life>0&&(this.life-=1)):this.drawTail()}drawTail(){this.seed.update(W0.gravity);let t=this.seed.mesh.geometry.attributes.position,e=this.seed.mesh.geometry.attributes.velocity,i=0;for(let d=0,h=e.array.length;d<h;d++){let p=e.array[d];d%3===1&&p>0&&i++}if(!(i===0))return;let{x:s,y:o,z:a}=this.seed.mesh.position,v=new r0.Vector3(s,o,a),l=0,c;for(let d=0,h=t.array.length;d<h;d++){let p=t.array[d];d%3===1&&p>l&&(l=p,c=new r0.Vector3(t.array[d-1],p,t.array[d+2]))}c&&(v.add(c),this.explode(v))}},Te=class extends f5{constructor(e,i=W0.defaultParticleSize,n){super(e,i,n);u(this,"tailMeshGroup");u(this,"tails");let s=150,o=100;this.petalsNum=te(s,o),this.flowerSizeRate=r0.MathUtils.mapLinear(this.petalsNum,o,s,.4,.7),this.tailMeshGroup=new r0.Group,this.tails=[]}explode(e){this.isExplode=!0,this.flower=this.getFlower(e),this.tails=this.getTail(),this.meshGroup.add(this.flower.mesh),this.meshGroup.add(this.tailMeshGroup)}getTail(){let e=[],n=this.flower.mesh.geometry.attributes.color;for(let s=0;s<this.petalsNum;s++){let o=[];for(let C=0;C<20;C++)o.push(new r0.Vector3(0,0,0));let a=new ji(20,o,this.texture),{r:v,g:l,b:c,a:d}=d5(s),h=n.array[v],p=n.array[l],g=n.array[c],b=n.array[d],A=a.mesh.geometry.attributes.position,w=a.mesh.geometry.attributes.color;for(let C=0;C<A.count;C++){let H=d5(C);w.array[H.r]=h,w.array[H.g]=p,w.array[H.b]=g,w.array[H.a]=b}let{x:_,y:S,z:M}=this.flower.mesh.position;a.mesh.position.set(_,S,M),e.push(a),this.tailMeshGroup.add(a.mesh)}return e}update(e){if(this.isExplode){this.flower.update(e);let i=this.flower.mesh.geometry.attributes.position;for(let n=0,s=this.tails.length;n<s;n++){let o=this.tails[n];o.update(e);let{x:a,y:v,z:l}=c5(n),c=new r0.Vector3(i.array[a],i.array[v],i.array[l]),d=o.mesh.geometry.attributes.position,h=o.mesh.geometry.attributes.velocity;for(let p=0;p<d.count;p++){let g=c5(p),b=new r0.Vector3,A=new r0.Vector3(d.array[g.x],d.array[g.y],d.array[g.z]),w=new r0.Vector3(h.array[g.x],h.array[g.y],h.array[g.z]);b.subVectors(c,A);let _=b.sub(w);_.normalize(),_.multiplyScalar(Math.random()*3e-4*this.life),h.array[g.x]+=_.x,h.array[g.y]+=_.y,h.array[g.z]+=_.z}h.needsUpdate=!0}this.life>0&&(this.life-=1.2)}else this.drawTail()}},b1=class{constructor(t,e,i){u(this,"fireworksInstances");u(this,"scene");u(this,"sceneOrigin");u(this,"texture");u(this,"particleSize");u(this,"maxFireworks");this.fireworksInstances=[],this.scene=t,this.sceneOrigin=e,this.texture=P8(),this.particleSize=i?.defaultParticleSize??W0.defaultParticleSize,this.maxFireworks=i?.maxActiveFireworks??W0.maxActiveFireworks}launchFirework(t){if(this.fireworksInstances.length>=this.maxFireworks)return;let e=t?.particleSize??this.particleSize,i=t?.position,n;t?.forceRich?n=new Te(this.texture,e,i):t?.forceBasic?n=new f5(this.texture,e,i):n=Math.random()>.5?new f5(this.texture,e,i):new Te(this.texture,e,i),this.fireworksInstances.push(n),i?(this.sceneOrigin.addAndTrack(n.meshGroup),n.meshGroup.position.set(i.x,i.y,i.z)):this.scene.add(n.meshGroup)}repositionAll(){}update(){let t=[];for(let e=this.fireworksInstances.length-1;e>=0;e--){let i=this.fireworksInstances[e];i.update(W0.gravity),i.isExplode&&t.push(e)}for(let e=0,i=t.length;e<i;e++){let n=t[e],s=this.fireworksInstances[n];if(s&&(s.meshGroup.remove(s.seed.mesh),s.seed.disposeAll(),s.life<=0)){if(this.sceneOrigin.removeAndUntrack(s.meshGroup),s instanceof Te&&s.tailMeshGroup)for(let o of s.tails)o.disposeAll();s.flower?.disposeAll(),this.fireworksInstances.splice(n,1)}}}clear(){for(let t of this.fireworksInstances)if(this.sceneOrigin.removeAndUntrack(t.meshGroup),t.seed.disposeAll(),t.flower&&t.flower.disposeAll(),t instanceof Te)for(let e of t.tails)e.disposeAll();this.fireworksInstances=[]}dispose(){this.clear(),this.texture.dispose()}};x();R();T();k();var D6=Symbol("tracked-proxy"),I8=new Set(["add","addScalar","addScaledVector","addVectors","sub","subScalar","subVectors","multiply","multiplyScalar","multiplyVectors","divide","divideScalar","applyEuler","applyAxisAngle","applyMatrix3","applyMatrix4","applyNormalMatrix","applyQuaternion","negate","floor","ceil","round","roundToZero","min","max","clamp","clampLength","clampScalar","project","unproject","reflect","lerp","lerpVectors","cross","crossVectors","setFromMatrixPosition","setFromMatrixColumn","setFromMatrix3Column","setFromEuler","setFromSpherical","setFromSphericalCoords","setFromCylindrical","fromArray","fromBufferAttribute","setComponent","randomDirection","random"]),y1=class{constructor(t){u(this,"scene");u(this,"_x",0);u(this,"_y",0);u(this,"_z",0);u(this,"_tracked",new Set);u(this,"_worldCoords",new WeakMap);u(this,"_originalPositions",new WeakMap);u(this,"_trackOptions",new WeakMap);this.scene=t}get x(){return this._x}get y(){return this._y}get z(){return this._z}update(t,e,i){this._x=t,this._y=e,this._z=i;for(let n of this._tracked){let s=this._worldCoords.get(n);this._originalPositions.get(n).set(s.x-t,s.y-e,s.z-i),this._trackOptions.get(n)?.updateMatrix&&n.updateMatrix()}}track(t,e){let i=this._originalPositions.get(t)??t.position,n={x:0,y:0,z:0};this._originalPositions.set(t,i),this._worldCoords.set(t,n),e?this._trackOptions.set(t,e):this._trackOptions.delete(t);let s=this,o=e,a=new Proxy(i,{get(v,l,c){if(l===D6)return n;if(l==="set")return(h,p,g)=>(n.x=h,n.y=p,n.z=g,v.set(h-s._x,p-s._y,g-s._z),o?.updateMatrix&&t.updateMatrix(),c);if(l==="copy")return h=>{let p=h[D6],g=p?p.x:h.x,b=p?p.y:h.y,A=p?p.z:h.z;return n.x=g,n.y=b,n.z=A,v.set(g-s._x,b-s._y,A-s._z),o?.updateMatrix&&t.updateMatrix(),c};if(l==="setX")return h=>(n.x=h,v.x=h-s._x,o?.updateMatrix&&t.updateMatrix(),c);if(l==="setY")return h=>(n.y=h,v.y=h-s._y,o?.updateMatrix&&t.updateMatrix(),c);if(l==="setZ")return h=>(n.z=h,v.z=h-s._z,o?.updateMatrix&&t.updateMatrix(),c);if(typeof l=="string"&&I8.has(l))return()=>{throw new Error(`Cannot call position.${l}() on a tracked object. Use position.set(x, y, z) instead.`)};let d=v[l];return typeof d=="function"?d.bind(v):d},set(v,l,c){return l==="x"?(n.x=c,v.x=c-s._x,o?.updateMatrix&&t.updateMatrix(),!0):l==="y"?(n.y=c,v.y=c-s._y,o?.updateMatrix&&t.updateMatrix(),!0):l==="z"?(n.z=c,v.z=c-s._z,o?.updateMatrix&&t.updateMatrix(),!0):(v[l]=c,!0)}});Object.defineProperty(t,"position",{value:a,configurable:!0,enumerable:!0}),this._tracked.add(t)}untrack(t){let e=this._originalPositions.get(t);e&&(Object.defineProperty(t,"position",{value:e,configurable:!0,enumerable:!0}),this._tracked.delete(t),this._worldCoords.delete(t),this._originalPositions.delete(t),this._trackOptions.delete(t))}addAndTrack(t,e){this.track(t,e),this.scene.add(t)}removeAndUntrack(t){this.untrack(t),t.removeFromParent()}removeAndUntrackAll(t){t.traverse(e=>{this.untrack(e)}),t.removeFromParent()}getWorldPosition(t){let e=this._worldCoords.get(t);return e?{x:e.x,y:e.y,z:e.z}:void 0}clear(){for(let t of this._tracked)this.untrack(t)}get trackedCount(){return this._tracked.size}toSceneX(t){return t-this._x}toSceneY(t){return t-this._y}toSceneZ(t){return t-this._z}toWorldX(t){return t+this._x}toWorldY(t){return t+this._y}toWorldZ(t){return t+this._z}};Qi();x();R();T();k();import W8 from"prismarine-chat";import*as t0 from"three";import*as _1 from"prismarine-nbt";import{Vec3 as Ki}from"vec3";x();R();T();k();import*as Q0 from"three";var N6=20,V6=40,D8={white_banner:15,orange_banner:14,magenta_banner:13,light_blue_banner:12,yellow_banner:11,lime_banner:10,pink_banner:9,gray_banner:8,light_gray_banner:7,cyan_banner:6,purple_banner:5,blue_banner:4,brown_banner:3,green_banner:2,red_banner:1,black_banner:0},j6={0:"#1d1d21",1:"#b02e26",2:"#5e7c16",3:"#835432",4:"#3c44aa",5:"#8932b8",6:"#169c9c",7:"#9d9d97",8:"#474f52",9:"#f38baa",10:"#80c71f",11:"#fed83d",12:"#3ab3da",13:"#c74ebd",14:"#f9801d",15:"#f9fffe"};function L8(r){let t=r.replace("_wall_banner","_banner");return D8[t]??15}var F8=(r,t,e,i,n,s,o)=>{switch(r.fillStyle=e,t){case"bs":r.fillRect(i,n,s,o);break;case"ls":r.fillRect(i,n,s/3,o);break;case"rs":r.fillRect(i+s*2/3,n,s/3,o);break;case"ts":r.fillRect(i,n,s,o/3);break;case"ms":r.fillRect(i,n+o/3,s,o/3);break;case"drs":r.fillRect(i,n,s/2,o/2);break;case"dls":r.fillRect(i+s/2,n,s/2,o/2);break;case"ss":for(let a=0;a<s;a+=2)r.fillRect(i+a,n,1,o);break;case"cr":r.fillRect(i,n+o/3,s,o/3),r.fillRect(i+s/3,n,s/3,o);break;case"sc":r.fillRect(i,n+o/2-1,s,2),r.fillRect(i+s/2-1,n,2,o);break;default:r.fillRect(i,n,s,o)}};function U8(r,t){if(!t||t.length===0)return`banner_${r}_empty`;let e=t.map(i=>`${i.Pattern??"bs"}_${i.Color??0}`).join(",");return`banner_${r}_${e}`}var G8=(r,t,e=(i,n)=>L0(i,n))=>{let n=e(N6*1,V6*1),s=n.getContext("2d");if(s){if(s.imageSmoothingEnabled=!1,t?.Patterns&&t.Patterns.length>0)for(let o of t.Patterns){let a=o.Color??0,v=o.Pattern??"bs",l=j6[a]||j6[0];F8(s,v,l,0,0,N6*1,V6*1)}return n}},w1=new Map;function Y6(r,t,e){let i=L8(t),n=U8(i,e?.Patterns),s=w1.get(n);if(s)return s.refCount++,s.texture;let o=G8(i,e);if(!o)return;let a=new Q0.Texture(o);return a.magFilter=Q0.NearestFilter,a.minFilter=Q0.NearestFilter,a.needsUpdate=!0,w1.set(n,{texture:a,refCount:1}),a}function Q6(r){for(let[t,e]of w1.entries())if(e.texture===r){e.refCount--,e.refCount<=0&&(e.texture.dispose(),w1.delete(t));return}}function K6(r,t,e,i){let a,v,l;e?(a=(-14.6+13.4)/2/16-.5,v=1-14.75/16-.5,l=1/2):(a=(1.4+29.4)/2/16,v=1-7.25/16-.5,l=0);let c=new Q0.Mesh(new Q0.PlaneGeometry(.85,1.75),new Q0.MeshBasicMaterial({map:i,transparent:!0}));c.renderOrder=999;let d=.5/16,h=.25/16;e?c.position.set(0,a,v+h+.004):c.position.set(0,a,v+d/2+.004);let p=new Q0.Group;return p.rotation.set(0,-Q0.MathUtils.degToRad(t*(e?90:45/2)),0),p.add(c),p.bannerTexture=i,p.position.set(r.x+.5,r.y+l,r.z+.5),p}var ee=class ee{constructor(t,e,i,n,s=3){this.worldRenderer=t;this.scene=e;this.material=i;this.worldHeight=n;u(this,"meshPool",[]);u(this,"activeSections",new Map);u(this,"sectionObjects",{});u(this,"waitingChunksToDisplay",{});u(this,"pendingNearReveal",new Map);u(this,"nearRevealTimers",new Map);u(this,"nearRevealGraceTimers",new Map);u(this,"poolSize");u(this,"maxPoolSize");u(this,"minPoolSize");u(this,"signHeadsRenderer");u(this,"chunkBoxMaterial",new t0.MeshBasicMaterial({color:0,transparent:!0,opacity:0}));u(this,"hits",0);u(this,"misses",0);u(this,"bypassPooling",!1);u(this,"renderTimes",[]);u(this,"maxRenderTimeSamples",30);u(this,"_performanceOverrideDistance");u(this,"lastPerformanceCheck",0);u(this,"performanceCheckInterval",2e3);this.updateViewDistance(s),this.signHeadsRenderer=new Ji(t),this.initializePool()}get performanceOverrideDistance(){return this._performanceOverrideDistance??0}set performanceOverrideDistance(t){this._performanceOverrideDistance=t,this.updateSectionsVisibility()}initializePool(){for(let t=0;t<this.poolSize;t++){let e=new t0.BufferGeometry,i=new t0.Mesh(e,this.material);i.visible=!1,i.matrixAutoUpdate=!1,i.name="pooled-section-mesh";let n={mesh:i,inUse:!1,lastUsedTime:0};this.meshPool.push(n)}}updateSection(t,e){let i=this.sectionObjects[t];i&&this.cleanupSection(t);let n=this.activeSections.get(t);if(!n){if(n=this.acquireMesh(),!n)return null;this.activeSections.set(t,n),n.sectionKey=t}let{mesh:s}=n;this.updateGeometryAttribute(s.geometry,"position",e.positions,3),this.updateGeometryAttribute(s.geometry,"normal",e.normals,3),this.updateGeometryAttribute(s.geometry,"color",e.colors,3),this.updateGeometryAttribute(s.geometry,"uv",e.uvs,2),s.geometry.index=new t0.BufferAttribute(e.indices,1),s.geometry.boundingBox=new t0.Box3(new t0.Vector3(-8,-8,-8),new t0.Vector3(8,8,8)),s.geometry.boundingSphere=new t0.Sphere(new t0.Vector3(0,0,0),Math.sqrt(3*8**2)),this.worldRenderer.sceneOrigin.track(s,{updateMatrix:!0}),s.position.set(e.sx,e.sy,e.sz),s.updateMatrix(),s.visible=!0,s.name="mesh",n.lastUsedTime=performance.now(),i=new t0.Group,i.add(s),i.mesh=s,i.tilesCount=e.positions.length/3/4,i.blocksCount=e.blocksCount,i.worldX=e.sx,i.worldY=e.sy,i.worldZ=e.sz,i.sectionKey=t,i.name="chunk";try{if(Object.keys(e.signs).length>0){let c=new t0.Group;c.name="signs";for(let[d,{isWall:h,isHanging:p,rotation:g}]of Object.entries(e.signs)){let b=this.worldRenderer.blockEntities[d];if(!b)continue;let[A,w,_]=d.split(","),S=this.signHeadsRenderer.renderSign(new Ki(+A,+w,+_),g,h,p,_1.simplify(b));S&&c.add(S)}i.add(c),i.signsContainer=c}if(Object.keys(e.heads).length>0){let c=new t0.Group;c.name="heads";for(let[d,{isWall:h,rotation:p}]of Object.entries(e.heads)){let g=this.worldRenderer.blockEntities[d];if(!g)continue;let[b,A,w]=d.split(","),_=this.signHeadsRenderer.renderHead(new Ki(+b,+A,+w),p,h,_1.simplify(g));_&&c.add(_)}i.add(c),i.headsContainer=c}if(Object.keys(e.banners).length>0){let c=new t0.Group;c.name="banners",i.bannersContainer=c,i.add(c);for(let[d,{isWall:h,rotation:p,blockName:g}]of Object.entries(e.banners)){let b=this.worldRenderer.blockEntities[d];if(!b)continue;let[A,w,_]=d.split(","),S=Y6(this.worldRenderer,g,_1.simplify(b));if(!S)continue;let M=K6(new Ki(+A,+w,+_),p,h,S),{x:C,y:H,z:B}=M.position;this.worldRenderer.sceneOrigin.track(M),M.position.set(C,H,B),c.add(M)}}}catch{}this.sectionObjects[t]=i,this.scene.add(i),i.matrixAutoUpdate=!1,this.worldRenderer.displayOptions?.inWorldRenderingConfig?.showChunkBorders&&this.updateBoxHelper(t,!0);let o=t.split(","),a=`${o[0]},${o[2]}`,v=!!this.worldRenderer.displayOptions?.inWorldRenderingConfig?._renderByChunks,l=!!this.worldRenderer.worldRendererConfig?.wasmMesher;if((v||l)&&!this.worldRenderer.finishedChunks[a]){i.visible=!1,i._waitingForChunkDisplay=!0;let c=this.waitingChunksToDisplay[a]??(this.waitingChunksToDisplay[a]=[]);c.includes(t)||c.push(t)}return i}finishChunkDisplay(t){if(!this.waitingChunksToDisplay[t]){this.tryRevealPending();return}if(this.isWasmGateActive()&&this.isBlockedByNearer(t,0)){this.pendingNearReveal.set(t,Date.now()),this.armNearRevealTimer(t),this.armExpectedGraceTimer(t);return}this.flushChunkDisplay(t),this.tryRevealPending()}flushChunkDisplay(t){let e=this.waitingChunksToDisplay[t];if(this.pendingNearReveal.delete(t),this.clearNearRevealTimer(t),this.clearExpectedGraceTimer(t),!!e){for(let i of e){let n=this.sectionObjects[i];n&&(n._waitingForChunkDisplay=!1,n.visible=!0)}delete this.waitingChunksToDisplay[t]}}tryRevealPending(){if(this.pendingNearReveal.size===0)return;let t=Date.now();for(let[e,i]of[...this.pendingNearReveal])this.isBlockedByNearer(e,t-i)||this.flushChunkDisplay(e)}onChunkRemovedFromGate(t){this.pendingNearReveal.delete(t),this.clearNearRevealTimer(t),this.clearExpectedGraceTimer(t),delete this.waitingChunksToDisplay[t],this.tryRevealPending()}isWasmGateActive(){return!!this.worldRenderer.worldRendererConfig?.wasmMesher}isBlockedByNearer(t,e){let i=this.worldRenderer.viewerChunkPosition;if(!i)return!1;let n=t.split(",");if(n.length!==2)return!1;let s=Number(n[0]),o=Number(n[1]),a=Math.floor(i.x/16),v=Math.floor(i.z/16),l=(s>>4)-a,c=(o>>4)-v,d=l*l+c*c;if(d===0)return!1;let h=this.worldRenderer.finishedChunks,p=this.worldRenderer.loadedChunks,g=this.worldRenderer.viewDistance;if(e<ee.EXPECTED_NEAR_GRACE_MS&&g>0){let A=g*g,w=Math.min(g,Math.ceil(Math.sqrt(Math.max(0,d-1))));for(let _=-w;_<=w;_++)for(let S=-w;S<=w;S++){let M=_*_+S*S;if(M>=d||M>A)continue;let C=a+_<<4,H=v+S<<4,B=`${C},${H}`;if(B!==t&&!h[B])return!0}return!1}for(let A in p){if(A===t||h[A])continue;let w=A.split(",");if(w.length!==2)continue;let _=(Number(w[0])>>4)-a,S=(Number(w[1])>>4)-v;if(_*_+S*S<d)return!0}return!1}armNearRevealTimer(t){if(this.nearRevealTimers.has(t))return;let e=setTimeout(()=>{this.nearRevealTimers.delete(t),this.pendingNearReveal.has(t)&&(this.flushChunkDisplay(t),this.tryRevealPending())},ee.NEAR_REVEAL_TIMEOUT_MS);this.nearRevealTimers.set(t,e)}clearNearRevealTimer(t){let e=this.nearRevealTimers.get(t);e&&(clearTimeout(e),this.nearRevealTimers.delete(t))}armExpectedGraceTimer(t){if(this.nearRevealGraceTimers.has(t))return;let e=setTimeout(()=>{this.nearRevealGraceTimers.delete(t),this.pendingNearReveal.has(t)&&this.tryRevealPending()},ee.EXPECTED_NEAR_GRACE_MS+50);this.nearRevealGraceTimers.set(t,e)}clearExpectedGraceTimer(t){let e=this.nearRevealGraceTimers.get(t);e&&(clearTimeout(e),this.nearRevealGraceTimers.delete(t))}cleanupSection(t){let e=this.sectionObjects[t];if(e){if(e._waitingForChunkDisplay){let i=t.split(","),n=`${i[0]},${i[2]}`,s=this.waitingChunksToDisplay[n];if(s){let o=s.indexOf(t);o!==-1&&s.splice(o,1),s.length===0&&delete this.waitingChunksToDisplay[n]}}if(e.bannersContainer&&(e.bannersContainer.traverse(i=>{i.bannerTexture&&Q6(i.bannerTexture)}),this.disposeContainer(e.bannersContainer)),e.signsContainer&&this.disposeContainer(e.signsContainer),e.headsContainer&&this.disposeContainer(e.headsContainer),this.worldRenderer.sceneOrigin.removeAndUntrackAll(e),this.scene.remove(e),e.boxHelper){this.worldRenderer.sceneOrigin.removeAndUntrack(e.boxHelper),this.scene.remove(e.boxHelper),e.boxHelper.geometry.dispose();let i=e.boxHelper.material;if(Array.isArray(i))for(let n of i)n.dispose();else i.dispose();e.boxHelper=void 0}delete this.sectionObjects[t]}}releaseSection(t){this.cleanupSection(t);let e=this.activeSections.get(t);return e?(e.mesh.visible=!1,e.inUse=!1,e.sectionKey=void 0,e.lastUsedTime=0,this.clearGeometry(e.mesh.geometry),this.activeSections.delete(t),this.cleanupExcessMeshes(),!0):!1}getSectionObject(t){return this.sectionObjects[t]}updateBoxHelper(t,e,i=this.chunkBoxMaterial){let n=this.sectionObjects[t];if(n?.mesh)if(e){if(!n.boxHelper){let s=new t0.Mesh(new t0.BoxGeometry(16,16,16),i),o=new t0.BoxHelper(s,16776960);o.name="helper";let a=n.worldX??0,v=n.worldY??0,l=n.worldZ??0;this.worldRenderer.sceneOrigin.track(o,{updateMatrix:!0}),o.position.set(a,v,l),o.updateMatrix(),this.scene.add(o),n.boxHelper=o}n.boxHelper.visible=!0}else n.boxHelper&&(n.boxHelper.visible=!1)}updateAllBoxHelpers(t){for(let e of Object.keys(this.sectionObjects))this.updateBoxHelper(e,t)}cleanSignChunkTextures(t,e){this.signHeadsRenderer.cleanChunkTextures(t,e)}getSectionMesh(t){return this.activeSections.get(t)?.mesh}hasSection(t){return this.activeSections.has(t)}updateViewDistance(t){let e=(t*2+1)**2,i=this.worldHeight/16,n=5;if(this.minPoolSize=Math.floor(e*n),this.maxPoolSize=Math.floor(e*i)+1,this.poolSize??(this.poolSize=this.minPoolSize),this.minPoolSize>this.poolSize){let s=Math.min(this.minPoolSize,this.maxPoolSize);this.expandPool(s)}}getStats(){let t=this.meshPool.filter(n=>!n.inUse).length,e=this.hits+this.misses>0?(this.hits/(this.hits+this.misses)*100).toFixed(1):"0",i=this.getEstimatedMemoryUsage();return{poolSize:this.poolSize,activeCount:this.activeSections.size,freeCount:t,hitRate:`${e}%`,hits:this.hits,misses:this.misses,memoryUsage:i}}getTotalTiles(){return Object.values(this.sectionObjects).reduce((t,e)=>t+(e.tilesCount||0),0)}getTotalBlocks(){return Object.values(this.sectionObjects).reduce((t,e)=>t+(e.blocksCount||0),0)}getEstimatedMemoryUsage(){let t=0,e=0,i=0,n=0,s=0,o=0;for(let v of this.meshPool)if(v.inUse&&v.mesh.geometry){let{geometry:l}=v.mesh,c=l.getAttribute("position");if(c){let g=c.array.byteLength;e+=g,t+=g}let d=l.getAttribute("normal");if(d){let g=d.array.byteLength;i+=g,t+=g}let h=l.getAttribute("color");if(h){let g=h.array.byteLength;n+=g,t+=g}let p=l.getAttribute("uv");if(p){let g=p.array.byteLength;s+=g,t+=g}if(l.index){let g=l.index.array.byteLength;o+=g,t+=g}}return{total:`${(t/(1024*1024)).toFixed(2)} MB`,breakdown:{position:`${(e/(1024*1024)).toFixed(2)} MB`,normal:`${(i/(1024*1024)).toFixed(2)} MB`,color:`${(n/(1024*1024)).toFixed(2)} MB`,uv:`${(s/(1024*1024)).toFixed(2)} MB`,index:`${(o/(1024*1024)).toFixed(2)} MB`}}}dispose(){let t=[...this.activeSections.keys()];for(let e of t)this.releaseSection(e);this.signHeadsRenderer.dispose();for(let e of this.meshPool)e.mesh.geometry.dispose();this.meshPool.length=0,this.activeSections.clear(),this.chunkBoxMaterial.dispose(),this.pendingNearReveal.clear();for(let e of this.nearRevealTimers.values())clearTimeout(e);this.nearRevealTimers.clear();for(let e of this.nearRevealGraceTimers.values())clearTimeout(e);this.nearRevealGraceTimers.clear()}acquireMesh(){if(this.bypassPooling){let e={mesh:new t0.Mesh(new t0.BufferGeometry,this.material),inUse:!0,lastUsedTime:performance.now()};return this.meshPool.push(e),this.poolSize++,e}for(let e of this.meshPool)if(!e.inUse)return e.inUse=!0,e.lastUsedTime=performance.now(),this.hits++,e;this.misses++;let t=Math.min(this.poolSize+16,this.maxPoolSize);t<=this.meshPool.length&&(t=this.meshPool.length+8,this.maxPoolSize=t),this.expandPool(t);for(let e=this.meshPool.length-1;e>=0;e--){let i=this.meshPool[e];if(!i.inUse)return i.inUse=!0,i.lastUsedTime=performance.now(),i}throw new Error("ChunkMeshManager: Failed to acquire mesh after pool expansion")}expandPool(t){let e=this.meshPool.length;this.poolSize=t;for(let i=e;i<t;i++){let n=new t0.BufferGeometry,s=new t0.Mesh(n,this.material);s.visible=!1,s.matrixAutoUpdate=!1,s.name="pooled-section-mesh";let o={mesh:s,inUse:!1,lastUsedTime:0};this.meshPool.push(o)}}updateGeometryAttribute(t,e,i,n){let s=t.getAttribute(e);s&&s.count===i.length/n?(s.array.set(i),s.needsUpdate=!0):t.setAttribute(e,new t0.BufferAttribute(i,n))}clearGeometry(t){let e=["position","normal","color","uv"];for(let i of e)t.hasAttribute(i)&&t.deleteAttribute(i);t.index&&t.setIndex(null),t.boundingBox=null,t.boundingSphere=null}cleanupExcessMeshes(){if(this.poolSize>this.maxPoolSize){let t=this.meshPool.filter(e=>!e.inUse).length;if(t>0){let e=Math.min(this.poolSize-this.maxPoolSize,t);for(let i=0;i<e;i++){let n=this.meshPool.findIndex(s=>!s.inUse);n!==-1&&(this.meshPool[n].mesh.geometry.dispose(),this.meshPool.splice(n,1),this.poolSize--)}}}}disposeContainer(t){A0(t,!0)}recordRenderTime(t){this.renderTimes.push(t),this.renderTimes.length>this.maxRenderTimeSamples&&this.renderTimes.shift();let e=performance.now();e-this.lastPerformanceCheck>this.performanceCheckInterval&&(this.checkPerformance(),this.lastPerformanceCheck=e)}getEffectiveRenderDistance(){return this.performanceOverrideDistance||this.worldRenderer.viewDistance}resetPerformanceOverride(){this.performanceOverrideDistance=void 0,this.renderTimes.length=0}getAverageRenderTime(){return this.renderTimes.length===0?0:this.renderTimes.reduce((t,e)=>t+e,0)/this.renderTimes.length}checkPerformance(){if(this.renderTimes.length<this.maxRenderTimeSamples)return;let t=this.getAverageRenderTime(),e=16.67,i=e*1.5;if(t>i){let n=this.worldRenderer.viewDistance,s=Math.max(1,Math.floor(n*.8));(!this.performanceOverrideDistance||s<this.performanceOverrideDistance)&&(this.performanceOverrideDistance=s)}else if(this.performanceOverrideDistance&&t<e*1.1){let n=this.worldRenderer.viewDistance,s=Math.min(n,this.performanceOverrideDistance+1);s!==this.performanceOverrideDistance&&(this.performanceOverrideDistance=s>=n?void 0:s)}}updateSectionsVisibility(){let t=this.worldRenderer.cameraSectionPos;for(let[e,i]of Object.entries(this.sectionObjects)){if(i._waitingForChunkDisplay){i.visible=!1;continue}if(!this.performanceOverrideDistance){i.visible=!0;continue}let[n,s,o]=e.split(",").map(Number),a={x:n/16,y:s/16,z:o/16},v=a.x-t.x,l=a.z-t.z,c=Math.floor(Math.hypot(v,l));i.visible=c<=this.performanceOverrideDistance}}};u(ee,"NEAR_REVEAL_TIMEOUT_MS",5e3),u(ee,"EXPECTED_NEAR_GRACE_MS",1500);var h5=ee,Ji=class{constructor(t){this.worldRendererThree=t;u(this,"chunkTextures",new Map)}dispose(){for(let[,t]of this.chunkTextures)for(let e of Object.keys(t))t[e].dispose();this.chunkTextures.clear()}renderHead(t,e,i,n){let s;if(n.SkullOwner?s=n.SkullOwner.Properties?.textures?.[0]?.Value:s=n.profile?.properties?.find(o=>o.name==="textures")?.value,!!s)try{let a=JSON.parse(L.from(s,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:v}=this.worldRendererThree.worldRendererConfig;v&&(a=a?.replace("http://textures.minecraft.net/",v).replace("https://textures.minecraft.net/",v));let l=St(this.worldRendererThree,a,Ct.head),c=new t0.Group;return i&&l.position.set(0,.3125,.3125),l.position.y-=23/16,c.add(l),this.worldRendererThree.sceneOrigin.track(c),c.position.set(t.x+.5,t.y+.045,t.z+.5),c.rotation.set(0,-t0.MathUtils.degToRad(e*(i?90:45/2)),0),c.scale.set(.8,.8,.8),c}catch{}}renderSign(t,e,i,n,s){let o=this.getSignTexture(t,s,n);if(!o)return;let a=new t0.Mesh(new t0.PlaneGeometry(1,1),new t0.MeshBasicMaterial({map:o,transparent:!0}));a.renderOrder=999;let v=7/16,l=n?1.3:1;a.scale.set(1*l,v*l,1*l);let c=(n?2:1.5)/16,d=.25/16;i&&!n?a.position.set(0,0,-.5+c+d+1e-4):a.position.set(0,0,c/2+1e-4);let h=new t0.Group;h.rotation.set(0,-t0.MathUtils.degToRad(e*(i?90:45/2)),0),h.add(a);let p=(n?10:8)/16,g=(n?0:i?4.333:9.333)/16,b=p/2+g;return this.worldRendererThree.sceneOrigin.track(h),h.position.set(t.x+.5,t.y+b,t.z+.5),h}getSignTexture(t,e,i,n=!1){let s=de(t),o=this.chunkTextures.get(`${s[0]},${s[1]}`);o||(o={},this.chunkTextures.set(`${s[0]},${s[1]}`,o));let a=`${t.x},${t.y},${t.z}`;if(o[a])return o[a];let v=W8(this.worldRendererThree.version),l=I5(e,i,v);if(!l)return;let c=new t0.Texture(l);return c.magFilter=t0.NearestFilter,c.minFilter=t0.NearestFilter,c.needsUpdate=!0,o[a]=c,c}cleanChunkTextures(t,e){let i=`${Math.floor(t/16)},${Math.floor(e/16)}`,n=this.chunkTextures.get(i);if(n)for(let s of Object.keys(n))n[s].dispose(),delete n[s]}};x();R();T();k();x();R();T();k();import*as It from"three";var A1={},J6=!1;function N8(){if(J6)return;let r=globalThis.loadedData?.tints;if(r){for(let t of Object.keys(r))A1[t]=V8(r[t]);J6=!0}}function V8(r){let t={},e=q6(r.default??16777215);if(r.data)for(let i of r.data){let n=q6(i.color);for(let s of i.keys)t[s]=n}return new Proxy(t,{get(i,n){return i[n]??e}})}function q6(r){return[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255]}function Z6(r,t){return N8(),r==="grass_block"?[1,1,1]:r==="redstone_wire"?[1,1,1]:r==="birch_leaves"||r==="spruce_leaves"||r==="lily_pad"?A1.constant?.[r]??[1,1,1]:r.includes("leaves")||r==="vine"?A1.foliage?.[t]??[1,1,1]:["short_grass","tall_grass","fern","large_fern","sugar_cane","grass"].includes(r)?A1.grass?.[t]??[1,1,1]:[1,1,1]}var j8=512,qi=1/20,Zi=class{constructor(t){this.worldRenderer=t;u(this,"particles",[]);u(this,"sharedMaterial");u(this,"enabled",!1);u(this,"tickAccumulator",0);u(this,"nextParticleIndex",0);u(this,"render",t=>{if(!this.enabled)return;for(this.tickAccumulator+=t;this.tickAccumulator>=qi;)this.tickAccumulator-=qi,this.tickPhysics();let e=this.tickAccumulator/qi;this.updateVisuals(e)})}enable(){this.enabled||(this.enabled=!0,this.ensureMaterial())}disable(){this.enabled&&(this.enabled=!1)}dispose(){for(let t of this.particles)t.active&&this.worldRenderer.sceneOrigin.removeAndUntrack(t.mesh),t.mesh.geometry.dispose();this.particles=[],this.sharedMaterial?.dispose(),this.sharedMaterial=void 0,this.nextParticleIndex=0}spawnBlockBreakParticles(t,e,i,n,s,o="plains"){if(!this.enabled)return;let a=this.resolveBlockTexture(n);if(!a)return;let v=Z6(n,o);for(let l=0;l<4;l++)for(let c=0;c<4;c++)for(let d=0;d<4;d++){let h=t+(l+.5)/4,p=e+(c+.5)/4,g=i+(d+.5)/4,b=h-t-.5,A=p-e-.5,w=g-i-.5;b+=(Math.random()*2-1)*.4,A+=(Math.random()*2-1)*.4,w+=(Math.random()*2-1)*.4;let _=(Math.random()+Math.random()+1)*.15,S=Math.sqrt(b*b+A*A+w*w),M=b/S*_*.4,C=A/S*_*.4+.1,H=w/S*_*.4,B=Math.floor(4/(Math.random()*.9+.1));this.createParticle(h,p,g,M,C,H,B,a,s,t,i,1,v)}}tickPhysics(){for(let t of this.particles){if(!t.active)continue;if(t.prevX=t.x,t.prevY=t.y,t.prevZ=t.z,t.age++,t.age>=t.maxAge){this.deactivateParticle(t);continue}t.yd-=.04,t.x+=t.xd,t.y+=t.yd,t.z+=t.zd;let e=this.getFloorY(t);t.y<=e?(t.y=e,t.yd=0,t.onGround=!0):t.onGround=!1,t.xd*=.98,t.yd*=.98,t.zd*=.98,t.onGround&&(t.xd*=.7,t.zd*=.7)}}updateVisuals(t){let e=this.worldRenderer.camera.position;for(let i of this.particles){if(!i.active)continue;let n=i.prevX+(i.x-i.prevX)*t,s=i.prevY+(i.y-i.prevY)*t,o=i.prevZ+(i.z-i.prevZ)*t;i.mesh.position.set(n,s,o),i.mesh.lookAt(e.x,e.y,e.z)}}spawnCrackParticle(t,e,i,n,s,o,a="plains"){if(!this.enabled)return;let v=this.resolveBlockTexture(s);if(!v)return;let l=Z6(s,a),c=t+Math.random()*.8+.1,d=e+Math.random()*.8+.1,h=i+Math.random()*.8+.1;switch(n){case 0:d=e-.1;break;case 1:d=e+1+.1;break;case 2:h=i-.1;break;case 3:h=i+1+.1;break;case 4:c=t-.1;break;case 5:c=t+1+.1;break}let p=(Math.random()*2-1)*.4*.2,g=(Math.random()*2-1)*.4*.2+.1*.2,b=(Math.random()*2-1)*.4*.2,A=Math.floor(4/(Math.random()*.9+.1));this.createParticle(c,d,h,p,g,b,A,v,o,t,i,.6,l)}createParticle(t,e,i,n,s,o,a,v,l,c,d,h=1,p=[1,1,1]){this.ensureMaterial();let g=this.findInactiveParticle();g||(this.particles.length<j8?g=this.allocateParticle():g=this.recycleOldest());let b=Math.floor(Math.random()*4),A=Math.floor(Math.random()*4),w=v.u+b/4*v.su,_=v.v+A/4*v.sv,S=v.su/4,M=v.sv/4;this.setGeometryUVs(g.mesh.geometry,w,_,S,M),g.active=!0,g.x=t,g.y=e,g.z=i,g.prevX=t,g.prevY=e,g.prevZ=i,g.xd=n,g.yd=s,g.zd=o,g.age=0,g.maxAge=a,g.onGround=!1,g.floorMap=l,g.blockX=Math.floor(c),g.blockZ=Math.floor(d);let C=.1*(.5+Math.random()*.5)*2*h;g.mesh.scale.set(C,C,C),g.mesh.position.set(t,e,i),g.mesh.visible=!0;let H=.6*p[0],B=.6*p[1],I=.6*p[2],W=new Float32Array([H,B,I,H,B,I,H,B,I,H,B,I]),z=g.mesh.geometry.getAttribute("color");z?(z.set(W),z.needsUpdate=!0):g.mesh.geometry.setAttribute("color",new It.Float32BufferAttribute(W,3)),this.worldRenderer.sceneOrigin.addAndTrack(g.mesh)}allocateParticle(){let t=new It.PlaneGeometry(1,1),e=new It.Mesh(t,this.sharedMaterial);e.visible=!1;let i={mesh:e,active:!1,x:0,y:0,z:0,prevX:0,prevY:0,prevZ:0,xd:0,yd:0,zd:0,age:0,maxAge:0,onGround:!1,floorMap:[],blockX:0,blockZ:0};return this.particles.push(i),i}findInactiveParticle(){for(let t=0;t<this.particles.length;t++){let e=(this.nextParticleIndex+t)%this.particles.length;if(!this.particles[e].active)return this.nextParticleIndex=(e+1)%this.particles.length,this.particles[e]}}recycleOldest(){let t=this.particles[0];for(let e of this.particles)e.age>t.age&&(t=e);return this.deactivateParticle(t),t}deactivateParticle(t){t.active&&(t.active=!1,t.mesh.visible=!1,this.worldRenderer.sceneOrigin.removeAndUntrack(t.mesh))}getFloorY(t){let e=Math.floor(t.x)-t.blockX,i=Math.floor(t.z)-t.blockZ;return e=Math.max(-2,Math.min(2,e)),i=Math.max(-2,Math.min(2,i)),t.floorMap[(i+2)*5+(e+2)]}resolveBlockTexture(t){let e=this.worldRenderer.resourcesManager.currentResources;if(!e)return null;let i=e.blocksAtlasJson,n=i.textures;if(n[t])return this.extractUV(n[t],i);for(let s of["_side","_top","_front","_0",""]){let o=t+s;if(n[o])return this.extractUV(n[o],i)}for(let s of Object.keys(n))if(s.startsWith(t))return this.extractUV(n[s],i);return null}extractUV(t,e){return{u:t.u,v:t.v,su:t.su??e.suSv,sv:t.sv??e.suSv}}setGeometryUVs(t,e,i,n,s){let o=t.getAttribute("uv");o.setXY(0,e,i),o.setXY(1,e+n,i),o.setXY(2,e,i+s),o.setXY(3,e+n,i+s),o.needsUpdate=!0}ensureMaterial(){if(this.sharedMaterial)return;let t=this.worldRenderer.material.map;t&&(this.sharedMaterial=new It.MeshBasicMaterial({map:t,vertexColors:!0,transparent:!0,alphaTest:.1}))}},X6={id:"blockBreakParticles",controller:Zi,enabledDefault:!0,cannotBeDisabled:!0,requiresHeightmap:!1};x();R();T();k();var Xi=class{constructor(t){this.worldRenderer=t;u(this,"enabled",!1);u(this,"lastBobWalkDist",0);u(this,"lastBobTickTime",0);u(this,"render",()=>{if(!this.enabled)return;let t=this.worldRenderer.displayOptions.inWorldRenderingConfig,{perspective:e}=this.worldRenderer.playerStateReactive;if(t.viewBobbing&&e==="first_person"&&!this.worldRenderer.playerStateUtils.isSpectator()){this.worldRenderer.playerStateReactive.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=performance.now(),this.lastBobWalkDist=this.worldRenderer.playerStateReactive.walkDist);let n=Math.min((performance.now()-this.lastBobTickTime)/50,1);this.worldRenderer.cameraShake.setCameraBobInput({walkDist:this.worldRenderer.playerStateReactive.walkDist,prevWalkDist:this.worldRenderer.playerStateReactive.prevWalkDist,bob:this.worldRenderer.playerStateReactive.bob,prevBob:this.worldRenderer.playerStateReactive.prevBob,partialTick:n})}else this.worldRenderer.cameraShake.setCameraBobInput(null)})}enable(){this.enabled=!0}disable(){this.enabled=!1,this.worldRenderer.cameraShake.setCameraBobInput(null);let{perspective:t}=this.worldRenderer.playerStateReactive;t==="first_person"&&this.worldRenderer.camera.position.set(0,0,0)}dispose(){this.disable()}},$6={id:"cameraBobbing",controller:Xi,enabledDefault:!0,cannotBeDisabled:!0};x();R();T();k();import*as N0 from"three";var $i=2e3,ts=32,es=32,E1=12,is=24,x1=1.2,Y8=-5;var t2=class{constructor(t){this.worldRenderer=t;u(this,"instancedMesh");u(this,"geometry");u(this,"material");u(this,"particles",[]);u(this,"enabled",!1);u(this,"dummy",new N0.Matrix4);u(this,"tempPosition",new N0.Vector3);u(this,"tempQuaternion",new N0.Quaternion);u(this,"tempScale",new N0.Vector3);u(this,"render",t=>{if(!this.enabled||!this.instancedMesh)return;let e=this.worldRenderer.getCameraPosition();this.instancedMesh.position.set(0,0,0);let i=this.worldRenderer.reactiveState.world.heightmaps,{dummy:n,tempPosition:s,tempQuaternion:o,tempScale:a}=this,v=NaN,l=NaN,c;for(let d=0;d<$i;d++){let h=this.particles[d];this.instancedMesh.getMatrixAt(d,n),n.decompose(s,o,a),s.addScaledVector(h.velocity,t);let p=s.y,g=Math.sqrt(s.x*s.x+s.z*s.z),b=e.x+s.x,A=e.y+s.y,w=e.z+s.z,_=Math.floor(b/16),S=Math.floor(w/16);(_!==v||S!==l)&&(c=i.get(`${_},${S}`),v=_,l=S);let M=(Math.floor(b)%16+16)%16,C=(Math.floor(w)%16+16)%16,H=c?.[C*16+M];if(g>ts||H!==void 0&&H!==-32768&&A<=H+1+h.despawnOffset||p<Y8){this.respawnParticle(s);let I=E1+Math.random()*(is-E1);h.velocity.set((Math.random()-.5)*x1,-I,(Math.random()-.5)*x1),h.despawnOffset=Math.random()*.5}n.compose(s,o,a),this.instancedMesh.setMatrixAt(d,n)}this.instancedMesh.instanceMatrix.needsUpdate=!0})}enable(){this.enabled||(this.enabled=!0,this.instancedMesh?this.instancedMesh.visible=!0:this.createRain())}disable(){this.enabled&&(this.enabled=!1,this.instancedMesh&&(this.instancedMesh.visible=!1))}autoEnableCheck(){return this.worldRenderer.worldRendererConfig.isRaining===!0}dispose(){this.instancedMesh&&this.worldRenderer.scene.remove(this.instancedMesh),this.geometry?.dispose(),this.material?.dispose(),this.instancedMesh=void 0,this.geometry=void 0,this.material=void 0,this.particles=[]}createRain(){this.geometry=new N0.BoxGeometry(.03,.3,.03),this.material=new N0.MeshBasicMaterial({color:4482713,transparent:!0,opacity:.6}),this.instancedMesh=new N0.InstancedMesh(this.geometry,this.material,$i),this.instancedMesh.name="rain-particles";let t=new N0.Matrix4,e=new N0.Vector3;for(let i=0;i<$i;i++){this.respawnParticle(e),e.y=Math.random()*es,t.setPosition(e),this.instancedMesh.setMatrixAt(i,t);let n=E1+Math.random()*(is-E1);this.particles.push({velocity:new N0.Vector3((Math.random()-.5)*x1,-n,(Math.random()-.5)*x1),age:0,despawnOffset:Math.random()*.5})}this.instancedMesh.instanceMatrix.needsUpdate=!0,this.worldRenderer.scene.add(this.instancedMesh)}respawnParticle(t){let e=Math.random()*Math.PI*2,i=Math.random()*ts;t.set(Math.cos(e)*i,es,Math.sin(e)*i)}},ns={id:"rain",controller:t2,enabledDefault:!1,requiresHeightmap:!0};x();R();T();k();import*as T0 from"three";var rs=new T0.Color(13/255,234/255,238/255),Q8=9;var K8=350,J8=650;var q8=120,Z8=280,e2=class{constructor(t){this.worldRenderer=t;u(this,"pendingGeometries",new Map);u(this,"revealingSections",new Map);u(this,"finishedChunkCount",0);u(this,"revealTriggered",!1);u(this,"revealStartTime",0);u(this,"enabled",!1);u(this,"onWorldSwitchedCb",null);u(this,"patched",!1);u(this,"initialWaveDone",!1);u(this,"wireframeMaterial");u(this,"wireframeGlowMaterial");u(this,"pulseTime",0);u(this,"revealedChunks",new Set);u(this,"originalFinishChunk",null);u(this,"originalDestroy",null);u(this,"originalSceneAdd",null);u(this,"originalHandleWorkerMessage",null);u(this,"configEnabled",!0);u(this,"render",t=>{this.enabled&&this.update(t*1e3)});this.configEnabled=this.worldRenderer.worldRendererConfig.futuristicReveal===!0,this.wireframeMaterial=new T0.LineBasicMaterial({color:rs,transparent:!0,opacity:1,blending:T0.AdditiveBlending,depthWrite:!1}),this.wireframeGlowMaterial=new T0.LineBasicMaterial({color:rs,transparent:!0,opacity:.55,blending:T0.AdditiveBlending,depthWrite:!1})}enable(){this.configEnabled&&(this.enabled||(this.enabled=!0,this.patchWorldRenderer()))}disable(){this.enabled&&(this.enabled=!1,this.unpatchWorldRenderer(),this.reset())}toggle(){return this.enabled?this.disable():this.enable(),this.enabled}dispose(){this.disable(),this.wireframeMaterial.dispose(),this.wireframeGlowMaterial.dispose()}patchWorldRenderer(){if(this.patched)return;this.patched=!0;let t=this.worldRenderer;this.onWorldSwitchedCb=()=>this.reset(),t.onWorldSwitched.push(this.onWorldSwitchedCb),this.originalFinishChunk=t.finishChunk.bind(t),t.finishChunk=e=>{this.originalFinishChunk(e),this.onChunkFinished(e)},this.originalDestroy=t.destroy.bind(t),t.destroy=()=>{this.dispose(),this.originalDestroy()},this.originalHandleWorkerMessage=t.handleWorkerMessage.bind(t),t.handleWorkerMessage=e=>{this.originalHandleWorkerMessage(e),this.enabled&&e?.type==="geometry"&&Promise.resolve().then(()=>{try{this.registerSection(e.key,e.geometry)}catch{}})},this.originalSceneAdd=t.scene.add.bind(t.scene),t.scene.add=(...e)=>{let i=this.originalSceneAdd(...e);for(let n of e)this.checkAndPatchMesh(n);return i}}unpatchWorldRenderer(){let t=this.worldRenderer;if(this.originalFinishChunk&&(t.finishChunk=this.originalFinishChunk,this.originalFinishChunk=null),this.originalDestroy&&(t.destroy=this.originalDestroy,this.originalDestroy=null),this.originalHandleWorkerMessage&&(t.handleWorkerMessage=this.originalHandleWorkerMessage,this.originalHandleWorkerMessage=null),this.originalSceneAdd&&(t.scene.add=this.originalSceneAdd,this.originalSceneAdd=null),this.onWorldSwitchedCb){let e=t.onWorldSwitched.indexOf(this.onWorldSwitchedCb);e!==-1&&t.onWorldSwitched.splice(e,1),this.onWorldSwitchedCb=null}this.patched=!1}checkAndPatchMesh(t){if(t instanceof T0.Mesh&&t.name==="mesh"){let e=this.findSectionKeyForMesh(t);e&&this.shouldUseRevealEffect(e)&&(t.visible=!1,t.hiddenByReveal=!0)}for(let e of t.children)this.checkAndPatchMesh(e)}findSectionKeyForMesh(t){let e=t;for(;e;){let{sectionKey:p}=e;if(p&&this.worldRenderer.chunkMeshManager.sectionObjects[p]===e)return p;e=e.parent}let i=this.worldRenderer.sceneOrigin.getWorldPosition(t),n=i?.x??this.worldRenderer.sceneOrigin.toWorldX(t.position.x),s=i?.y??this.worldRenderer.sceneOrigin.toWorldY(t.position.y),o=i?.z??this.worldRenderer.sceneOrigin.toWorldZ(t.position.z),a=16,v=this.worldRenderer.getSectionHeight(),l=Math.floor(n/a)*a,c=Math.floor(s/v)*v,d=Math.floor(o/a)*a,h=`${l},${c},${d}`;return this.worldRenderer.chunkMeshManager.sectionObjects[h]?h:null}get scene(){return this.worldRenderer.realScene}getCameraPosition(){return this.worldRenderer.getCameraPosition()}getOriginalMesh(t){let e=this.worldRenderer.chunkMeshManager.sectionObjects[t];return e?e.children.find(i=>i.name==="mesh"):null}onChunkFinished(t){this.finishedChunkCount++,!this.revealTriggered&&this.finishedChunkCount>=Q8&&this.triggerReveal()}registerSection(t,e){this.revealedChunks.has(t)||this.revealingSections.has(t)||(this.revealTriggered?this.startSectionReveal(t,e):this.pendingGeometries.set(t,e))}shouldUseRevealEffect(t){return this.enabled&&!this.revealedChunks.has(t)&&!this.revealingSections.has(t)}triggerReveal(){this.revealTriggered=!0,this.initialWaveDone=!0,this.revealStartTime=performance.now();let t=this.getCameraPosition(),e=[...this.pendingGeometries.entries()];this.pendingGeometries.clear();let i=e.map(([s,o])=>{let a=Math.hypot(o.sx-t.x,o.sy-t.y,o.sz-t.z);return{key:s,geometry:o,distance:a}}).sort((s,o)=>s.distance-o.distance),n=i.at(-1)?.distance||1;for(let{key:s,geometry:o,distance:a}of i){let v=a/n*1500;setTimeout(()=>{!this.revealedChunks.has(s)&&!this.revealingSections.has(s)&&this.startSectionReveal(s,o)},v)}}startSectionReveal(t,e){if(!e.positions?.length||this.revealingSections.has(t)||this.revealedChunks.has(t))return;let i=this.createWireframeGeometry(e),n=this.getOriginalMesh(t);n&&(n.visible=!1,n.hiddenByReveal=!0);let s=new T0.LineSegments(i,this.wireframeMaterial.clone());this.worldRenderer.sceneOrigin.track(s),s.position.set(e.sx,e.sy,e.sz),s.name="scifi-wireframe",s.renderOrder=1e3;let o=new T0.LineSegments(i.clone(),this.wireframeGlowMaterial.clone());this.worldRenderer.sceneOrigin.track(o),o.position.set(e.sx,e.sy,e.sz),o.scale.set(1.02,1.02,1.02),o.name="scifi-glow",o.renderOrder=999;let a=new T0.Group;a.add(s),a.add(o),a.name="scifi-reveal-group",a.sectionKey=t,this.scene.add(a);let v=this.initialWaveDone?q8:K8,l=this.initialWaveDone?Z8:J8,c={key:t,wireframeGroup:a,revealStartTime:performance.now(),phase:"wireframe",originalMeshRef:null,wireframeMs:v,revealMs:l};setTimeout(()=>{let d=this.getOriginalMesh(t);d&&!d.hiddenByReveal&&(d.visible=!1,d.hiddenByReveal=!0)},0),this.revealingSections.set(t,c)}createWireframeGeometry(t){let e=t.positions,i=t.indices,n=[],s=new Set;for(let a=0;a<i.length;a+=3){let v=i[a],l=i[a+1],c=i[a+2];this.addEdge(e,v,l,n,s),this.addEdge(e,l,c,n,s),this.addEdge(e,c,v,n,s)}let o=new T0.BufferGeometry;return o.setAttribute("position",new T0.Float32BufferAttribute(n,3)),o}addEdge(t,e,i,n,s){let o=Math.min(e,i),a=Math.max(e,i),v=`${o}-${a}`;s.has(v)||(s.add(v),n.push(t[e*3],t[e*3+1],t[e*3+2],t[i*3],t[i*3+1],t[i*3+2]))}update(t){if(!this.enabled||this.revealingSections.size===0)return;this.pulseTime+=t*.001;let e=performance.now(),i=.6+.4*Math.sin(this.pulseTime*4),n=[];for(let[s,o]of this.revealingSections){let a=e-o.revealStartTime;if(o.phase==="wireframe"){let v=o.wireframeGroup.children[0],l=o.wireframeGroup.children[1];if(v?.material){let c=v.material;c.opacity=i;let d=.85+.15*Math.sin(this.pulseTime*6+a*.002);c.color.setRGB(13/255*d,234/255*d,238/255*d)}if(l?.material){let c=l.material;c.opacity=i*.4}if(a>o.wireframeMs&&(o.phase="transitioning",o.originalMeshRef=this.getOriginalMesh(s),o.originalMeshRef)){o.originalMeshRef.visible=!0;let c=o.originalMeshRef.material,d=c.clone();d.transparent=!0,d.opacity=0,d.needsUpdate=!0,o.originalMeshRef.originalMaterial=c,o.originalMeshRef.material=d}}else if(o.phase==="transitioning"){let v=a-o.wireframeMs,l=Math.min(1,v/o.revealMs),c=1-(1-l)**3,d=o.wireframeGroup.children[0],h=o.wireframeGroup.children[1];if(d?.material){let p=d.material;p.opacity=1-c}if(h?.material){let p=h.material;p.opacity=(1-c)*.55}if(o.originalMeshRef?.material){let p=o.originalMeshRef.material;p.opacity=c}l>=1&&(o.phase="complete",n.push(o))}}for(let s of n)this.completeReveal(s)}completeReveal(t){if(this.revealingSections.delete(t.key),this.revealedChunks.add(t.key),t.originalMeshRef){let e=t.originalMeshRef.originalMaterial;if(e){let i=t.originalMeshRef.material;t.originalMeshRef.material=e,i.dispose(),delete t.originalMeshRef.originalMaterial}t.originalMeshRef.visible=!0,delete t.originalMeshRef.hiddenByReveal}this.disposeWireframeGroup(t.wireframeGroup)}disposeWireframeGroup(t){this.worldRenderer.sceneOrigin.removeAndUntrackAll(t);let e=[];t.traverse(i=>{e.push(i)});for(let i of e){let n=i;if(n.geometry&&n.geometry.dispose(),n.material){let s=n.material;if(Array.isArray(s))for(let o of s)o.dispose();else s&&typeof s.dispose=="function"&&s.dispose()}}t.clear()}reset(){for(let t of this.revealingSections.values())this.disposeWireframeGroup(t.wireframeGroup);this.pendingGeometries.clear(),this.revealingSections.clear(),this.revealedChunks.clear(),this.finishedChunkCount=0,this.revealTriggered=!1,this.revealStartTime=0,this.pulseTime=0}forceCompleteAll(){let t=[...this.revealingSections.values()];for(let e of t){if(e.originalMeshRef||(e.originalMeshRef=this.getOriginalMesh(e.key)),e.originalMeshRef){let i=e.originalMeshRef.originalMaterial;i&&(e.originalMeshRef.material=i),e.originalMeshRef.visible=!0}this.completeReveal(e)}}debugGetWireframeGroups(){let t=[];return this.scene.traverse(e=>{e.name==="scifi-reveal-group"&&t.push(e)}),t}debugForceCleanup(){let t=this.debugGetWireframeGroups();for(let e of t)this.disposeWireframeGroup(e);for(let e of this.revealingSections.values())this.disposeWireframeGroup(e.wireframeGroup);this.revealingSections.clear()}debugStatus(){let t=this.debugGetWireframeGroups(),e=new Set(this.revealingSections.keys()),i=t.filter(n=>!e.has(n.sectionKey));return{revealTriggered:this.revealTriggered,finishedChunkCount:this.finishedChunkCount,pendingGeometries:this.pendingGeometries.size,revealingSections:this.revealingSections.size,revealedChunks:this.revealedChunks.size,wireframeGroupsInScene:t.length,orphanedWireframeGroups:i.length,orphanedKeys:i.map(n=>n.sectionKey),sections:[...this.revealingSections.entries()].map(([n,s])=>({key:n,phase:s.phase,hasOriginalMesh:!!s.originalMeshRef,wireframeInScene:s.wireframeGroup.parent!==null}))}}debugLog(){}},ss={id:"futuristicReveal",controller:e2,enabledDefault:!0};x();R();T();k();import*as E0 from"three";var X8=parseInt(E0.REVISION.replaceAll(/\D+/g,""),10),i2=class extends E0.ShaderMaterial{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:`
21216
+ `,W0={textureSize:128,gravity:new r0.Vector3(0,-.005,0),friction:.998,defaultParticleSize:300,maxActiveFireworks:5},d5=r=>{let e=r*3;return{x:e,y:e+1,z:e+2}},u5=r=>{let e=r*4;return{r:e,g:e+1,b:e+2,a:e+3}},te=(r=0,t=0)=>Math.floor(Math.random()*(r+1-t))+t,C8=(r,t,e,i)=>{r.save();let n=r.createRadialGradient(t,t,0,t,t,t);n.addColorStop(0,"rgba(255,255,255,1.0)"),n.addColorStop(.5,"rgba(255,255,255,0.5)"),n.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=n,r.fillRect(0,0,e,i),r.restore()},P8=()=>{let r=W0.textureSize,t=L0(r,r),e=t.getContext("2d"),i=r/2;C8(e,i,t.width,t.height);let n=new r0.Texture(t);return n.needsUpdate=!0,n},B8=(r,t,e,i,n=W0.defaultParticleSize)=>{let s=new r0.BufferGeometry,o=[],a=[],v=[],l=[],c=[],d=Math.random()>.3?"single":"multiple",h=te(100,20)*.01,p=()=>te(100,1)*.01,g="red",b=Math.random();b>.66?g="red":b>.33?g="green":g="blue";for(let w=0;w<r;w++){let _=new r0.Vector3(0,0,0);if(o.push(_.x,_.y,_.z),a.push(t[w].x,t[w].y,t[w].z),e==="seed"){let S=t[w].y**2*.04;w===0&&(S*=1.1),l.push(S),c.push(S*.017),v.push(1,1,1,1)}else if(e==="trail"){let S=Math.random()*.1+.1;l.push(S),c.push(S*.017),v.push(1,1,1,1)}else{let S=te(n,10)*.001;if(l.push(S),c.push(S*.017),d==="multiple")v.push(p(),p(),p(),1);else switch(g){case"red":v.push(h,.1,.1,1);break;case"green":v.push(.1,h,.1,1);break;case"blue":v.push(.1,.1,h,1);break}}}s.setAttribute("position",new r0.Float32BufferAttribute(o,3)),s.setAttribute("velocity",new r0.Float32BufferAttribute(a,3)),s.setAttribute("color",new r0.Float32BufferAttribute(v,4)),s.setAttribute("adjustSize",new r0.Float32BufferAttribute(l,1)),s.setAttribute("mass",new r0.Float32BufferAttribute(c,1));let A=new r0.RawShaderMaterial({uniforms:{size:{value:W0.textureSize},texture:{value:i}},transparent:!0,depthWrite:!1,blending:r0.AdditiveBlending,vertexShader:M8,fragmentShader:S8});return new r0.Points(s,A)},f5=class{constructor(t,e,i,n,s){u(this,"particleNum");u(this,"timerStartFading");u(this,"mesh");this.particleNum=t,this.timerStartFading=10,this.mesh=B8(t,e,i,n,s)}update(t){this.timerStartFading>0&&(this.timerStartFading-=.3);let e=this.mesh.geometry.attributes.position,i=this.mesh.geometry.attributes.velocity,n=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.5?.98:.96,a=v=>Math.random()>.5?0:(1-v)*.1;for(let v=0;v<this.particleNum;v++){let{x:l,y:c,z:d}=d5(v);i.array[c]+=t.y-s.array[v],i.array[l]*=W0.friction,i.array[d]*=W0.friction,i.array[c]*=W0.friction,e.array[l]+=i.array[l],e.array[c]+=i.array[c],e.array[d]+=i.array[d];let{a:h}=u5(v);this.timerStartFading<=0&&(n.array[h]*=o()-a(n.array[h]),n.array[h]<.001&&(n.array[h]=0))}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}disposeAll(){this.mesh.geometry.dispose(),this.mesh.material.dispose()}},ji=class extends f5{constructor(t,e,i){super(t,e,"seed",i)}update(t){let e=this.mesh.geometry.attributes.position,i=this.mesh.geometry.attributes.velocity,n=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.3?.99:.96,a=d=>Math.random()>.3?0:(1-d)*.1,v=()=>Math.random()>.5?.05:-.05,l=()=>Math.random()>.1,c=W0.friction*.98;for(let d=0;d<this.particleNum;d++){let{x:h,y:p,z:g}=d5(d);i.array[p]+=t.y-s.array[d],i.array[h]*=c,i.array[g]*=c,i.array[p]*=c,e.array[h]+=i.array[h],e.array[p]+=i.array[p],e.array[g]+=i.array[g],l()&&(e.array[h]+=v()),l()&&(e.array[g]+=v());let{a:b}=u5(d);n.array[b]*=o()-a(n.array[b]),n.array[b]<.001&&(n.array[b]=0)}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},Yi=class extends f5{constructor(t,e,i){super(t,e,"trail",i)}update(t){let e=this.mesh.geometry.attributes.position,i=this.mesh.geometry.attributes.velocity,n=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.3?.98:.95,a=()=>Math.random()>.5?.05:-.05,v=()=>Math.random()>.2;for(let l=0;l<this.particleNum;l++){let{x:c,y:d,z:h}=d5(l);i.array[d]+=t.y-s.array[l],i.array[c]*=W0.friction,i.array[h]*=W0.friction,i.array[d]*=W0.friction,e.array[c]+=i.array[c],e.array[d]+=i.array[d],e.array[h]+=i.array[h],v()&&(e.array[c]+=a()),v()&&(e.array[h]+=a());let{a:p}=u5(l);n.array[p]*=o(),n.array[p]<.001&&(n.array[p]=0)}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},h5=class{constructor(t,e=W0.defaultParticleSize,i){u(this,"meshGroup");u(this,"isExplode");u(this,"petalsNum");u(this,"life");u(this,"seed");u(this,"flowerSizeRate");u(this,"flower");u(this,"texture");u(this,"particleSize");this.meshGroup=new r0.Group,this.isExplode=!1,this.texture=t,this.particleSize=e;let n=400,s=150;this.petalsNum=te(n,s),this.life=150,this.seed=this.getSeed(i),this.meshGroup.add(this.seed.mesh),this.flowerSizeRate=r0.MathUtils.mapLinear(this.petalsNum,s,n,.4,.7)}getSeed(t){let i=[];for(let s=0;s<40;s++){let a=s===0?Math.random()*2.5+.9:Math.random()*2+.4,v=0;i.push(new r0.Vector3(0,a,v))}let n=new ji(40,i,this.texture);if(t)n.mesh.position.set(0,0,0);else{let s=Math.random()*80-40,o=-50,a=Math.random()*80-40;n.mesh.position.set(s,o,a)}return n}explode(t){this.isExplode=!0,this.flower=this.getFlower(t),this.meshGroup.add(this.flower.mesh),this.meshGroup.remove(this.seed.mesh),this.seed.disposeAll()}getFlower(t){let e=this.petalsNum,i=[],n;if(Math.random()>.5)for(let a=0;a<e;a++){n=te(120,60)*.01;let v=r0.MathUtils.degToRad(Math.random()*180),l=r0.MathUtils.degToRad(Math.random()*360),c=Math.sin(v)*Math.cos(l)*n,d=Math.sin(v)*Math.sin(l)*n,h=Math.cos(v)*n,p=new r0.Vector3(c,d,h);p.multiplyScalar(this.flowerSizeRate),i.push(p)}else{let a=180/e,v=360*(Math.random()*20+1)/e,l=v,c=v;n=te(120,60)*.01;for(let d=0;d<e;d++){let h=Math.sin(r0.MathUtils.degToRad(a*d)),p=Math.cos(r0.MathUtils.degToRad(a*d))*n,g=Math.cos(r0.MathUtils.degToRad(l*d))*h*n,b=Math.sin(r0.MathUtils.degToRad(c*d))*h*n,A=new r0.Vector3(g,b,p);A.multiplyScalar(this.flowerSizeRate),i.push(A)}}let o=new f5(e,i,"default",this.texture,this.particleSize);return o.mesh.position.set(t.x,t.y,t.z),o}update(t){this.isExplode?(this.flower.update(t),this.life>0&&(this.life-=1)):this.drawTail()}drawTail(){this.seed.update(W0.gravity);let t=this.seed.mesh.geometry.attributes.position,e=this.seed.mesh.geometry.attributes.velocity,i=0;for(let d=0,h=e.array.length;d<h;d++){let p=e.array[d];d%3===1&&p>0&&i++}if(!(i===0))return;let{x:s,y:o,z:a}=this.seed.mesh.position,v=new r0.Vector3(s,o,a),l=0,c;for(let d=0,h=t.array.length;d<h;d++){let p=t.array[d];d%3===1&&p>l&&(l=p,c=new r0.Vector3(t.array[d-1],p,t.array[d+2]))}c&&(v.add(c),this.explode(v))}},Te=class extends h5{constructor(e,i=W0.defaultParticleSize,n){super(e,i,n);u(this,"tailMeshGroup");u(this,"tails");let s=150,o=100;this.petalsNum=te(s,o),this.flowerSizeRate=r0.MathUtils.mapLinear(this.petalsNum,o,s,.4,.7),this.tailMeshGroup=new r0.Group,this.tails=[]}explode(e){this.isExplode=!0,this.flower=this.getFlower(e),this.tails=this.getTail(),this.meshGroup.add(this.flower.mesh),this.meshGroup.add(this.tailMeshGroup)}getTail(){let e=[],n=this.flower.mesh.geometry.attributes.color;for(let s=0;s<this.petalsNum;s++){let o=[];for(let C=0;C<20;C++)o.push(new r0.Vector3(0,0,0));let a=new Yi(20,o,this.texture),{r:v,g:l,b:c,a:d}=u5(s),h=n.array[v],p=n.array[l],g=n.array[c],b=n.array[d],A=a.mesh.geometry.attributes.position,w=a.mesh.geometry.attributes.color;for(let C=0;C<A.count;C++){let H=u5(C);w.array[H.r]=h,w.array[H.g]=p,w.array[H.b]=g,w.array[H.a]=b}let{x:_,y:S,z:M}=this.flower.mesh.position;a.mesh.position.set(_,S,M),e.push(a),this.tailMeshGroup.add(a.mesh)}return e}update(e){if(this.isExplode){this.flower.update(e);let i=this.flower.mesh.geometry.attributes.position;for(let n=0,s=this.tails.length;n<s;n++){let o=this.tails[n];o.update(e);let{x:a,y:v,z:l}=d5(n),c=new r0.Vector3(i.array[a],i.array[v],i.array[l]),d=o.mesh.geometry.attributes.position,h=o.mesh.geometry.attributes.velocity;for(let p=0;p<d.count;p++){let g=d5(p),b=new r0.Vector3,A=new r0.Vector3(d.array[g.x],d.array[g.y],d.array[g.z]),w=new r0.Vector3(h.array[g.x],h.array[g.y],h.array[g.z]);b.subVectors(c,A);let _=b.sub(w);_.normalize(),_.multiplyScalar(Math.random()*3e-4*this.life),h.array[g.x]+=_.x,h.array[g.y]+=_.y,h.array[g.z]+=_.z}h.needsUpdate=!0}this.life>0&&(this.life-=1.2)}else this.drawTail()}},y1=class{constructor(t,e,i){u(this,"fireworksInstances");u(this,"scene");u(this,"sceneOrigin");u(this,"texture");u(this,"particleSize");u(this,"maxFireworks");this.fireworksInstances=[],this.scene=t,this.sceneOrigin=e,this.texture=P8(),this.particleSize=i?.defaultParticleSize??W0.defaultParticleSize,this.maxFireworks=i?.maxActiveFireworks??W0.maxActiveFireworks}launchFirework(t){if(this.fireworksInstances.length>=this.maxFireworks)return;let e=t?.particleSize??this.particleSize,i=t?.position,n;t?.forceRich?n=new Te(this.texture,e,i):t?.forceBasic?n=new h5(this.texture,e,i):n=Math.random()>.5?new h5(this.texture,e,i):new Te(this.texture,e,i),this.fireworksInstances.push(n),i?(this.sceneOrigin.addAndTrack(n.meshGroup),n.meshGroup.position.set(i.x,i.y,i.z)):this.scene.add(n.meshGroup)}repositionAll(){}update(){let t=[];for(let e=this.fireworksInstances.length-1;e>=0;e--){let i=this.fireworksInstances[e];i.update(W0.gravity),i.isExplode&&t.push(e)}for(let e=0,i=t.length;e<i;e++){let n=t[e],s=this.fireworksInstances[n];if(s&&(s.meshGroup.remove(s.seed.mesh),s.seed.disposeAll(),s.life<=0)){if(this.sceneOrigin.removeAndUntrack(s.meshGroup),s instanceof Te&&s.tailMeshGroup)for(let o of s.tails)o.disposeAll();s.flower?.disposeAll(),this.fireworksInstances.splice(n,1)}}}clear(){for(let t of this.fireworksInstances)if(this.sceneOrigin.removeAndUntrack(t.meshGroup),t.seed.disposeAll(),t.flower&&t.flower.disposeAll(),t instanceof Te)for(let e of t.tails)e.disposeAll();this.fireworksInstances=[]}dispose(){this.clear(),this.texture.dispose()}};x();R();T();k();var D6=Symbol("tracked-proxy"),I8=new Set(["add","addScalar","addScaledVector","addVectors","sub","subScalar","subVectors","multiply","multiplyScalar","multiplyVectors","divide","divideScalar","applyEuler","applyAxisAngle","applyMatrix3","applyMatrix4","applyNormalMatrix","applyQuaternion","negate","floor","ceil","round","roundToZero","min","max","clamp","clampLength","clampScalar","project","unproject","reflect","lerp","lerpVectors","cross","crossVectors","setFromMatrixPosition","setFromMatrixColumn","setFromMatrix3Column","setFromEuler","setFromSpherical","setFromSphericalCoords","setFromCylindrical","fromArray","fromBufferAttribute","setComponent","randomDirection","random"]),w1=class{constructor(t){u(this,"scene");u(this,"_x",0);u(this,"_y",0);u(this,"_z",0);u(this,"_tracked",new Set);u(this,"_worldCoords",new WeakMap);u(this,"_originalPositions",new WeakMap);u(this,"_trackOptions",new WeakMap);this.scene=t}get x(){return this._x}get y(){return this._y}get z(){return this._z}update(t,e,i){this._x=t,this._y=e,this._z=i;for(let n of this._tracked){let s=this._worldCoords.get(n);this._originalPositions.get(n).set(s.x-t,s.y-e,s.z-i),this._trackOptions.get(n)?.updateMatrix&&n.updateMatrix()}}track(t,e){let i=this._originalPositions.get(t)??t.position,n={x:0,y:0,z:0};this._originalPositions.set(t,i),this._worldCoords.set(t,n),e?this._trackOptions.set(t,e):this._trackOptions.delete(t);let s=this,o=e,a=new Proxy(i,{get(v,l,c){if(l===D6)return n;if(l==="set")return(h,p,g)=>(n.x=h,n.y=p,n.z=g,v.set(h-s._x,p-s._y,g-s._z),o?.updateMatrix&&t.updateMatrix(),c);if(l==="copy")return h=>{let p=h[D6],g=p?p.x:h.x,b=p?p.y:h.y,A=p?p.z:h.z;return n.x=g,n.y=b,n.z=A,v.set(g-s._x,b-s._y,A-s._z),o?.updateMatrix&&t.updateMatrix(),c};if(l==="setX")return h=>(n.x=h,v.x=h-s._x,o?.updateMatrix&&t.updateMatrix(),c);if(l==="setY")return h=>(n.y=h,v.y=h-s._y,o?.updateMatrix&&t.updateMatrix(),c);if(l==="setZ")return h=>(n.z=h,v.z=h-s._z,o?.updateMatrix&&t.updateMatrix(),c);if(typeof l=="string"&&I8.has(l))return()=>{throw new Error(`Cannot call position.${l}() on a tracked object. Use position.set(x, y, z) instead.`)};let d=v[l];return typeof d=="function"?d.bind(v):d},set(v,l,c){return l==="x"?(n.x=c,v.x=c-s._x,o?.updateMatrix&&t.updateMatrix(),!0):l==="y"?(n.y=c,v.y=c-s._y,o?.updateMatrix&&t.updateMatrix(),!0):l==="z"?(n.z=c,v.z=c-s._z,o?.updateMatrix&&t.updateMatrix(),!0):(v[l]=c,!0)}});Object.defineProperty(t,"position",{value:a,configurable:!0,enumerable:!0}),this._tracked.add(t)}untrack(t){let e=this._originalPositions.get(t);e&&(Object.defineProperty(t,"position",{value:e,configurable:!0,enumerable:!0}),this._tracked.delete(t),this._worldCoords.delete(t),this._originalPositions.delete(t),this._trackOptions.delete(t))}addAndTrack(t,e){this.track(t,e),this.scene.add(t)}removeAndUntrack(t){this.untrack(t),t.removeFromParent()}removeAndUntrackAll(t){t.traverse(e=>{this.untrack(e)}),t.removeFromParent()}getWorldPosition(t){let e=this._worldCoords.get(t);return e?{x:e.x,y:e.y,z:e.z}:void 0}clear(){for(let t of this._tracked)this.untrack(t)}get trackedCount(){return this._tracked.size}toSceneX(t){return t-this._x}toSceneY(t){return t-this._y}toSceneZ(t){return t-this._z}toWorldX(t){return t+this._x}toWorldY(t){return t+this._y}toWorldZ(t){return t+this._z}};Ki();x();R();T();k();import W8 from"prismarine-chat";import*as t0 from"three";import*as A1 from"prismarine-nbt";import{Vec3 as Ji}from"vec3";x();R();T();k();import*as Q0 from"three";var N6=20,V6=40,D8={white_banner:15,orange_banner:14,magenta_banner:13,light_blue_banner:12,yellow_banner:11,lime_banner:10,pink_banner:9,gray_banner:8,light_gray_banner:7,cyan_banner:6,purple_banner:5,blue_banner:4,brown_banner:3,green_banner:2,red_banner:1,black_banner:0},j6={0:"#1d1d21",1:"#b02e26",2:"#5e7c16",3:"#835432",4:"#3c44aa",5:"#8932b8",6:"#169c9c",7:"#9d9d97",8:"#474f52",9:"#f38baa",10:"#80c71f",11:"#fed83d",12:"#3ab3da",13:"#c74ebd",14:"#f9801d",15:"#f9fffe"};function L8(r){let t=r.replace("_wall_banner","_banner");return D8[t]??15}var F8=(r,t,e,i,n,s,o)=>{switch(r.fillStyle=e,t){case"bs":r.fillRect(i,n,s,o);break;case"ls":r.fillRect(i,n,s/3,o);break;case"rs":r.fillRect(i+s*2/3,n,s/3,o);break;case"ts":r.fillRect(i,n,s,o/3);break;case"ms":r.fillRect(i,n+o/3,s,o/3);break;case"drs":r.fillRect(i,n,s/2,o/2);break;case"dls":r.fillRect(i+s/2,n,s/2,o/2);break;case"ss":for(let a=0;a<s;a+=2)r.fillRect(i+a,n,1,o);break;case"cr":r.fillRect(i,n+o/3,s,o/3),r.fillRect(i+s/3,n,s/3,o);break;case"sc":r.fillRect(i,n+o/2-1,s,2),r.fillRect(i+s/2-1,n,2,o);break;default:r.fillRect(i,n,s,o)}};function U8(r,t){if(!t||t.length===0)return`banner_${r}_empty`;let e=t.map(i=>`${i.Pattern??"bs"}_${i.Color??0}`).join(",");return`banner_${r}_${e}`}var G8=(r,t,e=(i,n)=>L0(i,n))=>{let n=e(N6*1,V6*1),s=n.getContext("2d");if(s){if(s.imageSmoothingEnabled=!1,t?.Patterns&&t.Patterns.length>0)for(let o of t.Patterns){let a=o.Color??0,v=o.Pattern??"bs",l=j6[a]||j6[0];F8(s,v,l,0,0,N6*1,V6*1)}return n}},_1=new Map;function Y6(r,t,e){let i=L8(t),n=U8(i,e?.Patterns),s=_1.get(n);if(s)return s.refCount++,s.texture;let o=G8(i,e);if(!o)return;let a=new Q0.Texture(o);return a.magFilter=Q0.NearestFilter,a.minFilter=Q0.NearestFilter,a.needsUpdate=!0,_1.set(n,{texture:a,refCount:1}),a}function Q6(r){for(let[t,e]of _1.entries())if(e.texture===r){e.refCount--,e.refCount<=0&&(e.texture.dispose(),_1.delete(t));return}}function K6(r,t,e,i){let a,v,l;e?(a=(-14.6+13.4)/2/16-.5,v=1-14.75/16-.5,l=1/2):(a=(1.4+29.4)/2/16,v=1-7.25/16-.5,l=0);let c=new Q0.Mesh(new Q0.PlaneGeometry(.85,1.75),new Q0.MeshBasicMaterial({map:i,transparent:!0}));c.renderOrder=999;let d=.5/16,h=.25/16;e?c.position.set(0,a,v+h+.004):c.position.set(0,a,v+d/2+.004);let p=new Q0.Group;return p.rotation.set(0,-Q0.MathUtils.degToRad(t*(e?90:45/2)),0),p.add(c),p.bannerTexture=i,p.position.set(r.x+.5,r.y+l,r.z+.5),p}var ee=class ee{constructor(t,e,i,n,s=3){this.worldRenderer=t;this.scene=e;this.material=i;this.worldHeight=n;u(this,"meshPool",[]);u(this,"activeSections",new Map);u(this,"sectionObjects",{});u(this,"waitingChunksToDisplay",{});u(this,"pendingNearReveal",new Map);u(this,"nearRevealTimers",new Map);u(this,"nearRevealGraceTimers",new Map);u(this,"poolSize");u(this,"maxPoolSize");u(this,"minPoolSize");u(this,"signHeadsRenderer");u(this,"chunkBoxMaterial",new t0.MeshBasicMaterial({color:0,transparent:!0,opacity:0}));u(this,"hits",0);u(this,"misses",0);u(this,"bypassPooling",!1);u(this,"renderTimes",[]);u(this,"maxRenderTimeSamples",30);u(this,"_performanceOverrideDistance");u(this,"lastPerformanceCheck",0);u(this,"performanceCheckInterval",2e3);this.updateViewDistance(s),this.signHeadsRenderer=new qi(t),this.initializePool()}get performanceOverrideDistance(){return this._performanceOverrideDistance??0}set performanceOverrideDistance(t){this._performanceOverrideDistance=t,this.updateSectionsVisibility()}initializePool(){for(let t=0;t<this.poolSize;t++){let e=new t0.BufferGeometry,i=new t0.Mesh(e,this.material);i.visible=!1,i.matrixAutoUpdate=!1,i.name="pooled-section-mesh";let n={mesh:i,inUse:!1,lastUsedTime:0};this.meshPool.push(n)}}updateSection(t,e){let i=this.sectionObjects[t];i&&this.cleanupSection(t);let n=this.activeSections.get(t);if(!n){if(n=this.acquireMesh(),!n)return null;this.activeSections.set(t,n),n.sectionKey=t}let{mesh:s}=n;this.updateGeometryAttribute(s.geometry,"position",e.positions,3),this.updateGeometryAttribute(s.geometry,"normal",e.normals,3),this.updateGeometryAttribute(s.geometry,"color",e.colors,3),this.updateGeometryAttribute(s.geometry,"uv",e.uvs,2),s.geometry.index=new t0.BufferAttribute(e.indices,1),s.geometry.boundingBox=new t0.Box3(new t0.Vector3(-8,-8,-8),new t0.Vector3(8,8,8)),s.geometry.boundingSphere=new t0.Sphere(new t0.Vector3(0,0,0),Math.sqrt(3*8**2)),this.worldRenderer.sceneOrigin.track(s,{updateMatrix:!0}),s.position.set(e.sx,e.sy,e.sz),s.updateMatrix(),s.visible=!0,s.name="mesh",n.lastUsedTime=performance.now(),i=new t0.Group,i.add(s),i.mesh=s,i.tilesCount=e.positions.length/3/4,i.blocksCount=e.blocksCount,i.worldX=e.sx,i.worldY=e.sy,i.worldZ=e.sz,i.sectionKey=t,i.name="chunk";try{if(Object.keys(e.signs).length>0){let c=new t0.Group;c.name="signs";for(let[d,{isWall:h,isHanging:p,rotation:g}]of Object.entries(e.signs)){let b=this.worldRenderer.blockEntities[d];if(!b)continue;let[A,w,_]=d.split(","),S=this.signHeadsRenderer.renderSign(new Ji(+A,+w,+_),g,h,p,A1.simplify(b));S&&c.add(S)}i.add(c),i.signsContainer=c}if(Object.keys(e.heads).length>0){let c=new t0.Group;c.name="heads";for(let[d,{isWall:h,rotation:p}]of Object.entries(e.heads)){let g=this.worldRenderer.blockEntities[d];if(!g)continue;let[b,A,w]=d.split(","),_=this.signHeadsRenderer.renderHead(new Ji(+b,+A,+w),p,h,A1.simplify(g));_&&c.add(_)}i.add(c),i.headsContainer=c}if(Object.keys(e.banners).length>0){let c=new t0.Group;c.name="banners",i.bannersContainer=c,i.add(c);for(let[d,{isWall:h,rotation:p,blockName:g}]of Object.entries(e.banners)){let b=this.worldRenderer.blockEntities[d];if(!b)continue;let[A,w,_]=d.split(","),S=Y6(this.worldRenderer,g,A1.simplify(b));if(!S)continue;let M=K6(new Ji(+A,+w,+_),p,h,S),{x:C,y:H,z:B}=M.position;this.worldRenderer.sceneOrigin.track(M),M.position.set(C,H,B),c.add(M)}}}catch{}this.sectionObjects[t]=i,this.scene.add(i),i.matrixAutoUpdate=!1,this.worldRenderer.displayOptions?.inWorldRenderingConfig?.showChunkBorders&&this.updateBoxHelper(t,!0);let o=t.split(","),a=`${o[0]},${o[2]}`,v=!!this.worldRenderer.displayOptions?.inWorldRenderingConfig?._renderByChunks,l=!!this.worldRenderer.worldRendererConfig?.wasmMesher;if((v||l)&&!this.worldRenderer.finishedChunks[a]){i.visible=!1,i._waitingForChunkDisplay=!0;let c=this.waitingChunksToDisplay[a]??(this.waitingChunksToDisplay[a]=[]);c.includes(t)||c.push(t)}return i}finishChunkDisplay(t){if(!this.waitingChunksToDisplay[t]){this.tryRevealPending();return}if(this.isWasmGateActive()&&this.isBlockedByNearer(t,0)){this.pendingNearReveal.set(t,Date.now()),this.armNearRevealTimer(t),this.armExpectedGraceTimer(t);return}this.flushChunkDisplay(t),this.tryRevealPending()}flushChunkDisplay(t){let e=this.waitingChunksToDisplay[t];if(this.pendingNearReveal.delete(t),this.clearNearRevealTimer(t),this.clearExpectedGraceTimer(t),!!e){for(let i of e){let n=this.sectionObjects[i];n&&(n._waitingForChunkDisplay=!1,n.visible=!0)}delete this.waitingChunksToDisplay[t]}}tryRevealPending(){if(this.pendingNearReveal.size===0)return;let t=Date.now();for(let[e,i]of[...this.pendingNearReveal])this.isBlockedByNearer(e,t-i)||this.flushChunkDisplay(e)}onChunkRemovedFromGate(t){this.pendingNearReveal.delete(t),this.clearNearRevealTimer(t),this.clearExpectedGraceTimer(t),delete this.waitingChunksToDisplay[t],this.tryRevealPending()}isWasmGateActive(){return!!this.worldRenderer.worldRendererConfig?.wasmMesher}isBlockedByNearer(t,e){let i=this.worldRenderer.viewerChunkPosition;if(!i)return!1;let n=t.split(",");if(n.length!==2)return!1;let s=Number(n[0]),o=Number(n[1]),a=Math.floor(i.x/16),v=Math.floor(i.z/16),l=(s>>4)-a,c=(o>>4)-v,d=l*l+c*c;if(d===0)return!1;let h=this.worldRenderer.finishedChunks,p=this.worldRenderer.loadedChunks,g=this.worldRenderer.viewDistance;if(e<ee.EXPECTED_NEAR_GRACE_MS&&g>0){let A=g*g,w=Math.min(g,Math.ceil(Math.sqrt(Math.max(0,d-1))));for(let _=-w;_<=w;_++)for(let S=-w;S<=w;S++){let M=_*_+S*S;if(M>=d||M>A)continue;let C=a+_<<4,H=v+S<<4,B=`${C},${H}`;if(B!==t&&!h[B])return!0}return!1}for(let A in p){if(A===t||h[A])continue;let w=A.split(",");if(w.length!==2)continue;let _=(Number(w[0])>>4)-a,S=(Number(w[1])>>4)-v;if(_*_+S*S<d)return!0}return!1}armNearRevealTimer(t){if(this.nearRevealTimers.has(t))return;let e=setTimeout(()=>{this.nearRevealTimers.delete(t),this.pendingNearReveal.has(t)&&(this.flushChunkDisplay(t),this.tryRevealPending())},ee.NEAR_REVEAL_TIMEOUT_MS);this.nearRevealTimers.set(t,e)}clearNearRevealTimer(t){let e=this.nearRevealTimers.get(t);e&&(clearTimeout(e),this.nearRevealTimers.delete(t))}armExpectedGraceTimer(t){if(this.nearRevealGraceTimers.has(t))return;let e=setTimeout(()=>{this.nearRevealGraceTimers.delete(t),this.pendingNearReveal.has(t)&&this.tryRevealPending()},ee.EXPECTED_NEAR_GRACE_MS+50);this.nearRevealGraceTimers.set(t,e)}clearExpectedGraceTimer(t){let e=this.nearRevealGraceTimers.get(t);e&&(clearTimeout(e),this.nearRevealGraceTimers.delete(t))}cleanupSection(t){let e=this.sectionObjects[t];if(e){if(e._waitingForChunkDisplay){let i=t.split(","),n=`${i[0]},${i[2]}`,s=this.waitingChunksToDisplay[n];if(s){let o=s.indexOf(t);o!==-1&&s.splice(o,1),s.length===0&&delete this.waitingChunksToDisplay[n]}}if(e.bannersContainer&&(e.bannersContainer.traverse(i=>{i.bannerTexture&&Q6(i.bannerTexture)}),this.disposeContainer(e.bannersContainer)),e.signsContainer&&this.disposeContainer(e.signsContainer),e.headsContainer&&this.disposeContainer(e.headsContainer),this.worldRenderer.sceneOrigin.removeAndUntrackAll(e),this.scene.remove(e),e.boxHelper){this.worldRenderer.sceneOrigin.removeAndUntrack(e.boxHelper),this.scene.remove(e.boxHelper),e.boxHelper.geometry.dispose();let i=e.boxHelper.material;if(Array.isArray(i))for(let n of i)n.dispose();else i.dispose();e.boxHelper=void 0}delete this.sectionObjects[t]}}releaseSection(t){this.cleanupSection(t);let e=this.activeSections.get(t);return e?(e.mesh.visible=!1,e.inUse=!1,e.sectionKey=void 0,e.lastUsedTime=0,this.clearGeometry(e.mesh.geometry),this.activeSections.delete(t),this.cleanupExcessMeshes(),!0):!1}getSectionObject(t){return this.sectionObjects[t]}updateBoxHelper(t,e,i=this.chunkBoxMaterial){let n=this.sectionObjects[t];if(n?.mesh)if(e){if(!n.boxHelper){let s=new t0.Mesh(new t0.BoxGeometry(16,16,16),i),o=new t0.BoxHelper(s,16776960);o.name="helper";let a=n.worldX??0,v=n.worldY??0,l=n.worldZ??0;this.worldRenderer.sceneOrigin.track(o,{updateMatrix:!0}),o.position.set(a,v,l),o.updateMatrix(),this.scene.add(o),n.boxHelper=o}n.boxHelper.visible=!0}else n.boxHelper&&(n.boxHelper.visible=!1)}updateAllBoxHelpers(t){for(let e of Object.keys(this.sectionObjects))this.updateBoxHelper(e,t)}cleanSignChunkTextures(t,e){this.signHeadsRenderer.cleanChunkTextures(t,e)}getSectionMesh(t){return this.activeSections.get(t)?.mesh}hasSection(t){return this.activeSections.has(t)}updateViewDistance(t){let e=(t*2+1)**2,i=this.worldHeight/16,n=5;if(this.minPoolSize=Math.floor(e*n),this.maxPoolSize=Math.floor(e*i)+1,this.poolSize??(this.poolSize=this.minPoolSize),this.minPoolSize>this.poolSize){let s=Math.min(this.minPoolSize,this.maxPoolSize);this.expandPool(s)}}getStats(){let t=this.meshPool.filter(n=>!n.inUse).length,e=this.hits+this.misses>0?(this.hits/(this.hits+this.misses)*100).toFixed(1):"0",i=this.getEstimatedMemoryUsage();return{poolSize:this.poolSize,activeCount:this.activeSections.size,freeCount:t,hitRate:`${e}%`,hits:this.hits,misses:this.misses,memoryUsage:i}}getTotalTiles(){return Object.values(this.sectionObjects).reduce((t,e)=>t+(e.tilesCount||0),0)}getTotalBlocks(){return Object.values(this.sectionObjects).reduce((t,e)=>t+(e.blocksCount||0),0)}getEstimatedMemoryUsage(){let t=0,e=0,i=0,n=0,s=0,o=0;for(let v of this.meshPool)if(v.inUse&&v.mesh.geometry){let{geometry:l}=v.mesh,c=l.getAttribute("position");if(c){let g=c.array.byteLength;e+=g,t+=g}let d=l.getAttribute("normal");if(d){let g=d.array.byteLength;i+=g,t+=g}let h=l.getAttribute("color");if(h){let g=h.array.byteLength;n+=g,t+=g}let p=l.getAttribute("uv");if(p){let g=p.array.byteLength;s+=g,t+=g}if(l.index){let g=l.index.array.byteLength;o+=g,t+=g}}return{total:`${(t/(1024*1024)).toFixed(2)} MB`,breakdown:{position:`${(e/(1024*1024)).toFixed(2)} MB`,normal:`${(i/(1024*1024)).toFixed(2)} MB`,color:`${(n/(1024*1024)).toFixed(2)} MB`,uv:`${(s/(1024*1024)).toFixed(2)} MB`,index:`${(o/(1024*1024)).toFixed(2)} MB`}}}dispose(){let t=[...this.activeSections.keys()];for(let e of t)this.releaseSection(e);this.signHeadsRenderer.dispose();for(let e of this.meshPool)e.mesh.geometry.dispose();this.meshPool.length=0,this.activeSections.clear(),this.chunkBoxMaterial.dispose(),this.pendingNearReveal.clear();for(let e of this.nearRevealTimers.values())clearTimeout(e);this.nearRevealTimers.clear();for(let e of this.nearRevealGraceTimers.values())clearTimeout(e);this.nearRevealGraceTimers.clear()}acquireMesh(){if(this.bypassPooling){let e={mesh:new t0.Mesh(new t0.BufferGeometry,this.material),inUse:!0,lastUsedTime:performance.now()};return this.meshPool.push(e),this.poolSize++,e}for(let e of this.meshPool)if(!e.inUse)return e.inUse=!0,e.lastUsedTime=performance.now(),this.hits++,e;this.misses++;let t=Math.min(this.poolSize+16,this.maxPoolSize);t<=this.meshPool.length&&(t=this.meshPool.length+8,this.maxPoolSize=t),this.expandPool(t);for(let e=this.meshPool.length-1;e>=0;e--){let i=this.meshPool[e];if(!i.inUse)return i.inUse=!0,i.lastUsedTime=performance.now(),i}throw new Error("ChunkMeshManager: Failed to acquire mesh after pool expansion")}expandPool(t){let e=this.meshPool.length;this.poolSize=t;for(let i=e;i<t;i++){let n=new t0.BufferGeometry,s=new t0.Mesh(n,this.material);s.visible=!1,s.matrixAutoUpdate=!1,s.name="pooled-section-mesh";let o={mesh:s,inUse:!1,lastUsedTime:0};this.meshPool.push(o)}}updateGeometryAttribute(t,e,i,n){let s=t.getAttribute(e);s&&s.count===i.length/n?(s.array.set(i),s.needsUpdate=!0):t.setAttribute(e,new t0.BufferAttribute(i,n))}clearGeometry(t){let e=["position","normal","color","uv"];for(let i of e)t.hasAttribute(i)&&t.deleteAttribute(i);t.index&&t.setIndex(null),t.boundingBox=null,t.boundingSphere=null}cleanupExcessMeshes(){if(this.poolSize>this.maxPoolSize){let t=this.meshPool.filter(e=>!e.inUse).length;if(t>0){let e=Math.min(this.poolSize-this.maxPoolSize,t);for(let i=0;i<e;i++){let n=this.meshPool.findIndex(s=>!s.inUse);n!==-1&&(this.meshPool[n].mesh.geometry.dispose(),this.meshPool.splice(n,1),this.poolSize--)}}}}disposeContainer(t){A0(t,!0)}recordRenderTime(t){this.renderTimes.push(t),this.renderTimes.length>this.maxRenderTimeSamples&&this.renderTimes.shift();let e=performance.now();e-this.lastPerformanceCheck>this.performanceCheckInterval&&(this.checkPerformance(),this.lastPerformanceCheck=e)}getEffectiveRenderDistance(){return this.performanceOverrideDistance||this.worldRenderer.viewDistance}resetPerformanceOverride(){this.performanceOverrideDistance=void 0,this.renderTimes.length=0}getAverageRenderTime(){return this.renderTimes.length===0?0:this.renderTimes.reduce((t,e)=>t+e,0)/this.renderTimes.length}checkPerformance(){if(this.renderTimes.length<this.maxRenderTimeSamples)return;let t=this.getAverageRenderTime(),e=16.67,i=e*1.5;if(t>i){let n=this.worldRenderer.viewDistance,s=Math.max(1,Math.floor(n*.8));(!this.performanceOverrideDistance||s<this.performanceOverrideDistance)&&(this.performanceOverrideDistance=s)}else if(this.performanceOverrideDistance&&t<e*1.1){let n=this.worldRenderer.viewDistance,s=Math.min(n,this.performanceOverrideDistance+1);s!==this.performanceOverrideDistance&&(this.performanceOverrideDistance=s>=n?void 0:s)}}updateSectionsVisibility(){let t=this.worldRenderer.cameraSectionPos;for(let[e,i]of Object.entries(this.sectionObjects)){if(i._waitingForChunkDisplay){i.visible=!1;continue}if(!this.performanceOverrideDistance){i.visible=!0;continue}let[n,s,o]=e.split(",").map(Number),a={x:n/16,y:s/16,z:o/16},v=a.x-t.x,l=a.z-t.z,c=Math.floor(Math.hypot(v,l));i.visible=c<=this.performanceOverrideDistance}}};u(ee,"NEAR_REVEAL_TIMEOUT_MS",5e3),u(ee,"EXPECTED_NEAR_GRACE_MS",1500);var m5=ee,qi=class{constructor(t){this.worldRendererThree=t;u(this,"chunkTextures",new Map)}dispose(){for(let[,t]of this.chunkTextures)for(let e of Object.keys(t))t[e].dispose();this.chunkTextures.clear()}renderHead(t,e,i,n){let s;if(n.SkullOwner?s=n.SkullOwner.Properties?.textures?.[0]?.Value:s=n.profile?.properties?.find(o=>o.name==="textures")?.value,!!s)try{let a=JSON.parse(L.from(s,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:v}=this.worldRendererThree.worldRendererConfig;v&&(a=a?.replace("http://textures.minecraft.net/",v).replace("https://textures.minecraft.net/",v));let l=St(this.worldRendererThree,a,Ct.head),c=new t0.Group;return i&&l.position.set(0,.3125,.3125),l.position.y-=23/16,c.add(l),this.worldRendererThree.sceneOrigin.track(c),c.position.set(t.x+.5,t.y+.045,t.z+.5),c.rotation.set(0,-t0.MathUtils.degToRad(e*(i?90:45/2)),0),c.scale.set(.8,.8,.8),c}catch{}}renderSign(t,e,i,n,s){let o=this.getSignTexture(t,s,n);if(!o)return;let a=new t0.Mesh(new t0.PlaneGeometry(1,1),new t0.MeshBasicMaterial({map:o,transparent:!0}));a.renderOrder=999;let v=7/16,l=n?1.3:1;a.scale.set(1*l,v*l,1*l);let c=(n?2:1.5)/16,d=.25/16;i&&!n?a.position.set(0,0,-.5+c+d+1e-4):a.position.set(0,0,c/2+1e-4);let h=new t0.Group;h.rotation.set(0,-t0.MathUtils.degToRad(e*(i?90:45/2)),0),h.add(a);let p=(n?10:8)/16,g=(n?0:i?4.333:9.333)/16,b=p/2+g;return this.worldRendererThree.sceneOrigin.track(h),h.position.set(t.x+.5,t.y+b,t.z+.5),h}getSignTexture(t,e,i,n=!1){let s=de(t),o=this.chunkTextures.get(`${s[0]},${s[1]}`);o||(o={},this.chunkTextures.set(`${s[0]},${s[1]}`,o));let a=`${t.x},${t.y},${t.z}`;if(o[a])return o[a];let v=W8(this.worldRendererThree.version),l=H5(e,i,v);if(!l)return;let c=new t0.Texture(l);return c.magFilter=t0.NearestFilter,c.minFilter=t0.NearestFilter,c.needsUpdate=!0,o[a]=c,c}cleanChunkTextures(t,e){let i=`${Math.floor(t/16)},${Math.floor(e/16)}`,n=this.chunkTextures.get(i);if(n)for(let s of Object.keys(n))n[s].dispose(),delete n[s]}};x();R();T();k();x();R();T();k();import*as It from"three";var E1={},J6=!1;function N8(){if(J6)return;let r=globalThis.loadedData?.tints;if(r){for(let t of Object.keys(r))E1[t]=V8(r[t]);J6=!0}}function V8(r){let t={},e=q6(r.default??16777215);if(r.data)for(let i of r.data){let n=q6(i.color);for(let s of i.keys)t[s]=n}return new Proxy(t,{get(i,n){return i[n]??e}})}function q6(r){return[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255]}function Z6(r,t){return N8(),r==="grass_block"?[1,1,1]:r==="redstone_wire"?[1,1,1]:r==="birch_leaves"||r==="spruce_leaves"||r==="lily_pad"?E1.constant?.[r]??[1,1,1]:r.includes("leaves")||r==="vine"?E1.foliage?.[t]??[1,1,1]:["short_grass","tall_grass","fern","large_fern","sugar_cane","grass"].includes(r)?E1.grass?.[t]??[1,1,1]:[1,1,1]}var j8=512,Zi=1/20,Xi=class{constructor(t){this.worldRenderer=t;u(this,"particles",[]);u(this,"sharedMaterial");u(this,"enabled",!1);u(this,"tickAccumulator",0);u(this,"nextParticleIndex",0);u(this,"render",t=>{if(!this.enabled)return;for(this.tickAccumulator+=t;this.tickAccumulator>=Zi;)this.tickAccumulator-=Zi,this.tickPhysics();let e=this.tickAccumulator/Zi;this.updateVisuals(e)})}enable(){this.enabled||(this.enabled=!0,this.ensureMaterial())}disable(){this.enabled&&(this.enabled=!1)}dispose(){for(let t of this.particles)t.active&&this.worldRenderer.sceneOrigin.removeAndUntrack(t.mesh),t.mesh.geometry.dispose();this.particles=[],this.sharedMaterial?.dispose(),this.sharedMaterial=void 0,this.nextParticleIndex=0}spawnBlockBreakParticles(t,e,i,n,s,o="plains"){if(!this.enabled)return;let a=this.resolveBlockTexture(n);if(!a)return;let v=Z6(n,o);for(let l=0;l<4;l++)for(let c=0;c<4;c++)for(let d=0;d<4;d++){let h=t+(l+.5)/4,p=e+(c+.5)/4,g=i+(d+.5)/4,b=h-t-.5,A=p-e-.5,w=g-i-.5;b+=(Math.random()*2-1)*.4,A+=(Math.random()*2-1)*.4,w+=(Math.random()*2-1)*.4;let _=(Math.random()+Math.random()+1)*.15,S=Math.sqrt(b*b+A*A+w*w),M=b/S*_*.4,C=A/S*_*.4+.1,H=w/S*_*.4,B=Math.floor(4/(Math.random()*.9+.1));this.createParticle(h,p,g,M,C,H,B,a,s,t,i,1,v)}}tickPhysics(){for(let t of this.particles){if(!t.active)continue;if(t.prevX=t.x,t.prevY=t.y,t.prevZ=t.z,t.age++,t.age>=t.maxAge){this.deactivateParticle(t);continue}t.yd-=.04,t.x+=t.xd,t.y+=t.yd,t.z+=t.zd;let e=this.getFloorY(t);t.y<=e?(t.y=e,t.yd=0,t.onGround=!0):t.onGround=!1,t.xd*=.98,t.yd*=.98,t.zd*=.98,t.onGround&&(t.xd*=.7,t.zd*=.7)}}updateVisuals(t){let e=this.worldRenderer.camera.position;for(let i of this.particles){if(!i.active)continue;let n=i.prevX+(i.x-i.prevX)*t,s=i.prevY+(i.y-i.prevY)*t,o=i.prevZ+(i.z-i.prevZ)*t;i.mesh.position.set(n,s,o),i.mesh.lookAt(e.x,e.y,e.z)}}spawnCrackParticle(t,e,i,n,s,o,a="plains"){if(!this.enabled)return;let v=this.resolveBlockTexture(s);if(!v)return;let l=Z6(s,a),c=t+Math.random()*.8+.1,d=e+Math.random()*.8+.1,h=i+Math.random()*.8+.1;switch(n){case 0:d=e-.1;break;case 1:d=e+1+.1;break;case 2:h=i-.1;break;case 3:h=i+1+.1;break;case 4:c=t-.1;break;case 5:c=t+1+.1;break}let p=(Math.random()*2-1)*.4*.2,g=(Math.random()*2-1)*.4*.2+.1*.2,b=(Math.random()*2-1)*.4*.2,A=Math.floor(4/(Math.random()*.9+.1));this.createParticle(c,d,h,p,g,b,A,v,o,t,i,.6,l)}createParticle(t,e,i,n,s,o,a,v,l,c,d,h=1,p=[1,1,1]){this.ensureMaterial();let g=this.findInactiveParticle();g||(this.particles.length<j8?g=this.allocateParticle():g=this.recycleOldest());let b=Math.floor(Math.random()*4),A=Math.floor(Math.random()*4),w=v.u+b/4*v.su,_=v.v+A/4*v.sv,S=v.su/4,M=v.sv/4;this.setGeometryUVs(g.mesh.geometry,w,_,S,M),g.active=!0,g.x=t,g.y=e,g.z=i,g.prevX=t,g.prevY=e,g.prevZ=i,g.xd=n,g.yd=s,g.zd=o,g.age=0,g.maxAge=a,g.onGround=!1,g.floorMap=l,g.blockX=Math.floor(c),g.blockZ=Math.floor(d);let C=.1*(.5+Math.random()*.5)*2*h;g.mesh.scale.set(C,C,C),g.mesh.position.set(t,e,i),g.mesh.visible=!0;let H=.6*p[0],B=.6*p[1],I=.6*p[2],W=new Float32Array([H,B,I,H,B,I,H,B,I,H,B,I]),z=g.mesh.geometry.getAttribute("color");z?(z.set(W),z.needsUpdate=!0):g.mesh.geometry.setAttribute("color",new It.Float32BufferAttribute(W,3)),this.worldRenderer.sceneOrigin.addAndTrack(g.mesh)}allocateParticle(){let t=new It.PlaneGeometry(1,1),e=new It.Mesh(t,this.sharedMaterial);e.visible=!1;let i={mesh:e,active:!1,x:0,y:0,z:0,prevX:0,prevY:0,prevZ:0,xd:0,yd:0,zd:0,age:0,maxAge:0,onGround:!1,floorMap:[],blockX:0,blockZ:0};return this.particles.push(i),i}findInactiveParticle(){for(let t=0;t<this.particles.length;t++){let e=(this.nextParticleIndex+t)%this.particles.length;if(!this.particles[e].active)return this.nextParticleIndex=(e+1)%this.particles.length,this.particles[e]}}recycleOldest(){let t=this.particles[0];for(let e of this.particles)e.age>t.age&&(t=e);return this.deactivateParticle(t),t}deactivateParticle(t){t.active&&(t.active=!1,t.mesh.visible=!1,this.worldRenderer.sceneOrigin.removeAndUntrack(t.mesh))}getFloorY(t){let e=Math.floor(t.x)-t.blockX,i=Math.floor(t.z)-t.blockZ;return e=Math.max(-2,Math.min(2,e)),i=Math.max(-2,Math.min(2,i)),t.floorMap[(i+2)*5+(e+2)]}resolveBlockTexture(t){let e=this.worldRenderer.resourcesManager.currentResources;if(!e)return null;let i=e.blocksAtlasJson,n=i.textures;if(n[t])return this.extractUV(n[t],i);for(let s of["_side","_top","_front","_0",""]){let o=t+s;if(n[o])return this.extractUV(n[o],i)}for(let s of Object.keys(n))if(s.startsWith(t))return this.extractUV(n[s],i);return null}extractUV(t,e){return{u:t.u,v:t.v,su:t.su??e.suSv,sv:t.sv??e.suSv}}setGeometryUVs(t,e,i,n,s){let o=t.getAttribute("uv");o.setXY(0,e,i),o.setXY(1,e+n,i),o.setXY(2,e,i+s),o.setXY(3,e+n,i+s),o.needsUpdate=!0}ensureMaterial(){if(this.sharedMaterial)return;let t=this.worldRenderer.material.map;t&&(this.sharedMaterial=new It.MeshBasicMaterial({map:t,vertexColors:!0,transparent:!0,alphaTest:.1}))}},X6={id:"blockBreakParticles",controller:Xi,enabledDefault:!0,cannotBeDisabled:!0,requiresHeightmap:!1};x();R();T();k();var $i=class{constructor(t){this.worldRenderer=t;u(this,"enabled",!1);u(this,"lastBobWalkDist",0);u(this,"lastBobTickTime",0);u(this,"render",()=>{if(!this.enabled)return;let t=this.worldRenderer.displayOptions.inWorldRenderingConfig,{perspective:e}=this.worldRenderer.playerStateReactive;if(t.viewBobbing&&e==="first_person"&&!this.worldRenderer.playerStateUtils.isSpectator()){this.worldRenderer.playerStateReactive.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=performance.now(),this.lastBobWalkDist=this.worldRenderer.playerStateReactive.walkDist);let n=Math.min((performance.now()-this.lastBobTickTime)/50,1);this.worldRenderer.cameraShake.setCameraBobInput({walkDist:this.worldRenderer.playerStateReactive.walkDist,prevWalkDist:this.worldRenderer.playerStateReactive.prevWalkDist,bob:this.worldRenderer.playerStateReactive.bob,prevBob:this.worldRenderer.playerStateReactive.prevBob,partialTick:n})}else this.worldRenderer.cameraShake.setCameraBobInput(null)})}enable(){this.enabled=!0}disable(){this.enabled=!1,this.worldRenderer.cameraShake.setCameraBobInput(null);let{perspective:t}=this.worldRenderer.playerStateReactive;t==="first_person"&&this.worldRenderer.camera.position.set(0,0,0)}dispose(){this.disable()}},$6={id:"cameraBobbing",controller:$i,enabledDefault:!0,cannotBeDisabled:!0};x();R();T();k();import*as N0 from"three";var t2=2e3,ts=32,es=32,x1=12,is=24,R1=1.2,Y8=-5;var e2=class{constructor(t){this.worldRenderer=t;u(this,"instancedMesh");u(this,"geometry");u(this,"material");u(this,"particles",[]);u(this,"enabled",!1);u(this,"dummy",new N0.Matrix4);u(this,"tempPosition",new N0.Vector3);u(this,"tempQuaternion",new N0.Quaternion);u(this,"tempScale",new N0.Vector3);u(this,"render",t=>{if(!this.enabled||!this.instancedMesh)return;let e=this.worldRenderer.getCameraPosition();this.instancedMesh.position.set(0,0,0);let i=this.worldRenderer.reactiveState.world.heightmaps,{dummy:n,tempPosition:s,tempQuaternion:o,tempScale:a}=this,v=NaN,l=NaN,c;for(let d=0;d<t2;d++){let h=this.particles[d];this.instancedMesh.getMatrixAt(d,n),n.decompose(s,o,a),s.addScaledVector(h.velocity,t);let p=s.y,g=Math.sqrt(s.x*s.x+s.z*s.z),b=e.x+s.x,A=e.y+s.y,w=e.z+s.z,_=Math.floor(b/16),S=Math.floor(w/16);(_!==v||S!==l)&&(c=i.get(`${_},${S}`),v=_,l=S);let M=(Math.floor(b)%16+16)%16,C=(Math.floor(w)%16+16)%16,H=c?.[C*16+M];if(g>ts||H!==void 0&&H!==-32768&&A<=H+1+h.despawnOffset||p<Y8){this.respawnParticle(s);let I=x1+Math.random()*(is-x1);h.velocity.set((Math.random()-.5)*R1,-I,(Math.random()-.5)*R1),h.despawnOffset=Math.random()*.5}n.compose(s,o,a),this.instancedMesh.setMatrixAt(d,n)}this.instancedMesh.instanceMatrix.needsUpdate=!0})}enable(){this.enabled||(this.enabled=!0,this.instancedMesh?this.instancedMesh.visible=!0:this.createRain())}disable(){this.enabled&&(this.enabled=!1,this.instancedMesh&&(this.instancedMesh.visible=!1))}autoEnableCheck(){return this.worldRenderer.worldRendererConfig.isRaining===!0}dispose(){this.instancedMesh&&this.worldRenderer.scene.remove(this.instancedMesh),this.geometry?.dispose(),this.material?.dispose(),this.instancedMesh=void 0,this.geometry=void 0,this.material=void 0,this.particles=[]}createRain(){this.geometry=new N0.BoxGeometry(.03,.3,.03),this.material=new N0.MeshBasicMaterial({color:4482713,transparent:!0,opacity:.6}),this.instancedMesh=new N0.InstancedMesh(this.geometry,this.material,t2),this.instancedMesh.name="rain-particles";let t=new N0.Matrix4,e=new N0.Vector3;for(let i=0;i<t2;i++){this.respawnParticle(e),e.y=Math.random()*es,t.setPosition(e),this.instancedMesh.setMatrixAt(i,t);let n=x1+Math.random()*(is-x1);this.particles.push({velocity:new N0.Vector3((Math.random()-.5)*R1,-n,(Math.random()-.5)*R1),age:0,despawnOffset:Math.random()*.5})}this.instancedMesh.instanceMatrix.needsUpdate=!0,this.worldRenderer.scene.add(this.instancedMesh)}respawnParticle(t){let e=Math.random()*Math.PI*2,i=Math.random()*ts;t.set(Math.cos(e)*i,es,Math.sin(e)*i)}},ns={id:"rain",controller:e2,enabledDefault:!1,requiresHeightmap:!0};x();R();T();k();import*as T0 from"three";var rs=new T0.Color(13/255,234/255,238/255),Q8=9;var K8=350,J8=650;var q8=120,Z8=280,i2=class{constructor(t){this.worldRenderer=t;u(this,"pendingGeometries",new Map);u(this,"revealingSections",new Map);u(this,"finishedChunkCount",0);u(this,"revealTriggered",!1);u(this,"revealStartTime",0);u(this,"enabled",!1);u(this,"onWorldSwitchedCb",null);u(this,"patched",!1);u(this,"initialWaveDone",!1);u(this,"wireframeMaterial");u(this,"wireframeGlowMaterial");u(this,"pulseTime",0);u(this,"revealedChunks",new Set);u(this,"originalFinishChunk",null);u(this,"originalDestroy",null);u(this,"originalSceneAdd",null);u(this,"originalHandleWorkerMessage",null);u(this,"configEnabled",!0);u(this,"render",t=>{this.enabled&&this.update(t*1e3)});this.configEnabled=this.worldRenderer.worldRendererConfig.futuristicReveal===!0,this.wireframeMaterial=new T0.LineBasicMaterial({color:rs,transparent:!0,opacity:1,blending:T0.AdditiveBlending,depthWrite:!1}),this.wireframeGlowMaterial=new T0.LineBasicMaterial({color:rs,transparent:!0,opacity:.55,blending:T0.AdditiveBlending,depthWrite:!1})}enable(){this.configEnabled&&(this.enabled||(this.enabled=!0,this.patchWorldRenderer()))}disable(){this.enabled&&(this.enabled=!1,this.unpatchWorldRenderer(),this.reset())}toggle(){return this.enabled?this.disable():this.enable(),this.enabled}dispose(){this.disable(),this.wireframeMaterial.dispose(),this.wireframeGlowMaterial.dispose()}patchWorldRenderer(){if(this.patched)return;this.patched=!0;let t=this.worldRenderer;this.onWorldSwitchedCb=()=>this.reset(),t.onWorldSwitched.push(this.onWorldSwitchedCb),this.originalFinishChunk=t.finishChunk.bind(t),t.finishChunk=e=>{this.originalFinishChunk(e),this.onChunkFinished(e)},this.originalDestroy=t.destroy.bind(t),t.destroy=()=>{this.dispose(),this.originalDestroy()},this.originalHandleWorkerMessage=t.handleWorkerMessage.bind(t),t.handleWorkerMessage=e=>{this.originalHandleWorkerMessage(e),this.enabled&&e?.type==="geometry"&&Promise.resolve().then(()=>{try{this.registerSection(e.key,e.geometry)}catch{}})},this.originalSceneAdd=t.scene.add.bind(t.scene),t.scene.add=(...e)=>{let i=this.originalSceneAdd(...e);for(let n of e)this.checkAndPatchMesh(n);return i}}unpatchWorldRenderer(){let t=this.worldRenderer;if(this.originalFinishChunk&&(t.finishChunk=this.originalFinishChunk,this.originalFinishChunk=null),this.originalDestroy&&(t.destroy=this.originalDestroy,this.originalDestroy=null),this.originalHandleWorkerMessage&&(t.handleWorkerMessage=this.originalHandleWorkerMessage,this.originalHandleWorkerMessage=null),this.originalSceneAdd&&(t.scene.add=this.originalSceneAdd,this.originalSceneAdd=null),this.onWorldSwitchedCb){let e=t.onWorldSwitched.indexOf(this.onWorldSwitchedCb);e!==-1&&t.onWorldSwitched.splice(e,1),this.onWorldSwitchedCb=null}this.patched=!1}checkAndPatchMesh(t){if(t instanceof T0.Mesh&&t.name==="mesh"){let e=this.findSectionKeyForMesh(t);e&&this.shouldUseRevealEffect(e)&&(t.visible=!1,t.hiddenByReveal=!0)}for(let e of t.children)this.checkAndPatchMesh(e)}findSectionKeyForMesh(t){let e=t;for(;e;){let{sectionKey:p}=e;if(p&&this.worldRenderer.chunkMeshManager.sectionObjects[p]===e)return p;e=e.parent}let i=this.worldRenderer.sceneOrigin.getWorldPosition(t),n=i?.x??this.worldRenderer.sceneOrigin.toWorldX(t.position.x),s=i?.y??this.worldRenderer.sceneOrigin.toWorldY(t.position.y),o=i?.z??this.worldRenderer.sceneOrigin.toWorldZ(t.position.z),a=16,v=this.worldRenderer.getSectionHeight(),l=Math.floor(n/a)*a,c=Math.floor(s/v)*v,d=Math.floor(o/a)*a,h=`${l},${c},${d}`;return this.worldRenderer.chunkMeshManager.sectionObjects[h]?h:null}get scene(){return this.worldRenderer.realScene}getCameraPosition(){return this.worldRenderer.getCameraPosition()}getOriginalMesh(t){let e=this.worldRenderer.chunkMeshManager.sectionObjects[t];return e?e.children.find(i=>i.name==="mesh"):null}onChunkFinished(t){this.finishedChunkCount++,!this.revealTriggered&&this.finishedChunkCount>=Q8&&this.triggerReveal()}registerSection(t,e){this.revealedChunks.has(t)||this.revealingSections.has(t)||(this.revealTriggered?this.startSectionReveal(t,e):this.pendingGeometries.set(t,e))}shouldUseRevealEffect(t){return this.enabled&&!this.revealedChunks.has(t)&&!this.revealingSections.has(t)}triggerReveal(){this.revealTriggered=!0,this.initialWaveDone=!0,this.revealStartTime=performance.now();let t=this.getCameraPosition(),e=[...this.pendingGeometries.entries()];this.pendingGeometries.clear();let i=e.map(([s,o])=>{let a=Math.hypot(o.sx-t.x,o.sy-t.y,o.sz-t.z);return{key:s,geometry:o,distance:a}}).sort((s,o)=>s.distance-o.distance),n=i.at(-1)?.distance||1;for(let{key:s,geometry:o,distance:a}of i){let v=a/n*1500;setTimeout(()=>{!this.revealedChunks.has(s)&&!this.revealingSections.has(s)&&this.startSectionReveal(s,o)},v)}}startSectionReveal(t,e){if(!e.positions?.length||this.revealingSections.has(t)||this.revealedChunks.has(t))return;let i=this.createWireframeGeometry(e),n=this.getOriginalMesh(t);n&&(n.visible=!1,n.hiddenByReveal=!0);let s=new T0.LineSegments(i,this.wireframeMaterial.clone());this.worldRenderer.sceneOrigin.track(s),s.position.set(e.sx,e.sy,e.sz),s.name="scifi-wireframe",s.renderOrder=1e3;let o=new T0.LineSegments(i.clone(),this.wireframeGlowMaterial.clone());this.worldRenderer.sceneOrigin.track(o),o.position.set(e.sx,e.sy,e.sz),o.scale.set(1.02,1.02,1.02),o.name="scifi-glow",o.renderOrder=999;let a=new T0.Group;a.add(s),a.add(o),a.name="scifi-reveal-group",a.sectionKey=t,this.scene.add(a);let v=this.initialWaveDone?q8:K8,l=this.initialWaveDone?Z8:J8,c={key:t,wireframeGroup:a,revealStartTime:performance.now(),phase:"wireframe",originalMeshRef:null,wireframeMs:v,revealMs:l};setTimeout(()=>{let d=this.getOriginalMesh(t);d&&!d.hiddenByReveal&&(d.visible=!1,d.hiddenByReveal=!0)},0),this.revealingSections.set(t,c)}createWireframeGeometry(t){let e=t.positions,i=t.indices,n=[],s=new Set;for(let a=0;a<i.length;a+=3){let v=i[a],l=i[a+1],c=i[a+2];this.addEdge(e,v,l,n,s),this.addEdge(e,l,c,n,s),this.addEdge(e,c,v,n,s)}let o=new T0.BufferGeometry;return o.setAttribute("position",new T0.Float32BufferAttribute(n,3)),o}addEdge(t,e,i,n,s){let o=Math.min(e,i),a=Math.max(e,i),v=`${o}-${a}`;s.has(v)||(s.add(v),n.push(t[e*3],t[e*3+1],t[e*3+2],t[i*3],t[i*3+1],t[i*3+2]))}update(t){if(!this.enabled||this.revealingSections.size===0)return;this.pulseTime+=t*.001;let e=performance.now(),i=.6+.4*Math.sin(this.pulseTime*4),n=[];for(let[s,o]of this.revealingSections){let a=e-o.revealStartTime;if(o.phase==="wireframe"){let v=o.wireframeGroup.children[0],l=o.wireframeGroup.children[1];if(v?.material){let c=v.material;c.opacity=i;let d=.85+.15*Math.sin(this.pulseTime*6+a*.002);c.color.setRGB(13/255*d,234/255*d,238/255*d)}if(l?.material){let c=l.material;c.opacity=i*.4}if(a>o.wireframeMs&&(o.phase="transitioning",o.originalMeshRef=this.getOriginalMesh(s),o.originalMeshRef)){o.originalMeshRef.visible=!0;let c=o.originalMeshRef.material,d=c.clone();d.transparent=!0,d.opacity=0,d.needsUpdate=!0,o.originalMeshRef.originalMaterial=c,o.originalMeshRef.material=d}}else if(o.phase==="transitioning"){let v=a-o.wireframeMs,l=Math.min(1,v/o.revealMs),c=1-(1-l)**3,d=o.wireframeGroup.children[0],h=o.wireframeGroup.children[1];if(d?.material){let p=d.material;p.opacity=1-c}if(h?.material){let p=h.material;p.opacity=(1-c)*.55}if(o.originalMeshRef?.material){let p=o.originalMeshRef.material;p.opacity=c}l>=1&&(o.phase="complete",n.push(o))}}for(let s of n)this.completeReveal(s)}completeReveal(t){if(this.revealingSections.delete(t.key),this.revealedChunks.add(t.key),t.originalMeshRef){let e=t.originalMeshRef.originalMaterial;if(e){let i=t.originalMeshRef.material;t.originalMeshRef.material=e,i.dispose(),delete t.originalMeshRef.originalMaterial}t.originalMeshRef.visible=!0,delete t.originalMeshRef.hiddenByReveal}this.disposeWireframeGroup(t.wireframeGroup)}disposeWireframeGroup(t){this.worldRenderer.sceneOrigin.removeAndUntrackAll(t);let e=[];t.traverse(i=>{e.push(i)});for(let i of e){let n=i;if(n.geometry&&n.geometry.dispose(),n.material){let s=n.material;if(Array.isArray(s))for(let o of s)o.dispose();else s&&typeof s.dispose=="function"&&s.dispose()}}t.clear()}reset(){for(let t of this.revealingSections.values())this.disposeWireframeGroup(t.wireframeGroup);this.pendingGeometries.clear(),this.revealingSections.clear(),this.revealedChunks.clear(),this.finishedChunkCount=0,this.revealTriggered=!1,this.revealStartTime=0,this.pulseTime=0}forceCompleteAll(){let t=[...this.revealingSections.values()];for(let e of t){if(e.originalMeshRef||(e.originalMeshRef=this.getOriginalMesh(e.key)),e.originalMeshRef){let i=e.originalMeshRef.originalMaterial;i&&(e.originalMeshRef.material=i),e.originalMeshRef.visible=!0}this.completeReveal(e)}}debugGetWireframeGroups(){let t=[];return this.scene.traverse(e=>{e.name==="scifi-reveal-group"&&t.push(e)}),t}debugForceCleanup(){let t=this.debugGetWireframeGroups();for(let e of t)this.disposeWireframeGroup(e);for(let e of this.revealingSections.values())this.disposeWireframeGroup(e.wireframeGroup);this.revealingSections.clear()}debugStatus(){let t=this.debugGetWireframeGroups(),e=new Set(this.revealingSections.keys()),i=t.filter(n=>!e.has(n.sectionKey));return{revealTriggered:this.revealTriggered,finishedChunkCount:this.finishedChunkCount,pendingGeometries:this.pendingGeometries.size,revealingSections:this.revealingSections.size,revealedChunks:this.revealedChunks.size,wireframeGroupsInScene:t.length,orphanedWireframeGroups:i.length,orphanedKeys:i.map(n=>n.sectionKey),sections:[...this.revealingSections.entries()].map(([n,s])=>({key:n,phase:s.phase,hasOriginalMesh:!!s.originalMeshRef,wireframeInScene:s.wireframeGroup.parent!==null}))}}debugLog(){}},ss={id:"futuristicReveal",controller:i2,enabledDefault:!0};x();R();T();k();import*as E0 from"three";var X8=parseInt(E0.REVISION.replaceAll(/\D+/g,""),10),n2=class extends E0.ShaderMaterial{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:`
21217
21217
  uniform float time;
21218
21218
  attribute float size;
21219
21219
  varying vec3 vColor;
@@ -21233,7 +21233,7 @@ void main() {
21233
21233
 
21234
21234
  #include <tonemapping_fragment>
21235
21235
  #include <${X8>=154?"colorspace_fragment":"encodings_fragment"}>
21236
- }`})}},n2=class{constructor(t){this.worldRenderer=t;u(this,"points");u(this,"clock",new E0.Clock);u(this,"enabled",!1);u(this,"currentTime");u(this,"enablementCheck",()=>this.currentTime?this.currentTime>13500&&this.currentTime<23e3:!1);u(this,"render",t=>{this.points&&(this.points.position.set(0,0,0),this.points.material.uniforms.time.value=this.clock.getElapsedTime()*.2)})}enable(){this.enabled||(this.enabled=!0,this.updateVisibility())}disable(){this.enabled&&(this.enabled=!1,this.removeStars())}toggle(){return this.enabled?this.disable():this.enable(),this.enabled}updateTimeOfDay(t){this.currentTime=t,this.enabled&&this.updateVisibility()}updateVisibility(){if(!this.enabled)return;let t=this.enablementCheck?.()??!1;t&&!this.points?this.createStars():!t&&this.points&&this.removeStars()}createStars(){if(this.points)return;let t=80,e=50,i=7e3,n=7,s=10,o=new E0.BufferGeometry,a=b=>new E0.Vector3().setFromSpherical(new E0.Spherical(b,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),v=[],l=[],c=Array.from({length:i},()=>(.5+.5*Math.random())*n),d=new E0.Color,h=t+e,p=e/i;for(let b=0;b<i;b++)h-=p*Math.random(),v.push(...a(h).toArray()),d.setHSL(b/i,s,.9),l.push(d.r,d.g,d.b);o.setAttribute("position",new E0.Float32BufferAttribute(v,3)),o.setAttribute("color",new E0.Float32BufferAttribute(l,3)),o.setAttribute("size",new E0.Float32BufferAttribute(c,1));let g=new i2;g.blending=E0.AdditiveBlending,g.depthTest=!1,g.transparent=!0,this.points=new E0.Points(o,g),this.points.renderOrder=-1,this.worldRenderer.scene.add(this.points)}dispose(){this.removeStars()}removeStars(){this.points&&(this.points.geometry.dispose(),this.points.material.dispose(),this.worldRenderer.scene.remove(this.points),this.points=void 0)}},os={id:"starfield",controller:n2,enabledDefault:!0,cannotBeDisabled:!0};var as={starfield:os,futuristicReveal:ss,rain:ns,cameraBobbing:$6,blockBreakParticles:X6};var m5=class m5 extends U5{constructor(e,i,n){if(!n.resourcesManager)throw new Error("resourcesManager is required in displayOptions");super(n.resourcesManager,n,i);this.renderer=e;this.initOptions=i;this.displayOptions=n;u(this,"outputFormat","threeJs");u(this,"chunkMeshManager");u(this,"chunkTextures",new Map);u(this,"signsCache",new Map);u(this,"cameraSectionPos",new Ht(0,0,0));u(this,"holdingBlock");u(this,"holdingBlockLeft");u(this,"scene",new Y.Scene);u(this,"ambientLight",new Y.AmbientLight(13421772));u(this,"directionalLight",new Y.DirectionalLight(16777215,.5));u(this,"entities",new a1(this,globalThis.mcData));u(this,"cameraGroupVr");u(this,"material",new Y.MeshBasicMaterial({vertexColors:!0,transparent:!0,alphaTest:.1}));u(this,"itemsTexture");u(this,"cursorBlock");u(this,"onRender",[]);u(this,"lastRenderTime",0);u(this,"cameraShake");u(this,"cameraContainer");u(this,"media");u(this,"waypoints");u(this,"cinimaticScript");u(this,"camera");u(this,"renderTimeAvg",0);u(this,"pendingSectionUpdates",new Map);u(this,"pendingSectionBufferStartTimes",new Map);u(this,"modules",{});u(this,"sectionsOffsetsAnimations",{});u(this,"fountains",[]);u(this,"fireworksLegacy");u(this,"DEBUG_RAYCAST",!1);u(this,"skyboxRenderer");u(this,"fireworks");u(this,"sceneOrigin",new y1(this.scene));u(this,"cameraWorldPos",{x:0,y:0,z:0});u(this,"_cameraPositionAccessWarned",!1);u(this,"_tmpCameraPos",new Y.Vector3);u(this,"currentPosTween");u(this,"currentRotTween");u(this,"_tpDirection",new Y.Vector3);u(this,"_tpPitchQuat",new Y.Quaternion);u(this,"_tpYawQuat",new Y.Quaternion);u(this,"_tpFinalQuat",new Y.Quaternion);u(this,"_tpScenePos",new Y.Vector3);u(this,"_tpAxisX",new Y.Vector3(1,0,0));u(this,"_tpAxisY",new Y.Vector3(0,1,0));u(this,"_tpRaycaster",new Y.Raycaster);u(this,"_tpChunkWorldPos",new Y.Vector3);u(this,"debugOverlayAdded",!1);u(this,"debugRaycastHelper");u(this,"debugHitPoint");u(this,"prevFramePerspective",null);this.renderer=e,n.rendererState.renderer=m5.getRendererInfo(e)??"...",this.chunkMeshManager=new h5(this,this.scene,this.material,this.worldSizeParams.worldHeight,this.viewDistance),this.onRenderDistanceChanged=s=>{this.chunkMeshManager.updateViewDistance(s)},this.cursorBlock=new v1(this),this.holdingBlock=v5(this),this.holdingBlockLeft=v5(this,!0);for(let s of Object.values(as))this.registerModule(s);this.skyboxRenderer=new g1(this.realScene,!1,null),this.skyboxRenderer.init(),this.addDebugOverlay(),this.resetScene(),this.init(),this.soundSystem=new c1(this),this.cameraShake=new d1(this,this.onRender),this.media=new u1(this),this.fireworksLegacy=new m1(this),this.waypoints=new h1(this),this.cinimaticScript=new p1(this,(s,o,a)=>this.setCinimaticCamera(s,o,a),s=>this.setCinimaticFov(s),()=>({position:new Ht(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),yaw:this.cameraShake.getBaseRotation().yaw,pitch:this.cameraShake.getBaseRotation().pitch,fov:this.camera.fov})),this.fireworks=new b1(this.realScene,this.sceneOrigin),this.renderUpdateEmitter.on("chunkFinished",s=>{this.finishChunk(s)}),this.worldSwitchActions(),this.initializeModules()}get sectionObjects(){return this.chunkMeshManager.sectionObjects}get realScene(){return this.scene}get waitingChunksToDisplay(){return this.chunkMeshManager.waitingChunksToDisplay}get estimatedMemoryUsage(){return this.chunkMeshManager.getEstimatedMemoryUsage().total}get tilesRendered(){return this.chunkMeshManager.getTotalTiles()}get blocksRendered(){return this.chunkMeshManager.getTotalBlocks()}registerModule(e){if(e.id in this.modules)return;let i=new e.controller(this),n={manifest:e,controller:i,enabled:!1,toggle:()=>this.toggleModule(e.id)};this.modules[e.id]=n,e.enabledDefault&&this.toggleModule(e.id,!0)}enableModule(e){let i=this.modules[e];i&&(i.enabled||(i.enabled=!0,i.controller.enable(),i.controller.render&&this.onRender.push(i.controller.render)))}disableModule(e){let i=this.modules[e];if(i&&!i.manifest.cannotBeDisabled&&i.enabled&&(i.enabled=!1,i.controller.disable(),i.controller.render)){let n=this.onRender.indexOf(i.controller.render);n>-1&&this.onRender.splice(n,1)}}toggleModule(e,i){let n=this.modules[e];if(!n)return!1;let s=i!==void 0?i:!n.enabled;if(s===n.enabled)return n.enabled;if(!s&&n.manifest.cannotBeDisabled)return!0;if(n.enabled=s,s)n.controller.enable(),n.controller.render&&!this.onRender.includes(n.controller.render)&&this.onRender.push(n.controller.render);else if(n.controller.disable(),n.controller.render){let o=this.onRender.indexOf(n.controller.render);o>-1&&this.onRender.splice(o,1)}return s}disposeModules(){for(let e of Object.values(this.modules))e.controller.dispose();this.modules={}}initializeModules(){this.updateModulesFromConfig()}getModule(e){return this.modules[e]?.controller}anyModuleRequiresHeightmap(){return Object.values(this.modules).some(e=>e.enabled&&e.manifest.requiresHeightmap)}get cameraObject(){return this.cameraGroupVr??this.cameraContainer}_wrapCameraPositionWithWarning(){let e=this.camera.position,i=this,n=20,s=(v,l,c)=>Math.abs(v)>n||Math.abs(l)>n||Math.abs(c)>n,o=()=>{!i._cameraPositionAccessWarned&&typeof D<"u"},a=new Proxy(e,{set(v,l,c){return(l==="x"||l==="y"||l==="z")&&typeof c=="number"&&Math.abs(c)>n&&o(),v[l]=c,!0},get(v,l,c){let d=v[l];return l==="set"?function(h,p,g){return s(h,p,g)&&o(),v.set(h,p,g)}:l==="setX"||l==="setY"||l==="setZ"?function(h){return Math.abs(h)>n&&o(),v[l](h)}:l==="copy"?function(h){return s(h.x,h.y,h.z)&&o(),v.copy(h)}:typeof d=="function"?d.bind(v):d}});Object.defineProperty(this.camera,"position",{value:a,configurable:!0,enumerable:!0})}worldSwitchActions(){this.onWorldSwitched.push(()=>{this.protocolCustomBlocks.clear(),this.sectionsOffsetsAnimations={},this.waypoints.clear(),this.cinimaticScript.stopScript(),this.fireworks.clear()})}downloadWorldGeometry(){Yi(this,new Y.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),this.cameraShake.getBaseRotation(),"world-geometry.json")}updateEntity(e,i=!1){let n={rotation:{head:{x:e.headPitch??e.pitch,y:e.headYaw,z:0}}};i?this.entities.updateEntityPosition(e,!1,n):this.entities.update(e,n)}updatePlayerEntity(e){this.entities.handlePlayerEntity(e)}resetScene(){this.sceneOrigin.update(0,0,0),this.cameraWorldPos.x=0,this.cameraWorldPos.y=0,this.cameraWorldPos.z=0,this.scene.matrixAutoUpdate=!1,this.scene.background=new Y.Color(this.initOptions.config.sceneBackground),this.scene.add(this.ambientLight),this.directionalLight.position.set(1,1,.5).normalize(),this.directionalLight.castShadow=!0,this.scene.add(this.directionalLight);let e=this.renderer.getSize(new Y.Vector2);this.camera=new Y.PerspectiveCamera(75,e.x/e.y,.1,1e3),this._wrapCameraPositionWithWarning(),this.cameraContainer=new Y.Object3D,this.cameraContainer.add(this.camera),this.scene.add(this.cameraContainer)}watchReactivePlayerState(){super.watchReactivePlayerState(),this.onReactivePlayerStateUpdated("inWater",e=>{this.skyboxRenderer.updateWaterState(e,this.playerStateReactive.waterBreathing)}),this.onReactivePlayerStateUpdated("waterBreathing",e=>{this.skyboxRenderer.updateWaterState(this.playerStateReactive.inWater,e)}),this.onReactivePlayerStateUpdated("ambientLight",e=>{e&&(this.ambientLight.intensity=e)}),this.onReactivePlayerStateUpdated("directionalLight",e=>{e&&(this.directionalLight.intensity=e)}),this.onReactivePlayerStateUpdated("lookingAtBlock",e=>{this.cursorBlock.setHighlightCursorBlock(e?new Ht(e.x,e.y,e.z):null,e?.shapes)}),this.onReactivePlayerStateUpdated("diggingBlock",e=>{this.cursorBlock.updateBreakAnimation(e?{x:e.x,y:e.y,z:e.z}:void 0,e?.stage??null,e?.mergedShape)}),this.onReactivePlayerStateUpdated("perspective",e=>{let i=new Ht(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z);this.updateCamera(i,this.cameraShake.getBaseRotation().yaw,this.cameraShake.getBaseRotation().pitch)})}watchReactiveConfig(){super.watchReactiveConfig(),this.onReactiveConfigUpdated("showChunkBorders",i=>{this.updateShowChunksBorder(i)}),this.onReactiveConfigUpdated("defaultSkybox",i=>{this.skyboxRenderer.updateDefaultSkybox(i)});let e=this.displayOptions.inWorldRenderingConfig.handRenderer;this.onReactiveConfigUpdated("handRenderer",i=>{if(i===e)return;e=i;let n=this.holdingBlock.ready,s=this.holdingBlockLeft.ready;this.holdingBlock.dispose(),this.holdingBlockLeft.dispose(),this.holdingBlock=v5(this),this.holdingBlockLeft=v5(this,!0),n&&(this.holdingBlock.ready=!0,this.holdingBlock.updateItem()),s&&(this.holdingBlockLeft.ready=!0,this.holdingBlockLeft.updateItem())}),this.onReactiveConfigUpdated("*",()=>{this.updateModulesFromConfig()}),this.updateModulesFromConfig()}updateModulesFromConfig(){let{moduleStates:e}=this.worldRendererConfig;for(let[i,n]of Object.entries(this.modules)){let s=e[i];if(s==="enabled"){n.enabled||this.toggleModule(i,!0);continue}if(s==="disabled"){n.enabled&&!n.manifest.cannotBeDisabled&&this.toggleModule(i,!1);continue}if(s==="auto"||s===void 0)if(n.controller.autoEnableCheck){let o=n.controller.autoEnableCheck();o&&!n.enabled?this.toggleModule(i,!0):!o&&n.enabled&&!n.manifest.cannotBeDisabled&&this.toggleModule(i,!1)}else{let o=n.manifest.enabledDefault??!1;o&&!n.enabled?this.toggleModule(i,!0):!o&&n.enabled&&!n.manifest.cannotBeDisabled&&this.toggleModule(i,!1)}}}changeHandSwingingState(e,i=!1){let n=i?this.holdingBlockLeft:this.holdingBlock;e?n.startSwing():n.stopSwing()}async updateAssetsData(){let e=this.resourcesManager.currentResources,i=this.material.map,n=this.itemsTexture,s=Z1(e.blocksAtlasImage);s.needsUpdate=!0,s.flipY=!1,this.material.map=s;let o=Z1(e.itemsAtlasImage);o.needsUpdate=!0,o.flipY=!1,this.itemsTexture=o,i&&i.dispose(),n&&n.dispose(),await super.updateAssetsData(),this.onAllTexturesLoaded(),Object.keys(this.loadedChunks).length>0&&this.rerenderAllChunks()}onAllTexturesLoaded(){this.holdingBlock.ready=!0,this.holdingBlock.updateItem(),this.holdingBlockLeft.ready=!0,this.holdingBlockLeft.updateItem()}changeBackgroundColor(e){this.realScene.background=new Y.Color(e[0],e[1],e[2])}changeCardinalLight(e){this.worldRendererConfig.cardinalLight=e}timeUpdated(e){let i=this.getModule("starfield");i?.updateTimeOfDay&&i.updateTimeOfDay(e),this.skyboxRenderer.updateTime(e)}biomeUpdated(e){e?.temperature!==void 0&&this.skyboxRenderer.updateTemperature(e.temperature)}biomeReset(){this.skyboxRenderer.updateTemperature(Ni)}getItemRenderData(e,i){return z6(e,i,this.resourcesManager,this.playerStateReactive)}async demoModel(){let e=cursorBlockRel(0,1,0).position,i=await e5();yr(i,e);let n=new Y.BoxHelper(i,16776960);i.add(n),this.realScene.add(i)}demoItem(){let e=cursorBlockRel(0,1,0).position,{mesh:i}=this.entities.getItemMesh({itemId:541},{});i.position.set(e.x+.5,e.y+.5,e.z+.5);let n=new Y.BoxHelper(i,16776960);i.add(n),this.realScene.add(i)}addDebugOverlay(){if(this.debugOverlayAdded)return;this.debugOverlayAdded=!0;let e=ue("debug-overlay");setInterval(()=>{if(e.setVisibility(this.displayAdvancedStats),this.displayAdvancedStats){let i=o=>new Intl.NumberFormat("en-US",{}).format(o),n="";n+=`C: ${i(this.renderer.info.render.calls)} `,n+=`TR: ${i(this.renderer.info.render.triangles)} `,n+=`TE: ${i(this.renderer.info.memory.textures)} `,n+=`F: ${i(this.tilesRendered)} `,n+=`B: ${i(this.blocksRendered)} `,n+=`MEM: ${this.chunkMeshManager.getEstimatedMemoryUsage().total} `;let s=this.chunkMeshManager.getStats();n+=`POOL: ${s.activeCount}/${s.poolSize} HR: ${s.hitRate}`,e.updateText(n),this.backendInfoReport=n}},200)}updatePosDataChunk(e){let[i,n,s]=e.split(",").map(l=>Math.floor(+l/16)),o=Math.abs(i-this.cameraSectionPos.x)+Math.abs(n-this.cameraSectionPos.y)+Math.abs(s-this.cameraSectionPos.z),a=this.sectionObjects[e],v=a.mesh??a.children.find(l=>l.name==="mesh");v.renderOrder=500-o}updateViewerPosition(e){this.viewerChunkPosition=e}cameraSectionPositionUpdate(){for(let e in this.sectionObjects)this.sectionObjects[e]&&this.updatePosDataChunk(e)}getDir(e,i){return e===i?0:e<i?1:-1}finishChunk(e){this.chunkMeshManager.finishChunkDisplay(e)}applyPendingSectionUpdates(){if(this.pendingSectionUpdates.size===0)return;let e=performance.now(),i=this.getSectionHeight(),n=[];for(let s of this.pendingSectionUpdates.keys()){let o=this.pendingSectionBufferStartTimes.get(s)??e;if(e-o<m5.MAX_SECTION_UPDATE_BUFFER_MS){let[v,l,c]=s.split(",").map(Number),d=[`${v-16},${l},${c}`,`${v+16},${l},${c}`,`${v},${l-i},${c}`,`${v},${l+i},${c}`,`${v},${l},${c-16}`,`${v},${l},${c+16}`],h=!1;for(let p of d)if(this.sectionsWaiting.has(p)&&!this.pendingSectionUpdates.has(p)&&this.sectionObjects[p]){h=!0;break}if(h)continue}n.push(s)}if(n.length!==0)for(let s of n){let o=this.pendingSectionUpdates.get(s);this.pendingSectionUpdates.delete(s),this.pendingSectionBufferStartTimes.delete(s);let a=o.key.split(","),v=`${a[0]},${a[2]}`;if(!this.loadedChunks[v]||!this.active){this.chunkMeshManager.releaseSection(o.key);continue}if(!o.geometry.positions.length){this.chunkMeshManager.releaseSection(o.key);continue}this.chunkMeshManager.updateSection(o.key,o.geometry),this.updatePosDataChunk(o.key)}}clearPendingSectionUpdatesForChunk(e,i){for(let n of[...this.pendingSectionUpdates.keys()])n.startsWith(`${e},`)&&n.endsWith(`,${i}`)&&(this.pendingSectionUpdates.delete(n),this.pendingSectionBufferStartTimes.delete(n))}handleWorkerMessage(e){if(e.type==="geometry"){let i=e.key.split(","),n=`${i[0]},${i[2]}`;if(!this.loadedChunks[n]||!this.active){this.pendingSectionUpdates.delete(e.key),this.pendingSectionBufferStartTimes.delete(e.key);return}if(this.sectionObjects[e.key]){this.pendingSectionUpdates.set(e.key,e),this.pendingSectionBufferStartTimes.has(e.key)||this.pendingSectionBufferStartTimes.set(e.key,performance.now());return}if(!e.geometry.positions.length){this.chunkMeshManager.releaseSection(e.key);return}this.chunkMeshManager.updateSection(e.key,e.geometry),this.updatePosDataChunk(e.key)}}getSignTexture(e,i,n,s=!1){let o=de(e),a=this.chunkTextures.get(`${o[0]},${o[1]}`);a||(a={},this.chunkTextures.set(`${o[0]},${o[1]}`,a));let v=`${e.x},${e.y},${e.z}`;if(a[v])return a[v];let l=$8(this.version),c=I5(i,n,l);if(!c)return;let d=new Y.Texture(c);return d.magFilter=Y.NearestFilter,d.minFilter=Y.NearestFilter,d.needsUpdate=!0,a[v]=d,d}getCameraPosition(e){return(e??this._tmpCameraPos).set(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z)}getSectionCameraPosition(){let e=this.getCameraPosition();return new Ht(Math.floor(e.x/16),Math.floor(e.y/16),Math.floor(e.z/16))}updateCameraSectionPos(){let e=this.getSectionCameraPosition();this.cameraSectionPos.equals(e)||(this.cameraSectionPos=e,this.cameraSectionPositionUpdate())}setFirstPersonCamera(e,i,n){let s=this.playerStateReactive.eyeHeight;this.updateCamera(e?.offset(0,s,0)??null,i,n),this.media.tryIntersectMedia(),this.updateCameraSectionPos()}getThirdPersonCamera(e,i,n){e??(e=new Y.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z));let s=this.playerStateReactive.perspective==="third_person_back",o=4,a=this._tpDirection.set(0,0,-1),v=this._tpPitchQuat.setFromAxisAngle(this._tpAxisX,n),l=this._tpYawQuat.setFromAxisAngle(this._tpAxisY,i),c=this._tpFinalQuat.multiplyQuaternions(l,v);a.applyQuaternion(c),s&&a.multiplyScalar(-1),this.DEBUG_RAYCAST&&this.debugRaycast(e,a,o);let d=this._tpScenePos.set(this.sceneOrigin.toSceneX(e.x),this.sceneOrigin.toSceneY(e.y),this.sceneOrigin.toSceneZ(e.z)),h=this._tpRaycaster;h.set(d,a),h.far=o;let p=Object.values(this.sectionObjects).filter(_=>_.name==="chunk"&&_.visible).filter(_=>{let S=_.children.find(H=>H.name==="mesh");if(!S)return!1;let M=this._tpChunkWorldPos;return S.getWorldPosition(M),d.distanceTo(M)<80}),g=[];for(let _ of p){let S=_.children.find(M=>M.name==="mesh");S&&g.push(S)}let b=h.intersectObjects(g,!1),A=o;return b.length>0&&(A=Math.max(.5,b[0].distance-.2)),new Ht(e.x+a.x*A,e.y+a.y*A,e.z+a.z*A)}debugRaycast(e,i,n){this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0);let s=new Y.Vector3(this.sceneOrigin.toSceneX(e.x),this.sceneOrigin.toSceneY(e.y),this.sceneOrigin.toSceneZ(e.z));this.debugRaycastHelper=new Y.ArrowHelper(i.clone().normalize(),s,n,16711680,n*.1,n*.05),this.realScene.add(this.debugRaycastHelper);let o=new Y.SphereGeometry(.2,8,8),a=new Y.MeshBasicMaterial({color:65280});this.debugHitPoint=new Y.Mesh(o,a),this.debugHitPoint.position.copy(s).add(i.clone().multiplyScalar(n)),this.realScene.add(this.debugHitPoint)}setCinimaticCamera(e,i,n){this.cameraWorldPos.x=e.x,this.cameraWorldPos.y=e.y,this.cameraWorldPos.z=e.z,this.sceneOrigin.update(e.x,e.y,e.z),this.cameraObject.position.set(0,0,0),this.cameraShake.setBaseRotation(n,i),this.updateCameraSectionPos()}setCinimaticFov(e){this.camera.fov=e,this.camera.updateProjectionMatrix()}updateCamera(e,i,n){if(!this.cinimaticScript.running){if(e){this.renderer.xr.isPresenting&&(e.y-=this.camera.position.y),this.currentPosTween?.stop();let s=this.displayOptions.inWorldRenderingConfig.instantCameraUpdate?0:this.playerStateUtils.isSpectatingEntity()?150:50;this.currentPosTween=new S0(this.cameraWorldPos).to({x:e.x,y:e.y,z:e.z},s).onUpdate(()=>{this.sceneOrigin.update(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),this.cameraObject.position.set(0,0,0)}).start()}if(this.playerStateUtils.isSpectatingEntity()){let s=this.cameraShake.getBaseRotation(),o=0,a=Math.PI/2;s.yaw<a&&i>Math.PI+a?o=-Math.PI*2:i<a&&s.yaw>Math.PI+a&&(o=Math.PI*2),this.currentRotTween?.stop(),this.currentRotTween=new S0(s).to({pitch:n,yaw:i+o},100).onUpdate(v=>this.cameraShake.setBaseRotation(v.pitch,v.yaw-o)).start()}else{this.currentRotTween?.stop(),this.cameraShake.setBaseRotation(n,i);let{perspective:s}=this.playerStateReactive;if(s==="third_person_back"||s==="third_person_front"){let o=new Y.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),a=this.getThirdPersonCamera(o,i,n),v=o.distanceTo(new Y.Vector3(a.x,a.y,a.z)),l=s==="third_person_back"?v:-v;this.camera.position.set(0,0,l),s==="third_person_front"?this.camera.rotation.set(0,Math.PI,0):this.camera.rotation.set(0,0,0)}else this.camera.position.z=0,this.camera.rotation.set(0,0,0),this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}this.updateCameraSectionPos()}}debugChunksVisibilityOverride(){let{chunksRenderAboveOverride:e,chunksRenderBelowOverride:i,chunksRenderDistanceOverride:n,chunksRenderAboveEnabled:s,chunksRenderBelowEnabled:o,chunksRenderDistanceEnabled:a}=this.reactiveDebugParams,v=this.getSectionHeight(),l=this.cameraSectionPos.y*v;if(this.displayOptions.inWorldRenderingConfig.enableDebugOverlay&&e!==void 0||i!==void 0||n!==void 0)for(let[c,d]of Object.entries(this.sectionObjects)){if(d._waitingForChunkDisplay)continue;let[h,p,g]=c.split(",").map(Number),b=s&&e!==void 0?p<=l+e:o&&i!==void 0?p>=l-i:a&&n!==void 0?Math.abs(p-l)<=n:!0;d.visible=b}else this.chunkMeshManager.updateSectionsVisibility()}render(e=!1){if(this.currentRenderedFrames++,this.reactiveDebugParams.stopRendering)return;this.debugChunksVisibilityOverride();let i=performance.now();this.lastRendered=performance.now();let n=this.lastRenderTime>0?Math.min(Math.max((i-this.lastRenderTime)/1e3,0),.1):1/60;this.lastRenderTime=i,this.cursorBlock.render(),this.updateSectionOffsets();let s=this.getCameraPosition();if(this.skyboxRenderer.update(s,this.viewDistance),e||this.displayOptions.inWorldRenderingConfig.fov!==this.camera.fov){let c=this.renderer.getSize(new Y.Vector2);this.camera.aspect=c.width/c.height,this.camera.fov=this.displayOptions.inWorldRenderingConfig.fov,this.camera.updateProjectionMatrix()}this.reactiveDebugParams.disableEntities||this.entities.render();let a=this.cameraGroupVr instanceof Y.Group?this.cameraGroupVr.children.find(c=>c instanceof Y.PerspectiveCamera):this.camera;this.applyPendingSectionUpdates(),this.renderer.render(this.scene,a),this.displayOptions.inWorldRenderingConfig.showHand&&this.playerStateReactive.gameMode!=="spectator"&&this.playerStateReactive.perspective==="first_person"&&!this.renderer.xr.isPresenting&&(this.holdingBlock.render(this.camera,this.renderer,this.ambientLight,this.directionalLight),this.holdingBlockLeft.render(this.camera,this.renderer,this.ambientLight,this.directionalLight));for(let c of this.fountains)this.sectionObjects[c.sectionId]&&!this.sectionObjects[c.sectionId].foutain&&(c.createParticles(this.sectionObjects[c.sectionId]),this.sectionObjects[c.sectionId].foutain=!0),c.render();this.waypoints.render(),this.fireworks.update();for(let c of this.onRender)c(n);let l=performance.now()-i;this.worldRendererConfig.autoLowerRenderDistance&&this.chunkMeshManager.recordRenderTime(l),this.renderTimeAvgCount++,this.renderTimeAvg=(this.renderTimeAvg*(this.renderTimeAvgCount-1)+l)/this.renderTimeAvgCount,this.renderTimeMax=Math.max(this.renderTimeMax,l)}renderHead(e,i,n,s){let o;if(s.SkullOwner?o=s.SkullOwner.Properties?.textures?.[0]?.Value:o=s.profile?.properties?.find(a=>a.name==="textures")?.value,!!o)try{let v=JSON.parse(L.from(o,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:l}=this.worldRendererConfig;l&&(v=v?.replace("http://textures.minecraft.net/",l).replace("https://textures.minecraft.net/",l));let c=St(this,v,Ct.head),d=new Y.Group;return n&&c.position.set(0,.3125,.3125),c.position.y-=23/16,d.add(c),this.sceneOrigin.track(d),d.position.set(e.x+.5,e.y+.045,e.z+.5),d.rotation.set(0,-Y.MathUtils.degToRad(i*(n?90:45/2)),0),d.scale.set(.8,.8,.8),d}catch{}}renderSign(e,i,n,s,o){let a=this.getSignTexture(e,o,s);if(!a)return;let v=new Y.Mesh(new Y.PlaneGeometry(1,1),new Y.MeshBasicMaterial({map:a,transparent:!0}));v.renderOrder=999;let l=7/16,c=s?1.3:1;v.scale.set(1*c,l*c,1*c);let d=(s?2:1.5)/16,h=.25/16;n&&!s?v.position.set(0,0,-.5+d+h+1e-4):v.position.set(0,0,d/2+1e-4);let p=new Y.Group;p.rotation.set(0,-Y.MathUtils.degToRad(i*(n?90:45/2)),0),p.add(v);let g=(s?10:8)/16,b=(s?0:n?4.333:9.333)/16,A=g/2+b;return this.sceneOrigin.track(p),p.position.set(e.x+.5,e.y+A,e.z+.5),p}lightUpdate(e,i){for(let n=this.worldSizeParams.minY;n<this.worldSizeParams.worldHeight;n+=16)this.setSectionDirty(new Ht(e,n,i))}rerenderAllChunks(){for(let e of Object.keys(this.sectionObjects)){let[i,n,s]=e.split(",").map(Number);this.setSectionDirty(new Ht(i,n,s))}}updateShowChunksBorder(e){this.chunkMeshManager.updateAllBoxHelpers(e)}resetWorld(){super.resetWorld(),this.pendingSectionUpdates.clear(),this.pendingSectionBufferStartTimes.clear(),this.chunkMeshManager.dispose(),this.chunkMeshManager=new h5(this,this.scene,this.material,this.worldSizeParams.worldHeight,this.viewDistance),this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}getLoadedChunksRelative(e,i=!1){let[n,s,o]=D1(e);return Object.fromEntries(Object.entries(this.sectionObjects).map(([a,v])=>{let[l,c,d]=a.split(",").map(Number),[h,p,g]=D1({x:l,y:c,z:d});return[i?`${h-n},${p-s},${g-o}`:`${h-n},${g-o}`,v]}))}cleanChunkTextures(e,i){let n=this.chunkTextures.get(`${Math.floor(e/16)},${Math.floor(i/16)}`)??{};for(let s of Object.keys(n))n[s].dispose(),delete n[s];this.chunkMeshManager.cleanSignChunkTextures(e,i)}readdChunks(){for(let e of Object.keys(this.sectionObjects))this.scene.remove(this.sectionObjects[e]);setTimeout(()=>{for(let e of Object.keys(this.sectionObjects))this.scene.add(this.sectionObjects[e])},500)}disableUpdates(e=this.scene.children){for(let i of e)i.matrixWorldNeedsUpdate=!1,this.disableUpdates(i.children??[])}removeColumn(e,i){super.removeColumn(e,i),this.cleanChunkTextures(e,i),this.clearPendingSectionUpdatesForChunk(e,i);let n=this.getSectionHeight(),s=this.worldMinYRender;for(let o=s;o<this.worldSizeParams.worldHeight;o+=n){let a=`${e},${o},${i}`;this.chunkMeshManager.sectionObjects[a]&&this.chunkMeshManager.releaseSection(a)}this.chunkMeshManager.onChunkRemovedFromGate(`${e},${i}`)}onViewerChunkPositionChanged(){this.chunkMeshManager.tryRevealPending()}setSectionDirty(...e){let[i]=e;this.cleanChunkTextures(i.x,i.z),super.setSectionDirty(...e)}static getRendererInfo(e){try{let i=e.getContext();return`${i.getParameter(i.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)}`}catch{}}worldStop(){this.media.onWorldStop()}destroy(){this.pendingSectionUpdates.clear(),this.pendingSectionBufferStartTimes.clear(),this.chunkMeshManager.dispose(),this.disposeModules(),this.fireworksLegacy.destroy(),super.destroy(),this.skyboxRenderer.dispose(),this.fireworks.dispose()}shouldObjectVisible(e){let n=this.getSectionHeight(),s,o,a,v=this.sceneOrigin.getWorldPosition(e);v?(s=v.x,o=v.y,a=v.z):(s=this.sceneOrigin.toWorldX(e.position.x),o=this.sceneOrigin.toWorldY(e.position.y),a=this.sceneOrigin.toWorldZ(e.position.z));let l=Math.floor(s/16)*16,c=Math.floor(a/16)*16,d=Math.floor(o/n)*n,h=`${l},${c}`,p=`${l},${d},${c}`;return!!this.finishedChunks[h]||!!this.sectionObjects[p]}handleUserClick(e){this.media.handleUserClick(e)}updateSectionOffsets(){let e=performance.now();for(let[i,n]of Object.entries(this.sectionsOffsetsAnimations)){let s=(e-n.time)/1e3;n.time=e,n.currentOffsetX+=n.speedX*s,n.currentOffsetY+=n.speedY*s,n.currentOffsetZ+=n.speedZ*s,n.limitX!==void 0&&(n.speedX>0?n.currentOffsetX=Math.min(n.currentOffsetX,n.limitX):n.currentOffsetX=Math.max(n.currentOffsetX,n.limitX)),n.limitY!==void 0&&(n.speedY>0?n.currentOffsetY=Math.min(n.currentOffsetY,n.limitY):n.currentOffsetY=Math.max(n.currentOffsetY,n.limitY)),n.limitZ!==void 0&&(n.speedZ>0?n.currentOffsetZ=Math.min(n.currentOffsetZ,n.limitZ):n.currentOffsetZ=Math.max(n.currentOffsetZ,n.limitZ));let o=this.sectionObjects[i];o&&(o.position.set(n.currentOffsetX,n.currentOffsetY,n.currentOffsetZ),o.updateMatrix())}}reloadWorld(){this.entities.reloadEntities()}};u(m5,"MAX_SECTION_UPDATE_BUFFER_MS",500);var ie=m5;x();R();T();k();x();R();T();k();x();R();T();k();x();R();T();k();function a2(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}var At=[],Me=!1,ne,R1=-1;function t4(){!Me||!ne||(Me=!1,ne.length?At=ne.concat(At):R1=-1,At.length&&vs())}function vs(){if(!Me){var r=setTimeout(t4,0);Me=!0;for(var t=At.length;t;){for(ne=At,At=[];++R1<t;)ne&&ne[R1].run();R1=-1,t=At.length}ne=null,Me=!1,clearTimeout(r)}}function e4(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];At.push(new ls(r,t)),At.length===1&&!Me&&setTimeout(vs,0)}function ls(r,t){this.fun=r,this.array=t}ls.prototype.run=function(){this.fun.apply(null,this.array)};var i4="browser",n4="x64",r4="browser",s4={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},o4=["/usr/bin/node"],a4=[],v4="v16.8.0",l4={},c4=function(r,t){},d4=function(r){a2("binding")},u4=function(r){return 0},f4=function(){return"/"},h4=function(r){},m4={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function V0(){}var p4=V0,g4=[];function b4(r){a2("_linkedBinding")}var y4={},w4=!1,_4={};function A4(r){a2("dlopen")}function E4(){return[]}function x4(){return[]}var R4=V0,k4=V0,v2=function(){return{}},T4=v2,M4=v2,S4=V0,C4=V0,P4=V0,B4={};function I4(r,t){if(!r)throw new Error(t||"assertion error")}var H4={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},z4=V0,O4=V0;function D4(){return!1}var L4=V0,F4=V0,U4=V0,G4=V0,W4=V0,N4=void 0,V4=void 0,j4=void 0,Y4=V0,Q4=2,K4=1,J4="/bin/usr/node",q4=9229,Z4="node",X4=[],$4=V0,zt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};zt.now===void 0&&(r2=Date.now(),zt.timing&&zt.timing.navigationStart&&(r2=zt.timing.navigationStart),zt.now=()=>Date.now()-r2);var r2;function tv(){return zt.now()/1e3}var s2=1e9;function o2(r){var t=Math.floor((Date.now()-zt.now())*.001),e=zt.now()*.001,i=Math.floor(e)+t,n=Math.floor(e%1*1e9);return r&&(i=i-r[0],n=n-r[1],n<0&&(i--,n+=s2)),[i,n]}o2.bigint=function(r){var t=o2(r);return typeof BigInt>"u"?t[0]*s2+t[1]:BigInt(t[0]*s2)+BigInt(t[1])};var ev=10,iv={},nv=0;function Ot(){return l2}var rv=Ot,sv=Ot,ov=Ot,av=Ot,vv=Ot,lv=V0,cv=Ot,dv=Ot;function uv(r){return[]}var l2={version:v4,versions:l4,arch:n4,platform:r4,release:m4,_rawDebug:p4,moduleLoadList:g4,binding:d4,_linkedBinding:b4,_events:iv,_eventsCount:nv,_maxListeners:ev,on:Ot,addListener:rv,once:sv,off:ov,removeListener:av,removeAllListeners:vv,emit:lv,prependListener:cv,prependOnceListener:dv,listeners:uv,domain:y4,_exiting:w4,config:_4,dlopen:A4,uptime:tv,_getActiveRequests:E4,_getActiveHandles:x4,reallyExit:R4,_kill:k4,cpuUsage:v2,resourceUsage:T4,memoryUsage:M4,kill:S4,exit:C4,openStdin:P4,allowedNodeEnvironmentFlags:B4,assert:I4,features:H4,_fatalExceptions:z4,setUncaughtExceptionCaptureCallback:O4,hasUncaughtExceptionCaptureCallback:D4,emitWarning:c4,nextTick:e4,_tickCallback:L4,_debugProcess:F4,_debugEnd:U4,_startProfilerIdleNotifier:G4,_stopProfilerIdleNotifier:W4,stdout:N4,stdin:j4,stderr:V4,abort:Y4,umask:u4,chdir:h4,cwd:f4,env:s4,title:i4,argv:o4,execArgv:a4,pid:Q4,ppid:K4,execPath:J4,debugPort:q4,hrtime:o2,argv0:Z4,_preload_modules:X4,setSourceMapsEnabled:$4};var c2={},cs=!1;function fv(){if(cs)return c2;cs=!0;var r=l2;function t(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function e(s,o){for(var a="",v=0,l=-1,c=0,d,h=0;h<=s.length;++h){if(h<s.length)d=s.charCodeAt(h);else{if(d===47)break;d=47}if(d===47){if(!(l===h-1||c===1))if(l!==h-1&&c===2){if(a.length<2||v!==2||a.charCodeAt(a.length-1)!==46||a.charCodeAt(a.length-2)!==46){if(a.length>2){var p=a.lastIndexOf("/");if(p!==a.length-1){p===-1?(a="",v=0):(a=a.slice(0,p),v=a.length-1-a.lastIndexOf("/")),l=h,c=0;continue}}else if(a.length===2||a.length===1){a="",v=0,l=h,c=0;continue}}o&&(a.length>0?a+="/..":a="..",v=2)}else a.length>0?a+="/"+s.slice(l+1,h):a=s.slice(l+1,h),v=h-l-1;l=h,c=0}else d===46&&c!==-1?++c:c=-1}return a}function i(s,o){var a=o.dir||o.root,v=o.base||(o.name||"")+(o.ext||"");return a?a===o.root?a+v:a+s+v:v}var n={resolve:function(){for(var o="",a=!1,v,l=arguments.length-1;l>=-1&&!a;l--){var c;l>=0?c=arguments[l]:(v===void 0&&(v=r.cwd()),c=v),t(c),c.length!==0&&(o=c+"/"+o,a=c.charCodeAt(0)===47)}return o=e(o,!a),a?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(t(o),o.length===0)return".";var a=o.charCodeAt(0)===47,v=o.charCodeAt(o.length-1)===47;return o=e(o,!a),o.length===0&&!a&&(o="."),o.length>0&&v&&(o+="/"),a?"/"+o:o},isAbsolute:function(o){return t(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,a=0;a<arguments.length;++a){var v=arguments[a];t(v),v.length>0&&(o===void 0?o=v:o+="/"+v)}return o===void 0?".":n.normalize(o)},relative:function(o,a){if(t(o),t(a),o===a||(o=n.resolve(o),a=n.resolve(a),o===a))return"";for(var v=1;v<o.length&&o.charCodeAt(v)===47;++v);for(var l=o.length,c=l-v,d=1;d<a.length&&a.charCodeAt(d)===47;++d);for(var h=a.length,p=h-d,g=c<p?c:p,b=-1,A=0;A<=g;++A){if(A===g){if(p>g){if(a.charCodeAt(d+A)===47)return a.slice(d+A+1);if(A===0)return a.slice(d+A)}else c>g&&(o.charCodeAt(v+A)===47?b=A:A===0&&(b=0));break}var w=o.charCodeAt(v+A),_=a.charCodeAt(d+A);if(w!==_)break;w===47&&(b=A)}var S="";for(A=v+b+1;A<=l;++A)(A===l||o.charCodeAt(A)===47)&&(S.length===0?S+="..":S+="/..");return S.length>0?S+a.slice(d+b):(d+=b,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(o){return o},dirname:function(o){if(t(o),o.length===0)return".";for(var a=o.charCodeAt(0),v=a===47,l=-1,c=!0,d=o.length-1;d>=1;--d)if(a=o.charCodeAt(d),a===47){if(!c){l=d;break}}else c=!1;return l===-1?v?"/":".":v&&l===1?"//":o.slice(0,l)},basename:function(o,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');t(o);var v=0,l=-1,c=!0,d;if(a!==void 0&&a.length>0&&a.length<=o.length){if(a.length===o.length&&a===o)return"";var h=a.length-1,p=-1;for(d=o.length-1;d>=0;--d){var g=o.charCodeAt(d);if(g===47){if(!c){v=d+1;break}}else p===-1&&(c=!1,p=d+1),h>=0&&(g===a.charCodeAt(h)?--h===-1&&(l=d):(h=-1,l=p))}return v===l?l=p:l===-1&&(l=o.length),o.slice(v,l)}else{for(d=o.length-1;d>=0;--d)if(o.charCodeAt(d)===47){if(!c){v=d+1;break}}else l===-1&&(c=!1,l=d+1);return l===-1?"":o.slice(v,l)}},extname:function(o){t(o);for(var a=-1,v=0,l=-1,c=!0,d=0,h=o.length-1;h>=0;--h){var p=o.charCodeAt(h);if(p===47){if(!c){v=h+1;break}continue}l===-1&&(c=!1,l=h+1),p===46?a===-1?a=h:d!==1&&(d=1):a!==-1&&(d=-1)}return a===-1||l===-1||d===0||d===1&&a===l-1&&a===v+1?"":o.slice(a,l)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return i("/",o)},parse:function(o){t(o);var a={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return a;var v=o.charCodeAt(0),l=v===47,c;l?(a.root="/",c=1):c=0;for(var d=-1,h=0,p=-1,g=!0,b=o.length-1,A=0;b>=c;--b){if(v=o.charCodeAt(b),v===47){if(!g){h=b+1;break}continue}p===-1&&(g=!1,p=b+1),v===46?d===-1?d=b:A!==1&&(A=1):d!==-1&&(A=-1)}return d===-1||p===-1||A===0||A===1&&d===p-1&&d===h+1?p!==-1&&(h===0&&l?a.base=a.name=o.slice(1,p):a.base=a.name=o.slice(h,p)):(h===0&&l?(a.name=o.slice(1,d),a.base=o.slice(1,p)):(a.name=o.slice(h,d),a.base=o.slice(h,p)),a.ext=o.slice(d,p)),h>0?a.dir=o.slice(0,h-1):l&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,c2=n,c2}var j0=fv();var uR=j0._makeLong,fR=j0.basename,hR=j0.delimiter,mR=j0.dirname,pR=j0.extname,gR=j0.format,bR=j0.isAbsolute,d2=j0.join,yR=j0.normalize,wR=j0.parse,_R=j0.posix,AR=j0.relative,ER=j0.resolve,xR=j0.sep,RR=j0.win32;import*as v0 from"three";x();R();T();k();import hv from"prismarine-world";import mv from"prismarine-chunk";var ds=r=>{let t=hv(r),e=mv(r),i=new t(r).sync,n=pv(i);for(let s of n)if(s.startsWith("set")&&s!=="setColumn"){let o=i[s].bind(i);i[s]=(...a)=>{let v=a[0];v.x!==void 0&&!i.getColumnAt(v)&&i.setColumn(Math.floor(v.x/16),Math.floor(v.z/16),new e(void 0)),o(...a)}}return i};function pv(r){let t=new Set,e=r;do for(let i of Object.getOwnPropertyNames(e))typeof r[i]=="function"&&i!=="constructor"&&t.add(i);while(e=Object.getPrototypeOf(e));return[...t]}import{Vec3 as fs}from"vec3";x();R();T();k();var us="1.21.4";var u2=new Date,hs=u2.getMonth()===11&&u2.getDate()>=24&&u2.getDate()<=26,gv=["panorama_3.webp","panorama_1.webp","panorama_4.webp","panorama_5.webp","panorama_0.webp","panorama_2.webp"],k1=class{constructor(t,e,i=!1){this.documentRenderer=t;this.options=e;this.doWorldBlocksPanorama=i;u(this,"camera");u(this,"scene");u(this,"ambientLight");u(this,"directionalLight");u(this,"panoramaGroup",null);u(this,"time",0);u(this,"abortController",new AbortController);u(this,"worldRenderer");u(this,"WorldRendererClass",ie);u(this,"startTimes",new Map);this.scene=new v0.Scene,this.scene.background=new v0.Color(3294568),this.ambientLight=new v0.AmbientLight(13421772),this.scene.add(this.ambientLight),this.directionalLight=new v0.DirectionalLight(16777215,.5),this.directionalLight.position.set(1,1,.5).normalize(),this.directionalLight.castShadow=!0,this.scene.add(this.directionalLight),this.camera=new v0.PerspectiveCamera(85,this.documentRenderer.canvas.width/this.documentRenderer.canvas.height,.05,1e3),this.camera.position.set(0,0,0),this.camera.rotation.set(0,0,0)}async start(){this.doWorldBlocksPanorama?await this.worldBlocksPanorama():this.addClassicPanorama(),this.documentRenderer.render=(t=!1)=>{t&&(this.camera.aspect=this.documentRenderer.canvas.width/this.documentRenderer.canvas.height,this.camera.updateProjectionMatrix()),this.documentRenderer.renderer.render(this.scene,this.camera)}}async debugImageInFrontOfCamera(){let t=await kt(d2("background","panorama_0.webp")),e=new v0.Mesh(new v0.PlaneGeometry(1e3,1e3),new v0.MeshBasicMaterial({map:t}));e.position.set(0,0,-500),e.rotation.set(0,0,0),this.scene.add(e)}addClassicPanorama(){let t=new v0.BoxGeometry(1e3,1e3,1e3),e=[],i=200;for(let o of gv)(async()=>{let{texture:v}=L5(d2("background",hs?"christmas":"",o));v.matrixAutoUpdate=!1,v.matrix.set(-1,0,1,0,1,0,0,0,1),v.wrapS=v0.ClampToEdgeWrapping,v.wrapT=v0.ClampToEdgeWrapping,v.minFilter=v0.LinearFilter,v.magFilter=v0.LinearFilter;let l=new v0.MeshBasicMaterial({map:v,transparent:!0,side:v0.DoubleSide,depthWrite:!1,opacity:0});this.startTimes.set(l,Date.now()),e.push(l)})();let n=new v0.Mesh(t,e);n.onBeforeRender=()=>{this.time+=.01,n.rotation.y=Math.PI+this.time*.01,n.rotation.z=Math.sin(-this.time*.001)*.001;for(let o of e){let a=this.startTimes.get(o);if(a){let v=Date.now()-a,l=Math.min(1,v/i);o.opacity=l}}};let s=new v0.Object3D;if(s.add(n),!hs)for(let o=0;o<20;o++){let a=new _t("1.16.4","squid").mesh;a.position.set(Math.random()*30-15,Math.random()*20-10,Math.random()*10-17),a.rotation.set(0,Math.PI+Math.random(),-Math.PI/4,"ZYX");let v=Math.random()*.01;a.children[0].onBeforeRender=()=>{a.rotation.y+=v,a.rotation.z=Math.cos(n.rotation.y*3)*Math.PI/4-Math.PI/2},s.add(a)}this.scene.add(s),this.panoramaGroup=s}async worldBlocksPanorama(){let t=us,e=new mt;if(e.currentConfig={version:t,noInventoryGui:!0},await e.updateAssetsData?.({}),this.abortController.signal.aborted)return;let i=ds(t),s=xs("prismarine-block")(t),a=globalThis.mcData.blocksArray.filter(w=>{if(!w.name.includes("stained_glass"))return!1;let _=s.fromStateId(w.defaultState,0);if(_.shapes?.length!==1)return!1;let S=_.shapes[0];return S[0]===0&&S[1]===0&&S[2]===0&&S[3]===1&&S[4]===1&&S[5]===1}),v=-15,l=100,c=100;for(let w=-l;w<l;w++)for(let _=-c;_<c;_++){let S=a[Math.floor(Math.random()*a.length)];i.setBlockStateId(new fs(w,_,v),S.defaultState)}this.camera.updateProjectionMatrix(),this.camera.position.set(.5,c/2+.5,.5),this.camera.rotation.set(0,0,0);let d=new fs(...this.camera.position.toArray()),h=new Yt(i,2,d);if(this.abortController.signal.aborted||(this.worldRenderer=new this.WorldRendererClass(this.documentRenderer.renderer,this.options,{version:t,worldView:h,inWorldRenderingConfig:De,playerStateReactive:Gn().reactive,rendererState:Wt().reactive,nonReactiveState:Wt().nonReactive,resourcesManager:e}),this.worldRenderer instanceof ie&&(this.scene=this.worldRenderer.realScene),h.init(d),await this.worldRenderer.waitForChunksToRender(),this.abortController.signal.aborted))return;let{camera:p}=this,g=p.position.x,b=p.position.y,A;document.body.addEventListener("pointermove",w=>{if(w.pointerType!=="mouse")return;let _=new v0.Vector2(w.clientX,w.clientY),S=.2,M=_.x/window.innerWidth-.5,C=-(_.y/window.innerHeight-.5);A?.stop();let H={x:g+M*S,y:b+C*S};A=new S0(p.position).to(H,0),A.start(),p.updateProjectionMatrix()},{signal:this.abortController.signal})}dispose(){this.scene.clear(),this.worldRenderer?.destroy(),this.abortController.abort()}};p5.ColorManagement.enabled=!1;globalThis.THREE=p5;var ms=r=>({updateMap:r.entities.updateMap.bind(r.entities),updateCustomBlock:r.updateCustomBlock.bind(r),getBlockInfo:r.getBlockInfo.bind(r),playEntityAnimation:r.entities.playAnimation.bind(r.entities),damageEntity:r.entities.handleDamageEvent.bind(r.entities),updatePlayerSkin:r.entities.updatePlayerSkin.bind(r.entities),changeHandSwingingState:r.changeHandSwingingState.bind(r),getHighestBlocks:r.getHighestBlocks.bind(r),reloadWorld:r.reloadWorld.bind(r),updateEntityModel:r.entities.updateEntityModel.bind(r.entities),playEntityModelAnimation:r.entities.playEntityModelAnimation.bind(r.entities),addMedia:r.media.addMedia.bind(r.media),destroyMedia:r.media.destroyMedia.bind(r.media),setControlMode:r.media.setControlMode.bind(r.media),setVideoPlaying:r.media.setVideoPlaying.bind(r.media),setVideoSeeking:r.media.setVideoSeeking.bind(r.media),setVideoVolume:r.media.setVideoVolume.bind(r.media),setVideoSpeed:r.media.setVideoSpeed.bind(r.media),handleUserClick:r.media.handleUserClick.bind(r.media),addSectionAnimation(t,e){r.sectionsOffsetsAnimations[t]=e},removeSectionAnimation(t){delete r.sectionsOffsetsAnimations[t]},shakeFromDamage:r.cameraShake.shakeFromDamage.bind(r.cameraShake),onPageInteraction:r.media.onPageInteraction.bind(r.media),downloadMesherLog:r.downloadMesherLog.bind(r),explodeFirework:r.fireworksLegacy.explode.bind(r.fireworksLegacy),explodeFireworkFacingCamera:r.fireworksLegacy.explodeFacingCamera.bind(r.fireworksLegacy),addWaypoint:r.waypoints.addWaypoint.bind(r.waypoints),removeWaypoint:r.waypoints.removeWaypoint.bind(r.waypoints),startCinimaticScript:r.cinimaticScript.startScript.bind(r.cinimaticScript),stopCinimaticScript:r.cinimaticScript.stopScript.bind(r.cinimaticScript),launchFirework:r.fireworks.launchFirework.bind(r.fireworks),setSkyboxImage:r.skyboxRenderer.setSkyboxImage.bind(r.skyboxRenderer),setRain:t=>r.toggleModule("rain",t),spawnBlockBreakParticles(t,e,i,n,s,o){r.getModule("blockBreakParticles")?.spawnBlockBreakParticles(t,e,i,n,s,o)},spawnBlockCrackParticle(t,e,i,n,s,o,a){r.getModule("blockBreakParticles")?.spawnCrackParticle(t,e,i,n,s,o,a)},async loadGeometryExport(t){let{applyWorldGeometryExport:e}=await Promise.resolve().then(()=>(Qi(),W6));return e(r,t)}}),yv=[],T1=(r,...t)=>{for(let e of Object.values(globalThis.loadedMods??{}))try{e.threeJsBackendModule?.[r]?.(...t)}catch(i){let n=`[mod three.js] Error calling ${r} on ${e.name}: ${i}`;throw new Error(n)}},ps=()=>{let r,t=null,e=null,i=null,n=null,s=(c,d)=>{_0?r=C5(c,yv,globalThis):r=c,t=new Ve(r,d?.canvas),globalThis.renderer=t.renderer,globalThis.documentRenderer=t,globalThis.threeJsBackend=l,T1("default",l)},o=async()=>{if(!t)throw new Error("Document renderer not initialized");if(!i&&!e){let c={...r};e=new k1(t,c,!!D.env.SINGLE_FILE_BUILD_MODE),globalThis.panoramaRenderer=e,T1("panoramaCreated",e),await e.start(),T1("panoramaReady",e)}},a=async c=>{let h=_0?C5(c,[mt,jt],globalThis):c;if(!t)throw new Error("Document renderer not initialized");t.nonReactiveState=h.nonReactiveState,globalThis.resourcesManager=h.resourcesManager,e&&(e.dispose(),e=null),i=new ie(t.renderer,r,h),await i.worldReadyPromise,n=new P5(h.nonReactiveState),globalThis.frameTimingCollector=n;let p=t.render;t.render=function(g){p.call(this,g),n?.markFrameStart(),h.inWorldRenderingConfig.paused||i?.render(g),n?.markFrameEnd(),n?.markFrameDisplay()},t.inWorldRenderingConfig=h.inWorldRenderingConfig,globalThis.world=i,T1("worldReady",i)},v=()=>{e&&(e.dispose(),e=null),t&&t.dispose(),i&&(i.destroy(),i=null)},l={id:"threejs",displayName:`three.js ${p5.REVISION}`,startPanorama:o,startWorld:a,disconnect:v,setRendering(c){t.setPaused(!c),i&&(i.renderingActive=c)},getDebugOverlay:()=>({get entitiesString(){return i?.entities.getDebugString()},get left(){return{"Geo Memory":i?.chunkMeshManager.getEstimatedMemoryUsage().total??"-"}}}),updateCamera(c,d,h){n?.markCameraUpdate(!c),i?.setFirstPersonCamera(c,d,h)},get soundSystem(){return i?.soundSystem},get backendMethods(){if(i)return ms(i)}};return{main:{init:s,backend:l},workerProxy(){return $n({init(c,d){s(c,{canvas:d})},updateSizeExternal(c,d,h){t?.updateSizeExternal(c,d,h)},startPanorama:o,startWorld:a,disconnect:v,setRendering:l.setRendering,updateCamera(c,d,h){let p=c?new bv(c.x,c.y,c.z):null;n?.markCameraUpdate(!p),l.updateCamera(p,d,h)},async callBackendMethod(c,...d){if(!i)throw new Error("World renderer not initialized");let p=ms(i)[c];if(!p)throw new Error(`Backend method ${String(c)} is unavailable`);return p(...d)}})}}};var M1=r=>{let{main:t}=ps();return t.init(r),t.backend};M1.id="threejs";M1.displayName="three.js Blocking";M1.description="Simple, old and stable main thread graphics backend providing balanced performance on top of WebGL2.";x();R();T();k();import*as gs from"three";function wv(r){let t="threeWorker.js",e;if(D.env.SINGLE_FILE_BUILD){let i=document.getElementById("three-worker-code").textContent,n=new Blob([i],{type:"text/javascript"});e=new Worker(window.URL.createObjectURL(n))}else e=new Worker(t);return e.onmessage=({data:i})=>{r(i)},e.on&&e.on("message",i=>{e.onmessage({data:i})}),e}var S1=async r=>{let t=wv(()=>{}),e=tr(t),i=W1();i.onSizeChanged((a,v)=>{e.updateSizeExternal(a,v,window.devicePixelRatio||1)});let n=S5(r,t);try{e.init(n,i.canvas)}catch(a){throw Ge(n),a}let s=new Proxy({},{get(a,v){if(typeof v=="string")return async(...l)=>e.callBackendMethod(v,...l)}});return{id:"threejs",displayName:`three.js ${gs.REVISION}`,async startPanorama(){},async startWorld(a){let v={...Ne,items:"itemsArray",entities:"entitiesArray"};ti([t],a.version,v,a.resourcesManager.currentResources.mcData),a.inWorldRenderingConfig.__syncToWorker=!0,a.playerStateReactive&&(a.playerStateReactive.__syncToWorker=!0),a.rendererState&&(a.rendererState.__syncFromWorker=!0),a.nonReactiveState&&(a.nonReactiveState.__syncFromWorker=!0),a.nonReactiveState.__syncFromWorkerInterval=200;let l=S5(a,t);try{await e.startWorld(structuredClone(l))}catch(d){throw Ge(l),d}e.updateSizeExternal(i.size.width,i.size.height,window.devicePixelRatio||1);let c=ue("fps");setInterval(()=>{let{fps:d,avgRenderTime:h,worstRenderTime:p}=a.nonReactiveState;c.updateText(`FPS: ${d.toFixed(0)} (${h.toFixed(0)}ms/${p.toFixed(0)}ms)`),a.nonReactiveState.fps=0},1e3)},disconnect(){i.destroy(),e.disconnect(),t.terminate()},setRendering(a){e.setRendering(a)},updateCamera(a,v,l){e.updateCamera(a?{x:a.x,y:a.y,z:a.z}:null,v,l)},soundSystem:void 0,backendMethods:s}};S1.id="threejs-off-thread";S1.displayName="three.js Multi-thread";S1.description=["Edge-cutting technology that uses a dedicated thread for graphics.","Slightly higher power and RAM usage.","More stable FPS (mid-range devices), but possible inputlag if TPS is low.","On low-end devices it might result in device throttling and stuttering."].join(" ");export{Yn as AppViewer,Ve as DocumentRenderer,ve as LoadedResourcesTransferrable,mt as ResourcesManager,Yt as WorldView,jt as WorldViewWorker,W1 as addCanvasForWorker,ae as chunkPos,S1 as createGraphicsBackendOffThread,M1 as createGraphicsBackendSingleThread,Zv as createWorldRendererConfig,Fn as defaultGraphicsBackendConfig,De as defaultWorldRendererConfig,Nn as delayedIterator,Wt as getDefaultRendererState,Qn as getInitialPlayerState,Qs as getInitialPlayerStateRenderer,Ys as getPlayerStateUtils,_0 as isWebWorker,Ps as sectionPos};
21236
+ }`})}},r2=class{constructor(t){this.worldRenderer=t;u(this,"points");u(this,"clock",new E0.Clock);u(this,"enabled",!1);u(this,"currentTime");u(this,"enablementCheck",()=>this.currentTime?this.currentTime>13500&&this.currentTime<23e3:!1);u(this,"render",t=>{this.points&&(this.points.position.set(0,0,0),this.points.material.uniforms.time.value=this.clock.getElapsedTime()*.2)})}enable(){this.enabled||(this.enabled=!0,this.updateVisibility())}disable(){this.enabled&&(this.enabled=!1,this.removeStars())}toggle(){return this.enabled?this.disable():this.enable(),this.enabled}updateTimeOfDay(t){this.currentTime=t,this.enabled&&this.updateVisibility()}updateVisibility(){if(!this.enabled)return;let t=this.enablementCheck?.()??!1;t&&!this.points?this.createStars():!t&&this.points&&this.removeStars()}createStars(){if(this.points)return;let t=80,e=50,i=7e3,n=7,s=10,o=new E0.BufferGeometry,a=b=>new E0.Vector3().setFromSpherical(new E0.Spherical(b,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),v=[],l=[],c=Array.from({length:i},()=>(.5+.5*Math.random())*n),d=new E0.Color,h=t+e,p=e/i;for(let b=0;b<i;b++)h-=p*Math.random(),v.push(...a(h).toArray()),d.setHSL(b/i,s,.9),l.push(d.r,d.g,d.b);o.setAttribute("position",new E0.Float32BufferAttribute(v,3)),o.setAttribute("color",new E0.Float32BufferAttribute(l,3)),o.setAttribute("size",new E0.Float32BufferAttribute(c,1));let g=new n2;g.blending=E0.AdditiveBlending,g.depthTest=!1,g.transparent=!0,this.points=new E0.Points(o,g),this.points.renderOrder=-1,this.worldRenderer.scene.add(this.points)}dispose(){this.removeStars()}removeStars(){this.points&&(this.points.geometry.dispose(),this.points.material.dispose(),this.worldRenderer.scene.remove(this.points),this.points=void 0)}},os={id:"starfield",controller:r2,enabledDefault:!0,cannotBeDisabled:!0};var as={starfield:os,futuristicReveal:ss,rain:ns,cameraBobbing:$6,blockBreakParticles:X6};var p5=class p5 extends G5{constructor(e,i,n){if(!n.resourcesManager)throw new Error("resourcesManager is required in displayOptions");super(n.resourcesManager,n,i);this.renderer=e;this.initOptions=i;this.displayOptions=n;u(this,"outputFormat","threeJs");u(this,"chunkMeshManager");u(this,"chunkTextures",new Map);u(this,"signsCache",new Map);u(this,"cameraSectionPos",new Ht(0,0,0));u(this,"holdingBlock");u(this,"holdingBlockLeft");u(this,"scene",new Y.Scene);u(this,"ambientLight",new Y.AmbientLight(13421772));u(this,"directionalLight",new Y.DirectionalLight(16777215,.5));u(this,"entities",new v1(this,globalThis.mcData));u(this,"cameraGroupVr");u(this,"material",new Y.MeshBasicMaterial({vertexColors:!0,transparent:!0,alphaTest:.1}));u(this,"itemsTexture");u(this,"cursorBlock");u(this,"onRender",[]);u(this,"lastRenderTime",0);u(this,"cameraShake");u(this,"cameraContainer");u(this,"media");u(this,"waypoints");u(this,"cinimaticScript");u(this,"camera");u(this,"renderTimeAvg",0);u(this,"pendingSectionUpdates",new Map);u(this,"pendingSectionBufferStartTimes",new Map);u(this,"modules",{});u(this,"sectionsOffsetsAnimations",{});u(this,"fountains",[]);u(this,"fireworksLegacy");u(this,"DEBUG_RAYCAST",!1);u(this,"skyboxRenderer");u(this,"fireworks");u(this,"sceneOrigin",new w1(this.scene));u(this,"cameraWorldPos",{x:0,y:0,z:0});u(this,"_cameraPositionAccessWarned",!1);u(this,"_tmpCameraPos",new Y.Vector3);u(this,"currentPosTween");u(this,"currentRotTween");u(this,"_tpDirection",new Y.Vector3);u(this,"_tpPitchQuat",new Y.Quaternion);u(this,"_tpYawQuat",new Y.Quaternion);u(this,"_tpFinalQuat",new Y.Quaternion);u(this,"_tpScenePos",new Y.Vector3);u(this,"_tpAxisX",new Y.Vector3(1,0,0));u(this,"_tpAxisY",new Y.Vector3(0,1,0));u(this,"_tpRaycaster",new Y.Raycaster);u(this,"_tpChunkWorldPos",new Y.Vector3);u(this,"debugOverlayAdded",!1);u(this,"debugRaycastHelper");u(this,"debugHitPoint");u(this,"prevFramePerspective",null);this.renderer=e,n.rendererState.renderer=p5.getRendererInfo(e)??"...",this.chunkMeshManager=new m5(this,this.scene,this.material,this.worldSizeParams.worldHeight,this.viewDistance),this.onRenderDistanceChanged=s=>{this.chunkMeshManager.updateViewDistance(s)},this.cursorBlock=new l1(this),this.holdingBlock=l5(this),this.holdingBlockLeft=l5(this,!0);for(let s of Object.values(as))this.registerModule(s);this.skyboxRenderer=new b1(this.realScene,!1,null),this.skyboxRenderer.init(),this.addDebugOverlay(),this.resetScene(),this.init(),this.soundSystem=new d1(this),this.cameraShake=new u1(this,this.onRender),this.media=new f1(this),this.fireworksLegacy=new p1(this),this.waypoints=new m1(this),this.cinimaticScript=new g1(this,(s,o,a)=>this.setCinimaticCamera(s,o,a),s=>this.setCinimaticFov(s),()=>({position:new Ht(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),yaw:this.cameraShake.getBaseRotation().yaw,pitch:this.cameraShake.getBaseRotation().pitch,fov:this.camera.fov})),this.fireworks=new y1(this.realScene,this.sceneOrigin),this.renderUpdateEmitter.on("chunkFinished",s=>{this.finishChunk(s)}),this.worldSwitchActions(),this.initializeModules()}get sectionObjects(){return this.chunkMeshManager.sectionObjects}get realScene(){return this.scene}get waitingChunksToDisplay(){return this.chunkMeshManager.waitingChunksToDisplay}get estimatedMemoryUsage(){return this.chunkMeshManager.getEstimatedMemoryUsage().total}get tilesRendered(){return this.chunkMeshManager.getTotalTiles()}get blocksRendered(){return this.chunkMeshManager.getTotalBlocks()}registerModule(e){if(e.id in this.modules)return;let i=new e.controller(this),n={manifest:e,controller:i,enabled:!1,toggle:()=>this.toggleModule(e.id)};this.modules[e.id]=n,e.enabledDefault&&this.toggleModule(e.id,!0)}enableModule(e){let i=this.modules[e];i&&(i.enabled||(i.enabled=!0,i.controller.enable(),i.controller.render&&this.onRender.push(i.controller.render)))}disableModule(e){let i=this.modules[e];if(i&&!i.manifest.cannotBeDisabled&&i.enabled&&(i.enabled=!1,i.controller.disable(),i.controller.render)){let n=this.onRender.indexOf(i.controller.render);n>-1&&this.onRender.splice(n,1)}}toggleModule(e,i){let n=this.modules[e];if(!n)return!1;let s=i!==void 0?i:!n.enabled;if(s===n.enabled)return n.enabled;if(!s&&n.manifest.cannotBeDisabled)return!0;if(n.enabled=s,s)n.controller.enable(),n.controller.render&&!this.onRender.includes(n.controller.render)&&this.onRender.push(n.controller.render);else if(n.controller.disable(),n.controller.render){let o=this.onRender.indexOf(n.controller.render);o>-1&&this.onRender.splice(o,1)}return s}disposeModules(){for(let e of Object.values(this.modules))e.controller.dispose();this.modules={}}initializeModules(){this.updateModulesFromConfig()}getModule(e){return this.modules[e]?.controller}anyModuleRequiresHeightmap(){return Object.values(this.modules).some(e=>e.enabled&&e.manifest.requiresHeightmap)}get cameraObject(){return this.cameraGroupVr??this.cameraContainer}_wrapCameraPositionWithWarning(){let e=this.camera.position,i=this,n=20,s=(v,l,c)=>Math.abs(v)>n||Math.abs(l)>n||Math.abs(c)>n,o=()=>{!i._cameraPositionAccessWarned&&typeof D<"u"},a=new Proxy(e,{set(v,l,c){return(l==="x"||l==="y"||l==="z")&&typeof c=="number"&&Math.abs(c)>n&&o(),v[l]=c,!0},get(v,l,c){let d=v[l];return l==="set"?function(h,p,g){return s(h,p,g)&&o(),v.set(h,p,g)}:l==="setX"||l==="setY"||l==="setZ"?function(h){return Math.abs(h)>n&&o(),v[l](h)}:l==="copy"?function(h){return s(h.x,h.y,h.z)&&o(),v.copy(h)}:typeof d=="function"?d.bind(v):d}});Object.defineProperty(this.camera,"position",{value:a,configurable:!0,enumerable:!0})}worldSwitchActions(){this.onWorldSwitched.push(()=>{this.protocolCustomBlocks.clear(),this.sectionsOffsetsAnimations={},this.waypoints.clear(),this.cinimaticScript.stopScript(),this.fireworks.clear()})}downloadWorldGeometry(){Qi(this,new Y.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),this.cameraShake.getBaseRotation(),"world-geometry.json")}updateEntity(e,i=!1){let n={rotation:{head:{x:e.headPitch??e.pitch,y:e.headYaw,z:0}}};i?this.entities.updateEntityPosition(e,!1,n):this.entities.update(e,n)}updatePlayerEntity(e){this.entities.handlePlayerEntity(e)}resetScene(){this.sceneOrigin.update(0,0,0),this.cameraWorldPos.x=0,this.cameraWorldPos.y=0,this.cameraWorldPos.z=0,this.scene.matrixAutoUpdate=!1,this.scene.background=new Y.Color(this.initOptions.config.sceneBackground),this.scene.add(this.ambientLight),this.directionalLight.position.set(1,1,.5).normalize(),this.directionalLight.castShadow=!0,this.scene.add(this.directionalLight);let e=this.renderer.getSize(new Y.Vector2);this.camera=new Y.PerspectiveCamera(75,e.x/e.y,.1,1e3),this._wrapCameraPositionWithWarning(),this.cameraContainer=new Y.Object3D,this.cameraContainer.add(this.camera),this.scene.add(this.cameraContainer)}watchReactivePlayerState(){super.watchReactivePlayerState(),this.onReactivePlayerStateUpdated("inWater",e=>{this.skyboxRenderer.updateWaterState(e,this.playerStateReactive.waterBreathing)}),this.onReactivePlayerStateUpdated("waterBreathing",e=>{this.skyboxRenderer.updateWaterState(this.playerStateReactive.inWater,e)}),this.onReactivePlayerStateUpdated("ambientLight",e=>{e&&(this.ambientLight.intensity=e)}),this.onReactivePlayerStateUpdated("directionalLight",e=>{e&&(this.directionalLight.intensity=e)}),this.onReactivePlayerStateUpdated("lookingAtBlock",e=>{this.cursorBlock.setHighlightCursorBlock(e?new Ht(e.x,e.y,e.z):null,e?.shapes)}),this.onReactivePlayerStateUpdated("diggingBlock",e=>{this.cursorBlock.updateBreakAnimation(e?{x:e.x,y:e.y,z:e.z}:void 0,e?.stage??null,e?.mergedShape)}),this.onReactivePlayerStateUpdated("perspective",e=>{let i=new Ht(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z);this.updateCamera(i,this.cameraShake.getBaseRotation().yaw,this.cameraShake.getBaseRotation().pitch)})}watchReactiveConfig(){super.watchReactiveConfig(),this.onReactiveConfigUpdated("showChunkBorders",i=>{this.updateShowChunksBorder(i)}),this.onReactiveConfigUpdated("defaultSkybox",i=>{this.skyboxRenderer.updateDefaultSkybox(i)});let e=this.displayOptions.inWorldRenderingConfig.handRenderer;this.onReactiveConfigUpdated("handRenderer",i=>{if(i===e)return;e=i;let n=this.holdingBlock.ready,s=this.holdingBlockLeft.ready;this.holdingBlock.dispose(),this.holdingBlockLeft.dispose(),this.holdingBlock=l5(this),this.holdingBlockLeft=l5(this,!0),n&&(this.holdingBlock.ready=!0,this.holdingBlock.updateItem()),s&&(this.holdingBlockLeft.ready=!0,this.holdingBlockLeft.updateItem())}),this.onReactiveConfigUpdated("*",()=>{this.updateModulesFromConfig()}),this.updateModulesFromConfig()}updateModulesFromConfig(){let{moduleStates:e}=this.worldRendererConfig;for(let[i,n]of Object.entries(this.modules)){let s=e[i];if(s==="enabled"){n.enabled||this.toggleModule(i,!0);continue}if(s==="disabled"){n.enabled&&!n.manifest.cannotBeDisabled&&this.toggleModule(i,!1);continue}if(s==="auto"||s===void 0)if(n.controller.autoEnableCheck){let o=n.controller.autoEnableCheck();o&&!n.enabled?this.toggleModule(i,!0):!o&&n.enabled&&!n.manifest.cannotBeDisabled&&this.toggleModule(i,!1)}else{let o=n.manifest.enabledDefault??!1;o&&!n.enabled?this.toggleModule(i,!0):!o&&n.enabled&&!n.manifest.cannotBeDisabled&&this.toggleModule(i,!1)}}}changeHandSwingingState(e,i=!1){let n=i?this.holdingBlockLeft:this.holdingBlock;e?n.startSwing():n.stopSwing()}async updateAssetsData(){let e=this.resourcesManager.currentResources,i=this.material.map,n=this.itemsTexture,s=X1(e.blocksAtlasImage);s.needsUpdate=!0,s.flipY=!1,this.material.map=s;let o=X1(e.itemsAtlasImage);o.needsUpdate=!0,o.flipY=!1,this.itemsTexture=o,i&&i.dispose(),n&&n.dispose(),await super.updateAssetsData(),this.onAllTexturesLoaded(),Object.keys(this.loadedChunks).length>0&&this.rerenderAllChunks()}onAllTexturesLoaded(){this.holdingBlock.ready=!0,this.holdingBlock.updateItem(),this.holdingBlockLeft.ready=!0,this.holdingBlockLeft.updateItem()}changeBackgroundColor(e){this.realScene.background=new Y.Color(e[0],e[1],e[2])}changeCardinalLight(e){this.worldRendererConfig.cardinalLight=e}timeUpdated(e){let i=this.getModule("starfield");i?.updateTimeOfDay&&i.updateTimeOfDay(e),this.skyboxRenderer.updateTime(e)}biomeUpdated(e){e?.temperature!==void 0&&this.skyboxRenderer.updateTemperature(e.temperature)}biomeReset(){this.skyboxRenderer.updateTemperature(Vi)}getItemRenderData(e,i){return z6(e,i,this.resourcesManager,this.playerStateReactive)}async demoModel(){let e=cursorBlockRel(0,1,0).position,i=await i5();yr(i,e);let n=new Y.BoxHelper(i,16776960);i.add(n),this.realScene.add(i)}demoItem(){let e=cursorBlockRel(0,1,0).position,{mesh:i}=this.entities.getItemMesh({itemId:541},{});i.position.set(e.x+.5,e.y+.5,e.z+.5);let n=new Y.BoxHelper(i,16776960);i.add(n),this.realScene.add(i)}addDebugOverlay(){if(this.debugOverlayAdded)return;this.debugOverlayAdded=!0;let e=ue("debug-overlay");setInterval(()=>{if(e.setVisibility(this.displayAdvancedStats),this.displayAdvancedStats){let i=o=>new Intl.NumberFormat("en-US",{}).format(o),n="";n+=`C: ${i(this.renderer.info.render.calls)} `,n+=`TR: ${i(this.renderer.info.render.triangles)} `,n+=`TE: ${i(this.renderer.info.memory.textures)} `,n+=`F: ${i(this.tilesRendered)} `,n+=`B: ${i(this.blocksRendered)} `,n+=`MEM: ${this.chunkMeshManager.getEstimatedMemoryUsage().total} `;let s=this.chunkMeshManager.getStats();n+=`POOL: ${s.activeCount}/${s.poolSize} HR: ${s.hitRate}`,e.updateText(n),this.backendInfoReport=n}},200)}updatePosDataChunk(e){let[i,n,s]=e.split(",").map(l=>Math.floor(+l/16)),o=Math.abs(i-this.cameraSectionPos.x)+Math.abs(n-this.cameraSectionPos.y)+Math.abs(s-this.cameraSectionPos.z),a=this.sectionObjects[e],v=a.mesh??a.children.find(l=>l.name==="mesh");v.renderOrder=500-o}updateViewerPosition(e){this.viewerChunkPosition=e}cameraSectionPositionUpdate(){for(let e in this.sectionObjects)this.sectionObjects[e]&&this.updatePosDataChunk(e)}getDir(e,i){return e===i?0:e<i?1:-1}finishChunk(e){this.chunkMeshManager.finishChunkDisplay(e)}applyPendingSectionUpdates(){if(this.pendingSectionUpdates.size===0)return;let e=performance.now(),i=this.getSectionHeight(),n=[];for(let s of this.pendingSectionUpdates.keys()){let o=this.pendingSectionBufferStartTimes.get(s)??e;if(e-o<p5.MAX_SECTION_UPDATE_BUFFER_MS){let[v,l,c]=s.split(",").map(Number),d=[`${v-16},${l},${c}`,`${v+16},${l},${c}`,`${v},${l-i},${c}`,`${v},${l+i},${c}`,`${v},${l},${c-16}`,`${v},${l},${c+16}`],h=!1;for(let p of d)if(this.sectionsWaiting.has(p)&&!this.pendingSectionUpdates.has(p)&&this.sectionObjects[p]){h=!0;break}if(h)continue}n.push(s)}if(n.length!==0)for(let s of n){let o=this.pendingSectionUpdates.get(s);this.pendingSectionUpdates.delete(s),this.pendingSectionBufferStartTimes.delete(s);let a=o.key.split(","),v=`${a[0]},${a[2]}`;if(!this.loadedChunks[v]||!this.active){this.chunkMeshManager.releaseSection(o.key);continue}if(!o.geometry.positions.length){this.chunkMeshManager.releaseSection(o.key);continue}this.chunkMeshManager.updateSection(o.key,o.geometry),this.updatePosDataChunk(o.key)}}clearPendingSectionUpdatesForChunk(e,i){for(let n of[...this.pendingSectionUpdates.keys()])n.startsWith(`${e},`)&&n.endsWith(`,${i}`)&&(this.pendingSectionUpdates.delete(n),this.pendingSectionBufferStartTimes.delete(n))}handleWorkerMessage(e){if(e.type==="geometry"){let i=e.key.split(","),n=`${i[0]},${i[2]}`;if(!this.loadedChunks[n]||!this.active){this.pendingSectionUpdates.delete(e.key),this.pendingSectionBufferStartTimes.delete(e.key);return}if(this.sectionObjects[e.key]){this.pendingSectionUpdates.set(e.key,e),this.pendingSectionBufferStartTimes.has(e.key)||this.pendingSectionBufferStartTimes.set(e.key,performance.now());return}if(!e.geometry.positions.length){this.chunkMeshManager.releaseSection(e.key);return}this.chunkMeshManager.updateSection(e.key,e.geometry),this.updatePosDataChunk(e.key)}}getSignTexture(e,i,n,s=!1){let o=de(e),a=this.chunkTextures.get(`${o[0]},${o[1]}`);a||(a={},this.chunkTextures.set(`${o[0]},${o[1]}`,a));let v=`${e.x},${e.y},${e.z}`;if(a[v])return a[v];let l=$8(this.version),c=H5(i,n,l);if(!c)return;let d=new Y.Texture(c);return d.magFilter=Y.NearestFilter,d.minFilter=Y.NearestFilter,d.needsUpdate=!0,a[v]=d,d}getCameraPosition(e){return(e??this._tmpCameraPos).set(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z)}getSectionCameraPosition(){let e=this.getCameraPosition();return new Ht(Math.floor(e.x/16),Math.floor(e.y/16),Math.floor(e.z/16))}updateCameraSectionPos(){let e=this.getSectionCameraPosition();this.cameraSectionPos.equals(e)||(this.cameraSectionPos=e,this.cameraSectionPositionUpdate())}setFirstPersonCamera(e,i,n){let s=this.playerStateReactive.eyeHeight;this.updateCamera(e?.offset(0,s,0)??null,i,n),this.media.tryIntersectMedia(),this.updateCameraSectionPos()}getThirdPersonCamera(e,i,n){e??(e=new Y.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z));let s=this.playerStateReactive.perspective==="third_person_back",o=4,a=this._tpDirection.set(0,0,-1),v=this._tpPitchQuat.setFromAxisAngle(this._tpAxisX,n),l=this._tpYawQuat.setFromAxisAngle(this._tpAxisY,i),c=this._tpFinalQuat.multiplyQuaternions(l,v);a.applyQuaternion(c),s&&a.multiplyScalar(-1),this.DEBUG_RAYCAST&&this.debugRaycast(e,a,o);let d=this._tpScenePos.set(this.sceneOrigin.toSceneX(e.x),this.sceneOrigin.toSceneY(e.y),this.sceneOrigin.toSceneZ(e.z)),h=this._tpRaycaster;h.set(d,a),h.far=o;let p=Object.values(this.sectionObjects).filter(_=>_.name==="chunk"&&_.visible).filter(_=>{let S=_.children.find(H=>H.name==="mesh");if(!S)return!1;let M=this._tpChunkWorldPos;return S.getWorldPosition(M),d.distanceTo(M)<80}),g=[];for(let _ of p){let S=_.children.find(M=>M.name==="mesh");S&&g.push(S)}let b=h.intersectObjects(g,!1),A=o;return b.length>0&&(A=Math.max(.5,b[0].distance-.2)),new Ht(e.x+a.x*A,e.y+a.y*A,e.z+a.z*A)}debugRaycast(e,i,n){this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0);let s=new Y.Vector3(this.sceneOrigin.toSceneX(e.x),this.sceneOrigin.toSceneY(e.y),this.sceneOrigin.toSceneZ(e.z));this.debugRaycastHelper=new Y.ArrowHelper(i.clone().normalize(),s,n,16711680,n*.1,n*.05),this.realScene.add(this.debugRaycastHelper);let o=new Y.SphereGeometry(.2,8,8),a=new Y.MeshBasicMaterial({color:65280});this.debugHitPoint=new Y.Mesh(o,a),this.debugHitPoint.position.copy(s).add(i.clone().multiplyScalar(n)),this.realScene.add(this.debugHitPoint)}setCinimaticCamera(e,i,n){this.cameraWorldPos.x=e.x,this.cameraWorldPos.y=e.y,this.cameraWorldPos.z=e.z,this.sceneOrigin.update(e.x,e.y,e.z),this.cameraObject.position.set(0,0,0),this.cameraShake.setBaseRotation(n,i),this.updateCameraSectionPos()}setCinimaticFov(e){this.camera.fov=e,this.camera.updateProjectionMatrix()}updateCamera(e,i,n){if(!this.cinimaticScript.running){if(e){this.renderer.xr.isPresenting&&(e.y-=this.camera.position.y),this.currentPosTween?.stop();let s=this.displayOptions.inWorldRenderingConfig.instantCameraUpdate?0:this.playerStateUtils.isSpectatingEntity()?150:50;this.currentPosTween=new S0(this.cameraWorldPos).to({x:e.x,y:e.y,z:e.z},s).onUpdate(()=>{this.sceneOrigin.update(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),this.cameraObject.position.set(0,0,0)}).start()}if(this.playerStateUtils.isSpectatingEntity()){let s=this.cameraShake.getBaseRotation(),o=0,a=Math.PI/2;s.yaw<a&&i>Math.PI+a?o=-Math.PI*2:i<a&&s.yaw>Math.PI+a&&(o=Math.PI*2),this.currentRotTween?.stop(),this.currentRotTween=new S0(s).to({pitch:n,yaw:i+o},100).onUpdate(v=>this.cameraShake.setBaseRotation(v.pitch,v.yaw-o)).start()}else{this.currentRotTween?.stop(),this.cameraShake.setBaseRotation(n,i);let{perspective:s}=this.playerStateReactive;if(s==="third_person_back"||s==="third_person_front"){let o=new Y.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),a=this.getThirdPersonCamera(o,i,n),v=o.distanceTo(new Y.Vector3(a.x,a.y,a.z)),l=s==="third_person_back"?v:-v;this.camera.position.set(0,0,l),s==="third_person_front"?this.camera.rotation.set(0,Math.PI,0):this.camera.rotation.set(0,0,0)}else this.camera.position.z=0,this.camera.rotation.set(0,0,0),this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}this.updateCameraSectionPos()}}debugChunksVisibilityOverride(){let{chunksRenderAboveOverride:e,chunksRenderBelowOverride:i,chunksRenderDistanceOverride:n,chunksRenderAboveEnabled:s,chunksRenderBelowEnabled:o,chunksRenderDistanceEnabled:a}=this.reactiveDebugParams,v=this.getSectionHeight(),l=this.cameraSectionPos.y*v;if(this.displayOptions.inWorldRenderingConfig.enableDebugOverlay&&e!==void 0||i!==void 0||n!==void 0)for(let[c,d]of Object.entries(this.sectionObjects)){if(d._waitingForChunkDisplay)continue;let[h,p,g]=c.split(",").map(Number),b=s&&e!==void 0?p<=l+e:o&&i!==void 0?p>=l-i:a&&n!==void 0?Math.abs(p-l)<=n:!0;d.visible=b}else this.chunkMeshManager.updateSectionsVisibility()}render(e=!1){if(this.currentRenderedFrames++,this.reactiveDebugParams.stopRendering)return;this.debugChunksVisibilityOverride();let i=performance.now();this.lastRendered=performance.now();let n=this.lastRenderTime>0?Math.min(Math.max((i-this.lastRenderTime)/1e3,0),.1):1/60;this.lastRenderTime=i,this.cursorBlock.render(),this.updateSectionOffsets();let s=this.getCameraPosition();if(this.skyboxRenderer.update(s,this.viewDistance),e||this.displayOptions.inWorldRenderingConfig.fov!==this.camera.fov){let c=this.renderer.getSize(new Y.Vector2);this.camera.aspect=c.width/c.height,this.camera.fov=this.displayOptions.inWorldRenderingConfig.fov,this.camera.updateProjectionMatrix()}this.reactiveDebugParams.disableEntities||this.entities.render();let a=this.cameraGroupVr instanceof Y.Group?this.cameraGroupVr.children.find(c=>c instanceof Y.PerspectiveCamera):this.camera;this.applyPendingSectionUpdates(),this.renderer.render(this.scene,a),this.displayOptions.inWorldRenderingConfig.showHand&&this.playerStateReactive.gameMode!=="spectator"&&this.playerStateReactive.perspective==="first_person"&&!this.renderer.xr.isPresenting&&(this.holdingBlock.render(this.camera,this.renderer,this.ambientLight,this.directionalLight),this.holdingBlockLeft.render(this.camera,this.renderer,this.ambientLight,this.directionalLight));for(let c of this.fountains)this.sectionObjects[c.sectionId]&&!this.sectionObjects[c.sectionId].foutain&&(c.createParticles(this.sectionObjects[c.sectionId]),this.sectionObjects[c.sectionId].foutain=!0),c.render();this.waypoints.render(),this.fireworks.update();for(let c of this.onRender)c(n);let l=performance.now()-i;this.worldRendererConfig.autoLowerRenderDistance&&this.chunkMeshManager.recordRenderTime(l),this.renderTimeAvgCount++,this.renderTimeAvg=(this.renderTimeAvg*(this.renderTimeAvgCount-1)+l)/this.renderTimeAvgCount,this.renderTimeMax=Math.max(this.renderTimeMax,l)}renderHead(e,i,n,s){let o;if(s.SkullOwner?o=s.SkullOwner.Properties?.textures?.[0]?.Value:o=s.profile?.properties?.find(a=>a.name==="textures")?.value,!!o)try{let v=JSON.parse(L.from(o,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:l}=this.worldRendererConfig;l&&(v=v?.replace("http://textures.minecraft.net/",l).replace("https://textures.minecraft.net/",l));let c=St(this,v,Ct.head),d=new Y.Group;return n&&c.position.set(0,.3125,.3125),c.position.y-=23/16,d.add(c),this.sceneOrigin.track(d),d.position.set(e.x+.5,e.y+.045,e.z+.5),d.rotation.set(0,-Y.MathUtils.degToRad(i*(n?90:45/2)),0),d.scale.set(.8,.8,.8),d}catch{}}renderSign(e,i,n,s,o){let a=this.getSignTexture(e,o,s);if(!a)return;let v=new Y.Mesh(new Y.PlaneGeometry(1,1),new Y.MeshBasicMaterial({map:a,transparent:!0}));v.renderOrder=999;let l=7/16,c=s?1.3:1;v.scale.set(1*c,l*c,1*c);let d=(s?2:1.5)/16,h=.25/16;n&&!s?v.position.set(0,0,-.5+d+h+1e-4):v.position.set(0,0,d/2+1e-4);let p=new Y.Group;p.rotation.set(0,-Y.MathUtils.degToRad(i*(n?90:45/2)),0),p.add(v);let g=(s?10:8)/16,b=(s?0:n?4.333:9.333)/16,A=g/2+b;return this.sceneOrigin.track(p),p.position.set(e.x+.5,e.y+A,e.z+.5),p}lightUpdate(e,i){for(let n=this.worldSizeParams.minY;n<this.worldSizeParams.worldHeight;n+=16)this.setSectionDirty(new Ht(e,n,i))}rerenderAllChunks(){for(let e of Object.keys(this.sectionObjects)){let[i,n,s]=e.split(",").map(Number);this.setSectionDirty(new Ht(i,n,s))}}updateShowChunksBorder(e){this.chunkMeshManager.updateAllBoxHelpers(e)}resetWorld(){super.resetWorld(),this.pendingSectionUpdates.clear(),this.pendingSectionBufferStartTimes.clear(),this.chunkMeshManager.dispose(),this.chunkMeshManager=new m5(this,this.scene,this.material,this.worldSizeParams.worldHeight,this.viewDistance),this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}getLoadedChunksRelative(e,i=!1){let[n,s,o]=L1(e);return Object.fromEntries(Object.entries(this.sectionObjects).map(([a,v])=>{let[l,c,d]=a.split(",").map(Number),[h,p,g]=L1({x:l,y:c,z:d});return[i?`${h-n},${p-s},${g-o}`:`${h-n},${g-o}`,v]}))}cleanChunkTextures(e,i){let n=this.chunkTextures.get(`${Math.floor(e/16)},${Math.floor(i/16)}`)??{};for(let s of Object.keys(n))n[s].dispose(),delete n[s];this.chunkMeshManager.cleanSignChunkTextures(e,i)}readdChunks(){for(let e of Object.keys(this.sectionObjects))this.scene.remove(this.sectionObjects[e]);setTimeout(()=>{for(let e of Object.keys(this.sectionObjects))this.scene.add(this.sectionObjects[e])},500)}disableUpdates(e=this.scene.children){for(let i of e)i.matrixWorldNeedsUpdate=!1,this.disableUpdates(i.children??[])}removeColumn(e,i){super.removeColumn(e,i),this.cleanChunkTextures(e,i),this.clearPendingSectionUpdatesForChunk(e,i);let n=this.getSectionHeight(),s=this.worldMinYRender;for(let o=s;o<this.worldSizeParams.worldHeight;o+=n){let a=`${e},${o},${i}`;this.chunkMeshManager.sectionObjects[a]&&this.chunkMeshManager.releaseSection(a)}this.chunkMeshManager.onChunkRemovedFromGate(`${e},${i}`)}onViewerChunkPositionChanged(){this.chunkMeshManager.tryRevealPending()}setSectionDirty(...e){let[i]=e;this.cleanChunkTextures(i.x,i.z),super.setSectionDirty(...e)}static getRendererInfo(e){try{let i=e.getContext();return`${i.getParameter(i.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)}`}catch{}}worldStop(){this.media.onWorldStop()}destroy(){this.pendingSectionUpdates.clear(),this.pendingSectionBufferStartTimes.clear(),this.chunkMeshManager.dispose(),this.disposeModules(),this.fireworksLegacy.destroy(),super.destroy(),this.skyboxRenderer.dispose(),this.fireworks.dispose()}shouldObjectVisible(e){let n=this.getSectionHeight(),s,o,a,v=this.sceneOrigin.getWorldPosition(e);v?(s=v.x,o=v.y,a=v.z):(s=this.sceneOrigin.toWorldX(e.position.x),o=this.sceneOrigin.toWorldY(e.position.y),a=this.sceneOrigin.toWorldZ(e.position.z));let l=Math.floor(s/16)*16,c=Math.floor(a/16)*16,d=Math.floor(o/n)*n,h=`${l},${c}`,p=`${l},${d},${c}`;return!!this.finishedChunks[h]||!!this.sectionObjects[p]}handleUserClick(e){this.media.handleUserClick(e)}updateSectionOffsets(){let e=performance.now();for(let[i,n]of Object.entries(this.sectionsOffsetsAnimations)){let s=(e-n.time)/1e3;n.time=e,n.currentOffsetX+=n.speedX*s,n.currentOffsetY+=n.speedY*s,n.currentOffsetZ+=n.speedZ*s,n.limitX!==void 0&&(n.speedX>0?n.currentOffsetX=Math.min(n.currentOffsetX,n.limitX):n.currentOffsetX=Math.max(n.currentOffsetX,n.limitX)),n.limitY!==void 0&&(n.speedY>0?n.currentOffsetY=Math.min(n.currentOffsetY,n.limitY):n.currentOffsetY=Math.max(n.currentOffsetY,n.limitY)),n.limitZ!==void 0&&(n.speedZ>0?n.currentOffsetZ=Math.min(n.currentOffsetZ,n.limitZ):n.currentOffsetZ=Math.max(n.currentOffsetZ,n.limitZ));let o=this.sectionObjects[i];o&&(o.position.set(n.currentOffsetX,n.currentOffsetY,n.currentOffsetZ),o.updateMatrix())}}reloadWorld(){this.entities.reloadEntities()}};u(p5,"MAX_SECTION_UPDATE_BUFFER_MS",500);var ie=p5;x();R();T();k();x();R();T();k();x();R();T();k();x();R();T();k();function v2(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}var At=[],Me=!1,ne,k1=-1;function t4(){!Me||!ne||(Me=!1,ne.length?At=ne.concat(At):k1=-1,At.length&&vs())}function vs(){if(!Me){var r=setTimeout(t4,0);Me=!0;for(var t=At.length;t;){for(ne=At,At=[];++k1<t;)ne&&ne[k1].run();k1=-1,t=At.length}ne=null,Me=!1,clearTimeout(r)}}function e4(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];At.push(new ls(r,t)),At.length===1&&!Me&&setTimeout(vs,0)}function ls(r,t){this.fun=r,this.array=t}ls.prototype.run=function(){this.fun.apply(null,this.array)};var i4="browser",n4="x64",r4="browser",s4={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},o4=["/usr/bin/node"],a4=[],v4="v16.8.0",l4={},c4=function(r,t){},d4=function(r){v2("binding")},u4=function(r){return 0},f4=function(){return"/"},h4=function(r){},m4={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function V0(){}var p4=V0,g4=[];function b4(r){v2("_linkedBinding")}var y4={},w4=!1,_4={};function A4(r){v2("dlopen")}function E4(){return[]}function x4(){return[]}var R4=V0,k4=V0,l2=function(){return{}},T4=l2,M4=l2,S4=V0,C4=V0,P4=V0,B4={};function I4(r,t){if(!r)throw new Error(t||"assertion error")}var H4={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},z4=V0,O4=V0;function D4(){return!1}var L4=V0,F4=V0,U4=V0,G4=V0,W4=V0,N4=void 0,V4=void 0,j4=void 0,Y4=V0,Q4=2,K4=1,J4="/bin/usr/node",q4=9229,Z4="node",X4=[],$4=V0,zt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};zt.now===void 0&&(s2=Date.now(),zt.timing&&zt.timing.navigationStart&&(s2=zt.timing.navigationStart),zt.now=()=>Date.now()-s2);var s2;function tv(){return zt.now()/1e3}var o2=1e9;function a2(r){var t=Math.floor((Date.now()-zt.now())*.001),e=zt.now()*.001,i=Math.floor(e)+t,n=Math.floor(e%1*1e9);return r&&(i=i-r[0],n=n-r[1],n<0&&(i--,n+=o2)),[i,n]}a2.bigint=function(r){var t=a2(r);return typeof BigInt>"u"?t[0]*o2+t[1]:BigInt(t[0]*o2)+BigInt(t[1])};var ev=10,iv={},nv=0;function Ot(){return c2}var rv=Ot,sv=Ot,ov=Ot,av=Ot,vv=Ot,lv=V0,cv=Ot,dv=Ot;function uv(r){return[]}var c2={version:v4,versions:l4,arch:n4,platform:r4,release:m4,_rawDebug:p4,moduleLoadList:g4,binding:d4,_linkedBinding:b4,_events:iv,_eventsCount:nv,_maxListeners:ev,on:Ot,addListener:rv,once:sv,off:ov,removeListener:av,removeAllListeners:vv,emit:lv,prependListener:cv,prependOnceListener:dv,listeners:uv,domain:y4,_exiting:w4,config:_4,dlopen:A4,uptime:tv,_getActiveRequests:E4,_getActiveHandles:x4,reallyExit:R4,_kill:k4,cpuUsage:l2,resourceUsage:T4,memoryUsage:M4,kill:S4,exit:C4,openStdin:P4,allowedNodeEnvironmentFlags:B4,assert:I4,features:H4,_fatalExceptions:z4,setUncaughtExceptionCaptureCallback:O4,hasUncaughtExceptionCaptureCallback:D4,emitWarning:c4,nextTick:e4,_tickCallback:L4,_debugProcess:F4,_debugEnd:U4,_startProfilerIdleNotifier:G4,_stopProfilerIdleNotifier:W4,stdout:N4,stdin:j4,stderr:V4,abort:Y4,umask:u4,chdir:h4,cwd:f4,env:s4,title:i4,argv:o4,execArgv:a4,pid:Q4,ppid:K4,execPath:J4,debugPort:q4,hrtime:a2,argv0:Z4,_preload_modules:X4,setSourceMapsEnabled:$4};var d2={},cs=!1;function fv(){if(cs)return d2;cs=!0;var r=c2;function t(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function e(s,o){for(var a="",v=0,l=-1,c=0,d,h=0;h<=s.length;++h){if(h<s.length)d=s.charCodeAt(h);else{if(d===47)break;d=47}if(d===47){if(!(l===h-1||c===1))if(l!==h-1&&c===2){if(a.length<2||v!==2||a.charCodeAt(a.length-1)!==46||a.charCodeAt(a.length-2)!==46){if(a.length>2){var p=a.lastIndexOf("/");if(p!==a.length-1){p===-1?(a="",v=0):(a=a.slice(0,p),v=a.length-1-a.lastIndexOf("/")),l=h,c=0;continue}}else if(a.length===2||a.length===1){a="",v=0,l=h,c=0;continue}}o&&(a.length>0?a+="/..":a="..",v=2)}else a.length>0?a+="/"+s.slice(l+1,h):a=s.slice(l+1,h),v=h-l-1;l=h,c=0}else d===46&&c!==-1?++c:c=-1}return a}function i(s,o){var a=o.dir||o.root,v=o.base||(o.name||"")+(o.ext||"");return a?a===o.root?a+v:a+s+v:v}var n={resolve:function(){for(var o="",a=!1,v,l=arguments.length-1;l>=-1&&!a;l--){var c;l>=0?c=arguments[l]:(v===void 0&&(v=r.cwd()),c=v),t(c),c.length!==0&&(o=c+"/"+o,a=c.charCodeAt(0)===47)}return o=e(o,!a),a?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(t(o),o.length===0)return".";var a=o.charCodeAt(0)===47,v=o.charCodeAt(o.length-1)===47;return o=e(o,!a),o.length===0&&!a&&(o="."),o.length>0&&v&&(o+="/"),a?"/"+o:o},isAbsolute:function(o){return t(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,a=0;a<arguments.length;++a){var v=arguments[a];t(v),v.length>0&&(o===void 0?o=v:o+="/"+v)}return o===void 0?".":n.normalize(o)},relative:function(o,a){if(t(o),t(a),o===a||(o=n.resolve(o),a=n.resolve(a),o===a))return"";for(var v=1;v<o.length&&o.charCodeAt(v)===47;++v);for(var l=o.length,c=l-v,d=1;d<a.length&&a.charCodeAt(d)===47;++d);for(var h=a.length,p=h-d,g=c<p?c:p,b=-1,A=0;A<=g;++A){if(A===g){if(p>g){if(a.charCodeAt(d+A)===47)return a.slice(d+A+1);if(A===0)return a.slice(d+A)}else c>g&&(o.charCodeAt(v+A)===47?b=A:A===0&&(b=0));break}var w=o.charCodeAt(v+A),_=a.charCodeAt(d+A);if(w!==_)break;w===47&&(b=A)}var S="";for(A=v+b+1;A<=l;++A)(A===l||o.charCodeAt(A)===47)&&(S.length===0?S+="..":S+="/..");return S.length>0?S+a.slice(d+b):(d+=b,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(o){return o},dirname:function(o){if(t(o),o.length===0)return".";for(var a=o.charCodeAt(0),v=a===47,l=-1,c=!0,d=o.length-1;d>=1;--d)if(a=o.charCodeAt(d),a===47){if(!c){l=d;break}}else c=!1;return l===-1?v?"/":".":v&&l===1?"//":o.slice(0,l)},basename:function(o,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');t(o);var v=0,l=-1,c=!0,d;if(a!==void 0&&a.length>0&&a.length<=o.length){if(a.length===o.length&&a===o)return"";var h=a.length-1,p=-1;for(d=o.length-1;d>=0;--d){var g=o.charCodeAt(d);if(g===47){if(!c){v=d+1;break}}else p===-1&&(c=!1,p=d+1),h>=0&&(g===a.charCodeAt(h)?--h===-1&&(l=d):(h=-1,l=p))}return v===l?l=p:l===-1&&(l=o.length),o.slice(v,l)}else{for(d=o.length-1;d>=0;--d)if(o.charCodeAt(d)===47){if(!c){v=d+1;break}}else l===-1&&(c=!1,l=d+1);return l===-1?"":o.slice(v,l)}},extname:function(o){t(o);for(var a=-1,v=0,l=-1,c=!0,d=0,h=o.length-1;h>=0;--h){var p=o.charCodeAt(h);if(p===47){if(!c){v=h+1;break}continue}l===-1&&(c=!1,l=h+1),p===46?a===-1?a=h:d!==1&&(d=1):a!==-1&&(d=-1)}return a===-1||l===-1||d===0||d===1&&a===l-1&&a===v+1?"":o.slice(a,l)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return i("/",o)},parse:function(o){t(o);var a={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return a;var v=o.charCodeAt(0),l=v===47,c;l?(a.root="/",c=1):c=0;for(var d=-1,h=0,p=-1,g=!0,b=o.length-1,A=0;b>=c;--b){if(v=o.charCodeAt(b),v===47){if(!g){h=b+1;break}continue}p===-1&&(g=!1,p=b+1),v===46?d===-1?d=b:A!==1&&(A=1):d!==-1&&(A=-1)}return d===-1||p===-1||A===0||A===1&&d===p-1&&d===h+1?p!==-1&&(h===0&&l?a.base=a.name=o.slice(1,p):a.base=a.name=o.slice(h,p)):(h===0&&l?(a.name=o.slice(1,d),a.base=o.slice(1,p)):(a.name=o.slice(h,d),a.base=o.slice(h,p)),a.ext=o.slice(d,p)),h>0?a.dir=o.slice(0,h-1):l&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,d2=n,d2}var j0=fv();var uR=j0._makeLong,fR=j0.basename,hR=j0.delimiter,mR=j0.dirname,pR=j0.extname,gR=j0.format,bR=j0.isAbsolute,u2=j0.join,yR=j0.normalize,wR=j0.parse,_R=j0.posix,AR=j0.relative,ER=j0.resolve,xR=j0.sep,RR=j0.win32;import*as v0 from"three";x();R();T();k();import hv from"prismarine-world";import mv from"prismarine-chunk";var ds=r=>{let t=hv(r),e=mv(r),i=new t(r).sync,n=pv(i);for(let s of n)if(s.startsWith("set")&&s!=="setColumn"){let o=i[s].bind(i);i[s]=(...a)=>{let v=a[0];v.x!==void 0&&!i.getColumnAt(v)&&i.setColumn(Math.floor(v.x/16),Math.floor(v.z/16),new e(void 0)),o(...a)}}return i};function pv(r){let t=new Set,e=r;do for(let i of Object.getOwnPropertyNames(e))typeof r[i]=="function"&&i!=="constructor"&&t.add(i);while(e=Object.getPrototypeOf(e));return[...t]}import{Vec3 as fs}from"vec3";x();R();T();k();var us="1.21.4";var f2=new Date,hs=f2.getMonth()===11&&f2.getDate()>=24&&f2.getDate()<=26,gv=["panorama_3.webp","panorama_1.webp","panorama_4.webp","panorama_5.webp","panorama_0.webp","panorama_2.webp"],T1=class{constructor(t,e,i=!1){this.documentRenderer=t;this.options=e;this.doWorldBlocksPanorama=i;u(this,"camera");u(this,"scene");u(this,"ambientLight");u(this,"directionalLight");u(this,"panoramaGroup",null);u(this,"time",0);u(this,"abortController",new AbortController);u(this,"worldRenderer");u(this,"WorldRendererClass",ie);u(this,"startTimes",new Map);this.scene=new v0.Scene,this.scene.background=new v0.Color(3294568),this.ambientLight=new v0.AmbientLight(13421772),this.scene.add(this.ambientLight),this.directionalLight=new v0.DirectionalLight(16777215,.5),this.directionalLight.position.set(1,1,.5).normalize(),this.directionalLight.castShadow=!0,this.scene.add(this.directionalLight),this.camera=new v0.PerspectiveCamera(85,this.documentRenderer.canvas.width/this.documentRenderer.canvas.height,.05,1e3),this.camera.position.set(0,0,0),this.camera.rotation.set(0,0,0)}async start(){this.doWorldBlocksPanorama?await this.worldBlocksPanorama():this.addClassicPanorama(),this.documentRenderer.render=(t=!1)=>{t&&(this.camera.aspect=this.documentRenderer.canvas.width/this.documentRenderer.canvas.height,this.camera.updateProjectionMatrix()),this.documentRenderer.renderer.render(this.scene,this.camera)}}async debugImageInFrontOfCamera(){let t=await kt(u2("background","panorama_0.webp")),e=new v0.Mesh(new v0.PlaneGeometry(1e3,1e3),new v0.MeshBasicMaterial({map:t}));e.position.set(0,0,-500),e.rotation.set(0,0,0),this.scene.add(e)}addClassicPanorama(){let t=new v0.BoxGeometry(1e3,1e3,1e3),e=[],i=200;for(let o of gv)(async()=>{let{texture:v}=F5(u2("background",hs?"christmas":"",o));v.matrixAutoUpdate=!1,v.matrix.set(-1,0,1,0,1,0,0,0,1),v.wrapS=v0.ClampToEdgeWrapping,v.wrapT=v0.ClampToEdgeWrapping,v.minFilter=v0.LinearFilter,v.magFilter=v0.LinearFilter;let l=new v0.MeshBasicMaterial({map:v,transparent:!0,side:v0.DoubleSide,depthWrite:!1,opacity:0});this.startTimes.set(l,Date.now()),e.push(l)})();let n=new v0.Mesh(t,e);n.onBeforeRender=()=>{this.time+=.01,n.rotation.y=Math.PI+this.time*.01,n.rotation.z=Math.sin(-this.time*.001)*.001;for(let o of e){let a=this.startTimes.get(o);if(a){let v=Date.now()-a,l=Math.min(1,v/i);o.opacity=l}}};let s=new v0.Object3D;if(s.add(n),!hs)for(let o=0;o<20;o++){let a=new _t("1.16.4","squid").mesh;a.position.set(Math.random()*30-15,Math.random()*20-10,Math.random()*10-17),a.rotation.set(0,Math.PI+Math.random(),-Math.PI/4,"ZYX");let v=Math.random()*.01;a.children[0].onBeforeRender=()=>{a.rotation.y+=v,a.rotation.z=Math.cos(n.rotation.y*3)*Math.PI/4-Math.PI/2},s.add(a)}this.scene.add(s),this.panoramaGroup=s}async worldBlocksPanorama(){let t=us,e=new mt;if(e.currentConfig={version:t,noInventoryGui:!0},await e.updateAssetsData?.({}),this.abortController.signal.aborted)return;let i=ds(t),s=xs("prismarine-block")(t),a=globalThis.mcData.blocksArray.filter(w=>{if(!w.name.includes("stained_glass"))return!1;let _=s.fromStateId(w.defaultState,0);if(_.shapes?.length!==1)return!1;let S=_.shapes[0];return S[0]===0&&S[1]===0&&S[2]===0&&S[3]===1&&S[4]===1&&S[5]===1}),v=-15,l=100,c=100;for(let w=-l;w<l;w++)for(let _=-c;_<c;_++){let S=a[Math.floor(Math.random()*a.length)];i.setBlockStateId(new fs(w,_,v),S.defaultState)}this.camera.updateProjectionMatrix(),this.camera.position.set(.5,c/2+.5,.5),this.camera.rotation.set(0,0,0);let d=new fs(...this.camera.position.toArray()),h=new Yt(i,2,d);if(this.abortController.signal.aborted||(this.worldRenderer=new this.WorldRendererClass(this.documentRenderer.renderer,this.options,{version:t,worldView:h,inWorldRenderingConfig:De,playerStateReactive:Wn().reactive,rendererState:Wt().reactive,nonReactiveState:Wt().nonReactive,resourcesManager:e}),this.worldRenderer instanceof ie&&(this.scene=this.worldRenderer.realScene),h.init(d),await this.worldRenderer.waitForChunksToRender(),this.abortController.signal.aborted))return;let{camera:p}=this,g=p.position.x,b=p.position.y,A;document.body.addEventListener("pointermove",w=>{if(w.pointerType!=="mouse")return;let _=new v0.Vector2(w.clientX,w.clientY),S=.2,M=_.x/window.innerWidth-.5,C=-(_.y/window.innerHeight-.5);A?.stop();let H={x:g+M*S,y:b+C*S};A=new S0(p.position).to(H,0),A.start(),p.updateProjectionMatrix()},{signal:this.abortController.signal})}dispose(){this.scene.clear(),this.worldRenderer?.destroy(),this.abortController.abort()}};g5.ColorManagement.enabled=!1;globalThis.THREE=g5;var ms=r=>({updateMap:r.entities.updateMap.bind(r.entities),updateCustomBlock:r.updateCustomBlock.bind(r),getBlockInfo:r.getBlockInfo.bind(r),playEntityAnimation:r.entities.playAnimation.bind(r.entities),damageEntity:r.entities.handleDamageEvent.bind(r.entities),updatePlayerSkin:r.entities.updatePlayerSkin.bind(r.entities),changeHandSwingingState:r.changeHandSwingingState.bind(r),getHighestBlocks:r.getHighestBlocks.bind(r),reloadWorld:r.reloadWorld.bind(r),updateEntityModel:r.entities.updateEntityModel.bind(r.entities),playEntityModelAnimation:r.entities.playEntityModelAnimation.bind(r.entities),addMedia:r.media.addMedia.bind(r.media),destroyMedia:r.media.destroyMedia.bind(r.media),setControlMode:r.media.setControlMode.bind(r.media),setVideoPlaying:r.media.setVideoPlaying.bind(r.media),setVideoSeeking:r.media.setVideoSeeking.bind(r.media),setVideoVolume:r.media.setVideoVolume.bind(r.media),setVideoSpeed:r.media.setVideoSpeed.bind(r.media),handleUserClick:r.media.handleUserClick.bind(r.media),addSectionAnimation(t,e){r.sectionsOffsetsAnimations[t]=e},removeSectionAnimation(t){delete r.sectionsOffsetsAnimations[t]},shakeFromDamage:r.cameraShake.shakeFromDamage.bind(r.cameraShake),onPageInteraction:r.media.onPageInteraction.bind(r.media),downloadMesherLog:r.downloadMesherLog.bind(r),explodeFirework:r.fireworksLegacy.explode.bind(r.fireworksLegacy),explodeFireworkFacingCamera:r.fireworksLegacy.explodeFacingCamera.bind(r.fireworksLegacy),addWaypoint:r.waypoints.addWaypoint.bind(r.waypoints),removeWaypoint:r.waypoints.removeWaypoint.bind(r.waypoints),startCinimaticScript:r.cinimaticScript.startScript.bind(r.cinimaticScript),stopCinimaticScript:r.cinimaticScript.stopScript.bind(r.cinimaticScript),launchFirework:r.fireworks.launchFirework.bind(r.fireworks),setSkyboxImage:r.skyboxRenderer.setSkyboxImage.bind(r.skyboxRenderer),setRain:t=>r.toggleModule("rain",t),spawnBlockBreakParticles(t,e,i,n,s,o){r.getModule("blockBreakParticles")?.spawnBlockBreakParticles(t,e,i,n,s,o)},spawnBlockCrackParticle(t,e,i,n,s,o,a){r.getModule("blockBreakParticles")?.spawnCrackParticle(t,e,i,n,s,o,a)},async loadGeometryExport(t){let{applyWorldGeometryExport:e}=await Promise.resolve().then(()=>(Ki(),W6));return e(r,t)}}),yv=[],M1=(r,...t)=>{for(let e of Object.values(globalThis.loadedMods??{}))try{e.threeJsBackendModule?.[r]?.(...t)}catch(i){let n=`[mod three.js] Error calling ${r} on ${e.name}: ${i}`;throw new Error(n)}},ps=()=>{let r,t=null,e=null,i=null,n=null,s=(c,d)=>{_0?r=P5(c,yv,globalThis):r=c,t=new Ve(r,d?.canvas),globalThis.renderer=t.renderer,globalThis.documentRenderer=t,globalThis.threeJsBackend=l,M1("default",l)},o=async()=>{if(!t)throw new Error("Document renderer not initialized");if(!i&&!e){let c={...r};e=new T1(t,c,!!D.env.SINGLE_FILE_BUILD_MODE),globalThis.panoramaRenderer=e,M1("panoramaCreated",e),await e.start(),M1("panoramaReady",e)}},a=async c=>{let h=_0?P5(c,[mt,jt],globalThis):c;if(!t)throw new Error("Document renderer not initialized");t.nonReactiveState=h.nonReactiveState,globalThis.resourcesManager=h.resourcesManager,e&&(e.dispose(),e=null),i=new ie(t.renderer,r,h),await i.worldReadyPromise,n=new B5(h.nonReactiveState),globalThis.frameTimingCollector=n;let p=t.render;t.render=function(g){p.call(this,g),n?.markFrameStart(),h.inWorldRenderingConfig.paused||i?.render(g),n?.markFrameEnd(),n?.markFrameDisplay()},t.inWorldRenderingConfig=h.inWorldRenderingConfig,globalThis.world=i,M1("worldReady",i)},v=()=>{e&&(e.dispose(),e=null),t&&t.dispose(),i&&(i.destroy(),i=null)},l={id:"threejs",displayName:`three.js ${g5.REVISION}`,startPanorama:o,startWorld:a,disconnect:v,setRendering(c){t.setPaused(!c),i&&(i.renderingActive=c)},getDebugOverlay:()=>({get entitiesString(){return i?.entities.getDebugString()},get left(){return{"Geo Memory":i?.chunkMeshManager.getEstimatedMemoryUsage().total??"-"}}}),updateCamera(c,d,h){n?.markCameraUpdate(!c),i?.setFirstPersonCamera(c,d,h)},get soundSystem(){return i?.soundSystem},get backendMethods(){if(i)return ms(i)}};return{main:{init:s,backend:l},workerProxy(){return tr({init(c,d){s(c,{canvas:d})},updateSizeExternal(c,d,h){t?.updateSizeExternal(c,d,h)},startPanorama:o,startWorld:a,disconnect:v,setRendering:l.setRendering,updateCamera(c,d,h){let p=c?new bv(c.x,c.y,c.z):null;n?.markCameraUpdate(!p),l.updateCamera(p,d,h)},async callBackendMethod(c,...d){if(!i)throw new Error("World renderer not initialized");let p=ms(i)[c];if(!p)throw new Error(`Backend method ${String(c)} is unavailable`);return p(...d)}})}}};var S1=r=>{let{main:t}=ps();return t.init(r),t.backend};S1.id="threejs";S1.displayName="three.js Blocking";S1.description="Simple, old and stable main thread graphics backend providing balanced performance on top of WebGL2.";x();R();T();k();import*as gs from"three";function wv(r){let t="threeWorker.js",e;if(D.env.SINGLE_FILE_BUILD){let i=document.getElementById("three-worker-code").textContent,n=new Blob([i],{type:"text/javascript"});e=new Worker(window.URL.createObjectURL(n))}else e=new Worker(t);return e.onmessage=({data:i})=>{r(i)},e.on&&e.on("message",i=>{e.onmessage({data:i})}),e}var C1=async r=>{let t=wv(()=>{}),e=er(t),i=N1();i.onSizeChanged((a,v)=>{e.updateSizeExternal(a,v,window.devicePixelRatio||1)});let n=C5(r,t);try{e.init(n,i.canvas)}catch(a){throw Ge(n),a}let s=new Proxy({},{get(a,v){if(typeof v=="string")return async(...l)=>e.callBackendMethod(v,...l)}});return{id:"threejs",displayName:`three.js ${gs.REVISION}`,async startPanorama(){},async startWorld(a){let v={...Ne,items:"itemsArray",entities:"entitiesArray"};ei([t],a.version,v,a.resourcesManager.currentResources.mcData),a.inWorldRenderingConfig.__syncToWorker=!0,a.playerStateReactive&&(a.playerStateReactive.__syncToWorker=!0),a.rendererState&&(a.rendererState.__syncFromWorker=!0),a.nonReactiveState&&(a.nonReactiveState.__syncFromWorker=!0),a.nonReactiveState.__syncFromWorkerInterval=200;let l=C5(a,t);try{await e.startWorld(structuredClone(l))}catch(d){throw Ge(l),d}e.updateSizeExternal(i.size.width,i.size.height,window.devicePixelRatio||1);let c=ue("fps");setInterval(()=>{let{fps:d,avgRenderTime:h,worstRenderTime:p}=a.nonReactiveState;c.updateText(`FPS: ${d.toFixed(0)} (${h.toFixed(0)}ms/${p.toFixed(0)}ms)`),a.nonReactiveState.fps=0},1e3)},disconnect(){i.destroy(),e.disconnect(),t.terminate()},setRendering(a){e.setRendering(a)},updateCamera(a,v,l){e.updateCamera(a?{x:a.x,y:a.y,z:a.z}:null,v,l)},soundSystem:void 0,backendMethods:s}};C1.id="threejs-off-thread";C1.displayName="three.js Multi-thread";C1.description=["Edge-cutting technology that uses a dedicated thread for graphics.","Slightly higher power and RAM usage.","More stable FPS (mid-range devices), but possible inputlag if TPS is low.","On low-end devices it might result in device throttling and stuttering."].join(" ");export{Qn as AppViewer,Ve as DocumentRenderer,ve as LoadedResourcesTransferrable,mt as ResourcesManager,Yt as WorldView,jt as WorldViewWorker,N1 as addCanvasForWorker,ae as chunkPos,C1 as createGraphicsBackendOffThread,S1 as createGraphicsBackendSingleThread,Zv as createWorldRendererConfig,Un as defaultGraphicsBackendConfig,De as defaultWorldRendererConfig,Vn as delayedIterator,Wt as getDefaultRendererState,Kn as getInitialPlayerState,Qs as getInitialPlayerStateRenderer,Ys as getPlayerStateUtils,_0 as isWebWorker,Ps as sectionPos};
21237
21237
  /*! Bundled license information:
21238
21238
 
21239
21239
  @jspm/core/nodelibs/browser/chunk-DtuTasat.js: