diff --git a/404.html b/404.html index 81e166a3..ccfb11a2 100644 --- a/404.html +++ b/404.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/advancement/index.html b/advancement/index.html index f17dbdba..ed5ddcde 100644 --- a/advancement/index.html +++ b/advancement/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/assets/blockstate/index.html b/assets/blockstate/index.html index 7fe72842..d98b3f52 100644 --- a/assets/blockstate/index.html +++ b/assets/blockstate/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/assets/index.37e720ee.js b/assets/index.37e720ee.js new file mode 100644 index 00000000..eaeaf8b0 --- /dev/null +++ b/assets/index.37e720ee.js @@ -0,0 +1,2 @@ +var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,i=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&s(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&s(e,n,t[n]);return e},l=(e,o)=>t(e,n(o));import{y as c,a as d,r as u,l as h,g as p,b as m,s as f,c as v,d as g,e as w,f as _,j as y,h as b,i as x,k,m as C,n as M,o as A,q as I,A as z,F as $,p as j,t as E,u as S,C as O,v as L,I as P,w as D,x as V,z as N,B as T,_ as B,X as H,D as F,E as R,G as J,H as W,J as U,K as G,L as Y,M as q,N as K,O as Z,P as X,Q,R as ee,Z as te,S as ne,T as oe,U as re,V as ae,W as se,Y as ie,$ as le,a0 as ce,a1 as de,a2 as ue,a3 as he}from"./vendor.273f4765.js";var pe;function me({type:e,id:t}){return c((()=>{var e;null==(e=document.getElementById("ad-placeholder"))||e.remove(),"ethicalads"in window&ðicalads.load()}),[]),d("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function fe({icon:e,label:t,active:n,class:o,tooltip:r,tooltipLoc:a,onClick:s}){return d("div",{class:`btn${n?" active":""}${o?` ${o}`:""}${r?` tooltipped tip-${null!=a?a:"sw"}`:""}${n?" tip-shown":""}`,onClick:s,"aria-label":r},e&&Je[e],t&&d("span",null,t))}!function(e){const t="Site",n="Generator";function o(e,t,n){ga("send","event",e,t,n)}function r(e,t){ga("set",`dimension${e}`,t)}e.pageview=function(e){ga("set","page",e),ga("send","pageview")},e.setLanguage=function(e){r(4,e),o(t,"set-language",e)},e.setTheme=function(e){r(1,e),o(t,"set-theme",e)},e.setVersion=function(e){r(3,e),o(n,"set-version",e)},e.setPreview=function(e){r(5,e),o(n,"set-preview",e)},e.setGenerator=function(e){r(6,e)},e.setPrefersColorScheme=function(e){r(7,e)},e.generatorEvent=function(e,t){o(n,e,t)}}(pe||(pe={}));var ve=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"es","name":"Español"},{"code":"fr","name":"Français"},{"code":"it","name":"Italiano"},{"code":"ja","name":"日本語"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Português"},{"code":"ru","name":"Русский"},{"code":"sk","name":"Slovenčina","schemas":false},{"code":"zh-cn","name":"简体中文"},{"code":"zh-tw","name":"正體中文"}],"versions":[{"id":"1.15","ref":"1.15.2"},{"id":"1.16","ref":"1.16.5"},{"id":"1.17","ref":"1.17.1"},{"id":"1.18","ref":"1.18.1"},{"id":"1.18.2","ref":"1.18.2"},{"id":"1.19","dynamic":true}],"generators":[{"id":"loot_table","url":"loot-table","path":"loot_tables","schema":"loot_table"},{"id":"predicate","url":"predicate","path":"predicates","schema":"predicate"},{"id":"item_modifier","url":"item-modifier","path":"item_modifiers","schema":"item_modifier","minVersion":"1.17"},{"id":"advancement","url":"advancement","path":"advancements","schema":"advancement"},{"id":"recipe","url":"recipe","path":"recipes","schema":"recipe"},{"id":"text_component","url":"text-component","schema":"text_component"},{"id":"dimension","url":"dimension","schema":"dimension","category":"worldgen","minVersion":"1.16"},{"id":"dimension_type","url":"dimension-type","schema":"dimension_type","category":"worldgen","minVersion":"1.16"},{"id":"world","url":"world","schema":"world_settings","category":"worldgen","minVersion":"1.16"},{"id":"worldgen/biome","url":"worldgen/biome","category":"worldgen","schema":"biome","minVersion":"1.16"},{"id":"worldgen/configured_carver","url":"worldgen/carver","category":"worldgen","schema":"configured_carver","minVersion":"1.16"},{"id":"worldgen/configured_feature","url":"worldgen/feature","category":"worldgen","schema":"configured_feature","minVersion":"1.16"},{"id":"worldgen/density_function","url":"worldgen/density-function","category":"worldgen","schema":"density_function","minVersion":"1.18.2"},{"id":"worldgen/placed_feature","url":"worldgen/placed-feature","category":"worldgen","schema":"placed_feature","minVersion":"1.18"},{"id":"worldgen/noise","url":"worldgen/noise","category":"worldgen","schema":"noise_parameters","minVersion":"1.18"},{"id":"worldgen/noise_settings","url":"worldgen/noise-settings","category":"worldgen","schema":"noise_settings","minVersion":"1.16"},{"id":"worldgen/configured_structure_feature","url":"worldgen/structure-feature","category":"worldgen","schema":"configured_structure_feature","minVersion":"1.16","maxVersion":"1.18.2"},{"id":"worldgen/structure","url":"worldgen/structure","category":"worldgen","schema":"structure","minVersion":"1.19"},{"id":"worldgen/structure_set","url":"worldgen/structure-set","category":"worldgen","schema":"structure_set","minVersion":"1.18.2"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16","maxVersion":"1.17"},{"id":"worldgen/processor_list","url":"worldgen/processor-list","category":"worldgen","schema":"processor_list","minVersion":"1.16"},{"id":"worldgen/template_pool","url":"worldgen/template-pool","category":"worldgen","schema":"template_pool","minVersion":"1.16"},{"id":"worldgen/world_preset","url":"worldgen/world-preset","category":"worldgen","schema":"world_preset","minVersion":"1.19"},{"id":"worldgen/flat_level_generator_preset","url":"worldgen/flat-world-preset","category":"worldgen","schema":"flat_level_generator_preset","minVersion":"1.19"},{"id":"block_definition","url":"assets/blockstate","path":"blockstates","category":"assets","schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","category":"assets","schema":"model"}]}');function ge(e){return"object"==typeof e&&null!==e}const we=e=>("0"+e.toString(16)).substr(-2);function _e(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,we).join("")}function ye(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function be(e){const t=Math.floor(4294967296*Math.random())-2147483648,n=e.get(new h.Path(["dimensions"]));e.set(new h.Path(["seed"]),t,!0),ge(n)&&Object.keys(n).forEach((n=>{e.set(new h.Path(["dimensions",n,"generator","seed"]),t,!0),e.set(new h.Path(["dimensions",n,"generator","biome_source","seed"]),t,!0)})),e.set(new h.Path(["placement","salt"]),Math.abs(t),!0),e.set(new h.Path(["generator","seed"]),t,!0),e.set(new h.Path(["generator","biome_source","seed"]),t)}function xe(e){let t=0;for(let n=0;n=0&&(e=e.slice(0,t)),ke(e)}function Me(e){const t=Ce(e).replace(/^\//,"").replace(/\/$/,"");return ve.generators.find((e=>e.url===t))}function Ae(e){const t=e.indexOf("?");return t>=0?(e=e.slice(t+1),new Map(e.split("&").map((e=>{const t=e.indexOf("=");return-1===t?[e,"true"]:[decodeURIComponent(e.slice(0,t)),decodeURIComponent(e.slice(t+1))]})))):new Map}function Ie(e,t){const n=p(),o=Ae(n);Object.entries(e).forEach((([e,t])=>{void 0===t?o.delete(e):o.set(e,t)}));const r=Array.from(o).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t).replaceAll("%2F","/")}`));m(`${t?ke(t):Ce(n)}${0===r.length?"":`?${r.join("&")}`}`,!0)}function ze(e){const t=Math.abs(xe(e));return[t%256,(t>>8)%256,(t>>16)%256]}function $e(e){return e*e}function je(e,t,n){return Math.max(e,Math.min(t,n))}function Ee(e,t,n){return n<0?e:n>1?t:Se(n,e,t)}function Se(e,t,n){return t+e*(n-t)}function Oe(e){return e instanceof Error?e.message:`${e}`}const Le=u();function Pe(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=0;o{}:e=>{const t=e.target.value;null==l||l(t)},h=f(null);c((()=>{r&&h.current&&h.current.select()}),[r]);const p=i&&_e();return d("div",{class:`btn btn-input ${n?"large-input":""} ${o?"larger-input":""}`,onClick:e=>e.stopPropagation()},e&&Je[e],t&&d("span",null,t),d("input",{ref:h,type:"text",value:a,onChange:u,placeholder:s,list:p}),i&&d("datalist",{id:p},i.map((e=>d("option",{value:e})))))}function Ne({cooldown:e,invert:t,initial:n}={}){const[o,r]=v(n),a=f(void 0);return[o,()=>{r(!t),void 0!==a.current&&clearTimeout(a.current),a.current=setTimeout((()=>{r(!!t)}),null!=e?e:2e3)}]}function Te({size:e,draw:t,onDrag:n,onHover:o,onLeave:r},a){const s=f(null),i=f(),l=f(),d=f([0,0]),u=f(!1);c((()=>{const e=e=>{i.current=[e.offsetX,e.offsetY]},t=e=>{if(void 0===i.current){const t=e.offsetX/s.current.clientWidth,n=e.offsetY/s.current.clientHeight;return void(null==o||o(t,n))}if(!n)return;const t=e.offsetX-i.current[0],r=e.offsetY-i.current[1];0===t&&0===r||(d.current=[d.current[0]+t,d.current[1]+r],u.current||(cancelAnimationFrame(l.current),l.current=requestAnimationFrame((async()=>{u.current=!0;const e=d.current[0]/s.current.clientWidth,t=d.current[1]/s.current.clientHeight;d.current=[0,0],await(null==n?void 0:n(e,t)),u.current=!1})))),i.current=[e.offsetX,e.offsetY]},a=()=>{i.current=void 0},c=()=>{null==r||r()};return s.current.addEventListener("mousedown",e),s.current.addEventListener("mousemove",t),s.current.addEventListener("mouseleave",c),document.body.addEventListener("mouseup",a),()=>{var n,o,r;null==(n=s.current)||n.removeEventListener("mousedown",e),null==(o=s.current)||o.removeEventListener("mousemove",t),null==(r=s.current)||r.removeEventListener("mouseleave",c),document.body.removeEventListener("mouseup",a)}}),[...null!=a?a:[],s.current]);const h=f(),p=f(0);return h.current=async()=>{const n=s.current.getContext("2d"),o=e();s.current.width=o[0],s.current.height=o[1];const r=n.getImageData(0,0,o[0],o[1]),a=p.current+=1;try{await t(r)}catch(i){throw i}a===p.current&&n.putImageData(r,0,0)},{canvas:s,redraw:h.current}}function Be(){const[e,t]=v(!1),n=()=>{t(!1)};return c((()=>(e&&(document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n)),()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n)})),[e]),[e,()=>t(!0)]}function He(e){const[t,n]=v(matchMedia(e).matches),o=e=>{n(e.matches)};return c((()=>{const t=matchMedia(e);return t.addEventListener("change",o),()=>{t.removeEventListener("change",o)}}),[e]),t}function Fe(e,t,n){const o={invalidated(){e&&t(e)}};c((()=>(null==e||e.addListener(o),()=>{null==e||e.removeListener(o)})),[e,...null!=n?n:[]])}function Re(e){const{icon:t,label:n,relative:o,tooltip:r,tooltipLoc:a,children:s}=e,[c,u]=Be();return d("div",i({class:"btn-menu"+(!1===o?" no-relative":"")},e),d(fe,l(i({},{icon:t,label:n,tooltip:r,tooltipLoc:a}),{onClick:u})),c&&d("div",{class:"btn-group"},s))}const Je={alert:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"})),archive:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.75 2.5a.25.25 0 00-.25.25v1.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25H1.75zM0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v1.5A1.75 1.75 0 0114.25 6H1.75A1.75 1.75 0 010 4.25v-1.5zM1.75 7a.75.75 0 01.75.75v5.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-5.5a.75.75 0 111.5 0v5.5A1.75 1.75 0 0113.25 15H2.75A1.75 1.75 0 011 13.25v-5.5A.75.75 0 011.75 7zm4.5 1a.75.75 0 000 1.5h3.5a.75.75 0 100-1.5h-3.5z"})),arrow_left:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z"})),arrow_right:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z"})),check:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})),chevron_down:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z"})),chevron_right:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})),chevron_up:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M3.22 9.78a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L8 6.06 4.28 9.78a.75.75 0 01-1.06 0z"})),clippy:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"})),code:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"})),dash:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M2 8a.75.75 0 01.75-.75h10.5a.75.75 0 010 1.5H2.75A.75.75 0 012 8z"})),device_desktop:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z"})),dot_fill:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})),duplicate:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{d:"M10.5 3a.75.75 0 01.75.75v1h1a.75.75 0 010 1.5h-1v1a.75.75 0 01-1.5 0v-1h-1a.75.75 0 010-1.5h1v-1A.75.75 0 0110.5 3z"}),d("path",{"fill-rule":"evenodd",d:"M6.75 0A1.75 1.75 0 005 1.75v7.5c0 .966.784 1.75 1.75 1.75h7.5A1.75 1.75 0 0016 9.25v-7.5A1.75 1.75 0 0014.25 0h-7.5zM6.5 1.75a.25.25 0 01.25-.25h7.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5z"}),d("path",{d:"M1.75 5A1.75 1.75 0 000 6.75v7.5C0 15.216.784 16 1.75 16h7.5A1.75 1.75 0 0011 14.25v-1.5a.75.75 0 00-1.5 0v1.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25h1.5a.75.75 0 000-1.5h-1.5z"})),eye:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"})),eye_closed:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M.143 2.31a.75.75 0 011.047-.167l14.5 10.5a.75.75 0 11-.88 1.214l-2.248-1.628C11.346 13.19 9.792 14 8 14c-1.981 0-3.67-.992-4.933-2.078C1.797 10.832.88 9.577.43 8.9a1.618 1.618 0 010-1.797c.353-.533.995-1.42 1.868-2.305L.31 3.357A.75.75 0 01.143 2.31zm3.386 3.378a14.21 14.21 0 00-1.85 2.244.12.12 0 00-.022.068c0 .021.006.045.022.068.412.621 1.242 1.75 2.366 2.717C5.175 11.758 6.527 12.5 8 12.5c1.195 0 2.31-.488 3.29-1.191L9.063 9.695A2 2 0 016.058 7.52l-2.53-1.832zM8 3.5c-.516 0-1.017.09-1.499.251a.75.75 0 11-.473-1.423A6.23 6.23 0 018 2c1.981 0 3.67.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.619 1.619 0 010 1.798c-.11.166-.248.365-.41.587a.75.75 0 11-1.21-.887c.148-.201.272-.382.371-.53a.119.119 0 000-.137c-.412-.621-1.242-1.75-2.366-2.717C10.825 4.242 9.473 3.5 8 3.5z"})),file:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"})),file_directory:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3h-6.5a.25.25 0 01-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z"})),gear:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.429 1.525a6.593 6.593 0 011.142 0c.036.003.108.036.137.146l.289 1.105c.147.56.55.967.997 1.189.174.086.341.183.501.29.417.278.97.423 1.53.27l1.102-.303c.11-.03.175.016.195.046.219.31.41.641.573.989.014.031.022.11-.059.19l-.815.806c-.411.406-.562.957-.53 1.456a4.588 4.588 0 010 .582c-.032.499.119 1.05.53 1.456l.815.806c.08.08.073.159.059.19a6.494 6.494 0 01-.573.99c-.02.029-.086.074-.195.045l-1.103-.303c-.559-.153-1.112-.008-1.529.27-.16.107-.327.204-.5.29-.449.222-.851.628-.998 1.189l-.289 1.105c-.029.11-.101.143-.137.146a6.613 6.613 0 01-1.142 0c-.036-.003-.108-.037-.137-.146l-.289-1.105c-.147-.56-.55-.967-.997-1.189a4.502 4.502 0 01-.501-.29c-.417-.278-.97-.423-1.53-.27l-1.102.303c-.11.03-.175-.016-.195-.046a6.492 6.492 0 01-.573-.989c-.014-.031-.022-.11.059-.19l.815-.806c.411-.406.562-.957.53-1.456a4.587 4.587 0 010-.582c.032-.499-.119-1.05-.53-1.456l-.815-.806c-.08-.08-.073-.159-.059-.19a6.44 6.44 0 01.573-.99c.02-.029.086-.075.195-.045l1.103.303c.559.153 1.112.008 1.529-.27.16-.107.327-.204.5-.29.449-.222.851-.628.998-1.189l.289-1.105c.029-.11.101-.143.137-.146zM8 0c-.236 0-.47.01-.701.03-.743.065-1.29.615-1.458 1.261l-.29 1.106c-.017.066-.078.158-.211.224a5.994 5.994 0 00-.668.386c-.123.082-.233.09-.3.071L3.27 2.776c-.644-.177-1.392.02-1.82.63a7.977 7.977 0 00-.704 1.217c-.315.675-.111 1.422.363 1.891l.815.806c.05.048.098.147.088.294a6.084 6.084 0 000 .772c.01.147-.038.246-.088.294l-.815.806c-.474.469-.678 1.216-.363 1.891.2.428.436.835.704 1.218.428.609 1.176.806 1.82.63l1.103-.303c.066-.019.176-.011.299.071.213.143.436.272.668.386.133.066.194.158.212.224l.289 1.106c.169.646.715 1.196 1.458 1.26a8.094 8.094 0 001.402 0c.743-.064 1.29-.614 1.458-1.26l.29-1.106c.017-.066.078-.158.211-.224a5.98 5.98 0 00.668-.386c.123-.082.233-.09.3-.071l1.102.302c.644.177 1.392-.02 1.82-.63.268-.382.505-.789.704-1.217.315-.675.111-1.422-.364-1.891l-.814-.806c-.05-.048-.098-.147-.088-.294a6.1 6.1 0 000-.772c-.01-.147.039-.246.088-.294l.814-.806c.475-.469.679-1.216.364-1.891a7.992 7.992 0 00-.704-1.218c-.428-.609-1.176-.806-1.82-.63l-1.103.303c-.066.019-.176.011-.299-.071a5.991 5.991 0 00-.668-.386c-.133-.066-.194-.158-.212-.224L10.16 1.29C9.99.645 9.444.095 8.701.031A8.094 8.094 0 008 0zm1.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM11 8a3 3 0 11-6 0 3 3 0 016 0z"})),globe:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"})),history:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"})),info:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"})),issue_opened:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"})),kebab_horizontal:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{d:"M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})),link:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"})),link_external:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z"})),mark_github:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})),moon:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z"})),play:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z"})),plus:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z"})),plus_circle:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.75 4.75a.75.75 0 00-1.5 0v2.5h-2.5a.75.75 0 000 1.5h2.5v2.5a.75.75 0 001.5 0v-2.5h2.5a.75.75 0 000-1.5h-2.5v-2.5z"})),repo:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"})),search:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"})),sort_asc:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75zm12.927-9.677a.25.25 0 00-.354 0l-3 3A.25.25 0 009.75 6H12v6.75a.75.75 0 001.5 0V6h2.25a.25.25 0 00.177-.427l-3-3z"})),sort_desc:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75z"}),d("path",{d:"M13.5 10h2.25a.25.25 0 01.177.427l-3 3a.25.25 0 01-.354 0l-3-3A.25.25 0 019.75 10H12V3.75a.75.75 0 011.5 0V10z"})),square:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M4 5.75C4 4.784 4.784 4 5.75 4h4.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0110.25 12h-4.5A1.75 1.75 0 014 10.25v-4.5zm1.75-.25a.25.25 0 00-.25.25v4.5c0 .138.112.25.25.25h4.5a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-4.5z"})),square_fill:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M5.75 4A1.75 1.75 0 004 5.75v4.5c0 .966.784 1.75 1.75 1.75h4.5A1.75 1.75 0 0012 10.25v-4.5A1.75 1.75 0 0010.25 4h-4.5z"})),stack:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.122.392a1.75 1.75 0 011.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 01-1.756 0L2.119 5.456a1.25 1.25 0 010-2.162L7.122.392zM8.125 1.69a.25.25 0 00-.25 0l-4.63 2.685 4.63 2.685a.25.25 0 00.25 0l4.63-2.685-4.63-2.685zM1.601 7.789a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0L1.874 8.814A.75.75 0 011.6 7.789zm0 3.5a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0l-5.248-3.044a.75.75 0 01-.273-1.025z"})),sun:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 10.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zM8 12a4 4 0 100-8 4 4 0 000 8zM8 0a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0V.75A.75.75 0 018 0zm0 13a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 018 13zM2.343 2.343a.75.75 0 011.061 0l1.06 1.061a.75.75 0 01-1.06 1.06l-1.06-1.06a.75.75 0 010-1.06zm9.193 9.193a.75.75 0 011.06 0l1.061 1.06a.75.75 0 01-1.06 1.061l-1.061-1.06a.75.75 0 010-1.061zM16 8a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0116 8zM3 8a.75.75 0 01-.75.75H.75a.75.75 0 010-1.5h1.5A.75.75 0 013 8zm10.657-5.657a.75.75 0 010 1.061l-1.061 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm-9.193 9.193a.75.75 0 010 1.06l-1.06 1.061a.75.75 0 11-1.061-1.06l1.06-1.061a.75.75 0 011.061 0z"})),sync:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 2.5a5.487 5.487 0 00-4.131 1.869l1.204 1.204A.25.25 0 014.896 6H1.25A.25.25 0 011 5.75V2.104a.25.25 0 01.427-.177l1.38 1.38A7.001 7.001 0 0114.95 7.16a.75.75 0 11-1.49.178A5.501 5.501 0 008 2.5zM1.705 8.005a.75.75 0 01.834.656 5.501 5.501 0 009.592 2.97l-1.204-1.204a.25.25 0 01.177-.427h3.646a.25.25 0 01.25.25v3.646a.25.25 0 01-.427.177l-1.38-1.38A7.001 7.001 0 011.05 8.84a.75.75 0 01.656-.834z"})),tag:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"})),terminal:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75zm1.75-.25a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V2.75a.25.25 0 00-.25-.25H1.75zM7.25 8a.75.75 0 01-.22.53l-2.25 2.25a.75.75 0 11-1.06-1.06L5.44 8 3.72 6.28a.75.75 0 111.06-1.06l2.25 2.25c.141.14.22.331.22.53zm1.5 1.5a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z"})),three_bars:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"})),trashcan:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z"})),unfold:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{d:"M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z"})),upload:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8.53 1.22a.75.75 0 00-1.06 0L3.72 4.97a.75.75 0 001.06 1.06l2.47-2.47v6.69a.75.75 0 001.5 0V3.56l2.47 2.47a.75.75 0 101.06-1.06L8.53 1.22zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})),x:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})),x_circle:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M3.404 12.596a6.5 6.5 0 119.192-9.192 6.5 6.5 0 01-9.192 9.192zM2.344 2.343a8 8 0 1011.313 11.314A8 8 0 002.343 2.343zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z"}))};function We({error:e,onDismiss:t}){const[n,o]=v(!1),[r,a]=v(void 0);c((()=>{if(e instanceof Error){const t=e.stack.split("\n").map((e=>e.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)")));a(t.join("\n")),g.exports.mapStackTrace(t.join("\n"),(e=>{const t=e.map((e=>e.replace(/..\/..\/src\//,"src/"))).join("\n");a(t)}))}}),[e]);const s=w((()=>{let t="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(t+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,r&&(t+=`&body=${encodeURIComponent(`\`\`\`\n${e.name}: ${e.message}\n${r}\n\`\`\`\n`)}`)):t+=`?title=${encodeURIComponent(e.toString())}`,t}),[e,r]);return d("div",{class:"error"},t&&d("div",{class:"error-dismiss",onClick:t},Je.x),d("h3",null,e instanceof Error?e.message:e,r&&d("span",{onClick:()=>o(!n)},Je.info)),r&&n&&d("pre",null,r),d("p",null,"If you think this is a bug, you can report it ",d("a",{href:s,target:"_blank"},"on GitHub")))}function Ue({label:e,value:t,onChange:n}){const o=_e();return d("label",{class:"checkbox"},d("input",{id:o,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function Ge(e,t,n){const o=e=>{const o=e.onChange&&(t=>{var o;const r=t.target.value;null==(o=e.onChange)||o.call(e,n(r))}),r=e.onEnter&&(t=>{var o;if("Enter"===t.key){const r=t.target.value;null==(o=e.onEnter)||o.call(e,n(r))}});return d("input",i(i({},e),{type:t,onChange:o,onKeyDown:r}))};return o.displayName=e,o}const Ye=Ge("TextInput","text",(e=>e)),qe=Ge("NumberInput","number",(e=>Number(e))),Ke=Ge("RangeInput","range",(e=>Number(e)));function Ze({values:e,onSelect:t,searchPlaceholder:n,noResults:o}){const[r,a]=v(""),s=w((()=>{var t;const n=r.trim().split(" ");return null!=(t=null==e?void 0:e.filter((e=>n.every((t=>e.includes(t))))))?t:[]}),[e,r]);return d(_,null,d(Ve,{icon:"search",large:!0,value:r,onChange:a,doSelect:1,placeholder:null!=n?n:"Search"}),d("div",{class:"result-list"},s.map((e=>d(fe,{key:e,label:e,onClick:()=>null==t?void 0:t(e)}))),0===s.length&&d(fe,{label:null!=o?o:"No results"})))}const Xe="https://raw.githubusercontent.com/misode/technical-changes/main";let Qe=null;async function et(){if(!Qe){const e=await(await fetch(`${Xe}/index.json`)).json();Qe=(await Promise.all(e.map(((e,t)=>async function(e,t){const n=await(await fetch(`${Xe}/${e.id}/index.json`)).json();return(await Promise.all(n.map(((n,o)=>async function(e,t,n,o){return function(e){return e.split("\n\n").map((e=>{const t=e.indexOf("|");return{tags:e.substring(0,t).trim().split(" "),content:e.slice(t+1).trim().replaceAll("->","→").replaceAll("\n...\n","\n\n")}}))}(await(await fetch(`${Xe}/${e.id}/${t.id}.md`)).text()).map((r=>i({version:t,group:e,order:1e3*n+o},r)))}(e,tt(n),t,o))))).flat()}(tt(e),t))))).flat().map((e=>l(i({},e),{tags:[e.group.id,...e.tags]})))}return Qe}function tt(e){return"string"==typeof e?{id:e,article:e.match(/\d\dw\d\d[a-z]/)?"minecraft-snapshot-"+e:e.match(/\d+\.\d+(\.\d+)?-pre[0-9]+/)?"minecraft-"+e.replaceAll(".","-").replaceAll("pre","pre-release-"):null}:ge(e)?e:{id:"unknown",article:null}}["1.15","1.16","1.17"].forEach((e=>localStorage.removeItem(`cache_${e}`))),["mcdata_master","vanilla_datapack_summary"].forEach((e=>localStorage.removeItem(`cached_${e}`))),caches.delete("misode-v1");const nt="https://raw.githubusercontent.com/misode/mcmeta";function ot(e,t){return`${nt}/${e.dynamic?t:`${e.ref}-${t}`}`}async function rt(e){e.dynamic&&("22w15a"!==localStorage.getItem("cached_latest_version")&&(await async function(e){try{const t=await caches.open("misode-v2");console.debug("[deleteMatching] Opened cache misode-v2");const n=[];for(const o of await t.keys())e(o.url)&&n.push(t.delete(o));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache misode-v2: ${Oe(t)}`)}}((e=>e.startsWith(`${nt}/summary/`)||e.startsWith(`${nt}/data/`)||e.startsWith(`${nt}/assets/`)||e.startsWith(`${nt}/registries/`))),localStorage.setItem("cached_latest_version","22w15a")),e.ref="22w15a")}async function at(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await lt(`${ot(e,"summary")}/registries/data.min.json`);for(const e in n)t.register(e,n[e].map((e=>"minecraft:"+e)))}catch(n){console.warn("Error occurred while fetching registries:",Oe(n))}}async function st(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await lt(`${ot(e,"summary")}/blocks/data.min.json`);for(const e in n)t["minecraft:"+e]={properties:n[e][0],default:n[e][1]}}catch(n){console.warn("Error occurred while fetching block state map:",Oe(n))}}async function it(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const o=ve.versions.find((t=>t.id===e));try{const e=["blockstates","models"].includes(t)?"assets":"data",r=`${ot(o,e)}/${e}/minecraft/${t}/${n}.json`;return(await fetch(r)).json()}catch(r){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${Oe(r)}`)}}async function lt(e,t=(e=>e)){try{const n=await caches.open("misode-v2");console.debug(`[getData] Opened cache misode-v2 ${e}`);const o=await n.match(e);if(o&&o.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await o.json();console.debug(`[getData] fetching data ${e}`);const r=await fetch(e),a=t(await r.json());return await n.put(e,new Response(JSON.stringify(a))),a}catch(n){console.warn(`[getData] Failed to open cache misode-v2: ${Oe(n)}`),console.debug(`[getData] fetching data ${e}`);const o=await fetch(e);return t(await o.json())}}const ct=["1.15","1.16","1.17","1.18","1.18.2","1.19"],dt={},ut={},ht={1.15:y,1.16:b,1.17:x,1.18:k,"1.18.2":C,1.19:M};let pt,mt,ft;async function vt(e){return dt[e]||(dt[e]=(async()=>{try{const t=ht[e].getCollections(),n={};await async function(e,t,n){const o=ve.versions.find((t=>t.id===e));o?(await rt(o),await Promise.all([at(o,t),st(o,n)])):console.error(`[fetchData] Unknown version ${o} in ${JSON.stringify(ve.versions)}`)}(e,t,n);const o=ht[e].getSchemas(t);return dt[e]={collections:t,schemas:o,blockStates:n},dt[e]}catch(t){throw new Error(`Cannot get version "${e}": ${Oe(t)}`)}})()),dt[e]}function gt(e,t,n){const o=ve.versions.findIndex((t=>t.id===e)),r=t?ve.versions.findIndex((e=>e.id===t)):0,a=n?ve.versions.findIndex((e=>e.id===n)):ve.versions.length-1;return r<=o&&o<=a}const wt=new Map;async function _t(e){var t;try{const n=await yt(`/snippets/${e}`);return l(i({},n),{data:JSON.parse(null!=(t=A.decompressFromBase64(n.data))?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function yt(e,t){var n,o,r;const a=await fetch("https://z15g7can.directus.app/items"+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0),s=await a.json();if(s.data)return s.data;throw new Error(null!=(r=null==(o=null==(n=s.errors)?void 0:n[0])?void 0:o.message)?r:"Unknown error")}let bt;const xt={},kt=function(e,t){if(!t)return e();if(void 0===bt){const e=document.createElement("link").relList;bt=e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}return Promise.all(t.map((e=>{if(e in xt)return;xt[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":bt,t||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),t?new Promise(((e,t)=>{o.addEventListener("load",e),o.addEventListener("error",t)})):void 0}))).then((()=>e()))};var Ct,Mt,At=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","assets":"Assets","block_definition":"Blockstate","changelog.search":"Search changes","changelog.no_results":"No changes","collapse":"Collapse","collapse_all":"Hold %0% to collapse all","configure_layers":"Configure layers","copy":"Copy","copy_share":"Copy share link","copied":"Copied!","copy_context":"Copy context","dimension_type":"Dimension Type","dimension":"Dimension","disabled":"Disabled","download":"Download","duplicate":"Duplicate","enabled":"Enabled","entries_hidden":"%0% entries hidden","entries_hidden.more":"Show %0% more","entries_hidden.all":"Show all","expand":"Expand","expand_all":"Hold %0% to expand all","feature.decorated.decorators":"Decorators","feature.decorated.decorators.entry":"Decorator","follow_reference":"Follow reference","format.json":"JSON","format.yaml":"YAML","fields":"Fields","generate_new_seed":"Generate new seed","github":"GitHub","hide_output":"Hide output","hide_preview":"Hide preview","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.minified":"Minified","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","layer.biomes":"Biomes","layer.temperature":"Temperature","layer.humidity":"Humidity","layer.continentalness":"Continentalness","layer.erosion":"Erosion","layer.weirdness":"Weirdness","layer.offset":"Offset","layer.factor":"Factor","layer.jaggedness":"Jaggedness","highlighting":"Highlighting","loading":"Loading...","loot_table":"Loot Table","model":"Model","more":"More","move_down":"Move down","move_up":"Move up","not_found.description":"The page you were looking for does not exist.","no_presets":"No presets","output_settings":"Output settings","predicate":"Predicate","recipe":"Recipe","redo":"Redo","reset":"Reset","restore_backup":"Restore last backup","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme":"Theme","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.changelog":"Technical Changelog","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.home":"Data Pack Generators","title.project":"%0% Project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","presets":"Presets","preview":"Visualize","preview.auto_scroll":"Auto scroll","preview.biome":"Biome","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.width":"Width","project.delete_file":"Delete file","project.go_to":"Go to project","project.new_file":"New file","project.no_files":"No files","project.search":"Search project","project.search_drafts":"Search drafts","project.unsaved_file":"Unsaved file","remove":"Remove","search":"Search","show_output":"Show output","show_preview":"Show preview","sounds.play":"Play","sounds.play_sound":"Play sound","sounds.play_all":"Play all","sounds.search":"Search sounds","sounds.download_function":"Download Mcfunction","sounds.delay":"Delay","sounds.pitch":"Pitch","sounds.volume":"Volume","sounds.copy_command":"Copy command","sounds.add_sound":"Add sound","sounds.remove_sound":"Remove sound","sounds.unknown_sound":"Unknown sound","sounds.loading_sound":"Loading sound","source_placeholder":"Paste raw %0% content here","switch_generator":"Switch generator","switch_version":"Switch version","terrain_settings":"Terrain settings","text_component":"Text Component","undo":"Undo","versions.search":"Search versions","versions.no_results":"No results","versions.all":"All versions","versions.previous":"Previous","versions.next":"Next","versions.released":"Released","versions.release_target":"Release target","versions.data_version":"Data version","versions.protocol_version":"Protocol version","versions.pack_format":"Pack format","versions.data_pack_format":"Data pack format","versions.resource_pack_format":"Resource pack format","versions.technical_changes":"Technical changes","versions.discussion":"Discussion","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/density_function":"Density Function","worldgen/placed_feature":"Placed Feature","worldgen/noise":"Noise","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/structure":"Structure","worldgen/structure_set":"Structure Set","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","worldgen/world_preset":"World Preset","worldgen/flat_level_generator_preset":"Flat World Preset","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),It=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:At});(Mt=Ct||(Ct={})).ID_LANGUAGE="language",Mt.ID_THEME="theme",Mt.ID_VERSION="schema_version",Mt.ID_INDENT="indentation",Mt.ID_FORMAT="output_format",Mt.ID_HIGHLIGHTING="output_highlighting",Mt.ID_SOUNDS_VERSION="minecraft_sounds_version",Mt.ID_PROJECTS="misode_projects",Mt.ID_BACKUPS="misode_generator_backups",Mt.getLanguage=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_LANGUAGE))?e:"en"},Mt.getTheme=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_THEME))?e:"dark"},Mt.getVersion=function(){const e=localStorage.getItem(Mt.ID_VERSION);return e&&ct.includes(e)?e:"1.18.2"},Mt.getIndent=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_INDENT))?e:"2_spaces"},Mt.getFormat=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_FORMAT))?e:"json"},Mt.getHighlighting=function(){return"false"!==localStorage.getItem(Mt.ID_HIGHLIGHTING)},Mt.getSoundsVersion=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_SOUNDS_VERSION))?e:"latest"},Mt.getProjects=function(){const e=localStorage.getItem(Mt.ID_PROJECTS);return e?JSON.parse(e):[Lt]},Mt.getBackup=function(e){var t;return JSON.parse(null!=(t=localStorage.getItem(Mt.ID_BACKUPS))?t:"{}")[e]},Mt.setLanguage=function(e){e&&localStorage.setItem(Mt.ID_LANGUAGE,e)},Mt.setTheme=function(e){e&&localStorage.setItem(Mt.ID_THEME,e)},Mt.setVersion=function(e){e&&localStorage.setItem(Mt.ID_VERSION,e)},Mt.setIndent=function(e){e&&localStorage.setItem(Mt.ID_INDENT,e)},Mt.setFormat=function(e){e&&localStorage.setItem(Mt.ID_FORMAT,e)},Mt.setHighlighting=function(e){void 0!==e&&localStorage.setItem(Mt.ID_HIGHLIGHTING,e.toString())},Mt.setSoundsVersion=function(e){e&&localStorage.setItem(Mt.ID_SOUNDS_VERSION,e)},Mt.setProjects=function(e){e&&localStorage.setItem(Mt.ID_PROJECTS,JSON.stringify(e))},Mt.setBackup=function(e,t){var n;const o=JSON.parse(null!=(n=localStorage.getItem(Mt.ID_BACKUPS))?n:"{}");void 0===t?delete o[e]:o[e]=t,localStorage.setItem(Mt.ID_BACKUPS,JSON.stringify(o))};const zt=I({lang:"none",locale:e=>e,changeLanguage:()=>{}}),$t={fallback:At};function jt(e,t,...n){var o,r,a,s,i;return function(e,t){return e.replace(/%\d+%/g,(e=>{const n=parseInt(e.slice(1,-1));return void 0!==(null==t?void 0:t[n])?t[n]:e}))}(null!=(i=null!=(s=null!=(a=null==(o=$t[e])?void 0:o[t])?a:null==(r=$t.en)?void 0:r[t])?s:$t.fallback[t])?i:t,n)}async function Et(e){if($t[e])return;const t=ve.languages.find((t=>t.code===e));if(!t)return;const n=await function(e){switch(e){case"../../locales/de.json":return kt((()=>import("./de.a269acce.js")),void 0);case"../../locales/en.json":return kt((()=>Promise.resolve().then((function(){return It}))),void 0);case"../../locales/es.json":return kt((()=>import("./es.833a9774.js")),void 0);case"../../locales/fr.json":return kt((()=>import("./fr.f5531eea.js")),void 0);case"../../locales/it.json":return kt((()=>import("./it.fd9a8268.js")),void 0);case"../../locales/ja.json":return kt((()=>import("./ja.167de97b.js")),void 0);case"../../locales/pl.json":return kt((()=>import("./pl.3a9fb38c.js")),void 0);case"../../locales/pt.json":return kt((()=>import("./pt.1a04bd2d.js")),void 0);case"../../locales/ru.json":return kt((()=>import("./ru.578070fe.js")),void 0);case"../../locales/sk.json":return kt((()=>import("./sk.96bbf351.js")),void 0);case"../../locales/zh-cn.json":return kt((()=>import("./zh-cn.e3c47b68.js")),void 0);case"../../locales/zh-tw.json":return kt((()=>import("./zh-tw.42e9d37d.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../../locales/${e}.json`),o=!1!==t.schemas&&await function(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return kt((()=>import("./cs.967a01eb.js")),void 0);case"../../../node_modules/@mcschema/locales/src/de.json":return kt((()=>import("./de.8e2383d8.js")),void 0);case"../../../node_modules/@mcschema/locales/src/en.json":return kt((()=>import("./en.20a098e7.js")),void 0);case"../../../node_modules/@mcschema/locales/src/es.json":return kt((()=>import("./es.6b3597bc.js")),void 0);case"../../../node_modules/@mcschema/locales/src/fr.json":return kt((()=>import("./fr.e316b1e2.js")),void 0);case"../../../node_modules/@mcschema/locales/src/it.json":return kt((()=>import("./it.7ff123cd.js")),void 0);case"../../../node_modules/@mcschema/locales/src/ja.json":return kt((()=>import("./ja.3170354d.js")),void 0);case"../../../node_modules/@mcschema/locales/src/pl.json":return kt((()=>import("./pl.ae1f6791.js")),void 0);case"../../../node_modules/@mcschema/locales/src/pt.json":return kt((()=>import("./pt.31e14993.js")),void 0);case"../../../node_modules/@mcschema/locales/src/ru.json":return kt((()=>import("./ru.1298edc9.js")),void 0);case"../../../node_modules/@mcschema/locales/src/sk.json":return kt((()=>import("./sk.d4265232.js")),void 0);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return kt((()=>import("./zh-cn.4129665a.js")),void 0);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return kt((()=>import("./zh-tw.bdc36a24.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../../../node_modules/@mcschema/locales/src/${e}.json`);$t[e]=i(i({},n.default),o.default)}function St(){return $(zt)}function Ot({children:e}){const[t,n]=v("none"),o=z(((e,...n)=>jt(t,e,...n)),[t]),r=z((async e=>{await Et(e),pe.setLanguage(e),Ct.setLanguage(e),n(e)}),[]);c((()=>{(async()=>{const e=Ct.getLanguage();await Promise.all([Et("en"),..."en"!==e?[Et(e)]:[]]),n(e)})()}),[]);const a={lang:t,locale:o,changeLanguage:r};return d(zt.Provider,{value:a},e)}const Lt={name:"Drafts",namespace:"draft",files:[]},Pt=I({project:Lt,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function Dt(){return $(Pt)}function Vt({children:e}){const[t,n]=v(Ct.getProjects()),[o,r]=v(Lt.name),a=w((()=>{var e;return null!=(e=t.find((e=>e.name===o)))?e:Lt}),[t,o]),[s,c]=v(void 0),u=w((()=>{if(s)return a.files.find((e=>e.type===s[0]&&e.id===s[1]))}),[a,s]),h=z((e=>{Ct.setProjects(e),n(e)}),[]),p=z((e=>{h(t.map((t=>t.name===o?i(i({},t),e):t)))}),[t,o]),f=z(((e,t,n)=>{var o;if(n.id){const r=n.id.includes(":")?n.id:`${a.namespace}:${n.id}`,s=a.files.some((t=>t.type===e&&t.id===r));if(t){if((null==u?void 0:u.id)===t&&t!==r&&s)return!1;p({files:a.files.map((o=>o.type===e&&o.id===t?l(i(i({},o),n),{id:r}):o))}),(null==u?void 0:u.id)===t&&c([e,r])}else{if(s)return!1;p({files:[...a.files,{type:e,id:r,data:null!=(o=n.data)?o:{}}]}),c([e,r])}}else p({files:a.files.filter((n=>n.type!==e||n.id!==t))});return!0}),[p,a,u]),g=z(((e,t)=>{const n=ve.generators.find((t=>t.id===e||t.path===e));if(!n)throw new Error(`Cannot find generator of type ${e}`);c([n.id,t]),m(ke(n.url))}),[]),_=z((()=>{c(void 0)}),[]),y={project:a,file:u,changeProject:r,updateProject:p,updateFile:f,openFile:g,closeFile:_};return d(Pt.Provider,{value:y},e)}function Nt(e){var t;const[n,o]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id],r=ve.generators.find((t=>t.id===e.type));if(!r)throw new Error(`Cannot find generator of type ${e.type}`);return`data/${n}/${null!=(t=r.path)?t:r.id}/${o}`}const Tt=I({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function Bt(){return $(Tt)}function Ht({children:e}){const[t,n]=v(Ct.getTheme()),o=He("(prefers-color-scheme: light)"),r=He("(prefers-color-scheme: dark)");c((()=>{document.documentElement.setAttribute("data-theme",t)}),[t]);const a=z((e=>{pe.setTheme(e),Ct.setTheme(e),n(e)}),[]);c((()=>{pe.setPrefersColorScheme(o?"light":r?"dark":"none")}),[o,r]);const s={theme:t,actualTheme:"light"===t||"dark"!==t&&o?"light":"dark",changeTheme:a};return d(Tt.Provider,{value:s},e)}const Ft=I({title:"",changeTitle:()=>{}});function Rt(e,t){const n=$(Ft);return c((()=>{e&&n.changeTitle(e,t)}),[e,t]),n}function Jt({children:e}){const{locale:t}=St(),[n,o]=v(t("title.home")),r={title:n,changeTitle:z(((e,t)=>{null!=t||(t=ve.versions.map((e=>e.id)));const n=t.slice(t.length-3);document.title=`${e} Minecraft ${n.join(", ")}`,o(e)}),[])};return d(Ft.Provider,{value:r},e)}const Wt=I({version:"1.18.2",changeVersion:()=>{}});function Ut(){return $(Wt)}function Gt({children:e}){const[t,n]=v(Ct.getVersion()),o=Ae(p()).get("version");c((()=>{ct.includes(o)&&t!==o&&n(o)}),[t,o]);const r=z(((e,t=!0)=>{Ae(p()).has("version")&&Ie({version:e}),t&&(pe.setVersion(e),Ct.setVersion(e)),n(e)}),[]),a={version:t,changeVersion:r};return d(Wt.Provider,{value:a},e)}let Yt=!1;const qt={temperature:[-1,1],humidity:[-1,1],continentalness:[-1.1,1],erosion:[-1,1],weirdness:[-1,1],offset:[-1,1],factor:[0,12],jaggedness:[0,1]};let Kt,Zt;async function Xt(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return Pe(n,Kt)||(Kt=Le(n),Zt=await async function(e,t){var n,o,r,a,s;switch(null==(n=null==e?void 0:e.type)?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new V(O.parse(e.biome));case"checkerboard":const n=(null!=(o=e.scale)?o:2)+2,i=null!=(a=null==(r=e.biomes)?void 0:r.length)?a:0;return{getBiome(t,o,r){var a;const s=(((t>>n)+(r>>n))%i+i)%i;return O.parse(null==(a=e.biomes)?void 0:a[s].node)}};case"multi_noise":switch(null==(s=e.preset)?void 0:s.replace(/^minecraft:/,"")){case"nether":e=gt(t.version,"1.18")?nn:tn;break;case"overworld":e=gt(t.version,"1.18")?await async function(){return(await it("1.18","dimension","overworld")).generator.biome_source}():e}if(e=h.DataModel.unwrapLists(e),gt(t.version,"1.18")){await async function(){Yt||(await N(T),Yt=!0,console.debug(`Loaded deepslate-rs from "${T}"`))}();const n=new De,o=e=>"number"==typeof e?[e,e]:e,[r,a,s,i,l,c,d,u,h,p,m,f,v,g]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const t of e.biomes){const{temperature:e,humidity:w,continentalness:_,erosion:y,weirdness:b,depth:x,offset:k}=t.parameters;r.push(o(e)[0]),a.push(o(e)[1]),s.push(o(w)[0]),i.push(o(w)[1]),l.push(o(_)[0]),c.push(o(_)[1]),d.push(o(y)[0]),u.push(o(y)[1]),h.push(o(b)[0]),p.push(o(b)[1]),m.push(o(x)[0]),f.push(o(x)[1]),v.push(k),g.push(n.getOrPut(t.biome,Math.floor(2147483647*Math.random())))}const w=j(new Float64Array(r),new Float64Array(a),new Float64Array(s),new Float64Array(i),new Float64Array(l),new Float64Array(c),new Float64Array(d),new Float64Array(u),new Float64Array(h),new Float64Array(p),new Float64Array(m),new Float64Array(f),new Float64Array(v),new Int32Array(g)),_=E(t.seed,t.octaves.temperature.firstOctave,new Float64Array(t.octaves.temperature.amplitudes),t.octaves.humidity.firstOctave,new Float64Array(t.octaves.humidity.amplitudes),t.octaves.continentalness.firstOctave,new Float64Array(t.octaves.continentalness.amplitudes),t.octaves.erosion.firstOctave,new Float64Array(t.octaves.erosion.amplitudes),t.octaves.weirdness.firstOctave,new Float64Array(t.octaves.weirdness.amplitudes),t.octaves.shift.firstOctave,new Float64Array(t.octaves.shift.amplitudes));return{getBiome(e,t,o){var r;const a=S(w,_,e,e+1,1,t,t+1,1,o,o+1,1);return O.parse(null!=(r=n.getA(a[0]))?r:"unknown")},getBiomes:(e,t,o,r,a,s,i,l,c)=>[...S(w,_,e,t,o,r,a,s,i,l,c)].map((e=>{var t;return O.parse(null!=(t=n.getA(e))?t:"unknown")})),getClimate(e,t,n){const o=L(_,e,e+1,1,t,t+1,1,n,n+1,1),[r,a,s,i,l]=o.slice(0,5);return{temperature:r,humidity:a,continentalness:s,erosion:i,weirdness:l}},getClimates(e,t,n,o,r,a,s,i,l){const c=L(_,e,t,n,o,r,a,s,i,l),d=[];for(let u=0;u{var r;const a=e[`${n}_noise`];return a.firstOctave=je(null!=(r=a.firstOctave)?r:-7,-100,-1),new P(new D(t.seed+BigInt(o)),a)}));return Array.isArray(e.biomes)&&0!==e.biomes.length?{getBiome(t,o,r){const a=n.map((e=>e.sample(t,r,0)));let s=1/0,i="";for(const{biome:n,parameters:l}of e.biomes){const e=$e(l.altitude-a[0])+$e(l.temperature-a[1])+$e(l.humidity-a[2])+$e(l.weirdness-a[3])+$e(l.offset);eo.nextFloat(),nextInt:e=>o.nextInt(e),nextGaussian:()=>Math.sqrt(-2*Math.log(1-o.nextFloat()))*Math.cos(2*Math.PI*o.nextFloat()),sampleInt(e){return function(e,t){var n,o;if("number"==typeof e)return e;if(e.base)return null!=(o=e.base)?o:1+t.nextInt(1+(null!=(n=e.spread)?n:0));switch(sn(e.type)){case"constant":return e.value;case"uniform":return e.value.min_inclusive+t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1);case"biased_to_bottom":return e.value.min_inclusive+t.nextInt(t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1)+1);case"clamped":return je(t.sampleInt(e.value.source),e.value.min_inclusive,e.value.max_inclusive);case"clamped_normal":const n=e.value.mean+t.nextGaussian()*e.value.deviation;return Math.floor(je(e.value.min_inclusive,e.value.max_inclusive,n));case"weighted_list":const o=e.distribution.reduce(((e,t)=>e+t.weight),0);let r=t.nextInt(o);for(const a of e.distribution)if(r-=a.weight,r<0)return t.sampleInt(a.data);return 0}return 1}(e,this)}};for(let s=0;s=n.size[0]||s[1]>=n.size[1]||s[2]>=n.size[2])continue;const e=s[2]*(4*t.width)+4*s[0],o=i{hn(t,null==e?void 0:e.decorator,n).forEach((t=>un(t,null==e?void 0:e.feature,n)))},random_boolean_selector:(e,t,n)=>{un(t,n.nextFloat()<.5?null==e?void 0:e.feature_true:null==e?void 0:e.feature_false,n)},random_selector:(e,t,n)=>{var o,r;for(const a of null!=(o=null==e?void 0:e.features)?o:[])if(n.nextFloat()<(null!=(r=null==a?void 0:a.chance)?r:0))return void un(t,a.feature,n);un(t,null==e?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var o,r,a;un(t,null==(a=null==e?void 0:e.features)?void 0:a[n.nextInt(null!=(r=null==(o=null==e?void 0:e.features)?void 0:o.length)?r:0)],n)}},mn={chance:(e,t,n)=>{var o;return n.nextFloat()<1/(null!=(o=null==e?void 0:e.chance)?o:1)?[t]:[]},count:(e,t,n)=>{var o;return new Array(n.sampleInt(null!=(o=null==e?void 0:e.count)?o:1)).fill(t)},count_extra:(e,t,n)=>{var o,r;let a=null!=(o=null==e?void 0:e.count)?o:1;return n.nextFloat(){var o;return new Array(n.sampleInt(null!=(o=null==e?void 0:e.count)?o:1)).fill(t).map((e=>[e[0]+n.nextInt(16),e[1],e[2]+n.nextInt(16)]))},count_noise:(e,t,n)=>{const o=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200){var o;const r=Math.max(1,e.noise_factor),a=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),s=Math.max(0,Math.ceil((a+(null!=(o=e.noise_offset)?o:0))*e.noise_to_count_ratio));return new Array(s).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map(((e,o)=>{const r=4*Math.floor(o/4)+1+n.nextInt(3)+t[0];return[r,Math.max(n.seaLevel,on[je(0,63,r)]),4*Math.floor(o%4)+1+n.nextInt(3)+t[2]]})),decorated:(e,t,n)=>hn(t,null==e?void 0:e.outer,n).flatMap((t=>hn(t,null==e?void 0:e.inner,n))),depth_average:(e,t,n)=>{var o,r,a,s;return ln(t,n.nextInt(null!=(o=null==e?void 0:e.spread)?o:0)+n.nextInt(null!=(r=null==e?void 0:e.spread)?r:0)-(null!=(a=e.spread)?a:0)+(null!=(s=null==e?void 0:e.baseline)?s:0))},emerald_ore:(e,t,n)=>{const o=3+n.nextInt(6);return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)]))},fire:(e,t,n)=>{const o=1+n.nextInt(n.nextInt(n.sampleInt(null==e?void 0:e.count)));return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)]))},glowstone:(e,t,n)=>{const o=n.nextInt(1+n.nextInt(n.sampleInt(null==e?void 0:e.count)));return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)]))},heightmap:(e,t,n)=>ln(t,Math.max(n.seaLevel,on[je(0,63,t[0])])),heightmap_spread_double:(e,t,n)=>{const o=Math.max(n.seaLevel,on[je(0,63,t[0])]);return ln(t,n.nextInt(2*o))},heightmap_world_surface:(e,t,n)=>ln(t,Math.max(n.seaLevel,on[je(0,63,t[0])])),iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var o,r;if(0===n.nextInt((null!=(o=e.chance)?o:1)/10)){const o=n.nextInt(n.nextInt(248)+8);if(o[t],range:(e,t,n)=>{var o,r,a;return ln(t,n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0))},range_biased:(e,t,n)=>{var o,r,a;return ln(t,n.nextInt(n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0)))},range_very_biased:(e,t,n)=>{var o,r,a,s;return ln(t,n.nextInt(n.nextInt(n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0))+(null!=(s=null==e?void 0:e.bottom_offset)?s:0)))},spread_32_above:(e,t,n)=>ln(t,n.nextInt(t[1]+32)),top_solid_heightmap:(e,t)=>ln(t,on[je(0,63,t[0])]),magma:(e,t,n)=>ln(t,n.nextInt(t[1]+32)),square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var n,o;const r=on[je(0,63,t[0])],a=r+(null!=(n=null==e?void 0:e.min_inclusive)?n:-1/0),s=r+(null!=(o=null==e?void 0:e.max_inclusive)?o:1/0);return t[1]s?[t]:[]},water_lake:(e,t,n)=>{var o;return 0===n.nextInt(null!=(o=e.chance)?o:1)?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function fn(e,t,n){var o;let r=[e];for(const a of t){vn[sn(null!=(o=null==a?void 0:a.type)?o:"nope")]&&(r=r.flatMap((e=>vn[sn(a.type)](a,e,n))))}for(const a of r)n.placements.push([a,0])}const vn={count:({count:e},t,n)=>new Array(n.sampleInt(null!=e?e:1)).fill(t),count_on_every_layer:({count:e},t,n)=>new Array(n.sampleInt(null!=e?e:1)).fill(t).map((e=>[e[0]+n.nextInt(16),e[1],e[2]+n.nextInt(16)])),environment_scan:({},e)=>[e],height_range:({height:e},t,n)=>ln(t,function(e,t){var n,o,r,a;if(!ge(e))throw new Error("Invalid height provider");if("string"!=typeof e.type)return cn(e);switch(sn(e.type)){case"constant":return cn(e.value);case"uniform":{const n=cn(e.min_inclusive),o=cn(e.max_inclusive);return n+t.nextInt(o-n+1)}case"biased_to_bottom":{const r=cn(e.min_inclusive),a=cn(e.max_inclusive),s=t.nextInt(a-r-(null!=(n=e.inner)?n:1)+1);return r+t.nextInt(s+(null!=(o=e.inner)?o:1))}case"very_biased_to_bottom":{const n=cn(e.min_inclusive),o=cn(e.max_inclusive),a=null!=(r=e.inner)?r:1,s=n+a+t.nextInt(o-n-a+1),i=n+t.nextInt(s-n);return n+t.nextInt(i-n+a)}case"trapezoid":{const n=cn(e.min_inclusive),o=cn(e.max_inclusive),r=null!=(a=e.plateau)?a:0;if(r>=o-n)return n+t.nextInt(o-n+1);const s=(o-n-r)/2,i=o-n-s;return n+t.nextInt(i+1)+t.nextInt(s+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}(e,n)),heightmap:({},e,t)=>ln(e,Math.max(t.seaLevel,on[je(0,63,e[0])])),in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},o,r)=>{const a=Math.max(1,t),s=r.biomeInfoNoise.sample(o[0]/a,0,o[2]/a),i=Math.max(0,Math.ceil((s+(null!=n?n:0))*e));return new Array(i).fill(o)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},o,r)=>{const a=r.biomeInfoNoise.sample(o[0]/200,0,o[2]/200);return new Array(a[[n[0]+o.sampleInt(e),n[1]+o.sampleInt(t),n[2]+o.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(null!=e?e:1)?[t]:[]};class gn{constructor(e){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0;const t=new D(e);this.minLimitPerlinNoise=new B(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new B(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new B(t,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new B(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(e,t,n,o,r){this.settings=e,this.chunkWidth=4*e.size_horizontal,this.chunkHeight=4*e.size_vertical,this.chunkCountY=Math.floor(e.height/this.chunkHeight),e.amplified&&t>0&&(t=1+2*t,n=1+4*n),this.biomeDepth=.265625*(.5*t-.125),this.biomeScale=96/(.9*n+.1),this.noiseColumnCache=Array(r).fill(null),this.xOffset=o}iterateNoiseColumn(e){const t=Array(this.chunkCountY*this.chunkHeight),n=Math.floor(e/this.chunkWidth),o=Math.floor(e%this.chunkWidth)/this.chunkWidth,r=this.fillNoiseColumn(n),a=this.fillNoiseColumn(n+1);for(let h=this.chunkCountY-1;h>=0;h-=1)for(let e=this.chunkHeight;e>=0;e-=1){const n=e/this.chunkHeight;t[h*this.chunkHeight+e]=(s=n,i=o,l=r[h],c=r[h+1],d=a[h],u=a[h+1],Se(i,Se(s,l,c),Se(s,d,u)))}var s,i,l,c,d,u;return t}fillNoiseColumn(e){const t=this.noiseColumnCache[e-this.xOffset];if(t)return t;const n=Array(this.chunkCountY+1),o=684.412*this.settings.sampling.xz_scale,r=684.412*this.settings.sampling.y_scale,a=o/this.settings.sampling.xz_factor,s=r/this.settings.sampling.y_factor,i=this.settings.random_density_offset?this.getRandomDensity(e):0;for(let l=0;l<=this.chunkCountY;l+=1){let t=this.sampleAndClampNoise(e,l,this.mainPerlinNoise.getOctaveNoise(0).zo,o,r,a,s);const c=((1-2*l/this.chunkCountY+i)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;t+=c*(c>0?4:1),this.settings.top_slide.size>0&&(t=Ee(this.settings.top_slide.target,t,(this.chunkCountY-l-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(t=Ee(this.settings.bottom_slide.target,t,(l-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),n[l]=t}return this.noiseColumnCache[e-this.xOffset]=n,n}getRandomDensity(e){const t=this.depthNoise.sample(200*e,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),n=24.575625*(t<0?.3*-t:t)-2;return n<0?.009486607142857142*n:.006640625*Math.min(n,1)}sampleAndClampNoise(e,t,n,o,r,a,s){let i=0,l=0,c=0,d=1;for(let u=0;u<16;u+=1){const h=B.wrap(e*o*d),p=B.wrap(t*r*d),m=B.wrap(n*o*d),f=r*d,v=this.minLimitPerlinNoise.getOctaveNoise(u);v&&(i+=v.sample(h,p,m,f,t*f)/d);const g=this.maxLimitPerlinNoise.getOctaveNoise(u);if(g&&(l+=g.sample(h,p,m,f,t*f)/d),u<8){const o=this.mainPerlinNoise.getOctaveNoise(u);o&&(c+=o.sample(B.wrap(e*a*d),B.wrap(t*s*d),B.wrap(n*a*d),s*d,t*s*d)/d)}d/=2}return Ee(i/512,l/512,(c/10+1)/2)}}const wn={"minecraft:air":[150,160,170],"minecraft:water":[20,80,170],"minecraft:lava":[200,100,0],"minecraft:stone":[55,55,55],"minecraft:deepslate":[34,34,36],"minecraft:bedrock":[10,10,10],"minecraft:grass_block":[47,120,23],"minecraft:dirt":[64,40,8],"minecraft:gravel":[70,70,70],"minecraft:sand":[196,180,77],"minecraft:sandstone":[148,135,52],"minecraft:netherrack":[100,40,40],"minecraft:crimson_nylium":[144,22,22],"minecraft:warped_nylium":[28,115,113],"minecraft:basalt":[73,74,85],"minecraft:end_stone":[200,200,140]};let _n,yn,bn=[];const xn=new Map;async function kn(e,t,n){var o,r,a;if(gt(n.version,"1.18")){gt(n.version,"1.18.2")&&await An(n.version);const{settings:r,generator:a}=function(e,t){const n=K.fromJson(h.DataModel.unwrapLists(e)),o=[e,`${t.seed}`,t.biome];if(!Pe(o,_n))if(_n=Le(o),bn=[],gt(t.version,"1.18.2")){const e=new V(O.create("unknown"));yn=new Z(t.seed,e,n)}else{const e=new te("unknown");yn=new X(t.seed,e,n)}return{settings:n,generator:yn}}(e,n),s=new zn(-n.offset,n.width,r.noise.minY,r.noise.height);s.generate(a,n.biome);const i=t.data;for(let e=0;easync function(e,t,n,o){const r=await async function(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=ve.versions.find((t=>t.id===e));await rt(n);try{const e=await lt(`${ot(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(e.map((async e=>[e,await lt(`${ot(n,"data")}/data/minecraft/${t}/${e}.json`)]))))}catch(o){throw new Error(`Error occurred while fetching all ${t} presets: ${Oe(o)}`)}}(e,n),a=new Y(O.create(n));for(const[s,i]of r.entries())a.register(O.parse(s),o.fromJson(i));t.register(a.key,a)}(e,n,t,o)))),xn.set(e,n)),q.DENSITY_FUNCTION.clear().assign(n.getOrThrow(O.create("worldgen/density_function"))),q.NOISE.clear().assign(n.getOrThrow(O.create("worldgen/noise")))}function In(e,t){return e[t]>0?0:e[t+1]>0?150:255}class zn{constructor(e,t,n,o){this.minX=e,this.done=[],this.chunks=[...Array(Math.ceil(t/16)+1)].map(((t,r)=>{const a=(e>>4)+r,s=bn.find((e=>e.pos[0]===a));return s?(this.done[r]=!0,s):new Q(n,o,H.create(a,0))}))}generate(e,t){this.chunks.forEach(((n,o)=>{this.done[o]||(e.fill(n,!0),e.buildSurface(n,t),this.done[o]=!0,bn.push(n))}))}getBlockState(e){const t=(e[0]>>4)-(this.minX>>4);return this.chunks[t].getBlockState(e)}}const $n=["biomes","temperature","humidity","continentalness","erosion","weirdness"],jn=({model:e,data:t,shown:n,version:o})=>{var r,a;const{locale:s}=St(),[l]=v(ye()),[u,p]=v(2),[m,g]=v(void 0),[y,b]=v(new Set(["biomes"])),x=f([0,0]),k=f(1),C=f(void 0),M=BigInt(null!=(r=e.get(new h.Path(["generator","seed"])))?r:l),A=w((()=>{if(n)return function(e){if("string"!=typeof e){e=K.fromJson(h.DataModel.unwrapLists(e)).legacyRandomSource?"minecraft:nether":"minecraft:overworld"}switch(e.replace(/^minecraft:/,"")){case"overworld":case"amplified":return{temperature:{firstOctave:-9,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-7,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-9,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-9,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};case"end":case"floating_islands":return{temperature:{firstOctave:0,amplitudes:[0]},humidity:{firstOctave:0,amplitudes:[0]},continentalness:{firstOctave:0,amplitudes:[0]},erosion:{firstOctave:0,amplitudes:[0]},weirdness:{firstOctave:0,amplitudes:[0]},shift:{firstOctave:0,amplitudes:[0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}}(e.get(new h.Path(["generator","settings"])))}),[n]),I=n?function(e,t){return JSON.stringify([e,t])}(t,A):"",z=null==(a=t.type)?void 0:a.replace(/^minecraft:/,""),{canvas:$,redraw:j}=Te({size:()=>[200/k.current,200/k.current],async draw(e){const n={octaves:A,biomeColors:{},layers:y,offset:x.current,scale:u,seed:M,res:k.current,version:o};await async function(e,t,n){var o,r,a;const{biomeSource:s}=await Xt(e,n),i=t.data,l=-Math.round(n.offset[0])-100+n.res/2,c=-Math.round(n.offset[1])-100+n.res/2,d=4*t.width/n.res,u=4/n.res,h=[l*n.scale,(200+l)*n.scale,n.res*n.scale],p=[c*n.scale,(200+c)*n.scale,n.res*n.scale],m=n.layers.has("biomes")?null==(o=s.getBiomes)?void 0:o.call(s,...h,64,65,1,...p):void 0,f=[...n.layers].filter((e=>"biomes"!==e)),v=0===f.length||null==(r=s.getClimates)?void 0:r.call(s,...h,64,65,1,...p);for(let g=0;g<200;g+=n.res)for(let e=0;e<200;e+=n.res){const t=e*d+g*u,o=g/n.res*200/n.res+e/n.res,r=(g+l)*n.scale,h=(e+c)*n.scale;let p=[50,50,50];if(n.layers.has("biomes"))p=Qt((null!=(a=null==m?void 0:m[o])?a:s.getBiome(r,64,h)).toString(),n.biomeColors);else if(v&&f[0]){const e=v[o][f[0]],[t,n]=qt[f[0]],r=(e-t)/(n-t)*256;p=[r,r,r]}i[t]=p[0],i[t+1]=p[1],i[t+2]=p[2],i[t+3]=255}}(t,e,n),4===k.current&&(clearTimeout(C.current),C.current=setTimeout((()=>{k.current=1,j()}),150))},async onDrag(e,t){x.current[0]=x.current[0]+200*e,x.current[1]=x.current[1]+200*t,clearTimeout(C.current),k.current="multi_noise"===z?4:1,j()},async onHover(e,n){const r={octaves:A,biomeColors:{},layers:y,offset:x.current,scale:u,seed:l,res:1,version:o},a=await async function(e,t,n,o){var r;const{biomeSource:a}=await Xt(e,o),[s,l]=function([e,t],n){return[(e-n.offset[0]-100+n.res/2)*n.scale,(t-n.offset[1]-100+n.res/2)*n.scale]}([t,n],o);return i({biome:a.getBiome(s,64,l).toString()},null==(r=a.getClimate)?void 0:r.call(a,s,64,l))}(t,Math.floor(200*e),Math.floor(200*n),r);g(a)},onLeave(){g(void 0)}},[I,u,l,y]);c((()=>{n&&(k.current="multi_noise"===z?4:1,j())}),[I,u,l,y,n]);const E=e=>{x.current[0]=x.current[0]*u/e,x.current[1]=x.current[1]*u/e,p(e)};return d(_,null,d("div",{class:"controls preview-controls"},m&&d(fe,{label:m.biome,class:"no-pointer"}),"multi_noise"===z&&d(Re,{icon:"stack",tooltip:s("configure_layers")},$n.map((e=>{const t=y.has(e);return d(fe,{label:s(`layer.${e}`),active:t,tooltip:s(t?"enabled":"disabled"),onClick:t=>{b(new Set([e])),t.stopPropagation()}})}))),("multi_noise"===z||"checkerboard"===z)&&d(_,null,d(fe,{icon:"dash",tooltip:s("zoom_out"),onClick:()=>E(1.5*u)}),d(fe,{icon:"plus",tooltip:s("zoom_in"),onClick:()=>E(u/1.5)})),"multi_noise"===z&&d(fe,{icon:"sync",tooltip:s("generate_new_seed"),onClick:()=>be(e)})),void 0!==(null==m?void 0:m.temperature)&&d("div",{class:"controls secondary-controls"},d(fe,{class:"no-pointer",label:Object.entries(m).filter((([e])=>"biome"!==e)).map((([e,t])=>`${e[0].toUpperCase()}: ${t.toFixed(2)}`)).join(" ")})),d("canvas",{ref:$,width:"200",height:"200"}))};const En=({data:e,version:t,shown:n})=>{const{locale:o}=St(),[r,a]=v(4),[s,i]=v(ye()),{canvas:l,redraw:u}=Te({size:()=>[16*r,16*r],async draw(n){an(e,n,{seed:s,version:t,size:[16*r,128,16*r]})}}),h=JSON.stringify(e);return c((()=>{n&&u()}),[h,r,s,n]),d(_,null,d("div",{class:"controls preview-controls"},d(fe,{icon:"dash",tooltip:o("zoom_out"),onClick:()=>a(Math.min(16,r+1))}),d(fe,{icon:"plus",tooltip:o("zoom_in"),onClick:()=>a(Math.max(1,r-1))}),d(fe,{icon:"sync",tooltip:o("generate_new_seed"),onClick:()=>i(ye())})),d("canvas",{ref:l,width:"64",height:"64"}))},Sn=({data:e,shown:t,version:n})=>{var o,r;const{locale:a}=St(),[s,i]=v(ye()),[l,u]=v(!1),[h,p]=v(void 0),m=f(0),g=f(void 0),w=JSON.stringify([e]),y=null!=(r=null==(o=null==e?void 0:e.noise)?void 0:o.height)?r:256,{canvas:b,redraw:x}=Te({size:()=>[y,y],async draw(t){const o={offset:m.current,width:t.width,seed:s,version:n};await Cn(e,t,o)},async onDrag(e){m.current+=e*y,x()},async onHover(t,n){var o,r;const a=Math.floor(t*y-m.current),s=y-Math.max(1,Math.ceil(n*y))+(null!=(r=null==(o=null==e?void 0:e.noise)?void 0:o.min_y)?r:0);p(`X=${a} Y=${s}`)},onLeave(){p(void 0)}},[w,s]);return c((()=>{g.current&&clearInterval(g.current),t&&(x(),l&&(g.current=setInterval((()=>{m.current-=8,x()}),100)))}),[w,s,t,l]),d(_,null,d("div",{class:"controls preview-controls"},h&&d(fe,{label:h,class:"no-pointer"}),d(Re,{icon:"gear",tooltip:a("terrain_settings")},d(fe,{icon:l?"square_fill":"square",label:a("preview.auto_scroll"),onClick:()=>u(!l)})),d(fe,{icon:"sync",tooltip:a("generate_new_seed"),onClick:()=>i(ye())})),d("canvas",{ref:b,width:y,height:y}))},On=({data:e,shown:t,version:n})=>{const{locale:o}=St(),[r,a]=v(ye()),[s,i]=v(2),l=f([0,0]),u=JSON.stringify([e]),{canvas:p,redraw:m}=Te({size:()=>[256,256],async draw(t){const o={offset:l.current,scale:s,seed:r,version:n};!function(e,t,n){const o=new D(n.seed),r=ee.fromJson(h.DataModel.unwrapLists(e)),a=new P(o,r),s=-n.offset[0]-100,i=-n.offset[1]-100,l=t.data;for(let c=0;c<256;c+=1)for(let e=0;e<256;e+=1){const t=4*c+4*e*256,o=(c+s)*n.scale,r=(e+i)*n.scale,d=128*(a.sample(o,r,0)+1);l[t]=d,l[t+1]=d,l[t+2]=d,l[t+3]=255}}(e,t,o)},async onDrag(e,t){l.current[0]=l.current[0]+256*e,l.current[1]=l.current[1]+256*t,m()}},[u,s,r]);c((()=>{t&&m()}),[u,s,r,t]);const g=e=>{l.current[0]=l.current[0]*s/e,l.current[1]=l.current[1]*s/e,i(e)};return d(_,null,d("div",{class:"controls preview-controls"},d(fe,{icon:"dash",tooltip:o("zoom_out"),onClick:()=>g(1.5*s)}),d(fe,{icon:"plus",tooltip:o("zoom_in"),onClick:()=>g(s/1.5)}),d(fe,{icon:"sync",tooltip:o("generate_new_seed"),onClick:()=>a(ye())})),d("canvas",{ref:p,width:"256",height:"256"}))},Ln=({data:e,shown:t,version:n})=>{var o,r;const{locale:a}=St(),[s,i]=v(ye()),[l,u]=v("minecraft:plains"),[h,p]=v(.2),[m,g]=v(.1),[y,b]=v(!1),[x,k]=v(void 0),C=f(0),M=f(void 0),A=JSON.stringify([e,h,m]),I=null!=(r=null==(o=null==e?void 0:e.noise)?void 0:o.height)?r:256,{canvas:z,redraw:$}=Te({size:()=>[I,I],async draw(t){const o={biome:l,biomeDepth:m,biomeScale:h,offset:C.current,width:t.width,seed:s,version:n};await kn(e,t,o)},async onDrag(e){C.current+=e*I,$()},async onHover(t,n){var o,r;const a=Math.floor(t*I-C.current),s=I-Math.max(1,Math.ceil(n*I))+(null!=(r=null==(o=null==e?void 0:e.noise)?void 0:o.min_y)?r:0),i=function(e,t){const n=bn.find((t=>H.minBlockX(t.pos)<=e&&H.maxBlockX(t.pos)>=e));if(n)return n.getBlockState(F.create(e,t,0))}(a,s);k(i?`Y=${s} (${i.getName().path})`:`Y=${s}`)},onLeave(){k(void 0)}},[A,s]);c((()=>{M.current&&clearInterval(M.current),t&&(async()=>{try{await $(),y&&(M.current=setInterval((()=>{C.current-=8,$()}),100))}catch(e){throw e}})()}),[A,s,t,l,h,m,y]);const j=w((()=>{var e;return null!=(e=null==ft?void 0:ft.get("worldgen/biome"))?e:[]}),[n]);return d(_,null,d("div",{class:"controls preview-controls"},x&&d(fe,{label:x,class:"no-pointer"}),d(Re,{icon:"gear",tooltip:a("terrain_settings")},gt(n,void 0,"1.17")?d(_,null,d(Ve,{label:a("preview.scale"),value:`${h}`,onChange:e=>p(Number(e))}),d(Ve,{label:a("preview.depth"),value:`${m}`,onChange:e=>g(Number(e))})):d(Ve,{label:a("preview.biome"),value:l,onChange:u,dataList:j,larger:!0}),d(fe,{icon:y?"square_fill":"square",label:a("preview.auto_scroll"),onClick:()=>b(!y)})),d(fe,{icon:"sync",tooltip:a("generate_new_seed"),onClick:()=>i(ye())})),d("canvas",{ref:z,width:I,height:I}))},Pn=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function Dn({model:e,version:t,id:n,shown:o}){var r;const[,a]=v(0);if(Fe(e,(()=>{a((e=>e+1))})),!e)return d(_,null);if("dimension"===n&&(null==(r=e.get(new h.Path(["generator","type"])))?void 0:r.endsWith("noise"))){const n=e.get(new h.Path(["generator","biome_source"]));if(n)return d(jn,i({},{model:e,version:t,shown:o,data:n}))}if("worldgen/density_function"===n){const n=e.get(new h.Path([]));if(n)return d(Sn,i({},{model:e,version:t,shown:o,data:n}))}if("worldgen/noise"===n){const n=e.get(new h.Path([]));if(n)return d(On,i({},{model:e,version:t,shown:o,data:n}))}if("worldgen/noise_settings"===n){const n=e.get(new h.Path([]));if(n)return d(Ln,i({},{model:e,version:t,shown:o,data:n}))}if("worldgen/placed_feature"===n||"worldgen/configured_feature"===n&>(t,"1.16","1.17")){const n=e.get(new h.Path([]));if(n)return d(En,i({},{model:e,version:t,shown:o,data:n}))}return d(_,null)}function Vn(e,t){return e.schema.hook(Nn,new h.ModelPath(e),e.data,{blockStates:t})}const Nn={base:({},e,t)=>t,choice({switchNode:e},t,n,o){return e.hook(this,t,n,o)},list({children:e},t,n,o){if(!Array.isArray(n))return n;const r=n.map(((n,r)=>e.hook(this,t.push(r),n.node,o)));for(const a of Object.getOwnPropertySymbols(n))r[a]=n[a];return r},map({children:e,config:t},n,o,r){var a,s;if(void 0===o)return;const i="block_state_map"===(null==(a=t.validation)?void 0:a.validator)?null==(s=r.blockStates)?void 0:s[h.relativePath(n,t.validation.params.id).get()]:null,l={};Object.keys(o).forEach((t=>{var a;i&&!Object.keys(null!=(a=i.properties)?a:{}).includes(t)||(l[t]=e.hook(this,n.push(t),o[t],r))}));for(const c of Object.getOwnPropertySymbols(o))l[c]=o[c];return l},object({getActiveFields:e},t,n,o){if(null==n||"object"!=typeof n)return n;const r={},a=e(t);Object.keys(a).filter((e=>a[e].enabled(t))).forEach((e=>{const s=a[e].hook(this,t.push(e),n[e],o);null!=s&&(r[e]=s)}));for(const s of Object.getOwnPropertySymbols(n))r[s]=n[s];return r}},Tn={"2_spaces":2,"4_spaces":4,tabs:"\t",minified:void 0},Bn={json:{parse:oe.parse,stringify:(e,t)=>oe.stringify(e,null,t)+"\n"},yaml:{parse:re.load,stringify:(e,t)=>re.dump(e,{flowLevel:void 0===t?0:-1,indent:"string"==typeof t?4:t})}};function Hn({name:e,model:t,blockStates:n,doCopy:o,doDownload:r,doImport:a,copySuccess:s,onError:i}){const{locale:l}=St(),[u,p]=v(Ct.getIndent()),[m,g]=v(Ct.getFormat()),[w,y]=v(Ct.getHighlighting()),b=f(null),x=f(),k=f(),C=f(),M=f(),A=z(((e,t)=>{const n=Vn(e,t);return Bn[m].stringify(n,Tn[u])}),[u,m]);c((()=>{x.current=()=>{if(t&&n)try{const e=A(t,n);M.current.setValue(e)}catch(e){e instanceof Error?(e.message=`Error getting JSON output: ${e.message}`,i(e)):i(`Error getting JSON output: ${Oe(e)}`),console.error(e),M.current.setValue("")}},k.current=()=>{const e=M.current.getValue();if(0!==e.length)try{const n=Bn[m].parse(e);null==t||t.reset(h.DataModel.wrapLists(n),!1)}catch(n){n instanceof Error?(n.message=`Error importing: ${n.message}`,i(n)):i(`Error importing: ${Oe(n)}`),console.error(n)}}}),[t,n,u,m,w]),c((()=>{if(w){const e=ne.edit("editor");e.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),e.$blockScrolling=1/0,e.on("blur",(e=>k.current(e))),e.getSession().setMode("ace/mode/json"),M.current={getValue:()=>e.getSession().getValue(),setValue(t){e.getSession().setValue(t)},configure(t,n){e.setOption("useSoftTabs","tabs"!==t),e.setOption("tabSize","tabs"===t?4:Tn[t]),e.getSession().setMode(`ace/mode/${n}`)},select(){e.selectAll()}}}else M.current={getValue:()=>C.current.value,setValue(e){C.current.value=e},configure(){},select(){}}}),[w]),Fe(t,(()=>{x.current()})),c((()=>{t&&x.current()}),[t]),c((()=>{M.current.configure(u,m),x.current()}),[u,m,w]),c((()=>{o&&t&&n&&navigator.clipboard.writeText(A(t,n)).then((()=>{s()}))}),[o]),c((()=>{if(r&&t&&n&&b.current){const o=encodeURIComponent(A(t,n));b.current.setAttribute("href",`data:text/json;charset=utf-8,${o}`),b.current.setAttribute("download",`${e}.${m}`),b.current.click()}}),[r]),c((()=>{a&&M.current&&(M.current.setValue(""),M.current.select())}),[a]);return d(_,null,d("div",{class:"controls source-controls"},d(Re,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(Tn).map((([e])=>d(fe,{label:l(`indentation.${e}`),active:u===e,onClick:()=>{return t=e,Ct.setIndent(t),void p(t);var t}}))),d("hr",null),Object.keys(Bn).map((e=>d(fe,{label:l(`format.${e}`),active:m===e,onClick:()=>{return t=e,Ct.setFormat(t),void g(t);var t}}))),d("hr",null),d(fe,{icon:w?"square_fill":"square",label:l("highlighting"),onClick:()=>{return e=!w,Ct.setHighlighting(e),void y(e);var e}}))),w?d("pre",{id:"editor",class:"source"}):d("textarea",{ref:C,class:"source",spellcheck:!1,autocorrect:"off",onBlur:k.current}),d("a",{ref:b,style:"display: none;"}))}class Fn extends h.DataModel{constructor(e,t,n,o){super(e),this.mapper=t,this.getter=n,this.setter=o}map(e){return this.mapper(e)}get(e){return this.getter(e)}set(e,t,n){return this.setter(e,t,n)}}const Rn=["loot_table.type","loot_entry.type","function.function","condition.condition","criterion.trigger","recipe.type","dimension.generator.type","dimension.generator.biome_source.type","dimension.generator.biome_source.preset","carver.type","feature.type","decorator.type","feature.tree.minimum_size.type","block_state_provider.type","trunk_placer.type","foliage_placer.type","tree_decorator.type","int_provider.type","float_provider.type","height_provider.type","structure_feature.type","surface_builder.type","processor.processor_type","rule_test.predicate_type","pos_rule_test.predicate_type","template_element.element_type","block_placer.type","block_predicate.type","material_rule.type","material_condition.type","structure_placement.type","density_function.type","root_placer.type","entity.type_specific.cat.variant","entity.type_specific.frog.variant"],Jn=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],Wn=["feature.config","decorator.config","int_provider.value","float_provider.value","block_state_provider.simple_state_provider.state","block_state_provider.rotated_block_provider.state","block_state_provider.weighted_state_provider.entries.entry.data","rule_test.block_state","structure_feature.config","surface_builder.config","template_pool.elements.entry.element","decorator.block_survives_filter.state","material_rule.block.result_state"],Un=["loot_entry.type","function.function","condition.condition","criterion.trigger","dimension.generator.type","dimension.generator.biome_source.type","feature.type","decorator.type","block_state_provider.type","feature.tree.minimum_size.type","trunk_placer.type","foliage_placer.type","tree_decorator.type","block_placer.type","rule_test.predicate_type","processor.processor_type","template_element.element_type","nbt_operation.op","number_provider.value","score_provider.name","score_provider.target","nbt_provider.source","nbt_provider.target","generator_biome.biome","block_predicate.type","material_rule.type","material_condition.type","density_function.type","root_placer.type","entity.type_specific.type"],Gn=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],Yn=["generator_biome.parameters.temperature","generator_biome.parameters.humidity","generator_biome.parameters.continentalness","generator_biome.parameters.erosion","generator_biome.parameters.depth","generator_biome.parameters.weirdness","feature.end_spike.crystal_beam_target","feature.end_gateway.exit","decorator.block_filter.offset","block_predicate.matching_blocks.offset","block_predicate.matching_fluids.offset","model_element.from","model_element.to","model_element.rotation.origin","model_element.faces.uv","item_transform.rotation","item_transform.translation","item_transform.scale","generator_structure.random_spread.locate_offset"],qn=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],Kn=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],Zn=new h.DataModel(h.MapNode(h.StringNode(),h.StringNode()),{historyMax:0});function Xn({model:e,lang:t,version:n,blockStates:o}){var r;const a=new h.ModelPath(e),[s,i,l]=e.schema.hook(Qn,a,Le(e.data),t,n,o,{});return(null==(r=null==i?void 0:i.props)?void 0:r.children.some((e=>e)))?d("div",{class:`node ${e.schema.type(a)}-node`,"data-category":e.schema.category(a)},d("div",{class:"node-header"},s,i),d("div",{class:"node-body"},l)):l}const Qn={base:()=>[null,null,null],boolean:(e,t,n,o,r,a,s)=>[null,d(no,i({},l(i({},e),{path:t,value:n,lang:o,version:r,states:a,ctx:s}))),null],choice({choices:e,config:t,switchNode:n},o,r,a,s,i,l){const c=n.activeCase(o,!0),u=(null==t?void 0:t.context)?new h.ModelPath(o.getModel(),new h.Path(o.getArray(),[t.context])):o,[p,m,f]=c.node.hook(this,u,r,a,s,i,l);if(1===e.length)return[p,m,f];const v=(null==t?void 0:t.choiceContext)?new h.Path([],[t.choiceContext]):(null==t?void 0:t.context)?new h.Path([],[t.context]):o,g=d("select",{value:c.type,onChange:n=>(n=>{var a;const s=null!=(a=e.find((e=>e.type===n)))?a:c,i=s.node.default(),l=s.change?s.change(h.DataModel.unwrapLists(r)):"feature"===t.choiceContext&&"minecraft:decorated"===(null==i?void 0:i.type)?i.config.feature:i;o.model.set(o,h.DataModel.wrapLists(l))})(n.target.value)},e.map((e=>d("option",{value:e.type},lo(a,v.contextPush(e.type))))));return[p,d(_,null,g,m),f]},list({children:e,config:t},n,o,r,a,s,c){const{expand:u,collapse:p,isToggled:m}=to(),[f,g]=v(50),w=n.getContext().join(".");if(Yn.includes(w)){return[d(_,null,[...Array(t.maxLength)].map(((e,t)=>d(co,{lang:r,path:n.modelPush(t)}))),d("div",{class:"fixed-list"})),d(_,null,[...Array(t.maxLength)].map(((t,i)=>{var l;return e.hook(this,n.modelPush(i),null==(l=null==o?void 0:o[i])?void 0:l.node,r,a,s,c)[1]}))),null]}return[null,d("button",{class:"add tooltipped tip-se","aria-label":jt(r,"add_top"),onClick:()=>{Array.isArray(o)||(o=[]);const t=h.DataModel.wrapLists(e.default());n.model.set(n,[{node:t,id:_e()},...o])}},Je.plus_circle),d(_,null,o&&Array.isArray(o)&&o.map((({node:t,id:h},v)=>{if(v===f)return d("div",{class:"node node-header"},d("label",null,jt(r,"entries_hidden",""+(o.length-f))),d("button",{onClick:()=>g(Math.min(f+50,o.length))},jt(r,"entries_hidden.more","50")),d("button",{onClick:()=>g(o.length)},jt(r,"entries_hidden.all")));if(v>f)return null;const w=n.push(v).contextPush("entry"),_="object"===e.type(w),y=m(h);if(_&&(!1===y||void 0===y&&o.length>20))return d("div",{class:"node node-header","data-category":e.category(w)},d(co,{lang:r,path:w,nested:!0}),d("button",{class:"toggle tooltipped tip-se","aria-label":`${jt(r,"expand")}\n${jt(r,"expand_all","Ctrl")}`,onClick:u(h)},Je.chevron_right),d("label",null,lo(r,w,`${v}`)),d(eo,{key:h,path:w,value:t,schema:e}));return d(ao,l(i({key:h,path:w,schema:e,value:t},{lang:r,version:a,states:s,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const e=[...n.get()];e.splice(v,0,{id:_e(),node:Le(t)}),n.model.set(n,e)}}]}),{ctx:l(i({},c),{index:(0===v?1:0)+(v===o.length-1?2:0)})}),_&&d("button",{class:"toggle tooltipped tip-se","aria-label":`${jt(r,"collapse")}\n${jt(r,"collapse_all","Ctrl")}`,onClick:p(h)},Je.chevron_down),d("button",{class:"remove tooltipped tip-se","aria-label":jt(r,"remove"),onClick:()=>w.set(void 0)},Je.trashcan),o.length>1&&d("div",{class:"node-move"},d("button",{class:"move tooltipped tip-se","aria-label":jt(r,"move_up"),onClick:()=>{const e=[...n.get()];[e[v-1],e[v]]=[e[v],e[v-1]],n.model.set(n,e)},disabled:0===v},Je.chevron_up),d("button",{class:"move tooltipped tip-se","aria-label":jt(r,"move_down"),onClick:()=>{const e=[...n.get()];[e[v+1],e[v]]=[e[v],e[v+1]],n.model.set(n,e)},disabled:v===o.length-1},Je.chevron_down)))})),o&&o.length>0&&o.length<=f&&d("div",{class:"node node-header"},d("button",{class:"add tooltipped tip-se","aria-label":jt(r,"add_bottom"),onClick:()=>{Array.isArray(o)||(o=[]);const t=h.DataModel.wrapLists(e.default());n.model.set(n,[...o,{node:t,id:_e()}])}},Je.plus_circle)))]},map({children:e,keys:t,config:n},o,r,a,s,c,u){var p,m,f,v,g;const{expand:w,collapse:y,isToggled:b}=to(),x=new h.ModelPath(Zn,new h.Path([io(o.toString())])),k="block_state_map"===(null==(p=n.validation)?void 0:p.validator)?null==c?void 0:c[h.relativePath(o,n.validation.params.id).get()]:null,C=(null==k?void 0:k.properties)?h.StringNode(null,{enum:Object.keys(null!=(m=k.properties)?m:{})}):t;if(k&&"Properties"===o.last()){"object"!=typeof r&&(r={});const e=Object.entries(null!=(f=k.properties)?f:{}).map((([e,t])=>[e,h.StringNode(null,{enum:t})]));return Object.entries(null!=(v=k.properties)?v:{}).forEach((([e,t])=>{"string"!=typeof r[e]?o.model.errors.add(o.push(e),"error.expected_string"):t.includes(r[e])||o.model.errors.add(o.push(e),"error.invalid_enum_option",r[e])})),h.ObjectNode(Object.fromEntries(e)).hook(this,o,r,a,s,c,u)}return[null,d(_,null,C.hook(this,x,null!=(g=x.get())?g:"",a,s,c,u)[1],d("button",{class:"add tooltipped tip-se","aria-label":jt(a,"add"),onClick:()=>{const t=x.get();o.model.set(o.push(t),h.DataModel.wrapLists(e.default()))}},Je.plus_circle)),d(_,null,"object"==typeof r&&Object.entries(r).map((([t,n])=>{var p,m,f,v;const g=o.modelPush(t),_="object"===e.type(g),x=b(t);if(_&&(!1===x||void 0===x&&r.length>20))return d("div",{class:"node node-header","data-category":e.category(g)},d(co,{lang:a,path:g,nested:!0}),d("button",{class:"toggle tooltipped tip-se","aria-label":`${jt(a,"expand")}\n${jt(a,"expand_all","Ctrl")}`,onClick:w(t)},Je.chevron_right),d("label",null,t),d(eo,{key:t,path:g,value:n,schema:e}));const C=k?h.StringNode(null,{enum:null!=(m=null==(p=k.properties)?void 0:p[t])?m:[]}):e;(null==(f=null==k?void 0:k.properties)?void 0:f[t])&&"string"==typeof n&&!(null==(v=k.properties)?void 0:v[t].includes(n))&&o.model.errors.add(g,"error.invalid_enum_option",n);return d(ao,l(i({key:t,schema:C,path:g,value:n},{lang:a,version:s,states:c,ctx:u}),{label:t}),_&&d("button",{class:"toggle tooltipped tip-se","aria-label":`${jt(a,"collapse")}\n${jt(a,"collapse_all","Ctrl")}`,onClick:y(t)},Je.chevron_down),d("button",{class:"remove tooltipped tip-se","aria-label":jt(a,"remove"),onClick:()=>g.set(void 0)},Je.trashcan))})))]},number:(e,t,n,o,r,a,s)=>[null,d(oo,i({},l(i({},e),{path:t,value:n,lang:o,version:r,states:a,ctx:s}))),null],object({node:e,config:t,getActiveFields:n,getChildModelPath:o},r,a,s,c,u,p){var m;const{expand:f,collapse:v,isToggled:g}=to();if(0==r.getArray().length&&function(e,t){var n;return"feature"===e&&"decorated"===(null==(n=null==t?void 0:t.type)?void 0:n.replace(/^minecraft:/,""))&&ge(null==t?void 0:t.config)}(t.context,a)){const{wrapper:e,fields:t}=function(e,t,n){const o=[],r=po(n,o),a={type:e.type,config:h.ObjectNode({decorators:h.ListNode(pt),feature:mt},{context:"feature.decorated"})},s=h.ObjectNode(a,{context:"feature"}),i=new h.Path(["config","feature"]),l=new h.Path(["config","decorators"]),c=t.getModel(),d=new Fn(s,(e=>{if(e.startsWith(i))return new h.Path([...[...Array(o.length-1)].flatMap((()=>["config","feature"])),...e.modelArr]);if(e.startsWith(l)){if(2===e.modelArr.length)return new h.Path([]);const t=e.modelArr[2];if("number"==typeof t)return new h.Path([...[...Array(t)].flatMap((()=>["config","feature"])),"config","decorator",...e.modelArr.slice(3)])}return e}),(e=>{if(e.equals(l)){const e=[];return po(c.data,e),e}return c.get(d.map(e))}),((e,t,n)=>{if(e.startsWith(i)){const o=[];po(c.data,o);const r=new h.Path([...[...Array(o.length-1)].flatMap((()=>["config","feature"])),...e.modelArr]);return c.set(r,t,n)}if(e.startsWith(l)){const o=e.modelArr[2];if(2===e.modelArr.length){const e=d.get(i);return c.set(new h.Path,mo(e,t),n)}if("number"==typeof o){if(3===e.modelArr.length&&void 0===t){const e=d.get(i),t=[];po(c.data,t),t.splice(o,1);const r=mo(e,t);return c.set(new h.Path,r,n)}{const r=new h.Path([...[...Array(o)].flatMap((()=>["config","feature"])),"config","decorator",...e.modelArr.slice(3)]);return c.set(r,t,n)}}}c.set(e,t,n)}));return d.data={type:c.data.type,config:{decorators:o,feature:r}},d.errors=c.errors,{fields:a,wrapper:d}}(n(r),r,a);a=e.data,n=()=>t,o=(t,n)=>new h.ModelPath(e,new h.Path(t.getArray(),["feature"])).push(n)}let w=null,y=null;if(e.optional())if(void 0===a){const t=()=>r.set(h.DataModel.wrapLists(e.default()));y=d("button",{class:"collapse closed tooltipped tip-se","aria-label":jt(s,"expand"),onClick:t},Je.plus_circle)}else{const e=()=>r.set(void 0);y=d("button",{class:"collapse open tooltipped tip-se","aria-label":jt(s,"remove"),onClick:e},Je.trashcan)}const b=r.getContext().join(".");if(Kn.includes(b)||qn.includes(b)){const e=g(""),t=qn.includes(b)?e:!e;if(w=d(_,null,d("button",{class:"toggle tooltipped tip-se","aria-label":jt(s,t?"collapse":"expand"),onClick:e?v(""):f("")},t?Je.chevron_down:Je.chevron_right)),!t)return[w,y,null]}const x="object"==typeof a&&null!==a&&(null==(m=e.default())?void 0:m.pools)?l(i({},p),{loot:null==a?void 0:a.type}):p,k=d(_,null,"object"==typeof a&&null!==a&&!(e.optional()&&void 0===a)&&Object.entries(n(r)).filter((([e,t])=>t.enabled(r))).map((([e,t])=>{const n=o(r,e),l=n.getContext().join(".");if(Jn.includes(l))return null;const[h,p,m]=t.hook(this,n,a[e],s,c,u,x),f="object"===t.type(n)&&Wn.includes(l),v=Un.includes(l);return f||v?(w=d(_,null,w,d(co,{lang:s,path:n}),d(uo,{lang:s,path:n}),h),y=d(_,null,y,p),f?m:null):d(ao,i({key:e,schema:t,path:n,value:a[e]},{lang:s,version:c,states:u,ctx:x}))})));return[w,y,k]},string:(e,t,n,o,r,a,s)=>[null,d(ro,i({},l(i({},e),{path:t,value:n,lang:o,version:r,states:a,ctx:s}))),null]};function eo({path:e,value:t}){var n,o,r,a,s;switch(e.getContext().join(".")){case"loot_table.pools.entry":return d("label",null,null!=(o=null==(n=null==t?void 0:t.entries)?void 0:n.length)?o:0," entries");case"function.set_contents.entries.entry":case"loot_pool.entries.entry":return d("label",null,null!=(s=null==(r=null==t?void 0:t.name)?void 0:r.replace(/^minecraft:/,""))?s:null==(a=null==t?void 0:t.type)?void 0:a.replace(/^minecraft:/,""))}for(const i of Object.values(null!=t?t:{}))if("string"==typeof i)return d("label",null,i.replace(/^minecraft:/,""));return null}function to(){const[e,t]=v(new Map),[n,o]=v(void 0);return{expand:e=>n=>{n.ctrlKey?(t(new Map),o(!0)):t((t=>new Map(t.set(e,!0))))},collapse:e=>n=>{n.ctrlKey?(t(new Map),o(!1)):t((t=>new Map(t.set(e,!1))))},isToggled:t=>{var o;return e instanceof Map&&(null!=(o=e.get(t))?o:n)}}}function no({path:e,node:t,value:n,lang:o}){const r=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return d(_,null,d("button",{class:!1===n?"selected":"",onClick:()=>r(!1)},jt(o,"false")),d("button",{class:!0===n?"selected":"",onClick:()=>r(!0)},jt(o,"true")))}function oo({path:e,config:t,integer:n,value:o,lang:r}){var a;const s=t=>{const o=t.target.value,r=n?parseInt(o):parseFloat(o);e.model.set(e,r)};return d(_,null,d("input",{type:"text",value:null!=o?o:"",onBlur:s,onKeyDown:e=>{"Enter"===e.key&&s(e)}}),(null==t?void 0:t.color)&&d("input",{type:"color",value:"#"+(null!=(a=null==o?void 0:o.toString(16).padStart(6,"0"))?a:"000000"),onChange:t=>{const n=t.target.value,o=parseInt(n.slice(1),16);e.model.set(e,o)}}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&d("button",{onClick:()=>be(e.model),class:"tooltipped tip-se","aria-label":jt(r,"generate_new_seed")},Je.sync))}function ro({path:e,getValues:t,config:n,node:o,value:r,lang:a,version:s,states:i}){var l;const c=t=>{t.stopPropagation();const n=t.target.value;n!==r&&e.model.set(e,0===n.length?void 0:n)},u=t(),p=e.getContext().join("."),m=so(n)||"resource"!==(null==n?void 0:n.validator)||"string"!=typeof n.params.pool?void 0:n.params.pool;if(Gn.includes(p))return d("textarea",{value:null!=r?r:"",onBlur:c});if(so(n)&&!n.additional||Rn.includes(p)){let t=new h.Path([]);return so(n)&&"string"==typeof n.enum?t=t.contextPush(n.enum):m?t=t.contextPush(m):so(n)&&(t=e),d("select",{value:null!=r?r:"",onChange:c},o.optional()&&d("option",{value:""},jt(a,"unset")),u.map((e=>d("option",{value:e},lo(a,t.contextPush(e.replace(/^minecraft:/,"")))))))}if(so(n)||"block_state_key"!==(null==n?void 0:n.validator)){const e=_e(),t=m?(e=>ve.generators.find((t=>t.id===e.replace(/^\$/,""))))(m):void 0;return d(_,null,d("input",{value:null!=r?r:"",onBlur:c,onKeyDown:e=>{"Enter"===e.key&&c(e)},list:u.length>0?e:""}),u.length>0&&d("datalist",{id:e},u.map((e=>d("option",{value:e})))),t&&u.includes(r)&&r.startsWith("minecraft:")&&d("a",{href:`/${t.url}/?version=${s}&preset=${r.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":jt(a,"follow_reference")},Je.link_external))}{const t=null==i?void 0:i[h.relativePath(e,n.params.id).get()],o=Object.keys(null!=(l=null==t?void 0:t.properties)?l:{});return d("select",{value:null!=r?r:"",onChange:c},o.map((e=>d("option",null,e))))}}const ao=ae((function({label:e,schema:t,path:n,value:o,lang:r,version:a,states:s,ctx:c,actions:u,children:h}){var p;const m=t.type(n),f=t.category(n),v=n.getContext().join("."),[g,w]=Be(),_=l(i({},c),{depth:(null!=(p=c.depth)?p:0)+1});delete _.index;const[y,b,x]=t.hook(Qn,n,o,r,a,s,_);return d("div",{class:`node ${m}-node`,"data-category":f},d("div",{class:"node-header",onContextMenu:e=>{e.preventDefault(),w()}},d(co,{lang:r,path:n}),d(uo,{lang:r,path:n}),h,y,d("label",null,null!=e?e:lo(r,n,`${n.last()}`),g&&d("div",{class:"node-menu"},null==u?void 0:u.map((e=>{var t;return d("div",{key:e.label,class:"menu-item"},d(fe,{icon:e.icon,tooltip:jt(r,e.label),tooltipLoc:"se",onClick:()=>e.onSelect()}),d("span",null,null!=(t=e.description)?t:jt(r,e.label)))})),d("div",{class:"menu-item"},d(fe,{icon:"clippy",tooltip:jt(r,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(v)}),d("span",null,v)))),b),x&&d("div",{class:"node-body"},x))}),((e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&Pe(e.ctx,t.ctx)&&Pe(e.value,t.value)));function so(e){return!!(null==e?void 0:e.enum)}function io(e){var t,n=0;for(t=0;te.path.startsWith(t))):t.model.errors.get(t,!0);if(0===r.length)return null;const a=jt(e,r[0].error,...null!=(o=r[0].params)?o:[]);return ho("node-error","issue_opened",a)}function uo({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),o=jt(e,n);return o===n?null:ho("node-help","info",o)}const ho=(e,t,n)=>{const[o,r]=Be();return d("div",{class:`node-icon ${e}${o?" show":""}`,onClick:r},Je[t],d("span",{class:"icon-popup"},n))};function po(e,t){var n,o;return"decorated"!==(null==(n=null==e?void 0:e.type)?void 0:n.replace(/^minecraft:/,""))?e:ge(null==e?void 0:e.config)?(t.push({id:t.length,node:e.config.decorator}),po(null!=(o=e.config.feature)?o:"",t)):e}function mo(e,t){return 0===t.length?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:mo(e,t)}}}function fo({version:e,model:t,blockStates:n,onError:o}){const{lang:r}=St();if(!t||!n||"none"===r)return d(_,null);const[a]=se((e=>{o(`Error rendering the tree: ${e.message}`),console.error(e)}));if(a)return d(_,null);const[,s]=v(0);return Fe(t,(()=>{s((e=>e+1))})),d("div",{class:"tree","data-cy":"tree"},d(Xn,i({},{model:t,lang:r,version:e,blockStates:n})))}function vo({term:e}){const{actualTheme:t}=Bt(),n="light"===t?"-burn":"",o=`https://${location.host}/assets/giscus${n}.css`;return d(ie,{repo:"misode/misode.github.io",repoId:"MDEwOlJlcG9zaXRvcnkxOTIyNTQyMzA=",category:"Site",categoryId:"DIC_kwDOC3WRFs4COB8r",mapping:e?"specific":"pathname",term:e,reactionsEnabled:"1",emitMetadata:"0",inputPosition:"top",theme:o,lang:"en"})}const go={system:"device_desktop",dark:"moon",light:"sun"};function wo(){const{lang:e,locale:t,changeLanguage:n}=St(),{theme:o,changeTheme:r}=Bt(),{version:a}=Ut(),{title:s}=Rt(),i=Me(p());return d("header",null,d("div",{class:"title"},d(le,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},_o.home),d("h1",null,s),i&&d(Re,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},ve.generators.filter((e=>e.category===(null==i?void 0:i.category)&>(a,e.minVersion))).map((e=>d(fe,{label:t(e.id),active:e.id===i.id,onClick:()=>m(ke(e.url))}))))),d("nav",null,d("ul",null,d("li",{"data-cy":"language-switcher"},d(Re,{icon:"globe",tooltip:t("language")},ve.languages.map((({code:t,name:o})=>d(fe,{label:o,active:t===e,onClick:()=>n(t)}))))),d("li",{"data-cy":"theme-switcher"},d(Re,{icon:go[o],tooltip:t("theme")},Object.entries(go).map((([e,n])=>d(fe,{icon:n,label:t(`theme.${e}`),active:e===o,onClick:()=>r(e)}))))),d("li",{class:"dimmed"},d("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},Je.mark_github)))))}const _o={home:d("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),d("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),d("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),d("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),d("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),d("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:d("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},d("path",{d:"M0 16C0 13.7909 1.79086 12 4 12V12C6.20914 12 8 13.7909 8 16V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V16Z",fill:"#6ACC5D"}),d("path",{d:"M11 4C11 1.79086 12.7909 0 15 0V0C17.2091 0 19 1.79086 19 4V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V4Z",fill:"#FF4C4C"}),d("path",{d:"M22 10C22 7.79086 23.7909 6 26 6V6C28.2091 6 30 7.79086 30 10V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V10Z",fill:"#E5B442"}),d("path",{d:"M0 23C0 20.7909 1.79086 19 4 19V19C6.20914 19 8 20.7909 8 23V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V23Z",fill:"#2BAD1D"}),d("path",{d:"M11 15C11 12.7909 12.7909 11 15 11V11C17.2091 11 19 12.7909 19 15V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V15Z",fill:"#C10B0B"}),d("path",{d:"M22 19C22 16.7909 23.7909 15 26 15V15C28.2091 15 30 16.7909 30 19V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V19Z",fill:"#CC8E00"})),sounds:d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},d("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.5 10C3.5 8.27609 4.18482 6.62279 5.40381 5.40381C6.62279 4.18482 8.27609 3.5 10 3.5C11.7239 3.5 13.3772 4.18482 14.5962 5.40381C15.8152 6.62279 16.5 8.27609 16.5 10C16.5 11.7239 15.8152 13.3772 14.5962 14.5962C13.3772 15.8152 11.7239 16.5 10 16.5C8.27609 16.5 6.62279 15.8152 5.40381 14.5962C4.18482 13.3772 3.5 11.7239 3.5 10V10ZM10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2V2ZM8.379 7.227C8.34101 7.20412 8.29762 7.19175 8.25327 7.19117C8.20892 7.19059 8.16522 7.20181 8.12664 7.2237C8.08807 7.24558 8.05601 7.27733 8.03375 7.3157C8.0115 7.35406 7.99985 7.39765 8 7.442V12.559C8.00003 12.6033 8.0118 12.6467 8.03413 12.685C8.05646 12.7232 8.08854 12.7548 8.12708 12.7765C8.16563 12.7983 8.20926 12.8095 8.25352 12.8088C8.29778 12.8082 8.34108 12.7958 8.379 12.773L12.643 10.214C12.6798 10.1917 12.7103 10.1604 12.7315 10.1229C12.7526 10.0854 12.7638 10.043 12.7638 10C12.7638 9.95695 12.7526 9.91463 12.7315 9.87714C12.7103 9.83965 12.6798 9.80825 12.643 9.786L8.379 7.227Z",fill:"#C5A5E6"}))};function yo({sounds:e,sound:t,delay:n,pitch:o,volume:r,onEdit:a,onDelete:s,delayedPlay:i}){const{locale:l}=St(),{version:u}=Ut(),[h,p]=v(!0),[m,g]=v(!1),[w,_]=v(!1),y=f([]),b=`playsound minecraft:${t} master @s ~ ~ ~ ${r} ${o}`;c((()=>{var n,a,s;const i=e[t];_(0===(null!=(a=null==(n=null==i?void 0:i.sounds)?void 0:n.length)?a:0)),y.current.forEach((e=>e.stop())),y.current=(null!=(s=null==i?void 0:i.sounds)?s:[]).map((e=>{const t="string"==typeof e?e:e.name,n=(a=u,s=t,`${ot(ve.versions.find((e=>e.id===a)),"assets")}/assets/minecraft/sounds/${s}.ogg`);var a,s;const i=new ce.Howl({src:[n],format:["ogg"],volume:r,rate:o});i.on("end",(()=>{g(!1)}));const l=()=>{h&&y.current.every((e=>"loaded"===e.state()))&&p(!1)};return"loaded"===i.state()?setTimeout((()=>l())):i.on("load",(()=>{l()})),i})),p(!0)}),[t,e]),c((()=>{y.current.forEach((e=>e.rate(o)))}),[o]),c((()=>{y.current.forEach((e=>e.volume(r)))}),[r]);const x=()=>{if(h||w)return;k();const e=Math.floor(Math.random()*y.current.length);y.current[e].play(),g(!0)},k=()=>{y.current.forEach((e=>e.stop()))};c((()=>{i&&setTimeout((()=>x()),50*n)}),[i]),c((()=>()=>k()),[]);const[C,M]=v(!1),A=f(void 0);return d("div",{class:`sound-config${h?" loading":m?" playing":""}${w?" invalid":""}`},d(fe,{class:"play",icon:w?"alert":h?"sync":"play",label:l("sounds.play"),onClick:x,tooltip:l(w?"sounds.unknown_sound":h?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),d(Ye,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:t,onChange:e=>a({sound:e})}),d("label",{class:"delay-label"},l("sounds.delay"),": "),d(qe,{class:"btn btn-input delay",min:0,value:n,onChange:e=>a({delay:e})}),d("label",{class:"pitch-label"},l("sounds.pitch"),": "),d(Ke,{class:"pitch tooltipped tip-s",min:.5,max:2,step:.01,"aria-label":o.toFixed(2),style:`--x: ${100/1.5*(o-.5)}%`,value:o,onChange:e=>a({pitch:e})}),d("label",{class:"volume-label"},l("sounds.volume"),": "),d(Ke,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":r.toFixed(2),style:`--x: ${100*r}%`,value:r,onChange:e=>a({volume:e})}),d(fe,{class:"copy"+(C?" active":""),icon:C?"check":"terminal",label:l("copy"),tooltip:l(C?"copied":"sounds.copy_command"),onClick:()=>{navigator.clipboard.writeText(b),M(!0),void 0!==A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{M(!1)}),2e3)}}),d(fe,{class:"remove",icon:"trashcan",tooltip:l("sounds.remove_sound"),onClick:()=>{s(),k()}}))}function bo({title:e,desc:t,link:n,icon:o,children:r}){const a=d(_,null,d("div",{class:"tool-head"},o&&_o[o],d("div",null,d("h3",null,e),d("p",null,t))),r&&d("div",{class:"tool-body"},r));return n?d("a",{class:"tool-card",href:n},a):d("div",{class:"tool-card"},a)}function xo({entries:e,onSelect:t,indent:n}){const o=w((()=>{var t;const n={};for(const o of e){const e=o.indexOf("/");if(e>=0){const r=o.slice(0,e);(null!=(t=n[r])?t:n[r]=[]).push(o.slice(e+1))}}return Object.entries(n)}),e),r=w((()=>e.filter((e=>!e.includes("/")))),e),[a,s]=v(new Set);return d("div",{class:"tree-view",style:`--indent: ${null!=n?n:0};`},o.map((([e,o])=>d("div",null,d(ko,{icon:a.has(e)?"chevron_right":"chevron_down",key:e,label:e,onClick:()=>{return t=e,a.has(t)?a.delete(t):a.add(t),void s(new Set(a));var t}}),!a.has(e)&&d(xo,{entries:o,onSelect:n=>t(`${e}/${n}`),indent:(null!=n?n:0)+1})))),r.map((e=>d(ko,{icon:"file",key:e,label:e,onClick:()=>t(e)}))))}function ko({icon:e,label:t,onClick:n}){return d("div",{class:"entry",onClick:n},Je[e],t)}function Co({change:e,activeTags:t,toggleTag:n}){return d("div",{class:"changelog-entry"},d("div",{class:"changelog-version"},d(Mo,i({},e.version)),d(Mo,i({},e.group))),d("div",{class:"changelog-tags"},e.tags.map((e=>d(Ao,{label:e,onClick:n?()=>n(e):void 0,active:null==t?void 0:t.includes(e)})))),d("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:de(e.content)}}))}function Mo({id:e,article:t}){return null===t?d("span",null,e):d("a",{href:`https://www.minecraft.net/en-us/article/${t}`,target:"_blank"},e)}function Ao({label:e,active:t,onClick:n}){const o="breaking"===e?5:xe(e)%360;return d("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${o}`,onClick:n},"breaking"===e&&Je.alert,e)}function Io({changes:e,defaultOrder:t}){const{locale:n}=St(),[o,r]=v(""),[a,s]=v([]),i=e=>{a.includes(e)?s(a.filter((t=>t!==e))):s([...a,e])},l=w((()=>{const t=o.split(" ").map((e=>e.trim().toLowerCase())).filter((e=>e.length>0));return 0===t.length&&0===a.length?e:null==e?void 0:e.filter((e=>{if(!a.every((t=>e.tags.includes(t))))return!1;const n=e.tags.join(" ")+" "+e.content.toLowerCase();return t.every((e=>e.startsWith("!")?1===e.length||!n.includes(e.slice(1)):n.includes(e)))}))}),[e,o,a]),[c,u]=v("desc"===t),h=w((()=>null==l?void 0:l.sort(((e,t)=>c?t.order-e.order:e.order-t.order))),[l,c]);return d(_,null,d("div",{class:"changelog-query"},d(Ye,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:o,onChange:r}),d(fe,{icon:c?"sort_desc":"sort_asc",label:c?"Newest first":"Oldest first",onClick:()=>u(!c)})),a.length>0&&d("div",{class:"changelog-tags"},a.map((e=>d(Ao,{label:e,onClick:()=>s(a.filter((t=>t!==e)))})))),d("div",{class:"changelog-list"},void 0===h?d("span",null,n("loading")):0===h.length?d("span",null,n("changelog.no_results")):h.map((e=>d(Co,{change:e,activeTags:a,toggleTag:i})))))}function zo({version:e}){const{locale:t}=St(),[n,o]=v("changelog"),[r,a]=v(void 0);c((()=>{et().then((e=>a(e.map((e=>l(i({},e),{tags:e.tags.filter((t=>t!==e.group.id))})))))).catch((e=>console.error(e)))}),[]);const s=w((()=>null==r?void 0:r.filter((t=>t.version.id===e.id||t.group.id===e.id))),[e.id,r]);return d(_,null,d("div",{class:"version-detail"},d("h2",null,e.name),d("div",{class:"version-info"},d(So,{label:t("versions.released"),value:$o(e)}),d(So,{label:t("versions.release_target"),value:e.release_target,link:e.id!==e.release_target?`/versions/?id=${e.release_target}`:void 0}),d(So,{label:t("versions.data_version"),value:e.data_version}),d(So,{label:t("versions.protocol_version"),value:e.protocol_version}),d(So,{label:t("versions.data_pack_format"),value:e.data_pack_version}),d(So,{label:t("versions.resource_pack_format"),value:e.resource_pack_version})),d("div",{class:"version-tabs"},d("span",{class:"changelog"===n?"selected":"",onClick:()=>o("changelog")},t("versions.technical_changes")),d("span",{class:"discussion"===n?"selected":"",onClick:()=>o("discussion")},t("versions.discussion"))),d("div",{class:"version-tab"},"changelog"===n&&d(Io,{changes:s,defaultOrder:"asc"}),"discussion"===n&&d(vo,{term:`version/${e.id}`}))))}function $o(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function jo({version:e,link:t}){const{locale:n}=St();return d("a",{class:"version-entry",href:t},d("span",{class:"version-id"},e.id),d(So,{label:n("versions.released"),value:$o(e),compact:!0}),d(So,{label:n("versions.data_version"),value:e.data_version,optional:!0}),d(So,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}function Eo({versions:e,link:t}){const{locale:n}=St(),[o,r]=v(!0),[a,s]=v(""),i=w((()=>e.filter((e=>!("snapshot"===e.type&&!o)&&e.id.includes(a)))),[e,o,a]);return d(_,null,d("div",{class:"versions-controls"},d(Ye,{class:"btn btn-input version-search",list:"sound-list",placeholder:n("versions.search"),value:a,onChange:s}),d(Ue,{label:"Include snapshots",value:o,onChange:r})),d("div",{class:"version-list"},i.map((e=>d(jo,{version:e,link:null==t?void 0:t(e.id)}))),0===i.length&&d("span",null,n("versions.no_results"))))}function So({label:e,value:t,link:n,compact:o,optional:r}){return d("div",{class:"version-metadata"+(r?" version-metadata-hide":"")},d("span",{class:o?"version-metadata-hide":void 0},e,": "),d("span",{class:"version-metadata-value"},t),n&&d("a",{href:n,class:"version-metadata-link"},Je.link_external))}function Oo({category:e}){const{locale:t}=St();return Rt(t("title.generator_category",t(e))),d("main",null,d("div",{class:"category"},ve.generators.filter((t=>t.category===e)).map((e=>d(bo,{title:t(e.id),link:ke(e.url)})))))}function Lo({}){const{locale:e}=St(),[t,n]=v(null);Rt(e("title.changelog"));const[o,r]=v([]);return c((()=>{et().then((e=>r(e))).catch((e=>{console.error(e),n(e)}))}),[]),d("main",null,d(me,{type:"text",id:"changelog"}),t&&d(We,{error:t,onDismiss:()=>n(null)}),d("div",{class:"changelog"},d(Io,{changes:o,defaultOrder:"desc"})))}function Po({}){var e;const{locale:t}=St(),{version:n,changeVersion:o}=Ut(),{project:r,file:a,updateFile:s,openFile:u,closeFile:f}=Dt(),[g,y]=v(null),[b,x]=se();if(b)return b.message=`Something went wrong rendering the generator: ${b.message}`,d("main",null,d(We,{error:b,onDismiss:x}));const k=Me(p());if(!k)return d("main",null,d(We,{error:`Cannot find generator "${p()}"`}));const C=ve.versions.filter((e=>gt(e.id,k.minVersion,k.maxVersion))).map((e=>e.id));Rt(t("title.generator",t(k.id)),C),gt(n,k.minVersion)||y(`The minimum version for this generator is ${k.minVersion}`),gt(n,void 0,k.maxVersion)||y(`This generator is not available in versions above ${k.maxVersion}`);const M=Ae(p()),I=M.get("preset"),z=M.get("share");c((()=>{E&&I?Y(I).then((e=>{E.reset(h.DataModel.wrapLists(e),!1),Ie({version:n,preset:I,share:void 0})})):E&&z&&_t(z).then((e=>$(E,e)))}),[I,z]);const $=(e,t)=>{if(t.version&&t.version!==n&&o(t.version,!1),t.type&&t.type!==k.id){const e=ve.generators.find((e=>e.id===t.type));e&&m(`${ke(e.url)}?share=${t.id}`)}t.show_preview&&!ge&&(we(!0),oe(!1)),e.reset(h.DataModel.wrapLists(t.data),!1)},j=w((()=>Ct.getBackup(k.id)),[k.id]),[E,S]=v(null),[O,L]=v(null);c((()=>{y(null),S(null),async function(e){return(await vt(e)).blockStates}(n).then((e=>L(e))),async function(e,t){var n;if(!ut[t]||ut[t].version!==e){const r=await vt(e);pt=h.Reference(r.schemas,"configured_decorator"),mt=h.ChoiceNode([{type:"string",node:h.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:h.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const a=null==(n=ve.generators.find((e=>e.id===t)))?void 0:n.schema;if(!a)throw new Error(`Cannot find model ${t}`);try{const n=r.schemas.get(a),o=new h.DataModel(n,{wrapLists:!0});ut[t]?o.reset(ut[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),ut[t]={model:o,version:e}}catch(o){const n=new Error(`Cannot get generator "${t}" for version "${e}": ${Oe(o)}`);throw o instanceof Error&&(n.stack=o.stack),n}}return ut[t].model}(n,k.id).then((async e=>{if(pe.setGenerator(k.id),I){const t=await Y(I);e.reset(h.DataModel.wrapLists(t),!1)}else if(z){const t=await _t(z);$(e,t)}S(e)})).catch((e=>{console.error(e),y(e)}))}),[n,k.id]);const[P,D]=v(!1);Fe(E,(()=>{Ie({version:void 0,preset:void 0,share:void 0}),Ct.setBackup(k.id,h.DataModel.unwrapLists(null==E?void 0:E.data)),y(null),D(!0)}),[k.id]);const[V,N]=v(""),[T,B]=Ne(),[H,F]=Ne(),R=()=>{if(V!==(null==a?void 0:a.id)&&V&&E&&O){const e=Vn(E,O);s(k.id,null==a?void 0:a.id,{id:V,data:e})?B():(F(),a&&N(null==a?void 0:a.id))}else a&&N(null==a?void 0:a.id)};c((()=>{a&&N(a.id)}),[a]),c((()=>{var e;E&&(N(null!=(e=null==a?void 0:a.id)?e:""),a&&k.id===a.type&&E.reset(h.DataModel.wrapLists(a.data)),D(!1))}),[a,E]);const J=e=>{e.ctrlKey&&"z"===e.key?(pe.generatorEvent("undo","Hotkey"),null==E||E.undo()):e.ctrlKey&&"y"===e.key&&(pe.generatorEvent("redo","Hotkey"),null==E||E.redo())},W=e=>{if(e.ctrlKey&&"s"===e.key&&(e.preventDefault(),E&&O&&a)){pe.generatorEvent("save","Hotkey");const e=Vn(E,O);s(k.id,null==a?void 0:a.id,{id:null==a?void 0:a.id,data:e}),D(!1),B()}};c((()=>(document.addEventListener("keyup",J),document.addEventListener("keydown",W),()=>{document.removeEventListener("keyup",J),document.removeEventListener("keydown",W)})),[E,O,a]);const[U,G]=v([]);c((()=>{(async function(e){const t=await vt(e);return ft=t.collections,t.collections})(n).then((e=>{G(e.get(k.id).map((e=>e.slice(10))))})).catch((e=>{console.error(e),y(e)}))}),[n,k.id]);const Y=async e=>{var t,o,r;try{const a=await it(n,null!=(t=k.path)?t:k.id,e),s=null==E?void 0:E.get(new h.Path(["generator","seed"]));return void 0!==(null==(o=null==a?void 0:a.generator)?void 0:o.seed)&&void 0!==s&&(a.generator.seed=s,void 0!==(null==(r=a.generator.biome_source)?void 0:r.seed)&&(a.generator.biome_source.seed=s)),a}catch(a){y(a instanceof Error?a:Oe(a))}},[q,K]=v(void 0),[Z,X]=v(!1),[Q,ee]=Ne({cooldown:3e3}),te=()=>{navigator.clipboard.writeText(null!=q?q:""),ee()};c((()=>{Q||(K(void 0),X(!1))}),[Q]);const[ne,oe]=v(window.innerWidth>820),[re,ae]=v(0),[ie,le]=v(0),[ce,de]=v(0),[ue,he]=Ne(),[ge,we]=v(!1),_e=Pn.includes(k.id)&&!("worldgen/configured_feature"===k.id&>(n,"1.18"));ge&&!_e&&we(!1);let ye=2;_e&&(ye+=1),ne&&(ye+=2);return d(_,null,d("main",{class:ge?"has-preview":""},d(me,{id:"data-pack-generator",type:"text"}),d("div",{class:"controls"},d("div",{class:`project-controls ${a&&"has-file"}`},d("div",{class:"btn-row"},d(Re,{icon:"repo",label:r.name,relative:!1},d(fe,{icon:"arrow_left",label:t("project.go_to"),onClick:()=>m("/project")}),a&&d(fe,{icon:"file",label:t("project.new_file"),onClick:f}),void 0!==j&&d(fe,{icon:"history",label:t("restore_backup"),onClick:()=>{void 0!==j&&(null==E||E.reset(h.DataModel.wrapLists(j),!1))}}),d(Ze,{searchPlaceholder:t("Drafts"===r.name?"project.search_drafts":"project.search"),noResults:t("project.no_files"),values:r.files.filter((e=>e.type===k.id)).map((e=>e.id)),onSelect:e=>u(k.id,e)})),d(Ye,{class:"btn btn-input",placeholder:t("project.unsaved_file"),value:V,onChange:N,onEnter:R,onBlur:R}),a&&d(fe,{icon:"trashcan",tooltip:t("project.delete_file"),onClick:()=>{a&&s(k.id,a.id,{})}})),P?d("div",{class:"status-icon"},Je.dot_fill):T?d("div",{class:"status-icon active"},Je.check):H&&d("div",{class:"status-icon danger"},Je.x)),d("div",{class:"generator-controls"},d(fe,{icon:"upload",label:t("import"),onClick:()=>{pe.generatorEvent("import"),oe(!0),de(ce+1)}}),d(Re,{icon:"archive",label:t("presets"),relative:!1},d(Ze,{searchPlaceholder:t("search"),noResults:t("no_presets"),values:U,onSelect:e=>{pe.generatorEvent("load-preset",e),Ie({version:n,preset:e,share:void 0})}})),d(Re,{icon:"tag",label:n,tooltip:t("switch_version"),"data-cy":"version-switcher"},C.reverse().map((e=>d(fe,{label:e,active:e===n,onClick:()=>{return t=e,Ie({share:void 0}),void o(t);var t}})))),d(Re,{icon:"kebab_horizontal",tooltip:t("more")},d(fe,{icon:"history",label:t("reset"),onClick:()=>{pe.generatorEvent("reset"),null==E||E.reset(h.DataModel.wrapLists(E.schema.default()),!0)}}),d(fe,{icon:"arrow_left",label:t("undo"),onClick:e=>{e.stopPropagation(),pe.generatorEvent("undo","Menu"),null==E||E.undo()}}),d(fe,{icon:"arrow_right",label:t("redo"),onClick:e=>{e.stopPropagation(),pe.generatorEvent("redo","Menu"),null==E||E.redo()}})))),g&&d(We,{error:g,onDismiss:()=>y(null)}),d(fo,l(i({},{model:E,version:n,blockStates:O}),{onError:y}))),d("div",{class:"popup-actions",style:`--offset: -${8+50*ye}px;`},d("div",{class:`popup-action action-preview${_e?" shown":""} tooltipped tip-nw`,"aria-label":t(ge?"hide_preview":"show_preview"),onClick:()=>{pe.generatorEvent("toggle-preview",ge?"hidden":"visible"),we(!ge),!ge&&ne&&oe(!1)}},ge?Je.x_circle:Je.play),d("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":t("share"),onClick:()=>{if(Z)X(!1);else if(I)K(`${location.protocol}//${location.host}/${k.url}/?version=${n}&preset=${I}`),X(!0),te();else if(E&&O){const e=Vn(E,O);Pe(e,E.schema.default())?(K(`${location.protocol}//${location.host}/${k.url}/?version=${n}`),X(!0)):async function(e,t,n,o){try{const r=A.compressToBase64(JSON.stringify(n)),a=btoa(JSON.stringify(n));console.log("Compression rate",a.length/r.length);const s=JSON.stringify({data:r,type:e,version:t,show_preview:o});let i=wt.get(s);if(!i){const e=await yt("/snippets",s);wt.set(s,e.id),i=e.id}const l=ve.generators.find((t=>t.id===e));return`${location.protocol}//${location.host}/${l.url}/?share=${i}`}catch(r){throw r instanceof Error&&(r.message=`Error creating share link: ${r.message}`),r}}(k.id,n,e,ge).then((e=>{K(e),X(!0)})).catch((e=>{e instanceof Error&&y(e)}))}}},Je.link),d("div",{class:`popup-action action-download${ne?" shown":""} tooltipped tip-nw`,"aria-label":t("download"),onClick:()=>{pe.generatorEvent("download"),le(ie+1)}},Je.download),d("div",{class:`popup-action action-copy${ne?" shown":""}${ue?" active":""} tooltipped tip-nw`,"aria-label":t(ue?"copied":"copy"),onClick:()=>{pe.generatorEvent("copy"),ae(re+1)}},ue?Je.check:Je.clippy),d("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":t(ne?"hide_output":"show_output"),onClick:()=>{pe.generatorEvent("toggle-output",ne?"hidden":"visible"),oe(!ne),ae(0),le(0),de(0)}},ne?Je.chevron_right:Je.code)),d("div",{class:"popup-preview"+(ge?" shown":"")},d(Dn,l(i({},{model:E,version:n,id:k.id}),{shown:ge,onError:y}))),d("div",{class:"popup-source"+(ne?" shown":"")},d(Hn,l(i({},{model:E,blockStates:O,doCopy:re,doDownload:ie,doImport:ce}),{name:null!=(e=k.schema)?e:"data",copySuccess:he,onError:y}))),d("div",{class:"popup-share"+(Z?" shown":"")},d(Ye,{value:q,readonly:!0}),d(fe,{icon:Q?"check":"clippy",onClick:te,tooltip:t(Q?"copied":"copy_share"),tooltipLoc:"nw",active:Q,showTooltip:Q})))}function Do({}){const{locale:e}=St();return Rt(e("title.home")),d("main",null,d("div",{class:"home"},d(bo,{title:"Data packs"},ve.generators.filter((e=>!e.category)).map((t=>d(bo,{title:e(t.id),link:ke(t.url)}))),d(bo,{title:e("worldgen"),link:"/worldgen/"})),d(bo,{title:"Resource packs"},ve.generators.filter((e=>"assets"===e.category)).map((t=>d(bo,{title:e(t.id),link:ke(t.url)})))),d(bo,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),d(bo,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),d(bo,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),d(bo,{title:"Technical Changelog",link:"/changelog/"}),d(bo,{title:"Minecraft Versions",link:"/versions/"}),d(vo,null)))}function Vo({}){const{locale:e}=St(),{project:t,openFile:n}=Dt();Rt(e("title.project",t.name));const o=w((()=>t.files.map(Nt)),t.files);return d("main",null,d(me,{id:"data-pack-project",type:"text"}),d("div",{class:"project"},d("h2",null,t.name),d("div",{class:"file-view"},d(xo,{entries:o,onSelect:e=>{const[,t,o,...r]=e.split("/");n(o,`${t}:${r}`)}}))))}function No({}){const{locale:e}=St(),{version:t,changeVersion:n}=Ut(),[o,r]=v(null);Rt(e("title.sounds"));const[a,s]=v({}),u=Object.keys(null!=a?a:{});c((()=>{(async function(e){const t=ve.versions.find((t=>t.id===e));await rt(t);try{const e=`${ot(t,"summary")}/sounds/data.min.json`;return await lt(e)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${Oe(n)}`)}})(t).then(s).catch((e=>{console.error(e),r(e)}))}),[t]);const[h,p]=v(""),[m,g]=v([]),w=()=>{g([{id:_e(),sound:h,delay:0,pitch:1,volume:1},...m])},y=e=>()=>{g(m.filter((t=>t.id!==e)))},[b,x]=v(0),k=f(null);return d("main",null,o&&d(We,{error:o,onDismiss:()=>r(null)}),u.length>0&&d(_,null,d("div",{class:"controls sounds-controls"},d("div",{class:"sound-search-group"},d(Ye,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:h,onChange:p,onEnter:w}),d(fe,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:w})),m.length>1&&d(fe,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:()=>{x(b+1)}}),d("div",{class:"spacer"}),d(fe,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),class:"download-sounds",onClick:()=>{const e=m.some((e=>e.delay>0)),t=m.sort(((e,t)=>e.delay-t.delay)).map((t=>`${e?`execute if score @s delay matches ${t.delay} run `:""}playsound minecraft:${t.sound} master @s ~ ~ ~ ${t.volume} ${t.pitch}`)).join("\n");k.current.setAttribute("href","data:text/plain;charset=utf-8,"+t+"%0A"),k.current.setAttribute("download","sounds.mcfunction"),k.current.click()}}),d(Re,{icon:"tag",label:t},ve.versions.reverse().map((e=>d(fe,{label:e.id,active:e.id===t,onClick:()=>n(e.id)}))))),d("div",{class:"sounds"},m.map((e=>{return d(yo,l(i(i({key:e.id},e),{sounds:a,delayedPlay:b}),{onEdit:(t=e.id,e=>{g(m.map((n=>n.id===t?i(i({},n),e):n)))}),onDelete:y(e.id)}));var t}))),d("a",{ref:k,style:"display: none;"})),d("datalist",{id:"sound-list"},u.map((e=>d("option",{key:e,value:e})))))}function To({}){const{locale:e}=St(),[t,n]=v(null);Rt(e("title.versions"));const[o,r]=v([]);c((()=>{(async function(){const e=ve.versions[ve.versions.length-1];await rt(e);try{return lt(`${ot(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${Oe(t)}`)}})().then((e=>r(e))).catch((e=>{console.error(e),n(e)}))}),[]);const a=Ae(p()).get("id"),s=o.find((e=>e.id===a));Rt(s?s.name:"Versions Explorer",s?[]:void 0);const l=s&&Bo(o,s,-1),u=s&&Bo(o,s,1);return d("main",null,d(me,{type:"text",id:"versions"}),t&&d(We,{error:t,onDismiss:()=>n(null)}),d("div",{class:"versions"},a?d(_,null,d("div",{class:"version-navigation"},d("a",{class:"btn btn-link",href:"/versions/"},Je.three_bars,e("versions.all")),d("a",i({class:"btn btn-link"},u?{href:`/versions/?id=${u.id}`}:{disabled:!0}),Je.arrow_left,e("versions.previous")),d("a",i({class:"btn btn-link"},l?{href:`/versions/?id=${l.id}`}:{disabled:!0}),e("versions.next"),Je.arrow_right)),s?d(zo,{version:s}):d("div",{class:"version-detail"},d("h2",null,a),d("div",{class:"version-info"},d("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")))):d(Eo,{versions:o,link:e=>`/versions/?id=${e}`})))}function Bo(e,t,n){const o=e.findIndex((e=>e.id===t.id))+n;if(!(o<0||o>=e.length))return e[o]}function Ho(){return d(_,null,d(wo,null),d(ue,{onChange:e=>{setTimeout((()=>pe.pageview(ke(e.url))))}},d(Do,{path:"/"}),d(Oo,{path:"/worldgen",category:"worldgen"}),d(Oo,{path:"/assets",category:"assets"}),d(No,{path:"/sounds"}),d(Lo,{path:"/changelog"}),d(To,{path:"/versions"}),d(Vo,{path:"/project"}),d(Po,{default:!0})))}function Fo(){return d(Ot,null,d(Ht,null,d(Gt,null,d(Jt,null,d(Vt,null,d(Ho,null))))))}he(d(Fo,null),document.body); +//# sourceMappingURL=index.37e720ee.js.map diff --git a/assets/index.3e2e038a.js.map b/assets/index.37e720ee.js.map similarity index 99% rename from assets/index.3e2e038a.js.map rename to assets/index.37e720ee.js.map index 1d10ec0a..629889ec 100644 --- a/assets/index.3e2e038a.js.map +++ b/assets/index.37e720ee.js.map @@ -1 +1 @@ -{"version":3,"file":"index.3e2e038a.js","sources":["../../src/app/Analytics.ts","../../src/app/components/Ad.tsx","../../src/app/components/Btn.tsx","../../src/app/Utils.ts","../../src/app/components/BtnInput.tsx","../../src/app/hooks/useActiveTimout.ts","../../src/app/hooks/useCanvas.ts","../../src/app/hooks/useFocus.ts","../../src/app/hooks/useMediaQuery.ts","../../src/app/hooks/useModel.ts","../../src/app/components/BtnMenu.tsx","../../src/app/components/Octicon.tsx","../../src/app/components/ErrorPanel.tsx","../../src/app/components/forms/Checkbox.tsx","../../src/app/components/forms/Input.tsx","../../src/app/components/forms/SearchList.tsx","../../src/app/services/Changelogs.ts","../../src/app/services/DataFetcher.ts","../../src/app/services/Schemas.ts","../../src/app/services/Sharing.ts","../../vite/preload-helper","../../src/app/Store.ts","../../src/app/contexts/Locale.tsx","../../src/app/contexts/Project.tsx","../../src/app/contexts/Theme.tsx","../../src/app/contexts/Title.tsx","../../src/app/contexts/Version.tsx","../../src/app/previews/BiomeSource.ts","../../src/app/previews/Decorator.ts","../../src/app/previews/noise/NoiseChunkGenerator.ts","../../src/app/previews/NoiseSettings.ts","../../src/app/components/previews/BiomeSourcePreview.tsx","../../src/app/components/previews/DecoratorPreview.tsx","../../src/app/components/previews/DensityFunctionPreview.tsx","../../src/app/components/previews/NoisePreview.tsx","../../src/app/previews/NormalNoise.ts","../../src/app/components/previews/NoiseSettingsPreview.tsx","../../src/app/components/generator/PreviewPanel.tsx","../../src/app/schema/transformOutput.ts","../../src/app/components/generator/SourcePanel.tsx","../../src/app/schema/ModelWrapper.ts","../../src/app/schema/renderHtml.tsx","../../src/app/components/generator/Tree.tsx","../../src/app/components/Giscus.tsx","../../src/app/components/Header.tsx","../../src/app/components/Icons.tsx","../../src/app/components/sounds/SoundConfig.tsx","../../src/app/components/ToolCard.tsx","../../src/app/components/TreeView.tsx","../../src/app/components/versions/ChangelogEntry.tsx","../../src/app/components/versions/ChangelogTag.tsx","../../src/app/components/versions/ChangelogList.tsx","../../src/app/components/versions/VersionDetail.tsx","../../src/app/components/versions/VersionEntry.tsx","../../src/app/components/versions/VersionList.tsx","../../src/app/components/versions/VersionMetaData.tsx","../../src/app/pages/Category.tsx","../../src/app/pages/Changelog.tsx","../../src/app/pages/Generator.tsx","../../src/app/pages/Home.tsx","../../src/app/pages/Project.tsx","../../src/app/pages/Sounds.tsx","../../src/app/pages/Versions.tsx","../../src/app/App.tsx","../../src/app/Main.tsx"],"sourcesContent":["export namespace Analytics {\n\tconst ID_SITE = 'Site'\n\tconst ID_GENERATOR = 'Generator'\n\n\tconst DIM_THEME = 1\n\tconst DIM_VERSION = 3\n\tconst DIM_LANGUAGE = 4\n\tconst DIM_PREVIEW = 5\n\tconst DIM_GENERATOR = 6\n\tconst DIM_PREFERS_COLOR_SCHEME = 7\n\n\tfunction event(category: string, action: string, label?: string) {\n\t\tga('send', 'event', category, action, label)\n\t}\n\n\tfunction dimension(index: number, value: string) {\n\t\tga('set', `dimension${index}`, value)\n\t}\n\n\texport function pageview(page: string) {\n\t\tga('set', 'page', page)\n\t\tga('send', 'pageview')\n\t}\n\n\texport function setLanguage(language: string) {\n\t\tdimension(DIM_LANGUAGE, language)\n\t\tevent(ID_SITE, 'set-language', language)\n\t}\n\n\texport function setTheme(theme: string) {\n\t\tdimension(DIM_THEME, theme)\n\t\tevent(ID_SITE, 'set-theme', theme)\n\t}\n\n\texport function setVersion(version: string) {\n\t\tdimension(DIM_VERSION, version)\n\t\tevent(ID_GENERATOR, 'set-version', version)\n\t}\n\n\texport function setPreview(preview: string) {\n\t\tdimension(DIM_PREVIEW, preview)\n\t\tevent(ID_GENERATOR, 'set-preview', preview)\n\t}\n\n\texport function setGenerator(generator: string) {\n\t\tdimension(DIM_GENERATOR, generator)\n\t}\n\n\texport function setPrefersColorScheme(colorScheme: string) {\n\t\tdimension(DIM_PREFERS_COLOR_SCHEME, colorScheme)\n\t}\n\n\texport function generatorEvent(action: string, label?: string) {\n\t\tevent(ID_GENERATOR, action, label)\n\t}\n}\n","import { useEffect } from 'preact/hooks'\n\ndeclare const ethicalads: any\n\ntype AdProps = {\n\ttype: 'text' | 'image',\n\tid: string,\n}\nexport function Ad({ type, id }: AdProps) {\n\tuseEffect(() => {\n\t\tdocument.getElementById('ad-placeholder')?.remove()\n\t\tif ('ethicalads' in window) {\n\t\t\tethicalads.load()\n\t\t}\n\t}, [])\n\n\treturn
\n}\n","import { Octicon } from '.'\n\ntype BtnProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tactive?: boolean,\n\ttooltip?: string,\n\ttooltipLoc?: 'se' | 'sw' | 'nw',\n\tshowTooltip?: boolean,\n\tclass?: string,\n\tonClick?: (event: MouseEvent) => unknown,\n}\nexport function Btn({ icon, label, active, class: clazz, tooltip, tooltipLoc, onClick }: BtnProps) {\n\treturn
\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t
\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport { getCurrentUrl, route } from 'preact-router'\nimport rfdc from 'rfdc'\nimport config from '../config.json'\n\nexport function isPromise(obj: any): obj is Promise {\n\treturn typeof (obj as any)?.then === 'function' \n}\n\nexport function isObject(obj: any) {\n\treturn typeof obj === 'object' && obj !== null\n}\n\nconst dec2hex = (dec: number) => ('0' + dec.toString(16)).substr(-2)\n\nexport function hexId(length = 12) {\n\tvar arr = new Uint8Array(length / 2)\n\twindow.crypto.getRandomValues(arr)\n\treturn Array.from(arr, dec2hex).join('')\n}\n\nexport function randomSeed() {\n\treturn BigInt(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))\n}\n\nexport function newSeed(model: DataModel) {\n\tconst seed = Math.floor(Math.random() * (4294967296)) - 2147483648\n\tconst dimensions = model.get(new Path(['dimensions']))\n\tmodel.set(new Path(['seed']), seed, true)\n\tif (isObject(dimensions)) {\n\t\tObject.keys(dimensions).forEach(id => {\n\t\t\tmodel.set(new Path(['dimensions', id, 'generator', 'seed']), seed, true)\n\t\t\tmodel.set(new Path(['dimensions', id, 'generator', 'biome_source', 'seed']), seed, true)\n\t\t})\n\t}\n\tmodel.set(new Path(['placement', 'salt']), Math.abs(seed), true)\n\tmodel.set(new Path(['generator', 'seed']), seed, true)\n\tmodel.set(new Path(['generator', 'biome_source', 'seed']), seed)\n}\n\nexport function htmlEncode(str: string) {\n\treturn str.replace(/&/g, '&').replace(//g, '>')\n\t\t.replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/')\n}\n\nexport function hashString(s: string) {\n\tlet h = 0\n\tfor(let i = 0; i < s.length; i++)\n\t\th = Math.imul(31, h) + s.charCodeAt(i) | 0\n\treturn h\n}\n\nexport function cleanUrl(url: string) {\n\treturn `/${url}/`.replaceAll('//', '/')\n}\n\nexport function getPath(url: string) {\n\tconst searchIndex = url.indexOf('?')\n\tif (searchIndex >= 0) {\n\t\turl = url.slice(0, searchIndex)\n\t}\n\treturn cleanUrl(url)\n}\n\nexport function getGenerator(url: string) {\n\tconst trimmedUrl = getPath(url).replace(/^\\//, '').replace(/\\/$/, '')\n\treturn config.generators.find(g => g.url === trimmedUrl)\n}\n\nexport function getSearchParams(url: string) {\n\tconst searchIndex = url.indexOf('?')\n\tif (searchIndex >= 0) {\n\t\turl = url.slice(searchIndex + 1)\n\t\treturn new Map(url.split('&').map<[string, string]>(param => {\n\t\t\tconst index = param.indexOf('=')\n\t\t\tif (index === -1) return [param, 'true']\n\t\t\treturn [decodeURIComponent(param.slice(0, index)), decodeURIComponent(param.slice(index + 1))]\n\t\t}))\n\t}\n\treturn new Map()\n}\n\nexport function setSeachParams(modifications: Record, newPath?: string) {\n\tconst url = getCurrentUrl()\n\tconst searchParams = getSearchParams(url)\n\tObject.entries(modifications).forEach(([key, value]) => {\n\t\tif (value === undefined) searchParams.delete(key)\n\t\telse searchParams.set(key, value)\n\t})\n\tconst search = Array.from(searchParams).map(([key, value]) =>\n\t\t`${encodeURIComponent(key)}=${encodeURIComponent(value).replaceAll('%2F', '/')}`)\n\troute(`${newPath ? cleanUrl(newPath) : getPath(url)}${search.length === 0 ? '' : `?${search.join('&')}`}`, true)\n}\n\nexport function stringToColor(str: string): [number, number, number] {\n\tconst h = Math.abs(hashString(str))\n\treturn [h % 256, (h >> 8) % 256, (h >> 16) % 256]\n}\n\nexport function square(a: number) {\n\treturn a * a\n}\n\nexport function clamp(a: number, b: number, c: number) {\n\treturn Math.max(a, Math.min(b, c))\n}\n\nexport function clampedLerp(a: number, b: number, c: number): number {\n\tif (c < 0) {\n\t\treturn a\n\t} else if (c > 1) {\n\t\treturn b\n\t} else {\n\t\treturn lerp(c, a, b)\n\t}\n}\n\nexport function lerp(a: number, b: number, c: number): number {\n\treturn b + a * (c - b)\n}\n\nexport function lerp2(a: number, b: number, c: number, d: number, e: number, f: number): number {\n\treturn lerp(b, lerp(a, c, d), lerp(a, e, f))\n}\n\nexport function lerp3(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) {\n\treturn lerp(c, lerp2(a, b, d, e, f, g), lerp2(a, b, h, i, j, k))\n}\n\nexport function smoothstep(x: number): number {\n\treturn x * x * x * (x * (x * 6 - 15) + 10)\n}\n\nexport function message(e: unknown): string {\n\tif (e instanceof Error) return e.message\n\treturn `${e}`\n}\n\nexport const deepClone = rfdc()\n\n/**\n * MIT License\n * \n * Copyright (c) 2017 Evgeny Poberezkin\n * \n * https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE\n */\nexport function deepEqual(a: any, b: any) {\n\tif (a === b) return true\n\n\tif (a && b && typeof a == 'object' && typeof b == 'object') {\n\t\tif (a.constructor !== b.constructor) return false\n\t\tlet length, i\n\t\tif (Array.isArray(a)) {\n\t\t\tlength = a.length\n\t\t\tif (length != b.length) return false\n\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\tif (!deepEqual(a[i], b[i])) return false\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\tif (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf()\n\t\tif (a.toString !== Object.prototype.toString) return a.toString() === b.toString()\n\t\tconst keys = Object.keys(a)\n\t\tlength = keys.length\n\t\tif (length !== Object.keys(b).length) return false\n\t\tfor (i = length; i-- !== 0;)\n\t\t\tif (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false\n\t\tfor (i = length; i-- !== 0;) {\n\t\t\tconst key = keys[i]\n\t\t\tif (!deepEqual(a[key], b[key])) return false\n\t\t}\n\t\treturn true\n\t}\n\treturn a !== a && b !== b\n}\n\nexport class BiMap {\n\tprivate readonly forward: Map\n\tprivate readonly backward: Map\n\n\tconstructor() {\n\t\tthis.forward = new Map()\n\t\tthis.backward = new Map()\n\t}\n\n\tpublic set(a: A, b: B) {\n\t\tthis.forward.set(a, b)\n\t\tthis.backward.set(b, a)\n\t}\n\n\tpublic getA(key: B) {\n\t\treturn this.backward.get(key)\n\t}\n\n\tpublic getB(key: A) {\n\t\treturn this.forward.get(key)\n\t}\n\n\tpublic getOrPut(key: A, defaultValue: B) {\n\t\tconst b = this.forward.get(key)\n\t\tif (b === undefined) {\n\t\t\tthis.set(key, defaultValue)\n\t\t\treturn defaultValue\n\t\t}\n\t\treturn b\n\t}\n}\n","import { useEffect, useRef } from 'preact/hooks'\nimport { Octicon } from '.'\nimport { hexId } from '../Utils'\n\ntype BtnInputProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tlarge?: boolean,\n\tlarger?: boolean,\n\tdoSelect?: number,\n\tvalue?: string,\n\tplaceholder?: string,\n\tdataList?: string[],\n\tonChange?: (value: string) => unknown,\n}\nexport function BtnInput({ icon, label, large, larger, doSelect, value, placeholder, dataList, onChange }: BtnInputProps) {\n\tconst onInput = onChange === undefined ? () => {} : (e: any) => {\n\t\tconst value = (e.target as HTMLInputElement).value\n\t\tonChange?.(value)\n\t}\n\n\tconst ref = useRef(null)\n\tuseEffect(() => {\n\t\tif (doSelect && ref.current) {\n\t\t\tref.current.select()\n\t\t}\n\t}, [doSelect])\n\n\tconst dataListId = dataList && hexId()\n\n\treturn
e.stopPropagation()}>\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t\t\n\t\t{dataList && \n\t\t\t{dataList.map(e => }\n\t
\n}\n","import { useRef, useState } from 'preact/hooks'\n\ninterface ActiveTimeoutOptions {\n\tcooldown?: number,\n\tinvert?: boolean,\n\tinitial?: boolean,\n}\nexport function useActiveTimeout({ cooldown, invert, initial }: ActiveTimeoutOptions = {}): [boolean | undefined, () => unknown] {\n\tconst [active, setActive] = useState(initial)\n\tconst timeout = useRef(undefined)\n\n\tconst trigger = () => {\n\t\tsetActive(invert ? false : true)\n\t\tif (timeout.current !== undefined) clearTimeout(timeout.current)\n\t\ttimeout.current = setTimeout(() => {\n\t\t\tsetActive(invert ? true : false)\n\t\t}, cooldown ?? 2000) as any\n\t}\n\n\treturn [active, trigger]\n}\n","import type { Inputs } from 'preact/hooks'\nimport { useEffect, useRef } from 'preact/hooks'\n\ntype Vec2 = [number, number]\n\nexport function useCanvas({ size, draw, onDrag, onHover, onLeave }: {\n\tsize: () => Vec2,\n\tdraw: (img: ImageData) => Promise,\n\tonDrag?: (dx: number, dy: number) => Promise,\n\tonHover?: (x: number, y: number) => unknown,\n\tonLeave?: () => unknown,\n}, inputs?: Inputs) {\n\tconst canvas = useRef(null)\n\n\tconst dragStart = useRef()\n\tconst dragRequest = useRef()\n\tconst dragPending = useRef([0, 0])\n\tconst dragBusy = useRef(false)\n\n\tuseEffect(() => {\n\t\tconst onMouseDown = (e: MouseEvent) => {\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\tif (dragStart.current === undefined) {\n\t\t\t\tconst x = e.offsetX / canvas.current.clientWidth\n\t\t\t\tconst y = e.offsetY / canvas.current.clientHeight\n\t\t\t\tonHover?.(x, y)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (!onDrag) return\n\t\t\tconst dx = e.offsetX - dragStart.current[0]\n\t\t\tconst dy = e.offsetY - dragStart.current[1]\n\t\t\tif (!(dx === 0 && dy === 0)) {\n\t\t\t\tdragPending.current = [dragPending.current[0] + dx, dragPending.current[1] + dy]\n\t\t\t\tif (!dragBusy.current) {\n\t\t\t\t\tcancelAnimationFrame(dragRequest.current)\n\t\t\t\t\tdragRequest.current = requestAnimationFrame(async () => {\n\t\t\t\t\t\tdragBusy.current = true\n\t\t\t\t\t\tconst dx = dragPending.current[0] / canvas.current.clientWidth\n\t\t\t\t\t\tconst dy = dragPending.current[1] / canvas.current.clientHeight\n\t\t\t\t\t\tdragPending.current = [0, 0]\n\t\t\t\t\t\tawait onDrag?.(dx, dy)\n\t\t\t\t\t\tdragBusy.current = false\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseUp = () => {\n\t\t\tdragStart.current = undefined\n\t\t}\n\t\tconst onMouseLeave = () => {\n\t\t\tonLeave?.()\n\t\t}\n\n\t\tcanvas.current.addEventListener('mousedown', onMouseDown)\n\t\tcanvas.current.addEventListener('mousemove', onMouseMove)\n\t\tcanvas.current.addEventListener('mouseleave', onMouseLeave)\n\t\tdocument.body.addEventListener('mouseup', onMouseUp)\n\n\t\treturn () => {\n\t\t\tcanvas.current?.removeEventListener('mousedown', onMouseDown)\n\t\t\tcanvas.current?.removeEventListener('mousemove', onMouseMove)\n\t\t\tcanvas.current?.removeEventListener('mouseleave', onMouseLeave)\n\t\t\tdocument.body.removeEventListener('mouseup', onMouseUp)\n\t\t}\n\t}, [...inputs ?? [], canvas.current])\n\n\tconst redraw = useRef<() => Promise>()\n\tconst redrawCount = useRef(0)\n\tredraw.current = async () => {\n\t\tconst ctx = canvas.current.getContext('2d')!\n\t\tconst s = size()\n\t\tcanvas.current.width = s[0]\n\t\tcanvas.current.height = s[1]\n\t\tconst img = ctx.getImageData(0, 0, s[0], s[1])\n\t\tconst ownCount = redrawCount.current += 1\n\t\ttry {\n\t\t\tawait draw(img)\n\t\t} catch (e) {\n\t\t\tthrow e\n\t\t}\n\t\tif (ownCount === redrawCount.current) {\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t}\n\t}\n\n\treturn {\n\t\tcanvas,\n\t\tredraw: redraw.current,\n\t}\n}\n","import { useEffect, useState } from 'preact/hooks'\n\nexport function useFocus(): [boolean, () => unknown] {\n\tconst [active, setActive] = useState(false)\n\n\tconst hider = () => {\n\t\tsetActive(false)\n\t}\n\n\tuseEffect(() => {\n\t\tif (active) {\n\t\t\tdocument.body.addEventListener('click', hider)\n\t\t\tdocument.body.addEventListener('contextmenu', hider)\n\t\t}\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('click', hider)\n\t\t\tdocument.body.removeEventListener('contextmenu', hider)\n\t\t}\n\t}, [active])\n\n\treturn [active, () => setActive(true)]\n}\n","import { useEffect, useState } from 'preact/hooks'\n\nexport function useMediaQuery(query: string): boolean {\n\tconst [prefers, setPrefers] = useState(matchMedia(query).matches)\n\n\tconst onChange = (e: MediaQueryListEvent) => {\n\t\tsetPrefers(e.matches)\n\t}\n\n\tuseEffect(() => {\n\t\tconst mediaQuery = matchMedia(query)\n\t\tmediaQuery.addEventListener('change', onChange)\n\t\treturn () => {\n\t\t\tmediaQuery.removeEventListener('change', onChange)\n\t\t}\n\t}, [query])\n\n\treturn prefers\n}\n","import type { DataModel } from '@mcschema/core'\nimport type { Inputs } from 'preact/hooks'\nimport { useEffect } from 'preact/hooks'\n\nexport function useModel(model: DataModel | undefined | null, invalidated: (model: DataModel) => unknown, inputs?: Inputs) {\n\tconst listener = {\n\t\tinvalidated() {\n\t\t\tif (model) {\n\t\t\t\tinvalidated(model)\n\t\t\t}\n\t\t},\n\t}\n\n\tuseEffect(() => {\n\t\tmodel?.addListener(listener)\n\t\treturn () => {\n\t\t\tmodel?.removeListener(listener)\n\t\t}\n\t}, [model, ...inputs ?? []])\n}\n","import type { ComponentChildren } from 'preact'\nimport type { Octicon } from '.'\nimport { Btn } from '.'\nimport { useFocus } from '../hooks'\n\ninterface BtnMenuProps extends JSX.HTMLAttributes {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\trelative?: boolean,\n\ttooltip?: string,\n\ttooltipLoc?: 'se' | 'sw' | 'nw',\n\tchildren: ComponentChildren,\n}\nexport function BtnMenu(props: BtnMenuProps) {\n\tconst { icon, label, relative, tooltip, tooltipLoc, children } = props\n\tconst [active, setActive] = useFocus()\n\n\treturn
\n\t\t\n\t\t{active &&
\n\t\t\t{children}\n\t\t
}\n\t
\n}\n","export const Octicon = {\n\talert: ,\n\tarchive: ,\n\tarrow_left: ,\n\tarrow_right: ,\n\tcheck: ,\n\tchevron_down: ,\n\tchevron_right: ,\n\tchevron_up: ,\n\tclippy: ,\n\tcode: ,\n\tdash: ,\n\tdevice_desktop: ,\n\tdot_fill: ,\n\tdownload: ,\n\tduplicate: ,\n\teye: ,\n\teye_closed: ,\n\tfile: ,\n\tfile_directory: ,\n\tgear: ,\n\tglobe: ,\n\thistory: ,\n\tinfo: ,\n\tissue_opened: ,\n\tkebab_horizontal: ,\n\tlink: ,\n\tlink_external: ,\n\tmark_github: ,\n\tmoon: ,\n\tplay: ,\n\tplus: ,\n\tplus_circle: ,\n\trepo: ,\n\tsearch: ,\n\tsort_asc: ,\n\tsort_desc: ,\n\tsquare: ,\n\tsquare_fill: ,\n\tstack: ,\n\tsun: ,\n\tsync: ,\n\ttag: ,\n\tterminal: ,\n\tthree_bars: ,\n\ttrashcan: ,\n\tunfold: ,\n\tupload: ,\n\tx: ,\n\tx_circle: ,\n}\n","import { useEffect, useMemo, useState } from 'preact/hooks'\nimport { mapStackTrace } from 'sourcemapped-stacktrace'\nimport { Octicon } from './Octicon'\n\ntype ErrorPanelProps = {\n\terror: string | Error,\n\tonDismiss?: () => unknown,\n}\nexport function ErrorPanel({ error, onDismiss }: ErrorPanelProps) {\n\tconst [stackVisible, setStackVisible] = useState(false)\n\tconst [stack, setStack] = useState(undefined)\n\n\tuseEffect(() => {\n\t\tif (error instanceof Error) {\n\t\t\tconst stack = error.stack!.split('\\n').map(line => {\n\t\t\t\treturn line.replace(/^(\\s+)at (?:async )?(https?:.*)/, '$1at ($2)')\n\t\t\t})\n\t\t\tsetStack(stack.join('\\n'))\n\t\t\tmapStackTrace(stack.join('\\n'), (mapped) => {\n\t\t\t\tconst mappedStack = mapped.map(line => {\n\t\t\t\t\treturn line.replace(/..\\/..\\/src\\//, 'src/')\n\t\t\t\t}).join('\\n')\n\t\t\t\tsetStack(mappedStack)\n\t\t\t})\n\t\t}\n\t}, [error])\n\n\tconst url = useMemo(() => {\n\t\tlet url ='https://github.com/misode/misode.github.io/issues/new'\n\t\tif (error instanceof Error) {\n\t\t\turl += `?title=${encodeURIComponent(`${error.name}: ${error.message}`)}`\n\t\t\tif (stack) {\n\t\t\t\turl += `&body=${encodeURIComponent(`\\`\\`\\`\\n${error.name}: ${error.message}\\n${stack}\\n\\`\\`\\`\\n`)}`\n\t\t\t}\n\t\t} else {\n\t\t\turl += `?title=${encodeURIComponent(error.toString())}`\n\t\t}\n\t\treturn url\n\t}, [error, stack])\n\n\treturn
\n\t\t{onDismiss &&
{Octicon.x}
}\n\t\t

\n\t\t\t{error instanceof Error ? error.message : error}\n\t\t\t{stack && setStackVisible(!stackVisible)}>\n\t\t\t\t{Octicon.info}\n\t\t\t}\n\t\t

\n\t\t{stack && stackVisible &&
{stack}
}\n\t\t

If you think this is a bug, you can report it on GitHub

\n\t
\n}\n","import { hexId } from '../../Utils'\n\ninterface Props {\n\tlabel: string,\n\tvalue: boolean,\n\tonChange: (value: boolean) => unknown,\n}\nexport function Checkbox({ label, value, onChange }: Props) {\n\tconst id = hexId()\n\treturn \n}\n","import type { JSXInternal } from 'preact/src/jsx'\n\ntype InputProps = JSXInternal.HTMLAttributes\n\ntype BaseInputProps = Omit & {\n\tonChange?: (value: T) => unknown,\n\tonEnter?: (value: T) => unknown,\n}\nfunction BaseInput(name: string, type: string, fn: (value: string) => T) {\n\tconst component = (props: BaseInputProps) => {\n\t\tconst onChange = props.onChange && ((evt: Event) => {\n\t\t\tconst value = (evt.target as HTMLInputElement).value\n\t\t\tprops.onChange?.(fn(value))\n\t\t})\n\t\tconst onKeyDown = props.onEnter && ((evt: KeyboardEvent) => {\n\t\t\tif (evt.key === 'Enter') {\n\t\t\t\tconst value = (evt.target as HTMLInputElement).value\n\t\t\t\tprops.onEnter?.(fn(value))\n\t\t\t}\n\t\t})\n\t\treturn \n\t}\n\tcomponent.displayName = name\n\treturn component\n}\n\nexport const TextInput = BaseInput('TextInput', 'text', v => v)\n\nexport const NumberInput = BaseInput('NumberInput', 'number', v => Number(v))\n\nexport const RangeInput = BaseInput('RangeInput', 'range', v => Number(v))\n","import { useMemo, useState } from 'preact/hooks'\nimport { Btn, BtnInput } from '..'\n\ninterface Props {\n\tvalues?: string[],\n\tonSelect?: (value: string) => unknown,\n\tsearchPlaceholder?: string,\n\tnoResults?: string,\n}\nexport function SearchList({ values, onSelect, searchPlaceholder, noResults }: Props) {\n\tconst [search, setSearch] = useState('')\n\tconst results = useMemo(() => {\n\t\tconst terms = search.trim().split(' ')\n\t\treturn values?.filter(v => terms.every(t => v.includes(t))) ?? []\n\t}, [values, search])\n\n\treturn <>\n\t\t\n\t\t
\n\t\t\t{results.map(v => onSelect?.(v)} />)}\n\t\t\t{results.length === 0 && }\n\t\t
\n\t\n}\n","import { isObject } from '../Utils'\n\nconst repo = 'https://raw.githubusercontent.com/misode/technical-changes/main'\n\nexport type Change = {\n\tgroup: ChangelogVersion,\n\tversion: ChangelogVersion,\n\torder: number,\n\ttags: string[],\n\tcontent: string,\n}\n\nexport type ChangelogVersion = {\n\tid: string,\n\tarticle: string | null,\n}\n\nlet Changelogs: Change[] | Promise | null = null\n\nexport async function getChangelogs() {\n\tif (!Changelogs) {\n\t\tconst index = await (await fetch(`${repo}/index.json`)).json() as string[]\n\t\tChangelogs = (await Promise.all(\n\t\t\tindex.map((group, i) => fetchGroup(parseVersion(group), i))\n\t\t)).flat().map(change => ({\n\t\t\t...change,\n\t\t\ttags: [change.group.id, ...change.tags],\n\t\t}))\n\t}\n\treturn Changelogs\n}\n\nasync function fetchGroup(group: ChangelogVersion, groupIndex: number) {\n\tconst index = await (await fetch(`${repo}/${group.id}/index.json`)).json() as string[]\n\treturn (await Promise.all(\n\t\tindex.map((version, i) => fetchChangelog(group, parseVersion(version), groupIndex, i))\n\t)).flat()\n}\n\nasync function fetchChangelog(group: ChangelogVersion, version: ChangelogVersion, groupIndex: number, versionIndex: number) {\n\tconst text = await (await fetch(`${repo}/${group.id}/${version.id}.md`)).text()\n\treturn parseChangelog(text).map(change => ({\n\t\tversion,\n\t\tgroup,\n\t\torder: groupIndex * 1000 + versionIndex,\n\t\t...change,\n\t}))\n}\n\nfunction parseChangelog(text: string) {\n\treturn text.split('\\n\\n')\n\t\t.map(entry => {\n\t\t\tconst i = entry.indexOf('|')\n\t\t\treturn {\n\t\t\t\ttags: entry.substring(0, i).trim().split(' '),\n\t\t\t\tcontent: entry.slice(i + 1).trim()\n\t\t\t\t\t.replaceAll('->', '→')\n\t\t\t\t\t.replaceAll('\\n...\\n', '\\n\\n'),\n\t\t\t}\n\t\t})\n}\n\nfunction parseVersion(version: unknown): ChangelogVersion {\n\tif (typeof version === 'string') {\n\t\treturn {\n\t\t\tid: version,\n\t\t\tarticle: version.match(/\\d\\dw\\d\\d[a-z]/) ? 'minecraft-snapshot-' + version : version.match(/\\d+\\.\\d+(\\.\\d+)?-pre[0-9]+/) ? 'minecraft-' + version.replaceAll('.', '-').replaceAll('pre', 'pre-release-') : null,\n\t\t}\n\t} else if (isObject(version)) {\n\t\treturn version as ChangelogVersion\n\t}\n\treturn { id: 'unknown', article: null }\n}\n","import type { CollectionRegistry } from '@mcschema/core';\nimport config from '../../config.json';\nimport { message } from '../Utils';\nimport type { BlockStateRegistry, VersionId } from './Schemas';\n\n// Cleanup old caches\n['1.15', '1.16', '1.17'].forEach(v => localStorage.removeItem(`cache_${v}`));\n['mcdata_master', 'vanilla_datapack_summary'].forEach(v => localStorage.removeItem(`cached_${v}`))\ncaches.delete('misode-v1')\n\nconst CACHE_NAME = 'misode-v2'\nconst CACHE_LATEST_VERSION = 'cached_latest_version'\n\ntype Version = {\n\tid: string,\n\tref?: string,\n\tdynamic?: boolean,\n}\n\ndeclare var __LATEST_VERSION__: string\nconst latestVersion = __LATEST_VERSION__ ?? ''\nconst mcmetaUrl = 'https://raw.githubusercontent.com/misode/mcmeta'\n\ntype McmetaTypes = 'summary' | 'data' | 'assets' | 'registries'\n\nfunction mcmeta(version: { dynamic: true } | { dynamic?: false, ref?: string}, type: McmetaTypes) {\n\treturn `${mcmetaUrl}/${version.dynamic ? type : `${version.ref}-${type}`}`\n}\n\nasync function validateCache(version: Version) {\n\tif (version.dynamic) {\n\t\tif (localStorage.getItem(CACHE_LATEST_VERSION) !== latestVersion) {\n\t\t\tawait deleteMatching(url => url.startsWith(`${mcmetaUrl}/summary/`) || url.startsWith(`${mcmetaUrl}/data/`) || url.startsWith(`${mcmetaUrl}/assets/`) || url.startsWith(`${mcmetaUrl}/registries/`))\n\t\t\tlocalStorage.setItem(CACHE_LATEST_VERSION, latestVersion)\n\t\t}\n\t\tversion.ref = latestVersion\n\t}\n}\n\nexport async function fetchData(versionId: string, collectionTarget: CollectionRegistry, blockStateTarget: BlockStateRegistry) {\n\tconst version = config.versions.find(v => v.id === versionId) as Version | undefined\n\tif (!version) {\n\t\tconsole.error(`[fetchData] Unknown version ${version} in ${JSON.stringify(config.versions)}`)\n\t\treturn\n\t}\n\n\tawait validateCache(version)\n\n\tawait Promise.all([\n\t\tfetchRegistries(version, collectionTarget),\n\t\tfetchBlockStateMap(version, blockStateTarget),\n\t])\n}\n\nasync function fetchRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchRegistries] ${version.id}`)\n\ttry {\n\t\tconst data = await getData(`${mcmeta(version, 'summary')}/registries/data.min.json`)\n\t\tfor (const id in data) {\n\t\t\ttarget.register(id, data[id].map((e: string) => 'minecraft:' + e))\n\t\t}\n\t} catch (e) {\n\t\tconsole.warn('Error occurred while fetching registries:', message(e))\n\t}\n}\n\nasync function fetchBlockStateMap(version: Version, target: BlockStateRegistry) {\n\tconsole.debug(`[fetchBlockStateMap] ${version.id}`)\n\ttry {\n\t\tconst data = await getData(`${mcmeta(version, 'summary')}/blocks/data.min.json`)\n\t\tfor (const id in data) {\n\t\t\ttarget['minecraft:' + id] = {\n\t\t\t\tproperties: data[id][0],\n\t\t\t\tdefault: data[id][1],\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.warn('Error occurred while fetching block state map:', message(e))\n\t}\n}\n\nexport async function fetchPreset(versionId: VersionId, registry: string, id: string) {\n\tconsole.debug(`[fetchPreset] ${versionId} ${registry} ${id}`)\n\tconst version = config.versions.find(v => v.id === versionId)!\n\ttry {\n\t\tconst type = ['blockstates', 'models'].includes(registry) ? 'assets' : 'data'\n\t\tconst url = `${mcmeta(version, type)}/${type}/minecraft/${registry}/${id}.json`\n\t\tconst res = await fetch(url)\n\t\treturn res.json()\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching ${registry} preset ${id}: ${message(e)}`)\n\t}\n}\n\nexport async function fetchAllPresets(versionId: VersionId, registry: string) {\n\tconsole.debug(`[fetchAllPresets] ${versionId} ${registry}`)\n\tconst version = config.versions.find(v => v.id === versionId)!\n\tawait validateCache(version)\n\ttry {\n\t\tconst entries = await getData(`${mcmeta(version, 'registries')}/${registry}/data.min.json`)\n\t\treturn new Map(await Promise.all(\n\t\t\tentries.map(async (e: string) =>\n\t\t\t\t[e, await getData(`${mcmeta(version, 'data')}/data/minecraft/${registry}/${e}.json`)])\n\t\t))\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching all ${registry} presets: ${message(e)}`)\n\t}\n}\n\nexport type SoundEvents = {\n\t[key: string]: {\n\t\tsounds: (string | { name: string })[],\n\t},\n}\nexport async function fetchSounds(versionId: VersionId): Promise {\n\tconst version = config.versions.find(v => v.id === versionId)!\n\tawait validateCache(version)\n\ttry {\n\t\tconst url = `${mcmeta(version, 'summary')}/sounds/data.min.json`\n\t\treturn await getData(url)\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching sounds for ${version}: ${message(e)}`)\n\t}\n}\n\nexport function getSoundUrl(versionId: VersionId, path: string) {\n\tconst version = config.versions.find(v => v.id === versionId)!\n\treturn `${mcmeta(version, 'assets')}/assets/minecraft/sounds/${path}.ogg`\n}\n\nexport type VersionMeta = {\n\tid: string,\n\tname: string,\n\trelease_target: string,\n\ttype: 'snapshot' | 'release',\n\tstable: boolean,\n\tdata_version: number,\n\tprotocol_version: number,\n\tdata_pack_version: number,\n\tresource_pack_version: number,\n\tbuild_time: string,\n\trelease_time: string,\n\tsha1: string,\n}\nexport async function fetchVersions(): Promise {\n\tconst version = config.versions[config.versions.length - 1]\n\tawait validateCache(version)\n\ttry {\n\t\treturn getData(`${mcmeta(version, 'summary')}/versions/data.min.json`)\n\t} catch (e) {\n\t\tthrow new Error(`Error occured while fetching versions: ${message(e)}`)\n\t}\n}\n\nasync function getData(url: string, fn: (v: any) => T = (v: any) => v): Promise {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[getData] Opened cache ${CACHE_NAME} ${url}`)\n\t\tconst cacheResponse = await cache.match(url)\n \n\t\tif (cacheResponse && cacheResponse.ok) {\n\t\t\tconsole.debug(`[getData] Retrieving cached data ${url}`)\n\t\t\treturn await cacheResponse.json()\n\t\t}\n \n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\tawait cache.put(url, new Response(JSON.stringify(responseData)))\n\t\treturn responseData\n\t} catch (e) {\n\t\tconsole.warn(`[getData] Failed to open cache ${CACHE_NAME}: ${message(e)}`)\n\n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\treturn responseData\n\t}\n}\n\nasync function deleteMatching(matches: (url: string) => boolean) {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[deleteMatching] Opened cache ${CACHE_NAME}`)\n\t\tconst promises: Promise[] = []\n \n\t\tfor (const request of await cache.keys()) {\n\t\t\tif (matches(request.url)) {\n\t\t\t\tpromises.push(cache.delete(request))\n\t\t\t}\n\t\t}\n\t\tconsole.debug(`[deleteMatching] Removing ${promises.length} cache objects...`)\n\t\tawait Promise.all(promises)\n\t} catch (e) {\n\t\tconsole.warn(`[deleteMatching] Failed to open cache ${CACHE_NAME}: ${message(e)}`)\n\t}\n}\n","import type { CollectionRegistry, INode, SchemaRegistry } from '@mcschema/core'\nimport { ChoiceNode, DataModel, Reference, StringNode } from '@mcschema/core'\nimport * as java15 from '@mcschema/java-1.15'\nimport * as java16 from '@mcschema/java-1.16'\nimport * as java17 from '@mcschema/java-1.17'\nimport * as java18 from '@mcschema/java-1.18'\nimport * as java182 from '@mcschema/java-1.18.2'\nimport * as java19 from '@mcschema/java-1.19'\nimport config from '../../config.json'\nimport { message } from '../Utils'\nimport { fetchData } from './DataFetcher'\n\nexport const VersionIds = ['1.15', '1.16', '1.17', '1.18', '1.18.2', '1.19'] as const\nexport type VersionId = typeof VersionIds[number]\n\nexport type BlockStateRegistry = {\n\t[block: string]: {\n\t\tproperties?: {\n\t\t\t[key: string]: string[],\n\t\t},\n\t\tdefault?: {\n\t\t\t[key: string]: string,\n\t\t},\n\t},\n}\n\ntype VersionData = {\n\tcollections: CollectionRegistry,\n\tschemas: SchemaRegistry,\n\tblockStates: BlockStateRegistry,\n}\nconst Versions: Record> = {}\n\ntype ModelData = {\n\tmodel: DataModel,\n\tversion: VersionId,\n}\nconst Models: Record = {}\n\nconst versionGetter: {\n\t[versionId in VersionId]: {\n\t\tgetCollections: () => CollectionRegistry,\n\t\tgetSchemas: (collections: CollectionRegistry) => SchemaRegistry,\n\t}\n} = {\n\t1.15: java15,\n\t1.16: java16,\n\t1.17: java17,\n\t1.18: java18,\n\t'1.18.2': java182,\n\t1.19: java19,\n}\n\nexport let CachedDecorator: INode\nexport let CachedFeature: INode\nexport let CachedCollections: CollectionRegistry\n\nasync function getVersion(id: VersionId): Promise {\n\tif (!Versions[id]) {\n\t\tVersions[id] = (async () => {\n\t\t\ttry {\n\t\t\t\tconst collections = versionGetter[id].getCollections()\n\t\t\t\tconst blockStates: BlockStateRegistry = {}\n\t\t\t\tawait fetchData(id, collections, blockStates)\n\t\t\t\tconst schemas = versionGetter[id].getSchemas(collections)\n\t\t\t\tVersions[id] = { collections, schemas, blockStates }\n\t\t\t\treturn Versions[id]\n\t\t\t} catch (e) {\n\t\t\t\tthrow new Error(`Cannot get version \"${id}\": ${message(e)}`)\n\t\t\t}\n\t\t})()\n\t\treturn Versions[id]\n\t}\n\treturn Versions[id]\n}\n\nexport async function getModel(version: VersionId, id: string): Promise {\n\tif (!Models[id] || Models[id].version !== version) {\n\t\tconst versionData = await getVersion(version)\n\t\t\n\t\tCachedDecorator = Reference(versionData.schemas, 'configured_decorator')\n\t\tCachedFeature = ChoiceNode([\n\t\t\t{\n\t\t\t\ttype: 'string',\n\t\t\t\tnode: StringNode(versionData.collections, { validator: 'resource', params: { pool: '$worldgen/configured_feature' } }),\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'object',\n\t\t\t\tnode: Reference(versionData.schemas, 'configured_feature'),\n\t\t\t},\n\t\t], { choiceContext: 'feature' })\n\n\t\tconst schemaName = config.generators.find(g => g.id === id)?.schema\n\t\tif (!schemaName) {\n\t\t\tthrow new Error(`Cannot find model ${id}`)\n\t\t}\n\t\ttry {\n\t\t\tconst schema = versionData.schemas.get(schemaName)\n\t\t\tconst model = new DataModel(schema, { wrapLists: true })\n\t\t\tif (Models[id]) {\n\t\t\t\tmodel.reset(Models[id].model.data, false)\n\t\t\t} else {\n\t\t\t\tmodel.validate(true)\n\t\t\t\tmodel.history = [JSON.stringify(model.data)]\n\t\t\t}\n\t\t\tModels[id] = { model, version }\n\t\t} catch (e) {\n\t\t\tconst err = new Error(`Cannot get generator \"${id}\" for version \"${version}\": ${message(e)}`)\n\t\t\tif (e instanceof Error) err.stack = e.stack\n\t\t\tthrow err\n\t\t}\n\t}\n\treturn Models[id].model\n}\n\nexport async function getCollections(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\tCachedCollections = versionData.collections\n\treturn versionData.collections\n}\n\nexport async function getBlockStates(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.blockStates\n}\n\nexport function checkVersion(versionId: string, minVersionId: string | undefined, maxVersionId?: string) {\n\tconst version = config.versions.findIndex(v => v.id === versionId)\n\tconst minVersion = minVersionId ? config.versions.findIndex(v => v.id === minVersionId) : 0\n\tconst maxVersion = maxVersionId ? config.versions.findIndex(v => v.id === maxVersionId) : config.versions.length - 1\n\treturn minVersion <= version && version <= maxVersion\n}\n","import lz from 'lz-string'\nimport config from '../../config.json'\nimport type { VersionId } from './Schemas'\n\nconst API_PREFIX = 'https://z15g7can.directus.app/items'\nexport const SHARE_KEY = 'share'\n\nconst ShareCache = new Map()\n\nexport async function shareSnippet(type: string, version: VersionId, jsonData: any, show_preview: boolean) {\n\ttry {\n\t\tconst data = lz.compressToBase64(JSON.stringify(jsonData))\n\t\tconst raw = btoa(JSON.stringify(jsonData))\n\t\tconsole.log('Compression rate', raw.length / data.length)\n\t\tconst body = JSON.stringify({ data, type, version, show_preview })\n\t\tlet id = ShareCache.get(body)\n\t\tif (!id) {\n\t\t\tconst snippet = await fetchApi('/snippets', body)\n\t\t\tShareCache.set(body, snippet.id)\n\t\t\tid = snippet.id as string\n\t\t}\n\t\tconst gen = config.generators.find(g => g.id === type)!\n\t\treturn `${location.protocol}//${location.host}/${gen.url}/?${SHARE_KEY}=${id}`\n\t} catch (e) {\n\t\tif (e instanceof Error) {\n\t\t\te.message = `Error creating share link: ${e.message}`\n\t\t}\n\t\tthrow e\n\t}\n}\n\nexport async function getSnippet(id: string) {\n\ttry {\n\t\tconst snippet = await fetchApi(`/snippets/${id}`)\n\t\treturn {\n\t\t\t...snippet,\n\t\t\tdata: JSON.parse(lz.decompressFromBase64(snippet.data) ?? '{}'),\n\t\t}\n\t} catch (e) {\n\t\tif (e instanceof Error) {\n\t\t\te.message = `Error loading shared content: ${e.message}`\n\t\t}\n\t\tthrow e\n\t}\n}\n\nasync function fetchApi(url: string, body?: string) {\n\tconst res = await fetch(API_PREFIX + url, body ? {\n\t\tmethod: 'post',\n\t\theaders: { 'Content-Type': 'application/json' },\n\t\tbody,\n\t} : undefined)\n\tconst data = await res.json()\n\tif (data.data) {\n\t\treturn data.data\n\t}\n\tthrow new Error(data.errors?.[0]?.message ?? 'Unknown error')\n}\n","let scriptRel;const seen = {};export const __vitePreload = function preload(baseModule, deps) {\n // @ts-ignore\n if (!__VITE_IS_MODERN__ || !deps) {\n return baseModule();\n }\n // @ts-ignore\n if (scriptRel === undefined) {\n // @ts-ignore\n const relList = document.createElement('link').relList;\n // @ts-ignore\n scriptRel =\n relList && relList.supports && relList.supports('modulepreload')\n ? 'modulepreload'\n : 'preload';\n }\n return Promise.all(deps.map((dep) => {\n // @ts-ignore\n if (dep in seen)\n return;\n // @ts-ignore\n seen[dep] = true;\n const isCss = dep.endsWith('.css');\n const cssSelector = isCss ? '[rel=\"stylesheet\"]' : '';\n // @ts-ignore check if the file is already preloaded by SSR markup\n if (document.querySelector(`link[href=\"${dep}\"]${cssSelector}`)) {\n return;\n }\n // @ts-ignore\n const link = document.createElement('link');\n // @ts-ignore\n link.rel = isCss ? 'stylesheet' : scriptRel;\n if (!isCss) {\n link.as = 'script';\n link.crossOrigin = '';\n }\n link.href = dep;\n // @ts-ignore\n document.head.appendChild(link);\n if (isCss) {\n return new Promise((res, rej) => {\n link.addEventListener('load', res);\n link.addEventListener('error', rej);\n });\n }\n })).then(() => baseModule());\n}","import type { Project } from './contexts'\nimport { DRAFT_PROJECT } from './contexts'\nimport type { VersionId } from './services'\nimport { VersionIds } from './services'\n\nexport namespace Store {\n\texport const ID_LANGUAGE = 'language'\n\texport const ID_THEME = 'theme'\n\texport const ID_VERSION = 'schema_version'\n\texport const ID_INDENT = 'indentation'\n\texport const ID_FORMAT = 'output_format'\n\texport const ID_HIGHLIGHTING = 'output_highlighting'\n\texport const ID_SOUNDS_VERSION = 'minecraft_sounds_version'\n\texport const ID_PROJECTS = 'misode_projects'\n\texport const ID_BACKUPS = 'misode_generator_backups'\n\n\texport function getLanguage() {\n\t\treturn localStorage.getItem(ID_LANGUAGE) ?? 'en'\n\t}\n\n\texport function getTheme() {\n\t\treturn localStorage.getItem(ID_THEME) ?? 'dark'\n\t}\n\n\texport function getVersion(): VersionId {\n\t\tconst version = localStorage.getItem(ID_VERSION)\n\t\tif (version && VersionIds.includes(version as VersionId)) {\n\t\t\treturn version as VersionId\n\t\t}\n\t\treturn '1.18.2'\n\t}\n\n\texport function getIndent() {\n\t\treturn localStorage.getItem(ID_INDENT) ?? '2_spaces'\n\t}\n\n\texport function getFormat() {\n\t\treturn localStorage.getItem(ID_FORMAT) ?? 'json'\n\t}\n\n\texport function getHighlighting() {\n\t\treturn localStorage.getItem(ID_HIGHLIGHTING) !== 'false'\n\t}\n\n\texport function getSoundsVersion() {\n\t\treturn localStorage.getItem(ID_SOUNDS_VERSION) ?? 'latest'\n\t}\n\n\texport function getProjects(): Project[] {\n\t\tconst projects = localStorage.getItem(ID_PROJECTS)\n\t\tif (projects) {\n\t\t\treturn JSON.parse(projects) as Project[]\n\t\t}\n\t\treturn [DRAFT_PROJECT]\n\t}\n\n\texport function getBackup(id: string): object | undefined {\n\t\tconst backups = JSON.parse(localStorage.getItem(ID_BACKUPS) ?? '{}')\n\t\treturn backups[id]\n\t}\n\n\texport function setLanguage(language: string | undefined) {\n\t\tif (language) localStorage.setItem(ID_LANGUAGE, language)\n\t}\n\n\texport function setTheme(theme: string | undefined) {\n\t\tif (theme) localStorage.setItem(ID_THEME, theme)\n\t}\n\n\texport function setVersion(version: VersionId | undefined) {\n\t\tif (version) localStorage.setItem(ID_VERSION, version)\n\t}\n\n\texport function setIndent(indent: string | undefined) {\n\t\tif (indent) localStorage.setItem(ID_INDENT, indent)\n\t}\n\n\texport function setFormat(format: string | undefined) {\n\t\tif (format) localStorage.setItem(ID_FORMAT, format)\n\t}\n\n\texport function setHighlighting(highlighting: boolean | undefined) {\n\t\tif (highlighting !== undefined) localStorage.setItem(ID_HIGHLIGHTING, highlighting.toString())\n\t}\n\n\texport function setSoundsVersion(version: string | undefined) {\n\t\tif (version) localStorage.setItem(ID_SOUNDS_VERSION, version)\n\t}\n\n\texport function setProjects(projects: Project[] | undefined) {\n\t\tif (projects) localStorage.setItem(ID_PROJECTS, JSON.stringify(projects))\n\t}\n\n\texport function setBackup(id: string, data: object | undefined) {\n\t\tconst backups = JSON.parse(localStorage.getItem(ID_BACKUPS) ?? '{}')\n\t\tif (data === undefined) {\n\t\t\tdelete backups[id]\n\t\t} else {\n\t\t\tbackups[id] = data\n\t\t}\n\t\tlocalStorage.setItem(ID_BACKUPS, JSON.stringify(backups))\n\t}\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { useCallback, useContext, useEffect, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport English from '../../locales/en.json'\nimport { Analytics } from '../Analytics'\nimport { Store } from '../Store'\n\ninterface Locale {\n\tlang: string,\n\tlocale: (key: string, ...params: string[]) => string,\n\tchangeLanguage: (lang: string) => unknown,\n}\nconst Locale = createContext({\n\tlang: 'none',\n\tlocale: key => key,\n\tchangeLanguage: () => {},\n})\n\nexport const Locales: {\n\t[key: string]: {\n\t\t[key: string]: string,\n\t},\n} = {\n\tfallback: English,\n}\n\nexport function localize(lang: string, key: string, ...params: string[]) {\n\tconst value: string | undefined = Locales[lang]?.[key]\n\t?? Locales.en?.[key] ?? Locales.fallback[key] ?? key\n\treturn resolveLocaleParams(value, params)\n}\n\nfunction resolveLocaleParams(value: string, params?: string[]): string {\n\treturn value.replace(/%\\d+%/g, match => {\n\t\tconst index = parseInt(match.slice(1, -1))\n\t\treturn params?.[index] !== undefined ? params[index] : match\n\t})\n}\n\nasync function loadLocale(language: string) {\n\tif (Locales[language]) return\n\tconst langConfig = config.languages.find(lang => lang.code === language)\n\tif (!langConfig) return\n\tconst data = await import(`../../locales/${language}.json`)\n\tconst schema = langConfig.schemas !== false\n\t\t&& await import(`../../../node_modules/@mcschema/locales/src/${language}.json`)\n\tLocales[language] = { ...data.default, ...schema.default }\n}\n\nexport function useLocale() {\n\treturn useContext(Locale)\n}\n\nexport function LocaleProvider({ children }: { children: ComponentChildren }) {\n\tconst [lang, setLanguage] = useState('none')\n\n\tconst locale = useCallback((key: string, ...params: string[]) => {\n\t\treturn localize(lang, key, ...params)\n\t}, [lang])\n\n\tconst changeLanguage = useCallback(async (lang: string) => {\n\t\tawait loadLocale(lang)\n\t\tAnalytics.setLanguage(lang)\n\t\tStore.setLanguage(lang)\n\t\tsetLanguage(lang)\n\t}, [])\n\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tconst target = Store.getLanguage()\n\t\t\tawait Promise.all([\n\t\t\t\tloadLocale('en'),\n\t\t\t\t...(target !== 'en' ? [loadLocale(target)] : []),\n\t\t\t])\n\t\t\tsetLanguage(target)\n\t\t})()\n\t}, [])\n\n\tconst value: Locale = {\n\t\tlang,\n\t\tlocale: locale,\n\t\tchangeLanguage,\n\t}\n\n\treturn \n\t\t{children}\n\t\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { route } from 'preact-router'\nimport { useCallback, useContext, useMemo, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport type { VersionId } from '../services'\nimport { Store } from '../Store'\nimport { cleanUrl } from '../Utils'\n\nexport type Project = {\n\tname: string,\n\tnamespace: string,\n\tversion?: VersionId,\n\tfiles: ProjectFile[],\n}\nexport const DRAFT_PROJECT: Project = {\n\tname: 'Drafts',\n\tnamespace: 'draft',\n\tfiles: [],\n}\n\nexport type ProjectFile = {\n\ttype: string,\n\tid: string,\n\tdata: any,\n}\n\ninterface ProjectContext {\n\tproject: Project,\n\tfile?: ProjectFile,\n\tchangeProject: (name: string) => unknown,\n\tupdateProject: (project: Partial) => unknown,\n\tupdateFile: (type: string, id: string | undefined, file: Partial) => boolean,\n\topenFile: (type: string, id: string) => unknown,\n\tcloseFile: () => unknown,\n}\nconst Project = createContext({\n\tproject: DRAFT_PROJECT,\n\tchangeProject: () => {},\n\tupdateProject: () => {},\n\tupdateFile: () => false,\n\topenFile: () => {},\n\tcloseFile: () => {},\n})\n\nexport function useProject() {\n\treturn useContext(Project)\n}\n\nexport function ProjectProvider({ children }: { children: ComponentChildren }) {\n\tconst [projects, setProjects] = useState(Store.getProjects())\n\n\tconst [projectName, setProjectName] = useState(DRAFT_PROJECT.name)\n\tconst project = useMemo(() => {\n\t\treturn projects.find(p => p.name === projectName) ?? DRAFT_PROJECT\n\t}, [projects, projectName])\n\n\tconst [fileId, setFileId] = useState<[string, string] | undefined>(undefined)\n\tconst file = useMemo(() => {\n\t\tif (!fileId) return undefined\n\t\treturn project.files.find(f => f.type === fileId[0] && f.id === fileId[1])\n\t}, [project, fileId])\n\n\tconst changeProjects = useCallback((projects: Project[]) => {\n\t\tStore.setProjects(projects)\n\t\tsetProjects(projects)\n\t}, [])\n\n\tconst updateProject = useCallback((edits: Partial) => {\n\t\tchangeProjects(projects.map(p => p.name === projectName ?\t{ ...p, ...edits } : p))\n\t}, [projects, projectName])\n\n\tconst updateFile = useCallback((type: string, id: string | undefined, edits: Partial) => {\n\t\tif (!edits.id) { // remove\n\t\t\tupdateProject({ files: project.files.filter(f => f.type !== type || f.id !== id) })\n\t\t} else {\n\t\t\tconst newId = edits.id.includes(':') ? edits.id : `${project.namespace}:${edits.id}`\n\t\t\tconst exists = project.files.some(f => f.type === type && f.id === newId)\n\t\t\tif (!id) { // create\n\t\t\t\tif (exists) return false\n\t\t\t\tupdateProject({ files: [...project.files, { type, id: newId, data: edits.data ?? {} } ]})\n\t\t\t\tsetFileId([type, newId])\n\t\t\t} else { // rename or update data\n\t\t\t\tif (file?.id === id && id !== newId && exists) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tupdateProject({ files: project.files.map(f => f.type === type && f.id === id ? { ...f, ...edits, id: newId } : f)})\n\t\t\t\tif (file?.id === id) setFileId([type, newId])\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}, [updateProject, project, file])\n\n\tconst openFile = useCallback((type: string, id: string) => {\n\t\tconst gen = config.generators.find(g => g.id === type || g.path === type)\n\t\tif (!gen) {\n\t\t\tthrow new Error(`Cannot find generator of type ${type}`)\n\t\t}\n\t\tsetFileId([gen.id, id])\n\t\troute(cleanUrl(gen.url))\n\t}, [])\n\n\tconst closeFile = useCallback(() => {\n\t\tsetFileId(undefined)\n\t}, [])\n\n\tconst value: ProjectContext = {\n\t\tproject,\n\t\tfile,\n\t\tchangeProject: setProjectName,\n\t\tupdateProject,\n\t\tupdateFile,\n\t\topenFile,\n\t\tcloseFile,\n\t}\n\n\treturn \n\t\t{children}\n\t\n}\n\nexport function getFilePath(file: ProjectFile) {\n\tconst [namespace, id] = file.id.includes(':') ? file.id.split(':') : ['minecraft', file.id]\n\tconst gen = config.generators.find(g => g.id === file.type)\n\tif (!gen) {\n\t\tthrow new Error(`Cannot find generator of type ${file.type}`)\n\t}\n\treturn `data/${namespace}/${gen.path ?? gen.id}/${id}`\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { useCallback, useContext, useEffect, useState } from 'preact/hooks'\nimport { Analytics } from '../Analytics'\nimport { useMediaQuery } from '../hooks'\nimport { Store } from '../Store'\n\ninterface Theme {\n\ttheme: string,\n\tactualTheme: 'light' | 'dark',\n\tchangeTheme: (theme: string) => unknown,\n}\nconst Theme = createContext({\n\ttheme: 'dark',\n\tactualTheme: 'dark',\n\tchangeTheme: () => {},\n})\n\nexport function useTheme() {\n\treturn useContext(Theme)\n}\n\nexport function ThemeProvider({ children }: { children: ComponentChildren }) {\n\tconst [theme, setTheme] = useState(Store.getTheme())\n\tconst prefersLight = useMediaQuery('(prefers-color-scheme: light)')\n\tconst prefersDark = useMediaQuery('(prefers-color-scheme: dark)')\n\n\tuseEffect(() => {\n\t\tdocument.documentElement.setAttribute('data-theme', theme)\n\t}, [theme])\n\n\tconst changeTheme = useCallback((theme: string) => {\n\t\tAnalytics.setTheme(theme)\n\t\tStore.setTheme(theme)\n\t\tsetTheme(theme)\n\t}, [])\n\n\tuseEffect(() => {\n\t\tAnalytics.setPrefersColorScheme(prefersLight ? 'light' : prefersDark ? 'dark' : 'none')\n\t}, [prefersLight, prefersDark])\n\n\tconst value: Theme = {\n\t\ttheme,\n\t\tactualTheme: theme === 'light' || (theme !== 'dark' && prefersLight) ? 'light' : 'dark',\n\t\tchangeTheme,\n\t}\n\n\treturn \n\t\t{children}\n\t\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { useCallback, useContext, useEffect, useState } from 'preact/hooks'\nimport { useLocale } from '.'\nimport config from '../../config.json'\nimport type { VersionId } from '../services'\n\nconst VERSIONS_IN_TITLE = 3\n\ninterface Title {\n\ttitle: string,\n\tchangeTitle: (title: string, versions?: VersionId[]) => unknown,\n}\nconst Title = createContext({\n\ttitle: '',\n\tchangeTitle: () => {},\n})\n\nexport function useTitle(title?: string, versions?: VersionId[]) {\n\tconst context = useContext(Title)\n\tuseEffect(() => {\n\t\tif (title) {\n\t\t\tcontext.changeTitle(title, versions)\n\t\t}\n\t}, [title, versions])\n\treturn context\n}\n\nexport function TitleProvider({ children }: { children: ComponentChildren }) {\n\tconst { locale } = useLocale()\n\tconst [title, setTitle] = useState<string>(locale('title.home'))\n\n\tconst changeTitle = useCallback((title: string, versions?: VersionId[]) => {\n\t\tversions ??= config.versions.map(v => v.id as VersionId)\n\t\tconst titleVersions = versions.slice(versions.length - VERSIONS_IN_TITLE)\n\t\tdocument.title = `${title} Minecraft ${titleVersions.join(', ')}`\n\t\tsetTitle(title)\n\t}, [])\n\n\tconst value = {\n\t\ttitle,\n\t\tchangeTitle,\n\t}\n\n\treturn <Title.Provider value={value}>\n\t\t{children}\n\t</Title.Provider>\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { getCurrentUrl } from 'preact-router'\nimport { useCallback, useContext, useEffect, useState } from 'preact/hooks'\nimport { Analytics } from '../Analytics'\nimport type { VersionId } from '../services'\nimport { VersionIds } from '../services'\nimport { Store } from '../Store'\nimport { getSearchParams, setSeachParams } from '../Utils'\n\nconst VERSION_PARAM = 'version'\n\ninterface Version {\n\tversion: VersionId,\n\tchangeVersion: (version: VersionId, store?: boolean) => unknown,\n}\nconst Version = createContext<Version>({\n\tversion: '1.18.2',\n\tchangeVersion: () => {},\n})\n\nexport function useVersion() {\n\treturn useContext(Version)\n}\n\nexport function VersionProvider({ children }: { children: ComponentChildren }) {\n\tconst [version, setVersion] = useState<VersionId>(Store.getVersion())\n\n\tconst searchParams = getSearchParams(getCurrentUrl())\n\tconst targetVersion = searchParams.get(VERSION_PARAM)\n\tuseEffect(() => {\n\t\tif (VersionIds.includes(targetVersion as VersionId) && version !== targetVersion) {\n\t\t\tsetVersion(targetVersion as VersionId)\n\t\t}\n\t}, [version, targetVersion])\n\n\tconst changeVersion = useCallback((version: VersionId, store = true) => {\n\t\tif (getSearchParams(getCurrentUrl()).has(VERSION_PARAM)) {\n\t\t\tsetSeachParams({ version })\n\t\t}\n\t\tif (store) {\n\t\t\tAnalytics.setVersion(version)\n\t\t\tStore.setVersion(version)\n\t\t}\n\t\tsetVersion(version)\n\t}, [])\n\n\tconst value: Version = {\n\t\tversion,\n\t\tchangeVersion,\n\t}\n\n\treturn <Version.Provider value={value}>\n\t\t{children}\n\t</Version.Provider>\n}\n","import { DataModel } from '@mcschema/core'\nimport type { NoiseParameters } from 'deepslate'\nimport { FixedBiome, Identifier, LegacyRandom, NormalNoise } from 'deepslate'\nimport init, { biome_parameters, climate_noise, climate_sampler, multi_noise } from 'deepslate-rs'\n// @ts-expect-error\nimport wasm from 'deepslate-rs/deepslate_rs_bg.wasm?url'\nimport type { VersionId } from '../services'\nimport { checkVersion, fetchPreset } from '../services'\nimport { BiMap, clamp, deepClone, deepEqual, square, stringToColor } from '../Utils'\n\nlet ready = false\nasync function loadWasm() {\n\tif (ready) return\n\tawait init(wasm)\n\tready = true\n\tconsole.debug(`Loaded deepslate-rs from \"${wasm}\"`)\n}\n\nconst LAYERS = {\n\ttemperature: [-1, 1],\n\thumidity: [-1, 1],\n\tcontinentalness: [-1.1, 1],\n\terosion: [-1, 1],\n\tweirdness: [-1, 1],\n\toffset: [-1, 1],\n\tfactor: [0, 12],\n\tjaggedness: [0, 1],\n}\n\ntype Triple = [number, number, number]\ntype BiomeColors = Record<string, Triple>\ntype BiomeSourceOptions = {\n\toctaves: Record<string, NoiseParameters>,\n\tbiomeColors: BiomeColors,\n\toffset: [number, number],\n\tscale: number,\n\tres: number,\n\tseed: bigint,\n\tversion: VersionId,\n\tlayers: Set<keyof typeof LAYERS | 'biomes'>,\n}\n\ninterface CachedBiomeSource {\n\tgetBiome(x: number, y: number, z: number): Identifier\n\tgetBiomes?(xFrom: number, xTo: number, xStep: number, yFrom: number, yTo: number, yStep: number, zFrom: number, zTo: number, zStep: number): Identifier[]\n\tgetClimate?(x: number, y: number, z: number): {[k: string]: number}\n\tgetClimates?(xFrom: number, xTo: number, xStep: number, yFrom: number, yTo: number, yStep: number, zFrom: number, zTo: number, zStep: number): {[k: string]: number}[]\n}\n\nlet cacheState: any\nlet biomeSourceCache: CachedBiomeSource\n\nexport async function biomeMap(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst { biomeSource } = await getCached(state, options)\n\n\tconst data = img.data\n\tconst ox = -Math.round(options.offset[0]) - 100 + options.res / 2\n\tconst oz = -Math.round(options.offset[1]) - 100 + options.res / 2\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\n\tconst xRange: Triple = [ox * options.scale, (200 + ox) * options.scale, options.res * options.scale]\n\tconst zRange: Triple = [oz * options.scale, (200 + oz) * options.scale, options.res * options.scale]\n\n\tconst biomes = !options.layers.has('biomes') ? undefined : biomeSource.getBiomes?.(...xRange, 64, 65, 1, ...zRange)\n\tconst layers = [...options.layers].filter(l => l !== 'biomes') as (keyof typeof LAYERS)[]\n\tconst noise = layers.length === 0 ? undefined : biomeSource.getClimates?.(...xRange, 64, 65, 1, ...zRange)\n\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let z = 0; z < 200; z += options.res) {\n\t\t\tconst i = z * row + x * col\n\t\t\tconst j = (x / options.res) * 200 / options.res + z / options.res\n\t\t\tconst worldX = (x + ox) * options.scale\n\t\t\tconst worldZ = (z + oz) * options.scale\n\t\t\tlet color: Triple = [50, 50, 50]\n\t\t\tif (options.layers.has('biomes')) {\n\t\t\t\tconst biome = biomes?.[j] ?? biomeSource.getBiome(worldX, 64, worldZ)\n\t\t\t\tcolor = getBiomeColor(biome.toString(), options.biomeColors)\n\t\t\t} else if (noise && layers[0]) {\n\t\t\t\tconst value = noise[j][layers[0]]\n\t\t\t\tconst [min, max] = LAYERS[layers[0]]\n\t\t\t\tconst brightness = (value - min) / (max - min) * 256\n\t\t\t\tcolor = [brightness, brightness, brightness]\n\t\t\t}\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nexport async function getBiome(state: any, x: number, z: number, options: BiomeSourceOptions): Promise<{[k: string]: number | string} | undefined> {\n\tconst { biomeSource } = await getCached(state, options)\n\n\tconst [xx, zz] = toWorld([x, z], options)\n\treturn {\n\t\tbiome: biomeSource.getBiome(xx, 64, zz).toString(),\n\t\t...biomeSource.getClimate?.(xx, 64, zz),\n\t}\n}\n\nasync function getCached(state: any, options: BiomeSourceOptions): Promise<{ biomeSource: CachedBiomeSource}> {\n\tconst newState = [state, options.octaves, `${options.seed}`, options.version]\n\tif (!deepEqual(newState, cacheState)) {\n\t\tcacheState = deepClone(newState)\n\n\t\tbiomeSourceCache = await getBiomeSource(state, options)\n\t}\n\treturn {\n\t\tbiomeSource: biomeSourceCache,\n\t} \n}\n\nasync function getBiomeSource(state: any, options: BiomeSourceOptions): Promise<CachedBiomeSource> {\n\tswitch (state?.type?.replace(/^minecraft:/, '')) {\n\t\tcase 'fixed':\n\t\t\treturn new FixedBiome(Identifier.parse(state.biome as string))\n\n\t\tcase 'checkerboard':\n\t\t\tconst shift = (state.scale ?? 2) + 2\n\t\t\tconst numBiomes = state.biomes?.length ?? 0\n\t\t\treturn {\n\t\t\t\tgetBiome(x: number, _y: number, z: number) {\n\t\t\t\t\tconst i = (((x >> shift) + (z >> shift)) % numBiomes + numBiomes) % numBiomes\n\t\t\t\t\treturn Identifier.parse(state.biomes?.[i].node as string)\n\t\t\t\t},\n\t\t\t}\n\n\t\tcase 'multi_noise':\n\t\t\tswitch(state.preset?.replace(/^minecraft:/, '')) {\n\t\t\t\tcase 'nether':\n\t\t\t\t\tstate = checkVersion(options.version, '1.18') ? NetherPreset18 : NetherPreset\n\t\t\t\t\tbreak\n\t\t\t\tcase 'overworld':\n\t\t\t\t\tstate = checkVersion(options.version, '1.18') ? await OverworldPreset18() : state\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t\tstate = DataModel.unwrapLists(state)\n\t\t\tif (checkVersion(options.version, '1.18')) {\n\t\t\t\tawait loadWasm()\n\t\t\t\tconst BiomeIds = new BiMap<string, number>()\n\t\t\t\tconst param = (p: number | number[]) => {\n\t\t\t\t\treturn typeof p === 'number' ? [p, p] : p\n\t\t\t\t}\n\t\t\t\tconst [t0, t1, h0, h1, c0, c1, e0, e1, w0, w1, d0, d1, o, b] = [[], [], [], [], [], [], [], [], [], [], [], [], [], []] as number[][]\n\t\t\t\tfor (const i of state.biomes) {\n\t\t\t\t\tconst { temperature, humidity, continentalness, erosion, weirdness, depth, offset } = i.parameters\n\t\t\t\t\tt0.push(param(temperature)[0])\n\t\t\t\t\tt1.push(param(temperature)[1])\n\t\t\t\t\th0.push(param(humidity)[0])\n\t\t\t\t\th1.push(param(humidity)[1])\n\t\t\t\t\tc0.push(param(continentalness)[0])\n\t\t\t\t\tc1.push(param(continentalness)[1])\n\t\t\t\t\te0.push(param(erosion)[0])\n\t\t\t\t\te1.push(param(erosion)[1])\n\t\t\t\t\tw0.push(param(weirdness)[0])\n\t\t\t\t\tw1.push(param(weirdness)[1])\n\t\t\t\t\td0.push(param(depth)[0])\n\t\t\t\t\td1.push(param(depth)[1])\n\t\t\t\t\to.push(offset)\n\t\t\t\t\tb.push(BiomeIds.getOrPut(i.biome, Math.floor(Math.random() * 2147483647)))\n\t\t\t\t}\n\t\t\t\tconst parameters = biome_parameters(new Float64Array(t0), new Float64Array(t1), new Float64Array(h0), new Float64Array(h1), new Float64Array(c0), new Float64Array(c1), new Float64Array(e0), new Float64Array(e1), new Float64Array(w0), new Float64Array(w1), new Float64Array(d0), new Float64Array(d1), new Float64Array(o), new Int32Array(b))\n\t\t\t\tconst sampler = climate_sampler(options.seed, options.octaves.temperature.firstOctave, new Float64Array(options.octaves.temperature.amplitudes), options.octaves.humidity.firstOctave, new Float64Array(options.octaves.humidity.amplitudes), options.octaves.continentalness.firstOctave, new Float64Array(options.octaves.continentalness.amplitudes), options.octaves.erosion.firstOctave, new Float64Array(options.octaves.erosion.amplitudes), options.octaves.weirdness.firstOctave, new Float64Array(options.octaves.weirdness.amplitudes), options.octaves.shift.firstOctave, new Float64Array(options.octaves.shift.amplitudes))\n\t\t\t\treturn {\n\t\t\t\t\tgetBiome(x, y, z) {\n\t\t\t\t\t\tconst ids = multi_noise(parameters, sampler, x, x + 1, 1, y, y + 1, 1, z, z + 1, 1)\n\t\t\t\t\t\treturn Identifier.parse(BiomeIds.getA(ids[0]) ?? 'unknown')\n\t\t\t\t\t},\n\t\t\t\t\tgetBiomes(xFrom, xTo, xStep, yFrom, yTo, yStep, zFrom, zTo, zStep) {\n\t\t\t\t\t\tconst ids = multi_noise(parameters, sampler, xFrom, xTo, xStep, yFrom, yTo, yStep, zFrom, zTo, zStep)\n\t\t\t\t\t\treturn [...ids].map(id => Identifier.parse(BiomeIds.getA(id) ?? 'unknown'))\n\t\t\t\t\t},\n\t\t\t\t\tgetClimate(x, y, z) {\n\t\t\t\t\t\tconst climate = climate_noise(sampler, x, x + 1, 1, y, y + 1, 1, z, z + 1, 1)\n\t\t\t\t\t\tconst [t, h, c, e, w] = climate.slice(0, 5)\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttemperature: t,\n\t\t\t\t\t\t\thumidity: h,\n\t\t\t\t\t\t\tcontinentalness: c,\n\t\t\t\t\t\t\terosion: e,\n\t\t\t\t\t\t\tweirdness: w,\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tgetClimates(xFrom, xTo, xStep, yFrom, yTo, yStep, zFrom, zTo, zStep) {\n\t\t\t\t\t\tconst climate = climate_noise(sampler, xFrom, xTo, xStep, yFrom, yTo, yStep, zFrom, zTo, zStep)\n\t\t\t\t\t\tconst result = []\n\t\t\t\t\t\tfor (let i = 0; i < climate.length; i += 7) {\n\t\t\t\t\t\t\tconst [t, h, c, e, w] = climate.slice(i, i + 5)\n\t\t\t\t\t\t\tresult.push({\n\t\t\t\t\t\t\t\ttemperature: t,\n\t\t\t\t\t\t\t\thumidity: h,\n\t\t\t\t\t\t\t\tcontinentalness: c,\n\t\t\t\t\t\t\t\terosion: e,\n\t\t\t\t\t\t\t\tweirdness: w,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn result\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst noise = ['altitude', 'temperature', 'humidity', 'weirdness']\n\t\t\t\t\t.map((id, i) => {\n\t\t\t\t\t\tconst config = state[`${id}_noise`]\n\t\t\t\t\t\tconfig.firstOctave = clamp(config.firstOctave ?? -7, -100, -1)\n\t\t\t\t\t\treturn new NormalNoise(new LegacyRandom(options.seed + BigInt(i)), config)\n\t\t\t\t\t})\n\t\t\t\tif (!Array.isArray(state.biomes) || state.biomes.length === 0) {\n\t\t\t\t\treturn new FixedBiome(Identifier.create('unknown'))\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tgetBiome(x: number, _y: number, z: number): Identifier {\n\t\t\t\t\t\tconst n = noise.map(n => n.sample(x, z, 0))\n\t\t\t\t\t\tlet minDist = Infinity\n\t\t\t\t\t\tlet minBiome = ''\n\t\t\t\t\t\tfor (const { biome, parameters: p } of state.biomes) {\n\t\t\t\t\t\t\tconst dist = square(p.altitude - n[0]) + square(p.temperature - n[1]) + square(p.humidity - n[2]) + square(p.weirdness - n[3]) + square(p.offset)\n\t\t\t\t\t\t\tif (dist < minDist) {\n\t\t\t\t\t\t\t\tminDist = dist\n\t\t\t\t\t\t\t\tminBiome = biome\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn Identifier.parse(minBiome)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\t}\n\tthrow new Error('Unknown biome source')\n}\n\nfunction getBiomeColor(biome: string, biomeColors: BiomeColors): Triple {\n\tif (!biome) {\n\t\treturn [128, 128, 128]\n\t}\n\tconst color = biomeColors[biome] ?? VanillaColors[biome]\n\tif (color === undefined) {\n\t\treturn stringToColor(biome)\n\t}\n\treturn color\n}\n\nfunction toWorld([x, z]: [number, number], options: BiomeSourceOptions) {\n\tconst xx = (x - options.offset[0] - 100 + options.res / 2) * options.scale\n\tconst zz = (z - options.offset[1] - 100 + options.res / 2) * options.scale\n\treturn [xx, zz]\n}\n\nconst VanillaColors: Record<string, Triple> = {\n\t'minecraft:badlands': [217,69,21],\n\t'minecraft:badlands_plateau': [202,140,101],\n\t'minecraft:bamboo_jungle': [118,142,20],\n\t'minecraft:bamboo_jungle_hills': [59,71,10],\n\t'minecraft:basalt_deltas': [64,54,54],\n\t'minecraft:beach': [250,222,85],\n\t'minecraft:birch_forest': [48,116,68],\n\t'minecraft:birch_forest_hills': [31,95,50],\n\t'minecraft:cold_ocean': [32,32,112],\n\t'minecraft:crimson_forest': [221,8,8],\n\t'minecraft:dark_forest': [64,81,26],\n\t'minecraft:dark_forest_hills': [104,121,66],\n\t'minecraft:deep_cold_ocean': [32,32,56],\n\t'minecraft:deep_frozen_ocean': [64,64,144],\n\t'minecraft:deep_lukewarm_ocean': [0,0,64],\n\t'minecraft:deep_ocean': [0,0,48],\n\t'minecraft:deep_warm_ocean': [0,0,80],\n\t'minecraft:desert': [250,148,24],\n\t'minecraft:desert_hills': [210,95,18],\n\t'minecraft:desert_lakes': [255,188,64],\n\t'minecraft:end_barrens': [128,128,255],\n\t'minecraft:end_highlands': [128,128,255],\n\t'minecraft:end_midlands': [128,128,255],\n\t'minecraft:eroded_badlands': [255,109,61],\n\t'minecraft:flower_forest': [45,142,73],\n\t'minecraft:forest': [5,102,33],\n\t'minecraft:frozen_ocean': [112,112,214],\n\t'minecraft:frozen_river': [160,160,255],\n\t'minecraft:giant_spruce_taiga': [129,142,121],\n\t'minecraft:old_growth_spruce_taiga': [129,142,121],\n\t'minecraft:giant_spruce_taiga_hills': [109,119,102],\n\t'minecraft:giant_tree_taiga': [89,102,81],\n\t'minecraft:old_growth_pine_taiga': [89,102,81],\n\t'minecraft:giant_tree_taiga_hills': [69,79,62],\n\t'minecraft:gravelly_hills': [136,136,136],\n\t'minecraft:gravelly_mountains': [136,136,136],\n\t'minecraft:windswept_gravelly_hills': [136,136,136],\n\t'minecraft:ice_spikes': [180,220,220],\n\t'minecraft:jungle': [83,123,9],\n\t'minecraft:jungle_edge': [98,139,23],\n\t'minecraft:sparse_jungle': [98,139,23],\n\t'minecraft:jungle_hills': [44,66,5],\n\t'minecraft:lukewarm_ocean': [0,0,144],\n\t'minecraft:modified_badlands_plateau': [242,180,141],\n\t'minecraft:modified_gravelly_mountains': [120,152,120],\n\t'minecraft:modified_jungle': [123,163,49],\n\t'minecraft:modified_jungle_edge': [138,179,63],\n\t'minecraft:modified_wooded_badlands_plateau': [216,191,141],\n\t'minecraft:mountain_edge': [114,120,154],\n\t'minecraft:extreme_hills': [96,96,96],\n\t'minecraft:mountains': [96,96,96],\n\t'minecraft:windswept_hills': [96,96,96],\n\t'minecraft:mushroom_field_shore': [160,0,255],\n\t'minecraft:mushroom_fields': [255,0,255],\n\t'minecraft:nether_wastes': [191,59,59],\n\t'minecraft:ocean': [0,0,112],\n\t'minecraft:plains': [141,179,96],\n\t'minecraft:river': [0,0,255],\n\t'minecraft:savanna': [189,178,95],\n\t'minecraft:savanna_plateau': [167,157,100],\n\t'minecraft:shattered_savanna': [229,218,135],\n\t'minecraft:windswept_savanna': [229,218,135],\n\t'minecraft:shattered_savanna_plateau': [207,197,140],\n\t'minecraft:small_end_islands': [128,128,255],\n\t'minecraft:snowy_beach': [250,240,192],\n\t'minecraft:snowy_mountains': [160,160,160],\n\t'minecraft:snowy_taiga': [49,85,74],\n\t'minecraft:snowy_taiga_hills': [36,63,54],\n\t'minecraft:snowy_taiga_mountains': [89,125,114],\n\t'minecraft:snowy_tundra': [255,255,255],\n\t'minecraft:snowy_plains': [255,255,255],\n\t'minecraft:soul_sand_valley': [94,56,48],\n\t'minecraft:stone_shore': [162,162,132],\n\t'minecraft:stony_shore': [162,162,132],\n\t'minecraft:sunflower_plains': [181,219,136],\n\t'minecraft:swamp': [7,249,178],\n\t'minecraft:swamp_hills': [47,255,218],\n\t'minecraft:taiga': [11,102,89],\n\t'minecraft:taiga_hills': [22,57,51],\n\t'minecraft:taiga_mountains': [51,142,129],\n\t'minecraft:tall_birch_forest': [88,156,108],\n\t'minecraft:old_growth_birch_forest': [88,156,108],\n\t'minecraft:tall_birch_hills': [71,135,90],\n\t'minecraft:the_end': [128,128,255],\n\t'minecraft:the_void': [0,0,0],\n\t'minecraft:warm_ocean': [0,0,172],\n\t'minecraft:warped_forest': [73,144,123],\n\t'minecraft:wooded_badlands_plateau': [176,151,101],\n\t'minecraft:wooded_badlands': [176,151,101],\n\t'minecraft:wooded_hills': [34,85,28],\n\t'minecraft:wooded_mountains': [80,112,80],\n\t'minecraft:windswept_forest': [80,112,80],\n\t'minecraft:snowy_slopes': [140, 195, 222],\n\t'minecraft:lofty_peaks': [196, 168, 193],\n\t'minecraft:jagged_peaks': [196, 168, 193],\n\t'minecraft:snowcapped_peaks': [200, 198, 200],\n\t'minecraft:frozen_peaks': [200, 198, 200],\n\t'minecraft:stony_peaks': [82, 92, 103],\n\t'minecraft:grove': [150, 150, 189],\n\t'minecraft:meadow': [169, 197, 80],\n\t'minecraft:lush_caves': [112, 255, 79],\n\t'minecraft:dripstone_caves': [140, 124, 0],\n}\n\nconst NetherPreset = {type:'minecraft:multi_noise',seed:0,altitude_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},humidity_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{biome:'minecraft:nether_wastes',parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}},{biome:'minecraft:soul_sand_valley',parameters:{altitude:0,temperature:0,humidity:-0.5,weirdness:0,offset:0}},{biome:'minecraft:crimson_forest',parameters:{altitude:0,temperature:0.4,humidity:0,weirdness:0,offset:0}},{biome:'minecraft:warped_forest',parameters:{altitude:0,temperature:0,humidity:0.5,weirdness:0,offset:0.375}},{biome:'minecraft:basalt_deltas',parameters:{altitude:0,temperature:-0.5,humidity:0,weirdness:0,offset:0.175}}]}\n\nconst NetherPreset18 = {type:'minecraft:multi_noise',biomes:[{biome:'minecraft:nether_wastes',parameters:{temperature:0,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:soul_sand_valley',parameters:{temperature:0,humidity:-0.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:crimson_forest',parameters:{temperature:0.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:warped_forest',parameters:{temperature:0,humidity:0.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0.375}},{biome:'minecraft:basalt_deltas',parameters:{temperature:-0.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0.175}}]}\n\nasync function OverworldPreset18() {\n\tconst overworld = await fetchPreset('1.18', 'dimension', 'overworld')\n\treturn overworld.generator.biome_source\n}\n","import { DataModel } from '@mcschema/core'\nimport type { Random } from 'deepslate'\nimport { LegacyRandom, PerlinNoise } from 'deepslate'\nimport type { VersionId } from '../services'\nimport { checkVersion } from '../services'\nimport { clamp, isObject, stringToColor } from '../Utils'\n\ntype BlockPos = [number, number, number]\ntype Placement = [BlockPos, number]\n\ntype PlacementContext = {\n\tplacements: Placement[],\n\tfeatures: string[],\n\trandom: Random,\n\tbiomeInfoNoise: PerlinNoise,\n\tseaLevel: number,\n\tversion: VersionId,\n\tnextFloat(): number,\n\tnextInt(max: number): number,\n\tnextGaussian(): number,\n\tsampleInt(provider: any): number,\n}\n\nconst terrain = [50, 50, 51, 51, 52, 52, 53, 54, 56, 57, 57, 58, 58, 59, 60, 60, 60, 59, 59, 59, 60, 61, 61, 62, 63, 63, 64, 64, 64, 65, 65, 66, 66, 65, 65, 66, 66, 67, 67, 67, 68, 69, 71, 73, 74, 76, 79, 80, 81, 81, 82, 83, 83, 82, 82, 81, 81, 80, 80, 80, 81, 81, 82, 82] \n\nconst featureColors = [\n\t[255, 77, 54], // red\n\t[59, 118, 255], // blue\n\t[91, 207, 25], // green\n\t[217, 32, 245], // magenta\n\t[255, 209, 41], // yellow\n\t[52, 204, 209], // cyan\n]\n\nexport type DecoratorOptions = {\n\tsize: [number, number, number],\n\tseed: bigint,\n\tversion: VersionId,\n}\nexport function decorator(state: any, img: ImageData, options: DecoratorOptions) {\n\tconst random = new LegacyRandom(options.seed)\n\tconst ctx: PlacementContext = {\n\t\tplacements: [],\n\t\tfeatures: [],\n\t\trandom,\n\t\tbiomeInfoNoise: new PerlinNoise(random.fork(), 0, [1]),\n\t\tseaLevel: 63,\n\t\tversion: options.version,\n\t\tnextFloat: () => random.nextFloat(),\n\t\tnextInt: (max: number) => random.nextInt(max),\n\t\tnextGaussian: () => Math.sqrt(-2 * Math.log(1 - random.nextFloat())) * Math.cos(2 * Math.PI * random.nextFloat()),\n\t\tsampleInt(value) { return sampleInt(value, this) },\n\t}\n\n\tfor (let x = 0; x < options.size[0] / 16; x += 1) {\n\t\tfor (let z = 0; z < options.size[2] / 16; z += 1) {\n\t\t\tif (checkVersion(options.version, undefined, '1.17')) {\n\t\t\t\tgetPlacements([x * 16, 0, z * 16], DataModel.unwrapLists(state), ctx)\n\t\t\t} else {\n\t\t\t\tmodifyPlacement([x * 16, 0, z * 16], DataModel.unwrapLists(state.placement), ctx)\n\t\t\t}\n\t\t}\n\t}\n\n\tconst data = img.data\n\timg.data.fill(255)\n\n\tfor (const [pos, feature] of ctx.placements) {\n\t\tif (pos[0] < 0 || pos[1] < 0 || pos[2] < 0 || pos[0] >= options.size[0] || pos[1] >= options.size[1] || pos[2] >= options.size[2]) continue\n\t\tconst i = (pos[2] * (img.width * 4)) + (pos[0] * 4)\n\t\tconst color = feature < featureColors.length ? featureColors[feature] : stringToColor(ctx.features[feature])\n\t\tdata[i] = clamp(50, 205, color[0])\n\t\tdata[i + 1] = clamp(50, 205, color[1])\n\t\tdata[i + 2] = clamp(50, 205, color[2])\n\t\tdata[i + 3] = 255\n\t}\n\n\tfor (let x = 0; x < options.size[0]; x += 1) {\n\t\tfor (let y = 0; y < options.size[2]; y += 1) {\n\t\t\tif ((Math.floor(x / 16) + Math.floor(y / 16)) % 2 === 0) continue\n\t\t\tconst i = (y * (img.width * 4)) + (x * 4)\n\t\t\tfor (let j = 0; j < 3; j += 1) {\n\t\t\t\tdata[i + j] = 0.85 * data[i + j] \n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction normalize(id: string) {\n\treturn id.startsWith('minecraft:') ? id.slice(10) : id\n}\n\nfunction decorateY(pos: BlockPos, y: number): BlockPos[] {\n\treturn [[ pos[0], y, pos[2] ]]\n}\n\nfunction sampleInt(value: any, ctx: PlacementContext): number {\n\tif (typeof value === 'number') {\n\t\treturn value\n\t} else if (value.base) {\n\t\treturn value.base ?? 1 + ctx.nextInt(1 + (value.spread ?? 0))\n\t} else {\n\t\tswitch (normalize(value.type)) {\n\t\t\tcase 'constant': return value.value\n\t\t\tcase 'uniform': return value.value.min_inclusive + ctx.nextInt(value.value.max_inclusive - value.value.min_inclusive + 1)\n\t\t\tcase 'biased_to_bottom': return value.value.min_inclusive + ctx.nextInt(ctx.nextInt(value.value.max_inclusive - value.value.min_inclusive + 1) + 1)\n\t\t\tcase 'clamped': return clamp(ctx.sampleInt(value.value.source), value.value.min_inclusive, value.value.max_inclusive)\n\t\t\tcase 'clamped_normal':\n\t\t\t\tconst normal = value.value.mean + ctx.nextGaussian() * value.value.deviation\n\t\t\t\treturn Math.floor(clamp(value.value.min_inclusive, value.value.max_inclusive, normal))\n\t\t\tcase 'weighted_list':\n\t\t\t\tconst totalWeight = (value.distribution as any[]).reduce<number>((sum, e) => sum + e.weight, 0)\n\t\t\t\tlet i = ctx.nextInt(totalWeight)\n\t\t\t\tfor (const e of value.distribution) {\n\t\t\t\t\ti -= e.weight\n\t\t\t\t\tif (i < 0) return ctx.sampleInt(e.data)\n\t\t\t\t}\n\t\t\t\treturn 0\n\t\t}\n\t\treturn 1\n\t}\n}\n\nfunction resolveAnchor(anchor: any, _ctx: PlacementContext): number {\n\tif (!isObject(anchor)) throw new Error('Invalid vertical anchor')\n\tif (anchor.absolute) return anchor.absolute\n\tif (anchor.above_bottom) return anchor.above_bottom\n\tif (anchor.below_top) return 256 - anchor.below_top\n\tthrow new Error('Invalid vertical anchor')\n}\n\nfunction sampleHeight(height: any, ctx: PlacementContext): number {\n\tif (!isObject(height)) throw new Error('Invalid height provider')\n\tif (typeof height.type !== 'string') {\n\t\treturn resolveAnchor(height, ctx)\n\t}\n\tswitch (normalize(height.type)) {\n\t\tcase 'constant': return resolveAnchor(height.value, ctx)\n\t\tcase 'uniform': {\n\t\t\tconst min = resolveAnchor(height.min_inclusive, ctx)\n\t\t\tconst max = resolveAnchor(height.max_inclusive, ctx)\n\t\t\treturn min + ctx.nextInt(max - min + 1)\n\t\t}\n\t\tcase 'biased_to_bottom': {\n\t\t\tconst min = resolveAnchor(height.min_inclusive, ctx)\n\t\t\tconst max = resolveAnchor(height.max_inclusive, ctx)\n\t\t\tconst n = ctx.nextInt(max - min - (height.inner ?? 1) + 1)\n\t\t\treturn min + ctx.nextInt(n + (height.inner ?? 1))\n\t\t}\n\t\tcase 'very_biased_to_bottom': {\n\t\t\tconst min = resolveAnchor(height.min_inclusive, ctx)\n\t\t\tconst max = resolveAnchor(height.max_inclusive, ctx)\n\t\t\tconst inner = height.inner ?? 1\n\t\t\tconst n1 = min + inner + ctx.nextInt(max - min - inner + 1)\n\t\t\tconst n2 = min + ctx.nextInt(n1 - min)\n\t\t\treturn min + ctx.nextInt(n2 - min + inner)\n\t\t}\n\t\tcase 'trapezoid': {\n\t\t\tconst min = resolveAnchor(height.min_inclusive, ctx)\n\t\t\tconst max = resolveAnchor(height.max_inclusive, ctx)\n\t\t\tconst plateau = height.plateau ?? 0\n\t\t\tif (plateau >= max - min) {\n\t\t\t\treturn min + ctx.nextInt(max - min + 1)\n\t\t\t}\n\t\t\tconst n1 = (max - min - plateau) / 2\n\t\t\tconst n2 = (max - min) - n1\n\t\t\treturn min + ctx.nextInt(n2 + 1) + ctx.nextInt(n1 + 1)\n\t\t}\n\t\tdefault: throw new Error(`Invalid height provider ${height.type}`)\n\t}\n}\n\n// 1.17 and before\nfunction useFeature(s: string, ctx: PlacementContext) {\n\tconst i = ctx.features.indexOf(s)\n\tif (i != -1) return i\n\tctx.features.push(s)\n\treturn ctx.features.length - 1\n}\n\nfunction getPlacements(pos: BlockPos, feature: any, ctx: PlacementContext): void {\n\tif (typeof feature === 'string') {\n\t\tctx.placements.push([pos, useFeature(feature, ctx)])\n\t\treturn\n\t}\n\tconst type = normalize(feature?.type ?? 'no_op')\n\tconst featureFn = Features[type]\n\tif (featureFn) {\n\t\tfeatureFn(feature.config, pos, ctx)\n\t} else {\n\t\tctx.placements.push([pos, useFeature(JSON.stringify(feature), ctx)])\n\t}\n}\n\nfunction getPositions(pos: BlockPos, decorator: any, ctx: PlacementContext): BlockPos[] {\n\tconst type = normalize(decorator?.type ?? 'nope')\n\tconst decoratorFn = Decorators[type]\n\tif (!decoratorFn) {\n\t\treturn [pos]\n\t}\n\treturn decoratorFn(decorator?.config, pos, ctx)\n}\n\nconst Features: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => void,\n} = {\n\tdecorated: (config, pos, ctx) => {\n\t\tconst positions = getPositions(pos, config?.decorator, ctx)\n\t\tpositions.forEach(p => getPlacements(p, config?.feature, ctx))\n\t},\n\trandom_boolean_selector: (config, pos, ctx) => {\n\t\tconst feature = ctx.nextFloat() < 0.5 ? config?.feature_true : config?.feature_false\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n\trandom_selector: (config, pos, ctx) => {\n\t\tfor (const f of config?.features ?? []) {\n\t\t\tif (ctx.nextFloat() < (f?.chance ?? 0)) {\n\t\t\t\tgetPlacements(pos, f.feature, ctx)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tgetPlacements(pos, config?.default, ctx)\n\t},\n\tsimple_random_selector: (config, pos, ctx) => {\n\t\tconst feature = config?.features?.[ctx.nextInt(config?.features?.length ?? 0)]\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n}\n\nconst Decorators: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => BlockPos[],\n} = {\n\tchance: (config, pos, ctx) => {\n\t\treturn ctx.nextFloat() < 1 / (config?.chance ?? 1) ? [pos] : []\n\t},\n\tcount: (config, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(config?.count ?? 1)).fill(pos)\n\t},\n\tcount_extra: (config, pos, ctx) => {\n\t\tlet count = config?.count ?? 1\n\t\tif (ctx.nextFloat() < config.extra_chance ?? 0){\n\t\t\tcount += config.extra_count ?? 0\n\t\t}\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_multilayer: (config, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(config?.count ?? 1)).fill(pos)\n\t\t\t.map(p => [\n\t\t\t\tp[0] + ctx.nextInt(16),\n\t\t\t\tp[1], \n\t\t\t\tp[2] + ctx.nextInt(16),\n\t\t\t])\n\t},\n\tcount_noise: (config, pos, ctx) => {\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / 200, 0, pos[2] / 200)\n\t\tconst count = noise < config.noise_level ? config.below_noise : config.above_noise\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_noise_biased: (config, pos, ctx) => {\n\t\tconst factor = Math.max(1, config.noise_factor)\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / factor, 0, pos[2] / factor)\n\t\tconst count = Math.max(0, Math.ceil((noise + (config.noise_offset ?? 0)) * config.noise_to_count_ratio))\n\t\treturn new Array(count).fill(pos)\n\t},\n\tdark_oak_tree: (_config, pos, ctx) => {\n\t\treturn [...new Array(16)].map((_, i) => {\n\t\t\tconst x = Math.floor(i / 4) * 4 + 1 + ctx.nextInt(3) + pos[0]\n\t\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, x)])\n\t\t\tconst z = Math.floor(i % 4) * 4 + 1 + ctx.nextInt(3) + pos[2]\n\t\t\treturn [x, y, z]\n\t\t})\n\t},\n\tdecorated: (config, pos, ctx) => {\n\t\treturn getPositions(pos, config?.outer, ctx).flatMap(p => {\n\t\t\treturn getPositions(p, config?.inner, ctx)\n\t\t})\n\t},\n\tdepth_average: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(config?.spread ?? 0) + ctx.nextInt(config?.spread ?? 0) - (config.spread ?? 0) + (config?.baseline ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\temerald_ore: (_config, pos, ctx) => {\n\t\tconst count = 3 + ctx.nextInt(6)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\t4 + ctx.nextInt(28),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\tfire: (config, pos, ctx) => {\n\t\tconst count = 1 + ctx.nextInt(ctx.nextInt(ctx.sampleInt(config?.count)))\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tctx.nextInt(128),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\tglowstone: (config, pos, ctx) => {\n\t\tconst count = ctx.nextInt(1 + ctx.nextInt(ctx.sampleInt(config?.count)))\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tctx.nextInt(128),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\theightmap: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\theightmap_spread_double: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, ctx.nextInt(y * 2))\n\t},\n\theightmap_world_surface: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\ticeberg: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + 4 + ctx.nextInt(8),\n\t\t\tpos[1],\n\t\t\tpos[2] + 4 + ctx.nextInt(8),\n\t\t]]\n\t},\n\tlava_lake: (config, pos, ctx) => {\n\t\tif (ctx.nextInt((config.chance ?? 1) / 10) === 0) {\n\t\t\tconst y = ctx.nextInt(ctx.nextInt(256 - 8) + 8)\n\t\t\tif (y < ctx.seaLevel || ctx.nextInt((config?.chance ?? 1) / 8) == 0) {\n\t\t\t\tconst x = ctx.nextInt(16) + pos[0]\n\t\t\t\tconst z = ctx.nextInt(16) + pos[2]\n\t\t\t\treturn [[x, y, z]]\n\t\t\t}\n\t\t}\n\t\treturn []\n\t},\n\tnope: (_config, pos) => {\n\t\treturn [pos]\n\t},\n\trange: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\trange_biased: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0))\n\t\treturn decorateY(pos, y)\n\t},\n\trange_very_biased: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(ctx.nextInt(ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0)) + (config?.bottom_offset ?? 0))\n\t\treturn decorateY(pos, y)\n\t},\n\tspread_32_above: (_config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(pos[1] + 32)\n\t\treturn decorateY(pos, y)\n\t},\n\ttop_solid_heightmap: (_config, pos) => {\n\t\tconst y = terrain[clamp(0, 63, pos[0])]\n\t\treturn decorateY(pos, y)\n\t},\n\tmagma: (_config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(pos[1] + 32)\n\t\treturn decorateY(pos, y)\n\t},\n\tsquare: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tpos[1],\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t]]\n\t},\n\tsurface_relative_threshold: (config, pos) => {\n\t\tconst height = terrain[clamp(0, 63, pos[0])]\n\t\tconst min = height + (config?.min_inclusive ?? -Infinity)\n\t\tconst max = height + (config?.max_inclusive ?? Infinity)\n\t\treturn (pos[1] < min || pos[1] > max) ? [pos] : []\n\t},\n\twater_lake: (config, pos, ctx) => {\n\t\tif (ctx.nextInt(config.chance ?? 1) === 0) {\n\t\t\treturn [[\n\t\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\t\tctx.nextInt(256),\n\t\t\t\tpos[2] + ctx.nextInt(16),\n\t\t\t]]\n\t\t}\n\t\treturn []\n\t},\n}\n\n// 1.18 and after\nfunction modifyPlacement(pos: BlockPos, placement: any[], ctx: PlacementContext) {\n\tlet positions = [pos]\n\tfor (const modifier of placement) {\n\t\tconst modifierFn = PlacementModifiers[normalize(modifier?.type ?? 'nope')]\n\t\tif (!modifierFn) continue\n\t\tpositions = positions.flatMap(pos =>\n\t\t\tPlacementModifiers[normalize(modifier.type)](modifier, pos, ctx)\n\t\t)\n\t}\n\tfor (const pos of positions) {\n\t\tctx.placements.push([pos, 0])\n\t}\n}\n\nconst PlacementModifiers: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => BlockPos[],\n} = {\n\tcount: ({ count }, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(count ?? 1)).fill(pos)\n\t},\n\tcount_on_every_layer: ({ count }, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(count ?? 1)).fill(pos)\n\t\t\t.map(p => [\n\t\t\t\tp[0] + ctx.nextInt(16),\n\t\t\t\tp[1], \n\t\t\t\tp[2] + ctx.nextInt(16),\n\t\t\t])\n\t},\n\tenvironment_scan: ({}, pos) => {\n\t\treturn [pos]\n\t},\n\theight_range: ({ height }, pos, ctx) => {\n\t\treturn decorateY(pos, sampleHeight(height, ctx))\n\t},\n\theightmap: ({}, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\tin_square: ({}, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tpos[1],\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t]]\n\t},\n\tnoise_based_count: ({ noise_to_count_ratio, noise_factor, noise_offset }, pos, ctx) => {\n\t\tconst factor = Math.max(1, noise_factor)\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / factor, 0, pos[2] / factor)\n\t\tconst count = Math.max(0, Math.ceil((noise + (noise_offset ?? 0)) * noise_to_count_ratio))\n\t\treturn new Array(count).fill(pos)\n\t},\n\tnoise_threshold_count: ({ noise_level, below_noise, above_noise }, pos, ctx) => {\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / 200, 0, pos[2] / 200)\n\t\tconst count = noise < noise_level ? below_noise : above_noise\n\t\treturn new Array(count).fill(pos)\n\t},\n\trandom_offset: ({ xz_spread, y_spread }, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + ctx.sampleInt(xz_spread),\n\t\t\tpos[1] + ctx.sampleInt(y_spread),\n\t\t\tpos[2] + ctx.sampleInt(xz_spread),\n\t\t]]\n\t},\n\trarity_filter: ({ chance }, pos, ctx) => {\n\t\treturn ctx.nextFloat() < 1 / (chance ?? 1) ? [pos] : []\n\t},\n}\n","import { LegacyRandom, PerlinNoise } from 'deepslate'\nimport { clampedLerp, lerp2 } from '../../Utils'\n\nexport class NoiseChunkGenerator {\n\tprivate readonly minLimitPerlinNoise: PerlinNoise\n\tprivate readonly maxLimitPerlinNoise: PerlinNoise\n\tprivate readonly mainPerlinNoise: PerlinNoise\n\tprivate readonly depthNoise: PerlinNoise\n\n\tprivate settings: any = {}\n\tprivate chunkWidth: number = 4\n\tprivate chunkHeight: number = 4\n\tprivate chunkCountY: number = 32\n\tprivate biomeDepth: number = 0.1\n\tprivate biomeScale: number = 0.2\n\n\tprivate noiseColumnCache: (number[] | null)[] = []\n\tprivate xOffset: number = 0\n\n\tconstructor(seed: bigint) {\n\t\tconst random = new LegacyRandom(seed)\n\t\tthis.minLimitPerlinNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.maxLimitPerlinNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.mainPerlinNoise = new PerlinNoise(random, -7, [1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.depthNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t}\n\n\tpublic reset(settings: any, depth: number, scale: number, xOffset: number, width: number) {\n\t\tthis.settings = settings\n\t\tthis.chunkWidth = settings.size_horizontal * 4\n\t\tthis.chunkHeight = settings.size_vertical * 4\n\t\tthis.chunkCountY = Math.floor(settings.height / this.chunkHeight)\n\n\t\tif (settings.amplified && depth > 0) {\n\t\t\tdepth = 1 + depth * 2\n\t\t\tscale = 1 + scale * 4\n\t\t}\n\t\tthis.biomeDepth = 0.265625 * (depth * 0.5 - 0.125)\n\t\tthis.biomeScale = 96.0 / (scale * 0.9 + 0.1)\n\n\t\tthis.noiseColumnCache = Array(width).fill(null)\n\t\tthis.xOffset = xOffset\n\t}\n \n\tpublic iterateNoiseColumn(x: number): number[] {\n\t\tconst data = Array(this.chunkCountY * this.chunkHeight)\n\t\tconst cx = Math.floor(x / this.chunkWidth)\n\t\tconst ox = Math.floor(x % this.chunkWidth) / this.chunkWidth\n\t\tconst noise1 = this.fillNoiseColumn(cx)\n\t\tconst noise2 = this.fillNoiseColumn(cx + 1)\n\n\t\tfor (let y = this.chunkCountY - 1; y >= 0; y -= 1) {\n\t\t\tfor (let yy = this.chunkHeight; yy >= 0; yy -= 1) {\n\t\t\t\tconst oy = yy / this.chunkHeight\n\t\t\t\tconst i = y * this.chunkHeight + yy\n\t\t\t\tdata[i] = lerp2(oy, ox, noise1[y], noise1[y+1], noise2[y], noise2[y+1])\n\t\t\t}\n\t\t}\n\t\treturn data\n\t}\n\n\tprivate fillNoiseColumn(x: number): number[] {\n\t\tconst cachedColumn = this.noiseColumnCache[x - this.xOffset]\n\t\tif (cachedColumn) return cachedColumn\n\n\t\tconst data = Array(this.chunkCountY + 1)\n\n\t\tconst xzScale = 684.412 * this.settings.sampling.xz_scale\n\t\tconst yScale = 684.412 * this.settings.sampling.y_scale\n\t\tconst xzFactor = xzScale / this.settings.sampling.xz_factor\n\t\tconst yFactor = yScale / this.settings.sampling.y_factor\n\t\tconst randomDensity = this.settings.random_density_offset ? this.getRandomDensity(x) : 0\n\n\t\tfor (let y = 0; y <= this.chunkCountY; y += 1) {\n\t\t\tlet noise = this.sampleAndClampNoise(x, y, this.mainPerlinNoise.getOctaveNoise(0)!.zo, xzScale, yScale, xzFactor, yFactor)\n\t\t\tconst yOffset = 1 - y * 2 / this.chunkCountY + randomDensity\n\t\t\tconst density = yOffset * this.settings.density_factor + this.settings.density_offset\n\t\t\tconst falloff = (density + this.biomeDepth) * this.biomeScale\n\t\t\tnoise += falloff * (falloff > 0 ? 4 : 1)\n\n\t\t\tif (this.settings.top_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.top_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(this.chunkCountY - y - (this.settings.top_slide.offset)) / (this.settings.top_slide.size)\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tif (this.settings.bottom_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.bottom_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(y - (this.settings.bottom_slide.offset)) / (this.settings.bottom_slide.size)\n\t\t\t\t)\n\t\t\t}\n\t\t\tdata[y] = noise\n\t\t}\n\n\t\tthis.noiseColumnCache[x - this.xOffset] = data\n\t\treturn data\n\t}\n\n\tprivate getRandomDensity(x: number): number {\n\t\tconst noise = this.depthNoise.sample(x * 200, 10, this.depthNoise.getOctaveNoise(0)!.zo, 1, 0, true)\n\t\tconst a = (noise < 0) ? -noise * 0.3 : noise\n\t\tconst b = a * 24.575625 - 2\n\t\treturn (b < 0) ? b * 0.009486607142857142 : Math.min(b, 1) * 0.006640625\n\t}\n\n\tprivate sampleAndClampNoise(x: number, y: number, z: number, xzScale: number, yScale: number, xzFactor: number, yFactor: number): number {\n\t\tlet a = 0\n\t\tlet b = 0\n\t\tlet c = 0\n\t\tlet d = 1\n\n\t\tfor (let i = 0; i < 16; i += 1) {\n\t\t\tconst x2 = PerlinNoise.wrap(x * xzScale * d)\n\t\t\tconst y2 = PerlinNoise.wrap(y * yScale * d)\n\t\t\tconst z2 = PerlinNoise.wrap(z * xzScale * d)\n\t\t\tconst e = yScale * d\n\n\t\t\tconst minLimitNoise = this.minLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (minLimitNoise) {\n\t\t\t\ta += minLimitNoise.sample(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tconst maxLimitNoise = this.maxLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (maxLimitNoise) {\n\t\t\t\tb += maxLimitNoise.sample(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tif (i < 8) {\n\t\t\t\tconst mainNoise = this.mainPerlinNoise.getOctaveNoise(i)\n\t\t\t\tif (mainNoise) {\n\t\t\t\t\tc += mainNoise.sample(\n\t\t\t\t\t\tPerlinNoise.wrap(x * xzFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(y * yFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(z * xzFactor * d),\n\t\t\t\t\t\tyFactor * d,\n\t\t\t\t\t\ty * yFactor * d \n\t\t\t\t\t) / d\n\t\t\t\t}\n\t\t\t}\n\n\t\t\td /= 2\n\t\t}\n\n\t\treturn clampedLerp(a / 512, b / 512, (c / 10 + 1) / 2)\n\t}\n}\n","import { DataModel } from '@mcschema/core'\nimport type { BlockState } from 'deepslate'\nimport { BlockPos, Chunk, ChunkPos, clampedMap, DensityFunction, FixedBiome, Identifier, NoiseChunkGenerator, NoiseGeneratorSettings, NoiseParameters, NoiseRouter, NoiseSettings, Registry, WorldgenRegistries, XoroshiroRandom } from 'deepslate'\nimport * as deepslate18 from 'deepslate-1.18'\nimport type { VersionId } from '../services'\nimport { checkVersion, fetchAllPresets } from '../services'\nimport { deepClone, deepEqual } from '../Utils'\nimport { NoiseChunkGenerator as OldNoiseChunkGenerator } from './noise/NoiseChunkGenerator'\n\nexport type NoiseSettingsOptions = {\n\tbiome?: string,\n\tbiomeScale?: number,\n\tbiomeDepth?: number,\n\toffset: number,\n\twidth: number,\n\tseed: bigint,\n\tversion: VersionId,\n}\n\nconst Z = 0\n\nconst colors: Record<string, [number, number, number]> = {\n\t'minecraft:air': [150, 160, 170],\n\t'minecraft:water': [20, 80, 170],\n\t'minecraft:lava': [200, 100, 0],\n\t'minecraft:stone': [55, 55, 55],\n\t'minecraft:deepslate': [34, 34, 36],\n\t'minecraft:bedrock': [10, 10, 10],\n\t'minecraft:grass_block': [47, 120, 23],\n\t'minecraft:dirt': [64, 40, 8],\n\t'minecraft:gravel': [70, 70, 70],\n\t'minecraft:sand': [196, 180, 77],\n\t'minecraft:sandstone': [148, 135, 52],\n\t'minecraft:netherrack': [100, 40, 40],\n\t'minecraft:crimson_nylium': [144, 22, 22],\n\t'minecraft:warped_nylium': [28, 115, 113],\n\t'minecraft:basalt': [73, 74, 85],\n\t'minecraft:end_stone': [200, 200, 140],\n}\n\nlet cacheState: any\nlet generatorCache: NoiseChunkGenerator\nlet chunkCache: Chunk[] = []\nconst registryCache = new Map<VersionId, Registry<Registry<any>>>()\n\nexport async function noiseSettings(state: any, img: ImageData, options: NoiseSettingsOptions) {\n\tif (checkVersion(options.version, '1.18')) {\n\t\tif (checkVersion(options.version, '1.18.2')) {\n\t\t\tawait initRegistries(options.version)\n\t\t}\n\n\t\tconst { settings, generator } = getCached(state, options)\n\n\t\tconst slice = new LevelSlice(-options.offset, options.width, settings.noise.minY, settings.noise.height)\n\t\tslice.generate(generator, options.biome)\n\n\t\tconst data = img.data\n\t\tfor (let x = 0; x < options.width; x += 1) {\n\t\t\tfor (let y = 0; y < settings.noise.height; y += 1) {\n\t\t\t\tconst i = x * 4 + (settings.noise.height-y-1) * 4 * img.width\n\t\t\t\tconst state = slice.getBlockState([x - options.offset, y + settings.noise.minY, Z])\n\t\t\t\tconst color = colors[state.getName().toString()] ?? [0, 0, 0]\n\t\t\t\tdata[i] = color[0]\n\t\t\t\tdata[i + 1] = color[1]\n\t\t\t\tdata[i + 2] = color[2]\n\t\t\t\tdata[i + 3] = 255\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\tconst generator = new OldNoiseChunkGenerator(options.seed)\n\tgenerator.reset(state.noise, options.biomeDepth ?? 0, options.biomeScale ?? 0, options.offset, options.width)\n\tconst data = img.data\n\tconst row = img.width * 4\n\tfor (let x = 0; x < options.width; x += 1) {\n\t\tconst noise = generator.iterateNoiseColumn(x - options.offset).reverse()\n\t\tfor (let y = 0; y < state.noise.height; y += 1) {\n\t\t\tconst i = y * row + x * 4\n\t\t\tconst color = getColor(noise, y)\n\t\t\tdata[i] = color\n\t\t\tdata[i + 1] = color\n\t\t\tdata[i + 2] = color\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nexport function getNoiseBlock(x: number, y: number) {\n\tconst chunk = chunkCache.find(c => ChunkPos.minBlockX(c.pos) <= x && ChunkPos.maxBlockX(c.pos) >= x)\n\tif (!chunk) {\n\t\treturn undefined\n\t}\n\treturn chunk.getBlockState(BlockPos.create(x, y, Z))\n}\n\nexport async function densityFunction(state: any, img: ImageData, options: NoiseSettingsOptions) {\n\tconst { fn, settings } = await createDensityFunction(state, options)\n\n\tconst arr = Array(options.width * settings.height)\n\tlet min = Infinity\n\tlet max = -Infinity\n\tfor (let x = 0; x < options.width; x += 1) {\n\t\tfor (let y = 0; y < settings.height; y += 1) {\n\t\t\tconst i = x + (settings.height-y-1) * options.width\n\t\t\tconst density = fn.compute(DensityFunction.context(x - options.offset, y, 0))\n\t\t\tmin = Math.min(min, density)\n\t\t\tmax = Math.max(max, density)\n\t\t\tarr[i] = density\n\t\t}\n\t}\n\n\tconst data = img.data\n\tfor (let i = 0; i < options.width * settings.height; i += 1) {\n\t\tconst color = Math.floor(clampedMap(arr[i], min, max, 0, 256))\n\t\tdata[4 * i] = color\n\t\tdata[4 * i + 1] = color\n\t\tdata[4 * i + 2] = color\n\t\tdata[4 * i + 3] = 255\n\t}\n}\n\nasync function createDensityFunction(state: any, options: NoiseSettingsOptions) {\n\tawait initRegistries(options.version)\n\n\tconst random = XoroshiroRandom.create(options.seed).forkPositional()\n\tconst settings = NoiseSettings.fromJson({\n\t\tmin_y: -64,\n\t\theight: 384,\n\t\tsize_horizontal: 1,\n\t\tsize_vertical: 2,\n\t\tsampling: { xz_scale: 1, y_scale: 1, xz_factor: 80, y_factor: 160 },\n\t\tbottom_slide: { target: 0.1171875, size: 3, offset: 0 },\n\t\ttop_slide: { target: -0.078125, size: 2, offset: 8 },\n\t\tterrain_shaper: { offset: 0.044, factor: 4, jaggedness: 0 },\n\t})\n\tconst originalFn = DensityFunction.fromJson(state)\n\tconst fn = originalFn.mapAll(new NoiseRouter.Visitor(random, settings))\n\n\treturn {\n\t\tfn,\n\t\tsettings,\n\t}\n}\n\nconst Registries: [string, { fromJson(obj: unknown): any}][] = [\n\t['worldgen/noise', NoiseParameters],\n\t['worldgen/density_function', DensityFunction],\n]\n\nasync function initRegistries(version: VersionId) {\n\tconst rootRegistries = registryCache.get(version) ?? new Registry(new Identifier('misode', 'temp'))\n\tif (!registryCache.has(version)) {\n\t\tawait Promise.all(Registries.map(([id, c]) => fetchRegistry(version, rootRegistries, id, c)))\n\t\tregistryCache.set(version, rootRegistries)\n\t}\n\tWorldgenRegistries.DENSITY_FUNCTION.clear().assign(rootRegistries.getOrThrow(Identifier.create('worldgen/density_function')))\n\tWorldgenRegistries.NOISE.clear().assign(rootRegistries.getOrThrow(Identifier.create('worldgen/noise')))\n}\n\nasync function fetchRegistry<T extends { fromJson(obj: unknown): T }>(version: VersionId, root: Registry<Registry<unknown>>, id: string, clazz: T) {\n\tconst entries = await fetchAllPresets(version, id)\n\tconst registry = new Registry<typeof clazz>(Identifier.create(id))\n\tfor (const [key, value] of entries.entries()) {\n\t\tregistry.register(Identifier.parse(key), clazz.fromJson(value))\n\t}\n\troot.register(registry.key, registry)\n}\n\nfunction getCached(state: unknown, options: NoiseSettingsOptions) {\n\tconst settings = NoiseGeneratorSettings.fromJson(DataModel.unwrapLists(state))\n\n\tconst newState = [state, `${options.seed}`, options.biome]\n\tif (!deepEqual(newState, cacheState)) {\n\t\tcacheState = deepClone(newState)\n\t\tchunkCache = []\n\t\tif (checkVersion(options.version, '1.18.2')) {\n\t\t\tconst biomeSource = new FixedBiome(Identifier.create('unknown'))\n\t\t\tgeneratorCache = new NoiseChunkGenerator(options.seed, biomeSource, settings)\n\t\t} else {\n\t\t\tconst biomeSource = new deepslate18.FixedBiome('unknown')\n\t\t\tgeneratorCache = new deepslate18.NoiseChunkGenerator(options.seed, biomeSource, settings as any) as any\n\t\t}\n\t}\n\treturn {\n\t\tsettings,\n\t\tgenerator: generatorCache,\n\t}\n}\n\nfunction getColor(noise: number[], y: number): number {\n\tif (noise[y] > 0) {\n\t\treturn 0\n\t}\n\tif (noise[y+1] > 0) {\n\t\treturn 150\n\t}\n\treturn 255\n}\n\nclass LevelSlice {\n\tprivate readonly chunks: Chunk[]\n\tprivate readonly done: boolean[]\n\n\tconstructor(\n\t\tprivate readonly minX: number,\n\t\twidth: number,\n\t\tminY: number,\n\t\theight: number,\n\t) {\n\t\tthis.done = []\n\t\tthis.chunks = [...Array(Math.ceil(width / 16) + 1)]\n\t\t\t.map((_, i) => {\n\t\t\t\tconst x = (minX >> 4) + i\n\t\t\t\tconst cached = chunkCache.find(c => c.pos[0] === x)\n\t\t\t\tif (cached) {\n\t\t\t\t\tthis.done[i] = true\n\t\t\t\t\treturn cached\n\t\t\t\t}\n\t\t\t\treturn new Chunk(minY, height, ChunkPos.create(x, Z >> 4))\n\t\t\t})\n\t}\n\n\tpublic generate(generator: NoiseChunkGenerator, forcedBiome?: string) {\n\t\tthis.chunks.forEach((chunk, i) => {\n\t\t\tif (!this.done[i]) {\n\t\t\t\tgenerator.fill(chunk, true)\n\t\t\t\tgenerator.buildSurface(chunk, forcedBiome)\n\t\t\t\tthis.done[i] = true\n\t\t\t\tchunkCache.push(chunk)\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic getBlockState(pos: BlockPos): BlockState {\n\t\tconst chunkIndex = (pos[0] >> 4) - (this.minX >> 4)\n\t\treturn this.chunks[chunkIndex].getBlockState(pos)\n\t}\n}\n","import { DataModel, Path } from '@mcschema/core'\nimport type { NoiseParameters } from 'deepslate'\nimport { NoiseGeneratorSettings } from 'deepslate'\nimport { useEffect, useMemo, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn, BtnMenu } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { biomeMap, getBiome } from '../../previews'\nimport { newSeed, randomSeed } from '../../Utils'\n\nconst LAYERS = ['biomes', 'temperature', 'humidity', 'continentalness', 'erosion', 'weirdness'] as const\n\nexport const BiomeSourcePreview = ({ model, data, shown, version }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [configuredSeed] = useState(randomSeed())\n\tconst [scale, setScale] = useState(2)\n\tconst [focused, setFocused] = useState<{[k: string]: number | string} | undefined>(undefined)\n\tconst [layers, setLayers] = useState(new Set<typeof LAYERS[number]>(['biomes']))\n\tconst offset = useRef<[number, number]>([0, 0])\n\tconst res = useRef(1)\n\tconst refineTimeout = useRef<number>(undefined)\n\n\tconst seed = BigInt(model.get(new Path(['generator', 'seed'])) ?? configuredSeed)\n\tconst octaves = useMemo(() => {\n\t\tif (!shown) return undefined\n\t\treturn getOctaves(model.get(new Path(['generator', 'settings'])))\n\t}, [shown])\n\tconst state = shown ? calculateState(data, octaves!) : ''\n\tconst type: string = data.type?.replace(/^minecraft:/, '')\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [200 / res.current, 200 / res.current]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { octaves: octaves!, biomeColors: {}, layers, offset: offset.current, scale, seed, res: res.current, version }\n\t\t\tawait biomeMap(data, img, options)\n\t\t\tif (res.current === 4) {\n\t\t\t\tclearTimeout(refineTimeout.current)\n\t\t\t\trefineTimeout.current = setTimeout(() => {\n\t\t\t\t\tres.current = 1\n\t\t\t\t\tredraw()\n\t\t\t\t}, 150) as any\n\t\t\t}\n\t\t},\n\t\tasync onDrag(dx, dy) {\n\t\t\toffset.current[0] = offset.current[0] + dx * 200\n\t\t\toffset.current[1] = offset.current[1] + dy * 200\n\t\t\tclearTimeout(refineTimeout.current)\n\t\t\tres.current = type === 'multi_noise' ? 4 : 1\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(x, y) {\n\t\t\tconst options = { octaves: octaves!, biomeColors: {}, layers, offset: offset.current, scale, seed: configuredSeed, res: 1, version }\n\t\t\tconst biome = await getBiome(data, Math.floor(x * 200), Math.floor(y * 200), options)\n\t\t\tsetFocused(biome)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, scale, configuredSeed, layers])\n\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tres.current = type === 'multi_noise' ? 4 : 1\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, configuredSeed, layers, shown])\n\n\tconst changeScale = (newScale: number) => {\n\t\toffset.current[0] = offset.current[0] * scale / newScale\n\t\toffset.current[1] = offset.current[1] * scale / newScale\n\t\tsetScale(newScale)\n\t}\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t{focused && <Btn label={focused.biome as string} class=\"no-pointer\" />}\n\t\t\t{type === 'multi_noise' &&\n\t\t\t\t<BtnMenu icon=\"stack\" tooltip={locale('configure_layers')}>\n\t\t\t\t\t{LAYERS.map(name => {\n\t\t\t\t\t\tconst enabled = layers.has(name)\n\t\t\t\t\t\treturn <Btn label={locale(`layer.${name}`)} \n\t\t\t\t\t\t\tactive={enabled}\n\t\t\t\t\t\t\ttooltip={enabled ? locale('enabled') : locale('disabled')}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\tsetLayers(new Set([name]))\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t}} />\n\t\t\t\t\t})}\n\t\t\t\t</BtnMenu>}\n\t\t\t{(type === 'multi_noise' || type === 'checkerboard') && <>\n\t\t\t\t<Btn icon=\"dash\" tooltip={locale('zoom_out')}\n\t\t\t\t\tonClick={() => changeScale(scale * 1.5)} />\n\t\t\t\t<Btn icon=\"plus\" tooltip={locale('zoom_in')}\n\t\t\t\t\tonClick={() => changeScale(scale / 1.5)} />\n\t\t\t</>}\n\t\t\t{type === 'multi_noise' &&\n\t\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\t\tonClick={() => newSeed(model)} />}\n\t\t</div>\n\t\t{focused?.temperature !== undefined && <div class=\"controls secondary-controls\">\n\t\t\t<Btn class=\"no-pointer\" label={Object.entries(focused)\n\t\t\t\t.filter(([k]) => k !== 'biome')\n\t\t\t\t.map(([k, v]) => `${k[0].toUpperCase()}: ${(v as number).toFixed(2)}`).join(' ')}/>\n\t\t</div>}\n\t\t<canvas ref={canvas} width=\"200\" height=\"200\"></canvas>\n\t</>\n}\n\nfunction calculateState(data: any, octaves: Record<string, NoiseParameters>) {\n\treturn JSON.stringify([data, octaves])\n}\n\nexport function getOctaves(obj: any): Record<string, NoiseParameters> {\n\tif (typeof obj !== 'string') {\n\t\tconst settings = NoiseGeneratorSettings.fromJson(DataModel.unwrapLists(obj))\n\t\tobj = settings.legacyRandomSource ? 'minecraft:nether' : 'minecraft:overworld'\n\t}\n\tswitch (obj.replace(/^minecraft:/, '')) {\n\t\tcase 'overworld':\n\t\tcase 'amplified':\n\t\t\treturn {\n\t\t\t\ttemperature: { firstOctave: -9, amplitudes: [1.5, 0, 1, 0, 0, 0] },\n\t\t\t\thumidity: { firstOctave: -7, amplitudes: [1, 1, 0, 0, 0, 0] },\n\t\t\t\tcontinentalness: { firstOctave: -9, amplitudes: [1, 1, 2, 2, 2, 1, 1, 1, 1] },\n\t\t\t\terosion: { firstOctave: -9, amplitudes: [1, 1, 0, 1, 1] },\n\t\t\t\tweirdness: { firstOctave: -7, amplitudes: [1, 2, 1, 0, 0, 0] },\n\t\t\t\tshift: { firstOctave: -3, amplitudes: [1, 1, 1, 0] },\n\t\t\t}\n\t\tcase 'end':\n\t\tcase 'floating_islands':\n\t\t\treturn {\n\t\t\t\ttemperature: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\thumidity: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\tcontinentalness: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\terosion: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\tweirdness: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\tshift: { firstOctave: 0, amplitudes: [0] },\n\t\t\t}\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\ttemperature: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\thumidity: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\tcontinentalness: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\terosion: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\tweirdness: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\tshift: { firstOctave: 0, amplitudes: [0] },\n\t\t\t}\n\t}\n}\n","import { useEffect, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { decorator } from '../../previews'\nimport { randomSeed } from '../../Utils'\n\nexport const DecoratorPreview = ({ data, version, shown }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [scale, setScale] = useState(4)\n\tconst [seed, setSeed] = useState(randomSeed())\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [scale * 16, scale * 16]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tdecorator(data, img, { seed, version, size: [scale * 16, 128, scale * 16] })\n\t\t},\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t<Btn icon=\"dash\" tooltip={locale('zoom_out')}\n\t\t\t\tonClick={() => setScale(Math.min(16, scale + 1))} />\n\t\t\t<Btn icon=\"plus\" tooltip={locale('zoom_in')}\n\t\t\t\tonClick={() => setScale(Math.max(1, scale - 1))} />\n\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\tonClick={() => setSeed(randomSeed())} />\n\t\t</div>\n\t\t<canvas ref={canvas} width=\"64\" height=\"64\"></canvas>\n\t</>\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn, BtnMenu } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { densityFunction } from '../../previews'\nimport { randomSeed } from '../../Utils'\n\nexport const DensityFunctionPreview = ({ data, shown, version }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [seed, setSeed] = useState(randomSeed())\n\tconst [autoScroll, setAutoScroll] = useState(false)\n\tconst [focused, setFocused] = useState<string | undefined>(undefined)\n\tconst offset = useRef(0)\n\tconst scrollInterval = useRef<number | undefined>(undefined)\n\tconst state = JSON.stringify([data])\n\n\tconst size = data?.noise?.height ?? 256\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [size, size]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { offset: offset.current, width: img.width, seed, version }\n\t\t\tawait densityFunction(data, img, options)\n\t\t},\n\t\tasync onDrag(dx) {\n\t\t\toffset.current += dx * size\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(x, y) {\n\t\t\tconst worldX = Math.floor(x * size - offset.current)\n\t\t\tconst worldY = size - Math.max(1, Math.ceil(y * size)) + (data?.noise?.min_y ?? 0)\n\t\t\tsetFocused(`X=${worldX} Y=${worldY}`)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, seed])\n\n\tuseEffect(() => {\n\t\tif (scrollInterval.current) {\n\t\t\tclearInterval(scrollInterval.current)\n\t\t}\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t\tif (autoScroll) {\n\t\t\t\tscrollInterval.current = setInterval(() => {\n\t\t\t\t\toffset.current -= 8\n\t\t\t\t\tredraw()\n\t\t\t\t}, 100) as any\n\t\t\t}\n\t\t}\n\t}, [state, seed, shown, autoScroll])\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t{focused && <Btn label={focused} class=\"no-pointer\" />}\n\t\t\t<BtnMenu icon=\"gear\" tooltip={locale('terrain_settings')}>\n\t\t\t\t<Btn icon={autoScroll ? 'square_fill' : 'square'} label={locale('preview.auto_scroll')} onClick={() => setAutoScroll(!autoScroll)} />\n\t\t\t</BtnMenu>\n\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\tonClick={() => setSeed(randomSeed())} />\n\t\t</div>\n\t\t<canvas ref={canvas} width={size} height={size}></canvas>\n\t</>\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { normalNoise } from '../../previews'\nimport { randomSeed } from '../../Utils'\n\nexport const NoisePreview = ({ data, shown, version }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [seed, setSeed] = useState(randomSeed())\n\tconst [scale, setScale] = useState(2)\n\tconst offset = useRef<[number, number]>([0, 0])\n\tconst state = JSON.stringify([data])\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [256, 256]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { offset: offset.current, scale, seed, version }\n\t\t\tnormalNoise(data, img, options)\n\t\t},\n\t\tasync onDrag(dx, dy) {\n\t\t\toffset.current[0] = offset.current[0] + dx * 256\n\t\t\toffset.current[1] = offset.current[1] + dy * 256\n\t\t\tredraw()\n\t\t},\n\t}, [state, scale, seed])\n\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\tconst changeScale = (newScale: number) => {\n\t\toffset.current[0] = offset.current[0] * scale / newScale\n\t\toffset.current[1] = offset.current[1] * scale / newScale\n\t\tsetScale(newScale)\n\t}\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t<Btn icon=\"dash\" tooltip={locale('zoom_out')}\n\t\t\t\tonClick={() => changeScale(scale * 1.5)} />\n\t\t\t<Btn icon=\"plus\" tooltip={locale('zoom_in')}\n\t\t\t\tonClick={() => changeScale(scale / 1.5)} />\n\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\tonClick={() => setSeed(randomSeed())} />\n\t\t</div>\n\t\t<canvas ref={canvas} width=\"256\" height=\"256\"></canvas>\n\t</>\n}\n","import { DataModel } from '@mcschema/core'\nimport { LegacyRandom, NoiseParameters, NormalNoise } from 'deepslate'\nimport type { VersionId } from '../services'\n\nexport type NoiseOptions = {\n\toffset: [number, number],\n\tscale: number,\n\tseed: bigint,\n\tversion: VersionId,\n}\n\nexport function normalNoise(state: any, img: ImageData, options: NoiseOptions) {\n\tconst random = new LegacyRandom(options.seed)\n\tconst params = NoiseParameters.fromJson(DataModel.unwrapLists(state))\n\tconst noise = new NormalNoise(random, params)\n\n\tconst ox = -options.offset[0] - 100\n\tconst oz = -options.offset[1] - 100\n\tconst data = img.data\n\tfor (let x = 0; x < 256; x += 1) {\n\t\tfor (let y = 0; y < 256; y += 1) {\n\t\t\tconst i = x * 4 + y * 4 * 256\n\t\t\tconst xx = (x + ox) * options.scale\n\t\t\tconst yy = (y + oz) * options.scale\n\t\t\tconst color = (noise.sample(xx, yy, 0) + 1) * 128\n\t\t\tdata[i] = color\n\t\t\tdata[i + 1] = color\n\t\t\tdata[i + 2] = color\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n","import { useEffect, useMemo, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn, BtnInput, BtnMenu } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { getNoiseBlock, noiseSettings } from '../../previews'\nimport { CachedCollections, checkVersion } from '../../services'\nimport { randomSeed } from '../../Utils'\n\nexport const NoiseSettingsPreview = ({ data, shown, version }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [seed, setSeed] = useState(randomSeed())\n\tconst [biome, setBiome] = useState('minecraft:plains')\n\tconst [biomeScale, setBiomeScale] = useState(0.2)\n\tconst [biomeDepth, setBiomeDepth] = useState(0.1)\n\tconst [autoScroll, setAutoScroll] = useState(false)\n\tconst [focused, setFocused] = useState<string | undefined>(undefined)\n\tconst offset = useRef(0)\n\tconst scrollInterval = useRef<number | undefined>(undefined)\n\tconst state = JSON.stringify([data, biomeScale, biomeDepth])\n\n\tconst size = data?.noise?.height ?? 256\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [size, size]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { biome, biomeDepth, biomeScale, offset: offset.current, width: img.width, seed, version }\n\t\t\tawait noiseSettings(data, img, options)\n\t\t},\n\t\tasync onDrag(dx) {\n\t\t\toffset.current += dx * size\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(x, y) {\n\t\t\tconst worldX = Math.floor(x * size - offset.current)\n\t\t\tconst worldY = size - Math.max(1, Math.ceil(y * size)) + (data?.noise?.min_y ?? 0)\n\t\t\tconst block = getNoiseBlock(worldX, worldY)\n\t\t\tsetFocused(block ? `Y=${worldY} (${block.getName().path})` : `Y=${worldY}`)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, seed])\n\n\tuseEffect(() => {\n\t\tif (scrollInterval.current) {\n\t\t\tclearInterval(scrollInterval.current)\n\t\t}\n\t\tif (shown) {\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tawait redraw()\n\t\t\t\t\tif (autoScroll) {\n\t\t\t\t\t\tscrollInterval.current = setInterval(() => {\n\t\t\t\t\t\t\toffset.current -= 8\n\t\t\t\t\t\t\tredraw()\n\t\t\t\t\t\t}, 100) as any\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow e\n\t\t\t\t}\n\t\t\t})()\n\t\t}\n\t}, [state, seed, shown, biome, biomeScale, biomeDepth, autoScroll])\n\n\tconst allBiomes = useMemo(() => CachedCollections?.get('worldgen/biome') ?? [], [version])\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t{focused && <Btn label={focused} class=\"no-pointer\" />}\n\t\t\t<BtnMenu icon=\"gear\" tooltip={locale('terrain_settings')}>\n\t\t\t\t{checkVersion(version, undefined, '1.17') ? <>\n\t\t\t\t\t<BtnInput label={locale('preview.scale')} value={`${biomeScale}`} onChange={v => setBiomeScale(Number(v))} />\n\t\t\t\t\t<BtnInput label={locale('preview.depth')} value={`${biomeDepth}`} onChange={v => setBiomeDepth(Number(v))} />\n\t\t\t\t</> :\n\t\t\t\t\t<BtnInput label={locale('preview.biome')} value={biome} onChange={setBiome} dataList={allBiomes} larger />\n\t\t\t\t}\n\t\t\t\t<Btn icon={autoScroll ? 'square_fill' : 'square'} label={locale('preview.auto_scroll')} onClick={() => setAutoScroll(!autoScroll)} />\n\t\t\t</BtnMenu>\n\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\tonClick={() => setSeed(randomSeed())} />\n\t\t</div>\n\t\t<canvas ref={canvas} width={size} height={size}></canvas>\n\t</>\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport { useState } from 'preact/hooks'\nimport { useModel } from '../../hooks'\nimport type { VersionId } from '../../services'\nimport { checkVersion } from '../../services'\nimport { BiomeSourcePreview, DecoratorPreview, DensityFunctionPreview, NoisePreview, NoiseSettingsPreview } from '../previews'\n\nexport const HasPreview = ['dimension', 'worldgen/density_function', 'worldgen/noise', 'worldgen/noise_settings', 'worldgen/configured_feature', 'worldgen/placed_feature']\n\ntype PreviewPanelProps = {\n\tmodel: DataModel | null,\n\tversion: VersionId,\n\tid: string,\n\tshown: boolean,\n\tonError: (message: string) => unknown,\n}\nexport function PreviewPanel({ model, version, id, shown }: PreviewPanelProps) {\n\tconst [, setCount] = useState(0)\n\n\tuseModel(model, () => {\n\t\tsetCount(count => count + 1)\n\t})\n\n\tif (!model) return <></>\n\n\tif (id === 'dimension' && model.get(new Path(['generator', 'type']))?.endsWith('noise')) {\n\t\tconst data = model.get(new Path(['generator', 'biome_source']))\n\t\tif (data) return <BiomeSourcePreview {...{ model, version, shown, data }} />\n\t}\n\n\tif (id === 'worldgen/density_function') {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return <DensityFunctionPreview {...{ model, version, shown, data }} />\n\t}\n\n\tif (id === 'worldgen/noise') {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return <NoisePreview {...{ model, version, shown, data }} />\n\t}\n\n\tif (id === 'worldgen/noise_settings') {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return <NoiseSettingsPreview {...{ model, version, shown, data }} />\n\t}\n\n\tif ((id === 'worldgen/placed_feature' || (id === 'worldgen/configured_feature' && checkVersion(version, '1.16', '1.17')))) {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return <DecoratorPreview {...{ model, version, shown, data }} />\n\t}\n\n\treturn <></>\n}\n","import type { DataModel, Hook } from '@mcschema/core'\nimport { ModelPath, relativePath } from '@mcschema/core'\nimport type { BlockStateRegistry } from '../services'\n\nexport function getOutput(model: DataModel, blockStates: BlockStateRegistry): any {\n\treturn model.schema.hook(transformOutput, new ModelPath(model), model.data, { blockStates })\n}\n\nexport type OutputProps = {\n\tblockStates: BlockStateRegistry,\n}\nexport const transformOutput: Hook<[any, OutputProps], any> = {\n\tbase({}, _, value) {\n\t\treturn value\n\t},\n\n\tchoice({ switchNode }, path, value, props) {\n\t\treturn switchNode.hook(this, path, value, props)\n\t},\n\n\tlist({ children }, path, value, props) {\n\t\tif (!Array.isArray(value)) return value\n\t\tconst res = value.map((obj, index) =>\n\t\t\tchildren.hook(this, path.push(index), obj.node, props)\n\t\t)\n\t\tfor (const a of Object.getOwnPropertySymbols(value)) {\n\t\t\tres[a as any] = value[a as any]\n\t\t}\n\t\treturn res\n\t},\n\n\tmap({ children, config }, path, value, props) {\n\t\tif (value === undefined) return undefined\n\t\tconst blockState = config.validation?.validator === 'block_state_map'? props.blockStates?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst res: any = {}\n\t\tObject.keys(value).forEach(f => {\n\t\t\tif (blockState) {\n\t\t\t\tif (!Object.keys(blockState.properties ?? {}).includes(f)) return\n\t\t\t}\n\t\t\tres[f] = children.hook(this, path.push(f), value[f], props)\n\t\t})\n\t\tfor (const a of Object.getOwnPropertySymbols(value)) {\n\t\t\tres[a as any] = value[a]\n\t\t}\n\t\treturn res\n\t},\n\n\tobject({ getActiveFields }, path, value, props) {\n\t\tif (value === undefined || value === null || typeof value !== 'object') {\n\t\t\treturn value\n\t\t}\n\t\tconst res: any = {}\n\t\tconst activeFields = getActiveFields(path)\n\t\tObject.keys(activeFields)\n\t\t\t.filter(k => activeFields[k].enabled(path))\n\t\t\t.forEach(f => {\n\t\t\t\tconst out = activeFields[f].hook(this, path.push(f), value[f], props)\n\t\t\t\tif (out !== undefined && out !== null) {\n\t\t\t\t\tres[f] = out\n\t\t\t\t}\n\t\t\t})\n\t\tfor (const a of Object.getOwnPropertySymbols(value)) {\n\t\t\tres[a as any] = value[a]\n\t\t}\n\t\treturn res\n\t},\n}\n","import { DataModel } from '@mcschema/core'\nimport brace from 'brace'\nimport 'brace/mode/json'\nimport 'brace/mode/yaml'\nimport json from 'comment-json'\nimport yaml from 'js-yaml'\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, BtnMenu } from '..'\nimport { useLocale } from '../../contexts'\nimport { useModel } from '../../hooks'\nimport { getOutput } from '../../schema/transformOutput'\nimport type { BlockStateRegistry } from '../../services'\nimport { Store } from '../../Store'\nimport { message } from '../../Utils'\n\nconst INDENT: Record<string, number | string | undefined> = {\n\t'2_spaces': 2,\n\t'4_spaces': 4,\n\ttabs: '\\t',\n\tminified: undefined,\n}\n\nconst FORMATS: Record<string, {\n\tparse: (v: string) => any,\n\tstringify: (v: any, indentation: string | number | undefined) => string,\n}> = {\n\tjson: {\n\t\tparse: json.parse,\n\t\tstringify: (v, i) => json.stringify(v, null, i) + '\\n',\n\t},\n\tyaml: {\n\t\tparse: yaml.load,\n\t\tstringify: (v, i) => yaml.dump(v, {\n\t\t\tflowLevel: i === undefined ? 0 : -1,\n\t\t\tindent: typeof i === 'string' ? 4 : i,\n\t\t}),\n\t},\n}\n\ninterface Editor {\n\tgetValue(): string\n\tsetValue(value: string): void\n\tconfigure(indent: string, format: string): void\n\tselect(): void\n}\n\ntype SourcePanelProps = {\n\tname: string,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tdoCopy?: number,\n\tdoDownload?: number,\n\tdoImport?: number,\n\tcopySuccess: () => unknown,\n\tonError: (message: string | Error) => unknown,\n}\nexport function SourcePanel({ name, model, blockStates, doCopy, doDownload, doImport, copySuccess, onError }: SourcePanelProps) {\n\tconst { locale } = useLocale()\n\tconst [indent, setIndent] = useState(Store.getIndent())\n\tconst [format, setFormat] = useState(Store.getFormat())\n\tconst [highlighting, setHighlighting] = useState(Store.getHighlighting())\n\tconst download = useRef<HTMLAnchorElement>(null)\n\tconst retransform = useRef<Function>()\n\tconst onImport = useRef<(e: any) => any>()\n\n\tconst textarea = useRef<HTMLTextAreaElement>()\n\tconst editor = useRef<Editor>()\n\n\tconst getSerializedOutput = useCallback((model: DataModel, blockStates: BlockStateRegistry) => {\n\t\tconst data = getOutput(model, blockStates)\n\t\treturn FORMATS[format].stringify(data, INDENT[indent])\n\t}, [indent, format])\n\n\tuseEffect(() => {\n\t\tretransform.current = () => {\n\t\t\tif (!model || !blockStates) return\n\t\t\ttry {\n\t\t\t\tconst output = getSerializedOutput(model, blockStates)\n\t\t\t\teditor.current.setValue(output)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof Error) {\n\t\t\t\t\te.message = `Error getting JSON output: ${e.message}`\n\t\t\t\t\tonError(e)\n\t\t\t\t} else {\n\t\t\t\t\tonError(`Error getting JSON output: ${message(e)}`)\n\t\t\t\t}\n\t\t\t\tconsole.error(e)\n\t\t\t\teditor.current.setValue('')\n\t\t\t}\n\t\t}\n\n\t\tonImport.current = () => {\n\t\t\tconst value = editor.current.getValue()\n\t\t\tif (value.length === 0) return\n\t\t\ttry {\n\t\t\t\tconst data = FORMATS[format].parse(value)\n\t\t\t\tmodel?.reset(DataModel.wrapLists(data), false)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof Error) {\n\t\t\t\t\te.message = `Error importing: ${e.message}`\n\t\t\t\t\tonError(e)\n\t\t\t\t} else {\n\t\t\t\t\tonError(`Error importing: ${message(e)}`)\n\t\t\t\t}\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t}\n\t}, [model, blockStates, indent, format, highlighting])\n\n\tuseEffect(() => {\n\t\tif (highlighting) {\n\t\t\tconst braceEditor = brace.edit('editor')\n\t\t\tbraceEditor.setOptions({\n\t\t\t\tfontSize: 14,\n\t\t\t\tshowFoldWidgets: false,\n\t\t\t\thighlightSelectedWord: false,\n\t\t\t})\n\t\t\tbraceEditor.$blockScrolling = Infinity\n\t\t\tbraceEditor.on('blur', e => onImport.current(e))\n\t\t\tbraceEditor.getSession().setMode('ace/mode/json')\n\n\t\t\teditor.current = {\n\t\t\t\tgetValue() {\n\t\t\t\t\treturn braceEditor.getSession().getValue()\n\t\t\t\t},\n\t\t\t\tsetValue(value) {\n\t\t\t\t\tbraceEditor.getSession().setValue(value)\n\t\t\t\t},\n\t\t\t\tconfigure(indent, format) {\n\t\t\t\t\tbraceEditor.setOption('useSoftTabs', indent !== 'tabs')\n\t\t\t\t\tbraceEditor.setOption('tabSize', indent === 'tabs' ? 4 : INDENT[indent])\n\t\t\t\t\tbraceEditor.getSession().setMode(`ace/mode/${format}`)\n\t\t\t\t},\n\t\t\t\tselect() {\n\t\t\t\t\tbraceEditor.selectAll()\n\t\t\t\t},\n\t\t\t}\n\t\t} else {\n\t\t\teditor.current = {\n\t\t\t\tgetValue() {\n\t\t\t\t\treturn textarea.current.value\n\t\t\t\t},\n\t\t\t\tsetValue(value: string) {\n\t\t\t\t\ttextarea.current.value = value\n\t\t\t\t},\n\t\t\t\tconfigure() {},\n\t\t\t\tselect() {},\n\t\t\t}\n\t\t}\n\t}, [highlighting])\n\n\tuseModel(model, () => {\n\t\tretransform.current()\n\t})\n\tuseEffect(() => {\n\t\tif (model) retransform.current()\n\t}, [model])\n\n\tuseEffect(() => {\n\t\teditor.current.configure(indent, format)\n\t\tretransform.current()\n\t}, [indent, format, highlighting])\n\n\tuseEffect(() => {\n\t\tif (doCopy && model && blockStates) {\n\t\t\tnavigator.clipboard.writeText(getSerializedOutput(model, blockStates)).then(() => {\n\t\t\t\tcopySuccess()\n\t\t\t})\n\t\t}\n\t}, [doCopy])\n\n\tuseEffect(() => {\n\t\tif (doDownload && model && blockStates && download.current) {\n\t\t\tconst content = encodeURIComponent(getSerializedOutput(model, blockStates))\n\t\t\tdownload.current.setAttribute('href', `data:text/json;charset=utf-8,${content}`)\n\t\t\tdownload.current.setAttribute('download', `${name}.${format}`)\n\t\t\tdownload.current.click()\n\t\t}\n\t}, [doDownload])\n\n\tuseEffect(() => {\n\t\tif (doImport && editor.current) {\n\t\t\teditor.current.setValue('')\n\t\t\teditor.current.select()\n\t\t}\n\t}, [doImport])\n\n\tconst changeIndent = (value: string) => {\n\t\tStore.setIndent(value)\n\t\tsetIndent(value)\n\t}\n\n\tconst changeFormat = (value: string) => {\n\t\tStore.setFormat(value)\n\t\tsetFormat(value)\n\t}\n\n\tconst changeHighlighting = (value: boolean) => {\n\t\tStore.setHighlighting(value)\n\t\tsetHighlighting(value)\n\t}\n\n\treturn <> \n\t\t<div class=\"controls source-controls\">\n\t\t\t<BtnMenu icon=\"gear\" tooltip={locale('output_settings')} data-cy=\"source-controls\">\n\t\t\t\t{Object.entries(INDENT).map(([key]) =>\n\t\t\t\t\t<Btn label={locale(`indentation.${key}`)} active={indent === key}\n\t\t\t\t\t\tonClick={() => changeIndent(key)}/>\n\t\t\t\t)}\n\t\t\t\t<hr />\n\t\t\t\t{Object.keys(FORMATS).map(key =>\n\t\t\t\t\t<Btn label={locale(`format.${key}`)} active={format === key}\n\t\t\t\t\t\tonClick={() => changeFormat(key)} />)}\n\t\t\t\t<hr />\n\t\t\t\t<Btn icon={highlighting ? 'square_fill' : 'square'} label={locale('highlighting')}\n\t\t\t\t\tonClick={() => changeHighlighting(!highlighting)} />\n\t\t\t</BtnMenu>\n\t\t</div>\n\t\t{highlighting\n\t\t\t? <pre id=\"editor\" class=\"source\"></pre>\n\t\t\t: <textarea ref={textarea} class=\"source\" spellcheck={false} autocorrect=\"off\" onBlur={onImport.current}></textarea>}\n\t\t<a ref={download} style=\"display: none;\"></a>\n\t</>\n}\n","import type { INode, Path } from '@mcschema/core'\nimport { DataModel } from '@mcschema/core'\n\nexport class ModelWrapper extends DataModel {\n\tconstructor(\n\t\tschema: INode<any>,\n\t\tprivate readonly mapper: (path: Path) => Path,\n\t\tprivate readonly getter: (path: Path) => any,\n\t\tprivate readonly setter: (path: Path, value: any, silent?: boolean) => any,\n\t) {\n\t\tsuper(schema)\n\t}\n\n\tmap(path: Path) {\n\t\treturn this.mapper(path)\n\t}\n\n\tget(path: Path) {\n\t\treturn this.getter(path)\n\t}\n\n\tset(path: Path, value: any, silent?: boolean) {\n\t\treturn this.setter(path, value, silent)\n\t}\n}\n","import type { BooleanHookParams, EnumOption, Hook, INode, NodeChildren, NumberHookParams, StringHookParams, ValidationOption } from '@mcschema/core'\nimport { DataModel, ListNode, MapNode, ModelPath, ObjectNode, Path, relativePath, StringNode } from '@mcschema/core'\nimport type { ComponentChildren, JSX } from 'preact'\nimport { memo } from 'preact/compat'\nimport { useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Btn, Octicon } from '../components'\nimport { localize } from '../contexts'\nimport { useFocus } from '../hooks'\nimport type { BlockStateRegistry, VersionId } from '../services'\nimport { CachedDecorator, CachedFeature } from '../services'\nimport { deepClone, deepEqual, hexId, isObject, newSeed } from '../Utils'\nimport { ModelWrapper } from './ModelWrapper'\n\nconst selectRegistries = ['loot_table.type', 'loot_entry.type', 'function.function', 'condition.condition', 'criterion.trigger', 'recipe.type', 'dimension.generator.type', 'dimension.generator.biome_source.type', 'dimension.generator.biome_source.preset', 'carver.type', 'feature.type', 'decorator.type', 'feature.tree.minimum_size.type', 'block_state_provider.type', 'trunk_placer.type', 'foliage_placer.type', 'tree_decorator.type', 'int_provider.type', 'float_provider.type', 'height_provider.type', 'structure_feature.type', 'surface_builder.type', 'processor.processor_type', 'rule_test.predicate_type', 'pos_rule_test.predicate_type', 'template_element.element_type', 'block_placer.type', 'block_predicate.type', 'material_rule.type', 'material_condition.type', 'structure_placement.type', 'density_function.type', 'root_placer.type', 'entity.type_specific.cat.variant', 'entity.type_specific.frog.variant']\nconst hiddenFields = ['number_provider.type', 'score_provider.type', 'nbt_provider.type', 'int_provider.type', 'float_provider.type', 'height_provider.type']\nconst flattenedFields = ['feature.config', 'decorator.config', 'int_provider.value', 'float_provider.value', 'block_state_provider.simple_state_provider.state', 'block_state_provider.rotated_block_provider.state', 'block_state_provider.weighted_state_provider.entries.entry.data', 'rule_test.block_state', 'structure_feature.config', 'surface_builder.config', 'template_pool.elements.entry.element', 'decorator.block_survives_filter.state', 'material_rule.block.result_state']\nconst inlineFields = ['loot_entry.type', 'function.function', 'condition.condition', 'criterion.trigger', 'dimension.generator.type', 'dimension.generator.biome_source.type', 'feature.type', 'decorator.type', 'block_state_provider.type', 'feature.tree.minimum_size.type', 'trunk_placer.type', 'foliage_placer.type', 'tree_decorator.type', 'block_placer.type', 'rule_test.predicate_type', 'processor.processor_type', 'template_element.element_type', 'nbt_operation.op', 'number_provider.value', 'score_provider.name', 'score_provider.target', 'nbt_provider.source', 'nbt_provider.target', 'generator_biome.biome', 'block_predicate.type', 'material_rule.type', 'material_condition.type', 'density_function.type', 'root_placer.type', 'entity.type_specific.type']\nconst nbtFields = ['function.set_nbt.tag', 'advancement.display.icon.nbt', 'text_component_object.nbt', 'entity.nbt', 'block.nbt', 'item.nbt']\nconst fixedLists = ['generator_biome.parameters.temperature', 'generator_biome.parameters.humidity', 'generator_biome.parameters.continentalness', 'generator_biome.parameters.erosion', 'generator_biome.parameters.depth', 'generator_biome.parameters.weirdness', 'feature.end_spike.crystal_beam_target', 'feature.end_gateway.exit', 'decorator.block_filter.offset', 'block_predicate.matching_blocks.offset', 'block_predicate.matching_fluids.offset', 'model_element.from', 'model_element.to', 'model_element.rotation.origin', 'model_element.faces.uv', 'item_transform.rotation', 'item_transform.translation', 'item_transform.scale', 'generator_structure.random_spread.locate_offset']\nconst collapsedFields = ['noise_settings.surface_rule', 'noise_settings.noise.terrain_shaper']\nconst collapsableFields = ['density_function.argument', 'density_function.argument1', 'density_function.argument2', 'density_function.input', 'density_function.when_in_range', 'density_function.when_out_of_range']\n\nconst findGenerator = (id: string) => {\n\treturn config.generators.find(g => g.id === id.replace(/^\\$/, ''))\n}\n\n/**\n * Secondary model used to remember the keys of a map\n */\nconst keysModel = new DataModel(MapNode(\n\tStringNode(),\n\tStringNode()\n), { historyMax: 0 })\n\ntype JSXTriple = [JSX.Element | null, JSX.Element | null, JSX.Element | null]\ntype RenderHook = Hook<[any, string, VersionId, BlockStateRegistry, Record<string, any>], JSXTriple>\n\ntype NodeProps<T> = T & {\n\tnode: INode<any>,\n\tpath: ModelPath,\n\tvalue: any,\n\tlang: string,\n\tversion: VersionId,\n\tstates: BlockStateRegistry,\n\tctx: Record<string, any>,\n}\n\nexport function FullNode({ model, lang, version, blockStates }: { model: DataModel, lang: string, version: VersionId, blockStates: BlockStateRegistry }) {\n\tconst path = new ModelPath(model)\n\tconst [prefix, suffix, body] = model.schema.hook(renderHtml, path, deepClone(model.data), lang, version, blockStates, {})\n\treturn suffix?.props?.children.some((c: any) => c) ? <div class={`node ${model.schema.type(path)}-node`} data-category={model.schema.category(path)}>\n\t\t<div class=\"node-header\">{prefix}{suffix}</div>\n\t\t<div class=\"node-body\">{body}</div>\n\t</div> : body\n}\n\nconst renderHtml: RenderHook = {\n\tbase() {\n\t\treturn [null, null, null]\n\t},\n\n\tboolean(params, path, value, lang, version, states, ctx) {\n\t\treturn [null, <BooleanSuffix {...{...params, path, value, lang, version, states, ctx}} />, null]\n\t},\n\n\tchoice({ choices, config, switchNode }, path, value, lang, version, states, ctx) {\n\t\tconst choice = switchNode.activeCase(path, true) as typeof choices[number]\n\t\tconst contextPath = (config?.context) ? new ModelPath(path.getModel(), new Path(path.getArray(), [config.context])) : path\n\t\tconst [prefix, suffix, body] = choice.node.hook(this, contextPath, value, lang, version, states, ctx)\n\t\tif (choices.length === 1) {\n\t\t\treturn [prefix, suffix, body]\n\t\t}\n\t\tconst choiceContextPath = config?.choiceContext ? new Path([], [config.choiceContext]) : config?.context ? new Path([], [config.context]) : path\n\t\tconst set = (type: string) => {\n\t\t\tconst c = choices.find(c => c.type === type) ?? choice\n\t\t\tconst def = c.node.default()\n\t\t\tconst newValue = c.change\n\t\t\t\t? c.change(DataModel.unwrapLists(value))\n\t\t\t\t: config.choiceContext === 'feature' && def?.type === 'minecraft:decorated' ? def.config.feature : def\n\t\t\tpath.model.set(path, DataModel.wrapLists(newValue))\n\t\t}\n\t\tconst inject = <select value={choice.type} onChange={(e) => set((e.target as HTMLSelectElement).value)}>\n\t\t\t{choices.map(c => <option value={c.type}>\n\t\t\t\t{pathLocale(lang, choiceContextPath.contextPush(c.type))}\n\t\t\t</option>)}\n\t\t</select>\n\t\treturn [prefix, <>{inject}{suffix}</>, body]\n\t},\n\n\tlist({ children, config }, path, value, lang, version, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\t\tconst [maxShown, setMaxShown] = useState(50)\n\n\t\tconst context = path.getContext().join('.')\n\t\tif (fixedLists.includes(context)) {\n\t\t\tconst prefix = <>\n\t\t\t\t{[...Array(config.maxLength!)].map((_, i) =>\n\t\t\t\t\t<ErrorPopup lang={lang} path={path.modelPush(i)} />)}\n\t\t\t\t<div class=\"fixed-list\"></div>\n\t\t\t</>\n\t\t\tconst suffix = <>{[...Array(config.maxLength)].map((_, i) => {\n\t\t\t\tconst child = children.hook(this, path.modelPush(i), value?.[i]?.node, lang, version, states, ctx)\n\t\t\t\treturn child[1]\n\t\t\t})}</>\n\t\t\treturn [prefix, suffix, null]\n\t\t}\n\n\t\tconst onAdd = () => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tconst node = DataModel.wrapLists(children.default())\n\t\t\tpath.model.set(path, [{ node, id: hexId() }, ...value])\n\t\t}\n\t\tconst onAddBottom = () => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tconst node = DataModel.wrapLists(children.default())\n\t\t\tpath.model.set(path, [...value, { node, id: hexId() }])\n\t\t}\n\t\tconst suffix = <button class=\"add tooltipped tip-se\" aria-label={localize(lang, 'add_top')} onClick={onAdd}>{Octicon.plus_circle}</button>\n\t\tconst body = <>\n\t\t\t{(value && Array.isArray(value)) && value.map(({ node: cValue, id: cId }, index) => {\n\t\t\t\tif (index === maxShown) {\n\t\t\t\t\treturn <div class=\"node node-header\">\n\t\t\t\t\t\t<label>{localize(lang, 'entries_hidden', `${value.length - maxShown}`)}</label>\n\t\t\t\t\t\t<button onClick={() => setMaxShown(Math.min(maxShown + 50, value.length))}>{localize(lang, 'entries_hidden.more', '50')}</button>\n\t\t\t\t\t\t<button onClick={() => setMaxShown(value.length)}>{localize(lang, 'entries_hidden.all')}</button>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tif (index > maxShown) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\n\t\t\t\tconst cPath = path.push(index).contextPush('entry')\n\t\t\t\tconst canToggle = children.type(cPath) === 'object'\n\t\t\t\tconst toggle = isToggled(cId)\n\t\t\t\tif (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {\n\t\t\t\t\treturn <div class=\"node node-header\" data-category={children.category(cPath)}>\n\t\t\t\t\t\t<ErrorPopup lang={lang} path={cPath} nested />\n\t\t\t\t\t\t<button class=\"toggle tooltipped tip-se\" aria-label={`${localize(lang, 'expand')}\\n${localize(lang, 'expand_all', 'Ctrl')}`} onClick={expand(cId)}>{Octicon.chevron_right}</button>\n\t\t\t\t\t\t<label>{pathLocale(lang, cPath, `${index}`)}</label>\n\t\t\t\t\t\t<Collapsed key={cId} path={cPath} value={cValue} schema={children} />\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\tconst onRemove = () => cPath.set(undefined)\n\t\t\t\tconst onMoveUp = () => {\n\t\t\t\t\tconst v = [...path.get()];\n\t\t\t\t\t[v[index - 1], v[index]] = [v[index], v[index - 1]]\n\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t}\n\t\t\t\tconst onMoveDown = () => {\n\t\t\t\t\tconst v = [...path.get()];\n\t\t\t\t\t[v[index + 1], v[index]] = [v[index], v[index + 1]]\n\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t}\n\t\t\t\tconst actions: MenuAction[] = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'duplicate',\n\t\t\t\t\t\tlabel: 'duplicate',\n\t\t\t\t\t\tonSelect: () => {\n\t\t\t\t\t\t\tconst v = [...path.get()]\n\t\t\t\t\t\t\tv.splice(index, 0, { id: hexId(), node: deepClone(cValue) })\n\t\t\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t\treturn <MemoedTreeNode key={cId} path={cPath} schema={children} value={cValue} {...{lang, version, states, actions}} ctx={{...ctx, index: (index === 0 ? 1 : 0) + (index === value.length - 1 ? 2 : 0)}}>\n\t\t\t\t\t{canToggle && <button class=\"toggle tooltipped tip-se\" aria-label={`${localize(lang, 'collapse')}\\n${localize(lang, 'collapse_all', 'Ctrl')}`} onClick={collapse(cId)}>{Octicon.chevron_down}</button>}\n\t\t\t\t\t<button class=\"remove tooltipped tip-se\" aria-label={localize(lang, 'remove')} onClick={onRemove}>{Octicon.trashcan}</button>\n\t\t\t\t\t{value.length > 1 && <div class=\"node-move\">\n\t\t\t\t\t\t<button class=\"move tooltipped tip-se\" aria-label={localize(lang, 'move_up')} onClick={onMoveUp} disabled={index === 0}>{Octicon.chevron_up}</button>\n\t\t\t\t\t\t<button class=\"move tooltipped tip-se\" aria-label={localize(lang, 'move_down')} onClick={onMoveDown} disabled={index === value.length - 1}>{Octicon.chevron_down}</button>\n\t\t\t\t\t</div>}\n\t\t\t\t</MemoedTreeNode>\n\t\t\t})}\n\t\t\t{(value && value.length > 0 && value.length <= maxShown) && <div class=\"node node-header\">\n\t\t\t\t<button class=\"add tooltipped tip-se\" aria-label={localize(lang, 'add_bottom')} onClick={onAddBottom}>{Octicon.plus_circle}</button>\n\t\t\t</div>}\n\t\t</>\n\t\treturn [null, suffix, body]\n\t},\n\n\tmap({ children, keys, config }, path, value, lang, version, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\n\t\tconst keyPath = new ModelPath(keysModel, new Path([hashString(path.toString())]))\n\t\tconst onAdd = () => {\n\t\t\tconst key = keyPath.get()\n\t\t\tpath.model.set(path.push(key), DataModel.wrapLists(children.default()))\n\t\t}\n\t\tconst blockState = config.validation?.validator === 'block_state_map' ? states?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst keysSchema = blockState?.properties\n\t\t\t? StringNode(null!, { enum: Object.keys(blockState.properties ?? {}) })\n\t\t\t: keys\n\t\tif (blockState && path.last() === 'Properties') {\n\t\t\tif (typeof value !== 'object') value = {}\n\t\t\tconst properties = Object.entries(blockState.properties ?? {})\n\t\t\t\t.map(([key, values]) => [key, StringNode(null!, { enum: values })])\n\t\t\tObject.entries(blockState.properties ?? {}).forEach(([key, values]) => {\n\t\t\t\tif (typeof value[key] !== 'string') {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.expected_string')\n\t\t\t\t} else if (!values.includes(value[key])) {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.invalid_enum_option', value[key])\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn ObjectNode(Object.fromEntries(properties)).hook(this, path, value, lang, version, states, ctx)\n\t\t}\n\t\tconst suffix = <>\n\t\t\t{keysSchema.hook(this, keyPath, keyPath.get() ?? '', lang, version, states, ctx)[1]}\n\t\t\t<button class=\"add tooltipped tip-se\" aria-label={localize(lang, 'add')} onClick={onAdd}>{Octicon.plus_circle}</button>\n\t\t</>\n\t\tconst body = <>\n\t\t\t{typeof value === 'object' && Object.entries(value).map(([key, cValue]) => {\n\n\t\t\t\tconst cPath = path.modelPush(key)\n\t\t\t\tconst canToggle = children.type(cPath) === 'object'\n\t\t\t\tconst toggle = isToggled(key)\n\t\t\t\tif (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {\n\t\t\t\t\treturn <div class=\"node node-header\" data-category={children.category(cPath)}>\n\t\t\t\t\t\t<ErrorPopup lang={lang} path={cPath} nested />\n\t\t\t\t\t\t<button class=\"toggle tooltipped tip-se\" aria-label={`${localize(lang, 'expand')}\\n${localize(lang, 'expand_all', 'Ctrl')}`} onClick={expand(key)}>{Octicon.chevron_right}</button>\n\t\t\t\t\t\t<label>{key}</label>\n\t\t\t\t\t\t<Collapsed key={key} path={cPath} value={cValue} schema={children} />\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tconst cSchema = blockState\n\t\t\t\t\t? StringNode(null!, { enum: blockState.properties?.[key] ?? [] })\n\t\t\t\t\t: children\n\t\t\t\tif (blockState?.properties?.[key] && typeof cValue === 'string'\n\t\t\t\t\t&& !blockState.properties?.[key].includes(cValue)) {\n\t\t\t\t\tpath.model.errors.add(cPath, 'error.invalid_enum_option', cValue)\n\t\t\t\t}\n\t\t\t\tconst onRemove = () => cPath.set(undefined)\n\t\t\t\treturn <MemoedTreeNode key={key} schema={cSchema} path={cPath} value={cValue} {...{lang, version, states, ctx}} label={key}>\n\t\t\t\t\t{canToggle && <button class=\"toggle tooltipped tip-se\" aria-label={`${localize(lang, 'collapse')}\\n${localize(lang, 'collapse_all', 'Ctrl')}`} onClick={collapse(key)}>{Octicon.chevron_down}</button>}\n\t\t\t\t\t<button class=\"remove tooltipped tip-se\" aria-label={localize(lang, 'remove')} onClick={onRemove}>{Octicon.trashcan}</button>\n\t\t\t\t</MemoedTreeNode>\n\t\t\t})}\n\t\t</>\n\t\treturn [null, suffix, body]\n\t},\n\n\tnumber(params, path, value, lang, version, states, ctx) {\n\t\treturn [null, <NumberSuffix {...{...params, path, value, lang, version, states, ctx}} />, null]\n\t},\n\n\tobject({ node, config, getActiveFields, getChildModelPath }, path, value, lang, version, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\n\t\tif (path.getArray().length == 0 && isDecorated(config.context, value)) {\n\t\t\tconst { wrapper, fields } = createDecoratorsWrapper(getActiveFields(path), path, value)\n\t\t\tvalue = wrapper.data\n\t\t\tgetActiveFields = () => fields\n\t\t\tgetChildModelPath = (path, key) => new ModelPath(wrapper, new Path(path.getArray(), ['feature'])).push(key)\n\t\t}\n\n\t\tlet prefix: JSX.Element | null = null\n\t\tlet suffix: JSX.Element | null = null\n\t\tif (node.optional()) {\n\t\t\tif (value === undefined) {\n\t\t\t\tconst onExpand = () => path.set(DataModel.wrapLists(node.default()))\n\t\t\t\tsuffix = <button class=\"collapse closed tooltipped tip-se\" aria-label={localize(lang, 'expand')} onClick={onExpand}>{Octicon.plus_circle}</button>\n\t\t\t} else {\n\t\t\t\tconst onCollapse = () => path.set(undefined)\n\t\t\t\tsuffix = <button class=\"collapse open tooltipped tip-se\" aria-label={localize(lang, 'remove')} onClick={onCollapse}>{Octicon.trashcan}</button>\n\t\t\t}\n\t\t}\n\t\tconst context = path.getContext().join('.')\n\t\tif (collapsableFields.includes(context) || collapsedFields.includes(context)) {\n\t\t\tconst toggled = isToggled('')\n\t\t\tconst expanded = collapsedFields.includes(context) ? toggled : !toggled\n\t\t\tprefix = <>\n\t\t\t\t<button class=\"toggle tooltipped tip-se\" aria-label={localize(lang, expanded ? 'collapse' : 'expand')} onClick={toggled ? collapse('') : expand('')}>{expanded ? Octicon.chevron_down : Octicon.chevron_right}</button>\n\t\t\t</>\n\t\t\tif (!expanded) {\n\t\t\t\treturn [prefix, suffix, null]\n\t\t\t}\n\t\t}\n\n\t\tconst newCtx = (typeof value === 'object' && value !== null && node.default()?.pools)\n\t\t\t? { ...ctx, loot: value?.type } : ctx\n\t\tconst body = <>\n\t\t\t{(typeof value === 'object' && value !== null && !(node.optional() && value === undefined)) &&\n\t\t\t\tObject.entries(getActiveFields(path))\n\t\t\t\t\t.filter(([_, child]) => child.enabled(path))\n\t\t\t\t\t.map(([key, child]) => {\n\t\t\t\t\t\tconst cPath = getChildModelPath(path, key)\n\t\t\t\t\t\tconst context = cPath.getContext().join('.')\n\t\t\t\t\t\tif (hiddenFields.includes(context)) return null\n\t\t\t\t\t\tconst [cPrefix, cSuffix, cBody] = child.hook(this, cPath, value[key], lang, version, states, newCtx)\n\t\t\t\t\t\tconst isFlattened = child.type(cPath) === 'object' && flattenedFields.includes(context)\n\t\t\t\t\t\tconst isInlined = inlineFields.includes(context)\n\t\t\t\t\t\tif (isFlattened || isInlined) {\n\t\t\t\t\t\t\tprefix = <>{prefix}<ErrorPopup lang={lang} path={cPath} /><HelpPopup lang={lang} path={cPath} />{cPrefix}</>\n\t\t\t\t\t\t\tsuffix = <>{suffix}{cSuffix}</>\n\t\t\t\t\t\t\treturn isFlattened ? cBody : null\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn <MemoedTreeNode key={key} schema={child} path={cPath} value={value[key]} {...{lang, version, states, ctx: newCtx}} />\n\t\t\t\t\t})\n\t\t\t}\n\t\t</>\n\t\treturn [prefix, suffix, body]\n\t},\n\n\tstring(params, path, value, lang, version, states, ctx) {\n\t\treturn [null, <StringSuffix {...{...params, path, value, lang, version, states, ctx}} />, null]\n\t},\n}\n\nfunction Collapsed({ path, value }: { path: ModelPath, value: any, schema: INode<any> }) {\n\tconst context = path.getContext().join('.')\n\tswitch (context) {\n\t\tcase 'loot_table.pools.entry':\n\t\t\treturn <label>{value?.entries?.length ?? 0} entries</label>\n\t\tcase 'function.set_contents.entries.entry':\n\t\tcase 'loot_pool.entries.entry':\n\t\t\treturn <label>{value?.name?.replace(/^minecraft:/, '') ?? value?.type?.replace(/^minecraft:/, '')}</label>\n\t}\n\tfor (const child of Object.values(value ?? {})) {\n\t\tif (typeof child === 'string') {\n\t\t\treturn <label>{child.replace(/^minecraft:/, '')}</label>\n\t\t}\n\t}\n\treturn null\n}\n\nfunction useToggles() {\n\tconst [toggleState, setToggleState] = useState(new Map<string, boolean>())\n\tconst [toggleAll, setToggleAll] = useState<boolean | undefined>(undefined)\n\n\tconst expand = (key: string) => (evt: MouseEvent) => {\n\t\tif (evt.ctrlKey) {\n\t\t\tsetToggleState(new Map())\n\t\t\tsetToggleAll(true)\n\t\t} else {\n\t\t\tsetToggleState(state => new Map(state.set(key, true)))\n\t\t}\n\t}\n\tconst collapse = (key: string) => (evt: MouseEvent) => {\n\t\tif (evt.ctrlKey) {\n\t\t\tsetToggleState(new Map())\n\t\t\tsetToggleAll(false)\n\t\t} else {\n\t\t\tsetToggleState(state => new Map(state.set(key, false)))\n\t\t}\n\t}\n\t\n\tconst isToggled = (key: string) => {\n\t\tif (!(toggleState instanceof Map)) return false\n\t\treturn toggleState.get(key) ?? toggleAll\n\t}\n\n\treturn { expand, collapse, isToggled }\n}\n\nfunction BooleanSuffix({ path, node, value, lang }: NodeProps<BooleanHookParams>) {\n\tconst set = (target: boolean) => {\n\t\tpath.model.set(path, node.optional() && value === target ? undefined : target)\n\t}\n\treturn <>\n\t\t<button class={value === false ? 'selected' : ''} onClick={() => set(false)}>{localize(lang, 'false')}</button>\n\t\t<button class={value === true ? 'selected' : ''} onClick={() => set(true)}>{localize(lang, 'true')}</button>\n\t</>\n}\n\nfunction NumberSuffix({ path, config, integer, value, lang }: NodeProps<NumberHookParams>) {\n\tconst onChange = (evt: Event) => {\n\t\tconst value = (evt.target as HTMLInputElement).value\n\t\tconst parsed = integer ? parseInt(value) : parseFloat(value)\n\t\tpath.model.set(path, parsed)\n\t}\n\tconst onColor = (evt: Event) => {\n\t\tconst value = (evt.target as HTMLInputElement).value\n\t\tconst parsed = parseInt(value.slice(1), 16)\n\t\tpath.model.set(path, parsed)\n\t}\n\treturn <>\n\t\t<input type=\"text\" value={value ?? ''} onBlur={onChange} onKeyDown={evt => {if (evt.key === 'Enter') onChange(evt)}} />\n\t\t{config?.color && <input type=\"color\" value={'#' + (value?.toString(16).padStart(6, '0') ?? '000000')} onChange={onColor} />}\n\t\t{['dimension.generator.seed', 'dimension.generator.biome_source.seed', 'world_settings.seed', 'structure_placement.salt'].includes(path.getContext().join('.')) && <button onClick={() => newSeed(path.model)} class=\"tooltipped tip-se\" aria-label={localize(lang, 'generate_new_seed')}>{Octicon.sync}</button>}\n\t</>\n}\n\nfunction StringSuffix({ path, getValues, config, node, value, lang, version, states }: NodeProps<StringHookParams>) {\n\tconst onChange = (evt: Event) => {\n\t\tevt.stopPropagation()\n\t\tconst newValue = (evt.target as HTMLSelectElement).value\n\t\tif (newValue === value) return\n\t\tpath.model.set(path, newValue.length === 0 ? undefined : newValue)\n\t}\n\tconst values = getValues()\n\tconst context = path.getContext().join('.')\n\tconst id = !isEnum(config) && config?.validator === 'resource' && typeof config.params.pool === 'string' ? config.params.pool : undefined\n\n\tif (nbtFields.includes(context)) {\n\t\treturn <textarea value={value ?? ''} onBlur={onChange}></textarea>\n\t} else if ((isEnum(config) && !config.additional) || selectRegistries.includes(context)) {\n\t\tlet context = new Path([])\n\t\tif (isEnum(config) && typeof config.enum === 'string') {\n\t\t\tcontext = context.contextPush(config.enum)\n\t\t} else if (id) {\n\t\t\tcontext = context.contextPush(id)\n\t\t} else if (isEnum(config)) {\n\t\t\tcontext = path\n\t\t}\n\t\treturn <select value={value ?? ''} onChange={onChange}>\n\t\t\t{node.optional() && <option value=\"\">{localize(lang, 'unset')}</option>}\n\t\t\t{values.map(v => <option value={v}>\n\t\t\t\t{pathLocale(lang, context.contextPush(v.replace(/^minecraft:/, '')))}\n\t\t\t</option>)}\n\t\t</select>\n\t} else if (!isEnum(config) && config?.validator === 'block_state_key') {\n\t\tconst blockState = states?.[relativePath(path, config.params.id).get()]\n\t\tconst values = Object.keys(blockState?.properties ?? {})\n\t\treturn <select value={value ?? ''} onChange={onChange}>\n\t\t\t{values.map(v => <option>{v}</option>)}\n\t\t</select>\n\t} else {\n\t\tconst datalistId = hexId()\n\t\tconst gen = id ? findGenerator(id) : undefined\n\t\treturn <>\n\t\t\t<input value={value ?? ''} onBlur={onChange} onKeyDown={evt => {if (evt.key === 'Enter') onChange(evt)}}\n\t\t\t\tlist={values.length > 0 ? datalistId : ''} />\n\t\t\t{values.length > 0 && <datalist id={datalistId}>\n\t\t\t\t{values.map(v => <option value={v} />)}\n\t\t\t</datalist>}\n\t\t\t{gen && values.includes(value) && value.startsWith('minecraft:') &&\n\t\t\t\t<a href={`/${gen.url}/?version=${version}&preset=${value.replace(/^minecraft:/, '')}`} class=\"tooltipped tip-se\" aria-label={localize(lang, 'follow_reference')}>{Octicon.link_external}</a>}\n\t\t</>\n\t}\n}\n\ntype MenuAction = {\n\tlabel: string,\n\tdescription?: string,\n\ticon: keyof typeof Octicon,\n\tonSelect: () => unknown,\n}\n\ntype TreeNodeProps = {\n\tschema: INode<any>,\n\tpath: ModelPath,\n\tvalue: any,\n\tlang: string,\n\tversion: VersionId,\n\tstates: BlockStateRegistry,\n\tctx: Record<string, any>,\n\tcompare?: any,\n\tlabel?: string,\n\tactions?: MenuAction[],\n\tchildren?: ComponentChildren,\n}\nfunction TreeNode({ label, schema, path, value, lang, version, states, ctx, actions, children }: TreeNodeProps) {\n\tconst type = schema.type(path)\n\tconst category = schema.category(path)\n\tconst context = path.getContext().join('.')\n\n\tconst [active, setActive] = useFocus()\n\tconst onContextMenu = (evt: MouseEvent) => {\n\t\tevt.preventDefault()\n\t\tsetActive()\n\t}\n\n\tconst newCtx: Record<string, any> = { ...ctx, depth: (ctx.depth ?? 0) + 1 }\n\tdelete newCtx.index\n\tconst [prefix, suffix, body] = schema.hook(renderHtml, path, value, lang, version, states, newCtx)\n\treturn <div class={`node ${type}-node`} data-category={category}>\n\t\t<div class=\"node-header\" onContextMenu={onContextMenu}>\n\t\t\t<ErrorPopup lang={lang} path={path} />\n\t\t\t<HelpPopup lang={lang} path={path} />\n\t\t\t{children}\n\t\t\t{prefix}\n\t\t\t<label>\n\t\t\t\t{label ?? pathLocale(lang, path, `${path.last()}`)}\n\t\t\t\t{active && <div class=\"node-menu\">\n\t\t\t\t\t{actions?.map(a => <div key={a.label} class=\"menu-item\">\n\t\t\t\t\t\t<Btn icon={a.icon} tooltip={localize(lang, a.label)} tooltipLoc=\"se\" onClick={() => a.onSelect()}/>\n\t\t\t\t\t\t<span>{a.description ?? localize(lang, a.label)}</span>\n\t\t\t\t\t</div>)}\n\t\t\t\t\t<div class=\"menu-item\">\n\t\t\t\t\t\t<Btn icon=\"clippy\" tooltip={localize(lang, 'copy_context')} tooltipLoc=\"se\" onClick={() => navigator.clipboard.writeText(context)} />\n\t\t\t\t\t\t<span>{context}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>}\n\t\t\t</label>\n\t\t\t{suffix}\n\t\t</div>\n\t\t{body && <div class=\"node-body\">{body}</div>}\n\t</div>\n}\n\nconst MemoedTreeNode = memo(TreeNode, (prev, next) => {\n\treturn prev.schema === next.schema\n\t\t&& prev.lang === next.lang\n\t\t&& prev.path.equals(next.path)\n\t\t&& deepEqual(prev.ctx, next.ctx)\n\t\t&& deepEqual(prev.value, next.value)\n})\n\nfunction isEnum(value?: ValidationOption | EnumOption): value is EnumOption {\n\treturn !!(value as any)?.enum\n}\n\nfunction hashString(str: string) {\n\tvar hash = 0, i, chr\n\tfor (i = 0; i < str.length; i++) {\n\t\tchr = str.charCodeAt(i)\n\t\thash = ((hash << 5) - hash) + chr\n\t\thash |= 0\n\t}\n\treturn hash\n}\n\nfunction pathLocale(lang: string, path: Path, ...params: string[]) {\n\tconst ctx = path.getContext()\n\tfor (let i = 0; i < ctx.length; i += 1) {\n\t\tconst key = ctx.slice(i).join('.')\n\t\tconst result = localize(lang, key, ...params)\n\t\tif (key !== result) {\n\t\t\treturn result\n\t\t}\n\t}\n\treturn ctx[ctx.length - 1]\n}\n\nfunction ErrorPopup({ lang, path, nested }: { lang: string, path: ModelPath, nested?: boolean }) {\n\tif (path.model instanceof ModelWrapper) {\n\t\tpath = path.model.map(path).withModel(path.model)\n\t}\n\tconst e = nested\n\t\t?\tpath.model.errors.getAll().filter(e => e.path.startsWith(path))\n\t\t: path.model.errors.get(path, true)\n\tif (e.length === 0) return null\n\tconst message = localize(lang, e[0].error, ...(e[0].params ?? []))\n\treturn popupIcon('node-error', 'issue_opened', message)\n}\n\nfunction HelpPopup({ lang, path }: { lang: string, path: Path }) {\n\tconst key = path.contextPush('help').getContext().join('.')\n\tconst message = localize(lang, key)\n\tif (message === key) return null\n\treturn popupIcon('node-help', 'info', message)\n}\n\nconst popupIcon = (type: string, icon: keyof typeof Octicon, popup: string) => {\n\tconst [active, setActive] = useFocus()\n\n\treturn <div class={`node-icon ${type}${active ? ' show' : ''}`} onClick={setActive}>\n\t\t{Octicon[icon]}\n\t\t<span class=\"icon-popup\">{popup}</span>\n\t</div>\n}\n\nfunction isDecorated(context: string | undefined, value: any) {\n\treturn context === 'feature'\n\t\t&& value?.type?.replace(/^minecraft:/, '') === 'decorated'\n\t\t&& isObject(value?.config)\n}\n\nfunction createDecoratorsWrapper(originalFields: NodeChildren, path: ModelPath, value: any) {\n\tconst decorators: any[] = []\n\tconst feature = iterateNestedDecorators(value, decorators)\n\tconst fields = {\n\t\ttype: originalFields.type,\n\t\tconfig: ObjectNode({\n\t\t\tdecorators: ListNode(CachedDecorator),\n\t\t\tfeature: CachedFeature,\n\t\t}, { context: 'feature.decorated' }),\n\t}\n\tconst schema = ObjectNode(fields, { context: 'feature' })\n\tconst featurePath = new Path(['config', 'feature'])\n\tconst decoratorsPath = new Path(['config', 'decorators'])\n\tconst model = path.getModel()\n\tconst wrapper: ModelWrapper = new ModelWrapper(schema, path => {\n\t\tif (path.startsWith(featurePath)) {\n\t\t\treturn new Path([...[...Array(decorators.length - 1)].flatMap(() => ['config', 'feature']), ...path.modelArr])\n\t\t} else if (path.startsWith(decoratorsPath)) {\n\t\t\tif (path.modelArr.length === 2) {\n\t\t\t\treturn new Path([])\n\t\t\t}\n\t\t\tconst index = path.modelArr[2]\n\t\t\tif (typeof index === 'number') {\n\t\t\t\treturn new Path([...[...Array(index)].flatMap(() => ['config', 'feature']), 'config', 'decorator', ...path.modelArr.slice(3)])\n\t\t\t}\n\t\t}\n\t\treturn path\n\t}, path => {\n\t\tif (path.equals(decoratorsPath)) {\n\t\t\tconst newDecorators: any[] = []\n\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\treturn newDecorators\n\t\t}\n\t\treturn model.get(wrapper.map(path))\n\t}, (path, value, silent) => {\n\t\tif (path.startsWith(featurePath)) {\n\t\t\tconst newDecorators: any[] = []\n\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\tconst newPath =new Path([...[...Array(newDecorators.length - 1)].flatMap(() => ['config', 'feature']), ...path.modelArr])\n\t\t\treturn model.set(newPath, value, silent)\n\t\t} else if (path.startsWith(decoratorsPath)) {\n\t\t\tconst index = path.modelArr[2]\n\t\t\tif (path.modelArr.length === 2) {\n\t\t\t\tconst feature = wrapper.get(featurePath)\n\t\t\t\treturn model.set(new Path(), produceNestedDecorators(feature, value), silent)\n\t\t\t} else if (typeof index === 'number') {\n\t\t\t\tif (path.modelArr.length === 3 && value === undefined) {\n\t\t\t\t\tconst feature = wrapper.get(featurePath)\n\t\t\t\t\tconst newDecorators: any[] = []\n\t\t\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\t\t\tnewDecorators.splice(index, 1)\n\t\t\t\t\tconst newValue = produceNestedDecorators(feature, newDecorators)\n\t\t\t\t\treturn model.set(new Path(), newValue, silent)\n\t\t\t\t} else {\n\t\t\t\t\tconst newPath = new Path([...[...Array(index)].flatMap(() => ['config', 'feature']), 'config', 'decorator', ...path.modelArr.slice(3)])\n\t\t\t\t\treturn model.set(newPath, value, silent)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmodel.set(path, value, silent)\n\t})\n\twrapper.data = {\n\t\ttype: model.data.type,\n\t\tconfig: {\n\t\t\tdecorators,\n\t\t\tfeature,\n\t\t},\n\t}\n\twrapper.errors = model.errors\n\treturn { fields, wrapper }\n}\n\nfunction iterateNestedDecorators(value: any, decorators: any[]): any {\n\tif (value?.type?.replace(/^minecraft:/, '') !== 'decorated') {\n\t\treturn value\n\t}\n\tif (!isObject(value?.config)) {\n\t\treturn value\n\t}\n\tdecorators.push({ id: decorators.length, node: value.config.decorator })\n\treturn iterateNestedDecorators(value.config.feature ?? '', decorators)\n}\n\nfunction produceNestedDecorators(feature: any, decorators: any[]): any {\n\tif (decorators.length === 0) return feature\n\treturn {\n\t\ttype: 'minecraft:decorated',\n\t\tconfig: {\n\t\t\tdecorator: decorators.shift().node,\n\t\t\tfeature: produceNestedDecorators(feature, decorators),\n\t\t},\n\t}\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useErrorBoundary, useState } from 'preact/hooks'\nimport { useLocale } from '../../contexts'\nimport { useModel } from '../../hooks'\nimport { FullNode } from '../../schema/renderHtml'\nimport type { BlockStateRegistry, VersionId } from '../../services'\n\ntype TreePanelProps = {\n\tversion: VersionId,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tonError: (message: string) => unknown,\n}\nexport function Tree({ version, model, blockStates, onError }: TreePanelProps) {\n\tconst { lang } = useLocale()\n\tif (!model || !blockStates || lang === 'none') return <></>\n\n\tconst [error] = useErrorBoundary(e => {\n\t\tonError(`Error rendering the tree: ${e.message}`)\n\t\tconsole.error(e)\n\t})\n\tif (error) return <></>\n\n\tconst [, setState] = useState(0)\n\tuseModel(model, () => {\n\t\tsetState(state => state + 1)\n\t})\n\n\treturn <div class=\"tree\" data-cy=\"tree\">\n\t\t<FullNode {...{model, lang, version, blockStates}}/>\n\t</div>\n}\n","import { Giscus as GiscusReact } from '@giscus/react'\nimport { useTheme } from '../contexts'\n\ninterface Props {\n\tterm?: string,\n}\nexport function Giscus({ term }: Props) {\n\tconst { actualTheme } = useTheme()\n\tconst themeSuffix = actualTheme === 'light' ? '-burn' : ''\n\tconst themeUrl = (import.meta as any).env.DEV\n\t\t? `http://localhost:3000/src/styles/giscus${themeSuffix}.css`\n\t\t: `https://${location.host}/assets/giscus${themeSuffix}.css`\n\n\treturn <GiscusReact\n\t\trepo=\"misode/misode.github.io\"\n\t\trepoId=\"MDEwOlJlcG9zaXRvcnkxOTIyNTQyMzA=\"\n\t\tcategory=\"Site\"\n\t\tcategoryId=\"DIC_kwDOC3WRFs4COB8r\"\n\t\tmapping={term ? 'specific' : 'pathname'}\n\t\tterm={term}\n\t\treactionsEnabled=\"1\"\n\t\temitMetadata=\"0\"\n\t\tinputPosition=\"top\"\n\t\ttheme={themeUrl}\n\t\tlang=\"en\" />\n}\n","import { getCurrentUrl, Link, route } from 'preact-router'\nimport { Btn, BtnMenu, Icons, Octicon } from '.'\nimport config from '../../config.json'\nimport { useLocale, useTheme, useTitle, useVersion } from '../contexts'\nimport { checkVersion } from '../services'\nimport { cleanUrl, getGenerator } from '../Utils'\n\nconst Themes: Record<string, keyof typeof Octicon> = {\n\tsystem: 'device_desktop',\n\tdark: 'moon',\n\tlight: 'sun',\n}\n\nexport function Header() {\n\tconst { lang, locale, changeLanguage } = useLocale()\n\tconst { theme, changeTheme } = useTheme()\n\tconst { version } = useVersion()\n\tconst { title } = useTitle()\n\tconst gen = getGenerator(getCurrentUrl())\n\n\treturn <header>\n\t\t<div class=\"title\">\n\t\t\t<Link class=\"home-link\" href=\"/\" aria-label={locale('home')} data-cy=\"home-link\">{Icons.home}</Link>\n\t\t\t<h1>{title}</h1>\n\t\t\t{gen && <BtnMenu icon=\"chevron_down\" tooltip={locale('switch_generator')} data-cy=\"generator-switcher\">\n\t\t\t\t{config.generators\n\t\t\t\t\t.filter(g => g.category === gen?.category && checkVersion(version, g.minVersion))\n\t\t\t\t\t.map(g =>\n\t\t\t\t\t\t<Btn label={locale(g.id)} active={g.id === gen.id} onClick={() => route(cleanUrl(g.url))} />\n\t\t\t\t\t)}\n\t\t\t</BtnMenu>}\n\t\t</div>\n\t\t<nav>\n\t\t\t<ul>\n\t\t\t\t<li data-cy=\"language-switcher\">\n\t\t\t\t\t<BtnMenu icon=\"globe\" tooltip={locale('language')}>\n\t\t\t\t\t\t{config.languages.map(({ code, name }) =>\n\t\t\t\t\t\t\t<Btn label={name} active={code === lang}\n\t\t\t\t\t\t\t\tonClick={() => changeLanguage(code)} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t</li>\n\t\t\t\t<li data-cy=\"theme-switcher\">\n\t\t\t\t\t<BtnMenu icon={Themes[theme]} tooltip={locale('theme')}>\n\t\t\t\t\t\t{Object.entries(Themes).map(([th, icon]) =>\n\t\t\t\t\t\t\t<Btn icon={icon} label={locale(`theme.${th}`)} active={th === theme}\n\t\t\t\t\t\t\t\tonClick={() => changeTheme(th)} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"dimmed\">\n\t\t\t\t\t<a href=\"https://github.com/misode/misode.github.io\" target=\"_blank\" rel=\"noreferrer\" class=\"tooltipped tip-sw\" aria-label={locale('github')}>\n\t\t\t\t\t\t{Octicon.mark_github}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</nav>\n\t</header>\n}\n","export const Icons = {\n\thome: <svg width=\"32\" height=\"28\" viewBox=\"0 0 32 28\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"26\" height=\"6\" rx=\"3\" fill=\"#7CB45C\"/><rect x=\"8\" width=\"18\" height=\"6\" rx=\"3\" fill=\"#4BA041\"/><rect y=\"11\" width=\"32\" height=\"6\" rx=\"3\" fill=\"#AAA8A8\"/><rect x=\"11\" y=\"11\" width=\"21\" height=\"6\" rx=\"3\" fill=\"#91908F\"/><rect x=\"11\" y=\"22\" width=\"21\" height=\"6\" rx=\"3\" fill=\"#70B5C3\"/><rect x=\"17\" y=\"22\" width=\"15\" height=\"6\" rx=\"3\" fill=\"#4D989B\"/></svg>,\n\treport: <svg width=\"30\" height=\"36\" viewBox=\"0 0 30 36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 16C0 13.7909 1.79086 12 4 12V12C6.20914 12 8 13.7909 8 16V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V16Z\" fill=\"#6ACC5D\"/><path d=\"M11 4C11 1.79086 12.7909 0 15 0V0C17.2091 0 19 1.79086 19 4V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V4Z\" fill=\"#FF4C4C\"/><path d=\"M22 10C22 7.79086 23.7909 6 26 6V6C28.2091 6 30 7.79086 30 10V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V10Z\" fill=\"#E5B442\"/><path d=\"M0 23C0 20.7909 1.79086 19 4 19V19C6.20914 19 8 20.7909 8 23V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V23Z\" fill=\"#2BAD1D\"/><path d=\"M11 15C11 12.7909 12.7909 11 15 11V11C17.2091 11 19 12.7909 19 15V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V15Z\" fill=\"#C10B0B\"/><path d=\"M22 19C22 16.7909 23.7909 15 26 15V15C28.2091 15 30 16.7909 30 19V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V19Z\" fill=\"#CC8E00\"/></svg>,\n\tsounds: <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"10\" cy=\"10\" r=\"10\" fill=\"#451475\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M3.5 10C3.5 8.27609 4.18482 6.62279 5.40381 5.40381C6.62279 4.18482 8.27609 3.5 10 3.5C11.7239 3.5 13.3772 4.18482 14.5962 5.40381C15.8152 6.62279 16.5 8.27609 16.5 10C16.5 11.7239 15.8152 13.3772 14.5962 14.5962C13.3772 15.8152 11.7239 16.5 10 16.5C8.27609 16.5 6.62279 15.8152 5.40381 14.5962C4.18482 13.3772 3.5 11.7239 3.5 10V10ZM10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2V2ZM8.379 7.227C8.34101 7.20412 8.29762 7.19175 8.25327 7.19117C8.20892 7.19059 8.16522 7.20181 8.12664 7.2237C8.08807 7.24558 8.05601 7.27733 8.03375 7.3157C8.0115 7.35406 7.99985 7.39765 8 7.442V12.559C8.00003 12.6033 8.0118 12.6467 8.03413 12.685C8.05646 12.7232 8.08854 12.7548 8.12708 12.7765C8.16563 12.7983 8.20926 12.8095 8.25352 12.8088C8.29778 12.8082 8.34108 12.7958 8.379 12.773L12.643 10.214C12.6798 10.1917 12.7103 10.1604 12.7315 10.1229C12.7526 10.0854 12.7638 10.043 12.7638 10C12.7638 9.95695 12.7526 9.91463 12.7315 9.87714C12.7103 9.83965 12.6798 9.80825 12.643 9.786L8.379 7.227Z\" fill=\"#C5A5E6\"/></svg>,\n}\n","import { Howl } from 'howler'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, NumberInput, RangeInput, TextInput } from '..'\nimport { useLocale, useVersion } from '../../contexts'\nimport type { SoundEvents } from '../../services'\nimport { getSoundUrl } from '../../services'\n\nexport interface SoundConfig {\n\tid: string,\n\tsound: string,\n\tdelay: number,\n\tpitch: number,\n\tvolume: number,\n}\ntype SoundConfigProps = SoundConfig & {\n\tsounds: SoundEvents,\n\tonEdit: (changes: Partial<SoundConfig>) => unknown,\n\tonDelete: () => unknown,\n\tdelayedPlay?: number,\n}\nexport function SoundConfig({ sounds, sound, delay, pitch, volume, onEdit, onDelete, delayedPlay }: SoundConfigProps) {\n\tconst { locale } = useLocale()\n\tconst { version } = useVersion()\n\tconst [loading, setLoading] = useState(true)\n\tconst [playing, setPlaying] = useState(false)\n\tconst [invalid, setInvalid] = useState(false)\n\tconst howls = useRef<Howl[]>([])\n\tconst command = `playsound minecraft:${sound} master @s ~ ~ ~ ${volume} ${pitch}`\n\n\tuseEffect(() => {\n\t\tconst soundEvent = sounds[sound]\n\t\tsetInvalid((soundEvent?.sounds?.length ?? 0) === 0)\n\t\thowls.current.forEach(h => h.stop())\n\t\thowls.current = (soundEvent?.sounds ?? []).map(entry => {\n\t\t\tconst soundPath = typeof entry === 'string' ? entry : entry.name\n\t\t\tconst url = getSoundUrl(version, soundPath)\n\t\t\tconst howl = new Howl({\n\t\t\t\tsrc: [url],\n\t\t\t\tformat: ['ogg'],\n\t\t\t\tvolume,\n\t\t\t\trate: pitch,\n\t\t\t})\n\t\t\thowl.on('end', () => {\n\t\t\t\tsetPlaying(false)\n\t\t\t})\n\t\t\tconst completed = () => {\n\t\t\t\tif (loading && howls.current.every(h => h.state() === 'loaded')) {\n\t\t\t\t\tsetLoading(false)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (howl.state() === 'loaded') {\n\t\t\t\tsetTimeout(() => completed())\n\t\t\t} else {\n\t\t\t\thowl.on('load', () => {\n\t\t\t\t\tcompleted()\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn howl\n\t\t})\n\t\tsetLoading(true)\n\t}, [sound, sounds])\n\n\tuseEffect(() => {\n\t\thowls.current.forEach(h => h.rate(pitch))\n\t}, [pitch])\n\n\tuseEffect(() => {\n\t\thowls.current.forEach(h => h.volume(volume))\n\t}, [volume])\n\n\tconst play = () => {\n\t\tif (loading || invalid) return\n\t\tstop()\n\t\tconst howl = Math.floor(Math.random() * howls.current.length)\n\t\thowls.current[howl].play()\n\t\tsetPlaying(true)\n\t}\n\tconst stop = () => {\n\t\thowls.current.forEach(h => h.stop())\n\t}\n\tuseEffect(() => {\n\t\tif (delayedPlay) setTimeout(() => play(), delay * 50)\n\t}, [delayedPlay])\n\n\tuseEffect(() => {\n\t\treturn () => stop()\n\t}, [])\n\n\tconst [copyActive, setCopyActive] = useState(false)\n\tconst copyTimeout = useRef<number | undefined>(undefined)\n\tconst copy = () => {\n\t\tnavigator.clipboard.writeText(command)\n\t\tsetCopyActive(true)\n\t\tif (copyTimeout.current !== undefined) clearTimeout(copyTimeout.current)\n\t\tcopyTimeout.current = setTimeout(() => {\n\t\t\tsetCopyActive(false)\n\t\t}, 2000) as any\n\t}\n\n\treturn <div class={`sound-config${loading ? ' loading' : playing ? ' playing' : ''}${invalid ? ' invalid' : ''}`}>\n\t\t<Btn class=\"play\" icon={invalid ? 'alert' : loading ? 'sync' : 'play'} label={locale('sounds.play')} onClick={play} tooltip={invalid ? locale('sounds.unknown_sound') : loading ? locale('sounds.loading_sound') : locale('sounds.play_sound')} tooltipLoc=\"se\" />\n\t\t<TextInput class=\"btn btn-input sound\" list=\"sound-list\" spellcheck={false}\n\t\t\tvalue={sound} onChange={sound => onEdit({ sound })} />\n\t\t<label class=\"delay-label\">{locale('sounds.delay')}: </label>\n\t\t<NumberInput class=\"btn btn-input delay\" min={0}\n\t\t\tvalue={delay} onChange={delay => onEdit({ delay })} />\n\t\t<label class=\"pitch-label\">{locale('sounds.pitch')}: </label>\n\t\t<RangeInput class=\"pitch tooltipped tip-s\" min={0.5} max={2} step={0.01}\n\t\t\taria-label={pitch.toFixed(2)} style={`--x: ${(pitch - 0.5) * (100 / 1.5)}%`}\n\t\t\tvalue={pitch} onChange={pitch => onEdit({ pitch })} />\n\t\t<label class=\"volume-label\">{locale('sounds.volume')}: </label>\n\t\t<RangeInput class=\"volume tooltipped tip-s\" min={0} max={1} step={0.01}\n\t\t\taria-label={volume.toFixed(2)} style={`--x: ${volume * 100}%`}\n\t\t\tvalue={volume} onChange={volume => onEdit({ volume })} />\n\t\t<Btn class={`copy${copyActive ? ' active' : ''}`} icon={copyActive ? 'check' : 'terminal'} label={locale('copy')} tooltip={copyActive ? locale('copied') : locale('sounds.copy_command')}\n\t\t\tonClick={copy} />\n\t\t<Btn class=\"remove\" icon=\"trashcan\" tooltip={locale('sounds.remove_sound')}\n\t\t\tonClick={() => {onDelete(); stop()}} />\n\t</div>\n}\n","import type { ComponentChildren } from 'preact'\nimport { Icons } from './Icons'\n\ntype ToolCardProps = {\n\ttitle: string,\n\tdesc?: string,\n\tlink?: string,\n\ticon?: keyof typeof Icons,\n\tchildren?: ComponentChildren,\n}\nexport function ToolCard({ title, desc, link, icon, children }: ToolCardProps) {\n\tconst content = <>\n\t\t<div class=\"tool-head\">\n\t\t\t{icon && Icons[icon]}\n\t\t\t<div>\n\t\t\t\t<h3>{title}</h3>\n\t\t\t\t<p>{desc}</p>\n\t\t\t</div>\n\t\t</div>\n\t\t{children && <div class=\"tool-body\">\n\t\t\t{children}\n\t\t</div>}\n\t</>\n\treturn link\n\t\t? <a class=\"tool-card\" href={link}>{content}</a>\n\t\t: <div class=\"tool-card\">{content}</div>\n}\n","import { useMemo, useState } from 'preact/hooks'\nimport { Octicon } from '.'\n\nconst SEPARATOR = '/'\n\ninterface Props {\n\tentries: string[],\n\tonSelect: (entry: string) => unknown,\n\tindent?: number,\n}\nexport function TreeView({ entries, onSelect, indent }: Props) {\n\tconst roots = useMemo(() => {\n\t\tconst groups: Record<string, string[]> = {}\n\t\tfor (const entry of entries) {\n\t\t\tconst i = entry.indexOf(SEPARATOR)\n\t\t\tif (i >= 0) {\n\t\t\t\tconst root = entry.slice(0, i)\n\t\t\t\t;(groups[root] ??= []).push(entry.slice(i + 1))\n\t\t\t}\n\t\t}\n\t\treturn Object.entries(groups)\n\t}, entries)\n\n\tconst leaves = useMemo(() => {\n\t\treturn entries.filter(e => !e.includes(SEPARATOR))\n\t}, entries)\n\n\tconst [hidden, setHidden] = useState(new Set<string>())\n\tconst toggle = (root: string) => {\n\t\tif (hidden.has(root)) {\n\t\t\thidden.delete(root)\n\t\t} else {\n\t\t\thidden.add(root)\n\t\t}\n\t\tsetHidden(new Set(hidden))\n\t}\n\n\treturn <div class=\"tree-view\" style={`--indent: ${indent ?? 0};`}>\n\t\t{roots.map(([r, entries]) => <div>\n\t\t\t<TreeViewEntry icon={hidden.has(r) ? 'chevron_right' : 'chevron_down'} key={r} label={r} onClick={() => toggle(r)}/>\n\t\t\t{!hidden.has(r) &&\n\t\t\t\t<TreeView entries={entries} onSelect={e => onSelect(`${r}/${e}`)} indent={(indent ?? 0) + 1} />}\n\t\t</div>)}\n\t\t{leaves.map(e => <TreeViewEntry icon=\"file\" key={e} label={e} onClick={() => onSelect(e)} />)}\n\t</div>\n}\n\ninterface TreeViewEntryProps {\n\ticon: keyof typeof Octicon,\n\tlabel: string,\n\tonClick?: () => unknown,\n}\nfunction TreeViewEntry({ icon, label, onClick }: TreeViewEntryProps) {\n\treturn <div class=\"entry\" onClick={onClick} >\n\t\t{Octicon[icon]}\n\t\t{label}\n\t</div>\n}\n","import { marked } from 'marked'\nimport { ChangelogTag } from '.'\nimport type { Change, ChangelogVersion } from '../../services'\n\ntype Props = {\n\tchange: Change,\n\tactiveTags?: string[],\n\ttoggleTag?: (tag: string) => unknown,\n}\nexport function ChangelogEntry({ change, activeTags, toggleTag }: Props) {\n\treturn <div class=\"changelog-entry\">\n\t\t<div class=\"changelog-version\">\n\t\t\t<ArticleLink {...change.version}/>\n\t\t\t<ArticleLink {...change.group}/>\n\t\t</div>\n\t\t<div class=\"changelog-tags\">\n\t\t\t{change.tags.map(tag => <ChangelogTag label={tag} onClick={toggleTag ? () => toggleTag(tag) : undefined} active={activeTags?.includes(tag)} />)}\n\t\t</div>\n\t\t<div class=\"changelog-content\" dangerouslySetInnerHTML={{ __html: marked(change.content) }} />\n\t</div>\n}\n\nfunction ArticleLink({ id, article }: ChangelogVersion) {\n\treturn article === null\n\t\t? <span>{id}</span>\n\t\t: <a href={`https://www.minecraft.net/en-us/article/${article}`} target=\"_blank\">{id}</a>\n}\n","import { Octicon } from '..'\nimport { hashString } from '../../Utils'\n\ntype TagProps = {\n\tlabel: string,\n\tactive?: boolean,\n\tonClick?: () => unknown,\n}\nexport function ChangelogTag({ label, active, onClick }: TagProps) {\n\tconst color = label === 'breaking' ? 5 : hashString(label) % 360\n\treturn <div class={`changelog-tag${active ? ' active' : ''}${onClick ? ' clickable' : ''}`} style={`--tint: ${color}`} onClick={onClick}>\n\t\t{label === 'breaking' && Octicon.alert}\n\t\t{label}\n\t</div>\n}\n","import { useMemo, useState } from 'preact/hooks'\nimport { Btn, TextInput } from '..'\nimport { useLocale } from '../../contexts'\nimport type { Change } from '../../services'\nimport { ChangelogEntry } from './ChangelogEntry'\nimport { ChangelogTag } from './ChangelogTag'\n\ninterface Props {\n\tchanges: Change[] | undefined,\n\tdefaultOrder: 'asc' | 'desc',\n}\nexport function ChangelogList({ changes, defaultOrder }: Props) {\n\tconst { locale } = useLocale()\n\t\n\tconst [search, setSearch] = useState('')\n\tconst [tags, setTags] = useState<string[]>([])\n\tconst toggleTag = (tag: string) => {\n\t\tif (!tags.includes(tag)) {\n\t\t\tsetTags([...tags, tag])\n\t\t} else {\n\t\t\tsetTags(tags.filter(t => t !== tag))\n\t\t}\n\t}\n\n\tconst filteredChangelogs = useMemo(() => {\n\t\tconst query = search.split(' ').map(q => q.trim().toLowerCase()).filter(q => q.length > 0)\n\t\tif (query.length === 0 && tags.length === 0) return changes\n\t\treturn changes?.filter(change => {\n\t\t\tif (!tags.every(tag => change.tags.includes(tag))) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst content = change.tags.join(' ') + ' ' + change.content.toLowerCase()\n\t\t\treturn query.every(q => {\n\t\t\t\tif (q.startsWith('!')) {\n\t\t\t\t\treturn q.length === 1 || !content.includes(q.slice(1))\n\t\t\t\t}\n\t\t\t\treturn content.includes(q)\n\t\t\t})\n\t\t})\n\t}, [changes, search, tags])\n\n\tconst [sort, setSort] = useState(defaultOrder === 'desc')\n\n\tconst sortedChangelogs = useMemo(() => {\n\t\treturn filteredChangelogs?.sort((a, b) => sort ? b.order - a.order : a.order - b.order)\n\t}, [filteredChangelogs, sort])\n\n\treturn <>\n\t\t<div class=\"changelog-query\">\n\t\t\t<TextInput class=\"btn btn-input changelog-search\" list=\"sound-list\" placeholder={locale('changelog.search')}\n\t\t\t\tvalue={search} onChange={setSearch} />\n\t\t\t<Btn icon={sort ? 'sort_desc' : 'sort_asc'} label={sort ? 'Newest first' : 'Oldest first'} onClick={() => setSort(!sort)} />\n\t\t</div>\n\t\t{tags.length > 0 && <div class=\"changelog-tags\">\n\t\t\t{tags.map(tag => <ChangelogTag label={tag} onClick={() => setTags(tags.filter(t => t !== tag))} />)}\n\t\t</div>}\n\t\t<div class=\"changelog-list\">\n\t\t\t{sortedChangelogs === undefined\n\t\t\t\t? <span>{locale('loading')}</span>\n\t\t\t\t: sortedChangelogs.length === 0\n\t\t\t\t\t? <span>{locale('changelog.no_results')}</span>\n\t\t\t\t\t:\tsortedChangelogs.map(change =>\n\t\t\t\t\t\t<ChangelogEntry change={change} activeTags={tags} toggleTag={toggleTag} />)}\n\t\t</div>\n\t</>\n}\n","import { useEffect, useMemo, useState } from 'preact/hooks'\nimport { VersionMetaData } from '.'\nimport { useLocale } from '../../contexts'\nimport type { Change, VersionMeta } from '../../services'\nimport { getChangelogs } from '../../services'\nimport { Giscus } from '../Giscus'\nimport { ChangelogList } from './ChangelogList'\n\ntype Tab = 'changelog' | 'discussion' \n\ninterface Props {\n\tversion: VersionMeta\n}\nexport function VersionDetail({ version }: Props) {\n\tconst { locale } = useLocale()\n\n\tconst [tab, setTab] = useState<Tab>('changelog')\n\n\tconst [changelogs, setChangelogs] = useState<Change[] | undefined>(undefined)\n\tuseEffect(() => {\n\t\tgetChangelogs()\n\t\t\t.then(changelogs => setChangelogs(\n\t\t\t\tchangelogs.map(c => ({ ...c, tags: c.tags.filter(t => t !== c.group.id) }))\n\t\t\t))\n\t\t\t.catch(e => console.error(e))\n\t}, [])\n\n\tconst filteredChangelogs = useMemo(() =>\n\t\tchangelogs?.filter(c => c.version.id === version.id || c.group.id === version.id),\n\t[version.id, changelogs])\n\n\treturn <>\n\t\t<div class=\"version-detail\">\n\t\t\t<h2>{version.name}</h2>\n\t\t\t<div class=\"version-info\">\n\t\t\t\t<VersionMetaData label={locale('versions.released')} value={releaseDate(version)} />\n\t\t\t\t<VersionMetaData label={locale('versions.release_target')} value={version.release_target} link={version.id !== version.release_target ? `/versions/?id=${version.release_target}` : undefined} />\n\t\t\t\t<VersionMetaData label={locale('versions.data_version')} value={version.data_version} />\n\t\t\t\t<VersionMetaData label={locale('versions.protocol_version')} value={version.protocol_version} />\n\t\t\t\t<VersionMetaData label={locale('versions.data_pack_format')} value={version.data_pack_version} />\n\t\t\t\t<VersionMetaData label={locale('versions.resource_pack_format')} value={version.resource_pack_version} />\n\t\t\t</div>\n\t\t\t<div class=\"version-tabs\">\n\t\t\t\t<span class={tab === 'changelog' ? 'selected' : ''} onClick={() => setTab('changelog')}>{locale('versions.technical_changes')}</span>\n\t\t\t\t<span class={tab === 'discussion' ? 'selected' : ''} onClick={() => setTab('discussion')}>{locale('versions.discussion')}</span>\n\t\t\t</div>\n\t\t\t<div class=\"version-tab\">\n\t\t\t\t{tab === 'changelog' && <ChangelogList changes={filteredChangelogs} defaultOrder=\"asc\" />}\n\t\t\t\t{tab === 'discussion' && <Giscus term={`version/${version.id}`} />}\n\t\t\t</div>\n\t\t</div>\n\t</>\n}\n\nexport function releaseDate(version: VersionMeta) {\n\treturn new Date(version.release_time).toLocaleDateString(undefined, { day: 'numeric', month: 'short', year: 'numeric' })\n}\n","import { releaseDate, VersionMetaData } from '.'\nimport { useLocale } from '../../contexts'\nimport type { VersionMeta } from '../../services'\n\ninterface Props {\n\tversion: VersionMeta,\n\tlink?: string,\n}\nexport function VersionEntry({ version, link }: Props) {\n\tconst { locale } = useLocale()\n\n\treturn <a class=\"version-entry\" href={link}>\n\t\t<span class=\"version-id\">{version.id}</span>\n\t\t<VersionMetaData label={locale('versions.released')} value={releaseDate(version)} compact />\n\t\t<VersionMetaData label={locale('versions.data_version')} value={version.data_version} optional />\n\t\t<VersionMetaData label={locale('versions.pack_format')} value={version.data_pack_version} optional />\n\t</a>\n}\n","import { useMemo, useState } from 'preact/hooks'\nimport { Checkbox, TextInput } from '..'\nimport { useLocale } from '../../contexts'\nimport type { VersionMeta } from '../../services'\nimport { VersionEntry } from './VersionEntry'\n\ninterface Props {\n\tversions: VersionMeta[]\n\tlink?: (id: string) => string\n}\nexport function VersionList({ versions, link }: Props) {\n\tconst { locale } = useLocale()\n\t\n\tconst [snapshots, setSnapshots] = useState(true)\n\tconst [search, setSearch] = useState('')\n\n\tconst filteredVersions = useMemo(() => versions.filter(v => {\n\t\tif (v.type === 'snapshot' && !snapshots) return false\n\t\treturn v.id.includes(search)\n\t}), [versions, snapshots, search])\n\n\n\treturn <>\n\t\t<div class=\"versions-controls\">\n\t\t\t<TextInput class=\"btn btn-input version-search\" list=\"sound-list\" placeholder={locale('versions.search')}\n\t\t\t\tvalue={search} onChange={setSearch} />\n\t\t\t<Checkbox label=\"Include snapshots\" value={snapshots} onChange={setSnapshots} />\n\t\t</div>\n\t\t<div class=\"version-list\">\n\t\t\t{filteredVersions.map(v => <VersionEntry version={v} link={link?.(v.id)} />)}\n\t\t\t{filteredVersions.length === 0 && <span>\n\t\t\t\t{locale('versions.no_results')}\n\t\t\t</span>}\n\t\t</div>\n\t</>\n}\n","import { Octicon } from '..'\n\ninterface Props {\n\tlabel: string,\n\tvalue: string | number,\n\tlink?: string,\n\tcompact?: boolean,\n\toptional?: boolean,\n}\nexport function VersionMetaData({ label, value, link, compact, optional }: Props) {\n\treturn <div class={`version-metadata${optional ? ' version-metadata-hide' : ''}`}>\n\t\t<span class={compact ? 'version-metadata-hide' : undefined}>{label}: </span>\n\t\t<span class=\"version-metadata-value\">{value}</span>\n\t\t{link && <a href={link} class=\"version-metadata-link\">{Octicon.link_external}</a>}\n\t</div>\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { useLocale, useTitle } from '../contexts'\nimport { cleanUrl } from '../Utils'\n\ninterface Props {\n\tcategory: string,\n\tpath?: string,\n}\nexport function Category({ category }: Props) {\n\tconst { locale } = useLocale()\n\tuseTitle(locale('title.generator_category', locale(category)))\n\treturn <main>\n\t\t<div class=\"category\">\n\t\t\t{config.generators.filter(g => g.category === category).map(g => \n\t\t\t\t<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />\n\t\t\t)}\n\t\t</div>\n\t</main>\n}\n","import { useEffect, useState } from 'preact/hooks'\nimport { Ad, ChangelogList, ErrorPanel } from '../components'\nimport { useLocale, useTitle } from '../contexts'\nimport type { Change } from '../services'\nimport { getChangelogs } from '../services'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Changelog({}: Props) {\n\tconst { locale } = useLocale()\n\tconst [error, setError] = useState<Error | null>(null)\n\tuseTitle(locale('title.changelog'))\n\n\tconst [changelogs, setChangelogs] = useState<Change[]>([])\n\tuseEffect(() => {\n\t\tgetChangelogs()\n\t\t\t.then(changelogs => setChangelogs(changelogs))\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [])\n\n\n\treturn <main>\n\t\t<Ad type=\"text\" id=\"changelog\" />\n\t\t{error && <ErrorPanel error={error} onDismiss={() => setError(null)} />}\n\t\t<div class=\"changelog\">\n\t\t\t<ChangelogList changes={changelogs} defaultOrder=\"desc\" />\n\t\t</div>\n\t</main>\n}\n","import { DataModel, Path } from '@mcschema/core'\nimport { getCurrentUrl, route } from 'preact-router'\nimport { useEffect, useErrorBoundary, useMemo, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Analytics } from '../Analytics'\nimport { Ad, Btn, BtnMenu, ErrorPanel, HasPreview, Octicon, PreviewPanel, SearchList, SourcePanel, TextInput, Tree } from '../components'\nimport { useLocale, useProject, useTitle, useVersion } from '../contexts'\nimport { useActiveTimeout, useModel } from '../hooks'\nimport { getOutput } from '../schema/transformOutput'\nimport type { BlockStateRegistry, VersionId } from '../services'\nimport { checkVersion, fetchPreset, getBlockStates, getCollections, getModel, getSnippet, shareSnippet, SHARE_KEY } from '../services'\nimport { Store } from '../Store'\nimport { cleanUrl, deepEqual, getGenerator, getSearchParams, message, setSeachParams } from '../Utils'\n\ninterface Props {\n\tdefault?: true,\n}\nexport function Generator({}: Props) {\n\tconst { locale } = useLocale()\n\tconst { version, changeVersion } = useVersion()\n\tconst { project, file, updateFile, openFile, closeFile } = useProject()\n\tconst [error, setError] = useState<Error | string | null>(null)\n\tconst [errorBoundary, errorRetry] = useErrorBoundary()\n\tif (errorBoundary) {\n\t\terrorBoundary.message = `Something went wrong rendering the generator: ${errorBoundary.message}`\n\t\treturn <main><ErrorPanel error={errorBoundary} onDismiss={errorRetry} /></main>\n\t}\n\n\tconst gen = getGenerator(getCurrentUrl())\n\tif (!gen) {\n\t\treturn <main><ErrorPanel error={`Cannot find generator \"${getCurrentUrl()}\"`} /></main>\n\t}\n\n\tconst allowedVersions = config.versions\n\t\t.filter(v => checkVersion(v.id, gen.minVersion, gen.maxVersion))\n\t\t.map(v => v.id as VersionId)\n\n\tuseTitle(locale('title.generator', locale(gen.id)), allowedVersions)\n\n\tif (!checkVersion(version, gen.minVersion)) {\n\t\tsetError(`The minimum version for this generator is ${gen.minVersion}`)\n\t}\n\tif (!checkVersion(version, undefined, gen.maxVersion)) {\n\t\tsetError(`This generator is not available in versions above ${gen.maxVersion}`)\n\t}\n\n\tconst searchParams = getSearchParams(getCurrentUrl())\n\tconst currentPreset = searchParams.get('preset')\n\tconst sharedSnippetId = searchParams.get(SHARE_KEY)\n\tuseEffect(() => {\n\t\tif (model && currentPreset) {\n\t\t\tloadPreset(currentPreset).then(preset => {\n\t\t\t\tmodel.reset(DataModel.wrapLists(preset), false)\n\t\t\t\tsetSeachParams({ version, preset: currentPreset, [SHARE_KEY]: undefined })\n\t\t\t})\n\t\t} else if (model && sharedSnippetId) {\n\t\t\tgetSnippet(sharedSnippetId).then(s => loadSnippet(model, s))\n\t\t}\n\t}, [currentPreset, sharedSnippetId])\n\n\tconst loadSnippet = (model: DataModel, snippet: any) => {\n\t\tif (snippet.version && snippet.version !== version) {\n\t\t\tchangeVersion(snippet.version, false)\n\t\t}\n\t\tif (snippet.type && snippet.type !== gen.id) {\n\t\t\tconst snippetGen = config.generators.find(g => g.id === snippet.type)\n\t\t\tif (snippetGen) {\n\t\t\t\troute(`${cleanUrl(snippetGen.url)}?${SHARE_KEY}=${snippet.id}`)\n\t\t\t}\n\t\t}\n\t\tif (snippet.show_preview && !previewShown) {\n\t\t\tsetPreviewShown(true)\n\t\t\tsetSourceShown(false)\n\t\t}\n\t\tmodel.reset(DataModel.wrapLists(snippet.data), false)\n\t}\n\n\tconst backup = useMemo(() => Store.getBackup(gen.id), [gen.id])\n\n\tconst loadBackup = () => {\n\t\tif (backup !== undefined) {\n\t\t\tmodel?.reset(DataModel.wrapLists(backup), false)\n\t\t}\n\t}\n\n\tconst [model, setModel] = useState<DataModel | null>(null)\n\tconst [blockStates, setBlockStates] = useState<BlockStateRegistry | null>(null)\n\tuseEffect(() => {\n\t\tsetError(null)\n\t\tsetModel(null)\n\t\tgetBlockStates(version)\n\t\t\t.then(b => setBlockStates(b))\n\t\tgetModel(version, gen.id)\n\t\t\t.then(async m => {\n\t\t\t\tAnalytics.setGenerator(gen.id)\n\t\t\t\tif (currentPreset) {\n\t\t\t\t\tconst preset = await loadPreset(currentPreset)\n\t\t\t\t\tm.reset(DataModel.wrapLists(preset), false)\n\t\t\t\t} else if (sharedSnippetId) {\n\t\t\t\t\tconst snippet = await getSnippet(sharedSnippetId)\n\t\t\t\t\tloadSnippet(m, snippet)\n\t\t\t\t}\n\t\t\t\tsetModel(m)\n\t\t\t})\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [version, gen.id])\n\n\tconst [dirty, setDirty] = useState(false)\n\tuseModel(model, () => {\n\t\tsetSeachParams({ version: undefined, preset: undefined, [SHARE_KEY]: undefined })\n\t\tStore.setBackup(gen.id, DataModel.unwrapLists(model?.data))\n\t\tsetError(null)\n\t\tsetDirty(true)\n\t}, [gen.id])\n\n\tconst [fileRename, setFileRename] = useState('')\n\tconst [fileSaved, doSave] = useActiveTimeout()\n\tconst [fileError, doFileError] = useActiveTimeout()\n\n\tconst doFileRename = () => {\n\t\tif (fileRename !== file?.id && fileRename && model && blockStates) {\n\t\t\tconst data = getOutput(model, blockStates)\n\t\t\tconst success = updateFile(gen.id, file?.id, { id: fileRename, data })\n\t\t\tif (success) {\n\t\t\t\tdoSave()\n\t\t\t} else {\n\t\t\t\tdoFileError()\n\t\t\t\tif (file) {\n\t\t\t\t\tsetFileRename(file?.id)\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (file) {\n\t\t\tsetFileRename(file?.id)\n\t\t}\n\t}\n\n\tconst deleteFile = () => {\n\t\tif (file) {\n\t\t\tupdateFile(gen.id, file.id, {})\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tif (file) {\n\t\t\tsetFileRename(file.id)\n\t\t}\n\t}, [file])\n\n\tuseEffect(() => {\n\t\tif (model) {\n\t\t\tsetFileRename(file?.id ?? '')\n\t\t\tif (file && gen.id === file.type) {\n\t\t\t\tmodel.reset(DataModel.wrapLists(file.data))\n\t\t\t}\n\t\t\tsetDirty(false)\n\t\t}\n\t}, [file, model])\n\n\tconst reset = () => {\n\t\tAnalytics.generatorEvent('reset')\n\t\tmodel?.reset(DataModel.wrapLists(model.schema.default()), true)\n\t}\n\tconst undo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('undo', 'Menu')\n\t\tmodel?.undo()\n\t}\n\tconst redo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('redo', 'Menu')\n\t\tmodel?.redo()\n\t}\n\n\tconst onKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.ctrlKey && e.key === 'z') {\n\t\t\tAnalytics.generatorEvent('undo', 'Hotkey')\n\t\t\tmodel?.undo()\n\t\t} else if (e.ctrlKey && e.key === 'y') {\n\t\t\tAnalytics.generatorEvent('redo', 'Hotkey')\n\t\t\tmodel?.redo()\n\t\t}\n\t}\n\tconst onKeyDown = (e: KeyboardEvent) => {\n\t\tif (e.ctrlKey && e.key === 's') {\n\t\t\te.preventDefault()\n\t\t\tif (model && blockStates && file) {\n\t\t\t\tAnalytics.generatorEvent('save', 'Hotkey')\n\t\t\t\tconst data = getOutput(model, blockStates)\n\t\t\t\tupdateFile(gen.id, file?.id, { id: file?.id, data })\n\t\t\t\tsetDirty(false)\n\t\t\t\tdoSave()\n\t\t\t}\n\t\t}\n\t}\n\tuseEffect(() => {\n\t\tdocument.addEventListener('keyup', onKeyUp)\n\t\tdocument.addEventListener('keydown', onKeyDown)\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keyup', onKeyUp)\n\t\t\tdocument.removeEventListener('keydown', onKeyDown)\n\t\t}\n\t}, [model, blockStates, file])\n\n\tconst [presets, setPresets] = useState<string[]>([])\n\tuseEffect(() => {\n\t\tgetCollections(version).then(collections => {\n\t\t\tsetPresets(collections.get(gen.id).map(p => p.slice(10)))\n\t\t})\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [version, gen.id])\n\n\tconst selectPreset = (id: string) => {\n\t\tAnalytics.generatorEvent('load-preset', id)\n\t\tsetSeachParams({ version, preset: id, [SHARE_KEY]: undefined })\n\t}\n\n\tconst loadPreset = async (id: string) => {\n\t\ttry {\n\t\t\tconst preset = await fetchPreset(version, gen.path ?? gen.id, id)\n\t\t\tconst seed = model?.get(new Path(['generator', 'seed']))\n\t\t\tif (preset?.generator?.seed !== undefined && seed !== undefined) {\n\t\t\t\tpreset.generator.seed = seed\n\t\t\t\tif (preset.generator.biome_source?.seed !== undefined) {\n\t\t\t\t\tpreset.generator.biome_source.seed = seed\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn preset\n\t\t} catch (e) {\n\t\t\tsetError(e instanceof Error ? e : message(e))\n\t\t}\n\t}\n\n\tconst selectVersion = (version: VersionId) => {\n\t\tsetSeachParams({ [SHARE_KEY]: undefined })\n\t\tchangeVersion(version)\n\t}\n\n\tconst [shareUrl, setShareUrl] = useState<string | undefined>(undefined)\n\tconst [shareShown, setShareShown] = useState(false)\n\tconst [shareCopyActive, shareCopySuccess] = useActiveTimeout({ cooldown: 3000 })\n\tconst share = () => {\n\t\tif (shareShown) {\n\t\t\tsetShareShown(false)\n\t\t\treturn\n\t\t}\n\t\tif (currentPreset) {\n\t\t\tsetShareUrl(`${location.protocol}//${location.host}/${gen.url}/?version=${version}&preset=${currentPreset}`)\n\t\t\tsetShareShown(true)\n\t\t\tcopySharedId()\n\t\t} else if (model && blockStates) {\n\t\t\tconst output = getOutput(model, blockStates)\n\t\t\tif (deepEqual(output, model.schema.default())) {\n\t\t\t\tsetShareUrl(`${location.protocol}//${location.host}/${gen.url}/?version=${version}`)\n\t\t\t\tsetShareShown(true)\n\t\t\t} else {\n\t\t\t\tshareSnippet(gen.id, version, output, previewShown)\n\t\t\t\t\t.then(url => {\n\t\t\t\t\t\tsetShareUrl(url)\n\t\t\t\t\t\tsetShareShown(true)\n\t\t\t\t\t})\n\t\t\t\t\t.catch(e => {\n\t\t\t\t\t\tif (e instanceof Error) {\n\t\t\t\t\t\t\tsetError(e)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\tconst copySharedId = () => {\n\t\tnavigator.clipboard.writeText(shareUrl ?? '')\n\t\tshareCopySuccess()\n\t}\n\tuseEffect(() => {\n\t\tif (!shareCopyActive) {\n\t\t\tsetShareUrl(undefined)\n\t\t\tsetShareShown(false)\n\t\t}\n\t}, [shareCopyActive])\n\n\tconst [sourceShown, setSourceShown] = useState(window.innerWidth > 820)\n\tconst [doCopy, setCopy] = useState(0)\n\tconst [doDownload, setDownload] = useState(0)\n\tconst [doImport, setImport] = useState(0)\n\n\tconst copySource = () => {\n\t\tAnalytics.generatorEvent('copy')\n\t\tsetCopy(doCopy + 1)\n\t}\n\tconst downloadSource = () => {\n\t\tAnalytics.generatorEvent('download')\n\t\tsetDownload(doDownload + 1)\n\t}\n\tconst importSource = () => {\n\t\tAnalytics.generatorEvent('import')\n\t\tsetSourceShown(true)\n\t\tsetImport(doImport + 1)\n\t}\n\tconst toggleSource = () => {\n\t\tAnalytics.generatorEvent('toggle-output', !sourceShown ? 'visible' : 'hidden')\n\t\tsetSourceShown(!sourceShown)\n\t\tsetCopy(0)\n\t\tsetDownload(0)\n\t\tsetImport(0)\n\t}\n\n\tconst [copyActive, copySuccess] = useActiveTimeout()\n\n\tconst [previewShown, setPreviewShown] = useState(false)\n\tconst hasPreview = HasPreview.includes(gen.id) && !(gen.id === 'worldgen/configured_feature' && checkVersion(version, '1.18'))\n\tif (previewShown && !hasPreview) setPreviewShown(false)\n\tlet actionsShown = 2\n\tif (hasPreview) actionsShown += 1\n\tif (sourceShown) actionsShown += 2\n\n\tconst togglePreview = () => {\n\t\tAnalytics.generatorEvent('toggle-preview', !previewShown ? 'visible' : 'hidden')\n\t\tsetPreviewShown(!previewShown)\n\t\tif (!previewShown && sourceShown) {\n\t\t\tsetSourceShown(false)\n\t\t}\n\t}\n\n\treturn <>\n\t\t<main class={previewShown ? 'has-preview' : ''}>\n\t\t\t<Ad id=\"data-pack-generator\" type=\"text\" />\n\t\t\t<div class=\"controls\">\n\t\t\t\t<div class={`project-controls ${file && 'has-file'}`}>\n\t\t\t\t\t<div class=\"btn-row\">\n\t\t\t\t\t\t<BtnMenu icon=\"repo\" label={project.name} relative={false}>\n\t\t\t\t\t\t\t<Btn icon=\"arrow_left\" label={locale('project.go_to')} onClick={() => route('/project')} />\n\t\t\t\t\t\t\t{file && <Btn icon=\"file\" label={locale('project.new_file')} onClick={closeFile} />}\n\t\t\t\t\t\t\t{backup !== undefined && <Btn icon=\"history\" label={locale('restore_backup')} onClick={loadBackup} />}\n\t\t\t\t\t\t\t<SearchList searchPlaceholder={locale(project.name === 'Drafts' ? 'project.search_drafts' : 'project.search')} noResults={locale('project.no_files')} values={project.files.filter(f => f.type === gen.id).map(f => f.id)} onSelect={(id) => openFile(gen.id, id)} />\n\t\t\t\t\t\t</BtnMenu>\n\t\t\t\t\t\t<TextInput class=\"btn btn-input\" placeholder={locale('project.unsaved_file')} value={fileRename} onChange={setFileRename} onEnter={doFileRename} onBlur={doFileRename} />\n\t\t\t\t\t\t{file && <Btn icon=\"trashcan\" tooltip={locale('project.delete_file')} onClick={deleteFile} />}\n\t\t\t\t\t</div>\n\t\t\t\t\t{dirty ? <div class=\"status-icon\">{Octicon.dot_fill}</div>\n\t\t\t\t\t\t: fileSaved ? <div class=\"status-icon active\">{Octicon.check}</div>\n\t\t\t\t\t\t\t: fileError && <div class=\"status-icon danger\">{Octicon.x}</div> }\n\t\t\t\t</div>\n\t\t\t\t<div class=\"generator-controls\">\n\t\t\t\t\t<Btn icon=\"upload\" label={locale('import')} onClick={importSource} />\n\t\t\t\t\t<BtnMenu icon=\"archive\" label={locale('presets')} relative={false}>\n\t\t\t\t\t\t<SearchList searchPlaceholder={locale('search')} noResults={locale('no_presets')} values={presets} onSelect={selectPreset}/>\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t\t<BtnMenu icon=\"tag\" label={version} tooltip={locale('switch_version')} data-cy=\"version-switcher\">\n\t\t\t\t\t\t{allowedVersions.reverse().map(v =>\n\t\t\t\t\t\t\t<Btn label={v} active={v === version} onClick={() => selectVersion(v)} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t\t<BtnMenu icon=\"kebab_horizontal\" tooltip={locale('more')}>\n\t\t\t\t\t\t<Btn icon=\"history\" label={locale('reset')} onClick={reset} />\n\t\t\t\t\t\t<Btn icon=\"arrow_left\" label={locale('undo')} onClick={undo} />\n\t\t\t\t\t\t<Btn icon=\"arrow_right\" label={locale('redo')} onClick={redo} />\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{error && <ErrorPanel error={error} onDismiss={() => setError(null)} />}\n\t\t\t<Tree {...{model, version, blockStates}} onError={setError} />\n\t\t</main>\n\t\t<div class=\"popup-actions\" style={`--offset: -${8 + actionsShown * 50}px;`}>\n\t\t\t<div class={`popup-action action-preview${hasPreview ? ' shown' : ''} tooltipped tip-nw`} aria-label={locale(previewShown ? 'hide_preview' : 'show_preview')} onClick={togglePreview}>\n\t\t\t\t{previewShown ? Octicon.x_circle : Octicon.play}\n\t\t\t</div>\n\t\t\t<div class={'popup-action action-share shown tooltipped tip-nw'} aria-label={locale('share')} onClick={share}>\n\t\t\t\t{Octicon.link}\n\t\t\t</div>\n\t\t\t<div class={`popup-action action-download${sourceShown ? ' shown' : ''} tooltipped tip-nw`} aria-label={locale('download')} onClick={downloadSource}>\n\t\t\t\t{Octicon.download}\n\t\t\t</div>\n\t\t\t<div class={`popup-action action-copy${sourceShown ? ' shown' : ''}${copyActive ? ' active' : ''} tooltipped tip-nw`} aria-label={locale(copyActive ? 'copied' : 'copy')} onClick={copySource}>\n\t\t\t\t{copyActive ? Octicon.check : Octicon.clippy}\n\t\t\t</div>\n\t\t\t<div class={'popup-action action-code shown tooltipped tip-nw'} aria-label={locale(sourceShown ? 'hide_output' : 'show_output')} onClick={toggleSource}>\n\t\t\t\t{sourceShown ? Octicon.chevron_right : Octicon.code}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class={`popup-preview${previewShown ? ' shown' : ''}`}>\n\t\t\t<PreviewPanel {...{model, version, id: gen.id}} shown={previewShown} onError={setError} />\n\t\t</div>\n\t\t<div class={`popup-source${sourceShown ? ' shown' : ''}`}>\n\t\t\t<SourcePanel {...{model, blockStates, doCopy, doDownload, doImport}} name={gen.schema ?? 'data'} copySuccess={copySuccess} onError={setError} />\n\t\t</div>\n\t\t<div class={`popup-share${shareShown ? ' shown' : ''}`}>\n\t\t\t<TextInput value={shareUrl} readonly />\n\t\t\t<Btn icon={shareCopyActive ? 'check' : 'clippy'} onClick={copySharedId} tooltip={locale(shareCopyActive ? 'copied' : 'copy_share')} tooltipLoc=\"nw\" active={shareCopyActive} showTooltip={shareCopyActive} />\n\t\t</div>\n\t</>\n}\n","import config from '../../config.json'\nimport { Giscus, ToolCard } from '../components'\nimport { useLocale, useTitle } from '../contexts'\nimport { cleanUrl } from '../Utils'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Home({}: Props) {\n\tconst { locale } = useLocale()\n\tuseTitle(locale('title.home'))\n\treturn <main>\n\t\t<div class=\"home\">\n\t\t\t<ToolCard title=\"Data packs\">\n\t\t\t\t{config.generators.filter(g => !g.category).map(g => \n\t\t\t\t\t<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />\n\t\t\t\t)}\n\t\t\t\t<ToolCard title={locale('worldgen')} link=\"/worldgen/\" />\n\t\t\t</ToolCard>\n\t\t\t<ToolCard title=\"Resource packs\">\n\t\t\t\t{config.generators.filter(g => g.category === 'assets').map(g =>\n\t\t\t\t\t<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />\n\t\t\t\t)}\n\t\t\t</ToolCard>\n\t\t\t<ToolCard title=\"Report Inspector\" icon=\"report\"\n\t\t\t\tlink=\"https://misode.github.io/report/\"\n\t\t\t\tdesc=\"Analyse your performance reports\" />\n\t\t\t<ToolCard title=\"Minecraft Sounds\" icon=\"sounds\"\n\t\t\t\tlink=\"/sounds/\"\n\t\t\t\tdesc=\"Browse through and mix all the vanilla sounds\" />\n\t\t\t<ToolCard title=\"Data Pack Upgrader\"\n\t\t\t\tlink=\"https://misode.github.io/upgrader/\"\n\t\t\t\tdesc=\"Convert your data packs from 1.16 to 1.17 to 1.18\" />\n\t\t\t<ToolCard title=\"Technical Changelog\" link=\"/changelog/\" />\n\t\t\t<ToolCard title=\"Minecraft Versions\" link=\"/versions/\" />\n\t\t\t<Giscus />\n\t\t</div>\n\t</main>\n}\n","import { useMemo } from 'preact/hooks'\nimport { Ad, TreeView } from '../components'\nimport { getFilePath, useLocale, useProject, useTitle } from '../contexts'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Project({}: Props) {\n\tconst { locale } = useLocale()\n\tconst { project, openFile } = useProject()\n\tuseTitle(locale('title.project', project.name))\n\tconst entries = useMemo(() => project.files.map(getFilePath), project.files)\n\n\tconst selectFile = (entry: string) => {\n\t\tconst [, namespace, type, ...id] = entry.split('/')\n\t\topenFile(type, `${namespace}:${id}`)\n\t}\n\n\treturn <main>\n\t\t<Ad id=\"data-pack-project\" type=\"text\" />\n\t\t<div class=\"project\">\n\t\t\t<h2>{project.name}</h2>\n\t\t\t<div class=\"file-view\">\n\t\t\t\t<TreeView entries={entries} onSelect={selectFile}/>\n\t\t\t</div>\n\t\t</div>\n\t</main>\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Btn, BtnMenu, ErrorPanel, SoundConfig, TextInput } from '../components'\nimport { useLocale, useTitle, useVersion } from '../contexts'\nimport type { SoundEvents, VersionId } from '../services'\nimport { fetchSounds } from '../services'\nimport { hexId } from '../Utils'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Sounds({}: Props) {\n\tconst { locale } = useLocale()\n\tconst { version, changeVersion } = useVersion()\n\tconst [error, setError] = useState<Error | null>(null)\n\tuseTitle(locale('title.sounds'))\n\n\tconst [sounds, setSounds] = useState<SoundEvents>({})\n\tconst soundKeys = Object.keys(sounds ?? {})\n\tuseEffect(() => {\n\t\tfetchSounds(version)\n\t\t\t.then(setSounds)\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [version])\n\n\tconst [search, setSearch] = useState('')\n\tconst [configs, setConfigs] = useState<SoundConfig[]>([])\n\tconst addConfig = () => {\n\t\tsetConfigs([{ id: hexId(), sound: search, delay: 0, pitch: 1, volume: 1 }, ...configs])\n\t}\n\tconst editConfig = (id: string) => (changes: Partial<SoundConfig>) => {\n\t\tsetConfigs(configs.map(c => c.id === id ? { ...c, ...changes } : c))\n\t}\n\tconst deleteConfig = (id: string) => () => {\n\t\tsetConfigs(configs.filter(c => c.id !== id))\n\t}\n\n\tconst [delayedPlay, setDelayedPlay] = useState(0)\n\tconst playAll = () => {\n\t\tsetDelayedPlay(delayedPlay + 1)\n\t}\n\n\tconst download = useRef<HTMLAnchorElement>(null)\n\tconst downloadFunction = () => {\n\t\tconst hasDelay = configs.some(c => c.delay > 0)\n\t\tconst content = configs\n\t\t\t.sort((a, b) => a.delay - b.delay)\n\t\t\t.map(c => `${hasDelay ? `execute if score @s delay matches ${c.delay} run ` : ''}playsound minecraft:${c.sound} master @s ~ ~ ~ ${c.volume} ${c.pitch}`)\n\t\t\t.join('\\n')\n\t\tdownload.current.setAttribute('href', 'data:text/plain;charset=utf-8,' + content + '%0A')\n\t\tdownload.current.setAttribute('download', 'sounds.mcfunction')\n\t\tdownload.current.click()\n\t}\n\n\treturn <main>\n\t\t{error && <ErrorPanel error={error} onDismiss={() => setError(null)} />}\n\t\t{soundKeys.length > 0 && <>\n\t\t\t<div class=\"controls sounds-controls\">\n\t\t\t\t<div class=\"sound-search-group\">\n\t\t\t\t\t<TextInput class=\"btn btn-input sound-search\" list=\"sound-list\" placeholder={locale('sounds.search')}\n\t\t\t\t\t\tvalue={search} onChange={setSearch} onEnter={addConfig} />\n\t\t\t\t\t<Btn icon=\"plus\" tooltip={locale('sounds.add_sound')} class=\"add-sound\" onClick={addConfig} />\n\t\t\t\t</div>\n\t\t\t\t{configs.length > 1 && <Btn icon=\"play\" label={ locale('sounds.play_all')} class=\"play-all-sounds\" onClick={playAll} />}\n\t\t\t\t<div class=\"spacer\"></div>\n\t\t\t\t<Btn icon=\"download\" label={locale('download')} tooltip={locale('sounds.download_function')} class=\"download-sounds\" onClick={downloadFunction} />\n\t\t\t\t<BtnMenu icon=\"tag\" label={version}>\n\t\t\t\t\t{config.versions.reverse().map(v =>\n\t\t\t\t\t\t<Btn label={v.id} active={v.id === version} onClick={() => changeVersion(v.id as VersionId)} />\n\t\t\t\t\t)}\n\t\t\t\t</BtnMenu>\n\t\t\t</div>\n\t\t\t<div class=\"sounds\">\n\t\t\t\t{configs.map(c => <SoundConfig key={c.id} {...c} {...{ sounds, delayedPlay }} onEdit={editConfig(c.id)} onDelete={deleteConfig(c.id)} />)}\n\t\t\t</div>\n\t\t\t<a ref={download} style=\"display: none;\"></a>\n\t\t</>}\n\t\t<datalist id=\"sound-list\">\n\t\t\t{soundKeys.map(s => <option key={s} value={s} />)}\n\t\t</datalist>\n\t</main>\n}\n","import { getCurrentUrl } from 'preact-router'\nimport { useEffect, useState } from 'preact/hooks'\nimport { Ad, ErrorPanel, Octicon, VersionDetail, VersionList } from '../components'\nimport { useLocale, useTitle } from '../contexts'\nimport type { VersionMeta } from '../services'\nimport { fetchVersions } from '../services'\nimport { getSearchParams } from '../Utils'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Versions({}: Props) {\n\tconst { locale } = useLocale()\n\tconst [error, setError] = useState<Error | null>(null)\n\tuseTitle(locale('title.versions'))\n\n\tconst [versions, setVersions] = useState<VersionMeta[]>([])\n\tuseEffect(() => {\n\t\tfetchVersions()\n\t\t\t.then(versions => setVersions(versions))\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [])\n\n\tconst selectedId = getSearchParams(getCurrentUrl()).get('id')\n\tconst selected = versions.find(v => v.id === selectedId)\n\n\tuseTitle(selected ? selected.name : 'Versions Explorer', selected ? [] : undefined)\n\n\tconst nextVersion = selected && getOffsetVersion(versions, selected, -1)\n\tconst previousVersion = selected && getOffsetVersion(versions, selected, 1)\n\n\treturn <main>\n\t\t<Ad type=\"text\" id=\"versions\" />\n\t\t{error && <ErrorPanel error={error} onDismiss={() => setError(null)} />}\n\t\t<div class=\"versions\">\n\t\t\t{selectedId ? <>\n\t\t\t\t<div class=\"version-navigation\">\n\t\t\t\t\t<a class=\"btn btn-link\" href=\"/versions/\">\n\t\t\t\t\t\t{Octicon.three_bars}\n\t\t\t\t\t\t{locale('versions.all')}\n\t\t\t\t\t</a>\n\t\t\t\t\t<a class=\"btn btn-link\" {...previousVersion ? {href: `/versions/?id=${previousVersion.id}`} : {disabled: true}}>\n\t\t\t\t\t\t{Octicon.arrow_left}\n\t\t\t\t\t\t{locale('versions.previous')}\n\t\t\t\t\t</a>\n\t\t\t\t\t<a class=\"btn btn-link\" {...nextVersion ? {href: `/versions/?id=${nextVersion.id}`} : {disabled: true}}>\n\t\t\t\t\t\t{locale('versions.next')}\n\t\t\t\t\t\t{Octicon.arrow_right}\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t{selected ? <VersionDetail version={selected} />\n\t\t\t\t\t: <div class=\"version-detail\">\n\t\t\t\t\t\t<h2>{selectedId}</h2>\n\t\t\t\t\t\t<div class=\"version-info\">\n\t\t\t\t\t\t\t<p>This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>}\n\t\t\t</> : <VersionList versions={versions} link={id => `/versions/?id=${id}`} />}\n\t\t</div>\n\t</main>\n}\n\nfunction getOffsetVersion(versions: VersionMeta[], current: VersionMeta, offset: number) {\n\tconst currentIndex = versions.findIndex(v => v.id === current.id)\n\tconst offsetIndex = currentIndex + offset\n\tif (offsetIndex < 0 || offsetIndex >= versions.length) {\n\t\treturn undefined\n\t}\n\treturn versions[offsetIndex]\n}\n","import type { RouterOnChangeArgs } from 'preact-router'\nimport { Router } from 'preact-router'\nimport '../styles/global.css'\nimport '../styles/nodes.css'\nimport { Analytics } from './Analytics'\nimport { Header } from './components'\nimport { Category, Changelog, Generator, Home, Project, Sounds, Versions } from './pages'\nimport { cleanUrl } from './Utils'\n\nexport function App() {\n\tconst changeRoute = (e: RouterOnChangeArgs) => {\n\t\t// Needs a timeout to ensure the title is set correctly\n\t\tsetTimeout(() => Analytics.pageview(cleanUrl(e.url)))\n\t}\n\n\treturn <>\n\t\t<Header />\n\t\t<Router onChange={changeRoute}>\n\t\t\t<Home path=\"/\" />\n\t\t\t<Category path=\"/worldgen\" category=\"worldgen\" />\n\t\t\t<Category path=\"/assets\" category=\"assets\" />\n\t\t\t<Sounds path=\"/sounds\" />\n\t\t\t<Changelog path=\"/changelog\" />\n\t\t\t<Versions path=\"/versions\" />\n\t\t\t<Project path=\"/project\" />\n\t\t\t<Generator default />\n\t\t</Router>\n\t</>\n}\n","import { render } from 'preact'\nimport '../styles/global.css'\nimport '../styles/nodes.css'\nimport { App } from './App'\nimport { LocaleProvider, ProjectProvider, ThemeProvider, TitleProvider, VersionProvider } from './contexts'\n\nfunction Main() {\n\treturn <LocaleProvider>\n\t\t<ThemeProvider>\n\t\t\t<VersionProvider>\n\t\t\t\t<TitleProvider>\n\t\t\t\t\t<ProjectProvider>\n\t\t\t\t\t\t<App />\n\t\t\t\t\t</ProjectProvider>\n\t\t\t\t</TitleProvider>\n\t\t\t</VersionProvider>\n\t\t</ThemeProvider>\n\t</LocaleProvider>\n}\n\nrender(<Main />, document.body)\n"],"names":["Analytics","type","id","getElementById","remove","window","load","data-ea-publisher","data-ea-type","class","icon","label","active","clazz","tooltip","tooltipLoc","onClick","aria-label","Octicon","Analytics2","ID_SITE","ID_GENERATOR","category","action","index","value","pageview","page","setLanguage","language","setTheme","theme","setVersion","version","setPreview","preview","setGenerator","generator","setPrefersColorScheme","colorScheme","generatorEvent","obj","dec2hex","dec","toString","substr","length","arr","Uint8Array","crypto","getRandomValues","Array","from","join","BigInt","Math","floor","random","Number","MAX_SAFE_INTEGER","model","seed","dimensions","get","Path","set","isObject","keys","forEach","abs","s2","h","i","imul","charCodeAt","url","replaceAll","searchIndex","indexOf","slice","cleanUrl","trimmedUrl","getPath","replace","config","generators","find","g2","Map","split","map","param","decodeURIComponent","modifications","newPath","getCurrentUrl","searchParams","getSearchParams","entries","key","delete","search","encodeURIComponent","str","hashString","a2","b2","c","max","min","lerp","e","Error","message","deepClone","rfdc","constructor","isArray","deepEqual","valueOf","Object","prototype","hasOwnProperty","call","[object Object]","forward","backward","this","defaultValue","large","larger","doSelect","placeholder","dataList","onChange","onInput","value2","target","ref","useRef","current","select","dataListId","hexId","stopPropagation","list","cooldown","invert","initial","setActive","useState","timeout","setTimeout","size","draw","onDrag","onHover","onLeave","inputs","canvas","dragStart","dragRequest","dragPending","dragBusy","onMouseDown","offsetX","offsetY","onMouseMove","x","clientWidth","y2","clientHeight","dx","dy","requestAnimationFrame","async","dx2","dy2","onMouseUp","onMouseLeave","addEventListener","body","removeEventListener","redraw","redrawCount","ctx","getContext","width","height","img","getImageData","ownCount","putImageData","hider","query","prefers","setPrefers","matchMedia","matches","mediaQuery","invalidated","listener","addListener","removeListener","props","relative","children","useFocus","__spreadValues","Btn","__spreadProps","alert","xmlns","viewBox","fill-rule","d","archive","arrow_left","arrow_right","check","chevron_down","chevron_right","chevron_up","clippy","code","dash","device_desktop","dot_fill","download","duplicate","eye","eye_closed","file","file_directory","gear","globe","history","info","issue_opened","kebab_horizontal","link","link_external","mark_github","moon","play","plus","plus_circle","repo","sort_asc","sort_desc","square","square_fill","stack","sun","sync","tag","terminal","three_bars","trashcan","unfold","upload","x_circle","error","onDismiss","stackVisible","setStackVisible","setStack","stack2","line","mapped","mappedStack","useMemo","url2","name","href","checked","component","evt","fn","onKeyDown","onEnter","displayName","TextInput","BaseInput","v","NumberInput","RangeInput","values","onSelect","searchPlaceholder","noResults","setSearch","results","terms","trim","filter","every","includes","t","BtnInput","Changelogs","fetch","json","Promise","all","group","groupIndex","versionIndex","text","entry","tags","substring","content","parseChangelog","order","change","fetchChangelog","parseVersion","flat","fetchGroup","article","match","localStorage","removeItem","caches","mcmetaUrl","dynamic","getItem","cache","open","debug","promises","request","push","warn","deleteMatching","startsWith","setItem","data","getData","mcmeta","register","properties","default","versionId","registry","versions","cacheResponse","ok","fetchResponse","responseData","put","Response","JSON","stringify","VersionIds","Versions","Models","versionGetter","1.15","java15","1.16","java16","1.17","java17","1.18","java18","1.18.2","java182","1.19","java19","CachedDecorator","CachedFeature","CachedCollections","collections","getCollections","blockStates","collectionTarget","blockStateTarget","validateCache","fetchRegistries","fetchBlockStateMap","fetchData","schemas","getSchemas","minVersionId","maxVersionId","findIndex","minVersion","maxVersion","ShareCache","snippet","fetchApi","parse","decompressFromBase64","res","method","headers","Content-Type","errors","scriptRel","seen","__vitePreload","baseModule","deps","relList","document","createElement","supports","dep","isCss","endsWith","cssSelector","querySelector","rel","as","crossOrigin","head","appendChild","rej","then","Store","Store2","getLanguage","getTheme","getVersion","getIndent","getFormat","getHighlighting","getSoundsVersion","getProjects","projects","DRAFT_PROJECT","getBackup","setIndent","indent","setFormat","format","setHighlighting","highlighting","setSoundsVersion","setProjects","setBackup","backups","Locale","createContext","lang","locale","changeLanguage","Locales","fallback","English","params","parseInt","resolveLocaleParams","en","langConfig","languages","__variableDynamicImportRuntime0__","schema","__variableDynamicImportRuntime1__","useContext","useCallback","localize","lang2","loadLocale","Provider","namespace","files","Project","project","changeProject","updateProject","updateFile","openFile","closeFile","projectName","setProjectName","p","fileId","setFileId","f","changeProjects","projects2","edits","newId","exists","some","gen","path","Theme","actualTheme","changeTheme","prefersLight","useMediaQuery","prefersDark","documentElement","setAttribute","theme2","Title","title","changeTitle","context","useLocale","setTitle","title2","titleVersions","Version","changeVersion","targetVersion","version2","store","has","ready","LAYERS","temperature","humidity","continentalness","erosion","weirdness","offset","factor","jaggedness","cacheState","biomeSourceCache","state","options","newState","octaves","FixedBiome","Identifier","biome","shift","scale","numBiomes","biomes","_y","z","node","preset","checkVersion","NetherPreset18","NetherPreset","fetchPreset","biome_source","OverworldPreset18","DataModel","unwrapLists","init","wasm","loadWasm","BiomeIds","BiMap","t0","t1","h0","h1","c0","c1","e0","e1","w0","w1","d0","d1","o","depth","parameters","getOrPut","biome_parameters","Float64Array","Int32Array","sampler","climate_sampler","firstOctave","amplitudes","ids","multi_noise","getA","getBiomes","xFrom","xTo","xStep","yFrom","yTo","yStep","zFrom","zTo","zStep","climate","climate_noise","w","result","noise","config2","clamp","NormalNoise","LegacyRandom","n","n2","sample","minDist","Infinity","minBiome","dist","altitude","create","getBiomeSource","biomeSource","biomeColors","color","VanillaColors","stringToColor","minecraft:badlands","minecraft:badlands_plateau","minecraft:bamboo_jungle","minecraft:bamboo_jungle_hills","minecraft:basalt_deltas","minecraft:beach","minecraft:birch_forest","minecraft:birch_forest_hills","minecraft:cold_ocean","minecraft:crimson_forest","minecraft:dark_forest","minecraft:dark_forest_hills","minecraft:deep_cold_ocean","minecraft:deep_frozen_ocean","minecraft:deep_lukewarm_ocean","minecraft:deep_ocean","minecraft:deep_warm_ocean","minecraft:desert","minecraft:desert_hills","minecraft:desert_lakes","minecraft:end_barrens","minecraft:end_highlands","minecraft:end_midlands","minecraft:eroded_badlands","minecraft:flower_forest","minecraft:forest","minecraft:frozen_ocean","minecraft:frozen_river","minecraft:giant_spruce_taiga","minecraft:old_growth_spruce_taiga","minecraft:giant_spruce_taiga_hills","minecraft:giant_tree_taiga","minecraft:old_growth_pine_taiga","minecraft:giant_tree_taiga_hills","minecraft:gravelly_hills","minecraft:gravelly_mountains","minecraft:windswept_gravelly_hills","minecraft:ice_spikes","minecraft:jungle","minecraft:jungle_edge","minecraft:sparse_jungle","minecraft:jungle_hills","minecraft:lukewarm_ocean","minecraft:modified_badlands_plateau","minecraft:modified_gravelly_mountains","minecraft:modified_jungle","minecraft:modified_jungle_edge","minecraft:modified_wooded_badlands_plateau","minecraft:mountain_edge","minecraft:extreme_hills","minecraft:mountains","minecraft:windswept_hills","minecraft:mushroom_field_shore","minecraft:mushroom_fields","minecraft:nether_wastes","minecraft:ocean","minecraft:plains","minecraft:river","minecraft:savanna","minecraft:savanna_plateau","minecraft:shattered_savanna","minecraft:windswept_savanna","minecraft:shattered_savanna_plateau","minecraft:small_end_islands","minecraft:snowy_beach","minecraft:snowy_mountains","minecraft:snowy_taiga","minecraft:snowy_taiga_hills","minecraft:snowy_taiga_mountains","minecraft:snowy_tundra","minecraft:snowy_plains","minecraft:soul_sand_valley","minecraft:stone_shore","minecraft:stony_shore","minecraft:sunflower_plains","minecraft:swamp","minecraft:swamp_hills","minecraft:taiga","minecraft:taiga_hills","minecraft:taiga_mountains","minecraft:tall_birch_forest","minecraft:old_growth_birch_forest","minecraft:tall_birch_hills","minecraft:the_end","minecraft:the_void","minecraft:warm_ocean","minecraft:warped_forest","minecraft:wooded_badlands_plateau","minecraft:wooded_badlands","minecraft:wooded_hills","minecraft:wooded_mountains","minecraft:windswept_forest","minecraft:snowy_slopes","minecraft:lofty_peaks","minecraft:jagged_peaks","minecraft:snowcapped_peaks","minecraft:frozen_peaks","minecraft:stony_peaks","minecraft:grove","minecraft:meadow","minecraft:lush_caves","minecraft:dripstone_caves","altitude_noise","temperature_noise","humidity_noise","weirdness_noise","terrain","featureColors","placements","features","biomeInfoNoise","PerlinNoise","fork","seaLevel","nextFloat","nextInt","nextGaussian","sqrt","log","cos","PI","base","spread","normalize","min_inclusive","max_inclusive","sampleInt","source","normal","mean","deviation","totalWeight","distribution","reduce","sum","weight","placement","fill","pos","feature","j","anchor","_ctx","absolute","above_bottom","below_top","useFeature","featureFn","Features","decorator2","decoratorFn","Decorators","decorated","getPositions","decorator","getPlacements","random_boolean_selector","feature_true","feature_false","random_selector","chance","simple_random_selector","count","count_extra","extra_chance","extra_count","count_multilayer","count_noise","noise_level","below_noise","above_noise","count_noise_biased","noise_factor","ceil","noise_offset","noise_to_count_ratio","dark_oak_tree","_config","_","outer","flatMap","inner","depth_average","decorateY","baseline","emerald_ore","fire","glowstone","heightmap","heightmap_spread_double","heightmap_world_surface","iceberg","lava_lake","nope","range","maximum","top_offset","bottom_offset","range_biased","range_very_biased","spread_32_above","top_solid_heightmap","magma","surface_relative_threshold","water_lake","positions","modifier","PlacementModifiers","pos2","count_on_every_layer","environment_scan","height_range","resolveAnchor","n1","plateau","sampleHeight","in_square","noise_based_count","noise_threshold_count","random_offset","xz_spread","y_spread","rarity_filter","minLimitPerlinNoise","maxLimitPerlinNoise","mainPerlinNoise","depthNoise","settings","xOffset","chunkWidth","size_horizontal","chunkHeight","size_vertical","chunkCountY","amplified","biomeDepth","biomeScale","noiseColumnCache","cx","ox","noise1","fillNoiseColumn","noise2","yy","oy","d2","cachedColumn","xzScale","sampling","xz_scale","yScale","y_scale","xzFactor","xz_factor","yFactor","y_factor","randomDensity","random_density_offset","getRandomDensity","sampleAndClampNoise","getOctaveNoise","zo","falloff","density_factor","density_offset","top_slide","clampedLerp","bottom_slide","x2","wrap","y22","z2","minLimitNoise","maxLimitNoise","mainNoise","colors","minecraft:air","minecraft:water","minecraft:lava","minecraft:stone","minecraft:deepslate","minecraft:bedrock","minecraft:grass_block","minecraft:dirt","minecraft:gravel","minecraft:sand","minecraft:sandstone","minecraft:netherrack","minecraft:crimson_nylium","minecraft:warped_nylium","minecraft:basalt","minecraft:end_stone","generatorCache","chunkCache","registryCache","initRegistries","NoiseGeneratorSettings","fromJson","NoiseChunkGenerator","deepslate18.FixedBiome","deepslate18.NoiseChunkGenerator","getCached","LevelSlice","minY","generate","generator2","data2","state2","getBlockState","getName","OldNoiseChunkGenerator","reset","row","iterateNoiseColumn","reverse","getColor","XoroshiroRandom","forkPositional","NoiseSettings","min_y","terrain_shaper","originalFn","DensityFunction","mapAll","NoiseRouter","Visitor","createDensityFunction","density","compute","clampedMap","Registries","NoiseParameters","rootRegistries","Registry","root","fetchAllPresets","fetchRegistry","DENSITY_FUNCTION","clear","assign","getOrThrow","NOISE","minX","done","chunks","cached","Chunk","ChunkPos","Z","forcedBiome","chunk","buildSurface","chunkIndex","BiomeSourcePreview","shown","configuredSeed","randomSeed","setScale","focused","setFocused","layers","setLayers","Set","refineTimeout","legacyRandomSource","getOctaves","calculateState","useCanvas","round","oz","col","xRange","zRange","l2","getClimates","worldX","worldZ","getBiomeColor","getBiome","brightness","biomeMap","xx","zz","toWorld","getClimate","changeScale","newScale","BtnMenu","enabled","newSeed","k","toUpperCase","toFixed","DecoratorPreview","setSeed","DensityFunctionPreview","autoScroll","setAutoScroll","scrollInterval","densityFunction","worldY","setInterval","NoisePreview","NoiseSettingsPreview","setBiome","setBiomeScale","setBiomeDepth","noiseSettings","block","minBlockX","maxBlockX","BlockPos","getNoiseBlock","allBiomes","HasPreview","setCount","hook","transformOutput","ModelPath","switchNode","getOwnPropertySymbols","blockState","validation","validator","relativePath","getActiveFields","activeFields","out","INDENT","2_spaces","4_spaces","tabs","minified","FORMATS","yaml","dump","flowLevel","doCopy","doDownload","doImport","copySuccess","onError","retransform","onImport","textarea","editor","getSerializedOutput","model2","blockStates2","getOutput","output","setValue","getValue","wrapLists","braceEditor","brace","edit","setOptions","fontSize","showFoldWidgets","highlightSelectedWord","$blockScrolling","on","getSession","setMode","indent2","format2","setOption","selectAll","configure","clipboard","writeText","click","data-cy","changeIndent","changeFormat","changeHighlighting","spellcheck","autocorrect","onBlur","style","mapper","getter","setter","silent","selectRegistries","hiddenFields","flattenedFields","inlineFields","nbtFields","fixedLists","collapsedFields","collapsableFields","keysModel","MapNode","StringNode","historyMax","prefix","suffix","renderHtml","data-category","boolean","states","BooleanSuffix","choices","choice","activeCase","contextPath","getModel","getArray","choiceContextPath","choiceContext","inject","c2","def","newValue","pathLocale","contextPush","expand","collapse","isToggled","useToggles","maxShown","setMaxShown","maxLength","ErrorPopup","modelPush","cValue","cId","cPath","canToggle","toggle","nested","Collapsed","MemoedTreeNode","actions","splice","disabled","keyPath","keysSchema","enum","last","add","ObjectNode","fromEntries","cSchema","number","NumberSuffix","getChildModelPath","isDecorated","wrapper","fields","originalFields","decorators","iterateNestedDecorators","ListNode","featurePath","decoratorsPath","ModelWrapper","path2","modelArr","equals","newDecorators","feature2","produceNestedDecorators","createDecoratorsWrapper","optional","onExpand","onCollapse","toggled","expanded","newCtx","pools","loot","child","context2","cPrefix","cSuffix","cBody","isFlattened","isInlined","HelpPopup","string","StringSuffix","toggleState","setToggleState","toggleAll","setToggleAll","ctrlKey","integer","parsed","parseFloat","padStart","getValues","isEnum","pool","additional","datalistId","findGenerator","values2","memo","onContextMenu","preventDefault","a","description","navigator","prev","next","hash","withModel","getAll","e2","message2","popupIcon","popup","useErrorBoundary","setState","FullNode","term","useTheme","themeSuffix","themeUrl","location","host","GiscusReact","repoId","categoryId","mapping","reactionsEnabled","emitMetadata","inputPosition","Themes","system","dark","light","useVersion","useTitle","getGenerator","Link","Icons","home","route","th","rx","y","report","sounds","cy","r","clip-rule","sound","delay","pitch","volume","onEdit","onDelete","delayedPlay","loading","setLoading","playing","setPlaying","invalid","setInvalid","howls","command","soundEvent","h2","stop","soundPath","howl","Howl","src","rate","completed","copyActive","setCopyActive","copyTimeout","step","desc","roots","groups","leaves","hidden","setHidden","entries2","TreeViewEntry","TreeView","activeTags","toggleTag","ArticleLink","ChangelogTag","dangerouslySetInnerHTML","__html","marked","changes","defaultOrder","setTags","filteredChangelogs","q2","toLowerCase","sort","setSort","sortedChangelogs","ChangelogEntry","tab","setTab","changelogs","setChangelogs","changelogs2","catch","console","VersionMetaData","releaseDate","release_target","data_version","protocol_version","data_pack_version","resource_pack_version","ChangelogList","Giscus","Date","release_time","toLocaleDateString","day","month","year","compact","snapshots","setSnapshots","filteredVersions","Checkbox","VersionEntry","ToolCard","setError","Ad","ErrorPanel","useProject","errorBoundary","errorRetry","allowedVersions","currentPreset","sharedSnippetId","loadSnippet","snippetGen","show_preview","previewShown","backup","setModel","setBlockStates","versionData","Reference","ChoiceNode","schemaName","validate","err","m","loadPreset","getSnippet","dirty","setDirty","fileRename","setFileRename","fileSaved","doSave","useActiveTimeout","fileError","doFileError","doFileRename","onKeyUp","undo","redo","presets","setPresets","shareUrl","setShareUrl","shareShown","setShareShown","shareCopyActive","shareCopySuccess","copySharedId","sourceShown","setSourceShown","innerWidth","setCopy","setDownload","setImport","setPreviewShown","hasPreview","actionsShown","SearchList","selectVersion","Tree","protocol","jsonData","lz","compressToBase64","raw","btoa","PreviewPanel","SourcePanel","readonly","showTooltip","getFilePath","setSounds","soundKeys","configs","setConfigs","addConfig","deleteConfig","setDelayedPlay","hasDelay","SoundConfig","setVersions","versions2","selectedId","selected","nextVersion","getOffsetVersion","previousVersion","VersionDetail","VersionList","offsetIndex","Header","Router","Home","Category","Sounds","Changelog","Generator","LocaleProvider","ThemeProvider","VersionProvider","TitleProvider","ProjectProvider","App","render","Main"],"mappings":"q2BAAiBA,gBCQEC,KAAEA,KAAMC,cAChB,6BACAC,eAAe,sBAAmBC,SACvC,eAAgBC,mB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AAD,CAAQt7B,KAAK,cACZu7B,GAAD,CAAWv7B,KAAK,iBACfrI,GAAD,CAAUqI,KAAK,gBACdpB,GAAD,CAASoB,KAAK,eACbw7B,GAAD,CAAW1kC,SAAO,MCnBrB,uBACS2kC,GAAD,OACLC,GAAD,OACEC,GAAD,OACEC,GAAD,OACEC,GAAD,OACEC,GAAD,WAQNC,KAAQC,GAAD,MAAUnhC,SAASjO"} \ No newline at end of file +{"version":3,"file":"index.37e720ee.js","sources":["../../src/app/Analytics.ts","../../src/app/components/Ad.tsx","../../src/app/components/Btn.tsx","../../src/app/Utils.ts","../../src/app/components/BtnInput.tsx","../../src/app/hooks/useActiveTimout.ts","../../src/app/hooks/useCanvas.ts","../../src/app/hooks/useFocus.ts","../../src/app/hooks/useMediaQuery.ts","../../src/app/hooks/useModel.ts","../../src/app/components/BtnMenu.tsx","../../src/app/components/Octicon.tsx","../../src/app/components/ErrorPanel.tsx","../../src/app/components/forms/Checkbox.tsx","../../src/app/components/forms/Input.tsx","../../src/app/components/forms/SearchList.tsx","../../src/app/services/Changelogs.ts","../../src/app/services/DataFetcher.ts","../../src/app/services/Schemas.ts","../../src/app/services/Sharing.ts","../../vite/preload-helper","../../src/app/Store.ts","../../src/app/contexts/Locale.tsx","../../src/app/contexts/Project.tsx","../../src/app/contexts/Theme.tsx","../../src/app/contexts/Title.tsx","../../src/app/contexts/Version.tsx","../../src/app/previews/BiomeSource.ts","../../src/app/previews/Decorator.ts","../../src/app/previews/noise/NoiseChunkGenerator.ts","../../src/app/previews/NoiseSettings.ts","../../src/app/components/previews/BiomeSourcePreview.tsx","../../src/app/components/previews/DecoratorPreview.tsx","../../src/app/components/previews/DensityFunctionPreview.tsx","../../src/app/components/previews/NoisePreview.tsx","../../src/app/previews/NormalNoise.ts","../../src/app/components/previews/NoiseSettingsPreview.tsx","../../src/app/components/generator/PreviewPanel.tsx","../../src/app/schema/transformOutput.ts","../../src/app/components/generator/SourcePanel.tsx","../../src/app/schema/ModelWrapper.ts","../../src/app/schema/renderHtml.tsx","../../src/app/components/generator/Tree.tsx","../../src/app/components/Giscus.tsx","../../src/app/components/Header.tsx","../../src/app/components/Icons.tsx","../../src/app/components/sounds/SoundConfig.tsx","../../src/app/components/ToolCard.tsx","../../src/app/components/TreeView.tsx","../../src/app/components/versions/ChangelogEntry.tsx","../../src/app/components/versions/ChangelogTag.tsx","../../src/app/components/versions/ChangelogList.tsx","../../src/app/components/versions/VersionDetail.tsx","../../src/app/components/versions/VersionEntry.tsx","../../src/app/components/versions/VersionList.tsx","../../src/app/components/versions/VersionMetaData.tsx","../../src/app/pages/Category.tsx","../../src/app/pages/Changelog.tsx","../../src/app/pages/Generator.tsx","../../src/app/pages/Home.tsx","../../src/app/pages/Project.tsx","../../src/app/pages/Sounds.tsx","../../src/app/pages/Versions.tsx","../../src/app/App.tsx","../../src/app/Main.tsx"],"sourcesContent":["export namespace Analytics {\n\tconst ID_SITE = 'Site'\n\tconst ID_GENERATOR = 'Generator'\n\n\tconst DIM_THEME = 1\n\tconst DIM_VERSION = 3\n\tconst DIM_LANGUAGE = 4\n\tconst DIM_PREVIEW = 5\n\tconst DIM_GENERATOR = 6\n\tconst DIM_PREFERS_COLOR_SCHEME = 7\n\n\tfunction event(category: string, action: string, label?: string) {\n\t\tga('send', 'event', category, action, label)\n\t}\n\n\tfunction dimension(index: number, value: string) {\n\t\tga('set', `dimension${index}`, value)\n\t}\n\n\texport function pageview(page: string) {\n\t\tga('set', 'page', page)\n\t\tga('send', 'pageview')\n\t}\n\n\texport function setLanguage(language: string) {\n\t\tdimension(DIM_LANGUAGE, language)\n\t\tevent(ID_SITE, 'set-language', language)\n\t}\n\n\texport function setTheme(theme: string) {\n\t\tdimension(DIM_THEME, theme)\n\t\tevent(ID_SITE, 'set-theme', theme)\n\t}\n\n\texport function setVersion(version: string) {\n\t\tdimension(DIM_VERSION, version)\n\t\tevent(ID_GENERATOR, 'set-version', version)\n\t}\n\n\texport function setPreview(preview: string) {\n\t\tdimension(DIM_PREVIEW, preview)\n\t\tevent(ID_GENERATOR, 'set-preview', preview)\n\t}\n\n\texport function setGenerator(generator: string) {\n\t\tdimension(DIM_GENERATOR, generator)\n\t}\n\n\texport function setPrefersColorScheme(colorScheme: string) {\n\t\tdimension(DIM_PREFERS_COLOR_SCHEME, colorScheme)\n\t}\n\n\texport function generatorEvent(action: string, label?: string) {\n\t\tevent(ID_GENERATOR, action, label)\n\t}\n}\n","import { useEffect } from 'preact/hooks'\n\ndeclare const ethicalads: any\n\ntype AdProps = {\n\ttype: 'text' | 'image',\n\tid: string,\n}\nexport function Ad({ type, id }: AdProps) {\n\tuseEffect(() => {\n\t\tdocument.getElementById('ad-placeholder')?.remove()\n\t\tif ('ethicalads' in window) {\n\t\t\tethicalads.load()\n\t\t}\n\t}, [])\n\n\treturn <div data-ea-publisher=\"misode-github-io\" data-ea-type={type} class=\"ad dark flat\" id={id}></div>\n}\n","import { Octicon } from '.'\n\ntype BtnProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tactive?: boolean,\n\ttooltip?: string,\n\ttooltipLoc?: 'se' | 'sw' | 'nw',\n\tshowTooltip?: boolean,\n\tclass?: string,\n\tonClick?: (event: MouseEvent) => unknown,\n}\nexport function Btn({ icon, label, active, class: clazz, tooltip, tooltipLoc, onClick }: BtnProps) {\n\treturn <div class={`btn${active ? ' active' : ''}${clazz ? ` ${clazz}` : ''}${tooltip ? ` tooltipped tip-${tooltipLoc ?? 'sw'}` : ''}${active ? ' tip-shown' : ''}`} onClick={onClick} aria-label={tooltip}>\n\t\t{icon && Octicon[icon]}\n\t\t{label && <span>{label}</span>}\n\t</div>\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport { getCurrentUrl, route } from 'preact-router'\nimport rfdc from 'rfdc'\nimport config from '../config.json'\n\nexport function isPromise(obj: any): obj is Promise<any> {\n\treturn typeof (obj as any)?.then === 'function' \n}\n\nexport function isObject(obj: any) {\n\treturn typeof obj === 'object' && obj !== null\n}\n\nconst dec2hex = (dec: number) => ('0' + dec.toString(16)).substr(-2)\n\nexport function hexId(length = 12) {\n\tvar arr = new Uint8Array(length / 2)\n\twindow.crypto.getRandomValues(arr)\n\treturn Array.from(arr, dec2hex).join('')\n}\n\nexport function randomSeed() {\n\treturn BigInt(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))\n}\n\nexport function newSeed(model: DataModel) {\n\tconst seed = Math.floor(Math.random() * (4294967296)) - 2147483648\n\tconst dimensions = model.get(new Path(['dimensions']))\n\tmodel.set(new Path(['seed']), seed, true)\n\tif (isObject(dimensions)) {\n\t\tObject.keys(dimensions).forEach(id => {\n\t\t\tmodel.set(new Path(['dimensions', id, 'generator', 'seed']), seed, true)\n\t\t\tmodel.set(new Path(['dimensions', id, 'generator', 'biome_source', 'seed']), seed, true)\n\t\t})\n\t}\n\tmodel.set(new Path(['placement', 'salt']), Math.abs(seed), true)\n\tmodel.set(new Path(['generator', 'seed']), seed, true)\n\tmodel.set(new Path(['generator', 'biome_source', 'seed']), seed)\n}\n\nexport function htmlEncode(str: string) {\n\treturn str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')\n\t\t.replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/')\n}\n\nexport function hashString(s: string) {\n\tlet h = 0\n\tfor(let i = 0; i < s.length; i++)\n\t\th = Math.imul(31, h) + s.charCodeAt(i) | 0\n\treturn h\n}\n\nexport function cleanUrl(url: string) {\n\treturn `/${url}/`.replaceAll('//', '/')\n}\n\nexport function getPath(url: string) {\n\tconst searchIndex = url.indexOf('?')\n\tif (searchIndex >= 0) {\n\t\turl = url.slice(0, searchIndex)\n\t}\n\treturn cleanUrl(url)\n}\n\nexport function getGenerator(url: string) {\n\tconst trimmedUrl = getPath(url).replace(/^\\//, '').replace(/\\/$/, '')\n\treturn config.generators.find(g => g.url === trimmedUrl)\n}\n\nexport function getSearchParams(url: string) {\n\tconst searchIndex = url.indexOf('?')\n\tif (searchIndex >= 0) {\n\t\turl = url.slice(searchIndex + 1)\n\t\treturn new Map(url.split('&').map<[string, string]>(param => {\n\t\t\tconst index = param.indexOf('=')\n\t\t\tif (index === -1) return [param, 'true']\n\t\t\treturn [decodeURIComponent(param.slice(0, index)), decodeURIComponent(param.slice(index + 1))]\n\t\t}))\n\t}\n\treturn new Map<string, string>()\n}\n\nexport function setSeachParams(modifications: Record<string, string | undefined>, newPath?: string) {\n\tconst url = getCurrentUrl()\n\tconst searchParams = getSearchParams(url)\n\tObject.entries(modifications).forEach(([key, value]) => {\n\t\tif (value === undefined) searchParams.delete(key)\n\t\telse searchParams.set(key, value)\n\t})\n\tconst search = Array.from(searchParams).map(([key, value]) =>\n\t\t`${encodeURIComponent(key)}=${encodeURIComponent(value).replaceAll('%2F', '/')}`)\n\troute(`${newPath ? cleanUrl(newPath) : getPath(url)}${search.length === 0 ? '' : `?${search.join('&')}`}`, true)\n}\n\nexport function stringToColor(str: string): [number, number, number] {\n\tconst h = Math.abs(hashString(str))\n\treturn [h % 256, (h >> 8) % 256, (h >> 16) % 256]\n}\n\nexport function square(a: number) {\n\treturn a * a\n}\n\nexport function clamp(a: number, b: number, c: number) {\n\treturn Math.max(a, Math.min(b, c))\n}\n\nexport function clampedLerp(a: number, b: number, c: number): number {\n\tif (c < 0) {\n\t\treturn a\n\t} else if (c > 1) {\n\t\treturn b\n\t} else {\n\t\treturn lerp(c, a, b)\n\t}\n}\n\nexport function lerp(a: number, b: number, c: number): number {\n\treturn b + a * (c - b)\n}\n\nexport function lerp2(a: number, b: number, c: number, d: number, e: number, f: number): number {\n\treturn lerp(b, lerp(a, c, d), lerp(a, e, f))\n}\n\nexport function lerp3(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) {\n\treturn lerp(c, lerp2(a, b, d, e, f, g), lerp2(a, b, h, i, j, k))\n}\n\nexport function smoothstep(x: number): number {\n\treturn x * x * x * (x * (x * 6 - 15) + 10)\n}\n\nexport function message(e: unknown): string {\n\tif (e instanceof Error) return e.message\n\treturn `${e}`\n}\n\nexport const deepClone = rfdc()\n\n/**\n * MIT License\n * \n * Copyright (c) 2017 Evgeny Poberezkin\n * \n * https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE\n */\nexport function deepEqual(a: any, b: any) {\n\tif (a === b) return true\n\n\tif (a && b && typeof a == 'object' && typeof b == 'object') {\n\t\tif (a.constructor !== b.constructor) return false\n\t\tlet length, i\n\t\tif (Array.isArray(a)) {\n\t\t\tlength = a.length\n\t\t\tif (length != b.length) return false\n\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\tif (!deepEqual(a[i], b[i])) return false\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\tif (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf()\n\t\tif (a.toString !== Object.prototype.toString) return a.toString() === b.toString()\n\t\tconst keys = Object.keys(a)\n\t\tlength = keys.length\n\t\tif (length !== Object.keys(b).length) return false\n\t\tfor (i = length; i-- !== 0;)\n\t\t\tif (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false\n\t\tfor (i = length; i-- !== 0;) {\n\t\t\tconst key = keys[i]\n\t\t\tif (!deepEqual(a[key], b[key])) return false\n\t\t}\n\t\treturn true\n\t}\n\treturn a !== a && b !== b\n}\n\nexport class BiMap<A, B> {\n\tprivate readonly forward: Map<A, B>\n\tprivate readonly backward: Map<B, A>\n\n\tconstructor() {\n\t\tthis.forward = new Map()\n\t\tthis.backward = new Map()\n\t}\n\n\tpublic set(a: A, b: B) {\n\t\tthis.forward.set(a, b)\n\t\tthis.backward.set(b, a)\n\t}\n\n\tpublic getA(key: B) {\n\t\treturn this.backward.get(key)\n\t}\n\n\tpublic getB(key: A) {\n\t\treturn this.forward.get(key)\n\t}\n\n\tpublic getOrPut(key: A, defaultValue: B) {\n\t\tconst b = this.forward.get(key)\n\t\tif (b === undefined) {\n\t\t\tthis.set(key, defaultValue)\n\t\t\treturn defaultValue\n\t\t}\n\t\treturn b\n\t}\n}\n","import { useEffect, useRef } from 'preact/hooks'\nimport { Octicon } from '.'\nimport { hexId } from '../Utils'\n\ntype BtnInputProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tlarge?: boolean,\n\tlarger?: boolean,\n\tdoSelect?: number,\n\tvalue?: string,\n\tplaceholder?: string,\n\tdataList?: string[],\n\tonChange?: (value: string) => unknown,\n}\nexport function BtnInput({ icon, label, large, larger, doSelect, value, placeholder, dataList, onChange }: BtnInputProps) {\n\tconst onInput = onChange === undefined ? () => {} : (e: any) => {\n\t\tconst value = (e.target as HTMLInputElement).value\n\t\tonChange?.(value)\n\t}\n\n\tconst ref = useRef<HTMLInputElement>(null)\n\tuseEffect(() => {\n\t\tif (doSelect && ref.current) {\n\t\t\tref.current.select()\n\t\t}\n\t}, [doSelect])\n\n\tconst dataListId = dataList && hexId()\n\n\treturn <div class={`btn btn-input ${large ? 'large-input' : ''} ${larger ? 'larger-input' : ''}`} onClick={e => e.stopPropagation()}>\n\t\t{icon && Octicon[icon]}\n\t\t{label && <span>{label}</span>}\n\t\t<input ref={ref} type=\"text\" value={value} onChange={onInput} placeholder={placeholder} list={dataListId} />\n\t\t{dataList && <datalist id={dataListId}>\n\t\t\t{dataList.map(e => <option value={e} />)}\n\t\t</datalist>}\n\t</div>\n}\n","import { useRef, useState } from 'preact/hooks'\n\ninterface ActiveTimeoutOptions {\n\tcooldown?: number,\n\tinvert?: boolean,\n\tinitial?: boolean,\n}\nexport function useActiveTimeout({ cooldown, invert, initial }: ActiveTimeoutOptions = {}): [boolean | undefined, () => unknown] {\n\tconst [active, setActive] = useState(initial)\n\tconst timeout = useRef<number | undefined>(undefined)\n\n\tconst trigger = () => {\n\t\tsetActive(invert ? false : true)\n\t\tif (timeout.current !== undefined) clearTimeout(timeout.current)\n\t\ttimeout.current = setTimeout(() => {\n\t\t\tsetActive(invert ? true : false)\n\t\t}, cooldown ?? 2000) as any\n\t}\n\n\treturn [active, trigger]\n}\n","import type { Inputs } from 'preact/hooks'\nimport { useEffect, useRef } from 'preact/hooks'\n\ntype Vec2 = [number, number]\n\nexport function useCanvas({ size, draw, onDrag, onHover, onLeave }: {\n\tsize: () => Vec2,\n\tdraw: (img: ImageData) => Promise<unknown>,\n\tonDrag?: (dx: number, dy: number) => Promise<unknown>,\n\tonHover?: (x: number, y: number) => unknown,\n\tonLeave?: () => unknown,\n}, inputs?: Inputs) {\n\tconst canvas = useRef<HTMLCanvasElement>(null)\n\n\tconst dragStart = useRef<Vec2 | undefined>()\n\tconst dragRequest = useRef<number>()\n\tconst dragPending = useRef<Vec2>([0, 0])\n\tconst dragBusy = useRef(false)\n\n\tuseEffect(() => {\n\t\tconst onMouseDown = (e: MouseEvent) => {\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\tif (dragStart.current === undefined) {\n\t\t\t\tconst x = e.offsetX / canvas.current.clientWidth\n\t\t\t\tconst y = e.offsetY / canvas.current.clientHeight\n\t\t\t\tonHover?.(x, y)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (!onDrag) return\n\t\t\tconst dx = e.offsetX - dragStart.current[0]\n\t\t\tconst dy = e.offsetY - dragStart.current[1]\n\t\t\tif (!(dx === 0 && dy === 0)) {\n\t\t\t\tdragPending.current = [dragPending.current[0] + dx, dragPending.current[1] + dy]\n\t\t\t\tif (!dragBusy.current) {\n\t\t\t\t\tcancelAnimationFrame(dragRequest.current)\n\t\t\t\t\tdragRequest.current = requestAnimationFrame(async () => {\n\t\t\t\t\t\tdragBusy.current = true\n\t\t\t\t\t\tconst dx = dragPending.current[0] / canvas.current.clientWidth\n\t\t\t\t\t\tconst dy = dragPending.current[1] / canvas.current.clientHeight\n\t\t\t\t\t\tdragPending.current = [0, 0]\n\t\t\t\t\t\tawait onDrag?.(dx, dy)\n\t\t\t\t\t\tdragBusy.current = false\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseUp = () => {\n\t\t\tdragStart.current = undefined\n\t\t}\n\t\tconst onMouseLeave = () => {\n\t\t\tonLeave?.()\n\t\t}\n\n\t\tcanvas.current.addEventListener('mousedown', onMouseDown)\n\t\tcanvas.current.addEventListener('mousemove', onMouseMove)\n\t\tcanvas.current.addEventListener('mouseleave', onMouseLeave)\n\t\tdocument.body.addEventListener('mouseup', onMouseUp)\n\n\t\treturn () => {\n\t\t\tcanvas.current?.removeEventListener('mousedown', onMouseDown)\n\t\t\tcanvas.current?.removeEventListener('mousemove', onMouseMove)\n\t\t\tcanvas.current?.removeEventListener('mouseleave', onMouseLeave)\n\t\t\tdocument.body.removeEventListener('mouseup', onMouseUp)\n\t\t}\n\t}, [...inputs ?? [], canvas.current])\n\n\tconst redraw = useRef<() => Promise<unknown>>()\n\tconst redrawCount = useRef(0)\n\tredraw.current = async () => {\n\t\tconst ctx = canvas.current.getContext('2d')!\n\t\tconst s = size()\n\t\tcanvas.current.width = s[0]\n\t\tcanvas.current.height = s[1]\n\t\tconst img = ctx.getImageData(0, 0, s[0], s[1])\n\t\tconst ownCount = redrawCount.current += 1\n\t\ttry {\n\t\t\tawait draw(img)\n\t\t} catch (e) {\n\t\t\tthrow e\n\t\t}\n\t\tif (ownCount === redrawCount.current) {\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t}\n\t}\n\n\treturn {\n\t\tcanvas,\n\t\tredraw: redraw.current,\n\t}\n}\n","import { useEffect, useState } from 'preact/hooks'\n\nexport function useFocus(): [boolean, () => unknown] {\n\tconst [active, setActive] = useState(false)\n\n\tconst hider = () => {\n\t\tsetActive(false)\n\t}\n\n\tuseEffect(() => {\n\t\tif (active) {\n\t\t\tdocument.body.addEventListener('click', hider)\n\t\t\tdocument.body.addEventListener('contextmenu', hider)\n\t\t}\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('click', hider)\n\t\t\tdocument.body.removeEventListener('contextmenu', hider)\n\t\t}\n\t}, [active])\n\n\treturn [active, () => setActive(true)]\n}\n","import { useEffect, useState } from 'preact/hooks'\n\nexport function useMediaQuery(query: string): boolean {\n\tconst [prefers, setPrefers] = useState(matchMedia(query).matches)\n\n\tconst onChange = (e: MediaQueryListEvent) => {\n\t\tsetPrefers(e.matches)\n\t}\n\n\tuseEffect(() => {\n\t\tconst mediaQuery = matchMedia(query)\n\t\tmediaQuery.addEventListener('change', onChange)\n\t\treturn () => {\n\t\t\tmediaQuery.removeEventListener('change', onChange)\n\t\t}\n\t}, [query])\n\n\treturn prefers\n}\n","import type { DataModel } from '@mcschema/core'\nimport type { Inputs } from 'preact/hooks'\nimport { useEffect } from 'preact/hooks'\n\nexport function useModel(model: DataModel | undefined | null, invalidated: (model: DataModel) => unknown, inputs?: Inputs) {\n\tconst listener = {\n\t\tinvalidated() {\n\t\t\tif (model) {\n\t\t\t\tinvalidated(model)\n\t\t\t}\n\t\t},\n\t}\n\n\tuseEffect(() => {\n\t\tmodel?.addListener(listener)\n\t\treturn () => {\n\t\t\tmodel?.removeListener(listener)\n\t\t}\n\t}, [model, ...inputs ?? []])\n}\n","import type { ComponentChildren } from 'preact'\nimport type { Octicon } from '.'\nimport { Btn } from '.'\nimport { useFocus } from '../hooks'\n\ninterface BtnMenuProps extends JSX.HTMLAttributes<HTMLDivElement> {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\trelative?: boolean,\n\ttooltip?: string,\n\ttooltipLoc?: 'se' | 'sw' | 'nw',\n\tchildren: ComponentChildren,\n}\nexport function BtnMenu(props: BtnMenuProps) {\n\tconst { icon, label, relative, tooltip, tooltipLoc, children } = props\n\tconst [active, setActive] = useFocus()\n\n\treturn <div class={`btn-menu${relative === false ? ' no-relative' : ''}`} {...props}>\n\t\t<Btn {...{icon, label, tooltip, tooltipLoc}} onClick={setActive} />\n\t\t{active && <div class=\"btn-group\">\n\t\t\t{children}\n\t\t</div>}\n\t</div>\n}\n","export const Octicon = {\n\talert: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z\"></path></svg>,\n\tarchive: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1.75 2.5a.25.25 0 00-.25.25v1.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25H1.75zM0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v1.5A1.75 1.75 0 0114.25 6H1.75A1.75 1.75 0 010 4.25v-1.5zM1.75 7a.75.75 0 01.75.75v5.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-5.5a.75.75 0 111.5 0v5.5A1.75 1.75 0 0113.25 15H2.75A1.75 1.75 0 011 13.25v-5.5A.75.75 0 011.75 7zm4.5 1a.75.75 0 000 1.5h3.5a.75.75 0 100-1.5h-3.5z\"></path></svg>,\n\tarrow_left: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z\"></path></svg>,\n\tarrow_right: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z\"></path></svg>,\n\tcheck: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z\"></path></svg>,\n\tchevron_down: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z\"></path></svg>,\n\tchevron_right: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z\"></path></svg>,\n\tchevron_up: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M3.22 9.78a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L8 6.06 4.28 9.78a.75.75 0 01-1.06 0z\"></path></svg>,\n\tclippy: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z\"></path></svg>,\n\tcode: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z\"></path></svg>,\n\tdash: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M2 8a.75.75 0 01.75-.75h10.5a.75.75 0 010 1.5H2.75A.75.75 0 012 8z\"></path></svg>,\n\tdevice_desktop: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z\"></path></svg>,\n\tdot_fill: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8 4a4 4 0 100 8 4 4 0 000-8z\"></path></svg>,\n\tdownload: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z\"></path></svg>,\n\tduplicate: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path d=\"M10.5 3a.75.75 0 01.75.75v1h1a.75.75 0 010 1.5h-1v1a.75.75 0 01-1.5 0v-1h-1a.75.75 0 010-1.5h1v-1A.75.75 0 0110.5 3z\"></path><path fill-rule=\"evenodd\" d=\"M6.75 0A1.75 1.75 0 005 1.75v7.5c0 .966.784 1.75 1.75 1.75h7.5A1.75 1.75 0 0016 9.25v-7.5A1.75 1.75 0 0014.25 0h-7.5zM6.5 1.75a.25.25 0 01.25-.25h7.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5z\"></path><path d=\"M1.75 5A1.75 1.75 0 000 6.75v7.5C0 15.216.784 16 1.75 16h7.5A1.75 1.75 0 0011 14.25v-1.5a.75.75 0 00-1.5 0v1.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25h1.5a.75.75 0 000-1.5h-1.5z\"></path></svg>,\n\teye: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z\"></path></svg>,\n\teye_closed: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M.143 2.31a.75.75 0 011.047-.167l14.5 10.5a.75.75 0 11-.88 1.214l-2.248-1.628C11.346 13.19 9.792 14 8 14c-1.981 0-3.67-.992-4.933-2.078C1.797 10.832.88 9.577.43 8.9a1.618 1.618 0 010-1.797c.353-.533.995-1.42 1.868-2.305L.31 3.357A.75.75 0 01.143 2.31zm3.386 3.378a14.21 14.21 0 00-1.85 2.244.12.12 0 00-.022.068c0 .021.006.045.022.068.412.621 1.242 1.75 2.366 2.717C5.175 11.758 6.527 12.5 8 12.5c1.195 0 2.31-.488 3.29-1.191L9.063 9.695A2 2 0 016.058 7.52l-2.53-1.832zM8 3.5c-.516 0-1.017.09-1.499.251a.75.75 0 11-.473-1.423A6.23 6.23 0 018 2c1.981 0 3.67.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.619 1.619 0 010 1.798c-.11.166-.248.365-.41.587a.75.75 0 11-1.21-.887c.148-.201.272-.382.371-.53a.119.119 0 000-.137c-.412-.621-1.242-1.75-2.366-2.717C10.825 4.242 9.473 3.5 8 3.5z\"></path></svg>,\n\tfile: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z\"></path></svg>,\n\tfile_directory: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3h-6.5a.25.25 0 01-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z\"></path></svg>,\n\tgear: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M7.429 1.525a6.593 6.593 0 011.142 0c.036.003.108.036.137.146l.289 1.105c.147.56.55.967.997 1.189.174.086.341.183.501.29.417.278.97.423 1.53.27l1.102-.303c.11-.03.175.016.195.046.219.31.41.641.573.989.014.031.022.11-.059.19l-.815.806c-.411.406-.562.957-.53 1.456a4.588 4.588 0 010 .582c-.032.499.119 1.05.53 1.456l.815.806c.08.08.073.159.059.19a6.494 6.494 0 01-.573.99c-.02.029-.086.074-.195.045l-1.103-.303c-.559-.153-1.112-.008-1.529.27-.16.107-.327.204-.5.29-.449.222-.851.628-.998 1.189l-.289 1.105c-.029.11-.101.143-.137.146a6.613 6.613 0 01-1.142 0c-.036-.003-.108-.037-.137-.146l-.289-1.105c-.147-.56-.55-.967-.997-1.189a4.502 4.502 0 01-.501-.29c-.417-.278-.97-.423-1.53-.27l-1.102.303c-.11.03-.175-.016-.195-.046a6.492 6.492 0 01-.573-.989c-.014-.031-.022-.11.059-.19l.815-.806c.411-.406.562-.957.53-1.456a4.587 4.587 0 010-.582c.032-.499-.119-1.05-.53-1.456l-.815-.806c-.08-.08-.073-.159-.059-.19a6.44 6.44 0 01.573-.99c.02-.029.086-.075.195-.045l1.103.303c.559.153 1.112.008 1.529-.27.16-.107.327-.204.5-.29.449-.222.851-.628.998-1.189l.289-1.105c.029-.11.101-.143.137-.146zM8 0c-.236 0-.47.01-.701.03-.743.065-1.29.615-1.458 1.261l-.29 1.106c-.017.066-.078.158-.211.224a5.994 5.994 0 00-.668.386c-.123.082-.233.09-.3.071L3.27 2.776c-.644-.177-1.392.02-1.82.63a7.977 7.977 0 00-.704 1.217c-.315.675-.111 1.422.363 1.891l.815.806c.05.048.098.147.088.294a6.084 6.084 0 000 .772c.01.147-.038.246-.088.294l-.815.806c-.474.469-.678 1.216-.363 1.891.2.428.436.835.704 1.218.428.609 1.176.806 1.82.63l1.103-.303c.066-.019.176-.011.299.071.213.143.436.272.668.386.133.066.194.158.212.224l.289 1.106c.169.646.715 1.196 1.458 1.26a8.094 8.094 0 001.402 0c.743-.064 1.29-.614 1.458-1.26l.29-1.106c.017-.066.078-.158.211-.224a5.98 5.98 0 00.668-.386c.123-.082.233-.09.3-.071l1.102.302c.644.177 1.392-.02 1.82-.63.268-.382.505-.789.704-1.217.315-.675.111-1.422-.364-1.891l-.814-.806c-.05-.048-.098-.147-.088-.294a6.1 6.1 0 000-.772c-.01-.147.039-.246.088-.294l.814-.806c.475-.469.679-1.216.364-1.891a7.992 7.992 0 00-.704-1.218c-.428-.609-1.176-.806-1.82-.63l-1.103.303c-.066.019-.176.011-.299-.071a5.991 5.991 0 00-.668-.386c-.133-.066-.194-.158-.212-.224L10.16 1.29C9.99.645 9.444.095 8.701.031A8.094 8.094 0 008 0zm1.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM11 8a3 3 0 11-6 0 3 3 0 016 0z\"></path></svg>,\n\tglobe: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z\"></path></svg>,\n\thistory: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z\"></path></svg>,\n\tinfo: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z\"></path></svg>,\n\tissue_opened: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z\"></path></svg>,\n\tkebab_horizontal: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path d=\"M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z\"></path></svg>,\n\tlink: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\"></path></svg>,\n\tlink_external: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z\"></path></svg>,\n\tmark_github: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z\"></path></svg>,\n\tmoon: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z\"></path></svg>,\n\tplay: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z\"></path></svg>,\n\tplus: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z\"></path></svg>,\n\tplus_circle: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.75 4.75a.75.75 0 00-1.5 0v2.5h-2.5a.75.75 0 000 1.5h2.5v2.5a.75.75 0 001.5 0v-2.5h2.5a.75.75 0 000-1.5h-2.5v-2.5z\"></path></svg>,\n\trepo: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z\"></path></svg>,\n\tsearch: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z\"></path></svg>,\n\tsort_asc: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M0 4.25a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75zm12.927-9.677a.25.25 0 00-.354 0l-3 3A.25.25 0 009.75 6H12v6.75a.75.75 0 001.5 0V6h2.25a.25.25 0 00.177-.427l-3-3z\"></path></svg>,\n\tsort_desc: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M0 4.25a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75z\"></path><path d=\"M13.5 10h2.25a.25.25 0 01.177.427l-3 3a.25.25 0 01-.354 0l-3-3A.25.25 0 019.75 10H12V3.75a.75.75 0 011.5 0V10z\"></path></svg>,\n\tsquare: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M4 5.75C4 4.784 4.784 4 5.75 4h4.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0110.25 12h-4.5A1.75 1.75 0 014 10.25v-4.5zm1.75-.25a.25.25 0 00-.25.25v4.5c0 .138.112.25.25.25h4.5a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-4.5z\"></path></svg>,\n\tsquare_fill: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M5.75 4A1.75 1.75 0 004 5.75v4.5c0 .966.784 1.75 1.75 1.75h4.5A1.75 1.75 0 0012 10.25v-4.5A1.75 1.75 0 0010.25 4h-4.5z\"></path></svg>,\n\tstack: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M7.122.392a1.75 1.75 0 011.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 01-1.756 0L2.119 5.456a1.25 1.25 0 010-2.162L7.122.392zM8.125 1.69a.25.25 0 00-.25 0l-4.63 2.685 4.63 2.685a.25.25 0 00.25 0l4.63-2.685-4.63-2.685zM1.601 7.789a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0L1.874 8.814A.75.75 0 011.6 7.789zm0 3.5a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0l-5.248-3.044a.75.75 0 01-.273-1.025z\"></path></svg>,\n\tsun: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8 10.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zM8 12a4 4 0 100-8 4 4 0 000 8zM8 0a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0V.75A.75.75 0 018 0zm0 13a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 018 13zM2.343 2.343a.75.75 0 011.061 0l1.06 1.061a.75.75 0 01-1.06 1.06l-1.06-1.06a.75.75 0 010-1.06zm9.193 9.193a.75.75 0 011.06 0l1.061 1.06a.75.75 0 01-1.06 1.061l-1.061-1.06a.75.75 0 010-1.061zM16 8a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0116 8zM3 8a.75.75 0 01-.75.75H.75a.75.75 0 010-1.5h1.5A.75.75 0 013 8zm10.657-5.657a.75.75 0 010 1.061l-1.061 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm-9.193 9.193a.75.75 0 010 1.06l-1.06 1.061a.75.75 0 11-1.061-1.06l1.06-1.061a.75.75 0 011.061 0z\"></path></svg>,\n\tsync: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8 2.5a5.487 5.487 0 00-4.131 1.869l1.204 1.204A.25.25 0 014.896 6H1.25A.25.25 0 011 5.75V2.104a.25.25 0 01.427-.177l1.38 1.38A7.001 7.001 0 0114.95 7.16a.75.75 0 11-1.49.178A5.501 5.501 0 008 2.5zM1.705 8.005a.75.75 0 01.834.656 5.501 5.501 0 009.592 2.97l-1.204-1.204a.25.25 0 01.177-.427h3.646a.25.25 0 01.25.25v3.646a.25.25 0 01-.427.177l-1.38-1.38A7.001 7.001 0 011.05 8.84a.75.75 0 01.656-.834z\"></path></svg>,\n\ttag: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z\"></path></svg>,\n\tterminal: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75zm1.75-.25a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V2.75a.25.25 0 00-.25-.25H1.75zM7.25 8a.75.75 0 01-.22.53l-2.25 2.25a.75.75 0 11-1.06-1.06L5.44 8 3.72 6.28a.75.75 0 111.06-1.06l2.25 2.25c.141.14.22.331.22.53zm1.5 1.5a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z\"></path></svg>,\n\tthree_bars: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z\"></path></svg>,\n\ttrashcan: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z\"></path></svg>,\n\tunfold: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path d=\"M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z\"></path></svg>,\n\tupload: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M8.53 1.22a.75.75 0 00-1.06 0L3.72 4.97a.75.75 0 001.06 1.06l2.47-2.47v6.69a.75.75 0 001.5 0V3.56l2.47 2.47a.75.75 0 101.06-1.06L8.53 1.22zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z\"></path></svg>,\n\tx: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z\"></path></svg>,\n\tx_circle: <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M3.404 12.596a6.5 6.5 0 119.192-9.192 6.5 6.5 0 01-9.192 9.192zM2.344 2.343a8 8 0 1011.313 11.314A8 8 0 002.343 2.343zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z\"></path></svg>,\n}\n","import { useEffect, useMemo, useState } from 'preact/hooks'\nimport { mapStackTrace } from 'sourcemapped-stacktrace'\nimport { Octicon } from './Octicon'\n\ntype ErrorPanelProps = {\n\terror: string | Error,\n\tonDismiss?: () => unknown,\n}\nexport function ErrorPanel({ error, onDismiss }: ErrorPanelProps) {\n\tconst [stackVisible, setStackVisible] = useState(false)\n\tconst [stack, setStack] = useState<string | undefined>(undefined)\n\n\tuseEffect(() => {\n\t\tif (error instanceof Error) {\n\t\t\tconst stack = error.stack!.split('\\n').map(line => {\n\t\t\t\treturn line.replace(/^(\\s+)at (?:async )?(https?:.*)/, '$1at ($2)')\n\t\t\t})\n\t\t\tsetStack(stack.join('\\n'))\n\t\t\tmapStackTrace(stack.join('\\n'), (mapped) => {\n\t\t\t\tconst mappedStack = mapped.map(line => {\n\t\t\t\t\treturn line.replace(/..\\/..\\/src\\//, 'src/')\n\t\t\t\t}).join('\\n')\n\t\t\t\tsetStack(mappedStack)\n\t\t\t})\n\t\t}\n\t}, [error])\n\n\tconst url = useMemo(() => {\n\t\tlet url ='https://github.com/misode/misode.github.io/issues/new'\n\t\tif (error instanceof Error) {\n\t\t\turl += `?title=${encodeURIComponent(`${error.name}: ${error.message}`)}`\n\t\t\tif (stack) {\n\t\t\t\turl += `&body=${encodeURIComponent(`\\`\\`\\`\\n${error.name}: ${error.message}\\n${stack}\\n\\`\\`\\`\\n`)}`\n\t\t\t}\n\t\t} else {\n\t\t\turl += `?title=${encodeURIComponent(error.toString())}`\n\t\t}\n\t\treturn url\n\t}, [error, stack])\n\n\treturn <div class=\"error\">\n\t\t{onDismiss && <div class=\"error-dismiss\" onClick={onDismiss}>{Octicon.x}</div>}\n\t\t<h3>\n\t\t\t{error instanceof Error ? error.message : error}\n\t\t\t{stack && <span onClick={() => setStackVisible(!stackVisible)}>\n\t\t\t\t{Octicon.info}\n\t\t\t</span>}\n\t\t</h3>\n\t\t{stack && stackVisible && <pre>{stack}</pre>}\n\t\t<p>If you think this is a bug, you can report it <a href={url} target=\"_blank\">on GitHub</a></p>\n\t</div>\n}\n","import { hexId } from '../../Utils'\n\ninterface Props {\n\tlabel: string,\n\tvalue: boolean,\n\tonChange: (value: boolean) => unknown,\n}\nexport function Checkbox({ label, value, onChange }: Props) {\n\tconst id = hexId()\n\treturn <label class=\"checkbox\">\n\t\t<input id={id} type=\"checkbox\" checked={value} onClick={() => onChange(!value)} />\n\t\t{label}\n\t</label>\n}\n","import type { JSXInternal } from 'preact/src/jsx'\n\ntype InputProps = JSXInternal.HTMLAttributes<HTMLInputElement>\n\ntype BaseInputProps<T> = Omit<InputProps, 'onChange' | 'type'> & {\n\tonChange?: (value: T) => unknown,\n\tonEnter?: (value: T) => unknown,\n}\nfunction BaseInput<T>(name: string, type: string, fn: (value: string) => T) {\n\tconst component = (props: BaseInputProps<T>) => {\n\t\tconst onChange = props.onChange && ((evt: Event) => {\n\t\t\tconst value = (evt.target as HTMLInputElement).value\n\t\t\tprops.onChange?.(fn(value))\n\t\t})\n\t\tconst onKeyDown = props.onEnter && ((evt: KeyboardEvent) => {\n\t\t\tif (evt.key === 'Enter') {\n\t\t\t\tconst value = (evt.target as HTMLInputElement).value\n\t\t\t\tprops.onEnter?.(fn(value))\n\t\t\t}\n\t\t})\n\t\treturn <input {...props} {...{ type, onChange, onKeyDown }} />\n\t}\n\tcomponent.displayName = name\n\treturn component\n}\n\nexport const TextInput = BaseInput('TextInput', 'text', v => v)\n\nexport const NumberInput = BaseInput('NumberInput', 'number', v => Number(v))\n\nexport const RangeInput = BaseInput('RangeInput', 'range', v => Number(v))\n","import { useMemo, useState } from 'preact/hooks'\nimport { Btn, BtnInput } from '..'\n\ninterface Props {\n\tvalues?: string[],\n\tonSelect?: (value: string) => unknown,\n\tsearchPlaceholder?: string,\n\tnoResults?: string,\n}\nexport function SearchList({ values, onSelect, searchPlaceholder, noResults }: Props) {\n\tconst [search, setSearch] = useState('')\n\tconst results = useMemo(() => {\n\t\tconst terms = search.trim().split(' ')\n\t\treturn values?.filter(v => terms.every(t => v.includes(t))) ?? []\n\t}, [values, search])\n\n\treturn <>\n\t\t<BtnInput icon=\"search\" large value={search} onChange={setSearch} doSelect={1} placeholder={searchPlaceholder ?? 'Search'} />\n\t\t<div class=\"result-list\">\n\t\t\t{results.map(v => <Btn key={v} label={v} onClick={() => onSelect?.(v)} />)}\n\t\t\t{results.length === 0 && <Btn label={noResults ?? 'No results'}/>}\n\t\t</div>\n\t</>\n}\n","import { isObject } from '../Utils'\n\nconst repo = 'https://raw.githubusercontent.com/misode/technical-changes/main'\n\nexport type Change = {\n\tgroup: ChangelogVersion,\n\tversion: ChangelogVersion,\n\torder: number,\n\ttags: string[],\n\tcontent: string,\n}\n\nexport type ChangelogVersion = {\n\tid: string,\n\tarticle: string | null,\n}\n\nlet Changelogs: Change[] | Promise<Change[]> | null = null\n\nexport async function getChangelogs() {\n\tif (!Changelogs) {\n\t\tconst index = await (await fetch(`${repo}/index.json`)).json() as string[]\n\t\tChangelogs = (await Promise.all(\n\t\t\tindex.map((group, i) => fetchGroup(parseVersion(group), i))\n\t\t)).flat().map<Change>(change => ({\n\t\t\t...change,\n\t\t\ttags: [change.group.id, ...change.tags],\n\t\t}))\n\t}\n\treturn Changelogs\n}\n\nasync function fetchGroup(group: ChangelogVersion, groupIndex: number) {\n\tconst index = await (await fetch(`${repo}/${group.id}/index.json`)).json() as string[]\n\treturn (await Promise.all(\n\t\tindex.map((version, i) => fetchChangelog(group, parseVersion(version), groupIndex, i))\n\t)).flat()\n}\n\nasync function fetchChangelog(group: ChangelogVersion, version: ChangelogVersion, groupIndex: number, versionIndex: number) {\n\tconst text = await (await fetch(`${repo}/${group.id}/${version.id}.md`)).text()\n\treturn parseChangelog(text).map(change => ({\n\t\tversion,\n\t\tgroup,\n\t\torder: groupIndex * 1000 + versionIndex,\n\t\t...change,\n\t}))\n}\n\nfunction parseChangelog(text: string) {\n\treturn text.split('\\n\\n')\n\t\t.map(entry => {\n\t\t\tconst i = entry.indexOf('|')\n\t\t\treturn {\n\t\t\t\ttags: entry.substring(0, i).trim().split(' '),\n\t\t\t\tcontent: entry.slice(i + 1).trim()\n\t\t\t\t\t.replaceAll('->', '→')\n\t\t\t\t\t.replaceAll('\\n...\\n', '\\n\\n'),\n\t\t\t}\n\t\t})\n}\n\nfunction parseVersion(version: unknown): ChangelogVersion {\n\tif (typeof version === 'string') {\n\t\treturn {\n\t\t\tid: version,\n\t\t\tarticle: version.match(/\\d\\dw\\d\\d[a-z]/) ? 'minecraft-snapshot-' + version : version.match(/\\d+\\.\\d+(\\.\\d+)?-pre[0-9]+/) ? 'minecraft-' + version.replaceAll('.', '-').replaceAll('pre', 'pre-release-') : null,\n\t\t}\n\t} else if (isObject(version)) {\n\t\treturn version as ChangelogVersion\n\t}\n\treturn { id: 'unknown', article: null }\n}\n","import type { CollectionRegistry } from '@mcschema/core';\nimport config from '../../config.json';\nimport { message } from '../Utils';\nimport type { BlockStateRegistry, VersionId } from './Schemas';\n\n// Cleanup old caches\n['1.15', '1.16', '1.17'].forEach(v => localStorage.removeItem(`cache_${v}`));\n['mcdata_master', 'vanilla_datapack_summary'].forEach(v => localStorage.removeItem(`cached_${v}`))\ncaches.delete('misode-v1')\n\nconst CACHE_NAME = 'misode-v2'\nconst CACHE_LATEST_VERSION = 'cached_latest_version'\n\ntype Version = {\n\tid: string,\n\tref?: string,\n\tdynamic?: boolean,\n}\n\ndeclare var __LATEST_VERSION__: string\nconst latestVersion = __LATEST_VERSION__ ?? ''\nconst mcmetaUrl = 'https://raw.githubusercontent.com/misode/mcmeta'\n\ntype McmetaTypes = 'summary' | 'data' | 'assets' | 'registries'\n\nfunction mcmeta(version: { dynamic: true } | { dynamic?: false, ref?: string}, type: McmetaTypes) {\n\treturn `${mcmetaUrl}/${version.dynamic ? type : `${version.ref}-${type}`}`\n}\n\nasync function validateCache(version: Version) {\n\tif (version.dynamic) {\n\t\tif (localStorage.getItem(CACHE_LATEST_VERSION) !== latestVersion) {\n\t\t\tawait deleteMatching(url => url.startsWith(`${mcmetaUrl}/summary/`) || url.startsWith(`${mcmetaUrl}/data/`) || url.startsWith(`${mcmetaUrl}/assets/`) || url.startsWith(`${mcmetaUrl}/registries/`))\n\t\t\tlocalStorage.setItem(CACHE_LATEST_VERSION, latestVersion)\n\t\t}\n\t\tversion.ref = latestVersion\n\t}\n}\n\nexport async function fetchData(versionId: string, collectionTarget: CollectionRegistry, blockStateTarget: BlockStateRegistry) {\n\tconst version = config.versions.find(v => v.id === versionId) as Version | undefined\n\tif (!version) {\n\t\tconsole.error(`[fetchData] Unknown version ${version} in ${JSON.stringify(config.versions)}`)\n\t\treturn\n\t}\n\n\tawait validateCache(version)\n\n\tawait Promise.all([\n\t\tfetchRegistries(version, collectionTarget),\n\t\tfetchBlockStateMap(version, blockStateTarget),\n\t])\n}\n\nasync function fetchRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchRegistries] ${version.id}`)\n\ttry {\n\t\tconst data = await getData(`${mcmeta(version, 'summary')}/registries/data.min.json`)\n\t\tfor (const id in data) {\n\t\t\ttarget.register(id, data[id].map((e: string) => 'minecraft:' + e))\n\t\t}\n\t} catch (e) {\n\t\tconsole.warn('Error occurred while fetching registries:', message(e))\n\t}\n}\n\nasync function fetchBlockStateMap(version: Version, target: BlockStateRegistry) {\n\tconsole.debug(`[fetchBlockStateMap] ${version.id}`)\n\ttry {\n\t\tconst data = await getData(`${mcmeta(version, 'summary')}/blocks/data.min.json`)\n\t\tfor (const id in data) {\n\t\t\ttarget['minecraft:' + id] = {\n\t\t\t\tproperties: data[id][0],\n\t\t\t\tdefault: data[id][1],\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.warn('Error occurred while fetching block state map:', message(e))\n\t}\n}\n\nexport async function fetchPreset(versionId: VersionId, registry: string, id: string) {\n\tconsole.debug(`[fetchPreset] ${versionId} ${registry} ${id}`)\n\tconst version = config.versions.find(v => v.id === versionId)!\n\ttry {\n\t\tconst type = ['blockstates', 'models'].includes(registry) ? 'assets' : 'data'\n\t\tconst url = `${mcmeta(version, type)}/${type}/minecraft/${registry}/${id}.json`\n\t\tconst res = await fetch(url)\n\t\treturn res.json()\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching ${registry} preset ${id}: ${message(e)}`)\n\t}\n}\n\nexport async function fetchAllPresets(versionId: VersionId, registry: string) {\n\tconsole.debug(`[fetchAllPresets] ${versionId} ${registry}`)\n\tconst version = config.versions.find(v => v.id === versionId)!\n\tawait validateCache(version)\n\ttry {\n\t\tconst entries = await getData(`${mcmeta(version, 'registries')}/${registry}/data.min.json`)\n\t\treturn new Map<string, unknown>(await Promise.all(\n\t\t\tentries.map(async (e: string) =>\n\t\t\t\t[e, await getData(`${mcmeta(version, 'data')}/data/minecraft/${registry}/${e}.json`)])\n\t\t))\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching all ${registry} presets: ${message(e)}`)\n\t}\n}\n\nexport type SoundEvents = {\n\t[key: string]: {\n\t\tsounds: (string | { name: string })[],\n\t},\n}\nexport async function fetchSounds(versionId: VersionId): Promise<SoundEvents> {\n\tconst version = config.versions.find(v => v.id === versionId)!\n\tawait validateCache(version)\n\ttry {\n\t\tconst url = `${mcmeta(version, 'summary')}/sounds/data.min.json`\n\t\treturn await getData(url)\n\t} catch (e) {\n\t\tthrow new Error(`Error occurred while fetching sounds for ${version}: ${message(e)}`)\n\t}\n}\n\nexport function getSoundUrl(versionId: VersionId, path: string) {\n\tconst version = config.versions.find(v => v.id === versionId)!\n\treturn `${mcmeta(version, 'assets')}/assets/minecraft/sounds/${path}.ogg`\n}\n\nexport type VersionMeta = {\n\tid: string,\n\tname: string,\n\trelease_target: string,\n\ttype: 'snapshot' | 'release',\n\tstable: boolean,\n\tdata_version: number,\n\tprotocol_version: number,\n\tdata_pack_version: number,\n\tresource_pack_version: number,\n\tbuild_time: string,\n\trelease_time: string,\n\tsha1: string,\n}\nexport async function fetchVersions(): Promise<VersionMeta[]> {\n\tconst version = config.versions[config.versions.length - 1]\n\tawait validateCache(version)\n\ttry {\n\t\treturn getData(`${mcmeta(version, 'summary')}/versions/data.min.json`)\n\t} catch (e) {\n\t\tthrow new Error(`Error occured while fetching versions: ${message(e)}`)\n\t}\n}\n\nasync function getData<T = any>(url: string, fn: (v: any) => T = (v: any) => v): Promise<T> {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[getData] Opened cache ${CACHE_NAME} ${url}`)\n\t\tconst cacheResponse = await cache.match(url)\n \n\t\tif (cacheResponse && cacheResponse.ok) {\n\t\t\tconsole.debug(`[getData] Retrieving cached data ${url}`)\n\t\t\treturn await cacheResponse.json()\n\t\t}\n \n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\tawait cache.put(url, new Response(JSON.stringify(responseData)))\n\t\treturn responseData\n\t} catch (e) {\n\t\tconsole.warn(`[getData] Failed to open cache ${CACHE_NAME}: ${message(e)}`)\n\n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\treturn responseData\n\t}\n}\n\nasync function deleteMatching(matches: (url: string) => boolean) {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[deleteMatching] Opened cache ${CACHE_NAME}`)\n\t\tconst promises: Promise<boolean>[] = []\n \n\t\tfor (const request of await cache.keys()) {\n\t\t\tif (matches(request.url)) {\n\t\t\t\tpromises.push(cache.delete(request))\n\t\t\t}\n\t\t}\n\t\tconsole.debug(`[deleteMatching] Removing ${promises.length} cache objects...`)\n\t\tawait Promise.all(promises)\n\t} catch (e) {\n\t\tconsole.warn(`[deleteMatching] Failed to open cache ${CACHE_NAME}: ${message(e)}`)\n\t}\n}\n","import type { CollectionRegistry, INode, SchemaRegistry } from '@mcschema/core'\nimport { ChoiceNode, DataModel, Reference, StringNode } from '@mcschema/core'\nimport * as java15 from '@mcschema/java-1.15'\nimport * as java16 from '@mcschema/java-1.16'\nimport * as java17 from '@mcschema/java-1.17'\nimport * as java18 from '@mcschema/java-1.18'\nimport * as java182 from '@mcschema/java-1.18.2'\nimport * as java19 from '@mcschema/java-1.19'\nimport config from '../../config.json'\nimport { message } from '../Utils'\nimport { fetchData } from './DataFetcher'\n\nexport const VersionIds = ['1.15', '1.16', '1.17', '1.18', '1.18.2', '1.19'] as const\nexport type VersionId = typeof VersionIds[number]\n\nexport type BlockStateRegistry = {\n\t[block: string]: {\n\t\tproperties?: {\n\t\t\t[key: string]: string[],\n\t\t},\n\t\tdefault?: {\n\t\t\t[key: string]: string,\n\t\t},\n\t},\n}\n\ntype VersionData = {\n\tcollections: CollectionRegistry,\n\tschemas: SchemaRegistry,\n\tblockStates: BlockStateRegistry,\n}\nconst Versions: Record<string, VersionData | Promise<VersionData>> = {}\n\ntype ModelData = {\n\tmodel: DataModel,\n\tversion: VersionId,\n}\nconst Models: Record<string, ModelData> = {}\n\nconst versionGetter: {\n\t[versionId in VersionId]: {\n\t\tgetCollections: () => CollectionRegistry,\n\t\tgetSchemas: (collections: CollectionRegistry) => SchemaRegistry,\n\t}\n} = {\n\t1.15: java15,\n\t1.16: java16,\n\t1.17: java17,\n\t1.18: java18,\n\t'1.18.2': java182,\n\t1.19: java19,\n}\n\nexport let CachedDecorator: INode<any>\nexport let CachedFeature: INode<any>\nexport let CachedCollections: CollectionRegistry\n\nasync function getVersion(id: VersionId): Promise<VersionData> {\n\tif (!Versions[id]) {\n\t\tVersions[id] = (async () => {\n\t\t\ttry {\n\t\t\t\tconst collections = versionGetter[id].getCollections()\n\t\t\t\tconst blockStates: BlockStateRegistry = {}\n\t\t\t\tawait fetchData(id, collections, blockStates)\n\t\t\t\tconst schemas = versionGetter[id].getSchemas(collections)\n\t\t\t\tVersions[id] = { collections, schemas, blockStates }\n\t\t\t\treturn Versions[id]\n\t\t\t} catch (e) {\n\t\t\t\tthrow new Error(`Cannot get version \"${id}\": ${message(e)}`)\n\t\t\t}\n\t\t})()\n\t\treturn Versions[id]\n\t}\n\treturn Versions[id]\n}\n\nexport async function getModel(version: VersionId, id: string): Promise<DataModel> {\n\tif (!Models[id] || Models[id].version !== version) {\n\t\tconst versionData = await getVersion(version)\n\t\t\n\t\tCachedDecorator = Reference(versionData.schemas, 'configured_decorator')\n\t\tCachedFeature = ChoiceNode([\n\t\t\t{\n\t\t\t\ttype: 'string',\n\t\t\t\tnode: StringNode(versionData.collections, { validator: 'resource', params: { pool: '$worldgen/configured_feature' } }),\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'object',\n\t\t\t\tnode: Reference(versionData.schemas, 'configured_feature'),\n\t\t\t},\n\t\t], { choiceContext: 'feature' })\n\n\t\tconst schemaName = config.generators.find(g => g.id === id)?.schema\n\t\tif (!schemaName) {\n\t\t\tthrow new Error(`Cannot find model ${id}`)\n\t\t}\n\t\ttry {\n\t\t\tconst schema = versionData.schemas.get(schemaName)\n\t\t\tconst model = new DataModel(schema, { wrapLists: true })\n\t\t\tif (Models[id]) {\n\t\t\t\tmodel.reset(Models[id].model.data, false)\n\t\t\t} else {\n\t\t\t\tmodel.validate(true)\n\t\t\t\tmodel.history = [JSON.stringify(model.data)]\n\t\t\t}\n\t\t\tModels[id] = { model, version }\n\t\t} catch (e) {\n\t\t\tconst err = new Error(`Cannot get generator \"${id}\" for version \"${version}\": ${message(e)}`)\n\t\t\tif (e instanceof Error) err.stack = e.stack\n\t\t\tthrow err\n\t\t}\n\t}\n\treturn Models[id].model\n}\n\nexport async function getCollections(version: VersionId): Promise<CollectionRegistry> {\n\tconst versionData = await getVersion(version)\n\tCachedCollections = versionData.collections\n\treturn versionData.collections\n}\n\nexport async function getBlockStates(version: VersionId): Promise<BlockStateRegistry> {\n\tconst versionData = await getVersion(version)\n\treturn versionData.blockStates\n}\n\nexport function checkVersion(versionId: string, minVersionId: string | undefined, maxVersionId?: string) {\n\tconst version = config.versions.findIndex(v => v.id === versionId)\n\tconst minVersion = minVersionId ? config.versions.findIndex(v => v.id === minVersionId) : 0\n\tconst maxVersion = maxVersionId ? config.versions.findIndex(v => v.id === maxVersionId) : config.versions.length - 1\n\treturn minVersion <= version && version <= maxVersion\n}\n","import lz from 'lz-string'\nimport config from '../../config.json'\nimport type { VersionId } from './Schemas'\n\nconst API_PREFIX = 'https://z15g7can.directus.app/items'\nexport const SHARE_KEY = 'share'\n\nconst ShareCache = new Map<string, string>()\n\nexport async function shareSnippet(type: string, version: VersionId, jsonData: any, show_preview: boolean) {\n\ttry {\n\t\tconst data = lz.compressToBase64(JSON.stringify(jsonData))\n\t\tconst raw = btoa(JSON.stringify(jsonData))\n\t\tconsole.log('Compression rate', raw.length / data.length)\n\t\tconst body = JSON.stringify({ data, type, version, show_preview })\n\t\tlet id = ShareCache.get(body)\n\t\tif (!id) {\n\t\t\tconst snippet = await fetchApi('/snippets', body)\n\t\t\tShareCache.set(body, snippet.id)\n\t\t\tid = snippet.id as string\n\t\t}\n\t\tconst gen = config.generators.find(g => g.id === type)!\n\t\treturn `${location.protocol}//${location.host}/${gen.url}/?${SHARE_KEY}=${id}`\n\t} catch (e) {\n\t\tif (e instanceof Error) {\n\t\t\te.message = `Error creating share link: ${e.message}`\n\t\t}\n\t\tthrow e\n\t}\n}\n\nexport async function getSnippet(id: string) {\n\ttry {\n\t\tconst snippet = await fetchApi(`/snippets/${id}`)\n\t\treturn {\n\t\t\t...snippet,\n\t\t\tdata: JSON.parse(lz.decompressFromBase64(snippet.data) ?? '{}'),\n\t\t}\n\t} catch (e) {\n\t\tif (e instanceof Error) {\n\t\t\te.message = `Error loading shared content: ${e.message}`\n\t\t}\n\t\tthrow e\n\t}\n}\n\nasync function fetchApi(url: string, body?: string) {\n\tconst res = await fetch(API_PREFIX + url, body ? {\n\t\tmethod: 'post',\n\t\theaders: { 'Content-Type': 'application/json' },\n\t\tbody,\n\t} : undefined)\n\tconst data = await res.json()\n\tif (data.data) {\n\t\treturn data.data\n\t}\n\tthrow new Error(data.errors?.[0]?.message ?? 'Unknown error')\n}\n","let scriptRel;const seen = {};export const __vitePreload = function preload(baseModule, deps) {\n // @ts-ignore\n if (!__VITE_IS_MODERN__ || !deps) {\n return baseModule();\n }\n // @ts-ignore\n if (scriptRel === undefined) {\n // @ts-ignore\n const relList = document.createElement('link').relList;\n // @ts-ignore\n scriptRel =\n relList && relList.supports && relList.supports('modulepreload')\n ? 'modulepreload'\n : 'preload';\n }\n return Promise.all(deps.map((dep) => {\n // @ts-ignore\n if (dep in seen)\n return;\n // @ts-ignore\n seen[dep] = true;\n const isCss = dep.endsWith('.css');\n const cssSelector = isCss ? '[rel=\"stylesheet\"]' : '';\n // @ts-ignore check if the file is already preloaded by SSR markup\n if (document.querySelector(`link[href=\"${dep}\"]${cssSelector}`)) {\n return;\n }\n // @ts-ignore\n const link = document.createElement('link');\n // @ts-ignore\n link.rel = isCss ? 'stylesheet' : scriptRel;\n if (!isCss) {\n link.as = 'script';\n link.crossOrigin = '';\n }\n link.href = dep;\n // @ts-ignore\n document.head.appendChild(link);\n if (isCss) {\n return new Promise((res, rej) => {\n link.addEventListener('load', res);\n link.addEventListener('error', rej);\n });\n }\n })).then(() => baseModule());\n}","import type { Project } from './contexts'\nimport { DRAFT_PROJECT } from './contexts'\nimport type { VersionId } from './services'\nimport { VersionIds } from './services'\n\nexport namespace Store {\n\texport const ID_LANGUAGE = 'language'\n\texport const ID_THEME = 'theme'\n\texport const ID_VERSION = 'schema_version'\n\texport const ID_INDENT = 'indentation'\n\texport const ID_FORMAT = 'output_format'\n\texport const ID_HIGHLIGHTING = 'output_highlighting'\n\texport const ID_SOUNDS_VERSION = 'minecraft_sounds_version'\n\texport const ID_PROJECTS = 'misode_projects'\n\texport const ID_BACKUPS = 'misode_generator_backups'\n\n\texport function getLanguage() {\n\t\treturn localStorage.getItem(ID_LANGUAGE) ?? 'en'\n\t}\n\n\texport function getTheme() {\n\t\treturn localStorage.getItem(ID_THEME) ?? 'dark'\n\t}\n\n\texport function getVersion(): VersionId {\n\t\tconst version = localStorage.getItem(ID_VERSION)\n\t\tif (version && VersionIds.includes(version as VersionId)) {\n\t\t\treturn version as VersionId\n\t\t}\n\t\treturn '1.18.2'\n\t}\n\n\texport function getIndent() {\n\t\treturn localStorage.getItem(ID_INDENT) ?? '2_spaces'\n\t}\n\n\texport function getFormat() {\n\t\treturn localStorage.getItem(ID_FORMAT) ?? 'json'\n\t}\n\n\texport function getHighlighting() {\n\t\treturn localStorage.getItem(ID_HIGHLIGHTING) !== 'false'\n\t}\n\n\texport function getSoundsVersion() {\n\t\treturn localStorage.getItem(ID_SOUNDS_VERSION) ?? 'latest'\n\t}\n\n\texport function getProjects(): Project[] {\n\t\tconst projects = localStorage.getItem(ID_PROJECTS)\n\t\tif (projects) {\n\t\t\treturn JSON.parse(projects) as Project[]\n\t\t}\n\t\treturn [DRAFT_PROJECT]\n\t}\n\n\texport function getBackup(id: string): object | undefined {\n\t\tconst backups = JSON.parse(localStorage.getItem(ID_BACKUPS) ?? '{}')\n\t\treturn backups[id]\n\t}\n\n\texport function setLanguage(language: string | undefined) {\n\t\tif (language) localStorage.setItem(ID_LANGUAGE, language)\n\t}\n\n\texport function setTheme(theme: string | undefined) {\n\t\tif (theme) localStorage.setItem(ID_THEME, theme)\n\t}\n\n\texport function setVersion(version: VersionId | undefined) {\n\t\tif (version) localStorage.setItem(ID_VERSION, version)\n\t}\n\n\texport function setIndent(indent: string | undefined) {\n\t\tif (indent) localStorage.setItem(ID_INDENT, indent)\n\t}\n\n\texport function setFormat(format: string | undefined) {\n\t\tif (format) localStorage.setItem(ID_FORMAT, format)\n\t}\n\n\texport function setHighlighting(highlighting: boolean | undefined) {\n\t\tif (highlighting !== undefined) localStorage.setItem(ID_HIGHLIGHTING, highlighting.toString())\n\t}\n\n\texport function setSoundsVersion(version: string | undefined) {\n\t\tif (version) localStorage.setItem(ID_SOUNDS_VERSION, version)\n\t}\n\n\texport function setProjects(projects: Project[] | undefined) {\n\t\tif (projects) localStorage.setItem(ID_PROJECTS, JSON.stringify(projects))\n\t}\n\n\texport function setBackup(id: string, data: object | undefined) {\n\t\tconst backups = JSON.parse(localStorage.getItem(ID_BACKUPS) ?? '{}')\n\t\tif (data === undefined) {\n\t\t\tdelete backups[id]\n\t\t} else {\n\t\t\tbackups[id] = data\n\t\t}\n\t\tlocalStorage.setItem(ID_BACKUPS, JSON.stringify(backups))\n\t}\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { useCallback, useContext, useEffect, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport English from '../../locales/en.json'\nimport { Analytics } from '../Analytics'\nimport { Store } from '../Store'\n\ninterface Locale {\n\tlang: string,\n\tlocale: (key: string, ...params: string[]) => string,\n\tchangeLanguage: (lang: string) => unknown,\n}\nconst Locale = createContext<Locale>({\n\tlang: 'none',\n\tlocale: key => key,\n\tchangeLanguage: () => {},\n})\n\nexport const Locales: {\n\t[key: string]: {\n\t\t[key: string]: string,\n\t},\n} = {\n\tfallback: English,\n}\n\nexport function localize(lang: string, key: string, ...params: string[]) {\n\tconst value: string | undefined = Locales[lang]?.[key]\n\t?? Locales.en?.[key] ?? Locales.fallback[key] ?? key\n\treturn resolveLocaleParams(value, params)\n}\n\nfunction resolveLocaleParams(value: string, params?: string[]): string {\n\treturn value.replace(/%\\d+%/g, match => {\n\t\tconst index = parseInt(match.slice(1, -1))\n\t\treturn params?.[index] !== undefined ? params[index] : match\n\t})\n}\n\nasync function loadLocale(language: string) {\n\tif (Locales[language]) return\n\tconst langConfig = config.languages.find(lang => lang.code === language)\n\tif (!langConfig) return\n\tconst data = await import(`../../locales/${language}.json`)\n\tconst schema = langConfig.schemas !== false\n\t\t&& await import(`../../../node_modules/@mcschema/locales/src/${language}.json`)\n\tLocales[language] = { ...data.default, ...schema.default }\n}\n\nexport function useLocale() {\n\treturn useContext(Locale)\n}\n\nexport function LocaleProvider({ children }: { children: ComponentChildren }) {\n\tconst [lang, setLanguage] = useState('none')\n\n\tconst locale = useCallback((key: string, ...params: string[]) => {\n\t\treturn localize(lang, key, ...params)\n\t}, [lang])\n\n\tconst changeLanguage = useCallback(async (lang: string) => {\n\t\tawait loadLocale(lang)\n\t\tAnalytics.setLanguage(lang)\n\t\tStore.setLanguage(lang)\n\t\tsetLanguage(lang)\n\t}, [])\n\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tconst target = Store.getLanguage()\n\t\t\tawait Promise.all([\n\t\t\t\tloadLocale('en'),\n\t\t\t\t...(target !== 'en' ? [loadLocale(target)] : []),\n\t\t\t])\n\t\t\tsetLanguage(target)\n\t\t})()\n\t}, [])\n\n\tconst value: Locale = {\n\t\tlang,\n\t\tlocale: locale,\n\t\tchangeLanguage,\n\t}\n\n\treturn <Locale.Provider value={value}>\n\t\t{children}\n\t</Locale.Provider>\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { route } from 'preact-router'\nimport { useCallback, useContext, useMemo, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport type { VersionId } from '../services'\nimport { Store } from '../Store'\nimport { cleanUrl } from '../Utils'\n\nexport type Project = {\n\tname: string,\n\tnamespace: string,\n\tversion?: VersionId,\n\tfiles: ProjectFile[],\n}\nexport const DRAFT_PROJECT: Project = {\n\tname: 'Drafts',\n\tnamespace: 'draft',\n\tfiles: [],\n}\n\nexport type ProjectFile = {\n\ttype: string,\n\tid: string,\n\tdata: any,\n}\n\ninterface ProjectContext {\n\tproject: Project,\n\tfile?: ProjectFile,\n\tchangeProject: (name: string) => unknown,\n\tupdateProject: (project: Partial<Project>) => unknown,\n\tupdateFile: (type: string, id: string | undefined, file: Partial<ProjectFile>) => boolean,\n\topenFile: (type: string, id: string) => unknown,\n\tcloseFile: () => unknown,\n}\nconst Project = createContext<ProjectContext>({\n\tproject: DRAFT_PROJECT,\n\tchangeProject: () => {},\n\tupdateProject: () => {},\n\tupdateFile: () => false,\n\topenFile: () => {},\n\tcloseFile: () => {},\n})\n\nexport function useProject() {\n\treturn useContext(Project)\n}\n\nexport function ProjectProvider({ children }: { children: ComponentChildren }) {\n\tconst [projects, setProjects] = useState<Project[]>(Store.getProjects())\n\n\tconst [projectName, setProjectName] = useState<string>(DRAFT_PROJECT.name)\n\tconst project = useMemo(() => {\n\t\treturn projects.find(p => p.name === projectName) ?? DRAFT_PROJECT\n\t}, [projects, projectName])\n\n\tconst [fileId, setFileId] = useState<[string, string] | undefined>(undefined)\n\tconst file = useMemo(() => {\n\t\tif (!fileId) return undefined\n\t\treturn project.files.find(f => f.type === fileId[0] && f.id === fileId[1])\n\t}, [project, fileId])\n\n\tconst changeProjects = useCallback((projects: Project[]) => {\n\t\tStore.setProjects(projects)\n\t\tsetProjects(projects)\n\t}, [])\n\n\tconst updateProject = useCallback((edits: Partial<Project>) => {\n\t\tchangeProjects(projects.map(p => p.name === projectName ?\t{ ...p, ...edits } : p))\n\t}, [projects, projectName])\n\n\tconst updateFile = useCallback((type: string, id: string | undefined, edits: Partial<ProjectFile>) => {\n\t\tif (!edits.id) { // remove\n\t\t\tupdateProject({ files: project.files.filter(f => f.type !== type || f.id !== id) })\n\t\t} else {\n\t\t\tconst newId = edits.id.includes(':') ? edits.id : `${project.namespace}:${edits.id}`\n\t\t\tconst exists = project.files.some(f => f.type === type && f.id === newId)\n\t\t\tif (!id) { // create\n\t\t\t\tif (exists) return false\n\t\t\t\tupdateProject({ files: [...project.files, { type, id: newId, data: edits.data ?? {} } ]})\n\t\t\t\tsetFileId([type, newId])\n\t\t\t} else { // rename or update data\n\t\t\t\tif (file?.id === id && id !== newId && exists) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tupdateProject({ files: project.files.map(f => f.type === type && f.id === id ? { ...f, ...edits, id: newId } : f)})\n\t\t\t\tif (file?.id === id) setFileId([type, newId])\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}, [updateProject, project, file])\n\n\tconst openFile = useCallback((type: string, id: string) => {\n\t\tconst gen = config.generators.find(g => g.id === type || g.path === type)\n\t\tif (!gen) {\n\t\t\tthrow new Error(`Cannot find generator of type ${type}`)\n\t\t}\n\t\tsetFileId([gen.id, id])\n\t\troute(cleanUrl(gen.url))\n\t}, [])\n\n\tconst closeFile = useCallback(() => {\n\t\tsetFileId(undefined)\n\t}, [])\n\n\tconst value: ProjectContext = {\n\t\tproject,\n\t\tfile,\n\t\tchangeProject: setProjectName,\n\t\tupdateProject,\n\t\tupdateFile,\n\t\topenFile,\n\t\tcloseFile,\n\t}\n\n\treturn <Project.Provider value={value}>\n\t\t{children}\n\t</Project.Provider>\n}\n\nexport function getFilePath(file: ProjectFile) {\n\tconst [namespace, id] = file.id.includes(':') ? file.id.split(':') : ['minecraft', file.id]\n\tconst gen = config.generators.find(g => g.id === file.type)\n\tif (!gen) {\n\t\tthrow new Error(`Cannot find generator of type ${file.type}`)\n\t}\n\treturn `data/${namespace}/${gen.path ?? gen.id}/${id}`\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { useCallback, useContext, useEffect, useState } from 'preact/hooks'\nimport { Analytics } from '../Analytics'\nimport { useMediaQuery } from '../hooks'\nimport { Store } from '../Store'\n\ninterface Theme {\n\ttheme: string,\n\tactualTheme: 'light' | 'dark',\n\tchangeTheme: (theme: string) => unknown,\n}\nconst Theme = createContext<Theme>({\n\ttheme: 'dark',\n\tactualTheme: 'dark',\n\tchangeTheme: () => {},\n})\n\nexport function useTheme() {\n\treturn useContext(Theme)\n}\n\nexport function ThemeProvider({ children }: { children: ComponentChildren }) {\n\tconst [theme, setTheme] = useState(Store.getTheme())\n\tconst prefersLight = useMediaQuery('(prefers-color-scheme: light)')\n\tconst prefersDark = useMediaQuery('(prefers-color-scheme: dark)')\n\n\tuseEffect(() => {\n\t\tdocument.documentElement.setAttribute('data-theme', theme)\n\t}, [theme])\n\n\tconst changeTheme = useCallback((theme: string) => {\n\t\tAnalytics.setTheme(theme)\n\t\tStore.setTheme(theme)\n\t\tsetTheme(theme)\n\t}, [])\n\n\tuseEffect(() => {\n\t\tAnalytics.setPrefersColorScheme(prefersLight ? 'light' : prefersDark ? 'dark' : 'none')\n\t}, [prefersLight, prefersDark])\n\n\tconst value: Theme = {\n\t\ttheme,\n\t\tactualTheme: theme === 'light' || (theme !== 'dark' && prefersLight) ? 'light' : 'dark',\n\t\tchangeTheme,\n\t}\n\n\treturn <Theme.Provider value={value}>\n\t\t{children}\n\t</Theme.Provider>\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { useCallback, useContext, useEffect, useState } from 'preact/hooks'\nimport { useLocale } from '.'\nimport config from '../../config.json'\nimport type { VersionId } from '../services'\n\nconst VERSIONS_IN_TITLE = 3\n\ninterface Title {\n\ttitle: string,\n\tchangeTitle: (title: string, versions?: VersionId[]) => unknown,\n}\nconst Title = createContext<Title>({\n\ttitle: '',\n\tchangeTitle: () => {},\n})\n\nexport function useTitle(title?: string, versions?: VersionId[]) {\n\tconst context = useContext(Title)\n\tuseEffect(() => {\n\t\tif (title) {\n\t\t\tcontext.changeTitle(title, versions)\n\t\t}\n\t}, [title, versions])\n\treturn context\n}\n\nexport function TitleProvider({ children }: { children: ComponentChildren }) {\n\tconst { locale } = useLocale()\n\tconst [title, setTitle] = useState<string>(locale('title.home'))\n\n\tconst changeTitle = useCallback((title: string, versions?: VersionId[]) => {\n\t\tversions ??= config.versions.map(v => v.id as VersionId)\n\t\tconst titleVersions = versions.slice(versions.length - VERSIONS_IN_TITLE)\n\t\tdocument.title = `${title} Minecraft ${titleVersions.join(', ')}`\n\t\tsetTitle(title)\n\t}, [])\n\n\tconst value = {\n\t\ttitle,\n\t\tchangeTitle,\n\t}\n\n\treturn <Title.Provider value={value}>\n\t\t{children}\n\t</Title.Provider>\n}\n","import type { ComponentChildren } from 'preact'\nimport { createContext } from 'preact'\nimport { getCurrentUrl } from 'preact-router'\nimport { useCallback, useContext, useEffect, useState } from 'preact/hooks'\nimport { Analytics } from '../Analytics'\nimport type { VersionId } from '../services'\nimport { VersionIds } from '../services'\nimport { Store } from '../Store'\nimport { getSearchParams, setSeachParams } from '../Utils'\n\nconst VERSION_PARAM = 'version'\n\ninterface Version {\n\tversion: VersionId,\n\tchangeVersion: (version: VersionId, store?: boolean) => unknown,\n}\nconst Version = createContext<Version>({\n\tversion: '1.18.2',\n\tchangeVersion: () => {},\n})\n\nexport function useVersion() {\n\treturn useContext(Version)\n}\n\nexport function VersionProvider({ children }: { children: ComponentChildren }) {\n\tconst [version, setVersion] = useState<VersionId>(Store.getVersion())\n\n\tconst searchParams = getSearchParams(getCurrentUrl())\n\tconst targetVersion = searchParams.get(VERSION_PARAM)\n\tuseEffect(() => {\n\t\tif (VersionIds.includes(targetVersion as VersionId) && version !== targetVersion) {\n\t\t\tsetVersion(targetVersion as VersionId)\n\t\t}\n\t}, [version, targetVersion])\n\n\tconst changeVersion = useCallback((version: VersionId, store = true) => {\n\t\tif (getSearchParams(getCurrentUrl()).has(VERSION_PARAM)) {\n\t\t\tsetSeachParams({ version })\n\t\t}\n\t\tif (store) {\n\t\t\tAnalytics.setVersion(version)\n\t\t\tStore.setVersion(version)\n\t\t}\n\t\tsetVersion(version)\n\t}, [])\n\n\tconst value: Version = {\n\t\tversion,\n\t\tchangeVersion,\n\t}\n\n\treturn <Version.Provider value={value}>\n\t\t{children}\n\t</Version.Provider>\n}\n","import { DataModel } from '@mcschema/core'\nimport type { NoiseParameters } from 'deepslate'\nimport { FixedBiome, Identifier, LegacyRandom, NormalNoise } from 'deepslate'\nimport init, { biome_parameters, climate_noise, climate_sampler, multi_noise } from 'deepslate-rs'\n// @ts-expect-error\nimport wasm from 'deepslate-rs/deepslate_rs_bg.wasm?url'\nimport type { VersionId } from '../services'\nimport { checkVersion, fetchPreset } from '../services'\nimport { BiMap, clamp, deepClone, deepEqual, square, stringToColor } from '../Utils'\n\nlet ready = false\nasync function loadWasm() {\n\tif (ready) return\n\tawait init(wasm)\n\tready = true\n\tconsole.debug(`Loaded deepslate-rs from \"${wasm}\"`)\n}\n\nconst LAYERS = {\n\ttemperature: [-1, 1],\n\thumidity: [-1, 1],\n\tcontinentalness: [-1.1, 1],\n\terosion: [-1, 1],\n\tweirdness: [-1, 1],\n\toffset: [-1, 1],\n\tfactor: [0, 12],\n\tjaggedness: [0, 1],\n}\n\ntype Triple = [number, number, number]\ntype BiomeColors = Record<string, Triple>\ntype BiomeSourceOptions = {\n\toctaves: Record<string, NoiseParameters>,\n\tbiomeColors: BiomeColors,\n\toffset: [number, number],\n\tscale: number,\n\tres: number,\n\tseed: bigint,\n\tversion: VersionId,\n\tlayers: Set<keyof typeof LAYERS | 'biomes'>,\n}\n\ninterface CachedBiomeSource {\n\tgetBiome(x: number, y: number, z: number): Identifier\n\tgetBiomes?(xFrom: number, xTo: number, xStep: number, yFrom: number, yTo: number, yStep: number, zFrom: number, zTo: number, zStep: number): Identifier[]\n\tgetClimate?(x: number, y: number, z: number): {[k: string]: number}\n\tgetClimates?(xFrom: number, xTo: number, xStep: number, yFrom: number, yTo: number, yStep: number, zFrom: number, zTo: number, zStep: number): {[k: string]: number}[]\n}\n\nlet cacheState: any\nlet biomeSourceCache: CachedBiomeSource\n\nexport async function biomeMap(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst { biomeSource } = await getCached(state, options)\n\n\tconst data = img.data\n\tconst ox = -Math.round(options.offset[0]) - 100 + options.res / 2\n\tconst oz = -Math.round(options.offset[1]) - 100 + options.res / 2\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\n\tconst xRange: Triple = [ox * options.scale, (200 + ox) * options.scale, options.res * options.scale]\n\tconst zRange: Triple = [oz * options.scale, (200 + oz) * options.scale, options.res * options.scale]\n\n\tconst biomes = !options.layers.has('biomes') ? undefined : biomeSource.getBiomes?.(...xRange, 64, 65, 1, ...zRange)\n\tconst layers = [...options.layers].filter(l => l !== 'biomes') as (keyof typeof LAYERS)[]\n\tconst noise = layers.length === 0 ? undefined : biomeSource.getClimates?.(...xRange, 64, 65, 1, ...zRange)\n\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let z = 0; z < 200; z += options.res) {\n\t\t\tconst i = z * row + x * col\n\t\t\tconst j = (x / options.res) * 200 / options.res + z / options.res\n\t\t\tconst worldX = (x + ox) * options.scale\n\t\t\tconst worldZ = (z + oz) * options.scale\n\t\t\tlet color: Triple = [50, 50, 50]\n\t\t\tif (options.layers.has('biomes')) {\n\t\t\t\tconst biome = biomes?.[j] ?? biomeSource.getBiome(worldX, 64, worldZ)\n\t\t\t\tcolor = getBiomeColor(biome.toString(), options.biomeColors)\n\t\t\t} else if (noise && layers[0]) {\n\t\t\t\tconst value = noise[j][layers[0]]\n\t\t\t\tconst [min, max] = LAYERS[layers[0]]\n\t\t\t\tconst brightness = (value - min) / (max - min) * 256\n\t\t\t\tcolor = [brightness, brightness, brightness]\n\t\t\t}\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nexport async function getBiome(state: any, x: number, z: number, options: BiomeSourceOptions): Promise<{[k: string]: number | string} | undefined> {\n\tconst { biomeSource } = await getCached(state, options)\n\n\tconst [xx, zz] = toWorld([x, z], options)\n\treturn {\n\t\tbiome: biomeSource.getBiome(xx, 64, zz).toString(),\n\t\t...biomeSource.getClimate?.(xx, 64, zz),\n\t}\n}\n\nasync function getCached(state: any, options: BiomeSourceOptions): Promise<{ biomeSource: CachedBiomeSource}> {\n\tconst newState = [state, options.octaves, `${options.seed}`, options.version]\n\tif (!deepEqual(newState, cacheState)) {\n\t\tcacheState = deepClone(newState)\n\n\t\tbiomeSourceCache = await getBiomeSource(state, options)\n\t}\n\treturn {\n\t\tbiomeSource: biomeSourceCache,\n\t} \n}\n\nasync function getBiomeSource(state: any, options: BiomeSourceOptions): Promise<CachedBiomeSource> {\n\tswitch (state?.type?.replace(/^minecraft:/, '')) {\n\t\tcase 'fixed':\n\t\t\treturn new FixedBiome(Identifier.parse(state.biome as string))\n\n\t\tcase 'checkerboard':\n\t\t\tconst shift = (state.scale ?? 2) + 2\n\t\t\tconst numBiomes = state.biomes?.length ?? 0\n\t\t\treturn {\n\t\t\t\tgetBiome(x: number, _y: number, z: number) {\n\t\t\t\t\tconst i = (((x >> shift) + (z >> shift)) % numBiomes + numBiomes) % numBiomes\n\t\t\t\t\treturn Identifier.parse(state.biomes?.[i].node as string)\n\t\t\t\t},\n\t\t\t}\n\n\t\tcase 'multi_noise':\n\t\t\tswitch(state.preset?.replace(/^minecraft:/, '')) {\n\t\t\t\tcase 'nether':\n\t\t\t\t\tstate = checkVersion(options.version, '1.18') ? NetherPreset18 : NetherPreset\n\t\t\t\t\tbreak\n\t\t\t\tcase 'overworld':\n\t\t\t\t\tstate = checkVersion(options.version, '1.18') ? await OverworldPreset18() : state\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t\tstate = DataModel.unwrapLists(state)\n\t\t\tif (checkVersion(options.version, '1.18')) {\n\t\t\t\tawait loadWasm()\n\t\t\t\tconst BiomeIds = new BiMap<string, number>()\n\t\t\t\tconst param = (p: number | number[]) => {\n\t\t\t\t\treturn typeof p === 'number' ? [p, p] : p\n\t\t\t\t}\n\t\t\t\tconst [t0, t1, h0, h1, c0, c1, e0, e1, w0, w1, d0, d1, o, b] = [[], [], [], [], [], [], [], [], [], [], [], [], [], []] as number[][]\n\t\t\t\tfor (const i of state.biomes) {\n\t\t\t\t\tconst { temperature, humidity, continentalness, erosion, weirdness, depth, offset } = i.parameters\n\t\t\t\t\tt0.push(param(temperature)[0])\n\t\t\t\t\tt1.push(param(temperature)[1])\n\t\t\t\t\th0.push(param(humidity)[0])\n\t\t\t\t\th1.push(param(humidity)[1])\n\t\t\t\t\tc0.push(param(continentalness)[0])\n\t\t\t\t\tc1.push(param(continentalness)[1])\n\t\t\t\t\te0.push(param(erosion)[0])\n\t\t\t\t\te1.push(param(erosion)[1])\n\t\t\t\t\tw0.push(param(weirdness)[0])\n\t\t\t\t\tw1.push(param(weirdness)[1])\n\t\t\t\t\td0.push(param(depth)[0])\n\t\t\t\t\td1.push(param(depth)[1])\n\t\t\t\t\to.push(offset)\n\t\t\t\t\tb.push(BiomeIds.getOrPut(i.biome, Math.floor(Math.random() * 2147483647)))\n\t\t\t\t}\n\t\t\t\tconst parameters = biome_parameters(new Float64Array(t0), new Float64Array(t1), new Float64Array(h0), new Float64Array(h1), new Float64Array(c0), new Float64Array(c1), new Float64Array(e0), new Float64Array(e1), new Float64Array(w0), new Float64Array(w1), new Float64Array(d0), new Float64Array(d1), new Float64Array(o), new Int32Array(b))\n\t\t\t\tconst sampler = climate_sampler(options.seed, options.octaves.temperature.firstOctave, new Float64Array(options.octaves.temperature.amplitudes), options.octaves.humidity.firstOctave, new Float64Array(options.octaves.humidity.amplitudes), options.octaves.continentalness.firstOctave, new Float64Array(options.octaves.continentalness.amplitudes), options.octaves.erosion.firstOctave, new Float64Array(options.octaves.erosion.amplitudes), options.octaves.weirdness.firstOctave, new Float64Array(options.octaves.weirdness.amplitudes), options.octaves.shift.firstOctave, new Float64Array(options.octaves.shift.amplitudes))\n\t\t\t\treturn {\n\t\t\t\t\tgetBiome(x, y, z) {\n\t\t\t\t\t\tconst ids = multi_noise(parameters, sampler, x, x + 1, 1, y, y + 1, 1, z, z + 1, 1)\n\t\t\t\t\t\treturn Identifier.parse(BiomeIds.getA(ids[0]) ?? 'unknown')\n\t\t\t\t\t},\n\t\t\t\t\tgetBiomes(xFrom, xTo, xStep, yFrom, yTo, yStep, zFrom, zTo, zStep) {\n\t\t\t\t\t\tconst ids = multi_noise(parameters, sampler, xFrom, xTo, xStep, yFrom, yTo, yStep, zFrom, zTo, zStep)\n\t\t\t\t\t\treturn [...ids].map(id => Identifier.parse(BiomeIds.getA(id) ?? 'unknown'))\n\t\t\t\t\t},\n\t\t\t\t\tgetClimate(x, y, z) {\n\t\t\t\t\t\tconst climate = climate_noise(sampler, x, x + 1, 1, y, y + 1, 1, z, z + 1, 1)\n\t\t\t\t\t\tconst [t, h, c, e, w] = climate.slice(0, 5)\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttemperature: t,\n\t\t\t\t\t\t\thumidity: h,\n\t\t\t\t\t\t\tcontinentalness: c,\n\t\t\t\t\t\t\terosion: e,\n\t\t\t\t\t\t\tweirdness: w,\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tgetClimates(xFrom, xTo, xStep, yFrom, yTo, yStep, zFrom, zTo, zStep) {\n\t\t\t\t\t\tconst climate = climate_noise(sampler, xFrom, xTo, xStep, yFrom, yTo, yStep, zFrom, zTo, zStep)\n\t\t\t\t\t\tconst result = []\n\t\t\t\t\t\tfor (let i = 0; i < climate.length; i += 7) {\n\t\t\t\t\t\t\tconst [t, h, c, e, w] = climate.slice(i, i + 5)\n\t\t\t\t\t\t\tresult.push({\n\t\t\t\t\t\t\t\ttemperature: t,\n\t\t\t\t\t\t\t\thumidity: h,\n\t\t\t\t\t\t\t\tcontinentalness: c,\n\t\t\t\t\t\t\t\terosion: e,\n\t\t\t\t\t\t\t\tweirdness: w,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn result\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst noise = ['altitude', 'temperature', 'humidity', 'weirdness']\n\t\t\t\t\t.map((id, i) => {\n\t\t\t\t\t\tconst config = state[`${id}_noise`]\n\t\t\t\t\t\tconfig.firstOctave = clamp(config.firstOctave ?? -7, -100, -1)\n\t\t\t\t\t\treturn new NormalNoise(new LegacyRandom(options.seed + BigInt(i)), config)\n\t\t\t\t\t})\n\t\t\t\tif (!Array.isArray(state.biomes) || state.biomes.length === 0) {\n\t\t\t\t\treturn new FixedBiome(Identifier.create('unknown'))\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tgetBiome(x: number, _y: number, z: number): Identifier {\n\t\t\t\t\t\tconst n = noise.map(n => n.sample(x, z, 0))\n\t\t\t\t\t\tlet minDist = Infinity\n\t\t\t\t\t\tlet minBiome = ''\n\t\t\t\t\t\tfor (const { biome, parameters: p } of state.biomes) {\n\t\t\t\t\t\t\tconst dist = square(p.altitude - n[0]) + square(p.temperature - n[1]) + square(p.humidity - n[2]) + square(p.weirdness - n[3]) + square(p.offset)\n\t\t\t\t\t\t\tif (dist < minDist) {\n\t\t\t\t\t\t\t\tminDist = dist\n\t\t\t\t\t\t\t\tminBiome = biome\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn Identifier.parse(minBiome)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\t}\n\tthrow new Error('Unknown biome source')\n}\n\nfunction getBiomeColor(biome: string, biomeColors: BiomeColors): Triple {\n\tif (!biome) {\n\t\treturn [128, 128, 128]\n\t}\n\tconst color = biomeColors[biome] ?? VanillaColors[biome]\n\tif (color === undefined) {\n\t\treturn stringToColor(biome)\n\t}\n\treturn color\n}\n\nfunction toWorld([x, z]: [number, number], options: BiomeSourceOptions) {\n\tconst xx = (x - options.offset[0] - 100 + options.res / 2) * options.scale\n\tconst zz = (z - options.offset[1] - 100 + options.res / 2) * options.scale\n\treturn [xx, zz]\n}\n\nconst VanillaColors: Record<string, Triple> = {\n\t'minecraft:badlands': [217,69,21],\n\t'minecraft:badlands_plateau': [202,140,101],\n\t'minecraft:bamboo_jungle': [118,142,20],\n\t'minecraft:bamboo_jungle_hills': [59,71,10],\n\t'minecraft:basalt_deltas': [64,54,54],\n\t'minecraft:beach': [250,222,85],\n\t'minecraft:birch_forest': [48,116,68],\n\t'minecraft:birch_forest_hills': [31,95,50],\n\t'minecraft:cold_ocean': [32,32,112],\n\t'minecraft:crimson_forest': [221,8,8],\n\t'minecraft:dark_forest': [64,81,26],\n\t'minecraft:dark_forest_hills': [104,121,66],\n\t'minecraft:deep_cold_ocean': [32,32,56],\n\t'minecraft:deep_frozen_ocean': [64,64,144],\n\t'minecraft:deep_lukewarm_ocean': [0,0,64],\n\t'minecraft:deep_ocean': [0,0,48],\n\t'minecraft:deep_warm_ocean': [0,0,80],\n\t'minecraft:desert': [250,148,24],\n\t'minecraft:desert_hills': [210,95,18],\n\t'minecraft:desert_lakes': [255,188,64],\n\t'minecraft:end_barrens': [128,128,255],\n\t'minecraft:end_highlands': [128,128,255],\n\t'minecraft:end_midlands': [128,128,255],\n\t'minecraft:eroded_badlands': [255,109,61],\n\t'minecraft:flower_forest': [45,142,73],\n\t'minecraft:forest': [5,102,33],\n\t'minecraft:frozen_ocean': [112,112,214],\n\t'minecraft:frozen_river': [160,160,255],\n\t'minecraft:giant_spruce_taiga': [129,142,121],\n\t'minecraft:old_growth_spruce_taiga': [129,142,121],\n\t'minecraft:giant_spruce_taiga_hills': [109,119,102],\n\t'minecraft:giant_tree_taiga': [89,102,81],\n\t'minecraft:old_growth_pine_taiga': [89,102,81],\n\t'minecraft:giant_tree_taiga_hills': [69,79,62],\n\t'minecraft:gravelly_hills': [136,136,136],\n\t'minecraft:gravelly_mountains': [136,136,136],\n\t'minecraft:windswept_gravelly_hills': [136,136,136],\n\t'minecraft:ice_spikes': [180,220,220],\n\t'minecraft:jungle': [83,123,9],\n\t'minecraft:jungle_edge': [98,139,23],\n\t'minecraft:sparse_jungle': [98,139,23],\n\t'minecraft:jungle_hills': [44,66,5],\n\t'minecraft:lukewarm_ocean': [0,0,144],\n\t'minecraft:modified_badlands_plateau': [242,180,141],\n\t'minecraft:modified_gravelly_mountains': [120,152,120],\n\t'minecraft:modified_jungle': [123,163,49],\n\t'minecraft:modified_jungle_edge': [138,179,63],\n\t'minecraft:modified_wooded_badlands_plateau': [216,191,141],\n\t'minecraft:mountain_edge': [114,120,154],\n\t'minecraft:extreme_hills': [96,96,96],\n\t'minecraft:mountains': [96,96,96],\n\t'minecraft:windswept_hills': [96,96,96],\n\t'minecraft:mushroom_field_shore': [160,0,255],\n\t'minecraft:mushroom_fields': [255,0,255],\n\t'minecraft:nether_wastes': [191,59,59],\n\t'minecraft:ocean': [0,0,112],\n\t'minecraft:plains': [141,179,96],\n\t'minecraft:river': [0,0,255],\n\t'minecraft:savanna': [189,178,95],\n\t'minecraft:savanna_plateau': [167,157,100],\n\t'minecraft:shattered_savanna': [229,218,135],\n\t'minecraft:windswept_savanna': [229,218,135],\n\t'minecraft:shattered_savanna_plateau': [207,197,140],\n\t'minecraft:small_end_islands': [128,128,255],\n\t'minecraft:snowy_beach': [250,240,192],\n\t'minecraft:snowy_mountains': [160,160,160],\n\t'minecraft:snowy_taiga': [49,85,74],\n\t'minecraft:snowy_taiga_hills': [36,63,54],\n\t'minecraft:snowy_taiga_mountains': [89,125,114],\n\t'minecraft:snowy_tundra': [255,255,255],\n\t'minecraft:snowy_plains': [255,255,255],\n\t'minecraft:soul_sand_valley': [94,56,48],\n\t'minecraft:stone_shore': [162,162,132],\n\t'minecraft:stony_shore': [162,162,132],\n\t'minecraft:sunflower_plains': [181,219,136],\n\t'minecraft:swamp': [7,249,178],\n\t'minecraft:swamp_hills': [47,255,218],\n\t'minecraft:taiga': [11,102,89],\n\t'minecraft:taiga_hills': [22,57,51],\n\t'minecraft:taiga_mountains': [51,142,129],\n\t'minecraft:tall_birch_forest': [88,156,108],\n\t'minecraft:old_growth_birch_forest': [88,156,108],\n\t'minecraft:tall_birch_hills': [71,135,90],\n\t'minecraft:the_end': [128,128,255],\n\t'minecraft:the_void': [0,0,0],\n\t'minecraft:warm_ocean': [0,0,172],\n\t'minecraft:warped_forest': [73,144,123],\n\t'minecraft:wooded_badlands_plateau': [176,151,101],\n\t'minecraft:wooded_badlands': [176,151,101],\n\t'minecraft:wooded_hills': [34,85,28],\n\t'minecraft:wooded_mountains': [80,112,80],\n\t'minecraft:windswept_forest': [80,112,80],\n\t'minecraft:snowy_slopes': [140, 195, 222],\n\t'minecraft:lofty_peaks': [196, 168, 193],\n\t'minecraft:jagged_peaks': [196, 168, 193],\n\t'minecraft:snowcapped_peaks': [200, 198, 200],\n\t'minecraft:frozen_peaks': [200, 198, 200],\n\t'minecraft:stony_peaks': [82, 92, 103],\n\t'minecraft:grove': [150, 150, 189],\n\t'minecraft:meadow': [169, 197, 80],\n\t'minecraft:lush_caves': [112, 255, 79],\n\t'minecraft:dripstone_caves': [140, 124, 0],\n}\n\nconst NetherPreset = {type:'minecraft:multi_noise',seed:0,altitude_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},humidity_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{biome:'minecraft:nether_wastes',parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}},{biome:'minecraft:soul_sand_valley',parameters:{altitude:0,temperature:0,humidity:-0.5,weirdness:0,offset:0}},{biome:'minecraft:crimson_forest',parameters:{altitude:0,temperature:0.4,humidity:0,weirdness:0,offset:0}},{biome:'minecraft:warped_forest',parameters:{altitude:0,temperature:0,humidity:0.5,weirdness:0,offset:0.375}},{biome:'minecraft:basalt_deltas',parameters:{altitude:0,temperature:-0.5,humidity:0,weirdness:0,offset:0.175}}]}\n\nconst NetherPreset18 = {type:'minecraft:multi_noise',biomes:[{biome:'minecraft:nether_wastes',parameters:{temperature:0,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:soul_sand_valley',parameters:{temperature:0,humidity:-0.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:crimson_forest',parameters:{temperature:0.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:'minecraft:warped_forest',parameters:{temperature:0,humidity:0.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0.375}},{biome:'minecraft:basalt_deltas',parameters:{temperature:-0.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0.175}}]}\n\nasync function OverworldPreset18() {\n\tconst overworld = await fetchPreset('1.18', 'dimension', 'overworld')\n\treturn overworld.generator.biome_source\n}\n","import { DataModel } from '@mcschema/core'\nimport type { Random } from 'deepslate'\nimport { LegacyRandom, PerlinNoise } from 'deepslate'\nimport type { VersionId } from '../services'\nimport { checkVersion } from '../services'\nimport { clamp, isObject, stringToColor } from '../Utils'\n\ntype BlockPos = [number, number, number]\ntype Placement = [BlockPos, number]\n\ntype PlacementContext = {\n\tplacements: Placement[],\n\tfeatures: string[],\n\trandom: Random,\n\tbiomeInfoNoise: PerlinNoise,\n\tseaLevel: number,\n\tversion: VersionId,\n\tnextFloat(): number,\n\tnextInt(max: number): number,\n\tnextGaussian(): number,\n\tsampleInt(provider: any): number,\n}\n\nconst terrain = [50, 50, 51, 51, 52, 52, 53, 54, 56, 57, 57, 58, 58, 59, 60, 60, 60, 59, 59, 59, 60, 61, 61, 62, 63, 63, 64, 64, 64, 65, 65, 66, 66, 65, 65, 66, 66, 67, 67, 67, 68, 69, 71, 73, 74, 76, 79, 80, 81, 81, 82, 83, 83, 82, 82, 81, 81, 80, 80, 80, 81, 81, 82, 82] \n\nconst featureColors = [\n\t[255, 77, 54], // red\n\t[59, 118, 255], // blue\n\t[91, 207, 25], // green\n\t[217, 32, 245], // magenta\n\t[255, 209, 41], // yellow\n\t[52, 204, 209], // cyan\n]\n\nexport type DecoratorOptions = {\n\tsize: [number, number, number],\n\tseed: bigint,\n\tversion: VersionId,\n}\nexport function decorator(state: any, img: ImageData, options: DecoratorOptions) {\n\tconst random = new LegacyRandom(options.seed)\n\tconst ctx: PlacementContext = {\n\t\tplacements: [],\n\t\tfeatures: [],\n\t\trandom,\n\t\tbiomeInfoNoise: new PerlinNoise(random.fork(), 0, [1]),\n\t\tseaLevel: 63,\n\t\tversion: options.version,\n\t\tnextFloat: () => random.nextFloat(),\n\t\tnextInt: (max: number) => random.nextInt(max),\n\t\tnextGaussian: () => Math.sqrt(-2 * Math.log(1 - random.nextFloat())) * Math.cos(2 * Math.PI * random.nextFloat()),\n\t\tsampleInt(value) { return sampleInt(value, this) },\n\t}\n\n\tfor (let x = 0; x < options.size[0] / 16; x += 1) {\n\t\tfor (let z = 0; z < options.size[2] / 16; z += 1) {\n\t\t\tif (checkVersion(options.version, undefined, '1.17')) {\n\t\t\t\tgetPlacements([x * 16, 0, z * 16], DataModel.unwrapLists(state), ctx)\n\t\t\t} else {\n\t\t\t\tmodifyPlacement([x * 16, 0, z * 16], DataModel.unwrapLists(state.placement), ctx)\n\t\t\t}\n\t\t}\n\t}\n\n\tconst data = img.data\n\timg.data.fill(255)\n\n\tfor (const [pos, feature] of ctx.placements) {\n\t\tif (pos[0] < 0 || pos[1] < 0 || pos[2] < 0 || pos[0] >= options.size[0] || pos[1] >= options.size[1] || pos[2] >= options.size[2]) continue\n\t\tconst i = (pos[2] * (img.width * 4)) + (pos[0] * 4)\n\t\tconst color = feature < featureColors.length ? featureColors[feature] : stringToColor(ctx.features[feature])\n\t\tdata[i] = clamp(50, 205, color[0])\n\t\tdata[i + 1] = clamp(50, 205, color[1])\n\t\tdata[i + 2] = clamp(50, 205, color[2])\n\t\tdata[i + 3] = 255\n\t}\n\n\tfor (let x = 0; x < options.size[0]; x += 1) {\n\t\tfor (let y = 0; y < options.size[2]; y += 1) {\n\t\t\tif ((Math.floor(x / 16) + Math.floor(y / 16)) % 2 === 0) continue\n\t\t\tconst i = (y * (img.width * 4)) + (x * 4)\n\t\t\tfor (let j = 0; j < 3; j += 1) {\n\t\t\t\tdata[i + j] = 0.85 * data[i + j] \n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction normalize(id: string) {\n\treturn id.startsWith('minecraft:') ? id.slice(10) : id\n}\n\nfunction decorateY(pos: BlockPos, y: number): BlockPos[] {\n\treturn [[ pos[0], y, pos[2] ]]\n}\n\nfunction sampleInt(value: any, ctx: PlacementContext): number {\n\tif (typeof value === 'number') {\n\t\treturn value\n\t} else if (value.base) {\n\t\treturn value.base ?? 1 + ctx.nextInt(1 + (value.spread ?? 0))\n\t} else {\n\t\tswitch (normalize(value.type)) {\n\t\t\tcase 'constant': return value.value\n\t\t\tcase 'uniform': return value.value.min_inclusive + ctx.nextInt(value.value.max_inclusive - value.value.min_inclusive + 1)\n\t\t\tcase 'biased_to_bottom': return value.value.min_inclusive + ctx.nextInt(ctx.nextInt(value.value.max_inclusive - value.value.min_inclusive + 1) + 1)\n\t\t\tcase 'clamped': return clamp(ctx.sampleInt(value.value.source), value.value.min_inclusive, value.value.max_inclusive)\n\t\t\tcase 'clamped_normal':\n\t\t\t\tconst normal = value.value.mean + ctx.nextGaussian() * value.value.deviation\n\t\t\t\treturn Math.floor(clamp(value.value.min_inclusive, value.value.max_inclusive, normal))\n\t\t\tcase 'weighted_list':\n\t\t\t\tconst totalWeight = (value.distribution as any[]).reduce<number>((sum, e) => sum + e.weight, 0)\n\t\t\t\tlet i = ctx.nextInt(totalWeight)\n\t\t\t\tfor (const e of value.distribution) {\n\t\t\t\t\ti -= e.weight\n\t\t\t\t\tif (i < 0) return ctx.sampleInt(e.data)\n\t\t\t\t}\n\t\t\t\treturn 0\n\t\t}\n\t\treturn 1\n\t}\n}\n\nfunction resolveAnchor(anchor: any, _ctx: PlacementContext): number {\n\tif (!isObject(anchor)) throw new Error('Invalid vertical anchor')\n\tif (anchor.absolute) return anchor.absolute\n\tif (anchor.above_bottom) return anchor.above_bottom\n\tif (anchor.below_top) return 256 - anchor.below_top\n\tthrow new Error('Invalid vertical anchor')\n}\n\nfunction sampleHeight(height: any, ctx: PlacementContext): number {\n\tif (!isObject(height)) throw new Error('Invalid height provider')\n\tif (typeof height.type !== 'string') {\n\t\treturn resolveAnchor(height, ctx)\n\t}\n\tswitch (normalize(height.type)) {\n\t\tcase 'constant': return resolveAnchor(height.value, ctx)\n\t\tcase 'uniform': {\n\t\t\tconst min = resolveAnchor(height.min_inclusive, ctx)\n\t\t\tconst max = resolveAnchor(height.max_inclusive, ctx)\n\t\t\treturn min + ctx.nextInt(max - min + 1)\n\t\t}\n\t\tcase 'biased_to_bottom': {\n\t\t\tconst min = resolveAnchor(height.min_inclusive, ctx)\n\t\t\tconst max = resolveAnchor(height.max_inclusive, ctx)\n\t\t\tconst n = ctx.nextInt(max - min - (height.inner ?? 1) + 1)\n\t\t\treturn min + ctx.nextInt(n + (height.inner ?? 1))\n\t\t}\n\t\tcase 'very_biased_to_bottom': {\n\t\t\tconst min = resolveAnchor(height.min_inclusive, ctx)\n\t\t\tconst max = resolveAnchor(height.max_inclusive, ctx)\n\t\t\tconst inner = height.inner ?? 1\n\t\t\tconst n1 = min + inner + ctx.nextInt(max - min - inner + 1)\n\t\t\tconst n2 = min + ctx.nextInt(n1 - min)\n\t\t\treturn min + ctx.nextInt(n2 - min + inner)\n\t\t}\n\t\tcase 'trapezoid': {\n\t\t\tconst min = resolveAnchor(height.min_inclusive, ctx)\n\t\t\tconst max = resolveAnchor(height.max_inclusive, ctx)\n\t\t\tconst plateau = height.plateau ?? 0\n\t\t\tif (plateau >= max - min) {\n\t\t\t\treturn min + ctx.nextInt(max - min + 1)\n\t\t\t}\n\t\t\tconst n1 = (max - min - plateau) / 2\n\t\t\tconst n2 = (max - min) - n1\n\t\t\treturn min + ctx.nextInt(n2 + 1) + ctx.nextInt(n1 + 1)\n\t\t}\n\t\tdefault: throw new Error(`Invalid height provider ${height.type}`)\n\t}\n}\n\n// 1.17 and before\nfunction useFeature(s: string, ctx: PlacementContext) {\n\tconst i = ctx.features.indexOf(s)\n\tif (i != -1) return i\n\tctx.features.push(s)\n\treturn ctx.features.length - 1\n}\n\nfunction getPlacements(pos: BlockPos, feature: any, ctx: PlacementContext): void {\n\tif (typeof feature === 'string') {\n\t\tctx.placements.push([pos, useFeature(feature, ctx)])\n\t\treturn\n\t}\n\tconst type = normalize(feature?.type ?? 'no_op')\n\tconst featureFn = Features[type]\n\tif (featureFn) {\n\t\tfeatureFn(feature.config, pos, ctx)\n\t} else {\n\t\tctx.placements.push([pos, useFeature(JSON.stringify(feature), ctx)])\n\t}\n}\n\nfunction getPositions(pos: BlockPos, decorator: any, ctx: PlacementContext): BlockPos[] {\n\tconst type = normalize(decorator?.type ?? 'nope')\n\tconst decoratorFn = Decorators[type]\n\tif (!decoratorFn) {\n\t\treturn [pos]\n\t}\n\treturn decoratorFn(decorator?.config, pos, ctx)\n}\n\nconst Features: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => void,\n} = {\n\tdecorated: (config, pos, ctx) => {\n\t\tconst positions = getPositions(pos, config?.decorator, ctx)\n\t\tpositions.forEach(p => getPlacements(p, config?.feature, ctx))\n\t},\n\trandom_boolean_selector: (config, pos, ctx) => {\n\t\tconst feature = ctx.nextFloat() < 0.5 ? config?.feature_true : config?.feature_false\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n\trandom_selector: (config, pos, ctx) => {\n\t\tfor (const f of config?.features ?? []) {\n\t\t\tif (ctx.nextFloat() < (f?.chance ?? 0)) {\n\t\t\t\tgetPlacements(pos, f.feature, ctx)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tgetPlacements(pos, config?.default, ctx)\n\t},\n\tsimple_random_selector: (config, pos, ctx) => {\n\t\tconst feature = config?.features?.[ctx.nextInt(config?.features?.length ?? 0)]\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n}\n\nconst Decorators: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => BlockPos[],\n} = {\n\tchance: (config, pos, ctx) => {\n\t\treturn ctx.nextFloat() < 1 / (config?.chance ?? 1) ? [pos] : []\n\t},\n\tcount: (config, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(config?.count ?? 1)).fill(pos)\n\t},\n\tcount_extra: (config, pos, ctx) => {\n\t\tlet count = config?.count ?? 1\n\t\tif (ctx.nextFloat() < config.extra_chance ?? 0){\n\t\t\tcount += config.extra_count ?? 0\n\t\t}\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_multilayer: (config, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(config?.count ?? 1)).fill(pos)\n\t\t\t.map(p => [\n\t\t\t\tp[0] + ctx.nextInt(16),\n\t\t\t\tp[1], \n\t\t\t\tp[2] + ctx.nextInt(16),\n\t\t\t])\n\t},\n\tcount_noise: (config, pos, ctx) => {\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / 200, 0, pos[2] / 200)\n\t\tconst count = noise < config.noise_level ? config.below_noise : config.above_noise\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_noise_biased: (config, pos, ctx) => {\n\t\tconst factor = Math.max(1, config.noise_factor)\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / factor, 0, pos[2] / factor)\n\t\tconst count = Math.max(0, Math.ceil((noise + (config.noise_offset ?? 0)) * config.noise_to_count_ratio))\n\t\treturn new Array(count).fill(pos)\n\t},\n\tdark_oak_tree: (_config, pos, ctx) => {\n\t\treturn [...new Array(16)].map((_, i) => {\n\t\t\tconst x = Math.floor(i / 4) * 4 + 1 + ctx.nextInt(3) + pos[0]\n\t\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, x)])\n\t\t\tconst z = Math.floor(i % 4) * 4 + 1 + ctx.nextInt(3) + pos[2]\n\t\t\treturn [x, y, z]\n\t\t})\n\t},\n\tdecorated: (config, pos, ctx) => {\n\t\treturn getPositions(pos, config?.outer, ctx).flatMap(p => {\n\t\t\treturn getPositions(p, config?.inner, ctx)\n\t\t})\n\t},\n\tdepth_average: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(config?.spread ?? 0) + ctx.nextInt(config?.spread ?? 0) - (config.spread ?? 0) + (config?.baseline ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\temerald_ore: (_config, pos, ctx) => {\n\t\tconst count = 3 + ctx.nextInt(6)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\t4 + ctx.nextInt(28),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\tfire: (config, pos, ctx) => {\n\t\tconst count = 1 + ctx.nextInt(ctx.nextInt(ctx.sampleInt(config?.count)))\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tctx.nextInt(128),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\tglowstone: (config, pos, ctx) => {\n\t\tconst count = ctx.nextInt(1 + ctx.nextInt(ctx.sampleInt(config?.count)))\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tctx.nextInt(128),\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t])\n\t},\n\theightmap: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\theightmap_spread_double: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, ctx.nextInt(y * 2))\n\t},\n\theightmap_world_surface: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\ticeberg: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + 4 + ctx.nextInt(8),\n\t\t\tpos[1],\n\t\t\tpos[2] + 4 + ctx.nextInt(8),\n\t\t]]\n\t},\n\tlava_lake: (config, pos, ctx) => {\n\t\tif (ctx.nextInt((config.chance ?? 1) / 10) === 0) {\n\t\t\tconst y = ctx.nextInt(ctx.nextInt(256 - 8) + 8)\n\t\t\tif (y < ctx.seaLevel || ctx.nextInt((config?.chance ?? 1) / 8) == 0) {\n\t\t\t\tconst x = ctx.nextInt(16) + pos[0]\n\t\t\t\tconst z = ctx.nextInt(16) + pos[2]\n\t\t\t\treturn [[x, y, z]]\n\t\t\t}\n\t\t}\n\t\treturn []\n\t},\n\tnope: (_config, pos) => {\n\t\treturn [pos]\n\t},\n\trange: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\trange_biased: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0))\n\t\treturn decorateY(pos, y)\n\t},\n\trange_very_biased: (config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(ctx.nextInt(ctx.nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0)) + (config?.bottom_offset ?? 0)) + (config?.bottom_offset ?? 0))\n\t\treturn decorateY(pos, y)\n\t},\n\tspread_32_above: (_config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(pos[1] + 32)\n\t\treturn decorateY(pos, y)\n\t},\n\ttop_solid_heightmap: (_config, pos) => {\n\t\tconst y = terrain[clamp(0, 63, pos[0])]\n\t\treturn decorateY(pos, y)\n\t},\n\tmagma: (_config, pos, ctx) => {\n\t\tconst y = ctx.nextInt(pos[1] + 32)\n\t\treturn decorateY(pos, y)\n\t},\n\tsquare: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tpos[1],\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t]]\n\t},\n\tsurface_relative_threshold: (config, pos) => {\n\t\tconst height = terrain[clamp(0, 63, pos[0])]\n\t\tconst min = height + (config?.min_inclusive ?? -Infinity)\n\t\tconst max = height + (config?.max_inclusive ?? Infinity)\n\t\treturn (pos[1] < min || pos[1] > max) ? [pos] : []\n\t},\n\twater_lake: (config, pos, ctx) => {\n\t\tif (ctx.nextInt(config.chance ?? 1) === 0) {\n\t\t\treturn [[\n\t\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\t\tctx.nextInt(256),\n\t\t\t\tpos[2] + ctx.nextInt(16),\n\t\t\t]]\n\t\t}\n\t\treturn []\n\t},\n}\n\n// 1.18 and after\nfunction modifyPlacement(pos: BlockPos, placement: any[], ctx: PlacementContext) {\n\tlet positions = [pos]\n\tfor (const modifier of placement) {\n\t\tconst modifierFn = PlacementModifiers[normalize(modifier?.type ?? 'nope')]\n\t\tif (!modifierFn) continue\n\t\tpositions = positions.flatMap(pos =>\n\t\t\tPlacementModifiers[normalize(modifier.type)](modifier, pos, ctx)\n\t\t)\n\t}\n\tfor (const pos of positions) {\n\t\tctx.placements.push([pos, 0])\n\t}\n}\n\nconst PlacementModifiers: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => BlockPos[],\n} = {\n\tcount: ({ count }, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(count ?? 1)).fill(pos)\n\t},\n\tcount_on_every_layer: ({ count }, pos, ctx) => {\n\t\treturn new Array(ctx.sampleInt(count ?? 1)).fill(pos)\n\t\t\t.map(p => [\n\t\t\t\tp[0] + ctx.nextInt(16),\n\t\t\t\tp[1], \n\t\t\t\tp[2] + ctx.nextInt(16),\n\t\t\t])\n\t},\n\tenvironment_scan: ({}, pos) => {\n\t\treturn [pos]\n\t},\n\theight_range: ({ height }, pos, ctx) => {\n\t\treturn decorateY(pos, sampleHeight(height, ctx))\n\t},\n\theightmap: ({}, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\tin_square: ({}, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + ctx.nextInt(16),\n\t\t\tpos[1],\n\t\t\tpos[2] + ctx.nextInt(16),\n\t\t]]\n\t},\n\tnoise_based_count: ({ noise_to_count_ratio, noise_factor, noise_offset }, pos, ctx) => {\n\t\tconst factor = Math.max(1, noise_factor)\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / factor, 0, pos[2] / factor)\n\t\tconst count = Math.max(0, Math.ceil((noise + (noise_offset ?? 0)) * noise_to_count_ratio))\n\t\treturn new Array(count).fill(pos)\n\t},\n\tnoise_threshold_count: ({ noise_level, below_noise, above_noise }, pos, ctx) => {\n\t\tconst noise = ctx.biomeInfoNoise.sample(pos[0] / 200, 0, pos[2] / 200)\n\t\tconst count = noise < noise_level ? below_noise : above_noise\n\t\treturn new Array(count).fill(pos)\n\t},\n\trandom_offset: ({ xz_spread, y_spread }, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + ctx.sampleInt(xz_spread),\n\t\t\tpos[1] + ctx.sampleInt(y_spread),\n\t\t\tpos[2] + ctx.sampleInt(xz_spread),\n\t\t]]\n\t},\n\trarity_filter: ({ chance }, pos, ctx) => {\n\t\treturn ctx.nextFloat() < 1 / (chance ?? 1) ? [pos] : []\n\t},\n}\n","import { LegacyRandom, PerlinNoise } from 'deepslate'\nimport { clampedLerp, lerp2 } from '../../Utils'\n\nexport class NoiseChunkGenerator {\n\tprivate readonly minLimitPerlinNoise: PerlinNoise\n\tprivate readonly maxLimitPerlinNoise: PerlinNoise\n\tprivate readonly mainPerlinNoise: PerlinNoise\n\tprivate readonly depthNoise: PerlinNoise\n\n\tprivate settings: any = {}\n\tprivate chunkWidth: number = 4\n\tprivate chunkHeight: number = 4\n\tprivate chunkCountY: number = 32\n\tprivate biomeDepth: number = 0.1\n\tprivate biomeScale: number = 0.2\n\n\tprivate noiseColumnCache: (number[] | null)[] = []\n\tprivate xOffset: number = 0\n\n\tconstructor(seed: bigint) {\n\t\tconst random = new LegacyRandom(seed)\n\t\tthis.minLimitPerlinNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.maxLimitPerlinNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.mainPerlinNoise = new PerlinNoise(random, -7, [1, 1, 1, 1, 1, 1, 1, 1])\n\t\tthis.depthNoise = new PerlinNoise(random, -15, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n\t}\n\n\tpublic reset(settings: any, depth: number, scale: number, xOffset: number, width: number) {\n\t\tthis.settings = settings\n\t\tthis.chunkWidth = settings.size_horizontal * 4\n\t\tthis.chunkHeight = settings.size_vertical * 4\n\t\tthis.chunkCountY = Math.floor(settings.height / this.chunkHeight)\n\n\t\tif (settings.amplified && depth > 0) {\n\t\t\tdepth = 1 + depth * 2\n\t\t\tscale = 1 + scale * 4\n\t\t}\n\t\tthis.biomeDepth = 0.265625 * (depth * 0.5 - 0.125)\n\t\tthis.biomeScale = 96.0 / (scale * 0.9 + 0.1)\n\n\t\tthis.noiseColumnCache = Array(width).fill(null)\n\t\tthis.xOffset = xOffset\n\t}\n \n\tpublic iterateNoiseColumn(x: number): number[] {\n\t\tconst data = Array(this.chunkCountY * this.chunkHeight)\n\t\tconst cx = Math.floor(x / this.chunkWidth)\n\t\tconst ox = Math.floor(x % this.chunkWidth) / this.chunkWidth\n\t\tconst noise1 = this.fillNoiseColumn(cx)\n\t\tconst noise2 = this.fillNoiseColumn(cx + 1)\n\n\t\tfor (let y = this.chunkCountY - 1; y >= 0; y -= 1) {\n\t\t\tfor (let yy = this.chunkHeight; yy >= 0; yy -= 1) {\n\t\t\t\tconst oy = yy / this.chunkHeight\n\t\t\t\tconst i = y * this.chunkHeight + yy\n\t\t\t\tdata[i] = lerp2(oy, ox, noise1[y], noise1[y+1], noise2[y], noise2[y+1])\n\t\t\t}\n\t\t}\n\t\treturn data\n\t}\n\n\tprivate fillNoiseColumn(x: number): number[] {\n\t\tconst cachedColumn = this.noiseColumnCache[x - this.xOffset]\n\t\tif (cachedColumn) return cachedColumn\n\n\t\tconst data = Array(this.chunkCountY + 1)\n\n\t\tconst xzScale = 684.412 * this.settings.sampling.xz_scale\n\t\tconst yScale = 684.412 * this.settings.sampling.y_scale\n\t\tconst xzFactor = xzScale / this.settings.sampling.xz_factor\n\t\tconst yFactor = yScale / this.settings.sampling.y_factor\n\t\tconst randomDensity = this.settings.random_density_offset ? this.getRandomDensity(x) : 0\n\n\t\tfor (let y = 0; y <= this.chunkCountY; y += 1) {\n\t\t\tlet noise = this.sampleAndClampNoise(x, y, this.mainPerlinNoise.getOctaveNoise(0)!.zo, xzScale, yScale, xzFactor, yFactor)\n\t\t\tconst yOffset = 1 - y * 2 / this.chunkCountY + randomDensity\n\t\t\tconst density = yOffset * this.settings.density_factor + this.settings.density_offset\n\t\t\tconst falloff = (density + this.biomeDepth) * this.biomeScale\n\t\t\tnoise += falloff * (falloff > 0 ? 4 : 1)\n\n\t\t\tif (this.settings.top_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.top_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(this.chunkCountY - y - (this.settings.top_slide.offset)) / (this.settings.top_slide.size)\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tif (this.settings.bottom_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.bottom_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(y - (this.settings.bottom_slide.offset)) / (this.settings.bottom_slide.size)\n\t\t\t\t)\n\t\t\t}\n\t\t\tdata[y] = noise\n\t\t}\n\n\t\tthis.noiseColumnCache[x - this.xOffset] = data\n\t\treturn data\n\t}\n\n\tprivate getRandomDensity(x: number): number {\n\t\tconst noise = this.depthNoise.sample(x * 200, 10, this.depthNoise.getOctaveNoise(0)!.zo, 1, 0, true)\n\t\tconst a = (noise < 0) ? -noise * 0.3 : noise\n\t\tconst b = a * 24.575625 - 2\n\t\treturn (b < 0) ? b * 0.009486607142857142 : Math.min(b, 1) * 0.006640625\n\t}\n\n\tprivate sampleAndClampNoise(x: number, y: number, z: number, xzScale: number, yScale: number, xzFactor: number, yFactor: number): number {\n\t\tlet a = 0\n\t\tlet b = 0\n\t\tlet c = 0\n\t\tlet d = 1\n\n\t\tfor (let i = 0; i < 16; i += 1) {\n\t\t\tconst x2 = PerlinNoise.wrap(x * xzScale * d)\n\t\t\tconst y2 = PerlinNoise.wrap(y * yScale * d)\n\t\t\tconst z2 = PerlinNoise.wrap(z * xzScale * d)\n\t\t\tconst e = yScale * d\n\n\t\t\tconst minLimitNoise = this.minLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (minLimitNoise) {\n\t\t\t\ta += minLimitNoise.sample(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tconst maxLimitNoise = this.maxLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (maxLimitNoise) {\n\t\t\t\tb += maxLimitNoise.sample(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tif (i < 8) {\n\t\t\t\tconst mainNoise = this.mainPerlinNoise.getOctaveNoise(i)\n\t\t\t\tif (mainNoise) {\n\t\t\t\t\tc += mainNoise.sample(\n\t\t\t\t\t\tPerlinNoise.wrap(x * xzFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(y * yFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(z * xzFactor * d),\n\t\t\t\t\t\tyFactor * d,\n\t\t\t\t\t\ty * yFactor * d \n\t\t\t\t\t) / d\n\t\t\t\t}\n\t\t\t}\n\n\t\t\td /= 2\n\t\t}\n\n\t\treturn clampedLerp(a / 512, b / 512, (c / 10 + 1) / 2)\n\t}\n}\n","import { DataModel } from '@mcschema/core'\nimport type { BlockState } from 'deepslate'\nimport { BlockPos, Chunk, ChunkPos, clampedMap, DensityFunction, FixedBiome, Identifier, NoiseChunkGenerator, NoiseGeneratorSettings, NoiseParameters, NoiseRouter, NoiseSettings, Registry, WorldgenRegistries, XoroshiroRandom } from 'deepslate'\nimport * as deepslate18 from 'deepslate-1.18'\nimport type { VersionId } from '../services'\nimport { checkVersion, fetchAllPresets } from '../services'\nimport { deepClone, deepEqual } from '../Utils'\nimport { NoiseChunkGenerator as OldNoiseChunkGenerator } from './noise/NoiseChunkGenerator'\n\nexport type NoiseSettingsOptions = {\n\tbiome?: string,\n\tbiomeScale?: number,\n\tbiomeDepth?: number,\n\toffset: number,\n\twidth: number,\n\tseed: bigint,\n\tversion: VersionId,\n}\n\nconst Z = 0\n\nconst colors: Record<string, [number, number, number]> = {\n\t'minecraft:air': [150, 160, 170],\n\t'minecraft:water': [20, 80, 170],\n\t'minecraft:lava': [200, 100, 0],\n\t'minecraft:stone': [55, 55, 55],\n\t'minecraft:deepslate': [34, 34, 36],\n\t'minecraft:bedrock': [10, 10, 10],\n\t'minecraft:grass_block': [47, 120, 23],\n\t'minecraft:dirt': [64, 40, 8],\n\t'minecraft:gravel': [70, 70, 70],\n\t'minecraft:sand': [196, 180, 77],\n\t'minecraft:sandstone': [148, 135, 52],\n\t'minecraft:netherrack': [100, 40, 40],\n\t'minecraft:crimson_nylium': [144, 22, 22],\n\t'minecraft:warped_nylium': [28, 115, 113],\n\t'minecraft:basalt': [73, 74, 85],\n\t'minecraft:end_stone': [200, 200, 140],\n}\n\nlet cacheState: any\nlet generatorCache: NoiseChunkGenerator\nlet chunkCache: Chunk[] = []\nconst registryCache = new Map<VersionId, Registry<Registry<any>>>()\n\nexport async function noiseSettings(state: any, img: ImageData, options: NoiseSettingsOptions) {\n\tif (checkVersion(options.version, '1.18')) {\n\t\tif (checkVersion(options.version, '1.18.2')) {\n\t\t\tawait initRegistries(options.version)\n\t\t}\n\n\t\tconst { settings, generator } = getCached(state, options)\n\n\t\tconst slice = new LevelSlice(-options.offset, options.width, settings.noise.minY, settings.noise.height)\n\t\tslice.generate(generator, options.biome)\n\n\t\tconst data = img.data\n\t\tfor (let x = 0; x < options.width; x += 1) {\n\t\t\tfor (let y = 0; y < settings.noise.height; y += 1) {\n\t\t\t\tconst i = x * 4 + (settings.noise.height-y-1) * 4 * img.width\n\t\t\t\tconst state = slice.getBlockState([x - options.offset, y + settings.noise.minY, Z])\n\t\t\t\tconst color = colors[state.getName().toString()] ?? [0, 0, 0]\n\t\t\t\tdata[i] = color[0]\n\t\t\t\tdata[i + 1] = color[1]\n\t\t\t\tdata[i + 2] = color[2]\n\t\t\t\tdata[i + 3] = 255\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\tconst generator = new OldNoiseChunkGenerator(options.seed)\n\tgenerator.reset(state.noise, options.biomeDepth ?? 0, options.biomeScale ?? 0, options.offset, options.width)\n\tconst data = img.data\n\tconst row = img.width * 4\n\tfor (let x = 0; x < options.width; x += 1) {\n\t\tconst noise = generator.iterateNoiseColumn(x - options.offset).reverse()\n\t\tfor (let y = 0; y < state.noise.height; y += 1) {\n\t\t\tconst i = y * row + x * 4\n\t\t\tconst color = getColor(noise, y)\n\t\t\tdata[i] = color\n\t\t\tdata[i + 1] = color\n\t\t\tdata[i + 2] = color\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nexport function getNoiseBlock(x: number, y: number) {\n\tconst chunk = chunkCache.find(c => ChunkPos.minBlockX(c.pos) <= x && ChunkPos.maxBlockX(c.pos) >= x)\n\tif (!chunk) {\n\t\treturn undefined\n\t}\n\treturn chunk.getBlockState(BlockPos.create(x, y, Z))\n}\n\nexport async function densityFunction(state: any, img: ImageData, options: NoiseSettingsOptions) {\n\tconst { fn, settings } = await createDensityFunction(state, options)\n\n\tconst arr = Array(options.width * settings.height)\n\tlet min = Infinity\n\tlet max = -Infinity\n\tfor (let x = 0; x < options.width; x += 1) {\n\t\tfor (let y = 0; y < settings.height; y += 1) {\n\t\t\tconst i = x + (settings.height-y-1) * options.width\n\t\t\tconst density = fn.compute(DensityFunction.context(x - options.offset, y, 0))\n\t\t\tmin = Math.min(min, density)\n\t\t\tmax = Math.max(max, density)\n\t\t\tarr[i] = density\n\t\t}\n\t}\n\n\tconst data = img.data\n\tfor (let i = 0; i < options.width * settings.height; i += 1) {\n\t\tconst color = Math.floor(clampedMap(arr[i], min, max, 0, 256))\n\t\tdata[4 * i] = color\n\t\tdata[4 * i + 1] = color\n\t\tdata[4 * i + 2] = color\n\t\tdata[4 * i + 3] = 255\n\t}\n}\n\nasync function createDensityFunction(state: any, options: NoiseSettingsOptions) {\n\tawait initRegistries(options.version)\n\n\tconst random = XoroshiroRandom.create(options.seed).forkPositional()\n\tconst settings = NoiseSettings.fromJson({\n\t\tmin_y: -64,\n\t\theight: 384,\n\t\tsize_horizontal: 1,\n\t\tsize_vertical: 2,\n\t\tsampling: { xz_scale: 1, y_scale: 1, xz_factor: 80, y_factor: 160 },\n\t\tbottom_slide: { target: 0.1171875, size: 3, offset: 0 },\n\t\ttop_slide: { target: -0.078125, size: 2, offset: 8 },\n\t\tterrain_shaper: { offset: 0.044, factor: 4, jaggedness: 0 },\n\t})\n\tconst originalFn = DensityFunction.fromJson(state)\n\tconst fn = originalFn.mapAll(new NoiseRouter.Visitor(random, settings))\n\n\treturn {\n\t\tfn,\n\t\tsettings,\n\t}\n}\n\nconst Registries: [string, { fromJson(obj: unknown): any}][] = [\n\t['worldgen/noise', NoiseParameters],\n\t['worldgen/density_function', DensityFunction],\n]\n\nasync function initRegistries(version: VersionId) {\n\tconst rootRegistries = registryCache.get(version) ?? new Registry(new Identifier('misode', 'temp'))\n\tif (!registryCache.has(version)) {\n\t\tawait Promise.all(Registries.map(([id, c]) => fetchRegistry(version, rootRegistries, id, c)))\n\t\tregistryCache.set(version, rootRegistries)\n\t}\n\tWorldgenRegistries.DENSITY_FUNCTION.clear().assign(rootRegistries.getOrThrow(Identifier.create('worldgen/density_function')))\n\tWorldgenRegistries.NOISE.clear().assign(rootRegistries.getOrThrow(Identifier.create('worldgen/noise')))\n}\n\nasync function fetchRegistry<T extends { fromJson(obj: unknown): T }>(version: VersionId, root: Registry<Registry<unknown>>, id: string, clazz: T) {\n\tconst entries = await fetchAllPresets(version, id)\n\tconst registry = new Registry<typeof clazz>(Identifier.create(id))\n\tfor (const [key, value] of entries.entries()) {\n\t\tregistry.register(Identifier.parse(key), clazz.fromJson(value))\n\t}\n\troot.register(registry.key, registry)\n}\n\nfunction getCached(state: unknown, options: NoiseSettingsOptions) {\n\tconst settings = NoiseGeneratorSettings.fromJson(DataModel.unwrapLists(state))\n\n\tconst newState = [state, `${options.seed}`, options.biome]\n\tif (!deepEqual(newState, cacheState)) {\n\t\tcacheState = deepClone(newState)\n\t\tchunkCache = []\n\t\tif (checkVersion(options.version, '1.18.2')) {\n\t\t\tconst biomeSource = new FixedBiome(Identifier.create('unknown'))\n\t\t\tgeneratorCache = new NoiseChunkGenerator(options.seed, biomeSource, settings)\n\t\t} else {\n\t\t\tconst biomeSource = new deepslate18.FixedBiome('unknown')\n\t\t\tgeneratorCache = new deepslate18.NoiseChunkGenerator(options.seed, biomeSource, settings as any) as any\n\t\t}\n\t}\n\treturn {\n\t\tsettings,\n\t\tgenerator: generatorCache,\n\t}\n}\n\nfunction getColor(noise: number[], y: number): number {\n\tif (noise[y] > 0) {\n\t\treturn 0\n\t}\n\tif (noise[y+1] > 0) {\n\t\treturn 150\n\t}\n\treturn 255\n}\n\nclass LevelSlice {\n\tprivate readonly chunks: Chunk[]\n\tprivate readonly done: boolean[]\n\n\tconstructor(\n\t\tprivate readonly minX: number,\n\t\twidth: number,\n\t\tminY: number,\n\t\theight: number,\n\t) {\n\t\tthis.done = []\n\t\tthis.chunks = [...Array(Math.ceil(width / 16) + 1)]\n\t\t\t.map((_, i) => {\n\t\t\t\tconst x = (minX >> 4) + i\n\t\t\t\tconst cached = chunkCache.find(c => c.pos[0] === x)\n\t\t\t\tif (cached) {\n\t\t\t\t\tthis.done[i] = true\n\t\t\t\t\treturn cached\n\t\t\t\t}\n\t\t\t\treturn new Chunk(minY, height, ChunkPos.create(x, Z >> 4))\n\t\t\t})\n\t}\n\n\tpublic generate(generator: NoiseChunkGenerator, forcedBiome?: string) {\n\t\tthis.chunks.forEach((chunk, i) => {\n\t\t\tif (!this.done[i]) {\n\t\t\t\tgenerator.fill(chunk, true)\n\t\t\t\tgenerator.buildSurface(chunk, forcedBiome)\n\t\t\t\tthis.done[i] = true\n\t\t\t\tchunkCache.push(chunk)\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic getBlockState(pos: BlockPos): BlockState {\n\t\tconst chunkIndex = (pos[0] >> 4) - (this.minX >> 4)\n\t\treturn this.chunks[chunkIndex].getBlockState(pos)\n\t}\n}\n","import { DataModel, Path } from '@mcschema/core'\nimport type { NoiseParameters } from 'deepslate'\nimport { NoiseGeneratorSettings } from 'deepslate'\nimport { useEffect, useMemo, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn, BtnMenu } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { biomeMap, getBiome } from '../../previews'\nimport { newSeed, randomSeed } from '../../Utils'\n\nconst LAYERS = ['biomes', 'temperature', 'humidity', 'continentalness', 'erosion', 'weirdness'] as const\n\nexport const BiomeSourcePreview = ({ model, data, shown, version }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [configuredSeed] = useState(randomSeed())\n\tconst [scale, setScale] = useState(2)\n\tconst [focused, setFocused] = useState<{[k: string]: number | string} | undefined>(undefined)\n\tconst [layers, setLayers] = useState(new Set<typeof LAYERS[number]>(['biomes']))\n\tconst offset = useRef<[number, number]>([0, 0])\n\tconst res = useRef(1)\n\tconst refineTimeout = useRef<number>(undefined)\n\n\tconst seed = BigInt(model.get(new Path(['generator', 'seed'])) ?? configuredSeed)\n\tconst octaves = useMemo(() => {\n\t\tif (!shown) return undefined\n\t\treturn getOctaves(model.get(new Path(['generator', 'settings'])))\n\t}, [shown])\n\tconst state = shown ? calculateState(data, octaves!) : ''\n\tconst type: string = data.type?.replace(/^minecraft:/, '')\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [200 / res.current, 200 / res.current]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { octaves: octaves!, biomeColors: {}, layers, offset: offset.current, scale, seed, res: res.current, version }\n\t\t\tawait biomeMap(data, img, options)\n\t\t\tif (res.current === 4) {\n\t\t\t\tclearTimeout(refineTimeout.current)\n\t\t\t\trefineTimeout.current = setTimeout(() => {\n\t\t\t\t\tres.current = 1\n\t\t\t\t\tredraw()\n\t\t\t\t}, 150) as any\n\t\t\t}\n\t\t},\n\t\tasync onDrag(dx, dy) {\n\t\t\toffset.current[0] = offset.current[0] + dx * 200\n\t\t\toffset.current[1] = offset.current[1] + dy * 200\n\t\t\tclearTimeout(refineTimeout.current)\n\t\t\tres.current = type === 'multi_noise' ? 4 : 1\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(x, y) {\n\t\t\tconst options = { octaves: octaves!, biomeColors: {}, layers, offset: offset.current, scale, seed: configuredSeed, res: 1, version }\n\t\t\tconst biome = await getBiome(data, Math.floor(x * 200), Math.floor(y * 200), options)\n\t\t\tsetFocused(biome)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, scale, configuredSeed, layers])\n\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tres.current = type === 'multi_noise' ? 4 : 1\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, configuredSeed, layers, shown])\n\n\tconst changeScale = (newScale: number) => {\n\t\toffset.current[0] = offset.current[0] * scale / newScale\n\t\toffset.current[1] = offset.current[1] * scale / newScale\n\t\tsetScale(newScale)\n\t}\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t{focused && <Btn label={focused.biome as string} class=\"no-pointer\" />}\n\t\t\t{type === 'multi_noise' &&\n\t\t\t\t<BtnMenu icon=\"stack\" tooltip={locale('configure_layers')}>\n\t\t\t\t\t{LAYERS.map(name => {\n\t\t\t\t\t\tconst enabled = layers.has(name)\n\t\t\t\t\t\treturn <Btn label={locale(`layer.${name}`)} \n\t\t\t\t\t\t\tactive={enabled}\n\t\t\t\t\t\t\ttooltip={enabled ? locale('enabled') : locale('disabled')}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\tsetLayers(new Set([name]))\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t}} />\n\t\t\t\t\t})}\n\t\t\t\t</BtnMenu>}\n\t\t\t{(type === 'multi_noise' || type === 'checkerboard') && <>\n\t\t\t\t<Btn icon=\"dash\" tooltip={locale('zoom_out')}\n\t\t\t\t\tonClick={() => changeScale(scale * 1.5)} />\n\t\t\t\t<Btn icon=\"plus\" tooltip={locale('zoom_in')}\n\t\t\t\t\tonClick={() => changeScale(scale / 1.5)} />\n\t\t\t</>}\n\t\t\t{type === 'multi_noise' &&\n\t\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\t\tonClick={() => newSeed(model)} />}\n\t\t</div>\n\t\t{focused?.temperature !== undefined && <div class=\"controls secondary-controls\">\n\t\t\t<Btn class=\"no-pointer\" label={Object.entries(focused)\n\t\t\t\t.filter(([k]) => k !== 'biome')\n\t\t\t\t.map(([k, v]) => `${k[0].toUpperCase()}: ${(v as number).toFixed(2)}`).join(' ')}/>\n\t\t</div>}\n\t\t<canvas ref={canvas} width=\"200\" height=\"200\"></canvas>\n\t</>\n}\n\nfunction calculateState(data: any, octaves: Record<string, NoiseParameters>) {\n\treturn JSON.stringify([data, octaves])\n}\n\nexport function getOctaves(obj: any): Record<string, NoiseParameters> {\n\tif (typeof obj !== 'string') {\n\t\tconst settings = NoiseGeneratorSettings.fromJson(DataModel.unwrapLists(obj))\n\t\tobj = settings.legacyRandomSource ? 'minecraft:nether' : 'minecraft:overworld'\n\t}\n\tswitch (obj.replace(/^minecraft:/, '')) {\n\t\tcase 'overworld':\n\t\tcase 'amplified':\n\t\t\treturn {\n\t\t\t\ttemperature: { firstOctave: -9, amplitudes: [1.5, 0, 1, 0, 0, 0] },\n\t\t\t\thumidity: { firstOctave: -7, amplitudes: [1, 1, 0, 0, 0, 0] },\n\t\t\t\tcontinentalness: { firstOctave: -9, amplitudes: [1, 1, 2, 2, 2, 1, 1, 1, 1] },\n\t\t\t\terosion: { firstOctave: -9, amplitudes: [1, 1, 0, 1, 1] },\n\t\t\t\tweirdness: { firstOctave: -7, amplitudes: [1, 2, 1, 0, 0, 0] },\n\t\t\t\tshift: { firstOctave: -3, amplitudes: [1, 1, 1, 0] },\n\t\t\t}\n\t\tcase 'end':\n\t\tcase 'floating_islands':\n\t\t\treturn {\n\t\t\t\ttemperature: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\thumidity: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\tcontinentalness: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\terosion: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\tweirdness: { firstOctave: 0, amplitudes: [0] },\n\t\t\t\tshift: { firstOctave: 0, amplitudes: [0] },\n\t\t\t}\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\ttemperature: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\thumidity: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\tcontinentalness: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\terosion: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\tweirdness: { firstOctave: -7, amplitudes: [1, 1] },\n\t\t\t\tshift: { firstOctave: 0, amplitudes: [0] },\n\t\t\t}\n\t}\n}\n","import { useEffect, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { decorator } from '../../previews'\nimport { randomSeed } from '../../Utils'\n\nexport const DecoratorPreview = ({ data, version, shown }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [scale, setScale] = useState(4)\n\tconst [seed, setSeed] = useState(randomSeed())\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [scale * 16, scale * 16]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tdecorator(data, img, { seed, version, size: [scale * 16, 128, scale * 16] })\n\t\t},\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t<Btn icon=\"dash\" tooltip={locale('zoom_out')}\n\t\t\t\tonClick={() => setScale(Math.min(16, scale + 1))} />\n\t\t\t<Btn icon=\"plus\" tooltip={locale('zoom_in')}\n\t\t\t\tonClick={() => setScale(Math.max(1, scale - 1))} />\n\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\tonClick={() => setSeed(randomSeed())} />\n\t\t</div>\n\t\t<canvas ref={canvas} width=\"64\" height=\"64\"></canvas>\n\t</>\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn, BtnMenu } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { densityFunction } from '../../previews'\nimport { randomSeed } from '../../Utils'\n\nexport const DensityFunctionPreview = ({ data, shown, version }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [seed, setSeed] = useState(randomSeed())\n\tconst [autoScroll, setAutoScroll] = useState(false)\n\tconst [focused, setFocused] = useState<string | undefined>(undefined)\n\tconst offset = useRef(0)\n\tconst scrollInterval = useRef<number | undefined>(undefined)\n\tconst state = JSON.stringify([data])\n\n\tconst size = data?.noise?.height ?? 256\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [size, size]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { offset: offset.current, width: img.width, seed, version }\n\t\t\tawait densityFunction(data, img, options)\n\t\t},\n\t\tasync onDrag(dx) {\n\t\t\toffset.current += dx * size\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(x, y) {\n\t\t\tconst worldX = Math.floor(x * size - offset.current)\n\t\t\tconst worldY = size - Math.max(1, Math.ceil(y * size)) + (data?.noise?.min_y ?? 0)\n\t\t\tsetFocused(`X=${worldX} Y=${worldY}`)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, seed])\n\n\tuseEffect(() => {\n\t\tif (scrollInterval.current) {\n\t\t\tclearInterval(scrollInterval.current)\n\t\t}\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t\tif (autoScroll) {\n\t\t\t\tscrollInterval.current = setInterval(() => {\n\t\t\t\t\toffset.current -= 8\n\t\t\t\t\tredraw()\n\t\t\t\t}, 100) as any\n\t\t\t}\n\t\t}\n\t}, [state, seed, shown, autoScroll])\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t{focused && <Btn label={focused} class=\"no-pointer\" />}\n\t\t\t<BtnMenu icon=\"gear\" tooltip={locale('terrain_settings')}>\n\t\t\t\t<Btn icon={autoScroll ? 'square_fill' : 'square'} label={locale('preview.auto_scroll')} onClick={() => setAutoScroll(!autoScroll)} />\n\t\t\t</BtnMenu>\n\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\tonClick={() => setSeed(randomSeed())} />\n\t\t</div>\n\t\t<canvas ref={canvas} width={size} height={size}></canvas>\n\t</>\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { normalNoise } from '../../previews'\nimport { randomSeed } from '../../Utils'\n\nexport const NoisePreview = ({ data, shown, version }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [seed, setSeed] = useState(randomSeed())\n\tconst [scale, setScale] = useState(2)\n\tconst offset = useRef<[number, number]>([0, 0])\n\tconst state = JSON.stringify([data])\n\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [256, 256]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { offset: offset.current, scale, seed, version }\n\t\t\tnormalNoise(data, img, options)\n\t\t},\n\t\tasync onDrag(dx, dy) {\n\t\t\toffset.current[0] = offset.current[0] + dx * 256\n\t\t\toffset.current[1] = offset.current[1] + dy * 256\n\t\t\tredraw()\n\t\t},\n\t}, [state, scale, seed])\n\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\tconst changeScale = (newScale: number) => {\n\t\toffset.current[0] = offset.current[0] * scale / newScale\n\t\toffset.current[1] = offset.current[1] * scale / newScale\n\t\tsetScale(newScale)\n\t}\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t<Btn icon=\"dash\" tooltip={locale('zoom_out')}\n\t\t\t\tonClick={() => changeScale(scale * 1.5)} />\n\t\t\t<Btn icon=\"plus\" tooltip={locale('zoom_in')}\n\t\t\t\tonClick={() => changeScale(scale / 1.5)} />\n\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\tonClick={() => setSeed(randomSeed())} />\n\t\t</div>\n\t\t<canvas ref={canvas} width=\"256\" height=\"256\"></canvas>\n\t</>\n}\n","import { DataModel } from '@mcschema/core'\nimport { LegacyRandom, NoiseParameters, NormalNoise } from 'deepslate'\nimport type { VersionId } from '../services'\n\nexport type NoiseOptions = {\n\toffset: [number, number],\n\tscale: number,\n\tseed: bigint,\n\tversion: VersionId,\n}\n\nexport function normalNoise(state: any, img: ImageData, options: NoiseOptions) {\n\tconst random = new LegacyRandom(options.seed)\n\tconst params = NoiseParameters.fromJson(DataModel.unwrapLists(state))\n\tconst noise = new NormalNoise(random, params)\n\n\tconst ox = -options.offset[0] - 100\n\tconst oz = -options.offset[1] - 100\n\tconst data = img.data\n\tfor (let x = 0; x < 256; x += 1) {\n\t\tfor (let y = 0; y < 256; y += 1) {\n\t\t\tconst i = x * 4 + y * 4 * 256\n\t\t\tconst xx = (x + ox) * options.scale\n\t\t\tconst yy = (y + oz) * options.scale\n\t\t\tconst color = (noise.sample(xx, yy, 0) + 1) * 128\n\t\t\tdata[i] = color\n\t\t\tdata[i + 1] = color\n\t\t\tdata[i + 2] = color\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n","import { useEffect, useMemo, useRef, useState } from 'preact/hooks'\nimport type { PreviewProps } from '.'\nimport { Btn, BtnInput, BtnMenu } from '..'\nimport { useLocale } from '../../contexts'\nimport { useCanvas } from '../../hooks'\nimport { getNoiseBlock, noiseSettings } from '../../previews'\nimport { CachedCollections, checkVersion } from '../../services'\nimport { randomSeed } from '../../Utils'\n\nexport const NoiseSettingsPreview = ({ data, shown, version }: PreviewProps) => {\n\tconst { locale } = useLocale()\n\tconst [seed, setSeed] = useState(randomSeed())\n\tconst [biome, setBiome] = useState('minecraft:plains')\n\tconst [biomeScale, setBiomeScale] = useState(0.2)\n\tconst [biomeDepth, setBiomeDepth] = useState(0.1)\n\tconst [autoScroll, setAutoScroll] = useState(false)\n\tconst [focused, setFocused] = useState<string | undefined>(undefined)\n\tconst offset = useRef(0)\n\tconst scrollInterval = useRef<number | undefined>(undefined)\n\tconst state = JSON.stringify([data, biomeScale, biomeDepth])\n\n\tconst size = data?.noise?.height ?? 256\n\tconst { canvas, redraw } = useCanvas({\n\t\tsize() {\n\t\t\treturn [size, size]\n\t\t},\n\t\tasync draw(img) {\n\t\t\tconst options = { biome, biomeDepth, biomeScale, offset: offset.current, width: img.width, seed, version }\n\t\t\tawait noiseSettings(data, img, options)\n\t\t},\n\t\tasync onDrag(dx) {\n\t\t\toffset.current += dx * size\n\t\t\tredraw()\n\t\t},\n\t\tasync onHover(x, y) {\n\t\t\tconst worldX = Math.floor(x * size - offset.current)\n\t\t\tconst worldY = size - Math.max(1, Math.ceil(y * size)) + (data?.noise?.min_y ?? 0)\n\t\t\tconst block = getNoiseBlock(worldX, worldY)\n\t\t\tsetFocused(block ? `Y=${worldY} (${block.getName().path})` : `Y=${worldY}`)\n\t\t},\n\t\tonLeave() {\n\t\t\tsetFocused(undefined)\n\t\t},\n\t}, [state, seed])\n\n\tuseEffect(() => {\n\t\tif (scrollInterval.current) {\n\t\t\tclearInterval(scrollInterval.current)\n\t\t}\n\t\tif (shown) {\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tawait redraw()\n\t\t\t\t\tif (autoScroll) {\n\t\t\t\t\t\tscrollInterval.current = setInterval(() => {\n\t\t\t\t\t\t\toffset.current -= 8\n\t\t\t\t\t\t\tredraw()\n\t\t\t\t\t\t}, 100) as any\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow e\n\t\t\t\t}\n\t\t\t})()\n\t\t}\n\t}, [state, seed, shown, biome, biomeScale, biomeDepth, autoScroll])\n\n\tconst allBiomes = useMemo(() => CachedCollections?.get('worldgen/biome') ?? [], [version])\n\n\treturn <>\n\t\t<div class=\"controls preview-controls\">\n\t\t\t{focused && <Btn label={focused} class=\"no-pointer\" />}\n\t\t\t<BtnMenu icon=\"gear\" tooltip={locale('terrain_settings')}>\n\t\t\t\t{checkVersion(version, undefined, '1.17') ? <>\n\t\t\t\t\t<BtnInput label={locale('preview.scale')} value={`${biomeScale}`} onChange={v => setBiomeScale(Number(v))} />\n\t\t\t\t\t<BtnInput label={locale('preview.depth')} value={`${biomeDepth}`} onChange={v => setBiomeDepth(Number(v))} />\n\t\t\t\t</> :\n\t\t\t\t\t<BtnInput label={locale('preview.biome')} value={biome} onChange={setBiome} dataList={allBiomes} larger />\n\t\t\t\t}\n\t\t\t\t<Btn icon={autoScroll ? 'square_fill' : 'square'} label={locale('preview.auto_scroll')} onClick={() => setAutoScroll(!autoScroll)} />\n\t\t\t</BtnMenu>\n\t\t\t<Btn icon=\"sync\" tooltip={locale('generate_new_seed')}\n\t\t\t\tonClick={() => setSeed(randomSeed())} />\n\t\t</div>\n\t\t<canvas ref={canvas} width={size} height={size}></canvas>\n\t</>\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport { useState } from 'preact/hooks'\nimport { useModel } from '../../hooks'\nimport type { VersionId } from '../../services'\nimport { checkVersion } from '../../services'\nimport { BiomeSourcePreview, DecoratorPreview, DensityFunctionPreview, NoisePreview, NoiseSettingsPreview } from '../previews'\n\nexport const HasPreview = ['dimension', 'worldgen/density_function', 'worldgen/noise', 'worldgen/noise_settings', 'worldgen/configured_feature', 'worldgen/placed_feature']\n\ntype PreviewPanelProps = {\n\tmodel: DataModel | null,\n\tversion: VersionId,\n\tid: string,\n\tshown: boolean,\n\tonError: (message: string) => unknown,\n}\nexport function PreviewPanel({ model, version, id, shown }: PreviewPanelProps) {\n\tconst [, setCount] = useState(0)\n\n\tuseModel(model, () => {\n\t\tsetCount(count => count + 1)\n\t})\n\n\tif (!model) return <></>\n\n\tif (id === 'dimension' && model.get(new Path(['generator', 'type']))?.endsWith('noise')) {\n\t\tconst data = model.get(new Path(['generator', 'biome_source']))\n\t\tif (data) return <BiomeSourcePreview {...{ model, version, shown, data }} />\n\t}\n\n\tif (id === 'worldgen/density_function') {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return <DensityFunctionPreview {...{ model, version, shown, data }} />\n\t}\n\n\tif (id === 'worldgen/noise') {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return <NoisePreview {...{ model, version, shown, data }} />\n\t}\n\n\tif (id === 'worldgen/noise_settings') {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return <NoiseSettingsPreview {...{ model, version, shown, data }} />\n\t}\n\n\tif ((id === 'worldgen/placed_feature' || (id === 'worldgen/configured_feature' && checkVersion(version, '1.16', '1.17')))) {\n\t\tconst data = model.get(new Path([]))\n\t\tif (data) return <DecoratorPreview {...{ model, version, shown, data }} />\n\t}\n\n\treturn <></>\n}\n","import type { DataModel, Hook } from '@mcschema/core'\nimport { ModelPath, relativePath } from '@mcschema/core'\nimport type { BlockStateRegistry } from '../services'\n\nexport function getOutput(model: DataModel, blockStates: BlockStateRegistry): any {\n\treturn model.schema.hook(transformOutput, new ModelPath(model), model.data, { blockStates })\n}\n\nexport type OutputProps = {\n\tblockStates: BlockStateRegistry,\n}\nexport const transformOutput: Hook<[any, OutputProps], any> = {\n\tbase({}, _, value) {\n\t\treturn value\n\t},\n\n\tchoice({ switchNode }, path, value, props) {\n\t\treturn switchNode.hook(this, path, value, props)\n\t},\n\n\tlist({ children }, path, value, props) {\n\t\tif (!Array.isArray(value)) return value\n\t\tconst res = value.map((obj, index) =>\n\t\t\tchildren.hook(this, path.push(index), obj.node, props)\n\t\t)\n\t\tfor (const a of Object.getOwnPropertySymbols(value)) {\n\t\t\tres[a as any] = value[a as any]\n\t\t}\n\t\treturn res\n\t},\n\n\tmap({ children, config }, path, value, props) {\n\t\tif (value === undefined) return undefined\n\t\tconst blockState = config.validation?.validator === 'block_state_map'? props.blockStates?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst res: any = {}\n\t\tObject.keys(value).forEach(f => {\n\t\t\tif (blockState) {\n\t\t\t\tif (!Object.keys(blockState.properties ?? {}).includes(f)) return\n\t\t\t}\n\t\t\tres[f] = children.hook(this, path.push(f), value[f], props)\n\t\t})\n\t\tfor (const a of Object.getOwnPropertySymbols(value)) {\n\t\t\tres[a as any] = value[a]\n\t\t}\n\t\treturn res\n\t},\n\n\tobject({ getActiveFields }, path, value, props) {\n\t\tif (value === undefined || value === null || typeof value !== 'object') {\n\t\t\treturn value\n\t\t}\n\t\tconst res: any = {}\n\t\tconst activeFields = getActiveFields(path)\n\t\tObject.keys(activeFields)\n\t\t\t.filter(k => activeFields[k].enabled(path))\n\t\t\t.forEach(f => {\n\t\t\t\tconst out = activeFields[f].hook(this, path.push(f), value[f], props)\n\t\t\t\tif (out !== undefined && out !== null) {\n\t\t\t\t\tres[f] = out\n\t\t\t\t}\n\t\t\t})\n\t\tfor (const a of Object.getOwnPropertySymbols(value)) {\n\t\t\tres[a as any] = value[a]\n\t\t}\n\t\treturn res\n\t},\n}\n","import { DataModel } from '@mcschema/core'\nimport brace from 'brace'\nimport 'brace/mode/json'\nimport 'brace/mode/yaml'\nimport json from 'comment-json'\nimport yaml from 'js-yaml'\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, BtnMenu } from '..'\nimport { useLocale } from '../../contexts'\nimport { useModel } from '../../hooks'\nimport { getOutput } from '../../schema/transformOutput'\nimport type { BlockStateRegistry } from '../../services'\nimport { Store } from '../../Store'\nimport { message } from '../../Utils'\n\nconst INDENT: Record<string, number | string | undefined> = {\n\t'2_spaces': 2,\n\t'4_spaces': 4,\n\ttabs: '\\t',\n\tminified: undefined,\n}\n\nconst FORMATS: Record<string, {\n\tparse: (v: string) => any,\n\tstringify: (v: any, indentation: string | number | undefined) => string,\n}> = {\n\tjson: {\n\t\tparse: json.parse,\n\t\tstringify: (v, i) => json.stringify(v, null, i) + '\\n',\n\t},\n\tyaml: {\n\t\tparse: yaml.load,\n\t\tstringify: (v, i) => yaml.dump(v, {\n\t\t\tflowLevel: i === undefined ? 0 : -1,\n\t\t\tindent: typeof i === 'string' ? 4 : i,\n\t\t}),\n\t},\n}\n\ninterface Editor {\n\tgetValue(): string\n\tsetValue(value: string): void\n\tconfigure(indent: string, format: string): void\n\tselect(): void\n}\n\ntype SourcePanelProps = {\n\tname: string,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tdoCopy?: number,\n\tdoDownload?: number,\n\tdoImport?: number,\n\tcopySuccess: () => unknown,\n\tonError: (message: string | Error) => unknown,\n}\nexport function SourcePanel({ name, model, blockStates, doCopy, doDownload, doImport, copySuccess, onError }: SourcePanelProps) {\n\tconst { locale } = useLocale()\n\tconst [indent, setIndent] = useState(Store.getIndent())\n\tconst [format, setFormat] = useState(Store.getFormat())\n\tconst [highlighting, setHighlighting] = useState(Store.getHighlighting())\n\tconst download = useRef<HTMLAnchorElement>(null)\n\tconst retransform = useRef<Function>()\n\tconst onImport = useRef<(e: any) => any>()\n\n\tconst textarea = useRef<HTMLTextAreaElement>()\n\tconst editor = useRef<Editor>()\n\n\tconst getSerializedOutput = useCallback((model: DataModel, blockStates: BlockStateRegistry) => {\n\t\tconst data = getOutput(model, blockStates)\n\t\treturn FORMATS[format].stringify(data, INDENT[indent])\n\t}, [indent, format])\n\n\tuseEffect(() => {\n\t\tretransform.current = () => {\n\t\t\tif (!model || !blockStates) return\n\t\t\ttry {\n\t\t\t\tconst output = getSerializedOutput(model, blockStates)\n\t\t\t\teditor.current.setValue(output)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof Error) {\n\t\t\t\t\te.message = `Error getting JSON output: ${e.message}`\n\t\t\t\t\tonError(e)\n\t\t\t\t} else {\n\t\t\t\t\tonError(`Error getting JSON output: ${message(e)}`)\n\t\t\t\t}\n\t\t\t\tconsole.error(e)\n\t\t\t\teditor.current.setValue('')\n\t\t\t}\n\t\t}\n\n\t\tonImport.current = () => {\n\t\t\tconst value = editor.current.getValue()\n\t\t\tif (value.length === 0) return\n\t\t\ttry {\n\t\t\t\tconst data = FORMATS[format].parse(value)\n\t\t\t\tmodel?.reset(DataModel.wrapLists(data), false)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof Error) {\n\t\t\t\t\te.message = `Error importing: ${e.message}`\n\t\t\t\t\tonError(e)\n\t\t\t\t} else {\n\t\t\t\t\tonError(`Error importing: ${message(e)}`)\n\t\t\t\t}\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t}\n\t}, [model, blockStates, indent, format, highlighting])\n\n\tuseEffect(() => {\n\t\tif (highlighting) {\n\t\t\tconst braceEditor = brace.edit('editor')\n\t\t\tbraceEditor.setOptions({\n\t\t\t\tfontSize: 14,\n\t\t\t\tshowFoldWidgets: false,\n\t\t\t\thighlightSelectedWord: false,\n\t\t\t})\n\t\t\tbraceEditor.$blockScrolling = Infinity\n\t\t\tbraceEditor.on('blur', e => onImport.current(e))\n\t\t\tbraceEditor.getSession().setMode('ace/mode/json')\n\n\t\t\teditor.current = {\n\t\t\t\tgetValue() {\n\t\t\t\t\treturn braceEditor.getSession().getValue()\n\t\t\t\t},\n\t\t\t\tsetValue(value) {\n\t\t\t\t\tbraceEditor.getSession().setValue(value)\n\t\t\t\t},\n\t\t\t\tconfigure(indent, format) {\n\t\t\t\t\tbraceEditor.setOption('useSoftTabs', indent !== 'tabs')\n\t\t\t\t\tbraceEditor.setOption('tabSize', indent === 'tabs' ? 4 : INDENT[indent])\n\t\t\t\t\tbraceEditor.getSession().setMode(`ace/mode/${format}`)\n\t\t\t\t},\n\t\t\t\tselect() {\n\t\t\t\t\tbraceEditor.selectAll()\n\t\t\t\t},\n\t\t\t}\n\t\t} else {\n\t\t\teditor.current = {\n\t\t\t\tgetValue() {\n\t\t\t\t\treturn textarea.current.value\n\t\t\t\t},\n\t\t\t\tsetValue(value: string) {\n\t\t\t\t\ttextarea.current.value = value\n\t\t\t\t},\n\t\t\t\tconfigure() {},\n\t\t\t\tselect() {},\n\t\t\t}\n\t\t}\n\t}, [highlighting])\n\n\tuseModel(model, () => {\n\t\tretransform.current()\n\t})\n\tuseEffect(() => {\n\t\tif (model) retransform.current()\n\t}, [model])\n\n\tuseEffect(() => {\n\t\teditor.current.configure(indent, format)\n\t\tretransform.current()\n\t}, [indent, format, highlighting])\n\n\tuseEffect(() => {\n\t\tif (doCopy && model && blockStates) {\n\t\t\tnavigator.clipboard.writeText(getSerializedOutput(model, blockStates)).then(() => {\n\t\t\t\tcopySuccess()\n\t\t\t})\n\t\t}\n\t}, [doCopy])\n\n\tuseEffect(() => {\n\t\tif (doDownload && model && blockStates && download.current) {\n\t\t\tconst content = encodeURIComponent(getSerializedOutput(model, blockStates))\n\t\t\tdownload.current.setAttribute('href', `data:text/json;charset=utf-8,${content}`)\n\t\t\tdownload.current.setAttribute('download', `${name}.${format}`)\n\t\t\tdownload.current.click()\n\t\t}\n\t}, [doDownload])\n\n\tuseEffect(() => {\n\t\tif (doImport && editor.current) {\n\t\t\teditor.current.setValue('')\n\t\t\teditor.current.select()\n\t\t}\n\t}, [doImport])\n\n\tconst changeIndent = (value: string) => {\n\t\tStore.setIndent(value)\n\t\tsetIndent(value)\n\t}\n\n\tconst changeFormat = (value: string) => {\n\t\tStore.setFormat(value)\n\t\tsetFormat(value)\n\t}\n\n\tconst changeHighlighting = (value: boolean) => {\n\t\tStore.setHighlighting(value)\n\t\tsetHighlighting(value)\n\t}\n\n\treturn <> \n\t\t<div class=\"controls source-controls\">\n\t\t\t<BtnMenu icon=\"gear\" tooltip={locale('output_settings')} data-cy=\"source-controls\">\n\t\t\t\t{Object.entries(INDENT).map(([key]) =>\n\t\t\t\t\t<Btn label={locale(`indentation.${key}`)} active={indent === key}\n\t\t\t\t\t\tonClick={() => changeIndent(key)}/>\n\t\t\t\t)}\n\t\t\t\t<hr />\n\t\t\t\t{Object.keys(FORMATS).map(key =>\n\t\t\t\t\t<Btn label={locale(`format.${key}`)} active={format === key}\n\t\t\t\t\t\tonClick={() => changeFormat(key)} />)}\n\t\t\t\t<hr />\n\t\t\t\t<Btn icon={highlighting ? 'square_fill' : 'square'} label={locale('highlighting')}\n\t\t\t\t\tonClick={() => changeHighlighting(!highlighting)} />\n\t\t\t</BtnMenu>\n\t\t</div>\n\t\t{highlighting\n\t\t\t? <pre id=\"editor\" class=\"source\"></pre>\n\t\t\t: <textarea ref={textarea} class=\"source\" spellcheck={false} autocorrect=\"off\" onBlur={onImport.current}></textarea>}\n\t\t<a ref={download} style=\"display: none;\"></a>\n\t</>\n}\n","import type { INode, Path } from '@mcschema/core'\nimport { DataModel } from '@mcschema/core'\n\nexport class ModelWrapper extends DataModel {\n\tconstructor(\n\t\tschema: INode<any>,\n\t\tprivate readonly mapper: (path: Path) => Path,\n\t\tprivate readonly getter: (path: Path) => any,\n\t\tprivate readonly setter: (path: Path, value: any, silent?: boolean) => any,\n\t) {\n\t\tsuper(schema)\n\t}\n\n\tmap(path: Path) {\n\t\treturn this.mapper(path)\n\t}\n\n\tget(path: Path) {\n\t\treturn this.getter(path)\n\t}\n\n\tset(path: Path, value: any, silent?: boolean) {\n\t\treturn this.setter(path, value, silent)\n\t}\n}\n","import type { BooleanHookParams, EnumOption, Hook, INode, NodeChildren, NumberHookParams, StringHookParams, ValidationOption } from '@mcschema/core'\nimport { DataModel, ListNode, MapNode, ModelPath, ObjectNode, Path, relativePath, StringNode } from '@mcschema/core'\nimport type { ComponentChildren, JSX } from 'preact'\nimport { memo } from 'preact/compat'\nimport { useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Btn, Octicon } from '../components'\nimport { localize } from '../contexts'\nimport { useFocus } from '../hooks'\nimport type { BlockStateRegistry, VersionId } from '../services'\nimport { CachedDecorator, CachedFeature } from '../services'\nimport { deepClone, deepEqual, hexId, isObject, newSeed } from '../Utils'\nimport { ModelWrapper } from './ModelWrapper'\n\nconst selectRegistries = ['loot_table.type', 'loot_entry.type', 'function.function', 'condition.condition', 'criterion.trigger', 'recipe.type', 'dimension.generator.type', 'dimension.generator.biome_source.type', 'dimension.generator.biome_source.preset', 'carver.type', 'feature.type', 'decorator.type', 'feature.tree.minimum_size.type', 'block_state_provider.type', 'trunk_placer.type', 'foliage_placer.type', 'tree_decorator.type', 'int_provider.type', 'float_provider.type', 'height_provider.type', 'structure_feature.type', 'surface_builder.type', 'processor.processor_type', 'rule_test.predicate_type', 'pos_rule_test.predicate_type', 'template_element.element_type', 'block_placer.type', 'block_predicate.type', 'material_rule.type', 'material_condition.type', 'structure_placement.type', 'density_function.type', 'root_placer.type', 'entity.type_specific.cat.variant', 'entity.type_specific.frog.variant']\nconst hiddenFields = ['number_provider.type', 'score_provider.type', 'nbt_provider.type', 'int_provider.type', 'float_provider.type', 'height_provider.type']\nconst flattenedFields = ['feature.config', 'decorator.config', 'int_provider.value', 'float_provider.value', 'block_state_provider.simple_state_provider.state', 'block_state_provider.rotated_block_provider.state', 'block_state_provider.weighted_state_provider.entries.entry.data', 'rule_test.block_state', 'structure_feature.config', 'surface_builder.config', 'template_pool.elements.entry.element', 'decorator.block_survives_filter.state', 'material_rule.block.result_state']\nconst inlineFields = ['loot_entry.type', 'function.function', 'condition.condition', 'criterion.trigger', 'dimension.generator.type', 'dimension.generator.biome_source.type', 'feature.type', 'decorator.type', 'block_state_provider.type', 'feature.tree.minimum_size.type', 'trunk_placer.type', 'foliage_placer.type', 'tree_decorator.type', 'block_placer.type', 'rule_test.predicate_type', 'processor.processor_type', 'template_element.element_type', 'nbt_operation.op', 'number_provider.value', 'score_provider.name', 'score_provider.target', 'nbt_provider.source', 'nbt_provider.target', 'generator_biome.biome', 'block_predicate.type', 'material_rule.type', 'material_condition.type', 'density_function.type', 'root_placer.type', 'entity.type_specific.type']\nconst nbtFields = ['function.set_nbt.tag', 'advancement.display.icon.nbt', 'text_component_object.nbt', 'entity.nbt', 'block.nbt', 'item.nbt']\nconst fixedLists = ['generator_biome.parameters.temperature', 'generator_biome.parameters.humidity', 'generator_biome.parameters.continentalness', 'generator_biome.parameters.erosion', 'generator_biome.parameters.depth', 'generator_biome.parameters.weirdness', 'feature.end_spike.crystal_beam_target', 'feature.end_gateway.exit', 'decorator.block_filter.offset', 'block_predicate.matching_blocks.offset', 'block_predicate.matching_fluids.offset', 'model_element.from', 'model_element.to', 'model_element.rotation.origin', 'model_element.faces.uv', 'item_transform.rotation', 'item_transform.translation', 'item_transform.scale', 'generator_structure.random_spread.locate_offset']\nconst collapsedFields = ['noise_settings.surface_rule', 'noise_settings.noise.terrain_shaper']\nconst collapsableFields = ['density_function.argument', 'density_function.argument1', 'density_function.argument2', 'density_function.input', 'density_function.when_in_range', 'density_function.when_out_of_range']\n\nconst findGenerator = (id: string) => {\n\treturn config.generators.find(g => g.id === id.replace(/^\\$/, ''))\n}\n\n/**\n * Secondary model used to remember the keys of a map\n */\nconst keysModel = new DataModel(MapNode(\n\tStringNode(),\n\tStringNode()\n), { historyMax: 0 })\n\ntype JSXTriple = [JSX.Element | null, JSX.Element | null, JSX.Element | null]\ntype RenderHook = Hook<[any, string, VersionId, BlockStateRegistry, Record<string, any>], JSXTriple>\n\ntype NodeProps<T> = T & {\n\tnode: INode<any>,\n\tpath: ModelPath,\n\tvalue: any,\n\tlang: string,\n\tversion: VersionId,\n\tstates: BlockStateRegistry,\n\tctx: Record<string, any>,\n}\n\nexport function FullNode({ model, lang, version, blockStates }: { model: DataModel, lang: string, version: VersionId, blockStates: BlockStateRegistry }) {\n\tconst path = new ModelPath(model)\n\tconst [prefix, suffix, body] = model.schema.hook(renderHtml, path, deepClone(model.data), lang, version, blockStates, {})\n\treturn suffix?.props?.children.some((c: any) => c) ? <div class={`node ${model.schema.type(path)}-node`} data-category={model.schema.category(path)}>\n\t\t<div class=\"node-header\">{prefix}{suffix}</div>\n\t\t<div class=\"node-body\">{body}</div>\n\t</div> : body\n}\n\nconst renderHtml: RenderHook = {\n\tbase() {\n\t\treturn [null, null, null]\n\t},\n\n\tboolean(params, path, value, lang, version, states, ctx) {\n\t\treturn [null, <BooleanSuffix {...{...params, path, value, lang, version, states, ctx}} />, null]\n\t},\n\n\tchoice({ choices, config, switchNode }, path, value, lang, version, states, ctx) {\n\t\tconst choice = switchNode.activeCase(path, true) as typeof choices[number]\n\t\tconst contextPath = (config?.context) ? new ModelPath(path.getModel(), new Path(path.getArray(), [config.context])) : path\n\t\tconst [prefix, suffix, body] = choice.node.hook(this, contextPath, value, lang, version, states, ctx)\n\t\tif (choices.length === 1) {\n\t\t\treturn [prefix, suffix, body]\n\t\t}\n\t\tconst choiceContextPath = config?.choiceContext ? new Path([], [config.choiceContext]) : config?.context ? new Path([], [config.context]) : path\n\t\tconst set = (type: string) => {\n\t\t\tconst c = choices.find(c => c.type === type) ?? choice\n\t\t\tconst def = c.node.default()\n\t\t\tconst newValue = c.change\n\t\t\t\t? c.change(DataModel.unwrapLists(value))\n\t\t\t\t: config.choiceContext === 'feature' && def?.type === 'minecraft:decorated' ? def.config.feature : def\n\t\t\tpath.model.set(path, DataModel.wrapLists(newValue))\n\t\t}\n\t\tconst inject = <select value={choice.type} onChange={(e) => set((e.target as HTMLSelectElement).value)}>\n\t\t\t{choices.map(c => <option value={c.type}>\n\t\t\t\t{pathLocale(lang, choiceContextPath.contextPush(c.type))}\n\t\t\t</option>)}\n\t\t</select>\n\t\treturn [prefix, <>{inject}{suffix}</>, body]\n\t},\n\n\tlist({ children, config }, path, value, lang, version, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\t\tconst [maxShown, setMaxShown] = useState(50)\n\n\t\tconst context = path.getContext().join('.')\n\t\tif (fixedLists.includes(context)) {\n\t\t\tconst prefix = <>\n\t\t\t\t{[...Array(config.maxLength!)].map((_, i) =>\n\t\t\t\t\t<ErrorPopup lang={lang} path={path.modelPush(i)} />)}\n\t\t\t\t<div class=\"fixed-list\"></div>\n\t\t\t</>\n\t\t\tconst suffix = <>{[...Array(config.maxLength)].map((_, i) => {\n\t\t\t\tconst child = children.hook(this, path.modelPush(i), value?.[i]?.node, lang, version, states, ctx)\n\t\t\t\treturn child[1]\n\t\t\t})}</>\n\t\t\treturn [prefix, suffix, null]\n\t\t}\n\n\t\tconst onAdd = () => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tconst node = DataModel.wrapLists(children.default())\n\t\t\tpath.model.set(path, [{ node, id: hexId() }, ...value])\n\t\t}\n\t\tconst onAddBottom = () => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tconst node = DataModel.wrapLists(children.default())\n\t\t\tpath.model.set(path, [...value, { node, id: hexId() }])\n\t\t}\n\t\tconst suffix = <button class=\"add tooltipped tip-se\" aria-label={localize(lang, 'add_top')} onClick={onAdd}>{Octicon.plus_circle}</button>\n\t\tconst body = <>\n\t\t\t{(value && Array.isArray(value)) && value.map(({ node: cValue, id: cId }, index) => {\n\t\t\t\tif (index === maxShown) {\n\t\t\t\t\treturn <div class=\"node node-header\">\n\t\t\t\t\t\t<label>{localize(lang, 'entries_hidden', `${value.length - maxShown}`)}</label>\n\t\t\t\t\t\t<button onClick={() => setMaxShown(Math.min(maxShown + 50, value.length))}>{localize(lang, 'entries_hidden.more', '50')}</button>\n\t\t\t\t\t\t<button onClick={() => setMaxShown(value.length)}>{localize(lang, 'entries_hidden.all')}</button>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tif (index > maxShown) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\n\t\t\t\tconst cPath = path.push(index).contextPush('entry')\n\t\t\t\tconst canToggle = children.type(cPath) === 'object'\n\t\t\t\tconst toggle = isToggled(cId)\n\t\t\t\tif (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {\n\t\t\t\t\treturn <div class=\"node node-header\" data-category={children.category(cPath)}>\n\t\t\t\t\t\t<ErrorPopup lang={lang} path={cPath} nested />\n\t\t\t\t\t\t<button class=\"toggle tooltipped tip-se\" aria-label={`${localize(lang, 'expand')}\\n${localize(lang, 'expand_all', 'Ctrl')}`} onClick={expand(cId)}>{Octicon.chevron_right}</button>\n\t\t\t\t\t\t<label>{pathLocale(lang, cPath, `${index}`)}</label>\n\t\t\t\t\t\t<Collapsed key={cId} path={cPath} value={cValue} schema={children} />\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\tconst onRemove = () => cPath.set(undefined)\n\t\t\t\tconst onMoveUp = () => {\n\t\t\t\t\tconst v = [...path.get()];\n\t\t\t\t\t[v[index - 1], v[index]] = [v[index], v[index - 1]]\n\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t}\n\t\t\t\tconst onMoveDown = () => {\n\t\t\t\t\tconst v = [...path.get()];\n\t\t\t\t\t[v[index + 1], v[index]] = [v[index], v[index + 1]]\n\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t}\n\t\t\t\tconst actions: MenuAction[] = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'duplicate',\n\t\t\t\t\t\tlabel: 'duplicate',\n\t\t\t\t\t\tonSelect: () => {\n\t\t\t\t\t\t\tconst v = [...path.get()]\n\t\t\t\t\t\t\tv.splice(index, 0, { id: hexId(), node: deepClone(cValue) })\n\t\t\t\t\t\t\tpath.model.set(path, v)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t\treturn <MemoedTreeNode key={cId} path={cPath} schema={children} value={cValue} {...{lang, version, states, actions}} ctx={{...ctx, index: (index === 0 ? 1 : 0) + (index === value.length - 1 ? 2 : 0)}}>\n\t\t\t\t\t{canToggle && <button class=\"toggle tooltipped tip-se\" aria-label={`${localize(lang, 'collapse')}\\n${localize(lang, 'collapse_all', 'Ctrl')}`} onClick={collapse(cId)}>{Octicon.chevron_down}</button>}\n\t\t\t\t\t<button class=\"remove tooltipped tip-se\" aria-label={localize(lang, 'remove')} onClick={onRemove}>{Octicon.trashcan}</button>\n\t\t\t\t\t{value.length > 1 && <div class=\"node-move\">\n\t\t\t\t\t\t<button class=\"move tooltipped tip-se\" aria-label={localize(lang, 'move_up')} onClick={onMoveUp} disabled={index === 0}>{Octicon.chevron_up}</button>\n\t\t\t\t\t\t<button class=\"move tooltipped tip-se\" aria-label={localize(lang, 'move_down')} onClick={onMoveDown} disabled={index === value.length - 1}>{Octicon.chevron_down}</button>\n\t\t\t\t\t</div>}\n\t\t\t\t</MemoedTreeNode>\n\t\t\t})}\n\t\t\t{(value && value.length > 0 && value.length <= maxShown) && <div class=\"node node-header\">\n\t\t\t\t<button class=\"add tooltipped tip-se\" aria-label={localize(lang, 'add_bottom')} onClick={onAddBottom}>{Octicon.plus_circle}</button>\n\t\t\t</div>}\n\t\t</>\n\t\treturn [null, suffix, body]\n\t},\n\n\tmap({ children, keys, config }, path, value, lang, version, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\n\t\tconst keyPath = new ModelPath(keysModel, new Path([hashString(path.toString())]))\n\t\tconst onAdd = () => {\n\t\t\tconst key = keyPath.get()\n\t\t\tpath.model.set(path.push(key), DataModel.wrapLists(children.default()))\n\t\t}\n\t\tconst blockState = config.validation?.validator === 'block_state_map' ? states?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst keysSchema = blockState?.properties\n\t\t\t? StringNode(null!, { enum: Object.keys(blockState.properties ?? {}) })\n\t\t\t: keys\n\t\tif (blockState && path.last() === 'Properties') {\n\t\t\tif (typeof value !== 'object') value = {}\n\t\t\tconst properties = Object.entries(blockState.properties ?? {})\n\t\t\t\t.map(([key, values]) => [key, StringNode(null!, { enum: values })])\n\t\t\tObject.entries(blockState.properties ?? {}).forEach(([key, values]) => {\n\t\t\t\tif (typeof value[key] !== 'string') {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.expected_string')\n\t\t\t\t} else if (!values.includes(value[key])) {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.invalid_enum_option', value[key])\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn ObjectNode(Object.fromEntries(properties)).hook(this, path, value, lang, version, states, ctx)\n\t\t}\n\t\tconst suffix = <>\n\t\t\t{keysSchema.hook(this, keyPath, keyPath.get() ?? '', lang, version, states, ctx)[1]}\n\t\t\t<button class=\"add tooltipped tip-se\" aria-label={localize(lang, 'add')} onClick={onAdd}>{Octicon.plus_circle}</button>\n\t\t</>\n\t\tconst body = <>\n\t\t\t{typeof value === 'object' && Object.entries(value).map(([key, cValue]) => {\n\n\t\t\t\tconst cPath = path.modelPush(key)\n\t\t\t\tconst canToggle = children.type(cPath) === 'object'\n\t\t\t\tconst toggle = isToggled(key)\n\t\t\t\tif (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {\n\t\t\t\t\treturn <div class=\"node node-header\" data-category={children.category(cPath)}>\n\t\t\t\t\t\t<ErrorPopup lang={lang} path={cPath} nested />\n\t\t\t\t\t\t<button class=\"toggle tooltipped tip-se\" aria-label={`${localize(lang, 'expand')}\\n${localize(lang, 'expand_all', 'Ctrl')}`} onClick={expand(key)}>{Octicon.chevron_right}</button>\n\t\t\t\t\t\t<label>{key}</label>\n\t\t\t\t\t\t<Collapsed key={key} path={cPath} value={cValue} schema={children} />\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tconst cSchema = blockState\n\t\t\t\t\t? StringNode(null!, { enum: blockState.properties?.[key] ?? [] })\n\t\t\t\t\t: children\n\t\t\t\tif (blockState?.properties?.[key] && typeof cValue === 'string'\n\t\t\t\t\t&& !blockState.properties?.[key].includes(cValue)) {\n\t\t\t\t\tpath.model.errors.add(cPath, 'error.invalid_enum_option', cValue)\n\t\t\t\t}\n\t\t\t\tconst onRemove = () => cPath.set(undefined)\n\t\t\t\treturn <MemoedTreeNode key={key} schema={cSchema} path={cPath} value={cValue} {...{lang, version, states, ctx}} label={key}>\n\t\t\t\t\t{canToggle && <button class=\"toggle tooltipped tip-se\" aria-label={`${localize(lang, 'collapse')}\\n${localize(lang, 'collapse_all', 'Ctrl')}`} onClick={collapse(key)}>{Octicon.chevron_down}</button>}\n\t\t\t\t\t<button class=\"remove tooltipped tip-se\" aria-label={localize(lang, 'remove')} onClick={onRemove}>{Octicon.trashcan}</button>\n\t\t\t\t</MemoedTreeNode>\n\t\t\t})}\n\t\t</>\n\t\treturn [null, suffix, body]\n\t},\n\n\tnumber(params, path, value, lang, version, states, ctx) {\n\t\treturn [null, <NumberSuffix {...{...params, path, value, lang, version, states, ctx}} />, null]\n\t},\n\n\tobject({ node, config, getActiveFields, getChildModelPath }, path, value, lang, version, states, ctx) {\n\t\tconst { expand, collapse, isToggled } = useToggles()\n\n\t\tif (path.getArray().length == 0 && isDecorated(config.context, value)) {\n\t\t\tconst { wrapper, fields } = createDecoratorsWrapper(getActiveFields(path), path, value)\n\t\t\tvalue = wrapper.data\n\t\t\tgetActiveFields = () => fields\n\t\t\tgetChildModelPath = (path, key) => new ModelPath(wrapper, new Path(path.getArray(), ['feature'])).push(key)\n\t\t}\n\n\t\tlet prefix: JSX.Element | null = null\n\t\tlet suffix: JSX.Element | null = null\n\t\tif (node.optional()) {\n\t\t\tif (value === undefined) {\n\t\t\t\tconst onExpand = () => path.set(DataModel.wrapLists(node.default()))\n\t\t\t\tsuffix = <button class=\"collapse closed tooltipped tip-se\" aria-label={localize(lang, 'expand')} onClick={onExpand}>{Octicon.plus_circle}</button>\n\t\t\t} else {\n\t\t\t\tconst onCollapse = () => path.set(undefined)\n\t\t\t\tsuffix = <button class=\"collapse open tooltipped tip-se\" aria-label={localize(lang, 'remove')} onClick={onCollapse}>{Octicon.trashcan}</button>\n\t\t\t}\n\t\t}\n\t\tconst context = path.getContext().join('.')\n\t\tif (collapsableFields.includes(context) || collapsedFields.includes(context)) {\n\t\t\tconst toggled = isToggled('')\n\t\t\tconst expanded = collapsedFields.includes(context) ? toggled : !toggled\n\t\t\tprefix = <>\n\t\t\t\t<button class=\"toggle tooltipped tip-se\" aria-label={localize(lang, expanded ? 'collapse' : 'expand')} onClick={toggled ? collapse('') : expand('')}>{expanded ? Octicon.chevron_down : Octicon.chevron_right}</button>\n\t\t\t</>\n\t\t\tif (!expanded) {\n\t\t\t\treturn [prefix, suffix, null]\n\t\t\t}\n\t\t}\n\n\t\tconst newCtx = (typeof value === 'object' && value !== null && node.default()?.pools)\n\t\t\t? { ...ctx, loot: value?.type } : ctx\n\t\tconst body = <>\n\t\t\t{(typeof value === 'object' && value !== null && !(node.optional() && value === undefined)) &&\n\t\t\t\tObject.entries(getActiveFields(path))\n\t\t\t\t\t.filter(([_, child]) => child.enabled(path))\n\t\t\t\t\t.map(([key, child]) => {\n\t\t\t\t\t\tconst cPath = getChildModelPath(path, key)\n\t\t\t\t\t\tconst context = cPath.getContext().join('.')\n\t\t\t\t\t\tif (hiddenFields.includes(context)) return null\n\t\t\t\t\t\tconst [cPrefix, cSuffix, cBody] = child.hook(this, cPath, value[key], lang, version, states, newCtx)\n\t\t\t\t\t\tconst isFlattened = child.type(cPath) === 'object' && flattenedFields.includes(context)\n\t\t\t\t\t\tconst isInlined = inlineFields.includes(context)\n\t\t\t\t\t\tif (isFlattened || isInlined) {\n\t\t\t\t\t\t\tprefix = <>{prefix}<ErrorPopup lang={lang} path={cPath} /><HelpPopup lang={lang} path={cPath} />{cPrefix}</>\n\t\t\t\t\t\t\tsuffix = <>{suffix}{cSuffix}</>\n\t\t\t\t\t\t\treturn isFlattened ? cBody : null\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn <MemoedTreeNode key={key} schema={child} path={cPath} value={value[key]} {...{lang, version, states, ctx: newCtx}} />\n\t\t\t\t\t})\n\t\t\t}\n\t\t</>\n\t\treturn [prefix, suffix, body]\n\t},\n\n\tstring(params, path, value, lang, version, states, ctx) {\n\t\treturn [null, <StringSuffix {...{...params, path, value, lang, version, states, ctx}} />, null]\n\t},\n}\n\nfunction Collapsed({ path, value }: { path: ModelPath, value: any, schema: INode<any> }) {\n\tconst context = path.getContext().join('.')\n\tswitch (context) {\n\t\tcase 'loot_table.pools.entry':\n\t\t\treturn <label>{value?.entries?.length ?? 0} entries</label>\n\t\tcase 'function.set_contents.entries.entry':\n\t\tcase 'loot_pool.entries.entry':\n\t\t\treturn <label>{value?.name?.replace(/^minecraft:/, '') ?? value?.type?.replace(/^minecraft:/, '')}</label>\n\t}\n\tfor (const child of Object.values(value ?? {})) {\n\t\tif (typeof child === 'string') {\n\t\t\treturn <label>{child.replace(/^minecraft:/, '')}</label>\n\t\t}\n\t}\n\treturn null\n}\n\nfunction useToggles() {\n\tconst [toggleState, setToggleState] = useState(new Map<string, boolean>())\n\tconst [toggleAll, setToggleAll] = useState<boolean | undefined>(undefined)\n\n\tconst expand = (key: string) => (evt: MouseEvent) => {\n\t\tif (evt.ctrlKey) {\n\t\t\tsetToggleState(new Map())\n\t\t\tsetToggleAll(true)\n\t\t} else {\n\t\t\tsetToggleState(state => new Map(state.set(key, true)))\n\t\t}\n\t}\n\tconst collapse = (key: string) => (evt: MouseEvent) => {\n\t\tif (evt.ctrlKey) {\n\t\t\tsetToggleState(new Map())\n\t\t\tsetToggleAll(false)\n\t\t} else {\n\t\t\tsetToggleState(state => new Map(state.set(key, false)))\n\t\t}\n\t}\n\t\n\tconst isToggled = (key: string) => {\n\t\tif (!(toggleState instanceof Map)) return false\n\t\treturn toggleState.get(key) ?? toggleAll\n\t}\n\n\treturn { expand, collapse, isToggled }\n}\n\nfunction BooleanSuffix({ path, node, value, lang }: NodeProps<BooleanHookParams>) {\n\tconst set = (target: boolean) => {\n\t\tpath.model.set(path, node.optional() && value === target ? undefined : target)\n\t}\n\treturn <>\n\t\t<button class={value === false ? 'selected' : ''} onClick={() => set(false)}>{localize(lang, 'false')}</button>\n\t\t<button class={value === true ? 'selected' : ''} onClick={() => set(true)}>{localize(lang, 'true')}</button>\n\t</>\n}\n\nfunction NumberSuffix({ path, config, integer, value, lang }: NodeProps<NumberHookParams>) {\n\tconst onChange = (evt: Event) => {\n\t\tconst value = (evt.target as HTMLInputElement).value\n\t\tconst parsed = integer ? parseInt(value) : parseFloat(value)\n\t\tpath.model.set(path, parsed)\n\t}\n\tconst onColor = (evt: Event) => {\n\t\tconst value = (evt.target as HTMLInputElement).value\n\t\tconst parsed = parseInt(value.slice(1), 16)\n\t\tpath.model.set(path, parsed)\n\t}\n\treturn <>\n\t\t<input type=\"text\" value={value ?? ''} onBlur={onChange} onKeyDown={evt => {if (evt.key === 'Enter') onChange(evt)}} />\n\t\t{config?.color && <input type=\"color\" value={'#' + (value?.toString(16).padStart(6, '0') ?? '000000')} onChange={onColor} />}\n\t\t{['dimension.generator.seed', 'dimension.generator.biome_source.seed', 'world_settings.seed', 'structure_placement.salt'].includes(path.getContext().join('.')) && <button onClick={() => newSeed(path.model)} class=\"tooltipped tip-se\" aria-label={localize(lang, 'generate_new_seed')}>{Octicon.sync}</button>}\n\t</>\n}\n\nfunction StringSuffix({ path, getValues, config, node, value, lang, version, states }: NodeProps<StringHookParams>) {\n\tconst onChange = (evt: Event) => {\n\t\tevt.stopPropagation()\n\t\tconst newValue = (evt.target as HTMLSelectElement).value\n\t\tif (newValue === value) return\n\t\tpath.model.set(path, newValue.length === 0 ? undefined : newValue)\n\t}\n\tconst values = getValues()\n\tconst context = path.getContext().join('.')\n\tconst id = !isEnum(config) && config?.validator === 'resource' && typeof config.params.pool === 'string' ? config.params.pool : undefined\n\n\tif (nbtFields.includes(context)) {\n\t\treturn <textarea value={value ?? ''} onBlur={onChange}></textarea>\n\t} else if ((isEnum(config) && !config.additional) || selectRegistries.includes(context)) {\n\t\tlet context = new Path([])\n\t\tif (isEnum(config) && typeof config.enum === 'string') {\n\t\t\tcontext = context.contextPush(config.enum)\n\t\t} else if (id) {\n\t\t\tcontext = context.contextPush(id)\n\t\t} else if (isEnum(config)) {\n\t\t\tcontext = path\n\t\t}\n\t\treturn <select value={value ?? ''} onChange={onChange}>\n\t\t\t{node.optional() && <option value=\"\">{localize(lang, 'unset')}</option>}\n\t\t\t{values.map(v => <option value={v}>\n\t\t\t\t{pathLocale(lang, context.contextPush(v.replace(/^minecraft:/, '')))}\n\t\t\t</option>)}\n\t\t</select>\n\t} else if (!isEnum(config) && config?.validator === 'block_state_key') {\n\t\tconst blockState = states?.[relativePath(path, config.params.id).get()]\n\t\tconst values = Object.keys(blockState?.properties ?? {})\n\t\treturn <select value={value ?? ''} onChange={onChange}>\n\t\t\t{values.map(v => <option>{v}</option>)}\n\t\t</select>\n\t} else {\n\t\tconst datalistId = hexId()\n\t\tconst gen = id ? findGenerator(id) : undefined\n\t\treturn <>\n\t\t\t<input value={value ?? ''} onBlur={onChange} onKeyDown={evt => {if (evt.key === 'Enter') onChange(evt)}}\n\t\t\t\tlist={values.length > 0 ? datalistId : ''} />\n\t\t\t{values.length > 0 && <datalist id={datalistId}>\n\t\t\t\t{values.map(v => <option value={v} />)}\n\t\t\t</datalist>}\n\t\t\t{gen && values.includes(value) && value.startsWith('minecraft:') &&\n\t\t\t\t<a href={`/${gen.url}/?version=${version}&preset=${value.replace(/^minecraft:/, '')}`} class=\"tooltipped tip-se\" aria-label={localize(lang, 'follow_reference')}>{Octicon.link_external}</a>}\n\t\t</>\n\t}\n}\n\ntype MenuAction = {\n\tlabel: string,\n\tdescription?: string,\n\ticon: keyof typeof Octicon,\n\tonSelect: () => unknown,\n}\n\ntype TreeNodeProps = {\n\tschema: INode<any>,\n\tpath: ModelPath,\n\tvalue: any,\n\tlang: string,\n\tversion: VersionId,\n\tstates: BlockStateRegistry,\n\tctx: Record<string, any>,\n\tcompare?: any,\n\tlabel?: string,\n\tactions?: MenuAction[],\n\tchildren?: ComponentChildren,\n}\nfunction TreeNode({ label, schema, path, value, lang, version, states, ctx, actions, children }: TreeNodeProps) {\n\tconst type = schema.type(path)\n\tconst category = schema.category(path)\n\tconst context = path.getContext().join('.')\n\n\tconst [active, setActive] = useFocus()\n\tconst onContextMenu = (evt: MouseEvent) => {\n\t\tevt.preventDefault()\n\t\tsetActive()\n\t}\n\n\tconst newCtx: Record<string, any> = { ...ctx, depth: (ctx.depth ?? 0) + 1 }\n\tdelete newCtx.index\n\tconst [prefix, suffix, body] = schema.hook(renderHtml, path, value, lang, version, states, newCtx)\n\treturn <div class={`node ${type}-node`} data-category={category}>\n\t\t<div class=\"node-header\" onContextMenu={onContextMenu}>\n\t\t\t<ErrorPopup lang={lang} path={path} />\n\t\t\t<HelpPopup lang={lang} path={path} />\n\t\t\t{children}\n\t\t\t{prefix}\n\t\t\t<label>\n\t\t\t\t{label ?? pathLocale(lang, path, `${path.last()}`)}\n\t\t\t\t{active && <div class=\"node-menu\">\n\t\t\t\t\t{actions?.map(a => <div key={a.label} class=\"menu-item\">\n\t\t\t\t\t\t<Btn icon={a.icon} tooltip={localize(lang, a.label)} tooltipLoc=\"se\" onClick={() => a.onSelect()}/>\n\t\t\t\t\t\t<span>{a.description ?? localize(lang, a.label)}</span>\n\t\t\t\t\t</div>)}\n\t\t\t\t\t<div class=\"menu-item\">\n\t\t\t\t\t\t<Btn icon=\"clippy\" tooltip={localize(lang, 'copy_context')} tooltipLoc=\"se\" onClick={() => navigator.clipboard.writeText(context)} />\n\t\t\t\t\t\t<span>{context}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>}\n\t\t\t</label>\n\t\t\t{suffix}\n\t\t</div>\n\t\t{body && <div class=\"node-body\">{body}</div>}\n\t</div>\n}\n\nconst MemoedTreeNode = memo(TreeNode, (prev, next) => {\n\treturn prev.schema === next.schema\n\t\t&& prev.lang === next.lang\n\t\t&& prev.path.equals(next.path)\n\t\t&& deepEqual(prev.ctx, next.ctx)\n\t\t&& deepEqual(prev.value, next.value)\n})\n\nfunction isEnum(value?: ValidationOption | EnumOption): value is EnumOption {\n\treturn !!(value as any)?.enum\n}\n\nfunction hashString(str: string) {\n\tvar hash = 0, i, chr\n\tfor (i = 0; i < str.length; i++) {\n\t\tchr = str.charCodeAt(i)\n\t\thash = ((hash << 5) - hash) + chr\n\t\thash |= 0\n\t}\n\treturn hash\n}\n\nfunction pathLocale(lang: string, path: Path, ...params: string[]) {\n\tconst ctx = path.getContext()\n\tfor (let i = 0; i < ctx.length; i += 1) {\n\t\tconst key = ctx.slice(i).join('.')\n\t\tconst result = localize(lang, key, ...params)\n\t\tif (key !== result) {\n\t\t\treturn result\n\t\t}\n\t}\n\treturn ctx[ctx.length - 1]\n}\n\nfunction ErrorPopup({ lang, path, nested }: { lang: string, path: ModelPath, nested?: boolean }) {\n\tif (path.model instanceof ModelWrapper) {\n\t\tpath = path.model.map(path).withModel(path.model)\n\t}\n\tconst e = nested\n\t\t?\tpath.model.errors.getAll().filter(e => e.path.startsWith(path))\n\t\t: path.model.errors.get(path, true)\n\tif (e.length === 0) return null\n\tconst message = localize(lang, e[0].error, ...(e[0].params ?? []))\n\treturn popupIcon('node-error', 'issue_opened', message)\n}\n\nfunction HelpPopup({ lang, path }: { lang: string, path: Path }) {\n\tconst key = path.contextPush('help').getContext().join('.')\n\tconst message = localize(lang, key)\n\tif (message === key) return null\n\treturn popupIcon('node-help', 'info', message)\n}\n\nconst popupIcon = (type: string, icon: keyof typeof Octicon, popup: string) => {\n\tconst [active, setActive] = useFocus()\n\n\treturn <div class={`node-icon ${type}${active ? ' show' : ''}`} onClick={setActive}>\n\t\t{Octicon[icon]}\n\t\t<span class=\"icon-popup\">{popup}</span>\n\t</div>\n}\n\nfunction isDecorated(context: string | undefined, value: any) {\n\treturn context === 'feature'\n\t\t&& value?.type?.replace(/^minecraft:/, '') === 'decorated'\n\t\t&& isObject(value?.config)\n}\n\nfunction createDecoratorsWrapper(originalFields: NodeChildren, path: ModelPath, value: any) {\n\tconst decorators: any[] = []\n\tconst feature = iterateNestedDecorators(value, decorators)\n\tconst fields = {\n\t\ttype: originalFields.type,\n\t\tconfig: ObjectNode({\n\t\t\tdecorators: ListNode(CachedDecorator),\n\t\t\tfeature: CachedFeature,\n\t\t}, { context: 'feature.decorated' }),\n\t}\n\tconst schema = ObjectNode(fields, { context: 'feature' })\n\tconst featurePath = new Path(['config', 'feature'])\n\tconst decoratorsPath = new Path(['config', 'decorators'])\n\tconst model = path.getModel()\n\tconst wrapper: ModelWrapper = new ModelWrapper(schema, path => {\n\t\tif (path.startsWith(featurePath)) {\n\t\t\treturn new Path([...[...Array(decorators.length - 1)].flatMap(() => ['config', 'feature']), ...path.modelArr])\n\t\t} else if (path.startsWith(decoratorsPath)) {\n\t\t\tif (path.modelArr.length === 2) {\n\t\t\t\treturn new Path([])\n\t\t\t}\n\t\t\tconst index = path.modelArr[2]\n\t\t\tif (typeof index === 'number') {\n\t\t\t\treturn new Path([...[...Array(index)].flatMap(() => ['config', 'feature']), 'config', 'decorator', ...path.modelArr.slice(3)])\n\t\t\t}\n\t\t}\n\t\treturn path\n\t}, path => {\n\t\tif (path.equals(decoratorsPath)) {\n\t\t\tconst newDecorators: any[] = []\n\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\treturn newDecorators\n\t\t}\n\t\treturn model.get(wrapper.map(path))\n\t}, (path, value, silent) => {\n\t\tif (path.startsWith(featurePath)) {\n\t\t\tconst newDecorators: any[] = []\n\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\tconst newPath =new Path([...[...Array(newDecorators.length - 1)].flatMap(() => ['config', 'feature']), ...path.modelArr])\n\t\t\treturn model.set(newPath, value, silent)\n\t\t} else if (path.startsWith(decoratorsPath)) {\n\t\t\tconst index = path.modelArr[2]\n\t\t\tif (path.modelArr.length === 2) {\n\t\t\t\tconst feature = wrapper.get(featurePath)\n\t\t\t\treturn model.set(new Path(), produceNestedDecorators(feature, value), silent)\n\t\t\t} else if (typeof index === 'number') {\n\t\t\t\tif (path.modelArr.length === 3 && value === undefined) {\n\t\t\t\t\tconst feature = wrapper.get(featurePath)\n\t\t\t\t\tconst newDecorators: any[] = []\n\t\t\t\t\titerateNestedDecorators(model.data, newDecorators)\n\t\t\t\t\tnewDecorators.splice(index, 1)\n\t\t\t\t\tconst newValue = produceNestedDecorators(feature, newDecorators)\n\t\t\t\t\treturn model.set(new Path(), newValue, silent)\n\t\t\t\t} else {\n\t\t\t\t\tconst newPath = new Path([...[...Array(index)].flatMap(() => ['config', 'feature']), 'config', 'decorator', ...path.modelArr.slice(3)])\n\t\t\t\t\treturn model.set(newPath, value, silent)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmodel.set(path, value, silent)\n\t})\n\twrapper.data = {\n\t\ttype: model.data.type,\n\t\tconfig: {\n\t\t\tdecorators,\n\t\t\tfeature,\n\t\t},\n\t}\n\twrapper.errors = model.errors\n\treturn { fields, wrapper }\n}\n\nfunction iterateNestedDecorators(value: any, decorators: any[]): any {\n\tif (value?.type?.replace(/^minecraft:/, '') !== 'decorated') {\n\t\treturn value\n\t}\n\tif (!isObject(value?.config)) {\n\t\treturn value\n\t}\n\tdecorators.push({ id: decorators.length, node: value.config.decorator })\n\treturn iterateNestedDecorators(value.config.feature ?? '', decorators)\n}\n\nfunction produceNestedDecorators(feature: any, decorators: any[]): any {\n\tif (decorators.length === 0) return feature\n\treturn {\n\t\ttype: 'minecraft:decorated',\n\t\tconfig: {\n\t\t\tdecorator: decorators.shift().node,\n\t\t\tfeature: produceNestedDecorators(feature, decorators),\n\t\t},\n\t}\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useErrorBoundary, useState } from 'preact/hooks'\nimport { useLocale } from '../../contexts'\nimport { useModel } from '../../hooks'\nimport { FullNode } from '../../schema/renderHtml'\nimport type { BlockStateRegistry, VersionId } from '../../services'\n\ntype TreePanelProps = {\n\tversion: VersionId,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tonError: (message: string) => unknown,\n}\nexport function Tree({ version, model, blockStates, onError }: TreePanelProps) {\n\tconst { lang } = useLocale()\n\tif (!model || !blockStates || lang === 'none') return <></>\n\n\tconst [error] = useErrorBoundary(e => {\n\t\tonError(`Error rendering the tree: ${e.message}`)\n\t\tconsole.error(e)\n\t})\n\tif (error) return <></>\n\n\tconst [, setState] = useState(0)\n\tuseModel(model, () => {\n\t\tsetState(state => state + 1)\n\t})\n\n\treturn <div class=\"tree\" data-cy=\"tree\">\n\t\t<FullNode {...{model, lang, version, blockStates}}/>\n\t</div>\n}\n","import { Giscus as GiscusReact } from '@giscus/react'\nimport { useTheme } from '../contexts'\n\ninterface Props {\n\tterm?: string,\n}\nexport function Giscus({ term }: Props) {\n\tconst { actualTheme } = useTheme()\n\tconst themeSuffix = actualTheme === 'light' ? '-burn' : ''\n\tconst themeUrl = (import.meta as any).env.DEV\n\t\t? `http://localhost:3000/src/styles/giscus${themeSuffix}.css`\n\t\t: `https://${location.host}/assets/giscus${themeSuffix}.css`\n\n\treturn <GiscusReact\n\t\trepo=\"misode/misode.github.io\"\n\t\trepoId=\"MDEwOlJlcG9zaXRvcnkxOTIyNTQyMzA=\"\n\t\tcategory=\"Site\"\n\t\tcategoryId=\"DIC_kwDOC3WRFs4COB8r\"\n\t\tmapping={term ? 'specific' : 'pathname'}\n\t\tterm={term}\n\t\treactionsEnabled=\"1\"\n\t\temitMetadata=\"0\"\n\t\tinputPosition=\"top\"\n\t\ttheme={themeUrl}\n\t\tlang=\"en\" />\n}\n","import { getCurrentUrl, Link, route } from 'preact-router'\nimport { Btn, BtnMenu, Icons, Octicon } from '.'\nimport config from '../../config.json'\nimport { useLocale, useTheme, useTitle, useVersion } from '../contexts'\nimport { checkVersion } from '../services'\nimport { cleanUrl, getGenerator } from '../Utils'\n\nconst Themes: Record<string, keyof typeof Octicon> = {\n\tsystem: 'device_desktop',\n\tdark: 'moon',\n\tlight: 'sun',\n}\n\nexport function Header() {\n\tconst { lang, locale, changeLanguage } = useLocale()\n\tconst { theme, changeTheme } = useTheme()\n\tconst { version } = useVersion()\n\tconst { title } = useTitle()\n\tconst gen = getGenerator(getCurrentUrl())\n\n\treturn <header>\n\t\t<div class=\"title\">\n\t\t\t<Link class=\"home-link\" href=\"/\" aria-label={locale('home')} data-cy=\"home-link\">{Icons.home}</Link>\n\t\t\t<h1>{title}</h1>\n\t\t\t{gen && <BtnMenu icon=\"chevron_down\" tooltip={locale('switch_generator')} data-cy=\"generator-switcher\">\n\t\t\t\t{config.generators\n\t\t\t\t\t.filter(g => g.category === gen?.category && checkVersion(version, g.minVersion))\n\t\t\t\t\t.map(g =>\n\t\t\t\t\t\t<Btn label={locale(g.id)} active={g.id === gen.id} onClick={() => route(cleanUrl(g.url))} />\n\t\t\t\t\t)}\n\t\t\t</BtnMenu>}\n\t\t</div>\n\t\t<nav>\n\t\t\t<ul>\n\t\t\t\t<li data-cy=\"language-switcher\">\n\t\t\t\t\t<BtnMenu icon=\"globe\" tooltip={locale('language')}>\n\t\t\t\t\t\t{config.languages.map(({ code, name }) =>\n\t\t\t\t\t\t\t<Btn label={name} active={code === lang}\n\t\t\t\t\t\t\t\tonClick={() => changeLanguage(code)} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t</li>\n\t\t\t\t<li data-cy=\"theme-switcher\">\n\t\t\t\t\t<BtnMenu icon={Themes[theme]} tooltip={locale('theme')}>\n\t\t\t\t\t\t{Object.entries(Themes).map(([th, icon]) =>\n\t\t\t\t\t\t\t<Btn icon={icon} label={locale(`theme.${th}`)} active={th === theme}\n\t\t\t\t\t\t\t\tonClick={() => changeTheme(th)} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"dimmed\">\n\t\t\t\t\t<a href=\"https://github.com/misode/misode.github.io\" target=\"_blank\" rel=\"noreferrer\" class=\"tooltipped tip-sw\" aria-label={locale('github')}>\n\t\t\t\t\t\t{Octicon.mark_github}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</nav>\n\t</header>\n}\n","export const Icons = {\n\thome: <svg width=\"32\" height=\"28\" viewBox=\"0 0 32 28\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"26\" height=\"6\" rx=\"3\" fill=\"#7CB45C\"/><rect x=\"8\" width=\"18\" height=\"6\" rx=\"3\" fill=\"#4BA041\"/><rect y=\"11\" width=\"32\" height=\"6\" rx=\"3\" fill=\"#AAA8A8\"/><rect x=\"11\" y=\"11\" width=\"21\" height=\"6\" rx=\"3\" fill=\"#91908F\"/><rect x=\"11\" y=\"22\" width=\"21\" height=\"6\" rx=\"3\" fill=\"#70B5C3\"/><rect x=\"17\" y=\"22\" width=\"15\" height=\"6\" rx=\"3\" fill=\"#4D989B\"/></svg>,\n\treport: <svg width=\"30\" height=\"36\" viewBox=\"0 0 30 36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 16C0 13.7909 1.79086 12 4 12V12C6.20914 12 8 13.7909 8 16V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V16Z\" fill=\"#6ACC5D\"/><path d=\"M11 4C11 1.79086 12.7909 0 15 0V0C17.2091 0 19 1.79086 19 4V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V4Z\" fill=\"#FF4C4C\"/><path d=\"M22 10C22 7.79086 23.7909 6 26 6V6C28.2091 6 30 7.79086 30 10V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V10Z\" fill=\"#E5B442\"/><path d=\"M0 23C0 20.7909 1.79086 19 4 19V19C6.20914 19 8 20.7909 8 23V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V23Z\" fill=\"#2BAD1D\"/><path d=\"M11 15C11 12.7909 12.7909 11 15 11V11C17.2091 11 19 12.7909 19 15V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V15Z\" fill=\"#C10B0B\"/><path d=\"M22 19C22 16.7909 23.7909 15 26 15V15C28.2091 15 30 16.7909 30 19V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V19Z\" fill=\"#CC8E00\"/></svg>,\n\tsounds: <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"10\" cy=\"10\" r=\"10\" fill=\"#451475\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M3.5 10C3.5 8.27609 4.18482 6.62279 5.40381 5.40381C6.62279 4.18482 8.27609 3.5 10 3.5C11.7239 3.5 13.3772 4.18482 14.5962 5.40381C15.8152 6.62279 16.5 8.27609 16.5 10C16.5 11.7239 15.8152 13.3772 14.5962 14.5962C13.3772 15.8152 11.7239 16.5 10 16.5C8.27609 16.5 6.62279 15.8152 5.40381 14.5962C4.18482 13.3772 3.5 11.7239 3.5 10V10ZM10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2V2ZM8.379 7.227C8.34101 7.20412 8.29762 7.19175 8.25327 7.19117C8.20892 7.19059 8.16522 7.20181 8.12664 7.2237C8.08807 7.24558 8.05601 7.27733 8.03375 7.3157C8.0115 7.35406 7.99985 7.39765 8 7.442V12.559C8.00003 12.6033 8.0118 12.6467 8.03413 12.685C8.05646 12.7232 8.08854 12.7548 8.12708 12.7765C8.16563 12.7983 8.20926 12.8095 8.25352 12.8088C8.29778 12.8082 8.34108 12.7958 8.379 12.773L12.643 10.214C12.6798 10.1917 12.7103 10.1604 12.7315 10.1229C12.7526 10.0854 12.7638 10.043 12.7638 10C12.7638 9.95695 12.7526 9.91463 12.7315 9.87714C12.7103 9.83965 12.6798 9.80825 12.643 9.786L8.379 7.227Z\" fill=\"#C5A5E6\"/></svg>,\n}\n","import { Howl } from 'howler'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, NumberInput, RangeInput, TextInput } from '..'\nimport { useLocale, useVersion } from '../../contexts'\nimport type { SoundEvents } from '../../services'\nimport { getSoundUrl } from '../../services'\n\nexport interface SoundConfig {\n\tid: string,\n\tsound: string,\n\tdelay: number,\n\tpitch: number,\n\tvolume: number,\n}\ntype SoundConfigProps = SoundConfig & {\n\tsounds: SoundEvents,\n\tonEdit: (changes: Partial<SoundConfig>) => unknown,\n\tonDelete: () => unknown,\n\tdelayedPlay?: number,\n}\nexport function SoundConfig({ sounds, sound, delay, pitch, volume, onEdit, onDelete, delayedPlay }: SoundConfigProps) {\n\tconst { locale } = useLocale()\n\tconst { version } = useVersion()\n\tconst [loading, setLoading] = useState(true)\n\tconst [playing, setPlaying] = useState(false)\n\tconst [invalid, setInvalid] = useState(false)\n\tconst howls = useRef<Howl[]>([])\n\tconst command = `playsound minecraft:${sound} master @s ~ ~ ~ ${volume} ${pitch}`\n\n\tuseEffect(() => {\n\t\tconst soundEvent = sounds[sound]\n\t\tsetInvalid((soundEvent?.sounds?.length ?? 0) === 0)\n\t\thowls.current.forEach(h => h.stop())\n\t\thowls.current = (soundEvent?.sounds ?? []).map(entry => {\n\t\t\tconst soundPath = typeof entry === 'string' ? entry : entry.name\n\t\t\tconst url = getSoundUrl(version, soundPath)\n\t\t\tconst howl = new Howl({\n\t\t\t\tsrc: [url],\n\t\t\t\tformat: ['ogg'],\n\t\t\t\tvolume,\n\t\t\t\trate: pitch,\n\t\t\t})\n\t\t\thowl.on('end', () => {\n\t\t\t\tsetPlaying(false)\n\t\t\t})\n\t\t\tconst completed = () => {\n\t\t\t\tif (loading && howls.current.every(h => h.state() === 'loaded')) {\n\t\t\t\t\tsetLoading(false)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (howl.state() === 'loaded') {\n\t\t\t\tsetTimeout(() => completed())\n\t\t\t} else {\n\t\t\t\thowl.on('load', () => {\n\t\t\t\t\tcompleted()\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn howl\n\t\t})\n\t\tsetLoading(true)\n\t}, [sound, sounds])\n\n\tuseEffect(() => {\n\t\thowls.current.forEach(h => h.rate(pitch))\n\t}, [pitch])\n\n\tuseEffect(() => {\n\t\thowls.current.forEach(h => h.volume(volume))\n\t}, [volume])\n\n\tconst play = () => {\n\t\tif (loading || invalid) return\n\t\tstop()\n\t\tconst howl = Math.floor(Math.random() * howls.current.length)\n\t\thowls.current[howl].play()\n\t\tsetPlaying(true)\n\t}\n\tconst stop = () => {\n\t\thowls.current.forEach(h => h.stop())\n\t}\n\tuseEffect(() => {\n\t\tif (delayedPlay) setTimeout(() => play(), delay * 50)\n\t}, [delayedPlay])\n\n\tuseEffect(() => {\n\t\treturn () => stop()\n\t}, [])\n\n\tconst [copyActive, setCopyActive] = useState(false)\n\tconst copyTimeout = useRef<number | undefined>(undefined)\n\tconst copy = () => {\n\t\tnavigator.clipboard.writeText(command)\n\t\tsetCopyActive(true)\n\t\tif (copyTimeout.current !== undefined) clearTimeout(copyTimeout.current)\n\t\tcopyTimeout.current = setTimeout(() => {\n\t\t\tsetCopyActive(false)\n\t\t}, 2000) as any\n\t}\n\n\treturn <div class={`sound-config${loading ? ' loading' : playing ? ' playing' : ''}${invalid ? ' invalid' : ''}`}>\n\t\t<Btn class=\"play\" icon={invalid ? 'alert' : loading ? 'sync' : 'play'} label={locale('sounds.play')} onClick={play} tooltip={invalid ? locale('sounds.unknown_sound') : loading ? locale('sounds.loading_sound') : locale('sounds.play_sound')} tooltipLoc=\"se\" />\n\t\t<TextInput class=\"btn btn-input sound\" list=\"sound-list\" spellcheck={false}\n\t\t\tvalue={sound} onChange={sound => onEdit({ sound })} />\n\t\t<label class=\"delay-label\">{locale('sounds.delay')}: </label>\n\t\t<NumberInput class=\"btn btn-input delay\" min={0}\n\t\t\tvalue={delay} onChange={delay => onEdit({ delay })} />\n\t\t<label class=\"pitch-label\">{locale('sounds.pitch')}: </label>\n\t\t<RangeInput class=\"pitch tooltipped tip-s\" min={0.5} max={2} step={0.01}\n\t\t\taria-label={pitch.toFixed(2)} style={`--x: ${(pitch - 0.5) * (100 / 1.5)}%`}\n\t\t\tvalue={pitch} onChange={pitch => onEdit({ pitch })} />\n\t\t<label class=\"volume-label\">{locale('sounds.volume')}: </label>\n\t\t<RangeInput class=\"volume tooltipped tip-s\" min={0} max={1} step={0.01}\n\t\t\taria-label={volume.toFixed(2)} style={`--x: ${volume * 100}%`}\n\t\t\tvalue={volume} onChange={volume => onEdit({ volume })} />\n\t\t<Btn class={`copy${copyActive ? ' active' : ''}`} icon={copyActive ? 'check' : 'terminal'} label={locale('copy')} tooltip={copyActive ? locale('copied') : locale('sounds.copy_command')}\n\t\t\tonClick={copy} />\n\t\t<Btn class=\"remove\" icon=\"trashcan\" tooltip={locale('sounds.remove_sound')}\n\t\t\tonClick={() => {onDelete(); stop()}} />\n\t</div>\n}\n","import type { ComponentChildren } from 'preact'\nimport { Icons } from './Icons'\n\ntype ToolCardProps = {\n\ttitle: string,\n\tdesc?: string,\n\tlink?: string,\n\ticon?: keyof typeof Icons,\n\tchildren?: ComponentChildren,\n}\nexport function ToolCard({ title, desc, link, icon, children }: ToolCardProps) {\n\tconst content = <>\n\t\t<div class=\"tool-head\">\n\t\t\t{icon && Icons[icon]}\n\t\t\t<div>\n\t\t\t\t<h3>{title}</h3>\n\t\t\t\t<p>{desc}</p>\n\t\t\t</div>\n\t\t</div>\n\t\t{children && <div class=\"tool-body\">\n\t\t\t{children}\n\t\t</div>}\n\t</>\n\treturn link\n\t\t? <a class=\"tool-card\" href={link}>{content}</a>\n\t\t: <div class=\"tool-card\">{content}</div>\n}\n","import { useMemo, useState } from 'preact/hooks'\nimport { Octicon } from '.'\n\nconst SEPARATOR = '/'\n\ninterface Props {\n\tentries: string[],\n\tonSelect: (entry: string) => unknown,\n\tindent?: number,\n}\nexport function TreeView({ entries, onSelect, indent }: Props) {\n\tconst roots = useMemo(() => {\n\t\tconst groups: Record<string, string[]> = {}\n\t\tfor (const entry of entries) {\n\t\t\tconst i = entry.indexOf(SEPARATOR)\n\t\t\tif (i >= 0) {\n\t\t\t\tconst root = entry.slice(0, i)\n\t\t\t\t;(groups[root] ??= []).push(entry.slice(i + 1))\n\t\t\t}\n\t\t}\n\t\treturn Object.entries(groups)\n\t}, entries)\n\n\tconst leaves = useMemo(() => {\n\t\treturn entries.filter(e => !e.includes(SEPARATOR))\n\t}, entries)\n\n\tconst [hidden, setHidden] = useState(new Set<string>())\n\tconst toggle = (root: string) => {\n\t\tif (hidden.has(root)) {\n\t\t\thidden.delete(root)\n\t\t} else {\n\t\t\thidden.add(root)\n\t\t}\n\t\tsetHidden(new Set(hidden))\n\t}\n\n\treturn <div class=\"tree-view\" style={`--indent: ${indent ?? 0};`}>\n\t\t{roots.map(([r, entries]) => <div>\n\t\t\t<TreeViewEntry icon={hidden.has(r) ? 'chevron_right' : 'chevron_down'} key={r} label={r} onClick={() => toggle(r)}/>\n\t\t\t{!hidden.has(r) &&\n\t\t\t\t<TreeView entries={entries} onSelect={e => onSelect(`${r}/${e}`)} indent={(indent ?? 0) + 1} />}\n\t\t</div>)}\n\t\t{leaves.map(e => <TreeViewEntry icon=\"file\" key={e} label={e} onClick={() => onSelect(e)} />)}\n\t</div>\n}\n\ninterface TreeViewEntryProps {\n\ticon: keyof typeof Octicon,\n\tlabel: string,\n\tonClick?: () => unknown,\n}\nfunction TreeViewEntry({ icon, label, onClick }: TreeViewEntryProps) {\n\treturn <div class=\"entry\" onClick={onClick} >\n\t\t{Octicon[icon]}\n\t\t{label}\n\t</div>\n}\n","import { marked } from 'marked'\nimport { ChangelogTag } from '.'\nimport type { Change, ChangelogVersion } from '../../services'\n\ntype Props = {\n\tchange: Change,\n\tactiveTags?: string[],\n\ttoggleTag?: (tag: string) => unknown,\n}\nexport function ChangelogEntry({ change, activeTags, toggleTag }: Props) {\n\treturn <div class=\"changelog-entry\">\n\t\t<div class=\"changelog-version\">\n\t\t\t<ArticleLink {...change.version}/>\n\t\t\t<ArticleLink {...change.group}/>\n\t\t</div>\n\t\t<div class=\"changelog-tags\">\n\t\t\t{change.tags.map(tag => <ChangelogTag label={tag} onClick={toggleTag ? () => toggleTag(tag) : undefined} active={activeTags?.includes(tag)} />)}\n\t\t</div>\n\t\t<div class=\"changelog-content\" dangerouslySetInnerHTML={{ __html: marked(change.content) }} />\n\t</div>\n}\n\nfunction ArticleLink({ id, article }: ChangelogVersion) {\n\treturn article === null\n\t\t? <span>{id}</span>\n\t\t: <a href={`https://www.minecraft.net/en-us/article/${article}`} target=\"_blank\">{id}</a>\n}\n","import { Octicon } from '..'\nimport { hashString } from '../../Utils'\n\ntype TagProps = {\n\tlabel: string,\n\tactive?: boolean,\n\tonClick?: () => unknown,\n}\nexport function ChangelogTag({ label, active, onClick }: TagProps) {\n\tconst color = label === 'breaking' ? 5 : hashString(label) % 360\n\treturn <div class={`changelog-tag${active ? ' active' : ''}${onClick ? ' clickable' : ''}`} style={`--tint: ${color}`} onClick={onClick}>\n\t\t{label === 'breaking' && Octicon.alert}\n\t\t{label}\n\t</div>\n}\n","import { useMemo, useState } from 'preact/hooks'\nimport { Btn, TextInput } from '..'\nimport { useLocale } from '../../contexts'\nimport type { Change } from '../../services'\nimport { ChangelogEntry } from './ChangelogEntry'\nimport { ChangelogTag } from './ChangelogTag'\n\ninterface Props {\n\tchanges: Change[] | undefined,\n\tdefaultOrder: 'asc' | 'desc',\n}\nexport function ChangelogList({ changes, defaultOrder }: Props) {\n\tconst { locale } = useLocale()\n\t\n\tconst [search, setSearch] = useState('')\n\tconst [tags, setTags] = useState<string[]>([])\n\tconst toggleTag = (tag: string) => {\n\t\tif (!tags.includes(tag)) {\n\t\t\tsetTags([...tags, tag])\n\t\t} else {\n\t\t\tsetTags(tags.filter(t => t !== tag))\n\t\t}\n\t}\n\n\tconst filteredChangelogs = useMemo(() => {\n\t\tconst query = search.split(' ').map(q => q.trim().toLowerCase()).filter(q => q.length > 0)\n\t\tif (query.length === 0 && tags.length === 0) return changes\n\t\treturn changes?.filter(change => {\n\t\t\tif (!tags.every(tag => change.tags.includes(tag))) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst content = change.tags.join(' ') + ' ' + change.content.toLowerCase()\n\t\t\treturn query.every(q => {\n\t\t\t\tif (q.startsWith('!')) {\n\t\t\t\t\treturn q.length === 1 || !content.includes(q.slice(1))\n\t\t\t\t}\n\t\t\t\treturn content.includes(q)\n\t\t\t})\n\t\t})\n\t}, [changes, search, tags])\n\n\tconst [sort, setSort] = useState(defaultOrder === 'desc')\n\n\tconst sortedChangelogs = useMemo(() => {\n\t\treturn filteredChangelogs?.sort((a, b) => sort ? b.order - a.order : a.order - b.order)\n\t}, [filteredChangelogs, sort])\n\n\treturn <>\n\t\t<div class=\"changelog-query\">\n\t\t\t<TextInput class=\"btn btn-input changelog-search\" list=\"sound-list\" placeholder={locale('changelog.search')}\n\t\t\t\tvalue={search} onChange={setSearch} />\n\t\t\t<Btn icon={sort ? 'sort_desc' : 'sort_asc'} label={sort ? 'Newest first' : 'Oldest first'} onClick={() => setSort(!sort)} />\n\t\t</div>\n\t\t{tags.length > 0 && <div class=\"changelog-tags\">\n\t\t\t{tags.map(tag => <ChangelogTag label={tag} onClick={() => setTags(tags.filter(t => t !== tag))} />)}\n\t\t</div>}\n\t\t<div class=\"changelog-list\">\n\t\t\t{sortedChangelogs === undefined\n\t\t\t\t? <span>{locale('loading')}</span>\n\t\t\t\t: sortedChangelogs.length === 0\n\t\t\t\t\t? <span>{locale('changelog.no_results')}</span>\n\t\t\t\t\t:\tsortedChangelogs.map(change =>\n\t\t\t\t\t\t<ChangelogEntry change={change} activeTags={tags} toggleTag={toggleTag} />)}\n\t\t</div>\n\t</>\n}\n","import { useEffect, useMemo, useState } from 'preact/hooks'\nimport { VersionMetaData } from '.'\nimport { useLocale } from '../../contexts'\nimport type { Change, VersionMeta } from '../../services'\nimport { getChangelogs } from '../../services'\nimport { Giscus } from '../Giscus'\nimport { ChangelogList } from './ChangelogList'\n\ntype Tab = 'changelog' | 'discussion' \n\ninterface Props {\n\tversion: VersionMeta\n}\nexport function VersionDetail({ version }: Props) {\n\tconst { locale } = useLocale()\n\n\tconst [tab, setTab] = useState<Tab>('changelog')\n\n\tconst [changelogs, setChangelogs] = useState<Change[] | undefined>(undefined)\n\tuseEffect(() => {\n\t\tgetChangelogs()\n\t\t\t.then(changelogs => setChangelogs(\n\t\t\t\tchangelogs.map(c => ({ ...c, tags: c.tags.filter(t => t !== c.group.id) }))\n\t\t\t))\n\t\t\t.catch(e => console.error(e))\n\t}, [])\n\n\tconst filteredChangelogs = useMemo(() =>\n\t\tchangelogs?.filter(c => c.version.id === version.id || c.group.id === version.id),\n\t[version.id, changelogs])\n\n\treturn <>\n\t\t<div class=\"version-detail\">\n\t\t\t<h2>{version.name}</h2>\n\t\t\t<div class=\"version-info\">\n\t\t\t\t<VersionMetaData label={locale('versions.released')} value={releaseDate(version)} />\n\t\t\t\t<VersionMetaData label={locale('versions.release_target')} value={version.release_target} link={version.id !== version.release_target ? `/versions/?id=${version.release_target}` : undefined} />\n\t\t\t\t<VersionMetaData label={locale('versions.data_version')} value={version.data_version} />\n\t\t\t\t<VersionMetaData label={locale('versions.protocol_version')} value={version.protocol_version} />\n\t\t\t\t<VersionMetaData label={locale('versions.data_pack_format')} value={version.data_pack_version} />\n\t\t\t\t<VersionMetaData label={locale('versions.resource_pack_format')} value={version.resource_pack_version} />\n\t\t\t</div>\n\t\t\t<div class=\"version-tabs\">\n\t\t\t\t<span class={tab === 'changelog' ? 'selected' : ''} onClick={() => setTab('changelog')}>{locale('versions.technical_changes')}</span>\n\t\t\t\t<span class={tab === 'discussion' ? 'selected' : ''} onClick={() => setTab('discussion')}>{locale('versions.discussion')}</span>\n\t\t\t</div>\n\t\t\t<div class=\"version-tab\">\n\t\t\t\t{tab === 'changelog' && <ChangelogList changes={filteredChangelogs} defaultOrder=\"asc\" />}\n\t\t\t\t{tab === 'discussion' && <Giscus term={`version/${version.id}`} />}\n\t\t\t</div>\n\t\t</div>\n\t</>\n}\n\nexport function releaseDate(version: VersionMeta) {\n\treturn new Date(version.release_time).toLocaleDateString(undefined, { day: 'numeric', month: 'short', year: 'numeric' })\n}\n","import { releaseDate, VersionMetaData } from '.'\nimport { useLocale } from '../../contexts'\nimport type { VersionMeta } from '../../services'\n\ninterface Props {\n\tversion: VersionMeta,\n\tlink?: string,\n}\nexport function VersionEntry({ version, link }: Props) {\n\tconst { locale } = useLocale()\n\n\treturn <a class=\"version-entry\" href={link}>\n\t\t<span class=\"version-id\">{version.id}</span>\n\t\t<VersionMetaData label={locale('versions.released')} value={releaseDate(version)} compact />\n\t\t<VersionMetaData label={locale('versions.data_version')} value={version.data_version} optional />\n\t\t<VersionMetaData label={locale('versions.pack_format')} value={version.data_pack_version} optional />\n\t</a>\n}\n","import { useMemo, useState } from 'preact/hooks'\nimport { Checkbox, TextInput } from '..'\nimport { useLocale } from '../../contexts'\nimport type { VersionMeta } from '../../services'\nimport { VersionEntry } from './VersionEntry'\n\ninterface Props {\n\tversions: VersionMeta[]\n\tlink?: (id: string) => string\n}\nexport function VersionList({ versions, link }: Props) {\n\tconst { locale } = useLocale()\n\t\n\tconst [snapshots, setSnapshots] = useState(true)\n\tconst [search, setSearch] = useState('')\n\n\tconst filteredVersions = useMemo(() => versions.filter(v => {\n\t\tif (v.type === 'snapshot' && !snapshots) return false\n\t\treturn v.id.includes(search)\n\t}), [versions, snapshots, search])\n\n\n\treturn <>\n\t\t<div class=\"versions-controls\">\n\t\t\t<TextInput class=\"btn btn-input version-search\" list=\"sound-list\" placeholder={locale('versions.search')}\n\t\t\t\tvalue={search} onChange={setSearch} />\n\t\t\t<Checkbox label=\"Include snapshots\" value={snapshots} onChange={setSnapshots} />\n\t\t</div>\n\t\t<div class=\"version-list\">\n\t\t\t{filteredVersions.map(v => <VersionEntry version={v} link={link?.(v.id)} />)}\n\t\t\t{filteredVersions.length === 0 && <span>\n\t\t\t\t{locale('versions.no_results')}\n\t\t\t</span>}\n\t\t</div>\n\t</>\n}\n","import { Octicon } from '..'\n\ninterface Props {\n\tlabel: string,\n\tvalue: string | number,\n\tlink?: string,\n\tcompact?: boolean,\n\toptional?: boolean,\n}\nexport function VersionMetaData({ label, value, link, compact, optional }: Props) {\n\treturn <div class={`version-metadata${optional ? ' version-metadata-hide' : ''}`}>\n\t\t<span class={compact ? 'version-metadata-hide' : undefined}>{label}: </span>\n\t\t<span class=\"version-metadata-value\">{value}</span>\n\t\t{link && <a href={link} class=\"version-metadata-link\">{Octicon.link_external}</a>}\n\t</div>\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { useLocale, useTitle } from '../contexts'\nimport { cleanUrl } from '../Utils'\n\ninterface Props {\n\tcategory: string,\n\tpath?: string,\n}\nexport function Category({ category }: Props) {\n\tconst { locale } = useLocale()\n\tuseTitle(locale('title.generator_category', locale(category)))\n\treturn <main>\n\t\t<div class=\"category\">\n\t\t\t{config.generators.filter(g => g.category === category).map(g => \n\t\t\t\t<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />\n\t\t\t)}\n\t\t</div>\n\t</main>\n}\n","import { useEffect, useState } from 'preact/hooks'\nimport { Ad, ChangelogList, ErrorPanel } from '../components'\nimport { useLocale, useTitle } from '../contexts'\nimport type { Change } from '../services'\nimport { getChangelogs } from '../services'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Changelog({}: Props) {\n\tconst { locale } = useLocale()\n\tconst [error, setError] = useState<Error | null>(null)\n\tuseTitle(locale('title.changelog'))\n\n\tconst [changelogs, setChangelogs] = useState<Change[]>([])\n\tuseEffect(() => {\n\t\tgetChangelogs()\n\t\t\t.then(changelogs => setChangelogs(changelogs))\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [])\n\n\n\treturn <main>\n\t\t<Ad type=\"text\" id=\"changelog\" />\n\t\t{error && <ErrorPanel error={error} onDismiss={() => setError(null)} />}\n\t\t<div class=\"changelog\">\n\t\t\t<ChangelogList changes={changelogs} defaultOrder=\"desc\" />\n\t\t</div>\n\t</main>\n}\n","import { DataModel, Path } from '@mcschema/core'\nimport { getCurrentUrl, route } from 'preact-router'\nimport { useEffect, useErrorBoundary, useMemo, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Analytics } from '../Analytics'\nimport { Ad, Btn, BtnMenu, ErrorPanel, HasPreview, Octicon, PreviewPanel, SearchList, SourcePanel, TextInput, Tree } from '../components'\nimport { useLocale, useProject, useTitle, useVersion } from '../contexts'\nimport { useActiveTimeout, useModel } from '../hooks'\nimport { getOutput } from '../schema/transformOutput'\nimport type { BlockStateRegistry, VersionId } from '../services'\nimport { checkVersion, fetchPreset, getBlockStates, getCollections, getModel, getSnippet, shareSnippet, SHARE_KEY } from '../services'\nimport { Store } from '../Store'\nimport { cleanUrl, deepEqual, getGenerator, getSearchParams, message, setSeachParams } from '../Utils'\n\ninterface Props {\n\tdefault?: true,\n}\nexport function Generator({}: Props) {\n\tconst { locale } = useLocale()\n\tconst { version, changeVersion } = useVersion()\n\tconst { project, file, updateFile, openFile, closeFile } = useProject()\n\tconst [error, setError] = useState<Error | string | null>(null)\n\tconst [errorBoundary, errorRetry] = useErrorBoundary()\n\tif (errorBoundary) {\n\t\terrorBoundary.message = `Something went wrong rendering the generator: ${errorBoundary.message}`\n\t\treturn <main><ErrorPanel error={errorBoundary} onDismiss={errorRetry} /></main>\n\t}\n\n\tconst gen = getGenerator(getCurrentUrl())\n\tif (!gen) {\n\t\treturn <main><ErrorPanel error={`Cannot find generator \"${getCurrentUrl()}\"`} /></main>\n\t}\n\n\tconst allowedVersions = config.versions\n\t\t.filter(v => checkVersion(v.id, gen.minVersion, gen.maxVersion))\n\t\t.map(v => v.id as VersionId)\n\n\tuseTitle(locale('title.generator', locale(gen.id)), allowedVersions)\n\n\tif (!checkVersion(version, gen.minVersion)) {\n\t\tsetError(`The minimum version for this generator is ${gen.minVersion}`)\n\t}\n\tif (!checkVersion(version, undefined, gen.maxVersion)) {\n\t\tsetError(`This generator is not available in versions above ${gen.maxVersion}`)\n\t}\n\n\tconst searchParams = getSearchParams(getCurrentUrl())\n\tconst currentPreset = searchParams.get('preset')\n\tconst sharedSnippetId = searchParams.get(SHARE_KEY)\n\tuseEffect(() => {\n\t\tif (model && currentPreset) {\n\t\t\tloadPreset(currentPreset).then(preset => {\n\t\t\t\tmodel.reset(DataModel.wrapLists(preset), false)\n\t\t\t\tsetSeachParams({ version, preset: currentPreset, [SHARE_KEY]: undefined })\n\t\t\t})\n\t\t} else if (model && sharedSnippetId) {\n\t\t\tgetSnippet(sharedSnippetId).then(s => loadSnippet(model, s))\n\t\t}\n\t}, [currentPreset, sharedSnippetId])\n\n\tconst loadSnippet = (model: DataModel, snippet: any) => {\n\t\tif (snippet.version && snippet.version !== version) {\n\t\t\tchangeVersion(snippet.version, false)\n\t\t}\n\t\tif (snippet.type && snippet.type !== gen.id) {\n\t\t\tconst snippetGen = config.generators.find(g => g.id === snippet.type)\n\t\t\tif (snippetGen) {\n\t\t\t\troute(`${cleanUrl(snippetGen.url)}?${SHARE_KEY}=${snippet.id}`)\n\t\t\t}\n\t\t}\n\t\tif (snippet.show_preview && !previewShown) {\n\t\t\tsetPreviewShown(true)\n\t\t\tsetSourceShown(false)\n\t\t}\n\t\tmodel.reset(DataModel.wrapLists(snippet.data), false)\n\t}\n\n\tconst backup = useMemo(() => Store.getBackup(gen.id), [gen.id])\n\n\tconst loadBackup = () => {\n\t\tif (backup !== undefined) {\n\t\t\tmodel?.reset(DataModel.wrapLists(backup), false)\n\t\t}\n\t}\n\n\tconst [model, setModel] = useState<DataModel | null>(null)\n\tconst [blockStates, setBlockStates] = useState<BlockStateRegistry | null>(null)\n\tuseEffect(() => {\n\t\tsetError(null)\n\t\tsetModel(null)\n\t\tgetBlockStates(version)\n\t\t\t.then(b => setBlockStates(b))\n\t\tgetModel(version, gen.id)\n\t\t\t.then(async m => {\n\t\t\t\tAnalytics.setGenerator(gen.id)\n\t\t\t\tif (currentPreset) {\n\t\t\t\t\tconst preset = await loadPreset(currentPreset)\n\t\t\t\t\tm.reset(DataModel.wrapLists(preset), false)\n\t\t\t\t} else if (sharedSnippetId) {\n\t\t\t\t\tconst snippet = await getSnippet(sharedSnippetId)\n\t\t\t\t\tloadSnippet(m, snippet)\n\t\t\t\t}\n\t\t\t\tsetModel(m)\n\t\t\t})\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [version, gen.id])\n\n\tconst [dirty, setDirty] = useState(false)\n\tuseModel(model, () => {\n\t\tsetSeachParams({ version: undefined, preset: undefined, [SHARE_KEY]: undefined })\n\t\tStore.setBackup(gen.id, DataModel.unwrapLists(model?.data))\n\t\tsetError(null)\n\t\tsetDirty(true)\n\t}, [gen.id])\n\n\tconst [fileRename, setFileRename] = useState('')\n\tconst [fileSaved, doSave] = useActiveTimeout()\n\tconst [fileError, doFileError] = useActiveTimeout()\n\n\tconst doFileRename = () => {\n\t\tif (fileRename !== file?.id && fileRename && model && blockStates) {\n\t\t\tconst data = getOutput(model, blockStates)\n\t\t\tconst success = updateFile(gen.id, file?.id, { id: fileRename, data })\n\t\t\tif (success) {\n\t\t\t\tdoSave()\n\t\t\t} else {\n\t\t\t\tdoFileError()\n\t\t\t\tif (file) {\n\t\t\t\t\tsetFileRename(file?.id)\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (file) {\n\t\t\tsetFileRename(file?.id)\n\t\t}\n\t}\n\n\tconst deleteFile = () => {\n\t\tif (file) {\n\t\t\tupdateFile(gen.id, file.id, {})\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tif (file) {\n\t\t\tsetFileRename(file.id)\n\t\t}\n\t}, [file])\n\n\tuseEffect(() => {\n\t\tif (model) {\n\t\t\tsetFileRename(file?.id ?? '')\n\t\t\tif (file && gen.id === file.type) {\n\t\t\t\tmodel.reset(DataModel.wrapLists(file.data))\n\t\t\t}\n\t\t\tsetDirty(false)\n\t\t}\n\t}, [file, model])\n\n\tconst reset = () => {\n\t\tAnalytics.generatorEvent('reset')\n\t\tmodel?.reset(DataModel.wrapLists(model.schema.default()), true)\n\t}\n\tconst undo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('undo', 'Menu')\n\t\tmodel?.undo()\n\t}\n\tconst redo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('redo', 'Menu')\n\t\tmodel?.redo()\n\t}\n\n\tconst onKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.ctrlKey && e.key === 'z') {\n\t\t\tAnalytics.generatorEvent('undo', 'Hotkey')\n\t\t\tmodel?.undo()\n\t\t} else if (e.ctrlKey && e.key === 'y') {\n\t\t\tAnalytics.generatorEvent('redo', 'Hotkey')\n\t\t\tmodel?.redo()\n\t\t}\n\t}\n\tconst onKeyDown = (e: KeyboardEvent) => {\n\t\tif (e.ctrlKey && e.key === 's') {\n\t\t\te.preventDefault()\n\t\t\tif (model && blockStates && file) {\n\t\t\t\tAnalytics.generatorEvent('save', 'Hotkey')\n\t\t\t\tconst data = getOutput(model, blockStates)\n\t\t\t\tupdateFile(gen.id, file?.id, { id: file?.id, data })\n\t\t\t\tsetDirty(false)\n\t\t\t\tdoSave()\n\t\t\t}\n\t\t}\n\t}\n\tuseEffect(() => {\n\t\tdocument.addEventListener('keyup', onKeyUp)\n\t\tdocument.addEventListener('keydown', onKeyDown)\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keyup', onKeyUp)\n\t\t\tdocument.removeEventListener('keydown', onKeyDown)\n\t\t}\n\t}, [model, blockStates, file])\n\n\tconst [presets, setPresets] = useState<string[]>([])\n\tuseEffect(() => {\n\t\tgetCollections(version).then(collections => {\n\t\t\tsetPresets(collections.get(gen.id).map(p => p.slice(10)))\n\t\t})\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [version, gen.id])\n\n\tconst selectPreset = (id: string) => {\n\t\tAnalytics.generatorEvent('load-preset', id)\n\t\tsetSeachParams({ version, preset: id, [SHARE_KEY]: undefined })\n\t}\n\n\tconst loadPreset = async (id: string) => {\n\t\ttry {\n\t\t\tconst preset = await fetchPreset(version, gen.path ?? gen.id, id)\n\t\t\tconst seed = model?.get(new Path(['generator', 'seed']))\n\t\t\tif (preset?.generator?.seed !== undefined && seed !== undefined) {\n\t\t\t\tpreset.generator.seed = seed\n\t\t\t\tif (preset.generator.biome_source?.seed !== undefined) {\n\t\t\t\t\tpreset.generator.biome_source.seed = seed\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn preset\n\t\t} catch (e) {\n\t\t\tsetError(e instanceof Error ? e : message(e))\n\t\t}\n\t}\n\n\tconst selectVersion = (version: VersionId) => {\n\t\tsetSeachParams({ [SHARE_KEY]: undefined })\n\t\tchangeVersion(version)\n\t}\n\n\tconst [shareUrl, setShareUrl] = useState<string | undefined>(undefined)\n\tconst [shareShown, setShareShown] = useState(false)\n\tconst [shareCopyActive, shareCopySuccess] = useActiveTimeout({ cooldown: 3000 })\n\tconst share = () => {\n\t\tif (shareShown) {\n\t\t\tsetShareShown(false)\n\t\t\treturn\n\t\t}\n\t\tif (currentPreset) {\n\t\t\tsetShareUrl(`${location.protocol}//${location.host}/${gen.url}/?version=${version}&preset=${currentPreset}`)\n\t\t\tsetShareShown(true)\n\t\t\tcopySharedId()\n\t\t} else if (model && blockStates) {\n\t\t\tconst output = getOutput(model, blockStates)\n\t\t\tif (deepEqual(output, model.schema.default())) {\n\t\t\t\tsetShareUrl(`${location.protocol}//${location.host}/${gen.url}/?version=${version}`)\n\t\t\t\tsetShareShown(true)\n\t\t\t} else {\n\t\t\t\tshareSnippet(gen.id, version, output, previewShown)\n\t\t\t\t\t.then(url => {\n\t\t\t\t\t\tsetShareUrl(url)\n\t\t\t\t\t\tsetShareShown(true)\n\t\t\t\t\t})\n\t\t\t\t\t.catch(e => {\n\t\t\t\t\t\tif (e instanceof Error) {\n\t\t\t\t\t\t\tsetError(e)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\tconst copySharedId = () => {\n\t\tnavigator.clipboard.writeText(shareUrl ?? '')\n\t\tshareCopySuccess()\n\t}\n\tuseEffect(() => {\n\t\tif (!shareCopyActive) {\n\t\t\tsetShareUrl(undefined)\n\t\t\tsetShareShown(false)\n\t\t}\n\t}, [shareCopyActive])\n\n\tconst [sourceShown, setSourceShown] = useState(window.innerWidth > 820)\n\tconst [doCopy, setCopy] = useState(0)\n\tconst [doDownload, setDownload] = useState(0)\n\tconst [doImport, setImport] = useState(0)\n\n\tconst copySource = () => {\n\t\tAnalytics.generatorEvent('copy')\n\t\tsetCopy(doCopy + 1)\n\t}\n\tconst downloadSource = () => {\n\t\tAnalytics.generatorEvent('download')\n\t\tsetDownload(doDownload + 1)\n\t}\n\tconst importSource = () => {\n\t\tAnalytics.generatorEvent('import')\n\t\tsetSourceShown(true)\n\t\tsetImport(doImport + 1)\n\t}\n\tconst toggleSource = () => {\n\t\tAnalytics.generatorEvent('toggle-output', !sourceShown ? 'visible' : 'hidden')\n\t\tsetSourceShown(!sourceShown)\n\t\tsetCopy(0)\n\t\tsetDownload(0)\n\t\tsetImport(0)\n\t}\n\n\tconst [copyActive, copySuccess] = useActiveTimeout()\n\n\tconst [previewShown, setPreviewShown] = useState(false)\n\tconst hasPreview = HasPreview.includes(gen.id) && !(gen.id === 'worldgen/configured_feature' && checkVersion(version, '1.18'))\n\tif (previewShown && !hasPreview) setPreviewShown(false)\n\tlet actionsShown = 2\n\tif (hasPreview) actionsShown += 1\n\tif (sourceShown) actionsShown += 2\n\n\tconst togglePreview = () => {\n\t\tAnalytics.generatorEvent('toggle-preview', !previewShown ? 'visible' : 'hidden')\n\t\tsetPreviewShown(!previewShown)\n\t\tif (!previewShown && sourceShown) {\n\t\t\tsetSourceShown(false)\n\t\t}\n\t}\n\n\treturn <>\n\t\t<main class={previewShown ? 'has-preview' : ''}>\n\t\t\t<Ad id=\"data-pack-generator\" type=\"text\" />\n\t\t\t<div class=\"controls\">\n\t\t\t\t<div class={`project-controls ${file && 'has-file'}`}>\n\t\t\t\t\t<div class=\"btn-row\">\n\t\t\t\t\t\t<BtnMenu icon=\"repo\" label={project.name} relative={false}>\n\t\t\t\t\t\t\t<Btn icon=\"arrow_left\" label={locale('project.go_to')} onClick={() => route('/project')} />\n\t\t\t\t\t\t\t{file && <Btn icon=\"file\" label={locale('project.new_file')} onClick={closeFile} />}\n\t\t\t\t\t\t\t{backup !== undefined && <Btn icon=\"history\" label={locale('restore_backup')} onClick={loadBackup} />}\n\t\t\t\t\t\t\t<SearchList searchPlaceholder={locale(project.name === 'Drafts' ? 'project.search_drafts' : 'project.search')} noResults={locale('project.no_files')} values={project.files.filter(f => f.type === gen.id).map(f => f.id)} onSelect={(id) => openFile(gen.id, id)} />\n\t\t\t\t\t\t</BtnMenu>\n\t\t\t\t\t\t<TextInput class=\"btn btn-input\" placeholder={locale('project.unsaved_file')} value={fileRename} onChange={setFileRename} onEnter={doFileRename} onBlur={doFileRename} />\n\t\t\t\t\t\t{file && <Btn icon=\"trashcan\" tooltip={locale('project.delete_file')} onClick={deleteFile} />}\n\t\t\t\t\t</div>\n\t\t\t\t\t{dirty ? <div class=\"status-icon\">{Octicon.dot_fill}</div>\n\t\t\t\t\t\t: fileSaved ? <div class=\"status-icon active\">{Octicon.check}</div>\n\t\t\t\t\t\t\t: fileError && <div class=\"status-icon danger\">{Octicon.x}</div> }\n\t\t\t\t</div>\n\t\t\t\t<div class=\"generator-controls\">\n\t\t\t\t\t<Btn icon=\"upload\" label={locale('import')} onClick={importSource} />\n\t\t\t\t\t<BtnMenu icon=\"archive\" label={locale('presets')} relative={false}>\n\t\t\t\t\t\t<SearchList searchPlaceholder={locale('search')} noResults={locale('no_presets')} values={presets} onSelect={selectPreset}/>\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t\t<BtnMenu icon=\"tag\" label={version} tooltip={locale('switch_version')} data-cy=\"version-switcher\">\n\t\t\t\t\t\t{allowedVersions.reverse().map(v =>\n\t\t\t\t\t\t\t<Btn label={v} active={v === version} onClick={() => selectVersion(v)} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t\t<BtnMenu icon=\"kebab_horizontal\" tooltip={locale('more')}>\n\t\t\t\t\t\t<Btn icon=\"history\" label={locale('reset')} onClick={reset} />\n\t\t\t\t\t\t<Btn icon=\"arrow_left\" label={locale('undo')} onClick={undo} />\n\t\t\t\t\t\t<Btn icon=\"arrow_right\" label={locale('redo')} onClick={redo} />\n\t\t\t\t\t</BtnMenu>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{error && <ErrorPanel error={error} onDismiss={() => setError(null)} />}\n\t\t\t<Tree {...{model, version, blockStates}} onError={setError} />\n\t\t</main>\n\t\t<div class=\"popup-actions\" style={`--offset: -${8 + actionsShown * 50}px;`}>\n\t\t\t<div class={`popup-action action-preview${hasPreview ? ' shown' : ''} tooltipped tip-nw`} aria-label={locale(previewShown ? 'hide_preview' : 'show_preview')} onClick={togglePreview}>\n\t\t\t\t{previewShown ? Octicon.x_circle : Octicon.play}\n\t\t\t</div>\n\t\t\t<div class={'popup-action action-share shown tooltipped tip-nw'} aria-label={locale('share')} onClick={share}>\n\t\t\t\t{Octicon.link}\n\t\t\t</div>\n\t\t\t<div class={`popup-action action-download${sourceShown ? ' shown' : ''} tooltipped tip-nw`} aria-label={locale('download')} onClick={downloadSource}>\n\t\t\t\t{Octicon.download}\n\t\t\t</div>\n\t\t\t<div class={`popup-action action-copy${sourceShown ? ' shown' : ''}${copyActive ? ' active' : ''} tooltipped tip-nw`} aria-label={locale(copyActive ? 'copied' : 'copy')} onClick={copySource}>\n\t\t\t\t{copyActive ? Octicon.check : Octicon.clippy}\n\t\t\t</div>\n\t\t\t<div class={'popup-action action-code shown tooltipped tip-nw'} aria-label={locale(sourceShown ? 'hide_output' : 'show_output')} onClick={toggleSource}>\n\t\t\t\t{sourceShown ? Octicon.chevron_right : Octicon.code}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class={`popup-preview${previewShown ? ' shown' : ''}`}>\n\t\t\t<PreviewPanel {...{model, version, id: gen.id}} shown={previewShown} onError={setError} />\n\t\t</div>\n\t\t<div class={`popup-source${sourceShown ? ' shown' : ''}`}>\n\t\t\t<SourcePanel {...{model, blockStates, doCopy, doDownload, doImport}} name={gen.schema ?? 'data'} copySuccess={copySuccess} onError={setError} />\n\t\t</div>\n\t\t<div class={`popup-share${shareShown ? ' shown' : ''}`}>\n\t\t\t<TextInput value={shareUrl} readonly />\n\t\t\t<Btn icon={shareCopyActive ? 'check' : 'clippy'} onClick={copySharedId} tooltip={locale(shareCopyActive ? 'copied' : 'copy_share')} tooltipLoc=\"nw\" active={shareCopyActive} showTooltip={shareCopyActive} />\n\t\t</div>\n\t</>\n}\n","import config from '../../config.json'\nimport { Giscus, ToolCard } from '../components'\nimport { useLocale, useTitle } from '../contexts'\nimport { cleanUrl } from '../Utils'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Home({}: Props) {\n\tconst { locale } = useLocale()\n\tuseTitle(locale('title.home'))\n\treturn <main>\n\t\t<div class=\"home\">\n\t\t\t<ToolCard title=\"Data packs\">\n\t\t\t\t{config.generators.filter(g => !g.category).map(g => \n\t\t\t\t\t<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />\n\t\t\t\t)}\n\t\t\t\t<ToolCard title={locale('worldgen')} link=\"/worldgen/\" />\n\t\t\t</ToolCard>\n\t\t\t<ToolCard title=\"Resource packs\">\n\t\t\t\t{config.generators.filter(g => g.category === 'assets').map(g =>\n\t\t\t\t\t<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />\n\t\t\t\t)}\n\t\t\t</ToolCard>\n\t\t\t<ToolCard title=\"Report Inspector\" icon=\"report\"\n\t\t\t\tlink=\"https://misode.github.io/report/\"\n\t\t\t\tdesc=\"Analyse your performance reports\" />\n\t\t\t<ToolCard title=\"Minecraft Sounds\" icon=\"sounds\"\n\t\t\t\tlink=\"/sounds/\"\n\t\t\t\tdesc=\"Browse through and mix all the vanilla sounds\" />\n\t\t\t<ToolCard title=\"Data Pack Upgrader\"\n\t\t\t\tlink=\"https://misode.github.io/upgrader/\"\n\t\t\t\tdesc=\"Convert your data packs from 1.16 to 1.17 to 1.18\" />\n\t\t\t<ToolCard title=\"Technical Changelog\" link=\"/changelog/\" />\n\t\t\t<ToolCard title=\"Minecraft Versions\" link=\"/versions/\" />\n\t\t\t<Giscus />\n\t\t</div>\n\t</main>\n}\n","import { useMemo } from 'preact/hooks'\nimport { Ad, TreeView } from '../components'\nimport { getFilePath, useLocale, useProject, useTitle } from '../contexts'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Project({}: Props) {\n\tconst { locale } = useLocale()\n\tconst { project, openFile } = useProject()\n\tuseTitle(locale('title.project', project.name))\n\tconst entries = useMemo(() => project.files.map(getFilePath), project.files)\n\n\tconst selectFile = (entry: string) => {\n\t\tconst [, namespace, type, ...id] = entry.split('/')\n\t\topenFile(type, `${namespace}:${id}`)\n\t}\n\n\treturn <main>\n\t\t<Ad id=\"data-pack-project\" type=\"text\" />\n\t\t<div class=\"project\">\n\t\t\t<h2>{project.name}</h2>\n\t\t\t<div class=\"file-view\">\n\t\t\t\t<TreeView entries={entries} onSelect={selectFile}/>\n\t\t\t</div>\n\t\t</div>\n\t</main>\n}\n","import { useEffect, useRef, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Btn, BtnMenu, ErrorPanel, SoundConfig, TextInput } from '../components'\nimport { useLocale, useTitle, useVersion } from '../contexts'\nimport type { SoundEvents, VersionId } from '../services'\nimport { fetchSounds } from '../services'\nimport { hexId } from '../Utils'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Sounds({}: Props) {\n\tconst { locale } = useLocale()\n\tconst { version, changeVersion } = useVersion()\n\tconst [error, setError] = useState<Error | null>(null)\n\tuseTitle(locale('title.sounds'))\n\n\tconst [sounds, setSounds] = useState<SoundEvents>({})\n\tconst soundKeys = Object.keys(sounds ?? {})\n\tuseEffect(() => {\n\t\tfetchSounds(version)\n\t\t\t.then(setSounds)\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [version])\n\n\tconst [search, setSearch] = useState('')\n\tconst [configs, setConfigs] = useState<SoundConfig[]>([])\n\tconst addConfig = () => {\n\t\tsetConfigs([{ id: hexId(), sound: search, delay: 0, pitch: 1, volume: 1 }, ...configs])\n\t}\n\tconst editConfig = (id: string) => (changes: Partial<SoundConfig>) => {\n\t\tsetConfigs(configs.map(c => c.id === id ? { ...c, ...changes } : c))\n\t}\n\tconst deleteConfig = (id: string) => () => {\n\t\tsetConfigs(configs.filter(c => c.id !== id))\n\t}\n\n\tconst [delayedPlay, setDelayedPlay] = useState(0)\n\tconst playAll = () => {\n\t\tsetDelayedPlay(delayedPlay + 1)\n\t}\n\n\tconst download = useRef<HTMLAnchorElement>(null)\n\tconst downloadFunction = () => {\n\t\tconst hasDelay = configs.some(c => c.delay > 0)\n\t\tconst content = configs\n\t\t\t.sort((a, b) => a.delay - b.delay)\n\t\t\t.map(c => `${hasDelay ? `execute if score @s delay matches ${c.delay} run ` : ''}playsound minecraft:${c.sound} master @s ~ ~ ~ ${c.volume} ${c.pitch}`)\n\t\t\t.join('\\n')\n\t\tdownload.current.setAttribute('href', 'data:text/plain;charset=utf-8,' + content + '%0A')\n\t\tdownload.current.setAttribute('download', 'sounds.mcfunction')\n\t\tdownload.current.click()\n\t}\n\n\treturn <main>\n\t\t{error && <ErrorPanel error={error} onDismiss={() => setError(null)} />}\n\t\t{soundKeys.length > 0 && <>\n\t\t\t<div class=\"controls sounds-controls\">\n\t\t\t\t<div class=\"sound-search-group\">\n\t\t\t\t\t<TextInput class=\"btn btn-input sound-search\" list=\"sound-list\" placeholder={locale('sounds.search')}\n\t\t\t\t\t\tvalue={search} onChange={setSearch} onEnter={addConfig} />\n\t\t\t\t\t<Btn icon=\"plus\" tooltip={locale('sounds.add_sound')} class=\"add-sound\" onClick={addConfig} />\n\t\t\t\t</div>\n\t\t\t\t{configs.length > 1 && <Btn icon=\"play\" label={ locale('sounds.play_all')} class=\"play-all-sounds\" onClick={playAll} />}\n\t\t\t\t<div class=\"spacer\"></div>\n\t\t\t\t<Btn icon=\"download\" label={locale('download')} tooltip={locale('sounds.download_function')} class=\"download-sounds\" onClick={downloadFunction} />\n\t\t\t\t<BtnMenu icon=\"tag\" label={version}>\n\t\t\t\t\t{config.versions.reverse().map(v =>\n\t\t\t\t\t\t<Btn label={v.id} active={v.id === version} onClick={() => changeVersion(v.id as VersionId)} />\n\t\t\t\t\t)}\n\t\t\t\t</BtnMenu>\n\t\t\t</div>\n\t\t\t<div class=\"sounds\">\n\t\t\t\t{configs.map(c => <SoundConfig key={c.id} {...c} {...{ sounds, delayedPlay }} onEdit={editConfig(c.id)} onDelete={deleteConfig(c.id)} />)}\n\t\t\t</div>\n\t\t\t<a ref={download} style=\"display: none;\"></a>\n\t\t</>}\n\t\t<datalist id=\"sound-list\">\n\t\t\t{soundKeys.map(s => <option key={s} value={s} />)}\n\t\t</datalist>\n\t</main>\n}\n","import { getCurrentUrl } from 'preact-router'\nimport { useEffect, useState } from 'preact/hooks'\nimport { Ad, ErrorPanel, Octicon, VersionDetail, VersionList } from '../components'\nimport { useLocale, useTitle } from '../contexts'\nimport type { VersionMeta } from '../services'\nimport { fetchVersions } from '../services'\nimport { getSearchParams } from '../Utils'\n\ninterface Props {\n\tpath?: string,\n}\nexport function Versions({}: Props) {\n\tconst { locale } = useLocale()\n\tconst [error, setError] = useState<Error | null>(null)\n\tuseTitle(locale('title.versions'))\n\n\tconst [versions, setVersions] = useState<VersionMeta[]>([])\n\tuseEffect(() => {\n\t\tfetchVersions()\n\t\t\t.then(versions => setVersions(versions))\n\t\t\t.catch(e => { console.error(e); setError(e) })\n\t}, [])\n\n\tconst selectedId = getSearchParams(getCurrentUrl()).get('id')\n\tconst selected = versions.find(v => v.id === selectedId)\n\n\tuseTitle(selected ? selected.name : 'Versions Explorer', selected ? [] : undefined)\n\n\tconst nextVersion = selected && getOffsetVersion(versions, selected, -1)\n\tconst previousVersion = selected && getOffsetVersion(versions, selected, 1)\n\n\treturn <main>\n\t\t<Ad type=\"text\" id=\"versions\" />\n\t\t{error && <ErrorPanel error={error} onDismiss={() => setError(null)} />}\n\t\t<div class=\"versions\">\n\t\t\t{selectedId ? <>\n\t\t\t\t<div class=\"version-navigation\">\n\t\t\t\t\t<a class=\"btn btn-link\" href=\"/versions/\">\n\t\t\t\t\t\t{Octicon.three_bars}\n\t\t\t\t\t\t{locale('versions.all')}\n\t\t\t\t\t</a>\n\t\t\t\t\t<a class=\"btn btn-link\" {...previousVersion ? {href: `/versions/?id=${previousVersion.id}`} : {disabled: true}}>\n\t\t\t\t\t\t{Octicon.arrow_left}\n\t\t\t\t\t\t{locale('versions.previous')}\n\t\t\t\t\t</a>\n\t\t\t\t\t<a class=\"btn btn-link\" {...nextVersion ? {href: `/versions/?id=${nextVersion.id}`} : {disabled: true}}>\n\t\t\t\t\t\t{locale('versions.next')}\n\t\t\t\t\t\t{Octicon.arrow_right}\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t{selected ? <VersionDetail version={selected} />\n\t\t\t\t\t: <div class=\"version-detail\">\n\t\t\t\t\t\t<h2>{selectedId}</h2>\n\t\t\t\t\t\t<div class=\"version-info\">\n\t\t\t\t\t\t\t<p>This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>}\n\t\t\t</> : <VersionList versions={versions} link={id => `/versions/?id=${id}`} />}\n\t\t</div>\n\t</main>\n}\n\nfunction getOffsetVersion(versions: VersionMeta[], current: VersionMeta, offset: number) {\n\tconst currentIndex = versions.findIndex(v => v.id === current.id)\n\tconst offsetIndex = currentIndex + offset\n\tif (offsetIndex < 0 || offsetIndex >= versions.length) {\n\t\treturn undefined\n\t}\n\treturn versions[offsetIndex]\n}\n","import type { RouterOnChangeArgs } from 'preact-router'\nimport { Router } from 'preact-router'\nimport '../styles/global.css'\nimport '../styles/nodes.css'\nimport { Analytics } from './Analytics'\nimport { Header } from './components'\nimport { Category, Changelog, Generator, Home, Project, Sounds, Versions } from './pages'\nimport { cleanUrl } from './Utils'\n\nexport function App() {\n\tconst changeRoute = (e: RouterOnChangeArgs) => {\n\t\t// Needs a timeout to ensure the title is set correctly\n\t\tsetTimeout(() => Analytics.pageview(cleanUrl(e.url)))\n\t}\n\n\treturn <>\n\t\t<Header />\n\t\t<Router onChange={changeRoute}>\n\t\t\t<Home path=\"/\" />\n\t\t\t<Category path=\"/worldgen\" category=\"worldgen\" />\n\t\t\t<Category path=\"/assets\" category=\"assets\" />\n\t\t\t<Sounds path=\"/sounds\" />\n\t\t\t<Changelog path=\"/changelog\" />\n\t\t\t<Versions path=\"/versions\" />\n\t\t\t<Project path=\"/project\" />\n\t\t\t<Generator default />\n\t\t</Router>\n\t</>\n}\n","import { render } from 'preact'\nimport '../styles/global.css'\nimport '../styles/nodes.css'\nimport { App } from './App'\nimport { LocaleProvider, ProjectProvider, ThemeProvider, TitleProvider, VersionProvider } from './contexts'\n\nfunction Main() {\n\treturn <LocaleProvider>\n\t\t<ThemeProvider>\n\t\t\t<VersionProvider>\n\t\t\t\t<TitleProvider>\n\t\t\t\t\t<ProjectProvider>\n\t\t\t\t\t\t<App />\n\t\t\t\t\t</ProjectProvider>\n\t\t\t\t</TitleProvider>\n\t\t\t</VersionProvider>\n\t\t</ThemeProvider>\n\t</LocaleProvider>\n}\n\nrender(<Main />, document.body)\n"],"names":["Analytics","type","id","getElementById","remove","window","load","data-ea-publisher","data-ea-type","class","icon","label","active","clazz","tooltip","tooltipLoc","onClick","aria-label","Octicon","Analytics2","ID_SITE","ID_GENERATOR","category","action","index","value","pageview","page","setLanguage","language","setTheme","theme","setVersion","version","setPreview","preview","setGenerator","generator","setPrefersColorScheme","colorScheme","generatorEvent","obj","dec2hex","dec","toString","substr","length","arr","Uint8Array","crypto","getRandomValues","Array","from","join","BigInt","Math","floor","random","Number","MAX_SAFE_INTEGER","model","seed","dimensions","get","Path","set","isObject","keys","forEach","abs","s2","h","i","imul","charCodeAt","url","replaceAll","searchIndex","indexOf","slice","cleanUrl","trimmedUrl","getPath","replace","config","generators","find","g2","Map","split","map","param","decodeURIComponent","modifications","newPath","getCurrentUrl","searchParams","getSearchParams","entries","key","delete","search","encodeURIComponent","str","hashString","a2","b2","c","max","min","lerp","e","Error","message","deepClone","rfdc","constructor","isArray","deepEqual","valueOf","Object","prototype","hasOwnProperty","call","[object Object]","forward","backward","this","defaultValue","large","larger","doSelect","placeholder","dataList","onChange","onInput","value2","target","ref","useRef","current","select","dataListId","hexId","stopPropagation","list","cooldown","invert","initial","setActive","useState","timeout","setTimeout","size","draw","onDrag","onHover","onLeave","inputs","canvas","dragStart","dragRequest","dragPending","dragBusy","onMouseDown","offsetX","offsetY","onMouseMove","x","clientWidth","y2","clientHeight","dx","dy","requestAnimationFrame","async","dx2","dy2","onMouseUp","onMouseLeave","addEventListener","body","removeEventListener","redraw","redrawCount","ctx","getContext","width","height","img","getImageData","ownCount","putImageData","hider","query","prefers","setPrefers","matchMedia","matches","mediaQuery","invalidated","listener","addListener","removeListener","props","relative","children","useFocus","__spreadValues","Btn","__spreadProps","alert","xmlns","viewBox","fill-rule","d","archive","arrow_left","arrow_right","check","chevron_down","chevron_right","chevron_up","clippy","code","dash","device_desktop","dot_fill","download","duplicate","eye","eye_closed","file","file_directory","gear","globe","history","info","issue_opened","kebab_horizontal","link","link_external","mark_github","moon","play","plus","plus_circle","repo","sort_asc","sort_desc","square","square_fill","stack","sun","sync","tag","terminal","three_bars","trashcan","unfold","upload","x_circle","error","onDismiss","stackVisible","setStackVisible","setStack","stack2","line","mapped","mappedStack","useMemo","url2","name","href","checked","component","evt","fn","onKeyDown","onEnter","displayName","TextInput","BaseInput","v","NumberInput","RangeInput","values","onSelect","searchPlaceholder","noResults","setSearch","results","terms","trim","filter","every","includes","t","BtnInput","Changelogs","fetch","json","Promise","all","group","groupIndex","versionIndex","text","entry","tags","substring","content","parseChangelog","order","change","fetchChangelog","parseVersion","flat","fetchGroup","article","match","localStorage","removeItem","caches","mcmetaUrl","dynamic","getItem","cache","open","debug","promises","request","push","warn","deleteMatching","startsWith","setItem","data","getData","mcmeta","register","properties","default","versionId","registry","versions","cacheResponse","ok","fetchResponse","responseData","put","Response","JSON","stringify","VersionIds","Versions","Models","versionGetter","1.15","java15","1.16","java16","1.17","java17","1.18","java18","1.18.2","java182","1.19","java19","CachedDecorator","CachedFeature","CachedCollections","collections","getCollections","blockStates","collectionTarget","blockStateTarget","validateCache","fetchRegistries","fetchBlockStateMap","fetchData","schemas","getSchemas","minVersionId","maxVersionId","findIndex","minVersion","maxVersion","ShareCache","snippet","fetchApi","parse","decompressFromBase64","res","method","headers","Content-Type","errors","scriptRel","seen","__vitePreload","baseModule","deps","relList","document","createElement","supports","dep","isCss","endsWith","cssSelector","querySelector","rel","as","crossOrigin","head","appendChild","rej","then","Store","Store2","getLanguage","getTheme","getVersion","getIndent","getFormat","getHighlighting","getSoundsVersion","getProjects","projects","DRAFT_PROJECT","getBackup","setIndent","indent","setFormat","format","setHighlighting","highlighting","setSoundsVersion","setProjects","setBackup","backups","Locale","createContext","lang","locale","changeLanguage","Locales","fallback","English","params","parseInt","resolveLocaleParams","en","langConfig","languages","__variableDynamicImportRuntime0__","schema","__variableDynamicImportRuntime1__","useContext","useCallback","localize","lang2","loadLocale","Provider","namespace","files","Project","project","changeProject","updateProject","updateFile","openFile","closeFile","projectName","setProjectName","p","fileId","setFileId","f","changeProjects","projects2","edits","newId","exists","some","gen","path","Theme","actualTheme","changeTheme","prefersLight","useMediaQuery","prefersDark","documentElement","setAttribute","theme2","Title","title","changeTitle","context","useLocale","setTitle","title2","titleVersions","Version","changeVersion","targetVersion","version2","store","has","ready","LAYERS","temperature","humidity","continentalness","erosion","weirdness","offset","factor","jaggedness","cacheState","biomeSourceCache","state","options","newState","octaves","FixedBiome","Identifier","biome","shift","scale","numBiomes","biomes","_y","z","node","preset","checkVersion","NetherPreset18","NetherPreset","fetchPreset","biome_source","OverworldPreset18","DataModel","unwrapLists","init","wasm","loadWasm","BiomeIds","BiMap","t0","t1","h0","h1","c0","c1","e0","e1","w0","w1","d0","d1","o","depth","parameters","getOrPut","biome_parameters","Float64Array","Int32Array","sampler","climate_sampler","firstOctave","amplitudes","ids","multi_noise","getA","getBiomes","xFrom","xTo","xStep","yFrom","yTo","yStep","zFrom","zTo","zStep","climate","climate_noise","w","result","noise","config2","clamp","NormalNoise","LegacyRandom","n","n2","sample","minDist","Infinity","minBiome","dist","altitude","create","getBiomeSource","biomeSource","biomeColors","color","VanillaColors","stringToColor","minecraft:badlands","minecraft:badlands_plateau","minecraft:bamboo_jungle","minecraft:bamboo_jungle_hills","minecraft:basalt_deltas","minecraft:beach","minecraft:birch_forest","minecraft:birch_forest_hills","minecraft:cold_ocean","minecraft:crimson_forest","minecraft:dark_forest","minecraft:dark_forest_hills","minecraft:deep_cold_ocean","minecraft:deep_frozen_ocean","minecraft:deep_lukewarm_ocean","minecraft:deep_ocean","minecraft:deep_warm_ocean","minecraft:desert","minecraft:desert_hills","minecraft:desert_lakes","minecraft:end_barrens","minecraft:end_highlands","minecraft:end_midlands","minecraft:eroded_badlands","minecraft:flower_forest","minecraft:forest","minecraft:frozen_ocean","minecraft:frozen_river","minecraft:giant_spruce_taiga","minecraft:old_growth_spruce_taiga","minecraft:giant_spruce_taiga_hills","minecraft:giant_tree_taiga","minecraft:old_growth_pine_taiga","minecraft:giant_tree_taiga_hills","minecraft:gravelly_hills","minecraft:gravelly_mountains","minecraft:windswept_gravelly_hills","minecraft:ice_spikes","minecraft:jungle","minecraft:jungle_edge","minecraft:sparse_jungle","minecraft:jungle_hills","minecraft:lukewarm_ocean","minecraft:modified_badlands_plateau","minecraft:modified_gravelly_mountains","minecraft:modified_jungle","minecraft:modified_jungle_edge","minecraft:modified_wooded_badlands_plateau","minecraft:mountain_edge","minecraft:extreme_hills","minecraft:mountains","minecraft:windswept_hills","minecraft:mushroom_field_shore","minecraft:mushroom_fields","minecraft:nether_wastes","minecraft:ocean","minecraft:plains","minecraft:river","minecraft:savanna","minecraft:savanna_plateau","minecraft:shattered_savanna","minecraft:windswept_savanna","minecraft:shattered_savanna_plateau","minecraft:small_end_islands","minecraft:snowy_beach","minecraft:snowy_mountains","minecraft:snowy_taiga","minecraft:snowy_taiga_hills","minecraft:snowy_taiga_mountains","minecraft:snowy_tundra","minecraft:snowy_plains","minecraft:soul_sand_valley","minecraft:stone_shore","minecraft:stony_shore","minecraft:sunflower_plains","minecraft:swamp","minecraft:swamp_hills","minecraft:taiga","minecraft:taiga_hills","minecraft:taiga_mountains","minecraft:tall_birch_forest","minecraft:old_growth_birch_forest","minecraft:tall_birch_hills","minecraft:the_end","minecraft:the_void","minecraft:warm_ocean","minecraft:warped_forest","minecraft:wooded_badlands_plateau","minecraft:wooded_badlands","minecraft:wooded_hills","minecraft:wooded_mountains","minecraft:windswept_forest","minecraft:snowy_slopes","minecraft:lofty_peaks","minecraft:jagged_peaks","minecraft:snowcapped_peaks","minecraft:frozen_peaks","minecraft:stony_peaks","minecraft:grove","minecraft:meadow","minecraft:lush_caves","minecraft:dripstone_caves","altitude_noise","temperature_noise","humidity_noise","weirdness_noise","terrain","featureColors","placements","features","biomeInfoNoise","PerlinNoise","fork","seaLevel","nextFloat","nextInt","nextGaussian","sqrt","log","cos","PI","base","spread","normalize","min_inclusive","max_inclusive","sampleInt","source","normal","mean","deviation","totalWeight","distribution","reduce","sum","weight","placement","fill","pos","feature","j","anchor","_ctx","absolute","above_bottom","below_top","useFeature","featureFn","Features","decorator2","decoratorFn","Decorators","decorated","getPositions","decorator","getPlacements","random_boolean_selector","feature_true","feature_false","random_selector","chance","simple_random_selector","count","count_extra","extra_chance","extra_count","count_multilayer","count_noise","noise_level","below_noise","above_noise","count_noise_biased","noise_factor","ceil","noise_offset","noise_to_count_ratio","dark_oak_tree","_config","_","outer","flatMap","inner","depth_average","decorateY","baseline","emerald_ore","fire","glowstone","heightmap","heightmap_spread_double","heightmap_world_surface","iceberg","lava_lake","nope","range","maximum","top_offset","bottom_offset","range_biased","range_very_biased","spread_32_above","top_solid_heightmap","magma","surface_relative_threshold","water_lake","positions","modifier","PlacementModifiers","pos2","count_on_every_layer","environment_scan","height_range","resolveAnchor","n1","plateau","sampleHeight","in_square","noise_based_count","noise_threshold_count","random_offset","xz_spread","y_spread","rarity_filter","minLimitPerlinNoise","maxLimitPerlinNoise","mainPerlinNoise","depthNoise","settings","xOffset","chunkWidth","size_horizontal","chunkHeight","size_vertical","chunkCountY","amplified","biomeDepth","biomeScale","noiseColumnCache","cx","ox","noise1","fillNoiseColumn","noise2","yy","oy","d2","cachedColumn","xzScale","sampling","xz_scale","yScale","y_scale","xzFactor","xz_factor","yFactor","y_factor","randomDensity","random_density_offset","getRandomDensity","sampleAndClampNoise","getOctaveNoise","zo","falloff","density_factor","density_offset","top_slide","clampedLerp","bottom_slide","x2","wrap","y22","z2","minLimitNoise","maxLimitNoise","mainNoise","colors","minecraft:air","minecraft:water","minecraft:lava","minecraft:stone","minecraft:deepslate","minecraft:bedrock","minecraft:grass_block","minecraft:dirt","minecraft:gravel","minecraft:sand","minecraft:sandstone","minecraft:netherrack","minecraft:crimson_nylium","minecraft:warped_nylium","minecraft:basalt","minecraft:end_stone","generatorCache","chunkCache","registryCache","initRegistries","NoiseGeneratorSettings","fromJson","NoiseChunkGenerator","deepslate18.FixedBiome","deepslate18.NoiseChunkGenerator","getCached","LevelSlice","minY","generate","generator2","data2","state2","getBlockState","getName","OldNoiseChunkGenerator","reset","row","iterateNoiseColumn","reverse","getColor","XoroshiroRandom","forkPositional","NoiseSettings","min_y","terrain_shaper","originalFn","DensityFunction","mapAll","NoiseRouter","Visitor","createDensityFunction","density","compute","clampedMap","Registries","NoiseParameters","rootRegistries","Registry","root","fetchAllPresets","fetchRegistry","DENSITY_FUNCTION","clear","assign","getOrThrow","NOISE","minX","done","chunks","cached","Chunk","ChunkPos","Z","forcedBiome","chunk","buildSurface","chunkIndex","BiomeSourcePreview","shown","configuredSeed","randomSeed","setScale","focused","setFocused","layers","setLayers","Set","refineTimeout","legacyRandomSource","getOctaves","calculateState","useCanvas","round","oz","col","xRange","zRange","l2","getClimates","worldX","worldZ","getBiomeColor","getBiome","brightness","biomeMap","xx","zz","toWorld","getClimate","changeScale","newScale","BtnMenu","enabled","newSeed","k","toUpperCase","toFixed","DecoratorPreview","setSeed","DensityFunctionPreview","autoScroll","setAutoScroll","scrollInterval","densityFunction","worldY","setInterval","NoisePreview","NoiseSettingsPreview","setBiome","setBiomeScale","setBiomeDepth","noiseSettings","block","minBlockX","maxBlockX","BlockPos","getNoiseBlock","allBiomes","HasPreview","setCount","hook","transformOutput","ModelPath","switchNode","getOwnPropertySymbols","blockState","validation","validator","relativePath","getActiveFields","activeFields","out","INDENT","2_spaces","4_spaces","tabs","minified","FORMATS","yaml","dump","flowLevel","doCopy","doDownload","doImport","copySuccess","onError","retransform","onImport","textarea","editor","getSerializedOutput","model2","blockStates2","getOutput","output","setValue","getValue","wrapLists","braceEditor","brace","edit","setOptions","fontSize","showFoldWidgets","highlightSelectedWord","$blockScrolling","on","getSession","setMode","indent2","format2","setOption","selectAll","configure","clipboard","writeText","click","data-cy","changeIndent","changeFormat","changeHighlighting","spellcheck","autocorrect","onBlur","style","mapper","getter","setter","silent","selectRegistries","hiddenFields","flattenedFields","inlineFields","nbtFields","fixedLists","collapsedFields","collapsableFields","keysModel","MapNode","StringNode","historyMax","prefix","suffix","renderHtml","data-category","boolean","states","BooleanSuffix","choices","choice","activeCase","contextPath","getModel","getArray","choiceContextPath","choiceContext","inject","c2","def","newValue","pathLocale","contextPush","expand","collapse","isToggled","useToggles","maxShown","setMaxShown","maxLength","ErrorPopup","modelPush","cValue","cId","cPath","canToggle","toggle","nested","Collapsed","MemoedTreeNode","actions","splice","disabled","keyPath","keysSchema","enum","last","add","ObjectNode","fromEntries","cSchema","number","NumberSuffix","getChildModelPath","isDecorated","wrapper","fields","originalFields","decorators","iterateNestedDecorators","ListNode","featurePath","decoratorsPath","ModelWrapper","path2","modelArr","equals","newDecorators","feature2","produceNestedDecorators","createDecoratorsWrapper","optional","onExpand","onCollapse","toggled","expanded","newCtx","pools","loot","child","context2","cPrefix","cSuffix","cBody","isFlattened","isInlined","HelpPopup","string","StringSuffix","toggleState","setToggleState","toggleAll","setToggleAll","ctrlKey","integer","parsed","parseFloat","padStart","getValues","isEnum","pool","additional","datalistId","findGenerator","values2","memo","onContextMenu","preventDefault","a","description","navigator","prev","next","hash","withModel","getAll","e2","message2","popupIcon","popup","useErrorBoundary","setState","FullNode","term","useTheme","themeSuffix","themeUrl","location","host","GiscusReact","repoId","categoryId","mapping","reactionsEnabled","emitMetadata","inputPosition","Themes","system","dark","light","useVersion","useTitle","getGenerator","Link","Icons","home","route","th","rx","y","report","sounds","cy","r","clip-rule","sound","delay","pitch","volume","onEdit","onDelete","delayedPlay","loading","setLoading","playing","setPlaying","invalid","setInvalid","howls","command","soundEvent","h2","stop","soundPath","howl","Howl","src","rate","completed","copyActive","setCopyActive","copyTimeout","step","desc","roots","groups","leaves","hidden","setHidden","entries2","TreeViewEntry","TreeView","activeTags","toggleTag","ArticleLink","ChangelogTag","dangerouslySetInnerHTML","__html","marked","changes","defaultOrder","setTags","filteredChangelogs","q2","toLowerCase","sort","setSort","sortedChangelogs","ChangelogEntry","tab","setTab","changelogs","setChangelogs","changelogs2","catch","console","VersionMetaData","releaseDate","release_target","data_version","protocol_version","data_pack_version","resource_pack_version","ChangelogList","Giscus","Date","release_time","toLocaleDateString","day","month","year","compact","snapshots","setSnapshots","filteredVersions","Checkbox","VersionEntry","ToolCard","setError","Ad","ErrorPanel","useProject","errorBoundary","errorRetry","allowedVersions","currentPreset","sharedSnippetId","loadSnippet","snippetGen","show_preview","previewShown","backup","setModel","setBlockStates","versionData","Reference","ChoiceNode","schemaName","validate","err","m","loadPreset","getSnippet","dirty","setDirty","fileRename","setFileRename","fileSaved","doSave","useActiveTimeout","fileError","doFileError","doFileRename","onKeyUp","undo","redo","presets","setPresets","shareUrl","setShareUrl","shareShown","setShareShown","shareCopyActive","shareCopySuccess","copySharedId","sourceShown","setSourceShown","innerWidth","setCopy","setDownload","setImport","setPreviewShown","hasPreview","actionsShown","SearchList","selectVersion","Tree","protocol","jsonData","lz","compressToBase64","raw","btoa","PreviewPanel","SourcePanel","readonly","showTooltip","getFilePath","setSounds","soundKeys","configs","setConfigs","addConfig","deleteConfig","setDelayedPlay","hasDelay","SoundConfig","setVersions","versions2","selectedId","selected","nextVersion","getOffsetVersion","previousVersion","VersionDetail","VersionList","offsetIndex","Header","Router","Home","Category","Sounds","Changelog","Generator","LocaleProvider","ThemeProvider","VersionProvider","TitleProvider","ProjectProvider","App","render","Main"],"mappings":"g2BAAiBA,gBCQEC,KAAEA,KAAMC,cAChB,6BACAC,eAAe,sBAAmBC,SACvC,eAAgBC,mBACRC,SAEV,MAEK,MAAD,CAAKC,oBAAkB,mBAAmBC,eAAcP,EAAMQ,MAAM,eAAeP,GAAAA,iBCJvEQ,KAAEA,QAAMC,SAAOC,EAAQH,MAAOI,UA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AO,MCnBrB,uBACS2kC,GAAD,OACLC,GAAD,OACEC,GAAD,OACEC,GAAD,OACEC,GAAD,OACEC,GAAD,WAQNC,KAAQC,GAAD,MAAUnhC,SAASjO"} \ No newline at end of file diff --git a/assets/index.3e2e038a.js b/assets/index.3e2e038a.js deleted file mode 100644 index 5602fb03..00000000 --- a/assets/index.3e2e038a.js +++ /dev/null @@ -1,2 +0,0 @@ -var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,i=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&s(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&s(e,n,t[n]);return e},l=(e,o)=>t(e,n(o));import{y as c,a as d,r as u,l as h,g as p,b as m,s as f,c as v,d as g,e as w,f as _,j as y,h as b,i as k,k as x,m as C,n as M,o as A,q as I,A as z,F as $,p as j,t as E,u as S,C as O,v as L,I as P,w as D,x as V,z as N,B as T,_ as B,X as H,D as F,E as R,G as J,H as W,J as U,K as G,L as Y,M as q,N as K,O as Z,P as X,Q,R as ee,Z as te,S as ne,T as oe,U as re,V as ae,W as se,Y as ie,$ as le,a0 as ce,a1 as de,a2 as ue,a3 as he}from"./vendor.273f4765.js";var pe;function me({type:e,id:t}){return c((()=>{var e;null==(e=document.getElementById("ad-placeholder"))||e.remove(),"ethicalads"in window&ðicalads.load()}),[]),d("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function fe({icon:e,label:t,active:n,class:o,tooltip:r,tooltipLoc:a,onClick:s}){return d("div",{class:`btn${n?" active":""}${o?` ${o}`:""}${r?` tooltipped tip-${null!=a?a:"sw"}`:""}${n?" tip-shown":""}`,onClick:s,"aria-label":r},e&&Je[e],t&&d("span",null,t))}!function(e){const t="Site",n="Generator";function o(e,t,n){ga("send","event",e,t,n)}function r(e,t){ga("set",`dimension${e}`,t)}e.pageview=function(e){ga("set","page",e),ga("send","pageview")},e.setLanguage=function(e){r(4,e),o(t,"set-language",e)},e.setTheme=function(e){r(1,e),o(t,"set-theme",e)},e.setVersion=function(e){r(3,e),o(n,"set-version",e)},e.setPreview=function(e){r(5,e),o(n,"set-preview",e)},e.setGenerator=function(e){r(6,e)},e.setPrefersColorScheme=function(e){r(7,e)},e.generatorEvent=function(e,t){o(n,e,t)}}(pe||(pe={}));var ve=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"es","name":"Español"},{"code":"fr","name":"Français"},{"code":"it","name":"Italiano"},{"code":"ja","name":"日本語"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Português"},{"code":"ru","name":"Русский"},{"code":"sk","name":"Slovenčina","schemas":false},{"code":"zh-cn","name":"简体中文"},{"code":"zh-tw","name":"正體中文"}],"versions":[{"id":"1.15","ref":"1.15.2"},{"id":"1.16","ref":"1.16.5"},{"id":"1.17","ref":"1.17.1"},{"id":"1.18","ref":"1.18.1"},{"id":"1.18.2","ref":"1.18.2"},{"id":"1.19","dynamic":true}],"generators":[{"id":"loot_table","url":"loot-table","path":"loot_tables","schema":"loot_table"},{"id":"predicate","url":"predicate","path":"predicates","schema":"predicate"},{"id":"item_modifier","url":"item-modifier","path":"item_modifiers","schema":"item_modifier","minVersion":"1.17"},{"id":"advancement","url":"advancement","path":"advancements","schema":"advancement"},{"id":"recipe","url":"recipe","path":"recipes","schema":"recipe"},{"id":"dimension","url":"dimension","schema":"dimension","category":"worldgen","minVersion":"1.16"},{"id":"dimension_type","url":"dimension-type","schema":"dimension_type","category":"worldgen","minVersion":"1.16"},{"id":"world","url":"world","schema":"world_settings","category":"worldgen","minVersion":"1.16"},{"id":"worldgen/biome","url":"worldgen/biome","category":"worldgen","schema":"biome","minVersion":"1.16"},{"id":"worldgen/configured_carver","url":"worldgen/carver","category":"worldgen","schema":"configured_carver","minVersion":"1.16"},{"id":"worldgen/configured_feature","url":"worldgen/feature","category":"worldgen","schema":"configured_feature","minVersion":"1.16"},{"id":"worldgen/density_function","url":"worldgen/density-function","category":"worldgen","schema":"density_function","minVersion":"1.18.2"},{"id":"worldgen/placed_feature","url":"worldgen/placed-feature","category":"worldgen","schema":"placed_feature","minVersion":"1.18"},{"id":"worldgen/noise","url":"worldgen/noise","category":"worldgen","schema":"noise_parameters","minVersion":"1.18"},{"id":"worldgen/noise_settings","url":"worldgen/noise-settings","category":"worldgen","schema":"noise_settings","minVersion":"1.16"},{"id":"worldgen/configured_structure_feature","url":"worldgen/structure-feature","category":"worldgen","schema":"configured_structure_feature","minVersion":"1.16","maxVersion":"1.18.2"},{"id":"worldgen/structure","url":"worldgen/structure","category":"worldgen","schema":"structure","minVersion":"1.19"},{"id":"worldgen/structure_set","url":"worldgen/structure-set","category":"worldgen","schema":"structure_set","minVersion":"1.18.2"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16","maxVersion":"1.17"},{"id":"worldgen/processor_list","url":"worldgen/processor-list","category":"worldgen","schema":"processor_list","minVersion":"1.16"},{"id":"worldgen/template_pool","url":"worldgen/template-pool","category":"worldgen","schema":"template_pool","minVersion":"1.16"},{"id":"worldgen/world_preset","url":"worldgen/world-preset","category":"worldgen","schema":"world_preset","minVersion":"1.19"},{"id":"worldgen/flat_level_generator_preset","url":"worldgen/flat-world-preset","category":"worldgen","schema":"flat_level_generator_preset","minVersion":"1.19"},{"id":"block_definition","url":"assets/blockstate","path":"blockstates","category":"assets","schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","category":"assets","schema":"model"}]}');function ge(e){return"object"==typeof e&&null!==e}const we=e=>("0"+e.toString(16)).substr(-2);function _e(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,we).join("")}function ye(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function be(e){const t=Math.floor(4294967296*Math.random())-2147483648,n=e.get(new h.Path(["dimensions"]));e.set(new h.Path(["seed"]),t,!0),ge(n)&&Object.keys(n).forEach((n=>{e.set(new h.Path(["dimensions",n,"generator","seed"]),t,!0),e.set(new h.Path(["dimensions",n,"generator","biome_source","seed"]),t,!0)})),e.set(new h.Path(["placement","salt"]),Math.abs(t),!0),e.set(new h.Path(["generator","seed"]),t,!0),e.set(new h.Path(["generator","biome_source","seed"]),t)}function ke(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function xe(e){return`/${e}/`.replaceAll("//","/")}function Ce(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),xe(e)}function Me(e){const t=Ce(e).replace(/^\//,"").replace(/\/$/,"");return ve.generators.find((e=>e.url===t))}function Ae(e){const t=e.indexOf("?");return t>=0?(e=e.slice(t+1),new Map(e.split("&").map((e=>{const t=e.indexOf("=");return-1===t?[e,"true"]:[decodeURIComponent(e.slice(0,t)),decodeURIComponent(e.slice(t+1))]})))):new Map}function Ie(e,t){const n=p(),o=Ae(n);Object.entries(e).forEach((([e,t])=>{void 0===t?o.delete(e):o.set(e,t)}));const r=Array.from(o).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t).replaceAll("%2F","/")}`));m(`${t?xe(t):Ce(n)}${0===r.length?"":`?${r.join("&")}`}`,!0)}function ze(e){const t=Math.abs(ke(e));return[t%256,(t>>8)%256,(t>>16)%256]}function $e(e){return e*e}function je(e,t,n){return Math.max(e,Math.min(t,n))}function Ee(e,t,n){return n<0?e:n>1?t:Se(n,e,t)}function Se(e,t,n){return t+e*(n-t)}function Oe(e){return e instanceof Error?e.message:`${e}`}const Le=u();function Pe(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=0;o<n;o++)if(!Pe(e[o],t[o]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(o=n;0!=o--;){const n=r[o];if(!Pe(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}class De{constructor(){this.forward=new Map,this.backward=new Map}set(e,t){this.forward.set(e,t),this.backward.set(t,e)}getA(e){return this.backward.get(e)}getB(e){return this.forward.get(e)}getOrPut(e,t){const n=this.forward.get(e);return void 0===n?(this.set(e,t),t):n}}function Ve({icon:e,label:t,large:n,larger:o,doSelect:r,value:a,placeholder:s,dataList:i,onChange:l}){const u=void 0===l?()=>{}:e=>{const t=e.target.value;null==l||l(t)},h=f(null);c((()=>{r&&h.current&&h.current.select()}),[r]);const p=i&&_e();return d("div",{class:`btn btn-input ${n?"large-input":""} ${o?"larger-input":""}`,onClick:e=>e.stopPropagation()},e&&Je[e],t&&d("span",null,t),d("input",{ref:h,type:"text",value:a,onChange:u,placeholder:s,list:p}),i&&d("datalist",{id:p},i.map((e=>d("option",{value:e})))))}function Ne({cooldown:e,invert:t,initial:n}={}){const[o,r]=v(n),a=f(void 0);return[o,()=>{r(!t),void 0!==a.current&&clearTimeout(a.current),a.current=setTimeout((()=>{r(!!t)}),null!=e?e:2e3)}]}function Te({size:e,draw:t,onDrag:n,onHover:o,onLeave:r},a){const s=f(null),i=f(),l=f(),d=f([0,0]),u=f(!1);c((()=>{const e=e=>{i.current=[e.offsetX,e.offsetY]},t=e=>{if(void 0===i.current){const t=e.offsetX/s.current.clientWidth,n=e.offsetY/s.current.clientHeight;return void(null==o||o(t,n))}if(!n)return;const t=e.offsetX-i.current[0],r=e.offsetY-i.current[1];0===t&&0===r||(d.current=[d.current[0]+t,d.current[1]+r],u.current||(cancelAnimationFrame(l.current),l.current=requestAnimationFrame((async()=>{u.current=!0;const e=d.current[0]/s.current.clientWidth,t=d.current[1]/s.current.clientHeight;d.current=[0,0],await(null==n?void 0:n(e,t)),u.current=!1})))),i.current=[e.offsetX,e.offsetY]},a=()=>{i.current=void 0},c=()=>{null==r||r()};return s.current.addEventListener("mousedown",e),s.current.addEventListener("mousemove",t),s.current.addEventListener("mouseleave",c),document.body.addEventListener("mouseup",a),()=>{var n,o,r;null==(n=s.current)||n.removeEventListener("mousedown",e),null==(o=s.current)||o.removeEventListener("mousemove",t),null==(r=s.current)||r.removeEventListener("mouseleave",c),document.body.removeEventListener("mouseup",a)}}),[...null!=a?a:[],s.current]);const h=f(),p=f(0);return h.current=async()=>{const n=s.current.getContext("2d"),o=e();s.current.width=o[0],s.current.height=o[1];const r=n.getImageData(0,0,o[0],o[1]),a=p.current+=1;try{await t(r)}catch(i){throw i}a===p.current&&n.putImageData(r,0,0)},{canvas:s,redraw:h.current}}function Be(){const[e,t]=v(!1),n=()=>{t(!1)};return c((()=>(e&&(document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n)),()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n)})),[e]),[e,()=>t(!0)]}function He(e){const[t,n]=v(matchMedia(e).matches),o=e=>{n(e.matches)};return c((()=>{const t=matchMedia(e);return t.addEventListener("change",o),()=>{t.removeEventListener("change",o)}}),[e]),t}function Fe(e,t,n){const o={invalidated(){e&&t(e)}};c((()=>(null==e||e.addListener(o),()=>{null==e||e.removeListener(o)})),[e,...null!=n?n:[]])}function Re(e){const{icon:t,label:n,relative:o,tooltip:r,tooltipLoc:a,children:s}=e,[c,u]=Be();return d("div",i({class:"btn-menu"+(!1===o?" no-relative":"")},e),d(fe,l(i({},{icon:t,label:n,tooltip:r,tooltipLoc:a}),{onClick:u})),c&&d("div",{class:"btn-group"},s))}const Je={alert:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"})),archive:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.75 2.5a.25.25 0 00-.25.25v1.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25H1.75zM0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v1.5A1.75 1.75 0 0114.25 6H1.75A1.75 1.75 0 010 4.25v-1.5zM1.75 7a.75.75 0 01.75.75v5.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-5.5a.75.75 0 111.5 0v5.5A1.75 1.75 0 0113.25 15H2.75A1.75 1.75 0 011 13.25v-5.5A.75.75 0 011.75 7zm4.5 1a.75.75 0 000 1.5h3.5a.75.75 0 100-1.5h-3.5z"})),arrow_left:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z"})),arrow_right:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z"})),check:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})),chevron_down:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z"})),chevron_right:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})),chevron_up:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M3.22 9.78a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L8 6.06 4.28 9.78a.75.75 0 01-1.06 0z"})),clippy:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"})),code:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"})),dash:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M2 8a.75.75 0 01.75-.75h10.5a.75.75 0 010 1.5H2.75A.75.75 0 012 8z"})),device_desktop:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z"})),dot_fill:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})),duplicate:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{d:"M10.5 3a.75.75 0 01.75.75v1h1a.75.75 0 010 1.5h-1v1a.75.75 0 01-1.5 0v-1h-1a.75.75 0 010-1.5h1v-1A.75.75 0 0110.5 3z"}),d("path",{"fill-rule":"evenodd",d:"M6.75 0A1.75 1.75 0 005 1.75v7.5c0 .966.784 1.75 1.75 1.75h7.5A1.75 1.75 0 0016 9.25v-7.5A1.75 1.75 0 0014.25 0h-7.5zM6.5 1.75a.25.25 0 01.25-.25h7.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5z"}),d("path",{d:"M1.75 5A1.75 1.75 0 000 6.75v7.5C0 15.216.784 16 1.75 16h7.5A1.75 1.75 0 0011 14.25v-1.5a.75.75 0 00-1.5 0v1.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25h1.5a.75.75 0 000-1.5h-1.5z"})),eye:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"})),eye_closed:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M.143 2.31a.75.75 0 011.047-.167l14.5 10.5a.75.75 0 11-.88 1.214l-2.248-1.628C11.346 13.19 9.792 14 8 14c-1.981 0-3.67-.992-4.933-2.078C1.797 10.832.88 9.577.43 8.9a1.618 1.618 0 010-1.797c.353-.533.995-1.42 1.868-2.305L.31 3.357A.75.75 0 01.143 2.31zm3.386 3.378a14.21 14.21 0 00-1.85 2.244.12.12 0 00-.022.068c0 .021.006.045.022.068.412.621 1.242 1.75 2.366 2.717C5.175 11.758 6.527 12.5 8 12.5c1.195 0 2.31-.488 3.29-1.191L9.063 9.695A2 2 0 016.058 7.52l-2.53-1.832zM8 3.5c-.516 0-1.017.09-1.499.251a.75.75 0 11-.473-1.423A6.23 6.23 0 018 2c1.981 0 3.67.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.619 1.619 0 010 1.798c-.11.166-.248.365-.41.587a.75.75 0 11-1.21-.887c.148-.201.272-.382.371-.53a.119.119 0 000-.137c-.412-.621-1.242-1.75-2.366-2.717C10.825 4.242 9.473 3.5 8 3.5z"})),file:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"})),file_directory:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3h-6.5a.25.25 0 01-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z"})),gear:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.429 1.525a6.593 6.593 0 011.142 0c.036.003.108.036.137.146l.289 1.105c.147.56.55.967.997 1.189.174.086.341.183.501.29.417.278.97.423 1.53.27l1.102-.303c.11-.03.175.016.195.046.219.31.41.641.573.989.014.031.022.11-.059.19l-.815.806c-.411.406-.562.957-.53 1.456a4.588 4.588 0 010 .582c-.032.499.119 1.05.53 1.456l.815.806c.08.08.073.159.059.19a6.494 6.494 0 01-.573.99c-.02.029-.086.074-.195.045l-1.103-.303c-.559-.153-1.112-.008-1.529.27-.16.107-.327.204-.5.29-.449.222-.851.628-.998 1.189l-.289 1.105c-.029.11-.101.143-.137.146a6.613 6.613 0 01-1.142 0c-.036-.003-.108-.037-.137-.146l-.289-1.105c-.147-.56-.55-.967-.997-1.189a4.502 4.502 0 01-.501-.29c-.417-.278-.97-.423-1.53-.27l-1.102.303c-.11.03-.175-.016-.195-.046a6.492 6.492 0 01-.573-.989c-.014-.031-.022-.11.059-.19l.815-.806c.411-.406.562-.957.53-1.456a4.587 4.587 0 010-.582c.032-.499-.119-1.05-.53-1.456l-.815-.806c-.08-.08-.073-.159-.059-.19a6.44 6.44 0 01.573-.99c.02-.029.086-.075.195-.045l1.103.303c.559.153 1.112.008 1.529-.27.16-.107.327-.204.5-.29.449-.222.851-.628.998-1.189l.289-1.105c.029-.11.101-.143.137-.146zM8 0c-.236 0-.47.01-.701.03-.743.065-1.29.615-1.458 1.261l-.29 1.106c-.017.066-.078.158-.211.224a5.994 5.994 0 00-.668.386c-.123.082-.233.09-.3.071L3.27 2.776c-.644-.177-1.392.02-1.82.63a7.977 7.977 0 00-.704 1.217c-.315.675-.111 1.422.363 1.891l.815.806c.05.048.098.147.088.294a6.084 6.084 0 000 .772c.01.147-.038.246-.088.294l-.815.806c-.474.469-.678 1.216-.363 1.891.2.428.436.835.704 1.218.428.609 1.176.806 1.82.63l1.103-.303c.066-.019.176-.011.299.071.213.143.436.272.668.386.133.066.194.158.212.224l.289 1.106c.169.646.715 1.196 1.458 1.26a8.094 8.094 0 001.402 0c.743-.064 1.29-.614 1.458-1.26l.29-1.106c.017-.066.078-.158.211-.224a5.98 5.98 0 00.668-.386c.123-.082.233-.09.3-.071l1.102.302c.644.177 1.392-.02 1.82-.63.268-.382.505-.789.704-1.217.315-.675.111-1.422-.364-1.891l-.814-.806c-.05-.048-.098-.147-.088-.294a6.1 6.1 0 000-.772c-.01-.147.039-.246.088-.294l.814-.806c.475-.469.679-1.216.364-1.891a7.992 7.992 0 00-.704-1.218c-.428-.609-1.176-.806-1.82-.63l-1.103.303c-.066.019-.176.011-.299-.071a5.991 5.991 0 00-.668-.386c-.133-.066-.194-.158-.212-.224L10.16 1.29C9.99.645 9.444.095 8.701.031A8.094 8.094 0 008 0zm1.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM11 8a3 3 0 11-6 0 3 3 0 016 0z"})),globe:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"})),history:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"})),info:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"})),issue_opened:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"})),kebab_horizontal:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{d:"M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})),link:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"})),link_external:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z"})),mark_github:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})),moon:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z"})),play:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z"})),plus:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z"})),plus_circle:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.75 4.75a.75.75 0 00-1.5 0v2.5h-2.5a.75.75 0 000 1.5h2.5v2.5a.75.75 0 001.5 0v-2.5h2.5a.75.75 0 000-1.5h-2.5v-2.5z"})),repo:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"})),search:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"})),sort_asc:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75zm12.927-9.677a.25.25 0 00-.354 0l-3 3A.25.25 0 009.75 6H12v6.75a.75.75 0 001.5 0V6h2.25a.25.25 0 00.177-.427l-3-3z"})),sort_desc:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75z"}),d("path",{d:"M13.5 10h2.25a.25.25 0 01.177.427l-3 3a.25.25 0 01-.354 0l-3-3A.25.25 0 019.75 10H12V3.75a.75.75 0 011.5 0V10z"})),square:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M4 5.75C4 4.784 4.784 4 5.75 4h4.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0110.25 12h-4.5A1.75 1.75 0 014 10.25v-4.5zm1.75-.25a.25.25 0 00-.25.25v4.5c0 .138.112.25.25.25h4.5a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-4.5z"})),square_fill:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M5.75 4A1.75 1.75 0 004 5.75v4.5c0 .966.784 1.75 1.75 1.75h4.5A1.75 1.75 0 0012 10.25v-4.5A1.75 1.75 0 0010.25 4h-4.5z"})),stack:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M7.122.392a1.75 1.75 0 011.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 01-1.756 0L2.119 5.456a1.25 1.25 0 010-2.162L7.122.392zM8.125 1.69a.25.25 0 00-.25 0l-4.63 2.685 4.63 2.685a.25.25 0 00.25 0l4.63-2.685-4.63-2.685zM1.601 7.789a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0L1.874 8.814A.75.75 0 011.6 7.789zm0 3.5a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0l-5.248-3.044a.75.75 0 01-.273-1.025z"})),sun:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 10.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zM8 12a4 4 0 100-8 4 4 0 000 8zM8 0a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0V.75A.75.75 0 018 0zm0 13a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 018 13zM2.343 2.343a.75.75 0 011.061 0l1.06 1.061a.75.75 0 01-1.06 1.06l-1.06-1.06a.75.75 0 010-1.06zm9.193 9.193a.75.75 0 011.06 0l1.061 1.06a.75.75 0 01-1.06 1.061l-1.061-1.06a.75.75 0 010-1.061zM16 8a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0116 8zM3 8a.75.75 0 01-.75.75H.75a.75.75 0 010-1.5h1.5A.75.75 0 013 8zm10.657-5.657a.75.75 0 010 1.061l-1.061 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm-9.193 9.193a.75.75 0 010 1.06l-1.06 1.061a.75.75 0 11-1.061-1.06l1.06-1.061a.75.75 0 011.061 0z"})),sync:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8 2.5a5.487 5.487 0 00-4.131 1.869l1.204 1.204A.25.25 0 014.896 6H1.25A.25.25 0 011 5.75V2.104a.25.25 0 01.427-.177l1.38 1.38A7.001 7.001 0 0114.95 7.16a.75.75 0 11-1.49.178A5.501 5.501 0 008 2.5zM1.705 8.005a.75.75 0 01.834.656 5.501 5.501 0 009.592 2.97l-1.204-1.204a.25.25 0 01.177-.427h3.646a.25.25 0 01.25.25v3.646a.25.25 0 01-.427.177l-1.38-1.38A7.001 7.001 0 011.05 8.84a.75.75 0 01.656-.834z"})),tag:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"})),terminal:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75zm1.75-.25a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V2.75a.25.25 0 00-.25-.25H1.75zM7.25 8a.75.75 0 01-.22.53l-2.25 2.25a.75.75 0 11-1.06-1.06L5.44 8 3.72 6.28a.75.75 0 111.06-1.06l2.25 2.25c.141.14.22.331.22.53zm1.5 1.5a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z"})),three_bars:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"})),trashcan:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z"})),unfold:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{d:"M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z"})),upload:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M8.53 1.22a.75.75 0 00-1.06 0L3.72 4.97a.75.75 0 001.06 1.06l2.47-2.47v6.69a.75.75 0 001.5 0V3.56l2.47 2.47a.75.75 0 101.06-1.06L8.53 1.22zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})),x:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})),x_circle:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("path",{"fill-rule":"evenodd",d:"M3.404 12.596a6.5 6.5 0 119.192-9.192 6.5 6.5 0 01-9.192 9.192zM2.344 2.343a8 8 0 1011.313 11.314A8 8 0 002.343 2.343zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z"}))};function We({error:e,onDismiss:t}){const[n,o]=v(!1),[r,a]=v(void 0);c((()=>{if(e instanceof Error){const t=e.stack.split("\n").map((e=>e.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)")));a(t.join("\n")),g.exports.mapStackTrace(t.join("\n"),(e=>{const t=e.map((e=>e.replace(/..\/..\/src\//,"src/"))).join("\n");a(t)}))}}),[e]);const s=w((()=>{let t="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(t+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,r&&(t+=`&body=${encodeURIComponent(`\`\`\`\n${e.name}: ${e.message}\n${r}\n\`\`\`\n`)}`)):t+=`?title=${encodeURIComponent(e.toString())}`,t}),[e,r]);return d("div",{class:"error"},t&&d("div",{class:"error-dismiss",onClick:t},Je.x),d("h3",null,e instanceof Error?e.message:e,r&&d("span",{onClick:()=>o(!n)},Je.info)),r&&n&&d("pre",null,r),d("p",null,"If you think this is a bug, you can report it ",d("a",{href:s,target:"_blank"},"on GitHub")))}function Ue({label:e,value:t,onChange:n}){const o=_e();return d("label",{class:"checkbox"},d("input",{id:o,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function Ge(e,t,n){const o=e=>{const o=e.onChange&&(t=>{var o;const r=t.target.value;null==(o=e.onChange)||o.call(e,n(r))}),r=e.onEnter&&(t=>{var o;if("Enter"===t.key){const r=t.target.value;null==(o=e.onEnter)||o.call(e,n(r))}});return d("input",i(i({},e),{type:t,onChange:o,onKeyDown:r}))};return o.displayName=e,o}const Ye=Ge("TextInput","text",(e=>e)),qe=Ge("NumberInput","number",(e=>Number(e))),Ke=Ge("RangeInput","range",(e=>Number(e)));function Ze({values:e,onSelect:t,searchPlaceholder:n,noResults:o}){const[r,a]=v(""),s=w((()=>{var t;const n=r.trim().split(" ");return null!=(t=null==e?void 0:e.filter((e=>n.every((t=>e.includes(t))))))?t:[]}),[e,r]);return d(_,null,d(Ve,{icon:"search",large:!0,value:r,onChange:a,doSelect:1,placeholder:null!=n?n:"Search"}),d("div",{class:"result-list"},s.map((e=>d(fe,{key:e,label:e,onClick:()=>null==t?void 0:t(e)}))),0===s.length&&d(fe,{label:null!=o?o:"No results"})))}const Xe="https://raw.githubusercontent.com/misode/technical-changes/main";let Qe=null;async function et(){if(!Qe){const e=await(await fetch(`${Xe}/index.json`)).json();Qe=(await Promise.all(e.map(((e,t)=>async function(e,t){const n=await(await fetch(`${Xe}/${e.id}/index.json`)).json();return(await Promise.all(n.map(((n,o)=>async function(e,t,n,o){return function(e){return e.split("\n\n").map((e=>{const t=e.indexOf("|");return{tags:e.substring(0,t).trim().split(" "),content:e.slice(t+1).trim().replaceAll("->","→").replaceAll("\n...\n","\n\n")}}))}(await(await fetch(`${Xe}/${e.id}/${t.id}.md`)).text()).map((r=>i({version:t,group:e,order:1e3*n+o},r)))}(e,tt(n),t,o))))).flat()}(tt(e),t))))).flat().map((e=>l(i({},e),{tags:[e.group.id,...e.tags]})))}return Qe}function tt(e){return"string"==typeof e?{id:e,article:e.match(/\d\dw\d\d[a-z]/)?"minecraft-snapshot-"+e:e.match(/\d+\.\d+(\.\d+)?-pre[0-9]+/)?"minecraft-"+e.replaceAll(".","-").replaceAll("pre","pre-release-"):null}:ge(e)?e:{id:"unknown",article:null}}["1.15","1.16","1.17"].forEach((e=>localStorage.removeItem(`cache_${e}`))),["mcdata_master","vanilla_datapack_summary"].forEach((e=>localStorage.removeItem(`cached_${e}`))),caches.delete("misode-v1");const nt="https://raw.githubusercontent.com/misode/mcmeta";function ot(e,t){return`${nt}/${e.dynamic?t:`${e.ref}-${t}`}`}async function rt(e){e.dynamic&&("22w15a"!==localStorage.getItem("cached_latest_version")&&(await async function(e){try{const t=await caches.open("misode-v2");console.debug("[deleteMatching] Opened cache misode-v2");const n=[];for(const o of await t.keys())e(o.url)&&n.push(t.delete(o));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache misode-v2: ${Oe(t)}`)}}((e=>e.startsWith(`${nt}/summary/`)||e.startsWith(`${nt}/data/`)||e.startsWith(`${nt}/assets/`)||e.startsWith(`${nt}/registries/`))),localStorage.setItem("cached_latest_version","22w15a")),e.ref="22w15a")}async function at(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await lt(`${ot(e,"summary")}/registries/data.min.json`);for(const e in n)t.register(e,n[e].map((e=>"minecraft:"+e)))}catch(n){console.warn("Error occurred while fetching registries:",Oe(n))}}async function st(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await lt(`${ot(e,"summary")}/blocks/data.min.json`);for(const e in n)t["minecraft:"+e]={properties:n[e][0],default:n[e][1]}}catch(n){console.warn("Error occurred while fetching block state map:",Oe(n))}}async function it(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const o=ve.versions.find((t=>t.id===e));try{const e=["blockstates","models"].includes(t)?"assets":"data",r=`${ot(o,e)}/${e}/minecraft/${t}/${n}.json`;return(await fetch(r)).json()}catch(r){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${Oe(r)}`)}}async function lt(e,t=(e=>e)){try{const n=await caches.open("misode-v2");console.debug(`[getData] Opened cache misode-v2 ${e}`);const o=await n.match(e);if(o&&o.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await o.json();console.debug(`[getData] fetching data ${e}`);const r=await fetch(e),a=t(await r.json());return await n.put(e,new Response(JSON.stringify(a))),a}catch(n){console.warn(`[getData] Failed to open cache misode-v2: ${Oe(n)}`),console.debug(`[getData] fetching data ${e}`);const o=await fetch(e);return t(await o.json())}}const ct=["1.15","1.16","1.17","1.18","1.18.2","1.19"],dt={},ut={},ht={1.15:y,1.16:b,1.17:k,1.18:x,"1.18.2":C,1.19:M};let pt,mt,ft;async function vt(e){return dt[e]||(dt[e]=(async()=>{try{const t=ht[e].getCollections(),n={};await async function(e,t,n){const o=ve.versions.find((t=>t.id===e));o?(await rt(o),await Promise.all([at(o,t),st(o,n)])):console.error(`[fetchData] Unknown version ${o} in ${JSON.stringify(ve.versions)}`)}(e,t,n);const o=ht[e].getSchemas(t);return dt[e]={collections:t,schemas:o,blockStates:n},dt[e]}catch(t){throw new Error(`Cannot get version "${e}": ${Oe(t)}`)}})()),dt[e]}function gt(e,t,n){const o=ve.versions.findIndex((t=>t.id===e)),r=t?ve.versions.findIndex((e=>e.id===t)):0,a=n?ve.versions.findIndex((e=>e.id===n)):ve.versions.length-1;return r<=o&&o<=a}const wt=new Map;async function _t(e){var t;try{const n=await yt(`/snippets/${e}`);return l(i({},n),{data:JSON.parse(null!=(t=A.decompressFromBase64(n.data))?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function yt(e,t){var n,o,r;const a=await fetch("https://z15g7can.directus.app/items"+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0),s=await a.json();if(s.data)return s.data;throw new Error(null!=(r=null==(o=null==(n=s.errors)?void 0:n[0])?void 0:o.message)?r:"Unknown error")}let bt;const kt={},xt=function(e,t){if(!t)return e();if(void 0===bt){const e=document.createElement("link").relList;bt=e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}return Promise.all(t.map((e=>{if(e in kt)return;kt[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":bt,t||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),t?new Promise(((e,t)=>{o.addEventListener("load",e),o.addEventListener("error",t)})):void 0}))).then((()=>e()))};var Ct,Mt,At=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","assets":"Assets","block_definition":"Blockstate","changelog.search":"Search changes","changelog.no_results":"No changes","collapse":"Collapse","collapse_all":"Hold %0% to collapse all","configure_layers":"Configure layers","copy":"Copy","copy_share":"Copy share link","copied":"Copied!","copy_context":"Copy context","dimension_type":"Dimension Type","dimension":"Dimension","disabled":"Disabled","download":"Download","duplicate":"Duplicate","enabled":"Enabled","entries_hidden":"%0% entries hidden","entries_hidden.more":"Show %0% more","entries_hidden.all":"Show all","expand":"Expand","expand_all":"Hold %0% to expand all","feature.decorated.decorators":"Decorators","feature.decorated.decorators.entry":"Decorator","follow_reference":"Follow reference","format.json":"JSON","format.yaml":"YAML","fields":"Fields","generate_new_seed":"Generate new seed","github":"GitHub","hide_output":"Hide output","hide_preview":"Hide preview","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.minified":"Minified","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","layer.biomes":"Biomes","layer.temperature":"Temperature","layer.humidity":"Humidity","layer.continentalness":"Continentalness","layer.erosion":"Erosion","layer.weirdness":"Weirdness","layer.offset":"Offset","layer.factor":"Factor","layer.jaggedness":"Jaggedness","highlighting":"Highlighting","loading":"Loading...","loot_table":"Loot Table","model":"Model","more":"More","move_down":"Move down","move_up":"Move up","not_found.description":"The page you were looking for does not exist.","no_presets":"No presets","output_settings":"Output settings","predicate":"Predicate","recipe":"Recipe","redo":"Redo","reset":"Reset","restore_backup":"Restore last backup","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme":"Theme","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.changelog":"Technical Changelog","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.home":"Data Pack Generators","title.project":"%0% Project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","presets":"Presets","preview":"Visualize","preview.auto_scroll":"Auto scroll","preview.biome":"Biome","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.width":"Width","project.delete_file":"Delete file","project.go_to":"Go to project","project.new_file":"New file","project.no_files":"No files","project.search":"Search project","project.search_drafts":"Search drafts","project.unsaved_file":"Unsaved file","remove":"Remove","search":"Search","show_output":"Show output","show_preview":"Show preview","sounds.play":"Play","sounds.play_sound":"Play sound","sounds.play_all":"Play all","sounds.search":"Search sounds","sounds.download_function":"Download Mcfunction","sounds.delay":"Delay","sounds.pitch":"Pitch","sounds.volume":"Volume","sounds.copy_command":"Copy command","sounds.add_sound":"Add sound","sounds.remove_sound":"Remove sound","sounds.unknown_sound":"Unknown sound","sounds.loading_sound":"Loading sound","source_placeholder":"Paste raw %0% content here","switch_generator":"Switch generator","switch_version":"Switch version","terrain_settings":"Terrain settings","undo":"Undo","versions.search":"Search versions","versions.no_results":"No results","versions.all":"All versions","versions.previous":"Previous","versions.next":"Next","versions.released":"Released","versions.release_target":"Release target","versions.data_version":"Data version","versions.protocol_version":"Protocol version","versions.pack_format":"Pack format","versions.data_pack_format":"Data pack format","versions.resource_pack_format":"Resource pack format","versions.technical_changes":"Technical changes","versions.discussion":"Discussion","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/density_function":"Density Function","worldgen/placed_feature":"Placed Feature","worldgen/noise":"Noise","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/structure":"Structure","worldgen/structure_set":"Structure Set","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","worldgen/world_preset":"World Preset","worldgen/flat_level_generator_preset":"Flat World Preset","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),It=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:At});(Mt=Ct||(Ct={})).ID_LANGUAGE="language",Mt.ID_THEME="theme",Mt.ID_VERSION="schema_version",Mt.ID_INDENT="indentation",Mt.ID_FORMAT="output_format",Mt.ID_HIGHLIGHTING="output_highlighting",Mt.ID_SOUNDS_VERSION="minecraft_sounds_version",Mt.ID_PROJECTS="misode_projects",Mt.ID_BACKUPS="misode_generator_backups",Mt.getLanguage=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_LANGUAGE))?e:"en"},Mt.getTheme=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_THEME))?e:"dark"},Mt.getVersion=function(){const e=localStorage.getItem(Mt.ID_VERSION);return e&&ct.includes(e)?e:"1.18.2"},Mt.getIndent=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_INDENT))?e:"2_spaces"},Mt.getFormat=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_FORMAT))?e:"json"},Mt.getHighlighting=function(){return"false"!==localStorage.getItem(Mt.ID_HIGHLIGHTING)},Mt.getSoundsVersion=function(){var e;return null!=(e=localStorage.getItem(Mt.ID_SOUNDS_VERSION))?e:"latest"},Mt.getProjects=function(){const e=localStorage.getItem(Mt.ID_PROJECTS);return e?JSON.parse(e):[Lt]},Mt.getBackup=function(e){var t;return JSON.parse(null!=(t=localStorage.getItem(Mt.ID_BACKUPS))?t:"{}")[e]},Mt.setLanguage=function(e){e&&localStorage.setItem(Mt.ID_LANGUAGE,e)},Mt.setTheme=function(e){e&&localStorage.setItem(Mt.ID_THEME,e)},Mt.setVersion=function(e){e&&localStorage.setItem(Mt.ID_VERSION,e)},Mt.setIndent=function(e){e&&localStorage.setItem(Mt.ID_INDENT,e)},Mt.setFormat=function(e){e&&localStorage.setItem(Mt.ID_FORMAT,e)},Mt.setHighlighting=function(e){void 0!==e&&localStorage.setItem(Mt.ID_HIGHLIGHTING,e.toString())},Mt.setSoundsVersion=function(e){e&&localStorage.setItem(Mt.ID_SOUNDS_VERSION,e)},Mt.setProjects=function(e){e&&localStorage.setItem(Mt.ID_PROJECTS,JSON.stringify(e))},Mt.setBackup=function(e,t){var n;const o=JSON.parse(null!=(n=localStorage.getItem(Mt.ID_BACKUPS))?n:"{}");void 0===t?delete o[e]:o[e]=t,localStorage.setItem(Mt.ID_BACKUPS,JSON.stringify(o))};const zt=I({lang:"none",locale:e=>e,changeLanguage:()=>{}}),$t={fallback:At};function jt(e,t,...n){var o,r,a,s,i;return function(e,t){return e.replace(/%\d+%/g,(e=>{const n=parseInt(e.slice(1,-1));return void 0!==(null==t?void 0:t[n])?t[n]:e}))}(null!=(i=null!=(s=null!=(a=null==(o=$t[e])?void 0:o[t])?a:null==(r=$t.en)?void 0:r[t])?s:$t.fallback[t])?i:t,n)}async function Et(e){if($t[e])return;const t=ve.languages.find((t=>t.code===e));if(!t)return;const n=await function(e){switch(e){case"../../locales/de.json":return xt((()=>import("./de.a269acce.js")),void 0);case"../../locales/en.json":return xt((()=>Promise.resolve().then((function(){return It}))),void 0);case"../../locales/es.json":return xt((()=>import("./es.833a9774.js")),void 0);case"../../locales/fr.json":return xt((()=>import("./fr.f5531eea.js")),void 0);case"../../locales/it.json":return xt((()=>import("./it.fd9a8268.js")),void 0);case"../../locales/ja.json":return xt((()=>import("./ja.167de97b.js")),void 0);case"../../locales/pl.json":return xt((()=>import("./pl.3a9fb38c.js")),void 0);case"../../locales/pt.json":return xt((()=>import("./pt.1a04bd2d.js")),void 0);case"../../locales/ru.json":return xt((()=>import("./ru.578070fe.js")),void 0);case"../../locales/sk.json":return xt((()=>import("./sk.96bbf351.js")),void 0);case"../../locales/zh-cn.json":return xt((()=>import("./zh-cn.e3c47b68.js")),void 0);case"../../locales/zh-tw.json":return xt((()=>import("./zh-tw.42e9d37d.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../../locales/${e}.json`),o=!1!==t.schemas&&await function(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return xt((()=>import("./cs.967a01eb.js")),void 0);case"../../../node_modules/@mcschema/locales/src/de.json":return xt((()=>import("./de.8e2383d8.js")),void 0);case"../../../node_modules/@mcschema/locales/src/en.json":return xt((()=>import("./en.20a098e7.js")),void 0);case"../../../node_modules/@mcschema/locales/src/es.json":return xt((()=>import("./es.6b3597bc.js")),void 0);case"../../../node_modules/@mcschema/locales/src/fr.json":return xt((()=>import("./fr.e316b1e2.js")),void 0);case"../../../node_modules/@mcschema/locales/src/it.json":return xt((()=>import("./it.7ff123cd.js")),void 0);case"../../../node_modules/@mcschema/locales/src/ja.json":return xt((()=>import("./ja.3170354d.js")),void 0);case"../../../node_modules/@mcschema/locales/src/pl.json":return xt((()=>import("./pl.ae1f6791.js")),void 0);case"../../../node_modules/@mcschema/locales/src/pt.json":return xt((()=>import("./pt.31e14993.js")),void 0);case"../../../node_modules/@mcschema/locales/src/ru.json":return xt((()=>import("./ru.1298edc9.js")),void 0);case"../../../node_modules/@mcschema/locales/src/sk.json":return xt((()=>import("./sk.d4265232.js")),void 0);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return xt((()=>import("./zh-cn.4129665a.js")),void 0);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return xt((()=>import("./zh-tw.bdc36a24.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../../../node_modules/@mcschema/locales/src/${e}.json`);$t[e]=i(i({},n.default),o.default)}function St(){return $(zt)}function Ot({children:e}){const[t,n]=v("none"),o=z(((e,...n)=>jt(t,e,...n)),[t]),r=z((async e=>{await Et(e),pe.setLanguage(e),Ct.setLanguage(e),n(e)}),[]);c((()=>{(async()=>{const e=Ct.getLanguage();await Promise.all([Et("en"),..."en"!==e?[Et(e)]:[]]),n(e)})()}),[]);const a={lang:t,locale:o,changeLanguage:r};return d(zt.Provider,{value:a},e)}const Lt={name:"Drafts",namespace:"draft",files:[]},Pt=I({project:Lt,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function Dt(){return $(Pt)}function Vt({children:e}){const[t,n]=v(Ct.getProjects()),[o,r]=v(Lt.name),a=w((()=>{var e;return null!=(e=t.find((e=>e.name===o)))?e:Lt}),[t,o]),[s,c]=v(void 0),u=w((()=>{if(s)return a.files.find((e=>e.type===s[0]&&e.id===s[1]))}),[a,s]),h=z((e=>{Ct.setProjects(e),n(e)}),[]),p=z((e=>{h(t.map((t=>t.name===o?i(i({},t),e):t)))}),[t,o]),f=z(((e,t,n)=>{var o;if(n.id){const r=n.id.includes(":")?n.id:`${a.namespace}:${n.id}`,s=a.files.some((t=>t.type===e&&t.id===r));if(t){if((null==u?void 0:u.id)===t&&t!==r&&s)return!1;p({files:a.files.map((o=>o.type===e&&o.id===t?l(i(i({},o),n),{id:r}):o))}),(null==u?void 0:u.id)===t&&c([e,r])}else{if(s)return!1;p({files:[...a.files,{type:e,id:r,data:null!=(o=n.data)?o:{}}]}),c([e,r])}}else p({files:a.files.filter((n=>n.type!==e||n.id!==t))});return!0}),[p,a,u]),g=z(((e,t)=>{const n=ve.generators.find((t=>t.id===e||t.path===e));if(!n)throw new Error(`Cannot find generator of type ${e}`);c([n.id,t]),m(xe(n.url))}),[]),_=z((()=>{c(void 0)}),[]),y={project:a,file:u,changeProject:r,updateProject:p,updateFile:f,openFile:g,closeFile:_};return d(Pt.Provider,{value:y},e)}function Nt(e){var t;const[n,o]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id],r=ve.generators.find((t=>t.id===e.type));if(!r)throw new Error(`Cannot find generator of type ${e.type}`);return`data/${n}/${null!=(t=r.path)?t:r.id}/${o}`}const Tt=I({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function Bt(){return $(Tt)}function Ht({children:e}){const[t,n]=v(Ct.getTheme()),o=He("(prefers-color-scheme: light)"),r=He("(prefers-color-scheme: dark)");c((()=>{document.documentElement.setAttribute("data-theme",t)}),[t]);const a=z((e=>{pe.setTheme(e),Ct.setTheme(e),n(e)}),[]);c((()=>{pe.setPrefersColorScheme(o?"light":r?"dark":"none")}),[o,r]);const s={theme:t,actualTheme:"light"===t||"dark"!==t&&o?"light":"dark",changeTheme:a};return d(Tt.Provider,{value:s},e)}const Ft=I({title:"",changeTitle:()=>{}});function Rt(e,t){const n=$(Ft);return c((()=>{e&&n.changeTitle(e,t)}),[e,t]),n}function Jt({children:e}){const{locale:t}=St(),[n,o]=v(t("title.home")),r={title:n,changeTitle:z(((e,t)=>{null!=t||(t=ve.versions.map((e=>e.id)));const n=t.slice(t.length-3);document.title=`${e} Minecraft ${n.join(", ")}`,o(e)}),[])};return d(Ft.Provider,{value:r},e)}const Wt=I({version:"1.18.2",changeVersion:()=>{}});function Ut(){return $(Wt)}function Gt({children:e}){const[t,n]=v(Ct.getVersion()),o=Ae(p()).get("version");c((()=>{ct.includes(o)&&t!==o&&n(o)}),[t,o]);const r=z(((e,t=!0)=>{Ae(p()).has("version")&&Ie({version:e}),t&&(pe.setVersion(e),Ct.setVersion(e)),n(e)}),[]),a={version:t,changeVersion:r};return d(Wt.Provider,{value:a},e)}let Yt=!1;const qt={temperature:[-1,1],humidity:[-1,1],continentalness:[-1.1,1],erosion:[-1,1],weirdness:[-1,1],offset:[-1,1],factor:[0,12],jaggedness:[0,1]};let Kt,Zt;async function Xt(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return Pe(n,Kt)||(Kt=Le(n),Zt=await async function(e,t){var n,o,r,a,s;switch(null==(n=null==e?void 0:e.type)?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new V(O.parse(e.biome));case"checkerboard":const n=(null!=(o=e.scale)?o:2)+2,i=null!=(a=null==(r=e.biomes)?void 0:r.length)?a:0;return{getBiome(t,o,r){var a;const s=(((t>>n)+(r>>n))%i+i)%i;return O.parse(null==(a=e.biomes)?void 0:a[s].node)}};case"multi_noise":switch(null==(s=e.preset)?void 0:s.replace(/^minecraft:/,"")){case"nether":e=gt(t.version,"1.18")?nn:tn;break;case"overworld":e=gt(t.version,"1.18")?await async function(){return(await it("1.18","dimension","overworld")).generator.biome_source}():e}if(e=h.DataModel.unwrapLists(e),gt(t.version,"1.18")){await async function(){Yt||(await N(T),Yt=!0,console.debug(`Loaded deepslate-rs from "${T}"`))}();const n=new De,o=e=>"number"==typeof e?[e,e]:e,[r,a,s,i,l,c,d,u,h,p,m,f,v,g]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const t of e.biomes){const{temperature:e,humidity:w,continentalness:_,erosion:y,weirdness:b,depth:k,offset:x}=t.parameters;r.push(o(e)[0]),a.push(o(e)[1]),s.push(o(w)[0]),i.push(o(w)[1]),l.push(o(_)[0]),c.push(o(_)[1]),d.push(o(y)[0]),u.push(o(y)[1]),h.push(o(b)[0]),p.push(o(b)[1]),m.push(o(k)[0]),f.push(o(k)[1]),v.push(x),g.push(n.getOrPut(t.biome,Math.floor(2147483647*Math.random())))}const w=j(new Float64Array(r),new Float64Array(a),new Float64Array(s),new Float64Array(i),new Float64Array(l),new Float64Array(c),new Float64Array(d),new Float64Array(u),new Float64Array(h),new Float64Array(p),new Float64Array(m),new Float64Array(f),new Float64Array(v),new Int32Array(g)),_=E(t.seed,t.octaves.temperature.firstOctave,new Float64Array(t.octaves.temperature.amplitudes),t.octaves.humidity.firstOctave,new Float64Array(t.octaves.humidity.amplitudes),t.octaves.continentalness.firstOctave,new Float64Array(t.octaves.continentalness.amplitudes),t.octaves.erosion.firstOctave,new Float64Array(t.octaves.erosion.amplitudes),t.octaves.weirdness.firstOctave,new Float64Array(t.octaves.weirdness.amplitudes),t.octaves.shift.firstOctave,new Float64Array(t.octaves.shift.amplitudes));return{getBiome(e,t,o){var r;const a=S(w,_,e,e+1,1,t,t+1,1,o,o+1,1);return O.parse(null!=(r=n.getA(a[0]))?r:"unknown")},getBiomes:(e,t,o,r,a,s,i,l,c)=>[...S(w,_,e,t,o,r,a,s,i,l,c)].map((e=>{var t;return O.parse(null!=(t=n.getA(e))?t:"unknown")})),getClimate(e,t,n){const o=L(_,e,e+1,1,t,t+1,1,n,n+1,1),[r,a,s,i,l]=o.slice(0,5);return{temperature:r,humidity:a,continentalness:s,erosion:i,weirdness:l}},getClimates(e,t,n,o,r,a,s,i,l){const c=L(_,e,t,n,o,r,a,s,i,l),d=[];for(let u=0;u<c.length;u+=7){const[e,t,n,o,r]=c.slice(u,u+5);d.push({temperature:e,humidity:t,continentalness:n,erosion:o,weirdness:r})}return d}}}{const n=["altitude","temperature","humidity","weirdness"].map(((n,o)=>{var r;const a=e[`${n}_noise`];return a.firstOctave=je(null!=(r=a.firstOctave)?r:-7,-100,-1),new P(new D(t.seed+BigInt(o)),a)}));return Array.isArray(e.biomes)&&0!==e.biomes.length?{getBiome(t,o,r){const a=n.map((e=>e.sample(t,r,0)));let s=1/0,i="";for(const{biome:n,parameters:l}of e.biomes){const e=$e(l.altitude-a[0])+$e(l.temperature-a[1])+$e(l.humidity-a[2])+$e(l.weirdness-a[3])+$e(l.offset);e<s&&(s=e,i=n)}return O.parse(i)}}:new V(O.create("unknown"))}}throw new Error("Unknown biome source")}(e,t)),{biomeSource:Zt}}function Qt(e,t){var n;if(!e)return[128,128,128];const o=null!=(n=t[e])?n:en[e];return void 0===o?ze(e):o}const en={"minecraft:badlands":[217,69,21],"minecraft:badlands_plateau":[202,140,101],"minecraft:bamboo_jungle":[118,142,20],"minecraft:bamboo_jungle_hills":[59,71,10],"minecraft:basalt_deltas":[64,54,54],"minecraft:beach":[250,222,85],"minecraft:birch_forest":[48,116,68],"minecraft:birch_forest_hills":[31,95,50],"minecraft:cold_ocean":[32,32,112],"minecraft:crimson_forest":[221,8,8],"minecraft:dark_forest":[64,81,26],"minecraft:dark_forest_hills":[104,121,66],"minecraft:deep_cold_ocean":[32,32,56],"minecraft:deep_frozen_ocean":[64,64,144],"minecraft:deep_lukewarm_ocean":[0,0,64],"minecraft:deep_ocean":[0,0,48],"minecraft:deep_warm_ocean":[0,0,80],"minecraft:desert":[250,148,24],"minecraft:desert_hills":[210,95,18],"minecraft:desert_lakes":[255,188,64],"minecraft:end_barrens":[128,128,255],"minecraft:end_highlands":[128,128,255],"minecraft:end_midlands":[128,128,255],"minecraft:eroded_badlands":[255,109,61],"minecraft:flower_forest":[45,142,73],"minecraft:forest":[5,102,33],"minecraft:frozen_ocean":[112,112,214],"minecraft:frozen_river":[160,160,255],"minecraft:giant_spruce_taiga":[129,142,121],"minecraft:old_growth_spruce_taiga":[129,142,121],"minecraft:giant_spruce_taiga_hills":[109,119,102],"minecraft:giant_tree_taiga":[89,102,81],"minecraft:old_growth_pine_taiga":[89,102,81],"minecraft:giant_tree_taiga_hills":[69,79,62],"minecraft:gravelly_hills":[136,136,136],"minecraft:gravelly_mountains":[136,136,136],"minecraft:windswept_gravelly_hills":[136,136,136],"minecraft:ice_spikes":[180,220,220],"minecraft:jungle":[83,123,9],"minecraft:jungle_edge":[98,139,23],"minecraft:sparse_jungle":[98,139,23],"minecraft:jungle_hills":[44,66,5],"minecraft:lukewarm_ocean":[0,0,144],"minecraft:modified_badlands_plateau":[242,180,141],"minecraft:modified_gravelly_mountains":[120,152,120],"minecraft:modified_jungle":[123,163,49],"minecraft:modified_jungle_edge":[138,179,63],"minecraft:modified_wooded_badlands_plateau":[216,191,141],"minecraft:mountain_edge":[114,120,154],"minecraft:extreme_hills":[96,96,96],"minecraft:mountains":[96,96,96],"minecraft:windswept_hills":[96,96,96],"minecraft:mushroom_field_shore":[160,0,255],"minecraft:mushroom_fields":[255,0,255],"minecraft:nether_wastes":[191,59,59],"minecraft:ocean":[0,0,112],"minecraft:plains":[141,179,96],"minecraft:river":[0,0,255],"minecraft:savanna":[189,178,95],"minecraft:savanna_plateau":[167,157,100],"minecraft:shattered_savanna":[229,218,135],"minecraft:windswept_savanna":[229,218,135],"minecraft:shattered_savanna_plateau":[207,197,140],"minecraft:small_end_islands":[128,128,255],"minecraft:snowy_beach":[250,240,192],"minecraft:snowy_mountains":[160,160,160],"minecraft:snowy_taiga":[49,85,74],"minecraft:snowy_taiga_hills":[36,63,54],"minecraft:snowy_taiga_mountains":[89,125,114],"minecraft:snowy_tundra":[255,255,255],"minecraft:snowy_plains":[255,255,255],"minecraft:soul_sand_valley":[94,56,48],"minecraft:stone_shore":[162,162,132],"minecraft:stony_shore":[162,162,132],"minecraft:sunflower_plains":[181,219,136],"minecraft:swamp":[7,249,178],"minecraft:swamp_hills":[47,255,218],"minecraft:taiga":[11,102,89],"minecraft:taiga_hills":[22,57,51],"minecraft:taiga_mountains":[51,142,129],"minecraft:tall_birch_forest":[88,156,108],"minecraft:old_growth_birch_forest":[88,156,108],"minecraft:tall_birch_hills":[71,135,90],"minecraft:the_end":[128,128,255],"minecraft:the_void":[0,0,0],"minecraft:warm_ocean":[0,0,172],"minecraft:warped_forest":[73,144,123],"minecraft:wooded_badlands_plateau":[176,151,101],"minecraft:wooded_badlands":[176,151,101],"minecraft:wooded_hills":[34,85,28],"minecraft:wooded_mountains":[80,112,80],"minecraft:windswept_forest":[80,112,80],"minecraft:snowy_slopes":[140,195,222],"minecraft:lofty_peaks":[196,168,193],"minecraft:jagged_peaks":[196,168,193],"minecraft:snowcapped_peaks":[200,198,200],"minecraft:frozen_peaks":[200,198,200],"minecraft:stony_peaks":[82,92,103],"minecraft:grove":[150,150,189],"minecraft:meadow":[169,197,80],"minecraft:lush_caves":[112,255,79],"minecraft:dripstone_caves":[140,124,0]},tn={type:"minecraft:multi_noise",seed:0,altitude_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},humidity_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{biome:"minecraft:nether_wastes",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{altitude:0,temperature:0,humidity:-.5,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{altitude:0,temperature:.4,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{altitude:0,temperature:0,humidity:.5,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{altitude:0,temperature:-.5,humidity:0,weirdness:0,offset:.175}}]},nn={type:"minecraft:multi_noise",biomes:[{biome:"minecraft:nether_wastes",parameters:{temperature:0,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{temperature:0,humidity:-.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{temperature:.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{temperature:0,humidity:.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{temperature:-.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.175}}]};const on=[50,50,51,51,52,52,53,54,56,57,57,58,58,59,60,60,60,59,59,59,60,61,61,62,63,63,64,64,64,65,65,66,66,65,65,66,66,67,67,67,68,69,71,73,74,76,79,80,81,81,82,83,83,82,82,81,81,80,80,80,81,81,82,82],rn=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function an(e,t,n){const o=new D(n.seed),r={placements:[],features:[],random:o,biomeInfoNoise:new B(o.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>o.nextFloat(),nextInt:e=>o.nextInt(e),nextGaussian:()=>Math.sqrt(-2*Math.log(1-o.nextFloat()))*Math.cos(2*Math.PI*o.nextFloat()),sampleInt(e){return function(e,t){var n,o;if("number"==typeof e)return e;if(e.base)return null!=(o=e.base)?o:1+t.nextInt(1+(null!=(n=e.spread)?n:0));switch(sn(e.type)){case"constant":return e.value;case"uniform":return e.value.min_inclusive+t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1);case"biased_to_bottom":return e.value.min_inclusive+t.nextInt(t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1)+1);case"clamped":return je(t.sampleInt(e.value.source),e.value.min_inclusive,e.value.max_inclusive);case"clamped_normal":const n=e.value.mean+t.nextGaussian()*e.value.deviation;return Math.floor(je(e.value.min_inclusive,e.value.max_inclusive,n));case"weighted_list":const o=e.distribution.reduce(((e,t)=>e+t.weight),0);let r=t.nextInt(o);for(const a of e.distribution)if(r-=a.weight,r<0)return t.sampleInt(a.data);return 0}return 1}(e,this)}};for(let s=0;s<n.size[0]/16;s+=1)for(let t=0;t<n.size[2]/16;t+=1)gt(n.version,void 0,"1.17")?un([16*s,0,16*t],h.DataModel.unwrapLists(e),r):fn([16*s,0,16*t],h.DataModel.unwrapLists(e.placement),r);const a=t.data;t.data.fill(255);for(const[s,i]of r.placements){if(s[0]<0||s[1]<0||s[2]<0||s[0]>=n.size[0]||s[1]>=n.size[1]||s[2]>=n.size[2])continue;const e=s[2]*(4*t.width)+4*s[0],o=i<rn.length?rn[i]:ze(r.features[i]);a[e]=je(50,205,o[0]),a[e+1]=je(50,205,o[1]),a[e+2]=je(50,205,o[2]),a[e+3]=255}for(let s=0;s<n.size[0];s+=1)for(let e=0;e<n.size[2];e+=1){if((Math.floor(s/16)+Math.floor(e/16))%2==0)continue;const n=e*(4*t.width)+4*s;for(let e=0;e<3;e+=1)a[n+e]=.85*a[n+e]}}function sn(e){return e.startsWith("minecraft:")?e.slice(10):e}function ln(e,t){return[[e[0],t,e[2]]]}function cn(e,t){if(!ge(e))throw new Error("Invalid vertical anchor");if(e.absolute)return e.absolute;if(e.above_bottom)return e.above_bottom;if(e.below_top)return 256-e.below_top;throw new Error("Invalid vertical anchor")}function dn(e,t){const n=t.features.indexOf(e);return-1!=n?n:(t.features.push(e),t.features.length-1)}function un(e,t,n){var o;if("string"==typeof t)return void n.placements.push([e,dn(t,n)]);const r=sn(null!=(o=null==t?void 0:t.type)?o:"no_op"),a=pn[r];a?a(t.config,e,n):n.placements.push([e,dn(JSON.stringify(t),n)])}function hn(e,t,n){var o;const r=sn(null!=(o=null==t?void 0:t.type)?o:"nope"),a=mn[r];return a?a(null==t?void 0:t.config,e,n):[e]}const pn={decorated:(e,t,n)=>{hn(t,null==e?void 0:e.decorator,n).forEach((t=>un(t,null==e?void 0:e.feature,n)))},random_boolean_selector:(e,t,n)=>{un(t,n.nextFloat()<.5?null==e?void 0:e.feature_true:null==e?void 0:e.feature_false,n)},random_selector:(e,t,n)=>{var o,r;for(const a of null!=(o=null==e?void 0:e.features)?o:[])if(n.nextFloat()<(null!=(r=null==a?void 0:a.chance)?r:0))return void un(t,a.feature,n);un(t,null==e?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var o,r,a;un(t,null==(a=null==e?void 0:e.features)?void 0:a[n.nextInt(null!=(r=null==(o=null==e?void 0:e.features)?void 0:o.length)?r:0)],n)}},mn={chance:(e,t,n)=>{var o;return n.nextFloat()<1/(null!=(o=null==e?void 0:e.chance)?o:1)?[t]:[]},count:(e,t,n)=>{var o;return new Array(n.sampleInt(null!=(o=null==e?void 0:e.count)?o:1)).fill(t)},count_extra:(e,t,n)=>{var o,r;let a=null!=(o=null==e?void 0:e.count)?o:1;return n.nextFloat()<e.extra_chance&&(a+=null!=(r=e.extra_count)?r:0),new Array(a).fill(t)},count_multilayer:(e,t,n)=>{var o;return new Array(n.sampleInt(null!=(o=null==e?void 0:e.count)?o:1)).fill(t).map((e=>[e[0]+n.nextInt(16),e[1],e[2]+n.nextInt(16)]))},count_noise:(e,t,n)=>{const o=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(o).fill(t)},count_noise_biased:(e,t,n)=>{var o;const r=Math.max(1,e.noise_factor),a=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),s=Math.max(0,Math.ceil((a+(null!=(o=e.noise_offset)?o:0))*e.noise_to_count_ratio));return new Array(s).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map(((e,o)=>{const r=4*Math.floor(o/4)+1+n.nextInt(3)+t[0];return[r,Math.max(n.seaLevel,on[je(0,63,r)]),4*Math.floor(o%4)+1+n.nextInt(3)+t[2]]})),decorated:(e,t,n)=>hn(t,null==e?void 0:e.outer,n).flatMap((t=>hn(t,null==e?void 0:e.inner,n))),depth_average:(e,t,n)=>{var o,r,a,s;return ln(t,n.nextInt(null!=(o=null==e?void 0:e.spread)?o:0)+n.nextInt(null!=(r=null==e?void 0:e.spread)?r:0)-(null!=(a=e.spread)?a:0)+(null!=(s=null==e?void 0:e.baseline)?s:0))},emerald_ore:(e,t,n)=>{const o=3+n.nextInt(6);return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)]))},fire:(e,t,n)=>{const o=1+n.nextInt(n.nextInt(n.sampleInt(null==e?void 0:e.count)));return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)]))},glowstone:(e,t,n)=>{const o=n.nextInt(1+n.nextInt(n.sampleInt(null==e?void 0:e.count)));return[...new Array(o)].map((()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)]))},heightmap:(e,t,n)=>ln(t,Math.max(n.seaLevel,on[je(0,63,t[0])])),heightmap_spread_double:(e,t,n)=>{const o=Math.max(n.seaLevel,on[je(0,63,t[0])]);return ln(t,n.nextInt(2*o))},heightmap_world_surface:(e,t,n)=>ln(t,Math.max(n.seaLevel,on[je(0,63,t[0])])),iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var o,r;if(0===n.nextInt((null!=(o=e.chance)?o:1)/10)){const o=n.nextInt(n.nextInt(248)+8);if(o<n.seaLevel||0==n.nextInt((null!=(r=null==e?void 0:e.chance)?r:1)/8)){return[[n.nextInt(16)+t[0],o,n.nextInt(16)+t[2]]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var o,r,a;return ln(t,n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0))},range_biased:(e,t,n)=>{var o,r,a;return ln(t,n.nextInt(n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0)))},range_very_biased:(e,t,n)=>{var o,r,a,s;return ln(t,n.nextInt(n.nextInt(n.nextInt((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0))+(null!=(a=null==e?void 0:e.bottom_offset)?a:0))+(null!=(s=null==e?void 0:e.bottom_offset)?s:0)))},spread_32_above:(e,t,n)=>ln(t,n.nextInt(t[1]+32)),top_solid_heightmap:(e,t)=>ln(t,on[je(0,63,t[0])]),magma:(e,t,n)=>ln(t,n.nextInt(t[1]+32)),square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var n,o;const r=on[je(0,63,t[0])],a=r+(null!=(n=null==e?void 0:e.min_inclusive)?n:-1/0),s=r+(null!=(o=null==e?void 0:e.max_inclusive)?o:1/0);return t[1]<a||t[1]>s?[t]:[]},water_lake:(e,t,n)=>{var o;return 0===n.nextInt(null!=(o=e.chance)?o:1)?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function fn(e,t,n){var o;let r=[e];for(const a of t){vn[sn(null!=(o=null==a?void 0:a.type)?o:"nope")]&&(r=r.flatMap((e=>vn[sn(a.type)](a,e,n))))}for(const a of r)n.placements.push([a,0])}const vn={count:({count:e},t,n)=>new Array(n.sampleInt(null!=e?e:1)).fill(t),count_on_every_layer:({count:e},t,n)=>new Array(n.sampleInt(null!=e?e:1)).fill(t).map((e=>[e[0]+n.nextInt(16),e[1],e[2]+n.nextInt(16)])),environment_scan:({},e)=>[e],height_range:({height:e},t,n)=>ln(t,function(e,t){var n,o,r,a;if(!ge(e))throw new Error("Invalid height provider");if("string"!=typeof e.type)return cn(e);switch(sn(e.type)){case"constant":return cn(e.value);case"uniform":{const n=cn(e.min_inclusive),o=cn(e.max_inclusive);return n+t.nextInt(o-n+1)}case"biased_to_bottom":{const r=cn(e.min_inclusive),a=cn(e.max_inclusive),s=t.nextInt(a-r-(null!=(n=e.inner)?n:1)+1);return r+t.nextInt(s+(null!=(o=e.inner)?o:1))}case"very_biased_to_bottom":{const n=cn(e.min_inclusive),o=cn(e.max_inclusive),a=null!=(r=e.inner)?r:1,s=n+a+t.nextInt(o-n-a+1),i=n+t.nextInt(s-n);return n+t.nextInt(i-n+a)}case"trapezoid":{const n=cn(e.min_inclusive),o=cn(e.max_inclusive),r=null!=(a=e.plateau)?a:0;if(r>=o-n)return n+t.nextInt(o-n+1);const s=(o-n-r)/2,i=o-n-s;return n+t.nextInt(i+1)+t.nextInt(s+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}(e,n)),heightmap:({},e,t)=>ln(e,Math.max(t.seaLevel,on[je(0,63,e[0])])),in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},o,r)=>{const a=Math.max(1,t),s=r.biomeInfoNoise.sample(o[0]/a,0,o[2]/a),i=Math.max(0,Math.ceil((s+(null!=n?n:0))*e));return new Array(i).fill(o)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},o,r)=>{const a=r.biomeInfoNoise.sample(o[0]/200,0,o[2]/200);return new Array(a<e?t:n).fill(o)},random_offset:({xz_spread:e,y_spread:t},n,o)=>[[n[0]+o.sampleInt(e),n[1]+o.sampleInt(t),n[2]+o.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(null!=e?e:1)?[t]:[]};class gn{constructor(e){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0;const t=new D(e);this.minLimitPerlinNoise=new B(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new B(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new B(t,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new B(t,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(e,t,n,o,r){this.settings=e,this.chunkWidth=4*e.size_horizontal,this.chunkHeight=4*e.size_vertical,this.chunkCountY=Math.floor(e.height/this.chunkHeight),e.amplified&&t>0&&(t=1+2*t,n=1+4*n),this.biomeDepth=.265625*(.5*t-.125),this.biomeScale=96/(.9*n+.1),this.noiseColumnCache=Array(r).fill(null),this.xOffset=o}iterateNoiseColumn(e){const t=Array(this.chunkCountY*this.chunkHeight),n=Math.floor(e/this.chunkWidth),o=Math.floor(e%this.chunkWidth)/this.chunkWidth,r=this.fillNoiseColumn(n),a=this.fillNoiseColumn(n+1);for(let h=this.chunkCountY-1;h>=0;h-=1)for(let e=this.chunkHeight;e>=0;e-=1){const n=e/this.chunkHeight;t[h*this.chunkHeight+e]=(s=n,i=o,l=r[h],c=r[h+1],d=a[h],u=a[h+1],Se(i,Se(s,l,c),Se(s,d,u)))}var s,i,l,c,d,u;return t}fillNoiseColumn(e){const t=this.noiseColumnCache[e-this.xOffset];if(t)return t;const n=Array(this.chunkCountY+1),o=684.412*this.settings.sampling.xz_scale,r=684.412*this.settings.sampling.y_scale,a=o/this.settings.sampling.xz_factor,s=r/this.settings.sampling.y_factor,i=this.settings.random_density_offset?this.getRandomDensity(e):0;for(let l=0;l<=this.chunkCountY;l+=1){let t=this.sampleAndClampNoise(e,l,this.mainPerlinNoise.getOctaveNoise(0).zo,o,r,a,s);const c=((1-2*l/this.chunkCountY+i)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;t+=c*(c>0?4:1),this.settings.top_slide.size>0&&(t=Ee(this.settings.top_slide.target,t,(this.chunkCountY-l-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(t=Ee(this.settings.bottom_slide.target,t,(l-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),n[l]=t}return this.noiseColumnCache[e-this.xOffset]=n,n}getRandomDensity(e){const t=this.depthNoise.sample(200*e,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),n=24.575625*(t<0?.3*-t:t)-2;return n<0?.009486607142857142*n:.006640625*Math.min(n,1)}sampleAndClampNoise(e,t,n,o,r,a,s){let i=0,l=0,c=0,d=1;for(let u=0;u<16;u+=1){const h=B.wrap(e*o*d),p=B.wrap(t*r*d),m=B.wrap(n*o*d),f=r*d,v=this.minLimitPerlinNoise.getOctaveNoise(u);v&&(i+=v.sample(h,p,m,f,t*f)/d);const g=this.maxLimitPerlinNoise.getOctaveNoise(u);if(g&&(l+=g.sample(h,p,m,f,t*f)/d),u<8){const o=this.mainPerlinNoise.getOctaveNoise(u);o&&(c+=o.sample(B.wrap(e*a*d),B.wrap(t*s*d),B.wrap(n*a*d),s*d,t*s*d)/d)}d/=2}return Ee(i/512,l/512,(c/10+1)/2)}}const wn={"minecraft:air":[150,160,170],"minecraft:water":[20,80,170],"minecraft:lava":[200,100,0],"minecraft:stone":[55,55,55],"minecraft:deepslate":[34,34,36],"minecraft:bedrock":[10,10,10],"minecraft:grass_block":[47,120,23],"minecraft:dirt":[64,40,8],"minecraft:gravel":[70,70,70],"minecraft:sand":[196,180,77],"minecraft:sandstone":[148,135,52],"minecraft:netherrack":[100,40,40],"minecraft:crimson_nylium":[144,22,22],"minecraft:warped_nylium":[28,115,113],"minecraft:basalt":[73,74,85],"minecraft:end_stone":[200,200,140]};let _n,yn,bn=[];const kn=new Map;async function xn(e,t,n){var o,r,a;if(gt(n.version,"1.18")){gt(n.version,"1.18.2")&&await An(n.version);const{settings:r,generator:a}=function(e,t){const n=K.fromJson(h.DataModel.unwrapLists(e)),o=[e,`${t.seed}`,t.biome];if(!Pe(o,_n))if(_n=Le(o),bn=[],gt(t.version,"1.18.2")){const e=new V(O.create("unknown"));yn=new Z(t.seed,e,n)}else{const e=new te("unknown");yn=new X(t.seed,e,n)}return{settings:n,generator:yn}}(e,n),s=new zn(-n.offset,n.width,r.noise.minY,r.noise.height);s.generate(a,n.biome);const i=t.data;for(let e=0;e<n.width;e+=1)for(let a=0;a<r.noise.height;a+=1){const l=4*e+4*(r.noise.height-a-1)*t.width,c=s.getBlockState([e-n.offset,a+r.noise.minY,0]),d=null!=(o=wn[c.getName().toString()])?o:[0,0,0];i[l]=d[0],i[l+1]=d[1],i[l+2]=d[2],i[l+3]=255}return}const s=new gn(n.seed);s.reset(e.noise,null!=(r=n.biomeDepth)?r:0,null!=(a=n.biomeScale)?a:0,n.offset,n.width);const i=t.data,l=4*t.width;for(let c=0;c<n.width;c+=1){const t=s.iterateNoiseColumn(c-n.offset).reverse();for(let n=0;n<e.noise.height;n+=1){const e=n*l+4*c,o=In(t,n);i[e]=o,i[e+1]=o,i[e+2]=o,i[e+3]=255}}}async function Cn(e,t,n){const{fn:o,settings:r}=await async function(e,t){await An(t.version);const n=W.create(t.seed).forkPositional(),o=U.fromJson({min_y:-64,height:384,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},bottom_slide:{target:.1171875,size:3,offset:0},top_slide:{target:-.078125,size:2,offset:8},terrain_shaper:{offset:.044,factor:4,jaggedness:0}}),r=R.fromJson(e);return{fn:r.mapAll(new G.Visitor(n,o)),settings:o}}(e,n),a=Array(n.width*r.height);let s=1/0,i=-1/0;for(let c=0;c<n.width;c+=1)for(let e=0;e<r.height;e+=1){const t=c+(r.height-e-1)*n.width,l=o.compute(R.context(c-n.offset,e,0));s=Math.min(s,l),i=Math.max(i,l),a[t]=l}const l=t.data;for(let c=0;c<n.width*r.height;c+=1){const e=Math.floor(J(a[c],s,i,0,256));l[4*c]=e,l[4*c+1]=e,l[4*c+2]=e,l[4*c+3]=255}}const Mn=[["worldgen/noise",ee],["worldgen/density_function",R]];async function An(e){var t;const n=null!=(t=kn.get(e))?t:new Y(new O("misode","temp"));kn.has(e)||(await Promise.all(Mn.map((([t,o])=>async function(e,t,n,o){const r=await async function(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=ve.versions.find((t=>t.id===e));await rt(n);try{const e=await lt(`${ot(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(e.map((async e=>[e,await lt(`${ot(n,"data")}/data/minecraft/${t}/${e}.json`)]))))}catch(o){throw new Error(`Error occurred while fetching all ${t} presets: ${Oe(o)}`)}}(e,n),a=new Y(O.create(n));for(const[s,i]of r.entries())a.register(O.parse(s),o.fromJson(i));t.register(a.key,a)}(e,n,t,o)))),kn.set(e,n)),q.DENSITY_FUNCTION.clear().assign(n.getOrThrow(O.create("worldgen/density_function"))),q.NOISE.clear().assign(n.getOrThrow(O.create("worldgen/noise")))}function In(e,t){return e[t]>0?0:e[t+1]>0?150:255}class zn{constructor(e,t,n,o){this.minX=e,this.done=[],this.chunks=[...Array(Math.ceil(t/16)+1)].map(((t,r)=>{const a=(e>>4)+r,s=bn.find((e=>e.pos[0]===a));return s?(this.done[r]=!0,s):new Q(n,o,H.create(a,0))}))}generate(e,t){this.chunks.forEach(((n,o)=>{this.done[o]||(e.fill(n,!0),e.buildSurface(n,t),this.done[o]=!0,bn.push(n))}))}getBlockState(e){const t=(e[0]>>4)-(this.minX>>4);return this.chunks[t].getBlockState(e)}}const $n=["biomes","temperature","humidity","continentalness","erosion","weirdness"],jn=({model:e,data:t,shown:n,version:o})=>{var r,a;const{locale:s}=St(),[l]=v(ye()),[u,p]=v(2),[m,g]=v(void 0),[y,b]=v(new Set(["biomes"])),k=f([0,0]),x=f(1),C=f(void 0),M=BigInt(null!=(r=e.get(new h.Path(["generator","seed"])))?r:l),A=w((()=>{if(n)return function(e){if("string"!=typeof e){e=K.fromJson(h.DataModel.unwrapLists(e)).legacyRandomSource?"minecraft:nether":"minecraft:overworld"}switch(e.replace(/^minecraft:/,"")){case"overworld":case"amplified":return{temperature:{firstOctave:-9,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-7,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-9,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-9,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};case"end":case"floating_islands":return{temperature:{firstOctave:0,amplitudes:[0]},humidity:{firstOctave:0,amplitudes:[0]},continentalness:{firstOctave:0,amplitudes:[0]},erosion:{firstOctave:0,amplitudes:[0]},weirdness:{firstOctave:0,amplitudes:[0]},shift:{firstOctave:0,amplitudes:[0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}}(e.get(new h.Path(["generator","settings"])))}),[n]),I=n?function(e,t){return JSON.stringify([e,t])}(t,A):"",z=null==(a=t.type)?void 0:a.replace(/^minecraft:/,""),{canvas:$,redraw:j}=Te({size:()=>[200/x.current,200/x.current],async draw(e){const n={octaves:A,biomeColors:{},layers:y,offset:k.current,scale:u,seed:M,res:x.current,version:o};await async function(e,t,n){var o,r,a;const{biomeSource:s}=await Xt(e,n),i=t.data,l=-Math.round(n.offset[0])-100+n.res/2,c=-Math.round(n.offset[1])-100+n.res/2,d=4*t.width/n.res,u=4/n.res,h=[l*n.scale,(200+l)*n.scale,n.res*n.scale],p=[c*n.scale,(200+c)*n.scale,n.res*n.scale],m=n.layers.has("biomes")?null==(o=s.getBiomes)?void 0:o.call(s,...h,64,65,1,...p):void 0,f=[...n.layers].filter((e=>"biomes"!==e)),v=0===f.length||null==(r=s.getClimates)?void 0:r.call(s,...h,64,65,1,...p);for(let g=0;g<200;g+=n.res)for(let e=0;e<200;e+=n.res){const t=e*d+g*u,o=g/n.res*200/n.res+e/n.res,r=(g+l)*n.scale,h=(e+c)*n.scale;let p=[50,50,50];if(n.layers.has("biomes"))p=Qt((null!=(a=null==m?void 0:m[o])?a:s.getBiome(r,64,h)).toString(),n.biomeColors);else if(v&&f[0]){const e=v[o][f[0]],[t,n]=qt[f[0]],r=(e-t)/(n-t)*256;p=[r,r,r]}i[t]=p[0],i[t+1]=p[1],i[t+2]=p[2],i[t+3]=255}}(t,e,n),4===x.current&&(clearTimeout(C.current),C.current=setTimeout((()=>{x.current=1,j()}),150))},async onDrag(e,t){k.current[0]=k.current[0]+200*e,k.current[1]=k.current[1]+200*t,clearTimeout(C.current),x.current="multi_noise"===z?4:1,j()},async onHover(e,n){const r={octaves:A,biomeColors:{},layers:y,offset:k.current,scale:u,seed:l,res:1,version:o},a=await async function(e,t,n,o){var r;const{biomeSource:a}=await Xt(e,o),[s,l]=function([e,t],n){return[(e-n.offset[0]-100+n.res/2)*n.scale,(t-n.offset[1]-100+n.res/2)*n.scale]}([t,n],o);return i({biome:a.getBiome(s,64,l).toString()},null==(r=a.getClimate)?void 0:r.call(a,s,64,l))}(t,Math.floor(200*e),Math.floor(200*n),r);g(a)},onLeave(){g(void 0)}},[I,u,l,y]);c((()=>{n&&(x.current="multi_noise"===z?4:1,j())}),[I,u,l,y,n]);const E=e=>{k.current[0]=k.current[0]*u/e,k.current[1]=k.current[1]*u/e,p(e)};return d(_,null,d("div",{class:"controls preview-controls"},m&&d(fe,{label:m.biome,class:"no-pointer"}),"multi_noise"===z&&d(Re,{icon:"stack",tooltip:s("configure_layers")},$n.map((e=>{const t=y.has(e);return d(fe,{label:s(`layer.${e}`),active:t,tooltip:s(t?"enabled":"disabled"),onClick:t=>{b(new Set([e])),t.stopPropagation()}})}))),("multi_noise"===z||"checkerboard"===z)&&d(_,null,d(fe,{icon:"dash",tooltip:s("zoom_out"),onClick:()=>E(1.5*u)}),d(fe,{icon:"plus",tooltip:s("zoom_in"),onClick:()=>E(u/1.5)})),"multi_noise"===z&&d(fe,{icon:"sync",tooltip:s("generate_new_seed"),onClick:()=>be(e)})),void 0!==(null==m?void 0:m.temperature)&&d("div",{class:"controls secondary-controls"},d(fe,{class:"no-pointer",label:Object.entries(m).filter((([e])=>"biome"!==e)).map((([e,t])=>`${e[0].toUpperCase()}: ${t.toFixed(2)}`)).join(" ")})),d("canvas",{ref:$,width:"200",height:"200"}))};const En=({data:e,version:t,shown:n})=>{const{locale:o}=St(),[r,a]=v(4),[s,i]=v(ye()),{canvas:l,redraw:u}=Te({size:()=>[16*r,16*r],async draw(n){an(e,n,{seed:s,version:t,size:[16*r,128,16*r]})}}),h=JSON.stringify(e);return c((()=>{n&&u()}),[h,r,s,n]),d(_,null,d("div",{class:"controls preview-controls"},d(fe,{icon:"dash",tooltip:o("zoom_out"),onClick:()=>a(Math.min(16,r+1))}),d(fe,{icon:"plus",tooltip:o("zoom_in"),onClick:()=>a(Math.max(1,r-1))}),d(fe,{icon:"sync",tooltip:o("generate_new_seed"),onClick:()=>i(ye())})),d("canvas",{ref:l,width:"64",height:"64"}))},Sn=({data:e,shown:t,version:n})=>{var o,r;const{locale:a}=St(),[s,i]=v(ye()),[l,u]=v(!1),[h,p]=v(void 0),m=f(0),g=f(void 0),w=JSON.stringify([e]),y=null!=(r=null==(o=null==e?void 0:e.noise)?void 0:o.height)?r:256,{canvas:b,redraw:k}=Te({size:()=>[y,y],async draw(t){const o={offset:m.current,width:t.width,seed:s,version:n};await Cn(e,t,o)},async onDrag(e){m.current+=e*y,k()},async onHover(t,n){var o,r;const a=Math.floor(t*y-m.current),s=y-Math.max(1,Math.ceil(n*y))+(null!=(r=null==(o=null==e?void 0:e.noise)?void 0:o.min_y)?r:0);p(`X=${a} Y=${s}`)},onLeave(){p(void 0)}},[w,s]);return c((()=>{g.current&&clearInterval(g.current),t&&(k(),l&&(g.current=setInterval((()=>{m.current-=8,k()}),100)))}),[w,s,t,l]),d(_,null,d("div",{class:"controls preview-controls"},h&&d(fe,{label:h,class:"no-pointer"}),d(Re,{icon:"gear",tooltip:a("terrain_settings")},d(fe,{icon:l?"square_fill":"square",label:a("preview.auto_scroll"),onClick:()=>u(!l)})),d(fe,{icon:"sync",tooltip:a("generate_new_seed"),onClick:()=>i(ye())})),d("canvas",{ref:b,width:y,height:y}))},On=({data:e,shown:t,version:n})=>{const{locale:o}=St(),[r,a]=v(ye()),[s,i]=v(2),l=f([0,0]),u=JSON.stringify([e]),{canvas:p,redraw:m}=Te({size:()=>[256,256],async draw(t){const o={offset:l.current,scale:s,seed:r,version:n};!function(e,t,n){const o=new D(n.seed),r=ee.fromJson(h.DataModel.unwrapLists(e)),a=new P(o,r),s=-n.offset[0]-100,i=-n.offset[1]-100,l=t.data;for(let c=0;c<256;c+=1)for(let e=0;e<256;e+=1){const t=4*c+4*e*256,o=(c+s)*n.scale,r=(e+i)*n.scale,d=128*(a.sample(o,r,0)+1);l[t]=d,l[t+1]=d,l[t+2]=d,l[t+3]=255}}(e,t,o)},async onDrag(e,t){l.current[0]=l.current[0]+256*e,l.current[1]=l.current[1]+256*t,m()}},[u,s,r]);c((()=>{t&&m()}),[u,s,r,t]);const g=e=>{l.current[0]=l.current[0]*s/e,l.current[1]=l.current[1]*s/e,i(e)};return d(_,null,d("div",{class:"controls preview-controls"},d(fe,{icon:"dash",tooltip:o("zoom_out"),onClick:()=>g(1.5*s)}),d(fe,{icon:"plus",tooltip:o("zoom_in"),onClick:()=>g(s/1.5)}),d(fe,{icon:"sync",tooltip:o("generate_new_seed"),onClick:()=>a(ye())})),d("canvas",{ref:p,width:"256",height:"256"}))},Ln=({data:e,shown:t,version:n})=>{var o,r;const{locale:a}=St(),[s,i]=v(ye()),[l,u]=v("minecraft:plains"),[h,p]=v(.2),[m,g]=v(.1),[y,b]=v(!1),[k,x]=v(void 0),C=f(0),M=f(void 0),A=JSON.stringify([e,h,m]),I=null!=(r=null==(o=null==e?void 0:e.noise)?void 0:o.height)?r:256,{canvas:z,redraw:$}=Te({size:()=>[I,I],async draw(t){const o={biome:l,biomeDepth:m,biomeScale:h,offset:C.current,width:t.width,seed:s,version:n};await xn(e,t,o)},async onDrag(e){C.current+=e*I,$()},async onHover(t,n){var o,r;const a=Math.floor(t*I-C.current),s=I-Math.max(1,Math.ceil(n*I))+(null!=(r=null==(o=null==e?void 0:e.noise)?void 0:o.min_y)?r:0),i=function(e,t){const n=bn.find((t=>H.minBlockX(t.pos)<=e&&H.maxBlockX(t.pos)>=e));if(n)return n.getBlockState(F.create(e,t,0))}(a,s);x(i?`Y=${s} (${i.getName().path})`:`Y=${s}`)},onLeave(){x(void 0)}},[A,s]);c((()=>{M.current&&clearInterval(M.current),t&&(async()=>{try{await $(),y&&(M.current=setInterval((()=>{C.current-=8,$()}),100))}catch(e){throw e}})()}),[A,s,t,l,h,m,y]);const j=w((()=>{var e;return null!=(e=null==ft?void 0:ft.get("worldgen/biome"))?e:[]}),[n]);return d(_,null,d("div",{class:"controls preview-controls"},k&&d(fe,{label:k,class:"no-pointer"}),d(Re,{icon:"gear",tooltip:a("terrain_settings")},gt(n,void 0,"1.17")?d(_,null,d(Ve,{label:a("preview.scale"),value:`${h}`,onChange:e=>p(Number(e))}),d(Ve,{label:a("preview.depth"),value:`${m}`,onChange:e=>g(Number(e))})):d(Ve,{label:a("preview.biome"),value:l,onChange:u,dataList:j,larger:!0}),d(fe,{icon:y?"square_fill":"square",label:a("preview.auto_scroll"),onClick:()=>b(!y)})),d(fe,{icon:"sync",tooltip:a("generate_new_seed"),onClick:()=>i(ye())})),d("canvas",{ref:z,width:I,height:I}))},Pn=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function Dn({model:e,version:t,id:n,shown:o}){var r;const[,a]=v(0);if(Fe(e,(()=>{a((e=>e+1))})),!e)return d(_,null);if("dimension"===n&&(null==(r=e.get(new h.Path(["generator","type"])))?void 0:r.endsWith("noise"))){const n=e.get(new h.Path(["generator","biome_source"]));if(n)return d(jn,i({},{model:e,version:t,shown:o,data:n}))}if("worldgen/density_function"===n){const n=e.get(new h.Path([]));if(n)return d(Sn,i({},{model:e,version:t,shown:o,data:n}))}if("worldgen/noise"===n){const n=e.get(new h.Path([]));if(n)return d(On,i({},{model:e,version:t,shown:o,data:n}))}if("worldgen/noise_settings"===n){const n=e.get(new h.Path([]));if(n)return d(Ln,i({},{model:e,version:t,shown:o,data:n}))}if("worldgen/placed_feature"===n||"worldgen/configured_feature"===n&>(t,"1.16","1.17")){const n=e.get(new h.Path([]));if(n)return d(En,i({},{model:e,version:t,shown:o,data:n}))}return d(_,null)}function Vn(e,t){return e.schema.hook(Nn,new h.ModelPath(e),e.data,{blockStates:t})}const Nn={base:({},e,t)=>t,choice({switchNode:e},t,n,o){return e.hook(this,t,n,o)},list({children:e},t,n,o){if(!Array.isArray(n))return n;const r=n.map(((n,r)=>e.hook(this,t.push(r),n.node,o)));for(const a of Object.getOwnPropertySymbols(n))r[a]=n[a];return r},map({children:e,config:t},n,o,r){var a,s;if(void 0===o)return;const i="block_state_map"===(null==(a=t.validation)?void 0:a.validator)?null==(s=r.blockStates)?void 0:s[h.relativePath(n,t.validation.params.id).get()]:null,l={};Object.keys(o).forEach((t=>{var a;i&&!Object.keys(null!=(a=i.properties)?a:{}).includes(t)||(l[t]=e.hook(this,n.push(t),o[t],r))}));for(const c of Object.getOwnPropertySymbols(o))l[c]=o[c];return l},object({getActiveFields:e},t,n,o){if(null==n||"object"!=typeof n)return n;const r={},a=e(t);Object.keys(a).filter((e=>a[e].enabled(t))).forEach((e=>{const s=a[e].hook(this,t.push(e),n[e],o);null!=s&&(r[e]=s)}));for(const s of Object.getOwnPropertySymbols(n))r[s]=n[s];return r}},Tn={"2_spaces":2,"4_spaces":4,tabs:"\t",minified:void 0},Bn={json:{parse:oe.parse,stringify:(e,t)=>oe.stringify(e,null,t)+"\n"},yaml:{parse:re.load,stringify:(e,t)=>re.dump(e,{flowLevel:void 0===t?0:-1,indent:"string"==typeof t?4:t})}};function Hn({name:e,model:t,blockStates:n,doCopy:o,doDownload:r,doImport:a,copySuccess:s,onError:i}){const{locale:l}=St(),[u,p]=v(Ct.getIndent()),[m,g]=v(Ct.getFormat()),[w,y]=v(Ct.getHighlighting()),b=f(null),k=f(),x=f(),C=f(),M=f(),A=z(((e,t)=>{const n=Vn(e,t);return Bn[m].stringify(n,Tn[u])}),[u,m]);c((()=>{k.current=()=>{if(t&&n)try{const e=A(t,n);M.current.setValue(e)}catch(e){e instanceof Error?(e.message=`Error getting JSON output: ${e.message}`,i(e)):i(`Error getting JSON output: ${Oe(e)}`),console.error(e),M.current.setValue("")}},x.current=()=>{const e=M.current.getValue();if(0!==e.length)try{const n=Bn[m].parse(e);null==t||t.reset(h.DataModel.wrapLists(n),!1)}catch(n){n instanceof Error?(n.message=`Error importing: ${n.message}`,i(n)):i(`Error importing: ${Oe(n)}`),console.error(n)}}}),[t,n,u,m,w]),c((()=>{if(w){const e=ne.edit("editor");e.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),e.$blockScrolling=1/0,e.on("blur",(e=>x.current(e))),e.getSession().setMode("ace/mode/json"),M.current={getValue:()=>e.getSession().getValue(),setValue(t){e.getSession().setValue(t)},configure(t,n){e.setOption("useSoftTabs","tabs"!==t),e.setOption("tabSize","tabs"===t?4:Tn[t]),e.getSession().setMode(`ace/mode/${n}`)},select(){e.selectAll()}}}else M.current={getValue:()=>C.current.value,setValue(e){C.current.value=e},configure(){},select(){}}}),[w]),Fe(t,(()=>{k.current()})),c((()=>{t&&k.current()}),[t]),c((()=>{M.current.configure(u,m),k.current()}),[u,m,w]),c((()=>{o&&t&&n&&navigator.clipboard.writeText(A(t,n)).then((()=>{s()}))}),[o]),c((()=>{if(r&&t&&n&&b.current){const o=encodeURIComponent(A(t,n));b.current.setAttribute("href",`data:text/json;charset=utf-8,${o}`),b.current.setAttribute("download",`${e}.${m}`),b.current.click()}}),[r]),c((()=>{a&&M.current&&(M.current.setValue(""),M.current.select())}),[a]);return d(_,null,d("div",{class:"controls source-controls"},d(Re,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(Tn).map((([e])=>d(fe,{label:l(`indentation.${e}`),active:u===e,onClick:()=>{return t=e,Ct.setIndent(t),void p(t);var t}}))),d("hr",null),Object.keys(Bn).map((e=>d(fe,{label:l(`format.${e}`),active:m===e,onClick:()=>{return t=e,Ct.setFormat(t),void g(t);var t}}))),d("hr",null),d(fe,{icon:w?"square_fill":"square",label:l("highlighting"),onClick:()=>{return e=!w,Ct.setHighlighting(e),void y(e);var e}}))),w?d("pre",{id:"editor",class:"source"}):d("textarea",{ref:C,class:"source",spellcheck:!1,autocorrect:"off",onBlur:x.current}),d("a",{ref:b,style:"display: none;"}))}class Fn extends h.DataModel{constructor(e,t,n,o){super(e),this.mapper=t,this.getter=n,this.setter=o}map(e){return this.mapper(e)}get(e){return this.getter(e)}set(e,t,n){return this.setter(e,t,n)}}const Rn=["loot_table.type","loot_entry.type","function.function","condition.condition","criterion.trigger","recipe.type","dimension.generator.type","dimension.generator.biome_source.type","dimension.generator.biome_source.preset","carver.type","feature.type","decorator.type","feature.tree.minimum_size.type","block_state_provider.type","trunk_placer.type","foliage_placer.type","tree_decorator.type","int_provider.type","float_provider.type","height_provider.type","structure_feature.type","surface_builder.type","processor.processor_type","rule_test.predicate_type","pos_rule_test.predicate_type","template_element.element_type","block_placer.type","block_predicate.type","material_rule.type","material_condition.type","structure_placement.type","density_function.type","root_placer.type","entity.type_specific.cat.variant","entity.type_specific.frog.variant"],Jn=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],Wn=["feature.config","decorator.config","int_provider.value","float_provider.value","block_state_provider.simple_state_provider.state","block_state_provider.rotated_block_provider.state","block_state_provider.weighted_state_provider.entries.entry.data","rule_test.block_state","structure_feature.config","surface_builder.config","template_pool.elements.entry.element","decorator.block_survives_filter.state","material_rule.block.result_state"],Un=["loot_entry.type","function.function","condition.condition","criterion.trigger","dimension.generator.type","dimension.generator.biome_source.type","feature.type","decorator.type","block_state_provider.type","feature.tree.minimum_size.type","trunk_placer.type","foliage_placer.type","tree_decorator.type","block_placer.type","rule_test.predicate_type","processor.processor_type","template_element.element_type","nbt_operation.op","number_provider.value","score_provider.name","score_provider.target","nbt_provider.source","nbt_provider.target","generator_biome.biome","block_predicate.type","material_rule.type","material_condition.type","density_function.type","root_placer.type","entity.type_specific.type"],Gn=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],Yn=["generator_biome.parameters.temperature","generator_biome.parameters.humidity","generator_biome.parameters.continentalness","generator_biome.parameters.erosion","generator_biome.parameters.depth","generator_biome.parameters.weirdness","feature.end_spike.crystal_beam_target","feature.end_gateway.exit","decorator.block_filter.offset","block_predicate.matching_blocks.offset","block_predicate.matching_fluids.offset","model_element.from","model_element.to","model_element.rotation.origin","model_element.faces.uv","item_transform.rotation","item_transform.translation","item_transform.scale","generator_structure.random_spread.locate_offset"],qn=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],Kn=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],Zn=new h.DataModel(h.MapNode(h.StringNode(),h.StringNode()),{historyMax:0});function Xn({model:e,lang:t,version:n,blockStates:o}){var r;const a=new h.ModelPath(e),[s,i,l]=e.schema.hook(Qn,a,Le(e.data),t,n,o,{});return(null==(r=null==i?void 0:i.props)?void 0:r.children.some((e=>e)))?d("div",{class:`node ${e.schema.type(a)}-node`,"data-category":e.schema.category(a)},d("div",{class:"node-header"},s,i),d("div",{class:"node-body"},l)):l}const Qn={base:()=>[null,null,null],boolean:(e,t,n,o,r,a,s)=>[null,d(no,i({},l(i({},e),{path:t,value:n,lang:o,version:r,states:a,ctx:s}))),null],choice({choices:e,config:t,switchNode:n},o,r,a,s,i,l){const c=n.activeCase(o,!0),u=(null==t?void 0:t.context)?new h.ModelPath(o.getModel(),new h.Path(o.getArray(),[t.context])):o,[p,m,f]=c.node.hook(this,u,r,a,s,i,l);if(1===e.length)return[p,m,f];const v=(null==t?void 0:t.choiceContext)?new h.Path([],[t.choiceContext]):(null==t?void 0:t.context)?new h.Path([],[t.context]):o,g=d("select",{value:c.type,onChange:n=>(n=>{var a;const s=null!=(a=e.find((e=>e.type===n)))?a:c,i=s.node.default(),l=s.change?s.change(h.DataModel.unwrapLists(r)):"feature"===t.choiceContext&&"minecraft:decorated"===(null==i?void 0:i.type)?i.config.feature:i;o.model.set(o,h.DataModel.wrapLists(l))})(n.target.value)},e.map((e=>d("option",{value:e.type},lo(a,v.contextPush(e.type))))));return[p,d(_,null,g,m),f]},list({children:e,config:t},n,o,r,a,s,c){const{expand:u,collapse:p,isToggled:m}=to(),[f,g]=v(50),w=n.getContext().join(".");if(Yn.includes(w)){return[d(_,null,[...Array(t.maxLength)].map(((e,t)=>d(co,{lang:r,path:n.modelPush(t)}))),d("div",{class:"fixed-list"})),d(_,null,[...Array(t.maxLength)].map(((t,i)=>{var l;return e.hook(this,n.modelPush(i),null==(l=null==o?void 0:o[i])?void 0:l.node,r,a,s,c)[1]}))),null]}return[null,d("button",{class:"add tooltipped tip-se","aria-label":jt(r,"add_top"),onClick:()=>{Array.isArray(o)||(o=[]);const t=h.DataModel.wrapLists(e.default());n.model.set(n,[{node:t,id:_e()},...o])}},Je.plus_circle),d(_,null,o&&Array.isArray(o)&&o.map((({node:t,id:h},v)=>{if(v===f)return d("div",{class:"node node-header"},d("label",null,jt(r,"entries_hidden",""+(o.length-f))),d("button",{onClick:()=>g(Math.min(f+50,o.length))},jt(r,"entries_hidden.more","50")),d("button",{onClick:()=>g(o.length)},jt(r,"entries_hidden.all")));if(v>f)return null;const w=n.push(v).contextPush("entry"),_="object"===e.type(w),y=m(h);if(_&&(!1===y||void 0===y&&o.length>20))return d("div",{class:"node node-header","data-category":e.category(w)},d(co,{lang:r,path:w,nested:!0}),d("button",{class:"toggle tooltipped tip-se","aria-label":`${jt(r,"expand")}\n${jt(r,"expand_all","Ctrl")}`,onClick:u(h)},Je.chevron_right),d("label",null,lo(r,w,`${v}`)),d(eo,{key:h,path:w,value:t,schema:e}));return d(ao,l(i({key:h,path:w,schema:e,value:t},{lang:r,version:a,states:s,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const e=[...n.get()];e.splice(v,0,{id:_e(),node:Le(t)}),n.model.set(n,e)}}]}),{ctx:l(i({},c),{index:(0===v?1:0)+(v===o.length-1?2:0)})}),_&&d("button",{class:"toggle tooltipped tip-se","aria-label":`${jt(r,"collapse")}\n${jt(r,"collapse_all","Ctrl")}`,onClick:p(h)},Je.chevron_down),d("button",{class:"remove tooltipped tip-se","aria-label":jt(r,"remove"),onClick:()=>w.set(void 0)},Je.trashcan),o.length>1&&d("div",{class:"node-move"},d("button",{class:"move tooltipped tip-se","aria-label":jt(r,"move_up"),onClick:()=>{const e=[...n.get()];[e[v-1],e[v]]=[e[v],e[v-1]],n.model.set(n,e)},disabled:0===v},Je.chevron_up),d("button",{class:"move tooltipped tip-se","aria-label":jt(r,"move_down"),onClick:()=>{const e=[...n.get()];[e[v+1],e[v]]=[e[v],e[v+1]],n.model.set(n,e)},disabled:v===o.length-1},Je.chevron_down)))})),o&&o.length>0&&o.length<=f&&d("div",{class:"node node-header"},d("button",{class:"add tooltipped tip-se","aria-label":jt(r,"add_bottom"),onClick:()=>{Array.isArray(o)||(o=[]);const t=h.DataModel.wrapLists(e.default());n.model.set(n,[...o,{node:t,id:_e()}])}},Je.plus_circle)))]},map({children:e,keys:t,config:n},o,r,a,s,c,u){var p,m,f,v,g;const{expand:w,collapse:y,isToggled:b}=to(),k=new h.ModelPath(Zn,new h.Path([io(o.toString())])),x="block_state_map"===(null==(p=n.validation)?void 0:p.validator)?null==c?void 0:c[h.relativePath(o,n.validation.params.id).get()]:null,C=(null==x?void 0:x.properties)?h.StringNode(null,{enum:Object.keys(null!=(m=x.properties)?m:{})}):t;if(x&&"Properties"===o.last()){"object"!=typeof r&&(r={});const e=Object.entries(null!=(f=x.properties)?f:{}).map((([e,t])=>[e,h.StringNode(null,{enum:t})]));return Object.entries(null!=(v=x.properties)?v:{}).forEach((([e,t])=>{"string"!=typeof r[e]?o.model.errors.add(o.push(e),"error.expected_string"):t.includes(r[e])||o.model.errors.add(o.push(e),"error.invalid_enum_option",r[e])})),h.ObjectNode(Object.fromEntries(e)).hook(this,o,r,a,s,c,u)}return[null,d(_,null,C.hook(this,k,null!=(g=k.get())?g:"",a,s,c,u)[1],d("button",{class:"add tooltipped tip-se","aria-label":jt(a,"add"),onClick:()=>{const t=k.get();o.model.set(o.push(t),h.DataModel.wrapLists(e.default()))}},Je.plus_circle)),d(_,null,"object"==typeof r&&Object.entries(r).map((([t,n])=>{var p,m,f,v;const g=o.modelPush(t),_="object"===e.type(g),k=b(t);if(_&&(!1===k||void 0===k&&r.length>20))return d("div",{class:"node node-header","data-category":e.category(g)},d(co,{lang:a,path:g,nested:!0}),d("button",{class:"toggle tooltipped tip-se","aria-label":`${jt(a,"expand")}\n${jt(a,"expand_all","Ctrl")}`,onClick:w(t)},Je.chevron_right),d("label",null,t),d(eo,{key:t,path:g,value:n,schema:e}));const C=x?h.StringNode(null,{enum:null!=(m=null==(p=x.properties)?void 0:p[t])?m:[]}):e;(null==(f=null==x?void 0:x.properties)?void 0:f[t])&&"string"==typeof n&&!(null==(v=x.properties)?void 0:v[t].includes(n))&&o.model.errors.add(g,"error.invalid_enum_option",n);return d(ao,l(i({key:t,schema:C,path:g,value:n},{lang:a,version:s,states:c,ctx:u}),{label:t}),_&&d("button",{class:"toggle tooltipped tip-se","aria-label":`${jt(a,"collapse")}\n${jt(a,"collapse_all","Ctrl")}`,onClick:y(t)},Je.chevron_down),d("button",{class:"remove tooltipped tip-se","aria-label":jt(a,"remove"),onClick:()=>g.set(void 0)},Je.trashcan))})))]},number:(e,t,n,o,r,a,s)=>[null,d(oo,i({},l(i({},e),{path:t,value:n,lang:o,version:r,states:a,ctx:s}))),null],object({node:e,config:t,getActiveFields:n,getChildModelPath:o},r,a,s,c,u,p){var m;const{expand:f,collapse:v,isToggled:g}=to();if(0==r.getArray().length&&function(e,t){var n;return"feature"===e&&"decorated"===(null==(n=null==t?void 0:t.type)?void 0:n.replace(/^minecraft:/,""))&&ge(null==t?void 0:t.config)}(t.context,a)){const{wrapper:e,fields:t}=function(e,t,n){const o=[],r=po(n,o),a={type:e.type,config:h.ObjectNode({decorators:h.ListNode(pt),feature:mt},{context:"feature.decorated"})},s=h.ObjectNode(a,{context:"feature"}),i=new h.Path(["config","feature"]),l=new h.Path(["config","decorators"]),c=t.getModel(),d=new Fn(s,(e=>{if(e.startsWith(i))return new h.Path([...[...Array(o.length-1)].flatMap((()=>["config","feature"])),...e.modelArr]);if(e.startsWith(l)){if(2===e.modelArr.length)return new h.Path([]);const t=e.modelArr[2];if("number"==typeof t)return new h.Path([...[...Array(t)].flatMap((()=>["config","feature"])),"config","decorator",...e.modelArr.slice(3)])}return e}),(e=>{if(e.equals(l)){const e=[];return po(c.data,e),e}return c.get(d.map(e))}),((e,t,n)=>{if(e.startsWith(i)){const o=[];po(c.data,o);const r=new h.Path([...[...Array(o.length-1)].flatMap((()=>["config","feature"])),...e.modelArr]);return c.set(r,t,n)}if(e.startsWith(l)){const o=e.modelArr[2];if(2===e.modelArr.length){const e=d.get(i);return c.set(new h.Path,mo(e,t),n)}if("number"==typeof o){if(3===e.modelArr.length&&void 0===t){const e=d.get(i),t=[];po(c.data,t),t.splice(o,1);const r=mo(e,t);return c.set(new h.Path,r,n)}{const r=new h.Path([...[...Array(o)].flatMap((()=>["config","feature"])),"config","decorator",...e.modelArr.slice(3)]);return c.set(r,t,n)}}}c.set(e,t,n)}));return d.data={type:c.data.type,config:{decorators:o,feature:r}},d.errors=c.errors,{fields:a,wrapper:d}}(n(r),r,a);a=e.data,n=()=>t,o=(t,n)=>new h.ModelPath(e,new h.Path(t.getArray(),["feature"])).push(n)}let w=null,y=null;if(e.optional())if(void 0===a){const t=()=>r.set(h.DataModel.wrapLists(e.default()));y=d("button",{class:"collapse closed tooltipped tip-se","aria-label":jt(s,"expand"),onClick:t},Je.plus_circle)}else{const e=()=>r.set(void 0);y=d("button",{class:"collapse open tooltipped tip-se","aria-label":jt(s,"remove"),onClick:e},Je.trashcan)}const b=r.getContext().join(".");if(Kn.includes(b)||qn.includes(b)){const e=g(""),t=qn.includes(b)?e:!e;if(w=d(_,null,d("button",{class:"toggle tooltipped tip-se","aria-label":jt(s,t?"collapse":"expand"),onClick:e?v(""):f("")},t?Je.chevron_down:Je.chevron_right)),!t)return[w,y,null]}const k="object"==typeof a&&null!==a&&(null==(m=e.default())?void 0:m.pools)?l(i({},p),{loot:null==a?void 0:a.type}):p,x=d(_,null,"object"==typeof a&&null!==a&&!(e.optional()&&void 0===a)&&Object.entries(n(r)).filter((([e,t])=>t.enabled(r))).map((([e,t])=>{const n=o(r,e),l=n.getContext().join(".");if(Jn.includes(l))return null;const[h,p,m]=t.hook(this,n,a[e],s,c,u,k),f="object"===t.type(n)&&Wn.includes(l),v=Un.includes(l);return f||v?(w=d(_,null,w,d(co,{lang:s,path:n}),d(uo,{lang:s,path:n}),h),y=d(_,null,y,p),f?m:null):d(ao,i({key:e,schema:t,path:n,value:a[e]},{lang:s,version:c,states:u,ctx:k}))})));return[w,y,x]},string:(e,t,n,o,r,a,s)=>[null,d(ro,i({},l(i({},e),{path:t,value:n,lang:o,version:r,states:a,ctx:s}))),null]};function eo({path:e,value:t}){var n,o,r,a,s;switch(e.getContext().join(".")){case"loot_table.pools.entry":return d("label",null,null!=(o=null==(n=null==t?void 0:t.entries)?void 0:n.length)?o:0," entries");case"function.set_contents.entries.entry":case"loot_pool.entries.entry":return d("label",null,null!=(s=null==(r=null==t?void 0:t.name)?void 0:r.replace(/^minecraft:/,""))?s:null==(a=null==t?void 0:t.type)?void 0:a.replace(/^minecraft:/,""))}for(const i of Object.values(null!=t?t:{}))if("string"==typeof i)return d("label",null,i.replace(/^minecraft:/,""));return null}function to(){const[e,t]=v(new Map),[n,o]=v(void 0);return{expand:e=>n=>{n.ctrlKey?(t(new Map),o(!0)):t((t=>new Map(t.set(e,!0))))},collapse:e=>n=>{n.ctrlKey?(t(new Map),o(!1)):t((t=>new Map(t.set(e,!1))))},isToggled:t=>{var o;return e instanceof Map&&(null!=(o=e.get(t))?o:n)}}}function no({path:e,node:t,value:n,lang:o}){const r=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return d(_,null,d("button",{class:!1===n?"selected":"",onClick:()=>r(!1)},jt(o,"false")),d("button",{class:!0===n?"selected":"",onClick:()=>r(!0)},jt(o,"true")))}function oo({path:e,config:t,integer:n,value:o,lang:r}){var a;const s=t=>{const o=t.target.value,r=n?parseInt(o):parseFloat(o);e.model.set(e,r)};return d(_,null,d("input",{type:"text",value:null!=o?o:"",onBlur:s,onKeyDown:e=>{"Enter"===e.key&&s(e)}}),(null==t?void 0:t.color)&&d("input",{type:"color",value:"#"+(null!=(a=null==o?void 0:o.toString(16).padStart(6,"0"))?a:"000000"),onChange:t=>{const n=t.target.value,o=parseInt(n.slice(1),16);e.model.set(e,o)}}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&d("button",{onClick:()=>be(e.model),class:"tooltipped tip-se","aria-label":jt(r,"generate_new_seed")},Je.sync))}function ro({path:e,getValues:t,config:n,node:o,value:r,lang:a,version:s,states:i}){var l;const c=t=>{t.stopPropagation();const n=t.target.value;n!==r&&e.model.set(e,0===n.length?void 0:n)},u=t(),p=e.getContext().join("."),m=so(n)||"resource"!==(null==n?void 0:n.validator)||"string"!=typeof n.params.pool?void 0:n.params.pool;if(Gn.includes(p))return d("textarea",{value:null!=r?r:"",onBlur:c});if(so(n)&&!n.additional||Rn.includes(p)){let t=new h.Path([]);return so(n)&&"string"==typeof n.enum?t=t.contextPush(n.enum):m?t=t.contextPush(m):so(n)&&(t=e),d("select",{value:null!=r?r:"",onChange:c},o.optional()&&d("option",{value:""},jt(a,"unset")),u.map((e=>d("option",{value:e},lo(a,t.contextPush(e.replace(/^minecraft:/,"")))))))}if(so(n)||"block_state_key"!==(null==n?void 0:n.validator)){const e=_e(),t=m?(e=>ve.generators.find((t=>t.id===e.replace(/^\$/,""))))(m):void 0;return d(_,null,d("input",{value:null!=r?r:"",onBlur:c,onKeyDown:e=>{"Enter"===e.key&&c(e)},list:u.length>0?e:""}),u.length>0&&d("datalist",{id:e},u.map((e=>d("option",{value:e})))),t&&u.includes(r)&&r.startsWith("minecraft:")&&d("a",{href:`/${t.url}/?version=${s}&preset=${r.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":jt(a,"follow_reference")},Je.link_external))}{const t=null==i?void 0:i[h.relativePath(e,n.params.id).get()],o=Object.keys(null!=(l=null==t?void 0:t.properties)?l:{});return d("select",{value:null!=r?r:"",onChange:c},o.map((e=>d("option",null,e))))}}const ao=ae((function({label:e,schema:t,path:n,value:o,lang:r,version:a,states:s,ctx:c,actions:u,children:h}){var p;const m=t.type(n),f=t.category(n),v=n.getContext().join("."),[g,w]=Be(),_=l(i({},c),{depth:(null!=(p=c.depth)?p:0)+1});delete _.index;const[y,b,k]=t.hook(Qn,n,o,r,a,s,_);return d("div",{class:`node ${m}-node`,"data-category":f},d("div",{class:"node-header",onContextMenu:e=>{e.preventDefault(),w()}},d(co,{lang:r,path:n}),d(uo,{lang:r,path:n}),h,y,d("label",null,null!=e?e:lo(r,n,`${n.last()}`),g&&d("div",{class:"node-menu"},null==u?void 0:u.map((e=>{var t;return d("div",{key:e.label,class:"menu-item"},d(fe,{icon:e.icon,tooltip:jt(r,e.label),tooltipLoc:"se",onClick:()=>e.onSelect()}),d("span",null,null!=(t=e.description)?t:jt(r,e.label)))})),d("div",{class:"menu-item"},d(fe,{icon:"clippy",tooltip:jt(r,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(v)}),d("span",null,v)))),b),k&&d("div",{class:"node-body"},k))}),((e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&Pe(e.ctx,t.ctx)&&Pe(e.value,t.value)));function so(e){return!!(null==e?void 0:e.enum)}function io(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n}function lo(e,t,...n){const o=t.getContext();for(let r=0;r<o.length;r+=1){const t=o.slice(r).join("."),a=jt(e,t,...n);if(t!==a)return a}return o[o.length-1]}function co({lang:e,path:t,nested:n}){var o;t.model instanceof Fn&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter((e=>e.path.startsWith(t))):t.model.errors.get(t,!0);if(0===r.length)return null;const a=jt(e,r[0].error,...null!=(o=r[0].params)?o:[]);return ho("node-error","issue_opened",a)}function uo({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),o=jt(e,n);return o===n?null:ho("node-help","info",o)}const ho=(e,t,n)=>{const[o,r]=Be();return d("div",{class:`node-icon ${e}${o?" show":""}`,onClick:r},Je[t],d("span",{class:"icon-popup"},n))};function po(e,t){var n,o;return"decorated"!==(null==(n=null==e?void 0:e.type)?void 0:n.replace(/^minecraft:/,""))?e:ge(null==e?void 0:e.config)?(t.push({id:t.length,node:e.config.decorator}),po(null!=(o=e.config.feature)?o:"",t)):e}function mo(e,t){return 0===t.length?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:mo(e,t)}}}function fo({version:e,model:t,blockStates:n,onError:o}){const{lang:r}=St();if(!t||!n||"none"===r)return d(_,null);const[a]=se((e=>{o(`Error rendering the tree: ${e.message}`),console.error(e)}));if(a)return d(_,null);const[,s]=v(0);return Fe(t,(()=>{s((e=>e+1))})),d("div",{class:"tree","data-cy":"tree"},d(Xn,i({},{model:t,lang:r,version:e,blockStates:n})))}function vo({term:e}){const{actualTheme:t}=Bt(),n="light"===t?"-burn":"",o=`https://${location.host}/assets/giscus${n}.css`;return d(ie,{repo:"misode/misode.github.io",repoId:"MDEwOlJlcG9zaXRvcnkxOTIyNTQyMzA=",category:"Site",categoryId:"DIC_kwDOC3WRFs4COB8r",mapping:e?"specific":"pathname",term:e,reactionsEnabled:"1",emitMetadata:"0",inputPosition:"top",theme:o,lang:"en"})}const go={system:"device_desktop",dark:"moon",light:"sun"};function wo(){const{lang:e,locale:t,changeLanguage:n}=St(),{theme:o,changeTheme:r}=Bt(),{version:a}=Ut(),{title:s}=Rt(),i=Me(p());return d("header",null,d("div",{class:"title"},d(le,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},_o.home),d("h1",null,s),i&&d(Re,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},ve.generators.filter((e=>e.category===(null==i?void 0:i.category)&>(a,e.minVersion))).map((e=>d(fe,{label:t(e.id),active:e.id===i.id,onClick:()=>m(xe(e.url))}))))),d("nav",null,d("ul",null,d("li",{"data-cy":"language-switcher"},d(Re,{icon:"globe",tooltip:t("language")},ve.languages.map((({code:t,name:o})=>d(fe,{label:o,active:t===e,onClick:()=>n(t)}))))),d("li",{"data-cy":"theme-switcher"},d(Re,{icon:go[o],tooltip:t("theme")},Object.entries(go).map((([e,n])=>d(fe,{icon:n,label:t(`theme.${e}`),active:e===o,onClick:()=>r(e)}))))),d("li",{class:"dimmed"},d("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},Je.mark_github)))))}const _o={home:d("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),d("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),d("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),d("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),d("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),d("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:d("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},d("path",{d:"M0 16C0 13.7909 1.79086 12 4 12V12C6.20914 12 8 13.7909 8 16V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V16Z",fill:"#6ACC5D"}),d("path",{d:"M11 4C11 1.79086 12.7909 0 15 0V0C17.2091 0 19 1.79086 19 4V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V4Z",fill:"#FF4C4C"}),d("path",{d:"M22 10C22 7.79086 23.7909 6 26 6V6C28.2091 6 30 7.79086 30 10V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V10Z",fill:"#E5B442"}),d("path",{d:"M0 23C0 20.7909 1.79086 19 4 19V19C6.20914 19 8 20.7909 8 23V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V23Z",fill:"#2BAD1D"}),d("path",{d:"M11 15C11 12.7909 12.7909 11 15 11V11C17.2091 11 19 12.7909 19 15V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V15Z",fill:"#C10B0B"}),d("path",{d:"M22 19C22 16.7909 23.7909 15 26 15V15C28.2091 15 30 16.7909 30 19V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V19Z",fill:"#CC8E00"})),sounds:d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},d("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.5 10C3.5 8.27609 4.18482 6.62279 5.40381 5.40381C6.62279 4.18482 8.27609 3.5 10 3.5C11.7239 3.5 13.3772 4.18482 14.5962 5.40381C15.8152 6.62279 16.5 8.27609 16.5 10C16.5 11.7239 15.8152 13.3772 14.5962 14.5962C13.3772 15.8152 11.7239 16.5 10 16.5C8.27609 16.5 6.62279 15.8152 5.40381 14.5962C4.18482 13.3772 3.5 11.7239 3.5 10V10ZM10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2V2ZM8.379 7.227C8.34101 7.20412 8.29762 7.19175 8.25327 7.19117C8.20892 7.19059 8.16522 7.20181 8.12664 7.2237C8.08807 7.24558 8.05601 7.27733 8.03375 7.3157C8.0115 7.35406 7.99985 7.39765 8 7.442V12.559C8.00003 12.6033 8.0118 12.6467 8.03413 12.685C8.05646 12.7232 8.08854 12.7548 8.12708 12.7765C8.16563 12.7983 8.20926 12.8095 8.25352 12.8088C8.29778 12.8082 8.34108 12.7958 8.379 12.773L12.643 10.214C12.6798 10.1917 12.7103 10.1604 12.7315 10.1229C12.7526 10.0854 12.7638 10.043 12.7638 10C12.7638 9.95695 12.7526 9.91463 12.7315 9.87714C12.7103 9.83965 12.6798 9.80825 12.643 9.786L8.379 7.227Z",fill:"#C5A5E6"}))};function yo({sounds:e,sound:t,delay:n,pitch:o,volume:r,onEdit:a,onDelete:s,delayedPlay:i}){const{locale:l}=St(),{version:u}=Ut(),[h,p]=v(!0),[m,g]=v(!1),[w,_]=v(!1),y=f([]),b=`playsound minecraft:${t} master @s ~ ~ ~ ${r} ${o}`;c((()=>{var n,a,s;const i=e[t];_(0===(null!=(a=null==(n=null==i?void 0:i.sounds)?void 0:n.length)?a:0)),y.current.forEach((e=>e.stop())),y.current=(null!=(s=null==i?void 0:i.sounds)?s:[]).map((e=>{const t="string"==typeof e?e:e.name,n=(a=u,s=t,`${ot(ve.versions.find((e=>e.id===a)),"assets")}/assets/minecraft/sounds/${s}.ogg`);var a,s;const i=new ce.Howl({src:[n],format:["ogg"],volume:r,rate:o});i.on("end",(()=>{g(!1)}));const l=()=>{h&&y.current.every((e=>"loaded"===e.state()))&&p(!1)};return"loaded"===i.state()?setTimeout((()=>l())):i.on("load",(()=>{l()})),i})),p(!0)}),[t,e]),c((()=>{y.current.forEach((e=>e.rate(o)))}),[o]),c((()=>{y.current.forEach((e=>e.volume(r)))}),[r]);const k=()=>{if(h||w)return;x();const e=Math.floor(Math.random()*y.current.length);y.current[e].play(),g(!0)},x=()=>{y.current.forEach((e=>e.stop()))};c((()=>{i&&setTimeout((()=>k()),50*n)}),[i]),c((()=>()=>x()),[]);const[C,M]=v(!1),A=f(void 0);return d("div",{class:`sound-config${h?" loading":m?" playing":""}${w?" invalid":""}`},d(fe,{class:"play",icon:w?"alert":h?"sync":"play",label:l("sounds.play"),onClick:k,tooltip:l(w?"sounds.unknown_sound":h?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),d(Ye,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:t,onChange:e=>a({sound:e})}),d("label",{class:"delay-label"},l("sounds.delay"),": "),d(qe,{class:"btn btn-input delay",min:0,value:n,onChange:e=>a({delay:e})}),d("label",{class:"pitch-label"},l("sounds.pitch"),": "),d(Ke,{class:"pitch tooltipped tip-s",min:.5,max:2,step:.01,"aria-label":o.toFixed(2),style:`--x: ${100/1.5*(o-.5)}%`,value:o,onChange:e=>a({pitch:e})}),d("label",{class:"volume-label"},l("sounds.volume"),": "),d(Ke,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":r.toFixed(2),style:`--x: ${100*r}%`,value:r,onChange:e=>a({volume:e})}),d(fe,{class:"copy"+(C?" active":""),icon:C?"check":"terminal",label:l("copy"),tooltip:l(C?"copied":"sounds.copy_command"),onClick:()=>{navigator.clipboard.writeText(b),M(!0),void 0!==A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{M(!1)}),2e3)}}),d(fe,{class:"remove",icon:"trashcan",tooltip:l("sounds.remove_sound"),onClick:()=>{s(),x()}}))}function bo({title:e,desc:t,link:n,icon:o,children:r}){const a=d(_,null,d("div",{class:"tool-head"},o&&_o[o],d("div",null,d("h3",null,e),d("p",null,t))),r&&d("div",{class:"tool-body"},r));return n?d("a",{class:"tool-card",href:n},a):d("div",{class:"tool-card"},a)}function ko({entries:e,onSelect:t,indent:n}){const o=w((()=>{var t;const n={};for(const o of e){const e=o.indexOf("/");if(e>=0){const r=o.slice(0,e);(null!=(t=n[r])?t:n[r]=[]).push(o.slice(e+1))}}return Object.entries(n)}),e),r=w((()=>e.filter((e=>!e.includes("/")))),e),[a,s]=v(new Set);return d("div",{class:"tree-view",style:`--indent: ${null!=n?n:0};`},o.map((([e,o])=>d("div",null,d(xo,{icon:a.has(e)?"chevron_right":"chevron_down",key:e,label:e,onClick:()=>{return t=e,a.has(t)?a.delete(t):a.add(t),void s(new Set(a));var t}}),!a.has(e)&&d(ko,{entries:o,onSelect:n=>t(`${e}/${n}`),indent:(null!=n?n:0)+1})))),r.map((e=>d(xo,{icon:"file",key:e,label:e,onClick:()=>t(e)}))))}function xo({icon:e,label:t,onClick:n}){return d("div",{class:"entry",onClick:n},Je[e],t)}function Co({change:e,activeTags:t,toggleTag:n}){return d("div",{class:"changelog-entry"},d("div",{class:"changelog-version"},d(Mo,i({},e.version)),d(Mo,i({},e.group))),d("div",{class:"changelog-tags"},e.tags.map((e=>d(Ao,{label:e,onClick:n?()=>n(e):void 0,active:null==t?void 0:t.includes(e)})))),d("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:de(e.content)}}))}function Mo({id:e,article:t}){return null===t?d("span",null,e):d("a",{href:`https://www.minecraft.net/en-us/article/${t}`,target:"_blank"},e)}function Ao({label:e,active:t,onClick:n}){const o="breaking"===e?5:ke(e)%360;return d("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${o}`,onClick:n},"breaking"===e&&Je.alert,e)}function Io({changes:e,defaultOrder:t}){const{locale:n}=St(),[o,r]=v(""),[a,s]=v([]),i=e=>{a.includes(e)?s(a.filter((t=>t!==e))):s([...a,e])},l=w((()=>{const t=o.split(" ").map((e=>e.trim().toLowerCase())).filter((e=>e.length>0));return 0===t.length&&0===a.length?e:null==e?void 0:e.filter((e=>{if(!a.every((t=>e.tags.includes(t))))return!1;const n=e.tags.join(" ")+" "+e.content.toLowerCase();return t.every((e=>e.startsWith("!")?1===e.length||!n.includes(e.slice(1)):n.includes(e)))}))}),[e,o,a]),[c,u]=v("desc"===t),h=w((()=>null==l?void 0:l.sort(((e,t)=>c?t.order-e.order:e.order-t.order))),[l,c]);return d(_,null,d("div",{class:"changelog-query"},d(Ye,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:o,onChange:r}),d(fe,{icon:c?"sort_desc":"sort_asc",label:c?"Newest first":"Oldest first",onClick:()=>u(!c)})),a.length>0&&d("div",{class:"changelog-tags"},a.map((e=>d(Ao,{label:e,onClick:()=>s(a.filter((t=>t!==e)))})))),d("div",{class:"changelog-list"},void 0===h?d("span",null,n("loading")):0===h.length?d("span",null,n("changelog.no_results")):h.map((e=>d(Co,{change:e,activeTags:a,toggleTag:i})))))}function zo({version:e}){const{locale:t}=St(),[n,o]=v("changelog"),[r,a]=v(void 0);c((()=>{et().then((e=>a(e.map((e=>l(i({},e),{tags:e.tags.filter((t=>t!==e.group.id))})))))).catch((e=>console.error(e)))}),[]);const s=w((()=>null==r?void 0:r.filter((t=>t.version.id===e.id||t.group.id===e.id))),[e.id,r]);return d(_,null,d("div",{class:"version-detail"},d("h2",null,e.name),d("div",{class:"version-info"},d(So,{label:t("versions.released"),value:$o(e)}),d(So,{label:t("versions.release_target"),value:e.release_target,link:e.id!==e.release_target?`/versions/?id=${e.release_target}`:void 0}),d(So,{label:t("versions.data_version"),value:e.data_version}),d(So,{label:t("versions.protocol_version"),value:e.protocol_version}),d(So,{label:t("versions.data_pack_format"),value:e.data_pack_version}),d(So,{label:t("versions.resource_pack_format"),value:e.resource_pack_version})),d("div",{class:"version-tabs"},d("span",{class:"changelog"===n?"selected":"",onClick:()=>o("changelog")},t("versions.technical_changes")),d("span",{class:"discussion"===n?"selected":"",onClick:()=>o("discussion")},t("versions.discussion"))),d("div",{class:"version-tab"},"changelog"===n&&d(Io,{changes:s,defaultOrder:"asc"}),"discussion"===n&&d(vo,{term:`version/${e.id}`}))))}function $o(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function jo({version:e,link:t}){const{locale:n}=St();return d("a",{class:"version-entry",href:t},d("span",{class:"version-id"},e.id),d(So,{label:n("versions.released"),value:$o(e),compact:!0}),d(So,{label:n("versions.data_version"),value:e.data_version,optional:!0}),d(So,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}function Eo({versions:e,link:t}){const{locale:n}=St(),[o,r]=v(!0),[a,s]=v(""),i=w((()=>e.filter((e=>!("snapshot"===e.type&&!o)&&e.id.includes(a)))),[e,o,a]);return d(_,null,d("div",{class:"versions-controls"},d(Ye,{class:"btn btn-input version-search",list:"sound-list",placeholder:n("versions.search"),value:a,onChange:s}),d(Ue,{label:"Include snapshots",value:o,onChange:r})),d("div",{class:"version-list"},i.map((e=>d(jo,{version:e,link:null==t?void 0:t(e.id)}))),0===i.length&&d("span",null,n("versions.no_results"))))}function So({label:e,value:t,link:n,compact:o,optional:r}){return d("div",{class:"version-metadata"+(r?" version-metadata-hide":"")},d("span",{class:o?"version-metadata-hide":void 0},e,": "),d("span",{class:"version-metadata-value"},t),n&&d("a",{href:n,class:"version-metadata-link"},Je.link_external))}function Oo({category:e}){const{locale:t}=St();return Rt(t("title.generator_category",t(e))),d("main",null,d("div",{class:"category"},ve.generators.filter((t=>t.category===e)).map((e=>d(bo,{title:t(e.id),link:xe(e.url)})))))}function Lo({}){const{locale:e}=St(),[t,n]=v(null);Rt(e("title.changelog"));const[o,r]=v([]);return c((()=>{et().then((e=>r(e))).catch((e=>{console.error(e),n(e)}))}),[]),d("main",null,d(me,{type:"text",id:"changelog"}),t&&d(We,{error:t,onDismiss:()=>n(null)}),d("div",{class:"changelog"},d(Io,{changes:o,defaultOrder:"desc"})))}function Po({}){var e;const{locale:t}=St(),{version:n,changeVersion:o}=Ut(),{project:r,file:a,updateFile:s,openFile:u,closeFile:f}=Dt(),[g,y]=v(null),[b,k]=se();if(b)return b.message=`Something went wrong rendering the generator: ${b.message}`,d("main",null,d(We,{error:b,onDismiss:k}));const x=Me(p());if(!x)return d("main",null,d(We,{error:`Cannot find generator "${p()}"`}));const C=ve.versions.filter((e=>gt(e.id,x.minVersion,x.maxVersion))).map((e=>e.id));Rt(t("title.generator",t(x.id)),C),gt(n,x.minVersion)||y(`The minimum version for this generator is ${x.minVersion}`),gt(n,void 0,x.maxVersion)||y(`This generator is not available in versions above ${x.maxVersion}`);const M=Ae(p()),I=M.get("preset"),z=M.get("share");c((()=>{E&&I?Y(I).then((e=>{E.reset(h.DataModel.wrapLists(e),!1),Ie({version:n,preset:I,share:void 0})})):E&&z&&_t(z).then((e=>$(E,e)))}),[I,z]);const $=(e,t)=>{if(t.version&&t.version!==n&&o(t.version,!1),t.type&&t.type!==x.id){const e=ve.generators.find((e=>e.id===t.type));e&&m(`${xe(e.url)}?share=${t.id}`)}t.show_preview&&!ge&&(we(!0),oe(!1)),e.reset(h.DataModel.wrapLists(t.data),!1)},j=w((()=>Ct.getBackup(x.id)),[x.id]),[E,S]=v(null),[O,L]=v(null);c((()=>{y(null),S(null),async function(e){return(await vt(e)).blockStates}(n).then((e=>L(e))),async function(e,t){var n;if(!ut[t]||ut[t].version!==e){const r=await vt(e);pt=h.Reference(r.schemas,"configured_decorator"),mt=h.ChoiceNode([{type:"string",node:h.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:h.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const a=null==(n=ve.generators.find((e=>e.id===t)))?void 0:n.schema;if(!a)throw new Error(`Cannot find model ${t}`);try{const n=r.schemas.get(a),o=new h.DataModel(n,{wrapLists:!0});ut[t]?o.reset(ut[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),ut[t]={model:o,version:e}}catch(o){const n=new Error(`Cannot get generator "${t}" for version "${e}": ${Oe(o)}`);throw o instanceof Error&&(n.stack=o.stack),n}}return ut[t].model}(n,x.id).then((async e=>{if(pe.setGenerator(x.id),I){const t=await Y(I);e.reset(h.DataModel.wrapLists(t),!1)}else if(z){const t=await _t(z);$(e,t)}S(e)})).catch((e=>{console.error(e),y(e)}))}),[n,x.id]);const[P,D]=v(!1);Fe(E,(()=>{Ie({version:void 0,preset:void 0,share:void 0}),Ct.setBackup(x.id,h.DataModel.unwrapLists(null==E?void 0:E.data)),y(null),D(!0)}),[x.id]);const[V,N]=v(""),[T,B]=Ne(),[H,F]=Ne(),R=()=>{if(V!==(null==a?void 0:a.id)&&V&&E&&O){const e=Vn(E,O);s(x.id,null==a?void 0:a.id,{id:V,data:e})?B():(F(),a&&N(null==a?void 0:a.id))}else a&&N(null==a?void 0:a.id)};c((()=>{a&&N(a.id)}),[a]),c((()=>{var e;E&&(N(null!=(e=null==a?void 0:a.id)?e:""),a&&x.id===a.type&&E.reset(h.DataModel.wrapLists(a.data)),D(!1))}),[a,E]);const J=e=>{e.ctrlKey&&"z"===e.key?(pe.generatorEvent("undo","Hotkey"),null==E||E.undo()):e.ctrlKey&&"y"===e.key&&(pe.generatorEvent("redo","Hotkey"),null==E||E.redo())},W=e=>{if(e.ctrlKey&&"s"===e.key&&(e.preventDefault(),E&&O&&a)){pe.generatorEvent("save","Hotkey");const e=Vn(E,O);s(x.id,null==a?void 0:a.id,{id:null==a?void 0:a.id,data:e}),D(!1),B()}};c((()=>(document.addEventListener("keyup",J),document.addEventListener("keydown",W),()=>{document.removeEventListener("keyup",J),document.removeEventListener("keydown",W)})),[E,O,a]);const[U,G]=v([]);c((()=>{(async function(e){const t=await vt(e);return ft=t.collections,t.collections})(n).then((e=>{G(e.get(x.id).map((e=>e.slice(10))))})).catch((e=>{console.error(e),y(e)}))}),[n,x.id]);const Y=async e=>{var t,o,r;try{const a=await it(n,null!=(t=x.path)?t:x.id,e),s=null==E?void 0:E.get(new h.Path(["generator","seed"]));return void 0!==(null==(o=null==a?void 0:a.generator)?void 0:o.seed)&&void 0!==s&&(a.generator.seed=s,void 0!==(null==(r=a.generator.biome_source)?void 0:r.seed)&&(a.generator.biome_source.seed=s)),a}catch(a){y(a instanceof Error?a:Oe(a))}},[q,K]=v(void 0),[Z,X]=v(!1),[Q,ee]=Ne({cooldown:3e3}),te=()=>{navigator.clipboard.writeText(null!=q?q:""),ee()};c((()=>{Q||(K(void 0),X(!1))}),[Q]);const[ne,oe]=v(window.innerWidth>820),[re,ae]=v(0),[ie,le]=v(0),[ce,de]=v(0),[ue,he]=Ne(),[ge,we]=v(!1),_e=Pn.includes(x.id)&&!("worldgen/configured_feature"===x.id&>(n,"1.18"));ge&&!_e&&we(!1);let ye=2;_e&&(ye+=1),ne&&(ye+=2);return d(_,null,d("main",{class:ge?"has-preview":""},d(me,{id:"data-pack-generator",type:"text"}),d("div",{class:"controls"},d("div",{class:`project-controls ${a&&"has-file"}`},d("div",{class:"btn-row"},d(Re,{icon:"repo",label:r.name,relative:!1},d(fe,{icon:"arrow_left",label:t("project.go_to"),onClick:()=>m("/project")}),a&&d(fe,{icon:"file",label:t("project.new_file"),onClick:f}),void 0!==j&&d(fe,{icon:"history",label:t("restore_backup"),onClick:()=>{void 0!==j&&(null==E||E.reset(h.DataModel.wrapLists(j),!1))}}),d(Ze,{searchPlaceholder:t("Drafts"===r.name?"project.search_drafts":"project.search"),noResults:t("project.no_files"),values:r.files.filter((e=>e.type===x.id)).map((e=>e.id)),onSelect:e=>u(x.id,e)})),d(Ye,{class:"btn btn-input",placeholder:t("project.unsaved_file"),value:V,onChange:N,onEnter:R,onBlur:R}),a&&d(fe,{icon:"trashcan",tooltip:t("project.delete_file"),onClick:()=>{a&&s(x.id,a.id,{})}})),P?d("div",{class:"status-icon"},Je.dot_fill):T?d("div",{class:"status-icon active"},Je.check):H&&d("div",{class:"status-icon danger"},Je.x)),d("div",{class:"generator-controls"},d(fe,{icon:"upload",label:t("import"),onClick:()=>{pe.generatorEvent("import"),oe(!0),de(ce+1)}}),d(Re,{icon:"archive",label:t("presets"),relative:!1},d(Ze,{searchPlaceholder:t("search"),noResults:t("no_presets"),values:U,onSelect:e=>{pe.generatorEvent("load-preset",e),Ie({version:n,preset:e,share:void 0})}})),d(Re,{icon:"tag",label:n,tooltip:t("switch_version"),"data-cy":"version-switcher"},C.reverse().map((e=>d(fe,{label:e,active:e===n,onClick:()=>{return t=e,Ie({share:void 0}),void o(t);var t}})))),d(Re,{icon:"kebab_horizontal",tooltip:t("more")},d(fe,{icon:"history",label:t("reset"),onClick:()=>{pe.generatorEvent("reset"),null==E||E.reset(h.DataModel.wrapLists(E.schema.default()),!0)}}),d(fe,{icon:"arrow_left",label:t("undo"),onClick:e=>{e.stopPropagation(),pe.generatorEvent("undo","Menu"),null==E||E.undo()}}),d(fe,{icon:"arrow_right",label:t("redo"),onClick:e=>{e.stopPropagation(),pe.generatorEvent("redo","Menu"),null==E||E.redo()}})))),g&&d(We,{error:g,onDismiss:()=>y(null)}),d(fo,l(i({},{model:E,version:n,blockStates:O}),{onError:y}))),d("div",{class:"popup-actions",style:`--offset: -${8+50*ye}px;`},d("div",{class:`popup-action action-preview${_e?" shown":""} tooltipped tip-nw`,"aria-label":t(ge?"hide_preview":"show_preview"),onClick:()=>{pe.generatorEvent("toggle-preview",ge?"hidden":"visible"),we(!ge),!ge&&ne&&oe(!1)}},ge?Je.x_circle:Je.play),d("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":t("share"),onClick:()=>{if(Z)X(!1);else if(I)K(`${location.protocol}//${location.host}/${x.url}/?version=${n}&preset=${I}`),X(!0),te();else if(E&&O){const e=Vn(E,O);Pe(e,E.schema.default())?(K(`${location.protocol}//${location.host}/${x.url}/?version=${n}`),X(!0)):async function(e,t,n,o){try{const r=A.compressToBase64(JSON.stringify(n)),a=btoa(JSON.stringify(n));console.log("Compression rate",a.length/r.length);const s=JSON.stringify({data:r,type:e,version:t,show_preview:o});let i=wt.get(s);if(!i){const e=await yt("/snippets",s);wt.set(s,e.id),i=e.id}const l=ve.generators.find((t=>t.id===e));return`${location.protocol}//${location.host}/${l.url}/?share=${i}`}catch(r){throw r instanceof Error&&(r.message=`Error creating share link: ${r.message}`),r}}(x.id,n,e,ge).then((e=>{K(e),X(!0)})).catch((e=>{e instanceof Error&&y(e)}))}}},Je.link),d("div",{class:`popup-action action-download${ne?" shown":""} tooltipped tip-nw`,"aria-label":t("download"),onClick:()=>{pe.generatorEvent("download"),le(ie+1)}},Je.download),d("div",{class:`popup-action action-copy${ne?" shown":""}${ue?" active":""} tooltipped tip-nw`,"aria-label":t(ue?"copied":"copy"),onClick:()=>{pe.generatorEvent("copy"),ae(re+1)}},ue?Je.check:Je.clippy),d("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":t(ne?"hide_output":"show_output"),onClick:()=>{pe.generatorEvent("toggle-output",ne?"hidden":"visible"),oe(!ne),ae(0),le(0),de(0)}},ne?Je.chevron_right:Je.code)),d("div",{class:"popup-preview"+(ge?" shown":"")},d(Dn,l(i({},{model:E,version:n,id:x.id}),{shown:ge,onError:y}))),d("div",{class:"popup-source"+(ne?" shown":"")},d(Hn,l(i({},{model:E,blockStates:O,doCopy:re,doDownload:ie,doImport:ce}),{name:null!=(e=x.schema)?e:"data",copySuccess:he,onError:y}))),d("div",{class:"popup-share"+(Z?" shown":"")},d(Ye,{value:q,readonly:!0}),d(fe,{icon:Q?"check":"clippy",onClick:te,tooltip:t(Q?"copied":"copy_share"),tooltipLoc:"nw",active:Q,showTooltip:Q})))}function Do({}){const{locale:e}=St();return Rt(e("title.home")),d("main",null,d("div",{class:"home"},d(bo,{title:"Data packs"},ve.generators.filter((e=>!e.category)).map((t=>d(bo,{title:e(t.id),link:xe(t.url)}))),d(bo,{title:e("worldgen"),link:"/worldgen/"})),d(bo,{title:"Resource packs"},ve.generators.filter((e=>"assets"===e.category)).map((t=>d(bo,{title:e(t.id),link:xe(t.url)})))),d(bo,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),d(bo,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),d(bo,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),d(bo,{title:"Technical Changelog",link:"/changelog/"}),d(bo,{title:"Minecraft Versions",link:"/versions/"}),d(vo,null)))}function Vo({}){const{locale:e}=St(),{project:t,openFile:n}=Dt();Rt(e("title.project",t.name));const o=w((()=>t.files.map(Nt)),t.files);return d("main",null,d(me,{id:"data-pack-project",type:"text"}),d("div",{class:"project"},d("h2",null,t.name),d("div",{class:"file-view"},d(ko,{entries:o,onSelect:e=>{const[,t,o,...r]=e.split("/");n(o,`${t}:${r}`)}}))))}function No({}){const{locale:e}=St(),{version:t,changeVersion:n}=Ut(),[o,r]=v(null);Rt(e("title.sounds"));const[a,s]=v({}),u=Object.keys(null!=a?a:{});c((()=>{(async function(e){const t=ve.versions.find((t=>t.id===e));await rt(t);try{const e=`${ot(t,"summary")}/sounds/data.min.json`;return await lt(e)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${Oe(n)}`)}})(t).then(s).catch((e=>{console.error(e),r(e)}))}),[t]);const[h,p]=v(""),[m,g]=v([]),w=()=>{g([{id:_e(),sound:h,delay:0,pitch:1,volume:1},...m])},y=e=>()=>{g(m.filter((t=>t.id!==e)))},[b,k]=v(0),x=f(null);return d("main",null,o&&d(We,{error:o,onDismiss:()=>r(null)}),u.length>0&&d(_,null,d("div",{class:"controls sounds-controls"},d("div",{class:"sound-search-group"},d(Ye,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:h,onChange:p,onEnter:w}),d(fe,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:w})),m.length>1&&d(fe,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:()=>{k(b+1)}}),d("div",{class:"spacer"}),d(fe,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),class:"download-sounds",onClick:()=>{const e=m.some((e=>e.delay>0)),t=m.sort(((e,t)=>e.delay-t.delay)).map((t=>`${e?`execute if score @s delay matches ${t.delay} run `:""}playsound minecraft:${t.sound} master @s ~ ~ ~ ${t.volume} ${t.pitch}`)).join("\n");x.current.setAttribute("href","data:text/plain;charset=utf-8,"+t+"%0A"),x.current.setAttribute("download","sounds.mcfunction"),x.current.click()}}),d(Re,{icon:"tag",label:t},ve.versions.reverse().map((e=>d(fe,{label:e.id,active:e.id===t,onClick:()=>n(e.id)}))))),d("div",{class:"sounds"},m.map((e=>{return d(yo,l(i(i({key:e.id},e),{sounds:a,delayedPlay:b}),{onEdit:(t=e.id,e=>{g(m.map((n=>n.id===t?i(i({},n),e):n)))}),onDelete:y(e.id)}));var t}))),d("a",{ref:x,style:"display: none;"})),d("datalist",{id:"sound-list"},u.map((e=>d("option",{key:e,value:e})))))}function To({}){const{locale:e}=St(),[t,n]=v(null);Rt(e("title.versions"));const[o,r]=v([]);c((()=>{(async function(){const e=ve.versions[ve.versions.length-1];await rt(e);try{return lt(`${ot(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${Oe(t)}`)}})().then((e=>r(e))).catch((e=>{console.error(e),n(e)}))}),[]);const a=Ae(p()).get("id"),s=o.find((e=>e.id===a));Rt(s?s.name:"Versions Explorer",s?[]:void 0);const l=s&&Bo(o,s,-1),u=s&&Bo(o,s,1);return d("main",null,d(me,{type:"text",id:"versions"}),t&&d(We,{error:t,onDismiss:()=>n(null)}),d("div",{class:"versions"},a?d(_,null,d("div",{class:"version-navigation"},d("a",{class:"btn btn-link",href:"/versions/"},Je.three_bars,e("versions.all")),d("a",i({class:"btn btn-link"},u?{href:`/versions/?id=${u.id}`}:{disabled:!0}),Je.arrow_left,e("versions.previous")),d("a",i({class:"btn btn-link"},l?{href:`/versions/?id=${l.id}`}:{disabled:!0}),e("versions.next"),Je.arrow_right)),s?d(zo,{version:s}):d("div",{class:"version-detail"},d("h2",null,a),d("div",{class:"version-info"},d("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")))):d(Eo,{versions:o,link:e=>`/versions/?id=${e}`})))}function Bo(e,t,n){const o=e.findIndex((e=>e.id===t.id))+n;if(!(o<0||o>=e.length))return e[o]}function Ho(){return d(_,null,d(wo,null),d(ue,{onChange:e=>{setTimeout((()=>pe.pageview(xe(e.url))))}},d(Do,{path:"/"}),d(Oo,{path:"/worldgen",category:"worldgen"}),d(Oo,{path:"/assets",category:"assets"}),d(No,{path:"/sounds"}),d(Lo,{path:"/changelog"}),d(To,{path:"/versions"}),d(Vo,{path:"/project"}),d(Po,{default:!0})))}function Fo(){return d(Ot,null,d(Ht,null,d(Gt,null,d(Jt,null,d(Vt,null,d(Ho,null))))))}he(d(Fo,null),document.body); -//# sourceMappingURL=index.3e2e038a.js.map diff --git a/assets/index.html b/assets/index.html index e87fc1c3..e6391ae3 100644 --- a/assets/index.html +++ b/assets/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/assets/model/index.html b/assets/model/index.html index e2a50407..1f904f51 100644 --- a/assets/model/index.html +++ b/assets/model/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/changelog/index.html b/changelog/index.html index c6a79805..7a17885d 100644 --- a/changelog/index.html +++ b/changelog/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/dimension-type/index.html b/dimension-type/index.html index 7b78ce6d..5bc073f2 100644 --- a/dimension-type/index.html +++ b/dimension-type/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/dimension/index.html b/dimension/index.html index 50732dac..41cc0580 100644 --- a/dimension/index.html +++ b/dimension/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/index.html b/index.html index 7b726e49..8c0b8010 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/item-modifier/index.html b/item-modifier/index.html index 07813a59..aa3435f5 100644 --- a/item-modifier/index.html +++ b/item-modifier/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/loot-table/index.html b/loot-table/index.html index cd999df5..13fa56af 100644 --- a/loot-table/index.html +++ b/loot-table/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/predicate/index.html b/predicate/index.html index ebda419f..12bda28d 100644 --- a/predicate/index.html +++ b/predicate/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/recipe/index.html b/recipe/index.html index bdbec7b0..75da0d9b 100644 --- a/recipe/index.html +++ b/recipe/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/sitemap.txt b/sitemap.txt index 7eb23b39..84f9f949 100644 --- a/sitemap.txt +++ b/sitemap.txt @@ -4,6 +4,7 @@ https://misode.github.io/predicate/ https://misode.github.io/item-modifier/ https://misode.github.io/advancement/ https://misode.github.io/recipe/ +https://misode.github.io/text-component/ https://misode.github.io/dimension/ https://misode.github.io/dimension-type/ https://misode.github.io/world/ @@ -11,8 +12,20 @@ https://misode.github.io/worldgen/ https://misode.github.io/worldgen/biome/ https://misode.github.io/worldgen/carver/ https://misode.github.io/worldgen/feature/ +https://misode.github.io/worldgen/density-function/ +https://misode.github.io/worldgen/placed-feature/ +https://misode.github.io/worldgen/noise/ https://misode.github.io/worldgen/noise-settings/ https://misode.github.io/worldgen/structure-feature/ +https://misode.github.io/worldgen/structure/ +https://misode.github.io/worldgen/structure-set/ +https://misode.github.io/worldgen/surface-builder/ https://misode.github.io/worldgen/processor-list/ https://misode.github.io/worldgen/template-pool/ +https://misode.github.io/worldgen/world-preset/ +https://misode.github.io/worldgen/flat-world-preset/ https://misode.github.io/sounds/ +https://misode.github.io/report/ +https://misode.github.io/upgrader/ +https://misode.github.io/changelog/ +https://misode.github.io/versions/ diff --git a/sitemap2.txt b/sitemap2.txt index 7eb23b39..84f9f949 100644 --- a/sitemap2.txt +++ b/sitemap2.txt @@ -4,6 +4,7 @@ https://misode.github.io/predicate/ https://misode.github.io/item-modifier/ https://misode.github.io/advancement/ https://misode.github.io/recipe/ +https://misode.github.io/text-component/ https://misode.github.io/dimension/ https://misode.github.io/dimension-type/ https://misode.github.io/world/ @@ -11,8 +12,20 @@ https://misode.github.io/worldgen/ https://misode.github.io/worldgen/biome/ https://misode.github.io/worldgen/carver/ https://misode.github.io/worldgen/feature/ +https://misode.github.io/worldgen/density-function/ +https://misode.github.io/worldgen/placed-feature/ +https://misode.github.io/worldgen/noise/ https://misode.github.io/worldgen/noise-settings/ https://misode.github.io/worldgen/structure-feature/ +https://misode.github.io/worldgen/structure/ +https://misode.github.io/worldgen/structure-set/ +https://misode.github.io/worldgen/surface-builder/ https://misode.github.io/worldgen/processor-list/ https://misode.github.io/worldgen/template-pool/ +https://misode.github.io/worldgen/world-preset/ +https://misode.github.io/worldgen/flat-world-preset/ https://misode.github.io/sounds/ +https://misode.github.io/report/ +https://misode.github.io/upgrader/ +https://misode.github.io/changelog/ +https://misode.github.io/versions/ diff --git a/sounds/index.html b/sounds/index.html index 114fab33..70e8f6eb 100644 --- a/sounds/index.html +++ b/sounds/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } </script> -<script type="module" crossorigin src="/assets/index.3e2e038a.js"></script> +<script type="module" crossorigin src="/assets/index.37e720ee.js"></script> <link rel="modulepreload" href="/assets/vendor.273f4765.js"> <link rel="stylesheet" href="/assets/index.2396f736.css"> </head> diff --git a/text-component/index.html b/text-component/index.html new file mode 100644 index 00000000..fb47927e --- /dev/null +++ b/text-component/index.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + ga('create', 'UA-73024255-2', 'auto'); + ga('set', 'page', location.pathname); + ga('set', 'dimension1', localStorage.getItem('theme') || 'default'); + ga('set', 'dimension2', 'v2'); + ga('set', 'dimension3', localStorage.getItem('schema_version') || '1.18.2'); + ga('set', 'dimension4', localStorage.getItem('language') || 'en'); + ga('set', 'dimension5', 'none'); + ga('set', 'dimension7', matchMedia('(prefers-color-scheme: light)').matches ? 'light' : matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'none'); + ga('send', 'pageview'); + </script> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Text Component Generator Minecraft 1.18, 1.18.2, 1.19 + + + + + + + + +
+ + + diff --git a/versions/index.html b/versions/index.html index c69bdc28..9b75707c 100644 --- a/versions/index.html +++ b/versions/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/world/index.html b/world/index.html index 41857dca..7c02583e 100644 --- a/world/index.html +++ b/world/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/biome/index.html b/worldgen/biome/index.html index 44449006..0cbd9ba2 100644 --- a/worldgen/biome/index.html +++ b/worldgen/biome/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/carver/index.html b/worldgen/carver/index.html index 752a57c2..f2c54742 100644 --- a/worldgen/carver/index.html +++ b/worldgen/carver/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/density-function/index.html b/worldgen/density-function/index.html index c0b34808..564c1125 100644 --- a/worldgen/density-function/index.html +++ b/worldgen/density-function/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/feature/index.html b/worldgen/feature/index.html index df14c949..87be3ee4 100644 --- a/worldgen/feature/index.html +++ b/worldgen/feature/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/flat-world-preset/index.html b/worldgen/flat-world-preset/index.html index 6c58519b..f09a1005 100644 --- a/worldgen/flat-world-preset/index.html +++ b/worldgen/flat-world-preset/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/index.html b/worldgen/index.html index 75beeeaf..2f0f1f4f 100644 --- a/worldgen/index.html +++ b/worldgen/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/noise-settings/index.html b/worldgen/noise-settings/index.html index 69383035..db810c57 100644 --- a/worldgen/noise-settings/index.html +++ b/worldgen/noise-settings/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/noise/index.html b/worldgen/noise/index.html index 1e2bd6c4..368bfd0e 100644 --- a/worldgen/noise/index.html +++ b/worldgen/noise/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/placed-feature/index.html b/worldgen/placed-feature/index.html index cd2ebae4..0dab5041 100644 --- a/worldgen/placed-feature/index.html +++ b/worldgen/placed-feature/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/processor-list/index.html b/worldgen/processor-list/index.html index c2dfcbf9..0f6bfa23 100644 --- a/worldgen/processor-list/index.html +++ b/worldgen/processor-list/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/structure-feature/index.html b/worldgen/structure-feature/index.html index 13b2fbd6..b1edbbc3 100644 --- a/worldgen/structure-feature/index.html +++ b/worldgen/structure-feature/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/structure-set/index.html b/worldgen/structure-set/index.html index f18c8bbe..348e67be 100644 --- a/worldgen/structure-set/index.html +++ b/worldgen/structure-set/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/structure/index.html b/worldgen/structure/index.html index a37db80b..1df21e85 100644 --- a/worldgen/structure/index.html +++ b/worldgen/structure/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/surface-builder/index.html b/worldgen/surface-builder/index.html index 4c9db1dd..5a21d260 100644 --- a/worldgen/surface-builder/index.html +++ b/worldgen/surface-builder/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/template-pool/index.html b/worldgen/template-pool/index.html index 687a48a2..6b24747f 100644 --- a/worldgen/template-pool/index.html +++ b/worldgen/template-pool/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - + diff --git a/worldgen/world-preset/index.html b/worldgen/world-preset/index.html index 5b808ea8..e48c58a7 100644 --- a/worldgen/world-preset/index.html +++ b/worldgen/world-preset/index.html @@ -29,7 +29,7 @@ BigInt64Array = function() { } } - +