minecraft-renderer 0.1.29 → 0.1.31

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,19 +1,19 @@
1
- var j6=Object.create;var Te=Object.defineProperty;var Q6=Object.getOwnPropertyDescriptor;var Y6=Object.getOwnPropertyNames;var K6=Object.getPrototypeOf,J6=Object.prototype.hasOwnProperty;var q6=(r,t,e)=>t in r?Te(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var Z6=(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 at=(r,t)=>()=>(r&&(t=r(r=0)),t);var V0=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),c5=(r,t)=>{for(var e in t)Te(r,e,{get:t[e],enumerable:!0})},K2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y6(t))!J6.call(r,n)&&n!==e&&Te(r,n,{get:()=>t[n],enumerable:!(i=Q6(t,n))||i.enumerable});return r};var Me=(r,t,e)=>(e=r!=null?j6(K6(r)):{},K2(t||!r||!r.__esModule?Te(e,"default",{value:r,enumerable:!0}):e,r)),X6=r=>K2(Te({},"__esModule",{value:!0}),r);var h=(r,t,e)=>(q6(r,typeof t!="symbol"?t+"":t,e),e);var R=at(()=>{});var k=at(()=>{});var L={};c5(L,{_debugEnd:()=>L3,_debugProcess:()=>O3,_events:()=>$3,_eventsCount:()=>ti,_exiting:()=>g3,_fatalExceptions:()=>B3,_getActiveHandles:()=>w3,_getActiveRequests:()=>_3,_kill:()=>E3,_linkedBinding:()=>m3,_maxListeners:()=>X3,_preload_modules:()=>J3,_rawDebug:()=>f3,_startProfilerIdleNotifier:()=>D3,_stopProfilerIdleNotifier:()=>F3,_tickCallback:()=>H3,abort:()=>V3,addListener:()=>ei,allowedNodeEnvironmentFlags:()=>S3,arch:()=>$2,argv:()=>i3,argv0:()=>K3,assert:()=>C3,binding:()=>a3,browser:()=>u3,chdir:()=>c3,config:()=>b3,cpuUsage:()=>f5,cwd:()=>l3,debugPort:()=>Y3,default:()=>ci,dlopen:()=>y3,domain:()=>p3,emit:()=>oi,emitWarning:()=>o3,env:()=>e3,execArgv:()=>n3,execPath:()=>Q3,exit:()=>T3,features:()=>P3,hasUncaughtExceptionCaptureCallback:()=>z3,hrtime:()=>u5,kill:()=>k3,listeners:()=>li,memoryUsage:()=>R3,moduleLoadList:()=>h3,nextTick:()=>q2,off:()=>ni,on:()=>lt,once:()=>ii,openStdin:()=>M3,pid:()=>N3,platform:()=>t3,ppid:()=>j3,prependListener:()=>ai,prependOnceListener:()=>vi,reallyExit:()=>A3,release:()=>d3,removeAllListeners:()=>si,removeListener:()=>ri,resourceUsage:()=>x3,setSourceMapsEnabled:()=>q3,setUncaughtExceptionCaptureCallback:()=>I3,stderr:()=>G3,stdin:()=>W3,stdout:()=>U3,title:()=>X2,umask:()=>v3,uptime:()=>Z3,version:()=>r3,versions:()=>s3});function _1(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}function $6(){!Xt||!St||(Xt=!1,St.length?vt=St.concat(vt):d5=-1,vt.length&&J2())}function J2(){if(!Xt){var r=setTimeout($6,0);Xt=!0;for(var t=vt.length;t;){for(St=vt,vt=[];++d5<t;)St&&St[d5].run();d5=-1,t=vt.length}St=null,Xt=!1,clearTimeout(r)}}function q2(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];vt.push(new Z2(r,t)),vt.length===1&&!Xt&&setTimeout(J2,0)}function Z2(r,t){this.fun=r,this.array=t}function P0(){}function m3(r){_1("_linkedBinding")}function y3(r){_1("dlopen")}function _3(){return[]}function w3(){return[]}function C3(r,t){if(!r)throw new Error(t||"assertion error")}function z3(){return!1}function Z3(){return pt.now()/1e3}function u5(r){var t=Math.floor((Date.now()-pt.now())*.001),e=pt.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+=y1)),[i,n]}function lt(){return ci}function li(r){return[]}var vt,Xt,St,d5,X2,$2,t3,e3,i3,n3,r3,s3,o3,a3,v3,l3,c3,d3,u3,f3,h3,p3,g3,b3,A3,E3,f5,x3,R3,k3,T3,M3,S3,P3,B3,I3,H3,O3,L3,D3,F3,U3,G3,W3,V3,N3,j3,Q3,Y3,K3,J3,q3,pt,b1,y1,X3,$3,ti,ei,ii,ni,ri,si,oi,ai,vi,ci,di=at(()=>{R();k();M();T();vt=[],Xt=!1,d5=-1;Z2.prototype.run=function(){this.fun.apply(null,this.array)};X2="browser",$2="x64",t3="browser",e3={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},i3=["/usr/bin/node"],n3=[],r3="v16.8.0",s3={},o3=function(r,t){},a3=function(r){_1("binding")},v3=function(r){return 0},l3=function(){return"/"},c3=function(r){},d3={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};u3=!0,f3=P0,h3=[];p3={},g3=!1,b3={};A3=P0,E3=P0,f5=function(){return{}},x3=f5,R3=f5,k3=P0,T3=P0,M3=P0,S3={};P3={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},B3=P0,I3=P0;H3=P0,O3=P0,L3=P0,D3=P0,F3=P0,U3=void 0,G3=void 0,W3=void 0,V3=P0,N3=2,j3=1,Q3="/bin/usr/node",Y3=9229,K3="node",J3=[],q3=P0,pt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};pt.now===void 0&&(b1=Date.now(),pt.timing&&pt.timing.navigationStart&&(b1=pt.timing.navigationStart),pt.now=()=>Date.now()-b1);y1=1e9;u5.bigint=function(r){var t=u5(r);return typeof BigInt>"u"?t[0]*y1+t[1]:BigInt(t[0]*y1)+BigInt(t[1])};X3=10,$3={},ti=0;ei=lt,ii=lt,ni=lt,ri=lt,si=lt,oi=P0,ai=lt,vi=lt;ci={version:r3,versions:s3,arch:$2,platform:t3,browser:u3,release:d3,_rawDebug:f3,moduleLoadList:h3,binding:a3,_linkedBinding:m3,_events:$3,_eventsCount:ti,_maxListeners:X3,on:lt,addListener:ei,once:ii,off:ni,removeListener:ri,removeAllListeners:si,emit:oi,prependListener:ai,prependOnceListener:vi,listeners:li,domain:p3,_exiting:g3,config:b3,dlopen:y3,uptime:Z3,_getActiveRequests:_3,_getActiveHandles:w3,reallyExit:A3,_kill:E3,cpuUsage:f5,resourceUsage:x3,memoryUsage:R3,kill:k3,exit:T3,openStdin:M3,allowedNodeEnvironmentFlags:S3,assert:C3,features:P3,_fatalExceptions:B3,setUncaughtExceptionCaptureCallback:I3,hasUncaughtExceptionCaptureCallback:z3,emitWarning:o3,nextTick:q2,_tickCallback:H3,_debugProcess:O3,_debugEnd:L3,_startProfilerIdleNotifier:D3,_stopProfilerIdleNotifier:F3,stdout:U3,stdin:W3,stderr:G3,abort:V3,umask:v3,chdir:c3,cwd:l3,env:e3,title:X2,argv:i3,execArgv:n3,pid:N3,ppid:j3,execPath:Q3,debugPort:Y3,hrtime:u5,argv0:K3,_preload_modules:J3,setSourceMapsEnabled:q3}});var T=at(()=>{di()});function ts(){if(ui)return Se;ui=!0,Se.byteLength=v,Se.toByteArray=l,Se.fromByteArray=m;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 y=p.indexOf("=");y===-1&&(y=g);var w=y===g?0:4-y%4;return[y,w]}function v(p){var g=o(p),y=g[0],w=g[1];return(y+w)*3/4-w}function a(p,g,y){return(g+y)*3/4-y}function l(p){var g,y=o(p),w=y[0],_=y[1],E=new e(a(p,w,_)),C=0,x=_>0?w-4:w,S;for(S=0;S<x;S+=4)g=t[p.charCodeAt(S)]<<18|t[p.charCodeAt(S+1)]<<12|t[p.charCodeAt(S+2)]<<6|t[p.charCodeAt(S+3)],E[C++]=g>>16&255,E[C++]=g>>8&255,E[C++]=g&255;return _===2&&(g=t[p.charCodeAt(S)]<<2|t[p.charCodeAt(S+1)]>>4,E[C++]=g&255),_===1&&(g=t[p.charCodeAt(S)]<<10|t[p.charCodeAt(S+1)]<<4|t[p.charCodeAt(S+2)]>>2,E[C++]=g>>8&255,E[C++]=g&255),E}function c(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[p&63]}function d(p,g,y){for(var w,_=[],E=g;E<y;E+=3)w=(p[E]<<16&16711680)+(p[E+1]<<8&65280)+(p[E+2]&255),_.push(c(w));return _.join("")}function m(p){for(var g,y=p.length,w=y%3,_=[],E=16383,C=0,x=y-w;C<x;C+=E)_.push(d(p,C,C+E>x?x:C+E));return w===1?(g=p[y-1],_.push(r[g>>2]+r[g<<4&63]+"==")):w===2&&(g=(p[y-2]<<8)+p[y-1],_.push(r[g>>10]+r[g>>4&63]+r[g<<2&63]+"=")),_.join("")}return Se}function es(){if(fi)return h5;fi=!0;return h5.read=function(r,t,e,i,n){var s,o,v=n*8-i-1,a=(1<<v)-1,l=a>>1,c=-7,d=e?n-1:0,m=e?-1:1,p=r[t+d];for(d+=m,s=p&(1<<-c)-1,p>>=-c,c+=v;c>0;s=s*256+r[t+d],d+=m,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=i;c>0;o=o*256+r[t+d],d+=m,c-=8);if(s===0)s=1-l;else{if(s===a)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)},h5.write=function(r,t,e,i,n,s){var o,v,a,l=s*8-n-1,c=(1<<l)-1,d=c>>1,m=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,g=i?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(v=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),o+d>=1?t+=m/a:t+=m*Math.pow(2,1-d),t*a>=2&&(o++,a/=2),o+d>=c?(v=0,o=c):o+d>=1?(v=(t*a-1)*Math.pow(2,n),o=o+d):(v=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;r[e+p]=v&255,p+=g,v/=256,n-=8);for(o=o<<n|v,l+=n;l>0;r[e+p]=o&255,p+=g,o/=256,l-=8);r[e+p-g]|=y*128},h5}function mi(){if(hi)return Ct;hi=!0;let r=ts(),t=es(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ct.Buffer=o,Ct.SlowBuffer=_,Ct.INSPECT_MAX_BYTES=50;let i=2147483647;Ct.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=n(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u";function n(){try{let b=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(b,u),b.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(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');let u=new Uint8Array(b);return Object.setPrototypeOf(u,o.prototype),u}function o(b,u,f){if(typeof b=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(b)}return v(b,u,f)}o.poolSize=8192;function v(b,u,f){if(typeof b=="string")return d(b,u);if(ArrayBuffer.isView(b))return p(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(J0(b,ArrayBuffer)||b&&J0(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(J0(b,SharedArrayBuffer)||b&&J0(b.buffer,SharedArrayBuffer)))return g(b,u,f);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let A=b.valueOf&&b.valueOf();if(A!=null&&A!==b)return o.from(A,u,f);let P=y(b);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return o.from(b[Symbol.toPrimitive]("string"),u,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}o.from=function(b,u,f){return v(b,u,f)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function a(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function l(b,u,f){return a(b),b<=0?s(b):u!==void 0?typeof f=="string"?s(b).fill(u,f):s(b).fill(u):s(b)}o.alloc=function(b,u,f){return l(b,u,f)};function c(b){return a(b),s(b<0?0:w(b)|0)}o.allocUnsafe=function(b){return c(b)},o.allocUnsafeSlow=function(b){return c(b)};function d(b,u){if((typeof u!="string"||u==="")&&(u="utf8"),!o.isEncoding(u))throw new TypeError("Unknown encoding: "+u);let f=E(b,u)|0,A=s(f),P=A.write(b,u);return P!==f&&(A=A.slice(0,P)),A}function m(b){let u=b.length<0?0:w(b.length)|0,f=s(u);for(let A=0;A<u;A+=1)f[A]=b[A]&255;return f}function p(b){if(J0(b,Uint8Array)){let u=new Uint8Array(b);return g(u.buffer,u.byteOffset,u.byteLength)}return m(b)}function g(b,u,f){if(u<0||b.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<u+(f||0))throw new RangeError('"length" is outside of buffer bounds');let A;return u===void 0&&f===void 0?A=new Uint8Array(b):f===void 0?A=new Uint8Array(b,u):A=new Uint8Array(b,u,f),Object.setPrototypeOf(A,o.prototype),A}function y(b){if(o.isBuffer(b)){let u=w(b.length)|0,f=s(u);return f.length===0||b.copy(f,0,0,u),f}if(b.length!==void 0)return typeof b.length!="number"||Re(b.length)?s(0):m(b);if(b.type==="Buffer"&&Array.isArray(b.data))return m(b.data)}function w(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function _(b){return+b!=b&&(b=0),o.alloc(+b)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,f){if(J0(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),J0(f,Uint8Array)&&(f=o.from(f,f.offset,f.byteLength)),!o.isBuffer(u)||!o.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===f)return 0;let A=u.length,P=f.length;for(let H=0,D=Math.min(A,P);H<D;++H)if(u[H]!==f[H]){A=u[H],P=f[H];break}return A<P?-1:P<A?1:0},o.isEncoding=function(u){switch(String(u).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(u,f){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);let A;if(f===void 0)for(f=0,A=0;A<u.length;++A)f+=u[A].length;let P=o.allocUnsafe(f),H=0;for(A=0;A<u.length;++A){let D=u[A];if(J0(D,Uint8Array))H+D.length>P.length?(o.isBuffer(D)||(D=o.from(D)),D.copy(P,H)):Uint8Array.prototype.set.call(P,D,H);else if(o.isBuffer(D))D.copy(P,H);else throw new TypeError('"list" argument must be an Array of Buffers');H+=D.length}return P};function E(b,u){if(o.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||J0(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);let f=b.length,A=arguments.length>2&&arguments[2]===!0;if(!A&&f===0)return 0;let P=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return Mt(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return l5(b).length;default:if(P)return A?-1:Mt(b).length;u=(""+u).toLowerCase(),P=!0}}o.byteLength=E;function C(b,u,f){let A=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,u>>>=0,f<=u))return"";for(b||(b="utf8");;)switch(b){case"hex":return o0(this,u,f);case"utf8":case"utf-8":return i0(this,u,f);case"ascii":return J(this,u,f);case"latin1":case"binary":return s0(this,u,f);case"base64":return q(this,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f0(this,u,f);default:if(A)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),A=!0}}o.prototype._isBuffer=!0;function x(b,u,f){let A=b[u];b[u]=b[f],b[f]=A}o.prototype.swap16=function(){let u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let f=0;f<u;f+=2)x(this,f,f+1);return this},o.prototype.swap32=function(){let u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let f=0;f<u;f+=4)x(this,f,f+3),x(this,f+1,f+2);return this},o.prototype.swap64=function(){let u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let f=0;f<u;f+=8)x(this,f,f+7),x(this,f+1,f+6),x(this,f+2,f+5),x(this,f+3,f+4);return this},o.prototype.toString=function(){let u=this.length;return u===0?"":arguments.length===0?i0(this,0,u):C.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){let u="",f=Ct.INSPECT_MAX_BYTES;return u=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(u+=" ... "),"<Buffer "+u+">"},e&&(o.prototype[e]=o.prototype.inspect),o.prototype.compare=function(u,f,A,P,H){if(J0(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(f===void 0&&(f=0),A===void 0&&(A=u?u.length:0),P===void 0&&(P=0),H===void 0&&(H=this.length),f<0||A>u.length||P<0||H>this.length)throw new RangeError("out of range index");if(P>=H&&f>=A)return 0;if(P>=H)return-1;if(f>=A)return 1;if(f>>>=0,A>>>=0,P>>>=0,H>>>=0,this===u)return 0;let D=H-P,n0=A-f,b0=Math.min(D,n0),c0=this.slice(P,H),y0=u.slice(f,A);for(let l0=0;l0<b0;++l0)if(c0[l0]!==y0[l0]){D=c0[l0],n0=y0[l0];break}return D<n0?-1:n0<D?1:0};function S(b,u,f,A,P){if(b.length===0)return-1;if(typeof f=="string"?(A=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,Re(f)&&(f=P?0:b.length-1),f<0&&(f=b.length+f),f>=b.length){if(P)return-1;f=b.length-1}else if(f<0)if(P)f=0;else return-1;if(typeof u=="string"&&(u=o.from(u,A)),o.isBuffer(u))return u.length===0?-1:z(b,u,f,A,P);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(b,u,f):Uint8Array.prototype.lastIndexOf.call(b,u,f):z(b,[u],f,A,P);throw new TypeError("val must be string, number or Buffer")}function z(b,u,f,A,P){let H=1,D=b.length,n0=u.length;if(A!==void 0&&(A=String(A).toLowerCase(),A==="ucs2"||A==="ucs-2"||A==="utf16le"||A==="utf-16le")){if(b.length<2||u.length<2)return-1;H=2,D/=2,n0/=2,f/=2}function b0(y0,l0){return H===1?y0[l0]:y0.readUInt16BE(l0*H)}let c0;if(P){let y0=-1;for(c0=f;c0<D;c0++)if(b0(b,c0)===b0(u,y0===-1?0:c0-y0)){if(y0===-1&&(y0=c0),c0-y0+1===n0)return y0*H}else y0!==-1&&(c0-=c0-y0),y0=-1}else for(f+n0>D&&(f=D-n0),c0=f;c0>=0;c0--){let y0=!0;for(let l0=0;l0<n0;l0++)if(b0(b,c0+l0)!==b0(u,l0)){y0=!1;break}if(y0)return c0}return-1}o.prototype.includes=function(u,f,A){return this.indexOf(u,f,A)!==-1},o.prototype.indexOf=function(u,f,A){return S(this,u,f,A,!0)},o.prototype.lastIndexOf=function(u,f,A){return S(this,u,f,A,!1)};function B(b,u,f,A){f=Number(f)||0;let P=b.length-f;A?(A=Number(A),A>P&&(A=P)):A=P;let H=u.length;A>H/2&&(A=H/2);let D;for(D=0;D<A;++D){let n0=parseInt(u.substr(D*2,2),16);if(Re(n0))return D;b[f+D]=n0}return D}function I(b,u,f,A){return Zt(Mt(u,b.length-f),b,f,A)}function W(b,u,f,A){return Zt(xe(u),b,f,A)}function O(b,u,f,A){return Zt(l5(u),b,f,A)}function j(b,u,f,A){return Zt(qt(u,b.length-f),b,f,A)}o.prototype.write=function(u,f,A,P){if(f===void 0)P="utf8",A=this.length,f=0;else if(A===void 0&&typeof f=="string")P=f,A=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(A)?(A=A>>>0,P===void 0&&(P="utf8")):(P=A,A=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let H=this.length-f;if((A===void 0||A>H)&&(A=H),u.length>0&&(A<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let D=!1;for(;;)switch(P){case"hex":return B(this,u,f,A);case"utf8":case"utf-8":return I(this,u,f,A);case"ascii":case"latin1":case"binary":return W(this,u,f,A);case"base64":return O(this,u,f,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,u,f,A);default:if(D)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),D=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(b,u,f){return u===0&&f===b.length?r.fromByteArray(b):r.fromByteArray(b.slice(u,f))}function i0(b,u,f){f=Math.min(b.length,f);let A=[],P=u;for(;P<f;){let H=b[P],D=null,n0=H>239?4:H>223?3:H>191?2:1;if(P+n0<=f){let b0,c0,y0,l0;switch(n0){case 1:H<128&&(D=H);break;case 2:b0=b[P+1],(b0&192)===128&&(l0=(H&31)<<6|b0&63,l0>127&&(D=l0));break;case 3:b0=b[P+1],c0=b[P+2],(b0&192)===128&&(c0&192)===128&&(l0=(H&15)<<12|(b0&63)<<6|c0&63,l0>2047&&(l0<55296||l0>57343)&&(D=l0));break;case 4:b0=b[P+1],c0=b[P+2],y0=b[P+3],(b0&192)===128&&(c0&192)===128&&(y0&192)===128&&(l0=(H&15)<<18|(b0&63)<<12|(c0&63)<<6|y0&63,l0>65535&&l0<1114112&&(D=l0))}}D===null?(D=65533,n0=1):D>65535&&(D-=65536,A.push(D>>>10&1023|55296),D=56320|D&1023),A.push(D),P+=n0}return Z(A)}let N=4096;function Z(b){let u=b.length;if(u<=N)return String.fromCharCode.apply(String,b);let f="",A=0;for(;A<u;)f+=String.fromCharCode.apply(String,b.slice(A,A+=N));return f}function J(b,u,f){let A="";f=Math.min(b.length,f);for(let P=u;P<f;++P)A+=String.fromCharCode(b[P]&127);return A}function s0(b,u,f){let A="";f=Math.min(b.length,f);for(let P=u;P<f;++P)A+=String.fromCharCode(b[P]);return A}function o0(b,u,f){let A=b.length;(!u||u<0)&&(u=0),(!f||f<0||f>A)&&(f=A);let P="";for(let H=u;H<f;++H)P+=ke[b[H]];return P}function f0(b,u,f){let A=b.slice(u,f),P="";for(let H=0;H<A.length-1;H+=2)P+=String.fromCharCode(A[H]+A[H+1]*256);return P}o.prototype.slice=function(u,f){let A=this.length;u=~~u,f=f===void 0?A:~~f,u<0?(u+=A,u<0&&(u=0)):u>A&&(u=A),f<0?(f+=A,f<0&&(f=0)):f>A&&(f=A),f<u&&(f=u);let P=this.subarray(u,f);return Object.setPrototypeOf(P,o.prototype),P};function $(b,u,f){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+u>f)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,f,A){u=u>>>0,f=f>>>0,A||$(u,f,this.length);let P=this[u],H=1,D=0;for(;++D<f&&(H*=256);)P+=this[u+D]*H;return P},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,f,A){u=u>>>0,f=f>>>0,A||$(u,f,this.length);let P=this[u+--f],H=1;for(;f>0&&(H*=256);)P+=this[u+--f]*H;return P},o.prototype.readUint8=o.prototype.readUInt8=function(u,f){return u=u>>>0,f||$(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,f){return u=u>>>0,f||$(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,f){return u=u>>>0,f||$(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,f){return u=u>>>0,f||$(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,f){return u=u>>>0,f||$(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readBigUInt64LE=tt(function(u){u=u>>>0,Tt(u,"offset");let f=this[u],A=this[u+7];(f===void 0||A===void 0)&&C0(u,this.length-8);let P=f+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,H=this[++u]+this[++u]*2**8+this[++u]*2**16+A*2**24;return BigInt(P)+(BigInt(H)<<BigInt(32))}),o.prototype.readBigUInt64BE=tt(function(u){u=u>>>0,Tt(u,"offset");let f=this[u],A=this[u+7];(f===void 0||A===void 0)&&C0(u,this.length-8);let P=f*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],H=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+A;return(BigInt(P)<<BigInt(32))+BigInt(H)}),o.prototype.readIntLE=function(u,f,A){u=u>>>0,f=f>>>0,A||$(u,f,this.length);let P=this[u],H=1,D=0;for(;++D<f&&(H*=256);)P+=this[u+D]*H;return H*=128,P>=H&&(P-=Math.pow(2,8*f)),P},o.prototype.readIntBE=function(u,f,A){u=u>>>0,f=f>>>0,A||$(u,f,this.length);let P=f,H=1,D=this[u+--P];for(;P>0&&(H*=256);)D+=this[u+--P]*H;return H*=128,D>=H&&(D-=Math.pow(2,8*f)),D},o.prototype.readInt8=function(u,f){return u=u>>>0,f||$(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,f){u=u>>>0,f||$(u,2,this.length);let A=this[u]|this[u+1]<<8;return A&32768?A|4294901760:A},o.prototype.readInt16BE=function(u,f){u=u>>>0,f||$(u,2,this.length);let A=this[u+1]|this[u]<<8;return A&32768?A|4294901760:A},o.prototype.readInt32LE=function(u,f){return u=u>>>0,f||$(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,f){return u=u>>>0,f||$(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readBigInt64LE=tt(function(u){u=u>>>0,Tt(u,"offset");let f=this[u],A=this[u+7];(f===void 0||A===void 0)&&C0(u,this.length-8);let P=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(A<<24);return(BigInt(P)<<BigInt(32))+BigInt(f+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),o.prototype.readBigInt64BE=tt(function(u){u=u>>>0,Tt(u,"offset");let f=this[u],A=this[u+7];(f===void 0||A===void 0)&&C0(u,this.length-8);let P=(f<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(P)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+A)}),o.prototype.readFloatLE=function(u,f){return u=u>>>0,f||$(u,4,this.length),t.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,f){return u=u>>>0,f||$(u,4,this.length),t.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,f){return u=u>>>0,f||$(u,8,this.length),t.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,f){return u=u>>>0,f||$(u,8,this.length),t.read(this,u,!1,52,8)};function g0(b,u,f,A,P,H){if(!o.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>P||u<H)throw new RangeError('"value" argument is out of bounds');if(f+A>b.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,f,A,P){if(u=+u,f=f>>>0,A=A>>>0,!P){let n0=Math.pow(2,8*A)-1;g0(this,u,f,A,n0,0)}let H=1,D=0;for(this[f]=u&255;++D<A&&(H*=256);)this[f+D]=u/H&255;return f+A},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,f,A,P){if(u=+u,f=f>>>0,A=A>>>0,!P){let n0=Math.pow(2,8*A)-1;g0(this,u,f,A,n0,0)}let H=A-1,D=1;for(this[f+H]=u&255;--H>=0&&(D*=256);)this[f+H]=u/D&255;return f+A},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,1,255,0),this[f]=u&255,f+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,2,65535,0),this[f]=u&255,this[f+1]=u>>>8,f+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,2,65535,0),this[f]=u>>>8,this[f+1]=u&255,f+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,4,4294967295,0),this[f+3]=u>>>24,this[f+2]=u>>>16,this[f+1]=u>>>8,this[f]=u&255,f+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,4,4294967295,0),this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255,f+4};function ot(b,u,f,A,P){Ee(u,A,P,b,f,7);let H=Number(u&BigInt(4294967295));b[f++]=H,H=H>>8,b[f++]=H,H=H>>8,b[f++]=H,H=H>>8,b[f++]=H;let D=Number(u>>BigInt(32)&BigInt(4294967295));return b[f++]=D,D=D>>8,b[f++]=D,D=D>>8,b[f++]=D,D=D>>8,b[f++]=D,f}function W0(b,u,f,A,P){Ee(u,A,P,b,f,7);let H=Number(u&BigInt(4294967295));b[f+7]=H,H=H>>8,b[f+6]=H,H=H>>8,b[f+5]=H,H=H>>8,b[f+4]=H;let D=Number(u>>BigInt(32)&BigInt(4294967295));return b[f+3]=D,D=D>>8,b[f+2]=D,D=D>>8,b[f+1]=D,D=D>>8,b[f]=D,f+8}o.prototype.writeBigUInt64LE=tt(function(u,f=0){return ot(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=tt(function(u,f=0){return W0(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(u,f,A,P){if(u=+u,f=f>>>0,!P){let b0=Math.pow(2,8*A-1);g0(this,u,f,A,b0-1,-b0)}let H=0,D=1,n0=0;for(this[f]=u&255;++H<A&&(D*=256);)u<0&&n0===0&&this[f+H-1]!==0&&(n0=1),this[f+H]=(u/D>>0)-n0&255;return f+A},o.prototype.writeIntBE=function(u,f,A,P){if(u=+u,f=f>>>0,!P){let b0=Math.pow(2,8*A-1);g0(this,u,f,A,b0-1,-b0)}let H=A-1,D=1,n0=0;for(this[f+H]=u&255;--H>=0&&(D*=256);)u<0&&n0===0&&this[f+H+1]!==0&&(n0=1),this[f+H]=(u/D>>0)-n0&255;return f+A},o.prototype.writeInt8=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,1,127,-128),u<0&&(u=255+u+1),this[f]=u&255,f+1},o.prototype.writeInt16LE=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,2,32767,-32768),this[f]=u&255,this[f+1]=u>>>8,f+2},o.prototype.writeInt16BE=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,2,32767,-32768),this[f]=u>>>8,this[f+1]=u&255,f+2},o.prototype.writeInt32LE=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,4,2147483647,-2147483648),this[f]=u&255,this[f+1]=u>>>8,this[f+2]=u>>>16,this[f+3]=u>>>24,f+4},o.prototype.writeInt32BE=function(u,f,A){return u=+u,f=f>>>0,A||g0(this,u,f,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255,f+4},o.prototype.writeBigInt64LE=tt(function(u,f=0){return ot(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=tt(function(u,f=0){return W0(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q0(b,u,f,A,P,H){if(f+A>b.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function Rt(b,u,f,A,P){return u=+u,f=f>>>0,P||Q0(b,u,f,4),t.write(b,u,f,A,23,4),f+4}o.prototype.writeFloatLE=function(u,f,A){return Rt(this,u,f,!0,A)},o.prototype.writeFloatBE=function(u,f,A){return Rt(this,u,f,!1,A)};function kt(b,u,f,A,P){return u=+u,f=f>>>0,P||Q0(b,u,f,8),t.write(b,u,f,A,52,8),f+8}o.prototype.writeDoubleLE=function(u,f,A){return kt(this,u,f,!0,A)},o.prototype.writeDoubleBE=function(u,f,A){return kt(this,u,f,!1,A)},o.prototype.copy=function(u,f,A,P){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(A||(A=0),!P&&P!==0&&(P=this.length),f>=u.length&&(f=u.length),f||(f=0),P>0&&P<A&&(P=A),P===A||u.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(A<0||A>=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),u.length-f<P-A&&(P=u.length-f+A);let H=P-A;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,A,P):Uint8Array.prototype.set.call(u,this.subarray(A,P),f),H},o.prototype.fill=function(u,f,A,P){if(typeof u=="string"){if(typeof f=="string"?(P=f,f=0,A=this.length):typeof A=="string"&&(P=A,A=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(u.length===1){let D=u.charCodeAt(0);(P==="utf8"&&D<128||P==="latin1")&&(u=D)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(f<0||this.length<f||this.length<A)throw new RangeError("Out of range index");if(A<=f)return this;f=f>>>0,A=A===void 0?this.length:A>>>0,u||(u=0);let H;if(typeof u=="number")for(H=f;H<A;++H)this[H]=u;else{let D=o.isBuffer(u)?u:o.from(u,P),n0=D.length;if(n0===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(H=0;H<A-f;++H)this[H+f]=D[H%n0]}return this};let Y0={};function it(b,u,f){Y0[b]=class extends f{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}it("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),it("ERR_INVALID_ARG_TYPE",function(b,u){return`The "${b}" argument must be of type number. Received type ${typeof u}`},TypeError),it("ERR_OUT_OF_RANGE",function(b,u,f){let A=`The value of "${b}" is out of range.`,P=f;return Number.isInteger(f)&&Math.abs(f)>2**32?P=Ae(String(f)):typeof f=="bigint"&&(P=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(P=Ae(P)),P+="n"),A+=` It must be ${u}. Received ${P}`,A},RangeError);function Ae(b){let u="",f=b.length,A=b[0]==="-"?1:0;for(;f>=A+4;f-=3)u=`_${b.slice(f-3,f)}${u}`;return`${b.slice(0,f)}${u}`}function a5(b,u,f){Tt(u,"offset"),(b[u]===void 0||b[u+f]===void 0)&&C0(u,b.length-(f+1))}function Ee(b,u,f,A,P,H){if(b>f||b<u){let D=typeof u=="bigint"?"n":"",n0;throw u===0||u===BigInt(0)?n0=`>= 0${D} and < 2${D} ** ${(H+1)*8}${D}`:n0=`>= -(2${D} ** ${(H+1)*8-1}${D}) and < 2 ** ${(H+1)*8-1}${D}`,new Y0.ERR_OUT_OF_RANGE("value",n0,b)}a5(A,P,H)}function Tt(b,u){if(typeof b!="number")throw new Y0.ERR_INVALID_ARG_TYPE(u,"number",b)}function C0(b,u,f){throw Math.floor(b)!==b?(Tt(b,f),new Y0.ERR_OUT_OF_RANGE("offset","an integer",b)):u<0?new Y0.ERR_BUFFER_OUT_OF_BOUNDS:new Y0.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,b)}let K0=/[^+/0-9A-Za-z-_]/g;function v5(b){if(b=b.split("=")[0],b=b.trim().replace(K0,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function Mt(b,u){u=u||1/0;let f,A=b.length,P=null,H=[];for(let D=0;D<A;++D){if(f=b.charCodeAt(D),f>55295&&f<57344){if(!P){if(f>56319){(u-=3)>-1&&H.push(239,191,189);continue}else if(D+1===A){(u-=3)>-1&&H.push(239,191,189);continue}P=f;continue}if(f<56320){(u-=3)>-1&&H.push(239,191,189),P=f;continue}f=(P-55296<<10|f-56320)+65536}else P&&(u-=3)>-1&&H.push(239,191,189);if(P=null,f<128){if((u-=1)<0)break;H.push(f)}else if(f<2048){if((u-=2)<0)break;H.push(f>>6|192,f&63|128)}else if(f<65536){if((u-=3)<0)break;H.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((u-=4)<0)break;H.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return H}function xe(b){let u=[];for(let f=0;f<b.length;++f)u.push(b.charCodeAt(f)&255);return u}function qt(b,u){let f,A,P,H=[];for(let D=0;D<b.length&&!((u-=2)<0);++D)f=b.charCodeAt(D),A=f>>8,P=f%256,H.push(P),H.push(A);return H}function l5(b){return r.toByteArray(v5(b))}function Zt(b,u,f,A){let P;for(P=0;P<A&&!(P+f>=u.length||P>=b.length);++P)u[P+f]=b[P];return P}function J0(b,u){return b instanceof u||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===u.name}function Re(b){return b!==b}let ke=function(){let b="0123456789abcdef",u=new Array(256);for(let f=0;f<16;++f){let A=f*16;for(let P=0;P<16;++P)u[A+P]=b[f]+b[P]}return u}();function tt(b){return typeof BigInt>"u"?g1:b}function g1(){throw new Error("BigInt not supported")}return Ct}var Se,ui,h5,fi,Ct,hi,pi=at(()=>{R();k();M();T();Se={},ui=!1;h5={},fi=!1;Ct={},hi=!1});var Pt,F,sv,ov,gi=at(()=>{R();k();M();T();pi();Pt=mi();Pt.Buffer;Pt.SlowBuffer;Pt.INSPECT_MAX_BYTES;Pt.kMaxLength;F=Pt.Buffer,sv=Pt.INSPECT_MAX_BYTES,ov=Pt.kMaxLength});var M=at(()=>{gi()});var Gi=V0((R1,k1)=>{R();k();M();T();(function(r,t){typeof R1=="object"&&typeof k1<"u"?k1.exports=t():typeof define=="function"&&define.amd?define(t):r.Stats=t()})(R1,function(){var r=function(){function t(d){return n.appendChild(d.dom),d}function e(d){for(var m=0;m<n.children.length;m++)n.children[m].style.display=m===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,v=0,a=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(){v++;var d=(performance||Date).now();if(l.update(d-s,200),d>o+1e3&&(a.update(1e3*v/(d-o),100),o=d,v=0,c)){var m=performance.memory;c.update(m.usedJSHeapSize/1048576,m.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,v=o(window.devicePixelRatio||1),a=80*v,l=48*v,c=3*v,d=2*v,m=3*v,p=15*v,g=74*v,y=30*v,w=document.createElement("canvas");w.width=a,w.height=l,w.style.cssText="width:80px;height:48px";var _=w.getContext("2d");return _.font="bold "+9*v+"px Helvetica,Arial,sans-serif",_.textBaseline="top",_.fillStyle=i,_.fillRect(0,0,a,l),_.fillStyle=e,_.fillText(t,c,d),_.fillRect(m,p,g,y),_.fillStyle=i,_.globalAlpha=.9,_.fillRect(m,p,g,y),{dom:w,update:function(E,C){n=Math.min(n,E),s=Math.max(s,E),_.fillStyle=i,_.globalAlpha=1,_.fillRect(0,0,a,p),_.fillStyle=e,_.fillText(o(E)+" "+t+" ("+o(n)+"-"+o(s)+")",c,d),_.drawImage(w,m+v,p,g-v,y,m,p,g-v,y),_.fillRect(m+g-v,p,v,y),_.fillStyle=i,_.globalAlpha=.9,_.fillRect(m+g-v,p,v,o((1-E/C)*y))}}},r})});var sn=V0((rn,z5)=>{R();k();M();T();(function(r,t){typeof z5=="object"&&z5.exports?z5.exports=t():r.nearley=t()})(rn,function(){function r(a,l,c){return this.id=++r.highestId,this.name=a,this.symbols=l,this.postprocess=c,this}r.highestId=0,r.prototype.toString=function(a){var l=typeof a>"u"?this.symbols.map(v).join(" "):this.symbols.slice(0,a).map(v).join(" ")+" \u25CF "+this.symbols.slice(a).map(v).join(" ");return this.name+" \u2192 "+l};function t(a,l,c,d){this.rule=a,this.dot=l,this.reference=c,this.data=[],this.wantedBy=d,this.isComplete=this.dot===a.symbols.length}t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(a){var l=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return l.left=this,l.right=a,l.isComplete&&(l.data=l.build(),l.right=void 0),l},t.prototype.build=function(){var a=[],l=this;do a.push(l.right.data),l=l.left;while(l.left);return a.reverse(),a},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))};function e(a,l){this.grammar=a,this.index=l,this.states=[],this.wants={},this.scannable=[],this.completed={}}e.prototype.process=function(a){for(var l=this.states,c=this.wants,d=this.completed,m=0;m<l.length;m++){var p=l[m];if(p.isComplete){if(p.finish(),p.data!==s.fail){for(var g=p.wantedBy,y=g.length;y--;){var w=g[y];this.complete(w,p)}if(p.reference===this.index){var _=p.rule.name;(this.completed[_]=this.completed[_]||[]).push(p)}}}else{var _=p.rule.symbols[p.dot];if(typeof _!="string"){this.scannable.push(p);continue}if(c[_]){if(c[_].push(p),d.hasOwnProperty(_))for(var E=d[_],y=0;y<E.length;y++){var C=E[y];this.complete(p,C)}}else c[_]=[p],this.predict(_)}}},e.prototype.predict=function(a){for(var l=this.grammar.byName[a]||[],c=0;c<l.length;c++){var d=l[c],m=this.wants[a],p=new t(d,0,this.index,m);this.states.push(p)}},e.prototype.complete=function(a,l){var c=a.nextState(l);this.states.push(c)};function i(a,l){this.rules=a,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)}),m=new i(d,l);return m.lexer=c,m};function n(){this.reset("")}n.prototype.reset=function(a,l){this.buffer=a,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 a=this.buffer[this.index++];return a===`
1
+ var q6=Object.create;var Te=Object.defineProperty;var Z6=Object.getOwnPropertyDescriptor;var X6=Object.getOwnPropertyNames;var $6=Object.getPrototypeOf,ts=Object.prototype.hasOwnProperty;var es=(r,t,e)=>t in r?Te(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var is=(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 ot=(r,t)=>()=>(r&&(t=r(r=0)),t);var N0=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),c5=(r,t)=>{for(var e in t)Te(r,e,{get:t[e],enumerable:!0})},q2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of X6(t))!ts.call(r,n)&&n!==e&&Te(r,n,{get:()=>t[n],enumerable:!(i=Z6(t,n))||i.enumerable});return r};var Me=(r,t,e)=>(e=r!=null?q6($6(r)):{},q2(t||!r||!r.__esModule?Te(e,"default",{value:r,enumerable:!0}):e,r)),ns=r=>q2(Te({},"__esModule",{value:!0}),r);var h=(r,t,e)=>(es(r,typeof t!="symbol"?t+"":t,e),e);var R=ot(()=>{});var k=ot(()=>{});var L={};c5(L,{_debugEnd:()=>Fi,_debugProcess:()=>Di,_events:()=>e3,_eventsCount:()=>i3,_exiting:()=>yi,_fatalExceptions:()=>zi,_getActiveHandles:()=>Ei,_getActiveRequests:()=>Ai,_kill:()=>Ri,_linkedBinding:()=>gi,_maxListeners:()=>t3,_preload_modules:()=>Zi,_rawDebug:()=>mi,_startProfilerIdleNotifier:()=>Ui,_stopProfilerIdleNotifier:()=>Gi,_tickCallback:()=>Li,abort:()=>ji,addListener:()=>n3,allowedNodeEnvironmentFlags:()=>Pi,arch:()=>ei,argv:()=>ri,argv0:()=>qi,assert:()=>Bi,binding:()=>li,browser:()=>hi,chdir:()=>ui,config:()=>_i,cpuUsage:()=>f5,cwd:()=>di,debugPort:()=>Ji,default:()=>u3,dlopen:()=>wi,domain:()=>bi,emit:()=>v3,emitWarning:()=>vi,env:()=>ni,execArgv:()=>si,execPath:()=>Ki,exit:()=>Si,features:()=>Ii,hasUncaughtExceptionCaptureCallback:()=>Oi,hrtime:()=>u5,kill:()=>Mi,listeners:()=>d3,memoryUsage:()=>Ti,moduleLoadList:()=>pi,nextTick:()=>X2,off:()=>s3,on:()=>vt,once:()=>r3,openStdin:()=>Ci,pid:()=>Qi,platform:()=>ii,ppid:()=>Yi,prependListener:()=>l3,prependOnceListener:()=>c3,reallyExit:()=>xi,release:()=>fi,removeAllListeners:()=>a3,removeListener:()=>o3,resourceUsage:()=>ki,setSourceMapsEnabled:()=>Xi,setUncaughtExceptionCaptureCallback:()=>Hi,stderr:()=>Vi,stdin:()=>Ni,stdout:()=>Wi,title:()=>ti,umask:()=>ci,uptime:()=>$i,version:()=>oi,versions:()=>ai});function w1(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}function rs(){!Xt||!St||(Xt=!1,St.length?at=St.concat(at):d5=-1,at.length&&Z2())}function Z2(){if(!Xt){var r=setTimeout(rs,0);Xt=!0;for(var t=at.length;t;){for(St=at,at=[];++d5<t;)St&&St[d5].run();d5=-1,t=at.length}St=null,Xt=!1,clearTimeout(r)}}function X2(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 $2(r,t)),at.length===1&&!Xt&&setTimeout(Z2,0)}function $2(r,t){this.fun=r,this.array=t}function B0(){}function gi(r){w1("_linkedBinding")}function wi(r){w1("dlopen")}function Ai(){return[]}function Ei(){return[]}function Bi(r,t){if(!r)throw new Error(t||"assertion error")}function Oi(){return!1}function $i(){return pt.now()/1e3}function u5(r){var t=Math.floor((Date.now()-pt.now())*.001),e=pt.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+=_1)),[i,n]}function vt(){return u3}function d3(r){return[]}var at,Xt,St,d5,ti,ei,ii,ni,ri,si,oi,ai,vi,li,ci,di,ui,fi,hi,mi,pi,bi,yi,_i,xi,Ri,f5,ki,Ti,Mi,Si,Ci,Pi,Ii,zi,Hi,Li,Di,Fi,Ui,Gi,Wi,Vi,Ni,ji,Qi,Yi,Ki,Ji,qi,Zi,Xi,pt,y1,_1,t3,e3,i3,n3,r3,s3,o3,a3,v3,l3,c3,u3,f3=ot(()=>{R();k();M();T();at=[],Xt=!1,d5=-1;$2.prototype.run=function(){this.fun.apply(null,this.array)};ti="browser",ei="x64",ii="browser",ni={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},ri=["/usr/bin/node"],si=[],oi="v16.8.0",ai={},vi=function(r,t){},li=function(r){w1("binding")},ci=function(r){return 0},di=function(){return"/"},ui=function(r){},fi={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};hi=!0,mi=B0,pi=[];bi={},yi=!1,_i={};xi=B0,Ri=B0,f5=function(){return{}},ki=f5,Ti=f5,Mi=B0,Si=B0,Ci=B0,Pi={};Ii={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},zi=B0,Hi=B0;Li=B0,Di=B0,Fi=B0,Ui=B0,Gi=B0,Wi=void 0,Vi=void 0,Ni=void 0,ji=B0,Qi=2,Yi=1,Ki="/bin/usr/node",Ji=9229,qi="node",Zi=[],Xi=B0,pt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};pt.now===void 0&&(y1=Date.now(),pt.timing&&pt.timing.navigationStart&&(y1=pt.timing.navigationStart),pt.now=()=>Date.now()-y1);_1=1e9;u5.bigint=function(r){var t=u5(r);return typeof BigInt>"u"?t[0]*_1+t[1]:BigInt(t[0]*_1)+BigInt(t[1])};t3=10,e3={},i3=0;n3=vt,r3=vt,s3=vt,o3=vt,a3=vt,v3=B0,l3=vt,c3=vt;u3={version:oi,versions:ai,arch:ei,platform:ii,browser:hi,release:fi,_rawDebug:mi,moduleLoadList:pi,binding:li,_linkedBinding:gi,_events:e3,_eventsCount:i3,_maxListeners:t3,on:vt,addListener:n3,once:r3,off:s3,removeListener:o3,removeAllListeners:a3,emit:v3,prependListener:l3,prependOnceListener:c3,listeners:d3,domain:bi,_exiting:yi,config:_i,dlopen:wi,uptime:$i,_getActiveRequests:Ai,_getActiveHandles:Ei,reallyExit:xi,_kill:Ri,cpuUsage:f5,resourceUsage:ki,memoryUsage:Ti,kill:Mi,exit:Si,openStdin:Ci,allowedNodeEnvironmentFlags:Pi,assert:Bi,features:Ii,_fatalExceptions:zi,setUncaughtExceptionCaptureCallback:Hi,hasUncaughtExceptionCaptureCallback:Oi,emitWarning:vi,nextTick:X2,_tickCallback:Li,_debugProcess:Di,_debugEnd:Fi,_startProfilerIdleNotifier:Ui,_stopProfilerIdleNotifier:Gi,stdout:Wi,stdin:Ni,stderr:Vi,abort:ji,umask:ci,chdir:ui,cwd:di,env:ni,title:ti,argv:ri,execArgv:si,pid:Qi,ppid:Yi,execPath:Ki,debugPort:Ji,hrtime:u5,argv0:qi,_preload_modules:Zi,setSourceMapsEnabled:Xi}});var T=ot(()=>{f3()});function ss(){if(h3)return Se;h3=!0,Se.byteLength=v,Se.toByteArray=l,Se.fromByteArray=m;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 y=p.indexOf("=");y===-1&&(y=g);var E=y===g?0:4-y%4;return[y,E]}function v(p){var g=o(p),y=g[0],E=g[1];return(y+E)*3/4-E}function a(p,g,y){return(g+y)*3/4-y}function l(p){var g,y=o(p),E=y[0],_=y[1],A=new e(a(p,E,_)),C=0,x=_>0?E-4:E,S;for(S=0;S<x;S+=4)g=t[p.charCodeAt(S)]<<18|t[p.charCodeAt(S+1)]<<12|t[p.charCodeAt(S+2)]<<6|t[p.charCodeAt(S+3)],A[C++]=g>>16&255,A[C++]=g>>8&255,A[C++]=g&255;return _===2&&(g=t[p.charCodeAt(S)]<<2|t[p.charCodeAt(S+1)]>>4,A[C++]=g&255),_===1&&(g=t[p.charCodeAt(S)]<<10|t[p.charCodeAt(S+1)]<<4|t[p.charCodeAt(S+2)]>>2,A[C++]=g>>8&255,A[C++]=g&255),A}function c(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[p&63]}function d(p,g,y){for(var E,_=[],A=g;A<y;A+=3)E=(p[A]<<16&16711680)+(p[A+1]<<8&65280)+(p[A+2]&255),_.push(c(E));return _.join("")}function m(p){for(var g,y=p.length,E=y%3,_=[],A=16383,C=0,x=y-E;C<x;C+=A)_.push(d(p,C,C+A>x?x:C+A));return E===1?(g=p[y-1],_.push(r[g>>2]+r[g<<4&63]+"==")):E===2&&(g=(p[y-2]<<8)+p[y-1],_.push(r[g>>10]+r[g>>4&63]+r[g<<2&63]+"=")),_.join("")}return Se}function os(){if(m3)return h5;m3=!0;return h5.read=function(r,t,e,i,n){var s,o,v=n*8-i-1,a=(1<<v)-1,l=a>>1,c=-7,d=e?n-1:0,m=e?-1:1,p=r[t+d];for(d+=m,s=p&(1<<-c)-1,p>>=-c,c+=v;c>0;s=s*256+r[t+d],d+=m,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=i;c>0;o=o*256+r[t+d],d+=m,c-=8);if(s===0)s=1-l;else{if(s===a)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)},h5.write=function(r,t,e,i,n,s){var o,v,a,l=s*8-n-1,c=(1<<l)-1,d=c>>1,m=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,g=i?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(v=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),o+d>=1?t+=m/a:t+=m*Math.pow(2,1-d),t*a>=2&&(o++,a/=2),o+d>=c?(v=0,o=c):o+d>=1?(v=(t*a-1)*Math.pow(2,n),o=o+d):(v=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;r[e+p]=v&255,p+=g,v/=256,n-=8);for(o=o<<n|v,l+=n;l>0;r[e+p]=o&255,p+=g,o/=256,l-=8);r[e+p-g]|=y*128},h5}function g3(){if(p3)return Ct;p3=!0;let r=ss(),t=os(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ct.Buffer=o,Ct.SlowBuffer=_,Ct.INSPECT_MAX_BYTES=50;let i=2147483647;Ct.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=n(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u";function n(){try{let b=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(b,u),b.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(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');let u=new Uint8Array(b);return Object.setPrototypeOf(u,o.prototype),u}function o(b,u,f){if(typeof b=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(b)}return v(b,u,f)}o.poolSize=8192;function v(b,u,f){if(typeof b=="string")return d(b,u);if(ArrayBuffer.isView(b))return p(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(J0(b,ArrayBuffer)||b&&J0(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(J0(b,SharedArrayBuffer)||b&&J0(b.buffer,SharedArrayBuffer)))return g(b,u,f);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let w=b.valueOf&&b.valueOf();if(w!=null&&w!==b)return o.from(w,u,f);let P=y(b);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return o.from(b[Symbol.toPrimitive]("string"),u,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}o.from=function(b,u,f){return v(b,u,f)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function a(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function l(b,u,f){return a(b),b<=0?s(b):u!==void 0?typeof f=="string"?s(b).fill(u,f):s(b).fill(u):s(b)}o.alloc=function(b,u,f){return l(b,u,f)};function c(b){return a(b),s(b<0?0:E(b)|0)}o.allocUnsafe=function(b){return c(b)},o.allocUnsafeSlow=function(b){return c(b)};function d(b,u){if((typeof u!="string"||u==="")&&(u="utf8"),!o.isEncoding(u))throw new TypeError("Unknown encoding: "+u);let f=A(b,u)|0,w=s(f),P=w.write(b,u);return P!==f&&(w=w.slice(0,P)),w}function m(b){let u=b.length<0?0:E(b.length)|0,f=s(u);for(let w=0;w<u;w+=1)f[w]=b[w]&255;return f}function p(b){if(J0(b,Uint8Array)){let u=new Uint8Array(b);return g(u.buffer,u.byteOffset,u.byteLength)}return m(b)}function g(b,u,f){if(u<0||b.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<u+(f||0))throw new RangeError('"length" is outside of buffer bounds');let w;return u===void 0&&f===void 0?w=new Uint8Array(b):f===void 0?w=new Uint8Array(b,u):w=new Uint8Array(b,u,f),Object.setPrototypeOf(w,o.prototype),w}function y(b){if(o.isBuffer(b)){let u=E(b.length)|0,f=s(u);return f.length===0||b.copy(f,0,0,u),f}if(b.length!==void 0)return typeof b.length!="number"||Re(b.length)?s(0):m(b);if(b.type==="Buffer"&&Array.isArray(b.data))return m(b.data)}function E(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function _(b){return+b!=b&&(b=0),o.alloc(+b)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,f){if(J0(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),J0(f,Uint8Array)&&(f=o.from(f,f.offset,f.byteLength)),!o.isBuffer(u)||!o.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===f)return 0;let w=u.length,P=f.length;for(let H=0,F=Math.min(w,P);H<F;++H)if(u[H]!==f[H]){w=u[H],P=f[H];break}return w<P?-1:P<w?1:0},o.isEncoding=function(u){switch(String(u).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(u,f){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);let w;if(f===void 0)for(f=0,w=0;w<u.length;++w)f+=u[w].length;let P=o.allocUnsafe(f),H=0;for(w=0;w<u.length;++w){let F=u[w];if(J0(F,Uint8Array))H+F.length>P.length?(o.isBuffer(F)||(F=o.from(F)),F.copy(P,H)):Uint8Array.prototype.set.call(P,F,H);else if(o.isBuffer(F))F.copy(P,H);else throw new TypeError('"list" argument must be an Array of Buffers');H+=F.length}return P};function A(b,u){if(o.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||J0(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);let f=b.length,w=arguments.length>2&&arguments[2]===!0;if(!w&&f===0)return 0;let P=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return Mt(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return l5(b).length;default:if(P)return w?-1:Mt(b).length;u=(""+u).toLowerCase(),P=!0}}o.byteLength=A;function C(b,u,f){let w=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,u>>>=0,f<=u))return"";for(b||(b="utf8");;)switch(b){case"hex":return o0(this,u,f);case"utf8":case"utf-8":return i0(this,u,f);case"ascii":return J(this,u,f);case"latin1":case"binary":return s0(this,u,f);case"base64":return q(this,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f0(this,u,f);default:if(w)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),w=!0}}o.prototype._isBuffer=!0;function x(b,u,f){let w=b[u];b[u]=b[f],b[f]=w}o.prototype.swap16=function(){let u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let f=0;f<u;f+=2)x(this,f,f+1);return this},o.prototype.swap32=function(){let u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let f=0;f<u;f+=4)x(this,f,f+3),x(this,f+1,f+2);return this},o.prototype.swap64=function(){let u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let f=0;f<u;f+=8)x(this,f,f+7),x(this,f+1,f+6),x(this,f+2,f+5),x(this,f+3,f+4);return this},o.prototype.toString=function(){let u=this.length;return u===0?"":arguments.length===0?i0(this,0,u):C.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){let u="",f=Ct.INSPECT_MAX_BYTES;return u=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(u+=" ... "),"<Buffer "+u+">"},e&&(o.prototype[e]=o.prototype.inspect),o.prototype.compare=function(u,f,w,P,H){if(J0(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(f===void 0&&(f=0),w===void 0&&(w=u?u.length:0),P===void 0&&(P=0),H===void 0&&(H=this.length),f<0||w>u.length||P<0||H>this.length)throw new RangeError("out of range index");if(P>=H&&f>=w)return 0;if(P>=H)return-1;if(f>=w)return 1;if(f>>>=0,w>>>=0,P>>>=0,H>>>=0,this===u)return 0;let F=H-P,n0=w-f,b0=Math.min(F,n0),c0=this.slice(P,H),y0=u.slice(f,w);for(let l0=0;l0<b0;++l0)if(c0[l0]!==y0[l0]){F=c0[l0],n0=y0[l0];break}return F<n0?-1:n0<F?1:0};function S(b,u,f,w,P){if(b.length===0)return-1;if(typeof f=="string"?(w=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,Re(f)&&(f=P?0:b.length-1),f<0&&(f=b.length+f),f>=b.length){if(P)return-1;f=b.length-1}else if(f<0)if(P)f=0;else return-1;if(typeof u=="string"&&(u=o.from(u,w)),o.isBuffer(u))return u.length===0?-1:z(b,u,f,w,P);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(b,u,f):Uint8Array.prototype.lastIndexOf.call(b,u,f):z(b,[u],f,w,P);throw new TypeError("val must be string, number or Buffer")}function z(b,u,f,w,P){let H=1,F=b.length,n0=u.length;if(w!==void 0&&(w=String(w).toLowerCase(),w==="ucs2"||w==="ucs-2"||w==="utf16le"||w==="utf-16le")){if(b.length<2||u.length<2)return-1;H=2,F/=2,n0/=2,f/=2}function b0(y0,l0){return H===1?y0[l0]:y0.readUInt16BE(l0*H)}let c0;if(P){let y0=-1;for(c0=f;c0<F;c0++)if(b0(b,c0)===b0(u,y0===-1?0:c0-y0)){if(y0===-1&&(y0=c0),c0-y0+1===n0)return y0*H}else y0!==-1&&(c0-=c0-y0),y0=-1}else for(f+n0>F&&(f=F-n0),c0=f;c0>=0;c0--){let y0=!0;for(let l0=0;l0<n0;l0++)if(b0(b,c0+l0)!==b0(u,l0)){y0=!1;break}if(y0)return c0}return-1}o.prototype.includes=function(u,f,w){return this.indexOf(u,f,w)!==-1},o.prototype.indexOf=function(u,f,w){return S(this,u,f,w,!0)},o.prototype.lastIndexOf=function(u,f,w){return S(this,u,f,w,!1)};function B(b,u,f,w){f=Number(f)||0;let P=b.length-f;w?(w=Number(w),w>P&&(w=P)):w=P;let H=u.length;w>H/2&&(w=H/2);let F;for(F=0;F<w;++F){let n0=parseInt(u.substr(F*2,2),16);if(Re(n0))return F;b[f+F]=n0}return F}function I(b,u,f,w){return Zt(Mt(u,b.length-f),b,f,w)}function W(b,u,f,w){return Zt(xe(u),b,f,w)}function O(b,u,f,w){return Zt(l5(u),b,f,w)}function j(b,u,f,w){return Zt(qt(u,b.length-f),b,f,w)}o.prototype.write=function(u,f,w,P){if(f===void 0)P="utf8",w=this.length,f=0;else if(w===void 0&&typeof f=="string")P=f,w=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(w)?(w=w>>>0,P===void 0&&(P="utf8")):(P=w,w=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let H=this.length-f;if((w===void 0||w>H)&&(w=H),u.length>0&&(w<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let F=!1;for(;;)switch(P){case"hex":return B(this,u,f,w);case"utf8":case"utf-8":return I(this,u,f,w);case"ascii":case"latin1":case"binary":return W(this,u,f,w);case"base64":return O(this,u,f,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,u,f,w);default:if(F)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),F=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(b,u,f){return u===0&&f===b.length?r.fromByteArray(b):r.fromByteArray(b.slice(u,f))}function i0(b,u,f){f=Math.min(b.length,f);let w=[],P=u;for(;P<f;){let H=b[P],F=null,n0=H>239?4:H>223?3:H>191?2:1;if(P+n0<=f){let b0,c0,y0,l0;switch(n0){case 1:H<128&&(F=H);break;case 2:b0=b[P+1],(b0&192)===128&&(l0=(H&31)<<6|b0&63,l0>127&&(F=l0));break;case 3:b0=b[P+1],c0=b[P+2],(b0&192)===128&&(c0&192)===128&&(l0=(H&15)<<12|(b0&63)<<6|c0&63,l0>2047&&(l0<55296||l0>57343)&&(F=l0));break;case 4:b0=b[P+1],c0=b[P+2],y0=b[P+3],(b0&192)===128&&(c0&192)===128&&(y0&192)===128&&(l0=(H&15)<<18|(b0&63)<<12|(c0&63)<<6|y0&63,l0>65535&&l0<1114112&&(F=l0))}}F===null?(F=65533,n0=1):F>65535&&(F-=65536,w.push(F>>>10&1023|55296),F=56320|F&1023),w.push(F),P+=n0}return Z(w)}let N=4096;function Z(b){let u=b.length;if(u<=N)return String.fromCharCode.apply(String,b);let f="",w=0;for(;w<u;)f+=String.fromCharCode.apply(String,b.slice(w,w+=N));return f}function J(b,u,f){let w="";f=Math.min(b.length,f);for(let P=u;P<f;++P)w+=String.fromCharCode(b[P]&127);return w}function s0(b,u,f){let w="";f=Math.min(b.length,f);for(let P=u;P<f;++P)w+=String.fromCharCode(b[P]);return w}function o0(b,u,f){let w=b.length;(!u||u<0)&&(u=0),(!f||f<0||f>w)&&(f=w);let P="";for(let H=u;H<f;++H)P+=ke[b[H]];return P}function f0(b,u,f){let w=b.slice(u,f),P="";for(let H=0;H<w.length-1;H+=2)P+=String.fromCharCode(w[H]+w[H+1]*256);return P}o.prototype.slice=function(u,f){let w=this.length;u=~~u,f=f===void 0?w:~~f,u<0?(u+=w,u<0&&(u=0)):u>w&&(u=w),f<0?(f+=w,f<0&&(f=0)):f>w&&(f=w),f<u&&(f=u);let P=this.subarray(u,f);return Object.setPrototypeOf(P,o.prototype),P};function $(b,u,f){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+u>f)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,f,w){u=u>>>0,f=f>>>0,w||$(u,f,this.length);let P=this[u],H=1,F=0;for(;++F<f&&(H*=256);)P+=this[u+F]*H;return P},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,f,w){u=u>>>0,f=f>>>0,w||$(u,f,this.length);let P=this[u+--f],H=1;for(;f>0&&(H*=256);)P+=this[u+--f]*H;return P},o.prototype.readUint8=o.prototype.readUInt8=function(u,f){return u=u>>>0,f||$(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,f){return u=u>>>0,f||$(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,f){return u=u>>>0,f||$(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,f){return u=u>>>0,f||$(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,f){return u=u>>>0,f||$(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readBigUInt64LE=$0(function(u){u=u>>>0,Tt(u,"offset");let f=this[u],w=this[u+7];(f===void 0||w===void 0)&&P0(u,this.length-8);let P=f+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,H=this[++u]+this[++u]*2**8+this[++u]*2**16+w*2**24;return BigInt(P)+(BigInt(H)<<BigInt(32))}),o.prototype.readBigUInt64BE=$0(function(u){u=u>>>0,Tt(u,"offset");let f=this[u],w=this[u+7];(f===void 0||w===void 0)&&P0(u,this.length-8);let P=f*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],H=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+w;return(BigInt(P)<<BigInt(32))+BigInt(H)}),o.prototype.readIntLE=function(u,f,w){u=u>>>0,f=f>>>0,w||$(u,f,this.length);let P=this[u],H=1,F=0;for(;++F<f&&(H*=256);)P+=this[u+F]*H;return H*=128,P>=H&&(P-=Math.pow(2,8*f)),P},o.prototype.readIntBE=function(u,f,w){u=u>>>0,f=f>>>0,w||$(u,f,this.length);let P=f,H=1,F=this[u+--P];for(;P>0&&(H*=256);)F+=this[u+--P]*H;return H*=128,F>=H&&(F-=Math.pow(2,8*f)),F},o.prototype.readInt8=function(u,f){return u=u>>>0,f||$(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,f){u=u>>>0,f||$(u,2,this.length);let w=this[u]|this[u+1]<<8;return w&32768?w|4294901760:w},o.prototype.readInt16BE=function(u,f){u=u>>>0,f||$(u,2,this.length);let w=this[u+1]|this[u]<<8;return w&32768?w|4294901760:w},o.prototype.readInt32LE=function(u,f){return u=u>>>0,f||$(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,f){return u=u>>>0,f||$(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readBigInt64LE=$0(function(u){u=u>>>0,Tt(u,"offset");let f=this[u],w=this[u+7];(f===void 0||w===void 0)&&P0(u,this.length-8);let P=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(w<<24);return(BigInt(P)<<BigInt(32))+BigInt(f+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),o.prototype.readBigInt64BE=$0(function(u){u=u>>>0,Tt(u,"offset");let f=this[u],w=this[u+7];(f===void 0||w===void 0)&&P0(u,this.length-8);let P=(f<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(P)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+w)}),o.prototype.readFloatLE=function(u,f){return u=u>>>0,f||$(u,4,this.length),t.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,f){return u=u>>>0,f||$(u,4,this.length),t.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,f){return u=u>>>0,f||$(u,8,this.length),t.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,f){return u=u>>>0,f||$(u,8,this.length),t.read(this,u,!1,52,8)};function g0(b,u,f,w,P,H){if(!o.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>P||u<H)throw new RangeError('"value" argument is out of bounds');if(f+w>b.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,f,w,P){if(u=+u,f=f>>>0,w=w>>>0,!P){let n0=Math.pow(2,8*w)-1;g0(this,u,f,w,n0,0)}let H=1,F=0;for(this[f]=u&255;++F<w&&(H*=256);)this[f+F]=u/H&255;return f+w},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,f,w,P){if(u=+u,f=f>>>0,w=w>>>0,!P){let n0=Math.pow(2,8*w)-1;g0(this,u,f,w,n0,0)}let H=w-1,F=1;for(this[f+H]=u&255;--H>=0&&(F*=256);)this[f+H]=u/F&255;return f+w},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,1,255,0),this[f]=u&255,f+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,2,65535,0),this[f]=u&255,this[f+1]=u>>>8,f+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,2,65535,0),this[f]=u>>>8,this[f+1]=u&255,f+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,4,4294967295,0),this[f+3]=u>>>24,this[f+2]=u>>>16,this[f+1]=u>>>8,this[f]=u&255,f+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,4,4294967295,0),this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255,f+4};function st(b,u,f,w,P){Ee(u,w,P,b,f,7);let H=Number(u&BigInt(4294967295));b[f++]=H,H=H>>8,b[f++]=H,H=H>>8,b[f++]=H,H=H>>8,b[f++]=H;let F=Number(u>>BigInt(32)&BigInt(4294967295));return b[f++]=F,F=F>>8,b[f++]=F,F=F>>8,b[f++]=F,F=F>>8,b[f++]=F,f}function V0(b,u,f,w,P){Ee(u,w,P,b,f,7);let H=Number(u&BigInt(4294967295));b[f+7]=H,H=H>>8,b[f+6]=H,H=H>>8,b[f+5]=H,H=H>>8,b[f+4]=H;let F=Number(u>>BigInt(32)&BigInt(4294967295));return b[f+3]=F,F=F>>8,b[f+2]=F,F=F>>8,b[f+1]=F,F=F>>8,b[f]=F,f+8}o.prototype.writeBigUInt64LE=$0(function(u,f=0){return st(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=$0(function(u,f=0){return V0(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(u,f,w,P){if(u=+u,f=f>>>0,!P){let b0=Math.pow(2,8*w-1);g0(this,u,f,w,b0-1,-b0)}let H=0,F=1,n0=0;for(this[f]=u&255;++H<w&&(F*=256);)u<0&&n0===0&&this[f+H-1]!==0&&(n0=1),this[f+H]=(u/F>>0)-n0&255;return f+w},o.prototype.writeIntBE=function(u,f,w,P){if(u=+u,f=f>>>0,!P){let b0=Math.pow(2,8*w-1);g0(this,u,f,w,b0-1,-b0)}let H=w-1,F=1,n0=0;for(this[f+H]=u&255;--H>=0&&(F*=256);)u<0&&n0===0&&this[f+H+1]!==0&&(n0=1),this[f+H]=(u/F>>0)-n0&255;return f+w},o.prototype.writeInt8=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,1,127,-128),u<0&&(u=255+u+1),this[f]=u&255,f+1},o.prototype.writeInt16LE=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,2,32767,-32768),this[f]=u&255,this[f+1]=u>>>8,f+2},o.prototype.writeInt16BE=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,2,32767,-32768),this[f]=u>>>8,this[f+1]=u&255,f+2},o.prototype.writeInt32LE=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,4,2147483647,-2147483648),this[f]=u&255,this[f+1]=u>>>8,this[f+2]=u>>>16,this[f+3]=u>>>24,f+4},o.prototype.writeInt32BE=function(u,f,w){return u=+u,f=f>>>0,w||g0(this,u,f,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255,f+4},o.prototype.writeBigInt64LE=$0(function(u,f=0){return st(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=$0(function(u,f=0){return V0(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q0(b,u,f,w,P,H){if(f+w>b.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function Rt(b,u,f,w,P){return u=+u,f=f>>>0,P||Q0(b,u,f,4),t.write(b,u,f,w,23,4),f+4}o.prototype.writeFloatLE=function(u,f,w){return Rt(this,u,f,!0,w)},o.prototype.writeFloatBE=function(u,f,w){return Rt(this,u,f,!1,w)};function kt(b,u,f,w,P){return u=+u,f=f>>>0,P||Q0(b,u,f,8),t.write(b,u,f,w,52,8),f+8}o.prototype.writeDoubleLE=function(u,f,w){return kt(this,u,f,!0,w)},o.prototype.writeDoubleBE=function(u,f,w){return kt(this,u,f,!1,w)},o.prototype.copy=function(u,f,w,P){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(w||(w=0),!P&&P!==0&&(P=this.length),f>=u.length&&(f=u.length),f||(f=0),P>0&&P<w&&(P=w),P===w||u.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(w<0||w>=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),u.length-f<P-w&&(P=u.length-f+w);let H=P-w;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,w,P):Uint8Array.prototype.set.call(u,this.subarray(w,P),f),H},o.prototype.fill=function(u,f,w,P){if(typeof u=="string"){if(typeof f=="string"?(P=f,f=0,w=this.length):typeof w=="string"&&(P=w,w=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(u.length===1){let F=u.charCodeAt(0);(P==="utf8"&&F<128||P==="latin1")&&(u=F)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(f<0||this.length<f||this.length<w)throw new RangeError("Out of range index");if(w<=f)return this;f=f>>>0,w=w===void 0?this.length:w>>>0,u||(u=0);let H;if(typeof u=="number")for(H=f;H<w;++H)this[H]=u;else{let F=o.isBuffer(u)?u:o.from(u,P),n0=F.length;if(n0===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(H=0;H<w-f;++H)this[H+f]=F[H%n0]}return this};let Y0={};function et(b,u,f){Y0[b]=class extends f{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}et("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),et("ERR_INVALID_ARG_TYPE",function(b,u){return`The "${b}" argument must be of type number. Received type ${typeof u}`},TypeError),et("ERR_OUT_OF_RANGE",function(b,u,f){let w=`The value of "${b}" is out of range.`,P=f;return Number.isInteger(f)&&Math.abs(f)>2**32?P=Ae(String(f)):typeof f=="bigint"&&(P=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(P=Ae(P)),P+="n"),w+=` It must be ${u}. Received ${P}`,w},RangeError);function Ae(b){let u="",f=b.length,w=b[0]==="-"?1:0;for(;f>=w+4;f-=3)u=`_${b.slice(f-3,f)}${u}`;return`${b.slice(0,f)}${u}`}function a5(b,u,f){Tt(u,"offset"),(b[u]===void 0||b[u+f]===void 0)&&P0(u,b.length-(f+1))}function Ee(b,u,f,w,P,H){if(b>f||b<u){let F=typeof u=="bigint"?"n":"",n0;throw u===0||u===BigInt(0)?n0=`>= 0${F} and < 2${F} ** ${(H+1)*8}${F}`:n0=`>= -(2${F} ** ${(H+1)*8-1}${F}) and < 2 ** ${(H+1)*8-1}${F}`,new Y0.ERR_OUT_OF_RANGE("value",n0,b)}a5(w,P,H)}function Tt(b,u){if(typeof b!="number")throw new Y0.ERR_INVALID_ARG_TYPE(u,"number",b)}function P0(b,u,f){throw Math.floor(b)!==b?(Tt(b,f),new Y0.ERR_OUT_OF_RANGE("offset","an integer",b)):u<0?new Y0.ERR_BUFFER_OUT_OF_BOUNDS:new Y0.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,b)}let K0=/[^+/0-9A-Za-z-_]/g;function v5(b){if(b=b.split("=")[0],b=b.trim().replace(K0,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function Mt(b,u){u=u||1/0;let f,w=b.length,P=null,H=[];for(let F=0;F<w;++F){if(f=b.charCodeAt(F),f>55295&&f<57344){if(!P){if(f>56319){(u-=3)>-1&&H.push(239,191,189);continue}else if(F+1===w){(u-=3)>-1&&H.push(239,191,189);continue}P=f;continue}if(f<56320){(u-=3)>-1&&H.push(239,191,189),P=f;continue}f=(P-55296<<10|f-56320)+65536}else P&&(u-=3)>-1&&H.push(239,191,189);if(P=null,f<128){if((u-=1)<0)break;H.push(f)}else if(f<2048){if((u-=2)<0)break;H.push(f>>6|192,f&63|128)}else if(f<65536){if((u-=3)<0)break;H.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((u-=4)<0)break;H.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return H}function xe(b){let u=[];for(let f=0;f<b.length;++f)u.push(b.charCodeAt(f)&255);return u}function qt(b,u){let f,w,P,H=[];for(let F=0;F<b.length&&!((u-=2)<0);++F)f=b.charCodeAt(F),w=f>>8,P=f%256,H.push(P),H.push(w);return H}function l5(b){return r.toByteArray(v5(b))}function Zt(b,u,f,w){let P;for(P=0;P<w&&!(P+f>=u.length||P>=b.length);++P)u[P+f]=b[P];return P}function J0(b,u){return b instanceof u||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===u.name}function Re(b){return b!==b}let ke=function(){let b="0123456789abcdef",u=new Array(256);for(let f=0;f<16;++f){let w=f*16;for(let P=0;P<16;++P)u[w+P]=b[f]+b[P]}return u}();function $0(b){return typeof BigInt>"u"?b1:b}function b1(){throw new Error("BigInt not supported")}return Ct}var Se,h3,h5,m3,Ct,p3,b3=ot(()=>{R();k();M();T();Se={},h3=!1;h5={},m3=!1;Ct={},p3=!1});var Pt,D,cv,dv,y3=ot(()=>{R();k();M();T();b3();Pt=g3();Pt.Buffer;Pt.SlowBuffer;Pt.INSPECT_MAX_BYTES;Pt.kMaxLength;D=Pt.Buffer,cv=Pt.INSPECT_MAX_BYTES,dv=Pt.kMaxLength});var M=ot(()=>{y3()});var V3=N0((k1,T1)=>{R();k();M();T();(function(r,t){typeof k1=="object"&&typeof T1<"u"?T1.exports=t():typeof define=="function"&&define.amd?define(t):r.Stats=t()})(k1,function(){var r=function(){function t(d){return n.appendChild(d.dom),d}function e(d){for(var m=0;m<n.children.length;m++)n.children[m].style.display=m===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,v=0,a=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(){v++;var d=(performance||Date).now();if(l.update(d-s,200),d>o+1e3&&(a.update(1e3*v/(d-o),100),o=d,v=0,c)){var m=performance.memory;c.update(m.usedJSHeapSize/1048576,m.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,v=o(window.devicePixelRatio||1),a=80*v,l=48*v,c=3*v,d=2*v,m=3*v,p=15*v,g=74*v,y=30*v,E=document.createElement("canvas");E.width=a,E.height=l,E.style.cssText="width:80px;height:48px";var _=E.getContext("2d");return _.font="bold "+9*v+"px Helvetica,Arial,sans-serif",_.textBaseline="top",_.fillStyle=i,_.fillRect(0,0,a,l),_.fillStyle=e,_.fillText(t,c,d),_.fillRect(m,p,g,y),_.fillStyle=i,_.globalAlpha=.9,_.fillRect(m,p,g,y),{dom:E,update:function(A,C){n=Math.min(n,A),s=Math.max(s,A),_.fillStyle=i,_.globalAlpha=1,_.fillRect(0,0,a,p),_.fillStyle=e,_.fillText(o(A)+" "+t+" ("+o(n)+"-"+o(s)+")",c,d),_.drawImage(E,m+v,p,g-v,y,m,p,g-v,y),_.fillRect(m+g-v,p,v,y),_.fillStyle=i,_.globalAlpha=.9,_.fillRect(m+g-v,p,v,o((1-A/C)*y))}}},r})});var an=N0((on,z5)=>{R();k();M();T();(function(r,t){typeof z5=="object"&&z5.exports?z5.exports=t():r.nearley=t()})(on,function(){function r(a,l,c){return this.id=++r.highestId,this.name=a,this.symbols=l,this.postprocess=c,this}r.highestId=0,r.prototype.toString=function(a){var l=typeof a>"u"?this.symbols.map(v).join(" "):this.symbols.slice(0,a).map(v).join(" ")+" \u25CF "+this.symbols.slice(a).map(v).join(" ");return this.name+" \u2192 "+l};function t(a,l,c,d){this.rule=a,this.dot=l,this.reference=c,this.data=[],this.wantedBy=d,this.isComplete=this.dot===a.symbols.length}t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(a){var l=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return l.left=this,l.right=a,l.isComplete&&(l.data=l.build(),l.right=void 0),l},t.prototype.build=function(){var a=[],l=this;do a.push(l.right.data),l=l.left;while(l.left);return a.reverse(),a},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))};function e(a,l){this.grammar=a,this.index=l,this.states=[],this.wants={},this.scannable=[],this.completed={}}e.prototype.process=function(a){for(var l=this.states,c=this.wants,d=this.completed,m=0;m<l.length;m++){var p=l[m];if(p.isComplete){if(p.finish(),p.data!==s.fail){for(var g=p.wantedBy,y=g.length;y--;){var E=g[y];this.complete(E,p)}if(p.reference===this.index){var _=p.rule.name;(this.completed[_]=this.completed[_]||[]).push(p)}}}else{var _=p.rule.symbols[p.dot];if(typeof _!="string"){this.scannable.push(p);continue}if(c[_]){if(c[_].push(p),d.hasOwnProperty(_))for(var A=d[_],y=0;y<A.length;y++){var C=A[y];this.complete(p,C)}}else c[_]=[p],this.predict(_)}}},e.prototype.predict=function(a){for(var l=this.grammar.byName[a]||[],c=0;c<l.length;c++){var d=l[c],m=this.wants[a],p=new t(d,0,this.index,m);this.states.push(p)}},e.prototype.complete=function(a,l){var c=a.nextState(l);this.states.push(c)};function i(a,l){this.rules=a,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)}),m=new i(d,l);return m.lexer=c,m};function n(){this.reset("")}n.prototype.reset=function(a,l){this.buffer=a,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 a=this.buffer[this.index++];return a===`
2
2
  `&&(this.line+=1,this.lastLineBreak=this.index),{value:a}}},n.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},n.prototype.formatError=function(a,l){var c=this.buffer;if(typeof c=="string"){var d=c.split(`
3
3
  `).slice(Math.max(0,this.line-5),this.line),m=c.indexOf(`
4
4
  `,this.index);m===-1&&(m=c.length);var p=this.index-this.lastLineBreak,g=String(this.line).length;return l+=" at line "+this.line+" col "+p+`:
5
5
 
6
- `,l+=d.map(function(w,_){return y(this.line-d.length+_+1,g)+" "+w},this).join(`
6
+ `,l+=d.map(function(E,_){return y(this.line-d.length+_+1,g)+" "+E},this).join(`
7
7
  `),l+=`
8
8
  `+y("",g+p)+`^
9
- `,l}else return l+" at index "+(this.index-1);function y(w,_){var E=String(w);return Array(_-E.length+1).join(" ")+E}};function s(a,l,c){if(a instanceof i)var d=a,c=l;else var d=i.fromCompiled(a,l);this.grammar=d,this.options={keepHistory:!1,lexer:d.lexer||new n};for(var m in c||{})this.options[m]=c[m];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(a){var l=this.lexer;l.reset(a,this.lexerState);for(var c;;){try{if(c=l.next(),!c)break}catch(z){var g=new e(this.grammar,this.current+1);this.table.push(g);var d=new Error(this.reportLexerError(z));throw d.offset=this.current,d.token=z.token,d}var m=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 y=c.text!==void 0?c.text:c.value,w=l.constructor===n?c.value:c,_=m.scannable,E=_.length;E--;){var C=_[E],x=C.rule.symbols[C.dot];if(x.test?x.test(w):x.type?x.type===c.type:x.literal===y){var S=C.nextState({data:w,token:c,isToken:!0,reference:p-1});g.states.push(S)}}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&&(m.lexerState=l.save()),this.current++}return m&&(this.lexerState=l.save()),this.results=this.finish(),this},s.prototype.reportLexerError=function(a){var l,c,d=a.token;return d?(l="input "+JSON.stringify(d.text[0])+" (lexer error)",c=this.lexer.formatError(d,"Syntax error")):(l="input (lexer error)",c=a.message),this.reportErrorCommon(c,l)},s.prototype.reportError=function(a){var l=(a.type?a.type+" token: ":"")+JSON.stringify(a.value!==void 0?a.value:a),c=this.lexer.formatError(a,"Syntax error");return this.reportErrorCommon(c,l)},s.prototype.reportErrorCommon=function(a,l){var c=[];c.push(a);var d=this.table.length-2,m=this.table[d],p=m.states.filter(function(y){var w=y.rule.symbols[y.dot];return w&&typeof w!="string"});if(p.length===0)c.push("Unexpected "+l+`. I did not expect any more input. Here is the state of my parse table:
9
+ `,l}else return l+" at index "+(this.index-1);function y(E,_){var A=String(E);return Array(_-A.length+1).join(" ")+A}};function s(a,l,c){if(a instanceof i)var d=a,c=l;else var d=i.fromCompiled(a,l);this.grammar=d,this.options={keepHistory:!1,lexer:d.lexer||new n};for(var m in c||{})this.options[m]=c[m];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(a){var l=this.lexer;l.reset(a,this.lexerState);for(var c;;){try{if(c=l.next(),!c)break}catch(z){var g=new e(this.grammar,this.current+1);this.table.push(g);var d=new Error(this.reportLexerError(z));throw d.offset=this.current,d.token=z.token,d}var m=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 y=c.text!==void 0?c.text:c.value,E=l.constructor===n?c.value:c,_=m.scannable,A=_.length;A--;){var C=_[A],x=C.rule.symbols[C.dot];if(x.test?x.test(E):x.type?x.type===c.type:x.literal===y){var S=C.nextState({data:E,token:c,isToken:!0,reference:p-1});g.states.push(S)}}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&&(m.lexerState=l.save()),this.current++}return m&&(this.lexerState=l.save()),this.results=this.finish(),this},s.prototype.reportLexerError=function(a){var l,c,d=a.token;return d?(l="input "+JSON.stringify(d.text[0])+" (lexer error)",c=this.lexer.formatError(d,"Syntax error")):(l="input (lexer error)",c=a.message),this.reportErrorCommon(c,l)},s.prototype.reportError=function(a){var l=(a.type?a.type+" token: ":"")+JSON.stringify(a.value!==void 0?a.value:a),c=this.lexer.formatError(a,"Syntax error");return this.reportErrorCommon(c,l)},s.prototype.reportErrorCommon=function(a,l){var c=[];c.push(a);var d=this.table.length-2,m=this.table[d],p=m.states.filter(function(y){var E=y.rule.symbols[y.dot];return E&&typeof E!="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(m.states,c);else{c.push("Unexpected "+l+`. Instead, I was expecting to see one of the following:
11
- `);var g=p.map(function(y){return this.buildFirstStateStack(y,[])||[y]},this);g.forEach(function(y){var w=y[0],_=w.rule.symbols[w.dot],E=this.getSymbolDisplay(_);c.push("A "+E+" based on:"),this.displayStateStack(y,c)},this)}return c.push(""),c.join(`
12
- `)},s.prototype.displayStateStack=function(a,l){for(var c,d=0,m=0;m<a.length;m++){var p=a[m],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(a){return o(a)},s.prototype.buildFirstStateStack=function(a,l){if(l.indexOf(a)!==-1)return null;if(a.wantedBy.length===0)return[a];var c=a.wantedBy[0],d=[a].concat(l),m=this.buildFirstStateStack(c,d);return m===null?null:[a].concat(m)},s.prototype.save=function(){var a=this.table[this.current];return a.lexerState=this.lexerState,a},s.prototype.restore=function(a){var l=a.index;this.current=l,this.table[l]=a,this.table.splice(l+1),this.lexerState=a.lexerState,this.results=this.finish()},s.prototype.rewind=function(a){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[a])},s.prototype.finish=function(){var a=[],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&&a.push(d)}),a.map(function(d){return d.data})};function o(a){var l=typeof a;if(l==="string")return a;if(l==="object"){if(a.literal)return JSON.stringify(a.literal);if(a instanceof RegExp)return"character matching "+a;if(a.type)return a.type+" token";if(a.test)return"token matching "+String(a.test);throw new Error("Unknown symbol type: "+a)}}function v(a){var l=typeof a;if(l==="string")return a;if(l==="object"){if(a.literal)return JSON.stringify(a.literal);if(a instanceof RegExp)return a.toString();if(a.type)return"%"+a.type;if(a.test)return"<"+String(a.test)+">";throw new Error("Unknown symbol type: "+a)}}return{Parser:s,Grammar:i,Rule:r}})});var on=V0((Jf,H5)=>{R();k();M();T();(function(){function r(a){return a[0]}function t(a){if(a==="true")return{type:"boolean",value:!0};if(a==="false")return{type:"boolean",value:!1};let l="bslfdi",c={b:"byte",s:"short",l:"long",f:"float",d:"double",i:"int"},d=a.charAt(a.length-1).toLowerCase();if(l.indexOf(d)!==-1){let y=parseFloat(a.substring(0,a.length-1));return isNaN(y)?{value:a,type:"string"}:{value:y,type:c[d]}}let m=parseFloat(a),p=a.includes("."),g=m>>0===m;return!isNaN(a)&&(p||g)?{value:m,type:p?"double":"int"}:{value:a,type:"string"}}function e(a,l){a[0]!==void 0&&(l[a[0]]=a[1])}function i(a){let l={};e(a[2],l);for(let c in a[3])e(a[3][c][3],l);return{type:"compound",value:l}}function n(a){let l=[a[6]];for(let d in a[7])l.push(a[7][d][3]);return{type:{B:"byteArray",I:"intArray",L:"longArray"}[a[2]],value:{type:l[0].type,value:l.map(d=>d.value)}}}function s(a){let l=[a[2]];for(let c in a[3])l.push(a[3][c][3]);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}function o(a){let l=[];e(a[2],l);for(let c in a[3])e(a[3][c][3],l);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}var v={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(a){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(a){return null}},{name:"wschar",symbols:[/[ \t\n\v\f]/],postprocess:r},{name:"MAIN",symbols:["_","JVALUE","_"],postprocess:a=>a[1]},{name:"JVALUE",symbols:["JOBJECT"],postprocess:a=>a[0]},{name:"JVALUE",symbols:[{literal:"'"},"_","JOBJECT","_",{literal:"'"}],postprocess:a=>a[2]},{name:"JVALUE",symbols:["JARRAY"],postprocess:a=>a[0]},{name:"JVALUE",symbols:["STRING"],postprocess:a=>a[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:a=>null},{name:"JOBJECT",symbols:[{literal:"{"},"_",{literal:"}"}],postprocess:a=>({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(a){return null}},{name:"JOBJECT",symbols:[{literal:"{"},"_","PAIR","JOBJECT$ebnf$1","JOBJECT$ebnf$2",{literal:"}"}],postprocess:i},{name:"JARRAY",symbols:[{literal:"["},"_",{literal:"]"}],postprocess:a=>({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(a){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(a){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(a){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","PAIR","JARRAY$ebnf$5","JARRAY$ebnf$6","_",{literal:"]"}],postprocess:o},{name:"PAIR",symbols:["STRING","_",{literal:":"},"_","JVALUE"],postprocess:a=>[a[0].value,a[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:a=>t(JSON.parse(a.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:a=>t(a[0].join(""))}],ParserStart:"MAIN"};typeof H5<"u"&&typeof H5.exports<"u"?H5.exports=v:window.grammar=v})()});var $1=V0((th,un)=>{R();k();M();T();var an=sn(),Js=on();function cn(r){function t(e,i){return i==="compound"?Object.keys(e).reduce(function(n,s){return n[s]=cn(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 O5({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],v=O5(n[s][1]);o==="string"&&(v=vn(v)),i.push(`${o}:${v}`)}return`{${i.join(",")}}`}else{if(t==="list")return Array.isArray(r.value)?`[${ln(r)}]`:"[]";if(t==="byteArray"||t==="intArray"||t==="longArray"){let i=Zs(t),n=ln(r);return`[${i}${n}]`}}let e=r+Xs(r,t);return t==="string"&&(e=vn(e)),e}function vn(r){return r=r.replace(/"/g,'\\"'),(/'|{|}|\[|\]|:|;|,|\(|\)|§|=/g.test(r)||r==="")&&(r=`"${r}"`),r}function ln({value:r,type:t}){let e=qs(r),i=[];for(let n=0;n<r.length;n++){let s=r[n];s!==void 0&&(s=O5({value:s,type:t}),e?i.push(`${n}:${s}`):i.push(s))}return i.join(",")}function qs(r){for(let t=0;t<r.length;t++)if(r[t]===void 0)return!0;return!1}var Zs=r=>r.charAt(0).toUpperCase()+";";function Xs(r,t){return t==="double"?r>>0===r?"d":"":{int:"",byte:"b",short:"s",float:"f",long:"l",string:""}[t]}function $s(r){return O5(dn(r))}function dn(r){try{let t=new an.Parser(an.Grammar.fromCompiled(Js));return t.feed(r),t.results[0]}catch(t){throw t.message=`Error parsing text '${r}'`,t}}un.exports={parse:dn,simplify:cn,stringify:O5,normalize:$s}});var gn={};c5(gn,{camelCase:()=>ro,capitalCase:()=>e2,constantCase:()=>ao,dotCase:()=>vo,kebabCase:()=>lo,noCase:()=>We,pascalCase:()=>so,pascalSnakeCase:()=>oo,pathCase:()=>co,sentenceCase:()=>uo,snakeCase:()=>i2,split:()=>t2,splitSeparateNumbers:()=>mn,trainCase:()=>fo});function t2(r){let t=r.trim();t=t.replace(to,fn).replace(eo,fn),t=t.replace(no,"\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 mn(r){let t=t2(r);for(let e=0;e<t.length;e++){let i=t[e],n=io.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 We(r,t){let[e,i,n]=se(r,t);return e+i.map(Ve(t?.locale)).join(t?.delimiter??" ")+n}function ro(r,t){let[e,i,n]=se(r,t),s=Ve(t?.locale),o=Ne(t?.locale),v=t?.mergeAmbiguousCharacters?L5(s,o):pn(s,o);return e+i.map((a,l)=>l===0?s(a):v(a,l)).join(t?.delimiter??"")+n}function so(r,t){let[e,i,n]=se(r,t),s=Ve(t?.locale),o=Ne(t?.locale),v=t?.mergeAmbiguousCharacters?L5(s,o):pn(s,o);return e+i.map(v).join(t?.delimiter??"")+n}function oo(r,t){return e2(r,{delimiter:"_",...t})}function e2(r,t){let[e,i,n]=se(r,t),s=Ve(t?.locale),o=Ne(t?.locale);return e+i.map(L5(s,o)).join(t?.delimiter??" ")+n}function ao(r,t){let[e,i,n]=se(r,t);return e+i.map(Ne(t?.locale)).join(t?.delimiter??"_")+n}function vo(r,t){return We(r,{delimiter:".",...t})}function lo(r,t){return We(r,{delimiter:"-",...t})}function co(r,t){return We(r,{delimiter:"/",...t})}function uo(r,t){let[e,i,n]=se(r,t),s=Ve(t?.locale),o=Ne(t?.locale),v=L5(s,o);return e+i.map((a,l)=>l===0?v(a):s(a)).join(t?.delimiter??" ")+n}function i2(r,t){return We(r,{delimiter:"_",...t})}function fo(r,t){return e2(r,{delimiter:"-",...t})}function Ve(r){return r===!1?t=>t.toLowerCase():t=>t.toLocaleLowerCase(r)}function Ne(r){return r===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(r)}function L5(r,t){return e=>`${t(e[0])}${r(e.slice(1))}`}function pn(r,t){return(e,i)=>{let n=e[0];return(i>0&&n>="0"&&n<="9"?"_"+n:t(n))+r(e.slice(1))}}function se(r,t={}){let e=t.split??(t.separateNumbers?mn:t2),i=t.prefixCharacters??hn,n=t.suffixCharacters??hn,s=0,o=r.length;for(;s<r.length;){let v=r.charAt(s);if(!i.includes(v))break;s++}for(;o>s;){let v=o-1,a=r.charAt(v);if(!n.includes(a))break;o=v}return[r.slice(0,s),e(r.slice(s,o)),r.slice(o)]}var to,eo,io,no,fn,hn,n2=at(()=>{R();k();M();T();to=/([\p{Ll}\d])(\p{Lu})/gu,eo=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,io=/(\d)\p{Ll}|(\p{L})\d/u,no=/[^\p{L}\d]+/giu,fn="$1\0$2",hn=""});var bn=V0((lh,ho)=>{ho.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 _n=V0((ch,yn)=>{R();k();M();T();var oe=1e3,ae=oe*60,ve=ae*60,Gt=ve*24,mo=Gt*7,po=Gt*365.25;yn.exports=function(r,t){t=t||{};var e=typeof r;if(e==="string"&&r.length>0)return go(r);if(e==="number"&&isFinite(r))return t.long?yo(r):bo(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function go(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*po;case"weeks":case"week":case"w":return e*mo;case"days":case"day":case"d":return e*Gt;case"hours":case"hour":case"hrs":case"hr":case"h":return e*ve;case"minutes":case"minute":case"mins":case"min":case"m":return e*ae;case"seconds":case"second":case"secs":case"sec":case"s":return e*oe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function bo(r){var t=Math.abs(r);return t>=Gt?Math.round(r/Gt)+"d":t>=ve?Math.round(r/ve)+"h":t>=ae?Math.round(r/ae)+"m":t>=oe?Math.round(r/oe)+"s":r+"ms"}function yo(r){var t=Math.abs(r);return t>=Gt?D5(r,t,Gt,"day"):t>=ve?D5(r,t,ve,"hour"):t>=ae?D5(r,t,ae,"minute"):t>=oe?D5(r,t,oe,"second"):r+" ms"}function D5(r,t,e,i){var n=t>=e*1.5;return Math.round(r/e)+" "+i+(n?"s":"")}});var An=V0((mh,wn)=>{R();k();M();T();function _o(r){e.debug=e,e.default=e,e.coerce=a,e.disable=o,e.enable=n,e.enabled=v,e.humanize=_n(),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 m=0;m<c.length;m++)d=(d<<5)-d+c.charCodeAt(m),d|=0;return e.colors[Math.abs(d)%e.colors.length]}e.selectColor=t;function e(c){let d,m=null,p,g;function y(...w){if(!y.enabled)return;let _=y,E=Number(new Date),C=E-(d||E);_.diff=C,_.prev=d,_.curr=E,d=E,w[0]=e.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let x=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(z,B)=>{if(z==="%%")return"%";x++;let I=e.formatters[B];if(typeof I=="function"){let W=w[x];z=I.call(_,W),w.splice(x,1),x--}return z}),e.formatArgs.call(_,w),(_.log||e.log).apply(_,w)}return y.namespace=c,y.useColors=e.useColors(),y.color=e.selectColor(c),y.extend=i,y.destroy=e.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(p!==e.namespaces&&(p=e.namespaces,g=e.enabled(c)),g),set:w=>{m=w}}),typeof e.init=="function"&&e.init(y),y}function i(c,d){let m=e(this.namespace+(typeof d>"u"?":":d)+c);return m.log=this.log,m}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 m of d)m[0]==="-"?e.skips.push(m.slice(1)):e.names.push(m)}function s(c,d){let m=0,p=0,g=-1,y=0;for(;m<c.length;)if(p<d.length&&(d[p]===c[m]||d[p]==="*"))d[p]==="*"?(g=p,y=m,p++):(m++,p++);else if(g!==-1)p=g+1,y++,m=y;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 v(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 a(c){return c instanceof Error?c.stack||c.message:c}function l(){}return e.enable(e.load()),e}wn.exports=_o});var En=V0((U0,F5)=>{R();k();M();T();U0.formatArgs=Ao;U0.save=Eo;U0.load=xo;U0.useColors=wo;U0.storage=Ro();U0.destroy=(()=>{let r=!1;return()=>{r||(r=!0)}})();U0.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 wo(){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 Ao(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+F5.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)}U0.log=console.debug||console.log||(()=>{});function Eo(r){try{r?U0.storage.setItem("debug",r):U0.storage.removeItem("debug")}catch{}}function xo(){let r;try{r=U0.storage.getItem("debug")||U0.storage.getItem("DEBUG")}catch{}return!r&&typeof L<"u"&&"env"in L&&(r=L.env.DEBUG),r}function Ro(){try{return localStorage}catch{}}F5.exports=An()(U0);var{formatters:ko}=F5.exports;ko.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var xn=V0(le=>{"use strict";R();k();M();T();var To=le&&le.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(le,"__esModule",{value:!0});le.debug=void 0;var Mo=To(En());le.debug=(0,Mo.default)("mineflayer-mouse")});var Mn=V0(Wt=>{"use strict";R();k();M();T();var So=Wt&&Wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.isEntityAttackable=void 0;Wt.isArmorStandAttackable=Tn;var Rn=(n2(),X6(gn)),je=So(bn()),Co=xn(),kn=Object.fromEntries([...je.default.attackable,...je.default.notAttackable].map(r=>[r,!0])),Po=je.default.attackable,Bo=(r,t)=>{if(!t.name)throw new Error("Entity has no name");let e=r.entitiesByName[t.name],n=je.default.entityRenames[t.name]||je.default.entityRenames[(0,Rn.snakeCase)(t.name)]||t.name;if(!kn[n]&&(n=(0,Rn.snakeCase)(n),!kn[n]))return(0,Co.debug)(`Cannot find entity ${n} in entityData.json`),!1;let s=Io[n];return s?s(t,e):Po.includes(n)};Wt.isEntityAttackable=Bo;var Io={armor_stand:Tn};function Tn(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 a6=V0((v_,Ja)=>{Ja.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 v6=V0(q5=>{"use strict";R();k();M();T();Object.defineProperty(q5,"__esModule",{value:!0});q5.versionToNumber=void 0;var qa=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")}`};q5.versionToNumber=qa});var c6=V0(be=>{"use strict";R();k();M();T();var Za=be&&be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(be,"__esModule",{value:!0});be.getRenamedData=void 0;var l6=Za(a6()),_t=v6(),Xa=(r,t,e,i)=>{let n=(0,_t.versionToNumber)(e),s=(0,_t.versionToNumber)(i),o=n<s?1:-1,v=o>0?1:0,a=t,l=Object.keys(l6.default).sort((m,p)=>o*((0,_t.versionToNumber)(m)-(0,_t.versionToNumber)(p))),c=o>0?s:n,d=o>0?n:s;for(let m of l.filter(p=>(0,_t.versionToNumber)(p)<=c&&(0,_t.versionToNumber)(p)>=d)){if(o>0&&(0,_t.versionToNumber)(m)>=c||o<0&&(0,_t.versionToNumber)(m)<=d)break;let p=l6.default[m][r];if(p)for(let g of p){let y=g[v],w=g[1-v];if(Array.isArray(a))a.includes(w)&&(a=a.map(_=>_===w?y:_));else if(a===w){a=y;break}}}return a};be.getRenamedData=Xa});var w6={};c5(w6,{applyWorldGeometryExport:()=>v8,createMeshesFromExport:()=>y6,downloadWorldGeometry:()=>P2,exportWorldGeometry:()=>b6,loadTextureFromDataUrl:()=>_6,loadWorldGeometryFromUrl:()=>o8});import*as A0 from"three";function b6(r,t,e,i=!1){let n=[];for(let[o,v]of Object.entries(r.sectionObjects)){let a=v.children.find(w=>w.name==="mesh");if(!a?.geometry)continue;let{geometry:l}=a,c=l.getAttribute("position"),d=l.getAttribute("normal"),m=l.getAttribute("color"),p=l.getAttribute("uv"),g=l.index;if(!c||!g)continue;let y=r.sceneOrigin.getWorldPosition(a);n.push({key:o,position:{x:y?.x??r.sceneOrigin.toWorldX(a.position.x),y:y?.y??r.sceneOrigin.toWorldY(a.position.y),z:y?.z??r.sceneOrigin.toWorldZ(a.position.z)},geometry:{positions:[...c.array],normals:d?[...d.array]:[],colors:m?[...m.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"),v=r.material.map,{image:a}=v;a&&(o.width=a.width,o.height=a.height,o.getContext("2d").drawImage(a,0,0),s.textureAtlasDataUrl=o.toDataURL("image/png"))}return s}function P2(r,t,e,i="world-geometry.json",n=!1){let s=b6(r,t,e,n),o=JSON.stringify(s),v=new Blob([o],{type:"application/json"}),a=URL.createObjectURL(v),l=document.createElement("a");l.href=a,l.download=i,l.click(),URL.revokeObjectURL(a)}async function o8(r){let t=await fetch(r);if(!t.ok)throw new Error(`Failed to fetch world geometry: ${t.statusText}`);return t.json()}function y6(r,t){let e=[];for(let i of r.sections){let n=new A0.BufferGeometry;n.setAttribute("position",new A0.Float32BufferAttribute(i.geometry.positions,3)),i.geometry.normals.length&&n.setAttribute("normal",new A0.Float32BufferAttribute(i.geometry.normals,3)),i.geometry.colors.length&&n.setAttribute("color",new A0.Float32BufferAttribute(i.geometry.colors,3)),i.geometry.uvs.length&&n.setAttribute("uv",new A0.Float32BufferAttribute(i.geometry.uvs,2));let o=Math.max(...i.geometry.indices)>65535?Uint32Array:Uint16Array;n.setIndex(new A0.BufferAttribute(new o(i.geometry.indices),1));let v=new A0.Mesh(n,t);v.position.set(i.position.x,i.position.y,i.position.z),v.name="mesh";let a=new A0.Group;a.name="chunk",a.add(v),e.push(a)}return e}async function _6(r){return new Promise((t,e)=>{let i=new Image;i.onload=()=>{let n=new A0.Texture(i);n.magFilter=A0.NearestFilter,n.minFilter=A0.NearestFilter,n.needsUpdate=!0,n.flipY=!1,t(n)},i.onerror=e,i.src=r})}async function v8(r,t){let{scene:e,renderUpdateEmitter:i,material:n}=r,s=e.getObjectByName(g6);s&&(e.remove(s),a8(s));let o=!!t.textureAtlasDataUrl,v;if(o&&t.textureAtlasDataUrl){let c=await _6(t.textureAtlasDataUrl);v=new A0.MeshLambertMaterial({map:c,vertexColors:!0,transparent:!0,alphaTest:.1}),v.name="geometry-export-material"}else v=n;let a=y6(t,v),l=new A0.Group;l.name=g6,o&&(l.userData.geometryExportMaterial=v);for(let c of a)l.add(c);return e.add(l),i.emit("update"),a.length}var g6,a8,B2=at(()=>{"use strict";R();k();M();T();g6="geometry-export-root";a8=r=>{r.traverse(e=>{e.isMesh&&e.geometry?.dispose()});let t=r.userData?.geometryExportMaterial;t&&(t.map?.dispose?.(),t.dispose?.())}});R();k();M();T();R();k();M();T();R();k();M();T();R();k();M();T();import{proxy as bi}from"valtio";var Ce={paused:!1,showChunkBorders:!1,enableDebugOverlay:!1,debugModelVariant:void 0,futuristicReveal:!1,wasmMesher:!1,mesherWorkers:1,addChunksBatchWaitTime:200,_experimentalSmoothChunkLoading:!0,_renderByChunks:!1,dayCycle:!0,smoothLighting:!0,enableLighting:!0,starfield:!0,defaultSkybox:!0,renderEntities:!0,extraBlockRenderers:!0,foreground:!0,fov:75,volume:1,showHand:!1,viewBobbing:!1,renderEars:!0,highlightBlockColor:"blue",fetchPlayerSkins:!0,skinTexturesProxy:void 0,vrSupport:!0,vrPageGameRendering:!0,clipWorldBelowY:void 0,isPlayground:!1,instantCameraUpdate:!1,isRaining:!1,moduleStates:{}},yi={fpsLimit:void 0,powerPreference:void 0,sceneBackground:"lightblue",timeoutRendering:!1},yv=(r={})=>bi({...Ce,...r}),Bt=()=>({reactive:bi({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:[]}}}});R();k();M();T();import{proxy as is}from"valtio";var w1=()=>is({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,itemUsageTicks:0,username:"",onlineMode:!1,lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,cameraSpectatingEntity:void 0,team:void 0}),_i=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"}}),wi=()=>({reactive:w1()});R();k();M();T();import{Vec3 as gs}from"vec3";import{proxy as Ri}from"valtio";R();k();M();T();R();k();M();T();R();k();M();T();R();k();M();T();var m5={},Ai=!1;function ns(){if(Ai)return m5;Ai=!0;var r=typeof Reflect=="object"?Reflect:null,t=r&&typeof r.apply=="function"?r.apply:function(S,z,B){return Function.prototype.apply.call(S,z,B)},e;r&&typeof r.ownKeys=="function"?e=r.ownKeys:Object.getOwnPropertySymbols?e=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:e=function(S){return Object.getOwnPropertyNames(S)};function i(x){}var n=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}m5=s,m5.once=_,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function v(x){if(typeof x!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof x)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(x){if(typeof x!="number"||x<0||n(x))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+x+".");o=x}}),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(S){if(typeof S!="number"||S<0||n(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function a(x){return x._maxListeners===void 0?s.defaultMaxListeners:x._maxListeners}s.prototype.getMaxListeners=function(){return a(this)},s.prototype.emit=function(S){for(var z=[],B=1;B<arguments.length;B++)z.push(arguments[B]);var I=S==="error",W=this._events;if(W!==void 0)I=I&&W.error===void 0;else if(!I)return!1;if(I){var O;if(z.length>0&&(O=z[0]),O instanceof Error)throw O;var j=new Error("Unhandled error."+(O?" ("+O.message+")":""));throw j.context=O,j}var q=W[S];if(q===void 0)return!1;if(typeof q=="function")t(q,this,z);else for(var i0=q.length,N=g(q,i0),B=0;B<i0;++B)t(N[B],this,z);return!0};function l(x,S,z,B){var I,W,O;if(v(z),W=x._events,W===void 0?(W=x._events=Object.create(null),x._eventsCount=0):(W.newListener!==void 0&&(x.emit("newListener",S,z.listener?z.listener:z),W=x._events),O=W[S]),O===void 0)O=W[S]=z,++x._eventsCount;else if(typeof O=="function"?O=W[S]=B?[z,O]:[O,z]:B?O.unshift(z):O.push(z),I=a(x),I>0&&O.length>I&&!O.warned){O.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=x,j.type=S,j.count=O.length}return x}s.prototype.addListener=function(S,z){return l(this,S,z,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,z){return l(this,S,z,!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(x,S,z){var B={fired:!1,wrapFn:void 0,target:x,type:S,listener:z},I=c.bind(B);return I.listener=z,B.wrapFn=I,I}s.prototype.once=function(S,z){return v(z),this.on(S,d(this,S,z)),this},s.prototype.prependOnceListener=function(S,z){return v(z),this.prependListener(S,d(this,S,z)),this},s.prototype.removeListener=function(S,z){var B,I,W,O,j;if(v(z),I=this._events,I===void 0)return this;if(B=I[S],B===void 0)return this;if(B===z||B.listener===z)--this._eventsCount===0?this._events=Object.create(null):(delete I[S],I.removeListener&&this.emit("removeListener",S,B.listener||z));else if(typeof B!="function"){for(W=-1,O=B.length-1;O>=0;O--)if(B[O]===z||B[O].listener===z){j=B[O].listener,W=O;break}if(W<0)return this;W===0?B.shift():y(B,W),B.length===1&&(I[S]=B[0]),I.removeListener!==void 0&&this.emit("removeListener",S,j||z)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var z,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[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[S]),this;if(arguments.length===0){var W=Object.keys(B),O;for(I=0;I<W.length;++I)O=W[I],O!=="removeListener"&&this.removeAllListeners(O);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(z=B[S],typeof z=="function")this.removeListener(S,z);else if(z!==void 0)for(I=z.length-1;I>=0;I--)this.removeListener(S,z[I]);return this};function m(x,S,z){var B=x._events;if(B===void 0)return[];var I=B[S];return I===void 0?[]:typeof I=="function"?z?[I.listener||I]:[I]:z?w(I):g(I,I.length)}s.prototype.listeners=function(S){return m(this,S,!0)},s.prototype.rawListeners=function(S){return m(this,S,!1)},s.listenerCount=function(x,S){return typeof x.listenerCount=="function"?x.listenerCount(S):p.call(x,S)},s.prototype.listenerCount=p;function p(x){var S=this._events;if(S!==void 0){var z=S[x];if(typeof z=="function")return 1;if(z!==void 0)return z.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function g(x,S){for(var z=new Array(S),B=0;B<S;++B)z[B]=x[B];return z}function y(x,S){for(;S+1<x.length;S++)x[S]=x[S+1];x.pop()}function w(x){for(var S=new Array(x.length),z=0;z<S.length;++z)S[z]=x[z].listener||x[z];return S}function _(x,S){return new Promise(function(z,B){function I(O){x.removeListener(S,W),B(O)}function W(){typeof x.removeListener=="function"&&x.removeListener("error",I),z([].slice.call(arguments))}C(x,S,W,{once:!0}),S!=="error"&&E(x,I,{once:!0})})}function E(x,S,z){typeof x.on=="function"&&C(x,"error",S,z)}function C(x,S,z,B){if(typeof x.on=="function")B.once?x.once(S,z):x.on(S,z);else if(typeof x.addEventListener=="function")x.addEventListener(S,function I(W){B.once&&x.removeEventListener(S,I),z(W)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof x)}return m5}var p5=ns();p5.once;p5.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)})};p5.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,v),r.removeListener("error",a),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,v),r.removeListener("error",a)},[Symbol.asyncIterator](){return this}};return r.on(t,v),r.on("error",a),o;function v(...l){let c=i.shift();c?c.resolve(createIterResult(l,!1)):e.push(l)}function a(l){s=!0;let c=i.shift();c?c.reject(l):n=l,o.return()}};var{EventEmitter:It,defaultMaxListeners:Hv,init:Ov,listenerCount:Lv,on:Dv,once:Fv}=p5;import{Vec3 as zt}from"vec3";R();k();M();T();function Pe(r){let t=r*2+1;if(t<=0)return[];let e=[],i=0,n=0,s=0,o=-1;for(let v=0;v<t*t;v++){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 a=s;s=-o,o=a}i+=s,n+=o}return e}var $t=r=>[Math.floor(r.x/16),Math.floor(r.z/16)],rs=r=>[Math.floor(r.x/16),Math.floor(r.y/16),Math.floor(r.z/16)],Ei=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)},Be=class Be extends It{static restoreTransferred(t,e){let i=new Be;return e&&e.addEventListener("message",({data:n})=>{n.class===Be.restorerName&&n.type==="event"&&i.emit(n.eventName,...n.args)}),i}};h(Be,"restorerName","WorldViewWorker");var Ht=Be,Ot=class extends It{constructor(e,i,n=new zt(0,0,0)){super();this.world=e;this.viewDistance=i;h(this,"spiralNumber",0);h(this,"gotPanicLastTime",!1);h(this,"panicChunksReload",()=>{});h(this,"loadedChunks",{});h(this,"inLoading",!1);h(this,"chunkReceiveTimes",[]);h(this,"lastChunkReceiveTime",0);h(this,"lastChunkReceiveTimeAvg",0);h(this,"panicTimeout");h(this,"lastPos");h(this,"eventListeners",{});h(this,"debugChunksInfo",{});h(this,"waitingSpiralChunksLoad",{});h(this,"addWaitTime",1);h(this,"keepChunksDistance",0);h(this,"isPlayground",!1);h(this,"allowPositionUpdate",!0);h(this,"lastBiomeId",null);h(this,"lastPosCheck",null);this.lastPos=new zt(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:Ht.restorerName,type:"event",eventName:n,args:s})}}return{__restorer:Ht.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]=$t(e),o=Pe(this.viewDistance).map(([v,a])=>new zt((n+v)*16,0,(s+a)*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 Ei(e,this.addWaitTime,async o=>{!s||this.loadedChunks[`${o.x},${o.z}`]||(this.world.getColumnAt(o)||(s=await new Promise(v=>{this.waitingSpiralChunksLoad[`${o.x},${o.z}`]=v})),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]=$t(this.lastPos),v=Math.abs(s-Math.floor(e.x/16)),a=Math.abs(o-Math.floor(e.z/16));if(v<=this.viewDistance&&a<=this.viewDistance){let d=await this.world.getColumnAt(e.y!==void 0?e:new zt(e.x,0,e.z));if(d){let m=d.toJson(),p={minY:d.minY??0,worldHeight:d.worldHeight??256};this.emit("loadChunk",{x:e.x,z:e.z,chunk:m,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:m.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[v,a,l]=s.split(",").map(Number);return e.world.getBlock(new zt(v,a,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]=$t(this.lastPos),[v,a]=$t(e);if(s!==v||o!==a||i){this.emit("chunkPosUpdate",{pos:e});let l=[],c=i?this.viewDistance:this.viewDistance+this.keepChunksDistance;for(let m of Object.keys(this.loadedChunks)){let[p,g]=m.split(",").map(Number),y=new zt(p,0,g),[w,_]=$t(y),E=Math.abs(v-w),C=Math.abs(a-_);(E>c||C>c)&&l.push(y)}for(let m of l)this.unloadChunk(m);let d=Pe(this.viewDistance).map(([m,p])=>{let g=new zt((v+m)*16,0,(a+p)*16);if(!this.loadedChunks[`${g.x},${g.z}`])return g}).filter(m=>!!m);this.lastPos.update(e),this._loadChunks(d,e)}else this.emit("chunkPosUpdate",{pos:e}),this.lastPos.update(e)}};R();k();M();T();R();k();M();T();import xi from"minecraft-data";import ss from"mc-assets/dist/blocksAtlases.json";import os from"mc-assets/dist/itemsAtlases.json";import as from"mc-assets/dist/itemDefinitions.json";import vs from"mc-assets/dist/blocksAtlasLatest.png";import ls from"mc-assets/dist/blocksAtlasLegacy.png";import cs from"mc-assets/dist/itemsAtlasLatest.png";import ds from"mc-assets/dist/itemsAtlasLegacy.png";import us from"mc-assets/dist/textureReplacements/christmas";import{AtlasParser as g5}from"mc-assets/dist/atlasParser";import fs from"mc-assets/dist/worldBlockProvider";import{ItemsRenderer as hs}from"mc-assets/dist/itemsRenderer";import{getLoadedItemDefinitionsStore as ms}from"mc-assets";var te=class{constructor(t){h(this,"sourceItemDefinitionsJson",as);h(this,"itemsDefinitionsStore",ms(this.sourceItemDefinitionsJson));h(this,"allReady",!1);h(this,"itemsAtlasImage");h(this,"blocksAtlasImage");h(this,"blocksAtlasJson");h(this,"customBlockStates");h(this,"customModels");h(this,"customItemModelNames",{});h(this,"customTextures",{});h(this,"guiAtlas",null);h(this,"guiAtlasVersion",0);h(this,"itemsRenderer");h(this,"worldBlockProvider");h(this,"blockstatesModels",null);h(this,"version");h(this,"texturesVersion");h(this,"mcData");t&&(Object.assign(this,t),this.mcData=xi(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}},ps="1.21.4",gt=class gt extends It{constructor(){super(...arguments);h(this,"sourceBlockStatesModels",null);h(this,"sourceBlocksAtlases",ss);h(this,"sourceItemsAtlases",os);h(this,"currentResources");h(this,"itemsAtlasParser");h(this,"blocksAtlasParser");h(this,"currentConfig");h(this,"abortController",new AbortController);h(this,"_promiseAssetsReadyResolvers",Promise.withResolvers())}static restoreTransferred(e,i){let n=new gt,s=o=>{n.currentResources=new te(o)};return s(e.currentResources),i&&i.addEventListener("message",({data:o})=>{o.class===gt.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:gt.restorerName,type:"event",eventName:n,args:s}),(n==="assetsTexturesUpdated"||n==="assetsInventoryReady")&&e.postMessage({class:gt.restorerName,type:"newResources",currentResources:this.currentResources?.prepareForTransfer()})}}return{__restorer:gt.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 te}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 te;s.version=this.currentConfig.version,s.texturesVersion=this.currentConfig.texturesVersion??s.version,s.mcData=xi(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 hs(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,us);let s=new g5(this.sourceBlocksAtlases,vs,ls),o=Object.keys(e.customTextures.blocks?.textures??{}),{atlas:v,canvas:a}=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 g5({latest:v},a.toDataURL()),e.blocksAtlasImage=await createImageBitmap(a),e.blocksAtlasJson=this.blocksAtlasParser.atlas.latest,e.worldBlockProvider=fs(e.blockstatesModels,this.blocksAtlasParser.atlas,ps)}async recreateItemsAtlas(e=this.currentResources){let i=new g5(this.sourceItemsAtlases,cs,ds),n=Object.keys(e.customTextures.items?.textures??{}),{atlas:s,canvas:o}=await i.makeNewAtlas(e.texturesVersion,v=>{let a=e.customTextures.items?.textures[v];if(a)return a},e.customTextures.items?.tileSize,void 0,n);this.itemsAtlasParser=new g5({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}};h(gt,"restorerName","ResourcesManager");var ct=gt;var ki=class{constructor(t={},e=new ct){this.resourcesManager=e;h(this,"waitBackendLoadPromises",[]);h(this,"onWorldStart");h(this,"onBeforeWorldStart");h(this,"worldView");h(this,"config");h(this,"inWorldRenderingConfig");h(this,"backend");h(this,"backendLoader");h(this,"currentState");h(this,"currentDisplay",null);h(this,"playerState",{reactive:w1()});h(this,"rendererState");h(this,"nonReactiveState");h(this,"worldReady");h(this,"resolveWorldReady");h(this,"lastCamUpdate",0);this.config={...yi,...t.config},this.inWorldRenderingConfig=Ri({...Ce,...t.rendererConfig});let i=Bt();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 gs(0,64,0);this.worldView=new Ot(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 v;if(this.backend){let a=this.backend.startWorld(o);a&&typeof a.then=="function"&&(v=a)}return this.currentState={method:"startWorld",args:[o]},await v,this.resolveWorldReady(),this.onWorldStart?.(),!!v}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=Ri(Bt().reactive),this.nonReactiveState=Bt().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)}};R();k();M();T();import{proxy as bs}from"valtio";var Ti=()=>bs({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,itemUsageTicks:0,username:"",onlineMode:!1,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"}}),_s=()=>({reactive:Ti()}),Mi=(r,t,e)=>({...t,"minecraft:date":new Date});R();k();M();T();R();k();M();T();import*as o5 from"three";import{Vec3 as U4}from"vec3";R();k();M();T();import{proxy as ws,getVersion as Ci,subscribe as Pi}from"valtio";import{Vec3 as Bi}from"vec3";function Ii(r,t){let e=t??globalThis;return e.addEventListener("message",i=>{let{type:n,args:s,msgId:o}=i.data;if(r[n]){let v=r[n](...s);v instanceof Promise&&v.then(a=>{e.postMessage({type:"result",msgId:o,args:[a]})})}}),null}var zi=(r,t=!0)=>{let e=0;return new Proxy({},{get(i,n){return n==="transfer"?(...s)=>new Proxy({},{get(o,v){return(...a)=>{r.postMessage({type:v,args:a},s)}}}):(...s)=>{let o=e++,v=t?s.filter(a=>a instanceof ArrayBuffer||a instanceof MessagePort||typeof ImageBitmap<"u"&&a instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&a instanceof OffscreenCanvas||typeof ImageData<"u"&&a instanceof ImageData):[];return r.postMessage({type:n,msgId:o,args:s},v),{then(a){let l=({data:c})=>{c.type==="result"&&c.msgId===o&&(a(c.args[0]),r.removeEventListener("message",l))};r.addEventListener("message",l)}}}}})};var Hi=(r,t,e,i)=>{try{e.postMessage({type:"sync",syncId:r,value:b5(t)}),Ie.toWorker++,globalThis.debugSyncMessagesOutgoing??(globalThis.debugSyncMessagesOutgoing=0),globalThis.debugSyncMessagesOutgoing++}catch{ze(t)}},Ie={toWorker:0,fromWorker:0};typeof window<"u"&&setInterval(()=>{globalThis.debugWorkerSyncStats={...Ie},Ie.toWorker=0,Ie.fromWorker=0},1e3);var As=()=>Math.random().toString(36).slice(2,15)+Math.random().toString(36).slice(2,15),Si=(r,t,e,i,n)=>{if(!r.__syncToWorker&&!r.__syncFromWorker&&!i)return;let s=As();if(r.__syncId=s,r.__syncToWorker||i){let o=()=>{Hi(s,t,e,`toWorker:${n}`)};i&&Pi(t,o);let v=r.__syncToWorkerInterval??0;v>0&&setInterval(o,v)}t.__syncFromWorker&&e.addEventListener("message",o=>{o.data.type==="sync"&&o.data.syncId===s&&(Ie.fromWorker++,Object.assign(t,o.data.value))})},b5=r=>{if(Ci(r)===void 0)return r;if(Array.isArray(r))return r.map(b5);if(typeof r=="object"&&r!==null){let t={};for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=b5(r[e]));return t}return r},y5=(r,t,e=!0,i=!0,n=!1)=>{var v,a;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 Bi){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=Ci(r[l])!==void 0;o[l]=c?b5(r[l]):r[l];let d=r[l].__syncToWorker!==!1&&!n&&c&&!r[l].__syncFromWorker;if((v=o[l]).__syncToWorker??(v.__syncToWorker=d),c&&((a=o[l]).__valtio??(a.__valtio=!0)),o[l].__syncToWorker&&c){Si(o[l],s[l],t,!0,l);continue}Si(o[l],s[l],t,!1,l),o[l]=y5(o[l],t,e,!1,c)}}return o},ze=(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&&ze(r[e],[...t,e]);try{structuredClone(r[e])}catch{}}},Es=(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=()=>{Hi(i,r,t,`fromWorker:${e}`)};r.__valtio&&Pi(r,n);let s=r.__syncFromWorkerInterval??0;s>0&&setInterval(n,s)}},xs=[{restorerName:"Set",restoreTransferred(r,t){return new Set(r)}},{restorerName:"Vec3",restoreTransferred(r,t){return new Bi(r.x,r.y,r.z)}}];var _5=(r,t,e,i=!0)=>{let n=[...xs,...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&&_5(r[s],n,e,i),r[s].__restorer){let o=n.find(v=>v.restorerName?v.restorerName===r[s].__restorer:v.name===r[s].__restorer);if(o)r[s]=o.restoreTransferred(r[s],e);else{let v=new Error(`Restorer ${r[s].__restorer} not found`);if(typeof i=="function")i(v);else if(i)throw v}}r[s].__valtio&&(r[s]=ws(r[s])),Es(r[s],e,s)}return r};R();k();M();T();var w5=class{constructor(t){this.nonReactiveState=t;h(this,"events",[]);h(this,"frozenEvents",[]);h(this,"lastSecondEvents",[]);h(this,"currentFrameStartTime",null);h(this,"lastInteractionTime",0);h(this,"lastSecondUpdateTime",0);h(this,"timeWindowMs",5e3);h(this,"lastSecondWindowMs",1e3);h(this,"maxEvents",500);h(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()}};R();k();M();T();import*as Q from"three";import{Vec3 as At}from"vec3";import w8 from"prismarine-chat";R();k();M();T();var R0=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-R0.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?R0.Bounce.In(r*2)*.5:R0.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}}}}),He=function(){return performance.now()},Oe=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=He()),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}(),ee={Linear:function(r,t){var e=r.length-1,i=e*t,n=Math.floor(i),s=ee.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=ee.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=ee.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=ee.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,v=n*n,a=n*v;return(2*t-2*e+s+o)*a+(-3*t+3*e-2*s-o)*v+s*n+t}}},Oi=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),A1=new Oe,M0=function(){function r(t,e){e===void 0&&(e=A1),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=R0.Linear.None,this._interpolationFunction=ee.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Oi.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=He()),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 v=t[o],a=Array.isArray(v),l=a?"array":typeof v,c=!a&&Array.isArray(i[o]);if(!(l==="undefined"||l==="function")){if(c){var d=i[o];if(d.length===0)continue;for(var m=[v],p=0,g=d.length;p<g;p+=1){var y=this._handleRelativeValue(v,d[p]);if(isNaN(y)){c=!1;break}m.push(y)}c&&(i[o]=m)}if((l==="object"||a)&&v&&!c){e[o]=a?[]:{};var w=v;for(var _ in w)e[o][_]=w[_];n[o]=a?[]:{};var d=i[o];if(!this._isDynamic){var E={};for(var _ in d)E[_]=d[_];i[o]=d=E}this._setupProperties(w,e[o],d,n[o],s)}else(typeof e[o]>"u"||s)&&(e[o]=v),a||(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=He()),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=He()),!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=A1),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=R0.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=ee.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=He()),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 v=0,a=this._chainedTweens.length;v<a;v++)this._chainedTweens[v].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,v=i[s],a=Array.isArray(t[s]),l=Array.isArray(v),c=!a&&l;c?t[s]=this._interpolationFunction(v,n):typeof v=="object"&&v?this._updateProperties(t[s],o,v,n):(v=this._handleRelativeValue(o,v),typeof v=="number"&&(t[s]=o+(v-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 Pl=Oi.nextId,nt=A1,Bl=nt.getAll.bind(nt),Il=nt.removeAll.bind(nt),zl=nt.add.bind(nt),Hl=nt.remove.bind(nt),Li=nt.update.bind(nt);R();k();M();T();R();k();M();T();var Rs=()=>{if(typeof OffscreenCanvas>"u")return!1;try{let r=new OffscreenCanvas(1,1);return(r.getContext("webgl2")||r.getContext("webgl"))!==null}catch{return!1}},ks=Rs(),B0=(r,t)=>{if(ks)return new OffscreenCanvas(r,t);let e=document.createElement("canvas");return e.width=r,e.height=t,e};async function A5(r){let e=await(await fetch(r)).blob();return createImageBitmap(e)}var Ts=(r,t)=>{try{return JSON.parse(r)}catch{return null}},Ms={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"},Di=(r,t,e,i=s=>{},n=(s,o)=>B0(s,o))=>{let v=[16,9],a=v[0]-v[1],l=a/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,a*40),m=d.getContext("2d");i(m);let p=("front_text"in r?r.front_text.color:r.Color)||"black";for(let[g,y]of c.slice(0,4).entries())y!=="null"&&E1(y,e,d,64,p,64*(g+1)+(t?0:-8));return d},E1=(r,t,e,i,n,s=0)=>{let o=!1,v=typeof r=="string"&&(r?.startsWith("{")||r?.startsWith('"'))?Ts(r??'""',"sign text"):r;if(!v||typeof v!="object"&&typeof v!="string")return;let a=e.getContext("2d");if(!a)throw new Error("Could not get 2d context");a.imageSmoothingEnabled=!1,a.font=`${i}px mojangles`;let l=new t(v),c=[],d=!1,m="",p=s,g=[],y=(C,x)=>{C.text!==null&&C.text!==void 0&&C.text;let S=C.text===null||C.text===void 0?void 0:String(C.text),z={color:C.color??x?.color,underlined:C.underlined??x?.underlined,strikethrough:C.strikethrough??x?.strikethrough,bold:C.bold??x?.bold,italic:C.italic??x?.italic};if(d=d||z.underlined||z.strikethrough||!1,S?.includes(`
11
+ `);var g=p.map(function(y){return this.buildFirstStateStack(y,[])||[y]},this);g.forEach(function(y){var E=y[0],_=E.rule.symbols[E.dot],A=this.getSymbolDisplay(_);c.push("A "+A+" based on:"),this.displayStateStack(y,c)},this)}return c.push(""),c.join(`
12
+ `)},s.prototype.displayStateStack=function(a,l){for(var c,d=0,m=0;m<a.length;m++){var p=a[m],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(a){return o(a)},s.prototype.buildFirstStateStack=function(a,l){if(l.indexOf(a)!==-1)return null;if(a.wantedBy.length===0)return[a];var c=a.wantedBy[0],d=[a].concat(l),m=this.buildFirstStateStack(c,d);return m===null?null:[a].concat(m)},s.prototype.save=function(){var a=this.table[this.current];return a.lexerState=this.lexerState,a},s.prototype.restore=function(a){var l=a.index;this.current=l,this.table[l]=a,this.table.splice(l+1),this.lexerState=a.lexerState,this.results=this.finish()},s.prototype.rewind=function(a){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[a])},s.prototype.finish=function(){var a=[],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&&a.push(d)}),a.map(function(d){return d.data})};function o(a){var l=typeof a;if(l==="string")return a;if(l==="object"){if(a.literal)return JSON.stringify(a.literal);if(a instanceof RegExp)return"character matching "+a;if(a.type)return a.type+" token";if(a.test)return"token matching "+String(a.test);throw new Error("Unknown symbol type: "+a)}}function v(a){var l=typeof a;if(l==="string")return a;if(l==="object"){if(a.literal)return JSON.stringify(a.literal);if(a instanceof RegExp)return a.toString();if(a.type)return"%"+a.type;if(a.test)return"<"+String(a.test)+">";throw new Error("Unknown symbol type: "+a)}}return{Parser:s,Grammar:i,Rule:r}})});var vn=N0((th,H5)=>{R();k();M();T();(function(){function r(a){return a[0]}function t(a){if(a==="true")return{type:"boolean",value:!0};if(a==="false")return{type:"boolean",value:!1};let l="bslfdi",c={b:"byte",s:"short",l:"long",f:"float",d:"double",i:"int"},d=a.charAt(a.length-1).toLowerCase();if(l.indexOf(d)!==-1){let y=parseFloat(a.substring(0,a.length-1));return isNaN(y)?{value:a,type:"string"}:{value:y,type:c[d]}}let m=parseFloat(a),p=a.includes("."),g=m>>0===m;return!isNaN(a)&&(p||g)?{value:m,type:p?"double":"int"}:{value:a,type:"string"}}function e(a,l){a[0]!==void 0&&(l[a[0]]=a[1])}function i(a){let l={};e(a[2],l);for(let c in a[3])e(a[3][c][3],l);return{type:"compound",value:l}}function n(a){let l=[a[6]];for(let d in a[7])l.push(a[7][d][3]);return{type:{B:"byteArray",I:"intArray",L:"longArray"}[a[2]],value:{type:l[0].type,value:l.map(d=>d.value)}}}function s(a){let l=[a[2]];for(let c in a[3])l.push(a[3][c][3]);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}function o(a){let l=[];e(a[2],l);for(let c in a[3])e(a[3][c][3],l);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}var v={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(a){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(a){return null}},{name:"wschar",symbols:[/[ \t\n\v\f]/],postprocess:r},{name:"MAIN",symbols:["_","JVALUE","_"],postprocess:a=>a[1]},{name:"JVALUE",symbols:["JOBJECT"],postprocess:a=>a[0]},{name:"JVALUE",symbols:[{literal:"'"},"_","JOBJECT","_",{literal:"'"}],postprocess:a=>a[2]},{name:"JVALUE",symbols:["JARRAY"],postprocess:a=>a[0]},{name:"JVALUE",symbols:["STRING"],postprocess:a=>a[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:a=>null},{name:"JOBJECT",symbols:[{literal:"{"},"_",{literal:"}"}],postprocess:a=>({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(a){return null}},{name:"JOBJECT",symbols:[{literal:"{"},"_","PAIR","JOBJECT$ebnf$1","JOBJECT$ebnf$2",{literal:"}"}],postprocess:i},{name:"JARRAY",symbols:[{literal:"["},"_",{literal:"]"}],postprocess:a=>({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(a){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(a){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(a){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","PAIR","JARRAY$ebnf$5","JARRAY$ebnf$6","_",{literal:"]"}],postprocess:o},{name:"PAIR",symbols:["STRING","_",{literal:":"},"_","JVALUE"],postprocess:a=>[a[0].value,a[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:a=>t(JSON.parse(a.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:a=>t(a[0].join(""))}],ParserStart:"MAIN"};typeof H5<"u"&&typeof H5.exports<"u"?H5.exports=v:window.grammar=v})()});var t2=N0((sh,hn)=>{R();k();M();T();var ln=an(),to=vn();function un(r){function t(e,i){return i==="compound"?Object.keys(e).reduce(function(n,s){return n[s]=un(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 O5({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],v=O5(n[s][1]);o==="string"&&(v=cn(v)),i.push(`${o}:${v}`)}return`{${i.join(",")}}`}else{if(t==="list")return Array.isArray(r.value)?`[${dn(r)}]`:"[]";if(t==="byteArray"||t==="intArray"||t==="longArray"){let i=io(t),n=dn(r);return`[${i}${n}]`}}let e=r+no(r,t);return t==="string"&&(e=cn(e)),e}function cn(r){return r=r.replace(/"/g,'\\"'),(/'|{|}|\[|\]|:|;|,|\(|\)|§|=/g.test(r)||r==="")&&(r=`"${r}"`),r}function dn({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=O5({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 io=r=>r.charAt(0).toUpperCase()+";";function no(r,t){return t==="double"?r>>0===r?"d":"":{int:"",byte:"b",short:"s",float:"f",long:"l",string:""}[t]}function ro(r){return O5(fn(r))}function fn(r){try{let t=new ln.Parser(ln.Grammar.fromCompiled(to));return t.feed(r),t.results[0]}catch(t){throw t.message=`Error parsing text '${r}'`,t}}hn.exports={parse:fn,simplify:un,stringify:O5,normalize:ro}});var yn={};c5(yn,{camelCase:()=>lo,capitalCase:()=>i2,constantCase:()=>fo,dotCase:()=>ho,kebabCase:()=>mo,noCase:()=>We,pascalCase:()=>co,pascalSnakeCase:()=>uo,pathCase:()=>po,sentenceCase:()=>go,snakeCase:()=>n2,split:()=>e2,splitSeparateNumbers:()=>gn,trainCase:()=>bo});function e2(r){let t=r.trim();t=t.replace(so,mn).replace(oo,mn),t=t.replace(vo,"\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 gn(r){let t=e2(r);for(let e=0;e<t.length;e++){let i=t[e],n=ao.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 We(r,t){let[e,i,n]=se(r,t);return e+i.map(Ve(t?.locale)).join(t?.delimiter??" ")+n}function lo(r,t){let[e,i,n]=se(r,t),s=Ve(t?.locale),o=Ne(t?.locale),v=t?.mergeAmbiguousCharacters?L5(s,o):bn(s,o);return e+i.map((a,l)=>l===0?s(a):v(a,l)).join(t?.delimiter??"")+n}function co(r,t){let[e,i,n]=se(r,t),s=Ve(t?.locale),o=Ne(t?.locale),v=t?.mergeAmbiguousCharacters?L5(s,o):bn(s,o);return e+i.map(v).join(t?.delimiter??"")+n}function uo(r,t){return i2(r,{delimiter:"_",...t})}function i2(r,t){let[e,i,n]=se(r,t),s=Ve(t?.locale),o=Ne(t?.locale);return e+i.map(L5(s,o)).join(t?.delimiter??" ")+n}function fo(r,t){let[e,i,n]=se(r,t);return e+i.map(Ne(t?.locale)).join(t?.delimiter??"_")+n}function ho(r,t){return We(r,{delimiter:".",...t})}function mo(r,t){return We(r,{delimiter:"-",...t})}function po(r,t){return We(r,{delimiter:"/",...t})}function go(r,t){let[e,i,n]=se(r,t),s=Ve(t?.locale),o=Ne(t?.locale),v=L5(s,o);return e+i.map((a,l)=>l===0?v(a):s(a)).join(t?.delimiter??" ")+n}function n2(r,t){return We(r,{delimiter:"_",...t})}function bo(r,t){return i2(r,{delimiter:"-",...t})}function Ve(r){return r===!1?t=>t.toLowerCase():t=>t.toLocaleLowerCase(r)}function Ne(r){return r===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(r)}function L5(r,t){return e=>`${t(e[0])}${r(e.slice(1))}`}function bn(r,t){return(e,i)=>{let n=e[0];return(i>0&&n>="0"&&n<="9"?"_"+n:t(n))+r(e.slice(1))}}function se(r,t={}){let e=t.split??(t.separateNumbers?gn:e2),i=t.prefixCharacters??pn,n=t.suffixCharacters??pn,s=0,o=r.length;for(;s<r.length;){let v=r.charAt(s);if(!i.includes(v))break;s++}for(;o>s;){let v=o-1,a=r.charAt(v);if(!n.includes(a))break;o=v}return[r.slice(0,s),e(r.slice(s,o)),r.slice(o)]}var so,oo,ao,vo,mn,pn,r2=ot(()=>{R();k();M();T();so=/([\p{Ll}\d])(\p{Lu})/gu,oo=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,ao=/(\d)\p{Ll}|(\p{L})\d/u,vo=/[^\p{L}\d]+/giu,mn="$1\0$2",pn=""});var _n=N0((hh,yo)=>{yo.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 An=N0((mh,wn)=>{R();k();M();T();var oe=1e3,ae=oe*60,ve=ae*60,Gt=ve*24,_o=Gt*7,wo=Gt*365.25;wn.exports=function(r,t){t=t||{};var e=typeof r;if(e==="string"&&r.length>0)return Ao(r);if(e==="number"&&isFinite(r))return t.long?xo(r):Eo(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function Ao(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*_o;case"days":case"day":case"d":return e*Gt;case"hours":case"hour":case"hrs":case"hr":case"h":return e*ve;case"minutes":case"minute":case"mins":case"min":case"m":return e*ae;case"seconds":case"second":case"secs":case"sec":case"s":return e*oe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function Eo(r){var t=Math.abs(r);return t>=Gt?Math.round(r/Gt)+"d":t>=ve?Math.round(r/ve)+"h":t>=ae?Math.round(r/ae)+"m":t>=oe?Math.round(r/oe)+"s":r+"ms"}function xo(r){var t=Math.abs(r);return t>=Gt?D5(r,t,Gt,"day"):t>=ve?D5(r,t,ve,"hour"):t>=ae?D5(r,t,ae,"minute"):t>=oe?D5(r,t,oe,"second"):r+" ms"}function D5(r,t,e,i){var n=t>=e*1.5;return Math.round(r/e)+" "+i+(n?"s":"")}});var xn=N0((_h,En)=>{R();k();M();T();function Ro(r){e.debug=e,e.default=e,e.coerce=a,e.disable=o,e.enable=n,e.enabled=v,e.humanize=An(),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 m=0;m<c.length;m++)d=(d<<5)-d+c.charCodeAt(m),d|=0;return e.colors[Math.abs(d)%e.colors.length]}e.selectColor=t;function e(c){let d,m=null,p,g;function y(...E){if(!y.enabled)return;let _=y,A=Number(new Date),C=A-(d||A);_.diff=C,_.prev=d,_.curr=A,d=A,E[0]=e.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let x=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(z,B)=>{if(z==="%%")return"%";x++;let I=e.formatters[B];if(typeof I=="function"){let W=E[x];z=I.call(_,W),E.splice(x,1),x--}return z}),e.formatArgs.call(_,E),(_.log||e.log).apply(_,E)}return y.namespace=c,y.useColors=e.useColors(),y.color=e.selectColor(c),y.extend=i,y.destroy=e.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(p!==e.namespaces&&(p=e.namespaces,g=e.enabled(c)),g),set:E=>{m=E}}),typeof e.init=="function"&&e.init(y),y}function i(c,d){let m=e(this.namespace+(typeof d>"u"?":":d)+c);return m.log=this.log,m}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 m of d)m[0]==="-"?e.skips.push(m.slice(1)):e.names.push(m)}function s(c,d){let m=0,p=0,g=-1,y=0;for(;m<c.length;)if(p<d.length&&(d[p]===c[m]||d[p]==="*"))d[p]==="*"?(g=p,y=m,p++):(m++,p++);else if(g!==-1)p=g+1,y++,m=y;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 v(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 a(c){return c instanceof Error?c.stack||c.message:c}function l(){}return e.enable(e.load()),e}En.exports=Ro});var Rn=N0((G0,F5)=>{R();k();M();T();G0.formatArgs=To;G0.save=Mo;G0.load=So;G0.useColors=ko;G0.storage=Co();G0.destroy=(()=>{let r=!1;return()=>{r||(r=!0)}})();G0.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 ko(){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 To(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+F5.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)}G0.log=console.debug||console.log||(()=>{});function Mo(r){try{r?G0.storage.setItem("debug",r):G0.storage.removeItem("debug")}catch{}}function So(){let r;try{r=G0.storage.getItem("debug")||G0.storage.getItem("DEBUG")}catch{}return!r&&typeof L<"u"&&"env"in L&&(r=L.env.DEBUG),r}function Co(){try{return localStorage}catch{}}F5.exports=xn()(G0);var{formatters:Po}=F5.exports;Po.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var kn=N0(le=>{"use strict";R();k();M();T();var Bo=le&&le.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(le,"__esModule",{value:!0});le.debug=void 0;var Io=Bo(Rn());le.debug=(0,Io.default)("mineflayer-mouse")});var Cn=N0(Wt=>{"use strict";R();k();M();T();var zo=Wt&&Wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.isEntityAttackable=void 0;Wt.isArmorStandAttackable=Sn;var Tn=(r2(),ns(yn)),je=zo(_n()),Ho=kn(),Mn=Object.fromEntries([...je.default.attackable,...je.default.notAttackable].map(r=>[r,!0])),Oo=je.default.attackable,Lo=(r,t)=>{if(!t.name)throw new Error("Entity has no name");let e=r.entitiesByName[t.name],n=je.default.entityRenames[t.name]||je.default.entityRenames[(0,Tn.snakeCase)(t.name)]||t.name;if(!Mn[n]&&(n=(0,Tn.snakeCase)(n),!Mn[n]))return(0,Ho.debug)(`Cannot find entity ${n} in entityData.json`),!1;let s=Do[n];return s?s(t,e):Oo.includes(n)};Wt.isEntityAttackable=Lo;var Do={armor_stand:Sn};function Sn(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 l6=N0((f_,t8)=>{t8.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 c6=N0(q5=>{"use strict";R();k();M();T();Object.defineProperty(q5,"__esModule",{value:!0});q5.versionToNumber=void 0;var e8=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")}`};q5.versionToNumber=e8});var u6=N0(be=>{"use strict";R();k();M();T();var i8=be&&be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(be,"__esModule",{value:!0});be.getRenamedData=void 0;var d6=i8(l6()),_t=c6(),n8=(r,t,e,i)=>{let n=(0,_t.versionToNumber)(e),s=(0,_t.versionToNumber)(i),o=n<s?1:-1,v=o>0?1:0,a=t,l=Object.keys(d6.default).sort((m,p)=>o*((0,_t.versionToNumber)(m)-(0,_t.versionToNumber)(p))),c=o>0?s:n,d=o>0?n:s;for(let m of l.filter(p=>(0,_t.versionToNumber)(p)<=c&&(0,_t.versionToNumber)(p)>=d)){if(o>0&&(0,_t.versionToNumber)(m)>=c||o<0&&(0,_t.versionToNumber)(m)<=d)break;let p=d6.default[m][r];if(p)for(let g of p){let y=g[v],E=g[1-v];if(Array.isArray(a))a.includes(E)&&(a=a.map(_=>_===E?y:_));else if(a===E){a=y;break}}}return a};be.getRenamedData=n8});var R6={};c5(R6,{applyWorldGeometryExport:()=>f8,createMeshesFromExport:()=>E6,downloadWorldGeometry:()=>B2,exportWorldGeometry:()=>A6,loadTextureFromDataUrl:()=>x6,loadWorldGeometryFromUrl:()=>d8});import*as A0 from"three";function A6(r,t,e,i=!1){let n=[];for(let[o,v]of Object.entries(r.sectionObjects)){let a=v.children.find(E=>E.name==="mesh");if(!a?.geometry)continue;let{geometry:l}=a,c=l.getAttribute("position"),d=l.getAttribute("normal"),m=l.getAttribute("color"),p=l.getAttribute("uv"),g=l.index;if(!c||!g)continue;let y=r.sceneOrigin.getWorldPosition(a);n.push({key:o,position:{x:y?.x??r.sceneOrigin.toWorldX(a.position.x),y:y?.y??r.sceneOrigin.toWorldY(a.position.y),z:y?.z??r.sceneOrigin.toWorldZ(a.position.z)},geometry:{positions:[...c.array],normals:d?[...d.array]:[],colors:m?[...m.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"),v=r.material.map,{image:a}=v;a&&(o.width=a.width,o.height=a.height,o.getContext("2d").drawImage(a,0,0),s.textureAtlasDataUrl=o.toDataURL("image/png"))}return s}function B2(r,t,e,i="world-geometry.json",n=!1){let s=A6(r,t,e,n),o=JSON.stringify(s),v=new Blob([o],{type:"application/json"}),a=URL.createObjectURL(v),l=document.createElement("a");l.href=a,l.download=i,l.click(),URL.revokeObjectURL(a)}async function d8(r){let t=await fetch(r);if(!t.ok)throw new Error(`Failed to fetch world geometry: ${t.statusText}`);return t.json()}function E6(r,t){let e=[];for(let i of r.sections){let n=new A0.BufferGeometry;n.setAttribute("position",new A0.Float32BufferAttribute(i.geometry.positions,3)),i.geometry.normals.length&&n.setAttribute("normal",new A0.Float32BufferAttribute(i.geometry.normals,3)),i.geometry.colors.length&&n.setAttribute("color",new A0.Float32BufferAttribute(i.geometry.colors,3)),i.geometry.uvs.length&&n.setAttribute("uv",new A0.Float32BufferAttribute(i.geometry.uvs,2));let o=Math.max(...i.geometry.indices)>65535?Uint32Array:Uint16Array;n.setIndex(new A0.BufferAttribute(new o(i.geometry.indices),1));let v=new A0.Mesh(n,t);v.position.set(i.position.x,i.position.y,i.position.z),v.name="mesh";let a=new A0.Group;a.name="chunk",a.add(v),e.push(a)}return e}async function x6(r){return new Promise((t,e)=>{let i=new Image;i.onload=()=>{let n=new A0.Texture(i);n.magFilter=A0.NearestFilter,n.minFilter=A0.NearestFilter,n.needsUpdate=!0,n.flipY=!1,t(n)},i.onerror=e,i.src=r})}async function f8(r,t){let{scene:e,renderUpdateEmitter:i,material:n}=r,s=e.getObjectByName(w6);s&&(e.remove(s),u8(s));let o=!!t.textureAtlasDataUrl,v;if(o&&t.textureAtlasDataUrl){let c=await x6(t.textureAtlasDataUrl);v=new A0.MeshLambertMaterial({map:c,vertexColors:!0,transparent:!0,alphaTest:.1}),v.name="geometry-export-material"}else v=n;let a=E6(t,v),l=new A0.Group;l.name=w6,o&&(l.userData.geometryExportMaterial=v);for(let c of a)l.add(c);return e.add(l),i.emit("update"),a.length}var w6,u8,I2=ot(()=>{"use strict";R();k();M();T();w6="geometry-export-root";u8=r=>{r.traverse(e=>{e.isMesh&&e.geometry?.dispose()});let t=r.userData?.geometryExportMaterial;t&&(t.map?.dispose?.(),t.dispose?.())}});R();k();M();T();R();k();M();T();R();k();M();T();R();k();M();T();import{proxy as _3}from"valtio";var Ce={paused:!1,showChunkBorders:!1,enableDebugOverlay:!1,debugModelVariant:void 0,futuristicReveal:!1,wasmMesher:!1,mesherWorkers:1,addChunksBatchWaitTime:200,_experimentalSmoothChunkLoading:!0,_renderByChunks:!1,dayCycle:!0,smoothLighting:!0,enableLighting:!0,starfield:!0,defaultSkybox:!0,renderEntities:!0,extraBlockRenderers:!0,foreground:!0,fov:75,volume:1,showHand:!1,viewBobbing:!1,renderEars:!0,highlightBlockColor:"blue",fetchPlayerSkins:!0,skinTexturesProxy:void 0,vrSupport:!0,vrPageGameRendering:!0,clipWorldBelowY:void 0,isPlayground:!1,instantCameraUpdate:!1,isRaining:!1,moduleStates:{}},w3={fpsLimit:void 0,powerPreference:void 0,sceneBackground:"lightblue",timeoutRendering:!1},xv=(r={})=>_3({...Ce,...r}),Bt=()=>({reactive:_3({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:[]}}}});R();k();M();T();import{proxy as as}from"valtio";var A1=()=>as({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,lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,cameraSpectatingEntity:void 0,team:void 0}),A3=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"}}),E3=()=>({reactive:A1()});R();k();M();T();import{Vec3 as As}from"vec3";import{proxy as T3}from"valtio";R();k();M();T();R();k();M();T();R();k();M();T();R();k();M();T();var m5={},x3=!1;function vs(){if(x3)return m5;x3=!0;var r=typeof Reflect=="object"?Reflect:null,t=r&&typeof r.apply=="function"?r.apply:function(S,z,B){return Function.prototype.apply.call(S,z,B)},e;r&&typeof r.ownKeys=="function"?e=r.ownKeys:Object.getOwnPropertySymbols?e=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:e=function(S){return Object.getOwnPropertyNames(S)};function i(x){}var n=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}m5=s,m5.once=_,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function v(x){if(typeof x!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof x)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(x){if(typeof x!="number"||x<0||n(x))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+x+".");o=x}}),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(S){if(typeof S!="number"||S<0||n(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function a(x){return x._maxListeners===void 0?s.defaultMaxListeners:x._maxListeners}s.prototype.getMaxListeners=function(){return a(this)},s.prototype.emit=function(S){for(var z=[],B=1;B<arguments.length;B++)z.push(arguments[B]);var I=S==="error",W=this._events;if(W!==void 0)I=I&&W.error===void 0;else if(!I)return!1;if(I){var O;if(z.length>0&&(O=z[0]),O instanceof Error)throw O;var j=new Error("Unhandled error."+(O?" ("+O.message+")":""));throw j.context=O,j}var q=W[S];if(q===void 0)return!1;if(typeof q=="function")t(q,this,z);else for(var i0=q.length,N=g(q,i0),B=0;B<i0;++B)t(N[B],this,z);return!0};function l(x,S,z,B){var I,W,O;if(v(z),W=x._events,W===void 0?(W=x._events=Object.create(null),x._eventsCount=0):(W.newListener!==void 0&&(x.emit("newListener",S,z.listener?z.listener:z),W=x._events),O=W[S]),O===void 0)O=W[S]=z,++x._eventsCount;else if(typeof O=="function"?O=W[S]=B?[z,O]:[O,z]:B?O.unshift(z):O.push(z),I=a(x),I>0&&O.length>I&&!O.warned){O.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=x,j.type=S,j.count=O.length}return x}s.prototype.addListener=function(S,z){return l(this,S,z,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,z){return l(this,S,z,!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(x,S,z){var B={fired:!1,wrapFn:void 0,target:x,type:S,listener:z},I=c.bind(B);return I.listener=z,B.wrapFn=I,I}s.prototype.once=function(S,z){return v(z),this.on(S,d(this,S,z)),this},s.prototype.prependOnceListener=function(S,z){return v(z),this.prependListener(S,d(this,S,z)),this},s.prototype.removeListener=function(S,z){var B,I,W,O,j;if(v(z),I=this._events,I===void 0)return this;if(B=I[S],B===void 0)return this;if(B===z||B.listener===z)--this._eventsCount===0?this._events=Object.create(null):(delete I[S],I.removeListener&&this.emit("removeListener",S,B.listener||z));else if(typeof B!="function"){for(W=-1,O=B.length-1;O>=0;O--)if(B[O]===z||B[O].listener===z){j=B[O].listener,W=O;break}if(W<0)return this;W===0?B.shift():y(B,W),B.length===1&&(I[S]=B[0]),I.removeListener!==void 0&&this.emit("removeListener",S,j||z)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var z,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[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[S]),this;if(arguments.length===0){var W=Object.keys(B),O;for(I=0;I<W.length;++I)O=W[I],O!=="removeListener"&&this.removeAllListeners(O);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(z=B[S],typeof z=="function")this.removeListener(S,z);else if(z!==void 0)for(I=z.length-1;I>=0;I--)this.removeListener(S,z[I]);return this};function m(x,S,z){var B=x._events;if(B===void 0)return[];var I=B[S];return I===void 0?[]:typeof I=="function"?z?[I.listener||I]:[I]:z?E(I):g(I,I.length)}s.prototype.listeners=function(S){return m(this,S,!0)},s.prototype.rawListeners=function(S){return m(this,S,!1)},s.listenerCount=function(x,S){return typeof x.listenerCount=="function"?x.listenerCount(S):p.call(x,S)},s.prototype.listenerCount=p;function p(x){var S=this._events;if(S!==void 0){var z=S[x];if(typeof z=="function")return 1;if(z!==void 0)return z.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function g(x,S){for(var z=new Array(S),B=0;B<S;++B)z[B]=x[B];return z}function y(x,S){for(;S+1<x.length;S++)x[S]=x[S+1];x.pop()}function E(x){for(var S=new Array(x.length),z=0;z<S.length;++z)S[z]=x[z].listener||x[z];return S}function _(x,S){return new Promise(function(z,B){function I(O){x.removeListener(S,W),B(O)}function W(){typeof x.removeListener=="function"&&x.removeListener("error",I),z([].slice.call(arguments))}C(x,S,W,{once:!0}),S!=="error"&&A(x,I,{once:!0})})}function A(x,S,z){typeof x.on=="function"&&C(x,"error",S,z)}function C(x,S,z,B){if(typeof x.on=="function")B.once?x.once(S,z):x.on(S,z);else if(typeof x.addEventListener=="function")x.addEventListener(S,function I(W){B.once&&x.removeEventListener(S,I),z(W)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof x)}return m5}var p5=vs();p5.once;p5.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)})};p5.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,v),r.removeListener("error",a),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,v),r.removeListener("error",a)},[Symbol.asyncIterator](){return this}};return r.on(t,v),r.on("error",a),o;function v(...l){let c=i.shift();c?c.resolve(createIterResult(l,!1)):e.push(l)}function a(l){s=!0;let c=i.shift();c?c.reject(l):n=l,o.return()}};var{EventEmitter:It,defaultMaxListeners:Uv,init:Gv,listenerCount:Wv,on:Vv,once:Nv}=p5;import{Vec3 as zt}from"vec3";R();k();M();T();function Pe(r){let t=r*2+1;if(t<=0)return[];let e=[],i=0,n=0,s=0,o=-1;for(let v=0;v<t*t;v++){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 a=s;s=-o,o=a}i+=s,n+=o}return e}var $t=r=>[Math.floor(r.x/16),Math.floor(r.z/16)],ls=r=>[Math.floor(r.x/16),Math.floor(r.y/16),Math.floor(r.z/16)],R3=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)},Be=class Be extends It{static restoreTransferred(t,e){let i=new Be;return e&&e.addEventListener("message",({data:n})=>{n.class===Be.restorerName&&n.type==="event"&&i.emit(n.eventName,...n.args)}),i}};h(Be,"restorerName","WorldViewWorker");var Ht=Be,Ot=class extends It{constructor(e,i,n=new zt(0,0,0)){super();this.world=e;this.viewDistance=i;h(this,"spiralNumber",0);h(this,"gotPanicLastTime",!1);h(this,"panicChunksReload",()=>{});h(this,"loadedChunks",{});h(this,"inLoading",!1);h(this,"chunkReceiveTimes",[]);h(this,"lastChunkReceiveTime",0);h(this,"lastChunkReceiveTimeAvg",0);h(this,"panicTimeout");h(this,"lastPos");h(this,"eventListeners",{});h(this,"debugChunksInfo",{});h(this,"waitingSpiralChunksLoad",{});h(this,"addWaitTime",1);h(this,"keepChunksDistance",0);h(this,"isPlayground",!1);h(this,"allowPositionUpdate",!0);h(this,"lastBiomeId",null);h(this,"lastPosCheck",null);this.lastPos=new zt(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:Ht.restorerName,type:"event",eventName:n,args:s})}}return{__restorer:Ht.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]=$t(e),o=Pe(this.viewDistance).map(([v,a])=>new zt((n+v)*16,0,(s+a)*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 R3(e,this.addWaitTime,async o=>{!s||this.loadedChunks[`${o.x},${o.z}`]||(this.world.getColumnAt(o)||(s=await new Promise(v=>{this.waitingSpiralChunksLoad[`${o.x},${o.z}`]=v})),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]=$t(this.lastPos),v=Math.abs(s-Math.floor(e.x/16)),a=Math.abs(o-Math.floor(e.z/16));if(v<=this.viewDistance&&a<=this.viewDistance){let d=await this.world.getColumnAt(e.y!==void 0?e:new zt(e.x,0,e.z));if(d){let m=d.toJson(),p={minY:d.minY??0,worldHeight:d.worldHeight??256};this.emit("loadChunk",{x:e.x,z:e.z,chunk:m,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:m.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[v,a,l]=s.split(",").map(Number);return e.world.getBlock(new zt(v,a,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]=$t(this.lastPos),[v,a]=$t(e);if(s!==v||o!==a||i){this.emit("chunkPosUpdate",{pos:e});let l=[],c=i?this.viewDistance:this.viewDistance+this.keepChunksDistance;for(let m of Object.keys(this.loadedChunks)){let[p,g]=m.split(",").map(Number),y=new zt(p,0,g),[E,_]=$t(y),A=Math.abs(v-E),C=Math.abs(a-_);(A>c||C>c)&&l.push(y)}for(let m of l)this.unloadChunk(m);let d=Pe(this.viewDistance).map(([m,p])=>{let g=new zt((v+m)*16,0,(a+p)*16);if(!this.loadedChunks[`${g.x},${g.z}`])return g}).filter(m=>!!m);this.lastPos.update(e),this._loadChunks(d,e)}else this.emit("chunkPosUpdate",{pos:e}),this.lastPos.update(e)}};R();k();M();T();R();k();M();T();import k3 from"minecraft-data";import cs from"mc-assets/dist/blocksAtlases.json";import ds from"mc-assets/dist/itemsAtlases.json";import us from"mc-assets/dist/itemDefinitions.json";import fs from"mc-assets/dist/blocksAtlasLatest.png";import hs from"mc-assets/dist/blocksAtlasLegacy.png";import ms from"mc-assets/dist/itemsAtlasLatest.png";import ps from"mc-assets/dist/itemsAtlasLegacy.png";import gs from"mc-assets/dist/textureReplacements/christmas";import{AtlasParser as g5}from"mc-assets/dist/atlasParser";import bs from"mc-assets/dist/worldBlockProvider";import{ItemsRenderer as ys}from"mc-assets/dist/itemsRenderer";import{getLoadedItemDefinitionsStore as _s}from"mc-assets";var te=class{constructor(t){h(this,"sourceItemDefinitionsJson",us);h(this,"itemsDefinitionsStore",_s(this.sourceItemDefinitionsJson));h(this,"allReady",!1);h(this,"itemsAtlasImage");h(this,"blocksAtlasImage");h(this,"blocksAtlasJson");h(this,"customBlockStates");h(this,"customModels");h(this,"customItemModelNames",{});h(this,"customTextures",{});h(this,"guiAtlas",null);h(this,"guiAtlasVersion",0);h(this,"itemsRenderer");h(this,"worldBlockProvider");h(this,"blockstatesModels",null);h(this,"version");h(this,"texturesVersion");h(this,"mcData");t&&(Object.assign(this,t),this.mcData=k3(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}},ws="1.21.4",gt=class gt extends It{constructor(){super(...arguments);h(this,"sourceBlockStatesModels",null);h(this,"sourceBlocksAtlases",cs);h(this,"sourceItemsAtlases",ds);h(this,"currentResources");h(this,"itemsAtlasParser");h(this,"blocksAtlasParser");h(this,"currentConfig");h(this,"abortController",new AbortController);h(this,"_promiseAssetsReadyResolvers",Promise.withResolvers())}static restoreTransferred(e,i){let n=new gt,s=o=>{n.currentResources=new te(o)};return s(e.currentResources),i&&i.addEventListener("message",({data:o})=>{o.class===gt.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:gt.restorerName,type:"event",eventName:n,args:s}),(n==="assetsTexturesUpdated"||n==="assetsInventoryReady")&&e.postMessage({class:gt.restorerName,type:"newResources",currentResources:this.currentResources?.prepareForTransfer()})}}return{__restorer:gt.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 te}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 te;s.version=this.currentConfig.version,s.texturesVersion=this.currentConfig.texturesVersion??s.version,s.mcData=k3(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 ys(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,gs);let s=new g5(this.sourceBlocksAtlases,fs,hs),o=Object.keys(e.customTextures.blocks?.textures??{}),{atlas:v,canvas:a}=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 g5({latest:v},a.toDataURL()),e.blocksAtlasImage=await createImageBitmap(a),e.blocksAtlasJson=this.blocksAtlasParser.atlas.latest,e.worldBlockProvider=bs(e.blockstatesModels,this.blocksAtlasParser.atlas,ws)}async recreateItemsAtlas(e=this.currentResources){let i=new g5(this.sourceItemsAtlases,ms,ps),n=Object.keys(e.customTextures.items?.textures??{}),{atlas:s,canvas:o}=await i.makeNewAtlas(e.texturesVersion,v=>{let a=e.customTextures.items?.textures[v];if(a)return a},e.customTextures.items?.tileSize,void 0,n);this.itemsAtlasParser=new g5({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}};h(gt,"restorerName","ResourcesManager");var lt=gt;var M3=class{constructor(t={},e=new lt){this.resourcesManager=e;h(this,"waitBackendLoadPromises",[]);h(this,"onWorldStart");h(this,"onBeforeWorldStart");h(this,"worldView");h(this,"config");h(this,"inWorldRenderingConfig");h(this,"backend");h(this,"backendLoader");h(this,"currentState");h(this,"currentDisplay",null);h(this,"playerState",{reactive:A1()});h(this,"rendererState");h(this,"nonReactiveState");h(this,"worldReady");h(this,"resolveWorldReady");h(this,"lastCamUpdate",0);this.config={...w3,...t.config},this.inWorldRenderingConfig=T3({...Ce,...t.rendererConfig});let i=Bt();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 As(0,64,0);this.worldView=new Ot(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 v;if(this.backend){let a=this.backend.startWorld(o);a&&typeof a.then=="function"&&(v=a)}return this.currentState={method:"startWorld",args:[o]},await v,this.resolveWorldReady(),this.onWorldStart?.(),!!v}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=T3(Bt().reactive),this.nonReactiveState=Bt().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)}};R();k();M();T();import{proxy as Es}from"valtio";var S3=()=>Es({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,lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,cameraSpectatingEntity:void 0,team:void 0}),xs=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"}}),Rs=()=>({reactive:S3()}),C3=(r,t,e)=>({...t,"minecraft:date":new Date});R();k();M();T();R();k();M();T();import*as o5 from"three";import{Vec3 as j4}from"vec3";R();k();M();T();import{proxy as ks,getVersion as B3,subscribe as I3}from"valtio";import{Vec3 as z3}from"vec3";function H3(r,t){let e=t??globalThis;return e.addEventListener("message",i=>{let{type:n,args:s,msgId:o}=i.data;if(r[n]){let v=r[n](...s);v instanceof Promise&&v.then(a=>{e.postMessage({type:"result",msgId:o,args:[a]})})}}),null}var O3=(r,t=!0)=>{let e=0;return new Proxy({},{get(i,n){return n==="transfer"?(...s)=>new Proxy({},{get(o,v){return(...a)=>{r.postMessage({type:v,args:a},s)}}}):(...s)=>{let o=e++,v=t?s.filter(a=>a instanceof ArrayBuffer||a instanceof MessagePort||typeof ImageBitmap<"u"&&a instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&a instanceof OffscreenCanvas||typeof ImageData<"u"&&a instanceof ImageData):[];return r.postMessage({type:n,msgId:o,args:s},v),{then(a){let l=({data:c})=>{c.type==="result"&&c.msgId===o&&(a(c.args[0]),r.removeEventListener("message",l))};r.addEventListener("message",l)}}}}})};var L3=(r,t,e,i)=>{try{e.postMessage({type:"sync",syncId:r,value:b5(t)}),Ie.toWorker++,globalThis.debugSyncMessagesOutgoing??(globalThis.debugSyncMessagesOutgoing=0),globalThis.debugSyncMessagesOutgoing++}catch{ze(t)}},Ie={toWorker:0,fromWorker:0};typeof window<"u"&&setInterval(()=>{globalThis.debugWorkerSyncStats={...Ie},Ie.toWorker=0,Ie.fromWorker=0},1e3);var Ts=()=>Math.random().toString(36).slice(2,15)+Math.random().toString(36).slice(2,15),P3=(r,t,e,i,n)=>{if(!r.__syncToWorker&&!r.__syncFromWorker&&!i)return;let s=Ts();if(r.__syncId=s,r.__syncToWorker||i){let o=()=>{L3(s,t,e,`toWorker:${n}`)};i&&I3(t,o);let v=r.__syncToWorkerInterval??0;v>0&&setInterval(o,v)}t.__syncFromWorker&&e.addEventListener("message",o=>{o.data.type==="sync"&&o.data.syncId===s&&(Ie.fromWorker++,Object.assign(t,o.data.value))})},b5=r=>{if(B3(r)===void 0)return r;if(Array.isArray(r))return r.map(b5);if(typeof r=="object"&&r!==null){let t={};for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=b5(r[e]));return t}return r},y5=(r,t,e=!0,i=!0,n=!1)=>{var v,a;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 z3){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=B3(r[l])!==void 0;o[l]=c?b5(r[l]):r[l];let d=r[l].__syncToWorker!==!1&&!n&&c&&!r[l].__syncFromWorker;if((v=o[l]).__syncToWorker??(v.__syncToWorker=d),c&&((a=o[l]).__valtio??(a.__valtio=!0)),o[l].__syncToWorker&&c){P3(o[l],s[l],t,!0,l);continue}P3(o[l],s[l],t,!1,l),o[l]=y5(o[l],t,e,!1,c)}}return o},ze=(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&&ze(r[e],[...t,e]);try{structuredClone(r[e])}catch{}}},Ms=(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=()=>{L3(i,r,t,`fromWorker:${e}`)};r.__valtio&&I3(r,n);let s=r.__syncFromWorkerInterval??0;s>0&&setInterval(n,s)}},Ss=[{restorerName:"Set",restoreTransferred(r,t){return new Set(r)}},{restorerName:"Vec3",restoreTransferred(r,t){return new z3(r.x,r.y,r.z)}}];var _5=(r,t,e,i=!0)=>{let n=[...Ss,...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&&_5(r[s],n,e,i),r[s].__restorer){let o=n.find(v=>v.restorerName?v.restorerName===r[s].__restorer:v.name===r[s].__restorer);if(o)r[s]=o.restoreTransferred(r[s],e);else{let v=new Error(`Restorer ${r[s].__restorer} not found`);if(typeof i=="function")i(v);else if(i)throw v}}r[s].__valtio&&(r[s]=ks(r[s])),Ms(r[s],e,s)}return r};R();k();M();T();var w5=class{constructor(t){this.nonReactiveState=t;h(this,"events",[]);h(this,"frozenEvents",[]);h(this,"lastSecondEvents",[]);h(this,"currentFrameStartTime",null);h(this,"lastInteractionTime",0);h(this,"lastSecondUpdateTime",0);h(this,"timeWindowMs",5e3);h(this,"lastSecondWindowMs",1e3);h(this,"maxEvents",500);h(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()}};R();k();M();T();import*as Q from"three";import{Vec3 as At}from"vec3";import k8 from"prismarine-chat";R();k();M();T();var R0=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-R0.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?R0.Bounce.In(r*2)*.5:R0.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}}}}),He=function(){return performance.now()},Oe=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=He()),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}(),ee={Linear:function(r,t){var e=r.length-1,i=e*t,n=Math.floor(i),s=ee.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=ee.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=ee.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=ee.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,v=n*n,a=n*v;return(2*t-2*e+s+o)*a+(-3*t+3*e-2*s-o)*v+s*n+t}}},D3=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),E1=new Oe,S0=function(){function r(t,e){e===void 0&&(e=E1),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=R0.Linear.None,this._interpolationFunction=ee.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=D3.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=He()),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 v=t[o],a=Array.isArray(v),l=a?"array":typeof v,c=!a&&Array.isArray(i[o]);if(!(l==="undefined"||l==="function")){if(c){var d=i[o];if(d.length===0)continue;for(var m=[v],p=0,g=d.length;p<g;p+=1){var y=this._handleRelativeValue(v,d[p]);if(isNaN(y)){c=!1;break}m.push(y)}c&&(i[o]=m)}if((l==="object"||a)&&v&&!c){e[o]=a?[]:{};var E=v;for(var _ in E)e[o][_]=E[_];n[o]=a?[]:{};var d=i[o];if(!this._isDynamic){var A={};for(var _ in d)A[_]=d[_];i[o]=d=A}this._setupProperties(E,e[o],d,n[o],s)}else(typeof e[o]>"u"||s)&&(e[o]=v),a||(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=He()),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=He()),!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=E1),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=R0.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=ee.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=He()),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 v=0,a=this._chainedTweens.length;v<a;v++)this._chainedTweens[v].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,v=i[s],a=Array.isArray(t[s]),l=Array.isArray(v),c=!a&&l;c?t[s]=this._interpolationFunction(v,n):typeof v=="object"&&v?this._updateProperties(t[s],o,v,n):(v=this._handleRelativeValue(o,v),typeof v=="number"&&(t[s]=o+(v-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 Ol=D3.nextId,it=E1,Ll=it.getAll.bind(it),Dl=it.removeAll.bind(it),Fl=it.add.bind(it),Ul=it.remove.bind(it),F3=it.update.bind(it);R();k();M();T();R();k();M();T();var Cs=()=>{if(typeof OffscreenCanvas>"u")return!1;try{let r=new OffscreenCanvas(1,1);return(r.getContext("webgl2")||r.getContext("webgl"))!==null}catch{return!1}},Ps=Cs(),I0=(r,t)=>{if(Ps)return new OffscreenCanvas(r,t);let e=document.createElement("canvas");return e.width=r,e.height=t,e};async function A5(r){let e=await(await fetch(r)).blob();return createImageBitmap(e)}var Bs=(r,t)=>{try{return JSON.parse(r)}catch{return null}},Is={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"},U3=(r,t,e,i=s=>{},n=(s,o)=>I0(s,o))=>{let v=[16,9],a=v[0]-v[1],l=a/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,a*40),m=d.getContext("2d");i(m);let p=("front_text"in r?r.front_text.color:r.Color)||"black";for(let[g,y]of c.slice(0,4).entries())y!=="null"&&x1(y,e,d,64,p,64*(g+1)+(t?0:-8));return d},x1=(r,t,e,i,n,s=0)=>{let o=!1,v=typeof r=="string"&&(r?.startsWith("{")||r?.startsWith('"'))?Bs(r??'""',"sign text"):r;if(!v||typeof v!="object"&&typeof v!="string")return;let a=e.getContext("2d");if(!a)throw new Error("Could not get 2d context");a.imageSmoothingEnabled=!1,a.font=`${i}px mojangles`;let l=new t(v),c=[],d=!1,m="",p=s,g=[],y=(C,x)=>{C.text!==null&&C.text!==void 0&&C.text;let S=C.text===null||C.text===void 0?void 0:String(C.text),z={color:C.color??x?.color,underlined:C.underlined??x?.underlined,strikethrough:C.strikethrough??x?.strikethrough,bold:C.bold??x?.bold,italic:C.italic??x?.italic};if(d=d||z.underlined||z.strikethrough||!1,S?.includes(`
14
14
  `))for(let B of S.split(`
15
- `))w(B,z),p+=i,m="";else S&&w(S,z);if(C.extra)for(let B of C.extra)y(B,z)},w=(C,x)=>{o||(o=C.trim()!==""),m+=C,g[p]=a.measureText(m).width;let S=x.color??n;S.startsWith("#")||(S=Ms[S.toLowerCase()]||S),c.push({fontStyle:`${x.bold?"bold":""} ${x.italic?"italic":""}`,fillStyle:S,underlineStyle:x.underlined??!1,strikeStyle:x.strikethrough??!1,offset:p,text:C})};if(y(l),!d&&!l.toString().trim())return;let _=0,E=0;for(let{fillStyle:C,fontStyle:x,underlineStyle:S,strikeStyle:z,offset:B,text:I}of c){E!==B&&(_=0),E=B,a.fillStyle=C,a.textRendering="optimizeLegibility",a.font=`${x} ${i}px mojangles`;let W=g[B]??a.measureText(I).width,O=(e.width-W)/2+_;a.fillText(I,O,B),z&&(a.lineWidth=i/8,a.strokeStyle=C,a.beginPath(),a.moveTo(O,B-a.lineWidth*2.5),a.lineTo(O+a.measureText(I).width,B-a.lineWidth*2.5),a.stroke()),S&&(a.lineWidth=i/8,a.strokeStyle=C,a.beginPath(),a.moveTo(O,B+a.lineWidth),a.lineTo(O+a.measureText(I).width,B+a.lineWidth),a.stroke()),_+=a.measureText(I).width}return o};R();k();M();T();function E5(r){let t=Math.floor(r.x/16),e=Math.floor(r.z/16);return[t,e]}function x1(r){let t=Math.floor(r.x/16),e=Math.floor(r.y/16),i=Math.floor(r.z/16);return[t,e,i]}R();k();M();T();import{Vec3 as Ft}from"vec3";import{subscribeKey as U1}from"valtio/utils";import{proxy as Fs,subscribe as Us}from"valtio";R();k();M();T();var Le={blocks:"blocksArray",blockCollisionShapes:"blockCollisionShapes",biomes:"biomesArray"};R();k();M();T();var Dt=!1,Fi=16;var Ui=(r,t)=>t?`${r}:${t}`:String(r);R();k();M();T();R();k();M();T();var T1=Me(Gi(),1);import*as k5 from"three";R();k();M();T();R();k();M();T();var x5=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,v=0;this.context&&(o=Math.min(o,t),v=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(v.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 Wi=class R5{constructor({logsPerSecond:t=20,samplesLog:e=100,samplesGraph:i=10,precision:n=2,minimal:s=!1,horizontal:o=!0,mode:v=0}={}){this.mode=v,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 R5.Panel("FPS","#0ff","#002"),0),this.msPanel=this.addPanel(new R5.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",a=>{a.preventDefault(),this.showPanel(++this.mode%this.container.children.length)},!1),this.mode=v,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 R5.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 v=0;v<e.logs.length;v++)i+=e.logs[v],e.logs[v]>n&&(n=e.logs[v]);let s=0,o=.01;for(let v=0;v<e.graph.length;v++)s+=e.graph[v],e.graph[v]>o&&(o=e.graph[v]);t&&t.update(i/Math.min(e.logs.length,this.samplesLog),s/Math.min(e.graph.length,this.samplesGraph),n,o,this.precision)}}};Wi.Panel=x5;var Vi=Wi;var _0=typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope,M1=class{constructor(t,e=0){this.canvas=t;h(this,"stats");h(this,"stats2");h(this,"statsGl");h(this,"total",0);h(this,"denseMode");this.stats=new T1.default,this.stats2=new T1.default,this.statsGl=new Vi({minimal:!0}),this.stats2.showPanel(2),this.denseMode=typeof L<"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()}},De=class{constructor(t,e,i){this.initOptions=t;this.externalCanvas=e;h(this,"canvas");h(this,"renderer");h(this,"animationFrameId");h(this,"timeoutId");h(this,"lastRenderTime",0);h(this,"previousCanvasWidth",0);h(this,"previousCanvasHeight",0);h(this,"currentWidth",0);h(this,"currentHeight",0);h(this,"pendingResize",!1);h(this,"renderedFps",0);h(this,"fpsInterval");h(this,"stats");h(this,"paused",!1);h(this,"disconnected",!1);h(this,"preRender",()=>{});h(this,"render",t=>{});h(this,"postRender",()=>{});h(this,"sizeChanged",()=>{});h(this,"droppedFpsPercentage",0);h(this,"config");h(this,"onRender",[]);h(this,"inWorldRenderingConfig");h(this,"nonReactiveState");this.config=t.config,e?this.canvas=e:this.addToPage();try{this.renderer=new k5.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=k5.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 M1(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=Ni(),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(),Li(),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 Ni(){let r=document.createElement("canvas");return r.id="viewer-canvas",document.body.appendChild(r),r}var S1=()=>{let r=Ni(),t=r.transferControlToOffscreen(),e=!1,i=(o,v)=>{},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 ji=0,dt={},C1=40,ie=(r,t=80,e=ji,i=C1)=>{if(_0)return{updateText(){},setVisibility(){}};let n=document.createElement("div");return n.style.position="fixed",n.style.top=`${i??C1}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),dt[r]=n,i===void 0&&e===ji&&(C1+=20),{updateText(s){n.innerText!==s&&(n.innerText=s)},setVisibility(s){n.style.display=s?"block":"none"}}};var P1=(r,t)=>{_0||!dt[r]||(dt[r].innerText=t)},Qi=r=>{if(!_0)for(let t in dt)dt[t].style.display=r?"block":"none"},Yi=()=>{if(!_0)for(let r in dt)Ss(r)},Ss=r=>{_0||!dt[r]||(dt[r].remove(),delete dt[r])};R();k();M();T();R();k();M();T();R();k();M();T();R();k();M();T();function B1(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let v=0;v<n;v++){let a=(o+v*i)*4;if(s.data[a+3]!==255)return!0}return!1}function T5(r){return r/64}function Ki(r,t,e){if(e){if(B1(r,0,0,t,t))return}else if(B1(r,0,0,t,t/2))return;let i=T5(t),n=(s,o,v,a)=>r.clearRect(s*i,o*i,v*i,a*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 Cs(r,t){r.save(),r.scale(-1,1);let e=T5(t),i=(n,s,o,v,a,l)=>r.drawImage(r.canvas,n*e,s*e,o*e,v*e,-a*e,l*e,-o*e,v*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 I1(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),Cs(i,n),Ki(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),Ki(i,r.width,!0)}function Ps(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 z1(r,t){let e=Ps(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 Bs(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let v=0;v<n;v++){let a=(o+v*i)*4;if(!(s.data[a+0]===0&&s.data[a+1]===0&&s.data[a+2]===0&&s.data[a+3]===255))return!1}return!0}function Is(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let v=0;v<n;v++){let a=(o+v*i)*4;if(!(s.data[a+0]===255&&s.data[a+1]===255&&s.data[a+2]===255&&s.data[a+3]===255))return!1}return!0}function H1(r){let t=T5(r.width),e=r.getContext("2d",{willReadFrequently:!0}),i=(v,a,l,c)=>B1(e,v*t,a*t,l*t,c*t),n=(v,a,l,c)=>Bs(e,v*t,a*t,l*t,c*t),s=(v,a,l,c)=>Is(e,v*t,a*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 O1(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=T5(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)}R();k();M();T();import zs from"mc-assets/dist/other-textures/latest/entity/player/wide/steve.png";R();k();M();T();import*as ut from"three";var N0=(r,t=!1)=>{r instanceof ut.Mesh&&(r.geometry?.dispose?.(),r.material?.dispose?.()),r.children&&r.children.forEach(e=>N0(e,t)),t&&r instanceof ut.Mesh&&r.material?.map?.dispose?.()},L1={},Ji={},M5=r=>{let t=new ut.Texture,e=A5(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}},bt=async r=>M5(r).texture,D1=r=>{let t=B0(r.width,r.height);t.getContext("2d").drawImage(r,0,0);let i=new ut.Texture(t);return i.magFilter=ut.NearestFilter,i.minFilter=ut.NearestFilter,i};async function S5(r,t,e){if(!L1[r]){let{promise:n,resolve:s}=Promise.withResolvers(),o=M5(r);L1[r]=o.texture,o.promise.then(s),Ji[r]=n}t(L1[r]),Ji[r].then(()=>{e?.()})}var rt=zs,yd=bt(rt),qi={apiEnabled:!0},Zi=r=>{Object.assign(qi,r)};async function ne(r,t){if(!qi.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 Fe(r){r.startsWith("data:")||(r=await Hs(r.replace("http://","https://")));let t=await A5(r),e=B0(64,64);return I1(e,t),{canvas:e,image:t}}var Hs=async r=>{let e=await(await fetch(r,{})).arrayBuffer();return`data:image/png;base64,${F.from(e).toString("base64")}`};R();k();M();T();var Os=r=>{let t=r%24e3/24e3-.25;return t<0&&(t+=1),t>1&&(t-=1),t+(1-Math.cos(t*Math.PI))/2},Ls=r=>{let t=(r%24e3+24e3)%24e3,e=Os(t),n=Math.cos(e*Math.PI*2)*.5+.5,s=Math.round(4+n*11);return Math.max(4,Math.min(15,s))},F1=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)}}},Ds=()=>{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=Ls(t),n=F1(t)}};typeof window<"u"&&(window.debugSkyLight=Ds);function Gs(r,t){return(r%t+t)%t}var Ut=class Ut{constructor(t,e,i){this.resourcesManager=t;this.displayOptions=e;this.initOptions=i;h(this,"worldReadyResolvers",Promise.withResolvers());h(this,"worldReadyPromise",this.worldReadyResolvers.promise);h(this,"timeOfTheDay",0);h(this,"worldSizeParams",{minY:0,worldHeight:256});h(this,"reactiveDebugParams",Fs({stopRendering:!1,chunksRenderAboveOverride:void 0,chunksRenderAboveEnabled:!1,chunksRenderBelowOverride:void 0,chunksRenderBelowEnabled:!1,chunksRenderDistanceOverride:void 0,chunksRenderDistanceEnabled:!1,disableEntities:!1}));h(this,"active",!1);h(this,"loadedChunks",{});h(this,"finishedChunks",{});h(this,"finishedSections",{});h(this,"sectionsWaiting",new Map);h(this,"queuedChunks",new Set);h(this,"queuedFunctions",[]);h(this,"renderUpdateEmitter",new It);h(this,"customTexturesDataUrl");h(this,"workers",[]);h(this,"viewerChunkPosition");h(this,"lastCamUpdate",0);h(this,"droppedFpsPercentage",0);h(this,"initialChunkLoadWasStartedIn");h(this,"initialChunksLoad",!0);h(this,"enableChunksLoadDelay",!1);h(this,"texturesVersion");h(this,"viewDistance",-1);h(this,"chunksLength",0);h(this,"allChunksFinished",!1);h(this,"messageQueue",[]);h(this,"isProcessingQueue",!1);h(this,"ONMESSAGE_TIME_LIMIT",30);h(this,"handleResize",()=>{});h(this,"highestBlocksByChunks",new Map);h(this,"blockEntities",{});h(this,"workersProcessAverageTime",0);h(this,"workersProcessAverageTimeCount",0);h(this,"maxWorkersProcessTime",0);h(this,"geometryReceiveCount",{});h(this,"allLoadedIn");h(this,"onWorldSwitched",[]);h(this,"renderTimeMax",0);h(this,"renderTimeAvg",0);h(this,"renderTimeAvgCount",0);h(this,"edgeChunks",{});h(this,"lastAddChunk",null);h(this,"neighborChunkUpdates",!0);h(this,"lastChunkDistance",0);h(this,"debugStopGeometryUpdate",!1);h(this,"protocolCustomBlocks",new Map);h(this,"heightmapDebounceTimers",new Map);h(this,"sectionDirtyCount",new Map);h(this,"sectionDirtyTimers",new Map);h(this,"sectionDirtyPendingArgs",new Map);h(this,"blockStateModelInfo",new Map);h(this,"worldBlockProvider");h(this,"soundSystem");h(this,"worldRendererConfig");h(this,"playerStateReactive");h(this,"playerStateUtils");h(this,"reactiveState");h(this,"mesherLogReader");h(this,"forceCallFromMesherReplayer",!1);h(this,"stopMesherMessagesProcessing",!1);h(this,"abortController",new AbortController);h(this,"lastRendered",0);h(this,"renderingActive",!0);h(this,"geometryReceiveCountPerSec",0);h(this,"mesherLogger",{contents:[],active:new URL(location.href).searchParams.get("mesherlog")==="true"});h(this,"currentRenderedFrames",0);h(this,"fpsAverage",0);h(this,"lastFps",0);h(this,"fpsWorst");h(this,"fpsSamples",0);h(this,"backendInfoReport","-");h(this,"chunksFullInfo","-");h(this,"workerCustomHandleTime",0);h(this,"queueAwaited",!1);h(this,"toWorkerMessagesQueue",{});this.snapshotInitialValues(),this.worldRendererConfig=e.inWorldRenderingConfig,this.playerStateReactive=e.playerStateReactive,this.playerStateUtils=_i(this.playerStateReactive),this.reactiveState=e.rendererState,this.renderUpdateEmitter.on("update",()=>{let o=Object.keys(this.finishedChunks).length;P1("loaded-chunks",`${o}/${this.chunksLength} chunks (${this.lastChunkDistance}/${this.viewDistance})`)}),ie("downloaded-chunks",100,140,20),this.connect(this.displayOptions.worldView);let n=setInterval(()=>{this.geometryReceiveCountPerSec=Object.values(this.geometryReceiveCount).reduce((o,v)=>o+v,0),this.geometryReceiveCount={},Qi(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 Ft(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=Ui(e,s),v=this.blockStateModelInfo.get(o);return{customBlockName:s,modelInfo:v}}initWorkers(t=this.worldRendererConfig.mesherWorkers){for(let e=0;e<t+0;e++){let i=Ws(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){i&&e(this.playerStateReactive[t]),U1(this.playerStateReactive,t,e)}onReactiveConfigUpdated(t,e){e(this.worldRendererConfig[t]),t==="*"?Us(this.worldRendererConfig,e):U1(this.worldRendererConfig,t,e)}onReactiveDebugUpdated(t,e){e(this.reactiveDebugParams[t]),U1(this.reactiveDebugParams,t,e)}watchReactivePlayerState(){this.onReactivePlayerStateUpdated("backgroundColor",t=>{this.changeBackgroundColor(t)})}watchReactiveConfig(){this.onReactiveConfigUpdated("fetchPlayerSkins",t=>{Zi({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 Ft(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 v=!0,a=this.getSectionHeight();if(Dt){let l=this.worldMinYRender;this.finishedSections[`${s[0]},${l},${s[2]}`]||(v=!1)}else for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=a)if(!this.finishedSections[`${s[0]},${l},${s[2]}`]){v=!1;break}if(v){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()}}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))}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[e,i]of Object.entries(this.loadedChunks))i&&this.updatePosDataChunk?.(e)}sendWorkers(t){for(let e of this.workers)e.postMessage(t)}getDistance(t){let[e,i]=E5(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:F1(t);return{version:this.version,enableLighting:this.worldRendererConfig.enableLighting,skyLight:e,smoothLighting:this.worldRendererConfig.smoothLighting,outputFormat:this.outputFormat,debugModelVariant:this.worldRendererConfig.debugModelVariant,clipWorldBelowY:this.worldRendererConfig.clipWorldBelowY,disableBlockEntityTextures:!this.worldRendererConfig.extraBlockRenderers,worldMinY:this.worldMinYRender,worldMaxY:this.worldMinYRender+this.worldSizeParams.worldHeight}}sendMesherMcData(){let t=this.resourcesManager.currentResources.mcData;G1(this.workers,this.version,Le,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 Dt?this.worldSizeParams.worldHeight:Fi}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,P1("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.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 v=this.getSectionHeight(),a=16;if(Dt){let l=new Ft(t,this.worldMinYRender,e);this.setSectionDirty(l),this.neighborChunkUpdates&&(!n||this.worldRendererConfig.smoothLighting)&&(this.setSectionDirty(l.offset(-a,0,0)),this.setSectionDirty(l.offset(a,0,0)),this.setSectionDirty(l.offset(0,0,-a)),this.setSectionDirty(l.offset(0,0,a)))}else for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=v){let c=new Ft(t,l,e);this.setSectionDirty(c),this.neighborChunkUpdates&&(!n||this.worldRendererConfig.smoothLighting)&&(this.setSectionDirty(c.offset(-a,0,0)),this.setSectionDirty(c.offset(a,0,0)),this.setSectionDirty(c.offset(0,0,-a)),this.setSectionDirty(c.offset(0,0,a)))}}markAsLoaded(t,e){this.loadedChunks[`${t},${e}`]=!0,this.finishedChunks[`${t},${e}`]=!0,this.logWorkerWork(`-> markAsLoaded ${JSON.stringify({x:t,z: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,v]of this.sectionDirtyTimers)o.startsWith(`${t},`)&&o.endsWith(`,${e}`)&&(clearTimeout(v),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();if(Dt){let o=this.worldMinYRender;this.setSectionDirty(new Ft(t,o,e),!1),delete this.finishedSections[`${t},${o},${e}`]}else for(let o=this.worldSizeParams.minY;o<this.worldSizeParams.worldHeight;o+=s)this.setSectionDirty(new Ft(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,v=Math.floor(t.z/16)*16;this.queuedChunks.has(`${o},${v}`)&&await new Promise(a=>{this.queuedFunctions.push(()=>{a()})}),this.loadedChunks[`${o},${v}`],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:v,isLightUpdate:a})=>{this.worldSizeParams=v,this.queuedChunks.add(`${n},${s}`);let l=[n,s,o,a];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 Ft(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:Pe(n).length,this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength}),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}`,v=this.protocolCustomBlocks.get(s)||{};for(let a of this.workers)a.postMessage({type:"blockUpdate",pos:t,stateId:e,customBlockModels:v});if(this.anyModuleRequiresHeightmap()){let a=Math.floor(t.x/16)*16,l=Math.floor(t.z/16)*16,c=`${a},${l}`,d=this.heightmapDebounceTimers.get(c);d&&clearTimeout(d),this.heightmapDebounceTimers.set(c,setTimeout(()=>{this.heightmapDebounceTimers.delete(c),this.workers[0]?.postMessage({type:"getHeightmap",x:a,z:l})},100))}if(this.logWorkerWork(`-> blockUpdate ${JSON.stringify({pos:t,stateId:e,customBlockModels:v})}`),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(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 Gs(Math.floor(t.x/16)+Math.floor(t.y/n)+Math.floor(t.z/16),this.workers.length)+0}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(),v=`${Math.floor(t.x/s)*s},${Math.floor(t.y/o)*o},${Math.floor(t.z/s)*s}`,a=(this.sectionDirtyCount.get(v)??0)+1;this.sectionDirtyCount.set(v,a),a<=Ut.GEOMETRY_THROTTLE_THRESHOLD?(this._dispatchDirtyImmediate(t,e,i),this.sectionDirtyTimers.has(v)||this.sectionDirtyTimers.set(v,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(v);this.sectionDirtyCount.delete(v),this.sectionDirtyTimers.delete(v),this.sectionDirtyPendingArgs.delete(v),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},Ut.GEOMETRY_THROTTLE_DELAY))):(this.sectionDirtyPendingArgs.set(v,{pos:t,value:e,useChangeWorker:i}),this.sectionDirtyTimers.has(v)||this.sectionDirtyTimers.set(v,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(v);this.sectionDirtyCount.delete(v),this.sectionDirtyTimers.delete(v),this.sectionDirtyPendingArgs.delete(v),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},Ut.GEOMETRY_THROTTLE_DELAY)))}_dispatchDirtyImmediate(t,e,i){var a;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 v=this.getWorkerNumber(t,i&&this.mesherLogger.active);this.sectionsWaiting.set(o,(this.sectionsWaiting.get(o)??0)+1),this.forceCallFromMesherReplayer?this.workers[v].postMessage({type:"dirty",x:t.x,y:t.y,z:t.z,value:e,config:this.getMesherConfig()}):((a=this.toWorkerMessagesQueue)[v]??(a[v]=[]),this.toWorkerMessagesQueue[v].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){this.workers[Number(t)].postMessage(this.toWorkerMessagesQueue[t]);for(let i of this.toWorkerMessagesQueue[t])this.logWorkerWork(`-> ${t} dispatchMessages ${i.type} ${JSON.stringify({x:i.x,y:i.y,z:i.z,value:i.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(),Yi()}};h(Ut,"GEOMETRY_THROTTLE_THRESHOLD",1),h(Ut,"GEOMETRY_THROTTLE_DELAY",100);var C5=Ut,Ws=(r,t="mesher.js")=>{let e;if(L.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},G1=(r,t,e=Le,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})};R();k();M();T();import{Vec3 as Vs}from"vec3";import*as j0 from"three";R();k();M();T();function P5(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,v=(s+2)%3,a=[[0,0,0],[0,0,0],[0,0,0]];return a[s][s]=1,a[o][o]=i,a[o][v]=-n,a[v][o]=+n,a[v][v]=i,a}function W1(r,t){return t?[r[0]+t[0],r[1]+t[1],r[2]+t[2]]:r}function V1(r,t){return t?[r[0]-t[0],r[1]-t[1],r[2]-t[2]]:r}function re(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 Xi(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],v=r[1][1],a=r[2][1],l=r[0][2],c=r[1][2],d=r[2][2],m=t[0][0],p=t[1][0],g=t[2][0],y=t[0][1],w=t[1][1],_=t[2][1],E=t[0][2],C=t[1][2],x=t[2][2];return e[0][0]=i*m+n*y+s*E,e[1][0]=i*p+n*w+s*C,e[2][0]=i*g+n*_+s*x,e[0][1]=o*m+v*y+a*E,e[1][1]=o*p+v*w+a*C,e[2][1]=o*g+v*_+a*x,e[0][2]=l*m+c*y+d*E,e[1][2]=l*p+c*w+d*C,e[2][2]=l*g+c*_+d*x,e}var N1={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 Ns(r,t,e,i,n,s,o,v){let a=new Vs(0,0,0);for(let l in r.faces){let c=r.faces[l],{corners:d,mask1:m,mask2:p}=N1[l],g=re(i,N1[l].dir);if(c.cullface&&v[l])continue;let y=r.from[0],w=r.from[1],_=r.from[2],E=r.to[0],C=r.to[1],x=r.to[2],S=c.texture,{u:z}=S,{v:B}=S,{su:I}=S,{sv:W}=S,O=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,i0=Math.cos(q*Math.PI/180),N=-Math.sin(q*Math.PI/180),Z=null,J=null;r.rotation&&(Z=P5(r.rotation.axis,r.rotation.angle),J=V1(r.rotation.origin,re(Z,r.rotation.origin)));let s0=[],o0=1;for(let f0 of d){let $=[f0[0]?E:y,f0[1]?C:w,f0[2]?x:_];$=W1(re(Z,$),J),$=W1(re(i,$),n),$=$.map(Q0=>Q0/16),e.positions.push($[0],$[1],$[2]),e.normals.push(...g);let g0=(f0[3]-.5)*i0-(f0[4]-.5)*N+.5,ot=(f0[3]-.5)*N+(f0[4]-.5)*i0+.5;e.uvs.push(g0*I+z,ot*W+B);let W0=1;t&&(W0=4/4*(15/15),s0.push(3)),e.colors.push(o0*j[0]*W0,o0*j[1]*W0,o0*j[2]*W0)}t&&s0[0]+s0[3]>=s0[1]+s0[2]?e.indices.push(O,O+3,O+2,O,O+1,O+3):e.indices.push(O,O+1,O+2,O+2,O+1,O+3)}}var js=(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,m]of r.entries()){let p=m[n[d]]??m[0];if(!p)continue;let g=null,y=null;for(let _ of["x","y","z"])_ in p&&(g?g=Xi(g,P5(_,-(p[_]??0))):g=P5(_,-(p[_]??0)));g&&(y=[8,8,8],y=V1(y,re(g,y)));let w=p.ao??!0;for(let _ of p.elements??[])Ns(_,w,l,g,y,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},Qs=(...r)=>{let e={geometry:js(...r)},i=new j0.BufferGeometry;return i.setAttribute("position",new j0.BufferAttribute(e.geometry.positions,3)),i.setAttribute("normal",new j0.BufferAttribute(e.geometry.normals,3)),i.setAttribute("color",new j0.BufferAttribute(e.geometry.colors,3)),i.setAttribute("uv",new j0.BufferAttribute(e.geometry.uvs,2)),i.setIndex(e.geometry.indices),i.name="block-geometry",i},$i=(r,...t)=>{let e=Qs(...t),i=new j0.Mesh(e,r);i.position.set(-.5,-.5,-.5);let n=new j0.Group;return n.add(i),n.rotation.set(0,-j0.MathUtils.degToRad(90),0,"ZYX"),globalThis.mesh=n,n},tn=(r,t)=>{r.position.set(t.x+.5,t.y+.5,t.z+.5)};R();k();M();T();import*as T0 from"three";R();k();M();T();import x2 from"prismarine-nbt";import*as V from"three";R();k();M();T();R();k();M();T();import{BoxGeometry as I0,DoubleSide as q1,FrontSide as nn,Group as Z0,Mesh as S0,MeshStandardMaterial as Ue,Vector2 as B5}from"three";function Z1(r,t,e,i,n,s,o,v){let a=(B,I,W,O)=>[new B5(B/o,1-O/v),new B5(W/o,1-O/v),new B5(W/o,1-I/v),new B5(B/o,1-I/v)],l=a(t+s,e,t+i+s,e+s),c=a(t+i+s,e,t+i*2+s,e+s),d=a(t,e+s,t+s,e+s+n),m=a(t+s,e+s,t+i+s,e+s+n),p=a(t+i+s,e+s,t+i+s*2,e+n+s),g=a(t+i+s*2,e+s,t+i*2+s*2,e+n+s),y=r.attributes.uv,w=[p[3],p[2],p[0],p[1]],_=[d[3],d[2],d[0],d[1]],E=[l[3],l[2],l[0],l[1]],C=[c[0],c[1],c[3],c[2]],x=[m[3],m[2],m[0],m[1]],S=[g[3],g[2],g[0],g[1]],z=[];for(let B of[w,_,E,C,x,S])for(let I of B)z.push(I.x,I.y);y.set(new Float32Array(z)),y.needsUpdate=!0}function q0(r,t,e,i,n,s){Z1(r,t,e,i,n,s,64,64)}function j1(r,t,e,i,n,s){Z1(r,t,e,i,n,s,64,32)}var ft=class extends Z0{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"}},Q1=class extends Z0{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 Ue({side:nn}),this.layer2Material=new Ue({side:q1,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 I0(8,8,8);q0(t,0,0,8,8,8);let e=new S0(t,this.layer1Material),i=new I0(9,9,9);q0(i,32,0,8,8,8);let n=new S0(i,this.layer2Material);this.head=new ft(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 I0(8,12,4);q0(s,16,16,8,12,4);let o=new S0(s,this.layer1Material),v=new I0(8.5,12.5,4.5);q0(v,16,32,8,12,4);let a=new S0(v,this.layer2Material);this.body=new ft(o,a),this.body.name="body",this.body.add(o,a),this.body.position.y=-6,this.add(this.body);let l=new I0,c=new S0(l,this.layer1MaterialBiased);this.modelListeners.push(()=>{c.scale.x=this.slim?3:4,c.scale.y=12,c.scale.z=4,q0(l,40,16,this.slim?3:4,12,4)});let d=new I0,m=new S0(d,this.layer2MaterialBiased);this.modelListeners.push(()=>{m.scale.x=this.slim?3.5:4.5,m.scale.y=12.5,m.scale.z=4.5,q0(d,40,32,this.slim?3:4,12,4)});let p=new Z0;p.add(c,m),this.modelListeners.push(()=>{p.position.x=this.slim?-.5:-1}),p.position.y=-4,this.rightArm=new ft(c,m),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 I0,y=new S0(g,this.layer1MaterialBiased);this.modelListeners.push(()=>{y.scale.x=this.slim?3:4,y.scale.y=12,y.scale.z=4,q0(g,32,48,this.slim?3:4,12,4)});let w=new I0,_=new S0(w,this.layer2MaterialBiased);this.modelListeners.push(()=>{_.scale.x=this.slim?3.5:4.5,_.scale.y=12.5,_.scale.z=4.5,q0(w,48,48,this.slim?3:4,12,4)});let E=new Z0;E.add(y,_),this.modelListeners.push(()=>{E.position.x=this.slim?.5:1}),E.position.y=-4,this.leftArm=new ft(y,_),this.leftArm.name="leftArm",this.leftArm.add(E),this.leftArm.position.x=5,this.leftArm.position.y=-2,this.add(this.leftArm);let C=new I0(4,12,4);q0(C,0,16,4,12,4);let x=new S0(C,this.layer1MaterialBiased),S=new I0(4.5,12.5,4.5);q0(S,0,32,4,12,4);let z=new S0(S,this.layer2MaterialBiased),B=new Z0;B.add(x,z),B.position.y=-6,this.rightLeg=new ft(x,z),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 I0(4,12,4);q0(I,16,48,4,12,4);let W=new S0(I,this.layer1MaterialBiased),O=new I0(4.5,12.5,4.5);q0(O,0,48,4,12,4);let j=new S0(O,this.layer2MaterialBiased),q=new Z0;q.add(W,j),q.position.y=-6,this.leftLeg=new ft(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 ft)}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}},Y1=class extends Z0{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 Ue({side:q1,transparent:!0,alphaTest:1e-5});let t=new I0(10,16,1);j1(t,0,0,10,16,1),this.cape=new S0(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}},K1=class extends Z0{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 Ue({side:q1,transparent:!0,alphaTest:1e-5});let t=new I0(12,22,4);j1(t,22,0,10,20,2);let e=new S0(t,this.material);e.position.x=-5,e.position.y=-10,e.position.z=-1,this.leftWing=new Z0,this.leftWing.add(e),this.add(this.leftWing);let i=new I0(12,22,4);j1(i,22,0,10,20,2);let n=new S0(i,this.material);n.scale.x=-1,n.position.x=5,n.position.y=-10,n.position.z=-1,this.rightWing=new Z0,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}},J1=class extends Z0{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 Ue({side:nn});let t=new I0(8,8,4/3);Z1(t,0,0,6,6,1,14,7),this.rightEar=new S0(t,this.material),this.rightEar.name="rightEar",this.rightEar.position.x=-6,this.add(this.rightEar),this.leftEar=new S0(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}},en=10.8*Math.PI/180,Ge=class extends Z0{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 Q1,this.skin.name="skin",this.skin.position.y=8,this.add(this.skin),this.cape=new Y1,this.cape.name="cape",this.cape.position.y=8,this.cape.position.z=-2,this.cape.rotation.x=en,this.cape.rotation.y=Math.PI,this.add(this.cape),this.elytra=new K1,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 J1,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=en,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()}};R();k();M();T();import{Color as Nu,PointLight as ju,EquirectangularReflectionMapping as Qu,Group as Yu,NearestFilter as Ku,PerspectiveCamera as Ju,Scene as qu,Texture as Zu,Vector2 as Xu,WebGLRenderer as $u,AmbientLight as tf,CanvasTexture as ef,WebGLRenderTarget as nf,FloatType as rf,DepthTexture as sf,Clock as of,Object3D as af,ColorManagement as vf}from"three";import{OrbitControls as cf}from"three/examples/jsm/controls/OrbitControls.js";import{EffectComposer as uf}from"three/examples/jsm/postprocessing/EffectComposer.js";import"three/examples/jsm/postprocessing/Pass.js";import{RenderPass as pf}from"three/examples/jsm/postprocessing/RenderPass.js";import{ShaderPass as bf}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as _f}from"three/examples/jsm/shaders/FXAAShader.js";R();k();M();T();var I5=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))}};R();k();M();T();import{CanvasTexture as Su,NearestFilter as Cu,Sprite as Pu,SpriteMaterial as Bu}from"three";R();k();M();T();var Ys=Object.defineProperty,Ks=(r,t,e)=>t in r?Ys(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,d0=(r,t,e)=>(Ks(r,typeof t!="symbol"?t+"":t,e),e);function X1(r){let t=[r];if(r.extra&&r.extra.length!==0)for(let e of r.extra)t.push(...X1(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}`}},u0=X;d0(u0,"CONTROL_STRING","\xA7");d0(u0,"BLACK",new X("color","black","BLACK","0",{color:"#000000"},{color:"#000000"}));d0(u0,"DARK_BLUE",new X("color","dark_blue","DARK_BLUE","1",{color:"#0000AA"},{color:"#00002A"}));d0(u0,"DARK_GREEN",new X("color","dark_green","DARK_GREEN","2",{color:"#00AA00"},{color:"#002A00"}));d0(u0,"DARK_AQUA",new X("color","dark_aqua","DARK_AQUA","3",{color:"#00AAAA"},{color:"#002A2A"}));d0(u0,"DARK_RED",new X("color","dark_red","DARK_RED","4",{color:"#AA0000"},{color:"#2A0000"}));d0(u0,"DARK_PURPLE",new X("color","dark_purple","DARK_PURPLE","5",{color:"#AA00AA"},{color:"#2A002A"}));d0(u0,"GOLD",new X("color","gold","GOLD","6",{color:"#FFAA00"},{color:"#2A2A00"}));d0(u0,"GRAY",new X("color","gray","GRAY","7",{color:"#AAAAAA"},{color:"#2A2A2A"}));d0(u0,"DARK_GRAY",new X("color","dark_gray","DARK_GRAY","8",{color:"#555555"},{color:"#151515"}));d0(u0,"BLUE",new X("color","blue","BLUE","9",{color:"#5555FF"},{color:"#15153F"}));d0(u0,"GREEN",new X("color","green","GREEN","a",{color:"#55FF55"},{color:"#153F15"}));d0(u0,"AQUA",new X("color","aqua","AQUA","b",{color:"#55FFFF"},{color:"#153F3F"}));d0(u0,"RED",new X("color","red","RED","c",{color:"#FF5555"},{color:"#3F1515"}));d0(u0,"LIGHT_PURPLE",new X("color","light_purple","LIGHT_PURPLE","d",{color:"#FF55FF"},{color:"#3F153F"}));d0(u0,"YELLOW",new X("color","yellow","YELLOW","e",{color:"#FFFF55"},{color:"#3F3F15"}));d0(u0,"WHITE",new X("color","white","WHITE","f",{color:"#FFFFFF"},{color:"#3F3F3F"}));d0(u0,"OBFUSCATED",new X("obfuscated",!0,"OBFUSCATED","k",{}));d0(u0,"BOLD",new X("bold",!0,"BOLD","l",{"font-weight":"bold"}));d0(u0,"STRIKETHROUGH",new X("strikethrough",!0,"STRIKETHROUGH","m",{"text-decoration":"line-through"}));d0(u0,"UNDERLINE",new X("underlined",!0,"UNDERLINE","n",{"text-decoration":"underline"}));d0(u0,"ITALIC",new X("italic",!0,"ITALIC","o",{"font-style":"italic"}));d0(u0,"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`}});d0(u0,"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 Xe=Me($1(),1);n2();var Qr=Me(Mn(),1);import Ta from"prismarine-chat";R();k();M();T();import*as v0 from"three";import Vo from"prismarine-item";R();k();M();T();R();k();M();T();var yt=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)}},r2=class extends yt{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 s2(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 zo={isPrimitive:!0,match:r=>typeof r=="string",fromHexString:s2,toHexString:s2},Ye={isPrimitive:!0,match:r=>typeof r=="number",fromHexString:r=>parseInt(r.substring(1),16),toHexString:r=>"#"+r.toString(16).padStart(6,0)},Ho={isPrimitive:!1,match:r=>Array.isArray(r),fromHexString(r,t,e=1){let i=Ye.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 Ye.toHexString(n)}},Oo={isPrimitive:!1,match:r=>Object(r)===r,fromHexString(r,t,e=1){let i=Ye.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 Ye.toHexString(n)}},Lo=[zo,Ye,Ho,Oo];function Do(r){return Lo.find(t=>t.match(r))}var o2=class extends yt{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=Do(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=s2(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}},Qe=class extends yt{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}},a2=class extends yt{constructor(t,e,i,n,s,o){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(s);let v=o!==void 0;this.step(v?o:this._getImplicitStep(),v),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 E=parseFloat(this.$input.value);isNaN(E)||(this._stepExplicit&&(E=this._snap(E)),this.setValue(this._clamp(E)))},i=E=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+E),this.$input.value=this.getValue())},n=E=>{E.key==="Enter"&&this.$input.blur(),E.code==="ArrowUp"&&(E.preventDefault(),i(this._step*this._arrowKeyMultiplier(E))),E.code==="ArrowDown"&&(E.preventDefault(),i(this._step*this._arrowKeyMultiplier(E)*-1))},s=E=>{this._inputFocused&&(E.preventDefault(),i(this._step*this._normalizeMouseWheel(E)))},o=!1,v,a,l,c,d,m=5,p=E=>{v=E.clientX,a=l=E.clientY,o=!0,c=this.getValue(),d=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",y)},g=E=>{if(o){let C=E.clientX-v,x=E.clientY-a;Math.abs(x)>m?(E.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>m&&y()}if(!o){let C=E.clientY-l;d-=C*this._step*this._arrowKeyMultiplier(E),c+d>this._max?d=this._max-c:c+d<this._min&&(d=this._min-c),this._snapClampSetValue(c+d)}l=E.clientY},y=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",y)},w=()=>{this._inputFocused=!0},_=()=>{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",w),this.$input.addEventListener("blur",_)}_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=(_,E,C,x,S)=>(_-E)/(C-E)*(S-x)+x,e=_=>{let E=this.$slider.getBoundingClientRect(),C=t(_,E.left,E.right,this._min,this._max);this._snapClampSetValue(C)},i=_=>{this._setDraggingStyle(!0),e(_.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",s)},n=_=>{e(_.clientX)},s=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",s)},o=!1,v,a,l=_=>{_.preventDefault(),this._setDraggingStyle(!0),e(_.touches[0].clientX),o=!1},c=_=>{_.touches.length>1||(this._hasScrollBar?(v=_.touches[0].clientX,a=_.touches[0].clientY,o=!0):l(_),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("touchend",m))},d=_=>{if(o){let E=_.touches[0].clientX-v,C=_.touches[0].clientY-a;Math.abs(E)>Math.abs(C)?l(_):(window.removeEventListener("touchmove",d),window.removeEventListener("touchend",m))}else _.preventDefault(),e(_.touches[0].clientX)},m=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",d),window.removeEventListener("touchend",m)},p=this._callOnFinishChange.bind(this),g=400,y,w=_=>{if(Math.abs(_.deltaX)<Math.abs(_.deltaY)&&this._hasScrollBar)return;_.preventDefault();let C=this._normalizeMouseWheel(_)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(y),y=setTimeout(p,g)};this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",w,{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}},v2=class extends yt{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}},l2=class extends yt{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}},Fo=`.lil-gui {
15
+ `))E(B,z),p+=i,m="";else S&&E(S,z);if(C.extra)for(let B of C.extra)y(B,z)},E=(C,x)=>{o||(o=C.trim()!==""),m+=C,g[p]=a.measureText(m).width;let S=x.color??n;S.startsWith("#")||(S=Is[S.toLowerCase()]||S),c.push({fontStyle:`${x.bold?"bold":""} ${x.italic?"italic":""}`,fillStyle:S,underlineStyle:x.underlined??!1,strikeStyle:x.strikethrough??!1,offset:p,text:C})};if(y(l),!d&&!l.toString().trim())return;let _=0,A=0;for(let{fillStyle:C,fontStyle:x,underlineStyle:S,strikeStyle:z,offset:B,text:I}of c){A!==B&&(_=0),A=B,a.fillStyle=C,a.textRendering="optimizeLegibility",a.font=`${x} ${i}px mojangles`;let W=g[B]??a.measureText(I).width,O=(e.width-W)/2+_;a.fillText(I,O,B),z&&(a.lineWidth=i/8,a.strokeStyle=C,a.beginPath(),a.moveTo(O,B-a.lineWidth*2.5),a.lineTo(O+a.measureText(I).width,B-a.lineWidth*2.5),a.stroke()),S&&(a.lineWidth=i/8,a.strokeStyle=C,a.beginPath(),a.moveTo(O,B+a.lineWidth),a.lineTo(O+a.measureText(I).width,B+a.lineWidth),a.stroke()),_+=a.measureText(I).width}return o};R();k();M();T();function E5(r){let t=Math.floor(r.x/16),e=Math.floor(r.z/16);return[t,e]}function R1(r){let t=Math.floor(r.x/16),e=Math.floor(r.y/16),i=Math.floor(r.z/16);return[t,e,i]}R();k();M();T();import{Vec3 as Ft}from"vec3";import{subscribeKey as G1}from"valtio/utils";import{proxy as Ns,subscribe as js}from"valtio";R();k();M();T();var Le={blocks:"blocksArray",blockCollisionShapes:"blockCollisionShapes",biomes:"biomesArray"};R();k();M();T();var Dt=!1,G3=16;var W3=(r,t)=>t?`${r}:${t}`:String(r);R();k();M();T();R();k();M();T();var M1=Me(V3(),1);import*as k5 from"three";R();k();M();T();R();k();M();T();var x5=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,v=0;this.context&&(o=Math.min(o,t),v=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(v.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 N3=class R5{constructor({logsPerSecond:t=20,samplesLog:e=100,samplesGraph:i=10,precision:n=2,minimal:s=!1,horizontal:o=!0,mode:v=0}={}){this.mode=v,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 R5.Panel("FPS","#0ff","#002"),0),this.msPanel=this.addPanel(new R5.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",a=>{a.preventDefault(),this.showPanel(++this.mode%this.container.children.length)},!1),this.mode=v,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 R5.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 v=0;v<e.logs.length;v++)i+=e.logs[v],e.logs[v]>n&&(n=e.logs[v]);let s=0,o=.01;for(let v=0;v<e.graph.length;v++)s+=e.graph[v],e.graph[v]>o&&(o=e.graph[v]);t&&t.update(i/Math.min(e.logs.length,this.samplesLog),s/Math.min(e.graph.length,this.samplesGraph),n,o,this.precision)}}};N3.Panel=x5;var j3=N3;var _0=typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope,S1=class{constructor(t,e=0){this.canvas=t;h(this,"stats");h(this,"stats2");h(this,"statsGl");h(this,"total",0);h(this,"denseMode");this.stats=new M1.default,this.stats2=new M1.default,this.statsGl=new j3({minimal:!0}),this.stats2.showPanel(2),this.denseMode=typeof L<"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()}},De=class{constructor(t,e,i){this.initOptions=t;this.externalCanvas=e;h(this,"canvas");h(this,"renderer");h(this,"animationFrameId");h(this,"timeoutId");h(this,"lastRenderTime",0);h(this,"previousCanvasWidth",0);h(this,"previousCanvasHeight",0);h(this,"currentWidth",0);h(this,"currentHeight",0);h(this,"pendingResize",!1);h(this,"renderedFps",0);h(this,"fpsInterval");h(this,"stats");h(this,"paused",!1);h(this,"disconnected",!1);h(this,"preRender",()=>{});h(this,"render",t=>{});h(this,"postRender",()=>{});h(this,"sizeChanged",()=>{});h(this,"droppedFpsPercentage",0);h(this,"config");h(this,"onRender",[]);h(this,"inWorldRenderingConfig");h(this,"nonReactiveState");this.config=t.config,e?this.canvas=e:this.addToPage();try{this.renderer=new k5.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=k5.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 S1(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=Q3(),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(),F3(),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 Q3(){let r=document.createElement("canvas");return r.id="viewer-canvas",document.body.appendChild(r),r}var C1=()=>{let r=Q3(),t=r.transferControlToOffscreen(),e=!1,i=(o,v)=>{},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 Y3=0,ct={},P1=40,ie=(r,t=80,e=Y3,i=P1)=>{if(_0)return{updateText(){},setVisibility(){}};let n=document.createElement("div");return n.style.position="fixed",n.style.top=`${i??P1}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),ct[r]=n,i===void 0&&e===Y3&&(P1+=20),{updateText(s){n.innerText!==s&&(n.innerText=s)},setVisibility(s){n.style.display=s?"block":"none"}}};var B1=(r,t)=>{_0||!ct[r]||(ct[r].innerText=t)},K3=r=>{if(!_0)for(let t in ct)ct[t].style.display=r?"block":"none"},J3=()=>{if(!_0)for(let r in ct)zs(r)},zs=r=>{_0||!ct[r]||(ct[r].remove(),delete ct[r])};R();k();M();T();R();k();M();T();R();k();M();T();R();k();M();T();function I1(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let v=0;v<n;v++){let a=(o+v*i)*4;if(s.data[a+3]!==255)return!0}return!1}function T5(r){return r/64}function q3(r,t,e){if(e){if(I1(r,0,0,t,t))return}else if(I1(r,0,0,t,t/2))return;let i=T5(t),n=(s,o,v,a)=>r.clearRect(s*i,o*i,v*i,a*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 Hs(r,t){r.save(),r.scale(-1,1);let e=T5(t),i=(n,s,o,v,a,l)=>r.drawImage(r.canvas,n*e,s*e,o*e,v*e,-a*e,l*e,-o*e,v*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 z1(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),Hs(i,n),q3(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),q3(i,r.width,!0)}function Os(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 H1(r,t){let e=Os(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 Ls(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let v=0;v<n;v++){let a=(o+v*i)*4;if(!(s.data[a+0]===0&&s.data[a+1]===0&&s.data[a+2]===0&&s.data[a+3]===255))return!1}return!0}function Ds(r,t,e,i,n){let s=r.getImageData(t,e,i,n);for(let o=0;o<i;o++)for(let v=0;v<n;v++){let a=(o+v*i)*4;if(!(s.data[a+0]===255&&s.data[a+1]===255&&s.data[a+2]===255&&s.data[a+3]===255))return!1}return!0}function O1(r){let t=T5(r.width),e=r.getContext("2d",{willReadFrequently:!0}),i=(v,a,l,c)=>I1(e,v*t,a*t,l*t,c*t),n=(v,a,l,c)=>Ls(e,v*t,a*t,l*t,c*t),s=(v,a,l,c)=>Ds(e,v*t,a*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 L1(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=T5(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)}R();k();M();T();import Fs from"mc-assets/dist/other-textures/latest/entity/player/wide/steve.png";R();k();M();T();import*as dt from"three";var ut=(r,t=!1)=>{r instanceof dt.Mesh&&(r.geometry?.dispose?.(),r.material?.dispose?.()),r.children&&r.children.forEach(e=>ut(e,t)),t&&r instanceof dt.Mesh&&r.material?.map?.dispose?.()},D1={},Z3={},M5=r=>{let t=new dt.Texture,e=A5(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}},bt=async r=>M5(r).texture,F1=r=>{let t=I0(r.width,r.height);t.getContext("2d").drawImage(r,0,0);let i=new dt.Texture(t);return i.magFilter=dt.NearestFilter,i.minFilter=dt.NearestFilter,i};async function S5(r,t,e){if(!D1[r]){let{promise:n,resolve:s}=Promise.withResolvers(),o=M5(r);D1[r]=o.texture,o.promise.then(s),Z3[r]=n}t(D1[r]),Z3[r].then(()=>{e?.()})}var nt=Fs,xd=bt(nt),X3={apiEnabled:!0},$3=r=>{Object.assign(X3,r)};async function ne(r,t){if(!X3.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 Fe(r){r.startsWith("data:")||(r=await Us(r.replace("http://","https://")));let t=await A5(r),e=I0(64,64);return z1(e,t),{canvas:e,image:t}}var Us=async r=>{let e=await(await fetch(r,{})).arrayBuffer();return`data:image/png;base64,${D.from(e).toString("base64")}`};R();k();M();T();var Gs=r=>{let t=r%24e3/24e3-.25;return t<0&&(t+=1),t>1&&(t-=1),t+(1-Math.cos(t*Math.PI))/2},Ws=r=>{let t=(r%24e3+24e3)%24e3,e=Gs(t),n=Math.cos(e*Math.PI*2)*.5+.5,s=Math.round(4+n*11);return Math.max(4,Math.min(15,s))},U1=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)}}},Vs=()=>{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=Ws(t),n=U1(t)}};typeof window<"u"&&(window.debugSkyLight=Vs);function Qs(r,t){return(r%t+t)%t}var Ut=class Ut{constructor(t,e,i){this.resourcesManager=t;this.displayOptions=e;this.initOptions=i;h(this,"worldReadyResolvers",Promise.withResolvers());h(this,"worldReadyPromise",this.worldReadyResolvers.promise);h(this,"timeOfTheDay",0);h(this,"worldSizeParams",{minY:0,worldHeight:256});h(this,"reactiveDebugParams",Ns({stopRendering:!1,chunksRenderAboveOverride:void 0,chunksRenderAboveEnabled:!1,chunksRenderBelowOverride:void 0,chunksRenderBelowEnabled:!1,chunksRenderDistanceOverride:void 0,chunksRenderDistanceEnabled:!1,disableEntities:!1}));h(this,"active",!1);h(this,"loadedChunks",{});h(this,"finishedChunks",{});h(this,"finishedSections",{});h(this,"sectionsWaiting",new Map);h(this,"queuedChunks",new Set);h(this,"queuedFunctions",[]);h(this,"renderUpdateEmitter",new It);h(this,"customTexturesDataUrl");h(this,"workers",[]);h(this,"viewerChunkPosition");h(this,"lastCamUpdate",0);h(this,"droppedFpsPercentage",0);h(this,"initialChunkLoadWasStartedIn");h(this,"initialChunksLoad",!0);h(this,"enableChunksLoadDelay",!1);h(this,"texturesVersion");h(this,"viewDistance",-1);h(this,"chunksLength",0);h(this,"allChunksFinished",!1);h(this,"messageQueue",[]);h(this,"isProcessingQueue",!1);h(this,"ONMESSAGE_TIME_LIMIT",30);h(this,"handleResize",()=>{});h(this,"highestBlocksByChunks",new Map);h(this,"blockEntities",{});h(this,"workersProcessAverageTime",0);h(this,"workersProcessAverageTimeCount",0);h(this,"maxWorkersProcessTime",0);h(this,"geometryReceiveCount",{});h(this,"allLoadedIn");h(this,"onWorldSwitched",[]);h(this,"renderTimeMax",0);h(this,"renderTimeAvg",0);h(this,"renderTimeAvgCount",0);h(this,"edgeChunks",{});h(this,"lastAddChunk",null);h(this,"neighborChunkUpdates",!0);h(this,"lastChunkDistance",0);h(this,"debugStopGeometryUpdate",!1);h(this,"protocolCustomBlocks",new Map);h(this,"heightmapDebounceTimers",new Map);h(this,"sectionDirtyCount",new Map);h(this,"sectionDirtyTimers",new Map);h(this,"sectionDirtyPendingArgs",new Map);h(this,"blockStateModelInfo",new Map);h(this,"worldBlockProvider");h(this,"soundSystem");h(this,"worldRendererConfig");h(this,"playerStateReactive");h(this,"playerStateUtils");h(this,"reactiveState");h(this,"mesherLogReader");h(this,"forceCallFromMesherReplayer",!1);h(this,"stopMesherMessagesProcessing",!1);h(this,"abortController",new AbortController);h(this,"lastRendered",0);h(this,"renderingActive",!0);h(this,"geometryReceiveCountPerSec",0);h(this,"mesherLogger",{contents:[],active:new URL(location.href).searchParams.get("mesherlog")==="true"});h(this,"currentRenderedFrames",0);h(this,"fpsAverage",0);h(this,"lastFps",0);h(this,"fpsWorst");h(this,"fpsSamples",0);h(this,"backendInfoReport","-");h(this,"chunksFullInfo","-");h(this,"workerCustomHandleTime",0);h(this,"queueAwaited",!1);h(this,"toWorkerMessagesQueue",{});this.snapshotInitialValues(),this.worldRendererConfig=e.inWorldRenderingConfig,this.playerStateReactive=e.playerStateReactive,this.playerStateUtils=A3(this.playerStateReactive),this.reactiveState=e.rendererState,this.renderUpdateEmitter.on("update",()=>{let o=Object.keys(this.finishedChunks).length;B1("loaded-chunks",`${o}/${this.chunksLength} chunks (${this.lastChunkDistance}/${this.viewDistance})`)}),ie("downloaded-chunks",100,140,20),this.connect(this.displayOptions.worldView);let n=setInterval(()=>{this.geometryReceiveCountPerSec=Object.values(this.geometryReceiveCount).reduce((o,v)=>o+v,0),this.geometryReceiveCount={},K3(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 Ft(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=W3(e,s),v=this.blockStateModelInfo.get(o);return{customBlockName:s,modelInfo:v}}initWorkers(t=this.worldRendererConfig.mesherWorkers){for(let e=0;e<t+0;e++){let i=Ys(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){i&&e(this.playerStateReactive[t]),G1(this.playerStateReactive,t,e)}onReactiveConfigUpdated(t,e){e(this.worldRendererConfig[t]),t==="*"?js(this.worldRendererConfig,e):G1(this.worldRendererConfig,t,e)}onReactiveDebugUpdated(t,e){e(this.reactiveDebugParams[t]),G1(this.reactiveDebugParams,t,e)}watchReactivePlayerState(){this.onReactivePlayerStateUpdated("backgroundColor",t=>{this.changeBackgroundColor(t)})}watchReactiveConfig(){this.onReactiveConfigUpdated("fetchPlayerSkins",t=>{$3({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 Ft(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 v=!0,a=this.getSectionHeight();if(Dt){let l=this.worldMinYRender;this.finishedSections[`${s[0]},${l},${s[2]}`]||(v=!1)}else for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=a)if(!this.finishedSections[`${s[0]},${l},${s[2]}`]){v=!1;break}if(v){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()}}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))}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[e,i]of Object.entries(this.loadedChunks))i&&this.updatePosDataChunk?.(e)}sendWorkers(t){for(let e of this.workers)e.postMessage(t)}getDistance(t){let[e,i]=E5(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:U1(t);return{version:this.version,enableLighting:this.worldRendererConfig.enableLighting,skyLight:e,smoothLighting:this.worldRendererConfig.smoothLighting,outputFormat:this.outputFormat,debugModelVariant:this.worldRendererConfig.debugModelVariant,clipWorldBelowY:this.worldRendererConfig.clipWorldBelowY,disableBlockEntityTextures:!this.worldRendererConfig.extraBlockRenderers,worldMinY:this.worldMinYRender,worldMaxY:this.worldMinYRender+this.worldSizeParams.worldHeight}}sendMesherMcData(){let t=this.resourcesManager.currentResources.mcData;W1(this.workers,this.version,Le,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 Dt?this.worldSizeParams.worldHeight:G3}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,B1("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.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 v=this.getSectionHeight(),a=16;if(Dt){let l=new Ft(t,this.worldMinYRender,e);this.setSectionDirty(l),this.neighborChunkUpdates&&(!n||this.worldRendererConfig.smoothLighting)&&(this.setSectionDirty(l.offset(-a,0,0)),this.setSectionDirty(l.offset(a,0,0)),this.setSectionDirty(l.offset(0,0,-a)),this.setSectionDirty(l.offset(0,0,a)))}else for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=v){let c=new Ft(t,l,e);this.setSectionDirty(c),this.neighborChunkUpdates&&(!n||this.worldRendererConfig.smoothLighting)&&(this.setSectionDirty(c.offset(-a,0,0)),this.setSectionDirty(c.offset(a,0,0)),this.setSectionDirty(c.offset(0,0,-a)),this.setSectionDirty(c.offset(0,0,a)))}}markAsLoaded(t,e){this.loadedChunks[`${t},${e}`]=!0,this.finishedChunks[`${t},${e}`]=!0,this.logWorkerWork(`-> markAsLoaded ${JSON.stringify({x:t,z: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,v]of this.sectionDirtyTimers)o.startsWith(`${t},`)&&o.endsWith(`,${e}`)&&(clearTimeout(v),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();if(Dt){let o=this.worldMinYRender;this.setSectionDirty(new Ft(t,o,e),!1),delete this.finishedSections[`${t},${o},${e}`]}else for(let o=this.worldSizeParams.minY;o<this.worldSizeParams.worldHeight;o+=s)this.setSectionDirty(new Ft(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,v=Math.floor(t.z/16)*16;this.queuedChunks.has(`${o},${v}`)&&await new Promise(a=>{this.queuedFunctions.push(()=>{a()})}),this.loadedChunks[`${o},${v}`],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:v,isLightUpdate:a})=>{this.worldSizeParams=v,this.queuedChunks.add(`${n},${s}`);let l=[n,s,o,a];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 Ft(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:Pe(n).length,this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength}),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}`,v=this.protocolCustomBlocks.get(s)||{};for(let a of this.workers)a.postMessage({type:"blockUpdate",pos:t,stateId:e,customBlockModels:v});if(this.anyModuleRequiresHeightmap()){let a=Math.floor(t.x/16)*16,l=Math.floor(t.z/16)*16,c=`${a},${l}`,d=this.heightmapDebounceTimers.get(c);d&&clearTimeout(d),this.heightmapDebounceTimers.set(c,setTimeout(()=>{this.heightmapDebounceTimers.delete(c),this.workers[0]?.postMessage({type:"getHeightmap",x:a,z:l})},100))}if(this.logWorkerWork(`-> blockUpdate ${JSON.stringify({pos:t,stateId:e,customBlockModels:v})}`),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(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 Qs(Math.floor(t.x/16)+Math.floor(t.y/n)+Math.floor(t.z/16),this.workers.length)+0}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(),v=`${Math.floor(t.x/s)*s},${Math.floor(t.y/o)*o},${Math.floor(t.z/s)*s}`,a=(this.sectionDirtyCount.get(v)??0)+1;this.sectionDirtyCount.set(v,a),a<=Ut.GEOMETRY_THROTTLE_THRESHOLD?(this._dispatchDirtyImmediate(t,e,i),this.sectionDirtyTimers.has(v)||this.sectionDirtyTimers.set(v,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(v);this.sectionDirtyCount.delete(v),this.sectionDirtyTimers.delete(v),this.sectionDirtyPendingArgs.delete(v),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},Ut.GEOMETRY_THROTTLE_DELAY))):(this.sectionDirtyPendingArgs.set(v,{pos:t,value:e,useChangeWorker:i}),this.sectionDirtyTimers.has(v)||this.sectionDirtyTimers.set(v,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(v);this.sectionDirtyCount.delete(v),this.sectionDirtyTimers.delete(v),this.sectionDirtyPendingArgs.delete(v),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},Ut.GEOMETRY_THROTTLE_DELAY)))}_dispatchDirtyImmediate(t,e,i){var a;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 v=this.getWorkerNumber(t,i&&this.mesherLogger.active);this.sectionsWaiting.set(o,(this.sectionsWaiting.get(o)??0)+1),this.forceCallFromMesherReplayer?this.workers[v].postMessage({type:"dirty",x:t.x,y:t.y,z:t.z,value:e,config:this.getMesherConfig()}):((a=this.toWorkerMessagesQueue)[v]??(a[v]=[]),this.toWorkerMessagesQueue[v].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){this.workers[Number(t)].postMessage(this.toWorkerMessagesQueue[t]);for(let i of this.toWorkerMessagesQueue[t])this.logWorkerWork(`-> ${t} dispatchMessages ${i.type} ${JSON.stringify({x:i.x,y:i.y,z:i.z,value:i.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(),J3()}};h(Ut,"GEOMETRY_THROTTLE_THRESHOLD",1),h(Ut,"GEOMETRY_THROTTLE_DELAY",100);var C5=Ut,Ys=(r,t="mesher.js")=>{let e;if(L.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},W1=(r,t,e=Le,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})};R();k();M();T();import{Vec3 as Ks}from"vec3";import*as j0 from"three";R();k();M();T();function P5(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,v=(s+2)%3,a=[[0,0,0],[0,0,0],[0,0,0]];return a[s][s]=1,a[o][o]=i,a[o][v]=-n,a[v][o]=+n,a[v][v]=i,a}function V1(r,t){return t?[r[0]+t[0],r[1]+t[1],r[2]+t[2]]:r}function N1(r,t){return t?[r[0]-t[0],r[1]-t[1],r[2]-t[2]]:r}function re(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 tn(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],v=r[1][1],a=r[2][1],l=r[0][2],c=r[1][2],d=r[2][2],m=t[0][0],p=t[1][0],g=t[2][0],y=t[0][1],E=t[1][1],_=t[2][1],A=t[0][2],C=t[1][2],x=t[2][2];return e[0][0]=i*m+n*y+s*A,e[1][0]=i*p+n*E+s*C,e[2][0]=i*g+n*_+s*x,e[0][1]=o*m+v*y+a*A,e[1][1]=o*p+v*E+a*C,e[2][1]=o*g+v*_+a*x,e[0][2]=l*m+c*y+d*A,e[1][2]=l*p+c*E+d*C,e[2][2]=l*g+c*_+d*x,e}var j1={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 Js(r,t,e,i,n,s,o,v){let a=new Ks(0,0,0);for(let l in r.faces){let c=r.faces[l],{corners:d,mask1:m,mask2:p}=j1[l],g=re(i,j1[l].dir);if(c.cullface&&v[l])continue;let y=r.from[0],E=r.from[1],_=r.from[2],A=r.to[0],C=r.to[1],x=r.to[2],S=c.texture,{u:z}=S,{v:B}=S,{su:I}=S,{sv:W}=S,O=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,i0=Math.cos(q*Math.PI/180),N=-Math.sin(q*Math.PI/180),Z=null,J=null;r.rotation&&(Z=P5(r.rotation.axis,r.rotation.angle),J=N1(r.rotation.origin,re(Z,r.rotation.origin)));let s0=[],o0=1;for(let f0 of d){let $=[f0[0]?A:y,f0[1]?C:E,f0[2]?x:_];$=V1(re(Z,$),J),$=V1(re(i,$),n),$=$.map(Q0=>Q0/16),e.positions.push($[0],$[1],$[2]),e.normals.push(...g);let g0=(f0[3]-.5)*i0-(f0[4]-.5)*N+.5,st=(f0[3]-.5)*N+(f0[4]-.5)*i0+.5;e.uvs.push(g0*I+z,st*W+B);let V0=1;t&&(V0=4/4*(15/15),s0.push(3)),e.colors.push(o0*j[0]*V0,o0*j[1]*V0,o0*j[2]*V0)}t&&s0[0]+s0[3]>=s0[1]+s0[2]?e.indices.push(O,O+3,O+2,O,O+1,O+3):e.indices.push(O,O+1,O+2,O+2,O+1,O+3)}}var qs=(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,m]of r.entries()){let p=m[n[d]]??m[0];if(!p)continue;let g=null,y=null;for(let _ of["x","y","z"])_ in p&&(g?g=tn(g,P5(_,-(p[_]??0))):g=P5(_,-(p[_]??0)));g&&(y=[8,8,8],y=N1(y,re(g,y)));let E=p.ao??!0;for(let _ of p.elements??[])Js(_,E,l,g,y,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},Zs=(...r)=>{let e={geometry:qs(...r)},i=new j0.BufferGeometry;return i.setAttribute("position",new j0.BufferAttribute(e.geometry.positions,3)),i.setAttribute("normal",new j0.BufferAttribute(e.geometry.normals,3)),i.setAttribute("color",new j0.BufferAttribute(e.geometry.colors,3)),i.setAttribute("uv",new j0.BufferAttribute(e.geometry.uvs,2)),i.setIndex(e.geometry.indices),i.name="block-geometry",i},en=(r,...t)=>{let e=Zs(...t),i=new j0.Mesh(e,r);i.position.set(-.5,-.5,-.5);let n=new j0.Group;return n.add(i),n.rotation.set(0,-j0.MathUtils.degToRad(90),0,"ZYX"),globalThis.mesh=n,n},nn=(r,t)=>{r.position.set(t.x+.5,t.y+.5,t.z+.5)};R();k();M();T();import*as T0 from"three";R();k();M();T();import R2 from"prismarine-nbt";import*as V from"three";R();k();M();T();R();k();M();T();import{BoxGeometry as z0,DoubleSide as Z1,FrontSide as sn,Group as Z0,Mesh as C0,MeshStandardMaterial as Ue,Vector2 as B5}from"three";function X1(r,t,e,i,n,s,o,v){let a=(B,I,W,O)=>[new B5(B/o,1-O/v),new B5(W/o,1-O/v),new B5(W/o,1-I/v),new B5(B/o,1-I/v)],l=a(t+s,e,t+i+s,e+s),c=a(t+i+s,e,t+i*2+s,e+s),d=a(t,e+s,t+s,e+s+n),m=a(t+s,e+s,t+i+s,e+s+n),p=a(t+i+s,e+s,t+i+s*2,e+n+s),g=a(t+i+s*2,e+s,t+i*2+s*2,e+n+s),y=r.attributes.uv,E=[p[3],p[2],p[0],p[1]],_=[d[3],d[2],d[0],d[1]],A=[l[3],l[2],l[0],l[1]],C=[c[0],c[1],c[3],c[2]],x=[m[3],m[2],m[0],m[1]],S=[g[3],g[2],g[0],g[1]],z=[];for(let B of[E,_,A,C,x,S])for(let I of B)z.push(I.x,I.y);y.set(new Float32Array(z)),y.needsUpdate=!0}function q0(r,t,e,i,n,s){X1(r,t,e,i,n,s,64,64)}function Q1(r,t,e,i,n,s){X1(r,t,e,i,n,s,64,32)}var ft=class extends Z0{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"}},Y1=class extends Z0{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 Ue({side:sn}),this.layer2Material=new Ue({side:Z1,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 z0(8,8,8);q0(t,0,0,8,8,8);let e=new C0(t,this.layer1Material),i=new z0(9,9,9);q0(i,32,0,8,8,8);let n=new C0(i,this.layer2Material);this.head=new ft(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 z0(8,12,4);q0(s,16,16,8,12,4);let o=new C0(s,this.layer1Material),v=new z0(8.5,12.5,4.5);q0(v,16,32,8,12,4);let a=new C0(v,this.layer2Material);this.body=new ft(o,a),this.body.name="body",this.body.add(o,a),this.body.position.y=-6,this.add(this.body);let l=new z0,c=new C0(l,this.layer1MaterialBiased);this.modelListeners.push(()=>{c.scale.x=this.slim?3:4,c.scale.y=12,c.scale.z=4,q0(l,40,16,this.slim?3:4,12,4)});let d=new z0,m=new C0(d,this.layer2MaterialBiased);this.modelListeners.push(()=>{m.scale.x=this.slim?3.5:4.5,m.scale.y=12.5,m.scale.z=4.5,q0(d,40,32,this.slim?3:4,12,4)});let p=new Z0;p.add(c,m),this.modelListeners.push(()=>{p.position.x=this.slim?-.5:-1}),p.position.y=-4,this.rightArm=new ft(c,m),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 z0,y=new C0(g,this.layer1MaterialBiased);this.modelListeners.push(()=>{y.scale.x=this.slim?3:4,y.scale.y=12,y.scale.z=4,q0(g,32,48,this.slim?3:4,12,4)});let E=new z0,_=new C0(E,this.layer2MaterialBiased);this.modelListeners.push(()=>{_.scale.x=this.slim?3.5:4.5,_.scale.y=12.5,_.scale.z=4.5,q0(E,48,48,this.slim?3:4,12,4)});let A=new Z0;A.add(y,_),this.modelListeners.push(()=>{A.position.x=this.slim?.5:1}),A.position.y=-4,this.leftArm=new ft(y,_),this.leftArm.name="leftArm",this.leftArm.add(A),this.leftArm.position.x=5,this.leftArm.position.y=-2,this.add(this.leftArm);let C=new z0(4,12,4);q0(C,0,16,4,12,4);let x=new C0(C,this.layer1MaterialBiased),S=new z0(4.5,12.5,4.5);q0(S,0,32,4,12,4);let z=new C0(S,this.layer2MaterialBiased),B=new Z0;B.add(x,z),B.position.y=-6,this.rightLeg=new ft(x,z),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 z0(4,12,4);q0(I,16,48,4,12,4);let W=new C0(I,this.layer1MaterialBiased),O=new z0(4.5,12.5,4.5);q0(O,0,48,4,12,4);let j=new C0(O,this.layer2MaterialBiased),q=new Z0;q.add(W,j),q.position.y=-6,this.leftLeg=new ft(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 ft)}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}},K1=class extends Z0{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 Ue({side:Z1,transparent:!0,alphaTest:1e-5});let t=new z0(10,16,1);Q1(t,0,0,10,16,1),this.cape=new C0(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}},J1=class extends Z0{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 Ue({side:Z1,transparent:!0,alphaTest:1e-5});let t=new z0(12,22,4);Q1(t,22,0,10,20,2);let e=new C0(t,this.material);e.position.x=-5,e.position.y=-10,e.position.z=-1,this.leftWing=new Z0,this.leftWing.add(e),this.add(this.leftWing);let i=new z0(12,22,4);Q1(i,22,0,10,20,2);let n=new C0(i,this.material);n.scale.x=-1,n.position.x=5,n.position.y=-10,n.position.z=-1,this.rightWing=new Z0,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}},q1=class extends Z0{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 Ue({side:sn});let t=new z0(8,8,4/3);X1(t,0,0,6,6,1,14,7),this.rightEar=new C0(t,this.material),this.rightEar.name="rightEar",this.rightEar.position.x=-6,this.add(this.rightEar),this.leftEar=new C0(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}},rn=10.8*Math.PI/180,Ge=class extends Z0{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 Y1,this.skin.name="skin",this.skin.position.y=8,this.add(this.skin),this.cape=new K1,this.cape.name="cape",this.cape.position.y=8,this.cape.position.z=-2,this.cape.rotation.x=rn,this.cape.rotation.y=Math.PI,this.add(this.cape),this.elytra=new J1,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 q1,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=rn,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()}};R();k();M();T();import{Color as Ju,PointLight as qu,EquirectangularReflectionMapping as Zu,Group as Xu,NearestFilter as $u,PerspectiveCamera as tf,Scene as ef,Texture as nf,Vector2 as rf,WebGLRenderer as sf,AmbientLight as of,CanvasTexture as af,WebGLRenderTarget as vf,FloatType as lf,DepthTexture as cf,Clock as df,Object3D as uf,ColorManagement as ff}from"three";import{OrbitControls as mf}from"three/examples/jsm/controls/OrbitControls.js";import{EffectComposer as gf}from"three/examples/jsm/postprocessing/EffectComposer.js";import"three/examples/jsm/postprocessing/Pass.js";import{RenderPass as wf}from"three/examples/jsm/postprocessing/RenderPass.js";import{ShaderPass as Ef}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Rf}from"three/examples/jsm/shaders/FXAAShader.js";R();k();M();T();var I5=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))}};R();k();M();T();import{CanvasTexture as zu,NearestFilter as Hu,Sprite as Ou,SpriteMaterial as Lu}from"three";R();k();M();T();var Xs=Object.defineProperty,$s=(r,t,e)=>t in r?Xs(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,d0=(r,t,e)=>($s(r,typeof t!="symbol"?t+"":t,e),e);function $1(r){let t=[r];if(r.extra&&r.extra.length!==0)for(let e of r.extra)t.push(...$1(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}`}},u0=X;d0(u0,"CONTROL_STRING","\xA7");d0(u0,"BLACK",new X("color","black","BLACK","0",{color:"#000000"},{color:"#000000"}));d0(u0,"DARK_BLUE",new X("color","dark_blue","DARK_BLUE","1",{color:"#0000AA"},{color:"#00002A"}));d0(u0,"DARK_GREEN",new X("color","dark_green","DARK_GREEN","2",{color:"#00AA00"},{color:"#002A00"}));d0(u0,"DARK_AQUA",new X("color","dark_aqua","DARK_AQUA","3",{color:"#00AAAA"},{color:"#002A2A"}));d0(u0,"DARK_RED",new X("color","dark_red","DARK_RED","4",{color:"#AA0000"},{color:"#2A0000"}));d0(u0,"DARK_PURPLE",new X("color","dark_purple","DARK_PURPLE","5",{color:"#AA00AA"},{color:"#2A002A"}));d0(u0,"GOLD",new X("color","gold","GOLD","6",{color:"#FFAA00"},{color:"#2A2A00"}));d0(u0,"GRAY",new X("color","gray","GRAY","7",{color:"#AAAAAA"},{color:"#2A2A2A"}));d0(u0,"DARK_GRAY",new X("color","dark_gray","DARK_GRAY","8",{color:"#555555"},{color:"#151515"}));d0(u0,"BLUE",new X("color","blue","BLUE","9",{color:"#5555FF"},{color:"#15153F"}));d0(u0,"GREEN",new X("color","green","GREEN","a",{color:"#55FF55"},{color:"#153F15"}));d0(u0,"AQUA",new X("color","aqua","AQUA","b",{color:"#55FFFF"},{color:"#153F3F"}));d0(u0,"RED",new X("color","red","RED","c",{color:"#FF5555"},{color:"#3F1515"}));d0(u0,"LIGHT_PURPLE",new X("color","light_purple","LIGHT_PURPLE","d",{color:"#FF55FF"},{color:"#3F153F"}));d0(u0,"YELLOW",new X("color","yellow","YELLOW","e",{color:"#FFFF55"},{color:"#3F3F15"}));d0(u0,"WHITE",new X("color","white","WHITE","f",{color:"#FFFFFF"},{color:"#3F3F3F"}));d0(u0,"OBFUSCATED",new X("obfuscated",!0,"OBFUSCATED","k",{}));d0(u0,"BOLD",new X("bold",!0,"BOLD","l",{"font-weight":"bold"}));d0(u0,"STRIKETHROUGH",new X("strikethrough",!0,"STRIKETHROUGH","m",{"text-decoration":"line-through"}));d0(u0,"UNDERLINE",new X("underlined",!0,"UNDERLINE","n",{"text-decoration":"underline"}));d0(u0,"ITALIC",new X("italic",!0,"ITALIC","o",{"font-style":"italic"}));d0(u0,"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`}});d0(u0,"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 Xe=Me(t2(),1);r2();var Kr=Me(Cn(),1);import Ba from"prismarine-chat";R();k();M();T();import*as v0 from"three";import Ko from"prismarine-item";R();k();M();T();R();k();M();T();var yt=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)}},s2=class extends yt{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 o2(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 Fo={isPrimitive:!0,match:r=>typeof r=="string",fromHexString:o2,toHexString:o2},Ye={isPrimitive:!0,match:r=>typeof r=="number",fromHexString:r=>parseInt(r.substring(1),16),toHexString:r=>"#"+r.toString(16).padStart(6,0)},Uo={isPrimitive:!1,match:r=>Array.isArray(r),fromHexString(r,t,e=1){let i=Ye.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 Ye.toHexString(n)}},Go={isPrimitive:!1,match:r=>Object(r)===r,fromHexString(r,t,e=1){let i=Ye.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 Ye.toHexString(n)}},Wo=[Fo,Ye,Uo,Go];function Vo(r){return Wo.find(t=>t.match(r))}var a2=class extends yt{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=Vo(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=o2(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}},Qe=class extends yt{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}},v2=class extends yt{constructor(t,e,i,n,s,o){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(s);let v=o!==void 0;this.step(v?o:this._getImplicitStep(),v),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 A=parseFloat(this.$input.value);isNaN(A)||(this._stepExplicit&&(A=this._snap(A)),this.setValue(this._clamp(A)))},i=A=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+A),this.$input.value=this.getValue())},n=A=>{A.key==="Enter"&&this.$input.blur(),A.code==="ArrowUp"&&(A.preventDefault(),i(this._step*this._arrowKeyMultiplier(A))),A.code==="ArrowDown"&&(A.preventDefault(),i(this._step*this._arrowKeyMultiplier(A)*-1))},s=A=>{this._inputFocused&&(A.preventDefault(),i(this._step*this._normalizeMouseWheel(A)))},o=!1,v,a,l,c,d,m=5,p=A=>{v=A.clientX,a=l=A.clientY,o=!0,c=this.getValue(),d=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",y)},g=A=>{if(o){let C=A.clientX-v,x=A.clientY-a;Math.abs(x)>m?(A.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>m&&y()}if(!o){let C=A.clientY-l;d-=C*this._step*this._arrowKeyMultiplier(A),c+d>this._max?d=this._max-c:c+d<this._min&&(d=this._min-c),this._snapClampSetValue(c+d)}l=A.clientY},y=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",y)},E=()=>{this._inputFocused=!0},_=()=>{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",E),this.$input.addEventListener("blur",_)}_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=(_,A,C,x,S)=>(_-A)/(C-A)*(S-x)+x,e=_=>{let A=this.$slider.getBoundingClientRect(),C=t(_,A.left,A.right,this._min,this._max);this._snapClampSetValue(C)},i=_=>{this._setDraggingStyle(!0),e(_.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",s)},n=_=>{e(_.clientX)},s=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",s)},o=!1,v,a,l=_=>{_.preventDefault(),this._setDraggingStyle(!0),e(_.touches[0].clientX),o=!1},c=_=>{_.touches.length>1||(this._hasScrollBar?(v=_.touches[0].clientX,a=_.touches[0].clientY,o=!0):l(_),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("touchend",m))},d=_=>{if(o){let A=_.touches[0].clientX-v,C=_.touches[0].clientY-a;Math.abs(A)>Math.abs(C)?l(_):(window.removeEventListener("touchmove",d),window.removeEventListener("touchend",m))}else _.preventDefault(),e(_.touches[0].clientX)},m=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",d),window.removeEventListener("touchend",m)},p=this._callOnFinishChange.bind(this),g=400,y,E=_=>{if(Math.abs(_.deltaX)<Math.abs(_.deltaY)&&this._hasScrollBar)return;_.preventDefault();let C=this._normalizeMouseWheel(_)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(y),y=setTimeout(p,g)};this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",E,{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}},l2=class extends yt{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}},c2=class extends yt{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}},No=`.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 j6=Object.create;var Te=Object.defineProperty;var Q6=Object.getOwnPropertyDe
444
444
  @font-face {
445
445
  font-family: "lil-gui";
446
446
  src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAA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qEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");
447
- }`;function Uo(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 Sn=!1,c2=class r{constructor({parent:t,autoPlace:e=t===void 0,container:i,width:n,title:s="Controls",closeFolders:o=!1,injectStyles:v=!0,touchStyles:a=!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"),a&&this.domElement.classList.add("allow-touch-styles"),!Sn&&v&&(Uo(Fo),Sn=!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 v2(this,t,e,i);switch(typeof t[e]){case"number":return new a2(this,t,e,i,n,s);case"boolean":return new r2(this,t,e);case"string":return new l2(this,t,e);case"function":return new Qe(this,t,e)}}addColor(t,e,i=1){return new o2(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 Qe||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 Qe)){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}},d2=c2;var Vt=class{constructor(t,e,i,n){h(this,"gui",null);h(this,"storageKey","");h(this,"target");h(this,"params",[]);h(this,"paramsMeta",{});h(this,"_visible",!1);h(this,"initialValues",{});h(this,"initialized",!1);if(!_0){this.gui=new d2,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 d2,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}};R();k();M();T();R();k();M();T();var U5=class{constructor(){h(this,"currentAnimation",null);h(this,"isAnimating",!1);h(this,"cancelRequested",!1);h(this,"completionCallbacks",[]);h(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 Go={x:3e3,y:3e3,z:3e3,rotation:Math.PI,scale:1,default:3e3},Ke=class{constructor(t,e,i){this.getState=t;this.setState=e;h(this,"animationController",new U5);h(this,"defaultState");h(this,"speeds");h(this,"currentStateName","");h(this,"transitioningToStateName","");this.speeds={...Go},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],v=Math.abs(s-o),a=this.getPropertySpeed(n),l=v/a*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=R0.Linear.None,s){this.isTransitioning&&this.animationController.forceFinish(!1),this.transitioningToStateName=e??"";let o=this.getState(),v=this.calculateDuration(t);this.animationController.startAnimation(()=>{let a=new Oe;return new M0(o,a).to(t,v).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(),a},s)}reset(){this.startTransition(this.defaultState)}update(){this.animationController.update()}forceFinish(){this.animationController.forceFinish()}transitionTo(t,e,i,n){this.startTransition(t,e,i,R0.Linear.None,n)}getCurrentValue(t){return this.getState()[t]}get isTransitioning(){return this.animationController.isActive}};R();k();M();T();import{subscribeKey as Wo}from"valtio/utils";function Cn(r,t,e,i,n){let s=0,o,v=async()=>{let a=++s,l=await r(t[e]);a===s?(o&&n?.(o),i(l),o=l):n?.(l)};return v(),Wo(t,e,v)}var Pn={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]}},ce=class{constructor(t,e=!1){this.worldRenderer=t;this.offHand=e;h(this,"holdingBlock");h(this,"blockSwapAnimation");h(this,"cameraGroup",new v0.Mesh);h(this,"objectOuterGroup",new v0.Group);h(this,"objectInnerGroup",new v0.Group);h(this,"holdingBlockInnerGroup",new v0.Group);h(this,"camera",new v0.PerspectiveCamera(75,1,.1,100));h(this,"stopUpdate",!1);h(this,"lastHeldItem");h(this,"isSwinging",!1);h(this,"nextIterStopCallbacks");h(this,"idleAnimator");h(this,"ready",!1);h(this,"lastUpdate",0);h(this,"playerHand");h(this,"offHandDisplay",!1);h(this,"offHandModeLegacy",!1);h(this,"swingAnimator");h(this,"config");h(this,"lastItemModelName");h(this,"switchRequest",0);this.initCameraGroup(),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||Je().then(i=>{this.playerHand=i,this.updateItem()}).then(()=>{Cn(async()=>Je(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",i=>{i&&(this.playerHand=i,this.updateItem())},i=>{N0(i,!0)})})}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 v0.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 v0.Scene;o.add(this.cameraGroup),this.updateCameraGroup(),o.add(i.clone()),o.add(n.clone());let v=e.getSize(new v0.Vector2),a=Math.min(v.width,v.height),l=v.width-a,{offHandDisplay:c}=this;if(c&&(this.cameraGroup.scale.x=-1),e.autoClear=!1,e.clearDepth(),this.offHandDisplay)e.setViewport(0,0,a,a);else{let d=v.width-a;e.setViewport(d,0,a,a)}e.render(o,this.camera),e.setViewport(0,0,v.width,v.height),c&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(t){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new Ke(()=>({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){let e=Vo(this.worldRenderer.version);return!this.lastHeldItem||this.lastHeldItem.name!==t?.name||!e.equal(this.lastHeldItem.fullItem,t?.fullItem??{})||JSON.stringify(this.lastHeldItem.fullItem.components)!==JSON.stringify(t?.fullItem?.components)}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 v=n*2.22*.2;this.objectOuterGroup.scale.set(v,v,v)}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},{"minecraft:display_context":"firstperson","minecraft:use_duration":this.worldRenderer.playerStateReactive.itemUsageTicks,"minecraft:using_item":!!this.worldRenderer.playerStateReactive.itemUsageTicks},!1,this.lastItemModelName);if(n){let{mesh:s,isBlock:o,modelName:v}=n;o?(e=s,t.type="block"):(s.position.set(.5,.5,.5),e=s,t.type="item"),this.lastItemModelName=v}}else e=this.playerHand;if(!e)return;e.name="holdingBlock";let i=this.getHandHeld3d().rotation;return e.rotation.x=v0.MathUtils.degToRad(i.x),e.rotation.y=v0.MathUtils.degToRad(i.y),e.rotation.z=v0.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){if(!this.isDifferentItem(t))return;this.lastItemModelName=void 0;let e=++this.switchRequest;this.lastHeldItem=t;let i=!1;if(this.holdingBlock){if(i=!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(e!==this.switchRequest)return;let n=await this.createItemModel(t);if(!n||e!==this.switchRequest)return;let s=new v0.Group;this.holdingBlockInnerGroup.removeFromParent(),this.holdingBlockInnerGroup=new v0.Group,this.holdingBlockInnerGroup.add(n.model),s.add(this.holdingBlockInnerGroup),this.holdingBlock=n.model,this.objectInnerGroup=new v0.Group,this.objectInnerGroup.add(s),this.objectInnerGroup.position.set(-.5,-.5,-.5),i&&(this.objectInnerGroup.position.y-=this.objectInnerGroup.scale.y*1.5),Object.assign(s.position,{x:.5,y:.5,z:.5}),this.objectOuterGroup=new v0.Group,this.objectOuterGroup.add(this.objectInnerGroup),this.cameraGroup.add(this.objectOuterGroup);let o=this.getHandHeld3d().rotation;this.objectOuterGroup.rotation.y=v0.MathUtils.degToRad(o.yOuter),i&&await this.playBlockSwapAnimation("appeared"),this.swingAnimator=new f2(this.holdingBlockInnerGroup),this.swingAnimator.type=n.type,this.config.viewBobbing&&(this.idleAnimator=new u2(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=Pn[`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=Pn[`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}}},u2=class{constructor(t,e){this.handMesh=t;this.playerState=e;h(this,"globalTime",0);h(this,"lastTime",0);h(this,"currentState");h(this,"targetState");h(this,"defaultPosition");h(this,"idleOffset",{y:0,rotationZ:0});h(this,"tween",new Oe);h(this,"idleTween",null);h(this,"stateSwitcher");h(this,"debugParams",{walkingSpeed:8,sprintingSpeed:16,walkingAmplitude:{x:1/30,y:1/10,rotationZ:.25},sprintingAmplitude:{x:1/30,y:1/10,rotationZ:.4}});h(this,"debugGui");h(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 Ke(()=>({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 Vt("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 M0(this.idleOffset,this.tween).to({y:.05,rotationZ:.05},3e3).easing(R0.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()}},f2=class{constructor(t){this.handMesh=t;h(this,"PI",Math.PI);h(this,"animationTimer",0);h(this,"lastTime",0);h(this,"isAnimating",!1);h(this,"stopRequested",!1);h(this,"originalRotation");h(this,"originalPosition");h(this,"originalScale");h(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});h(this,"debugGui");h(this,"type","hand");this.handMesh=t,this.originalRotation=t.rotation.clone(),this.originalPosition=t.position.clone(),this.originalScale=t.scale.clone(),this.debugGui=new Vt("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}})}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),v=Math.sin(s*this.PI);if(this.type==="hand"){let a=this.debugParams.armSwingXPosScale*v,l=this.debugParams.armSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.armSwingZPosScale*o;this.handMesh.position.x+=a,this.handMesh.position.y+=l+this.debugParams.armHeightScale*n,this.handMesh.position.z+=c,this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.armSwingYRotAmount*v),this.handMesh.rotation.z+=v0.MathUtils.degToRad(this.debugParams.armSwingZRotAmount*o)}else{let a=this.debugParams.itemSwingXPosScale*v,l=this.debugParams.itemSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.itemSwingZPosScale*o;this.handMesh.position.x+=a,this.handMesh.position.y+=l+this.debugParams.itemHeightScale*n,this.handMesh.position.z+=c,this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.itemPreswingRotY),this.handMesh.rotation.x+=v0.MathUtils.degToRad(this.debugParams.itemSwingXRotAmount*o),this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.itemSwingYRotAmount*v),this.handMesh.rotation.z+=v0.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}},Bn=(r,t,e,i,n)=>{let s=i.transformModel(t,{name:e,properties:{}});return $i(r,[[s]],void 0,"plains",n)};R();k();M();T();import*as r0 from"three";function No(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,v=r.width,a=r.height,l=e/2,c=i??1/Math.max(v,a),d=(B,I)=>{if(B<0||I<0||B>=v||I>=a)return!1;let W=(I*v+B)*4;return o[W+3]>128},m=[],p=[],g=[],y=[],w=0,_=(B,I,W,O,j,q,i0,N)=>(m.push(B,I,W),g.push(O,j),y.push(q,i0,N),w++),E=(B,I,W,O)=>{p.push(B,I,W,B,W,O)},C=(B,I)=>{let W=(B/v-.5)*c*v,O=-(I/a-.5)*c*a;return{x:W,y:O}},x=Array.from({length:a+1},()=>Array.from({length:v+1},()=>null)),S=Array.from({length:a+1},()=>Array.from({length:v+1},()=>null));for(let B=0;B<=a;B++)for(let I=0;I<=v;I++){let{x:W,y:O}=C(I-.5,B-.5),j=I/v,q=B/a,i0=!1,N=[[I-1,B-1],[I,B-1],[I-1,B],[I,B]];for(let[Z,J]of N)if(d(Z,J)){i0=!0;break}i0&&(x[B][I]=_(W,O,l,j,q,0,0,1),S[B][I]=_(W,O,-l,j,q,0,0,-1))}for(let B=0;B<a;B++)for(let I=0;I<v;I++){if(!d(I,B))continue;let W=x[B][I],O=x[B][I+1],j=x[B+1][I+1],q=x[B+1][I],i0=S[B][I],N=S[B][I+1],Z=S[B+1][I+1],J=S[B+1][I];W!==null&&O!==null&&j!==null&&q!==null&&E(W,O,j,q),i0!==null&&N!==null&&Z!==null&&J!==null&&E(N,i0,J,Z)}for(let B=0;B<a;B++)for(let I=0;I<v;I++){if(!d(I,B))continue;let W=(I+.5)/v,O=(B+.5)/a;if(!d(I-1,B)){let j=x[B][I],q=x[B+1][I],i0=S[B][I],N=S[B+1][I];if(j!==null&&q!==null&&i0!==null&&N!==null){let Z=_(m[j*3],m[j*3+1],m[j*3+2],W,O,-1,0,0),J=_(m[q*3],m[q*3+1],m[q*3+2],W,O,-1,0,0),s0=_(m[N*3],m[N*3+1],m[N*3+2],W,O,-1,0,0),o0=_(m[i0*3],m[i0*3+1],m[i0*3+2],W,O,-1,0,0);E(Z,J,s0,o0)}}if(!d(I+1,B)){let j=x[B+1][I+1],q=x[B][I+1],i0=S[B+1][I+1],N=S[B][I+1];if(j!==null&&q!==null&&i0!==null&&N!==null){let Z=_(m[j*3],m[j*3+1],m[j*3+2],W,O,1,0,0),J=_(m[q*3],m[q*3+1],m[q*3+2],W,O,1,0,0),s0=_(m[N*3],m[N*3+1],m[N*3+2],W,O,1,0,0),o0=_(m[i0*3],m[i0*3+1],m[i0*3+2],W,O,1,0,0);E(Z,J,s0,o0)}}if(!d(I,B-1)){let j=x[B][I],q=x[B][I+1],i0=S[B][I],N=S[B][I+1];if(j!==null&&q!==null&&i0!==null&&N!==null){let Z=_(m[j*3],m[j*3+1],m[j*3+2],W,O,0,-1,0),J=_(m[q*3],m[q*3+1],m[q*3+2],W,O,0,-1,0),s0=_(m[N*3],m[N*3+1],m[N*3+2],W,O,0,-1,0),o0=_(m[i0*3],m[i0*3+1],m[i0*3+2],W,O,0,-1,0);E(Z,J,s0,o0)}}if(!d(I,B+1)){let j=x[B+1][I+1],q=x[B+1][I],i0=S[B+1][I+1],N=S[B+1][I];if(j!==null&&q!==null&&i0!==null&&N!==null){let Z=_(m[j*3],m[j*3+1],m[j*3+2],W,O,0,1,0),J=_(m[q*3],m[q*3+1],m[q*3+2],W,O,0,1,0),s0=_(m[N*3],m[N*3+1],m[N*3+2],W,O,0,1,0),o0=_(m[i0*3],m[i0*3+1],m[i0*3+2],W,O,0,1,0);E(Z,J,s0,o0)}}}let z=new r0.BufferGeometry;return z.setAttribute("position",new r0.Float32BufferAttribute(m,3)),z.setAttribute("uv",new r0.Float32BufferAttribute(g,2)),z.setAttribute("normal",new r0.Float32BufferAttribute(y,3)),z.setIndex(p),z.computeVertexNormals(),{geometry:z,totalVertices:w,totalTriangles:p.length/3}}function jo(r,t){let{u:e,v:i,sizeX:n,sizeY:s}=t,o=Math.max(1,Math.floor(n*r.image.width)),v=Math.max(1,Math.floor(s*r.image.height)),a=document.createElement("canvas");a.width=o,a.height=v;let l=a.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,a.width,a.height),a}function In(r,t,e={}){let{faceCamera:i=!1,use3D:n=!0,depth:s=.04}=e,{u:o,v,sizeX:a,sizeY:l}=t;if(i){let y=r.clone();y.flipY=!0,y.offset.set(o,1-v-l),y.repeat.set(a,l),y.needsUpdate=!0,y.magFilter=r0.NearestFilter,y.minFilter=r0.NearestFilter;let w=new r0.SpriteMaterial({map:y,transparent:!0,alphaTest:.1});return{mesh:new r0.Sprite(w),itemsTexture:y,cleanup(){y.dispose()}}}if(n)try{let y=jo(r,t),{geometry:w}=No(y,{depth:s}),_=new r0.CanvasTexture(y);_.magFilter=r0.NearestFilter,_.minFilter=r0.NearestFilter,_.wrapS=_.wrapT=r0.ClampToEdgeWrapping,_.flipY=!1,_.needsUpdate=!0;let E=new r0.MeshStandardMaterial({map:_,side:r0.DoubleSide,transparent:!0,alphaTest:.1});return{mesh:new r0.Mesh(w,E),itemsTexture:_,cleanup(){_.dispose(),w.dispose(),E.map&&E.map.dispose(),E.dispose()}}}catch{}let c=r.clone();c.flipY=!0,c.offset.set(o,1-v-l),c.repeat.set(a,l),c.needsUpdate=!0,c.magFilter=r0.NearestFilter,c.minFilter=r0.NearestFilter;let d=c.clone();d.repeat.x*=-1,d.needsUpdate=!0,d.offset.set(o+a,1-v-l);let m=new r0.MeshStandardMaterial({map:c,transparent:!0,alphaTest:.1}),p=new r0.MeshStandardMaterial({map:d,transparent:!0,alphaTest:.1});return{mesh:new r0.Mesh(new r0.BoxGeometry(1,1,0),[new r0.MeshBasicMaterial({color:0}),new r0.MeshBasicMaterial({color:0}),new r0.MeshBasicMaterial({color:0}),new r0.MeshBasicMaterial({color:0}),m,p]),itemsTexture:c,itemsTextureFlipped:d,cleanup(){c.dispose(),d.dispose(),m.dispose(),p.dispose()}}}R();k();M();T();import*as K from"three";R();k();M();T();R();k();M();T();import{REVISION as Qo}from"three";var zn=parseInt(Qo.replace(/\D+/g,""));R();k();M();T();import{Loader as Yo,FileLoader as Ko,Group as Jo,BufferGeometry as Hn,Float32BufferAttribute as de,LineBasicMaterial as h2,Material as On,PointsMaterial as G5,MeshPhongMaterial as qo,LineSegments as Ln,Points as m2,Mesh as Dn,Vector3 as qe}from"three";var Zo=/^[og]\s*(.+)?/,Xo=/^mtllib /,$o=/^usemtl /,t7=/^usemap /,Fn=new qe,p2=new qe,Un=new qe,Gn=new qe,X0=new qe;function e7(){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 v={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(a){let l={index:typeof a=="number"?a: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(v),v},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;Fn.fromArray(n,t),p2.fromArray(n,e),Un.fromArray(n,i),X0.subVectors(Un,p2),Gn.subVectors(Fn,p2),X0.cross(Gn),X0.normalize(),s.push(X0.x,X0.y,X0.z),s.push(X0.x,X0.y,X0.z),s.push(X0.x,X0.y,X0.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,v,a,l){let c=this.vertices.length,d=this.parseVertexIndex(t,c),m=this.parseVertexIndex(e,c),p=this.parseVertexIndex(i,c);if(this.addVertex(d,m,p),this.addColor(d,m,p),v!==void 0&&v!==""){let g=this.normals.length;d=this.parseNormalIndex(v,g),m=this.parseNormalIndex(a,g),p=this.parseNormalIndex(l,g),this.addNormal(d,m,p)}else this.addFaceNormal(d,m,p);if(n!==void 0&&n!==""){let g=this.uvs.length;d=this.parseUVIndex(n,g),m=this.parseUVIndex(s,g),p=this.parseUVIndex(o,g),this.addUV(d,m,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 ue=class extends Yo{constructor(t){super(t),this.materials=null}load(t,e,i,n){let s=this,o=new Ko(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(v){try{e(s.parse(v))}catch(a){n&&n(a),s.manager.itemError(t)}},i,n)}setMaterials(t){return this.materials=t,this}parse(t){let e=new e7;t.indexOf(`\r
447
+ }`;function jo(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 Pn=!1,d2=class r{constructor({parent:t,autoPlace:e=t===void 0,container:i,width:n,title:s="Controls",closeFolders:o=!1,injectStyles:v=!0,touchStyles:a=!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"),a&&this.domElement.classList.add("allow-touch-styles"),!Pn&&v&&(jo(No),Pn=!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 l2(this,t,e,i);switch(typeof t[e]){case"number":return new v2(this,t,e,i,n,s);case"boolean":return new s2(this,t,e);case"string":return new c2(this,t,e);case"function":return new Qe(this,t,e)}}addColor(t,e,i=1){return new a2(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 Qe||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 Qe)){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}},u2=d2;var Vt=class{constructor(t,e,i,n){h(this,"gui",null);h(this,"storageKey","");h(this,"target");h(this,"params",[]);h(this,"paramsMeta",{});h(this,"_visible",!1);h(this,"initialValues",{});h(this,"initialized",!1);if(!_0){this.gui=new u2,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 u2,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}};R();k();M();T();R();k();M();T();var U5=class{constructor(){h(this,"currentAnimation",null);h(this,"isAnimating",!1);h(this,"cancelRequested",!1);h(this,"completionCallbacks",[]);h(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 Qo={x:3e3,y:3e3,z:3e3,rotation:Math.PI,scale:1,default:3e3},Ke=class{constructor(t,e,i){this.getState=t;this.setState=e;h(this,"animationController",new U5);h(this,"defaultState");h(this,"speeds");h(this,"currentStateName","");h(this,"transitioningToStateName","");this.speeds={...Qo},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],v=Math.abs(s-o),a=this.getPropertySpeed(n),l=v/a*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=R0.Linear.None,s){this.isTransitioning&&this.animationController.forceFinish(!1),this.transitioningToStateName=e??"";let o=this.getState(),v=this.calculateDuration(t);this.animationController.startAnimation(()=>{let a=new Oe;return new S0(o,a).to(t,v).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(),a},s)}reset(){this.startTransition(this.defaultState)}update(){this.animationController.update()}forceFinish(){this.animationController.forceFinish()}transitionTo(t,e,i,n){this.startTransition(t,e,i,R0.Linear.None,n)}getCurrentValue(t){return this.getState()[t]}get isTransitioning(){return this.animationController.isActive}};R();k();M();T();import{subscribeKey as Yo}from"valtio/utils";function Bn(r,t,e,i,n){let s=0,o,v=async()=>{let a=++s,l=await r(t[e]);a===s?(o&&n?.(o),i(l),o=l):n?.(l)};return v(),Yo(t,e,v)}var In={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]}},ce=class{constructor(t,e=!1){this.worldRenderer=t;this.offHand=e;h(this,"holdingBlock");h(this,"blockSwapAnimation");h(this,"cameraGroup",new v0.Mesh);h(this,"objectOuterGroup",new v0.Group);h(this,"objectInnerGroup",new v0.Group);h(this,"holdingBlockInnerGroup",new v0.Group);h(this,"camera",new v0.PerspectiveCamera(75,1,.1,100));h(this,"stopUpdate",!1);h(this,"lastHeldItem");h(this,"isSwinging",!1);h(this,"nextIterStopCallbacks");h(this,"idleAnimator");h(this,"ready",!1);h(this,"lastUpdate",0);h(this,"playerHand");h(this,"offHandDisplay",!1);h(this,"offHandModeLegacy",!1);h(this,"swingAnimator");h(this,"config");h(this,"lastItemModelName");h(this,"switchRequest",0);this.initCameraGroup(),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||Je().then(i=>{this.playerHand=i,this.updateItem()}).then(()=>{Bn(async()=>Je(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",i=>{i&&(this.playerHand=i,this.updateItem())},i=>{ut(i,!0)})})}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 v0.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 v0.Scene;o.add(this.cameraGroup),this.updateCameraGroup(),o.add(i.clone()),o.add(n.clone());let v=e.getSize(new v0.Vector2),a=Math.min(v.width,v.height),l=v.width-a,{offHandDisplay:c}=this;if(c&&(this.cameraGroup.scale.x=-1),e.autoClear=!1,e.clearDepth(),this.offHandDisplay)e.setViewport(0,0,a,a);else{let d=v.width-a;e.setViewport(d,0,a,a)}e.render(o,this.camera),e.setViewport(0,0,v.width,v.height),c&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(t){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new Ke(()=>({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){let e=Ko(this.worldRenderer.version);return!this.lastHeldItem||this.lastHeldItem.name!==t?.name||!e.equal(this.lastHeldItem.fullItem,t?.fullItem??{})||JSON.stringify(this.lastHeldItem.fullItem.components)!==JSON.stringify(t?.fullItem?.components)}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 v=n*2.22*.2;this.objectOuterGroup.scale.set(v,v,v)}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},{"minecraft:display_context":"firstperson","minecraft:use_duration":this.worldRenderer.playerStateReactive.itemUsageTicks,"minecraft:using_item":!!this.worldRenderer.playerStateReactive.itemUsageTicks},!1,this.lastItemModelName);if(n){let{mesh:s,isBlock:o,modelName:v}=n;o?(e=s,t.type="block"):(s.position.set(.5,.5,.5),e=s,t.type="item"),this.lastItemModelName=v}}else e=this.playerHand;if(!e)return;e.name="holdingBlock";let i=this.getHandHeld3d().rotation;return e.rotation.x=v0.MathUtils.degToRad(i.x),e.rotation.y=v0.MathUtils.degToRad(i.y),e.rotation.z=v0.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){if(!this.isDifferentItem(t))return;this.lastItemModelName=void 0;let e=++this.switchRequest;this.lastHeldItem=t;let i=!1;if(this.holdingBlock){if(i=!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(e!==this.switchRequest)return;let n=await this.createItemModel(t);if(!n||e!==this.switchRequest)return;let s=new v0.Group;this.holdingBlockInnerGroup.removeFromParent(),this.holdingBlockInnerGroup=new v0.Group,this.holdingBlockInnerGroup.add(n.model),s.add(this.holdingBlockInnerGroup),this.holdingBlock=n.model,this.objectInnerGroup=new v0.Group,this.objectInnerGroup.add(s),this.objectInnerGroup.position.set(-.5,-.5,-.5),i&&(this.objectInnerGroup.position.y-=this.objectInnerGroup.scale.y*1.5),Object.assign(s.position,{x:.5,y:.5,z:.5}),this.objectOuterGroup=new v0.Group,this.objectOuterGroup.add(this.objectInnerGroup),this.cameraGroup.add(this.objectOuterGroup);let o=this.getHandHeld3d().rotation;this.objectOuterGroup.rotation.y=v0.MathUtils.degToRad(o.yOuter),i&&await this.playBlockSwapAnimation("appeared"),this.swingAnimator=new h2(this.holdingBlockInnerGroup),this.swingAnimator.type=n.type,this.config.viewBobbing&&(this.idleAnimator=new f2(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=In[`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=In[`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}}},f2=class{constructor(t,e){this.handMesh=t;this.playerState=e;h(this,"globalTime",0);h(this,"lastTime",0);h(this,"currentState");h(this,"targetState");h(this,"defaultPosition");h(this,"idleOffset",{y:0,rotationZ:0});h(this,"tween",new Oe);h(this,"idleTween",null);h(this,"stateSwitcher");h(this,"debugParams",{walkingSpeed:8,sprintingSpeed:16,walkingAmplitude:{x:1/30,y:1/10,rotationZ:.25},sprintingAmplitude:{x:1/30,y:1/10,rotationZ:.4}});h(this,"debugGui");h(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 Ke(()=>({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 Vt("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(R0.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()}},h2=class{constructor(t){this.handMesh=t;h(this,"PI",Math.PI);h(this,"animationTimer",0);h(this,"lastTime",0);h(this,"isAnimating",!1);h(this,"stopRequested",!1);h(this,"originalRotation");h(this,"originalPosition");h(this,"originalScale");h(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});h(this,"debugGui");h(this,"type","hand");this.handMesh=t,this.originalRotation=t.rotation.clone(),this.originalPosition=t.position.clone(),this.originalScale=t.scale.clone(),this.debugGui=new Vt("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}})}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),v=Math.sin(s*this.PI);if(this.type==="hand"){let a=this.debugParams.armSwingXPosScale*v,l=this.debugParams.armSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.armSwingZPosScale*o;this.handMesh.position.x+=a,this.handMesh.position.y+=l+this.debugParams.armHeightScale*n,this.handMesh.position.z+=c,this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.armSwingYRotAmount*v),this.handMesh.rotation.z+=v0.MathUtils.degToRad(this.debugParams.armSwingZRotAmount*o)}else{let a=this.debugParams.itemSwingXPosScale*v,l=this.debugParams.itemSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.itemSwingZPosScale*o;this.handMesh.position.x+=a,this.handMesh.position.y+=l+this.debugParams.itemHeightScale*n,this.handMesh.position.z+=c,this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.itemPreswingRotY),this.handMesh.rotation.x+=v0.MathUtils.degToRad(this.debugParams.itemSwingXRotAmount*o),this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.itemSwingYRotAmount*v),this.handMesh.rotation.z+=v0.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}},zn=(r,t,e,i,n)=>{let s=i.transformModel(t,{name:e,properties:{}});return en(r,[[s]],void 0,"plains",n)};R();k();M();T();import*as r0 from"three";function Jo(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,v=r.width,a=r.height,l=e/2,c=i??1/Math.max(v,a),d=(B,I)=>{if(B<0||I<0||B>=v||I>=a)return!1;let W=(I*v+B)*4;return o[W+3]>128},m=[],p=[],g=[],y=[],E=0,_=(B,I,W,O,j,q,i0,N)=>(m.push(B,I,W),g.push(O,j),y.push(q,i0,N),E++),A=(B,I,W,O)=>{p.push(B,I,W,B,W,O)},C=(B,I)=>{let W=(B/v-.5)*c*v,O=-(I/a-.5)*c*a;return{x:W,y:O}},x=Array.from({length:a+1},()=>Array.from({length:v+1},()=>null)),S=Array.from({length:a+1},()=>Array.from({length:v+1},()=>null));for(let B=0;B<=a;B++)for(let I=0;I<=v;I++){let{x:W,y:O}=C(I-.5,B-.5),j=I/v,q=B/a,i0=!1,N=[[I-1,B-1],[I,B-1],[I-1,B],[I,B]];for(let[Z,J]of N)if(d(Z,J)){i0=!0;break}i0&&(x[B][I]=_(W,O,l,j,q,0,0,1),S[B][I]=_(W,O,-l,j,q,0,0,-1))}for(let B=0;B<a;B++)for(let I=0;I<v;I++){if(!d(I,B))continue;let W=x[B][I],O=x[B][I+1],j=x[B+1][I+1],q=x[B+1][I],i0=S[B][I],N=S[B][I+1],Z=S[B+1][I+1],J=S[B+1][I];W!==null&&O!==null&&j!==null&&q!==null&&A(W,O,j,q),i0!==null&&N!==null&&Z!==null&&J!==null&&A(N,i0,J,Z)}for(let B=0;B<a;B++)for(let I=0;I<v;I++){if(!d(I,B))continue;let W=(I+.5)/v,O=(B+.5)/a;if(!d(I-1,B)){let j=x[B][I],q=x[B+1][I],i0=S[B][I],N=S[B+1][I];if(j!==null&&q!==null&&i0!==null&&N!==null){let Z=_(m[j*3],m[j*3+1],m[j*3+2],W,O,-1,0,0),J=_(m[q*3],m[q*3+1],m[q*3+2],W,O,-1,0,0),s0=_(m[N*3],m[N*3+1],m[N*3+2],W,O,-1,0,0),o0=_(m[i0*3],m[i0*3+1],m[i0*3+2],W,O,-1,0,0);A(Z,J,s0,o0)}}if(!d(I+1,B)){let j=x[B+1][I+1],q=x[B][I+1],i0=S[B+1][I+1],N=S[B][I+1];if(j!==null&&q!==null&&i0!==null&&N!==null){let Z=_(m[j*3],m[j*3+1],m[j*3+2],W,O,1,0,0),J=_(m[q*3],m[q*3+1],m[q*3+2],W,O,1,0,0),s0=_(m[N*3],m[N*3+1],m[N*3+2],W,O,1,0,0),o0=_(m[i0*3],m[i0*3+1],m[i0*3+2],W,O,1,0,0);A(Z,J,s0,o0)}}if(!d(I,B-1)){let j=x[B][I],q=x[B][I+1],i0=S[B][I],N=S[B][I+1];if(j!==null&&q!==null&&i0!==null&&N!==null){let Z=_(m[j*3],m[j*3+1],m[j*3+2],W,O,0,-1,0),J=_(m[q*3],m[q*3+1],m[q*3+2],W,O,0,-1,0),s0=_(m[N*3],m[N*3+1],m[N*3+2],W,O,0,-1,0),o0=_(m[i0*3],m[i0*3+1],m[i0*3+2],W,O,0,-1,0);A(Z,J,s0,o0)}}if(!d(I,B+1)){let j=x[B+1][I+1],q=x[B+1][I],i0=S[B+1][I+1],N=S[B+1][I];if(j!==null&&q!==null&&i0!==null&&N!==null){let Z=_(m[j*3],m[j*3+1],m[j*3+2],W,O,0,1,0),J=_(m[q*3],m[q*3+1],m[q*3+2],W,O,0,1,0),s0=_(m[N*3],m[N*3+1],m[N*3+2],W,O,0,1,0),o0=_(m[i0*3],m[i0*3+1],m[i0*3+2],W,O,0,1,0);A(Z,J,s0,o0)}}}let z=new r0.BufferGeometry;return z.setAttribute("position",new r0.Float32BufferAttribute(m,3)),z.setAttribute("uv",new r0.Float32BufferAttribute(g,2)),z.setAttribute("normal",new r0.Float32BufferAttribute(y,3)),z.setIndex(p),z.computeVertexNormals(),{geometry:z,totalVertices:E,totalTriangles:p.length/3}}function qo(r,t){let{u:e,v:i,sizeX:n,sizeY:s}=t,o=Math.max(1,Math.floor(n*r.image.width)),v=Math.max(1,Math.floor(s*r.image.height)),a=document.createElement("canvas");a.width=o,a.height=v;let l=a.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,a.width,a.height),a}function Hn(r,t,e={}){let{faceCamera:i=!1,use3D:n=!0,depth:s=.04}=e,{u:o,v,sizeX:a,sizeY:l}=t;if(i){let y=r.clone();y.flipY=!0,y.offset.set(o,1-v-l),y.repeat.set(a,l),y.needsUpdate=!0,y.magFilter=r0.NearestFilter,y.minFilter=r0.NearestFilter;let E=new r0.SpriteMaterial({map:y,transparent:!0,alphaTest:.1});return{mesh:new r0.Sprite(E),itemsTexture:y,cleanup(){y.dispose()}}}if(n)try{let y=qo(r,t),{geometry:E}=Jo(y,{depth:s}),_=new r0.CanvasTexture(y);_.magFilter=r0.NearestFilter,_.minFilter=r0.NearestFilter,_.wrapS=_.wrapT=r0.ClampToEdgeWrapping,_.flipY=!1,_.needsUpdate=!0;let A=new r0.MeshStandardMaterial({map:_,side:r0.DoubleSide,transparent:!0,alphaTest:.1});return{mesh:new r0.Mesh(E,A),itemsTexture:_,cleanup(){_.dispose(),E.dispose(),A.map&&A.map.dispose(),A.dispose()}}}catch{}let c=r.clone();c.flipY=!0,c.offset.set(o,1-v-l),c.repeat.set(a,l),c.needsUpdate=!0,c.magFilter=r0.NearestFilter,c.minFilter=r0.NearestFilter;let d=c.clone();d.repeat.x*=-1,d.needsUpdate=!0,d.offset.set(o+a,1-v-l);let m=new r0.MeshStandardMaterial({map:c,transparent:!0,alphaTest:.1}),p=new r0.MeshStandardMaterial({map:d,transparent:!0,alphaTest:.1});return{mesh:new r0.Mesh(new r0.BoxGeometry(1,1,0),[new r0.MeshBasicMaterial({color:0}),new r0.MeshBasicMaterial({color:0}),new r0.MeshBasicMaterial({color:0}),new r0.MeshBasicMaterial({color:0}),m,p]),itemsTexture:c,itemsTextureFlipped:d,cleanup(){c.dispose(),d.dispose(),m.dispose(),p.dispose()}}}R();k();M();T();import*as K from"three";R();k();M();T();R();k();M();T();import{REVISION as Zo}from"three";var On=parseInt(Zo.replace(/\D+/g,""));R();k();M();T();import{Loader as Xo,FileLoader as $o,Group as t7,BufferGeometry as Ln,Float32BufferAttribute as de,LineBasicMaterial as m2,Material as Dn,PointsMaterial as G5,MeshPhongMaterial as e7,LineSegments as Fn,Points as p2,Mesh as Un,Vector3 as qe}from"three";var i7=/^[og]\s*(.+)?/,n7=/^mtllib /,r7=/^usemtl /,s7=/^usemap /,Gn=new qe,g2=new qe,Wn=new qe,Vn=new qe,X0=new qe;function o7(){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 v={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(a){let l={index:typeof a=="number"?a: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(v),v},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;Gn.fromArray(n,t),g2.fromArray(n,e),Wn.fromArray(n,i),X0.subVectors(Wn,g2),Vn.subVectors(Gn,g2),X0.cross(Vn),X0.normalize(),s.push(X0.x,X0.y,X0.z),s.push(X0.x,X0.y,X0.z),s.push(X0.x,X0.y,X0.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,v,a,l){let c=this.vertices.length,d=this.parseVertexIndex(t,c),m=this.parseVertexIndex(e,c),p=this.parseVertexIndex(i,c);if(this.addVertex(d,m,p),this.addColor(d,m,p),v!==void 0&&v!==""){let g=this.normals.length;d=this.parseNormalIndex(v,g),m=this.parseNormalIndex(a,g),p=this.parseNormalIndex(l,g),this.addNormal(d,m,p)}else this.addFaceNormal(d,m,p);if(n!==void 0&&n!==""){let g=this.uvs.length;d=this.parseUVIndex(n,g),m=this.parseUVIndex(s,g),p=this.parseUVIndex(o,g),this.addUV(d,m,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 ue=class extends Xo{constructor(t){super(t),this.materials=null}load(t,e,i,n){let s=this,o=new $o(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(v){try{e(s.parse(v))}catch(a){n&&n(a),s.manager.itemError(t)}},i,n)}setMaterials(t){return this.materials=t,this}parse(t){let e=new o7;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,v=[],a=typeof"".trimLeft=="function";for(let d=0,m=i.length;d<m;d++)if(n=i[d],n=a?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+/),y=[];for(let _=0,E=g.length;_<E;_++){let C=g[_];if(C.length>0){let x=C.split("/");y.push(x)}}let w=y[0];for(let _=1,E=y.length-1;_<E;_++){let C=y[_],x=y[_+1];e.addFace(w[0],C[0],x[0],w[1],C[1],x[1],w[2],C[2],x[2])}}else if(s==="l"){let p=n.substring(1).trim().split(" "),g=[],y=[];if(n.indexOf("/")===-1)g=p;else for(let w=0,_=p.length;w<_;w++){let E=p[w].split("/");E[0]!==""&&g.push(E[0]),E[1]!==""&&y.push(E[1])}e.addLineGeometry(g,y)}else if(s==="p"){let g=n.substr(1).trim().split(" ");e.addPointGeometry(g)}else if((v=Zo.exec(n))!==null){let p=(" "+v[0].substr(1).trim()).substr(1);e.startObject(p)}else if($o.test(n))e.object.startMaterial(n.substring(7).trim(),e.materialLibraries);else if(Xo.test(n))e.materialLibraries.push(n.substring(7).trim());else if(!t7.test(n)){if(s==="s"){if(v=n.split(" "),v.length>1){let g=v[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 Jo;if(l.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let d=0,m=e.objects.length;d<m;d++){let p=e.objects[d],g=p.geometry,y=p.materials,w=g.type==="Line",_=g.type==="Points",E=!1;if(g.vertices.length===0)continue;let C=new Hn;C.setAttribute("position",new de(g.vertices,3)),g.normals.length>0&&C.setAttribute("normal",new de(g.normals,3)),g.colors.length>0&&(E=!0,C.setAttribute("color",new de(g.colors,3))),g.hasUVIndices===!0&&C.setAttribute("uv",new de(g.uvs,2));let x=[];for(let z=0,B=y.length;z<B;z++){let I=y[z],W=I.name+"_"+I.smooth+"_"+E,O=e.materials[W];if(this.materials!==null){if(O=this.materials.create(I.name),w&&O&&!(O instanceof h2)){let j=new h2;On.prototype.copy.call(j,O),j.color.copy(O.color),O=j}else if(_&&O&&!(O instanceof G5)){let j=new G5({size:10,sizeAttenuation:!1});On.prototype.copy.call(j,O),j.color.copy(O.color),j.map=O.map,O=j}}O===void 0&&(w?O=new h2:_?O=new G5({size:1,sizeAttenuation:!1}):O=new qo,O.name=I.name,O.flatShading=!I.smooth,O.vertexColors=E,e.materials[W]=O),x.push(O)}let S;if(x.length>1){for(let z=0,B=y.length;z<B;z++){let I=y[z];C.addGroup(I.groupStart,I.groupCount,z)}w?S=new Ln(C,x):_?S=new m2(C,x):S=new Dn(C,x)}else w?S=new Ln(C,x[0]):_?S=new m2(C,x[0]):S=new Dn(C,x[0]);S.name=p.name,l.add(S)}else if(e.vertices.length>0){let d=new G5({size:1,sizeAttenuation:!1}),m=new Hn;m.setAttribute("position",new de(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(m.setAttribute("color",new de(e.colors,3)),d.vertexColors=!0);let p=new m2(m,d);l.add(p)}return l}};R();k();M();T();import{InstancedBufferGeometry as i7,Float32BufferAttribute as Wn,InstancedInterleavedBuffer as Vn,InterleavedBufferAttribute as W5,WireframeGeometry as n7,Box3 as jn,Sphere as r7,Vector3 as s7}from"three";var Nn=new jn,V5=new s7,Nt=class extends i7{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 Wn(t,3)),this.setAttribute("uv",new Wn(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 Vn(e,6,1);return this.setAttribute("instanceStart",new W5(i,3,0)),this.setAttribute("instanceEnd",new W5(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 Vn(i,e*2,1);return this.setAttribute("instanceColorStart",new W5(n,e,0)),this.setAttribute("instanceColorEnd",new W5(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 n7(t.geometry)),this}fromLineSegments(t){let e=t.geometry;return this.setPositions(e.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new jn);let t=this.attributes.instanceStart,e=this.attributes.instanceEnd;t!==void 0&&e!==void 0&&(this.boundingBox.setFromBufferAttribute(t),Nn.setFromBufferAttribute(e),this.boundingBox.union(Nn))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new r7),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++)V5.fromBufferAttribute(t,s),n=Math.max(n,i.distanceToSquared(V5)),V5.fromBufferAttribute(e,s),n=Math.max(n,i.distanceToSquared(V5));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)}}toJSON(){}applyMatrix(t){return this.applyMatrix4(t)}};R();k();M();T();import{Mesh as v7,InstancedInterleavedBuffer as l7,InterleavedBufferAttribute as Kn,Vector3 as Zn,Vector4 as c7}from"three";R();k();M();T();import{ShaderMaterial as o7,UniformsUtils as Qn,UniformsLib as Yn,Vector2 as a7}from"three";var jt=class extends o7{constructor(t){super({type:"LineMaterial",uniforms:Qn.clone(Qn.merge([Yn.common,Yn.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new a7(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
451
+ `),n="",s="",o=0,v=[],a=typeof"".trimLeft=="function";for(let d=0,m=i.length;d<m;d++)if(n=i[d],n=a?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+/),y=[];for(let _=0,A=g.length;_<A;_++){let C=g[_];if(C.length>0){let x=C.split("/");y.push(x)}}let E=y[0];for(let _=1,A=y.length-1;_<A;_++){let C=y[_],x=y[_+1];e.addFace(E[0],C[0],x[0],E[1],C[1],x[1],E[2],C[2],x[2])}}else if(s==="l"){let p=n.substring(1).trim().split(" "),g=[],y=[];if(n.indexOf("/")===-1)g=p;else for(let E=0,_=p.length;E<_;E++){let A=p[E].split("/");A[0]!==""&&g.push(A[0]),A[1]!==""&&y.push(A[1])}e.addLineGeometry(g,y)}else if(s==="p"){let g=n.substr(1).trim().split(" ");e.addPointGeometry(g)}else if((v=i7.exec(n))!==null){let p=(" "+v[0].substr(1).trim()).substr(1);e.startObject(p)}else if(r7.test(n))e.object.startMaterial(n.substring(7).trim(),e.materialLibraries);else if(n7.test(n))e.materialLibraries.push(n.substring(7).trim());else if(!s7.test(n)){if(s==="s"){if(v=n.split(" "),v.length>1){let g=v[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 t7;if(l.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let d=0,m=e.objects.length;d<m;d++){let p=e.objects[d],g=p.geometry,y=p.materials,E=g.type==="Line",_=g.type==="Points",A=!1;if(g.vertices.length===0)continue;let C=new Ln;C.setAttribute("position",new de(g.vertices,3)),g.normals.length>0&&C.setAttribute("normal",new de(g.normals,3)),g.colors.length>0&&(A=!0,C.setAttribute("color",new de(g.colors,3))),g.hasUVIndices===!0&&C.setAttribute("uv",new de(g.uvs,2));let x=[];for(let z=0,B=y.length;z<B;z++){let I=y[z],W=I.name+"_"+I.smooth+"_"+A,O=e.materials[W];if(this.materials!==null){if(O=this.materials.create(I.name),E&&O&&!(O instanceof m2)){let j=new m2;Dn.prototype.copy.call(j,O),j.color.copy(O.color),O=j}else if(_&&O&&!(O instanceof G5)){let j=new G5({size:10,sizeAttenuation:!1});Dn.prototype.copy.call(j,O),j.color.copy(O.color),j.map=O.map,O=j}}O===void 0&&(E?O=new m2:_?O=new G5({size:1,sizeAttenuation:!1}):O=new e7,O.name=I.name,O.flatShading=!I.smooth,O.vertexColors=A,e.materials[W]=O),x.push(O)}let S;if(x.length>1){for(let z=0,B=y.length;z<B;z++){let I=y[z];C.addGroup(I.groupStart,I.groupCount,z)}E?S=new Fn(C,x):_?S=new p2(C,x):S=new Un(C,x)}else E?S=new Fn(C,x[0]):_?S=new p2(C,x[0]):S=new Un(C,x[0]);S.name=p.name,l.add(S)}else if(e.vertices.length>0){let d=new G5({size:1,sizeAttenuation:!1}),m=new Ln;m.setAttribute("position",new de(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(m.setAttribute("color",new de(e.colors,3)),d.vertexColors=!0);let p=new p2(m,d);l.add(p)}return l}};R();k();M();T();import{InstancedBufferGeometry as a7,Float32BufferAttribute as Nn,InstancedInterleavedBuffer as jn,InterleavedBufferAttribute as W5,WireframeGeometry as v7,Box3 as Yn,Sphere as l7,Vector3 as c7}from"three";var Qn=new Yn,V5=new c7,Nt=class extends a7{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 Nn(t,3)),this.setAttribute("uv",new Nn(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 jn(e,6,1);return this.setAttribute("instanceStart",new W5(i,3,0)),this.setAttribute("instanceEnd",new W5(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 jn(i,e*2,1);return this.setAttribute("instanceColorStart",new W5(n,e,0)),this.setAttribute("instanceColorEnd",new W5(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 v7(t.geometry)),this}fromLineSegments(t){let e=t.geometry;return this.setPositions(e.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Yn);let t=this.attributes.instanceStart,e=this.attributes.instanceEnd;t!==void 0&&e!==void 0&&(this.boundingBox.setFromBufferAttribute(t),Qn.setFromBufferAttribute(e),this.boundingBox.union(Qn))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new l7),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++)V5.fromBufferAttribute(t,s),n=Math.max(n,i.distanceToSquared(V5)),V5.fromBufferAttribute(e,s),n=Math.max(n,i.distanceToSquared(V5));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)}}toJSON(){}applyMatrix(t){return this.applyMatrix4(t)}};R();k();M();T();import{Mesh as f7,InstancedInterleavedBuffer as h7,InterleavedBufferAttribute as qn,Vector3 as $n,Vector4 as m7}from"three";R();k();M();T();import{ShaderMaterial as d7,UniformsUtils as Kn,UniformsLib as Jn,Vector2 as u7}from"three";var jt=class extends d7{constructor(t){super({type:"LineMaterial",uniforms:Kn.clone(Kn.merge([Jn.common,Jn.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new u7(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>
@@ -851,12 +851,12 @@ var j6=Object.create;var Te=Object.defineProperty;var Q6=Object.getOwnPropertyDe
851
851
  gl_FragColor = diffuseColor;
852
852
 
853
853
  #include <tonemapping_fragment>
854
- #include <${zn>=154?"colorspace_fragment":"encodings_fragment"}>
854
+ #include <${On>=154?"colorspace_fragment":"encodings_fragment"}>
855
855
  #include <fog_fragment>
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 Jn=new Zn,qn=new Zn,g2=new c7,Ze=class extends v7{constructor(t=new Nt,e=new jt({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,v=0,a=e.count;o<a;o++,v+=2)Jn.fromBufferAttribute(e,o),qn.fromBufferAttribute(i,o),n[v]=v===0?0:n[v-1],n[v+1]=n[v]+Jn.distanceTo(qn);let s=new l7(n,2,1);return t.setAttribute("instanceDistanceStart",new Kn(s,1,0)),t.setAttribute("instanceDistanceEnd",new Kn(s,1,1)),this}onBeforeRender(t){let e=this.material.uniforms;e&&e.resolution&&(t.getViewport(g2),this.material.uniforms.resolution.value.set(g2.z,g2.w))}};import{GLTFLoader as q7}from"three/examples/jsm/loaders/GLTFLoader.js";import Z7 from"mc-assets/dist/other-textures/latest/entity/zombie/husk.png";import{Vec3 as N5}from"vec3";import X7 from"mc-assets/dist/other-textures/latest/entity/cat/ocelot.png";import $7 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/arrow.png";import ta from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/spectral_arrow.png";import ea from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/tipped_arrow.png";var Xn={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}};R();k();M();T();var fe={};c5(fe,{allay:()=>$n,arrow:()=>Er,axolotl:()=>tr,blaze:()=>er,boat:()=>Hr,camel:()=>ir,cat:()=>nr,chicken:()=>rr,cod:()=>sr,creeper:()=>or,dolphin:()=>ar,ender_dragon:()=>vr,enderman:()=>lr,endermite:()=>cr,fox:()=>dr,frog:()=>ur,ghast:()=>fr,goat:()=>hr,guardian:()=>mr,horse:()=>pr,llama:()=>gr,minecart:()=>br,parrot:()=>yr,piglin:()=>_r,pillager:()=>wr,rabbit:()=>Ar,shulker:()=>xr,sniffer:()=>Rr,spider:()=>kr,tadpole:()=>Tr,turtle:()=>Mr,vex:()=>Sr,villager:()=>Cr,warden:()=>Pr,witch:()=>Br,wolf:()=>Ir,zombie_villager:()=>zr});R();k();M();T();var $n=`# 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 Zn=new $n,Xn=new $n,b2=new m7,Ze=class extends f7{constructor(t=new Nt,e=new jt({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,v=0,a=e.count;o<a;o++,v+=2)Zn.fromBufferAttribute(e,o),Xn.fromBufferAttribute(i,o),n[v]=v===0?0:n[v-1],n[v+1]=n[v]+Zn.distanceTo(Xn);let s=new h7(n,2,1);return t.setAttribute("instanceDistanceStart",new qn(s,1,0)),t.setAttribute("instanceDistanceEnd",new qn(s,1,1)),this}onBeforeRender(t){let e=this.material.uniforms;e&&e.resolution&&(t.getViewport(b2),this.material.uniforms.resolution.value.set(b2.z,b2.w))}};import{GLTFLoader as ea}from"three/examples/jsm/loaders/GLTFLoader.js";import ia from"mc-assets/dist/other-textures/latest/entity/zombie/husk.png";import{Vec3 as N5}from"vec3";import na from"mc-assets/dist/other-textures/latest/entity/cat/ocelot.png";import ra from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/arrow.png";import sa from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/spectral_arrow.png";import oa from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/tipped_arrow.png";var tr={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}};R();k();M();T();var fe={};c5(fe,{allay:()=>er,arrow:()=>Rr,axolotl:()=>ir,blaze:()=>nr,boat:()=>Lr,camel:()=>rr,cat:()=>sr,chicken:()=>or,cod:()=>ar,creeper:()=>vr,dolphin:()=>lr,ender_dragon:()=>cr,enderman:()=>dr,endermite:()=>ur,fox:()=>fr,frog:()=>hr,ghast:()=>mr,goat:()=>pr,guardian:()=>gr,horse:()=>br,llama:()=>yr,minecart:()=>_r,parrot:()=>wr,piglin:()=>Ar,pillager:()=>Er,rabbit:()=>xr,shulker:()=>kr,sniffer:()=>Tr,spider:()=>Mr,tadpole:()=>Sr,turtle:()=>Cr,vex:()=>Pr,villager:()=>Br,warden:()=>Ir,witch:()=>zr,wolf:()=>Hr,zombie_villager:()=>Or});R();k();M();T();var er=`# Made in Blockbench 4.9.4
860
860
  mtllib materials.mtl
861
861
 
862
862
  o head
@@ -1180,7 +1180,7 @@ f 51/152/38 52/151/38 50/150/38 49/149/38
1180
1180
  f 56/156/39 51/155/39 49/154/39 54/153/39
1181
1181
  f 55/160/40 56/159/40 54/158/40 53/157/40
1182
1182
  f 54/164/41 49/163/41 50/162/41 53/161/41
1183
- f 55/168/42 52/167/42 51/166/42 56/165/42`;var tr=`# Made in Blockbench 4.9.4
1183
+ f 55/168/42 52/167/42 51/166/42 56/165/42`;var ir=`# Made in Blockbench 4.9.4
1184
1184
  mtllib materials.mtl
1185
1185
 
1186
1186
  o body
@@ -1688,7 +1688,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
1688
1688
  f 88/252/63 83/251/63 81/250/63 86/249/63
1689
1689
  f 87/256/64 88/255/64 86/254/64 85/253/64
1690
1690
  f 86/260/65 81/259/65 82/258/65 85/257/65
1691
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var er=`# Made in Blockbench 4.9.4
1691
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var nr=`# Made in Blockbench 4.9.4
1692
1692
  mtllib materials.mtl
1693
1693
 
1694
1694
  o upperBodyParts0
@@ -2288,7 +2288,7 @@ f 99/296/74 100/295/74 98/294/74 97/293/74
2288
2288
  f 104/300/75 99/299/75 97/298/75 102/297/75
2289
2289
  f 103/304/76 104/303/76 102/302/76 101/301/76
2290
2290
  f 102/308/77 97/307/77 98/306/77 101/305/77
2291
- f 103/312/78 100/311/78 99/310/78 104/309/78`;var ir=`# Made in Blockbench 4.9.4
2291
+ f 103/312/78 100/311/78 99/310/78 104/309/78`;var rr=`# Made in Blockbench 4.9.4
2292
2292
  mtllib materials.mtl
2293
2293
 
2294
2294
  o body
@@ -3348,7 +3348,7 @@ f 179/536/134 180/535/134 178/534/134 177/533/134
3348
3348
  f 184/540/135 179/539/135 177/538/135 182/537/135
3349
3349
  f 183/544/136 184/543/136 182/542/136 181/541/136
3350
3350
  f 182/548/137 177/547/137 178/546/137 181/545/137
3351
- f 183/552/138 180/551/138 179/550/138 184/549/138`;var nr=`# Made in Blockbench 4.9.4
3351
+ f 183/552/138 180/551/138 179/550/138 184/549/138`;var sr=`# Made in Blockbench 4.9.4
3352
3352
  mtllib materials.mtl
3353
3353
 
3354
3354
  o body
@@ -3856,7 +3856,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
3856
3856
  f 88/252/63 83/251/63 81/250/63 86/249/63
3857
3857
  f 87/256/64 88/255/64 86/254/64 85/253/64
3858
3858
  f 86/260/65 81/259/65 82/258/65 85/257/65
3859
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var rr=`# Made in Blockbench 4.9.4
3859
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var or=`# Made in Blockbench 4.9.4
3860
3860
  mtllib materials.mtl
3861
3861
 
3862
3862
  o body
@@ -4226,7 +4226,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
4226
4226
  f 64/180/45 59/179/45 57/178/45 62/177/45
4227
4227
  f 63/184/46 64/183/46 62/182/46 61/181/46
4228
4228
  f 62/188/47 57/187/47 58/186/47 61/185/47
4229
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var sr=`# Made in Blockbench 4.9.4
4229
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var ar=`# Made in Blockbench 4.9.4
4230
4230
  mtllib materials.mtl
4231
4231
 
4232
4232
  o body
@@ -4596,7 +4596,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
4596
4596
  f 64/180/45 59/179/45 57/178/45 62/177/45
4597
4597
  f 63/184/46 64/183/46 62/182/46 61/181/46
4598
4598
  f 62/188/47 57/187/47 58/186/47 61/185/47
4599
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var or=`# Made in Blockbench 4.9.4
4599
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var vr=`# Made in Blockbench 4.9.4
4600
4600
  mtllib materials.mtl
4601
4601
 
4602
4602
  o Body
@@ -4874,7 +4874,7 @@ f 43/128/32 44/127/32 42/126/32 41/125/32
4874
4874
  f 48/132/33 43/131/33 41/130/33 46/129/33
4875
4875
  f 47/136/34 48/135/34 46/134/34 45/133/34
4876
4876
  f 46/140/35 41/139/35 42/138/35 45/137/35
4877
- f 47/144/36 44/143/36 43/142/36 48/141/36`;var ar=`# Made in Blockbench 4.9.4
4877
+ f 47/144/36 44/143/36 43/142/36 48/141/36`;var lr=`# Made in Blockbench 4.9.4
4878
4878
  mtllib materials.mtl
4879
4879
 
4880
4880
  o body
@@ -5244,7 +5244,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
5244
5244
  f 64/180/45 59/179/45 57/178/45 62/177/45
5245
5245
  f 63/184/46 64/183/46 62/182/46 61/181/46
5246
5246
  f 62/188/47 57/187/47 58/186/47 61/185/47
5247
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var vr=`# Made in Blockbench 4.9.4
5247
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var cr=`# Made in Blockbench 4.9.4
5248
5248
  mtllib materials.mtl
5249
5249
 
5250
5250
  o neck
@@ -8236,7 +8236,7 @@ f 515/1544/386 516/1543/386 514/1542/386 513/1541/386
8236
8236
  f 520/1548/387 515/1547/387 513/1546/387 518/1545/387
8237
8237
  f 519/1552/388 520/1551/388 518/1550/388 517/1549/388
8238
8238
  f 518/1556/389 513/1555/389 514/1554/389 517/1553/389
8239
- f 519/1560/390 516/1559/390 515/1558/390 520/1557/390`;var lr=`# Made in Blockbench 4.9.4
8239
+ f 519/1560/390 516/1559/390 515/1558/390 520/1557/390`;var dr=`# Made in Blockbench 4.9.4
8240
8240
  mtllib materials.mtl
8241
8241
 
8242
8242
  o Head
@@ -8560,7 +8560,7 @@ f 51/152/38 52/151/38 50/150/38 49/149/38
8560
8560
  f 56/156/39 51/155/39 49/154/39 54/153/39
8561
8561
  f 55/160/40 56/159/40 54/158/40 53/157/40
8562
8562
  f 54/164/41 49/163/41 50/162/41 53/161/41
8563
- f 55/168/42 52/167/42 51/166/42 56/165/42`;var cr=`# Made in Blockbench 4.9.4
8563
+ f 55/168/42 52/167/42 51/166/42 56/165/42`;var ur=`# Made in Blockbench 4.9.4
8564
8564
  mtllib materials.mtl
8565
8565
 
8566
8566
  o section_2
@@ -8746,7 +8746,7 @@ f 27/80/20 28/79/20 26/78/20 25/77/20
8746
8746
  f 32/84/21 27/83/21 25/82/21 30/81/21
8747
8747
  f 31/88/22 32/87/22 30/86/22 29/85/22
8748
8748
  f 30/92/23 25/91/23 26/90/23 29/89/23
8749
- f 31/96/24 28/95/24 27/94/24 32/93/24`;var dr=`# Made in Blockbench 4.9.4
8749
+ f 31/96/24 28/95/24 27/94/24 32/93/24`;var fr=`# Made in Blockbench 4.9.4
8750
8750
  mtllib materials.mtl
8751
8751
 
8752
8752
  o body
@@ -9208,7 +9208,7 @@ f 75/224/56 76/223/56 74/222/56 73/221/56
9208
9208
  f 80/228/57 75/227/57 73/226/57 78/225/57
9209
9209
  f 79/232/58 80/231/58 78/230/58 77/229/58
9210
9210
  f 78/236/59 73/235/59 74/234/59 77/233/59
9211
- f 79/240/60 76/239/60 75/238/60 80/237/60`;var ur=`# Made in Blockbench 4.9.4
9211
+ f 79/240/60 76/239/60 75/238/60 80/237/60`;var hr=`# Made in Blockbench 4.9.4
9212
9212
  mtllib materials.mtl
9213
9213
 
9214
9214
  o body
@@ -9946,7 +9946,7 @@ f 123/368/92 124/367/92 122/366/92 121/365/92
9946
9946
  f 128/372/93 123/371/93 121/370/93 126/369/93
9947
9947
  f 127/376/94 128/375/94 126/374/94 125/373/94
9948
9948
  f 126/380/95 121/379/95 122/378/95 125/377/95
9949
- f 127/384/96 124/383/96 123/382/96 128/381/96`;var fr=`# Made in Blockbench 4.9.4
9949
+ f 127/384/96 124/383/96 123/382/96 128/381/96`;var mr=`# Made in Blockbench 4.9.4
9950
9950
  mtllib materials.mtl
9951
9951
 
9952
9952
  o body
@@ -10408,7 +10408,7 @@ f 75/224/56 76/223/56 74/222/56 73/221/56
10408
10408
  f 80/228/57 75/227/57 73/226/57 78/225/57
10409
10409
  f 79/232/58 80/231/58 78/230/58 77/229/58
10410
10410
  f 78/236/59 73/235/59 74/234/59 77/233/59
10411
- f 79/240/60 76/239/60 75/238/60 80/237/60`;var hr=`# Made in Blockbench 4.9.4
10411
+ f 79/240/60 76/239/60 75/238/60 80/237/60`;var pr=`# Made in Blockbench 4.9.4
10412
10412
  mtllib materials.mtl
10413
10413
 
10414
10414
  o left_back_leg
@@ -11008,7 +11008,7 @@ f 99/296/74 100/295/74 98/294/74 97/293/74
11008
11008
  f 104/300/75 99/299/75 97/298/75 102/297/75
11009
11009
  f 103/304/76 104/303/76 102/302/76 101/301/76
11010
11010
  f 102/308/77 97/307/77 98/306/77 101/305/77
11011
- f 103/312/78 100/311/78 99/310/78 104/309/78`;var mr=`# Made in Blockbench 4.9.4
11011
+ f 103/312/78 100/311/78 99/310/78 104/309/78`;var gr=`# Made in Blockbench 4.9.4
11012
11012
  mtllib materials.mtl
11013
11013
 
11014
11014
  o head
@@ -12022,7 +12022,7 @@ f 171/512/128 172/511/128 170/510/128 169/509/128
12022
12022
  f 176/516/129 171/515/129 169/514/129 174/513/129
12023
12023
  f 175/520/130 176/519/130 174/518/130 173/517/130
12024
12024
  f 174/524/131 169/523/131 170/522/131 173/521/131
12025
- f 175/528/132 172/527/132 171/526/132 176/525/132`;var pr=`# Made in Blockbench 4.9.4
12025
+ f 175/528/132 172/527/132 171/526/132 176/525/132`;var br=`# Made in Blockbench 4.9.4
12026
12026
  mtllib materials.mtl
12027
12027
 
12028
12028
  o Body
@@ -13082,7 +13082,7 @@ f 179/536/134 180/535/134 178/534/134 177/533/134
13082
13082
  f 184/540/135 179/539/135 177/538/135 182/537/135
13083
13083
  f 183/544/136 184/543/136 182/542/136 181/541/136
13084
13084
  f 182/548/137 177/547/137 178/546/137 181/545/137
13085
- f 183/552/138 180/551/138 179/550/138 184/549/138`;var gr=`# Made in Blockbench 4.9.4
13085
+ f 183/552/138 180/551/138 179/550/138 184/549/138`;var yr=`# Made in Blockbench 4.9.4
13086
13086
  mtllib materials.mtl
13087
13087
 
13088
13088
  o head
@@ -13590,7 +13590,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
13590
13590
  f 88/252/63 83/251/63 81/250/63 86/249/63
13591
13591
  f 87/256/64 88/255/64 86/254/64 85/253/64
13592
13592
  f 86/260/65 81/259/65 82/258/65 85/257/65
13593
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var br=`# Made in Blockbench 4.9.4
13593
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var _r=`# Made in Blockbench 4.9.4
13594
13594
  mtllib materials.mtl
13595
13595
 
13596
13596
  o bottom
@@ -13822,7 +13822,7 @@ f 35/104/26 36/103/26 34/102/26 33/101/26
13822
13822
  f 40/108/27 35/107/27 33/106/27 38/105/27
13823
13823
  f 39/112/28 40/111/28 38/110/28 37/109/28
13824
13824
  f 38/116/29 33/115/29 34/114/29 37/113/29
13825
- f 39/120/30 36/119/30 35/118/30 40/117/30`;var yr=`# Made in Blockbench 4.9.4
13825
+ f 39/120/30 36/119/30 35/118/30 40/117/30`;var wr=`# Made in Blockbench 4.9.4
13826
13826
  mtllib materials.mtl
13827
13827
 
13828
13828
  o body
@@ -14330,7 +14330,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
14330
14330
  f 88/252/63 83/251/63 81/250/63 86/249/63
14331
14331
  f 87/256/64 88/255/64 86/254/64 85/253/64
14332
14332
  f 86/260/65 81/259/65 82/258/65 85/257/65
14333
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var _r=`# Made in Blockbench 4.9.4
14333
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var Ar=`# Made in Blockbench 4.9.4
14334
14334
  mtllib materials.mtl
14335
14335
 
14336
14336
  o Body
@@ -15068,7 +15068,7 @@ f 123/368/92 124/367/92 122/366/92 121/365/92
15068
15068
  f 128/372/93 123/371/93 121/370/93 126/369/93
15069
15069
  f 127/376/94 128/375/94 126/374/94 125/373/94
15070
15070
  f 126/380/95 121/379/95 122/378/95 125/377/95
15071
- f 127/384/96 124/383/96 123/382/96 128/381/96`;var wr=`# Made in Blockbench 4.9.4
15071
+ f 127/384/96 124/383/96 123/382/96 128/381/96`;var Er=`# Made in Blockbench 4.9.4
15072
15072
  mtllib materials.mtl
15073
15073
 
15074
15074
  o Body
@@ -15438,7 +15438,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
15438
15438
  f 64/180/45 59/179/45 57/178/45 62/177/45
15439
15439
  f 63/184/46 64/183/46 62/182/46 61/181/46
15440
15440
  f 62/188/47 57/187/47 58/186/47 61/185/47
15441
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var Ar=`# Made in Blockbench 4.9.4
15441
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var xr=`# Made in Blockbench 4.9.4
15442
15442
  mtllib materials.mtl
15443
15443
 
15444
15444
  o rearFootLeft
@@ -15992,7 +15992,7 @@ f 91/272/68 92/271/68 90/270/68 89/269/68
15992
15992
  f 96/276/69 91/275/69 89/274/69 94/273/69
15993
15993
  f 95/280/70 96/279/70 94/278/70 93/277/70
15994
15994
  f 94/284/71 89/283/71 90/282/71 93/281/71
15995
- f 95/288/72 92/287/72 91/286/72 96/285/72`;var Er=`# Aspose.3D Wavefront OBJ Exporter
15995
+ f 95/288/72 92/287/72 91/286/72 96/285/72`;var Rr=`# Aspose.3D Wavefront OBJ Exporter
15996
15996
  # Copyright 2004-2024 Aspose Pty Ltd.
15997
15997
  # File created: 02/12/2025 20:01:28
15998
15998
 
@@ -16052,7 +16052,7 @@ f 5/8/5 6/4/6 8/3/7 7/5/8
16052
16052
  f 9/11/9 10/7/10 12/6/11 11/12/12
16053
16053
  #3 polygons
16054
16054
 
16055
- `;var xr=`# Made in Blockbench 4.9.4
16055
+ `;var kr=`# Made in Blockbench 4.9.4
16056
16056
  mtllib materials.mtl
16057
16057
 
16058
16058
  o base
@@ -16192,7 +16192,7 @@ f 19/56/14 20/55/14 18/54/14 17/53/14
16192
16192
  f 24/60/15 19/59/15 17/58/15 22/57/15
16193
16193
  f 23/64/16 24/63/16 22/62/16 21/61/16
16194
16194
  f 22/68/17 17/67/17 18/66/17 21/65/17
16195
- f 23/72/18 20/71/18 19/70/18 24/69/18`;var Rr=`# Made in Blockbench 4.9.4
16195
+ f 23/72/18 20/71/18 19/70/18 24/69/18`;var Tr=`# Made in Blockbench 4.9.4
16196
16196
  mtllib materials.mtl
16197
16197
 
16198
16198
  o body
@@ -16884,7 +16884,7 @@ f 115/344/86 116/343/86 114/342/86 113/341/86
16884
16884
  f 120/348/87 115/347/87 113/346/87 118/345/87
16885
16885
  f 119/352/88 120/351/88 118/350/88 117/349/88
16886
16886
  f 118/356/89 113/355/89 114/354/89 117/353/89
16887
- f 119/360/90 116/359/90 115/358/90 120/357/90`;var kr=`# Made in Blockbench 4.9.4
16887
+ f 119/360/90 116/359/90 115/358/90 120/357/90`;var Mr=`# Made in Blockbench 4.9.4
16888
16888
  mtllib materials.mtl
16889
16889
 
16890
16890
  o head
@@ -17392,7 +17392,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
17392
17392
  f 88/252/63 83/251/63 81/250/63 86/249/63
17393
17393
  f 87/256/64 88/255/64 86/254/64 85/253/64
17394
17394
  f 86/260/65 81/259/65 82/258/65 85/257/65
17395
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var Tr=`# Made in Blockbench 4.9.4
17395
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var Sr=`# Made in Blockbench 4.9.4
17396
17396
  mtllib materials.mtl
17397
17397
 
17398
17398
  o body
@@ -17486,7 +17486,7 @@ f 11/32/8 12/31/8 10/30/8 9/29/8
17486
17486
  f 16/36/9 11/35/9 9/34/9 14/33/9
17487
17487
  f 15/40/10 16/39/10 14/38/10 13/37/10
17488
17488
  f 14/44/11 9/43/11 10/42/11 13/41/11
17489
- f 15/48/12 12/47/12 11/46/12 16/45/12`;var Mr=`# Made in Blockbench 4.9.4
17489
+ f 15/48/12 12/47/12 11/46/12 16/45/12`;var Cr=`# Made in Blockbench 4.9.4
17490
17490
  mtllib materials.mtl
17491
17491
 
17492
17492
  o body
@@ -17856,7 +17856,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
17856
17856
  f 64/180/45 59/179/45 57/178/45 62/177/45
17857
17857
  f 63/184/46 64/183/46 62/182/46 61/181/46
17858
17858
  f 62/188/47 57/187/47 58/186/47 61/185/47
17859
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var Sr=`# Made in Blockbench 4.9.4
17859
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var Pr=`# Made in Blockbench 4.9.4
17860
17860
  mtllib materials.mtl
17861
17861
 
17862
17862
  o body
@@ -18180,7 +18180,7 @@ f 51/152/38 52/151/38 50/150/38 49/149/38
18180
18180
  f 56/156/39 51/155/39 49/154/39 54/153/39
18181
18181
  f 55/160/40 56/159/40 54/158/40 53/157/40
18182
18182
  f 54/164/41 49/163/41 50/162/41 53/161/41
18183
- f 55/168/42 52/167/42 51/166/42 56/165/42`;var Cr=`# Made in Blockbench 4.9.4
18183
+ f 55/168/42 52/167/42 51/166/42 56/165/42`;var Br=`# Made in Blockbench 4.9.4
18184
18184
  mtllib materials.mtl
18185
18185
 
18186
18186
  o body
@@ -18688,7 +18688,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
18688
18688
  f 88/252/63 83/251/63 81/250/63 86/249/63
18689
18689
  f 87/256/64 88/255/64 86/254/64 85/253/64
18690
18690
  f 86/260/65 81/259/65 82/258/65 85/257/65
18691
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var Pr=`# Made in Blockbench 4.9.4
18691
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var Ir=`# Made in Blockbench 4.9.4
18692
18692
  mtllib materials.mtl
18693
18693
 
18694
18694
  o body
@@ -19150,7 +19150,7 @@ f 75/224/56 76/223/56 74/222/56 73/221/56
19150
19150
  f 80/228/57 75/227/57 73/226/57 78/225/57
19151
19151
  f 79/232/58 80/231/58 78/230/58 77/229/58
19152
19152
  f 78/236/59 73/235/59 74/234/59 77/233/59
19153
- f 79/240/60 76/239/60 75/238/60 80/237/60`;var Br=`# Made in Blockbench 4.9.4
19153
+ f 79/240/60 76/239/60 75/238/60 80/237/60`;var zr=`# Made in Blockbench 4.9.4
19154
19154
  mtllib materials.mtl
19155
19155
 
19156
19156
  o head
@@ -19796,7 +19796,7 @@ f 107/320/80 108/319/80 106/318/80 105/317/80
19796
19796
  f 112/324/81 107/323/81 105/322/81 110/321/81
19797
19797
  f 111/328/82 112/327/82 110/326/82 109/325/82
19798
19798
  f 110/332/83 105/331/83 106/330/83 109/329/83
19799
- f 111/336/84 108/335/84 107/334/84 112/333/84`;var Ir=`# Made in Blockbench 4.9.4
19799
+ f 111/336/84 108/335/84 107/334/84 112/333/84`;var Hr=`# Made in Blockbench 4.9.4
19800
19800
  mtllib materials.mtl
19801
19801
 
19802
19802
  o head
@@ -20304,7 +20304,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
20304
20304
  f 88/252/63 83/251/63 81/250/63 86/249/63
20305
20305
  f 87/256/64 88/255/64 86/254/64 85/253/64
20306
20306
  f 86/260/65 81/259/65 82/258/65 85/257/65
20307
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var zr=`# Made in Blockbench 4.9.4
20307
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var Or=`# Made in Blockbench 4.9.4
20308
20308
  mtllib materials.mtl
20309
20309
 
20310
20310
  o Body
@@ -20766,7 +20766,7 @@ f 75/224/56 76/223/56 74/222/56 73/221/56
20766
20766
  f 80/228/57 75/227/57 73/226/57 78/225/57
20767
20767
  f 79/232/58 80/231/58 78/230/58 77/229/58
20768
20768
  f 78/236/59 73/235/59 74/234/59 77/233/59
20769
- f 79/240/60 76/239/60 75/238/60 80/237/60`;var Hr=`# Made in Blockbench 4.9.4
20769
+ f 79/240/60 76/239/60 75/238/60 80/237/60`;var Lr=`# Made in Blockbench 4.9.4
20770
20770
  mtllib materials.mtl
20771
20771
 
20772
20772
  o bottom
@@ -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 b2={allay:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAV1BMVEUAAAA4jNkuh9Ypg9FBnNpCm9r///+c/P+A/P9k+/9N8/hM6f9Q2f8+5eo94PdG0P821+4s1ewiz/8syf8ox/8bxPNNq+wQwf8os+hCnNpCm9oep9s0h8D7j8AOAAAABnRSTlMAoKCg3PODq/XXAAAA60lEQVR42tWP0W7DIAxFb9OtwdA6xQ3rzZL//84BD0nRljzsZdqxZCx8hLio3Lz4GwtYMWLDi4jnPM+vwogNKTTC43Elr6vgRMQ1wvM5ktsbvRPXN38wGxKHMmnI9M65vgxavwsg2WCpCvlSg6iqlCF4ceKbFEGZVC+5NFFXYUtxZzILl1xmiffoxUcA5DUHKULZp6iqsQzU6KNWYcxBUMnp8A2mwWxAhTPR0qRYFs6sDT+zTMZpWj5pO8L0wamexJ9xXvm10J27rrQ94dSdOqC0PSFXPV4JRuwRzIxGHMB38O14j4N9Wf4/vgDzpRGDwkNeQQAAAABJRU5ErkJggg==",axolotl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAP1BMVEUAAACvsv+zsPmmqv+nn/+GkPXWhCt+iOyBb+d1b/9odutodOyTWuRbb+NlZfS0W0xsV+JpVuNNWc82QZ86AGw+Ir4cAAAAAXRSTlMAQObYZgAAAUdJREFUeNrtk9Fugz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AAAAAASUVORK5CYII=",zombie:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAclBMVEUAAAAAzMyPj495nGVxlVtvlVxtlVtnkFYAr69ph1Z6d3cAqKgAnp5ae0gAmZlra2tXdUdOezZhYWFIdTJJcTVWScwAf39KaS0+aS07Yi9MTExGOqU2WiUAaGg4UiYAW1s/Pz86MYkwKHImIVsoKCgaGho5R/XAAAAAAXRSTlMAQObYZgAAAkJJREFUeNrtk2FzmzAMhpPNm+0akmjVqFRGEsPy///iXtnlml27laRfeWwswZ0eI3NsZkRFVWwUdHMrIqzKitKC3C4gVjhgOQLVOwQEAcvdAmViwZQiuKOFsj2J3i1gZWEVrAqEbxaIlkHMAni5QK15VRSpwTI/UFuYFnx/q2ZCQYyMEq5PSKWMJW8gZSv//av75rneqcJFxMqLemdiiq1zLraR6llimEtk2fdnpvZycfFyaeGScggkqKclLQjqWShG1RhR/XIKCEgWtCByLJs96tOTPiIROoogMhEvO0QWqf+AWqXdsQIEWfhP/AS/wXy//VXYji/Mz8N2G5iIPxYcC28EW0CsnxOwqnyqhTf/yQhy3/fjNE096Lru1CRl0dR0oGlSCAn5bteZYI7vCcYiGIYuhUa1CQH5kFIAVRbAHP8S9FeCoQhC2XgAKSDB8h9BroIMQc79aRhOwQwoqzkyTMt3Ke3m+CrIVWAxwzacTiZIRQBCgwyXgAgEtGAzk/tcdh6R2ETNkEyAOSCfBcykLjovyuy9j68CVPUAS4lWZB3AkQa8b1WlJMzqW9eykvhD9O8IkM1foR5Bg3wwlzlQJ967loQ0Ru+vD7EKMjJggnJsuKosYZpA2TsXiVnjdQvnsxVa+fm8B93QdbanlRUBkoBFWMk574RF/PUbPJ9R+OVhj/BsgnEap1xIoZsmyO1EcyYI0IFXQTz4+CoA+4f93uIPAMHYF3JTcyRokkmodbFVEo6HeNisrKysrKysrPyDP68WY0lh7YK7AAAAAElFTkSuQmCC",zombie_villager:"data:image/png;base64,iVBORw0KGgoAA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uK9gPmptRbfNFMc1qozZfFCglQKoIgDOeagA7Ym3zEOXa7MN1gASBBRlQwZQ96JOBwF4MCeidg5puQ4YMELPNgO5UeXsWVEgAYVJlMALkIBKIAAwHnH0SI8FE2xybddYr5tmzZFJAwAeWYIorcACzE5KC4wBwDLYVgu24gwPeR57KlFHpN1XRsiZgehACKz2wUJ+xnOF7uu/1pcL77Kq6caZUD2/0ZFAk9zM9XrfYvrb1L1TPXvNbFnhwqQEPOKZbVKaZW0aWIpvy+bZVOypUYT7vFx9tGz9zOcFuDN/+gIHIEjcASOwBH44cB/1lQM4ZNhKecAAAAASUVORK5CYII="};R();k();M();T();import*as k0 from"three";var y2=class{constructor(t,e){this.object=t;this.animations=e;h(this,"clock",new k0.Clock);h(this,"animatedObjects",new Set);h(this,"state")}createAnimationState(){let t=new k0.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 k0.Mesh||i instanceof k0.Line||i instanceof k0.Points||i instanceof k0.Sprite){let n=i.onBeforeRender;i.onBeforeRender=(s,o,v,a,l,c)=>{let d=this.clock.getDelta();t.update(d),n?.(s,o,v,a,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?k0.LoopRepeat:k0.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?k0.LoopRepeat:k0.LoopOnce,1/0),i.clampWhenFinished=!e)}stopAnimations(){this.state.mixer.stopAllAction()}getDelta(){return this.clock.getDelta()}};function Or(r,t){let e=new y2(r,t);return e.createAnimationState(),e}var ia={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 Lr(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function na(r,t,e,i,n=!1,s=64,o=64,v=!1,a=[]){let l=new K.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:m,v0:p,u1:g,v1:y}of Object.values(ia)){let w=Math.floor(r.positions.length/3),_=c[0]!==0,E=[];for(let C of d){let x,S;n?(x=(i.uv[0]+C[3]*i.size[0])/s,S=(i.uv[1]+C[4]*i.size[1])/o):(x=(i.uv[0]+Lr(C[3]?g:m,i.size))/s,S=(i.uv[1]+Lr(C[4]?y:p,i.size))/o);let z=_&&v?C[0]^1:C[0],B=C[1],I=_&&v?C[2]^1:C[2],W=i.inflate??0,O=new K.Vector3(i.origin[0]+z*i.size[0]+(z?W:-W),i.origin[1]+B*i.size[1]+(B?W:-W),i.origin[2]+I*i.size[2]+(I?W:-W));O=O.applyEuler(l),O=O.sub(e.position),O=O.applyEuler(e.rotation),O=O.add(e.position),r.positions.push(O.x,O.y,O.z),r.normals.push(c[0],c[1],c[2]),E.push(x,S),r.skinIndices.push(t,0,0,0),r.skinWeights.push(1,0,0,0)}if(v)for(let C=0;C+1<d.length;C+=2){let x=C*2,S=E.slice(x,x+4);E[x]=S[2],E[x+1]=S[_?1:3],E[x+2]=S[0],E[x+3]=S[_?3:1]}r.uvs.push(...E),r.indices.push(w,w+1,w+2,w+2,w+1,w+3)}}function he(r,t,e,i={},n={}){let s=e.texturewidth??64,o=e.textureheight??64,v,a=t.startsWith("block:"),l=r?.material.map;if(a){if(!r)throw new Error("worldRenderer is required for block textures");let E=t.slice(6),C=r.resourcesManager.currentResources.blocksAtlasJson.textures[E];C&&(s=l?.image.width??s,o=l?.image.height??o,v=[C.u,C.v])}let c={},d={positions:[],normals:[],uvs:[],indices:[],skinIndices:[],skinWeights:[]},m=0;for(let E of e.bones){let C=new K.Bone;if(E.pivot&&(C.position.x=E.pivot[0],C.position.y=E.pivot[1],C.position.z=E.pivot[2]),E.bind_pose_rotation?(C.rotation.x=-E.bind_pose_rotation[0]*Math.PI/180,C.rotation.y=-E.bind_pose_rotation[1]*Math.PI/180,C.rotation.z=-E.bind_pose_rotation[2]*Math.PI/180):E.rotation&&(C.rotation.x=-E.rotation[0]*Math.PI/180,C.rotation.y=-E.rotation[1]*Math.PI/180,C.rotation.z=-E.rotation[2]*Math.PI/180),i.rotation?.[E.name]&&(C.rotation.x-=(i.rotation[E.name].x??0)*Math.PI/180,C.rotation.y-=(i.rotation[E.name].y??0)*Math.PI/180,C.rotation.z-=(i.rotation[E.name].z??0)*Math.PI/180),C.name=`bone_${E.name}`,c[E.name]=C,E.cubes)for(let x of E.cubes){let S=[];na(d,m,C,x,a,s,o,E.mirror,S),S.length&&(n.errors??(n.errors=[]),n.errors.push(...S.map(z=>`Bone ${E.name}: ${z}`)))}m++}let p=[];for(let E of e.bones)E.parent&&c[E.parent]?c[E.parent].add(c[E.name]):p.push(c[E.name]);let g=new K.Skeleton(Object.values(c)),y=new K.BufferGeometry;y.setAttribute("position",new K.Float32BufferAttribute(d.positions,3)),y.setAttribute("normal",new K.Float32BufferAttribute(d.normals,3)),y.setAttribute("uv",new K.Float32BufferAttribute(d.uvs,2)),y.setAttribute("skinIndex",new K.Uint16BufferAttribute(d.skinIndices,4)),y.setAttribute("skinWeight",new K.Float32BufferAttribute(d.skinWeights,4)),y.setIndex(d.indices);let w=new K.MeshLambertMaterial({transparent:!0,alphaTest:.1,side:K.DoubleSide}),_=new K.SkinnedMesh(y,w);if(_.add(...p),_.bind(g),_.scale.set(1/16,1/16,1/16),v){let E=l.clone();E.offset.set(v[0],v[1]),E.needsUpdate=!0,w.map=E}else S5(t,E=>{w.map||(E.magFilter=K.NearestFilter,E.minFilter=K.NearestFilter,E.flipY=!1,E.wrapS=K.RepeatWrapping,E.wrapT=K.RepeatWrapping,w.map=E)},()=>{let E=w.map.image.width;E&&s!==E&&(w.map.repeat.x=s/E);let C=w.map.image.height;C&&o!==C&&(w.map.repeat.y=o/C),w.needsUpdate=!0});return _}var ra=[{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 Dr(r){for(let t of ra)if(typeof t.pattern=="string"){if(t.pattern===r)return t.target}else if(t.pattern.test(r))return t.target}var Fr=r=>Xn[r],Ur={zombie:1.85,husk:1.85,arrow:.0025},sa={zombie:new N5(0,1,0),husk:new N5(0,1,0),boat:new N5(0,-1,0),arrow:new N5(0,-.9,0)},ht=class{constructor(t,e,i,n={},s={}){h(this,"mesh");h(this,"animations");h(this,"animationController");h(this,"initialAnimation");h(this,"initialLoop");let o=e,v=Dr(e);if(v&&(e=v,s.tempMap=v),n.customModel){this.mesh=new K.Object3D;let{modelPath:l,modelType:c,metadata:d}=n.customModel;switch(c){case"gltf":{new q7().parseAsync(l,"").then(g=>{if(this.mesh.add(g.scene),this.animations=g.animations,d?.scale){let{scale:y}=d;this.mesh.scale.set(y,y,y)}if(d?.offset){let{x:y=0,y:w=0,z:_=0}=d.offset;this.mesh.position.set(y,w,_)}if(d?.texture){let y=new K.TextureLoader().load(d.texture);y.minFilter=K.NearestFilter,y.magFilter=K.NearestFilter,this.mesh.traverse(w=>{w instanceof K.Mesh&&(w.material=new K.MeshBasicMaterial({map:y,transparent:!0,alphaTest:.1}))})}if(g.animations&&g.animations.length>0){this.animations=g.animations;let y=d?.animation,w=d?.animationLoop??!0;if(this.initialAnimation=y,this.initialLoop=w,this.animationController=Or(this.mesh,g.animations),y)this.playAnimation(y,w);else{let _=g.animations[0];this.animationController.playAnimation(_.name,w)}}}).catch(g=>{});return}case"obj":{let p=new ue().parse(l);if(d?.scale){let{scale:g}=d;p.scale.set(g,g,g)}if(d?.offset){let{x:g=0,y=0,z:w=0}=d.offset;p.position.set(g,y,w)}if(d?.texture){let g=new K.TextureLoader().load(d.texture);g.minFilter=K.NearestFilter,g.magFilter=K.NearestFilter;let y=new K.MeshBasicMaterial({map:g,transparent:!0,alphaTest:.1});p.traverse(w=>{w instanceof K.Mesh&&(w.material=y)})}this.mesh=p,s.type="obj";return}case"bedrock":{let m=JSON.parse(l);if(this.mesh=new K.Object3D,d?.scale&&this.mesh.scale.set(d.scale,d.scale,d.scale),d?.offset){let{x:p=0,y:g=0,z:y=0}=d.offset;this.mesh.position.set(p,g,y)}for(let[p,g]of Object.entries(m.geometry)){let y=d?.textures?.[p]??m.textures?.[p];if(!y)continue;let w=he(i,y.endsWith(".png")||y.startsWith("data:image/")||y.startsWith("block:")?y:y+".png",g,n,s);w.name=`geometry_${p}`,this.mesh.add(w)}s.type="bedrock";return}}}if(fe[e]){let l=new ue,c={zombie_horse:`textures/${t}/entity/horse/horse_zombie.png`,husk:Z7,skeleton_horse:`textures/${t}/entity/horse/horse_skeleton.png`,donkey:`textures/${t}/entity/horse/donkey.png`,mule:`textures/${t}/entity/horse/mule.png`,ocelot:X7,arrow:$7,spectral_arrow:ta,tipped_arrow:ea},d=c[o]||c[e];d&&(s.textureMap=!0);let m=d||b2[e];if(b2[e]&&(s.isHardcodedTexture=!0),!m)throw new Error(`No texture for ${e}`);let p=new K.TextureLoader().load(m);p.minFilter=K.NearestFilter,p.magFilter=K.NearestFilter;let g=new K.MeshBasicMaterial({map:p,transparent:!0,alphaTest:.1}),y=l.parse(fe[e]),w=Ur[o]||Ur[e];w&&y.scale.set(w,w,w);let _=sa[o];_&&y.position.set(_.x,_.y,_.z),y.traverse(E=>{E instanceof K.Mesh&&(E.material=g,E.name==="Head layer"&&(E.visible=!1),E.name==="Head"&&n.rotation?.head&&(E.rotation.x-=(n.rotation.head.x??0)*Math.PI/180,E.rotation.y-=(n.rotation.head.y??0)*Math.PI/180,E.rotation.z-=(n.rotation.head.z??0)*Math.PI/180))}),this.mesh=y,s.type="obj";return}let a=Fr(e);if(a){this.mesh=new K.Object3D;for(let[l,c]of Object.entries(a.geometry)){let d=n.textures?.[l]??a.textures[l];if(!d)continue;let m=he(i,d.endsWith(".png")||d.startsWith("data:image/")||d.startsWith("block:")?d:d+".png",c,n,s);m.name=`geometry_${l}`,this.mesh.add(m)}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=Dr(t)||t,fe[t])return{boneNames:[]};let e=Fr(t);if(!e)throw new Error(`Unknown entity ${t}`);return{boneNames:Object.values(e.geometry).flatMap(i=>i.name)}}};globalThis.EntityMesh=ht;R();k();M();T();var me=r=>Math.max(0,Math.min(1,r)),Gr=(r,t,e)=>Math.max(t,Math.min(e,r)),G0=(r,t,e)=>r+(t-r)*e,aa=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function va(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 j5=class extends I5{constructor(){super(...arguments);h(this,"switchAnimationCallback");h(this,"isRunning",!1);h(this,"isMoving",!0);h(this,"isCrouched",!1);h(this,"moveAmount",0);h(this,"runAmount",0);h(this,"lookYaw",0);h(this,"lookPitch",0);h(this,"_dt",0);h(this,"_phase",0);h(this,"_idlePhase",0);h(this,"_moveBlend",0);h(this,"_runBlend",0);h(this,"_crouchBlend",0);h(this,"_lookYawBlend",0);h(this,"_lookPitchBlend",0);h(this,"_swingTime",null);h(this,"_swingDuration",.25);h(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=me(n),v=me(s),a=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+=(v-this._runBlend)*c,this._crouchBlend+=(a-this._crouchBlend)*d;let m=me(this._moveBlend),p=me(this._runBlend),g=me(this._crouchBlend),y=G0(8,10,p),w=G0(1,.55,g),_=y*w;this._phase+=i*_*m,this._phase+=i*_*m,this._idlePhase+=i*1.15;let E=this._phase+(p>.5?Math.PI*.5:0);if(this.switchAnimationCallback&&Math.abs(Math.sin(E))<.02){let O=this.switchAnimationCallback;this.switchAnimationCallback=null,O?.()}ca(e,g);let C=80*Math.PI/180,x=75*Math.PI/180,S=Gr(aa(this.lookYaw||0),-C,C),z=Gr(this.lookPitch||0,-x,x),B=Math.min(1,i*14);this._lookYawBlend+=(S-this._lookYawBlend)*B,this._lookPitchBlend+=(z-this._lookPitchBlend)*B,e?.skin?.head?.rotation&&(e.skin.head.rotation.y+=this._lookYawBlend,e.skin.head.rotation.x+=this._lookPitchBlend);let I=(1-m)*(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(m>1e-4&&e?.skin){let W=G0(1,.85,g),O=G0(1,.7,g),j=Math.sin(E)*.5,q=Math.sin(E+Math.PI)*.5,i0=Math.cos(E+Math.PI)*1.3,N=Math.cos(E)*1.3;e.skin.leftLeg.rotation.x+=G0(j,i0,p)*m*W,e.skin.rightLeg.rotation.x+=G0(q,N,p)*m*W;let Z=Math.sin(E+Math.PI)*.5,J=Math.sin(E)*.5,s0=Math.cos(E)*1.5,o0=Math.cos(E+Math.PI)*1.5;e.skin.leftArm.rotation.x+=G0(Z,s0,p)*m*O,e.skin.rightArm.rotation.x+=G0(J,o0,p)*m*O;let f0=Math.PI*.02,$=Math.PI*.1,g0=G0(f0,$,p),ot=Math.cos(E)*.03+f0,W0=Math.cos(E+Math.PI)*.03-f0,Q0=Math.cos(E)*.1+$,Rt=Math.cos(E+Math.PI)*.1-$;e.skin.leftArm.rotation.z+=(G0(ot,Q0,p)*m+g0*.15*m)*O,e.skin.rightArm.rotation.z+=(G0(W0,Rt,p)*m-g0*.15*m)*O,this._defaults?.playerRot&&(e.rotation.z=this._defaults.playerRot.z+Math.cos(E+Math.PI)*.01*p*m);let kt=G0(Math.PI*.06,Math.PI*.3,p),Y0=G0(Math.sin(E/1.5)*.06,Math.sin(E*2)*.1,p);e?.cape?.rotation&&(e.cape.rotation.x+=(kt+Y0)*m)}if(this._swingTime!==null){this._swingTime+=i;let W=Math.min(this._swingTime/this._swingDuration,1);la.animate(W,e,m>.2),W>=1&&(this._swingTime=null)}}},la={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 ca(r,t){let e=r?.skin,i=r?.cape,n=r?.elytra;if(!e||!i)return;let s=me(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=G0(.72,.26179944+.4582006,o)),va(r),e.head.position.y+=-3.618325234674*o;let v=.1*o,a=(3.618325234674-3.4500310377)*o,l=-2.53943318*o;e.leftArm.position.z+=a,e.rightArm.position.z+=a,e.leftArm.rotation.x+=.410367746202*o,e.rightArm.rotation.x+=.410367746202*o,e.leftArm.rotation.z+=v,e.rightArm.rotation.z+=-v,e.leftArm.position.y+=l,e.rightArm.position.y+=l,e.rightLeg.position.z+=-3.4500310377*o,e.leftLeg.position.z+=-3.4500310377*o}R();k();M();T();import{default as ua}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_1.png";import{default as fa}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_2.png";import{default as ha}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_1.png";import{default as ma}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_2.png";import{default as pa}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_1.png";import{default as ga}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_2.png";import{default as ba}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_1.png";import{default as ya}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_2.png";import{default as _a}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1.png";import{default as wa}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1_overlay.png";import{default as Aa}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2.png";import{default as Ea}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2_overlay.png";import{default as xa}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_1.png";import{default as Ra}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_2.png";import{default as ka}from"mc-assets/dist/other-textures/latest/models/armor/turtle_layer_1.png";import{default as Vr}from"mc-assets/dist/other-textures/latest/entity/elytra.png";var pe={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 Wr={leather_layer_1:_a,leather_layer_1_overlay:wa,leather_layer_2:Aa,leather_layer_2_overlay:Ea,chainmail_layer_1:ua,chainmail_layer_2:fa,iron_layer_1:ba,iron_layer_2:ya,diamond_layer_1:ha,diamond_layer_2:ma,golden_layer_1:pa,golden_layer_2:ga,netherite_layer_1:xa,netherite_layer_2:Ra,turtle_layer_1:ka};var R2=bt(rt),Ma=120,_2=r=>r*(Math.PI/180),w2=r=>Math.max(0,Math.min(1,r)),A2=(r,t,e)=>Math.max(t,Math.min(e,r)),ge=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function Sa(r){return r<0&&(r=4294967295+r+1>>>0),r.toString(16)}function Ca(r){if(r===void 0)return;if(parseInt(r,10)===0)return"rgba(0, 0, 0, 0)";let t=Sa(parseInt(r,10));return t.length===8?`#${t.slice(2,8)}${t.slice(0,2)}`:`#${t}`}function Nr(r,t){return r===void 0?t:r instanceof V.Quaternion?r:Array.isArray(r)?new V.Quaternion(r[0],r[1],r[2],r[3]):new V.Quaternion(r.x,r.y,r.z,r.w)}function st(r,t){return r===void 0?t??new V.Euler:r instanceof V.Euler?r:r.yaw!==void 0&&r.pitch!==void 0&&r.roll!==void 0?new V.Euler(-_2(r.pitch),-_2(r.yaw),_2(r.roll),"ZYX"):r.x!==void 0&&r.y!==void 0&&r.z!==void 0?new V.Euler(r.z,r.y,r.x,"ZYX"):Array.isArray(r)?new V.Euler(r[0],r[1],r[2]):t??new V.Euler}function Yr({username:r,nameTagBackgroundColor:t="rgba(0, 0, 0, 0.3)",nameTagTextOpacity:e=255},{fontFamily:i="mojangles"},n){let s=B0(64,64),o=Ta(n),v=s.getContext("2d");if(!v)throw new Error("Could not get 2d context");let a=48,l=5;v.font=`${a}px ${i}`;let c=String(typeof r=="string"?r:new o(r).toString()).split(`
21186
- `),d=0;for(let p of c){let g=v.measureText(p).width+l*2;g>d&&(d=g)}if(s.width=d,s.height=(a+l)*c.length,v.fillStyle=t,v.fillRect(0,0,s.width,s.height),v.globalAlpha=e/255,!!E1(r,o,s,a,"white",-l+a))return v.globalAlpha=1,s}globalThis.getUsernameTexture=Yr;var Y5=(r,t,e,i)=>{for(let n of e.children)n.name==="nametag"&&n.removeFromParent();if(r.username!==void 0&&!r.username.startsWith("EMPTY")){let n=Yr(r,t,i);if(!n)return;let s=new V.Texture(n);s.needsUpdate=!0;let o;if(r.nameTagFixed){let v=new V.PlaneGeometry,a=new V.MeshBasicMaterial({map:s});a.transparent=!0,o=new V.Mesh(v,a),o.rotation.set(r.pitch,V.MathUtils.degToRad(r.yaw+180),0),o.position.y+=r.height+.3}else{let v=new V.SpriteMaterial({map:s});o=new V.Sprite(v),o.position.y+=r.height+.6}return o.renderOrder=1e3,o.scale.set(n.width*.005,n.height*.005,1),r.nameTagRotationRight&&o.applyQuaternion(r.nameTagRotationRight),r.nameTagScale&&o.scale.multiply(r.nameTagScale),r.nameTagRotationLeft&&o.applyQuaternion(r.nameTagRotationLeft),r.nameTagTranslation&&o.position.add(r.nameTagTranslation),o.name="nametag",e.add(o),o}},jr={},Pa=r=>r.charAt(0)===r.charAt(0).toUpperCase();function Ba(r,t,e,i,n){if(t.name)try{let l=(Pa(t.name)?i2(t.name):t.name).toLowerCase(),c=new ht("1.16.4",l,e,n);if(c.mesh)return Y5(t,i,c.mesh,e.version),c.mesh}catch(l){reportError?.(l)}if(!r||!(0,Qr.isEntityAttackable)(r,t))return;let s=new V.BoxGeometry(t.width,t.height,t.width);s.translate(0,t.height/2,0);let o=new V.MeshBasicMaterial({color:16711935}),v=new V.Mesh(s,o);return(jr[t.name]=(jr[t.name]||0)+1)<6&&Y5({username:t.name,height:t.height},i,v,e.version),v}var K5=class{constructor(t,e){this.worldRenderer=t;this.mcData=e;h(this,"entities",{});h(this,"playerEntity",null);h(this,"entitiesOptions",{fontFamily:"mojangles"});h(this,"debugMode");h(this,"onSkinUpdate");h(this,"clock",new V.Clock);h(this,"currentlyRendering",!0);h(this,"cachedMapsImages",{});h(this,"itemFrameMaps",{});h(this,"pendingModelOverrides",new Map);h(this,"motionCache",new Map);h(this,"_wasThirdPerson",!1);h(this,"_tpBodyYaw",0);h(this,"_tpHasBodyYaw",!1);h(this,"uuidPerSkinUrlsCache",{});h(this,"currentSkinUrls",{});h(this,"loadedSkinEntityIds",new Set);h(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,v=this.motionCache.get(t);if(!v){this.motionCache.set(t,{pos:o.clone(),speed:0}),s.isMoving=!1,s.isRunning=!1,s.moveAmount=0,s.runAmount=0;return}let a=o.x-v.pos.x,l=o.z-v.pos.z;v.pos.copy(o);let c=Math.hypot(a,l)/Math.max(i,1e-6),d=1-Math.exp(-i*12);v.speed+=(c-v.speed)*d;let m=v.speed,p=(x,S,z)=>{let B=w2((z-x)/(S-x));return B*B*(3-2*B)},g=.08,y=.6,w=4.3,_=5.6,E=p(g,y,m),C=p(w,_,m);s.moveAmount=E,s.runAmount=C,s.isMoving=E>.15,s.isRunning=C>.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,v=w2(i?.moveAmount??(i?.isMoving?1:0)),a=w2(i?.runAmount??(i?.isRunning?1:0)),l=v>.15;if(this._tpHasBodyYaw||(this._tpHasBodyYaw=!0,this._tpBodyYaw=s),l){let g=1-Math.exp(-e*(18+10*a));this._tpBodyYaw=this._tpBodyYaw+ge(s-this._tpBodyYaw)*g,t.rotation.set(0,this._tpBodyYaw,0);let y=(25-8*a)*Math.PI/180,w=A2(ge(s-this._tpBodyYaw),-y,y);i&&"lookYaw"in i&&(i.lookYaw=w),i&&"lookPitch"in i&&(i.lookPitch=-o);return}let c=85*Math.PI/180,d=55*Math.PI/180,m=ge(s-this._tpBodyYaw);m=A2(m,-c,c);let p=Math.abs(m)-d;if(p>0){let g=p/(c-d),y=s-Math.sign(m)*d,w=1-Math.exp(-e*(6+10*g));this._tpBodyYaw=this._tpBodyYaw+ge(y-this._tpBodyYaw)*w,m=ge(s-this._tpBodyYaw),m=A2(m,-c,c)}else{let g=1-Math.exp(-e*5);this._tpBodyYaw=this._tpBodyYaw+ge(s-this._tpBodyYaw)*(g*.15)}t.rotation.set(0,this._tpBodyYaw,0),i&&"lookYaw"in i&&(i.lookYaw=m),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 V.Group;e.originalEntity={...t,name:"player"};let i=new V.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,rt)}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),N0(t);this.entities={},this.currentSkinUrls={},this.motionCache.clear(),this._wasThirdPerson=!1,this._tpHasBodyYaw=!1,this.playerEntity&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.playerEntity),N0(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 ht&&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 v=String(this.playerEntity?.originalEntity.id??"player_entity");this.motionCache.delete(v);let a=this.playerEntity?.playerObject?.animation;a?.resetLocomotion&&a.resetLocomotion(),this._tpHasBodyYaw=!1}for(let[v,a]of[...Object.entries(this.entities),["player_entity",this.playerEntity]]){if(!a)continue;let l=v==="player_entity",c=String(l?this.playerEntity?.originalEntity.id??"player_entity":v);if(l)if(a.visible=o,o){let m=this.worldRenderer.playerStateReactive.eyeHeight;a.position.set(this.worldRenderer.cameraWorldPos.x,this.worldRenderer.cameraWorldPos.y-m,this.worldRenderer.cameraWorldPos.z);let p=this.worldRenderer.playerStateReactive.position;if(p&&typeof p.x=="number")this.updateAutoWalkFlags(c,a,e,new V.Vector3(p.x,p.y,p.z));else{let g=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,e,g?new V.Vector3(g.x,g.y,g.z):a.position)}this.updateThirdPersonHeadAndBody(a,i)}else{let m=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,e,m?new V.Vector3(m.x,m.y,m.z):a.position)}else{let m=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,e,m?new V.Vector3(m.x,m.y,m.z):a.position)}let{playerObject:d}=a;if(d?.animation){let m=d.animation,g=(Number(a.originalEntity?.metadata?.[0]??0)&2)!==0,y=this.getLocalSneak();"isCrouched"in m&&(m.isCrouched=l?y:g),d.animation.update(d,i)}if(a.traverse(m=>{m instanceof ht&&m.update(i)}),!l&&n&&a.position){let m=a.position.x-n.x,p=a.position.y-n.y,g=a.position.z-n.z,y=m*m+p*p+g*g;a.visible=!!(y<s||this.worldRenderer.shouldObjectVisible(a)),this.maybeRenderPlayerSkin(v)}a.visible&&this.syncArmorPositions(a)}}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!==rt&&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 v=this.getPlayerObject(t);if(!v)return;if(n===!0){if(!e)return;let l=await ne(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 ne(e,"cape");if(!this.getPlayerObject(t)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(t,s)}return}n!==rt&&(this.currentSkinUrls[String(t)]=n);let a=this.worldRenderer.worldRendererConfig.renderEars||e==="deadmau5";this.loadAndApplySkin(t,n,a).then(async()=>{if(s){if(s===!0&&e){let l=await ne(e,"cape");if(!this.getPlayerObject(t)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(t,s)}}),v.cape.visible=!1,s||(v.backEquipment=null,v.elytra.map=null,v.cape.map&&v.cape.map.dispose(),v.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,v;if(e===rt){o=await R2;let l=B0(64,64),c=l.getContext("2d");if(!c)throw new Error("Failed to get context");c.drawImage(o.image,0,0),v=l}else{let{canvas:l,image:c}=await Fe(e);s=c,o=new V.CanvasTexture(l),v=l}o.magFilter=V.NearestFilter,o.minFilter=V.NearestFilter,o.needsUpdate=!0,n.skin.map=o,n.skin.modelType=H1(v),n.skin.isCustom=e!==rt;let a;if(s?i&&(a=document.createElement("canvas"),O1(a,s),i=!this.isCanvasBlank(a)):i=!1,i){let l=new V.CanvasTexture(a);l.magFilter=V.NearestFilter,l.minFilter=V.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 Fe(e);if(i=this.getPlayerObject(t),!i)return;z1(n,s);let o=new V.CanvasTexture(n);o.magFilter=V.NearestFilter,o.minFilter=V.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"?Xe.default.simplify(Xe.default.parse(t)):x2.simplify(t);return X1(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=Bn(this.worldRenderer.material,s.resolvedModel,s.modelName,this.worldRenderer.resourcesManager.currentResources.worldBlockProvider,this.worldRenderer.resourcesManager.currentResources.mcData),v=1;e["minecraft:display_context"]==="ground"?v=.5:e["minecraft:display_context"]==="thirdperson"&&(v=6),o.scale.set(v,v,v);let a=new V.Group;return a.add(o),{mesh:a,isBlock:!0,modelName:s.modelName}}if(s){let o=s.renderInfo?.texture==="blocks"?this.worldRenderer.material.map:this.worldRenderer.itemsTexture,{u:v,v:a,su:l,sv:c}=s,p=In(o,{u:v,v:a,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),N0(n),delete this.entities[t.id];return}let o;if(n===void 0){this.beforeEntityAdded(t);let p=new V.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 w=t.name==="tnt"||t.type==="projectile"?{name:t.name}:t.name==="falling_block"?{blockState:t.objectData}:t.metadata?.find(_=>typeof _=="object"&&_?.itemCount);if(w){let _=this.getItemMesh(w,{"minecraft:display_context":"ground"},t.type==="projectile");if(_){if(o=_.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 E=new V.Clock;o.onBeforeRender=()=>{let C=E.getDelta();o.rotation.y+=C}}p.additionalCleanup=()=>{_.cleanup&&_.cleanup()}}}}else if(i){let w=new V.Group,_=this.setupPlayerObject(t,w,e);if(p.playerObject=_,o=w,t.username){let E=Y5(t,{fontFamily:"mojangles"},w,this.worldRenderer.version);E&&(E.position.y=_.position.y+_.scale.y*16+3,E.scale.multiplyScalar(12))}}else o=Ba(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 y=new V.BoxHelper(o,t.type==="hostile"?16711680:t.type==="mob"?65280:t.type==="player"?255:16753920);y.name="debug",p.add(o),p.add(y),y.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||rt),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 v=Kr(t,this.mcData),a=(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=!a);v.baby?n.scale.set(.5,.5,.5):n.scale.set(1,1,1);let l=Q5("text_display",t,this.mcData),c=l?.text||v.custom_name_visible&&v.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)?Ca(l.background_color):void 0,y;if(l?.text_opacity){let w=parseInt(l?.text_opacity,10);y=w>0?w:256-w}Y5({...t,username:typeof c=="string"?Xe.default.simplify(Xe.default.parse(c)):x2.simplify(c),nameTagBackgroundColor:g,nameTagTextOpacity:y,nameTagFixed:p,nameTagScale:l?.scale,nameTagTranslation:l&&(l.translation||new V.Vector3(0,0,0)),nameTagRotationLeft:Nr(l?.left_rotation),nameTagRotationRight:Nr(l?.right_rotation)},this.entitiesOptions,o,this.worldRenderer.version)}let d=Q5("armor_stand",t,this.mcData);if(d){let p=(parseInt(d.client_flags,10)&1)!==0,g=(parseInt(d.client_flags,10)&4)!==0,y=(parseInt(d.client_flags,10)&8)===0,w=(parseInt(d.client_flags,10)&16)!==0;o.castShadow=!w,o.receiveShadow=!w,p?n.scale.set(.5,.5,.5):n.scale.set(1,1,1),n.traverse(_=>{switch(_.name){case"bone_baseplate":this.setVisible(_,y),_.rotation.y=-n.rotation.y;break;case"bone_head":d.head_pose&&_.setRotationFromEuler(st(d.head_pose));break;case"bone_body":d.body_pose&&_.setRotationFromEuler(st(d.body_pose));break;case"bone_rightarm":_.parent?.name!=="bone_armor"&&this.setVisible(_,g),d.left_arm_pose?_.setRotationFromEuler(st(d.left_arm_pose)):_.setRotationFromEuler(st({yaw:-10,pitch:-10,roll:0}));break;case"bone_leftarm":_.parent?.name!=="bone_armor"&&this.setVisible(_,g),d.right_arm_pose?_.setRotationFromEuler(st(d.right_arm_pose)):_.setRotationFromEuler(st({yaw:10,pitch:-10,roll:0}));break;case"bone_rightleg":d.left_leg_pose?_.setRotationFromEuler(st(d.left_leg_pose)):_.setRotationFromEuler(st({yaw:-1,pitch:-1,roll:0}));break;case"bone_leftleg":d.right_leg_pose?_.setRotationFromEuler(st(d.right_leg_pose)):_.setRotationFromEuler(st({yaw:1,pitch:1,roll:0}));break}})}let m=Q5("item_frame",t,this.mcData);if(m||(m=Q5("glow_item_frame",t,this.mcData)),m){let p=m?.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_")){N0(g);let y=parseInt(g.name.split("_")[1],10);return this.itemFrameMaps[y]=this.itemFrameMaps[y]?.filter(w=>w!==g),g instanceof V.Mesh&&g.material?.map?.dispose(),!0}else if(g.name==="item")return N0(g),!0;return!1})?.removeFromParent(),p&&(p.itemId??p.blockId??0)!==0){let g=m.rotation??0,y=p.nbtData?.value?.map?.value??p.components?.find(w=>w.type==="map_id")?.data;if(y)o.scale.set(16/12,16/12,1),this.addMapModel(n,y,g);else{let w=this.getItemMesh(p,{"minecraft:display_context":"fixed"});w&&(w.mesh.position.set(0,0,-.05),w.isBlock?w.mesh.scale.set(.25,.25,.25):w.mesh.scale.set(.5,.5,.5),w.mesh.rotateY(Math.PI),w.mesh.rotateZ(-g*Math.PI/4),w.mesh.name="item",n.add(w.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:Ma;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 M0(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),v=2*o%(Math.PI*2)-o;new M0(n.rotation).to({y:n.rotation.y+v},s).start()}if(n?.playerObject&&i?.rotation?.head){let{playerObject:o}=n,v=i.rotation.head.y?i.rotation.head.y-t.yaw:0;o.skin.head.rotation.y=-v,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),v=(s?new V.Vector3(s.x,s.y,s.z):e.position.clone().add(new V.Vector3(this.worldRenderer.sceneOrigin.x,this.worldRenderer.sceneOrigin.y,this.worldRenderer.sceneOrigin.z))).distanceTo(n);if(v<i&&v<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 v=new V.MeshLambertMaterial(o),a=new V.Mesh(new V.PlaneGeometry(1,1),v);a.rotation.set(0,Math.PI,0),t.add(a);let l=!0;t.traverseVisible(c=>{c.name==="geometry_frame"&&(l=!1)}),l?a.position.set(0,0,.499):a.position.set(0,0,.437),a.rotateZ(Math.PI*2-i*Math.PI/2),a.name=`map_${e}`,s||(a.visible=!1),this.itemFrameMaps[e]||(this.itemFrameMaps[e]=[]),this.itemFrameMaps[e].push(a)}loadMap(t){let e=new V.TextureLoader().load(t);return e&&(e.magFilter=V.NearestFilter,e.minFilter=V.NearestFilter,e.needsUpdate=!0),e}addItemModel(t,e,i,n=!1){let s=`bone_${e}item`,o=`custom_item_${e}`;if(t.traverse(a=>{a.name===o&&(a.removeFromParent(),a.additionalCleanup&&a.additionalCleanup())}),!i)return;let v=this.getItemMesh(i,{"minecraft:display_context":"thirdperson"});v?.mesh&&t.traverse(a=>{if(a.name.toLowerCase()===s||a.name===`${e}Arm`){let l=new V.Object3D;l.additionalCleanup=()=>{v.cleanup&&v.cleanup()};let c=v.mesh;l.rotation.z=-Math.PI/16,v.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,a.add(l)}})}handleDamageEvent(t,e){let i=this.entities[t]?.children.find(n=>n.name==="mesh");i&&i.traverse(n=>{if(n instanceof V.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 M0(n.material.color).to(o,500).start()}})}raycastSceneDebug(){let t=new V.Raycaster;return t.setFromCamera(new V.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 Ge;n.realPlayerUuid=t.uuid??"",n.realUsername=t.username??"",n.position.set(0,16,0),n.traverse(o=>{o instanceof V.Mesh&&o.material instanceof V.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 j5,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),$e(this.worldRenderer,t,"feet",e.equipment[2]),$e(this.worldRenderer,t,"legs",e.equipment[3],2),$e(this.worldRenderer,t,"chest",e.equipment[4]),$e(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,Vr),n.cape.map===null&&(n.cape.visible=!1)}}};function Kr(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 Q5(r,t,e){if(t.name===r)return Kr(t,e)}function $e(r,t,e,i,n=1,s=!1){if(!i){E2(t,e);return}let o=i.name.split("_"),v,a=e==="head"&&i.name==="player_head";if(a)if(E2(t,e),i.nbt){let g=x2.simplify(i.nbt);try{let y;if(g.SkullOwner?y=g.SkullOwner.Properties.textures[0]?.Value:y=g["minecraft:profile"]?.Properties?.find(w=>w.name==="textures")?.value,y){v=JSON.parse(F.from(y,"base64").toString()).textures?.SKIN?.url;let{skinTexturesProxy:_}=r.worldRendererConfig;_&&(v=v?.replace("http://textures.minecraft.net/",_).replace("https://textures.minecraft.net/",_))}}catch{}}else v=rt;let l=o[0];if(!v){let g=`${l}_layer_${n}${s?"_overlay":""}`;v=r.resourcesManager.currentResources.customTextures.armor?.textures[g]?.src??Wr[g]}if(!v||!pe[e]){E2(t,e);return}let c=`geometry_armor_${e}${s?"_overlay":""}`,d=t.children.findLast(g=>g.name===c),m;if(d?(m=d.material,S5(v,g=>{g.magFilter=V.NearestFilter,g.minFilter=V.NearestFilter,g.flipY=!1,g.wrapS=V.MirroredRepeatWrapping,g.wrapT=V.MirroredRepeatWrapping,m.map=g})):(d=he(r,v,pe[e]),e==="head"&&(d.children[0].position.y+=.01),d.name=c,m=d.material,a||(m.side=V.DoubleSide)),l==="leather"&&!s){let g=i.nbt?.value?.display?.value?.color?.value;if(g){let y=g>>16&255,w=g>>8&255,_=g&255;m.color.setRGB(y/255,w/255,_/255)}else m.color.setHex(11890001);$e(r,t,e,i,n,!0)}else m.color.setHex(16777215);let p=new V.Object3D;p.name=`armor_${e}${s?"_overlay":""}`,p.add(d),t.add(d)}function E2(r,t){for(let e of r.children)(e.name===`geometry_armor_${t}`||e.name===`geometry_armor_${t}_overlay`)&&e.removeFromParent()}var Je=async(r,t)=>{let e;if(!r&&!t)e=await R2;else{if(r||(r=await ne(t,"skin")),!r)return;let{canvas:a}=await Fe(r);e=new T0.CanvasTexture(a)}e.magFilter=T0.NearestFilter,e.minFilter=T0.NearestFilter;let i=new T0.BoxGeometry,n=new T0.MeshStandardMaterial,s=!1,o=new T0.Mesh(i,n);o.scale.x=s?3:4,o.scale.y=12,o.scale.z=4,za(i,40,16,s?3:4,12,4),n.map=e,n.needsUpdate=!0;let v=new T0.Group;return v.add(o),v.scale.set(.1,.1,.1),o.rotation.z=Math.PI,v};function Ia(r,t,e,i,n,s,o,v){let a=(B,I,W,O)=>[new T0.Vector2(B/o,1-O/v),new T0.Vector2(W/o,1-O/v),new T0.Vector2(W/o,1-I/v),new T0.Vector2(B/o,1-I/v)],l=a(t+s,e,t+i+s,e+s),c=a(t+i+s,e,t+i*2+s,e+s),d=a(t,e+s,t+s,e+s+n),m=a(t+s,e+s,t+i+s,e+s+n),p=a(t+i+s,e+s,t+i+s*2,e+n+s),g=a(t+i+s*2,e+s,t+i*2+s*2,e+n+s),y=r.attributes.uv,w=[p[3],p[2],p[0],p[1]],_=[d[3],d[2],d[0],d[1]],E=[l[3],l[2],l[0],l[1]],C=[c[0],c[1],c[3],c[2]],x=[m[3],m[2],m[0],m[1]],S=[g[3],g[2],g[0],g[1]],z=[];for(let B of[w,_,E,C,x,S])for(let I of B)z.push(I.x,I.y);y.set(new Float32Array(z)),y.needsUpdate=!0}function za(r,t,e,i,n,s){Ia(r,t,e,i,n,s,64,64)}R();k();M();T();import*as z0 from"three";import{Vec3 as k2}from"vec3";var Jr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAALUlEQVR42mP4//8/IyWYYdSAwW6Ara3tf4oMmD179n9ChhD0AsiQ0Wgc7AYAAOqH+zNQ3r9kAAAAAElFTkSuQmCC";var qr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAOklEQVR42mP4//8/IyWYYdQA3AbY2tr+H1gDZs+e/R9mCD7D8IYBzBAQTXYgEvIKQQPw2T6aEqlkAADEA/W3ycLXvwAAAABJRU5ErkJggg==";var Zr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVR42mP4//8/IyWYYRgbYGtr+39wGQDiYzMUpwGzZ8+GawDRID4IkxSIMEOwaSQ6FgiFBW0NIOR8osJgBOQFALo37sVTOo/LAAAAAElFTkSuQmCC";var Xr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWElEQVR42mP4//8/IyWYYXAbYGtr+59sA0CaZ8+eTZkBhNg4DQApQlYIcglMDN1VWA0AKYJpQvYONi/hDUSYIfjCgmA0EooJ2hmAK9CINgBXoA2xvEAMBgBGPud3dYZtOQAAAABJRU5ErkJggg==";var $r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAYklEQVR42r1TQQrAMAxyD8tL89iMHgQJoQxHewi0UsWYFFX1/CkcF4iIsgUWOTM9ASV3F3rHF+v9rK4wEVnEFoFYbwmTbRZFFN9m0B9QZBfk2THaAhqktQdTkHYL9iZe+40vs7nda+BuVOMAAAAASUVORK5CYII=";var t6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAcElEQVR42rWTWwpAIQhEbWGu1MUaXRgQcXpyP8SIPI1jibu3l5DfAKrqyFgfAczsKxx5xJUCFGYFUZXMpOe9CAa8BOS+0U5UVbYQ6Siqbi0BFT0auTSRHZqNkE6BGXgEYKYtAczIbQAz8ukzXT3l3egz49IXvXQCVAAAAABJRU5ErkJggg==";var e6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAeElEQVQ4jaWSQQ4AIQgD9WG8tI/tnkgaUgmuBw8YHcqERXK/nOUuI4JPAABMSESwA1qAQgAQwBygnfNjTaCpWoBzUlNZQJ07x9FUdgSlV5FaW4Cjq8isW8BJ2GgPtEuVdr0HKvLXHjiRI0An8jTKqo9dF000cnBzPgKuxXtbq/m1AAAAAElFTkSuQmCC";var i6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhUlEQVR42qWTSRKAMAgE8WF5KY/FygEL2yEp9cAhCz0wJBYRx58wbowxYsZngLvHjITsgNYpJySBrPIBUMqZSHhdSw+oQlgVa01U7VRQ7huTk67aUWZaVyaNZFsSQBCTVBW3KahLyo/lQ6KR1Y+2BTUyGqke1AXoxsSzpYlU3FW0/Exv1ie0hq53Bf15aAAAAABJRU5ErkJggg==";var n6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAmklEQVR42o2SYQ6FMAiDeQfbSXdYXjSpqd869QeZQiilpbr7l2KM0cc75+xUV77YpGCjAPUqitMU3uCAXrsAlPSCcgJMbG4M0mQ1Etz/i0KlXQnmwyqpv1uH4h7fiws7ISneTYNEk0ImCxcAArGJrE4AXhypPtl7AqTdeJG8k3gHb0L6QfmK9WQTa59cSFdHRssKFHHngteV/wPDepaHIu0QVAAAAABJRU5ErkJggg==";var r6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAoUlEQVR42n2Tyw3AIAxD3cGYlGFTUSmV+2o4IEEAf2JQVV1rjDGq576ec5avWVdfWIW12aMPEJBEImoPv+CAvvcCODsVNWBS8wA4A5ndv1/ytciQvBLMyeTSHD3ZYXPXXH7Y0ZMdJvCxQJls5O6tKHlPPWGEfU58WZR6ive1kKSleFNC2kXGRnrcDqhTTOmPeP3pAZnTq6Oin4X0oXbfnNZu626Io6lqGCwAAAAASUVORK5CYII=";var J5=class{constructor(t){this.worldRenderer=t;h(this,"_cursorLinesHidden",!1);h(this,"cursorLineMaterial");h(this,"interactionLines",null);h(this,"prevColor");h(this,"blockBreakMesh");h(this,"breakTextures",[]);let e=[Jr,qr,Zr,Xr,$r,t6,e6,i6,n6,r6];for(let n=0;n<10;n++)bt(e[n]).then(s=>{s.magFilter=z0.NearestFilter,s.minFilter=z0.NearestFilter,this.breakTextures.push(s)});let i=new z0.MeshBasicMaterial({transparent:!0,blending:z0.MultiplyBlending,alphaTest:.5});this.blockBreakMesh=new z0.Mesh(new z0.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 jt({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:v}=i,a=new k2(n.x,n.y,n.z);this.blockBreakMesh.scale.set(s*1.001,o*1.001,v*1.001),a.add(new k2(t.x,t.y,t.z)),this.blockBreakMesh.position.set(a.x,a.y,a.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)&&ja(e??[],this.interactionLines.shapePositions??[])&&!i||(this.interactionLines!==null&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.interactionLines.mesh),this.interactionLines=null),t===null))return;let n=new z0.Group;for(let{position:s,width:o,height:v,depth:a}of e??[]){let l=new k2(s.x,s.y,s.z),c=[1.0001*o,1.0001*v,1.0001*a],d=new z0.BoxGeometry(...c),m=new Nt().fromEdgesGeometry(new z0.EdgesGeometry(d)),p=new Ze(m,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()}},ja=(r,t)=>{if(r.length!==t.length)return!1;for(let[e,i]of r.entries())if(i!==t[e])return!1;return!0};R();k();M();T();R();k();M();T();var Qa=Me($1(),1);import s6 from"prismarine-nbt";import{getItemDefinition as Ya}from"mc-assets/dist/itemDefinitions";var Ka=(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 v=o.get("custom_name")||o.get("item_name");v&&(e=typeof v.data=="string"?v.data:s6.simplify(v.data));let a=o.get("item_model");if(a&&(i=a.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=s6.simplify(r.nbt),v=o.display?.Name;v&&(e=v),s&&o.CustomModelData&&s[o.CustomModelData]&&(i=s[o.CustomModelData])}return{customText:e,customModel:i}};var o6=(r,t,e,i)=>{let n=r.name,{customModel:s}=Ka(r,e);s&&(n=s);let o=Mi(i,{...t}),v=Ya(e.currentResources.itemsDefinitionsStore,{name:n,version:e.currentResources.version,properties:o})?.model;return(v==="minecraft:special"?void 0:v)??n};R();k();M();T();var u6=Me(c6(),1);import{versionToNumber as d6}from"mc-assets/dist/utils";var f6=(r,t,e=!1,i=!1)=>{let n=r.modelName,s=globalThis.loadedData.itemsByName[n];d6(t.currentResources.version)<d6("1.13")&&(n=(0,u6.getRenamedData)(s?"items":"blocks",n,t.currentResources.version,"1.13.1"));let o;if(!i){let a=t.currentResources?.guiAtlas?.json,l=d=>d&&a?.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*a.width,m=c.v*a.height;return{texture:"gui",slice:[d,m,a.tileSize,a.tileSize],scale:.25,blockData:null,modelName:null}}}let v=a=>a.top??a;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(a){reportError?.(`Failed to render item ${n} (original: ${r.originalItemName}) on ${t.currentResources.version} (resourcepack: TODO!): ${a.stack}`),o=v(t.currentResources.itemsRenderer.getItemTexture("errored"))}return o??(o=v(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 h6=(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 v=o?globalThis.loadedData.blocksByStateId[o]?.name:typeof s=="number"?globalThis.loadedData.items[s]?.name:s;if(!v)throw new Error(`Item not found: ${s}`);let a=o6({...r,name:v},t,e,i),l=f6({modelName:a},e,!1,!0);if(!l)throw new Error(`Failed to get render info for item ${v}`);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,m,p,g]=l.slice,[y,w,_,E]=[d/c.width,m/c.height,p/c.width,g/c.height];return{u:y,v:w,su:_,sv:E,renderInfo:l,modelName:l.modelName}}throw new Error(`Invalid render info for item ${v}`)}catch(v){return reportError?.(v),{u:0,v:0,su:16/n.blocksAtlasImage.width,sv:16/n.blocksAtlasImage.width,modelName:"missing"}}};R();k();M();T();import*as ye from"three";var Z5=class{constructor(t){this.worldRenderer=t;h(this,"audioListener");h(this,"activeSounds",new Set);h(this,"audioContext");h(this,"soundVolumes",new Map);h(this,"baseVolume",1);t.onWorldSwitched.push(()=>{this.stopAll()}),t.onReactiveConfigUpdated("volume",e=>{this.changeVolume(e)})}initAudioListener(){this.audioListener||(this.audioListener=new ye.AudioListener,this.worldRenderer.camera.add(this.audioListener))}playSound(t,e,i=1,n=1,s=500){this.initAudioListener();let o=new ye.PositionalAudio(this.audioListener);this.activeSounds.add(o),this.soundVolumes.set(o,i);let v=new ye.AudioLoader,a=Date.now();v.loadAsync(e).then(l=>{Date.now()-a>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),v.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")}};R();k();M();T();import*as $0 from"three";var X5=class{constructor(t,e){this.worldRenderer=t;this.onRenderCallbacks=e;h(this,"rollAngle",0);h(this,"rollAnimation");h(this,"basePitch",0);h(this,"baseYaw",0);e.push(()=>{this.update()})}get damageRollAmount(){return 5}get damageAnimDuration(){return 200}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 $0.Quaternion().setFromAxisAngle(new $0.Vector3(0,1,0),this.baseYaw);t.setRotationFromQuaternion(e)}else{let e=this.addAntiZfightingOffset(this.basePitch),i=this.addAntiZfightingOffset(this.baseYaw),n=new $0.Quaternion().setFromAxisAngle(new $0.Vector3(1,0,0),e),s=new $0.Quaternion().setFromAxisAngle(new $0.Vector3(0,1,0),i),o=new $0.Quaternion().setFromAxisAngle(new $0.Vector3(0,0,1),$0.MathUtils.degToRad(this.rollAngle)),v=s.multiply(n).multiply(o);t.setRotationFromQuaternion(v)}}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}};R();k();M();T();import*as Y from"three";var $5=class{constructor(t){this.worldRenderer=t;h(this,"customMedia",new Map);h(this,"lastCheck",0);h(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 v=s.getContext("2d");if(!v)return new Y.CanvasTexture(s);v.clearRect(0,0,s.width,s.height),v.fillStyle=`rgba(${i>>16&255}, ${i>>8&255}, ${i&255}, 1)`,v.fillRect(0,0,s.width,s.height),v.fillStyle="#ff0000",v.font="bold 10px sans-serif",v.textAlign="center",v.textBaseline="middle",v.fillText(n,s.width/2,s.height/2,s.width);let a=new Y.CanvasTexture(s);return a.minFilter=Y.LinearFilter,a.magFilter=Y.LinearFilter,a}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 Y.CanvasTexture(s);let v=i>>16&255,a=i>>8&255,l=i&255;o.fillStyle=`rgba(${v}, ${a}, ${l}, ${n})`,o.fillRect(0,0,1,1);let c=new Y.CanvasTexture(s);return c.minFilter=Y.NearestFilter,c.magFilter=Y.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 v=e.src.endsWith(".png")||e.src.endsWith(".jpg")||e.src.endsWith(".jpeg")||e.imageOverride;n&&!e.imageOverride&&fetch(e.src,{method:"HEAD"}).then(x=>{x.headers.get("content-type")?.startsWith("image/")&&(this.destroyMedia(t),this.addMedia(t,{...i,src:e.src,imageOverride:!0}))}).catch(console.error);let a,l;if(!v){a=document.createElement("video"),a.src=e.src.endsWith(".gif")?e.src.replace(".gif",".mp4"):e.src,a.loop=e.loop??!0;let x=(e.volume??1)*this.worldRenderer.worldRendererConfig.volume;a.volume=Math.min(x,1),a.playsInline=!0,a.crossOrigin="anonymous";let S=this.worldRenderer.soundSystem;if(S.initAudioListener(),!S.audioListener)throw new Error("Audio listener not initialized");l=new Y.PositionalAudio(S.audioListener),l.setRefDistance(6),l.setVolume(x),this.worldRenderer.sceneOrigin.addAndTrack(l),l.position.set(e.position.x,e.position.y,e.position.z),l.setMediaElementSource(a),l.connect(),a.addEventListener("pause",()=>{l?.pause(),globalThis.tempSendVideoStop?.(t,"paused",a.currentTime)}),a.addEventListener("play",()=>{l?.play(),globalThis.tempSendVideoPlay?.(t)}),a.addEventListener("seeked",()=>{l&&a&&(l.offset=a.currentTime)}),a.addEventListener("stalled",()=>{globalThis.tempSendVideoStop?.(t,"stalled",a.currentTime)}),a.addEventListener("waiting",()=>{globalThis.tempSendVideoStop?.(t,"waiting",a.currentTime)}),a.addEventListener("error",({error:z})=>{globalThis.tempSendVideoStop?.(t,`error: ${z}`,a.currentTime)}),a.addEventListener("ended",()=>{globalThis.tempSendVideoStop?.(t,"ended",a.currentTime),e.loop||(a.currentTime=0,C.ended=!0)})}let c=this.createBackgroundTexture(e.size.width,e.size.height,e.background),d=x=>{let S=this.createErrorTexture(e.size.width,e.size.height,e.background,x);g.map=S,g.needsUpdate=!0},m=new Y.PlaneGeometry(1,1),p=e.allowLighting?Y.MeshLambertMaterial:Y.MeshBasicMaterial,g=new p({map:c,transparent:!0,side:e.doubleSide?Y.DoubleSide:Y.FrontSide,alphaTest:.1}),y=a?new Y.VideoTexture(a):new Y.TextureLoader().load(e.src,()=>{this.customMedia.get(t)?.texture===y&&(g.map=y,g.needsUpdate=!0)},void 0,()=>d());y.minFilter=Y.NearestFilter,y.magFilter=Y.NearestFilter,y.generateMipmaps=!1;let w=new Y.Mesh(m,g),{mesh:_}=this.positionMeshExact(w,Y.MathUtils.degToRad((e.rotation??0)*90),e.position,e.size.width,e.size.height);s.add(_),a&&(w.onBeforeRender=()=>{a.readyState===a.HAVE_ENOUGH_DATA&&(!a.paused||!C?.hadAutoPlayError)&&(g.map!==y&&(g.map=y,g.needsUpdate=!0),y.needsUpdate=!0,l&&(l.position.copy(_.position),l.rotation.copy(_.rotation)))});let E=x=>{let S=m.attributes.uv.array;S[0]=x.startU,S[1]=x.startV,S[2]=x.endU,S[3]=x.startV,S[4]=x.endU,S[5]=x.endV,S[6]=x.startU,S[7]=x.endV,m.attributes.uv.needsUpdate=!0};e.uvMapping&&E(e.uvMapping);let C={mesh:_,video:a,texture:y,updateUVMapping:E,positionalAudio:l,props:i,hadAutoPlayError:!1,pausedBecuaseHidden:!1,ended:!1,handleError(x){if(C.destroyed)return;let S=z=>z;d(x.name==="NotAllowedError"||x.name==="AbortError"?S("Waiting for user interaction"):S("Failed to auto play"))}};return this.customMedia.set(t,C),a&&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 Y.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 v=new Y.Group;v.add(t);let a=new Y.Mesh(new Y.BoxGeometry(.1,.1,.1),new Y.MeshBasicMaterial({color:16711680}));a.position.set(i.x,i.y,i.z),v.add(a);let l=i.x+Math.cos(e)*n,c=i.z+Math.sin(e)*n,d=new Y.Mesh(new Y.BoxGeometry(.1,.1,.1),new Y.MeshBasicMaterial({color:255}));d.position.set(i.x,i.y+s,i.z),v.add(d);let m=new Y.Mesh(new Y.BoxGeometry(.1,.1,.1),new Y.MeshBasicMaterial({color:16776960}));m.position.set(l,i.y,c),v.add(m);let p=new Y.Mesh(new Y.BoxGeometry(.1,.1,.1),new Y.MeshBasicMaterial({color:16711935}));p.position.set(l,i.y+s,c),v.add(p);let g=new Y.Vector3(this.worldRenderer.sceneOrigin.toSceneX(i.x),this.worldRenderer.sceneOrigin.toSceneY(i.y),this.worldRenderer.sceneOrigin.toSceneZ(i.z)),y=new Y.ArrowHelper(new Y.Vector3(Math.cos(e),0,Math.sin(e)),g,1,16711680);return v.add(y),{mesh:t,debugGroup:v}}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 Y.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 Y.Raycaster,n=new Y.Vector2(0,0);i.setFromCamera(n,t);let s=i.intersectObjects(e.children,!0);if(s.length>0){let o=s[0],v=o.object;for(let[a,l]of this.customMedia.entries())if(v===l.mesh||l.mesh.children.includes(v)){let{uv:c}=o;if(c){let d={id:a,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),v=o?.props.controlMode;if(o?.video&&(v?.mouseButton==="both"||v?.mouseButton===t))switch(v?.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}}}}};R();k();M();T();import*as wt from"three";R();k();M();T();import*as h0 from"three";var et={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 m6(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)??et.DEFAULT_VISUAL_SCALE,s=r.opacity??r.metadata?.opacity??(typeof window>"u"?void 0:window.serverMetadata?.waypointOpacity)??et.DEFAULT_OPACITY,o=$a(t,r.label??"","0m",e,n);o.renderOrder=10,o.material.opacity=s;let v=r.label??"",a="0m",l=0,c,d=null,m=et.ARROW.enabledDefault,p=new h0.Group;p.add(o);let{x:g,y,z:w}=r.position;p.position.set(g,y,w);function _(N){let Z=t1(N,v,"0m",n),J=new h0.CanvasTexture(Z),s0=o.material;s0.map?.dispose(),s0.map=J,s0.needsUpdate=!0}function E(N){v=N??"";let Z=t1(t,v,"0m",n),J=new h0.CanvasTexture(Z),s0=o.material;s0.map?.dispose(),s0.map=J,s0.needsUpdate=!0}function C(N,Z){if(Z===a)return;a=Z;let J=t1(t,N,Z,n),s0=new h0.CanvasTexture(J),o0=o.material;o0.map?.dispose(),o0.map=s0,o0.needsUpdate=!0}function x(N){o.visible=N}function S(N,Z,J){p.position.set(N,Z,J)}function z(N,Z,J,s0){let o0=Z*Math.PI/180,$=Math.tan(o0/2)*2*J*(et.TARGET_SCREEN_PX*n/s0);o.scale.set($,$,1)}function B(){if(c)return;let N=128,Z=B0(N,N),J=Z.getContext("2d");J.clearRect(0,0,N,N),J.beginPath(),J.moveTo(N*.15,N*.5),J.lineTo(N*.85,N*.5),J.lineTo(N*.5,N*.15),J.closePath();let s0=`#${t.toString(16).padStart(6,"0")}`;J.lineWidth=6,J.strokeStyle="black",J.stroke(),J.fillStyle=s0,J.fill();let o0=new h0.CanvasTexture(Z),f0=new h0.SpriteMaterial({map:o0,transparent:!0,depthTest:!1,depthWrite:!1,opacity:s});c=new h0.Sprite(f0),c.renderOrder=12,c.visible=!1,d&&d.add(c)}function I(N){m=N,!N&&c&&(c.visible=!1)}function W(N){c?.parent&&c.parent.remove(c),d=N,c&&N&&N.add(c)}function O(N,Z,J){if(!m||(B(),!c))return!0;let s0=r.metadata?.onlyLeftRight===!0,o0=new h0.Vector3;N.getWorldDirection(o0);let f0=N.up.clone().normalize(),$=new h0.Vector3().copy(o0).cross(f0).normalize(),g0=new h0.Vector3().copy($).cross(o0).normalize(),ot=new h0.Vector3().setFromMatrixPosition(N.matrixWorld),W0=new h0.Vector3(p.position.x,p.position.y,p.position.z).sub(ot),Q0=W0.dot(o0),Rt=W0.dot($),kt=W0.dot(g0),Y0=Z/J,it=N.fov*Math.PI/180,Ae=2*Math.atan(Math.tan(it/2)*Y0),a5=Math.atan2(Rt,Q0),Ee=Math.atan2(kt,Q0);if(Q0>0&&Math.abs(a5)<=Ae/2&&Math.abs(Ee)<=it/2)return c.visible=!1,!0;let C0=a5/(Ae/2),K0=Ee/(it/2);Q0<=0&&(Math.abs(C0)>Math.abs(K0)?(C0=Math.sign(C0),K0=0):(C0=0,K0=Math.sign(K0))),s0&&(Math.abs(C0)>Math.abs(K0)||(C0=C0>=0?1:-1),K0=0);let v5=Math.max(Math.abs(C0),Math.abs(K0))||1,Mt=C0/v5,xe=K0/v5,qt=et.ARROW.paddingPx,l5=(Mt+1)*.5*Z,Zt=(1-xe)*.5*J,J0=Math.min(Math.max(l5,qt),Z-qt),Re=Math.min(Math.max(Zt,qt),J-qt);Mt=J0/Z*2-1,xe=-(Re/J)*2+1;let ke=Math.max(2,N.near*4),tt=Math.tan(it/2)*ke,g1=tt*Y0,b=ot.clone().add(o0.clone().multiplyScalar(ke)).add($.clone().multiplyScalar(Mt*g1)).add(g0.clone().multiplyScalar(xe*tt));c.visible=!0,c.position.copy(b);let u=Math.atan2(K0,C0);c.material.rotation=u-Math.PI/2;let A=Math.tan(it/2)*2*ke*(et.ARROW.pixelSize*n/J);return c.scale.set(A,A,1),!1}function j(N){return p.position.length()}function q(N,Z,J,s0){let o0=j(N);z(N,Z.fov,o0,s0);let f0=Math.round(o0);Math.abs(f0-l)>=1&&(l=f0,C(v,`${f0}m`));let $=O(Z,J,s0);return x($),$}function i0(){let N=o.material;if(N.map?.dispose(),N.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:_,setLabel:E,updateDistanceText:C,setVisible:x,setPosition:S,dispose:i0}}function t1(r,t,e,i=1){let n=et.CANVAS_SCALE*(globalThis.devicePixelRatio||1),s=et.CANVAS_SIZE*n,o=B0(s,s),v=o.getContext("2d");v.clearRect(0,0,s,s);let a=s/2,l=Math.round(s*et.LAYOUT.DOT_Y),c=Math.round(s*.05*i),d=Math.max(2,Math.round(4*n*i));v.beginPath(),v.arc(a,l,c+d,0,Math.PI*2),v.fillStyle="black",v.fill(),v.beginPath(),v.arc(a,l,c,0,Math.PI*2),v.fillStyle=`#${r.toString(16).padStart(6,"0")}`,v.fill(),v.textAlign="center",v.textBaseline="middle";let m=Math.round(s*.08*i),p=Math.round(s*.06*i);v.font=`bold ${m}px mojangles`,v.lineWidth=Math.max(2,Math.round(3*n*i));let g=Math.round(s*et.LAYOUT.NAME_Y);v.strokeStyle="black",v.strokeText(t,a,g),v.fillStyle="white",v.fillText(t,a,g),v.font=`bold ${p}px mojangles`,v.lineWidth=Math.max(2,Math.round(2*n*i));let y=Math.round(s*et.LAYOUT.DISTANCE_Y);return v.strokeStyle="black",v.strokeText(e,a,y),v.fillStyle="#CCCCCC",v.fillText(e,a,y),o}function $a(r,t,e,i,n=1){let s=t1(r,t,e,n),o=new h0.CanvasTexture(s);o.anisotropy=1,o.magFilter=h0.LinearFilter,o.minFilter=h0.LinearFilter;let v=new h0.SpriteMaterial({map:o,transparent:!0,opacity:1,depthTest:i,depthWrite:!1}),a=new h0.Sprite(v);return a.position.set(0,0,0),a}var e1=class{constructor(t){this.worldRenderer=t;h(this,"waypoints",new Map);h(this,"waypointScene",new wt.Scene);h(this,"lastCameraPosition",new wt.Vector3);h(this,"lastUpdateTime",0);h(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 wt.Vector2);for(let o of this.waypoints.values()){let v=new wt.Vector3(o.x,o.y,o.z),a=e.distanceTo(v),l=(!o.minDistance||a>=o.minDistance)&&(o.maxDistance===1/0||a<=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:v,metadata:a}=s,l=s.minDistance??0,c=s.maxDistance??1/0,d=m6({position:new wt.Vector3(e,i,n),color:o,label:v||t,metadata:a});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:v,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))}};R();k();M();T();import*as p0 from"three";import{Vec3 as t5}from"vec3";var m0=class m0{constructor(t){this.worldRenderer=t;h(this,"explosions",new Map);h(this,"particleGeometry");h(this,"particleMaterials",[]);h(this,"testModeTimer");h(this,"explosionCounter",0);this.particleGeometry=new p0.BoxGeometry(m0.DEFAULT_PARTICLE_SIZE,m0.DEFAULT_PARTICLE_SIZE,m0.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 p0.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=m0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],v=Math.floor(m0.DEFAULT_PARTICLE_COUNT*e),a;if(m0.DEBUG_SHOW_EXPLOSION_CENTER){let c=.5*e,d=new p0.SphereGeometry(c,8,8),m=new p0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});a=new p0.Mesh(d,m),a.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(a),a.position.set(t.x,t.y,t.z)}for(let c=0;c<v;c++){let d=Math.random()*Math.PI*2,m=Math.sqrt(Math.random())*m0.VELOCITY_FACTOR*e,p=new t5(m*Math.cos(d),Math.random()*.5-.25,m*Math.sin(d));c<5;let g=i===void 0?this.getRandomMaterial().clone():new p0.MeshBasicMaterial({color:i,transparent:!0,opacity:1}),y=new p0.Mesh(this.particleGeometry,g);y.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(y),y.position.set(t.x,t.y,t.z),c<5;let w={position:t.clone(),velocity:p,color:new p0.Color(g.color),life:1,maxLife:1,mesh:y};o.push(w)}let l={id:s,position:t.clone(),particles:o,startTime:Date.now(),duration:n,size:e,debugSphere:a};return this.explosions.set(s,l),l}createExplosionFacingCamera(t,e=1,i,n=m0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],v=Math.floor(m0.DEFAULT_PARTICLE_COUNT*e),a;if(m0.DEBUG_SHOW_EXPLOSION_CENTER){let m=.5*e,p=new p0.SphereGeometry(m,8,8),g=new p0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});a=new p0.Mesh(p,g),a.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(a),a.position.set(t.x,t.y,t.z)}let l=this.worldRenderer.getCameraPosition(),c=new t5(l.x-t.x,l.y-t.y,l.z-t.z).normalize();for(let m=0;m<v;m++){let p=Math.random()*Math.PI*2,g=Math.sqrt(Math.random())*m0.VELOCITY_FACTOR*e,y=new t5(g*Math.cos(p),g*Math.sin(p),0),w=new t5(y.x*c.x-y.z*c.z,y.y,y.x*c.z+y.z*c.x);m<5;let _=i===void 0?this.getRandomMaterial().clone():new p0.MeshBasicMaterial({color:i,transparent:!0,opacity:1}),E=new p0.Mesh(this.particleGeometry,_);E.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(E),E.position.set(t.x,t.y,t.z);let C={position:t.clone(),velocity:w,color:new p0.Color(_.color),life:1,maxLife:1,mesh:E};o.push(C)}let d={id:s,position:t.clone(),particles:o,startTime:Date.now(),duration:n,size:e,debugSphere:a};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 t5(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)},m0.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+=m0.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 v=t.life;t.life-=e/i;let a=Math.max(0,t.life);if(t.mesh.material instanceof p0.MeshBasicMaterial&&(t.mesh.material.opacity=a),n&&v>.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 p0.Material&&i.mesh.material.dispose();e.debugSphere&&(this.worldRenderer.sceneOrigin.removeAndUntrack(e.debugSphere),e.debugSphere.geometry.dispose(),e.debugSphere.material instanceof p0.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()}};h(m0,"DEFAULT_PARTICLE_COUNT",50),h(m0,"DEFAULT_PARTICLE_SIZE",.05),h(m0,"DEFAULT_EXPLOSION_DURATION",6e3),h(m0,"GRAVITY",-.005),h(m0,"VELOCITY_FACTOR",1.5),h(m0,"TEST_INTERVAL",1e3),h(m0,"DEBUG_SHOW_EXPLOSION_CENTER",!0),h(m0,"DEBUG_SHOW_PARTICLE_TRAILS",!1);var i1=m0;R();k();M();T();import*as Qt from"three";import{Vec3 as T2}from"vec3";var n1=class r{constructor(t,e,i,n){this.worldRenderer=t;this.updateCamera=e;this.updateFov=i;this.getInitialState=n;h(this,"isRunning",!1);h(this,"currentScript",null);h(this,"currentPointIndex",0);h(this,"currentTweens",[]);h(this,"startTime",0);h(this,"totalDuration",0);h(this,"currentPosition",{x:0,y:0,z:0});h(this,"currentRotation",{yaw:0,pitch:0});h(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 T2(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}]),v=[n,s,o];return this.startScript(v[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 Qt.Vector3(e.lookAt.x,e.lookAt.y,e.lookAt.z),m=new Qt.Vector3(e.x,e.y,e.z),p=d.sub(m).normalize();s.yaw=Math.atan2(-p.x,-p.z),s.pitch=Math.asin(p.y)}let v=this.getEasingFunction(e.easing||"easeInOut"),a=new M0(this.currentPosition).to(n,i).easing(v).onUpdate(()=>{this.updateCamera(new T2(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),l=new M0(this.currentRotation).to(this.wrapRotation(s),i).easing(v).onUpdate(()=>{this.updateCamera(new T2(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 M0(d).to({fov:o},i).easing(v).onUpdate(()=>{this.currentFov=d.fov,this.updateFov(this.currentFov)})}this.currentTweens=[a,l],c&&this.currentTweens.push(c),a.start(),l.start(),c?.start(),a.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 R0.Linear.None;case"easeIn":return R0.Quadratic.In;case"easeOut":return R0.Quadratic.Out;case"easeInOut":return R0.Quadratic.InOut;case"smoothstep":return R0.Cubic.InOut;case"bounce":return R0.Bounce.Out;default:return R0.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 v=0;v<=8;v++){let a=v/8*Math.PI*2,l=t.x+Math.cos(a)*e,c=t.z+Math.sin(a)*e,d=t.y+i;s.push({x:l,y:d,z:c,yaw:a+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,v=20;for(let a=0;a<=o;a++){let l=a/o,c=l*i*Math.PI*2,d=Qt.MathUtils.lerp(t.x,e.x,l)+Math.cos(c)*v*(1-l),m=Qt.MathUtils.lerp(t.z,e.z,l)+Math.sin(c)*v*(1-l),p=Qt.MathUtils.lerp(t.y,e.y,l);s.push({x:d,y:p,z:m,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}}};R();k();M();T();import*as t0 from"three";var M2=.75,r1=class{constructor(t,e,i){this.scene=t;this.defaultSkybox=e;this.initialImage=i;h(this,"texture",null);h(this,"mesh",null);h(this,"skyMesh",null);h(this,"voidMesh",null);h(this,"worldTime",0);h(this,"partialTicks",0);h(this,"viewDistance",4);h(this,"temperature",M2);h(this,"inWater",!1);h(this,"waterBreathing",!1);h(this,"fogBrightness",0);h(this,"prevFogBrightness",0);h(this,"fogOrangeness",0);h(this,"distanceFactor",2.7);h(this,"brightnessAtPosition",1);h(this,"debugGui");this.debugGui=new Vt("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 t0.TextureLoader;if(this.texture=await new Promise(i=>{e.load(t,n=>{n.mapping=t0.EquirectangularReflectionMapping,n.encoding=t0.sRGBEncoding,n.minFilter=t0.NearestFilter,n.magFilter=t0.NearestFilter,n.needsUpdate=!0,i(n)})}),this.mesh)this.mesh.material.map=this.texture,this.mesh.material.needsUpdate=!0;else{let i=new t0.SphereGeometry(500,60,40);i.scale(-1,1,1);let n=new t0.MeshBasicMaterial({map:this.texture,side:t0.FrontSide});this.mesh=new t0.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 t0.PlaneGeometry(768,768);i.rotateX(-Math.PI/2),i.translate(0,16,0);let n=new t0.MeshBasicMaterial({color:16777215,side:t0.DoubleSide,depthTest:!1});this.skyMesh=new t0.Mesh(i,n),this.scene.add(this.skyMesh)}{let i=new t0.PlaneGeometry(768,768);i.rotateX(-Math.PI/2),i.translate(0,-16,0);let n=new t0.MeshBasicMaterial({color:16777215,side:t0.DoubleSide,depthTest:!1});this.voidMesh=new t0.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 t0.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),v=this.getSkyColorByTemp(o),a=(v>>16&255)/255,l=(v>>8&255)/255,c=(v&255)/255;return new t0.Vector3(a*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 v=(t-Math.floor(t))*6,a=v-Math.floor(v),l=i*(1-e),c=i*(1-e*a),d=i*(1-e*(1-a));switch(Math.floor(v)){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 t0.Fog(new t0.Color(0,0,1),.0025,g),this.scene.background=new t0.Color(0,0,1),this.skyMesh.material.color.set(new t0.Color(0,0,1)),this.voidMesh.material.color.set(new t0.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),v=this.getFogColor(this.partialTicks),a=Math.cos(s*Math.PI*2)*2+.5,l=Math.max(0,Math.min(1,a)),c=this.prevFogBrightness+(this.fogBrightness-this.prevFogBrightness)*this.partialTicks,d=(v.x+(o.x-v.x)*n)*l*c,m=(v.y+(o.y-v.y)*n)*l*c,p=(v.z+(o.z-v.z)*n)*l*c;this.scene.background=new t0.Color(d,m,p),this.scene.fog=new t0.Fog(new t0.Color(d,m,p),.0025,i*this.distanceFactor),this.skyMesh.material.color.set(new t0.Color(o.x,o.y,o.z)),this.voidMesh.material.color.set(new t0.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))}};R();k();M();T();import*as e0 from"three";var t8=`
21185
+ f 71/216/54 68/215/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D6aeX5gvQ8/vb4SMjbk18u4mdhBLLQzjmddZ9dTvBTuCekyZOWtHi+MsY4pLWOEGqEJJuHzYaQszyZkbZFpaNt16EhhLuFIhuEoDF78ZP9A0Obf2KBegjhAAAAAElFTkSuQmCC",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+thZEveaBkmV2325ubj59gXqFgPV6r4Ohh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fuL8tkDiT4AAAAAElFTkSuQmCC",parrot:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAP1BMVEUAAAD/////7nn/6j3/5TPGxsa7u7vZra23t7ewsLCoqKienp6ZmZmWlpaRkZGQkJD3cwmGhoYlJSUPDw8AAAD7udxiAAAAAXRSTlMAQObYZgAAANJJREFUeNrN0tEKwjAMBdDGxpnbZqtx/v+32jYMN9QKPnkhYdBDk0EDHSIQ0CGBDkEV/pFgahtgBhxEZu7nSGj1Ajg6SAmpVQe4M98hgHCMVUAgqklbObgyXwGhXczUWlXg10Z+bj/4i3X19gra1KJrDfVGakcARdFyqyEHS353w35J2oGiBRO8++miqrU2MJdZIN6pJy+Lz3Cgs04yeaees6qeByMypZQo548jLDdl9mnE8D18B+EyBiG4+AGMduBwCi2/g+BiAAJ/BTwEW/4XPABsMA1LwNN2rAAAAABJRU5ErkJggg==",piglin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAWlBMVEUAAAD/gID/////7aj/5bX12iryuobMzIPCwnTooHTVlXreihzJgmWHh1e6ZkWtVTKiWTplXEOhPjiESzOXQyKNNQ1rOSR6JiF2Kw08OS5TKxpgIwo6GgwhHhyEOBusAAAAAnRSTlMABHH+CSEAAAKgSURBVHja7ZZxU9swDMXDWAMSRspwYiDQ7/81pyd5Vzzf3Oz4t78GRU2kF9m5Hm8y7h8sMM34zMQrcKZj3BvTRHMVoHVVJwRm41n1eSDwYFSB2QW0AoG4psY0JgRAK5BeiV7TWCD2wLt7AXkhehE1Du1BL6CPKT0quL4HgMgFxIBAy6xt3hICsYniHBRIzET+6Ij1jxg3/NUyXxEwiK0wiITZBJC3And3d10uzCzKjOkNOzGrX6wKJoUVpiTJQ5MbVseyqpX9SEQWmHUV+4obhI8LQCd5aHJDBALCRLIaQuRfWSRhBK51M7bKQ5MbqwpLjAyB5Kmw6AoFToZAgNCE0OQQMIXEGHkFtU3UU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apMCXogZPJFCQghXsR2kbD4blANmFeUB0IRgQ26FnndclAdkFKwdAdiH44YyQSD6JpSK70NjNa9DciTlnpBtFAe2UB8YwXcF9CTCxggErD8RvADLgkXiZRjzsMkK7jJcFVuN/5l7nm3icRCFjL4fJRdkuXPfngCi54uxP1hEzonQX4v7sRMLnMefhfpIwXrAFhXyw4P7/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/Xzc871Irs3AViTQd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cASOwBH44cB/1lQM4ZNhKecAAAAASUVORK5CYII="};R();k();M();T();import*as k0 from"three";var _2=class{constructor(t,e){this.object=t;this.animations=e;h(this,"clock",new k0.Clock);h(this,"animatedObjects",new Set);h(this,"state")}createAnimationState(){let t=new k0.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 k0.Mesh||i instanceof k0.Line||i instanceof k0.Points||i instanceof k0.Sprite){let n=i.onBeforeRender;i.onBeforeRender=(s,o,v,a,l,c)=>{let d=this.clock.getDelta();t.update(d),n?.(s,o,v,a,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?k0.LoopRepeat:k0.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?k0.LoopRepeat:k0.LoopOnce,1/0),i.clampWhenFinished=!e)}stopAnimations(){this.state.mixer.stopAllAction()}getDelta(){return this.clock.getDelta()}};function Dr(r,t){let e=new _2(r,t);return e.createAnimationState(),e}var aa={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 Fr(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function va(r,t,e,i,n=!1,s=64,o=64,v=!1,a=[]){let l=new K.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:m,v0:p,u1:g,v1:y}of Object.values(aa)){let E=Math.floor(r.positions.length/3),_=c[0]!==0,A=[];for(let C of d){let x,S;n?(x=(i.uv[0]+C[3]*i.size[0])/s,S=(i.uv[1]+C[4]*i.size[1])/o):(x=(i.uv[0]+Fr(C[3]?g:m,i.size))/s,S=(i.uv[1]+Fr(C[4]?y:p,i.size))/o);let z=_&&v?C[0]^1:C[0],B=C[1],I=_&&v?C[2]^1:C[2],W=i.inflate??0,O=new K.Vector3(i.origin[0]+z*i.size[0]+(z?W:-W),i.origin[1]+B*i.size[1]+(B?W:-W),i.origin[2]+I*i.size[2]+(I?W:-W));O=O.applyEuler(l),O=O.sub(e.position),O=O.applyEuler(e.rotation),O=O.add(e.position),r.positions.push(O.x,O.y,O.z),r.normals.push(c[0],c[1],c[2]),A.push(x,S),r.skinIndices.push(t,0,0,0),r.skinWeights.push(1,0,0,0)}if(v)for(let C=0;C+1<d.length;C+=2){let x=C*2,S=A.slice(x,x+4);A[x]=S[2],A[x+1]=S[_?1:3],A[x+2]=S[0],A[x+3]=S[_?3:1]}r.uvs.push(...A),r.indices.push(E,E+1,E+2,E+2,E+1,E+3)}}function he(r,t,e,i={},n={}){let s=e.texturewidth??64,o=e.textureheight??64,v,a=t.startsWith("block:"),l=r?.material.map;if(a){if(!r)throw new Error("worldRenderer is required for block textures");let A=t.slice(6),C=r.resourcesManager.currentResources.blocksAtlasJson.textures[A];C&&(s=l?.image.width??s,o=l?.image.height??o,v=[C.u,C.v])}let c={},d={positions:[],normals:[],uvs:[],indices:[],skinIndices:[],skinWeights:[]},m=0;for(let A of e.bones){let C=new K.Bone;if(A.pivot&&(C.position.x=A.pivot[0],C.position.y=A.pivot[1],C.position.z=A.pivot[2]),A.bind_pose_rotation?(C.rotation.x=-A.bind_pose_rotation[0]*Math.PI/180,C.rotation.y=-A.bind_pose_rotation[1]*Math.PI/180,C.rotation.z=-A.bind_pose_rotation[2]*Math.PI/180):A.rotation&&(C.rotation.x=-A.rotation[0]*Math.PI/180,C.rotation.y=-A.rotation[1]*Math.PI/180,C.rotation.z=-A.rotation[2]*Math.PI/180),i.rotation?.[A.name]&&(C.rotation.x-=(i.rotation[A.name].x??0)*Math.PI/180,C.rotation.y-=(i.rotation[A.name].y??0)*Math.PI/180,C.rotation.z-=(i.rotation[A.name].z??0)*Math.PI/180),C.name=`bone_${A.name}`,c[A.name]=C,A.cubes)for(let x of A.cubes){let S=[];va(d,m,C,x,a,s,o,A.mirror,S),S.length&&(n.errors??(n.errors=[]),n.errors.push(...S.map(z=>`Bone ${A.name}: ${z}`)))}m++}let p=[];for(let A of e.bones)A.parent&&c[A.parent]?c[A.parent].add(c[A.name]):p.push(c[A.name]);let g=new K.Skeleton(Object.values(c)),y=new K.BufferGeometry;y.setAttribute("position",new K.Float32BufferAttribute(d.positions,3)),y.setAttribute("normal",new K.Float32BufferAttribute(d.normals,3)),y.setAttribute("uv",new K.Float32BufferAttribute(d.uvs,2)),y.setAttribute("skinIndex",new K.Uint16BufferAttribute(d.skinIndices,4)),y.setAttribute("skinWeight",new K.Float32BufferAttribute(d.skinWeights,4)),y.setIndex(d.indices);let E=new K.MeshLambertMaterial({transparent:!0,alphaTest:.1,side:K.DoubleSide}),_=new K.SkinnedMesh(y,E);if(_.add(...p),_.bind(g),_.scale.set(1/16,1/16,1/16),v){let A=l.clone();A.offset.set(v[0],v[1]),A.needsUpdate=!0,E.map=A}else S5(t,A=>{E.map||(A.magFilter=K.NearestFilter,A.minFilter=K.NearestFilter,A.flipY=!1,A.wrapS=K.RepeatWrapping,A.wrapT=K.RepeatWrapping,E.map=A)},()=>{let A=E.map.image.width;A&&s!==A&&(E.map.repeat.x=s/A);let C=E.map.image.height;C&&o!==C&&(E.map.repeat.y=o/C),E.needsUpdate=!0});return _}var la=[{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 Ur(r){for(let t of la)if(typeof t.pattern=="string"){if(t.pattern===r)return t.target}else if(t.pattern.test(r))return t.target}var Gr=r=>tr[r],Wr={zombie:1.85,husk:1.85,arrow:.0025},ca={zombie:new N5(0,1,0),husk:new N5(0,1,0),boat:new N5(0,-1,0),arrow:new N5(0,-.9,0)},ht=class{constructor(t,e,i,n={},s={}){h(this,"mesh");h(this,"animations");h(this,"animationController");h(this,"initialAnimation");h(this,"initialLoop");let o=e,v=Ur(e);if(v&&(e=v,s.tempMap=v),n.customModel){this.mesh=new K.Object3D;let{modelPath:l,modelType:c,metadata:d}=n.customModel;switch(c){case"gltf":{new ea().parseAsync(l,"").then(g=>{if(this.mesh.add(g.scene),this.animations=g.animations,d?.scale){let{scale:y}=d;this.mesh.scale.set(y,y,y)}if(d?.offset){let{x:y=0,y:E=0,z:_=0}=d.offset;this.mesh.position.set(y,E,_)}if(d?.texture){let y=new K.TextureLoader().load(d.texture);y.minFilter=K.NearestFilter,y.magFilter=K.NearestFilter,this.mesh.traverse(E=>{E instanceof K.Mesh&&(E.material=new K.MeshBasicMaterial({map:y,transparent:!0,alphaTest:.1}))})}if(g.animations&&g.animations.length>0){this.animations=g.animations;let y=d?.animation,E=d?.animationLoop??!0;if(this.initialAnimation=y,this.initialLoop=E,this.animationController=Dr(this.mesh,g.animations),y)this.playAnimation(y,E);else{let _=g.animations[0];this.animationController.playAnimation(_.name,E)}}}).catch(g=>{});return}case"obj":{let p=new ue().parse(l);if(d?.scale){let{scale:g}=d;p.scale.set(g,g,g)}if(d?.offset){let{x:g=0,y=0,z:E=0}=d.offset;p.position.set(g,y,E)}if(d?.texture){let g=new K.TextureLoader().load(d.texture);g.minFilter=K.NearestFilter,g.magFilter=K.NearestFilter;let y=new K.MeshBasicMaterial({map:g,transparent:!0,alphaTest:.1});p.traverse(E=>{E instanceof K.Mesh&&(E.material=y)})}this.mesh=p,s.type="obj";return}case"bedrock":{let m=JSON.parse(l);if(this.mesh=new K.Object3D,d?.scale&&this.mesh.scale.set(d.scale,d.scale,d.scale),d?.offset){let{x:p=0,y:g=0,z:y=0}=d.offset;this.mesh.position.set(p,g,y)}for(let[p,g]of Object.entries(m.geometry)){let y=d?.textures?.[p]??m.textures?.[p];if(!y)continue;let E=he(i,y.endsWith(".png")||y.startsWith("data:image/")||y.startsWith("block:")?y:y+".png",g,n,s);E.name=`geometry_${p}`,this.mesh.add(E)}s.type="bedrock";return}}}if(fe[e]){let l=new ue,c={zombie_horse:`textures/${t}/entity/horse/horse_zombie.png`,husk:ia,skeleton_horse:`textures/${t}/entity/horse/horse_skeleton.png`,donkey:`textures/${t}/entity/horse/donkey.png`,mule:`textures/${t}/entity/horse/mule.png`,ocelot:na,arrow:ra,spectral_arrow:sa,tipped_arrow:oa},d=c[o]||c[e];d&&(s.textureMap=!0);let m=d||y2[e];if(y2[e]&&(s.isHardcodedTexture=!0),!m)throw new Error(`No texture for ${e}`);let p=new K.TextureLoader().load(m);p.minFilter=K.NearestFilter,p.magFilter=K.NearestFilter;let g=new K.MeshBasicMaterial({map:p,transparent:!0,alphaTest:.1}),y=l.parse(fe[e]),E=Wr[o]||Wr[e];E&&y.scale.set(E,E,E);let _=ca[o];_&&y.position.set(_.x,_.y,_.z),y.traverse(A=>{A instanceof K.Mesh&&(A.material=g,A.name==="Head layer"&&(A.visible=!1),A.name==="Head"&&n.rotation?.head&&(A.rotation.x-=(n.rotation.head.x??0)*Math.PI/180,A.rotation.y-=(n.rotation.head.y??0)*Math.PI/180,A.rotation.z-=(n.rotation.head.z??0)*Math.PI/180))}),this.mesh=y,s.type="obj";return}let a=Gr(e);if(a){this.mesh=new K.Object3D;for(let[l,c]of Object.entries(a.geometry)){let d=n.textures?.[l]??a.textures[l];if(!d)continue;let m=he(i,d.endsWith(".png")||d.startsWith("data:image/")||d.startsWith("block:")?d:d+".png",c,n,s);m.name=`geometry_${l}`,this.mesh.add(m)}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=Ur(t)||t,fe[t])return{boneNames:[]};let e=Gr(t);if(!e)throw new Error(`Unknown entity ${t}`);return{boneNames:Object.values(e.geometry).flatMap(i=>i.name)}}};globalThis.EntityMesh=ht;R();k();M();T();var me=r=>Math.max(0,Math.min(1,r)),Vr=(r,t,e)=>Math.max(t,Math.min(e,r)),W0=(r,t,e)=>r+(t-r)*e,ua=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function fa(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 j5=class extends I5{constructor(){super(...arguments);h(this,"switchAnimationCallback");h(this,"isRunning",!1);h(this,"isMoving",!0);h(this,"isCrouched",!1);h(this,"moveAmount",0);h(this,"runAmount",0);h(this,"lookYaw",0);h(this,"lookPitch",0);h(this,"_dt",0);h(this,"_phase",0);h(this,"_idlePhase",0);h(this,"_moveBlend",0);h(this,"_runBlend",0);h(this,"_crouchBlend",0);h(this,"_lookYawBlend",0);h(this,"_lookPitchBlend",0);h(this,"_swingTime",null);h(this,"_swingDuration",.25);h(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=me(n),v=me(s),a=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+=(v-this._runBlend)*c,this._crouchBlend+=(a-this._crouchBlend)*d;let m=me(this._moveBlend),p=me(this._runBlend),g=me(this._crouchBlend),y=W0(8,10,p),E=W0(1,.55,g),_=y*E;this._phase+=i*_*m,this._phase+=i*_*m,this._idlePhase+=i*1.15;let A=this._phase+(p>.5?Math.PI*.5:0);if(this.switchAnimationCallback&&Math.abs(Math.sin(A))<.02){let O=this.switchAnimationCallback;this.switchAnimationCallback=null,O?.()}ma(e,g);let C=80*Math.PI/180,x=75*Math.PI/180,S=Vr(ua(this.lookYaw||0),-C,C),z=Vr(this.lookPitch||0,-x,x),B=Math.min(1,i*14);this._lookYawBlend+=(S-this._lookYawBlend)*B,this._lookPitchBlend+=(z-this._lookPitchBlend)*B,e?.skin?.head?.rotation&&(e.skin.head.rotation.y+=this._lookYawBlend,e.skin.head.rotation.x+=this._lookPitchBlend);let I=(1-m)*(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(m>1e-4&&e?.skin){let W=W0(1,.85,g),O=W0(1,.7,g),j=Math.sin(A)*.5,q=Math.sin(A+Math.PI)*.5,i0=Math.cos(A+Math.PI)*1.3,N=Math.cos(A)*1.3;e.skin.leftLeg.rotation.x+=W0(j,i0,p)*m*W,e.skin.rightLeg.rotation.x+=W0(q,N,p)*m*W;let Z=Math.sin(A+Math.PI)*.5,J=Math.sin(A)*.5,s0=Math.cos(A)*1.5,o0=Math.cos(A+Math.PI)*1.5;e.skin.leftArm.rotation.x+=W0(Z,s0,p)*m*O,e.skin.rightArm.rotation.x+=W0(J,o0,p)*m*O;let f0=Math.PI*.02,$=Math.PI*.1,g0=W0(f0,$,p),st=Math.cos(A)*.03+f0,V0=Math.cos(A+Math.PI)*.03-f0,Q0=Math.cos(A)*.1+$,Rt=Math.cos(A+Math.PI)*.1-$;e.skin.leftArm.rotation.z+=(W0(st,Q0,p)*m+g0*.15*m)*O,e.skin.rightArm.rotation.z+=(W0(V0,Rt,p)*m-g0*.15*m)*O,this._defaults?.playerRot&&(e.rotation.z=this._defaults.playerRot.z+Math.cos(A+Math.PI)*.01*p*m);let kt=W0(Math.PI*.06,Math.PI*.3,p),Y0=W0(Math.sin(A/1.5)*.06,Math.sin(A*2)*.1,p);e?.cape?.rotation&&(e.cape.rotation.x+=(kt+Y0)*m)}if(this._swingTime!==null){this._swingTime+=i;let W=Math.min(this._swingTime/this._swingDuration,1);ha.animate(W,e,m>.2),W>=1&&(this._swingTime=null)}}},ha={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 ma(r,t){let e=r?.skin,i=r?.cape,n=r?.elytra;if(!e||!i)return;let s=me(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=W0(.72,.26179944+.4582006,o)),fa(r),e.head.position.y+=-3.618325234674*o;let v=.1*o,a=(3.618325234674-3.4500310377)*o,l=-2.53943318*o;e.leftArm.position.z+=a,e.rightArm.position.z+=a,e.leftArm.rotation.x+=.410367746202*o,e.rightArm.rotation.x+=.410367746202*o,e.leftArm.rotation.z+=v,e.rightArm.rotation.z+=-v,e.leftArm.position.y+=l,e.rightArm.position.y+=l,e.rightLeg.position.z+=-3.4500310377*o,e.leftLeg.position.z+=-3.4500310377*o}R();k();M();T();import{default as ga}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_1.png";import{default as ba}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_2.png";import{default as ya}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_1.png";import{default as _a}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_2.png";import{default as wa}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_1.png";import{default as Aa}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_2.png";import{default as Ea}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_1.png";import{default as xa}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_2.png";import{default as Ra}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1.png";import{default as ka}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1_overlay.png";import{default as Ta}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2.png";import{default as Ma}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2_overlay.png";import{default as Sa}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_1.png";import{default as Ca}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_2.png";import{default as Pa}from"mc-assets/dist/other-textures/latest/models/armor/turtle_layer_1.png";import{default as jr}from"mc-assets/dist/other-textures/latest/entity/elytra.png";var pe={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 Nr={leather_layer_1:Ra,leather_layer_1_overlay:ka,leather_layer_2:Ta,leather_layer_2_overlay:Ma,chainmail_layer_1:ga,chainmail_layer_2:ba,iron_layer_1:Ea,iron_layer_2:xa,diamond_layer_1:ya,diamond_layer_2:_a,golden_layer_1:wa,golden_layer_2:Aa,netherite_layer_1:Sa,netherite_layer_2:Ca,turtle_layer_1:Pa};var k2=bt(nt),Ia=120,w2=r=>r*(Math.PI/180),A2=r=>Math.max(0,Math.min(1,r)),E2=(r,t,e)=>Math.max(t,Math.min(e,r)),ge=r=>(r=(r+Math.PI)%(Math.PI*2),r<0&&(r+=Math.PI*2),r-Math.PI);function za(r){return r<0&&(r=4294967295+r+1>>>0),r.toString(16)}function Ha(r){if(r===void 0)return;if(parseInt(r,10)===0)return"rgba(0, 0, 0, 0)";let t=za(parseInt(r,10));return t.length===8?`#${t.slice(2,8)}${t.slice(0,2)}`:`#${t}`}function Qr(r,t){return r===void 0?t:r instanceof V.Quaternion?r:Array.isArray(r)?new V.Quaternion(r[0],r[1],r[2],r[3]):new V.Quaternion(r.x,r.y,r.z,r.w)}function rt(r,t){return r===void 0?t??new V.Euler:r instanceof V.Euler?r:r.yaw!==void 0&&r.pitch!==void 0&&r.roll!==void 0?new V.Euler(-w2(r.pitch),-w2(r.yaw),w2(r.roll),"ZYX"):r.x!==void 0&&r.y!==void 0&&r.z!==void 0?new V.Euler(r.z,r.y,r.x,"ZYX"):Array.isArray(r)?new V.Euler(r[0],r[1],r[2]):t??new V.Euler}function Jr({username:r,nameTagBackgroundColor:t="rgba(0, 0, 0, 0.3)",nameTagTextOpacity:e=255},{fontFamily:i="mojangles"},n){let s=I0(64,64),o=Ba(n),v=s.getContext("2d");if(!v)throw new Error("Could not get 2d context");let a=48,l=5;v.font=`${a}px ${i}`;let c=String(typeof r=="string"?r:new o(r).toString()).split(`
21186
+ `),d=0;for(let p of c){let g=v.measureText(p).width+l*2;g>d&&(d=g)}if(s.width=d,s.height=(a+l)*c.length,v.fillStyle=t,v.fillRect(0,0,s.width,s.height),v.globalAlpha=e/255,!!x1(r,o,s,a,"white",-l+a))return v.globalAlpha=1,s}globalThis.getUsernameTexture=Jr;var Y5=(r,t,e,i)=>{for(let n of e.children)n.name==="nametag"&&n.removeFromParent();if(r.username!==void 0&&!r.username.startsWith("EMPTY")){let n=Jr(r,t,i);if(!n)return;let s=new V.Texture(n);s.needsUpdate=!0;let o;if(r.nameTagFixed){let v=new V.PlaneGeometry,a=new V.MeshBasicMaterial({map:s});a.transparent=!0,o=new V.Mesh(v,a),o.rotation.set(r.pitch,V.MathUtils.degToRad(r.yaw+180),0),o.position.y+=r.height+.3}else{let v=new V.SpriteMaterial({map:s});o=new V.Sprite(v),o.position.y+=r.height+.6}return o.renderOrder=1e3,o.scale.set(n.width*.005,n.height*.005,1),r.nameTagRotationRight&&o.applyQuaternion(r.nameTagRotationRight),r.nameTagScale&&o.scale.multiply(r.nameTagScale),r.nameTagRotationLeft&&o.applyQuaternion(r.nameTagRotationLeft),r.nameTagTranslation&&o.position.add(r.nameTagTranslation),o.name="nametag",e.add(o),o}},Yr={},Oa=r=>r.charAt(0)===r.charAt(0).toUpperCase();function La(r,t,e,i,n){if(t.name)try{let l=(Oa(t.name)?n2(t.name):t.name).toLowerCase(),c=new ht("1.16.4",l,e,n);if(c.mesh)return Y5(t,i,c.mesh,e.version),c.mesh}catch(l){reportError?.(l)}if(!r||!(0,Kr.isEntityAttackable)(r,t))return;let s=new V.BoxGeometry(t.width,t.height,t.width);s.translate(0,t.height/2,0);let o=new V.MeshBasicMaterial({color:16711935}),v=new V.Mesh(s,o);return(Yr[t.name]=(Yr[t.name]||0)+1)<6&&Y5({username:t.name,height:t.height},i,v,e.version),v}var K5=class{constructor(t,e){this.worldRenderer=t;this.mcData=e;h(this,"entities",{});h(this,"playerEntity",null);h(this,"entitiesOptions",{fontFamily:"mojangles"});h(this,"debugMode");h(this,"onSkinUpdate");h(this,"clock",new V.Clock);h(this,"currentlyRendering",!0);h(this,"cachedMapsImages",{});h(this,"itemFrameMaps",{});h(this,"pendingModelOverrides",new Map);h(this,"motionCache",new Map);h(this,"_wasThirdPerson",!1);h(this,"_tpBodyYaw",0);h(this,"_tpHasBodyYaw",!1);h(this,"uuidPerSkinUrlsCache",{});h(this,"currentSkinUrls",{});h(this,"loadedSkinEntityIds",new Set);h(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,v=this.motionCache.get(t);if(!v){this.motionCache.set(t,{pos:o.clone(),speed:0}),s.isMoving=!1,s.isRunning=!1,s.moveAmount=0,s.runAmount=0;return}let a=o.x-v.pos.x,l=o.z-v.pos.z;v.pos.copy(o);let c=Math.hypot(a,l)/Math.max(i,1e-6),d=1-Math.exp(-i*12);v.speed+=(c-v.speed)*d;let m=v.speed,p=(x,S,z)=>{let B=A2((z-x)/(S-x));return B*B*(3-2*B)},g=.08,y=.6,E=4.3,_=5.6,A=p(g,y,m),C=p(E,_,m);s.moveAmount=A,s.runAmount=C,s.isMoving=A>.15,s.isRunning=C>.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,v=A2(i?.moveAmount??(i?.isMoving?1:0)),a=A2(i?.runAmount??(i?.isRunning?1:0)),l=v>.15;if(this._tpHasBodyYaw||(this._tpHasBodyYaw=!0,this._tpBodyYaw=s),l){let g=1-Math.exp(-e*(18+10*a));this._tpBodyYaw=this._tpBodyYaw+ge(s-this._tpBodyYaw)*g,t.rotation.set(0,this._tpBodyYaw,0);let y=(25-8*a)*Math.PI/180,E=E2(ge(s-this._tpBodyYaw),-y,y);i&&"lookYaw"in i&&(i.lookYaw=E),i&&"lookPitch"in i&&(i.lookPitch=-o);return}let c=85*Math.PI/180,d=55*Math.PI/180,m=ge(s-this._tpBodyYaw);m=E2(m,-c,c);let p=Math.abs(m)-d;if(p>0){let g=p/(c-d),y=s-Math.sign(m)*d,E=1-Math.exp(-e*(6+10*g));this._tpBodyYaw=this._tpBodyYaw+ge(y-this._tpBodyYaw)*E,m=ge(s-this._tpBodyYaw),m=E2(m,-c,c)}else{let g=1-Math.exp(-e*5);this._tpBodyYaw=this._tpBodyYaw+ge(s-this._tpBodyYaw)*(g*.15)}t.rotation.set(0,this._tpBodyYaw,0),i&&"lookYaw"in i&&(i.lookYaw=m),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 V.Group;e.originalEntity={...t,name:"player"};let i=new V.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,nt)}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),ut(t);this.entities={},this.currentSkinUrls={},this.motionCache.clear(),this._wasThirdPerson=!1,this._tpHasBodyYaw=!1,this.playerEntity&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.playerEntity),ut(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 ht&&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 v=String(this.playerEntity?.originalEntity.id??"player_entity");this.motionCache.delete(v);let a=this.playerEntity?.playerObject?.animation;a?.resetLocomotion&&a.resetLocomotion(),this._tpHasBodyYaw=!1}for(let[v,a]of[...Object.entries(this.entities),["player_entity",this.playerEntity]]){if(!a)continue;let l=v==="player_entity",c=String(l?this.playerEntity?.originalEntity.id??"player_entity":v);if(l)if(a.visible=o,o){let m=this.worldRenderer.playerStateReactive.eyeHeight;a.position.set(this.worldRenderer.cameraWorldPos.x,this.worldRenderer.cameraWorldPos.y-m,this.worldRenderer.cameraWorldPos.z);let p=this.worldRenderer.playerStateReactive.position;if(p&&typeof p.x=="number")this.updateAutoWalkFlags(c,a,e,new V.Vector3(p.x,p.y,p.z));else{let g=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,e,g?new V.Vector3(g.x,g.y,g.z):a.position)}this.updateThirdPersonHeadAndBody(a,i)}else{let m=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,e,m?new V.Vector3(m.x,m.y,m.z):a.position)}else{let m=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,e,m?new V.Vector3(m.x,m.y,m.z):a.position)}let{playerObject:d}=a;if(d?.animation){let m=d.animation,g=(Number(a.originalEntity?.metadata?.[0]??0)&2)!==0,y=this.getLocalSneak();"isCrouched"in m&&(m.isCrouched=l?y:g),d.animation.update(d,i)}if(a.traverse(m=>{m instanceof ht&&m.update(i)}),!l&&n&&a.position){let m=a.position.x-n.x,p=a.position.y-n.y,g=a.position.z-n.z,y=m*m+p*p+g*g;a.visible=!!(y<s||this.worldRenderer.shouldObjectVisible(a)),this.maybeRenderPlayerSkin(v)}a.visible&&this.syncArmorPositions(a)}}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!==nt&&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 v=this.getPlayerObject(t);if(!v)return;if(n===!0){if(!e)return;let l=await ne(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 ne(e,"cape");if(!this.getPlayerObject(t)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(t,s)}return}n!==nt&&(this.currentSkinUrls[String(t)]=n);let a=this.worldRenderer.worldRendererConfig.renderEars||e==="deadmau5";this.loadAndApplySkin(t,n,a).then(async()=>{if(s){if(s===!0&&e){let l=await ne(e,"cape");if(!this.getPlayerObject(t)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(t,s)}}),v.cape.visible=!1,s||(v.backEquipment=null,v.elytra.map=null,v.cape.map&&v.cape.map.dispose(),v.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,v;if(e===nt){o=await k2;let l=I0(64,64),c=l.getContext("2d");if(!c)throw new Error("Failed to get context");c.drawImage(o.image,0,0),v=l}else{let{canvas:l,image:c}=await Fe(e);s=c,o=new V.CanvasTexture(l),v=l}o.magFilter=V.NearestFilter,o.minFilter=V.NearestFilter,o.needsUpdate=!0,n.skin.map=o,n.skin.modelType=O1(v),n.skin.isCustom=e!==nt;let a;if(s?i&&(a=document.createElement("canvas"),L1(a,s),i=!this.isCanvasBlank(a)):i=!1,i){let l=new V.CanvasTexture(a);l.magFilter=V.NearestFilter,l.minFilter=V.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 Fe(e);if(i=this.getPlayerObject(t),!i)return;H1(n,s);let o=new V.CanvasTexture(n);o.magFilter=V.NearestFilter,o.minFilter=V.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"?Xe.default.simplify(Xe.default.parse(t)):R2.simplify(t);return $1(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=zn(this.worldRenderer.material,s.resolvedModel,s.modelName,this.worldRenderer.resourcesManager.currentResources.worldBlockProvider,this.worldRenderer.resourcesManager.currentResources.mcData),v=1;e["minecraft:display_context"]==="ground"?v=.5:e["minecraft:display_context"]==="thirdperson"&&(v=6),o.scale.set(v,v,v);let a=new V.Group;return a.add(o),{mesh:a,isBlock:!0,modelName:s.modelName}}if(s){let o=s.renderInfo?.texture==="blocks"?this.worldRenderer.material.map:this.worldRenderer.itemsTexture,{u:v,v:a,su:l,sv:c}=s,p=Hn(o,{u:v,v:a,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),ut(n),delete this.entities[t.id];return}let o;if(n===void 0){this.beforeEntityAdded(t);let p=new V.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 E=t.name==="tnt"||t.type==="projectile"?{name:t.name}:t.name==="falling_block"?{blockState:t.objectData}:t.metadata?.find(_=>typeof _=="object"&&_?.itemCount);if(E){let _=this.getItemMesh(E,{"minecraft:display_context":"ground"},t.type==="projectile");if(_){if(o=_.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 A=new V.Clock;o.onBeforeRender=()=>{let C=A.getDelta();o.rotation.y+=C}}p.additionalCleanup=()=>{_.cleanup&&_.cleanup()}}}}else if(i){let E=new V.Group,_=this.setupPlayerObject(t,E,e);if(p.playerObject=_,o=E,t.username){let A=Y5(t,{fontFamily:"mojangles"},E,this.worldRenderer.version);A&&(A.position.y=_.position.y+_.scale.y*16+3,A.scale.multiplyScalar(12))}}else o=La(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 y=new V.BoxHelper(o,t.type==="hostile"?16711680:t.type==="mob"?65280:t.type==="player"?255:16753920);y.name="debug",p.add(o),p.add(y),y.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||nt),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 v=qr(t,this.mcData),a=(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=!a);v.baby?n.scale.set(.5,.5,.5):n.scale.set(1,1,1);let l=Q5("text_display",t,this.mcData),c=l?.text||v.custom_name_visible&&v.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)?Ha(l.background_color):void 0,y;if(l?.text_opacity){let E=parseInt(l?.text_opacity,10);y=E>0?E:256-E}Y5({...t,username:typeof c=="string"?Xe.default.simplify(Xe.default.parse(c)):R2.simplify(c),nameTagBackgroundColor:g,nameTagTextOpacity:y,nameTagFixed:p,nameTagScale:l?.scale,nameTagTranslation:l&&(l.translation||new V.Vector3(0,0,0)),nameTagRotationLeft:Qr(l?.left_rotation),nameTagRotationRight:Qr(l?.right_rotation)},this.entitiesOptions,o,this.worldRenderer.version)}let d=Q5("armor_stand",t,this.mcData);if(d){let p=(parseInt(d.client_flags,10)&1)!==0,g=(parseInt(d.client_flags,10)&4)!==0,y=(parseInt(d.client_flags,10)&8)===0,E=(parseInt(d.client_flags,10)&16)!==0;o.castShadow=!E,o.receiveShadow=!E,p?n.scale.set(.5,.5,.5):n.scale.set(1,1,1),n.traverse(_=>{switch(_.name){case"bone_baseplate":this.setVisible(_,y),_.rotation.y=-n.rotation.y;break;case"bone_head":d.head_pose&&_.setRotationFromEuler(rt(d.head_pose));break;case"bone_body":d.body_pose&&_.setRotationFromEuler(rt(d.body_pose));break;case"bone_rightarm":_.parent?.name!=="bone_armor"&&this.setVisible(_,g),d.left_arm_pose?_.setRotationFromEuler(rt(d.left_arm_pose)):_.setRotationFromEuler(rt({yaw:-10,pitch:-10,roll:0}));break;case"bone_leftarm":_.parent?.name!=="bone_armor"&&this.setVisible(_,g),d.right_arm_pose?_.setRotationFromEuler(rt(d.right_arm_pose)):_.setRotationFromEuler(rt({yaw:10,pitch:-10,roll:0}));break;case"bone_rightleg":d.left_leg_pose?_.setRotationFromEuler(rt(d.left_leg_pose)):_.setRotationFromEuler(rt({yaw:-1,pitch:-1,roll:0}));break;case"bone_leftleg":d.right_leg_pose?_.setRotationFromEuler(rt(d.right_leg_pose)):_.setRotationFromEuler(rt({yaw:1,pitch:1,roll:0}));break}})}let m=Q5("item_frame",t,this.mcData);if(m||(m=Q5("glow_item_frame",t,this.mcData)),m){let p=m?.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_")){ut(g);let y=parseInt(g.name.split("_")[1],10);return this.itemFrameMaps[y]=this.itemFrameMaps[y]?.filter(E=>E!==g),g instanceof V.Mesh&&g.material?.map?.dispose(),!0}else if(g.name==="item")return ut(g),!0;return!1})?.removeFromParent(),p&&(p.itemId??p.blockId??0)!==0){let g=m.rotation??0,y=p.nbtData?.value?.map?.value??p.components?.find(E=>E.type==="map_id")?.data;if(y)o.scale.set(16/12,16/12,1),this.addMapModel(n,y,g);else{let E=this.getItemMesh(p,{"minecraft:display_context":"fixed"});E&&(E.mesh.position.set(0,0,-.05),E.isBlock?E.mesh.scale.set(.25,.25,.25):E.mesh.scale.set(.5,.5,.5),E.mesh.rotateY(Math.PI),E.mesh.rotateZ(-g*Math.PI/4),E.mesh.name="item",n.add(E.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:Ia;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),v=2*o%(Math.PI*2)-o;new S0(n.rotation).to({y:n.rotation.y+v},s).start()}if(n?.playerObject&&i?.rotation?.head){let{playerObject:o}=n,v=i.rotation.head.y?i.rotation.head.y-t.yaw:0;o.skin.head.rotation.y=-v,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),v=(s?new V.Vector3(s.x,s.y,s.z):e.position.clone().add(new V.Vector3(this.worldRenderer.sceneOrigin.x,this.worldRenderer.sceneOrigin.y,this.worldRenderer.sceneOrigin.z))).distanceTo(n);if(v<i&&v<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 v=new V.MeshLambertMaterial(o),a=new V.Mesh(new V.PlaneGeometry(1,1),v);a.rotation.set(0,Math.PI,0),t.add(a);let l=!0;t.traverseVisible(c=>{c.name==="geometry_frame"&&(l=!1)}),l?a.position.set(0,0,.499):a.position.set(0,0,.437),a.rotateZ(Math.PI*2-i*Math.PI/2),a.name=`map_${e}`,s||(a.visible=!1),this.itemFrameMaps[e]||(this.itemFrameMaps[e]=[]),this.itemFrameMaps[e].push(a)}loadMap(t){let e=new V.TextureLoader().load(t);return e&&(e.magFilter=V.NearestFilter,e.minFilter=V.NearestFilter,e.needsUpdate=!0),e}addItemModel(t,e,i,n=!1){let s=`bone_${e}item`,o=`custom_item_${e}`;if(t.traverse(a=>{a.name===o&&(a.removeFromParent(),a.additionalCleanup&&a.additionalCleanup())}),!i)return;let v=this.getItemMesh(i,{"minecraft:display_context":"thirdperson"});v?.mesh&&t.traverse(a=>{if(a.name.toLowerCase()===s||a.name===`${e}Arm`){let l=new V.Object3D;l.additionalCleanup=()=>{v.cleanup&&v.cleanup()};let c=v.mesh;l.rotation.z=-Math.PI/16,v.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,a.add(l)}})}handleDamageEvent(t,e){let i=this.entities[t]?.children.find(n=>n.name==="mesh");i&&i.traverse(n=>{if(n instanceof V.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 V.Raycaster;return t.setFromCamera(new V.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 Ge;n.realPlayerUuid=t.uuid??"",n.realUsername=t.username??"",n.position.set(0,16,0),n.traverse(o=>{o instanceof V.Mesh&&o.material instanceof V.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 j5,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),$e(this.worldRenderer,t,"feet",e.equipment[2]),$e(this.worldRenderer,t,"legs",e.equipment[3],2),$e(this.worldRenderer,t,"chest",e.equipment[4]),$e(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,jr),n.cape.map===null&&(n.cape.visible=!1)}}};function qr(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 Q5(r,t,e){if(t.name===r)return qr(t,e)}function $e(r,t,e,i,n=1,s=!1){if(!i){x2(t,e);return}let o=i.name.split("_"),v,a=e==="head"&&i.name==="player_head";if(a)if(x2(t,e),i.nbt){let g=R2.simplify(i.nbt);try{let y;if(g.SkullOwner?y=g.SkullOwner.Properties.textures[0]?.Value:y=g["minecraft:profile"]?.Properties?.find(E=>E.name==="textures")?.value,y){v=JSON.parse(D.from(y,"base64").toString()).textures?.SKIN?.url;let{skinTexturesProxy:_}=r.worldRendererConfig;_&&(v=v?.replace("http://textures.minecraft.net/",_).replace("https://textures.minecraft.net/",_))}}catch{}}else v=nt;let l=o[0];if(!v){let g=`${l}_layer_${n}${s?"_overlay":""}`;v=r.resourcesManager.currentResources.customTextures.armor?.textures[g]?.src??Nr[g]}if(!v||!pe[e]){x2(t,e);return}let c=`geometry_armor_${e}${s?"_overlay":""}`,d=t.children.findLast(g=>g.name===c),m;if(d?(m=d.material,S5(v,g=>{g.magFilter=V.NearestFilter,g.minFilter=V.NearestFilter,g.flipY=!1,g.wrapS=V.MirroredRepeatWrapping,g.wrapT=V.MirroredRepeatWrapping,m.map=g})):(d=he(r,v,pe[e]),e==="head"&&(d.children[0].position.y+=.01),d.name=c,m=d.material,a||(m.side=V.DoubleSide)),l==="leather"&&!s){let g=i.nbt?.value?.display?.value?.color?.value;if(g){let y=g>>16&255,E=g>>8&255,_=g&255;m.color.setRGB(y/255,E/255,_/255)}else m.color.setHex(11890001);$e(r,t,e,i,n,!0)}else m.color.setHex(16777215);let p=new V.Object3D;p.name=`armor_${e}${s?"_overlay":""}`,p.add(d),t.add(d)}function x2(r,t){for(let e of r.children)(e.name===`geometry_armor_${t}`||e.name===`geometry_armor_${t}_overlay`)&&e.removeFromParent()}var Je=async(r,t)=>{let e;if(!r&&!t)e=await k2;else{if(r||(r=await ne(t,"skin")),!r)return;let{canvas:a}=await Fe(r);e=new T0.CanvasTexture(a)}e.magFilter=T0.NearestFilter,e.minFilter=T0.NearestFilter;let i=new T0.BoxGeometry,n=new T0.MeshStandardMaterial,s=!1,o=new T0.Mesh(i,n);o.scale.x=s?3:4,o.scale.y=12,o.scale.z=4,Fa(i,40,16,s?3:4,12,4),n.map=e,n.needsUpdate=!0;let v=new T0.Group;return v.add(o),v.scale.set(.1,.1,.1),o.rotation.z=Math.PI,v};function Da(r,t,e,i,n,s,o,v){let a=(B,I,W,O)=>[new T0.Vector2(B/o,1-O/v),new T0.Vector2(W/o,1-O/v),new T0.Vector2(W/o,1-I/v),new T0.Vector2(B/o,1-I/v)],l=a(t+s,e,t+i+s,e+s),c=a(t+i+s,e,t+i*2+s,e+s),d=a(t,e+s,t+s,e+s+n),m=a(t+s,e+s,t+i+s,e+s+n),p=a(t+i+s,e+s,t+i+s*2,e+n+s),g=a(t+i+s*2,e+s,t+i*2+s*2,e+n+s),y=r.attributes.uv,E=[p[3],p[2],p[0],p[1]],_=[d[3],d[2],d[0],d[1]],A=[l[3],l[2],l[0],l[1]],C=[c[0],c[1],c[3],c[2]],x=[m[3],m[2],m[0],m[1]],S=[g[3],g[2],g[0],g[1]],z=[];for(let B of[E,_,A,C,x,S])for(let I of B)z.push(I.x,I.y);y.set(new Float32Array(z)),y.needsUpdate=!0}function Fa(r,t,e,i,n,s){Da(r,t,e,i,n,s,64,64)}R();k();M();T();import*as H0 from"three";import{Vec3 as T2}from"vec3";var Zr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAALUlEQVR42mP4//8/IyWYYdSAwW6Ara3tf4oMmD179n9ChhD0AsiQ0Wgc7AYAAOqH+zNQ3r9kAAAAAElFTkSuQmCC";var Xr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAOklEQVR42mP4//8/IyWYYdQA3AbY2tr+H1gDZs+e/R9mCD7D8IYBzBAQTXYgEvIKQQPw2T6aEqlkAADEA/W3ycLXvwAAAABJRU5ErkJggg==";var $r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVR42mP4//8/IyWYYRgbYGtr+39wGQDiYzMUpwGzZ8+GawDRID4IkxSIMEOwaSQ6FgiFBW0NIOR8osJgBOQFALo37sVTOo/LAAAAAElFTkSuQmCC";var t6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWElEQVR42mP4//8/IyWYYXAbYGtr+59sA0CaZ8+eTZkBhNg4DQApQlYIcglMDN1VWA0AKYJpQvYONi/hDUSYIfjCgmA0EooJ2hmAK9CINgBXoA2xvEAMBgBGPud3dYZtOQAAAABJRU5ErkJggg==";var e6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAYklEQVR42r1TQQrAMAxyD8tL89iMHgQJoQxHewi0UsWYFFX1/CkcF4iIsgUWOTM9ASV3F3rHF+v9rK4wEVnEFoFYbwmTbRZFFN9m0B9QZBfk2THaAhqktQdTkHYL9iZe+40vs7nda+BuVOMAAAAASUVORK5CYII=";var i6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAcElEQVR42rWTWwpAIQhEbWGu1MUaXRgQcXpyP8SIPI1jibu3l5DfAKrqyFgfAczsKxx5xJUCFGYFUZXMpOe9CAa8BOS+0U5UVbYQ6Siqbi0BFT0auTSRHZqNkE6BGXgEYKYtAczIbQAz8ukzXT3l3egz49IXvXQCVAAAAABJRU5ErkJggg==";var n6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAeElEQVQ4jaWSQQ4AIQgD9WG8tI/tnkgaUgmuBw8YHcqERXK/nOUuI4JPAABMSESwA1qAQgAQwBygnfNjTaCpWoBzUlNZQJ07x9FUdgSlV5FaW4Cjq8isW8BJ2GgPtEuVdr0HKvLXHjiRI0An8jTKqo9dF000cnBzPgKuxXtbq/m1AAAAAElFTkSuQmCC";var r6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhUlEQVR42qWTSRKAMAgE8WF5KY/FygEL2yEp9cAhCz0wJBYRx58wbowxYsZngLvHjITsgNYpJySBrPIBUMqZSHhdSw+oQlgVa01U7VRQ7huTk67aUWZaVyaNZFsSQBCTVBW3KahLyo/lQ6KR1Y+2BTUyGqke1AXoxsSzpYlU3FW0/Exv1ie0hq53Bf15aAAAAABJRU5ErkJggg==";var s6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAmklEQVR42o2SYQ6FMAiDeQfbSXdYXjSpqd869QeZQiilpbr7l2KM0cc75+xUV77YpGCjAPUqitMU3uCAXrsAlPSCcgJMbG4M0mQ1Etz/i0KlXQnmwyqpv1uH4h7fiws7ISneTYNEk0ImCxcAArGJrE4AXhypPtl7AqTdeJG8k3gHb0L6QfmK9WQTa59cSFdHRssKFHHngteV/wPDepaHIu0QVAAAAABJRU5ErkJggg==";var o6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAoUlEQVR42n2Tyw3AIAxD3cGYlGFTUSmV+2o4IEEAf2JQVV1rjDGq576ec5avWVdfWIW12aMPEJBEImoPv+CAvvcCODsVNWBS8wA4A5ndv1/ytciQvBLMyeTSHD3ZYXPXXH7Y0ZMdJvCxQJls5O6tKHlPPWGEfU58WZR6ive1kKSleFNC2kXGRnrcDqhTTOmPeP3pAZnTq6Oin4X0oXbfnNZu626Io6lqGCwAAAAASUVORK5CYII=";var J5=class{constructor(t){this.worldRenderer=t;h(this,"_cursorLinesHidden",!1);h(this,"cursorLineMaterial");h(this,"interactionLines",null);h(this,"prevColor");h(this,"blockBreakMesh");h(this,"breakTextures",[]);let e=[Zr,Xr,$r,t6,e6,i6,n6,r6,s6,o6];for(let n=0;n<10;n++)bt(e[n]).then(s=>{s.magFilter=H0.NearestFilter,s.minFilter=H0.NearestFilter,this.breakTextures.push(s)});let i=new H0.MeshBasicMaterial({transparent:!0,blending:H0.MultiplyBlending,alphaTest:.5});this.blockBreakMesh=new H0.Mesh(new H0.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 jt({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:v}=i,a=new T2(n.x,n.y,n.z);this.blockBreakMesh.scale.set(s*1.001,o*1.001,v*1.001),a.add(new T2(t.x,t.y,t.z)),this.blockBreakMesh.position.set(a.x,a.y,a.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)&&qa(e??[],this.interactionLines.shapePositions??[])&&!i||(this.interactionLines!==null&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.interactionLines.mesh),this.interactionLines=null),t===null))return;let n=new H0.Group;for(let{position:s,width:o,height:v,depth:a}of e??[]){let l=new T2(s.x,s.y,s.z),c=[1.0001*o,1.0001*v,1.0001*a],d=new H0.BoxGeometry(...c),m=new Nt().fromEdgesGeometry(new H0.EdgesGeometry(d)),p=new Ze(m,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()}},qa=(r,t)=>{if(r.length!==t.length)return!1;for(let[e,i]of r.entries())if(i!==t[e])return!1;return!0};R();k();M();T();R();k();M();T();var Za=Me(t2(),1);import a6 from"prismarine-nbt";import{getItemDefinition as Xa}from"mc-assets/dist/itemDefinitions";var $a=(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 v=o.get("custom_name")||o.get("item_name");v&&(e=typeof v.data=="string"?v.data:a6.simplify(v.data));let a=o.get("item_model");if(a&&(i=a.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=a6.simplify(r.nbt),v=o.display?.Name;v&&(e=v),s&&o.CustomModelData&&s[o.CustomModelData]&&(i=s[o.CustomModelData])}return{customText:e,customModel:i}};var v6=(r,t,e,i)=>{let n=r.name,{customModel:s}=$a(r,e);s&&(n=s);let o=C3(i,{...t}),v=Xa(e.currentResources.itemsDefinitionsStore,{name:n,version:e.currentResources.version,properties:o})?.model;return(v==="minecraft:special"?void 0:v)??n};R();k();M();T();var h6=Me(u6(),1);import{versionToNumber as f6}from"mc-assets/dist/utils";var m6=(r,t,e=!1,i=!1)=>{let n=r.modelName,s=globalThis.loadedData.itemsByName[n];f6(t.currentResources.version)<f6("1.13")&&(n=(0,h6.getRenamedData)(s?"items":"blocks",n,t.currentResources.version,"1.13.1"));let o;if(!i){let a=t.currentResources?.guiAtlas?.json,l=d=>d&&a?.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*a.width,m=c.v*a.height;return{texture:"gui",slice:[d,m,a.tileSize,a.tileSize],scale:.25,blockData:null,modelName:null}}}let v=a=>a.top??a;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(a){reportError?.(`Failed to render item ${n} (original: ${r.originalItemName}) on ${t.currentResources.version} (resourcepack: TODO!): ${a.stack}`),o=v(t.currentResources.itemsRenderer.getItemTexture("errored"))}return o??(o=v(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 p6=(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 v=o?globalThis.loadedData.blocksByStateId[o]?.name:typeof s=="number"?globalThis.loadedData.items[s]?.name:s;if(!v)throw new Error(`Item not found: ${s}`);let a=v6({...r,name:v},t,e,i),l=m6({modelName:a},e,!1,!0);if(!l)throw new Error(`Failed to get render info for item ${v}`);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,m,p,g]=l.slice,[y,E,_,A]=[d/c.width,m/c.height,p/c.width,g/c.height];return{u:y,v:E,su:_,sv:A,renderInfo:l,modelName:l.modelName}}throw new Error(`Invalid render info for item ${v}`)}catch(v){return reportError?.(v),{u:0,v:0,su:16/n.blocksAtlasImage.width,sv:16/n.blocksAtlasImage.width,modelName:"missing"}}};R();k();M();T();import*as ye from"three";var Z5=class{constructor(t){this.worldRenderer=t;h(this,"audioListener");h(this,"activeSounds",new Set);h(this,"audioContext");h(this,"soundVolumes",new Map);h(this,"baseVolume",1);t.onWorldSwitched.push(()=>{this.stopAll()}),t.onReactiveConfigUpdated("volume",e=>{this.changeVolume(e)})}initAudioListener(){this.audioListener||(this.audioListener=new ye.AudioListener,this.worldRenderer.camera.add(this.audioListener))}playSound(t,e,i=1,n=1,s=500){this.initAudioListener();let o=new ye.PositionalAudio(this.audioListener);this.activeSounds.add(o),this.soundVolumes.set(o,i);let v=new ye.AudioLoader,a=Date.now();v.loadAsync(e).then(l=>{Date.now()-a>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),v.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")}};R();k();M();T();import*as M0 from"three";R();k();M();T();var g6=Math.PI/180;function b6(r){let{walkDist:t,prevWalkDist:e,bob:i,prevBob:n,partialTick:s}=r,o=t-e,v=-(t+o*s),a=n+(i-n)*s,l=Math.sin(v*Math.PI),c=Math.cos(v*Math.PI);return{position:{x:l*a*.5,y:-Math.abs(c*a)},rotation:{x:Math.abs(Math.cos(v*Math.PI-.2)*a)*5*g6,z:l*a*3*g6}}}var X5=class{constructor(t,e){this.worldRenderer=t;this.onRenderCallbacks=e;h(this,"rollAngle",0);h(this,"rollAnimation");h(this,"basePitch",0);h(this,"baseYaw",0);h(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 M0.Quaternion().setFromAxisAngle(new M0.Vector3(0,1,0),this.baseYaw);t.setRotationFromQuaternion(e)}else{let e=this.addAntiZfightingOffset(this.basePitch),i=this.addAntiZfightingOffset(this.baseYaw),n=new M0.Quaternion().setFromAxisAngle(new M0.Vector3(1,0,0),e),s=new M0.Quaternion().setFromAxisAngle(new M0.Vector3(0,1,0),i),o=new M0.Quaternion().setFromAxisAngle(new M0.Vector3(0,0,1),M0.MathUtils.degToRad(this.rollAngle)),v=new M0.Quaternion,a=new M0.Quaternion,l=this.worldRenderer.playerStateReactive.perspective;if(this.cameraBobInput){let d=b6(this.cameraBobInput);v=new M0.Quaternion().setFromAxisAngle(new M0.Vector3(0,0,1),d.rotation.z),a=new M0.Quaternion().setFromAxisAngle(new M0.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(v).multiply(a);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}};R();k();M();T();import*as Y from"three";var $5=class{constructor(t){this.worldRenderer=t;h(this,"customMedia",new Map);h(this,"lastCheck",0);h(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 v=s.getContext("2d");if(!v)return new Y.CanvasTexture(s);v.clearRect(0,0,s.width,s.height),v.fillStyle=`rgba(${i>>16&255}, ${i>>8&255}, ${i&255}, 1)`,v.fillRect(0,0,s.width,s.height),v.fillStyle="#ff0000",v.font="bold 10px sans-serif",v.textAlign="center",v.textBaseline="middle",v.fillText(n,s.width/2,s.height/2,s.width);let a=new Y.CanvasTexture(s);return a.minFilter=Y.LinearFilter,a.magFilter=Y.LinearFilter,a}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 Y.CanvasTexture(s);let v=i>>16&255,a=i>>8&255,l=i&255;o.fillStyle=`rgba(${v}, ${a}, ${l}, ${n})`,o.fillRect(0,0,1,1);let c=new Y.CanvasTexture(s);return c.minFilter=Y.NearestFilter,c.magFilter=Y.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 v=e.src.endsWith(".png")||e.src.endsWith(".jpg")||e.src.endsWith(".jpeg")||e.imageOverride;n&&!e.imageOverride&&fetch(e.src,{method:"HEAD"}).then(x=>{x.headers.get("content-type")?.startsWith("image/")&&(this.destroyMedia(t),this.addMedia(t,{...i,src:e.src,imageOverride:!0}))}).catch(console.error);let a,l;if(!v){a=document.createElement("video"),a.src=e.src.endsWith(".gif")?e.src.replace(".gif",".mp4"):e.src,a.loop=e.loop??!0;let x=(e.volume??1)*this.worldRenderer.worldRendererConfig.volume;a.volume=Math.min(x,1),a.playsInline=!0,a.crossOrigin="anonymous";let S=this.worldRenderer.soundSystem;if(S.initAudioListener(),!S.audioListener)throw new Error("Audio listener not initialized");l=new Y.PositionalAudio(S.audioListener),l.setRefDistance(6),l.setVolume(x),this.worldRenderer.sceneOrigin.addAndTrack(l),l.position.set(e.position.x,e.position.y,e.position.z),l.setMediaElementSource(a),l.connect(),a.addEventListener("pause",()=>{l?.pause(),globalThis.tempSendVideoStop?.(t,"paused",a.currentTime)}),a.addEventListener("play",()=>{l?.play(),globalThis.tempSendVideoPlay?.(t)}),a.addEventListener("seeked",()=>{l&&a&&(l.offset=a.currentTime)}),a.addEventListener("stalled",()=>{globalThis.tempSendVideoStop?.(t,"stalled",a.currentTime)}),a.addEventListener("waiting",()=>{globalThis.tempSendVideoStop?.(t,"waiting",a.currentTime)}),a.addEventListener("error",({error:z})=>{globalThis.tempSendVideoStop?.(t,`error: ${z}`,a.currentTime)}),a.addEventListener("ended",()=>{globalThis.tempSendVideoStop?.(t,"ended",a.currentTime),e.loop||(a.currentTime=0,C.ended=!0)})}let c=this.createBackgroundTexture(e.size.width,e.size.height,e.background),d=x=>{let S=this.createErrorTexture(e.size.width,e.size.height,e.background,x);g.map=S,g.needsUpdate=!0},m=new Y.PlaneGeometry(1,1),p=e.allowLighting?Y.MeshLambertMaterial:Y.MeshBasicMaterial,g=new p({map:c,transparent:!0,side:e.doubleSide?Y.DoubleSide:Y.FrontSide,alphaTest:.1}),y=a?new Y.VideoTexture(a):new Y.TextureLoader().load(e.src,()=>{this.customMedia.get(t)?.texture===y&&(g.map=y,g.needsUpdate=!0)},void 0,()=>d());y.minFilter=Y.NearestFilter,y.magFilter=Y.NearestFilter,y.generateMipmaps=!1;let E=new Y.Mesh(m,g),{mesh:_}=this.positionMeshExact(E,Y.MathUtils.degToRad((e.rotation??0)*90),e.position,e.size.width,e.size.height);s.add(_),a&&(E.onBeforeRender=()=>{a.readyState===a.HAVE_ENOUGH_DATA&&(!a.paused||!C?.hadAutoPlayError)&&(g.map!==y&&(g.map=y,g.needsUpdate=!0),y.needsUpdate=!0,l&&(l.position.copy(_.position),l.rotation.copy(_.rotation)))});let A=x=>{let S=m.attributes.uv.array;S[0]=x.startU,S[1]=x.startV,S[2]=x.endU,S[3]=x.startV,S[4]=x.endU,S[5]=x.endV,S[6]=x.startU,S[7]=x.endV,m.attributes.uv.needsUpdate=!0};e.uvMapping&&A(e.uvMapping);let C={mesh:_,video:a,texture:y,updateUVMapping:A,positionalAudio:l,props:i,hadAutoPlayError:!1,pausedBecuaseHidden:!1,ended:!1,handleError(x){if(C.destroyed)return;let S=z=>z;d(x.name==="NotAllowedError"||x.name==="AbortError"?S("Waiting for user interaction"):S("Failed to auto play"))}};return this.customMedia.set(t,C),a&&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 Y.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 v=new Y.Group;v.add(t);let a=new Y.Mesh(new Y.BoxGeometry(.1,.1,.1),new Y.MeshBasicMaterial({color:16711680}));a.position.set(i.x,i.y,i.z),v.add(a);let l=i.x+Math.cos(e)*n,c=i.z+Math.sin(e)*n,d=new Y.Mesh(new Y.BoxGeometry(.1,.1,.1),new Y.MeshBasicMaterial({color:255}));d.position.set(i.x,i.y+s,i.z),v.add(d);let m=new Y.Mesh(new Y.BoxGeometry(.1,.1,.1),new Y.MeshBasicMaterial({color:16776960}));m.position.set(l,i.y,c),v.add(m);let p=new Y.Mesh(new Y.BoxGeometry(.1,.1,.1),new Y.MeshBasicMaterial({color:16711935}));p.position.set(l,i.y+s,c),v.add(p);let g=new Y.Vector3(this.worldRenderer.sceneOrigin.toSceneX(i.x),this.worldRenderer.sceneOrigin.toSceneY(i.y),this.worldRenderer.sceneOrigin.toSceneZ(i.z)),y=new Y.ArrowHelper(new Y.Vector3(Math.cos(e),0,Math.sin(e)),g,1,16711680);return v.add(y),{mesh:t,debugGroup:v}}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 Y.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 Y.Raycaster,n=new Y.Vector2(0,0);i.setFromCamera(n,t);let s=i.intersectObjects(e.children,!0);if(s.length>0){let o=s[0],v=o.object;for(let[a,l]of this.customMedia.entries())if(v===l.mesh||l.mesh.children.includes(v)){let{uv:c}=o;if(c){let d={id:a,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),v=o?.props.controlMode;if(o?.video&&(v?.mouseButton==="both"||v?.mouseButton===t))switch(v?.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}}}}};R();k();M();T();import*as wt from"three";R();k();M();T();import*as h0 from"three";var tt={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 y6(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)??tt.DEFAULT_VISUAL_SCALE,s=r.opacity??r.metadata?.opacity??(typeof window>"u"?void 0:window.serverMetadata?.waypointOpacity)??tt.DEFAULT_OPACITY,o=r8(t,r.label??"","0m",e,n);o.renderOrder=10,o.material.opacity=s;let v=r.label??"",a="0m",l=0,c,d=null,m=tt.ARROW.enabledDefault,p=new h0.Group;p.add(o);let{x:g,y,z:E}=r.position;p.position.set(g,y,E);function _(N){let Z=t1(N,v,"0m",n),J=new h0.CanvasTexture(Z),s0=o.material;s0.map?.dispose(),s0.map=J,s0.needsUpdate=!0}function A(N){v=N??"";let Z=t1(t,v,"0m",n),J=new h0.CanvasTexture(Z),s0=o.material;s0.map?.dispose(),s0.map=J,s0.needsUpdate=!0}function C(N,Z){if(Z===a)return;a=Z;let J=t1(t,N,Z,n),s0=new h0.CanvasTexture(J),o0=o.material;o0.map?.dispose(),o0.map=s0,o0.needsUpdate=!0}function x(N){o.visible=N}function S(N,Z,J){p.position.set(N,Z,J)}function z(N,Z,J,s0){let o0=Z*Math.PI/180,$=Math.tan(o0/2)*2*J*(tt.TARGET_SCREEN_PX*n/s0);o.scale.set($,$,1)}function B(){if(c)return;let N=128,Z=I0(N,N),J=Z.getContext("2d");J.clearRect(0,0,N,N),J.beginPath(),J.moveTo(N*.15,N*.5),J.lineTo(N*.85,N*.5),J.lineTo(N*.5,N*.15),J.closePath();let s0=`#${t.toString(16).padStart(6,"0")}`;J.lineWidth=6,J.strokeStyle="black",J.stroke(),J.fillStyle=s0,J.fill();let o0=new h0.CanvasTexture(Z),f0=new h0.SpriteMaterial({map:o0,transparent:!0,depthTest:!1,depthWrite:!1,opacity:s});c=new h0.Sprite(f0),c.renderOrder=12,c.visible=!1,d&&d.add(c)}function I(N){m=N,!N&&c&&(c.visible=!1)}function W(N){c?.parent&&c.parent.remove(c),d=N,c&&N&&N.add(c)}function O(N,Z,J){if(!m||(B(),!c))return!0;let s0=r.metadata?.onlyLeftRight===!0,o0=new h0.Vector3;N.getWorldDirection(o0);let f0=N.up.clone().normalize(),$=new h0.Vector3().copy(o0).cross(f0).normalize(),g0=new h0.Vector3().copy($).cross(o0).normalize(),st=new h0.Vector3().setFromMatrixPosition(N.matrixWorld),V0=new h0.Vector3(p.position.x,p.position.y,p.position.z).sub(st),Q0=V0.dot(o0),Rt=V0.dot($),kt=V0.dot(g0),Y0=Z/J,et=N.fov*Math.PI/180,Ae=2*Math.atan(Math.tan(et/2)*Y0),a5=Math.atan2(Rt,Q0),Ee=Math.atan2(kt,Q0);if(Q0>0&&Math.abs(a5)<=Ae/2&&Math.abs(Ee)<=et/2)return c.visible=!1,!0;let P0=a5/(Ae/2),K0=Ee/(et/2);Q0<=0&&(Math.abs(P0)>Math.abs(K0)?(P0=Math.sign(P0),K0=0):(P0=0,K0=Math.sign(K0))),s0&&(Math.abs(P0)>Math.abs(K0)||(P0=P0>=0?1:-1),K0=0);let v5=Math.max(Math.abs(P0),Math.abs(K0))||1,Mt=P0/v5,xe=K0/v5,qt=tt.ARROW.paddingPx,l5=(Mt+1)*.5*Z,Zt=(1-xe)*.5*J,J0=Math.min(Math.max(l5,qt),Z-qt),Re=Math.min(Math.max(Zt,qt),J-qt);Mt=J0/Z*2-1,xe=-(Re/J)*2+1;let ke=Math.max(2,N.near*4),$0=Math.tan(et/2)*ke,b1=$0*Y0,b=st.clone().add(o0.clone().multiplyScalar(ke)).add($.clone().multiplyScalar(Mt*b1)).add(g0.clone().multiplyScalar(xe*$0));c.visible=!0,c.position.copy(b);let u=Math.atan2(K0,P0);c.material.rotation=u-Math.PI/2;let w=Math.tan(et/2)*2*ke*(tt.ARROW.pixelSize*n/J);return c.scale.set(w,w,1),!1}function j(N){return p.position.length()}function q(N,Z,J,s0){let o0=j(N);z(N,Z.fov,o0,s0);let f0=Math.round(o0);Math.abs(f0-l)>=1&&(l=f0,C(v,`${f0}m`));let $=O(Z,J,s0);return x($),$}function i0(){let N=o.material;if(N.map?.dispose(),N.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:_,setLabel:A,updateDistanceText:C,setVisible:x,setPosition:S,dispose:i0}}function t1(r,t,e,i=1){let n=tt.CANVAS_SCALE*(globalThis.devicePixelRatio||1),s=tt.CANVAS_SIZE*n,o=I0(s,s),v=o.getContext("2d");v.clearRect(0,0,s,s);let a=s/2,l=Math.round(s*tt.LAYOUT.DOT_Y),c=Math.round(s*.05*i),d=Math.max(2,Math.round(4*n*i));v.beginPath(),v.arc(a,l,c+d,0,Math.PI*2),v.fillStyle="black",v.fill(),v.beginPath(),v.arc(a,l,c,0,Math.PI*2),v.fillStyle=`#${r.toString(16).padStart(6,"0")}`,v.fill(),v.textAlign="center",v.textBaseline="middle";let m=Math.round(s*.08*i),p=Math.round(s*.06*i);v.font=`bold ${m}px mojangles`,v.lineWidth=Math.max(2,Math.round(3*n*i));let g=Math.round(s*tt.LAYOUT.NAME_Y);v.strokeStyle="black",v.strokeText(t,a,g),v.fillStyle="white",v.fillText(t,a,g),v.font=`bold ${p}px mojangles`,v.lineWidth=Math.max(2,Math.round(2*n*i));let y=Math.round(s*tt.LAYOUT.DISTANCE_Y);return v.strokeStyle="black",v.strokeText(e,a,y),v.fillStyle="#CCCCCC",v.fillText(e,a,y),o}function r8(r,t,e,i,n=1){let s=t1(r,t,e,n),o=new h0.CanvasTexture(s);o.anisotropy=1,o.magFilter=h0.LinearFilter,o.minFilter=h0.LinearFilter;let v=new h0.SpriteMaterial({map:o,transparent:!0,opacity:1,depthTest:i,depthWrite:!1}),a=new h0.Sprite(v);return a.position.set(0,0,0),a}var e1=class{constructor(t){this.worldRenderer=t;h(this,"waypoints",new Map);h(this,"waypointScene",new wt.Scene);h(this,"lastCameraPosition",new wt.Vector3);h(this,"lastUpdateTime",0);h(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 wt.Vector2);for(let o of this.waypoints.values()){let v=new wt.Vector3(o.x,o.y,o.z),a=e.distanceTo(v),l=(!o.minDistance||a>=o.minDistance)&&(o.maxDistance===1/0||a<=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:v,metadata:a}=s,l=s.minDistance??0,c=s.maxDistance??1/0,d=y6({position:new wt.Vector3(e,i,n),color:o,label:v||t,metadata:a});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:v,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))}};R();k();M();T();import*as p0 from"three";import{Vec3 as t5}from"vec3";var m0=class m0{constructor(t){this.worldRenderer=t;h(this,"explosions",new Map);h(this,"particleGeometry");h(this,"particleMaterials",[]);h(this,"testModeTimer");h(this,"explosionCounter",0);this.particleGeometry=new p0.BoxGeometry(m0.DEFAULT_PARTICLE_SIZE,m0.DEFAULT_PARTICLE_SIZE,m0.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 p0.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=m0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],v=Math.floor(m0.DEFAULT_PARTICLE_COUNT*e),a;if(m0.DEBUG_SHOW_EXPLOSION_CENTER){let c=.5*e,d=new p0.SphereGeometry(c,8,8),m=new p0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});a=new p0.Mesh(d,m),a.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(a),a.position.set(t.x,t.y,t.z)}for(let c=0;c<v;c++){let d=Math.random()*Math.PI*2,m=Math.sqrt(Math.random())*m0.VELOCITY_FACTOR*e,p=new t5(m*Math.cos(d),Math.random()*.5-.25,m*Math.sin(d));c<5;let g=i===void 0?this.getRandomMaterial().clone():new p0.MeshBasicMaterial({color:i,transparent:!0,opacity:1}),y=new p0.Mesh(this.particleGeometry,g);y.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(y),y.position.set(t.x,t.y,t.z),c<5;let E={position:t.clone(),velocity:p,color:new p0.Color(g.color),life:1,maxLife:1,mesh:y};o.push(E)}let l={id:s,position:t.clone(),particles:o,startTime:Date.now(),duration:n,size:e,debugSphere:a};return this.explosions.set(s,l),l}createExplosionFacingCamera(t,e=1,i,n=m0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],v=Math.floor(m0.DEFAULT_PARTICLE_COUNT*e),a;if(m0.DEBUG_SHOW_EXPLOSION_CENTER){let m=.5*e,p=new p0.SphereGeometry(m,8,8),g=new p0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});a=new p0.Mesh(p,g),a.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(a),a.position.set(t.x,t.y,t.z)}let l=this.worldRenderer.getCameraPosition(),c=new t5(l.x-t.x,l.y-t.y,l.z-t.z).normalize();for(let m=0;m<v;m++){let p=Math.random()*Math.PI*2,g=Math.sqrt(Math.random())*m0.VELOCITY_FACTOR*e,y=new t5(g*Math.cos(p),g*Math.sin(p),0),E=new t5(y.x*c.x-y.z*c.z,y.y,y.x*c.z+y.z*c.x);m<5;let _=i===void 0?this.getRandomMaterial().clone():new p0.MeshBasicMaterial({color:i,transparent:!0,opacity:1}),A=new p0.Mesh(this.particleGeometry,_);A.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(A),A.position.set(t.x,t.y,t.z);let C={position:t.clone(),velocity:E,color:new p0.Color(_.color),life:1,maxLife:1,mesh:A};o.push(C)}let d={id:s,position:t.clone(),particles:o,startTime:Date.now(),duration:n,size:e,debugSphere:a};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 t5(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)},m0.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+=m0.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 v=t.life;t.life-=e/i;let a=Math.max(0,t.life);if(t.mesh.material instanceof p0.MeshBasicMaterial&&(t.mesh.material.opacity=a),n&&v>.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 p0.Material&&i.mesh.material.dispose();e.debugSphere&&(this.worldRenderer.sceneOrigin.removeAndUntrack(e.debugSphere),e.debugSphere.geometry.dispose(),e.debugSphere.material instanceof p0.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()}};h(m0,"DEFAULT_PARTICLE_COUNT",50),h(m0,"DEFAULT_PARTICLE_SIZE",.05),h(m0,"DEFAULT_EXPLOSION_DURATION",6e3),h(m0,"GRAVITY",-.005),h(m0,"VELOCITY_FACTOR",1.5),h(m0,"TEST_INTERVAL",1e3),h(m0,"DEBUG_SHOW_EXPLOSION_CENTER",!0),h(m0,"DEBUG_SHOW_PARTICLE_TRAILS",!1);var i1=m0;R();k();M();T();import*as Qt from"three";import{Vec3 as M2}from"vec3";var n1=class r{constructor(t,e,i,n){this.worldRenderer=t;this.updateCamera=e;this.updateFov=i;this.getInitialState=n;h(this,"isRunning",!1);h(this,"currentScript",null);h(this,"currentPointIndex",0);h(this,"currentTweens",[]);h(this,"startTime",0);h(this,"totalDuration",0);h(this,"currentPosition",{x:0,y:0,z:0});h(this,"currentRotation",{yaw:0,pitch:0});h(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 M2(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}]),v=[n,s,o];return this.startScript(v[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 Qt.Vector3(e.lookAt.x,e.lookAt.y,e.lookAt.z),m=new Qt.Vector3(e.x,e.y,e.z),p=d.sub(m).normalize();s.yaw=Math.atan2(-p.x,-p.z),s.pitch=Math.asin(p.y)}let v=this.getEasingFunction(e.easing||"easeInOut"),a=new S0(this.currentPosition).to(n,i).easing(v).onUpdate(()=>{this.updateCamera(new M2(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(v).onUpdate(()=>{this.updateCamera(new M2(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(v).onUpdate(()=>{this.currentFov=d.fov,this.updateFov(this.currentFov)})}this.currentTweens=[a,l],c&&this.currentTweens.push(c),a.start(),l.start(),c?.start(),a.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 R0.Linear.None;case"easeIn":return R0.Quadratic.In;case"easeOut":return R0.Quadratic.Out;case"easeInOut":return R0.Quadratic.InOut;case"smoothstep":return R0.Cubic.InOut;case"bounce":return R0.Bounce.Out;default:return R0.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 v=0;v<=8;v++){let a=v/8*Math.PI*2,l=t.x+Math.cos(a)*e,c=t.z+Math.sin(a)*e,d=t.y+i;s.push({x:l,y:d,z:c,yaw:a+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,v=20;for(let a=0;a<=o;a++){let l=a/o,c=l*i*Math.PI*2,d=Qt.MathUtils.lerp(t.x,e.x,l)+Math.cos(c)*v*(1-l),m=Qt.MathUtils.lerp(t.z,e.z,l)+Math.sin(c)*v*(1-l),p=Qt.MathUtils.lerp(t.y,e.y,l);s.push({x:d,y:p,z:m,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}}};R();k();M();T();import*as t0 from"three";var S2=.75,r1=class{constructor(t,e,i){this.scene=t;this.defaultSkybox=e;this.initialImage=i;h(this,"texture",null);h(this,"mesh",null);h(this,"skyMesh",null);h(this,"voidMesh",null);h(this,"worldTime",0);h(this,"partialTicks",0);h(this,"viewDistance",4);h(this,"temperature",S2);h(this,"inWater",!1);h(this,"waterBreathing",!1);h(this,"fogBrightness",0);h(this,"prevFogBrightness",0);h(this,"fogOrangeness",0);h(this,"distanceFactor",2.7);h(this,"brightnessAtPosition",1);h(this,"debugGui");this.debugGui=new Vt("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 t0.TextureLoader;if(this.texture=await new Promise(i=>{e.load(t,n=>{n.mapping=t0.EquirectangularReflectionMapping,n.encoding=t0.sRGBEncoding,n.minFilter=t0.NearestFilter,n.magFilter=t0.NearestFilter,n.needsUpdate=!0,i(n)})}),this.mesh)this.mesh.material.map=this.texture,this.mesh.material.needsUpdate=!0;else{let i=new t0.SphereGeometry(500,60,40);i.scale(-1,1,1);let n=new t0.MeshBasicMaterial({map:this.texture,side:t0.FrontSide});this.mesh=new t0.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 t0.PlaneGeometry(768,768);i.rotateX(-Math.PI/2),i.translate(0,16,0);let n=new t0.MeshBasicMaterial({color:16777215,side:t0.DoubleSide,depthTest:!1});this.skyMesh=new t0.Mesh(i,n),this.scene.add(this.skyMesh)}{let i=new t0.PlaneGeometry(768,768);i.rotateX(-Math.PI/2),i.translate(0,-16,0);let n=new t0.MeshBasicMaterial({color:16777215,side:t0.DoubleSide,depthTest:!1});this.voidMesh=new t0.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 t0.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),v=this.getSkyColorByTemp(o),a=(v>>16&255)/255,l=(v>>8&255)/255,c=(v&255)/255;return new t0.Vector3(a*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 v=(t-Math.floor(t))*6,a=v-Math.floor(v),l=i*(1-e),c=i*(1-e*a),d=i*(1-e*(1-a));switch(Math.floor(v)){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 t0.Fog(new t0.Color(0,0,1),.0025,g),this.scene.background=new t0.Color(0,0,1),this.skyMesh.material.color.set(new t0.Color(0,0,1)),this.voidMesh.material.color.set(new t0.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),v=this.getFogColor(this.partialTicks),a=Math.cos(s*Math.PI*2)*2+.5,l=Math.max(0,Math.min(1,a)),c=this.prevFogBrightness+(this.fogBrightness-this.prevFogBrightness)*this.partialTicks,d=(v.x+(o.x-v.x)*n)*l*c,m=(v.y+(o.y-v.y)*n)*l*c,p=(v.z+(o.z-v.z)*n)*l*c;this.scene.background=new t0.Color(d,m,p),this.scene.fog=new t0.Fog(new t0.Color(d,m,p),.0025,i*this.distanceFactor),this.skyMesh.material.color.set(new t0.Color(o.x,o.y,o.z)),this.voidMesh.material.color.set(new t0.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))}};R();k();M();T();import*as e0 from"three";var s8=`
21188
21188
  precision highp float;
21189
21189
  attribute vec3 position;
21190
21190
  attribute vec4 color;
@@ -21204,7 +21204,7 @@ void main() {
21204
21204
  gl_PointSize = size * adjustSize * (300.0 / length(mvPosition.xyz));
21205
21205
  gl_Position = projectionMatrix * mvPosition;
21206
21206
  }
21207
- `,e8=`
21207
+ `,o8=`
21208
21208
  precision highp float;
21209
21209
  uniform sampler2D texture;
21210
21210
  varying vec4 vColor;
@@ -21213,7 +21213,7 @@ void main() {
21213
21213
  vec4 texColor = texture2D(texture, gl_PointCoord);
21214
21214
  gl_FragColor = vColor * texColor;
21215
21215
  }
21216
- `,H0={textureSize:128,gravity:new e0.Vector3(0,-.005,0),friction:.998,defaultParticleSize:300,maxActiveFireworks:5},e5=r=>{let e=r*3;return{x:e,y:e+1,z:e+2}},i5=r=>{let e=r*4;return{r:e,g:e+1,b:e+2,a:e+3}},Yt=(r=0,t=0)=>Math.floor(Math.random()*(r+1-t))+t,i8=(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()},n8=()=>{let r=H0.textureSize,t=B0(r,r),e=t.getContext("2d"),i=r/2;i8(e,i,t.width,t.height);let n=new e0.Texture(t);return n.needsUpdate=!0,n},r8=(r,t,e,i,n=H0.defaultParticleSize)=>{let s=new e0.BufferGeometry,o=[],v=[],a=[],l=[],c=[],d=Math.random()>.3?"single":"multiple",m=Yt(100,20)*.01,p=()=>Yt(100,1)*.01,g="red",y=Math.random();y>.66?g="red":y>.33?g="green":g="blue";for(let _=0;_<r;_++){let E=new e0.Vector3(0,0,0);if(o.push(E.x,E.y,E.z),v.push(t[_].x,t[_].y,t[_].z),e==="seed"){let C=t[_].y**2*.04;_===0&&(C*=1.1),l.push(C),c.push(C*.017),a.push(1,1,1,1)}else if(e==="trail"){let C=Math.random()*.1+.1;l.push(C),c.push(C*.017),a.push(1,1,1,1)}else{let C=Yt(n,10)*.001;if(l.push(C),c.push(C*.017),d==="multiple")a.push(p(),p(),p(),1);else switch(g){case"red":a.push(m,.1,.1,1);break;case"green":a.push(.1,m,.1,1);break;case"blue":a.push(.1,.1,m,1);break}}}s.setAttribute("position",new e0.Float32BufferAttribute(o,3)),s.setAttribute("velocity",new e0.Float32BufferAttribute(v,3)),s.setAttribute("color",new e0.Float32BufferAttribute(a,4)),s.setAttribute("adjustSize",new e0.Float32BufferAttribute(l,1)),s.setAttribute("mass",new e0.Float32BufferAttribute(c,1));let w=new e0.RawShaderMaterial({uniforms:{size:{value:H0.textureSize},texture:{value:i}},transparent:!0,depthWrite:!1,blending:e0.AdditiveBlending,vertexShader:t8,fragmentShader:e8});return new e0.Points(s,w)},n5=class{constructor(t,e,i,n,s){h(this,"particleNum");h(this,"timerStartFading");h(this,"mesh");this.particleNum=t,this.timerStartFading=10,this.mesh=r8(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,v=a=>Math.random()>.5?0:(1-a)*.1;for(let a=0;a<this.particleNum;a++){let{x:l,y:c,z:d}=e5(a);i.array[c]+=t.y-s.array[a],i.array[l]*=H0.friction,i.array[d]*=H0.friction,i.array[c]*=H0.friction,e.array[l]+=i.array[l],e.array[c]+=i.array[c],e.array[d]+=i.array[d];let{a:m}=i5(a);this.timerStartFading<=0&&(n.array[m]*=o()-v(n.array[m]),n.array[m]<.001&&(n.array[m]=0))}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}disposeAll(){this.mesh.geometry.dispose(),this.mesh.material.dispose()}},S2=class extends n5{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,v=d=>Math.random()>.3?0:(1-d)*.1,a=()=>Math.random()>.5?.05:-.05,l=()=>Math.random()>.1,c=H0.friction*.98;for(let d=0;d<this.particleNum;d++){let{x:m,y:p,z:g}=e5(d);i.array[p]+=t.y-s.array[d],i.array[m]*=c,i.array[g]*=c,i.array[p]*=c,e.array[m]+=i.array[m],e.array[p]+=i.array[p],e.array[g]+=i.array[g],l()&&(e.array[m]+=a()),l()&&(e.array[g]+=a());let{a:y}=i5(d);n.array[y]*=o()-v(n.array[y]),n.array[y]<.001&&(n.array[y]=0)}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},C2=class extends n5{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,v=()=>Math.random()>.5?.05:-.05,a=()=>Math.random()>.2;for(let l=0;l<this.particleNum;l++){let{x:c,y:d,z:m}=e5(l);i.array[d]+=t.y-s.array[l],i.array[c]*=H0.friction,i.array[m]*=H0.friction,i.array[d]*=H0.friction,e.array[c]+=i.array[c],e.array[d]+=i.array[d],e.array[m]+=i.array[m],a()&&(e.array[c]+=v()),a()&&(e.array[m]+=v());let{a:p}=i5(l);n.array[p]*=o(),n.array[p]<.001&&(n.array[p]=0)}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},r5=class{constructor(t,e=H0.defaultParticleSize,i){h(this,"meshGroup");h(this,"isExplode");h(this,"petalsNum");h(this,"life");h(this,"seed");h(this,"flowerSizeRate");h(this,"flower");h(this,"texture");h(this,"particleSize");this.meshGroup=new e0.Group,this.isExplode=!1,this.texture=t,this.particleSize=e;let n=400,s=150;this.petalsNum=Yt(n,s),this.life=150,this.seed=this.getSeed(i),this.meshGroup.add(this.seed.mesh),this.flowerSizeRate=e0.MathUtils.mapLinear(this.petalsNum,s,n,.4,.7)}getSeed(t){let i=[];for(let s=0;s<40;s++){let v=s===0?Math.random()*2.5+.9:Math.random()*2+.4,a=0;i.push(new e0.Vector3(0,v,a))}let n=new S2(40,i,this.texture);if(t)n.mesh.position.set(0,0,0);else{let s=Math.random()*80-40,o=-50,v=Math.random()*80-40;n.mesh.position.set(s,o,v)}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 v=0;v<e;v++){n=Yt(120,60)*.01;let a=e0.MathUtils.degToRad(Math.random()*180),l=e0.MathUtils.degToRad(Math.random()*360),c=Math.sin(a)*Math.cos(l)*n,d=Math.sin(a)*Math.sin(l)*n,m=Math.cos(a)*n,p=new e0.Vector3(c,d,m);p.multiplyScalar(this.flowerSizeRate),i.push(p)}else{let v=180/e,a=360*(Math.random()*20+1)/e,l=a,c=a;n=Yt(120,60)*.01;for(let d=0;d<e;d++){let m=Math.sin(e0.MathUtils.degToRad(v*d)),p=Math.cos(e0.MathUtils.degToRad(v*d))*n,g=Math.cos(e0.MathUtils.degToRad(l*d))*m*n,y=Math.sin(e0.MathUtils.degToRad(c*d))*m*n,w=new e0.Vector3(g,y,p);w.multiplyScalar(this.flowerSizeRate),i.push(w)}}let o=new n5(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(H0.gravity);let t=this.seed.mesh.geometry.attributes.position,e=this.seed.mesh.geometry.attributes.velocity,i=0;for(let d=0,m=e.array.length;d<m;d++){let p=e.array[d];d%3===1&&p>0&&i++}if(!(i===0))return;let{x:s,y:o,z:v}=this.seed.mesh.position,a=new e0.Vector3(s,o,v),l=0,c;for(let d=0,m=t.array.length;d<m;d++){let p=t.array[d];d%3===1&&p>l&&(l=p,c=new e0.Vector3(t.array[d-1],p,t.array[d+2]))}c&&(a.add(c),this.explode(a))}},_e=class extends r5{constructor(e,i=H0.defaultParticleSize,n){super(e,i,n);h(this,"tailMeshGroup");h(this,"tails");let s=150,o=100;this.petalsNum=Yt(s,o),this.flowerSizeRate=e0.MathUtils.mapLinear(this.petalsNum,o,s,.4,.7),this.tailMeshGroup=new e0.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 S=0;S<20;S++)o.push(new e0.Vector3(0,0,0));let v=new C2(20,o,this.texture),{r:a,g:l,b:c,a:d}=i5(s),m=n.array[a],p=n.array[l],g=n.array[c],y=n.array[d],w=v.mesh.geometry.attributes.position,_=v.mesh.geometry.attributes.color;for(let S=0;S<w.count;S++){let z=i5(S);_.array[z.r]=m,_.array[z.g]=p,_.array[z.b]=g,_.array[z.a]=y}let{x:E,y:C,z:x}=this.flower.mesh.position;v.mesh.position.set(E,C,x),e.push(v),this.tailMeshGroup.add(v.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:v,y:a,z:l}=e5(n),c=new e0.Vector3(i.array[v],i.array[a],i.array[l]),d=o.mesh.geometry.attributes.position,m=o.mesh.geometry.attributes.velocity;for(let p=0;p<d.count;p++){let g=e5(p),y=new e0.Vector3,w=new e0.Vector3(d.array[g.x],d.array[g.y],d.array[g.z]),_=new e0.Vector3(m.array[g.x],m.array[g.y],m.array[g.z]);y.subVectors(c,w);let E=y.sub(_);E.normalize(),E.multiplyScalar(Math.random()*3e-4*this.life),m.array[g.x]+=E.x,m.array[g.y]+=E.y,m.array[g.z]+=E.z}m.needsUpdate=!0}this.life>0&&(this.life-=1.2)}else this.drawTail()}},s1=class{constructor(t,e,i){h(this,"fireworksInstances");h(this,"scene");h(this,"sceneOrigin");h(this,"texture");h(this,"particleSize");h(this,"maxFireworks");this.fireworksInstances=[],this.scene=t,this.sceneOrigin=e,this.texture=n8(),this.particleSize=i?.defaultParticleSize??H0.defaultParticleSize,this.maxFireworks=i?.maxActiveFireworks??H0.maxActiveFireworks}launchFirework(t){if(this.fireworksInstances.length>=this.maxFireworks)return;let e=t?.particleSize??this.particleSize,i=t?.position,n;t?.forceRich?n=new _e(this.texture,e,i):t?.forceBasic?n=new r5(this.texture,e,i):n=Math.random()>.5?new r5(this.texture,e,i):new _e(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(H0.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 _e&&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 _e)for(let e of t.tails)e.disposeAll();this.fireworksInstances=[]}dispose(){this.clear(),this.texture.dispose()}};R();k();M();T();var p6=Symbol("tracked-proxy"),s8=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"]),o1=class{constructor(t){h(this,"scene");h(this,"_x",0);h(this,"_y",0);h(this,"_z",0);h(this,"_tracked",new Set);h(this,"_worldCoords",new WeakMap);h(this,"_originalPositions",new WeakMap);h(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,v=new Proxy(i,{get(a,l,c){if(l===p6)return n;if(l==="set")return(m,p,g)=>(n.x=m,n.y=p,n.z=g,a.set(m-s._x,p-s._y,g-s._z),o?.updateMatrix&&t.updateMatrix(),c);if(l==="copy")return m=>{let p=m[p6],g=p?p.x:m.x,y=p?p.y:m.y,w=p?p.z:m.z;return n.x=g,n.y=y,n.z=w,a.set(g-s._x,y-s._y,w-s._z),o?.updateMatrix&&t.updateMatrix(),c};if(l==="setX")return m=>(n.x=m,a.x=m-s._x,o?.updateMatrix&&t.updateMatrix(),c);if(l==="setY")return m=>(n.y=m,a.y=m-s._y,o?.updateMatrix&&t.updateMatrix(),c);if(l==="setZ")return m=>(n.z=m,a.z=m-s._z,o?.updateMatrix&&t.updateMatrix(),c);if(typeof l=="string"&&s8.has(l))return()=>{throw new Error(`Cannot call position.${l}() on a tracked object. Use position.set(x, y, z) instead.`)};let d=a[l];return typeof d=="function"?d.bind(a):d},set(a,l,c){return l==="x"?(n.x=c,a.x=c-s._x,o?.updateMatrix&&t.updateMatrix(),!0):l==="y"?(n.y=c,a.y=c-s._y,o?.updateMatrix&&t.updateMatrix(),!0):l==="z"?(n.z=c,a.z=c-s._z,o?.updateMatrix&&t.updateMatrix(),!0):(a[l]=c,!0)}});Object.defineProperty(t,"position",{value:v,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),this.scene.remove(t)}removeAndUntrackAll(t){t.traverse(e=>{this.untrack(e)}),this.scene.remove(t)}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}};B2();R();k();M();T();import*as E0 from"three";import{Vec3 as s5}from"vec3";import I2 from"prismarine-nbt";R();k();M();T();import*as F0 from"three";var A6=20,E6=40,l8={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},x6={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 c8(r){let t=r.replace("_wall_banner","_banner");return l8[t]??15}var d8=(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 v=0;v<s;v+=2)r.fillRect(i+v,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 f8=(r,t,e=(i,n)=>B0(i,n))=>{let n=e(A6*1,E6*1),s=n.getContext("2d");if(s){if(s.imageSmoothingEnabled=!1,t?.Patterns&&t.Patterns.length>0)for(let o of t.Patterns){let v=o.Color??0,a=o.Pattern??"bs",l=x6[v]||x6[0];d8(s,a,l,0,0,A6*1,E6*1)}return n}},a1=new Map;function R6(r,t,e){let i=c8(t),n=u8(i,e?.Patterns),s=a1.get(n);if(s)return s.refCount++,s.texture;let o=f8(i,e);if(!o)return;let v=new F0.Texture(o);return v.magFilter=F0.NearestFilter,v.minFilter=F0.NearestFilter,v.needsUpdate=!0,a1.set(n,{texture:v,refCount:1}),v}function v1(r){for(let[t,e]of a1.entries())if(e.texture===r){e.refCount--,e.refCount<=0&&(e.texture.dispose(),a1.delete(t));return}}function k6(r,t,e,i){let v,a,l;e?(v=(-14.6+13.4)/2/16-.5,a=1-14.75/16-.5,l=1/2):(v=(1.4+29.4)/2/16,a=1-7.25/16-.5,l=0);let c=new F0.Mesh(new F0.PlaneGeometry(.85,1.75),new F0.MeshBasicMaterial({map:i,transparent:!0}));c.renderOrder=999;let d=.5/16,m=.25/16;e?c.position.set(0,v,a+m+.004):c.position.set(0,v,a+d/2+.004);let p=new F0.Group;return p.rotation.set(0,-F0.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 l1=class{constructor(t,e,i,n){this.worldRenderer=t;this.scene=e;this.material=i;this.displayOptions=n;h(this,"sectionObjects",{});h(this,"waitingChunksToDisplay",{});h(this,"estimatedMemoryUsage",0)}handleWorkerGeometryMessage(t){var y;let e=this.sectionObjects[t.key];e&&(this.removeSectionMemoryUsage(e),e.traverse(w=>{w.bannerTexture&&v1(w.bannerTexture)}),this.worldRenderer.sceneOrigin.removeAndUntrackAll(e),N0(e),delete this.sectionObjects[t.key]);let i=t.key.split(",");if(!this.worldRenderer.loadedChunks[i[0]+","+i[2]]||!t.geometry.positions.length||!this.worldRenderer.active)return;let n=new E0.BufferGeometry,s=new E0.BufferAttribute(t.geometry.positions,3),o=new E0.BufferAttribute(t.geometry.normals,3),v=new E0.BufferAttribute(t.geometry.colors,3),a=new E0.BufferAttribute(t.geometry.uvs,2),l=new E0.BufferAttribute(t.geometry.indices,1);n.setAttribute("position",s),n.setAttribute("normal",o),n.setAttribute("color",v),n.setAttribute("uv",a),n.index=l,this.addSectionMemoryUsage(n);let c=new E0.Mesh(n,this.material);this.worldRenderer.sceneOrigin.track(c,{updateMatrix:!0}),c.position.set(t.geometry.sx,t.geometry.sy,t.geometry.sz),c.name="mesh",e=new E0.Group,e.add(c);let d=t.geometry.sectionEndY-t.geometry.sectionStartY,m=16,p=new E0.Mesh(new E0.BoxGeometry(m,d,m),new E0.MeshBasicMaterial({color:0,transparent:!0,opacity:0})),g=new E0.BoxHelper(p,16776960);if(g.name="helper",this.worldRenderer.sceneOrigin.track(g,{updateMatrix:!0}),g.position.set(t.geometry.sx,t.geometry.sy,t.geometry.sz),e.add(g),e.name="chunk",e.tilesCount=t.geometry.positions.length/3/4,e.blocksCount=t.geometry.blocksCount,this.displayOptions.inWorldRenderingConfig.showChunkBorders||(g.visible=!1),Object.keys(t.geometry.signs).length)for(let[w,{isWall:_,isHanging:E,rotation:C}]of Object.entries(t.geometry.signs)){let x=this.worldRenderer.blockEntities[w];if(!x)continue;let[S,z,B]=w.split(","),I=this.worldRenderer.renderSign(new s5(+S,+z,+B),C,_,E,I2.simplify(x));I&&e.add(I)}if(Object.keys(t.geometry.heads).length)for(let[w,{isWall:_,rotation:E}]of Object.entries(t.geometry.heads)){let C=this.worldRenderer.blockEntities[w];if(!C)continue;let[x,S,z]=w.split(","),B=this.worldRenderer.renderHead(new s5(+x,+S,+z),E,_,I2.simplify(C));B&&e.add(B)}if(Object.keys(t.geometry.banners).length)for(let[w,{isWall:_,rotation:E,blockName:C}]of Object.entries(t.geometry.banners)){let x=this.worldRenderer.blockEntities[w];if(!x)continue;let[S,z,B]=w.split(","),I=R6(this.worldRenderer,C,I2.simplify(x));if(!I)continue;let W=k6(new s5(+S,+z,+B),E,_,I),{x:O,y:j,z:q}=W.position;this.worldRenderer.sceneOrigin.track(W),W.position.set(O,j,q),e.add(W)}if(this.sectionObjects[t.key]=e,e.sectionKey=t.key,this.displayOptions.inWorldRenderingConfig._renderByChunks){e.visible=!1;let w=`${i[0]},${i[2]}`;(y=this.waitingChunksToDisplay)[w]??(y[w]=[]),this.waitingChunksToDisplay[w].push(t.key),this.worldRenderer.finishedChunks[w]&&this.finishChunk(w)}this.worldRenderer.updatePosDataChunk(t.key),e.matrixAutoUpdate=!1,e.updateMatrix(),c.onAfterRender=(w,_,E,C,x,S)=>{},this.scene.add(e)}finishChunk(t){for(let e of this.waitingChunksToDisplay[t]??[])this.sectionObjects[e].visible=!0;delete this.waitingChunksToDisplay[t]}estimateGeometryMemoryUsage(t){let e=0,{attributes:i}=t;for(let[n,s]of Object.entries(i))if(s?.array){let o=s.array.BYTES_PER_ELEMENT;e+=s.array.length*o}if(t.index?.array){let n=t.index.array.BYTES_PER_ELEMENT;e+=t.index.array.length*n}return e}addSectionMemoryUsage(t){let e=this.estimateGeometryMemoryUsage(t);this.estimatedMemoryUsage+=e}removeSectionMemoryUsage(t){let e=t.children.find(i=>i.name==="mesh");if(e?.geometry){let i=this.estimateGeometryMemoryUsage(e.geometry);this.estimatedMemoryUsage-=i,this.estimatedMemoryUsage=Math.max(0,this.estimatedMemoryUsage)}}getEstimatedMemoryUsage(){let t=this.estimatedMemoryUsage,i=`${(t/(1024*1024)).toFixed(2)} MB`;return{bytes:t,readable:i}}resetWorld(){for(let t of Object.values(this.sectionObjects))this.removeSectionMemoryUsage(t),this.worldRenderer.sceneOrigin.removeAndUntrackAll(t);this.sectionObjects={},this.waitingChunksToDisplay={},this.estimatedMemoryUsage=0}removeColumn(t,e){let i=this.worldRenderer.getSectionHeight(),n=this.worldRenderer.worldMinYRender;if(Dt){let s=n;this.worldRenderer.setSectionDirty(new s5(t,s,e),!1);let o=`${t},${s},${e}`,v=this.sectionObjects[o];v&&(this.removeSectionMemoryUsage(v),v.traverse(a=>{a.bannerTexture&&v1(a.bannerTexture)}),this.worldRenderer.sceneOrigin.removeAndUntrackAll(v),N0(v)),delete this.sectionObjects[o]}else for(let s=n;s<this.worldRenderer.worldSizeParams.worldHeight;s+=i){this.worldRenderer.setSectionDirty(new s5(t,s,e),!1);let o=`${t},${s},${e}`,v=this.sectionObjects[o];v&&(this.removeSectionMemoryUsage(v),v.traverse(a=>{a.bannerTexture&&v1(a.bannerTexture)}),this.worldRenderer.sceneOrigin.removeAndUntrackAll(v),N0(v)),delete this.sectionObjects[o]}}};R();k();M();T();R();k();M();T();import*as O0 from"three";var z2=2e3,T6=32,M6=32,c1=12,S6=24,d1=1.2,h8=-5;var H2=class{constructor(t){this.worldRenderer=t;h(this,"instancedMesh");h(this,"geometry");h(this,"material");h(this,"particles",[]);h(this,"enabled",!1);h(this,"dummy",new O0.Matrix4);h(this,"tempPosition",new O0.Vector3);h(this,"tempQuaternion",new O0.Quaternion);h(this,"tempScale",new O0.Vector3);h(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:v}=this,a=NaN,l=NaN,c;for(let d=0;d<z2;d++){let m=this.particles[d];this.instancedMesh.getMatrixAt(d,n),n.decompose(s,o,v),s.addScaledVector(m.velocity,t);let p=s.y,g=Math.sqrt(s.x*s.x+s.z*s.z),y=e.x+s.x,w=e.y+s.y,_=e.z+s.z,E=Math.floor(y/16),C=Math.floor(_/16);(E!==a||C!==l)&&(c=i.get(`${E},${C}`),a=E,l=C);let x=(Math.floor(y)%16+16)%16,S=(Math.floor(_)%16+16)%16,z=c?.[S*16+x];if(g>T6||z!==void 0&&z!==-32768&&w<=z+1+m.despawnOffset||p<h8){this.respawnParticle(s);let I=c1+Math.random()*(S6-c1);m.velocity.set((Math.random()-.5)*d1,-I,(Math.random()-.5)*d1),m.despawnOffset=Math.random()*.5}n.compose(s,o,v),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 O0.BoxGeometry(.03,.3,.03),this.material=new O0.MeshBasicMaterial({color:4482713,transparent:!0,opacity:.6}),this.instancedMesh=new O0.InstancedMesh(this.geometry,this.material,z2),this.instancedMesh.name="rain-particles";let t=new O0.Matrix4,e=new O0.Vector3;for(let i=0;i<z2;i++){this.respawnParticle(e),e.y=Math.random()*M6,t.setPosition(e),this.instancedMesh.setMatrixAt(i,t);let n=c1+Math.random()*(S6-c1);this.particles.push({velocity:new O0.Vector3((Math.random()-.5)*d1,-n,(Math.random()-.5)*d1),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()*T6;t.set(Math.cos(e)*i,M6,Math.sin(e)*i)}},C6={id:"rain",controller:H2,enabledDefault:!1,requiresHeightmap:!0};R();k();M();T();import*as x0 from"three";var P6=new x0.Color(13/255,234/255,238/255),m8=9;var p8=350,g8=650;var b8=120,y8=280,O2=class{constructor(t){this.worldRenderer=t;h(this,"pendingGeometries",new Map);h(this,"revealingSections",new Map);h(this,"finishedChunkCount",0);h(this,"revealTriggered",!1);h(this,"revealStartTime",0);h(this,"enabled",!1);h(this,"onWorldSwitchedCb",null);h(this,"patched",!1);h(this,"initialWaveDone",!1);h(this,"wireframeMaterial");h(this,"wireframeGlowMaterial");h(this,"pulseTime",0);h(this,"revealedChunks",new Set);h(this,"originalFinishChunk",null);h(this,"originalDestroy",null);h(this,"originalSceneAdd",null);h(this,"originalHandleWorkerMessage",null);h(this,"originalWbgHandle",null);h(this,"configEnabled",!0);h(this,"render",t=>{this.enabled&&this.update(t*1e3)});this.configEnabled=this.worldRenderer.worldRendererConfig.futuristicReveal===!0,this.wireframeMaterial=new x0.LineBasicMaterial({color:P6,transparent:!0,opacity:1,blending:x0.AdditiveBlending,depthWrite:!1}),this.wireframeGlowMaterial=new x0.LineBasicMaterial({color:P6,transparent:!0,opacity:.55,blending:x0.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=i=>{this.originalFinishChunk(i),this.onChunkFinished(i)},this.originalDestroy=t.destroy.bind(t),t.destroy=()=>{this.dispose(),this.originalDestroy()};let e=t.worldBlockGeometry;this.originalWbgHandle=e.handleWorkerGeometryMessage.bind(e),e.handleWorkerGeometryMessage=i=>{let n=this.originalWbgHandle(i);return this.enabled&&i?.type==="geometry"&&Promise.resolve().then(()=>{try{this.registerSection(i.key,i.geometry)}catch{}}),n},this.originalSceneAdd=t.scene.add.bind(t.scene),t.scene.add=(...i)=>{let n=this.originalSceneAdd(...i);for(let s of i)this.checkAndPatchMesh(s);return n}}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.originalWbgHandle&&(t.worldBlockGeometry.handleWorkerGeometryMessage=this.originalWbgHandle,this.originalWbgHandle=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 x0.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.worldBlockGeometry.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),v=16,a=this.worldRenderer.getSectionHeight(),l=Math.floor(n/v)*v,c=Math.floor(s/a)*a,d=Math.floor(o/v)*v,m=`${l},${c},${d}`;return this.worldRenderer.worldBlockGeometry.sectionObjects[m]?m:null}get scene(){return this.worldRenderer.scene}getCameraPosition(){return this.worldRenderer.getCameraPosition()}getOriginalMesh(t){let e=this.worldRenderer.worldBlockGeometry.sectionObjects[t];return e?e.children.find(i=>i.name==="mesh"):null}onChunkFinished(t){this.finishedChunkCount++,!this.revealTriggered&&this.finishedChunkCount>=m8&&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 v=Math.hypot(o.sx-t.x,o.sy-t.y,o.sz-t.z);return{key:s,geometry:o,distance:v}}).sort((s,o)=>s.distance-o.distance),n=i.at(-1)?.distance||1;for(let{key:s,geometry:o,distance:v}of i){let a=v/n*1500;setTimeout(()=>{!this.revealedChunks.has(s)&&!this.revealingSections.has(s)&&this.startSectionReveal(s,o)},a)}}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 x0.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 x0.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 v=new x0.Group;v.add(s),v.add(o),v.name="scifi-reveal-group",v.sectionKey=t,this.scene.add(v);let a=this.initialWaveDone?b8:p8,l=this.initialWaveDone?y8:g8,c={key:t,wireframeGroup:v,revealStartTime:performance.now(),phase:"wireframe",originalMeshRef:null,wireframeMs:a,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 v=0;v<i.length;v+=3){let a=i[v],l=i[v+1],c=i[v+2];this.addEdge(e,a,l,n,s),this.addEdge(e,l,c,n,s),this.addEdge(e,c,a,n,s)}let o=new x0.BufferGeometry;return o.setAttribute("position",new x0.Float32BufferAttribute(n,3)),o}addEdge(t,e,i,n,s){let o=Math.min(e,i),v=Math.max(e,i),a=`${o}-${v}`;s.has(a)||(s.add(a),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 v=e-o.revealStartTime;if(o.phase==="wireframe"){let a=o.wireframeGroup.children[0],l=o.wireframeGroup.children[1];if(a?.material){let c=a.material;c.opacity=i;let d=.85+.15*Math.sin(this.pulseTime*6+v*.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(v>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 a=v-o.wireframeMs,l=Math.min(1,a/o.revealMs),c=1-(1-l)**3,d=o.wireframeGroup.children[0],m=o.wireframeGroup.children[1];if(d?.material){let p=d.material;p.opacity=1-c}if(m?.material){let p=m.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(){}},B6={id:"futuristicReveal",controller:O2,enabledDefault:!0};R();k();M();T();import*as w0 from"three";var _8=parseInt(w0.REVISION.replaceAll(/\D+/g,""),10),L2=class extends w0.ShaderMaterial{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:`
21216
+ `,O0={textureSize:128,gravity:new e0.Vector3(0,-.005,0),friction:.998,defaultParticleSize:300,maxActiveFireworks:5},e5=r=>{let e=r*3;return{x:e,y:e+1,z:e+2}},i5=r=>{let e=r*4;return{r:e,g:e+1,b:e+2,a:e+3}},Yt=(r=0,t=0)=>Math.floor(Math.random()*(r+1-t))+t,a8=(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()},v8=()=>{let r=O0.textureSize,t=I0(r,r),e=t.getContext("2d"),i=r/2;a8(e,i,t.width,t.height);let n=new e0.Texture(t);return n.needsUpdate=!0,n},l8=(r,t,e,i,n=O0.defaultParticleSize)=>{let s=new e0.BufferGeometry,o=[],v=[],a=[],l=[],c=[],d=Math.random()>.3?"single":"multiple",m=Yt(100,20)*.01,p=()=>Yt(100,1)*.01,g="red",y=Math.random();y>.66?g="red":y>.33?g="green":g="blue";for(let _=0;_<r;_++){let A=new e0.Vector3(0,0,0);if(o.push(A.x,A.y,A.z),v.push(t[_].x,t[_].y,t[_].z),e==="seed"){let C=t[_].y**2*.04;_===0&&(C*=1.1),l.push(C),c.push(C*.017),a.push(1,1,1,1)}else if(e==="trail"){let C=Math.random()*.1+.1;l.push(C),c.push(C*.017),a.push(1,1,1,1)}else{let C=Yt(n,10)*.001;if(l.push(C),c.push(C*.017),d==="multiple")a.push(p(),p(),p(),1);else switch(g){case"red":a.push(m,.1,.1,1);break;case"green":a.push(.1,m,.1,1);break;case"blue":a.push(.1,.1,m,1);break}}}s.setAttribute("position",new e0.Float32BufferAttribute(o,3)),s.setAttribute("velocity",new e0.Float32BufferAttribute(v,3)),s.setAttribute("color",new e0.Float32BufferAttribute(a,4)),s.setAttribute("adjustSize",new e0.Float32BufferAttribute(l,1)),s.setAttribute("mass",new e0.Float32BufferAttribute(c,1));let E=new e0.RawShaderMaterial({uniforms:{size:{value:O0.textureSize},texture:{value:i}},transparent:!0,depthWrite:!1,blending:e0.AdditiveBlending,vertexShader:s8,fragmentShader:o8});return new e0.Points(s,E)},n5=class{constructor(t,e,i,n,s){h(this,"particleNum");h(this,"timerStartFading");h(this,"mesh");this.particleNum=t,this.timerStartFading=10,this.mesh=l8(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,v=a=>Math.random()>.5?0:(1-a)*.1;for(let a=0;a<this.particleNum;a++){let{x:l,y:c,z:d}=e5(a);i.array[c]+=t.y-s.array[a],i.array[l]*=O0.friction,i.array[d]*=O0.friction,i.array[c]*=O0.friction,e.array[l]+=i.array[l],e.array[c]+=i.array[c],e.array[d]+=i.array[d];let{a:m}=i5(a);this.timerStartFading<=0&&(n.array[m]*=o()-v(n.array[m]),n.array[m]<.001&&(n.array[m]=0))}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}disposeAll(){this.mesh.geometry.dispose(),this.mesh.material.dispose()}},C2=class extends n5{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,v=d=>Math.random()>.3?0:(1-d)*.1,a=()=>Math.random()>.5?.05:-.05,l=()=>Math.random()>.1,c=O0.friction*.98;for(let d=0;d<this.particleNum;d++){let{x:m,y:p,z:g}=e5(d);i.array[p]+=t.y-s.array[d],i.array[m]*=c,i.array[g]*=c,i.array[p]*=c,e.array[m]+=i.array[m],e.array[p]+=i.array[p],e.array[g]+=i.array[g],l()&&(e.array[m]+=a()),l()&&(e.array[g]+=a());let{a:y}=i5(d);n.array[y]*=o()-v(n.array[y]),n.array[y]<.001&&(n.array[y]=0)}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},P2=class extends n5{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,v=()=>Math.random()>.5?.05:-.05,a=()=>Math.random()>.2;for(let l=0;l<this.particleNum;l++){let{x:c,y:d,z:m}=e5(l);i.array[d]+=t.y-s.array[l],i.array[c]*=O0.friction,i.array[m]*=O0.friction,i.array[d]*=O0.friction,e.array[c]+=i.array[c],e.array[d]+=i.array[d],e.array[m]+=i.array[m],a()&&(e.array[c]+=v()),a()&&(e.array[m]+=v());let{a:p}=i5(l);n.array[p]*=o(),n.array[p]<.001&&(n.array[p]=0)}e.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},r5=class{constructor(t,e=O0.defaultParticleSize,i){h(this,"meshGroup");h(this,"isExplode");h(this,"petalsNum");h(this,"life");h(this,"seed");h(this,"flowerSizeRate");h(this,"flower");h(this,"texture");h(this,"particleSize");this.meshGroup=new e0.Group,this.isExplode=!1,this.texture=t,this.particleSize=e;let n=400,s=150;this.petalsNum=Yt(n,s),this.life=150,this.seed=this.getSeed(i),this.meshGroup.add(this.seed.mesh),this.flowerSizeRate=e0.MathUtils.mapLinear(this.petalsNum,s,n,.4,.7)}getSeed(t){let i=[];for(let s=0;s<40;s++){let v=s===0?Math.random()*2.5+.9:Math.random()*2+.4,a=0;i.push(new e0.Vector3(0,v,a))}let n=new C2(40,i,this.texture);if(t)n.mesh.position.set(0,0,0);else{let s=Math.random()*80-40,o=-50,v=Math.random()*80-40;n.mesh.position.set(s,o,v)}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 v=0;v<e;v++){n=Yt(120,60)*.01;let a=e0.MathUtils.degToRad(Math.random()*180),l=e0.MathUtils.degToRad(Math.random()*360),c=Math.sin(a)*Math.cos(l)*n,d=Math.sin(a)*Math.sin(l)*n,m=Math.cos(a)*n,p=new e0.Vector3(c,d,m);p.multiplyScalar(this.flowerSizeRate),i.push(p)}else{let v=180/e,a=360*(Math.random()*20+1)/e,l=a,c=a;n=Yt(120,60)*.01;for(let d=0;d<e;d++){let m=Math.sin(e0.MathUtils.degToRad(v*d)),p=Math.cos(e0.MathUtils.degToRad(v*d))*n,g=Math.cos(e0.MathUtils.degToRad(l*d))*m*n,y=Math.sin(e0.MathUtils.degToRad(c*d))*m*n,E=new e0.Vector3(g,y,p);E.multiplyScalar(this.flowerSizeRate),i.push(E)}}let o=new n5(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(O0.gravity);let t=this.seed.mesh.geometry.attributes.position,e=this.seed.mesh.geometry.attributes.velocity,i=0;for(let d=0,m=e.array.length;d<m;d++){let p=e.array[d];d%3===1&&p>0&&i++}if(!(i===0))return;let{x:s,y:o,z:v}=this.seed.mesh.position,a=new e0.Vector3(s,o,v),l=0,c;for(let d=0,m=t.array.length;d<m;d++){let p=t.array[d];d%3===1&&p>l&&(l=p,c=new e0.Vector3(t.array[d-1],p,t.array[d+2]))}c&&(a.add(c),this.explode(a))}},_e=class extends r5{constructor(e,i=O0.defaultParticleSize,n){super(e,i,n);h(this,"tailMeshGroup");h(this,"tails");let s=150,o=100;this.petalsNum=Yt(s,o),this.flowerSizeRate=e0.MathUtils.mapLinear(this.petalsNum,o,s,.4,.7),this.tailMeshGroup=new e0.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 S=0;S<20;S++)o.push(new e0.Vector3(0,0,0));let v=new P2(20,o,this.texture),{r:a,g:l,b:c,a:d}=i5(s),m=n.array[a],p=n.array[l],g=n.array[c],y=n.array[d],E=v.mesh.geometry.attributes.position,_=v.mesh.geometry.attributes.color;for(let S=0;S<E.count;S++){let z=i5(S);_.array[z.r]=m,_.array[z.g]=p,_.array[z.b]=g,_.array[z.a]=y}let{x:A,y:C,z:x}=this.flower.mesh.position;v.mesh.position.set(A,C,x),e.push(v),this.tailMeshGroup.add(v.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:v,y:a,z:l}=e5(n),c=new e0.Vector3(i.array[v],i.array[a],i.array[l]),d=o.mesh.geometry.attributes.position,m=o.mesh.geometry.attributes.velocity;for(let p=0;p<d.count;p++){let g=e5(p),y=new e0.Vector3,E=new e0.Vector3(d.array[g.x],d.array[g.y],d.array[g.z]),_=new e0.Vector3(m.array[g.x],m.array[g.y],m.array[g.z]);y.subVectors(c,E);let A=y.sub(_);A.normalize(),A.multiplyScalar(Math.random()*3e-4*this.life),m.array[g.x]+=A.x,m.array[g.y]+=A.y,m.array[g.z]+=A.z}m.needsUpdate=!0}this.life>0&&(this.life-=1.2)}else this.drawTail()}},s1=class{constructor(t,e,i){h(this,"fireworksInstances");h(this,"scene");h(this,"sceneOrigin");h(this,"texture");h(this,"particleSize");h(this,"maxFireworks");this.fireworksInstances=[],this.scene=t,this.sceneOrigin=e,this.texture=v8(),this.particleSize=i?.defaultParticleSize??O0.defaultParticleSize,this.maxFireworks=i?.maxActiveFireworks??O0.maxActiveFireworks}launchFirework(t){if(this.fireworksInstances.length>=this.maxFireworks)return;let e=t?.particleSize??this.particleSize,i=t?.position,n;t?.forceRich?n=new _e(this.texture,e,i):t?.forceBasic?n=new r5(this.texture,e,i):n=Math.random()>.5?new r5(this.texture,e,i):new _e(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(O0.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 _e&&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 _e)for(let e of t.tails)e.disposeAll();this.fireworksInstances=[]}dispose(){this.clear(),this.texture.dispose()}};R();k();M();T();var _6=Symbol("tracked-proxy"),c8=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"]),o1=class{constructor(t){h(this,"scene");h(this,"_x",0);h(this,"_y",0);h(this,"_z",0);h(this,"_tracked",new Set);h(this,"_worldCoords",new WeakMap);h(this,"_originalPositions",new WeakMap);h(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,v=new Proxy(i,{get(a,l,c){if(l===_6)return n;if(l==="set")return(m,p,g)=>(n.x=m,n.y=p,n.z=g,a.set(m-s._x,p-s._y,g-s._z),o?.updateMatrix&&t.updateMatrix(),c);if(l==="copy")return m=>{let p=m[_6],g=p?p.x:m.x,y=p?p.y:m.y,E=p?p.z:m.z;return n.x=g,n.y=y,n.z=E,a.set(g-s._x,y-s._y,E-s._z),o?.updateMatrix&&t.updateMatrix(),c};if(l==="setX")return m=>(n.x=m,a.x=m-s._x,o?.updateMatrix&&t.updateMatrix(),c);if(l==="setY")return m=>(n.y=m,a.y=m-s._y,o?.updateMatrix&&t.updateMatrix(),c);if(l==="setZ")return m=>(n.z=m,a.z=m-s._z,o?.updateMatrix&&t.updateMatrix(),c);if(typeof l=="string"&&c8.has(l))return()=>{throw new Error(`Cannot call position.${l}() on a tracked object. Use position.set(x, y, z) instead.`)};let d=a[l];return typeof d=="function"?d.bind(a):d},set(a,l,c){return l==="x"?(n.x=c,a.x=c-s._x,o?.updateMatrix&&t.updateMatrix(),!0):l==="y"?(n.y=c,a.y=c-s._y,o?.updateMatrix&&t.updateMatrix(),!0):l==="z"?(n.z=c,a.z=c-s._z,o?.updateMatrix&&t.updateMatrix(),!0):(a[l]=c,!0)}});Object.defineProperty(t,"position",{value:v,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),this.scene.remove(t)}removeAndUntrackAll(t){t.traverse(e=>{this.untrack(e)}),this.scene.remove(t)}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}};I2();R();k();M();T();import*as E0 from"three";import{Vec3 as s5}from"vec3";import z2 from"prismarine-nbt";R();k();M();T();import*as U0 from"three";var k6=20,T6=40,h8={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},M6={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 m8(r){let t=r.replace("_wall_banner","_banner");return h8[t]??15}var p8=(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 v=0;v<s;v+=2)r.fillRect(i+v,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 g8(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 b8=(r,t,e=(i,n)=>I0(i,n))=>{let n=e(k6*1,T6*1),s=n.getContext("2d");if(s){if(s.imageSmoothingEnabled=!1,t?.Patterns&&t.Patterns.length>0)for(let o of t.Patterns){let v=o.Color??0,a=o.Pattern??"bs",l=M6[v]||M6[0];p8(s,a,l,0,0,k6*1,T6*1)}return n}},a1=new Map;function S6(r,t,e){let i=m8(t),n=g8(i,e?.Patterns),s=a1.get(n);if(s)return s.refCount++,s.texture;let o=b8(i,e);if(!o)return;let v=new U0.Texture(o);return v.magFilter=U0.NearestFilter,v.minFilter=U0.NearestFilter,v.needsUpdate=!0,a1.set(n,{texture:v,refCount:1}),v}function v1(r){for(let[t,e]of a1.entries())if(e.texture===r){e.refCount--,e.refCount<=0&&(e.texture.dispose(),a1.delete(t));return}}function C6(r,t,e,i){let v,a,l;e?(v=(-14.6+13.4)/2/16-.5,a=1-14.75/16-.5,l=1/2):(v=(1.4+29.4)/2/16,a=1-7.25/16-.5,l=0);let c=new U0.Mesh(new U0.PlaneGeometry(.85,1.75),new U0.MeshBasicMaterial({map:i,transparent:!0}));c.renderOrder=999;let d=.5/16,m=.25/16;e?c.position.set(0,v,a+m+.004):c.position.set(0,v,a+d/2+.004);let p=new U0.Group;return p.rotation.set(0,-U0.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 c1=class c1{constructor(t,e,i,n){this.worldRenderer=t;this.scene=e;this.material=i;this.displayOptions=n;h(this,"sectionObjects",{});h(this,"waitingChunksToDisplay",{});h(this,"estimatedMemoryUsage",0);h(this,"pendingUpdates",new Map);h(this,"pendingBufferStartTime",null)}handleWorkerGeometryMessage(t){if(!!this.sectionObjects[t.key]){this.pendingUpdates.set(t.key,t),this.pendingBufferStartTime===null&&(this.pendingBufferStartTime=performance.now());return}this._applySectionGeometry(t)}applyPendingUpdates(){if(this.pendingUpdates.size===0)return;let t=performance.now();if(t-(this.pendingBufferStartTime??t)<c1.MAX_BUFFER_MS){let i=this.worldRenderer.getSectionHeight();for(let n of this.pendingUpdates.keys()){let[s,o,v]=n.split(",").map(Number),a=[`${s-16},${o},${v}`,`${s+16},${o},${v}`,`${s},${o-i},${v}`,`${s},${o+i},${v}`,`${s},${o},${v-16}`,`${s},${o},${v+16}`];for(let l of a)if(this.worldRenderer.sectionsWaiting.has(l)&&!this.pendingUpdates.has(l)&&this.sectionObjects[l])return}}for(let[i,n]of this.pendingUpdates)this._removeSectionSafely(i),this._applySectionGeometry(n);this.pendingUpdates.clear(),this.pendingBufferStartTime=null}disposeSectionObject(t){t instanceof E0.Mesh&&t.geometry?.dispose?.(),t.children&&t.children.forEach(e=>this.disposeSectionObject(e))}_removeSectionSafely(t){let e=this.sectionObjects[t];e&&(this.removeSectionMemoryUsage(e),e.traverse(i=>{i.bannerTexture&&v1(i.bannerTexture)}),this.worldRenderer.sceneOrigin.removeAndUntrackAll(e),this.disposeSectionObject(e),delete this.sectionObjects[t])}_applySectionGeometry(t){var y;let e=t.key.split(",");if(!this.worldRenderer.loadedChunks[e[0]+","+e[2]]||!t.geometry.positions.length||!this.worldRenderer.active)return;let i=new E0.BufferGeometry,n=new E0.BufferAttribute(t.geometry.positions,3),s=new E0.BufferAttribute(t.geometry.normals,3),o=new E0.BufferAttribute(t.geometry.colors,3),v=new E0.BufferAttribute(t.geometry.uvs,2),a=new E0.BufferAttribute(t.geometry.indices,1);i.setAttribute("position",n),i.setAttribute("normal",s),i.setAttribute("color",o),i.setAttribute("uv",v),i.index=a,this.addSectionMemoryUsage(i);let l=new E0.Mesh(i,this.material);this.worldRenderer.sceneOrigin.track(l,{updateMatrix:!0}),l.position.set(t.geometry.sx,t.geometry.sy,t.geometry.sz),l.name="mesh";let c=new E0.Group;c.add(l);let d=t.geometry.sectionEndY-t.geometry.sectionStartY,m=16,p=new E0.Mesh(new E0.BoxGeometry(m,d,m),new E0.MeshBasicMaterial({color:0,transparent:!0,opacity:0})),g=new E0.BoxHelper(p,16776960);if(g.name="helper",this.worldRenderer.sceneOrigin.track(g,{updateMatrix:!0}),g.position.set(t.geometry.sx,t.geometry.sy,t.geometry.sz),c.add(g),c.name="chunk",c.tilesCount=t.geometry.positions.length/3/4,c.blocksCount=t.geometry.blocksCount,this.displayOptions.inWorldRenderingConfig.showChunkBorders||(g.visible=!1),Object.keys(t.geometry.signs).length)for(let[E,{isWall:_,isHanging:A,rotation:C}]of Object.entries(t.geometry.signs)){let x=this.worldRenderer.blockEntities[E];if(!x)continue;let[S,z,B]=E.split(","),I=this.worldRenderer.renderSign(new s5(+S,+z,+B),C,_,A,z2.simplify(x));I&&c.add(I)}if(Object.keys(t.geometry.heads).length)for(let[E,{isWall:_,rotation:A}]of Object.entries(t.geometry.heads)){let C=this.worldRenderer.blockEntities[E];if(!C)continue;let[x,S,z]=E.split(","),B=this.worldRenderer.renderHead(new s5(+x,+S,+z),A,_,z2.simplify(C));B&&c.add(B)}if(Object.keys(t.geometry.banners).length)for(let[E,{isWall:_,rotation:A,blockName:C}]of Object.entries(t.geometry.banners)){let x=this.worldRenderer.blockEntities[E];if(!x)continue;let[S,z,B]=E.split(","),I=S6(this.worldRenderer,C,z2.simplify(x));if(!I)continue;let W=C6(new s5(+S,+z,+B),A,_,I),{x:O,y:j,z:q}=W.position;this.worldRenderer.sceneOrigin.track(W),W.position.set(O,j,q),c.add(W)}if(this.sectionObjects[t.key]=c,c.sectionKey=t.key,this.displayOptions.inWorldRenderingConfig._renderByChunks){c.visible=!1;let E=`${e[0]},${e[2]}`;(y=this.waitingChunksToDisplay)[E]??(y[E]=[]),this.waitingChunksToDisplay[E].push(t.key),this.worldRenderer.finishedChunks[E]&&this.finishChunk(E)}this.worldRenderer.updatePosDataChunk(t.key),c.matrixAutoUpdate=!1,c.updateMatrix(),l.onAfterRender=(E,_,A,C,x,S)=>{},this.scene.add(c)}finishChunk(t){for(let e of this.waitingChunksToDisplay[t]??[])this.sectionObjects[e].visible=!0;delete this.waitingChunksToDisplay[t]}estimateGeometryMemoryUsage(t){let e=0,{attributes:i}=t;for(let[n,s]of Object.entries(i))if(s?.array){let o=s.array.BYTES_PER_ELEMENT;e+=s.array.length*o}if(t.index?.array){let n=t.index.array.BYTES_PER_ELEMENT;e+=t.index.array.length*n}return e}addSectionMemoryUsage(t){let e=this.estimateGeometryMemoryUsage(t);this.estimatedMemoryUsage+=e}removeSectionMemoryUsage(t){let e=t.children.find(i=>i.name==="mesh");if(e?.geometry){let i=this.estimateGeometryMemoryUsage(e.geometry);this.estimatedMemoryUsage-=i,this.estimatedMemoryUsage=Math.max(0,this.estimatedMemoryUsage)}}getEstimatedMemoryUsage(){let t=this.estimatedMemoryUsage,i=`${(t/(1024*1024)).toFixed(2)} MB`;return{bytes:t,readable:i}}resetWorld(){for(let t of Object.values(this.sectionObjects))this.removeSectionMemoryUsage(t),this.worldRenderer.sceneOrigin.removeAndUntrackAll(t);this.sectionObjects={},this.waitingChunksToDisplay={},this.estimatedMemoryUsage=0,this.pendingUpdates.clear(),this.pendingBufferStartTime=null}removeColumn(t,e){let i=this.worldRenderer.getSectionHeight(),n=this.worldRenderer.worldMinYRender;if(Dt){let s=n;this.worldRenderer.setSectionDirty(new s5(t,s,e),!1);let o=`${t},${s},${e}`,v=this.sectionObjects[o];v&&(this.removeSectionMemoryUsage(v),v.traverse(a=>{a.bannerTexture&&v1(a.bannerTexture)}),this.worldRenderer.sceneOrigin.removeAndUntrackAll(v),this.disposeSectionObject(v)),delete this.sectionObjects[o],this.pendingUpdates.delete(o)}else for(let s=n;s<this.worldRenderer.worldSizeParams.worldHeight;s+=i){this.worldRenderer.setSectionDirty(new s5(t,s,e),!1);let o=`${t},${s},${e}`,v=this.sectionObjects[o];v&&(this.removeSectionMemoryUsage(v),v.traverse(a=>{a.bannerTexture&&v1(a.bannerTexture)}),this.worldRenderer.sceneOrigin.removeAndUntrackAll(v),this.disposeSectionObject(v)),delete this.sectionObjects[o],this.pendingUpdates.delete(o)}}};h(c1,"MAX_BUFFER_MS",500);var l1=c1;R();k();M();T();R();k();M();T();var H2=class{constructor(t){this.worldRenderer=t;h(this,"enabled",!1);h(this,"lastBobWalkDist",0);h(this,"lastBobTickTime",0);h(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.playerStateReactive.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=performance.now(),this.lastBobWalkDist=this.worldRenderer.playerStateReactive.walkDist);let i=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:i})}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()}},P6={id:"cameraBobbing",controller:H2,enabledDefault:!0,cannotBeDisabled:!0};R();k();M();T();import*as L0 from"three";var O2=2e3,B6=32,I6=32,d1=12,z6=24,u1=1.2,y8=-5;var L2=class{constructor(t){this.worldRenderer=t;h(this,"instancedMesh");h(this,"geometry");h(this,"material");h(this,"particles",[]);h(this,"enabled",!1);h(this,"dummy",new L0.Matrix4);h(this,"tempPosition",new L0.Vector3);h(this,"tempQuaternion",new L0.Quaternion);h(this,"tempScale",new L0.Vector3);h(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:v}=this,a=NaN,l=NaN,c;for(let d=0;d<O2;d++){let m=this.particles[d];this.instancedMesh.getMatrixAt(d,n),n.decompose(s,o,v),s.addScaledVector(m.velocity,t);let p=s.y,g=Math.sqrt(s.x*s.x+s.z*s.z),y=e.x+s.x,E=e.y+s.y,_=e.z+s.z,A=Math.floor(y/16),C=Math.floor(_/16);(A!==a||C!==l)&&(c=i.get(`${A},${C}`),a=A,l=C);let x=(Math.floor(y)%16+16)%16,S=(Math.floor(_)%16+16)%16,z=c?.[S*16+x];if(g>B6||z!==void 0&&z!==-32768&&E<=z+1+m.despawnOffset||p<y8){this.respawnParticle(s);let I=d1+Math.random()*(z6-d1);m.velocity.set((Math.random()-.5)*u1,-I,(Math.random()-.5)*u1),m.despawnOffset=Math.random()*.5}n.compose(s,o,v),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 L0.BoxGeometry(.03,.3,.03),this.material=new L0.MeshBasicMaterial({color:4482713,transparent:!0,opacity:.6}),this.instancedMesh=new L0.InstancedMesh(this.geometry,this.material,O2),this.instancedMesh.name="rain-particles";let t=new L0.Matrix4,e=new L0.Vector3;for(let i=0;i<O2;i++){this.respawnParticle(e),e.y=Math.random()*I6,t.setPosition(e),this.instancedMesh.setMatrixAt(i,t);let n=d1+Math.random()*(z6-d1);this.particles.push({velocity:new L0.Vector3((Math.random()-.5)*u1,-n,(Math.random()-.5)*u1),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()*B6;t.set(Math.cos(e)*i,I6,Math.sin(e)*i)}},H6={id:"rain",controller:L2,enabledDefault:!1,requiresHeightmap:!0};R();k();M();T();import*as x0 from"three";var O6=new x0.Color(13/255,234/255,238/255),_8=9;var w8=350,A8=650;var E8=120,x8=280,D2=class{constructor(t){this.worldRenderer=t;h(this,"pendingGeometries",new Map);h(this,"revealingSections",new Map);h(this,"finishedChunkCount",0);h(this,"revealTriggered",!1);h(this,"revealStartTime",0);h(this,"enabled",!1);h(this,"onWorldSwitchedCb",null);h(this,"patched",!1);h(this,"initialWaveDone",!1);h(this,"wireframeMaterial");h(this,"wireframeGlowMaterial");h(this,"pulseTime",0);h(this,"revealedChunks",new Set);h(this,"originalFinishChunk",null);h(this,"originalDestroy",null);h(this,"originalSceneAdd",null);h(this,"originalHandleWorkerMessage",null);h(this,"originalWbgHandle",null);h(this,"configEnabled",!0);h(this,"render",t=>{this.enabled&&this.update(t*1e3)});this.configEnabled=this.worldRenderer.worldRendererConfig.futuristicReveal===!0,this.wireframeMaterial=new x0.LineBasicMaterial({color:O6,transparent:!0,opacity:1,blending:x0.AdditiveBlending,depthWrite:!1}),this.wireframeGlowMaterial=new x0.LineBasicMaterial({color:O6,transparent:!0,opacity:.55,blending:x0.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=i=>{this.originalFinishChunk(i),this.onChunkFinished(i)},this.originalDestroy=t.destroy.bind(t),t.destroy=()=>{this.dispose(),this.originalDestroy()};let e=t.worldBlockGeometry;this.originalWbgHandle=e.handleWorkerGeometryMessage.bind(e),e.handleWorkerGeometryMessage=i=>{let n=this.originalWbgHandle(i);return this.enabled&&i?.type==="geometry"&&Promise.resolve().then(()=>{try{this.registerSection(i.key,i.geometry)}catch{}}),n},this.originalSceneAdd=t.scene.add.bind(t.scene),t.scene.add=(...i)=>{let n=this.originalSceneAdd(...i);for(let s of i)this.checkAndPatchMesh(s);return n}}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.originalWbgHandle&&(t.worldBlockGeometry.handleWorkerGeometryMessage=this.originalWbgHandle,this.originalWbgHandle=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 x0.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.worldBlockGeometry.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),v=16,a=this.worldRenderer.getSectionHeight(),l=Math.floor(n/v)*v,c=Math.floor(s/a)*a,d=Math.floor(o/v)*v,m=`${l},${c},${d}`;return this.worldRenderer.worldBlockGeometry.sectionObjects[m]?m:null}get scene(){return this.worldRenderer.scene}getCameraPosition(){return this.worldRenderer.getCameraPosition()}getOriginalMesh(t){let e=this.worldRenderer.worldBlockGeometry.sectionObjects[t];return e?e.children.find(i=>i.name==="mesh"):null}onChunkFinished(t){this.finishedChunkCount++,!this.revealTriggered&&this.finishedChunkCount>=_8&&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 v=Math.hypot(o.sx-t.x,o.sy-t.y,o.sz-t.z);return{key:s,geometry:o,distance:v}}).sort((s,o)=>s.distance-o.distance),n=i.at(-1)?.distance||1;for(let{key:s,geometry:o,distance:v}of i){let a=v/n*1500;setTimeout(()=>{!this.revealedChunks.has(s)&&!this.revealingSections.has(s)&&this.startSectionReveal(s,o)},a)}}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 x0.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 x0.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 v=new x0.Group;v.add(s),v.add(o),v.name="scifi-reveal-group",v.sectionKey=t,this.scene.add(v);let a=this.initialWaveDone?E8:w8,l=this.initialWaveDone?x8:A8,c={key:t,wireframeGroup:v,revealStartTime:performance.now(),phase:"wireframe",originalMeshRef:null,wireframeMs:a,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 v=0;v<i.length;v+=3){let a=i[v],l=i[v+1],c=i[v+2];this.addEdge(e,a,l,n,s),this.addEdge(e,l,c,n,s),this.addEdge(e,c,a,n,s)}let o=new x0.BufferGeometry;return o.setAttribute("position",new x0.Float32BufferAttribute(n,3)),o}addEdge(t,e,i,n,s){let o=Math.min(e,i),v=Math.max(e,i),a=`${o}-${v}`;s.has(a)||(s.add(a),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 v=e-o.revealStartTime;if(o.phase==="wireframe"){let a=o.wireframeGroup.children[0],l=o.wireframeGroup.children[1];if(a?.material){let c=a.material;c.opacity=i;let d=.85+.15*Math.sin(this.pulseTime*6+v*.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(v>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 a=v-o.wireframeMs,l=Math.min(1,a/o.revealMs),c=1-(1-l)**3,d=o.wireframeGroup.children[0],m=o.wireframeGroup.children[1];if(d?.material){let p=d.material;p.opacity=1-c}if(m?.material){let p=m.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(){}},L6={id:"futuristicReveal",controller:D2,enabledDefault:!0};R();k();M();T();import*as w0 from"three";var R8=parseInt(w0.REVISION.replaceAll(/\D+/g,""),10),F2=class extends w0.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;
@@ -21232,8 +21232,8 @@ void main() {
21232
21232
  gl_FragColor = vec4(vColor, 1.0);
21233
21233
 
21234
21234
  #include <tonemapping_fragment>
21235
- #include <${_8>=154?"colorspace_fragment":"encodings_fragment"}>
21236
- }`})}},D2=class{constructor(t){this.worldRenderer=t;h(this,"points");h(this,"clock",new w0.Clock);h(this,"enabled",!1);h(this,"currentTime");h(this,"enablementCheck",()=>this.currentTime?this.currentTime>13500&&this.currentTime<23e3:!1);h(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 w0.BufferGeometry,v=y=>new w0.Vector3().setFromSpherical(new w0.Spherical(y,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),a=[],l=[],c=Array.from({length:i},()=>(.5+.5*Math.random())*n),d=new w0.Color,m=t+e,p=e/i;for(let y=0;y<i;y++)m-=p*Math.random(),a.push(...v(m).toArray()),d.setHSL(y/i,s,.9),l.push(d.r,d.g,d.b);o.setAttribute("position",new w0.Float32BufferAttribute(a,3)),o.setAttribute("color",new w0.Float32BufferAttribute(l,3)),o.setAttribute("size",new w0.Float32BufferAttribute(c,1));let g=new L2;g.blending=w0.AdditiveBlending,g.depthTest=!1,g.transparent=!0,this.points=new w0.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)}},I6={id:"starfield",controller:D2,enabledDefault:!0,cannotBeDisabled:!0};var z6={starfield:I6,futuristicReveal:B6,rain:C6};var Kt=class r extends C5{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;h(this,"outputFormat","threeJs");h(this,"worldBlockGeometry");h(this,"chunkTextures",new Map);h(this,"signsCache",new Map);h(this,"cameraSectionPos",new At(0,0,0));h(this,"holdingBlock");h(this,"holdingBlockLeft");h(this,"scene",new Q.Scene);h(this,"ambientLight",new Q.AmbientLight(13421772));h(this,"directionalLight",new Q.DirectionalLight(16777215,.5));h(this,"entities",new K5(this,globalThis.mcData));h(this,"cameraGroupVr");h(this,"material",new Q.MeshLambertMaterial({vertexColors:!0,transparent:!0,alphaTest:.1}));h(this,"itemsTexture");h(this,"cursorBlock");h(this,"onRender",[]);h(this,"lastRenderTime",0);h(this,"cameraShake");h(this,"cameraContainer");h(this,"media");h(this,"waypoints");h(this,"cinimaticScript");h(this,"camera");h(this,"renderTimeAvg",0);h(this,"modules",{});h(this,"sectionsOffsetsAnimations",{});h(this,"fountains",[]);h(this,"fireworksLegacy");h(this,"DEBUG_RAYCAST",!1);h(this,"skyboxRenderer");h(this,"fireworks");h(this,"sceneOrigin",new o1(this.scene));h(this,"cameraWorldPos",{x:0,y:0,z:0});h(this,"_cameraPositionAccessWarned",!1);h(this,"_tmpCameraPos",new Q.Vector3);h(this,"currentPosTween");h(this,"currentRotTween");h(this,"_tpDirection",new Q.Vector3);h(this,"_tpPitchQuat",new Q.Quaternion);h(this,"_tpYawQuat",new Q.Quaternion);h(this,"_tpFinalQuat",new Q.Quaternion);h(this,"_tpScenePos",new Q.Vector3);h(this,"_tpAxisX",new Q.Vector3(1,0,0));h(this,"_tpAxisY",new Q.Vector3(0,1,0));h(this,"_tpRaycaster",new Q.Raycaster);h(this,"_tpChunkWorldPos",new Q.Vector3);h(this,"debugOverlayAdded",!1);h(this,"debugRaycastHelper");h(this,"debugHitPoint");h(this,"prevFramePerspective",null);this.renderer=e,n.rendererState.renderer=r.getRendererInfo(e)??"...",this.worldBlockGeometry=new l1(this,this.scene,this.material,n),this.cursorBlock=new J5(this),this.holdingBlock=new ce(this),this.holdingBlockLeft=new ce(this,!0);for(let s of Object.values(z6))this.registerModule(s);this.skyboxRenderer=new r1(this.scene,!1,null),this.skyboxRenderer.init(),this.addDebugOverlay(),this.resetScene(),this.init(),this.soundSystem=new Z5(this),this.cameraShake=new X5(this,this.onRender),this.media=new $5(this),this.fireworksLegacy=new i1(this),this.waypoints=new e1(this),this.cinimaticScript=new n1(this,(s,o,v)=>this.setCinimaticCamera(s,o,v),s=>this.setCinimaticFov(s),()=>({position:new At(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 s1(this.scene,this.sceneOrigin),this.renderUpdateEmitter.on("chunkFinished",s=>{this.finishChunk(s)}),this.worldSwitchActions(),this.initializeModules()}get sectionObjects(){return this.worldBlockGeometry.sectionObjects}get waitingChunksToDisplay(){return this.worldBlockGeometry.waitingChunksToDisplay}get estimatedMemoryUsage(){return this.worldBlockGeometry.estimatedMemoryUsage}get tilesRendered(){return Object.values(this.sectionObjects).reduce((e,i)=>e+i.tilesCount,0)}get blocksRendered(){return Object.values(this.sectionObjects).reduce((e,i)=>e+i.blocksCount,0)}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=(a,l,c)=>Math.abs(a)>n||Math.abs(l)>n||Math.abs(c)>n,o=()=>{!i._cameraPositionAccessWarned&&typeof L<"u"},v=new Proxy(e,{set(a,l,c){return(l==="x"||l==="y"||l==="z")&&typeof c=="number"&&Math.abs(c)>n&&o(),a[l]=c,!0},get(a,l,c){let d=a[l];return l==="set"?function(m,p,g){return s(m,p,g)&&o(),a.set(m,p,g)}:l==="setX"||l==="setY"||l==="setZ"?function(m){return Math.abs(m)>n&&o(),a[l](m)}:l==="copy"?function(m){return s(m.x,m.y,m.z)&&o(),a.copy(m)}:typeof d=="function"?d.bind(a):d}});Object.defineProperty(this.camera,"position",{value:v,configurable:!0,enumerable:!0})}worldSwitchActions(){this.onWorldSwitched.push(()=>{this.protocolCustomBlocks.clear(),this.sectionsOffsetsAnimations={},this.waypoints.clear(),this.cinimaticScript.stopScript(),this.fireworks.clear()})}downloadWorldGeometry(){P2(this,new Q.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 Q.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 Q.Vector2);this.camera=new Q.PerspectiveCamera(75,e.x/e.y,.1,1e3),this._wrapCameraPositionWithWarning(),this.cameraContainer=new Q.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 At(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 At(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",e=>{this.updateShowChunksBorder(e)}),this.onReactiveConfigUpdated("defaultSkybox",e=>{this.skyboxRenderer.updateDefaultSkybox(e)}),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=D1(e.blocksAtlasImage);s.needsUpdate=!0,s.flipY=!1,this.material.map=s;let o=D1(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.scene.background=new Q.Color(e[0],e[1],e[2])}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(M2)}getItemRenderData(e,i){return h6(e,i,this.resourcesManager,this.playerStateReactive)}async demoModel(){let e=cursorBlockRel(0,1,0).position,i=await Je();tn(i,e);let n=new Q.BoxHelper(i,16776960);i.add(n),this.scene.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 Q.BoxHelper(i,16776960);i.add(n),this.scene.add(i)}addDebugOverlay(){if(this.debugOverlayAdded)return;this.debugOverlayAdded=!0;let e=ie("debug-overlay");setInterval(()=>{if(e.setVisibility(this.displayAdvancedStats),this.displayAdvancedStats){let i=s=>new Intl.NumberFormat("en-US",{}).format(s),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.worldBlockGeometry.getEstimatedMemoryUsage().readable}`,e.updateText(n),this.backendInfoReport=n}},200)}updatePosDataChunk(e){let[i,n,s]=e.split(",").map(a=>Math.floor(+a/16)),o=Math.abs(i-this.cameraSectionPos.x)+Math.abs(n-this.cameraSectionPos.y)+Math.abs(s-this.cameraSectionPos.z),v=this.sectionObjects[e].children.find(a=>a.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.worldBlockGeometry.finishChunk(e)}handleWorkerMessage(e){e.type==="geometry"&&this.worldBlockGeometry.handleWorkerGeometryMessage(e)}getSignTexture(e,i,n,s=!1){let o=E5(e),v=this.chunkTextures.get(`${o[0]},${o[1]}`);v||(v={},this.chunkTextures.set(`${o[0]},${o[1]}`,v));let a=`${e.x},${e.y},${e.z}`;if(v[a])return v[a];let l=w8(this.version),c=Di(i,n,l);if(!c)return;let d=new Q.Texture(c);return d.magFilter=Q.NearestFilter,d.minFilter=Q.NearestFilter,d.needsUpdate=!0,v[a]=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 At(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 Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z));let s=this.playerStateReactive.perspective==="third_person_back",o=4,v=this._tpDirection.set(0,0,-1),a=this._tpPitchQuat.setFromAxisAngle(this._tpAxisX,n),l=this._tpYawQuat.setFromAxisAngle(this._tpAxisY,i),c=this._tpFinalQuat.multiplyQuaternions(l,a);v.applyQuaternion(c),s&&v.multiplyScalar(-1),this.DEBUG_RAYCAST&&this.debugRaycast(e,v,o);let d=this._tpScenePos.set(this.sceneOrigin.toSceneX(e.x),this.sceneOrigin.toSceneY(e.y),this.sceneOrigin.toSceneZ(e.z)),m=this._tpRaycaster;m.set(d,v),m.far=o;let p=Object.values(this.sectionObjects).filter(E=>E.name==="chunk"&&E.visible).filter(E=>{let C=E.children.find(z=>z.name==="mesh");if(!C)return!1;let x=this._tpChunkWorldPos;return C.getWorldPosition(x),d.distanceTo(x)<80}),g=[];for(let E of p){let C=E.children.find(x=>x.name==="mesh");C&&g.push(C)}let y=m.intersectObjects(g,!1),w=o;return y.length>0&&(w=Math.max(.5,y[0].distance-.2)),new At(e.x+v.x*w,e.y+v.y*w,e.z+v.z*w)}debugRaycast(e,i,n){this.debugRaycastHelper&&(this.scene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.scene.remove(this.debugHitPoint),this.debugHitPoint=void 0);let s=new Q.Vector3(this.sceneOrigin.toSceneX(e.x),this.sceneOrigin.toSceneY(e.y),this.sceneOrigin.toSceneZ(e.z));this.debugRaycastHelper=new Q.ArrowHelper(i.clone().normalize(),s,n,16711680,n*.1,n*.05),this.scene.add(this.debugRaycastHelper);let o=new Q.SphereGeometry(.2,8,8),v=new Q.MeshBasicMaterial({color:65280});this.debugHitPoint=new Q.Mesh(o,v),this.debugHitPoint.position.copy(s).add(i.clone().multiplyScalar(n)),this.scene.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 M0(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,v=Math.PI/2;s.yaw<v&&i>Math.PI+v?o=-Math.PI*2:i<v&&s.yaw>Math.PI+v&&(o=Math.PI*2),this.currentRotTween?.stop(),this.currentRotTween=new M0(s).to({pitch:n,yaw:i+o},100).onUpdate(a=>this.cameraShake.setBaseRotation(a.pitch,a.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 Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),v=this.getThirdPersonCamera(o,i,n),a=o.distanceTo(new Q.Vector3(v.x,v.y,v.z)),l=s==="third_person_back"?a:-a;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.set(0,0,0),this.camera.rotation.set(0,0,0),this.debugRaycastHelper&&(this.scene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.scene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}this.updateCameraSectionPos()}}debugChunksVisibilityOverride(){let{chunksRenderAboveOverride:e,chunksRenderBelowOverride:i,chunksRenderDistanceOverride:n,chunksRenderAboveEnabled:s,chunksRenderBelowEnabled:o,chunksRenderDistanceEnabled:v}=this.reactiveDebugParams,a=this.getSectionHeight(),l=this.cameraSectionPos.y*a;if(this.displayOptions.inWorldRenderingConfig.enableDebugOverlay&&e!==void 0||i!==void 0||n!==void 0)for(let[c,d]of Object.entries(this.sectionObjects)){let[m,p,g]=c.split(",").map(Number),y=s&&e!==void 0?p<=l+e:o&&i!==void 0?p>=l-i:v&&n!==void 0?Math.abs(p-l)<=n:!0;d.visible=y}else for(let c of Object.values(this.sectionObjects))c.visible=!0}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 Q.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 v=this.cameraGroupVr instanceof Q.Group?this.cameraGroupVr.children.find(c=>c instanceof Q.PerspectiveCamera):this.camera;this.renderer.render(this.scene,v),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.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(v=>v.name==="textures")?.value,!!o)try{let a=JSON.parse(F.from(o,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:l}=this.worldRendererConfig;l&&(a=a?.replace("http://textures.minecraft.net/",l).replace("https://textures.minecraft.net/",l));let c=he(this,a,pe.head),d=new Q.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,-Q.MathUtils.degToRad(i*(n?90:45/2)),0),d.scale.set(.8,.8,.8),d}catch{}}renderSign(e,i,n,s,o){let v=this.getSignTexture(e,o,s);if(!v)return;let a=new Q.Mesh(new Q.PlaneGeometry(1,1),new Q.MeshBasicMaterial({map:v,transparent:!0}));a.renderOrder=999;let l=7/16,c=s?1.3:1;a.scale.set(1*c,l*c,1*c);let d=(s?2:1.5)/16,m=.25/16;n&&!s?a.position.set(0,0,-.5+d+m+1e-4):a.position.set(0,0,d/2+1e-4);let p=new Q.Group;p.rotation.set(0,-Q.MathUtils.degToRad(i*(n?90:45/2)),0),p.add(a);let g=(s?10:8)/16,y=(s?0:n?4.333:9.333)/16,w=g/2+y;return this.sceneOrigin.track(p),p.position.set(e.x+.5,e.y+w,e.z+.5),p}lightUpdate(e,i){for(let n=this.worldSizeParams.minY;n<this.worldSizeParams.worldHeight;n+=16)this.setSectionDirty(new At(e,n,i))}rerenderAllChunks(){for(let e of Object.keys(this.sectionObjects)){let[i,n,s]=e.split(",").map(Number);this.setSectionDirty(new At(i,n,s))}}updateShowChunksBorder(e){for(let i of Object.values(this.sectionObjects))for(let n of i.children)n.name==="helper"&&(n.visible=e)}resetWorld(){super.resetWorld(),this.worldBlockGeometry.resetWorld(),this.debugRaycastHelper&&(this.scene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.scene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}getLoadedChunksRelative(e,i=!1){let[n,s,o]=x1(e);return Object.fromEntries(Object.entries(this.sectionObjects).map(([v,a])=>{let[l,c,d]=v.split(",").map(Number),[m,p,g]=x1({x:l,y:c,z:d});return[i?`${m-n},${p-s},${g-o}`:`${m-n},${g-o}`,a]}))}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]}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.worldBlockGeometry.removeColumn(e,i)}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.disposeModules(),this.fireworksLegacy.destroy(),super.destroy(),this.skyboxRenderer.dispose(),this.fireworks.dispose()}shouldObjectVisible(e){let n=this.getSectionHeight(),s,o,v,a=this.sceneOrigin.getWorldPosition(e);a?(s=a.x,o=a.y,v=a.z):(s=this.sceneOrigin.toWorldX(e.position.x),o=this.sceneOrigin.toWorldY(e.position.y),v=this.sceneOrigin.toWorldZ(e.position.z));let l=Math.floor(s/16)*16,c=Math.floor(v/16)*16,d=Math.floor(o/n)*n,m=`${l},${c}`,p=`${l},${d},${c}`;return!!this.finishedChunks[m]||!!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()}};R();k();M();T();R();k();M();T();R();k();M();T();R();k();M();T();function W2(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}var mt=[],we=!1,Jt,u1=-1;function A8(){!we||!Jt||(we=!1,Jt.length?mt=Jt.concat(mt):u1=-1,mt.length&&H6())}function H6(){if(!we){var r=setTimeout(A8,0);we=!0;for(var t=mt.length;t;){for(Jt=mt,mt=[];++u1<t;)Jt&&Jt[u1].run();u1=-1,t=mt.length}Jt=null,we=!1,clearTimeout(r)}}function E8(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];mt.push(new O6(r,t)),mt.length===1&&!we&&setTimeout(H6,0)}function O6(r,t){this.fun=r,this.array=t}O6.prototype.run=function(){this.fun.apply(null,this.array)};var x8="browser",R8="x64",k8="browser",T8={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},M8=["/usr/bin/node"],S8=[],C8="v16.8.0",P8={},B8=function(r,t){},I8=function(r){W2("binding")},z8=function(r){return 0},H8=function(){return"/"},O8=function(r){},L8={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function L0(){}var D8=L0,F8=[];function U8(r){W2("_linkedBinding")}var G8={},W8=!1,V8={};function N8(r){W2("dlopen")}function j8(){return[]}function Q8(){return[]}var Y8=L0,K8=L0,V2=function(){return{}},J8=V2,q8=V2,Z8=L0,X8=L0,$8=L0,t4={};function e4(r,t){if(!r)throw new Error(t||"assertion error")}var i4={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},n4=L0,r4=L0;function s4(){return!1}var o4=L0,a4=L0,v4=L0,l4=L0,c4=L0,d4=void 0,u4=void 0,f4=void 0,h4=L0,m4=2,p4=1,g4="/bin/usr/node",b4=9229,y4="node",_4=[],w4=L0,Et={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Et.now===void 0&&(F2=Date.now(),Et.timing&&Et.timing.navigationStart&&(F2=Et.timing.navigationStart),Et.now=()=>Date.now()-F2);var F2;function A4(){return Et.now()/1e3}var U2=1e9;function G2(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+=U2)),[i,n]}G2.bigint=function(r){var t=G2(r);return typeof BigInt>"u"?t[0]*U2+t[1]:BigInt(t[0]*U2)+BigInt(t[1])};var E4=10,x4={},R4=0;function xt(){return N2}var k4=xt,T4=xt,M4=xt,S4=xt,C4=xt,P4=L0,B4=xt,I4=xt;function z4(r){return[]}var N2={version:C8,versions:P8,arch:R8,platform:k8,release:L8,_rawDebug:D8,moduleLoadList:F8,binding:I8,_linkedBinding:U8,_events:x4,_eventsCount:R4,_maxListeners:E4,on:xt,addListener:k4,once:T4,off:M4,removeListener:S4,removeAllListeners:C4,emit:P4,prependListener:B4,prependOnceListener:I4,listeners:z4,domain:G8,_exiting:W8,config:V8,dlopen:N8,uptime:A4,_getActiveRequests:j8,_getActiveHandles:Q8,reallyExit:Y8,_kill:K8,cpuUsage:V2,resourceUsage:J8,memoryUsage:q8,kill:Z8,exit:X8,openStdin:$8,allowedNodeEnvironmentFlags:t4,assert:e4,features:i4,_fatalExceptions:n4,setUncaughtExceptionCaptureCallback:r4,hasUncaughtExceptionCaptureCallback:s4,emitWarning:B8,nextTick:E8,_tickCallback:o4,_debugProcess:a4,_debugEnd:v4,_startProfilerIdleNotifier:l4,_stopProfilerIdleNotifier:c4,stdout:d4,stdin:f4,stderr:u4,abort:h4,umask:z8,chdir:O8,cwd:H8,env:T8,title:x8,argv:M8,execArgv:S8,pid:m4,ppid:p4,execPath:g4,debugPort:b4,hrtime:G2,argv0:y4,_preload_modules:_4,setSourceMapsEnabled:w4};var j2={},L6=!1;function H4(){if(L6)return j2;L6=!0;var r=N2;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 v="",a=0,l=-1,c=0,d,m=0;m<=s.length;++m){if(m<s.length)d=s.charCodeAt(m);else{if(d===47)break;d=47}if(d===47){if(!(l===m-1||c===1))if(l!==m-1&&c===2){if(v.length<2||a!==2||v.charCodeAt(v.length-1)!==46||v.charCodeAt(v.length-2)!==46){if(v.length>2){var p=v.lastIndexOf("/");if(p!==v.length-1){p===-1?(v="",a=0):(v=v.slice(0,p),a=v.length-1-v.lastIndexOf("/")),l=m,c=0;continue}}else if(v.length===2||v.length===1){v="",a=0,l=m,c=0;continue}}o&&(v.length>0?v+="/..":v="..",a=2)}else v.length>0?v+="/"+s.slice(l+1,m):v=s.slice(l+1,m),a=m-l-1;l=m,c=0}else d===46&&c!==-1?++c:c=-1}return v}function i(s,o){var v=o.dir||o.root,a=o.base||(o.name||"")+(o.ext||"");return v?v===o.root?v+a:v+s+a:a}var n={resolve:function(){for(var o="",v=!1,a,l=arguments.length-1;l>=-1&&!v;l--){var c;l>=0?c=arguments[l]:(a===void 0&&(a=r.cwd()),c=a),t(c),c.length!==0&&(o=c+"/"+o,v=c.charCodeAt(0)===47)}return o=e(o,!v),v?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(t(o),o.length===0)return".";var v=o.charCodeAt(0)===47,a=o.charCodeAt(o.length-1)===47;return o=e(o,!v),o.length===0&&!v&&(o="."),o.length>0&&a&&(o+="/"),v?"/"+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,v=0;v<arguments.length;++v){var a=arguments[v];t(a),a.length>0&&(o===void 0?o=a:o+="/"+a)}return o===void 0?".":n.normalize(o)},relative:function(o,v){if(t(o),t(v),o===v||(o=n.resolve(o),v=n.resolve(v),o===v))return"";for(var a=1;a<o.length&&o.charCodeAt(a)===47;++a);for(var l=o.length,c=l-a,d=1;d<v.length&&v.charCodeAt(d)===47;++d);for(var m=v.length,p=m-d,g=c<p?c:p,y=-1,w=0;w<=g;++w){if(w===g){if(p>g){if(v.charCodeAt(d+w)===47)return v.slice(d+w+1);if(w===0)return v.slice(d+w)}else c>g&&(o.charCodeAt(a+w)===47?y=w:w===0&&(y=0));break}var _=o.charCodeAt(a+w),E=v.charCodeAt(d+w);if(_!==E)break;_===47&&(y=w)}var C="";for(w=a+y+1;w<=l;++w)(w===l||o.charCodeAt(w)===47)&&(C.length===0?C+="..":C+="/..");return C.length>0?C+v.slice(d+y):(d+=y,v.charCodeAt(d)===47&&++d,v.slice(d))},_makeLong:function(o){return o},dirname:function(o){if(t(o),o.length===0)return".";for(var v=o.charCodeAt(0),a=v===47,l=-1,c=!0,d=o.length-1;d>=1;--d)if(v=o.charCodeAt(d),v===47){if(!c){l=d;break}}else c=!1;return l===-1?a?"/":".":a&&l===1?"//":o.slice(0,l)},basename:function(o,v){if(v!==void 0&&typeof v!="string")throw new TypeError('"ext" argument must be a string');t(o);var a=0,l=-1,c=!0,d;if(v!==void 0&&v.length>0&&v.length<=o.length){if(v.length===o.length&&v===o)return"";var m=v.length-1,p=-1;for(d=o.length-1;d>=0;--d){var g=o.charCodeAt(d);if(g===47){if(!c){a=d+1;break}}else p===-1&&(c=!1,p=d+1),m>=0&&(g===v.charCodeAt(m)?--m===-1&&(l=d):(m=-1,l=p))}return a===l?l=p:l===-1&&(l=o.length),o.slice(a,l)}else{for(d=o.length-1;d>=0;--d)if(o.charCodeAt(d)===47){if(!c){a=d+1;break}}else l===-1&&(c=!1,l=d+1);return l===-1?"":o.slice(a,l)}},extname:function(o){t(o);for(var v=-1,a=0,l=-1,c=!0,d=0,m=o.length-1;m>=0;--m){var p=o.charCodeAt(m);if(p===47){if(!c){a=m+1;break}continue}l===-1&&(c=!1,l=m+1),p===46?v===-1?v=m:d!==1&&(d=1):v!==-1&&(d=-1)}return v===-1||l===-1||d===0||d===1&&v===l-1&&v===a+1?"":o.slice(v,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 v={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return v;var a=o.charCodeAt(0),l=a===47,c;l?(v.root="/",c=1):c=0;for(var d=-1,m=0,p=-1,g=!0,y=o.length-1,w=0;y>=c;--y){if(a=o.charCodeAt(y),a===47){if(!g){m=y+1;break}continue}p===-1&&(g=!1,p=y+1),a===46?d===-1?d=y:w!==1&&(w=1):d!==-1&&(w=-1)}return d===-1||p===-1||w===0||w===1&&d===p-1&&d===m+1?p!==-1&&(m===0&&l?v.base=v.name=o.slice(1,p):v.base=v.name=o.slice(m,p)):(m===0&&l?(v.name=o.slice(1,d),v.base=o.slice(1,p)):(v.name=o.slice(m,d),v.base=o.slice(m,p)),v.ext=o.slice(d,p)),m>0?v.dir=o.slice(0,m-1):l&&(v.dir="/"),v},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,j2=n,j2}var D0=H4();var BE=D0._makeLong,IE=D0.basename,zE=D0.delimiter,HE=D0.dirname,OE=D0.extname,LE=D0.format,DE=D0.isAbsolute,Q2=D0.join,FE=D0.normalize,UE=D0.parse,GE=D0.posix,WE=D0.relative,VE=D0.resolve,NE=D0.sep,jE=D0.win32;import*as a0 from"three";R();k();M();T();import O4 from"prismarine-world";import L4 from"prismarine-chunk";var D6=r=>{let t=O4(r),e=L4(r),i=new t(r).sync,n=D4(i);for(let s of n)if(s.startsWith("set")&&s!=="setColumn"){let o=i[s].bind(i);i[s]=(...v)=>{let a=v[0];a.x!==void 0&&!i.getColumnAt(a)&&i.setColumn(Math.floor(a.x/16),Math.floor(a.z/16),new e(void 0)),o(...v)}}return i};function D4(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 U6}from"vec3";R();k();M();T();var F6="1.21.4";var Y2=new Date,G6=Y2.getMonth()===11&&Y2.getDate()>=24&&Y2.getDate()<=26,F4=["panorama_3.webp","panorama_1.webp","panorama_4.webp","panorama_5.webp","panorama_0.webp","panorama_2.webp"],f1=class{constructor(t,e,i=!1){this.documentRenderer=t;this.options=e;this.doWorldBlocksPanorama=i;h(this,"camera");h(this,"scene");h(this,"ambientLight");h(this,"directionalLight");h(this,"panoramaGroup",null);h(this,"time",0);h(this,"abortController",new AbortController);h(this,"worldRenderer");h(this,"WorldRendererClass",Kt);h(this,"startTimes",new Map);this.scene=new a0.Scene,this.scene.background=new a0.Color(3294568),this.ambientLight=new a0.AmbientLight(13421772),this.scene.add(this.ambientLight),this.directionalLight=new a0.DirectionalLight(16777215,.5),this.directionalLight.position.set(1,1,.5).normalize(),this.directionalLight.castShadow=!0,this.scene.add(this.directionalLight),this.camera=new a0.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 bt(Q2("background","panorama_0.webp")),e=new a0.Mesh(new a0.PlaneGeometry(1e3,1e3),new a0.MeshBasicMaterial({map:t}));e.position.set(0,0,-500),e.rotation.set(0,0,0),this.scene.add(e)}addClassicPanorama(){let t=new a0.BoxGeometry(1e3,1e3,1e3),e=[],i=200;for(let o of F4)(async()=>{let{texture:a}=M5(Q2("background",G6?"christmas":"",o));a.matrixAutoUpdate=!1,a.matrix.set(-1,0,1,0,1,0,0,0,1),a.wrapS=a0.ClampToEdgeWrapping,a.wrapT=a0.ClampToEdgeWrapping,a.minFilter=a0.LinearFilter,a.magFilter=a0.LinearFilter;let l=new a0.MeshBasicMaterial({map:a,transparent:!0,side:a0.DoubleSide,depthWrite:!1,opacity:0});this.startTimes.set(l,Date.now()),e.push(l)})();let n=new a0.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 v=this.startTimes.get(o);if(v){let a=Date.now()-v,l=Math.min(1,a/i);o.opacity=l}}};let s=new a0.Object3D;if(s.add(n),!G6)for(let o=0;o<20;o++){let v=new ht("1.16.4","squid").mesh;v.position.set(Math.random()*30-15,Math.random()*20-10,Math.random()*10-17),v.rotation.set(0,Math.PI+Math.random(),-Math.PI/4,"ZYX");let a=Math.random()*.01;v.children[0].onBeforeRender=()=>{v.rotation.y+=a,v.rotation.z=Math.cos(n.rotation.y*3)*Math.PI/4-Math.PI/2},s.add(v)}this.scene.add(s),this.panoramaGroup=s}async worldBlocksPanorama(){let t=F6,e=new ct;if(e.currentConfig={version:t,noInventoryGui:!0},await e.updateAssetsData?.({}),this.abortController.signal.aborted)return;let i=D6(t),s=Z6("prismarine-block")(t),v=globalThis.mcData.blocksArray.filter(_=>{if(!_.name.includes("stained_glass"))return!1;let E=s.fromStateId(_.defaultState,0);if(E.shapes?.length!==1)return!1;let C=E.shapes[0];return C[0]===0&&C[1]===0&&C[2]===0&&C[3]===1&&C[4]===1&&C[5]===1}),a=-15,l=100,c=100;for(let _=-l;_<l;_++)for(let E=-c;E<c;E++){let C=v[Math.floor(Math.random()*v.length)];i.setBlockStateId(new U6(_,E,a),C.defaultState)}this.camera.updateProjectionMatrix(),this.camera.position.set(.5,c/2+.5,.5),this.camera.rotation.set(0,0,0);let d=new U6(...this.camera.position.toArray()),m=new Ot(i,2,d);if(this.abortController.signal.aborted||(this.worldRenderer=new this.WorldRendererClass(this.documentRenderer.renderer,this.options,{version:t,worldView:m,inWorldRenderingConfig:Ce,playerStateReactive:wi().reactive,rendererState:Bt().reactive,nonReactiveState:Bt().nonReactive,resourcesManager:e}),this.worldRenderer instanceof Kt&&(this.scene=this.worldRenderer.scene),m.init(d),await this.worldRenderer.waitForChunksToRender(),this.abortController.signal.aborted))return;let{camera:p}=this,g=p.position.x,y=p.position.y,w;document.body.addEventListener("pointermove",_=>{if(_.pointerType!=="mouse")return;let E=new a0.Vector2(_.clientX,_.clientY),C=.2,x=E.x/window.innerWidth-.5,S=-(E.y/window.innerHeight-.5);w?.stop();let z={x:g+x*C,y:y+S*C};w=new M0(p.position).to(z,0),w.start(),p.updateProjectionMatrix()},{signal:this.abortController.signal})}dispose(){this.scene.clear(),this.worldRenderer?.destroy(),this.abortController.abort()}};o5.ColorManagement.enabled=!1;globalThis.THREE=o5;var W6=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),async loadGeometryExport(t){let{applyWorldGeometryExport:e}=await Promise.resolve().then(()=>(B2(),w6));return e(r,t)}}),G4=[],h1=(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)}},V6=()=>{let r,t=null,e=null,i=null,n=null,s=(c,d)=>{_0?r=_5(c,G4,globalThis):r=c,t=new De(r,d?.canvas),globalThis.renderer=t.renderer,globalThis.documentRenderer=t,globalThis.threeJsBackend=l,h1("default",l)},o=async()=>{if(!t)throw new Error("Document renderer not initialized");if(!i&&!e){let c={...r};e=new f1(t,c,!!L.env.SINGLE_FILE_BUILD_MODE),globalThis.panoramaRenderer=e,h1("panoramaCreated",e),await e.start(),h1("panoramaReady",e)}},v=async c=>{let m=_0?_5(c,[ct,Ht],globalThis):c;if(!t)throw new Error("Document renderer not initialized");t.nonReactiveState=m.nonReactiveState,globalThis.resourcesManager=m.resourcesManager,e&&(e.dispose(),e=null),i=new Kt(t.renderer,r,m),await i.worldReadyPromise,n=new w5(m.nonReactiveState),globalThis.frameTimingCollector=n;let p=t.render;t.render=function(g){p.call(this,g),n?.markFrameStart(),m.inWorldRenderingConfig.paused||i?.render(g),n?.markFrameEnd(),n?.markFrameDisplay()},t.inWorldRenderingConfig=m.inWorldRenderingConfig,globalThis.world=i,h1("worldReady",i)},a=()=>{e&&(e.dispose(),e=null),t&&t.dispose(),i&&(i.destroy(),i=null)},l={id:"threejs",displayName:`three.js ${o5.REVISION}`,startPanorama:o,startWorld:v,disconnect:a,setRendering(c){t.setPaused(!c),i&&(i.renderingActive=c)},getDebugOverlay:()=>({get entitiesString(){return i?.entities.getDebugString()},get left(){return{"Geo Memory":i?.worldBlockGeometry.getEstimatedMemoryUsage().readable??"-"}}}),updateCamera(c,d,m){n?.markCameraUpdate(!c),i?.setFirstPersonCamera(c,d,m)},get soundSystem(){return i?.soundSystem},get backendMethods(){if(i)return W6(i)}};return{main:{init:s,backend:l},workerProxy(){return Ii({init(c,d){s(c,{canvas:d})},updateSizeExternal(c,d,m){t?.updateSizeExternal(c,d,m)},startPanorama:o,startWorld:v,disconnect:a,setRendering:l.setRendering,updateCamera(c,d,m){let p=c?new U4(c.x,c.y,c.z):null;n?.markCameraUpdate(!p),l.updateCamera(p,d,m)},async callBackendMethod(c,...d){if(!i)throw new Error("World renderer not initialized");let p=W6(i)[c];if(!p)throw new Error(`Backend method ${String(c)} is unavailable`);return p(...d)}})}}};var m1=r=>{let{main:t}=V6();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.";R();k();M();T();import*as N6 from"three";function W4(r){let t="threeWorker.js",e;if(L.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 p1=async r=>{let t=W4(()=>{}),e=zi(t),i=S1();i.onSizeChanged((v,a)=>{e.updateSizeExternal(v,a,window.devicePixelRatio||1)});let n=y5(r,t);try{e.init(n,i.canvas)}catch(v){throw ze(n),v}let s=new Proxy({},{get(v,a){if(typeof a=="string")return async(...l)=>e.callBackendMethod(a,...l)}});return{id:"threejs",displayName:`three.js ${N6.REVISION}`,async startPanorama(){},async startWorld(v){let a={...Le,items:"itemsArray",entities:"entitiesArray"};G1([t],v.version,a,v.resourcesManager.currentResources.mcData),v.inWorldRenderingConfig.__syncToWorker=!0,v.playerStateReactive&&(v.playerStateReactive.__syncToWorker=!0),v.rendererState&&(v.rendererState.__syncFromWorker=!0),v.nonReactiveState&&(v.nonReactiveState.__syncFromWorker=!0),v.nonReactiveState.__syncFromWorkerInterval=200;let l=y5(v,t);try{await e.startWorld(structuredClone(l))}catch(d){throw ze(l),d}e.updateSizeExternal(i.size.width,i.size.height,window.devicePixelRatio||1);let c=ie("fps");setInterval(()=>{let{fps:d,avgRenderTime:m,worstRenderTime:p}=v.nonReactiveState;c.updateText(`FPS: ${d.toFixed(0)} (${m.toFixed(0)}ms/${p.toFixed(0)}ms)`),v.nonReactiveState.fps=0},1e3)},disconnect(){i.destroy(),e.disconnect(),t.terminate()},setRendering(v){e.setRendering(v)},updateCamera(v,a,l){e.updateCamera(v?{x:v.x,y:v.y,z:v.z}:null,a,l)},soundSystem:void 0,backendMethods:s}};p1.id="threejs-off-thread";p1.displayName="three.js Multi-thread";p1.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{ki as AppViewer,De as DocumentRenderer,te as LoadedResourcesTransferrable,ct as ResourcesManager,Ot as WorldView,Ht as WorldViewWorker,S1 as addCanvasForWorker,$t as chunkPos,p1 as createGraphicsBackendOffThread,m1 as createGraphicsBackendSingleThread,yv as createWorldRendererConfig,yi as defaultGraphicsBackendConfig,Ce as defaultWorldRendererConfig,Ei as delayedIterator,Bt as getDefaultRendererState,Ti as getInitialPlayerState,_s as getInitialPlayerStateRenderer,ys as getPlayerStateUtils,_0 as isWebWorker,rs as sectionPos};
21235
+ #include <${R8>=154?"colorspace_fragment":"encodings_fragment"}>
21236
+ }`})}},U2=class{constructor(t){this.worldRenderer=t;h(this,"points");h(this,"clock",new w0.Clock);h(this,"enabled",!1);h(this,"currentTime");h(this,"enablementCheck",()=>this.currentTime?this.currentTime>13500&&this.currentTime<23e3:!1);h(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 w0.BufferGeometry,v=y=>new w0.Vector3().setFromSpherical(new w0.Spherical(y,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),a=[],l=[],c=Array.from({length:i},()=>(.5+.5*Math.random())*n),d=new w0.Color,m=t+e,p=e/i;for(let y=0;y<i;y++)m-=p*Math.random(),a.push(...v(m).toArray()),d.setHSL(y/i,s,.9),l.push(d.r,d.g,d.b);o.setAttribute("position",new w0.Float32BufferAttribute(a,3)),o.setAttribute("color",new w0.Float32BufferAttribute(l,3)),o.setAttribute("size",new w0.Float32BufferAttribute(c,1));let g=new F2;g.blending=w0.AdditiveBlending,g.depthTest=!1,g.transparent=!0,this.points=new w0.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)}},D6={id:"starfield",controller:U2,enabledDefault:!0,cannotBeDisabled:!0};var F6={starfield:D6,futuristicReveal:L6,rain:H6,cameraBobbing:P6};var Kt=class r extends C5{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;h(this,"outputFormat","threeJs");h(this,"worldBlockGeometry");h(this,"chunkTextures",new Map);h(this,"signsCache",new Map);h(this,"cameraSectionPos",new At(0,0,0));h(this,"holdingBlock");h(this,"holdingBlockLeft");h(this,"scene",new Q.Scene);h(this,"ambientLight",new Q.AmbientLight(13421772));h(this,"directionalLight",new Q.DirectionalLight(16777215,.5));h(this,"entities",new K5(this,globalThis.mcData));h(this,"cameraGroupVr");h(this,"material",new Q.MeshLambertMaterial({vertexColors:!0,transparent:!0,alphaTest:.1}));h(this,"itemsTexture");h(this,"cursorBlock");h(this,"onRender",[]);h(this,"lastRenderTime",0);h(this,"cameraShake");h(this,"cameraContainer");h(this,"media");h(this,"waypoints");h(this,"cinimaticScript");h(this,"camera");h(this,"renderTimeAvg",0);h(this,"modules",{});h(this,"sectionsOffsetsAnimations",{});h(this,"fountains",[]);h(this,"fireworksLegacy");h(this,"DEBUG_RAYCAST",!1);h(this,"skyboxRenderer");h(this,"fireworks");h(this,"sceneOrigin",new o1(this.scene));h(this,"cameraWorldPos",{x:0,y:0,z:0});h(this,"_cameraPositionAccessWarned",!1);h(this,"_tmpCameraPos",new Q.Vector3);h(this,"currentPosTween");h(this,"currentRotTween");h(this,"_tpDirection",new Q.Vector3);h(this,"_tpPitchQuat",new Q.Quaternion);h(this,"_tpYawQuat",new Q.Quaternion);h(this,"_tpFinalQuat",new Q.Quaternion);h(this,"_tpScenePos",new Q.Vector3);h(this,"_tpAxisX",new Q.Vector3(1,0,0));h(this,"_tpAxisY",new Q.Vector3(0,1,0));h(this,"_tpRaycaster",new Q.Raycaster);h(this,"_tpChunkWorldPos",new Q.Vector3);h(this,"debugOverlayAdded",!1);h(this,"debugRaycastHelper");h(this,"debugHitPoint");h(this,"prevFramePerspective",null);this.renderer=e,n.rendererState.renderer=r.getRendererInfo(e)??"...",this.worldBlockGeometry=new l1(this,this.scene,this.material,n),this.cursorBlock=new J5(this),this.holdingBlock=new ce(this),this.holdingBlockLeft=new ce(this,!0);for(let s of Object.values(F6))this.registerModule(s);this.skyboxRenderer=new r1(this.scene,!1,null),this.skyboxRenderer.init(),this.addDebugOverlay(),this.resetScene(),this.init(),this.soundSystem=new Z5(this),this.cameraShake=new X5(this,this.onRender),this.media=new $5(this),this.fireworksLegacy=new i1(this),this.waypoints=new e1(this),this.cinimaticScript=new n1(this,(s,o,v)=>this.setCinimaticCamera(s,o,v),s=>this.setCinimaticFov(s),()=>({position:new At(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 s1(this.scene,this.sceneOrigin),this.renderUpdateEmitter.on("chunkFinished",s=>{this.finishChunk(s)}),this.worldSwitchActions(),this.initializeModules()}get sectionObjects(){return this.worldBlockGeometry.sectionObjects}get waitingChunksToDisplay(){return this.worldBlockGeometry.waitingChunksToDisplay}get estimatedMemoryUsage(){return this.worldBlockGeometry.estimatedMemoryUsage}get tilesRendered(){return Object.values(this.sectionObjects).reduce((e,i)=>e+i.tilesCount,0)}get blocksRendered(){return Object.values(this.sectionObjects).reduce((e,i)=>e+i.blocksCount,0)}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=(a,l,c)=>Math.abs(a)>n||Math.abs(l)>n||Math.abs(c)>n,o=()=>{!i._cameraPositionAccessWarned&&typeof L<"u"},v=new Proxy(e,{set(a,l,c){return(l==="x"||l==="y"||l==="z")&&typeof c=="number"&&Math.abs(c)>n&&o(),a[l]=c,!0},get(a,l,c){let d=a[l];return l==="set"?function(m,p,g){return s(m,p,g)&&o(),a.set(m,p,g)}:l==="setX"||l==="setY"||l==="setZ"?function(m){return Math.abs(m)>n&&o(),a[l](m)}:l==="copy"?function(m){return s(m.x,m.y,m.z)&&o(),a.copy(m)}:typeof d=="function"?d.bind(a):d}});Object.defineProperty(this.camera,"position",{value:v,configurable:!0,enumerable:!0})}worldSwitchActions(){this.onWorldSwitched.push(()=>{this.protocolCustomBlocks.clear(),this.sectionsOffsetsAnimations={},this.waypoints.clear(),this.cinimaticScript.stopScript(),this.fireworks.clear()})}downloadWorldGeometry(){B2(this,new Q.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 Q.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 Q.Vector2);this.camera=new Q.PerspectiveCamera(75,e.x/e.y,.1,1e3),this._wrapCameraPositionWithWarning(),this.cameraContainer=new Q.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 At(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 At(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",e=>{this.updateShowChunksBorder(e)}),this.onReactiveConfigUpdated("defaultSkybox",e=>{this.skyboxRenderer.updateDefaultSkybox(e)}),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=F1(e.blocksAtlasImage);s.needsUpdate=!0,s.flipY=!1,this.material.map=s;let o=F1(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.scene.background=new Q.Color(e[0],e[1],e[2])}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(S2)}getItemRenderData(e,i){return p6(e,i,this.resourcesManager,this.playerStateReactive)}async demoModel(){let e=cursorBlockRel(0,1,0).position,i=await Je();nn(i,e);let n=new Q.BoxHelper(i,16776960);i.add(n),this.scene.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 Q.BoxHelper(i,16776960);i.add(n),this.scene.add(i)}addDebugOverlay(){if(this.debugOverlayAdded)return;this.debugOverlayAdded=!0;let e=ie("debug-overlay");setInterval(()=>{if(e.setVisibility(this.displayAdvancedStats),this.displayAdvancedStats){let i=s=>new Intl.NumberFormat("en-US",{}).format(s),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.worldBlockGeometry.getEstimatedMemoryUsage().readable}`,e.updateText(n),this.backendInfoReport=n}},200)}updatePosDataChunk(e){let[i,n,s]=e.split(",").map(a=>Math.floor(+a/16)),o=Math.abs(i-this.cameraSectionPos.x)+Math.abs(n-this.cameraSectionPos.y)+Math.abs(s-this.cameraSectionPos.z),v=this.sectionObjects[e].children.find(a=>a.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.worldBlockGeometry.finishChunk(e)}handleWorkerMessage(e){e.type==="geometry"&&this.worldBlockGeometry.handleWorkerGeometryMessage(e)}getSignTexture(e,i,n,s=!1){let o=E5(e),v=this.chunkTextures.get(`${o[0]},${o[1]}`);v||(v={},this.chunkTextures.set(`${o[0]},${o[1]}`,v));let a=`${e.x},${e.y},${e.z}`;if(v[a])return v[a];let l=k8(this.version),c=U3(i,n,l);if(!c)return;let d=new Q.Texture(c);return d.magFilter=Q.NearestFilter,d.minFilter=Q.NearestFilter,d.needsUpdate=!0,v[a]=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 At(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 Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z));let s=this.playerStateReactive.perspective==="third_person_back",o=4,v=this._tpDirection.set(0,0,-1),a=this._tpPitchQuat.setFromAxisAngle(this._tpAxisX,n),l=this._tpYawQuat.setFromAxisAngle(this._tpAxisY,i),c=this._tpFinalQuat.multiplyQuaternions(l,a);v.applyQuaternion(c),s&&v.multiplyScalar(-1),this.DEBUG_RAYCAST&&this.debugRaycast(e,v,o);let d=this._tpScenePos.set(this.sceneOrigin.toSceneX(e.x),this.sceneOrigin.toSceneY(e.y),this.sceneOrigin.toSceneZ(e.z)),m=this._tpRaycaster;m.set(d,v),m.far=o;let p=Object.values(this.sectionObjects).filter(A=>A.name==="chunk"&&A.visible).filter(A=>{let C=A.children.find(z=>z.name==="mesh");if(!C)return!1;let x=this._tpChunkWorldPos;return C.getWorldPosition(x),d.distanceTo(x)<80}),g=[];for(let A of p){let C=A.children.find(x=>x.name==="mesh");C&&g.push(C)}let y=m.intersectObjects(g,!1),E=o;return y.length>0&&(E=Math.max(.5,y[0].distance-.2)),new At(e.x+v.x*E,e.y+v.y*E,e.z+v.z*E)}debugRaycast(e,i,n){this.debugRaycastHelper&&(this.scene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.scene.remove(this.debugHitPoint),this.debugHitPoint=void 0);let s=new Q.Vector3(this.sceneOrigin.toSceneX(e.x),this.sceneOrigin.toSceneY(e.y),this.sceneOrigin.toSceneZ(e.z));this.debugRaycastHelper=new Q.ArrowHelper(i.clone().normalize(),s,n,16711680,n*.1,n*.05),this.scene.add(this.debugRaycastHelper);let o=new Q.SphereGeometry(.2,8,8),v=new Q.MeshBasicMaterial({color:65280});this.debugHitPoint=new Q.Mesh(o,v),this.debugHitPoint.position.copy(s).add(i.clone().multiplyScalar(n)),this.scene.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,v=Math.PI/2;s.yaw<v&&i>Math.PI+v?o=-Math.PI*2:i<v&&s.yaw>Math.PI+v&&(o=Math.PI*2),this.currentRotTween?.stop(),this.currentRotTween=new S0(s).to({pitch:n,yaw:i+o},100).onUpdate(a=>this.cameraShake.setBaseRotation(a.pitch,a.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 Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),v=this.getThirdPersonCamera(o,i,n),a=o.distanceTo(new Q.Vector3(v.x,v.y,v.z)),l=s==="third_person_back"?a:-a;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.scene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.scene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}this.updateCameraSectionPos()}}debugChunksVisibilityOverride(){let{chunksRenderAboveOverride:e,chunksRenderBelowOverride:i,chunksRenderDistanceOverride:n,chunksRenderAboveEnabled:s,chunksRenderBelowEnabled:o,chunksRenderDistanceEnabled:v}=this.reactiveDebugParams,a=this.getSectionHeight(),l=this.cameraSectionPos.y*a;if(this.displayOptions.inWorldRenderingConfig.enableDebugOverlay&&e!==void 0||i!==void 0||n!==void 0)for(let[c,d]of Object.entries(this.sectionObjects)){let[m,p,g]=c.split(",").map(Number),y=s&&e!==void 0?p<=l+e:o&&i!==void 0?p>=l-i:v&&n!==void 0?Math.abs(p-l)<=n:!0;d.visible=y}else for(let c of Object.values(this.sectionObjects))c.visible=!0}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 Q.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 v=this.cameraGroupVr instanceof Q.Group?this.cameraGroupVr.children.find(c=>c instanceof Q.PerspectiveCamera):this.camera;this.worldBlockGeometry.applyPendingUpdates(),this.renderer.render(this.scene,v),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.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(v=>v.name==="textures")?.value,!!o)try{let a=JSON.parse(D.from(o,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:l}=this.worldRendererConfig;l&&(a=a?.replace("http://textures.minecraft.net/",l).replace("https://textures.minecraft.net/",l));let c=he(this,a,pe.head),d=new Q.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,-Q.MathUtils.degToRad(i*(n?90:45/2)),0),d.scale.set(.8,.8,.8),d}catch{}}renderSign(e,i,n,s,o){let v=this.getSignTexture(e,o,s);if(!v)return;let a=new Q.Mesh(new Q.PlaneGeometry(1,1),new Q.MeshBasicMaterial({map:v,transparent:!0}));a.renderOrder=999;let l=7/16,c=s?1.3:1;a.scale.set(1*c,l*c,1*c);let d=(s?2:1.5)/16,m=.25/16;n&&!s?a.position.set(0,0,-.5+d+m+1e-4):a.position.set(0,0,d/2+1e-4);let p=new Q.Group;p.rotation.set(0,-Q.MathUtils.degToRad(i*(n?90:45/2)),0),p.add(a);let g=(s?10:8)/16,y=(s?0:n?4.333:9.333)/16,E=g/2+y;return this.sceneOrigin.track(p),p.position.set(e.x+.5,e.y+E,e.z+.5),p}lightUpdate(e,i){for(let n=this.worldSizeParams.minY;n<this.worldSizeParams.worldHeight;n+=16)this.setSectionDirty(new At(e,n,i))}rerenderAllChunks(){for(let e of Object.keys(this.sectionObjects)){let[i,n,s]=e.split(",").map(Number);this.setSectionDirty(new At(i,n,s))}}updateShowChunksBorder(e){for(let i of Object.values(this.sectionObjects))for(let n of i.children)n.name==="helper"&&(n.visible=e)}resetWorld(){super.resetWorld(),this.worldBlockGeometry.resetWorld(),this.debugRaycastHelper&&(this.scene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.scene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}getLoadedChunksRelative(e,i=!1){let[n,s,o]=R1(e);return Object.fromEntries(Object.entries(this.sectionObjects).map(([v,a])=>{let[l,c,d]=v.split(",").map(Number),[m,p,g]=R1({x:l,y:c,z:d});return[i?`${m-n},${p-s},${g-o}`:`${m-n},${g-o}`,a]}))}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]}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.worldBlockGeometry.removeColumn(e,i)}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.disposeModules(),this.fireworksLegacy.destroy(),super.destroy(),this.skyboxRenderer.dispose(),this.fireworks.dispose()}shouldObjectVisible(e){let n=this.getSectionHeight(),s,o,v,a=this.sceneOrigin.getWorldPosition(e);a?(s=a.x,o=a.y,v=a.z):(s=this.sceneOrigin.toWorldX(e.position.x),o=this.sceneOrigin.toWorldY(e.position.y),v=this.sceneOrigin.toWorldZ(e.position.z));let l=Math.floor(s/16)*16,c=Math.floor(v/16)*16,d=Math.floor(o/n)*n,m=`${l},${c}`,p=`${l},${d},${c}`;return!!this.finishedChunks[m]||!!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()}};R();k();M();T();R();k();M();T();R();k();M();T();R();k();M();T();function N2(r){throw new Error("Node.js process "+r+" is not supported by JSPM core outside of Node.js")}var mt=[],we=!1,Jt,f1=-1;function T8(){!we||!Jt||(we=!1,Jt.length?mt=Jt.concat(mt):f1=-1,mt.length&&U6())}function U6(){if(!we){var r=setTimeout(T8,0);we=!0;for(var t=mt.length;t;){for(Jt=mt,mt=[];++f1<t;)Jt&&Jt[f1].run();f1=-1,t=mt.length}Jt=null,we=!1,clearTimeout(r)}}function M8(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];mt.push(new G6(r,t)),mt.length===1&&!we&&setTimeout(U6,0)}function G6(r,t){this.fun=r,this.array=t}G6.prototype.run=function(){this.fun.apply(null,this.array)};var S8="browser",C8="x64",P8="browser",B8={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},I8=["/usr/bin/node"],z8=[],H8="v16.8.0",O8={},L8=function(r,t){},D8=function(r){N2("binding")},F8=function(r){return 0},U8=function(){return"/"},G8=function(r){},W8={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function D0(){}var V8=D0,N8=[];function j8(r){N2("_linkedBinding")}var Q8={},Y8=!1,K8={};function J8(r){N2("dlopen")}function q8(){return[]}function Z8(){return[]}var X8=D0,$8=D0,j2=function(){return{}},t4=j2,e4=j2,i4=D0,n4=D0,r4=D0,s4={};function o4(r,t){if(!r)throw new Error(t||"assertion error")}var a4={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},v4=D0,l4=D0;function c4(){return!1}var d4=D0,u4=D0,f4=D0,h4=D0,m4=D0,p4=void 0,g4=void 0,b4=void 0,y4=D0,_4=2,w4=1,A4="/bin/usr/node",E4=9229,x4="node",R4=[],k4=D0,Et={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Et.now===void 0&&(G2=Date.now(),Et.timing&&Et.timing.navigationStart&&(G2=Et.timing.navigationStart),Et.now=()=>Date.now()-G2);var G2;function T4(){return Et.now()/1e3}var W2=1e9;function V2(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+=W2)),[i,n]}V2.bigint=function(r){var t=V2(r);return typeof BigInt>"u"?t[0]*W2+t[1]:BigInt(t[0]*W2)+BigInt(t[1])};var M4=10,S4={},C4=0;function xt(){return Q2}var P4=xt,B4=xt,I4=xt,z4=xt,H4=xt,O4=D0,L4=xt,D4=xt;function F4(r){return[]}var Q2={version:H8,versions:O8,arch:C8,platform:P8,release:W8,_rawDebug:V8,moduleLoadList:N8,binding:D8,_linkedBinding:j8,_events:S4,_eventsCount:C4,_maxListeners:M4,on:xt,addListener:P4,once:B4,off:I4,removeListener:z4,removeAllListeners:H4,emit:O4,prependListener:L4,prependOnceListener:D4,listeners:F4,domain:Q8,_exiting:Y8,config:K8,dlopen:J8,uptime:T4,_getActiveRequests:q8,_getActiveHandles:Z8,reallyExit:X8,_kill:$8,cpuUsage:j2,resourceUsage:t4,memoryUsage:e4,kill:i4,exit:n4,openStdin:r4,allowedNodeEnvironmentFlags:s4,assert:o4,features:a4,_fatalExceptions:v4,setUncaughtExceptionCaptureCallback:l4,hasUncaughtExceptionCaptureCallback:c4,emitWarning:L8,nextTick:M8,_tickCallback:d4,_debugProcess:u4,_debugEnd:f4,_startProfilerIdleNotifier:h4,_stopProfilerIdleNotifier:m4,stdout:p4,stdin:b4,stderr:g4,abort:y4,umask:F8,chdir:G8,cwd:U8,env:B8,title:S8,argv:I8,execArgv:z8,pid:_4,ppid:w4,execPath:A4,debugPort:E4,hrtime:V2,argv0:x4,_preload_modules:R4,setSourceMapsEnabled:k4};var Y2={},W6=!1;function U4(){if(W6)return Y2;W6=!0;var r=Q2;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 v="",a=0,l=-1,c=0,d,m=0;m<=s.length;++m){if(m<s.length)d=s.charCodeAt(m);else{if(d===47)break;d=47}if(d===47){if(!(l===m-1||c===1))if(l!==m-1&&c===2){if(v.length<2||a!==2||v.charCodeAt(v.length-1)!==46||v.charCodeAt(v.length-2)!==46){if(v.length>2){var p=v.lastIndexOf("/");if(p!==v.length-1){p===-1?(v="",a=0):(v=v.slice(0,p),a=v.length-1-v.lastIndexOf("/")),l=m,c=0;continue}}else if(v.length===2||v.length===1){v="",a=0,l=m,c=0;continue}}o&&(v.length>0?v+="/..":v="..",a=2)}else v.length>0?v+="/"+s.slice(l+1,m):v=s.slice(l+1,m),a=m-l-1;l=m,c=0}else d===46&&c!==-1?++c:c=-1}return v}function i(s,o){var v=o.dir||o.root,a=o.base||(o.name||"")+(o.ext||"");return v?v===o.root?v+a:v+s+a:a}var n={resolve:function(){for(var o="",v=!1,a,l=arguments.length-1;l>=-1&&!v;l--){var c;l>=0?c=arguments[l]:(a===void 0&&(a=r.cwd()),c=a),t(c),c.length!==0&&(o=c+"/"+o,v=c.charCodeAt(0)===47)}return o=e(o,!v),v?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(t(o),o.length===0)return".";var v=o.charCodeAt(0)===47,a=o.charCodeAt(o.length-1)===47;return o=e(o,!v),o.length===0&&!v&&(o="."),o.length>0&&a&&(o+="/"),v?"/"+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,v=0;v<arguments.length;++v){var a=arguments[v];t(a),a.length>0&&(o===void 0?o=a:o+="/"+a)}return o===void 0?".":n.normalize(o)},relative:function(o,v){if(t(o),t(v),o===v||(o=n.resolve(o),v=n.resolve(v),o===v))return"";for(var a=1;a<o.length&&o.charCodeAt(a)===47;++a);for(var l=o.length,c=l-a,d=1;d<v.length&&v.charCodeAt(d)===47;++d);for(var m=v.length,p=m-d,g=c<p?c:p,y=-1,E=0;E<=g;++E){if(E===g){if(p>g){if(v.charCodeAt(d+E)===47)return v.slice(d+E+1);if(E===0)return v.slice(d+E)}else c>g&&(o.charCodeAt(a+E)===47?y=E:E===0&&(y=0));break}var _=o.charCodeAt(a+E),A=v.charCodeAt(d+E);if(_!==A)break;_===47&&(y=E)}var C="";for(E=a+y+1;E<=l;++E)(E===l||o.charCodeAt(E)===47)&&(C.length===0?C+="..":C+="/..");return C.length>0?C+v.slice(d+y):(d+=y,v.charCodeAt(d)===47&&++d,v.slice(d))},_makeLong:function(o){return o},dirname:function(o){if(t(o),o.length===0)return".";for(var v=o.charCodeAt(0),a=v===47,l=-1,c=!0,d=o.length-1;d>=1;--d)if(v=o.charCodeAt(d),v===47){if(!c){l=d;break}}else c=!1;return l===-1?a?"/":".":a&&l===1?"//":o.slice(0,l)},basename:function(o,v){if(v!==void 0&&typeof v!="string")throw new TypeError('"ext" argument must be a string');t(o);var a=0,l=-1,c=!0,d;if(v!==void 0&&v.length>0&&v.length<=o.length){if(v.length===o.length&&v===o)return"";var m=v.length-1,p=-1;for(d=o.length-1;d>=0;--d){var g=o.charCodeAt(d);if(g===47){if(!c){a=d+1;break}}else p===-1&&(c=!1,p=d+1),m>=0&&(g===v.charCodeAt(m)?--m===-1&&(l=d):(m=-1,l=p))}return a===l?l=p:l===-1&&(l=o.length),o.slice(a,l)}else{for(d=o.length-1;d>=0;--d)if(o.charCodeAt(d)===47){if(!c){a=d+1;break}}else l===-1&&(c=!1,l=d+1);return l===-1?"":o.slice(a,l)}},extname:function(o){t(o);for(var v=-1,a=0,l=-1,c=!0,d=0,m=o.length-1;m>=0;--m){var p=o.charCodeAt(m);if(p===47){if(!c){a=m+1;break}continue}l===-1&&(c=!1,l=m+1),p===46?v===-1?v=m:d!==1&&(d=1):v!==-1&&(d=-1)}return v===-1||l===-1||d===0||d===1&&v===l-1&&v===a+1?"":o.slice(v,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 v={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return v;var a=o.charCodeAt(0),l=a===47,c;l?(v.root="/",c=1):c=0;for(var d=-1,m=0,p=-1,g=!0,y=o.length-1,E=0;y>=c;--y){if(a=o.charCodeAt(y),a===47){if(!g){m=y+1;break}continue}p===-1&&(g=!1,p=y+1),a===46?d===-1?d=y:E!==1&&(E=1):d!==-1&&(E=-1)}return d===-1||p===-1||E===0||E===1&&d===p-1&&d===m+1?p!==-1&&(m===0&&l?v.base=v.name=o.slice(1,p):v.base=v.name=o.slice(m,p)):(m===0&&l?(v.name=o.slice(1,d),v.base=o.slice(1,p)):(v.name=o.slice(m,d),v.base=o.slice(m,p)),v.ext=o.slice(d,p)),m>0?v.dir=o.slice(0,m-1):l&&(v.dir="/"),v},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,Y2=n,Y2}var F0=U4();var JE=F0._makeLong,qE=F0.basename,ZE=F0.delimiter,XE=F0.dirname,$E=F0.extname,tx=F0.format,ex=F0.isAbsolute,K2=F0.join,ix=F0.normalize,nx=F0.parse,rx=F0.posix,sx=F0.relative,ox=F0.resolve,ax=F0.sep,vx=F0.win32;import*as a0 from"three";R();k();M();T();import G4 from"prismarine-world";import W4 from"prismarine-chunk";var V6=r=>{let t=G4(r),e=W4(r),i=new t(r).sync,n=V4(i);for(let s of n)if(s.startsWith("set")&&s!=="setColumn"){let o=i[s].bind(i);i[s]=(...v)=>{let a=v[0];a.x!==void 0&&!i.getColumnAt(a)&&i.setColumn(Math.floor(a.x/16),Math.floor(a.z/16),new e(void 0)),o(...v)}}return i};function V4(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 j6}from"vec3";R();k();M();T();var N6="1.21.4";var J2=new Date,Q6=J2.getMonth()===11&&J2.getDate()>=24&&J2.getDate()<=26,N4=["panorama_3.webp","panorama_1.webp","panorama_4.webp","panorama_5.webp","panorama_0.webp","panorama_2.webp"],h1=class{constructor(t,e,i=!1){this.documentRenderer=t;this.options=e;this.doWorldBlocksPanorama=i;h(this,"camera");h(this,"scene");h(this,"ambientLight");h(this,"directionalLight");h(this,"panoramaGroup",null);h(this,"time",0);h(this,"abortController",new AbortController);h(this,"worldRenderer");h(this,"WorldRendererClass",Kt);h(this,"startTimes",new Map);this.scene=new a0.Scene,this.scene.background=new a0.Color(3294568),this.ambientLight=new a0.AmbientLight(13421772),this.scene.add(this.ambientLight),this.directionalLight=new a0.DirectionalLight(16777215,.5),this.directionalLight.position.set(1,1,.5).normalize(),this.directionalLight.castShadow=!0,this.scene.add(this.directionalLight),this.camera=new a0.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 bt(K2("background","panorama_0.webp")),e=new a0.Mesh(new a0.PlaneGeometry(1e3,1e3),new a0.MeshBasicMaterial({map:t}));e.position.set(0,0,-500),e.rotation.set(0,0,0),this.scene.add(e)}addClassicPanorama(){let t=new a0.BoxGeometry(1e3,1e3,1e3),e=[],i=200;for(let o of N4)(async()=>{let{texture:a}=M5(K2("background",Q6?"christmas":"",o));a.matrixAutoUpdate=!1,a.matrix.set(-1,0,1,0,1,0,0,0,1),a.wrapS=a0.ClampToEdgeWrapping,a.wrapT=a0.ClampToEdgeWrapping,a.minFilter=a0.LinearFilter,a.magFilter=a0.LinearFilter;let l=new a0.MeshBasicMaterial({map:a,transparent:!0,side:a0.DoubleSide,depthWrite:!1,opacity:0});this.startTimes.set(l,Date.now()),e.push(l)})();let n=new a0.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 v=this.startTimes.get(o);if(v){let a=Date.now()-v,l=Math.min(1,a/i);o.opacity=l}}};let s=new a0.Object3D;if(s.add(n),!Q6)for(let o=0;o<20;o++){let v=new ht("1.16.4","squid").mesh;v.position.set(Math.random()*30-15,Math.random()*20-10,Math.random()*10-17),v.rotation.set(0,Math.PI+Math.random(),-Math.PI/4,"ZYX");let a=Math.random()*.01;v.children[0].onBeforeRender=()=>{v.rotation.y+=a,v.rotation.z=Math.cos(n.rotation.y*3)*Math.PI/4-Math.PI/2},s.add(v)}this.scene.add(s),this.panoramaGroup=s}async worldBlocksPanorama(){let t=N6,e=new lt;if(e.currentConfig={version:t,noInventoryGui:!0},await e.updateAssetsData?.({}),this.abortController.signal.aborted)return;let i=V6(t),s=is("prismarine-block")(t),v=globalThis.mcData.blocksArray.filter(_=>{if(!_.name.includes("stained_glass"))return!1;let A=s.fromStateId(_.defaultState,0);if(A.shapes?.length!==1)return!1;let C=A.shapes[0];return C[0]===0&&C[1]===0&&C[2]===0&&C[3]===1&&C[4]===1&&C[5]===1}),a=-15,l=100,c=100;for(let _=-l;_<l;_++)for(let A=-c;A<c;A++){let C=v[Math.floor(Math.random()*v.length)];i.setBlockStateId(new j6(_,A,a),C.defaultState)}this.camera.updateProjectionMatrix(),this.camera.position.set(.5,c/2+.5,.5),this.camera.rotation.set(0,0,0);let d=new j6(...this.camera.position.toArray()),m=new Ot(i,2,d);if(this.abortController.signal.aborted||(this.worldRenderer=new this.WorldRendererClass(this.documentRenderer.renderer,this.options,{version:t,worldView:m,inWorldRenderingConfig:Ce,playerStateReactive:E3().reactive,rendererState:Bt().reactive,nonReactiveState:Bt().nonReactive,resourcesManager:e}),this.worldRenderer instanceof Kt&&(this.scene=this.worldRenderer.scene),m.init(d),await this.worldRenderer.waitForChunksToRender(),this.abortController.signal.aborted))return;let{camera:p}=this,g=p.position.x,y=p.position.y,E;document.body.addEventListener("pointermove",_=>{if(_.pointerType!=="mouse")return;let A=new a0.Vector2(_.clientX,_.clientY),C=.2,x=A.x/window.innerWidth-.5,S=-(A.y/window.innerHeight-.5);E?.stop();let z={x:g+x*C,y:y+S*C};E=new S0(p.position).to(z,0),E.start(),p.updateProjectionMatrix()},{signal:this.abortController.signal})}dispose(){this.scene.clear(),this.worldRenderer?.destroy(),this.abortController.abort()}};o5.ColorManagement.enabled=!1;globalThis.THREE=o5;var Y6=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),async loadGeometryExport(t){let{applyWorldGeometryExport:e}=await Promise.resolve().then(()=>(I2(),R6));return e(r,t)}}),Q4=[],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)}},K6=()=>{let r,t=null,e=null,i=null,n=null,s=(c,d)=>{_0?r=_5(c,Q4,globalThis):r=c,t=new De(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 h1(t,c,!!L.env.SINGLE_FILE_BUILD_MODE),globalThis.panoramaRenderer=e,m1("panoramaCreated",e),await e.start(),m1("panoramaReady",e)}},v=async c=>{let m=_0?_5(c,[lt,Ht],globalThis):c;if(!t)throw new Error("Document renderer not initialized");t.nonReactiveState=m.nonReactiveState,globalThis.resourcesManager=m.resourcesManager,e&&(e.dispose(),e=null),i=new Kt(t.renderer,r,m),await i.worldReadyPromise,n=new w5(m.nonReactiveState),globalThis.frameTimingCollector=n;let p=t.render;t.render=function(g){p.call(this,g),n?.markFrameStart(),m.inWorldRenderingConfig.paused||i?.render(g),n?.markFrameEnd(),n?.markFrameDisplay()},t.inWorldRenderingConfig=m.inWorldRenderingConfig,globalThis.world=i,m1("worldReady",i)},a=()=>{e&&(e.dispose(),e=null),t&&t.dispose(),i&&(i.destroy(),i=null)},l={id:"threejs",displayName:`three.js ${o5.REVISION}`,startPanorama:o,startWorld:v,disconnect:a,setRendering(c){t.setPaused(!c),i&&(i.renderingActive=c)},getDebugOverlay:()=>({get entitiesString(){return i?.entities.getDebugString()},get left(){return{"Geo Memory":i?.worldBlockGeometry.getEstimatedMemoryUsage().readable??"-"}}}),updateCamera(c,d,m){n?.markCameraUpdate(!c),i?.setFirstPersonCamera(c,d,m)},get soundSystem(){return i?.soundSystem},get backendMethods(){if(i)return Y6(i)}};return{main:{init:s,backend:l},workerProxy(){return H3({init(c,d){s(c,{canvas:d})},updateSizeExternal(c,d,m){t?.updateSizeExternal(c,d,m)},startPanorama:o,startWorld:v,disconnect:a,setRendering:l.setRendering,updateCamera(c,d,m){let p=c?new j4(c.x,c.y,c.z):null;n?.markCameraUpdate(!p),l.updateCamera(p,d,m)},async callBackendMethod(c,...d){if(!i)throw new Error("World renderer not initialized");let p=Y6(i)[c];if(!p)throw new Error(`Backend method ${String(c)} is unavailable`);return p(...d)}})}}};var p1=r=>{let{main:t}=K6();return t.init(r),t.backend};p1.id="threejs";p1.displayName="three.js Blocking";p1.description="Simple, old and stable main thread graphics backend providing balanced performance on top of WebGL2.";R();k();M();T();import*as J6 from"three";function Y4(r){let t="threeWorker.js",e;if(L.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 g1=async r=>{let t=Y4(()=>{}),e=O3(t),i=C1();i.onSizeChanged((v,a)=>{e.updateSizeExternal(v,a,window.devicePixelRatio||1)});let n=y5(r,t);try{e.init(n,i.canvas)}catch(v){throw ze(n),v}let s=new Proxy({},{get(v,a){if(typeof a=="string")return async(...l)=>e.callBackendMethod(a,...l)}});return{id:"threejs",displayName:`three.js ${J6.REVISION}`,async startPanorama(){},async startWorld(v){let a={...Le,items:"itemsArray",entities:"entitiesArray"};W1([t],v.version,a,v.resourcesManager.currentResources.mcData),v.inWorldRenderingConfig.__syncToWorker=!0,v.playerStateReactive&&(v.playerStateReactive.__syncToWorker=!0),v.rendererState&&(v.rendererState.__syncFromWorker=!0),v.nonReactiveState&&(v.nonReactiveState.__syncFromWorker=!0),v.nonReactiveState.__syncFromWorkerInterval=200;let l=y5(v,t);try{await e.startWorld(structuredClone(l))}catch(d){throw ze(l),d}e.updateSizeExternal(i.size.width,i.size.height,window.devicePixelRatio||1);let c=ie("fps");setInterval(()=>{let{fps:d,avgRenderTime:m,worstRenderTime:p}=v.nonReactiveState;c.updateText(`FPS: ${d.toFixed(0)} (${m.toFixed(0)}ms/${p.toFixed(0)}ms)`),v.nonReactiveState.fps=0},1e3)},disconnect(){i.destroy(),e.disconnect(),t.terminate()},setRendering(v){e.setRendering(v)},updateCamera(v,a,l){e.updateCamera(v?{x:v.x,y:v.y,z:v.z}:null,a,l)},soundSystem:void 0,backendMethods:s}};g1.id="threejs-off-thread";g1.displayName="three.js Multi-thread";g1.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{M3 as AppViewer,De as DocumentRenderer,te as LoadedResourcesTransferrable,lt as ResourcesManager,Ot as WorldView,Ht as WorldViewWorker,C1 as addCanvasForWorker,$t as chunkPos,g1 as createGraphicsBackendOffThread,p1 as createGraphicsBackendSingleThread,xv as createWorldRendererConfig,w3 as defaultGraphicsBackendConfig,Ce as defaultWorldRendererConfig,R3 as delayedIterator,Bt as getDefaultRendererState,S3 as getInitialPlayerState,Rs as getInitialPlayerStateRenderer,xs as getPlayerStateUtils,_0 as isWebWorker,ls as sectionPos};
21237
21237
  /*! Bundled license information:
21238
21238
 
21239
21239
  @jspm/core/nodelibs/browser/chunk-DtuTasat.js: