Files
misode.github.io/assets/index.245dbdc8.js
2022-06-12 18:53:24 +00:00

113 lines
385 KiB
JavaScript

var wu=Object.defineProperty,yu=Object.defineProperties;var bu=Object.getOwnPropertyDescriptors;var Br=Object.getOwnPropertySymbols;var ds=Object.prototype.hasOwnProperty,hs=Object.prototype.propertyIsEnumerable;var us=(e,t,n)=>t in e?wu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))ds.call(t,n)&&us(e,n,t[n]);if(Br)for(var n of Br(t))hs.call(t,n)&&us(e,n,t[n]);return e},ge=(e,t)=>yu(e,bu(t));var Wi=e=>typeof e=="symbol"?e:e+"",fs=(e,t)=>{var n={};for(var r in e)ds.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Br)for(var r of Br(e))t.indexOf(r)<0&&hs.call(e,r)&&(n[r]=e[r]);return n};const xu=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};xu();var G,rr,Ha,ps,Ua,si={},To=[],Au=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Ft(e,t){for(var n in t)e[n]=t[n];return e}function Ga(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n){var r,i,o,s=arguments,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(s[o]);if(n!=null&&(a.children=n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return ir(e,a,r,i,null)}function ir(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++G.__v:i};return G.vnode!=null&&G.vnode(o),o}function ku(){return{current:null}}function ne(e){return e.children}function gt(e,t){this.props=e,this.context=t}function ur(e,t){if(t==null)return e.__?ur(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ur(e):null}function Ya(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Ya(e)}}function lo(e){(!e.__d&&(e.__d=!0)&&rr.push(e)&&!ai.__r++||ps!==G.debounceRendering)&&((ps=G.debounceRendering)||Ha)(ai)}function ai(){for(var e;ai.__r=rr.length;)e=rr.sort(function(t,n){return t.__v.__b-n.__v.__b}),rr=[],e.some(function(t){var n,r,i,o,s,a;t.__d&&(s=(o=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=Ft({},o)).__v=o.__v+1,Lo(a,o,i,n.__n,a.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s==null?ur(o):s,o.__h),Xa(r,o),o.__e!=s&&Ya(o)))})}function Wa(e,t,n,r,i,o,s,a,l,u){var c,d,f,p,m,v,g,_=r&&r.__k||To,b=_.length;for(n.__k=[],c=0;c<t.length;c++)if((p=n.__k[c]=(p=t[c])==null||typeof p=="boolean"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?ir(null,p,null,null,p):Array.isArray(p)?ir(ne,{children:p},null,null,null):p.__b>0?ir(p.type,p.props,p.key,null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[c])===null||f&&p.key==f.key&&p.type===f.type)_[c]=void 0;else for(d=0;d<b;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}Lo(e,p,f=f||si,i,o,s,a,l,u),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m!=null?(v==null&&(v=m),typeof p.type=="function"&&p.__k!=null&&p.__k===f.__k?p.__d=l=qa(p,l,e):l=Za(e,p,f,_,m,l),u||n.type!=="option"?typeof n.type=="function"&&(n.__d=l):e.value=""):l&&f.__e==l&&l.parentNode!=e&&(l=ur(f))}for(n.__e=v,c=b;c--;)_[c]!=null&&(typeof n.type=="function"&&_[c].__e!=null&&_[c].__e==n.__d&&(n.__d=ur(r,c+1)),Ka(_[c],_[c]));if(g)for(c=0;c<g.length;c++)Ja(g[c],g[++c],g[++c])}function qa(e,t,n){var r,i;for(r=0;r<e.__k.length;r++)(i=e.__k[r])&&(i.__=e,t=typeof i.type=="function"?qa(i,t,n):Za(n,i,i,e.__k,i.__e,t));return t}function _t(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){_t(n,t)}):t.push(e)),t}function Za(e,t,n,r,i,o){var s,a,l;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return s!==void 0?s:i.nextSibling}function Su(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||li(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||li(e,o,t[o],n[o],r)}function ms(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||Au.test(t)?n:n+"px"}function li(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ms(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ms(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?_s:gs,o):e.removeEventListener(t,o?_s:gs,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function gs(e){this.l[e.type+!1](G.event?G.event(e):e)}function _s(e){this.l[e.type+!0](G.event?G.event(e):e)}function Lo(e,t,n,r,i,o,s,a,l){var u,c,d,f,p,m,v,g,_,b,x,w=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(u=G.__b)&&u(t);try{e:if(typeof w=="function"){if(g=t.props,_=(u=w.contextType)&&r[u.__c],b=u?_?_.props.value:u.__:r,n.__c?v=(c=t.__c=n.__c).__=c.__E:("prototype"in w&&w.prototype.render?t.__c=c=new w(g,b):(t.__c=c=new gt(g,b),c.constructor=w,c.render=Cu),_&&_.sub(c),c.props=g,c.state||(c.state={}),c.context=b,c.__n=r,d=c.__d=!0,c.__h=[]),c.__s==null&&(c.__s=c.state),w.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ft({},c.__s)),Ft(c.__s,w.getDerivedStateFromProps(g,c.__s))),f=c.props,p=c.state,d)w.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(g,b),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(g,c.__s,b)===!1||t.__v===n.__v){c.props=g,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(g,c.__s,b),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(f,p,m)})}c.context=b,c.props=g,c.state=c.__s,(u=G.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=e,u=c.render(c.props,c.state,c.context),c.state=c.__s,c.getChildContext!=null&&(r=Ft(Ft({},r),c.getChildContext())),d||c.getSnapshotBeforeUpdate==null||(m=c.getSnapshotBeforeUpdate(f,p)),x=u!=null&&u.type===ne&&u.key==null?u.props.children:u,Wa(e,Array.isArray(x)?x:[x],t,n,r,i,o,s,a,l),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),v&&(c.__E=c.__=null),c.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Eu(n.__e,t,n,r,i,o,s,l);(u=G.diffed)&&u(t)}catch(A){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),G.__e(A,t,n)}}function Xa(e,t){G.__c&&G.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){G.__e(r,n.__v)}})}function Eu(e,t,n,r,i,o,s,a){var l,u,c,d,f=n.props,p=t.props,m=t.type,v=0;if(m==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((l=o[v])&&(l===e||(m?l.localName==m:l.nodeType==3))){e=l,o[v]=null;break}}if(e==null){if(m===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,p.is&&p),o=null,a=!1}if(m===null)f===p||a&&e.data===p||(e.data=p);else{if(o=o&&To.slice.call(e.childNodes),u=(f=n.props||si).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},d=0;d<e.attributes.length;d++)f[e.attributes[d].name]=e.attributes[d].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(Su(e,p,f,i,a),c)t.__k=[];else if(v=t.props.children,Wa(e,Array.isArray(v)?v:[v],t,n,r,i&&m!=="foreignObject",o,s,e.firstChild,a),o!=null)for(v=o.length;v--;)o[v]!=null&&Ga(o[v]);a||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||m==="progress"&&!v)&&li(e,"value",v,f.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&li(e,"checked",v,f.checked,!1))}return e}function Ja(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){G.__e(r,n)}}function Ka(e,t,n){var r,i,o;if(G.unmount&&G.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ja(r,null,t)),n||typeof e.type=="function"||(n=(i=e.__e)!=null),e.__e=e.__d=void 0,(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){G.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Ka(r[o],t,n);i!=null&&Ga(i)}function Cu(e,t,n){return this.constructor(e,n)}function Rn(e,t,n){var r,i,o;G.__&&G.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],Lo(t,e=(!r&&n||t).__k=h(ne,null,[e]),i||si,si,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?To.slice.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Xa(o,e)}function Qa(e,t){Rn(e,t,Qa)}function el(e,t,n){var r,i,o,s=arguments,a=Ft({},e.props);for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(s[o]);return n!=null&&(a.children=n),ir(e.type,a,r||e.key,i||e.ref,null)}function pn(e,t){var n={__c:t="__cC"+Ua++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(lo)},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}G={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(o){e=o}throw e},__v:0},gt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state),typeof e=="function"&&(e=e(Ft({},n),this.props)),e&&Ft(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),lo(this))},gt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),lo(this))},gt.prototype.render=ne,rr=[],Ha=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ai.__r=0,Ua=0;var Iu={};function tl(e,t){for(var n in t)e[n]=t[n];return e}function nl(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),o={},s;if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var u=a[l].split("=");o[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}e=co(e.replace(r,"")),t=co(t||"");for(var c=Math.max(e.length,t.length),d=0;d<c;d++)if(t[d]&&t[d].charAt(0)===":"){var f=t[d].replace(/(^:|[+*?]+$)/g,""),p=(t[d].match(/[+*?]+$/)||Iu)[0]||"",m=~p.indexOf("+"),v=~p.indexOf("*"),g=e[d]||"";if(!g&&!v&&(p.indexOf("?")<0||m)){s=!1;break}if(o[f]=decodeURIComponent(g),m||v){o[f]=e.slice(d).map(decodeURIComponent).join("/");break}}else if(t[d]!==e[d]){s=!1;break}return n.default!==!0&&s===!1?!1:o}function Mu(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function Ou(e,t){return e.index=t,e.rank=Lu(e),e.props}function co(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function Nu(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function Tu(e){return co(e).map(Nu).join("")}function Lu(e){return e.props.default?0:Tu(e.props.path)}var rt=null,rn=[],uo=[],Ru={};function Pu(e,t){t===void 0&&(t="push"),rt&&rt[t]?rt[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function Pn(){var e;return rt&&rt.location?e=rt.location:rt&&rt.getCurrentLocation?e=rt.getCurrentLocation():e=typeof location!="undefined"?location:Ru,""+(e.pathname||"")+(e.search||"")}function Jt(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),$u(e)&&Pu(e,t?"replace":"push"),rl(e)}function $u(e){for(var t=rn.length;t--;)if(rn[t].canRoute(e))return!0;return!1}function rl(e){for(var t=!1,n=0;n<rn.length;n++)rn[n].routeTo(e)===!0&&(t=!0);for(var r=uo.length;r--;)uo[r](e);return t}function il(e){if(!(!e||!e.getAttribute)){var t=e.getAttribute("href"),n=e.getAttribute("target");if(!(!t||!t.match(/^\//g)||n&&!n.match(/^_?self$/i)))return Jt(t)}}function Du(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return il(e.currentTarget||e.target||this),ol(e)}function ol(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function Bu(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0)){var t=e.target;do if(String(t.nodeName).toUpperCase()==="A"&&t.getAttribute("href")){if(t.hasAttribute("native"))return;if(il(t))return ol(e)}while(t=t.parentNode)}}var vs=!1;function Fu(){vs||(typeof addEventListener=="function"&&(rt||addEventListener("popstate",function(){rl(Pn())}),addEventListener("click",Bu)),vs=!0)}var jt=function(e){function t(n){e.call(this,n),n.history&&(rt=n.history),this.state={url:n.url||Pn()},Fu()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(r){return r.static!==!0?!0:r.url!==this.props.url||r.onChange!==this.props.onChange},t.prototype.canRoute=function(r){var i=_t(this.props.children);return this.getMatchingChildren(i,r,!1).length>0},t.prototype.routeTo=function(r){this.setState({url:r});var i=this.canRoute(r);return this.updating||this.forceUpdate(),i},t.prototype.componentWillMount=function(){rn.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;rt&&(this.unlisten=rt.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),rn.splice(rn.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,o){return r.filter(Ou).sort(Mu).map(function(s){var a=nl(i,s.props.path,s.props);if(a){if(o!==!1){var l={url:i,matches:a};return tl(l,a),delete l.ref,delete l.key,el(s,l)}return s}}).filter(Boolean)},t.prototype.render=function(r,i){var o=r.children,s=r.onChange,a=i.url,l=this.getMatchingChildren(_t(o),a,!0),u=l[0]||null,c=this.previousUrl;return a!==c&&(this.previousUrl=a,typeof s=="function"&&s({router:this,url:a,previous:c,active:l,current:u})),u},t}(gt),sl=function(e){return h("a",tl({onClick:Du},e))},zu=function(e){return h(e.component,e)};jt.subscribers=uo;jt.getCurrentUrl=Pn;jt.route=Jt;jt.Router=jt;jt.Route=zu;jt.Link=sl;jt.exec=nl;var _e;(e=>{const t="Site",n="Generator";function l(y,k,L){ga("send","event",y,k,L)}function u(y,k){ga("set",`dimension${y}`,k)}function c(y){ga("set","page",y),ga("send","pageview")}e.pageview=c;function d(y,k){l(n,y,k)}e.generatorEvent=d;function f(y){return y==="menu"?"Menu":"Hotkey"}function p(y){u(4,y),gtag("set",{locale:y})}e.setLocale=p;function m(y,k){p(k),l(t,"set-language",k),gtag("event","change_locale",{prev_locale:y})}e.changeLocale=m;function v(y){u(1,y),gtag("set",{theme:y})}e.setTheme=v;function g(y,k){v(k),l(t,"set-theme",k),gtag("event","change_theme",{prev_theme:y})}e.changeTheme=g;function _(y){u(3,y),gtag("set",{version:y})}e.setVersion=_;function b(y){gtag("set",{selected_version:y})}e.setSelectedVersion=b;function x(y,k){_(k),l(n,"set-version",k),gtag("event","change_version",{prev_version:y})}e.changeVersion=x;function w(y){u(6,y),gtag("event","use_generator",{file_type:y})}e.setGenerator=w;function A(y){u(7,y),gtag("set",{prefers_color_scheme:y})}e.setPrefersColorScheme=A;function E(y,k,L){l(n,"reset"),gtag("event","reset_generator",{file_type:y,history:k,method:L})}e.resetGenerator=E;function C(y,k,L){l(n,"undo",f(L)),gtag("event","undo_generator",{file_type:y,history:k,method:L})}e.undoGenerator=C;function S(y,k,L){l(n,"undo",f(L)),gtag("event","redo_generator",{file_type:y,history:k,method:L})}e.redoGenerator=S;function I(y,k,L,z){l(n,"save-project-file",f(z)),gtag("event","save_project_file",{file_type:y,project_size:k,projects_count:L,method:z})}e.saveProjectFile=I;function O(y,k){l(n,"load-preset",k),gtag("event","load_generator_preset",{file_type:y,file_name:k})}e.loadPreset=O;function R(y,k){gtag("event","open_generator_preset",{file_type:y,file_name:k})}e.openPreset=R;function F(y,k,L,z,Y,ue){gtag("event","create_generator_snippet",{file_type:y,snippet_id:k,version:L,data_size:z,compressed_size:Y,compression_rate:ue})}e.createSnippet=F;function j(y,k,L){gtag("event","open_generator_snippet",{file_type:y,snippet_id:k,version:L})}e.openSnippet=j;function oe(y,k){l(n,"copy"),gtag("event","copy_generator_output",{file_type:y,method:k})}e.copyOutput=oe;function le(y,k){l(n,"download"),gtag("event","download_generator_output",{file_type:y,method:k})}e.downloadOutput=le;function N(y,k){l(n,"toggle-output","visible"),gtag("event","show_generator_output",{file_type:y,method:k})}e.showOutput=N;function $(y,k){l(n,"toggle-output","hidden"),gtag("event","hide_generator_output",{file_type:y,method:k})}e.hideOutput=$;function H(y,k){l(n,"toggle-preview","visible"),gtag("event","show_generator_preview",{file_type:y,method:k})}e.showPreview=H;function T(y,k){l(n,"toggle-preview","hidden"),gtag("event","hide_generator_preview",{file_type:y,method:k})}e.hidePreview=T})(_e||(_e={}));var mn,ze,ws,$n=0,ho=[],ys=G.__b,bs=G.__r,xs=G.diffed,As=G.__c,ks=G.unmount;function Un(e,t){G.__h&&G.__h(ze,e,$n||t),$n=0;var n=ze.__H||(ze.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function D(e){return $n=1,al(ul,e)}function al(e,t,n){var r=Un(mn++,2);return r.t=e,r.__c||(r.__=[n?n(t):ul(void 0,t),function(i){var o=r.t(r.__[0],i);r.__[0]!==o&&(r.__=[o,r.__[1]],r.__c.setState({}))}],r.__c=ze),r.__}function Q(e,t){var n=Un(mn++,3);!G.__s&&Ro(n.__H,t)&&(n.__=e,n.__H=t,ze.__H.__h.push(n))}function ll(e,t){var n=Un(mn++,4);!G.__s&&Ro(n.__H,t)&&(n.__=e,n.__H=t,ze.__h.push(n))}function me(e){return $n=5,xe(function(){return{current:e}},[])}function ju(e,t,n){$n=6,ll(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function xe(e,t){var n=Un(mn++,7);return Ro(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ce(e,t){return $n=8,xe(function(){return e},t)}function gn(e){var t=ze.context[e.__c],n=Un(mn++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(ze)),t.props.value):e.__}function Vu(e,t){G.useDebugValue&&G.useDebugValue(t?t(e):e)}function cl(e){var t=Un(mn++,10),n=D();return t.__=e,ze.componentDidCatch||(ze.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Hu(){ho.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(qr),e.__H.__h.forEach(fo),e.__H.__h=[]}catch(t){e.__H.__h=[],G.__e(t,e.__v)}}),ho=[]}G.__b=function(e){ze=null,ys&&ys(e)},G.__r=function(e){bs&&bs(e),mn=0;var t=(ze=e.__c).__H;t&&(t.__h.forEach(qr),t.__h.forEach(fo),t.__h=[])},G.diffed=function(e){xs&&xs(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(ho.push(t)!==1&&ws===G.requestAnimationFrame||((ws=G.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(o),Ss&&cancelAnimationFrame(r),setTimeout(n)},o=setTimeout(i,100);Ss&&(r=requestAnimationFrame(i))})(Hu)),ze=void 0},G.__c=function(e,t){t.some(function(n){try{n.__h.forEach(qr),n.__h=n.__h.filter(function(r){return!r.__||fo(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],G.__e(r,n.__v)}}),As&&As(e,t)},G.unmount=function(e){ks&&ks(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(qr)}catch(n){G.__e(n,t.__v)}};var Ss=typeof requestAnimationFrame=="function";function qr(e){var t=ze;typeof e.__c=="function"&&e.__c(),ze=t}function fo(e){var t=ze;e.__c=e.__(),ze=t}function Ro(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ul(e,t){return typeof t=="function"?t(e):t}function Ar({type:e,id:t}){return Q(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&&ethicalads.load()},[]),h("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function K({icon:e,label:t,active:n,class:r,tooltip:i,tooltipLoc:o,onClick:s}){return h("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${o!=null?o:"sw"}`:""}${n?" tip-shown":""}`,onClick:s,"aria-label":i},e&&te[e],t&&h("span",null,t))}var Fr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function dl(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var M={},Mt={},St={};Object.defineProperty(St,"__esModule",{value:!0});St.ModelPath=St.Path=St.relativePath=void 0;function Uu(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}St.relativePath=Uu;class Rt{constructor(t,n){this.modelArr=t!=null?t:[],this.contextArr=n!=null?n:[]}last(){return this.modelArr[this.modelArr.length-1]}slice(t,n){return new Rt(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Rt(this.modelArr.slice(1),this.contextArr)}pop(){return new Rt(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Rt([...this.modelArr,t],[...this.contextArr])}contextPush(t){if(typeof t=="number")return this.copy();const n=t.startsWith("minecraft:")?t.slice(10):t;return new Rt([...this.modelArr],[...this.contextArr,n])}copy(){return new Rt([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Pt(t,this)}getContext(){return this.contextArr}equals(t){return t.modelArr.length===this.modelArr.length&&t.modelArr.every((n,r)=>n===this.modelArr[r])}startsWith(t){return this.modelArr.length<t.modelArr.length?!1:t.modelArr.every((n,r)=>n===this.modelArr[r])}endsWith(t){const n=this.modelArr.length-t.modelArr.length;return n<0?!1:t.modelArr.every((r,i)=>r===this.modelArr[n+i])}toString(){return this.modelArr.map(t=>typeof t=="string"?`.${t}`:`[${t}]`).join("").replace(/^\./,"")}forEach(t,n){return this.modelArr.forEach(t,n)}}St.Path=Rt;class Pt extends Rt{constructor(t,n){super(n==null?void 0:n.modelArr,n==null?void 0:n.contextArr),this.model=t}getModel(){return this.model}get(){var t;return(t=this.model)===null||t===void 0?void 0:t.get(this)}set(t){var n;(n=this.model)===null||n===void 0||n.set(this,t)}slice(t,n){return new Pt(this.model,super.slice(t,n))}shift(){return new Pt(this.model,super.shift())}pop(){return new Pt(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Pt(this.model,super.modelPush(t))}contextPush(t){return new Pt(this.model,super.contextPush(t))}copy(){return new Pt(this.model,super.copy())}}St.ModelPath=Pt;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.Errors=void 0;class Gu{constructor(){this.errors=[]}add(t,n,...r){return this.errors.push({path:t,error:n,params:r}),!1}get(t,n=!1){return n?this.errors.filter(r=>r.path.equals(t)):this.errors.filter(r=>r.path.startsWith(t))}getAll(){return this.errors}clear(){this.errors=[]}count(){return this.errors.length}*[Symbol.iterator](){for(const t of this.errors)yield t}}Gn.Errors=Gu;var Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.hexId=Et.quoteString=Et.escapeString=void 0;function hl(e){return e.replace(/(\\|")/g,"\\$1")}Et.escapeString=hl;function Yu(e){return`"${hl(e)}"`}Et.quoteString=Yu;const Wu=e=>("0"+e.toString(16)).substr(-2);function qu(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Wu).join("")}Et.hexId=qu;Object.defineProperty(Mt,"__esModule",{value:!0});Mt.DataModel=void 0;const Zu=St,Es=Gn,qi=Et;class Po{constructor(t,n){var r,i,o,s;this.historyMax=(r=n==null?void 0:n.historyMax)!==null&&r!==void 0?r:50,this.verbose=(i=n==null?void 0:n.verbose)!==null&&i!==void 0?i:!1,this.wrapLists=(o=n==null?void 0:n.wrapLists)!==null&&o!==void 0?o:!1,this.schema=t;const a=(s=n==null?void 0:n.initialData)!==null&&s!==void 0?s:t.default();this.data=this.wrapLists?Po.wrapLists(a):a,this.listeners=[],this.errors=new Es.Errors,this.history=[JSON.stringify(this.data)],this.historyIndex=0}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n>-1&&this.listeners.splice(n,1)}invalidate(){const t=JSON.stringify(this.data);this.history[this.historyIndex]!==t&&(this.historyIndex+=1,this.history.splice(this.historyIndex,this.historyMax,t),this.history.length>this.historyMax&&(this.history.splice(0,1),this.historyIndex-=1)),this.silentInvalidate()}silentInvalidate(){this.listeners.forEach(t=>{t.invalidated&&t.invalidated(this),t.errors&&t.errors(this.errors)})}reset(t,n){this.data=t,this.validate(n),this.invalidate()}get(t){let n=this.data;return t.forEach(r=>{if(n===void 0)return n;this.wrapLists&&typeof r=="number"?n=n[r].node:n=n[r]}),n}set(t,n,r){if(t.getArray().length===0){this.reset(n,!0);return}let i=this.data;t.pop().forEach(o=>{(i[o]===void 0||typeof i[o]=="string"||typeof i[o]=="number")&&(this.wrapLists&&typeof o=="number"?i[o]={node:{},id:(0,qi.hexId)()}:i[o]={}),this.wrapLists&&typeof o=="number"?i=i[o].node:i=i[o]}),i!==null&&(n===void 0||typeof n=="number"&&isNaN(n)?typeof t.last()=="number"?i.splice(t.last(),1):delete i[t.last()]:this.wrapLists&&typeof t.last()=="number"?i[t.last()]={node:n,id:(0,qi.hexId)()}:i[t.last()]=n,!r&&(this.verbose&&console.log("Set",t.toString(),JSON.stringify(n)),this.validate(!0),this.invalidate()))}undo(){this.historyIndex>0&&(this.historyIndex-=1,this.data=JSON.parse(this.history[this.historyIndex]),this.validate(!1),this.silentInvalidate())}redo(){this.historyIndex<this.history.length-1&&(this.historyIndex+=1,this.data=JSON.parse(this.history[this.historyIndex]),this.validate(!1),this.silentInvalidate())}validate(t){var n;const r=new Zu.Path().withModel(this);this.errors.clear(),this.data=(n=this.schema.validate(r,this.data,this.errors,{loose:t,wrapLists:this.wrapLists}))!==null&&n!==void 0?n:{}}error(t,n,...r){const i=new Es.Errors;i.add(t,n,r),this.listeners.forEach(o=>{o.errors&&o.errors(i)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(r=>({node:this.wrapLists(r),id:(0,qi.hexId)()}));for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else if(typeof t=="object"&&t!==null){const n={};Object.entries(t).map(([r,i])=>{n[r]=this.wrapLists(i)});for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else return t}static unwrapLists(t){if(Array.isArray(t)){const n=t.map(r=>this.unwrapLists(r.node));for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else if(typeof t=="object"&&t!==null){const n={};Object.entries(t).map(([r,i])=>{n[r]=this.unwrapLists(i)});for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else return t}}Mt.DataModel=Po;var Yt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:o=>o,suggest:()=>[],validate:(o,s)=>s,validationOption:()=>{},hook(o,s,...a){return o.base({node:this},s,...a)},canUpdate:()=>!1,update:()=>[]};const t=(o,s)=>Z(Z({},o),typeof s=="function"?s(o):s);e.Mod=t;const n=(o,s)=>(0,e.Mod)(s,{enabled:a=>a.push(o).get()!==void 0});e.Has=n;function r(o){return ge(Z({},o),{optional:()=>!0})}e.Opt=r;function i(o){return ge(Z({},o),{keep:()=>!0})}e.Keep=i})(Yt);var Ei={};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.BooleanNode=void 0;const Xu=Mt,Ju=Yt,Ku=()=>ge(Z({},Ju.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?Xu.DataModel.wrapLists(this.default()):this.default()),(typeof t!="boolean"||t===void 0)&&n.add(e,"error.expected_boolean"),t},hook(e,t,...n){var r;return((r=e.boolean)!==null&&r!==void 0?r:e.base).call(e,{node:this},t,...n)}});Ei.BooleanNode=Ku;var fl={},kr={};Object.defineProperty(kr,"__esModule",{value:!0});kr.ListNode=void 0;const Qu=Mt,ed=Yt,td=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,o=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,s=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return ge(Z({},ed.Base),{type:()=>"list",default:()=>t!=null&&t.minLength?[...Array(i)].map(a=>e.default()):[],navigate(a,l){const u=l+1;return a.getArray().length<=u?this:e.navigate(a,u)},pathPush(a,l){return a.push(parseInt(l.toString())).contextPush("entry")},validate(a,l,u,c){if(c.loose&&!Array.isArray(l)&&(l=c.wrapLists?Qu.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))s&&(l.length<i||l.length>o)?i===o?u.add(a,"error.invalid_list_range.exact",l.length,i):u.add(a,"error.invalid_list_range.between",l.length,i,o):l.length<i?u.add(a,"error.invalid_list_range.smaller",l.length,i):l.length>o&&u.add(a,"error.invalid_list_range.larger",l.length,o);else return u.add(a,"error.expected_list"),l;const d=l.map((f,p)=>{const m=e.validate(a.push(p),c.wrapLists?f.node:f,u,c);return c.wrapLists?{node:m,id:f.id}:m});for(const f of Object.getOwnPropertySymbols(l))d[f]=l[f];return d},hook(a,l,...u){var c;return((c=a.list)!==null&&c!==void 0?c:a.base).call(a,{node:this,children:e,config:t!=null?t:{}},l,...u)}})};kr.ListNode=td;var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.SwitchNode=void 0;const nd=Yt,rd=e=>ge(Z({},nd.Base),{type(t){return this.activeCase(t,!0).node.type(t)},category(t){return this.activeCase(t,!0).node.category(t)},default:()=>e[0].node.default(),navigate(t,n){var r;const i=n+1;return(r=this.activeCase(t.slice(0,i)))===null||r===void 0?void 0:r.node.navigate(t,n)},pathPush(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.pathPush(t,n))!==null&&i!==void 0?i:t},suggest(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.suggest(t,n))!==null&&i!==void 0?i:e.filter(o=>o.match(t)).map(o=>o.node.suggest(t,n)).reduce((o,s)=>o.concat(s))},validate(t,n,r,i){let o=this.activeCase(t);return o===void 0?n:o.node.validate(t,n,r,i)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const r=(o,s)=>{var a,l;return((a=s.priority)!==null&&a!==void 0?a:0)-((l=o.priority)!==null&&l!==void 0?l:0)},i=e.filter(o=>o.match(t)).sort(r);return n&&i.length===0?e.sort(r)[0]:i.length>0?i[0]:void 0},hook(t,n,...r){return this.activeCase(n,!0).node.hook(t,n,...r)}});Sr.SwitchNode=rd;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=kr,n=Sr,r=(s,a)=>{const l=(c,d)=>{if(c.match)return c.match(d);switch(c.type){case"list":return Array.isArray(d);case"object":return typeof d=="object"&&!Array.isArray(d);default:return typeof d===c.type}},u=(0,n.SwitchNode)(s.map(c=>({type:c.type,priority:c.priority,match:d=>l(c,d.get()),node:c.node})));return ge(Z({},u),{validate(c,d,f,p){let m=u.activeCase(c,!0);return m.node.optional()?d:m.node.validate(c,d,f,p)},hook(c,d,...f){var p;return((p=c.choice)!==null&&p!==void 0?p:c.base).call(c,{node:this,choices:s,config:a!=null?a:{},switchNode:u},d,...f)}})};e.ChoiceNode=r;const i=s=>(a,l)=>(0,e.ChoiceNode)([{type:s,node:a,change:u=>{var c;return(c=u[0])!==null&&c!==void 0?c:a.default()}},{type:"list",node:(0,t.ListNode)(a),change:u=>u?[u]:[]}],l);e.ObjectOrList=i("object"),e.StringOrList=i("string");const o=(s,a,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:s,change:u=>Object.keys(l)[0]},{type:"object",node:a,change:u=>{var c;return(c=l[u])!==null&&c!==void 0?c:l[Object.keys(l)[0]]}}]);e.ObjectOrPreset=o})(fl);var Ci={};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.MapNode=void 0;const id=Yt,od=Mt,sd=(e,t,n)=>ge(Z({},id.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const o=i+1;return r.getArray().length<=o?this:t.navigate(r,o)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,o,s){if(s.loose&&typeof i!="object"&&(i=s.wrapLists?od.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return o.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(l=>{e.validate(r,l,o,s),a[l]=t.validate(r.push(l),i[l],o,s)});for(const l of Object.getOwnPropertySymbols(i))a[l]=i[l];return a},validationOption(r){var i;return(i=n==null?void 0:n.validation)!==null&&i!==void 0?i:e.validationOption(r.push(""))},hook(r,i,...o){var s;return((s=r.map)!==null&&s!==void 0?s:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...o)}});Ci.MapNode=sd;var pl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=M,n=Mt,r=Yt,i=s=>{var a,l,u;const c=s!=null&&s.color?!0:(a=s==null?void 0:s.integer)!==null&&a!==void 0?a:!1,d=s!=null&&s.color?0:(l=s==null?void 0:s.min)!==null&&l!==void 0?l:-1/0,f=s!=null&&s.color?16777215:(u=s==null?void 0:s.max)!==null&&u!==void 0?u:1/0,p=(s==null?void 0:s.min)!==void 0&&(s==null?void 0:s.max)!==void 0;return ge(Z({},r.Base),{type:()=>"number",default:()=>d>0?d:0,validate(m,v,g,_){return _.loose&&typeof v!="number"&&(v=_.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof v!="number"?g.add(m,"error.expected_number"):c&&!Number.isInteger(v)?g.add(m,"error.expected_integer"):p&&(v<d||v>f)?g.add(m,"error.invalid_number_range.between",v,d,f):v<d?g.add(m,"error.invalid_number_range.smaller",v,d):v>f&&g.add(m,"error.invalid_number_range.larger",v,f),v},hook(m,v,...g){var _;return((_=m.number)!==null&&_!==void 0?_:m.base).call(m,{node:this,integer:c,min:d,max:f,between:p,config:s!=null?s:{}},v,...g)}})};e.NumberNode=i;const o=({integer:s,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:s}),l=>({validate:(u,c,d,f)=>(c=l.validate(u,c,d,f),a.includes(c)||d.add(u,"error.invalid_number_enum",a.join(", ")),c)}));e.NumberEnum=o})(pl);var ml={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=Yt,n=St,r=Gn,i=Et,o=Mt;e.Switch=Symbol("switch"),e.Case=Symbol("case");const s=(a,l)=>{var m,v;const g=a,{[m=e.Switch]:u,[v=e.Case]:c}=g,d=fs(g,[Wi(m),Wi(v)]),f=_=>{if(u===void 0)return d;const b=(0,n.relativePath)(_,u).get(),x=c[b];return Z(Z({},d),x)},p=(_,b)=>{var x;const w=u?(0,n.relativePath)(_,u).get():void 0,A=u?(x=c[w])!==null&&x!==void 0?x:{}:{},E=Object.keys(A),C=l!=null&&l.context?new n.ModelPath(_.getModel(),new n.Path(_.getArray(),[l.context])):_;return(!(l!=null&&l.disableSwitchContext)&&w&&E.includes(b)?C.contextPush(w):C).push(b)};return ge(Z({},t.Base),{type:()=>"object",category:()=>l==null?void 0:l.category,default:()=>({}),keep(){return this.optional()},navigate(_,b){const x=b+1,w=_.getArray();if(w.length<=x)return this;const E=f(_.slice(0,x))[w[x]];return E==null?void 0:E.navigate(_,x)},pathPush(_,b){return p(_,b.toString())},suggest(_,b){const x=f(_),w=Object.keys(typeof b=="object"?b:{});return Object.keys(x).filter(A=>x[A].enabled(_)).filter(A=>!w.includes(A)).map(i.quoteString)},validate(_,b,x,w){if(w.loose&&typeof b!="object"&&(b=w.wrapLists?o.DataModel.wrapLists(this.default()):this.default()),typeof b!="object"||b===null)return x.add(_,"error.expected_object"),b;let A=d;if(u){const O=(0,n.relativePath)(_,u);let R=O.get();if(_.equals(O.pop())){const F=O.last();R=d[F].validate(_.push(F),b[F],new r.Errors,w)}A=Z(Z({},A),c[R])}const E=Object.keys(A),C=E.filter(O=>!A[O].optional()),S=new Set([...C,...Object.keys(b)]),I={};S.forEach(O=>{if(E.includes(O)){if(!A[O].enabled(_))return;const R=A[O].validate(_.push(O),b[O],x,w);!A[O].keep()&&A[O].optional()&&(R===void 0||Array.isArray(R)&&R.length===0||R.constructor===Object&&Object.keys(R).length===0)?delete I[O]:(I[O]=R,_.getModel().set(_.push(O),R,!0))}else I[O]=b[O]});for(const O of Object.getOwnPropertySymbols(b))I[O]=b[O];return I},hook(_,b,...x){var w;return((w=_.object)!==null&&w!==void 0?w:_.base).call(_,{node:this,fields:d,config:l!=null?l:{},filter:u,cases:c,getActiveFields:f,getChildModelPath:p},b,...x)}})};e.ObjectNode=s})(ml);var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.Reference=void 0;const ad=(e,t)=>({type(n){return e.get(t).type.bind(this)(n)},category(n){return e.get(t).category.bind(this)(n)},default(){return e.get(t).default.bind(this)()},transform(n,r){return e.get(t).transform(n,r)},enabled(n){return e.get(t).enabled.bind(this)(n)},keep(){return e.get(t).keep.bind(this)()},optional(){return e.get(t).optional.bind(this)()},navigate(n,r){return e.get(t).navigate.bind(this)(n,r)},pathPush(n,r){return e.get(t).pathPush.bind(this)(n,r)},suggest(n,r){return e.get(t).suggest.bind(this)(n,r)},validate(n,r,i,o){return e.get(t).validate.bind(this)(n,r,i,o)},validationOption(n){return e.get(t).validationOption.bind(this)(n)},hook(n,r,...i){return e.get(t).hook.bind(this)(n,r,...i)},activeCase(n,r){return e.get(t).activeCase.bind(this)(n,r)},canUpdate(n,r){return e.get(t).canUpdate.bind(this)(n,r)},update(n,r){return e.get(t).update.bind(this)(n,r)}});Ii.Reference=ad;var Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.StringNode=void 0;const ld=Yt,cd=Et,ud=Mt,Cs=e=>!!(e!=null&&e.enum),Is=e=>!!(e!=null&&e.validator),dd=(e,t)=>{const n=()=>{var r,i,o,s;if(Cs(t))return typeof t.enum=="string"?(r=e==null?void 0:e.get(t.enum))!==null&&r!==void 0?r:[]:t.enum;if((t==null?void 0:t.validator)==="resource"){if(typeof t.params.pool=="string"){if(t.params.requireTag)return(i=e==null?void 0:e.get(`tag/${t.params.pool}`).map(l=>`#${l}`))!==null&&i!==void 0?i:[];const a=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag?(o=e==null?void 0:e.get(`tag/${a}`).map(l=>`#${l}`))!==null&&o!==void 0?o:[]:[],...(s=e==null?void 0:e.get(a))!==null&&s!==void 0?s:[]]}return t.params.pool}return[]};return ge(Z({},ld.Base),{type:()=>"string",default:()=>"",validate(r,i,o,s){if(s.loose&&typeof i!="string"&&(i=(s.wrapLists?ud.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return o.add(r,"error.expected_string"),i;if(Is(t)){if(t.validator==="resource"&&i.length>0&&!i.includes(":")&&(i=i.startsWith("#")?"#minecraft:"+i.slice(1):"minecraft:"+i),t.validator==="resource"&&typeof i=="string"){let l=i;if(i.startsWith("#")){if(typeof t.params.pool=="string"&&t.params.pool.startsWith("$tag/"))return o.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return o.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return o.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return o.add(r,"error.invalid_resource_location"),i}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&i.startsWith("#")||typeof i=="string"&&i.includes(":")&&!i.startsWith("minecraft:")||t.params.isDefinition||t.params.allowUnknown))return i}if(Cs(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&o.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(cd.quoteString),validationOption(){return Is(t)?t:void 0},hook(r,i,...o){var s;return((s=r.string)!==null&&s!==void 0?s:r.base).call(r,{node:this,getValues:n,config:t},i,...o)}})};Mi.StringNode=dd;var gl={};Object.defineProperty(gl,"__esModule",{value:!0});var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.CollectionRegistry=Dn.SchemaRegistry=void 0;class hd{constructor(){this.registry={}}register(t,n){this.registry[t]=n}get(t){const n=this.registry[t];return n===void 0&&console.error(`Tried to access schema "${t}", but that doesn't exist.`),n}}Dn.SchemaRegistry=hd;class fd{constructor(){this.registry={}}register(t,n){this.registry[t]=n}get(t){const n=this.registry[t];return n===void 0&&console.warn(`Tried to access collection "${t}", but that doesn't exist.`),n!=null?n:[]}}Dn.CollectionRegistry=fd;var _l={};Object.defineProperty(_l,"__esModule",{value:!0});(function(e){var t=Fr&&Fr.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=Fr&&Fr.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Mt,e),n(St,e),n(Gn,e),n(Yt,e),n(Ei,e),n(fl,e),n(kr,e),n(Ci,e),n(pl,e),n(ml,e),n(Ii,e),n(Mi,e),n(Sr,e),n(gl,e),n(Dn,e),n(_l,e)})(M);var Oe={},Er={},dt={};function vl(e){return typeof e=="undefined"||e===null}function pd(e){return typeof e=="object"&&e!==null}function md(e){return Array.isArray(e)?e:vl(e)?[]:[e]}function gd(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}function _d(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function vd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}dt.isNothing=vl;dt.isObject=pd;dt.toArray=md;dt.repeat=_d;dt.isNegativeZero=vd;dt.extend=gd;function dr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}dr.prototype=Object.create(Error.prototype);dr.prototype.constructor=dr;dr.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var Cr=dr,Ms=dt;function $o(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}$o.prototype.getSnippet=function(t,n){var r,i,o,s,a;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),Ms.repeat(" ",t)+r+a+o+`
`+Ms.repeat(" ",t+this.position-i+r.length)+"^"};$o.prototype.toString=function(t){var n,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),t||(n=this.getSnippet(),n&&(r+=`:
`+n)),r};var wd=$o,Os=Cr,yd=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],bd=["scalar","sequence","mapping"];function xd(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function Ad(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(yd.indexOf(n)===-1)throw new Os('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=xd(t.styleAliases||null),bd.indexOf(this.kind)===-1)throw new Os('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Be=Ad,Ns=dt,Zr=Cr,kd=Be;function po(e,t,n){var r=[];return e.include.forEach(function(i){n=po(i,t,n)}),e[t].forEach(function(i){n.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&r.push(s)}),n.push(i)}),n.filter(function(i,o){return r.indexOf(o)===-1})}function Sd(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,n;function r(i){e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function Sn(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Zr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=po(this,"implicit",[]),this.compiledExplicit=po(this,"explicit",[]),this.compiledTypeMap=Sd(this.compiledImplicit,this.compiledExplicit)}Sn.DEFAULT=null;Sn.create=function(){var t,n;switch(arguments.length){case 1:t=Sn.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Zr("Wrong number of arguments for Schema.create function")}if(t=Ns.toArray(t),n=Ns.toArray(n),!t.every(function(r){return r instanceof Sn}))throw new Zr("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof kd}))throw new Zr("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Sn({include:t,explicit:n})};var Yn=Sn,Ed=Be,Cd=new Ed("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Id=Be,Md=new Id("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Od=Be,Nd=new Od("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Td=Yn,Do=new Td({explicit:[Cd,Md,Nd]}),Ld=Be;function Rd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Pd(){return null}function $d(e){return e===null}var Dd=new Ld("tag:yaml.org,2002:null",{kind:"scalar",resolve:Rd,construct:Pd,predicate:$d,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),Bd=Be;function Fd(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function zd(e){return e==="true"||e==="True"||e==="TRUE"}function jd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Vd=new Bd("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Fd,construct:zd,predicate:jd,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),Hd=dt,Ud=Be;function Gd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Yd(e){return 48<=e&&e<=55}function Wd(e){return 48<=e&&e<=57}function qd(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!Gd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!Yd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(i===":")break;if(!Wd(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function Zd(e){var t=e,n=1,r,i,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,i=1,o.forEach(function(s){t+=s*i,i*=60}),n*t):n*parseInt(t,10)}function Xd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Hd.isNegativeZero(e)}var Jd=new Ud("tag:yaml.org,2002:int",{kind:"scalar",resolve:qd,construct:Zd,predicate:Xd,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),wl=dt,Kd=Be,Qd=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function eh(e){return!(e===null||!Qd.test(e)||e[e.length-1]==="_")}function th(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){i.unshift(parseFloat(o,10))}),t=0,r=1,i.forEach(function(o){t+=o*r,r*=60}),n*t):n*parseFloat(t,10)}var nh=/^[-+]?[0-9]+e/;function rh(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(wl.isNegativeZero(e))return"-0.0";return n=e.toString(10),nh.test(n)?n.replace("e",".e"):n}function ih(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||wl.isNegativeZero(e))}var oh=new Kd("tag:yaml.org,2002:float",{kind:"scalar",resolve:eh,construct:th,predicate:ih,represent:rh,defaultStyle:"lowercase"}),sh=Yn,yl=new sh({include:[Do],implicit:[Dd,Vd,Jd,oh]}),ah=Yn,bl=new ah({include:[yl]}),lh=Be,xl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Al=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ch(e){return e===null?!1:xl.exec(e)!==null||Al.exec(e)!==null}function uh(e){var t,n,r,i,o,s,a,l=0,u=null,c,d,f;if(t=xl.exec(e),t===null&&(t=Al.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],d=+(t[11]||0),u=(c*60+d)*6e4,t[9]==="-"&&(u=-u)),f=new Date(Date.UTC(n,r,i,o,s,a,l)),u&&f.setTime(f.getTime()-u),f}function dh(e){return e.toISOString()}var hh=new lh("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ch,construct:uh,instanceOf:Date,represent:dh}),fh=Be;function ph(e){return e==="<<"||e===null}var mh=new fh("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ph}),nn;try{var gh=dl;nn=gh("buffer").Buffer}catch{}var _h=Be,Bo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function vh(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Bo;for(n=0;n<i;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function wh(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Bo,s=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),nn?nn.from?nn.from(a):new nn(a):a}function yh(e){var t="",n=0,r,i,o=e.length,s=Bo;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function bh(e){return nn&&nn.isBuffer(e)}var xh=new _h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vh,construct:wh,predicate:bh,represent:yh}),Ah=Be,kh=Object.prototype.hasOwnProperty,Sh=Object.prototype.toString;function Eh(e){if(e===null)return!0;var t=[],n,r,i,o,s,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,Sh.call(i)!=="[object Object]")return!1;for(o in i)if(kh.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function Ch(e){return e!==null?e:[]}var Ih=new Ah("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Eh,construct:Ch}),Mh=Be,Oh=Object.prototype.toString;function Nh(e){if(e===null)return!0;var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],Oh.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function Th(e){if(e===null)return[];var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1)r=s[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var Lh=new Mh("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Nh,construct:Th}),Rh=Be,Ph=Object.prototype.hasOwnProperty;function $h(e){if(e===null)return!0;var t,n=e;for(t in n)if(Ph.call(n,t)&&n[t]!==null)return!1;return!0}function Dh(e){return e!==null?e:{}}var Bh=new Rh("tag:yaml.org,2002:set",{kind:"mapping",resolve:$h,construct:Dh}),Fh=Yn,Ir=new Fh({include:[bl],implicit:[hh,mh],explicit:[xh,Ih,Lh,Bh]}),zh=Be;function jh(){return!0}function Vh(){}function Hh(){return""}function Uh(e){return typeof e=="undefined"}var Gh=new zh("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:jh,construct:Vh,predicate:Uh,represent:Hh}),Yh=Be;function Wh(e){if(e===null||e.length===0)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";return!(t[0]==="/"&&(n&&(r=n[1]),r.length>3||t[t.length-r.length-1]!=="/"))}function qh(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return t[0]==="/"&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function Zh(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function Xh(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Jh=new Yh("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Wh,construct:qh,predicate:Xh,represent:Zh}),ci;try{var Kh=dl;ci=Kh("esprima")}catch{typeof window!="undefined"&&(ci=window.esprima)}var Qh=Be;function ef(e){if(e===null)return!1;try{var t="("+e+")",n=ci.parse(t,{range:!0});return!(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function tf(e){var t="("+e+")",n=ci.parse(t,{range:!0}),r=[],i;if(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(o){r.push(o.name)}),i=n.body[0].expression.body.range,n.body[0].expression.body.type==="BlockStatement"?new Function(r,t.slice(i[0]+1,i[1]-1)):new Function(r,"return "+t.slice(i[0],i[1]))}function nf(e){return e.toString()}function rf(e){return Object.prototype.toString.call(e)==="[object Function]"}var of=new Qh("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:ef,construct:tf,predicate:rf,represent:nf}),Ts=Yn,Oi=Ts.DEFAULT=new Ts({include:[Ir],explicit:[Gh,Jh,of]}),Dt=dt,kl=Cr,sf=wd,Sl=Ir,af=Oi,Kt=Object.prototype.hasOwnProperty,ui=1,El=2,Cl=3,di=4,Zi=1,lf=2,Ls=3,cf=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uf=/[\x85\u2028\u2029]/,df=/[,\[\]\{\}]/,Il=/^(?:!|!!|![a-z\-]+!)$/i,Ml=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Rs(e){return Object.prototype.toString.call(e)}function Ct(e){return e===10||e===13}function on(e){return e===9||e===32}function Qe(e){return e===9||e===32||e===10||e===13}function En(e){return e===44||e===91||e===93||e===123||e===125}function hf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function ff(e){return e===120?2:e===117?4:e===85?8:0}function pf(e){return 48<=e&&e<=57?e-48:-1}function Ps(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function mf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Ol=new Array(256),Nl=new Array(256);for(var yn=0;yn<256;yn++)Ol[yn]=Ps(yn)?1:0,Nl[yn]=Ps(yn);function gf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||af,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Tl(e,t){return new kl(t,new sf(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function X(e,t){throw Tl(e,t)}function hi(e,t){e.onWarning&&e.onWarning.call(null,Tl(e,t))}var $s={YAML:function(t,n,r){var i,o,s;t.version!==null&&X(t,"duplication of %YAML directive"),r.length!==1&&X(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&X(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&X(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&hi(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&X(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Il.test(i)||X(t,"ill-formed tag handle (first argument) of the TAG directive"),Kt.call(t.tagMap,i)&&X(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ml.test(o)||X(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function Xt(e,t,n,r){var i,o,s,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||X(e,"expected valid JSON character");else cf.test(a)&&X(e,"the stream contains non-printable characters");e.result+=a}}function Ds(e,t,n,r){var i,o,s,a;for(Dt.isObject(n)||X(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],Kt.call(t,o)||(t[o]=n[o],r[o]=!0)}function Cn(e,t,n,r,i,o,s,a){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&X(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Rs(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&Rs(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,u=o.length;l<u;l+=1)Ds(e,t,o[l],n);else Ds(e,t,o,n);else!e.json&&!Kt.call(n,i)&&Kt.call(t,i)&&(e.line=s||e.line,e.position=a||e.position,X(e,"duplicated mapping key")),t[i]=o,delete n[i];return t}function Fo(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):X(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Te(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;on(i);)i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Ct(i))for(Fo(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&hi(e,"deficient indentation"),r}function Ni(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Qe(n)))}function zo(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
`,t-1))}function _f(e,t,n){var r,i,o,s,a,l,u,c,d=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),Qe(p)||En(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Qe(i)||n&&En(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,a=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Qe(i)||n&&En(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Qe(r))break}else{if(e.position===e.lineStart&&Ni(e)||n&&En(p))break;if(Ct(p))if(l=e.line,u=e.lineStart,c=e.lineIndent,Te(e,!1,-1),e.lineIndent>=t){a=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=u,e.lineIndent=c;break}}a&&(Xt(e,o,s,!1),zo(e,e.line-l),o=s=e.position,a=!1),on(p)||(s=e.position+1),p=e.input.charCodeAt(++e.position)}return Xt(e,o,s,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function vf(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Xt(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else Ct(n)?(Xt(e,r,i,!0),zo(e,Te(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ni(e)?X(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);X(e,"unexpected end of the stream within a single quoted scalar")}function wf(e,t){var n,r,i,o,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return Xt(e,n,e.position,!0),e.position++,!0;if(a===92){if(Xt(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),Ct(a))Te(e,!1,t);else if(a<256&&Ol[a])e.result+=Nl[a],e.position++;else if((s=ff(a))>0){for(i=s,o=0;i>0;i--)a=e.input.charCodeAt(++e.position),(s=hf(a))>=0?o=(o<<4)+s:X(e,"expected hexadecimal character");e.result+=mf(o),e.position++}else X(e,"unknown escape sequence");n=r=e.position}else Ct(a)?(Xt(e,n,r,!0),zo(e,Te(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ni(e)?X(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}X(e,"unexpected end of the stream within a double quoted scalar")}function yf(e,t){var n=!0,r,i=e.tag,o,s=e.anchor,a,l,u,c,d,f={},p,m,v,g;if(g=e.input.charCodeAt(e.position),g===91)l=93,d=!1,o=[];else if(g===123)l=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(Te(e,!0,t),g=e.input.charCodeAt(e.position),g===l)return e.position++,e.tag=i,e.anchor=s,e.kind=d?"mapping":"sequence",e.result=o,!0;n||X(e,"missed comma between flow collection entries"),m=p=v=null,u=c=!1,g===63&&(a=e.input.charCodeAt(e.position+1),Qe(a)&&(u=c=!0,e.position++,Te(e,!0,t))),r=e.line,Bn(e,t,ui,!1,!0),m=e.tag,p=e.result,Te(e,!0,t),g=e.input.charCodeAt(e.position),(c||e.line===r)&&g===58&&(u=!0,g=e.input.charCodeAt(++e.position),Te(e,!0,t),Bn(e,t,ui,!1,!0),v=e.result),d?Cn(e,o,f,m,p,v):u?o.push(Cn(e,null,f,m,p,v)):o.push(p),Te(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(n=!0,g=e.input.charCodeAt(++e.position)):n=!1}X(e,"unexpected end of the stream within a flow collection")}function bf(e,t){var n,r,i=Zi,o=!1,s=!1,a=t,l=0,u=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Zi===i?i=d===43?Ls:lf:X(e,"repeat of a chomping mode identifier");else if((c=pf(d))>=0)c===0?X(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?X(e,"repeat of an indentation width identifier"):(a=t+c-1,s=!0);else break;if(on(d)){do d=e.input.charCodeAt(++e.position);while(on(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ct(d)&&d!==0)}for(;d!==0;){for(Fo(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),Ct(d)){l++;continue}if(e.lineIndent<a){i===Ls?e.result+=Dt.repeat(`
`,o?1+l:l):i===Zi&&o&&(e.result+=`
`);break}for(r?on(d)?(u=!0,e.result+=Dt.repeat(`
`,o?1+l:l)):u?(u=!1,e.result+=Dt.repeat(`
`,l+1)):l===0?o&&(e.result+=" "):e.result+=Dt.repeat(`
`,l):e.result+=Dt.repeat(`
`,o?1+l:l),o=!0,s=!0,l=0,n=e.position;!Ct(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Xt(e,n,e.position,!1)}return!0}function Bs(e,t){var n,r=e.tag,i=e.anchor,o=[],s,a=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(s=e.input.charCodeAt(e.position+1),!Qe(s)));){if(a=!0,e.position++,Te(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,Bn(e,t,Cl,!1,!0),o.push(e.result),Te(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)X(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function xf(e,t,n){var r,i,o,s,a=e.tag,l=e.anchor,u={},c={},d=null,f=null,p=null,m=!1,v=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),g=e.input.charCodeAt(e.position);g!==0;){if(r=e.input.charCodeAt(e.position+1),o=e.line,s=e.position,(g===63||g===58)&&Qe(r))g===63?(m&&(Cn(e,u,c,d,f,null),d=f=p=null),v=!0,m=!0,i=!0):m?(m=!1,i=!0):X(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=r;else if(Bn(e,n,El,!1,!0))if(e.line===o){for(g=e.input.charCodeAt(e.position);on(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),Qe(g)||X(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Cn(e,u,c,d,f,null),d=f=p=null),v=!0,m=!1,i=!1,d=e.tag,f=e.result;else if(v)X(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=l,!0}else if(v)X(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=a,e.anchor=l,!0;else break;if((e.line===o||e.lineIndent>t)&&(Bn(e,t,di,!0,i)&&(m?f=e.result:p=e.result),m||(Cn(e,u,c,d,f,p,o,s),d=f=p=null),Te(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)X(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&Cn(e,u,c,d,f,null),v&&(e.tag=a,e.anchor=l,e.kind="mapping",e.result=u),v}function Af(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&X(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):X(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Qe(s);)s===33&&(r?X(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),Il.test(i)||X(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),df.test(o)&&X(e,"tag suffix cannot contain flow indicator characters")}return o&&!Ml.test(o)&&X(e,"tag name cannot contain such characters: "+o),n?e.tag=o:Kt.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:X(e,'undeclared tag handle "'+i+'"'),!0}function kf(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&X(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Qe(n)&&!En(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Sf(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Qe(r)&&!En(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Kt.call(e.anchorMap,n)||X(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Te(e,!0,-1),!0}function Bn(e,t,n,r,i){var o,s,a,l=1,u=!1,c=!1,d,f,p,m,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=a=di===n||Cl===n,r&&Te(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Af(e)||kf(e);)Te(e,!0,-1)?(u=!0,a=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=u||i),(l===1||di===n)&&(ui===n||El===n?m=t:m=t+1,v=e.position-e.lineStart,l===1?a&&(Bs(e,v)||xf(e,v,m))||yf(e,m)?c=!0:(s&&bf(e,m)||vf(e,m)||wf(e,m)?c=!0:Sf(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&X(e,"alias node should not have any properties")):_f(e,m,ui===n)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=a&&Bs(e,v))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&X(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(p=e.implicitTypes[d],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Kt.call(e.typeMap[e.kind||"fallback"],e.tag)?(p=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&p.kind!==e.kind&&X(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):X(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):X(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function Ef(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(Te(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Qe(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&X(e,"directive name must not be less than one character in length");s!==0;){for(;on(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Ct(s));break}if(Ct(s))break;for(n=e.position;s!==0&&!Qe(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&Fo(e),Kt.call($s,r)?$s[r](e,r,i):hi(e,'unknown document directive "'+r+'"')}if(Te(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Te(e,!0,-1)):o&&X(e,"directives end mark is expected"),Bn(e,e.lineIndent-1,di,!1,!0),Te(e,!0,-1),e.checkLineBreaks&&uf.test(e.input.slice(t,e.position))&&hi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ni(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Te(e,!0,-1));return}if(e.position<e.length-1)X(e,"end of the stream or a document separator is expected");else return}function Ll(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new gf(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,X(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Ef(n);return n.documents}function Rl(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=Ll(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function Pl(e,t){var n=Ll(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new kl("expected a single document in the stream, but found more")}}function Cf(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),Rl(e,t,Dt.extend({schema:Sl},n))}function If(e,t){return Pl(e,Dt.extend({schema:Sl},t))}Er.loadAll=Rl;Er.load=Pl;Er.safeLoadAll=Cf;Er.safeLoad=If;var jo={},Mr=dt,Or=Cr,Mf=Oi,Of=Ir,$l=Object.prototype.toString,Dl=Object.prototype.hasOwnProperty,Nf=9,hr=10,Tf=13,Lf=32,Rf=33,Pf=34,Bl=35,$f=37,Df=38,Bf=39,Ff=42,Fl=44,zf=45,zl=58,jf=61,Vf=62,Hf=63,Uf=64,jl=91,Vl=93,Gf=96,Hl=123,Yf=124,Ul=125,He={};He[0]="\\0";He[7]="\\a";He[8]="\\b";He[9]="\\t";He[10]="\\n";He[11]="\\v";He[12]="\\f";He[13]="\\r";He[27]="\\e";He[34]='\\"';He[92]="\\\\";He[133]="\\N";He[160]="\\_";He[8232]="\\L";He[8233]="\\P";var Wf=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function qf(e,t){var n,r,i,o,s,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Dl.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[s]=a;return n}function Fs(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Or("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Mr.repeat("0",r-t.length)+t}function Zf(e){this.schema=e.schema||Mf,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Mr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=qf(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function zs(e,t){for(var n=Mr.repeat(" ",t),r=0,i=-1,o="",s,a=e.length;r<a;)i=e.indexOf(`
`,r),i===-1?(s=e.slice(r),r=a):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
`&&(o+=n),o+=s;return o}function mo(e,t){return`
`+Mr.repeat(" ",e.indent*t)}function Xf(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function Vo(e){return e===Lf||e===Nf}function Fn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function Jf(e){return Fn(e)&&!Vo(e)&&e!==65279&&e!==Tf&&e!==hr}function js(e,t){return Fn(e)&&e!==65279&&e!==Fl&&e!==jl&&e!==Vl&&e!==Hl&&e!==Ul&&e!==zl&&(e!==Bl||t&&Jf(t))}function Kf(e){return Fn(e)&&e!==65279&&!Vo(e)&&e!==zf&&e!==Hf&&e!==zl&&e!==Fl&&e!==jl&&e!==Vl&&e!==Hl&&e!==Ul&&e!==Bl&&e!==Df&&e!==Ff&&e!==Rf&&e!==Yf&&e!==jf&&e!==Vf&&e!==Bf&&e!==Pf&&e!==$f&&e!==Uf&&e!==Gf}function Gl(e){var t=/^\n* /;return t.test(e)}var Yl=1,Wl=2,ql=3,Zl=4,Xr=5;function Qf(e,t,n,r,i){var o,s,a,l=!1,u=!1,c=r!==-1,d=-1,f=Kf(e.charCodeAt(0))&&!Vo(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!Fn(s))return Xr;a=o>0?e.charCodeAt(o-1):null,f=f&&js(s,a)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===hr)l=!0,c&&(u=u||o-d-1>r&&e[d+1]!==" ",d=o);else if(!Fn(s))return Xr;a=o>0?e.charCodeAt(o-1):null,f=f&&js(s,a)}u=u||c&&o-d-1>r&&e[d+1]!==" "}return!l&&!u?f&&!i(e)?Yl:Wl:n>9&&Gl(e)?Xr:u?Zl:ql}function e0(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&Wf.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=r||e.flowLevel>-1&&n>=e.flowLevel;function a(l){return Xf(e,l)}switch(Qf(t,s,e.indent,o,a)){case Yl:return t;case Wl:return"'"+t.replace(/'/g,"''")+"'";case ql:return"|"+Vs(t,e.indent)+Hs(zs(t,i));case Zl:return">"+Vs(t,e.indent)+Hs(zs(t0(t,o),i));case Xr:return'"'+n0(t)+'"';default:throw new Or("impossible error: invalid scalar style")}}()}function Vs(e,t){var n=Gl(e)?String(t):"",r=e[e.length-1]===`
`,i=r&&(e[e.length-2]===`
`||e===`
`),o=i?"+":r?"":"-";return n+o+`
`}function Hs(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function t0(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,n.lastIndex=u,Us(e.slice(0,u),t)}(),i=e[0]===`
`||e[0]===" ",o,s;s=n.exec(e);){var a=s[1],l=s[2];o=l[0]===" ",r+=a+(!i&&!o&&l!==""?`
`:"")+Us(l,t),i=o}return r}function Us(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(o=s>i?s:a,l+=`
`+e.slice(i,o),i=o+1),s=a;return l+=`
`,e.length-i>t&&s>i?l+=e.slice(i,s)+`
`+e.slice(s+1):l+=e.slice(i),l.slice(1)}function n0(e){for(var t="",n,r,i,o=0;o<e.length;o++){if(n=e.charCodeAt(o),n>=55296&&n<=56319&&(r=e.charCodeAt(o+1),r>=56320&&r<=57343)){t+=Fs((n-55296)*1024+r-56320+65536),o++;continue}i=He[n],t+=!i&&Fn(n)?e[o]:i||Fs(n)}return t}function r0(e,t,n){var r="",i=e.tag,o,s;for(o=0,s=n.length;o<s;o+=1)ln(e,t,n[o],!1,!1)&&(o!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function i0(e,t,n,r){var i="",o=e.tag,s,a;for(s=0,a=n.length;s<a;s+=1)ln(e,t+1,n[s],!0,!0)&&((!r||s!==0)&&(i+=mo(e,t)),e.dump&&hr===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function o0(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,a,l,u,c;for(s=0,a=o.length;s<a;s+=1)c="",s!==0&&(c+=", "),e.condenseFlow&&(c+='"'),l=o[s],u=n[l],ln(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ln(e,t,u,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function s0(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),a,l,u,c,d,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Or("sortKeys must be a boolean or a function");for(a=0,l=s.length;a<l;a+=1)f="",(!r||a!==0)&&(f+=mo(e,t)),u=s[a],c=n[u],ln(e,t+1,u,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&hr===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=mo(e,t)),ln(e,t+1,c,!0,d)&&(e.dump&&hr===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=o,e.dump=i||"{}"}function Gs(e,t,n){var r,i,o,s,a,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(e.tag=n?a.tag:"?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,$l.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Dl.call(a.represent,l))r=a.represent[l](t,l);else throw new Or("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function ln(e,t,n,r,i,o){e.tag=null,e.dump=n,Gs(e,n,!1)||Gs(e,n,!0);var s=$l.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=s==="[object Object]"||s==="[object Array]",l,u;if(a&&(l=e.duplicates.indexOf(n),u=l!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&t>0)&&(i=!1),u&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(a&&u&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),s==="[object Object]")r&&Object.keys(e.dump).length!==0?(s0(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(o0(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if(s==="[object Array]"){var c=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(i0(e,c,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(r0(e,c,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&e0(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Or("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function a0(e,t){var n=[],r=[],i,o;for(go(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function go(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)go(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)go(e[r[i]],t,n)}function Xl(e,t){t=t||{};var n=new Zf(t);return n.noRefs||a0(e,n),ln(n,0,e,!0,!0)?n.dump+`
`:""}function l0(e,t){return Xl(e,Mr.extend({schema:Of},t))}jo.dump=Xl;jo.safeDump=l0;var Ti=Er,Jl=jo;function Li(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Oe.Type=Be;Oe.Schema=Yn;Oe.FAILSAFE_SCHEMA=Do;Oe.JSON_SCHEMA=yl;Oe.CORE_SCHEMA=bl;Oe.DEFAULT_SAFE_SCHEMA=Ir;Oe.DEFAULT_FULL_SCHEMA=Oi;Oe.load=Ti.load;Oe.loadAll=Ti.loadAll;Oe.safeLoad=Ti.safeLoad;Oe.safeLoadAll=Ti.safeLoadAll;Oe.dump=Jl.dump;Oe.safeDump=Jl.safeDump;Oe.YAMLException=Cr;Oe.MINIMAL_SCHEMA=Do;Oe.SAFE_SCHEMA=Ir;Oe.DEFAULT_SCHEMA=Oi;Oe.scan=Li("scan");Oe.parse=Li("parse");Oe.compose=Li("compose");Oe.addConstructor=Li("addConstructor");var c0=Oe,_o=c0,u0=d0;function Mn(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function d0(e){if(e=e||{},e.circles)return h0(e);return e.proto?r:n;function t(i,o){for(var s=Object.keys(i),a=new Array(s.length),l=0;l<s.length;l++){var u=s[l],c=i[u];typeof c!="object"||c===null?a[u]=c:c instanceof Date?a[u]=new Date(c):ArrayBuffer.isView(c)?a[u]=Mn(c):a[u]=o(c)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var o={};for(var s in i)if(Object.hasOwnProperty.call(i,s)!==!1){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),n)):a instanceof Set?o[s]=new Set(t(Array.from(a),n)):ArrayBuffer.isView(a)?o[s]=Mn(a):o[s]=n(a)}return o}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var o={};for(var s in i){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),r)):a instanceof Set?o[s]=new Set(t(Array.from(a),r)):ArrayBuffer.isView(a)?o[s]=Mn(a):o[s]=r(a)}return o}}function h0(e){var t=[],n=[];return e.proto?o:i;function r(s,a){for(var l=Object.keys(s),u=new Array(l.length),c=0;c<l.length;c++){var d=l[c],f=s[d];if(typeof f!="object"||f===null)u[d]=f;else if(f instanceof Date)u[d]=new Date(f);else if(ArrayBuffer.isView(f))u[d]=Mn(f);else{var p=t.indexOf(f);p!==-1?u[d]=n[p]:u[d]=a(f)}}return u}function i(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,i);if(s instanceof Map)return new Map(r(Array.from(s),i));if(s instanceof Set)return new Set(r(Array.from(s),i));var a={};t.push(s),n.push(a);for(var l in s)if(Object.hasOwnProperty.call(s,l)!==!1){var u=s[l];if(typeof u!="object"||u===null)a[l]=u;else if(u instanceof Date)a[l]=new Date(u);else if(u instanceof Map)a[l]=new Map(r(Array.from(u),i));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),i));else if(ArrayBuffer.isView(u))a[l]=Mn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=i(u)}}return t.pop(),n.pop(),a}function o(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,o);if(s instanceof Map)return new Map(r(Array.from(s),o));if(s instanceof Set)return new Set(r(Array.from(s),o));var a={};t.push(s),n.push(a);for(var l in s){var u=s[l];if(typeof u!="object"||u===null)a[l]=u;else if(u instanceof Date)a[l]=new Date(u);else if(u instanceof Map)a[l]=new Map(r(Array.from(u),o));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),o));else if(ArrayBuffer.isView(u))a[l]=Mn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=o(u)}}return t.pop(),n.pop(),a}}var he=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"es","name":"Espa\xF1ol"},{"code":"fr","name":"Fran\xE7ais"},{"code":"it","name":"Italiano"},{"code":"ja","name":"\u65E5\u672C\u8A9E"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Portugu\xEAs"},{"code":"ru","name":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{"code":"sk","name":"Sloven\u010Dina","schemas":false},{"code":"zh-cn","name":"\u7B80\u4F53\u4E2D\u6587"},{"code":"zh-tw","name":"\u6B63\u9AD4\u4E2D\u6587"}],"versions":[{"id":"1.15","ref":"1.15.2","pack_format":5},{"id":"1.16","ref":"1.16.5","pack_format":6},{"id":"1.17","ref":"1.17.1","pack_format":7},{"id":"1.18","ref":"1.18.1","pack_format":8},{"id":"1.18.2","ref":"1.18.2","pack_format":9},{"id":"1.19","dynamic":true,"pack_format":10}],"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":"chat_type","url":"chat-type","schema":"chat_type","minVersion":"1.19"},{"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":"tag/block","url":"tags/block","category":"tags","path":"tags/blocks","schema":"block_tag"},{"id":"tag/entity_type","url":"tags/entity-type","category":"tags","path":"tags/entity_types","schema":"entity_type_tag"},{"id":"tag/fluid","url":"tags/fluid","category":"tags","path":"tags/fluids","schema":"fluid_tag"},{"id":"tag/game_event","url":"tags/game-event","category":"tags","path":"tags/game_events","schema":"game_event_tag","minVersion":"1.17"},{"id":"tag/item","url":"tags/item","category":"tags","path":"tags/items","schema":"item_tag"},{"id":"tag/worldgen/biome","url":"tags/biome","category":"tags","path":"tags/worldgen/biome","schema":"biome_tag","minVersion":"1.18.2"},{"id":"block_definition","url":"assets/blockstate","path":"blockstates","category":"assets","schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","category":"assets","schema":"model"},{"id":"block_growth","url":"partners/immersive-weathering/block-growth","path":"block_growths","category":"partners","partner":"immersive_weathering","schema":"immersive_weathering:block_growth","minVersion":"1.18.2"}]}');function Qt(e){return typeof e=="object"&&e!==null}function Jr(e){return e.toString(16).padStart(2,"0")}function sn(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Jr).join("")}function Vt(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function f0(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function Kl(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new M.Path(["dimensions"]));e.set(new M.Path(["seed"]),t,!0),Qt(n)&&Object.keys(n).forEach(r=>{e.set(new M.Path(["dimensions",r,"generator","seed"]),t,!0),e.set(new M.Path(["dimensions",r,"generator","biome_source","seed"]),t,!0)}),e.set(new M.Path(["placement","salt"]),Math.abs(t),!0),e.set(new M.Path(["generator","seed"]),t,!0),e.set(new M.Path(["generator","biome_source","seed"]),t)}function Ql(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function It(e){return`/${e}/`.replaceAll("//","/")}function p0(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),It(e)}function ec(e){const t=p0(e).replace(/^\//,"").replace(/\/$/,"");return he.generators.find(n=>n.url===t)}function tc({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?It(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);Jt(i,r)}function m0(e){const t=_o.load(e.substring(3,e.indexOf("---",3)));return Qt(t)?t:{}}function g0(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const o=_0(e,i+2),s=e.indexOf("#[",i+1);let a="";if(s>=0&&s<o){const l=e.indexOf("]",s+2);e.substring(s+2,l)===t&&(a=e.substring(l+1,o).trim())}else{const l=e.substring(i+2,o),u=he.versions.find(c=>c.id===t);a=(r={version:u==null?void 0:u.id,pack_format:u==null?void 0:u.pack_format.toString()}[l])!=null?r:""}e=e.substring(0,i)+a+e.substring(o+2),n=i}return e}function _0(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),o=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(o<0){if(n===0)return i;n-=1,t=i+2}else if(o<i)n+=1,t=o+2;else{if(n===0)return i;n-=1,t=i+2}}return console.warn("Exceeded max iterations while finding closing bracket"),e.length}function Ho(e){const t=Math.abs(Ql(e));return[t%256,(t>>8)%256,(t>>16)%256]}function v0(e){if(!Array.isArray(e)||e.length!==3)return"#000000";const[t,n,r]=e;return"#"+Jr(t)+Jr(n)+Jr(r)}function w0(e){if(typeof e!="string")return[0,0,0];const t=parseInt(e.startsWith("#")?e.slice(1):e,16),n=t>>16&255,r=t>>8&255,i=t&255;return[n,r,i]}function Zn(e){return e*e}function it(e,t,n){return Math.max(e,Math.min(t,n))}function Xi(e,t,n){return n<0?e:n>1?t:Kr(n,e,t)}function Kr(e,t,n){return t+e*(n-t)}function y0(e,t,n,r,i,o){return Kr(t,Kr(e,n,r),Kr(e,i,o))}function ct(e){return e instanceof Error?e.message:`${e}`}const Ri=u0();function cn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=0;r<n;r++)if(!cn(e[r],t[r]))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 i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!cn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}class b0{constructor(){this.forward=new Map,this.backward=new Map}set(t,n){this.forward.set(t,n),this.backward.set(n,t)}getA(t){return this.backward.get(t)}getB(t){return this.forward.get(t)}getOrPut(t,n){const r=this.forward.get(t);return r===void 0?(this.set(t,n),n):r}}function Qr({icon:e,label:t,large:n,larger:r,doSelect:i,value:o,placeholder:s,dataList:a,onChange:l}){const u=l===void 0?()=>{}:f=>{const p=f.target.value;l==null||l(p)},c=me(null);Q(()=>{i&&c.current&&c.current.select()},[i]);const d=a&&sn();return h("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:f=>f.stopPropagation()},e&&te[e],t&&h("span",null,t),h("input",{ref:c,type:"text",value:o,onChange:u,placeholder:s,list:d}),a&&h("datalist",{id:d},a.map(f=>h("option",{value:f}))))}function Qn({cooldown:e,invert:t,initial:n}={}){const[r,i]=D(n),o=me(void 0);return[r,()=>{i(!t),o.current!==void 0&&clearTimeout(o.current),o.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}const vo=Symbol("async-cancel");function x0(e,t=[],n={loading:!1}){const[r,i]=D(n),o=me(!1),s=me(0);Q(()=>(o.current=!0,()=>o.current=!1),[]);const a=Ce((...l)=>{const u=++s.current;return r.loading||i(c=>ge(Z({},c),{loading:!0})),e(...l).then(c=>(o.current&&u===s.current&&c!==vo&&i({value:c,loading:!1}),c),c=>{o.current&&u===s.current&&i({error:c,loading:!1})})},t);return[r,a]}function Nr(e,t=[],n={loading:!0}){const[r,i]=x0(e,t,n);return Q(()=>{i()},[i]),ge(Z({},r),{refresh:i})}function Tr({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},o){const s=me(null),a=me(),l=me(),u=me([0,0]),c=me(!1);Q(()=>{if(!s.current)return;const p=_=>{a.current=[_.offsetX,_.offsetY]},m=_=>{if(a.current===void 0){if(!s.current)return;const w=_.offsetX/s.current.clientWidth,A=_.offsetY/s.current.clientHeight;r==null||r(w,A);return}if(!n)return;const b=_.offsetX-a.current[0],x=_.offsetY-a.current[1];b===0&&x===0||(u.current=[u.current[0]+b,u.current[1]+x],c.current||(l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!s.current)return;c.current=!0;const w=u.current[0]/s.current.clientWidth,A=u.current[1]/s.current.clientHeight;u.current=[0,0],await(n==null?void 0:n(w,A)),c.current=!1}))),a.current=[_.offsetX,_.offsetY]},v=()=>{a.current=void 0},g=()=>{i==null||i()};return s.current.addEventListener("mousedown",p),s.current.addEventListener("mousemove",m),s.current.addEventListener("mouseleave",g),document.body.addEventListener("mouseup",v),()=>{var _,b,x;(_=s.current)==null||_.removeEventListener("mousedown",p),(b=s.current)==null||b.removeEventListener("mousemove",m),(x=s.current)==null||x.removeEventListener("mouseleave",g),document.body.removeEventListener("mouseup",v)}},[...o!=null?o:[],s.current]);const d=me(),f=me(0);return d.current=async()=>{if(!s.current)return;const p=s.current.getContext("2d"),m=e();s.current.width=m[0],s.current.height=m[1];const v=p.getImageData(0,0,m[0],m[1]),g=f.current+=1;try{await t(v)}catch(_){throw _}g===f.current&&p.putImageData(v,0,0)},{canvas:s,redraw:d.current}}function Uo(){const[e,t]=D(!1),n=()=>{t(!1)};return Q(()=>(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 A0(){const[e,t]=D(window.location.hash),n=Ce(()=>{t(window.location.hash)},[]);Q(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Ce(i=>{i!==e&&tc({hash:i})},[e]);return[e,r]}function k0(e,t,n,r){const i=Ce(()=>{const l=localStorage.getItem(e);return l===null?t:n===void 0?l:n(l)},[]),[o,s]=D(i()),a=Ce(l=>{l==null?(localStorage.removeItem(e),s(t)):r!==void 0?(localStorage.setItem(e,r(l)),s(l)):(localStorage.setItem(e,l),s(l))},[]);return[o,a]}function Ys(e){const[t,n]=D(matchMedia(e).matches),r=i=>{n(i.matches)};return Q(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function Pi(e,t,n){const r={invalidated(){e&&t(e)}};Q(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const Ws=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function un(e){const t=window.location,[n,r]=D(Ws(t.search,e));Q(()=>{const o=()=>{r(Ws(t.search,e))};return window.addEventListener("popstate",o),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",o),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]);const i=Ce((o,s)=>{if(o!==n){r(o);const a=new URLSearchParams(t.search);o===void 0||o.length===0?a.delete(e):a.set(e,o),tc({search:a.toString().replaceAll("%7C","|"),replace:s})}},[n]);return[n,i]}function vt(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:o,children:s}=e,[a,l]=Uo();return h("div",ge(Z({},e),{class:`btn-menu${r===!1?" no-relative":""} ${e.class}`}),h(K,{icon:t,label:n,tooltip:i,tooltipLoc:o,onClick:l}),a&&h("div",{class:"btn-group"},s))}const S0="modulepreload",qs={},E0="/",ae=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${E0}${r}`,r in qs)return;qs[r]=!0;const i=r.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${o}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":S0,i||(s.as="script",s.crossOrigin=""),s.href=r,document.head.appendChild(s),i)return new Promise((a,l)=>{s.addEventListener("load",a),s.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},te={alert:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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"}),h("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"}),h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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"})),heart:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"})),history:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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"})),package:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z"})),play:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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"}),h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("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 On({error:e,onDismiss:t}){const[n,r]=D(!1),[i,o]=D(void 0);Q(()=>{if(e instanceof Error){const a=e.stack.split(`
`).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));o(a.join(`
`)),ae(()=>import("./sourcemapped-stacktrace.0f0328ff.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(a.join(`
`),u=>{const c=u.map(d=>d.replace(/..\/..\/src\//,"src/")).join(`
`);o(c)})})}},[e]);const s=xe(()=>{let a="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(a+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,i&&(a+=`&body=${encodeURIComponent(`\`\`\`
${e.name}: ${e.message}
${i}
\`\`\`
`)}`)):a+=`?title=${encodeURIComponent(e.toString())}`,a},[e,i]);return h("div",{class:"error"},t&&h("div",{class:"error-dismiss",onClick:t},te.x),h("h3",null,e instanceof Error?e.message:e,i&&h("span",{onClick:()=>r(!n)},te.info)),i&&n&&h("pre",null,i),h("p",null,"If you think this is a bug, you can report it ",h("a",{href:s,target:"_blank"},"on GitHub")))}var nc=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","any_version":"Any","assets":"Assets","block_definition":"Blockstate","changelog.search":"Search changes","changelog.no_results":"No changes","chat_type":"Chat Type","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","developed_by":"Developed by","dimension_type":"Dimension Type","dimension":"Dimension","disabled":"Disabled","donate":"Donate","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","generate_new_uuid":"Generate new UUID","github":"GitHub","guides.all":"All guides","guides.search":"Search guides","guides.no_results.version":"No guides for this version","guides.no_results.query":"No guides for this query","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","tag/block":"Block Tag","tag/entity_type":"Entity Type Tag","tag/fluid":"Fluid Tag","tag/game_event":"Game Event Tag","tag/item":"Item Tag","tag/worldgen/biome":"Biome Tag","tags":"Tags","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.changelog":"Technical Changelog","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.guides":"Data Pack Guides","title.home":"Data Pack Generators","title.partners":"Partners","title.project":"%0% Project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","partner.immersive_weathering":"Immersive Weathering","partner.immersive_weathering.block_growth":"Block Growth","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_code_on":"Source code on","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.article":"Article","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"}'),C0=Object.freeze(Object.defineProperty({__proto__:null,default:nc},Symbol.toStringTag,{value:"Module"}));const Go="https://raw.githubusercontent.com/misode/technical-changes/main";let Ji=null;async function rc(){if(!Ji){const e=await(await fetch(`${Go}/index.json`)).json();Ji=(await Promise.all(e.map((t,n)=>I0(ic(t),n)))).flat().map(t=>ge(Z({},t),{tags:[t.group,...t.tags]}))}return Ji}async function I0(e,t){const n=await(await fetch(`${Go}/${e}/index.json`)).json();return(await Promise.all(n.map((r,i)=>M0(e,ic(r),t,i)))).flat()}async function M0(e,t,n,r){const i=await(await fetch(`${Go}/${e}/${t}.md`)).text();return O0(i).map(o=>Z({version:t,group:e,order:n*1e3+r},o))}function O0(e){return e.split(`
`).map(t=>{const n=t.indexOf("|");return{tags:t.substring(0,n).trim().split(" "),content:t.slice(n+1).trim().replaceAll("->","\u2192").replaceAll(`
...
`,`
`)}})}function ic(e){return typeof e=="string"?e:Qt(e)?e.id:"unknown"}const Xn="https://www.minecraft.net/article/",N0=new Map(Object.entries({"1.16-pre2":"minecraft-1-16-pre-release-1","1.16-pre4":"minecraft-1-16-pre-release-3","1.16-pre5":"minecraft-1-16-pre-release-3","1.16-pre7":"minecraft-1-16-pre-release-6","1.16-pre8":"minecraft-1-16-pre-release-6","1.16-rc1":"minecraft-1-16-release-candidate",1.16:"nether-update-java","1.16.2-pre3":"minecraft-1-16-2-pre-release-2","1.16.2-rc1":"minecraft-1-16-2-pre-release-2","1.16.2-rc2":"minecraft-1-16-2-pre-release-2","1.17-pre3":"minecraft-1-17-pre-release-2","1.17-pre4":"minecraft-1-17-pre-release-2","1.17-pre5":"minecraft-1-17-pre-release-2","1.17.1-pre3":"minecraft-1-17-1-pre-release-2",1.17:"caves---cliffs--part-i-out-today-java","1.18-pre3":"minecraft-1-18-pre-release-2","1.18-pre4":"minecraft-1-18-pre-release-2","1.18-pre5":"minecraft-1-18-pre-release-2","1.18-pre7":"minecraft-1-18-pre-release-6","1.18-pre8":"minecraft-1-18-pre-release-6",1.18:"caves---cliffs--part-ii-out-today-java","1.18.2-pre3":"minecraft-1-18-2-pre-release-2","1.18.2-pre5":"minecraft-1-18-2-pre-release-4",1.19:"the-wild-update-out-today-java"}));function T0(e){const t=N0.get(e);if(t)return Xn+t;let n;if((n=e.match(/^(\d\dw\d\d)[a-z]$/))&&n[1])return Xn+"minecraft-snapshot-"+n[1]+"a";if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-pre([0-9]+)$/))&&n[1]&&n[2])return Xn+"minecraft-"+n[1].replaceAll(".","-")+"-pre-release-"+n[2];if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-rc[0-9]+$/))&&n[1])return Xn+"minecraft-"+n[1].replaceAll(".","-")+"-release-candidate-1";if(e.match(/^\d+\.\d+\.\d+$/))return Xn+"minecraft-java-edition-"+e.replaceAll(".","-")}const Nn="misode-v2",Zs="cached_latest_version",Xs="misode_cache_patch",Ki="1.19",In="https://raw.githubusercontent.com/misode/mcmeta";function Ht(e,t){return`${In}/${e.dynamic?t:`${e.ref}-${t}`}`}async function $i(e){await j0(),e.dynamic&&(localStorage.getItem(Zs)!==Ki&&(await sc(t=>t.startsWith(`${In}/summary/`)||t.startsWith(`${In}/data/`)||t.startsWith(`${In}/assets/`)||t.startsWith(`${In}/registries/`)),localStorage.setItem(Zs,Ki)),e.ref=Ki)}async function L0(e,t,n){const r=he.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(he.versions)}`);return}await $i(r),await Promise.all([R0(r,t),P0(r,n)])}async function R0(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await zn(`${Ht(e,"summary")}/registries/data.min.json`);for(const r in n)t.register(r,n[r].map(i=>"minecraft:"+i))}catch(n){console.warn("Error occurred while fetching registries:",ct(n))}}async function P0(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await zn(`${Ht(e,"summary")}/blocks/data.min.json`);for(const r in n)t["minecraft:"+r]={properties:n[r][0],default:n[r][1]}}catch(n){console.warn("Error occurred while fetching block state map:",ct(n))}}async function oc(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=he.versions.find(i=>i.id===e);try{let i;if(n.startsWith("immersive_weathering:"))i=`https://raw.githubusercontent.com/AstralOrdana/Immersive-Weathering/main/src/main/resources/data/immersive_weathering/block_growths/${n.slice(21)}.json`;else{const s=["blockstates","models"].includes(t)?"assets":"data";i=`${Ht(r,s)}/${s}/minecraft/${t}/${n}.json`}return await(await fetch(i)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${ct(i)}`)}}async function $0(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=he.versions.find(r=>r.id===e);await $i(n);try{const r=await zn(`${Ht(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await zn(`${Ht(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${ct(r)}`)}}async function D0(e){const t=he.versions.find(n=>n.id===e);await $i(t);try{const n=`${Ht(t,"summary")}/sounds/data.min.json`;return await zn(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${ct(n)}`)}}function B0(e,t){const n=he.versions.find(r=>r.id===e);return`${Ht(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function F0(){const e=he.versions[he.versions.length-1];await $i(e);try{return zn(`${Ht(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${ct(t)}`)}}function z0(e,t){const n=he.versions.find(r=>r.id===e);return`${Ht(n,"assets")}/assets/minecraft/textures/${t}.png`}async function zn(e,t=n=>n){try{const n=await caches.open(Nn);console.debug(`[getData] Opened cache ${Nn} ${e}`);const r=await n.match(e);if(r&&r.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await r.json();console.debug(`[getData] fetching data ${e}`);const i=await fetch(e),o=t(await i.json());return await n.put(e,new Response(JSON.stringify(o))),o}catch(n){console.warn(`[getData] Failed to open cache ${Nn}: ${ct(n)}`),console.debug(`[getData] fetching data ${e}`);const r=await fetch(e);return t(await r.json())}}async function sc(e){try{const t=await caches.open(Nn);console.debug(`[deleteMatching] Opened cache ${Nn}`);const n=[];for(const r of await t.keys())e(r.url)&&n.push(t.delete(r));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache ${Nn}: ${ct(t)}`)}}const Js=[async()=>{["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")},async()=>{await sc(e=>e.startsWith(`${In}/1.18.2-summary/`))}];async function j0(){var t;const e=parseInt((t=localStorage.getItem(Xs))!=null?t:"0");for(let n=e+1;n<=Js.length;n+=1){const r=Js[n-1];r&&await r(),localStorage.setItem(Xs,n.toFixed())}}const Ie="immersive_weathering";function V0(e,t){const n=M.Reference.bind(void 0,e),r=M.StringNode.bind(void 0,t),i=o=>M.ChoiceNode([{type:"string",node:r({validator:"resource",params:{pool:o,allowTag:!0}}),change:s=>{if(Array.isArray(s)&&typeof s[0]=="string"&&!s[0].startsWith("#"))return s[0]}},{type:"list",node:M.ListNode(r({validator:"resource",params:{pool:o}})),change:s=>typeof s=="string"&&!s.startsWith("#")?[s]:[]}],{choiceContext:"tag"});e.register(`${Ie}:block_growth`,M.ObjectNode({area_condition:n(`${Ie}:area_condition`),position_predicates:M.Opt(M.ListNode(n(`${Ie}:position_test`))),growth_chance:M.NumberNode({min:0,max:1}),growth_for_face:M.ListNode(M.ObjectNode({direction:M.Opt(r({enum:"direction"})),weight:M.Opt(M.NumberNode({integer:!0})),growth:M.ListNode(M.ObjectNode({data:n(`${Ie}:block_pair`),weight:M.NumberNode({integer:!0})}))},{category:"pool"})),owners:M.ListNode(r({validator:"resource",params:{pool:"block"}})),replacing_target:n(`${Ie}:rule_test`),target_self:M.Opt(M.BooleanNode()),destroy_target:M.Opt(M.BooleanNode())},{context:`${Ie}.block_growth`})),e.register(`${Ie}:area_condition`,M.ObjectNode({type:r({enum:["generate_if_not_too_many","neighbor_based_generation"]}),[M.Switch]:[{push:"type"}],[M.Case]:{generate_if_not_too_many:{radiusX:M.NumberNode({integer:!0}),radiusY:M.NumberNode({integer:!0}),radiusZ:M.NumberNode({integer:!0}),requiredAmount:M.NumberNode({integer:!0}),yOffset:M.Opt(M.NumberNode({integer:!0})),must_have:M.Opt(n(`${Ie}:rule_test`)),must_not_have:M.Opt(n(`${Ie}:rule_test`)),includes:M.Opt(i("block"))},neighbor_based_generation:{must_have:n(`${Ie}:rule_test`),must_not_have:M.Opt(n(`${Ie}:rule_test`)),required_amount:M.Opt(M.NumberNode({integer:!0})),directions:M.ListNode(r({enum:"direction"}))}}},{context:`${Ie}.area_condition`})),e.register(`${Ie}:block_pair`,M.ObjectNode({block:n(`${Ie}:block_state`),above_block:M.Opt(n(`${Ie}:block_state`))},{context:`${Ie}.block_pair`})),e.register(`${Ie}:block_state`,M.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:M.Opt(M.MapNode(r(),r()))},{context:"block_state"})),e.register(`${Ie}:position_test`,M.ObjectNode({predicate_type:r({enum:["biome_match","day_test","nand","precipitation_test","temperature_range"]}),[M.Switch]:[{push:"predicate_type"}],[M.Case]:{biome_match:{biomes:i("$worldgen/biome")},day_test:{day:M.BooleanNode()},nand:{predicates:M.ListNode(n(`${Ie}:position_test`))},precipitation_test:{precipitation:r({enum:["none","rain","snow"]})},temperature_range:{min:M.NumberNode(),max:M.NumberNode(),use_local_pos:M.Opt(M.BooleanNode())}}},{context:`${Ie}.position_test`,category:"predicate"})),t.register(`${Ie}:rule_test`,[...t.get("rule_test"),"immersive_weathering:block_set_match","immersive_weathering:fluid_match","immersive_weathering:tree_log"]),e.register(`${Ie}:rule_test`,M.ObjectNode({predicate_type:r({validator:"resource",params:{pool:`${Ie}:rule_test`}}),[M.Switch]:[{push:"predicate_type"}],[M.Case]:{"minecraft:block_match":{block:r({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:n("block_state")},"minecraft:random_block_match":{block:r({validator:"resource",params:{pool:"block"}}),probability:M.NumberNode({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:n("block_state"),probability:M.NumberNode({min:0,max:1})},"minecraft:tag_match":{tag:r({validator:"resource",params:{pool:"$tag/block"}})},"immersive_weathering:block_set_match":{blocks:i("block"),probability:M.Opt(M.NumberNode({min:0,max:1}))},"immersive_weathering:fluid_match":{fluid:r({validator:"resource",params:{pool:"fluid"}})}}},{context:"rule_test",disableSwitchContext:!0})),t.register("block_growth",["immersive_weathering:brain_coral","immersive_weathering:bubble_coral","immersive_weathering:cracked_mud_rivers","immersive_weathering:crimson_nylium","immersive_weathering:cryosol","immersive_weathering:farmland_rare_weeds","immersive_weathering:farmland_weeds","immersive_weathering:fire_coral","immersive_weathering:fire_soot","immersive_weathering:fluvisol","immersive_weathering:grass_base","immersive_weathering:grass_block_badlands","immersive_weathering:grass_block_bamboo_jungle","immersive_weathering:grass_block_birch_forest","immersive_weathering:grass_block_dark_forest","immersive_weathering:grass_block_flower_forest","immersive_weathering:grass_block_forest","immersive_weathering:grass_block_jungle","immersive_weathering:grass_block_lush_caves","immersive_weathering:grass_block_old_growth_spruce","immersive_weathering:grass_block_plains","immersive_weathering:grass_block_sunflower_plains","immersive_weathering:grass_block_swamp","immersive_weathering:grass_block_taiga","immersive_weathering:grass_block_wooded_badlands","immersive_weathering:hanging_roots","immersive_weathering:horn_coral","immersive_weathering:humus","immersive_weathering:icicle_growth","immersive_weathering:large_fern","immersive_weathering:magma","immersive_weathering:mycelium","immersive_weathering:podzol","immersive_weathering:red_sand_weathering","immersive_weathering:rooted_dirt","immersive_weathering:rooted_grass","immersive_weathering:sand_weathering","immersive_weathering:sapling","immersive_weathering:sapling_nether","immersive_weathering:silt","immersive_weathering:tall_grass","immersive_weathering:tall_seagrass","immersive_weathering:tube_coral","immersive_weathering:vertisol","immersive_weathering:warped_nylium"])}function H0(e,t){V0(e,t)}const wo=["1.15","1.16","1.17","1.18","1.18.2","1.19"],bn={},xn={},U0={1.15:()=>ae(()=>import("./index.5dc81ff9.js").then(function(e){return e.i}),[]),1.16:()=>ae(()=>import("./index.b42e72d6.js").then(function(e){return e.i}),[]),1.17:()=>ae(()=>import("./index.88c342ba.js").then(function(e){return e.i}),[]),1.18:()=>ae(()=>import("./index.17afb854.js").then(function(e){return e.i}),[]),"1.18.2":()=>ae(()=>import("./index.ab3b8d7a.js").then(function(e){return e.i}),[]),1.19:()=>ae(()=>import("./index.c663ea4d.js").then(function(e){return e.i}),[])};let ac,lc,or;async function Yo(e){return bn[e]||(bn[e]=(async()=>{try{const t=await U0[e](),n=t.getCollections(),r={};await L0(e,n,r);const i=t.getSchemas(n);return H0(i,n),bn[e]={collections:n,schemas:i,blockStates:r},bn[e]}catch(t){throw new Error(`Cannot get version "${e}": ${ct(t)}`)}})()),bn[e]}async function G0(e,t){var n;if(!xn[t]||xn[t].version!==e){const r=await Yo(e);ac=M.Reference(r.schemas,"configured_decorator"),lc=M.ChoiceNode([{type:"string",node:M.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:M.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const i=(n=he.generators.find(o=>o.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const o=r.schemas.get(i),s=new M.DataModel(o,{wrapLists:!0});xn[t]?s.reset(xn[t].model.data,!1):(s.validate(!0),s.history=[JSON.stringify(s.data)]),xn[t]={model:s,version:e}}catch(o){const s=new Error(`Cannot get generator "${t}" for version "${e}": ${ct(o)}`);throw o instanceof Error&&(s.stack=o.stack),s}}return xn[t].model}async function Y0(e){const t=await Yo(e);return or=t.collections,t.collections}async function W0(e){return(await Yo(e)).blockStates}function qe(e,t,n){const r=he.versions.findIndex(s=>s.id===e),i=t?he.versions.findIndex(s=>s.id===t):0,o=n?he.versions.findIndex(s=>s.id===n):he.versions.length-1;return i<=r&&r<=o}var cc={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function s(l,u){if(!o[l]){o[l]={};for(var c=0;c<l.length;c++)o[l][l.charAt(c)]=c}return o[l][u]}var a={compressToBase64:function(l){if(l==null)return"";var u=a._compress(l,6,function(c){return r.charAt(c)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:a._decompress(l.length,32,function(u){return s(r,l.charAt(u))})},compressToUTF16:function(l){return l==null?"":a._compress(l,15,function(u){return n(u+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:a._decompress(l.length,16384,function(u){return l.charCodeAt(u)-32})},compressToUint8Array:function(l){for(var u=a.compress(l),c=new Uint8Array(u.length*2),d=0,f=u.length;d<f;d++){var p=u.charCodeAt(d);c[d*2]=p>>>8,c[d*2+1]=p%256}return c},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var u=new Array(l.length/2),c=0,d=u.length;c<d;c++)u[c]=l[c*2]*256+l[c*2+1];var f=[];return u.forEach(function(p){f.push(n(p))}),a.decompress(f.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":a._compress(l,6,function(u){return i.charAt(u)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),a._decompress(l.length,32,function(u){return s(i,l.charAt(u))}))},compress:function(l){return a._compress(l,16,function(u){return n(u)})},_compress:function(l,u,c){if(l==null)return"";var d,f,p={},m={},v="",g="",_="",b=2,x=3,w=2,A=[],E=0,C=0,S;for(S=0;S<l.length;S+=1)if(v=l.charAt(S),Object.prototype.hasOwnProperty.call(p,v)||(p[v]=x++,m[v]=!0),g=_+v,Object.prototype.hasOwnProperty.call(p,g))_=g;else{if(Object.prototype.hasOwnProperty.call(m,_)){if(_.charCodeAt(0)<256){for(d=0;d<w;d++)E=E<<1,C==u-1?(C=0,A.push(c(E)),E=0):C++;for(f=_.charCodeAt(0),d=0;d<8;d++)E=E<<1|f&1,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=f>>1}else{for(f=1,d=0;d<w;d++)E=E<<1|f,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=0;for(f=_.charCodeAt(0),d=0;d<16;d++)E=E<<1|f&1,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=f>>1}b--,b==0&&(b=Math.pow(2,w),w++),delete m[_]}else for(f=p[_],d=0;d<w;d++)E=E<<1|f&1,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=f>>1;b--,b==0&&(b=Math.pow(2,w),w++),p[g]=x++,_=String(v)}if(_!==""){if(Object.prototype.hasOwnProperty.call(m,_)){if(_.charCodeAt(0)<256){for(d=0;d<w;d++)E=E<<1,C==u-1?(C=0,A.push(c(E)),E=0):C++;for(f=_.charCodeAt(0),d=0;d<8;d++)E=E<<1|f&1,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=f>>1}else{for(f=1,d=0;d<w;d++)E=E<<1|f,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=0;for(f=_.charCodeAt(0),d=0;d<16;d++)E=E<<1|f&1,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=f>>1}b--,b==0&&(b=Math.pow(2,w),w++),delete m[_]}else for(f=p[_],d=0;d<w;d++)E=E<<1|f&1,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=f>>1;b--,b==0&&(b=Math.pow(2,w),w++)}for(f=2,d=0;d<w;d++)E=E<<1|f&1,C==u-1?(C=0,A.push(c(E)),E=0):C++,f=f>>1;for(;;)if(E=E<<1,C==u-1){A.push(c(E));break}else C++;return A.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(u){return l.charCodeAt(u)})},_decompress:function(l,u,c){var d=[],f=4,p=4,m=3,v="",g=[],_,b,x,w,A,E,C,S={val:c(0),position:u,index:1};for(_=0;_<3;_+=1)d[_]=_;for(x=0,A=Math.pow(2,2),E=1;E!=A;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),x|=(w>0?1:0)*E,E<<=1;switch(x){case 0:for(x=0,A=Math.pow(2,8),E=1;E!=A;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),x|=(w>0?1:0)*E,E<<=1;C=n(x);break;case 1:for(x=0,A=Math.pow(2,16),E=1;E!=A;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),x|=(w>0?1:0)*E,E<<=1;C=n(x);break;case 2:return""}for(d[3]=C,b=C,g.push(C);;){if(S.index>l)return"";for(x=0,A=Math.pow(2,m),E=1;E!=A;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),x|=(w>0?1:0)*E,E<<=1;switch(C=x){case 0:for(x=0,A=Math.pow(2,8),E=1;E!=A;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),x|=(w>0?1:0)*E,E<<=1;d[p++]=n(x),C=p-1,f--;break;case 1:for(x=0,A=Math.pow(2,16),E=1;E!=A;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),x|=(w>0?1:0)*E,E<<=1;d[p++]=n(x),C=p-1,f--;break;case 2:return g.join("")}if(f==0&&(f=Math.pow(2,m),m++),d[C])v=d[C];else if(C===p)v=b+b.charAt(0);else return null;g.push(v),d[p++]=b+v.charAt(0),f--,b=v,f==0&&(f=Math.pow(2,m),m++)}}};return a}();e!=null&&(e.exports=t)})(cc);var uc=cc.exports;const q0="https://z15g7can.directus.app/items",Ks=new Map;async function Z0(e,t,n,r){try{const i=JSON.stringify(n),o=uc.compressToBase64(i);console.log("Compression rate",i.length/i.length);const s=JSON.stringify({data:o,type:e,version:t,show_preview:r});let a=Ks.get(s);if(!a){const l=await dc("/snippets",s);Ks.set(s,l.id),a=l.id}return{id:a,length:i.length,compressed:o.length,rate:i.length/o.length}}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function X0(e){var t;try{const n=await dc(`/snippets/${e}`);return ge(Z({},n),{data:JSON.parse((t=uc.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function dc(e,t){var i,o,s;const r=await(await fetch(q0+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((s=(o=(i=r.errors)==null?void 0:i[0])==null?void 0:o.message)!=null?s:"Unknown error")}var Ne;(e=>{e.ID_LANGUAGE="language",e.ID_THEME="theme",e.ID_VERSION="schema_version",e.ID_INDENT="indentation",e.ID_FORMAT="output_format",e.ID_HIGHLIGHTING="output_highlighting",e.ID_SOUNDS_VERSION="minecraft_sounds_version",e.ID_PROJECTS="misode_projects",e.ID_BACKUPS="misode_generator_backups";function t(){var w;return(w=localStorage.getItem(e.ID_LANGUAGE))!=null?w:"en"}e.getLanguage=t;function n(){var w;return(w=localStorage.getItem(e.ID_THEME))!=null?w:"dark"}e.getTheme=n;function r(){const w=localStorage.getItem(e.ID_VERSION);return w&&wo.includes(w)?w:"1.19"}e.getVersionOrDefault=r;function i(){const w=localStorage.getItem(e.ID_VERSION);return w&&wo.includes(w)?w:null}e.getVersion=i;function o(){var w;return(w=localStorage.getItem(e.ID_INDENT))!=null?w:"2_spaces"}e.getIndent=o;function s(){var w;return(w=localStorage.getItem(e.ID_FORMAT))!=null?w:"json"}e.getFormat=s;function a(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=a;function l(){var w;return(w=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?w:"latest"}e.getSoundsVersion=l;function u(){const w=localStorage.getItem(e.ID_PROJECTS);return w?JSON.parse(w):[fr]}e.getProjects=u;function c(w){var E;return JSON.parse((E=localStorage.getItem(e.ID_BACKUPS))!=null?E:"{}")[w]}e.getBackup=c;function d(w){w&&localStorage.setItem(e.ID_LANGUAGE,w)}e.setLanguage=d;function f(w){w&&localStorage.setItem(e.ID_THEME,w)}e.setTheme=f;function p(w){w&&localStorage.setItem(e.ID_VERSION,w)}e.setVersion=p;function m(w){w&&localStorage.setItem(e.ID_INDENT,w)}e.setIndent=m;function v(w){w&&localStorage.setItem(e.ID_FORMAT,w)}e.setFormat=v;function g(w){w!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,w.toString())}e.setHighlighting=g;function _(w){w&&localStorage.setItem(e.ID_SOUNDS_VERSION,w)}e.setSoundsVersion=_;function b(w){w&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(w))}e.setProjects=b;function x(w,A){var C;const E=JSON.parse((C=localStorage.getItem(e.ID_BACKUPS))!=null?C:"{}");A===void 0?delete E[w]:E[w]=A,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(E))}e.setBackup=x})(Ne||(Ne={}));function J0(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return ae(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return ae(()=>import("./de.489974c1.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return ae(()=>import("./en.48a63f6e.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return ae(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return ae(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return ae(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return ae(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return ae(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return ae(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return ae(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return ae(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return ae(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return ae(()=>import("./zh-tw.bdc36a24.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}function K0(e){switch(e){case"../../locales/de.json":return ae(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return ae(()=>Promise.resolve().then(function(){return C0}),void 0);case"../../locales/es.json":return ae(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return ae(()=>import("./fr.0a72aa90.js"),[]);case"../../locales/it.json":return ae(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return ae(()=>import("./ja.167de97b.js"),[]);case"../../locales/pl.json":return ae(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return ae(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return ae(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return ae(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return ae(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return ae(()=>import("./zh-tw.42e9d37d.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}const hc=pn({lang:"none",locale:e=>e,changeLocale:()=>{}}),sr={fallback:nc};function de(e,t,...n){var i,o,s,a,l;const r=(l=(a=(s=(i=sr[e])==null?void 0:i[t])!=null?s:(o=sr.en)==null?void 0:o[t])!=null?a:sr.fallback[t])!=null?l:t;return Q0(r,n)}function Q0(e,t){return e.replace(/%\d+%/g,n=>{const r=parseInt(n.slice(1,-1));return(t==null?void 0:t[r])!==void 0?t[r]:n})}async function Qi(e){if(sr[e])return;const t=he.languages.find(o=>o.code===e);if(!t)return;const n=await K0(`../../locales/${e}.json`),r=t.schemas!==!1&&await J0(`../../../node_modules/@mcschema/locales/src/${e}.json`);let i={default:{}};e==="en"&&(i=await ae(()=>import("./en.321d8b56.js"),[])),sr[e]=Z(Z(Z({},n.default),r.default),i.default)}function Ee(){return gn(hc)}function ep({children:e}){const[t,n]=D("none"),r=Ce((s,...a)=>de(t,s,...a),[t]),i=Ce(async s=>{await Qi(s),_e.changeLocale(t,s),Ne.setLanguage(s),n(s)},[t]);Q(()=>{(async()=>{const s=Ne.getLanguage();_e.setLocale(s),await Promise.all([Qi("en"),...s!=="en"?[Qi(s)]:[]]),n(s)})()},[]);const o={lang:t,locale:r,changeLocale:i};return h(hc.Provider,{value:o},e)}const fr={name:"Drafts",namespace:"draft",files:[]},fc=pn({projects:[fr],project:fr,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function pc(){return gn(fc)}function tp({children:e}){const[t,n]=D(Ne.getProjects()),[r,i]=D(fr.name),o=xe(()=>{var v;return(v=t.find(g=>g.name===r))!=null?v:fr},[t,r]),[s,a]=D(void 0),l=xe(()=>{if(!!s)return o.files.find(v=>v.type===s[0]&&v.id===s[1])},[o,s]),u=Ce(v=>{Ne.setProjects(v),n(v)},[]),c=Ce(v=>{u(t.map(g=>g.name===r?Z(Z({},g),v):g))},[t,r]),d=Ce((v,g,_)=>{var b;if(!_.id)c({files:o.files.filter(x=>x.type!==v||x.id!==g)});else{const x=_.id.includes(":")?_.id:`${o.namespace}:${_.id}`,w=o.files.some(A=>A.type===v&&A.id===x);if(g){if((l==null?void 0:l.id)===g&&g!==x&&w)return!1;c({files:o.files.map(A=>A.type===v&&A.id===g?ge(Z(Z({},A),_),{id:x}):A)}),(l==null?void 0:l.id)===g&&a([v,x])}else{if(w)return!1;c({files:[...o.files,{type:v,id:x,data:(b=_.data)!=null?b:{}}]}),a([v,x])}}return!0},[c,o,l]),f=Ce((v,g)=>{const _=he.generators.find(b=>b.id===v||b.path===v);if(!_)throw new Error(`Cannot find generator of type ${v}`);a([_.id,g]),Jt(It(_.url))},[]),p=Ce(()=>{a(void 0)},[]),m={projects:t,project:o,file:l,changeProject:i,updateProject:c,updateFile:d,openFile:f,closeFile:p};return h(fc.Provider,{value:m},e)}function np(e){var i;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id];if(e.type==="pack_mcmeta")return"pack.mcmeta";const r=he.generators.find(o=>o.id===e.type);if(!r){console.error(`Cannot find generator of type ${e.type}`);return}return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}`}const mc=pn({biomeColors:{},setBiomeColor:()=>{}});function gc(){return gn(mc)}function rp({children:e}){const[t,n]=k0("misode_biome_colors",{},JSON.parse,JSON.stringify),r=Ce((o,s)=>{n(ge(Z({},t),{[o]:s}))},[t]),i={biomeColors:t,setBiomeColor:r};return h(mc.Provider,{value:i},e)}const _c=pn({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function vc(){return gn(_c)}function ip({children:e}){const[t,n]=D(Ne.getTheme()),r=Ys("(prefers-color-scheme: light)"),i=Ys("(prefers-color-scheme: dark)");Q(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const o=Ce(a=>{_e.changeTheme(t,a),Ne.setTheme(a),n(a)},[t]);Q(()=>{_e.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]),Q(()=>{_e.setTheme(t)},[]);const s={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:o};return h(_c.Provider,{value:s},e)}const op=3,wc=pn({title:"",changeTitle:()=>{}});function ut(e,t,n){const r=gn(wc);return Q(()=>{e&&r.changeTitle(e,t,n)},[e,t,n]),r}function sp({children:e}){const{locale:t}=Ee(),[n,r]=D(t("title.home")),i=Ce((s,a,l)=>{let u=he.versions;a!==void 0&&(u=he.versions.filter(d=>a==null?void 0:a.includes(d.id)));let c="";l&&(c=` - ${l}`),(a==null?void 0:a.length)!==0&&(c=` - Minecraft ${u.map(f=>f.id).slice(-op).join(", ")}`),document.title=s+c,r(s)},[]),o={title:n,changeTitle:i};return h(wc.Provider,{value:o},e)}const ap="version",yc=pn({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function Wn(){return gn(yc)}function lp({children:e}){const[t,n]=D(Ne.getVersionOrDefault()),[r,i]=un(ap);Q(()=>{wo.includes(r)&&t!==r&&(_e.setVersion(r),n(r))},[t,r]);const o=Ce((a,l=!0,u=!1)=>{(u||r)&&i(a,!0),l&&(_e.changeVersion(t,a),Ne.setVersion(a)),n(a)},[t,r]);Q(()=>{var a;_e.setVersion(t),_e.setSelectedVersion((a=Ne.getVersion())!=null?a:"default")},[]);const s={version:t,changeVersion:o,changeTargetVersion:i};return h(yc.Provider,{value:s},e)}function Wt({donate:e}){const{locale:t}=Ee();return h("footer",null,h("p",null,h("span",null,t("developed_by")," ",h("a",{href:"https://github.com/misode",target:"_blank",rel:"noreferrer"},"Misode"))),e!==!1&&h("p",{class:"donate"},te.heart,h("a",{href:"https://ko-fi.com/misode",target:"_blank",rel:"noreferrer"},t("donate"))),h("p",null,te.mark_github,h("span",null,t("source_code_on")," ",h("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer"},t("github")))))}function cp({label:e,value:t,onChange:n}){const r=sn();return h("label",{class:"checkbox"},h("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function Wo(e,t,n){const r=i=>{const o=i.onChange&&(a=>{var u;const l=a.target.value;(u=i.onChange)==null||u.call(i,n(l))}),s=i.onEnter&&(a=>{var l;if(a.key==="Enter"){const u=a.target.value;(l=i.onEnter)==null||l.call(i,n(u))}});return h("input",ge(Z({},i),{type:t,onChange:o,onKeyDown:s}))};return r.displayName=e,r}const dn=Wo("TextInput","text",e=>e),up=Wo("NumberInput","number",e=>Number(e)),Qs=Wo("RangeInput","range",e=>Number(e));function ea({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,o]=D(""),s=xe(()=>{var l;const a=i.trim().split(" ");return(l=e==null?void 0:e.filter(u=>a.every(c=>u.includes(c))))!=null?l:[]},[e,i]);return h(ne,null,h(Qr,{icon:"search",large:!0,value:i,onChange:o,doSelect:1,placeholder:n!=null?n:"Search"}),h("div",{class:"result-list"},s.map(a=>h(K,{key:a,label:a,onClick:()=>t==null?void 0:t(a)})),s.length===0&&h(K,{label:r!=null?r:"No results"})))}let ie,bc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});bc.decode();let zr=null;function dp(){return(zr===null||zr.buffer!==ie.memory.buffer)&&(zr=new Uint8Array(ie.memory.buffer)),zr}function hp(e,t){return bc.decode(dp().subarray(e,e+t))}const yo=new Uint32Array(2),fp=new BigInt64Array(yo.buffer);let jr=null;function pr(){return(jr===null||jr.buffer!==ie.memory.buffer)&&(jr=new Int32Array(ie.memory.buffer)),jr}let Vr=null;function xc(){return(Vr===null||Vr.buffer!==ie.memory.buffer)&&(Vr=new Float64Array(ie.memory.buffer)),Vr}function pp(e,t){return xc().subarray(e/8,e/8+t)}let Me=0;function Re(e,t){const n=t(e.length*8);return xc().set(e,n/8),Me=e.length,n}let Hr=null;function mp(){return(Hr===null||Hr.buffer!==ie.memory.buffer)&&(Hr=new Uint32Array(ie.memory.buffer)),Hr}function gp(e,t){const n=t(e.length*4);return mp().set(e,n/4),Me=e.length,n}function _p(e,t,n,r,i,o,s,a,l,u,c,d,f,p){var m=Re(e,ie.__wbindgen_malloc),v=Me,g=Re(t,ie.__wbindgen_malloc),_=Me,b=Re(n,ie.__wbindgen_malloc),x=Me,w=Re(r,ie.__wbindgen_malloc),A=Me,E=Re(i,ie.__wbindgen_malloc),C=Me,S=Re(o,ie.__wbindgen_malloc),I=Me,O=Re(s,ie.__wbindgen_malloc),R=Me,F=Re(a,ie.__wbindgen_malloc),j=Me,oe=Re(l,ie.__wbindgen_malloc),le=Me,N=Re(u,ie.__wbindgen_malloc),$=Me,H=Re(c,ie.__wbindgen_malloc),T=Me,y=Re(d,ie.__wbindgen_malloc),k=Me,L=Re(f,ie.__wbindgen_malloc),z=Me,Y=gp(p,ie.__wbindgen_malloc),ue=Me,Ue=ie.biome_parameters(m,v,g,_,b,x,w,A,E,C,S,I,O,R,F,j,oe,le,N,$,H,T,y,k,L,z,Y,ue);return Di.__wrap(Ue)}function vp(e,t,n,r,i,o,s,a,l,u,c,d,f){fp[0]=e;const p=yo[0],m=yo[1];var v=Re(n,ie.__wbindgen_malloc),g=Me,_=Re(i,ie.__wbindgen_malloc),b=Me,x=Re(s,ie.__wbindgen_malloc),w=Me,A=Re(l,ie.__wbindgen_malloc),E=Me,C=Re(c,ie.__wbindgen_malloc),S=Me,I=Re(f,ie.__wbindgen_malloc),O=Me,R=ie.climate_sampler(p,m,t,v,g,r,_,b,o,x,w,a,A,E,u,C,S,d,I,O);return Lr.__wrap(R)}function bo(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function wp(e,t){return pr().subarray(e/4,e/4+t)}function ta(e,t,n,r,i,o,s,a,l,u,c){try{const m=ie.__wbindgen_add_to_stack_pointer(-16);bo(e,Di),bo(t,Lr),ie.multi_noise(m,e.ptr,t.ptr,n,r,i,o,s,a,l,u,c);var d=pr()[m/4+0],f=pr()[m/4+1],p=wp(d,f).slice();return ie.__wbindgen_free(d,f*4),p}finally{ie.__wbindgen_add_to_stack_pointer(16)}}function na(e,t,n,r,i,o,s,a,l,u){try{const p=ie.__wbindgen_add_to_stack_pointer(-16);bo(e,Lr),ie.climate_noise(p,e.ptr,t,n,r,i,o,s,a,l,u);var c=pr()[p/4+0],d=pr()[p/4+1],f=pp(c,d).slice();return ie.__wbindgen_free(c,d*8),f}finally{ie.__wbindgen_add_to_stack_pointer(16)}}class Di{static __wrap(t){const n=Object.create(Di.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();ie.__wbg_parameterlist_free(t)}}class Lr{static __wrap(t){const n=Object.create(Lr.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();ie.__wbg_sampler_free(t)}}async function yp(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}async function Ac(e){typeof e=="undefined"&&(e=new URL("/assets/deepslate_rs_bg.4990c219.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_throw=function(i,o){throw new Error(hp(i,o))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await yp(await e,t);return ie=n.exports,Ac.__wbindgen_wasm_module=r,ie}var ra="/assets/deepslate_rs_bg.4990c219.wasm",kc={exports:{}},Sc={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,o=0;i<n.length;i++,o+=8)r[o>>>5]|=n[i]<<24-o%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i<n.length*32;i+=8)r.push(n[i>>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i<n.length;i++)r.push((n[i]>>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substr(i,2),16));return r},bytesToBase64:function(n){for(var r=[],i=0;i<n.length;i+=3)for(var o=n[i]<<16|n[i+1]<<8|n[i+2],s=0;s<4;s++)i*8+s*6<=n.length*8?r.push(e.charAt(o>>>6*(3-s)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,o=0;i<n.length;o=++i%4)o!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*o+8)-1)<<o*2|e.indexOf(n.charAt(i))>>>6-o*2);return r}};Sc.exports=t})();var xo={utf8:{stringToBytes:function(e){return xo.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(xo.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n)&255);return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},ia=xo;/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var bp=function(e){return e!=null&&(Ec(e)||xp(e)||!!e._isBuffer)};function Ec(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function xp(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Ec(e.slice(0,0))}(function(){var e=Sc.exports,t=ia.utf8,n=bp,r=ia.bin,i=function(o,s){o.constructor==String?s&&s.encoding==="binary"?o=r.stringToBytes(o):o=t.stringToBytes(o):n(o)?o=Array.prototype.slice.call(o,0):!Array.isArray(o)&&o.constructor!==Uint8Array&&(o=o.toString());for(var a=e.bytesToWords(o),l=o.length*8,u=1732584193,c=-271733879,d=-1732584194,f=271733878,p=0;p<a.length;p++)a[p]=(a[p]<<8|a[p]>>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360;a[l>>>5]|=128<<l%32,a[(l+64>>>9<<4)+14]=l;for(var m=i._ff,v=i._gg,g=i._hh,_=i._ii,p=0;p<a.length;p+=16){var b=u,x=c,w=d,A=f;u=m(u,c,d,f,a[p+0],7,-680876936),f=m(f,u,c,d,a[p+1],12,-389564586),d=m(d,f,u,c,a[p+2],17,606105819),c=m(c,d,f,u,a[p+3],22,-1044525330),u=m(u,c,d,f,a[p+4],7,-176418897),f=m(f,u,c,d,a[p+5],12,1200080426),d=m(d,f,u,c,a[p+6],17,-1473231341),c=m(c,d,f,u,a[p+7],22,-45705983),u=m(u,c,d,f,a[p+8],7,1770035416),f=m(f,u,c,d,a[p+9],12,-1958414417),d=m(d,f,u,c,a[p+10],17,-42063),c=m(c,d,f,u,a[p+11],22,-1990404162),u=m(u,c,d,f,a[p+12],7,1804603682),f=m(f,u,c,d,a[p+13],12,-40341101),d=m(d,f,u,c,a[p+14],17,-1502002290),c=m(c,d,f,u,a[p+15],22,1236535329),u=v(u,c,d,f,a[p+1],5,-165796510),f=v(f,u,c,d,a[p+6],9,-1069501632),d=v(d,f,u,c,a[p+11],14,643717713),c=v(c,d,f,u,a[p+0],20,-373897302),u=v(u,c,d,f,a[p+5],5,-701558691),f=v(f,u,c,d,a[p+10],9,38016083),d=v(d,f,u,c,a[p+15],14,-660478335),c=v(c,d,f,u,a[p+4],20,-405537848),u=v(u,c,d,f,a[p+9],5,568446438),f=v(f,u,c,d,a[p+14],9,-1019803690),d=v(d,f,u,c,a[p+3],14,-187363961),c=v(c,d,f,u,a[p+8],20,1163531501),u=v(u,c,d,f,a[p+13],5,-1444681467),f=v(f,u,c,d,a[p+2],9,-51403784),d=v(d,f,u,c,a[p+7],14,1735328473),c=v(c,d,f,u,a[p+12],20,-1926607734),u=g(u,c,d,f,a[p+5],4,-378558),f=g(f,u,c,d,a[p+8],11,-2022574463),d=g(d,f,u,c,a[p+11],16,1839030562),c=g(c,d,f,u,a[p+14],23,-35309556),u=g(u,c,d,f,a[p+1],4,-1530992060),f=g(f,u,c,d,a[p+4],11,1272893353),d=g(d,f,u,c,a[p+7],16,-155497632),c=g(c,d,f,u,a[p+10],23,-1094730640),u=g(u,c,d,f,a[p+13],4,681279174),f=g(f,u,c,d,a[p+0],11,-358537222),d=g(d,f,u,c,a[p+3],16,-722521979),c=g(c,d,f,u,a[p+6],23,76029189),u=g(u,c,d,f,a[p+9],4,-640364487),f=g(f,u,c,d,a[p+12],11,-421815835),d=g(d,f,u,c,a[p+15],16,530742520),c=g(c,d,f,u,a[p+2],23,-995338651),u=_(u,c,d,f,a[p+0],6,-198630844),f=_(f,u,c,d,a[p+7],10,1126891415),d=_(d,f,u,c,a[p+14],15,-1416354905),c=_(c,d,f,u,a[p+5],21,-57434055),u=_(u,c,d,f,a[p+12],6,1700485571),f=_(f,u,c,d,a[p+3],10,-1894986606),d=_(d,f,u,c,a[p+10],15,-1051523),c=_(c,d,f,u,a[p+1],21,-2054922799),u=_(u,c,d,f,a[p+8],6,1873313359),f=_(f,u,c,d,a[p+15],10,-30611744),d=_(d,f,u,c,a[p+6],15,-1560198380),c=_(c,d,f,u,a[p+13],21,1309151649),u=_(u,c,d,f,a[p+4],6,-145523070),f=_(f,u,c,d,a[p+11],10,-1120210379),d=_(d,f,u,c,a[p+2],15,718787259),c=_(c,d,f,u,a[p+9],21,-343485551),u=u+b>>>0,c=c+x>>>0,d=d+w>>>0,f=f+A>>>0}return e.endian([u,c,d,f])};i._ff=function(o,s,a,l,u,c,d){var f=o+(s&a|~s&l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._gg=function(o,s,a,l,u,c,d){var f=o+(s&l|a&~l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._hh=function(o,s,a,l,u,c,d){var f=o+(s^a^l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._ii=function(o,s,a,l,u,c,d){var f=o+(a^(s|~l))+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._blocksize=16,i._digestsize=16,kc.exports=function(o,s){if(o==null)throw new Error("Illegal argument "+o);var a=e.wordsToBytes(i(o,s));return s&&s.asBytes?a:s&&s.asString?r.bytesToString(a):e.bytesToHex(a)}})();var Cc=kc.exports,P;(function(e){function t(c){return typeof c=="number"?c:void 0}e.readNumber=t;function n(c){return typeof c=="number"?Math.floor(c):void 0}e.readInt=n;function r(c){return typeof c=="string"?c:void 0}e.readString=r;function i(c){return typeof c=="boolean"?c:void 0}e.readBoolean=i;function o(c){return typeof c=="object"&&c!==null?c:void 0}e.readObject=o;function s(c,d){if(!!Array.isArray(c))return c.map(f=>d(f))}e.readArray=s;function a(c,d){var p;const f=(p=o(c))!=null?p:{};return Object.fromEntries(Object.entries(f).map(([m,v])=>[m,d(v)]))}e.readMap=a;function l(c,d,f){const p=d(c);return p?f(p):void 0}e.compose=l;function u(c,d){return typeof c!="string"?d[0]:d.includes(c)?c:d[0]}e.readEnum=u})(P||(P={}));function ar(e){let t=null;return()=>(t==null&&(t=e()),t)}function Rr(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}function Tt(e){return e*e}function mr(e,t,n){return Math.max(t,Math.min(n,e))}function zt(e,t,n){return t+e*(n-t)}function fi(e,t,n,r,i,o){return zt(t,zt(e,n,r),zt(e,i,o))}function Ic(e,t,n,r,i,o,s,a,l,u,c){return zt(n,fi(e,t,r,i,o,s),fi(e,t,a,l,u,c))}function lr(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function Ao(e,t,n,r,i,o){return lr(t,()=>lr(e,n,r),()=>lr(e,i,o))}function Mc(e,t,n,r,i,o,s,a,l,u,c){return lr(n,()=>Ao(e,t,r,i,o,s),()=>Ao(e,t,a,l,u,c))}function Bi(e,t,n){return n<0?e:n>1?t:zt(n,e,t)}function qo(e,t,n){return(e-t)/(n-t)}function ei(e){return e*e*e*(e*(e*6-15)+10)}function gr(e,t,n,r,i){return zt(qo(e,t,n),r,i)}function Fi(e,t,n,r,i){return Bi(r,i,qo(e,t,n))}function Oc(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),o=e+i;if(n(o)){r=i;continue}e=o+1,r-=i+1}return e}function Zo(e,t,n){let r=BigInt(e*3129871)^BigInt(n)*BigInt(116129781)^BigInt(t);return r=r*r*BigInt(42317861)+r*BigInt(11),r>>BigInt(16)}function pi(e,t,n,r,i,o,s,a){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(o)<<BigInt(16)|BigInt(s)<<BigInt(8)|BigInt(a)}function Ap(e){return(e&e-1)===0}function kp(e){return e-=1,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>18,e|=e>>32,e+1}var mi;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(mi||(mi={}));var gi;(function(e){function t(i,o){var u,c,d,f;if(typeof i=="number")return new n(i);const s=(u=P.readObject(i))!=null?u:{},a=new r(o(s.coordinate)),l=(c=P.readArray(s.points,p=>{var m;return(m=P.readObject(p))!=null?m:{}}))!=null?c:[];if(l.length===0)return new n(0);for(const p of l){const m=(d=P.readNumber(p.location))!=null?d:0,v=t(p.value,o),g=(f=P.readNumber(p.derivative))!=null?f:0;a.addPoint(m,v,g)}return a}e.fromJson=t;class n{constructor(o){this.value=o}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(o,s=[],a=[],l=[]){this.coordinate=o,this.locations=s,this.values=a,this.derivatives=l,this.calculatedMin=Number.NEGATIVE_INFINITY,this.calculatedMax=Number.POSITIVE_INFINITY}compute(o){const s=this.coordinate.compute(o),a=Oc(0,this.locations.length,x=>s<this.locations[x])-1,l=this.locations.length-1;if(a<0)return this.values[0].compute(o)+this.derivatives[0]*(s-this.locations[0]);if(a===l)return this.values[l].compute(o)+this.derivatives[l]*(s-this.locations[l]);const u=this.locations[a],c=this.locations[a+1],d=this.derivatives[a],f=this.derivatives[a+1],p=(s-u)/(c-u),m=this.values[a].compute(o),v=this.values[a+1].compute(o),g=d*(c-u)-(v-m),_=-f*(c-u)+(v-m);return zt(p,m,v)+p*(1-p)*zt(p,g,_)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(o){return new r(o(this.coordinate),this.locations,this.values.map(s=>s.mapAll(o)),this.derivatives)}addPoint(o,s,a=0){return this.locations.push(o),this.values.push(typeof s=="number"?new e.Constant(s):s),this.derivatives.push(a),this}calculateMinMax(){if(!mi.is(this.coordinate))return;const o=this.locations.length-1;var s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),u=this.coordinate.maxValue();for(const d of this.values)d.calculateMinMax();if(l<this.locations[0]){const d=r.linearExtend(l,this.locations,this.values[0].min(),this.derivatives,0),f=r.linearExtend(l,this.locations,this.values[0].max(),this.derivatives,0);s=Math.min(s,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}if(u>this.locations[o]){const d=r.linearExtend(u,this.locations,this.values[o].min(),this.derivatives,o),f=r.linearExtend(u,this.locations,this.values[o].max(),this.derivatives,o);s=Math.min(s,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}for(const d of this.values)s=Math.min(s,d.min()),a=Math.max(a,d.max());for(var c=0;c<o;++c){const d=this.locations[c],p=this.locations[c+1]-d,m=this.values[c],v=this.values[c+1],g=m.min(),_=m.max(),b=v.min(),x=v.max(),w=this.derivatives[c],A=this.derivatives[c+1];if(w!==0||A!==0){const E=w*p,C=A*p,S=Math.min(g,b),I=Math.max(_,x),O=E-x+g,R=E-b+_,F=-C+b-_,j=-C+x-g,oe=Math.min(O,F),le=Math.max(R,j);s=Math.min(s,S+.25*oe),a=Math.max(a,I+.25*le)}}this.calculatedMin=s,this.calculatedMax=a}static linearExtend(o,s,a,l,u){const c=l[u];return c==0?a:a+c*(o-s[u])}}e.MultiPoint=r})(gi||(gi={}));const At=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new At(this.nextLong())}forkPositional(){return new Nc(this.nextLong())}setSeed(e){this.seed=e^At.MULTIPLIER&At.MODULUS_MASK}advance(){this.seed=this.seed*At.MULTIPLIER+At.INCREMENT&At.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(At.MODULUS_BITS-e));return t>2147483647?t-4294967296:t}nextInt(e){if(e===void 0)return this.next(32);if((e&e-1)==0)return Number(BigInt(e)*BigInt(this.next(31))>>BigInt(31));let t,n;for(;(t=this.next(31))-(n=t%e)+(e-1)<0;);return n}nextLong(){return(BigInt(this.next(32))<<BigInt(32))+BigInt(this.next(32))}nextFloat(){return this.next(24)*At.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*At.DOUBLE_MULTIPLIER}};let et=At;et.MODULUS_BITS=48;et.MODULUS_MASK=BigInt("281474976710655");et.MULTIPLIER=BigInt("25214903917");et.INCREMENT=BigInt("11");et.FLOAT_MULTIPLIER=1/Math.pow(2,24);et.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class Nc{constructor(t){this.seed=t}at(t,n,r){const i=Zo(t,n,r);return new et(i^this.seed)}fromHashOf(t){const n=Cc(t,{asBytes:!0}),r=pi(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new et(r^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const ee=class{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new ee(ee.upgradeSeedTo128bit(e))}static mixStafford13(e){return e=(e^e>>ee.BIGINT_30)*ee.STAFFORD_1&ee.MAX_ULONG,e=(e^e>>ee.BIGINT_27)*ee.STAFFORD_2&ee.MAX_ULONG,(e^e>>ee.BIGINT_31)&ee.MAX_ULONG}static upgradeSeedTo128bit(e){e<0&&(e+=ee.POW2_60);const t=e^ee.SILVER_RATIO_64,n=t+ee.GOLDEN_RATIO_64&ee.MAX_ULONG;return[ee.mixStafford13(t),ee.mixStafford13(n)]}static rotateLeft(e,t){return e<<t&ee.MAX_ULONG|e>>ee.BIGINT_64-t}setSeed(e){this.seed=ee.upgradeSeedTo128bit(e)}fork(){return new ee([this.next(),this.next()])}forkPositional(){return new Tc(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const n=ee.rotateLeft(e+t&ee.MAX_ULONG,ee.BIGINT_17)+e&ee.MAX_ULONG;return t^=e,this.seed=[ee.rotateLeft(e,ee.BIGINT_49)^t^t<<ee.BIGINT_21&ee.MAX_ULONG,ee.rotateLeft(t,ee.BIGINT_28)],n}nextLong(){let e=this.next();return e>ee.POW2_63&&(e-=ee.POW2_60),e}consume(e){let t=this.seed[0],n=this.seed[1];for(let r=0;r<e;r+=1)n^=t,t=ee.rotateLeft(t,ee.BIGINT_49)^n^n<<ee.BIGINT_21,n=ee.rotateLeft(n,ee.BIGINT_28);this.seed=[t,n]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&ee.MAX_UINT;if(e){const n=BigInt(e);let r=t*n,i=r&ee.MAX_UINT;if(i<n){const s=((~n&ee.MAX_UINT)+ee.BIGINT_1)%n;for(;i<s;)t=this.next()&ee.MAX_UINT,r=t*n,i=r&ee.MAX_UINT}const o=r>>ee.BIGINT_32;return Number(o)}else{let n=Number(t);return n>=2147483648&&(n-=4294967296),n}}nextFloat(){return Number(this.nextBits(24))*ee.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*ee.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let Se=ee;Se.SILVER_RATIO_64=BigInt("7640891576956012809");Se.GOLDEN_RATIO_64=BigInt("-7046029254386353131");Se.FLOAT_MULTIPLIER=1/Math.pow(2,24);Se.DOUBLE_MULTIPLIER=11102230246251565e-32;Se.BIGINT_1=BigInt(1);Se.BIGINT_17=BigInt(17);Se.BIGINT_21=BigInt(21);Se.BIGINT_27=BigInt(27);Se.BIGINT_28=BigInt(28);Se.BIGINT_30=BigInt(30);Se.BIGINT_31=BigInt(31);Se.BIGINT_32=BigInt(32);Se.BIGINT_49=BigInt(49);Se.BIGINT_64=BigInt(64);Se.STAFFORD_1=BigInt("-4658895280553007687");Se.STAFFORD_2=BigInt("-7723592293110705685");Se.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF");Se.POW2_60=BigInt("0x10000000000000000");Se.POW2_63=BigInt("0x8000000000000000");Se.MAX_UINT=BigInt(4294967295);class Tc{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,r){const o=Zo(t,n,r)^this.seedLo;return new Se([o,this.seedHi])}fromHashOf(t){const n=Cc(t,{asBytes:!0}),r=pi(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=pi(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new Se([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const Lt=class{constructor(e){this.xo=e.nextDouble()*256,this.yo=e.nextDouble()*256,this.zo=e.nextDouble()*256,this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t;for(let t=0;t<256;t+=1){const n=e.nextInt(256-t),r=this.p[t];this.p[t]=this.p[t+n],this.p[t+n]=r}}sample2D(e,t){let n,r,i;const o=(e+t)*Lt.F2,s=Math.floor(e+o),a=s-(n=(s+(r=Math.floor(t+o)))*Lt.G2),l=e-a;let u,c;l>(i=t-(r-n))?(u=1,c=0):(u=0,c=1);const d=l-u+Lt.G2,f=i-c+Lt.G2,p=l-1+2*Lt.G2,m=i-1+2*Lt.G2,v=s&255,g=r&255,_=this.P(v+this.P(g))%12,b=this.P(v+u+this.P(g+c))%12,x=this.P(v+1+this.P(g+1))%12,w=this.getCornerNoise3D(_,l,i,0,.5),A=this.getCornerNoise3D(b,d,f,0,.5),E=this.getCornerNoise3D(x,p,m,0,.5);return 70*(w+A+E)}sample(e,t,n){const r=(e+t+n)*.3333333333333333,i=Math.floor(e+r),o=Math.floor(t+r),s=Math.floor(n+r),a=(i+o+s)*.16666666666666666,l=e-(i-a),u=t-(o-a),c=n-(s-a);let d,f,p,m,v,g;l>=u?u>=c?(d=1,f=0,p=0,m=1,v=1,g=0):l>=c?(d=1,f=0,p=0,m=1,v=0,g=1):(d=0,f=0,p=1,m=1,v=0,g=1):u<c?(d=0,f=0,p=1,m=0,v=1,g=1):l<c?(d=0,f=1,p=0,m=0,v=1,g=1):(d=0,f=1,p=0,m=1,v=1,g=0);const _=l-d+.16666666666666666,b=u-f+.16666666666666666,x=c-p+.16666666666666666,w=l-m+.3333333333333333,A=u-v+.3333333333333333,E=c-g+.3333333333333333,C=l-.5,S=u-.5,I=c-.5,O=i&255,R=o&255,F=s&255,j=this.P(O+this.P(R+this.P(F)))%12,oe=this.P(O+d+this.P(R+f+this.P(F+p)))%12,le=this.P(O+m+this.P(R+v+this.P(F+g)))%12,N=this.P(O+1+this.P(R+1+this.P(F+1)))%12,$=this.getCornerNoise3D(j,l,u,c,.6),H=this.getCornerNoise3D(oe,_,b,x,.6),T=this.getCornerNoise3D(le,w,A,E,.6),y=this.getCornerNoise3D(N,C,S,I,.6);return 32*($+H+T+y)}P(e){return this.p[e&255]}getCornerNoise3D(e,t,n,r,i){let o,s=i-t*t-n*n-r*r;return s<0?o=0:(s*=s,o=s*s*Lt.gradDot(e,t,n,r)),o}static gradDot(e,t,n,r){const i=Lt.GRADIENT[e&15];return i[0]*t+i[1]*n+i[2]*r}};let Je=Lt;Je.GRADIENT=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1],[1,1,0],[0,-1,1],[-1,1,0],[0,-1,-1]];Je.F2=.5*(Math.sqrt(3)-1);Je.G2=(3-Math.sqrt(3))/6;class ko{constructor(t){this.xo=t.nextDouble()*256,this.yo=t.nextDouble()*256,this.zo=t.nextDouble()*256,this.p=Array(256);for(let n=0;n<256;n+=1)this.p[n]=n>127?n-256:n;for(let n=0;n<256;n+=1){const r=t.nextInt(256-n),i=this.p[n];this.p[n]=this.p[n+r],this.p[n+r]=i}}sample(t,n,r,i=0,o=0){const s=t+this.xo,a=n+this.yo,l=r+this.zo,u=Math.floor(s),c=Math.floor(a),d=Math.floor(l),f=s-u,p=a-c,m=l-d;let v=0;if(i!==0){const g=o>=0&&o<p?o:p;v=Math.floor(g/i+1e-7)*i}return this.sampleAndLerp(u,c,d,f,p-v,m,p)}sampleAndLerp(t,n,r,i,o,s,a){const l=this.P(t),u=this.P(t+1),c=this.P(l+n),d=this.P(l+n+1),f=this.P(u+n),p=this.P(u+n+1),m=Je.gradDot(this.P(c+r),i,o,s),v=Je.gradDot(this.P(f+r),i-1,o,s),g=Je.gradDot(this.P(d+r),i,o-1,s),_=Je.gradDot(this.P(p+r),i-1,o-1,s),b=Je.gradDot(this.P(c+r+1),i,o,s-1),x=Je.gradDot(this.P(f+r+1),i-1,o,s-1),w=Je.gradDot(this.P(d+r+1),i,o-1,s-1),A=Je.gradDot(this.P(p+r+1),i-1,o-1,s-1),E=ei(i),C=ei(a),S=ei(s);return Ic(E,C,S,m,v,g,_,b,x,w,A)}P(t){return this.p[t&255]&255}}class ye{constructor(t,n,r){if(t instanceof Se){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let o=0;o<r.length;o++)if(r[o]!==0){const s=n+o;this.noiseLevels[o]=new ko(i.fromHashOf("octave_"+s))}}else{if(1-n<r.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(r.length);for(let i=-n;i>=0;i-=1)i<r.length&&r[i]!==0?this.noiseLevels[i]=new ko(t):t.consume(262)}this.amplitudes=r,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,r.length-1)/(Math.pow(2,r.length)-1),this.maxValue=this.edgeValue(2)}sample(t,n,r,i=0,o=0,s=!1){let a=0,l=this.lowestFreqInputFactor,u=this.lowestFreqValueFactor;for(let c=0;c<this.noiseLevels.length;c+=1){const d=this.noiseLevels[c];d&&(a+=this.amplitudes[c]*u*d.sample(ye.wrap(t*l),s?-d.yo:ye.wrap(n*l),ye.wrap(r*l),i*l,o*l)),l*=2,u/=2}return a}getOctaveNoise(t){return this.noiseLevels[this.noiseLevels.length-1-t]}edgeValue(t){let n=0,r=this.lowestFreqValueFactor;for(let i=0;i<this.noiseLevels.length;i+=1)this.noiseLevels[i]&&(n+=this.amplitudes[i]*t*r),r/=2;return n}static wrap(t){return t-Math.floor(t/33554432+.5)*33554432}}class Lc{constructor(t,n,r,i,o,s){this.xzScale=n,this.yScale=r,this.xzFactor=i,this.yFactor=o,this.smearScaleMultiplier=s,this.minLimitNoise=new ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new ye(t,-7,[1,1,1,1,1,0,0,0]),this.xzMultiplier=684.412*n,this.yMultiplier=684.412*r,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(t,n,r){const i=t*this.xzMultiplier,o=n*this.yMultiplier,s=r*this.xzMultiplier,a=i/this.xzFactor,l=o/this.yFactor,u=s/this.xzFactor,c=this.yMultiplier*this.smearScaleMultiplier,d=c/this.yFactor;let f,p=0,m=1;for(let _=0;_<8;_+=1){if(f=this.mainNoise.getOctaveNoise(_),f){const b=ye.wrap(a*m),x=ye.wrap(l*m),w=ye.wrap(u*m);p+=f.sample(b,x,w,d*m,l*m)/m}m/=2}p=(p/10+1)/2,m=1;let v=0,g=0;for(let _=0;_<16;_+=1){const b=ye.wrap(i*m),x=ye.wrap(o*m),w=ye.wrap(s*m),A=c*m;p<1&&(f=this.minLimitNoise.getOctaveNoise(_))&&(v+=f.sample(b,x,w,A,o*m)/m),p>0&&(f=this.maxLimitNoise.getOctaveNoise(_))&&(g+=f.sample(b,x,w,A,o*m)/m),m/=2}return Bi(v/512,g/512,p)/128}}const ti=class{constructor(e,{firstOctave:t,amplitudes:n}){this.first=new ye(e,t,n),this.second=new ye(e,t,n);let r=1/0,i=-1/0;for(let s=0;s<n.length;s+=1)n[s]!==0&&(r=Math.min(r,s),i=Math.max(i,s));const o=.1*(1+1/(i-r+1));this.valueFactor=1/6/o,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,n){const r=e*ti.INPUT_FACTOR,i=t*ti.INPUT_FACTOR,o=n*ti.INPUT_FACTOR;return(this.first.sample(e,t,n)+this.second.sample(r,i,o))*this.valueFactor}};let Pr=ti;Pr.INPUT_FACTOR=1.0181268882175227;var jn;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var o,s,a;const i=(o=P.readObject(r))!=null?o:{};return{firstOctave:(s=P.readInt(i.firstOctave))!=null?s:0,amplitudes:(a=P.readArray(i.amplitudes,l=>{var u;return(u=P.readNumber(l))!=null?u:0}))!=null?a:[]}}e.fromJson=n})(jn||(jn={}));class Sp{constructor(t,n){const r=n[n.length-1],o=-n[0]+r+1,s=new Set(n),a=new Je(t);this.noiseLevels=Array(o),r>=0&&r<o&&s.has(0)&&(this.noiseLevels[r]=a);for(let l=r+1;l<o;l+=1)l>=0&&s.has(r-l)?this.noiseLevels[l]=new Je(t):t.consume(262);if(r>0)throw new Error("Positive octaves are not allowed");this.highestFreqInputFactor=Math.pow(2,r),this.highestFreqValueFactor=1/(Math.pow(2,o)-1)}sample(t,n,r){let i=0,o=this.highestFreqInputFactor,s=this.highestFreqValueFactor;for(let a=0;a<this.noiseLevels.length;a+=1){const l=this.noiseLevels[a];l&&(i+=s*l.sample2D(t*o+(r?l.xo:0),n*o+(r?l.yo:0))),o/=2,s*=2}return i}}var lt;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(lt||(lt={}));const Ep={[lt.UP]:[0,1,0],[lt.DOWN]:[0,-1,0],[lt.NORTH]:[0,0,-1],[lt.EAST]:[1,0,0],[lt.SOUTH]:[0,0,1],[lt.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return Ep[n]}e.normal=t})(lt||(lt={}));var Ke;(function(e){function t(s,a,l){return[s,a,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(s,a,l,u){return[s[0]+a,s[1]+l,s[2]+u]}e.offset=n;function r(s,a){return e.offset(s,...lt.normal(a))}e.towards=r;function i(s,a){return s===a?!0:s[0]===a[0]&&s[1]===a[1]&&s[2]===a[2]}e.equals=i;function o(s){return s[0]*s[0]+s[1]*s[1]+s[2]*s[2]}e.magnitude=o})(Ke||(Ke={}));function Tn(e,t,n){if(!e[t])throw new Error(`Missing ${t} tag`);if(e[t].type!==n)throw new Error(`Expected ${t} to be of type ${n}, but found ${e[t].type}`);return e[t].value}function Ur(e,t,n,r){const i=Tn(e,t,"list");if(i.type!==n)throw new Error(`Expected ${t} to be a list of ${n}s, but found ${i.type}s`);if(r&&i.value.length!==r)throw new Error(`Expected ${t} to be a list of length ${r}, but found length ${i.value.length}`);return i.value}function Rc(e,t){try{return e()}catch{return t}}const ni=class{constructor(e,t){if(this.namespace=e,this.path=t,!e.match(/^[a-z0-9._-]+$/))throw new Error(`Non [a-z0-9._-] character in namespace of ${e}:${t}`);if(!t.match(/^[a-z0-9/._-]+$/))throw new Error(`Non [a-z0-9/._-] character in path of ${e}:${t}`)}equals(e){return this===e?!0:this.namespace===e.namespace&&this.path===e.path}toString(){return`${this.namespace}:${this.path}`}static create(e){return new ni(this.DEFAULT_NAMESPACE,e)}static parse(e){const t=e.indexOf(this.SEPARATOR);if(t>=0){const n=t>=1?e.substring(0,t):this.DEFAULT_NAMESPACE,r=e.substring(t+1);return new ni(n,r)}return new ni(this.DEFAULT_NAMESPACE,e)}};let be=ni;be.DEFAULT_NAMESPACE="minecraft";be.SEPARATOR=":";const kt=class{constructor(e,t={}){this.properties=t,this.name=typeof e=="string"?be.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(kt.WATER)||this.is(kt.LAVA)}equals(e){return this.name.equals(e.name)?Object.keys(this.properties).every(t=>e.properties[t]===this.properties[t]):!1}is(e){return this.name.equals(e.name)}toString(){return Object.keys(this.properties).length===0?this.name.toString():`${this.name.toString()}[${Object.entries(this.properties).map(([e,t])=>e+"="+t).join(",")}]`}static fromNbt(e){const t=be.parse(Tn(e.value,"Name","string")),n=Rc(()=>Tn(e.value,"Properties","compound"),{}),r=Object.keys(n).reduce((i,o)=>ge(Z({},i),{[o]:Tn(n,o,"string")}),{});return new kt(t,r)}static fromJson(e){var i,o;const t=(i=P.readObject(e))!=null?i:{},n=be.parse((o=P.readString(t.Name))!=null?o:kt.STONE.name.toString()),r=P.readMap(t.Properties,s=>{var a;return(a=P.readString(s))!=null?a:""});return new kt(n,r)}};let ve=kt;ve.AIR=new kt(be.create("air"));ve.STONE=new kt(be.create("stone"));ve.WATER=new kt(be.create("water"),{level:"0"});ve.LAVA=new kt(be.create("lava"),{level:"0"});const cr=class{constructor(e){this.minY=e,this.storage=Array(cr.SIZE).fill(0),this.palette=[ve.AIR]}get minBlockY(){return this.minY<<4}index(e,t,n){return(e<<8)+(t<<4)+n}getBlockState(e,t,n){var i;const r=this.storage[this.index(e,t,n)];return(i=this.palette[r])!=null?i:ve.AIR}setBlockState(e,t,n,r){let i=this.palette.findIndex(o=>o.equals(r));i===-1&&(i=this.palette.length,this.palette.push(r)),this.storage[this.index(e,t,n)]=i}};let zi=cr;zi.WIDTH=16;zi.SIZE=cr.WIDTH*cr.WIDTH*cr.WIDTH;class Cp{constructor(t,n,r){this.minY=t,this.height=n,this.pos=r,this.sections=Array(this.sectionsCount).fill(null)}get maxY(){return this.minY+this.height}get minSection(){return this.minY>>4}get maxSection(){return(this.maxY-1>>4)+1}get sectionsCount(){return this.maxSection-this.minSection}getSectionIndex(t){return(t>>4)-this.minSection}getBlockState(t){var s;const[n,r,i]=t,o=this.sections[this.getSectionIndex(r)];return(s=o==null?void 0:o.getBlockState(n&15,r&15,i&15))!=null?s:ve.AIR}setBlockState(t,n){const[r,i,o]=t,s=this.getSectionIndex(i);let a=this.sections[s];if(a===null){if(n.equals(ve.AIR))return;a=this.getOrCreateSection(s)}a.setBlockState(r&15,i&15,o&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new zi(this.minSection+t)),this.sections[t]}}var We;(function(e){function t(c,d){return[c,d]}e.create=t;function n(c){return[c[0]>>4,c[2]>>4]}e.fromBlockPos=n;function r(c){return[Number(c)&4294967295,Number(c>>BigInt(32))]}e.fromLong=r;function i(c){return o(c[0],c[1])}e.toLong=i;function o(c,d){return BigInt(c&4294967295)|BigInt(d&4294967295)<<BigInt(32)}e.asLong=o;function s(c){return c[0]<<4}e.minBlockX=s;function a(c){return c[1]<<4}e.minBlockZ=a;function l(c){return(c[0]<<4)+15}e.maxBlockX=l;function u(c){return(c[1]<<4)+15}e.maxBlockZ=u})(We||(We={}));var hn;(function(e){function t(i,o){return s=>typeof s=="string"?r(i,be.parse(s)):n(o(s))}e.parser=t;function n(i){return{value:()=>i,key:()=>{}}}e.direct=n;function r(i,o){return{value:()=>i.getOrThrow(o),key:()=>o}}e.reference=r})(hn||(hn={}));const Xo=class{constructor(e,t){this.key=e,this.parser=t,this.storage=new Map,this.builtin=new Map}register(e,t,n){return this.storage.set(e.toString(),t),n&&this.builtin.set(e.toString(),t),hn.reference(this,e)}keys(){return[...this.storage.keys()].map(e=>be.parse(e))}get(e){return this.storage.get(e.toString())}getOrThrow(e){const t=this.storage.get(e.toString());if(t===void 0)throw new Error(`Missing key in ${this.key.toString()}: ${e.toString()}`);return t}parse(e){if(!this.parser)throw new Error(`No parser exists for ${this.key.toString()}`);return this.parser(e)}clear(){this.storage.clear();for(const[e,t]of this.builtin.entries())this.storage.set(e,t);return this}assign(e){if(!this.key.equals(e.key))throw new Error(`Cannot assign registry of type ${e.key.toString()} to registry of type ${this.key.toString()}`);for(const t of e.keys())this.storage.set(t.toString(),e.getOrThrow(t));return this}cloneEmpty(){return new Xo(this.key,this.parser)}};let _i=Xo;_i.REGISTRY=new Xo(be.create("root"));class Jo{constructor(t,n=[],r=[]){this.size=t,this.palette=n,this.blocks=r,this.blocksMap=[],r.forEach(i=>{if(!this.isInside(i.pos))throw new Error(`Found block at ${i.pos} which is outside the structure bounds ${this.size}`);this.blocksMap[i.pos[0]*t[1]*t[2]+i.pos[1]*t[2]+i.pos[2]]=i})}getSize(){return this.size}addBlock(t,n,r,i){if(!this.isInside(t))throw new Error(`Cannot add block at ${t} outside the structure bounds ${this.size}`);const o=new ve(n,r);let s=this.palette.findIndex(a=>a.equals(o));return s===-1&&(s=this.palette.length,this.palette.push(o)),this.blocks.push({pos:t,state:s,nbt:i}),this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]]={pos:t,state:s,nbt:i},this}getBlocks(){return this.blocks.map(t=>({pos:t.pos,state:this.palette[t.state],nbt:t.nbt}))}getBlock(t){if(!this.isInside(t))return null;const n=this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]];return n?{pos:n.pos,state:this.palette[n.state],nbt:n.nbt}:null}isInside(t){return t[0]>=0&&t[0]<this.size[0]&&t[1]>=0&&t[1]<this.size[1]&&t[2]>=0&&t[2]<this.size[2]}static fromNbt(t){const n=Ur(t.value,"size","int",3),r=Ur(t.value,"palette","compound").map(o=>ve.fromNbt({name:"",value:o})),i=Ur(t.value,"blocks","compound").map(o=>{const s=Ur(o,"pos","int",3),a=Tn(o,"state","int"),l=Rc(()=>Tn(o,"nbt","compound"),void 0);return{pos:s,state:a,nbt:l}});return new Jo(n,r,i)}}var fn;(function(e){e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function");function t(n){const r=new _i(be.create(n));return _i.REGISTRY.register(r.key,r),r}})(fn||(fn={}));class ce{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(T,y,k){return{x:T,y,z:k}}e.context=t;class n extends e{constructor(y){super(),this.input=y}compute(y){return this.transform(y,this.input.compute(y))}}const r=hn.parser(fn.NOISE,jn.fromJson);function i(T,y=i){var z,Y,ue,Ue,ht,Ge,Ye,Pe,yt,ft,ot,Le,en,Ot,J,Fe,ke,fe,bt,tt;if(typeof T=="string")return new a(hn.reference(fn.DENSITY_FUNCTION,be.parse(T)));if(typeof T=="number")return new s(T);const k=(z=P.readObject(T))!=null?z:{},L=(Y=P.readString(k.type))==null?void 0:Y.replace(/^minecraft:/,"");switch(L){case"blend_alpha":return new l(1,0,1);case"blend_offset":return new l(0,-1/0,1/0);case"beardifier":return new l(0,-1/0,1/0);case"old_blended_noise":return new u((ue=P.readNumber(k.xz_scale))!=null?ue:1,(Ue=P.readNumber(k.y_scale))!=null?Ue:1,(ht=P.readNumber(k.xz_factor))!=null?ht:80,(Ge=P.readNumber(k.y_factor))!=null?Ge:160,(Ye=P.readNumber(k.smear_scale_multiplier))!=null?Ye:8);case"flat_cache":return new d(y(k.argument));case"interpolated":return new v(y(k.argument));case"cache_2d":return new p(y(k.argument));case"cache_once":return new m(y(k.argument));case"cache_all_in_cell":return new f(y(k.argument));case"noise":return new g((Pe=P.readNumber(k.xz_scale))!=null?Pe:1,(yt=P.readNumber(k.y_scale))!=null?yt:1,r(k.noise));case"end_islands":return new _;case"weird_scaled_sampler":return new w(y(k.input),P.readEnum(k.rarity_value_mapper,b),r(k.noise));case"shifted_noise":return new A(y(k.shift_x),y(k.shift_y),y(k.shift_z),(ft=P.readNumber(k.xz_scale))!=null?ft:1,(ot=P.readNumber(k.y_scale))!=null?ot:1,r(k.noise));case"range_choice":return new E(y(k.input),(Le=P.readNumber(k.min_inclusive))!=null?Le:0,(en=P.readNumber(k.max_exclusive))!=null?en:1,y(k.when_in_range),y(k.when_out_of_range));case"shift_a":return new S(r(k.argument));case"shift_b":return new I(r(k.argument));case"shift":return new O(r(k.argument));case"blend_density":return new R(y(k.argument));case"clamp":return new F(y(k.input),(Ot=P.readNumber(k.min))!=null?Ot:0,(J=P.readNumber(k.max))!=null?J:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new oe(L,y(k.argument));case"add":case"mul":case"min":case"max":return new N(P.readEnum(L,le),y(k.argument1),y(k.argument2));case"spline":return new $(gi.fromJson(k.spline,y));case"constant":return new s((Fe=P.readNumber(k.argument))!=null?Fe:0);case"y_clamped_gradient":return new H((ke=P.readInt(k.from_y))!=null?ke:-4064,(fe=P.readInt(k.to_y))!=null?fe:4062,(bt=P.readNumber(k.from_value))!=null?bt:-4064,(tt=P.readNumber(k.to_value))!=null?tt:4062)}return s.ZERO}e.fromJson=i;const o=class extends e{constructor(T){super(),this.value=T}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let s=o;s.ZERO=new o(0),s.ONE=new o(1),e.Constant=s;class a extends e{constructor(y){super(),this.holder=y}compute(y){return this.holder.value().compute(y)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=a;class l extends e.Constant{constructor(y,k,L){super(y),this.min=k,this.max=L}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=l;class u extends e{constructor(y,k,L,z,Y,ue){super(),this.xzScale=y,this.yScale=k,this.xzFactor=L,this.yFactor=z,this.smearScaleMultiplier=Y,this.blendedNoise=ue}compute(y){var k,L;return(L=(k=this.blendedNoise)==null?void 0:k.sample(y.x,y.y,y.z))!=null?L:0}maxValue(){var y,k;return(k=(y=this.blendedNoise)==null?void 0:y.maxValue)!=null?k:0}}e.OldBlendedNoise=u;class c extends e{constructor(y){super(),this.wrapped=y}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class d extends c{constructor(y){super(y),this.lastValue=0}compute(y){const k=y.x>>2,L=y.z>>2;return(this.lastQuartX!==k||this.lastQuartZ!==L)&&(this.lastValue=this.wrapped.compute(e.context(k<<2,0,L<<2)),this.lastQuartX=k,this.lastQuartZ=L),this.lastValue}mapAll(y){return y.map(new d(this.wrapped.mapAll(y)))}}e.FlatCache=d;class f extends c{constructor(y){super(y)}compute(y){return this.wrapped.compute(y)}mapAll(y){return y.map(new f(this.wrapped.mapAll(y)))}}e.CacheAllInCell=f;class p extends c{constructor(y){super(y),this.lastValue=0}compute(y){const k=y.x,L=y.z;return(this.lastBlockX!==k||this.lastBlockZ!==L)&&(this.lastValue=this.wrapped.compute(y),this.lastBlockX=k,this.lastBlockZ=L),this.lastValue}mapAll(y){return y.map(new p(this.wrapped.mapAll(y)))}}e.Cache2D=p;class m extends c{constructor(y){super(y),this.lastValue=0}compute(y){const k=y.x,L=y.y,z=y.z;return(this.lastBlockX!==k||this.lastBlockY!==L||this.lastBlockZ!==z)&&(this.lastValue=this.wrapped.compute(y),this.lastBlockX=k,this.lastBlockY=L,this.lastBlockZ=z),this.lastValue}mapAll(y){return y.map(new m(this.wrapped.mapAll(y)))}}e.CacheOnce=m;class v extends c{constructor(y,k=4,L=4){super(y),this.cellWidth=k,this.cellHeight=L,this.values=new Map}compute({x:y,y:k,z:L}){const z=this.cellWidth,Y=this.cellHeight,ue=(y%z+z)%z/z,Ue=(k%Y+Y)%Y/Y,ht=(L%z+z)%z/z,Ge=Math.floor(y/z)*z,Ye=Math.floor(k/Y)*Y,Pe=Math.floor(L/z)*z;return Mc(ue,Ue,ht,()=>this.computeCorner(Ge,Ye,Pe),()=>this.computeCorner(Ge+z,Ye,Pe),()=>this.computeCorner(Ge,Ye+Y,Pe),()=>this.computeCorner(Ge+z,Ye+Y,Pe),()=>this.computeCorner(Ge,Ye,Pe+z),()=>this.computeCorner(Ge+z,Ye,Pe+z),()=>this.computeCorner(Ge,Ye+Y,Pe+z),()=>this.computeCorner(Ge+z,Ye+Y,Pe+z))}computeCorner(y,k,L){return Rr(this.values,`${y} ${k} ${L}`,()=>this.wrapped.compute(e.context(y,k,L)))}mapAll(y){return y.map(new v(this.wrapped.mapAll(y)))}withCellSize(y,k){return new v(this.wrapped,y,k)}}e.Interpolated=v;class g extends e{constructor(y,k,L,z){super(),this.xzScale=y,this.yScale=k,this.noiseData=L,this.noise=z}compute(y){var k,L;return(L=(k=this.noise)==null?void 0:k.sample(y.x*this.xzScale,y.y*this.yScale,y.z*this.xzScale))!=null?L:0}maxValue(){var y,k;return(k=(y=this.noise)==null?void 0:y.maxValue)!=null?k:2}}e.Noise=g;class _ extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return .5625}}const b=["type_1","type_2"],x=class extends n{constructor(T,y,k,L){super(T),this.rarityValueMapper=y,this.noiseData=k,this.noise=L,this.mapper=x.ValueMapper[this.rarityValueMapper]}transform(T,y){if(!this.noise)return 0;const k=this.mapper(y);return k*Math.abs(this.noise.sample(T.x/k,T.y/k,T.z/k))}mapAll(T){return T.map(new x(this.input.mapAll(T),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return this.rarityValueMapper==="type_1"?2:3}static rarityValueMapper1(T){return T<-.5?.75:T<0?1:T<.5?1.5:2}static rarityValueMapper2(T){return T<-.75?.5:T<-.5?.75:T<.5?1:T<.75?2:3}};let w=x;w.ValueMapper={type_1:x.rarityValueMapper1,type_2:x.rarityValueMapper2},e.WeirdScaledSampler=w;class A extends g{constructor(y,k,L,z,Y,ue,Ue){super(z,Y,ue,Ue),this.shiftX=y,this.shiftY=k,this.shiftZ=L}compute(y){var Y,ue;const k=y.x*this.xzScale+this.shiftX.compute(y),L=y.y*this.yScale+this.shiftY.compute(y),z=y.z*this.xzScale+this.shiftZ.compute(y);return(ue=(Y=this.noise)==null?void 0:Y.sample(k,L,z))!=null?ue:0}mapAll(y){return y.map(new A(this.shiftX.mapAll(y),this.shiftY.mapAll(y),this.shiftZ.mapAll(y),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=A;class E extends e{constructor(y,k,L,z,Y){super(),this.input=y,this.minInclusive=k,this.maxExclusive=L,this.whenInRange=z,this.whenOutOfRange=Y}compute(y){const k=this.input.compute(y);return this.minInclusive<=k&&k<this.maxExclusive?this.whenInRange.compute(y):this.whenOutOfRange.compute(y)}mapAll(y){return y.map(new E(this.input.mapAll(y),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(y),this.whenOutOfRange.mapAll(y)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=E;class C extends e{constructor(y,k){super(),this.noiseData=y,this.offsetNoise=k}compute(y){var k,L;return(L=(k=this.offsetNoise)==null?void 0:k.sample(y.x*.25,y.y*.25,y.z*.25))!=null?L:0}maxValue(){var y,k;return((k=(y=this.offsetNoise)==null?void 0:y.maxValue)!=null?k:2)*4}}e.ShiftNoise=C;class S extends C{constructor(y,k){super(y,k)}compute(y){return super.compute(e.context(y.x,0,y.z))}withNewNoise(y){return new S(this.noiseData,y)}}e.ShiftA=S;class I extends C{constructor(y,k){super(y,k)}compute(y){return super.compute(e.context(y.z,y.x,0))}withNewNoise(y){return new I(this.noiseData,y)}}e.ShiftB=I;class O extends C{constructor(y,k){super(y,k)}withNewNoise(y){return new O(this.noiseData,y)}}e.Shift=O;class R extends n{constructor(y){super(y)}transform(y,k){return k}mapAll(y){return y.map(new R(this.input.mapAll(y)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=R;class F extends n{constructor(y,k,L){super(y),this.min=k,this.max=L}transform(y,k){return mr(k,this.min,this.max)}mapAll(y){return y.map(new F(this.input.mapAll(y),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=F;const j=class extends n{constructor(T,y,k,L){super(y),this.type=T,this.min=k,this.max=L,this.transformer=j.MappedTypes[this.type]}transform(T,y){return this.transformer(y)}mapAll(T){return T.map(new j(this.type,this.input.mapAll(T)))}minValue(){var T;return(T=this.min)!=null?T:-1/0}maxValue(){var T;return(T=this.max)!=null?T:1/0}withMinMax(){const T=this.input.minValue();let y=this.transformer(T),k=this.transformer(this.input.maxValue());return(this.type==="abs"||this.type==="square")&&(k=Math.max(y,k),y=Math.max(0,T)),new j(this.type,this.input,y,k)}};let oe=j;oe.MappedTypes={abs:T=>Math.abs(T),square:T=>T*T,cube:T=>T*T*T,half_negative:T=>T>0?T:T*.5,quarter_negative:T=>T>0?T:T*.25,squeeze:T=>{const y=mr(T,-1,1);return y/2-y*y*y/24}},e.Mapped=oe;const le=["add","mul","min","max"];class N extends e{constructor(y,k,L,z,Y){super(),this.type=y,this.argument1=k,this.argument2=L,this.min=z,this.max=Y}compute(y){const k=this.argument1.compute(y);switch(this.type){case"add":return k+this.argument2.compute(y);case"mul":return k===0?0:k*this.argument2.compute(y);case"min":return k<this.argument2.minValue()?k:Math.min(k,this.argument2.compute(y));case"max":return k>this.argument2.maxValue()?k:Math.max(k,this.argument2.compute(y))}}mapAll(y){return y.map(new N(this.type,this.argument1.mapAll(y),this.argument2.mapAll(y)))}minValue(){var y;return(y=this.min)!=null?y:-1/0}maxValue(){var y;return(y=this.max)!=null?y:1/0}withMinMax(){const y=this.argument1.minValue(),k=this.argument2.minValue(),L=this.argument1.maxValue(),z=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(y>=z||k>=L)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let Y,ue;switch(this.type){case"add":Y=y+k,ue=L+z;break;case"mul":Y=y>0&&k>0?y*k||0:L<0&&z<0?L*z||0:Math.min(y*z||0,k*L||0),ue=y>0&&k>0?L*z||0:L<0&&z<0?y*k||0:Math.max(y*k||0,L*z||0);break;case"min":Y=Math.min(y,k),ue=Math.min(L,z);break;case"max":Y=Math.max(y,k),ue=Math.max(L,z);break}return new N(this.type,this.argument1,this.argument2,Y,ue)}}e.Ap2=N;class $ extends e{constructor(y){super(),this.spline=y}compute(y){return this.spline.compute(y)}mapAll(y){const k=this.spline.mapAll(L=>L instanceof e?L.mapAll(y):L);return k.calculateMinMax(),y.map(new $(k))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=$;class H extends e{constructor(y,k,L,z){super(),this.fromY=y,this.toY=k,this.fromValue=L,this.toValue=z}compute(y){return Fi(y.y,this.fromY,this.toY,this.fromValue,this.toValue)}minValue(){return Math.min(this.fromValue,this.toValue)}maxValue(){return Math.max(this.fromValue,this.toValue)}}e.YClampedGradient=H})(ce||(ce={}));class _r{constructor(t,n){this.level=t,this.type=n}at(t){return t<this.level?this.type:ve.AIR}}var vi;(function(e){function t(n){return{compute({x:r,y:i,z:o},s){if(!(s>0))return n(r,i,o).at(i)}}}e.createDisabled=t})(vi||(vi={}));const pt=class{constructor(e,t,n,r,i,o,s,a,l,u){this.noiseChunk=e,this.barrierNoise=n,this.fluidLevelFloodednessNoise=r,this.fluidLevelSpreadNoise=i,this.lavaNoise=o,this.random=s,this.globalFluidPicker=u,this.minGridX=this.gridX(We.minBlockX(t))-1,this.gridSizeX=this.gridX(We.maxBlockX(t))+1-this.minGridX+1,this.minGridY=this.gridY(a)-1,this.minGridZ=this.gridZ(We.minBlockZ(t))-1,this.gridSizeZ=this.gridZ(We.maxBlockZ(t))+1-this.minGridZ+1;const c=this.gridY(a+l)+1-this.minGridY+1;this.gridSize=this.gridSizeX*c*this.gridSizeZ,this.aquiferCache=Array(this.gridSize).fill(void 0),this.aquiferLocationCache=Array(this.gridSize).fill(Ke.ZERO)}compute({x:e,y:t,z:n},r){if(r<=0){if(this.globalFluidPicker(e,t,n).at(t).is(ve.LAVA))return ve.LAVA;{const i=this.gridX(e-5),o=this.gridY(t+1),s=this.gridZ(n-5);let a=Number.MAX_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,c=Ke.ZERO,d=Ke.ZERO,f=Ke.ZERO;for(let w=0;w<=1;w+=1)for(let A=-1;A<=1;A+=1)for(let E=0;E<=1;E+=1){const C=this.getLocation(i+w,o+A,s+E),S=Ke.magnitude(C);a>=S?(f=d,d=c,c=C,u=l,l=a,a=S):l>=S?(f=d,d=C,u=l,l=S):u>=S&&(f=C,u=S)}const p=this.getStatus(c),m=this.getStatus(d),v=this.getStatus(f),g=pt.similarity(a,l),_=pt.similarity(a,u),b=pt.similarity(l,u);let x;if(p.at(t).is(ve.WATER)&&this.globalFluidPicker(e,t-1,n).at(t-1).is(ve.LAVA))x=1;else if(g>-1){const w=ar(()=>this.barrierNoise.compute(ce.context(e,t*.5,n))),A=this.calculatePressure(t,p,m,w),E=this.calculatePressure(t,p,v,w),C=this.calculatePressure(t,m,v,w),S=Math.max(A,E*Math.max(0,_),C*Math.max(b));x=Math.max(0,2*Math.max(0,g)*S)}else x=0;if(r+x<=0)return p.at(t)}}}static similarity(e,t){return 1-Math.abs(t-e)/25}calculatePressure(e,t,n,r){const i=t.at(e),o=n.at(e);if(i.is(ve.LAVA)&&o.is(ve.WATER)||i.is(ve.WATER)&&o.is(ve.LAVA))return 1;const s=Math.abs(t.level-n.level);if(s===0)return 0;const a=(t.level+n.level)/2,l=e+.5-a,u=s/2-Math.abs(l),c=l>0?u>0?u/1.5:u/2.5:u>-3?(u+3)/3:(u+3)/10;return c<-2||c>2?c:c+r()}getStatus(e){const[t,n,r]=e,i=this.getIndex(this.gridX(t),this.gridY(n),this.gridZ(r)),o=this.aquiferCache[i];if(o!==void 0)return o;const s=this.computeStatus(t,n,r);return this.aquiferCache[i]=s,s}computeStatus(e,t,n){const r=this.globalFluidPicker(e,t,n);let i=Number.MAX_SAFE_INTEGER,o=!1;for(const[p,m]of pt.SURFACE_SAMPLING){const v=e+(m<<4),g=n+(m<<4),_=this.noiseChunk.getPreliminarySurfaceLevel(v,g);i=Math.min(i,_);const b=p===0&&m===0;if(b&&t-12>_+8)return r;if(b||t+12>_+8){const x=this.globalFluidPicker(v,_+8,g);if(!x.at(_+8).is(ve.AIR)){if(b)return x;o=!0}}}const s=o?Fi(i+8-t,0,64,1,0):0,a=mr(this.fluidLevelFloodednessNoise.compute(ce.context(e,t*.67,n)),-1,1);if(a>gr(s,1,0,-.3,.8))return r;if(a<=gr(s,1,0,-.8,.4))return new _r(Number.MIN_SAFE_INTEGER,r.type);const l=Math.floor(t/40),u=this.fluidLevelSpreadNoise.compute(ce.context(Math.floor(e/16),l,Math.floor(n/16))),c=l*40+20+Math.floor(u/3)*3,d=Math.min(i,c),f=this.getFluidType(e,t,n,r.type,c);return new _r(d,f)}getFluidType(e,t,n,r,i){if(i<=-10){const o=this.lavaNoise.compute(ce.context(Math.floor(e/64),Math.floor(t/40),Math.floor(n/64)));if(Math.abs(o)>.3)return ve.LAVA}return r}getLocation(e,t,n){const r=this.getIndex(e,t,n),i=this.aquiferLocationCache[r];if(Ke.equals(i,Ke.ZERO))return i;const o=this.random.at(e,t,n),s=Ke.create(e*pt.X_SPACING+o.nextInt(10),t*pt.Y_SPACING+o.nextInt(9),n*pt.Z_SPACING+o.nextInt(10));return this.aquiferLocationCache[r]=s,s}getIndex(e,t,n){const r=e-this.minGridX,i=t-this.minGridY,o=n-this.minGridZ,s=(i*this.gridSizeZ+o)*this.gridSizeX+r;if(s<0||s>=this.gridSize)throw new Error(`Invalid aquifer index at ${e} ${t} ${n}: 0 <= ${s} < ${this.gridSize}`);return s}gridX(e){return Math.floor(e/pt.X_SPACING)}gridY(e){return Math.floor(e/pt.Y_SPACING)}gridZ(e){return Math.floor(e/pt.Z_SPACING)}};let $r=pt;$r.X_SPACING=16;$r.Y_SPACING=12;$r.Z_SPACING=16;$r.SURFACE_SAMPLING=[[-2,-1],[-1,-1],[0,-1],[1,-1],[-3,0],[-2,0],[-1,0],[0,0],[1,0],[-2,1],[-1,1],[0,1],[1,1]];var vr;(function(e){function n(v,g,_,b,x,w){return new a(v,g,_,b,x,w)}e.target=n;function r(v,g,_,b,x,w,A){return new s(i(v),i(g),i(_),i(b),i(x),i(w),A)}e.parameters=r;function i(v,g){return typeof v=="number"?new o(v,g!=null?g:v):v}e.param=i;class o{constructor(g,_){this.min=g,this.max=_}distance(g){const _=(typeof g=="number"?g:g.min)-this.max,b=this.min-(typeof g=="number"?g:g.max);return _>0?_:Math.max(b,0)}union(g){return new o(Math.min(this.min,g.min),Math.max(this.max,g.max))}static fromJson(g){var x;if(typeof g=="number")return new o(g,g);const[_,b]=(x=P.readArray(g,w=>P.readNumber(w)))!=null?x:[];return new o(_!=null?_:0,b!=null?b:0)}}e.Param=o;class s{constructor(g,_,b,x,w,A,E){this.temperature=g,this.humidity=_,this.continentalness=b,this.erosion=x,this.depth=w,this.weirdness=A,this.offset=E}fittness(g){return Tt(this.temperature.distance(g.temperature))+Tt(this.humidity.distance(g.humidity))+Tt(this.continentalness.distance(g.continentalness))+Tt(this.erosion.distance(g.erosion))+Tt(this.depth.distance(g.depth))+Tt(this.weirdness.distance(g.weirdness))+Tt(this.offset-g.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new o(this.offset,this.offset)]}static fromJson(g){var b,x;const _=(b=P.readObject(g))!=null?b:{};return new s(o.fromJson(_.temperature),o.fromJson(_.humidity),o.fromJson(_.continentalness),o.fromJson(_.erosion),o.fromJson(_.depth),o.fromJson(_.weirdness),(x=P.readInt(_.offset))!=null?x:0)}}e.ParamPoint=s;class a{constructor(g,_,b,x,w,A){this.temperature=g,this.humidity=_,this.continentalness=b,this.erosion=x,this.depth=w,this.weirdness=A}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=a;class l{constructor(g){this.things=g,this.index=new d(g)}find(g){return this.index.search(g,(_,b)=>_.distance(b))}}e.Parameters=l;class u{constructor(g,_,b,x,w,A){this.temperature=g,this.humidity=_,this.continentalness=b,this.erosion=x,this.depth=w,this.weirdness=A}static fromRouter(g){return new e.Sampler(g.temperature,g.vegetation,g.continents,g.erosion,g.depth,g.ridges)}sample(g,_,b){const x=ce.context(g<<2,_<<2,b<<2);return e.target(this.temperature.compute(x),this.humidity.compute(x),this.continentalness.compute(x),this.erosion.compute(x),this.depth.compute(x),this.weirdness.compute(x))}}e.Sampler=u;const c=class{constructor(v){this.root=c.build(v.map(([g,_])=>new m(g,_)))}static build(v){if(v.length===1)return v[0];if(v.length<=c.CHILDREN_PER_NODE){const x=v.map(w=>{let A=0;for(let E=0;E<7;E+=1){const C=w.space[E];A+=Math.abs((C.min+C.max)/2)}return{key:A,node:w}}).sort((w,A)=>w.key-A.key).map(({node:w})=>w);return new p(x)}let g=1/0,_=-1,b=[];for(let x=0;x<7;++x){v=c.sort(v,x,!1),b=c.bucketize(v);let w=0;for(const A of b)w+=c.area(A.space);g>w&&(g=w,_=x)}return v=c.sort(v,_,!1),b=c.bucketize(v),b=c.sort(b,_,!0),new p(b.map(x=>c.build(x.children)))}static sort(v,g,_){return v.map(b=>{const x=b.space[g],w=(x.min+x.max)/2;return{key:_?Math.abs(w):w,node:b}}).sort((b,x)=>b.key-x.key).map(({node:b})=>b)}static bucketize(v){const g=[];let _=[];const b=Math.pow(10,Math.floor(Math.log(v.length-.01)/Math.log(10)));for(const x of v)_.push(x),!(_.length<b)&&(g.push(new p(_)),_=[]);return _.length!==0&&g.push(new p(_)),g}static area(v){let g=0;for(const _ of v)g+=Math.abs(_.max-_.min);return g}search(v,g){return this.root.search(v.toArray(),g).thing()}};let d=c;d.CHILDREN_PER_NODE=10,e.RTree=d;class f{constructor(g){this.space=g}distance(g){let _=0;for(let b=0;b<7;b+=1)_+=Tt(this.space[b].distance(g[b]));return _}}e.RNode=f;class p extends f{constructor(g){super(p.buildSpace(g)),this.children=g}static buildSpace(g){let _=[...Array(7)].map(()=>new o(1/0,-1/0));for(const b of g)_=[...Array(7)].map((x,w)=>_[w].union(b.space[w]));return _}search(g,_){let b=1/0,x=null;for(const w of this.children){const A=_(w,g);if(b<=A)continue;const E=w.search(g,_),C=w==E?A:_(E,g);b<=C||(b=C,x=E)}return x}}e.RSubTree=p;class m extends f{constructor(g,_){super(g.space()),this.thing=_}search(){return this}}e.RLeaf=m})(vr||(vr={}));class wr{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,o;const n=(i=P.readObject(t))!=null?i:{},r=be.parse((o=P.readString(n.biome))!=null?o:"minecraft:the_void");return new wr(r)}}class Ko{constructor(t){this.parameters=t}getBiome(t,n,r,i){const o=i.sample(t,n,r);return this.parameters.find(o)}static fromJson(t){var o,s;const n=(o=P.readObject(t))!=null?o:{},i=((s=P.readArray(n.biomes,a=>{var l;return(u=>{var c;return{biome:be.parse((c=P.readString(u.biome))!=null?c:"minecraft:the_void"),parameters:vr.ParamPoint.fromJson(u.parameters)}})((l=P.readObject(a))!=null?l:{})}))!=null?s:[]).map(a=>[a.parameters,()=>a.biome]);return new Ko(new vr.Parameters(i))}}var mt;(function(e){e.TEMPERATURE=t("temperature",-10,[1.5,0,1,0,0,0]),e.VEGETATION=t("vegetation",-8,[1,1,0,0,0,0]),e.CONTINENTALNESS=t("continentalness",-9,[1,1,2,2,2,1,1,1,1]),e.EROSION=t("erosion",-9,[1,1,0,1,1]),e.TEMPERATURE_LARGE=t("temperature_large",-12,[1.5,0,1,0,0,0]),e.VEGETATION_LARGE=t("vegetation_large",-10,[1,1,0,0,0,0]),e.CONTINENTALNESS_LARGE=t("continentalness_large",-11,[1,1,2,2,2,1,1,1,1]),e.EROSION_LARGE=t("erosion_large",-11,[1,1,0,1,1]),e.RIDGE=t("ridge",-7,[1,2,1,0,0,0]),e.SHIFT=t("offset",-3,[1,1,1,0]),e.AQUIFER_BARRIER=t("aquifer_barrier",-3,[1]),e.AQUIFER_FLUID_LEVEL_FLOODEDNESS=t("aquifer_fluid_level_floodedness",-7,[1]),e.AQUIFER_FLUID_LEVEL_SPREAD=t("aquifer_fluid_level_spread",-5,[1]),e.AQUIFER_LAVA=t("aquifer_lava",-1,[1]),e.PILLAR=t("pillar",-7,[1,1]),e.PILLAR_RARENESS=t("pillar_rareness",-8,[1]),e.PILLAR_THICKNESS=t("pillar_thickness",-8,[1]),e.SPAGHETTI_2D=t("spaghetti_2d",-8,[1]),e.SPAGHETTI_2D_ELEVATION=t("spaghetti_2d_elevation",-8,[1]),e.SPAGHETTI_2D_MODULATOR=t("spaghetti_2d_modulator",-8,[1]),e.SPAGHETTI_2D_THICKNESS=t("spaghetti_2d_thickness",-8,[1]),e.SPAGHETTI_3D_1=t("spaghetti_3d_1",-8,[1]),e.SPAGHETTI_3D_2=t("spaghetti_3d_2",-8,[1]),e.SPAGHETTI_3D_RARITY=t("spaghetti_3d_rarity",-8,[1]),e.SPAGHETTI_3D_THICKNESS=t("spaghetti_3d_thickness",-8,[1]),e.SPAGHETTI_ROUGHNESS=t("spaghetti_roughness",-8,[1]),e.SPAGHETTI_ROUGHNESS_MODULATOR=t("spaghetti_roughness_modulator",-8,[1]),e.CAVE_ENTRANCE=t("cave_entrance",-7,[.4,.5,1]),e.CAVE_LAYER=t("cave_layer",-8,[1]),e.CAVE_CHEESE=t("cave_cheese",-8,[.5,1,2,1,2,1,0,2,0]),e.NOODLE=t("noodle",-8,[1]),e.NOODLE_THICKNESS=t("noodle_thickness",-8,[1]),e.NOODLE_RIDGE_A=t("noodle_ridge_a",-7,[1]),e.NOODLE_RIDGE_B=t("noodle_ridge_b",-7,[1]),e.JAGGED=t("jagged",-16,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),e.SURFACE=t("surface",-6,[1,1,1]),e.SURFACE_SECONDARY=t("surface_secondary",-6,[1,1,0,1]);function t(i,o,s){return fn.NOISE.register(be.create(i),jn.create(o,s))}const n=new Map;function r(i,o){var c;const s=(c=o.key())==null?void 0:c.toString();if(!s)throw new Error("Cannot instantiate noise from direct holder");const a=i.seedKey(),l=n.get(s);if(l&&l[0]===a[0]&&l[1]===a[1])return l[2];const u=new Pr(i.fromHashOf(s),o.value());return n.set(s,[a[0],a[1],u]),u}e.instantiate=r})(mt||(mt={}));var Ve;(function(e){function t(s){var l,u,c,d,f;const a=(l=P.readObject(s))!=null?l:{};return{minY:(u=P.readInt(a.min_y))!=null?u:0,height:(c=P.readInt(a.height))!=null?c:256,xzSize:(d=P.readInt(a.size_horizontal))!=null?d:1,ySize:(f=P.readInt(a.size_vertical))!=null?f:1}}e.fromJson=t;function n(s){return s.ySize<<2}e.cellHeight=n;function r(s){return s.xzSize<<2}e.cellWidth=r;function i(s){return s.height/n(s)}e.cellCountY=i;function o(s){return Math.floor(s.minY/n(s))}e.minCellY=o})(Ve||(Ve={}));var So;(function(e){function t(r){var o,s,a,l;const i=(o=P.readObject(r))!=null?o:{};return{target:(s=P.readNumber(i.target))!=null?s:0,size:(a=P.readInt(i.size))!=null?a:0,offset:(l=P.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,o){if(r.size<=0)return i;const s=(o-r.offset)/r.size;return Bi(r.target,i,s)}e.apply=n})(So||(So={}));var Vn;(function(e){const t=a=>hn.parser(fn.DENSITY_FUNCTION,ce.fromJson)(a).value();function n(a){var u;const l=(u=P.readObject(a))!=null?u:{};return{barrier:t(l.barrier),fluidLevelFloodedness:t(l.fluid_level_floodedness),fluidLevelSpread:t(l.fluid_level_spread),lava:t(l.lava),temperature:t(l.temperature),vegetation:t(l.vegetation),continents:t(l.continents),erosion:t(l.erosion),depth:t(l.depth),ridges:t(l.ridges),initialDensityWithoutJaggedness:t(l.initial_density_without_jaggedness),finalDensity:t(l.final_density),veinToggle:t(l.vein_toggle),veinRidged:t(l.vein_ridged),veinGap:t(l.vein_gap)}}e.fromJson=n;function r(a){return Z({barrier:ce.Constant.ZERO,fluidLevelFloodedness:ce.Constant.ZERO,fluidLevelSpread:ce.Constant.ZERO,lava:ce.Constant.ZERO,temperature:ce.Constant.ZERO,vegetation:ce.Constant.ZERO,continents:ce.Constant.ZERO,erosion:ce.Constant.ZERO,depth:ce.Constant.ZERO,ridges:ce.Constant.ZERO,initialDensityWithoutJaggedness:ce.Constant.ZERO,finalDensity:ce.Constant.ZERO,veinToggle:ce.Constant.ZERO,veinRidged:ce.Constant.ZERO,veinGap:ce.Constant.ZERO},a)}e.create=r;function i(a,l,u,c=!1){const d=(c?new et(u):Se.create(u)).forkPositional(),f=new o(d,l);return ge(Z({},f.mapAll(a)),{aquiferPositionalRandomFactory:d.fromHashOf(be.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:d.fromHashOf(be.create("ore").toString()).forkPositional()})}e.withSettings=i;class o{constructor(l,u){this.random=l,this.settings=u,this.mapped=new Map}map(l){if(l instanceof ce.HolderHolder){const u=l.holder.key();if(u!==void 0&&this.mapped.has(u.toString()))return this.mapped.get(u.toString());{const c=l.holder.value().mapAll(this);return u!==void 0&&this.mapped.set(u.toString(),c),c}}if(l instanceof ce.Interpolated)return l.withCellSize(Ve.cellWidth(this.settings),Ve.cellHeight(this.settings));if(l instanceof ce.ShiftedNoise){const u=mt.instantiate(this.random,l.noiseData);return new ce.ShiftedNoise(l.shiftX,l.shiftY,l.shiftZ,l.xzScale,l.yScale,l.noiseData,u)}return l instanceof ce.Noise?new ce.Noise(l.xzScale,l.yScale,l.noiseData,mt.instantiate(this.random,l.noiseData)):l instanceof ce.ShiftNoise?l.withNewNoise(mt.instantiate(this.random,l.noiseData)):l instanceof ce.WeirdScaledSampler?new ce.WeirdScaledSampler(l.input,l.rarityValueMapper,l.noiseData,mt.instantiate(this.random,l.noiseData)):l instanceof ce.OldBlendedNoise?new ce.OldBlendedNoise(l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier,new Lc(this.random.fromHashOf(be.create("terrain").toString()),l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier)):l instanceof ce.Mapped||l instanceof ce.Ap2?l.withMinMax():l}mapAll(l){return{barrier:l.barrier.mapAll(this),fluidLevelFloodedness:l.fluidLevelFloodedness.mapAll(this),fluidLevelSpread:l.fluidLevelSpread.mapAll(this),lava:l.lava.mapAll(this),temperature:l.temperature.mapAll(this),vegetation:l.vegetation.mapAll(this),continents:l.continents.mapAll(this),erosion:l.erosion.mapAll(this),depth:l.depth.mapAll(this),ridges:l.ridges.mapAll(this),initialDensityWithoutJaggedness:l.initialDensityWithoutJaggedness.mapAll(this),finalDensity:l.finalDensity.mapAll(this),veinToggle:l.veinToggle.mapAll(this),veinRidged:l.veinRidged.mapAll(this),veinGap:l.veinGap.mapAll(this)}}}e.Visitor=o;function s(a,l,u,c){const d=Ve.minCellY(a)+Ve.cellCountY(a),f=Ve.minCellY(a),p=Ve.cellHeight(a);for(let m=d;m>=f;m-=1){const v=m*p;if(mr(l.compute(ce.context(u,v,c)),-64,64)>=.390625)return v}return Number.MAX_SAFE_INTEGER}e.computePreliminarySurfaceLevelScanning=s})(Vn||(Vn={}));class Pc{constructor(t,n,r,i,o,s,a,l,u){this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.router=i,this.minX=o,this.minZ=s,this.settings=a,this.preliminarySurfaceLevel=new Map,this.cellWidth=Ve.cellWidth(a),this.cellHeight=Ve.cellHeight(a),this.firstCellX=Math.floor(o/this.cellWidth),this.firstCellZ=Math.floor(s/this.cellWidth),this.firstNoiseX=o>>2,this.firstNoiseZ=s>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=vi.createDisabled(u);const c=this.router.finalDensity;this.materialRule=wi.fromList([d=>this.aquifer.compute(d,c.compute(d))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Rr(this.preliminarySurfaceLevel,We.asLong(t,n),()=>Vn.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}var wi;(function(e){function t(n){return r=>{for(const i of n){const o=i(r);if(o)return o}}}e.fromList=t})(wi||(wi={}));var Ln;(function(e){function t(o){var a,l,u,c;const s=(a=P.readObject(o))!=null?a:{};return s.absolute!==void 0?n((l=P.readNumber(s.absolute))!=null?l:0):s.above_bottom!==void 0?r((u=P.readNumber(s.above_bottom))!=null?u:0):s.below_top!==void 0?i((c=P.readNumber(s.below_top))!=null?c:0):()=>0}e.fromJson=t;function n(o){return()=>o}function r(o){return s=>s.minY+o}function i(o){return s=>s.maxY-o}})(Ln||(Ln={}));var yi;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(yi||(yi={}));class $c{constructor(t,n,r){this.rule=t,this.defaultBlock=n,this.random=Se.create(r).forkPositional(),this.surfaceNoise=mt.instantiate(this.random,mt.SURFACE),this.surfaceSecondaryNoise=mt.instantiate(this.random,mt.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const o=We.minBlockX(t.pos),s=We.minBlockZ(t.pos),a=new Dc(this,t,n,r,i),l=this.rule(a);for(let u=0;u<16;u+=1){const c=o+u;for(let d=0;d<1;d+=1){const f=s+d;a.updateXZ(c,f);let p=0,m=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER;for(let g=t.maxY;g>=t.minY;g-=1){const _=Ke.create(c,g,f),b=t.getBlockState(_);if(b.equals(ve.AIR)){p=0,m=Number.MIN_SAFE_INTEGER;continue}if(b.isFluid()){m===Number.MIN_SAFE_INTEGER&&(m=g+1);continue}if(v>=g){v=Number.MIN_SAFE_INTEGER;for(let A=g-1;A>=t.minY;A-=1){const E=t.getBlockState(Ke.create(c,A,f));if(E.equals(ve.AIR)||E.isFluid()){v=A+1;break}}}p+=1;const x=g-v+1;if(!b.equals(this.defaultBlock))continue;a.updateY(p,x,m,g);const w=l(c,g,f);w&&t.setBlockState(_,w)}}}}getSurfaceDepth(t,n){const r=this.surfaceNoise.sample(t,0,n),i=this.random.at(t,0,n).nextDouble()*.25;return r*2.75+3+i}getSurfaceSecondary(t,n){return this.surfaceSecondaryNoise.sample(t,0,n)}getRandom(t){return Rr(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class Dc{constructor(t,n,r,i,o){this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=o,this.blockX=0,this.blockY=0,this.blockZ=0,this.stoneDepthAbove=0,this.stoneDepthBelow=0,this.surfaceDepth=0,this.waterHeight=0,this.biome=()=>"",this.surfaceSecondary=()=>0,this.minSurfaceLevel=()=>0}updateXZ(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=ar(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=ar(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=ar(()=>this.getBiome(Ke.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,o=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),s=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i+1<<4),l=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i+1<<4);return Math.floor(fi((t&15)/16,(n&15)/16,o,s,a,l))+this.surfaceDepth-8}}var bi;(function(e){e.NOOP=()=>()=>{};function t(o){var l,u,c;const s=(l=P.readObject(o))!=null?l:{};switch((u=P.readString(s.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return n(ve.fromJson(s.result_state));case"sequence":return r((c=P.readArray(s.sequence,e.fromJson))!=null?c:[]);case"condition":return i(xi.fromJson(s.if_true),e.fromJson(s.then_run))}return e.NOOP}e.fromJson=t;function n(o){return()=>()=>o}e.block=n;function r(o){return s=>{const a=o.map(l=>l(s));return(l,u,c)=>{for(const d of a){const f=d(l,u,c);if(f)return f}}}}e.sequence=r;function i(o,s){return a=>(l,u,c)=>{if(o(a))return s(a)(l,u,c)}}e.condition=i})(bi||(bi={}));var xi;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(u){var f,p,m,v,g,_,b,x,w,A,E,C;const c=(f=P.readObject(u))!=null?f:{};switch((p=P.readString(c.type))==null?void 0:p.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((m=P.readArray(c.biome_is,S=>{var I;return(I=P.readString(S))!=null?I:""}))!=null?m:[]);case"not":return i(e.fromJson(c.invert));case"stone_depth":return o((v=P.readInt(c.offset))!=null?v:0,(g=P.readBoolean(c.add_surface_depth))!=null?g:!1,(_=P.readInt(c.secondary_depth_range))!=null?_:0,P.readString(c.surface_type)==="ceiling");case"vertical_gradient":return s((b=P.readString(c.random_name))!=null?b:"",Ln.fromJson(c.true_at_and_below),Ln.fromJson(c.false_at_and_above));case"water":return a((x=P.readInt(c.offset))!=null?x:0,(w=P.readInt(c.surface_depth_multiplier))!=null?w:0,(A=P.readBoolean(c.add_surface_depth))!=null?A:!1);case"y_above":return l(Ln.fromJson(c.anchor),(E=P.readInt(c.surface_depth_multiplier))!=null?E:0,(C=P.readBoolean(c.add_surface_depth))!=null?C:!1)}return e.FALSE}e.fromJson=t;function n(){return u=>u.blockY>=u.minSurfaceLevel()}e.abovePreliminarySurface=n;function r(u){const c=new Set(u);return d=>c.has(d.biome())}e.biome=r;function i(u){return c=>!u(c)}e.not=i;function o(u,c,d,f){return p=>{const m=f?p.stoneDepthBelow:p.stoneDepthAbove,v=c?p.surfaceDepth:0,g=d===0?0:gr(p.surfaceSecondary(),-1,1,0,d);return m<=1+u+v+g}}e.stoneDepth=o;function s(u,c,d){return f=>{const p=c(f.context),m=d(f.context);if(f.blockY<=p)return!0;if(f.blockY>=m)return!1;const v=f.system.getRandom(u),g=gr(f.blockY,p,m,1,0);return v.nextFloat()<g}}e.verticalGradient=s;function a(u,c,d){return f=>{if(f.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const p=d?f.stoneDepthAbove:0;return f.blockY+p>=f.waterHeight+u+f.surfaceDepth*c}}e.water=a;function l(u,c,d){return f=>{const p=d?f.stoneDepthAbove:0;return f.blockY+p>=u(f.context)+f.surfaceDepth*c}}e.yAbove=l})(xi||(xi={}));class Ip{constructor(t,n,r){this.biomeSource=n,this.settings=r,this.router=Vn.withSettings(r.noiseRouter,r.noise,t,r.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new $c(r.surfaceRule,r.defaultBlock,t);const i=new _r(-54,ve.LAVA),o=new _r(r.seaLevel,r.defaultFluid);this.globalFluidPicker=(s,a,l)=>a<Math.min(-54,r.seaLevel)?i:o}fill(t,n=!1){var p;const r=Math.max(t.minY,this.settings.noise.minY),i=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),o=Ve.cellWidth(this.settings.noise),s=Ve.cellHeight(this.settings.noise),a=Math.floor(16/o),l=Math.floor(r/s),u=Math.floor((i-r)/s),c=We.minBlockX(t.pos),d=We.minBlockZ(t.pos),f=this.getNoiseChunk(t);for(let m=0;m<a;m+=1)for(let v=0;v<(n?1:a);v+=1){let g=t.getOrCreateSection(t.sectionsCount-1);for(let _=u-1;_>=0;_-=1)for(let b=s-1;b>=0;b-=1){const x=(l+_)*s+b,w=x&15,A=t.getSectionIndex(x);t.getSectionIndex(g.minBlockY)!==A&&(g=t.getOrCreateSection(A));for(let E=0;E<o;E+=1){const C=c+m*o+E,S=C&15;for(let I=0;I<(n?1:o);I+=1){const O=d+v*o+I,R=O&15,F=(p=f.getFinalState(C,x,O))!=null?p:this.settings.defaultBlock;g.setBlockState(S,w,R,F)}}}}}buildSurface(t,n="minecraft:plains"){const r=this.getNoiseChunk(t),i=yi.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,r,i,()=>n)}getNoiseChunk(t){return Rr(this.noiseChunkCache,We.toLong(t.pos),()=>{const n=Math.max(t.minY,this.settings.noise.minY),r=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),i=Ve.cellWidth(this.settings.noise),o=Ve.cellHeight(this.settings.noise),s=Math.floor(16/i),a=Math.floor(n/o),l=Math.floor((r-n)/o),u=We.minBlockX(t.pos),c=We.minBlockZ(t.pos);return new Pc(s,l,a,this.router,u,c,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var Eo;(function(e){function t(n){var i,o,s,a,l,u;const r=(i=P.readObject(n))!=null?i:{};return{surfaceRule:bi.fromJson(r.surface_rule),noise:Ve.fromJson(r.noise),defaultBlock:ve.fromJson(r.default_block),defaultFluid:ve.fromJson(r.default_fluid),noiseRouter:Vn.fromJson(r.noise_router),seaLevel:(o=P.readInt(r.sea_level))!=null?o:0,disableMobGeneration:(s=P.readBoolean(r.disable_mob_generation))!=null?s:!1,aquifersEnabled:(a=P.readBoolean(r.aquifers_enabled))!=null?a:!1,oreVeinsEnabled:(l=P.readBoolean(r.ore_veins_enabled))!=null?l:!1,legacyRandomSource:(u=P.readBoolean(r.legacy_random_source))!=null?u:!1}}e.fromJson=t})(Eo||(Eo={}));var oa=Object.freeze(Object.defineProperty({__proto__:null,get Aquifer(){return vi},BlendedNoise:Lc,get BlockPos(){return Ke},BlockState:ve,Chunk:Cp,get ChunkPos(){return We},ChunkSection:zi,get Climate(){return vr},get CubicSpline(){return gi},get DensityFunction(){return ce},get Direction(){return lt},FixedBiome:wr,FluidStatus:_r,get Holder(){return hn},Identifier:be,ImprovedNoise:ko,get Json(){return P},LegacyPositionalRandom:Nc,LegacyRandom:et,get MaterialRule(){return wi},get MinMaxNumberFunction(){return mi},MultiNoise:Ko,NoiseAquifer:$r,NoiseChunk:Pc,NoiseChunkGenerator:Ip,get NoiseGeneratorSettings(){return Eo},get NoiseParameters(){return jn},get NoiseRouter(){return Vn},get NoiseSettings(){return Ve},get NoiseSlideSettings(){return So},get Noises(){return mt},NormalNoise:Pr,PerlinNoise:ye,PerlinSimplexNoise:Sp,Registry:_i,SimplexNoise:Je,Structure:Jo,get SurfaceCondition(){return xi},SurfaceContext:Dc,get SurfaceRule(){return bi},SurfaceSystem:$c,get VerticalAnchor(){return Ln},get WorldgenContext(){return yi},get WorldgenRegistries(){return fn},XoroshiroPositionalRandom:Tc,XoroshiroRandom:Se,binarySearch:Oc,clamp:mr,clampedLerp:Bi,clampedMap:Fi,computeIfAbsent:Rr,getSeed:Zo,inverseLerp:qo,isPowerOfTwo:Ap,lazy:ar,lazyLerp:lr,lazyLerp2:Ao,lazyLerp3:Mc,lerp:zt,lerp2:fi,lerp3:Ic,longfromBytes:pi,map:gr,smoothstep:ei,square:Tt,upperPowerOfTwo:kp},Symbol.toStringTag,{value:"Module"}));let sa=!1;async function Mp(){sa||(await Ac(ra),sa=!0,console.debug(`Loaded deepslate-rs from "${ra}"`))}const Op={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 aa,la;async function Np(e,t,n){var m,v,g;const{biomeSource:r}=await Bc(e,n),i=t.data,o=-Math.round(n.offset[0])-100+n.res/2,s=-Math.round(n.offset[1])-100+n.res/2,a=t.width*4/n.res,l=4/n.res,u=[o*n.scale,(200+o)*n.scale,n.res*n.scale],c=[s*n.scale,(200+s)*n.scale,n.res*n.scale],d=n.layers.has("biomes")?(m=r.getBiomes)==null?void 0:m.call(r,...u,64,65,1,...c):void 0,f=[...n.layers].filter(_=>_!=="biomes"),p=f.length===0||(v=r.getClimates)==null?void 0:v.call(r,...u,64,65,1,...c);for(let _=0;_<200;_+=n.res)for(let b=0;b<200;b+=n.res){const x=b*a+_*l,w=_/n.res*200/n.res+b/n.res,A=(_+o)*n.scale,E=(b+s)*n.scale;let C=[50,50,50];if(n.layers.has("biomes")){const S=(g=d==null?void 0:d[w])!=null?g:r.getBiome(A,64,E);C=Rp(S.toString(),n.biomeColors)}else if(p&&f[0]){const S=p[w][f[0]],[I,O]=Op[f[0]],R=(S-I)/(O-I)*256;C=[R,R,R]}i[x]=C[0],i[x+1]=C[1],i[x+2]=C[2],i[x+3]=255}}async function Tp(e,t,n,r){var a;const{biomeSource:i}=await Bc(e,r),[o,s]=Pp([t,n],r);return Z({biome:i.getBiome(o,64,s).toString()},(a=i.getClimate)==null?void 0:a.call(i,o,64,s))}async function Bc(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return cn(n,aa)||(aa=Ri(n),la=await Lp(e,t)),{biomeSource:la}}async function Lp(e,t){var n,r,i,o,s;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new wr(be.parse(e.biome));case"checkerboard":const a=((r=e.scale)!=null?r:2)+2,l=(o=(i=e.biomes)==null?void 0:i.length)!=null?o:0;return{getBiome(u,c,d){var p;const f=(((u>>a)+(d>>a))%l+l)%l;return be.parse((p=e.biomes)==null?void 0:p[f].node)}};case"multi_noise":switch((s=e.preset)==null?void 0:s.replace(/^minecraft:/,"")){case"nether":e=qe(t.version,"1.18")?Dp:$p;break;case"overworld":e=qe(t.version,"1.18")?await Bp():e;break}if(e=M.DataModel.unwrapLists(e),qe(t.version,"1.18")){await Mp();const u=new b0,c=R=>typeof R=="number"?[R,R]:R,[d,f,p,m,v,g,_,b,x,w,A,E,C,S]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const R of e.biomes){const{temperature:F,humidity:j,continentalness:oe,erosion:le,weirdness:N,depth:$,offset:H}=R.parameters;d.push(c(F)[0]),f.push(c(F)[1]),p.push(c(j)[0]),m.push(c(j)[1]),v.push(c(oe)[0]),g.push(c(oe)[1]),_.push(c(le)[0]),b.push(c(le)[1]),x.push(c(N)[0]),w.push(c(N)[1]),A.push(c($)[0]),E.push(c($)[1]),C.push(H),S.push(u.getOrPut(R.biome,Math.floor(Math.random()*2147483647)))}const I=_p(new Float64Array(d),new Float64Array(f),new Float64Array(p),new Float64Array(m),new Float64Array(v),new Float64Array(g),new Float64Array(_),new Float64Array(b),new Float64Array(x),new Float64Array(w),new Float64Array(A),new Float64Array(E),new Float64Array(C),new Int32Array(S)),O=vp(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(R,F,j){var le;const oe=ta(I,O,R,R+1,1,F,F+1,1,j,j+1,1);return be.parse((le=u.getA(oe[0]))!=null?le:"unknown")},getBiomes(R,F,j,oe,le,N,$,H,T){return[...ta(I,O,R,F,j,oe,le,N,$,H,T)].map(k=>{var L;return be.parse((L=u.getA(k))!=null?L:"unknown")})},getClimate(R,F,j){const oe=na(O,R,R+1,1,F,F+1,1,j,j+1,1),[le,N,$,H,T]=oe.slice(0,5);return{temperature:le,humidity:N,continentalness:$,erosion:H,weirdness:T}},getClimates(R,F,j,oe,le,N,$,H,T){const y=na(O,R,F,j,oe,le,N,$,H,T),k=[];for(let L=0;L<y.length;L+=7){const[z,Y,ue,Ue,ht]=y.slice(L,L+5);k.push({temperature:z,humidity:Y,continentalness:ue,erosion:Ue,weirdness:ht})}return k}}}else{const u=["altitude","temperature","humidity","weirdness"].map((c,d)=>{var p;const f=e[`${c}_noise`];return f.firstOctave=it((p=f.firstOctave)!=null?p:-7,-100,-1),new Pr(new et(t.seed+BigInt(d)),f)});return!Array.isArray(e.biomes)||e.biomes.length===0?new wr(be.create("unknown")):{getBiome(c,d,f){const p=u.map(g=>g.sample(c,f,0));let m=1/0,v="";for(const{biome:g,parameters:_}of e.biomes){const b=Zn(_.altitude-p[0])+Zn(_.temperature-p[1])+Zn(_.humidity-p[2])+Zn(_.weirdness-p[3])+Zn(_.offset);b<m&&(m=b,v=g)}return be.parse(v)}}}}throw new Error("Unknown biome source")}function Rp(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:Fc[e];return n===void 0?Ho(e):n}function Pp([e,t],n){const r=(e-n.offset[0]-100+n.res/2)*n.scale,i=(t-n.offset[1]-100+n.res/2)*n.scale;return[r,i]}const Fc={"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]},$p={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}}]},Dp={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}}]};async function Bp(){return(await oc("1.18","dimension","overworld")).generator.biome_source}const tn=[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],ca=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function Fp(e,t,n){const r=new et(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new ye(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:s=>r.nextInt(s),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(s){return zp(s,this)}};for(let s=0;s<n.size[0]/16;s+=1)for(let a=0;a<n.size[2]/16;a+=1)qe(n.version,void 0,"1.17")?kn([s*16,0,a*16],M.DataModel.unwrapLists(e),i):Up([s*16,0,a*16],M.DataModel.unwrapLists(e.placement),i);const o=t.data;t.data.fill(255);for(const[s,a]of i.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 l=s[2]*(t.width*4)+s[0]*4,u=a<ca.length?ca[a]:Ho(i.features[a]);o[l]=it(50,205,u[0]),o[l+1]=it(50,205,u[1]),o[l+2]=it(50,205,u[2]),o[l+3]=255}for(let s=0;s<n.size[0];s+=1)for(let a=0;a<n.size[2];a+=1){if((Math.floor(s/16)+Math.floor(a/16))%2===0)continue;const l=a*(t.width*4)+s*4;for(let u=0;u<3;u+=1)o[l+u]=.85*o[l+u]}}function Hn(e){return e.startsWith("minecraft:")?e.slice(10):e}function at(e,t){return[[e[0],t,e[2]]]}function zp(e,t){var n,r;if(typeof e=="number")return e;if(e.base)return(r=e.base)!=null?r:1+t.nextInt(1+((n=e.spread)!=null?n:0));switch(Hn(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 it(t.sampleInt(e.value.source),e.value.min_inclusive,e.value.max_inclusive);case"clamped_normal":const i=e.value.mean+t.nextGaussian()*e.value.deviation;return Math.floor(it(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const o=e.distribution.reduce((a,l)=>a+l.weight,0);let s=t.nextInt(o);for(const a of e.distribution)if(s-=a.weight,s<0)return t.sampleInt(a.data);return 0}return 1}function xt(e,t){if(!Qt(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 jp(e,t){var n,r,i,o;if(!Qt(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return xt(e);switch(Hn(e.type)){case"constant":return xt(e.value);case"uniform":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive);return s+t.nextInt(a-s+1)}case"biased_to_bottom":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=t.nextInt(a-s-((n=e.inner)!=null?n:1)+1);return s+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=(i=e.inner)!=null?i:1,u=s+l+t.nextInt(a-s-l+1),c=s+t.nextInt(u-s);return s+t.nextInt(c-s+l)}case"trapezoid":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=(o=e.plateau)!=null?o:0;if(l>=a-s)return s+t.nextInt(a-s+1);const u=(a-s-l)/2,c=a-s-u;return s+t.nextInt(c+1)+t.nextInt(u+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function ua(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function kn(e,t,n){var o;if(typeof t=="string"){n.placements.push([e,ua(t,n)]);return}const r=Hn((o=t==null?void 0:t.type)!=null?o:"no_op"),i=Vp[r];i?i(t.config,e,n):n.placements.push([e,ua(JSON.stringify(t),n)])}function Co(e,t,n){var o;const r=Hn((o=t==null?void 0:t.type)!=null?o:"nope"),i=Hp[r];return i?i(t==null?void 0:t.config,e,n):[e]}const Vp={decorated:(e,t,n)=>{Co(t,e==null?void 0:e.decorator,n).forEach(i=>kn(i,e==null?void 0:e.feature,n))},random_boolean_selector:(e,t,n)=>{const r=n.nextFloat()<.5?e==null?void 0:e.feature_true:e==null?void 0:e.feature_false;kn(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const o of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=o==null?void 0:o.chance)!=null?i:0)){kn(t,o.feature,n);return}kn(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,o,s;const r=(s=e==null?void 0:e.features)==null?void 0:s[n.nextInt((o=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?o:0)];kn(t,r,n)}},Hp={chance:(e,t,n)=>{var r;return n.nextFloat()<1/((r=e==null?void 0:e.chance)!=null?r:1)?[t]:[]},count:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t)},count_extra:(e,t,n)=>{var i,o;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(o=e.extra_count)!=null?o:0),new Array(r).fill(t)},count_multilayer:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t).map(i=>[i[0]+n.nextInt(16),i[1],i[2]+n.nextInt(16)])},count_noise:(e,t,n)=>{const i=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(i).fill(t)},count_noise_biased:(e,t,n)=>{var s;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),o=Math.max(0,Math.ceil((i+((s=e.noise_offset)!=null?s:0))*e.noise_to_count_ratio));return new Array(o).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const o=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],s=Math.max(n.seaLevel,tn[it(0,63,o)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[o,s,a]}),decorated:(e,t,n)=>Co(t,e==null?void 0:e.outer,n).flatMap(r=>Co(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,o,s,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((o=e==null?void 0:e.spread)!=null?o:0)-((s=e.spread)!=null?s:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return at(t,r)},emerald_ore:(e,t,n)=>{const r=3+n.nextInt(6);return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)])},fire:(e,t,n)=>{const r=1+n.nextInt(n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},glowstone:(e,t,n)=>{const r=n.nextInt(1+n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},heightmap:(e,t,n)=>{const r=Math.max(n.seaLevel,tn[it(0,63,t[0])]);return at(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,tn[it(0,63,t[0])]);return at(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,tn[it(0,63,t[0])]);return at(t,r)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var r,i;if(n.nextInt(((r=e.chance)!=null?r:1)/10)===0){const o=n.nextInt(n.nextInt(248)+8);if(o<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const s=n.nextInt(16)+t[0],a=n.nextInt(16)+t[2];return[[s,o,a]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,o,s;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0);return at(t,r)},range_biased:(e,t,n)=>{var i,o,s;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0));return at(t,r)},range_very_biased:(e,t,n)=>{var i,o,s,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return at(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return at(t,r)},top_solid_heightmap:(e,t)=>{const n=tn[it(0,63,t[0])];return at(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return at(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var o,s;const n=tn[it(0,63,t[0])],r=n+((o=e==null?void 0:e.min_inclusive)!=null?o:-1/0),i=n+((s=e==null?void 0:e.max_inclusive)!=null?s:1/0);return t[1]<r||t[1]>i?[t]:[]},water_lake:(e,t,n)=>{var r;return n.nextInt((r=e.chance)!=null?r:1)===0?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function Up(e,t,n){var i;let r=[e];for(const o of t)!da[Hn((i=o==null?void 0:o.type)!=null?i:"nope")]||(r=r.flatMap(a=>da[Hn(o.type)](o,a,n)));for(const o of r)n.placements.push([o,0])}const da={count:({count:e},t,n)=>new Array(n.sampleInt(e!=null?e:1)).fill(t),count_on_every_layer:({count:e},t,n)=>new Array(n.sampleInt(e!=null?e:1)).fill(t).map(r=>[r[0]+n.nextInt(16),r[1],r[2]+n.nextInt(16)]),environment_scan:({},e)=>[e],height_range:({height:e},t,n)=>at(t,jp(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,tn[it(0,63,e[0])]);return at(e,n)},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},r,i)=>{const o=Math.max(1,t),s=i.biomeInfoNoise.sample(r[0]/o,0,r[2]/o),a=Math.max(0,Math.ceil((s+(n!=null?n:0))*e));return new Array(a).fill(r)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},r,i)=>{const s=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(s).fill(r)},random_offset:({xz_spread:e,y_spread:t},n,r)=>[[n[0]+r.sampleInt(e),n[1]+r.sampleInt(t),n[2]+r.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(e!=null?e:1)?[t]:[]};class Gp{constructor(){this.d=oa,this.deepslateCache=new Map,this.Z=0,this.chunksCache=[]}async loadVersion(t){if(this.loadedVersion!==t)return(this.loadingVersion!==t||!this.loadingPromise)&&(this.loadingVersion=t,this.loadingPromise=this.doLoadVersion(t)),this.loadingPromise}async doLoadVersion(t){const n=this.deepslateCache.get(t);if(n)this.d=n;else{if(qe(t,"1.19")?this.d=oa:qe(t,"1.18.2")?this.d=await ae(()=>import("./deepslate.esm.f5f15b7d.js"),["assets/deepslate.esm.f5f15b7d.js","assets/vec3.7a0b0b73.js"]):this.d=await ae(()=>import("./deepslate.esm.536484c1.js"),["assets/deepslate.esm.536484c1.js","assets/vec3.7a0b0b73.js"]),this.d.WorldgenRegistries){const r=[["worldgen/noise","NOISE",this.d.NoiseParameters],["worldgen/density_function","DENSITY_FUNCTION",this.d.DensityFunction]];await Promise.all(r.map(async([i,o,s])=>{const a=await $0(t,i),l=new this.d.Registry(this.d.Identifier.create(i));for(const[u,c]of a.entries())l.register(this.d.Identifier.parse(u),s.fromJson(c));this.d.WorldgenRegistries[o].assign(l)}))}this.deepslateCache.set(t,this.d)}this.loadedVersion=t,this.loadingVersion=void 0}loadChunkGenerator(t,n,r="unknown"){if(!this.loadedVersion)throw new Error("No deepslate version loaded");const i=[t,`${n}`,r];if(!cn(this.cacheState,i)){const o=new this.d.FixedBiome(qe(this.loadedVersion,"1.18.2")?this.d.Identifier.parse(r):r);console.log(this.d);const s=this.d.NoiseGeneratorSettings.fromJson(M.DataModel.unwrapLists(t)),a=new this.d.NoiseChunkGenerator(n,o,s);this.settingsCache=s.noise,this.generatorCache=a,this.chunksCache=[],this.cacheState=Ri(i)}}generateChunks(t,n,r="unknown"){if(t=Math.floor(t),!this.settingsCache)throw new Error("Tried to generate chunks before settings are loaded");const i=this.settingsCache.minY,o=this.settingsCache.height;return[...Array(Math.ceil(n/16)+1)].map((s,a)=>{const l=(t>>4)+a,u=this.chunksCache.find(d=>d.pos[0]===l);if(u)return u;const c=new this.d.Chunk(i,o,this.d.ChunkPos.create(l,this.Z>>4));if(!this.generatorCache)throw new Error("Tried to generate chunks before generator is loaded");return this.generatorCache.fill(c,!0),this.generatorCache.buildSurface(c,r),this.chunksCache.push(c),c})}loadDensityFunction(t,n){const r=this.d.XoroshiroRandom.create(n).forkPositional(),i=this.d.NoiseSettings.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}});return this.settingsCache=i,this.d.DensityFunction.fromJson(t).mapAll(new this.d.NoiseRouter.Visitor(r,i))}getNoiseSettings(){if(!this.settingsCache)throw new Error("Tried to access noise settings when they are not loaded");return this.settingsCache}getBlockState(t,n){t=Math.floor(t),n=Math.floor(n);const r=this.chunksCache.find(i=>this.d.ChunkPos.minBlockX(i.pos)<=t&&this.d.ChunkPos.maxBlockX(i.pos)>=t);return r==null?void 0:r.getBlockState(this.d.BlockPos.create(t,n,this.Z))}}class Yp{constructor(t){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0;const n=new et(t);this.minLimitPerlinNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new ye(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,o){this.settings=t,this.chunkWidth=t.size_horizontal*4,this.chunkHeight=t.size_vertical*4,this.chunkCountY=Math.floor(t.height/this.chunkHeight),t.amplified&&n>0&&(n=1+n*2,r=1+r*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(r*.9+.1),this.noiseColumnCache=Array(o).fill(null),this.xOffset=i}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),r=Math.floor(t/this.chunkWidth),i=Math.floor(t%this.chunkWidth)/this.chunkWidth,o=this.fillNoiseColumn(r),s=this.fillNoiseColumn(r+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let l=this.chunkHeight;l>=0;l-=1){const u=l/this.chunkHeight,c=a*this.chunkHeight+l;n[c]=y0(u,i,o[a],o[a+1],s[a],s[a+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const r=Array(this.chunkCountY+1),i=684.412*this.settings.sampling.xz_scale,o=684.412*this.settings.sampling.y_scale,s=i/this.settings.sampling.xz_factor,a=o/this.settings.sampling.y_factor,l=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let u=0;u<=this.chunkCountY;u+=1){let c=this.sampleAndClampNoise(t,u,this.mainPerlinNoise.getOctaveNoise(0).zo,i,o,s,a);const p=((1-u*2/this.chunkCountY+l)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;c+=p*(p>0?4:1),this.settings.top_slide.size>0&&(c=Xi(this.settings.top_slide.target,c,(this.chunkCountY-u-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(c=Xi(this.settings.bottom_slide.target,c,(u-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),r[u]=c}return this.noiseColumnCache[t-this.xOffset]=r,r}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),i=(n<0?-n*.3:n)*24.575625-2;return i<0?i*.009486607142857142:Math.min(i,1)*.006640625}sampleAndClampNoise(t,n,r,i,o,s,a){let l=0,u=0,c=0,d=1;for(let f=0;f<16;f+=1){const p=ye.wrap(t*i*d),m=ye.wrap(n*o*d),v=ye.wrap(r*i*d),g=o*d,_=this.minLimitPerlinNoise.getOctaveNoise(f);_&&(l+=_.sample(p,m,v,g,n*g)/d);const b=this.maxLimitPerlinNoise.getOctaveNoise(f);if(b&&(u+=b.sample(p,m,v,g,n*g)/d),f<8){const x=this.mainPerlinNoise.getOctaveNoise(f);x&&(c+=x.sample(ye.wrap(t*s*d),ye.wrap(n*a*d),ye.wrap(r*s*d),a*d,n*a*d)/d)}d/=2}return Xi(l/512,u/512,(c/10+1)/2)}}const Wp={"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]},Bt=new Gp;async function qp(e,t,n){var s,a,l,u;if(qe(n.version,"1.18")){await Bt.loadVersion(n.version),Bt.loadChunkGenerator(e,n.seed,n.biome),Bt.generateChunks(-n.offset,n.width,n.biome);const c=Bt.getNoiseSettings(),d=t.data;for(let f=0;f<n.width;f+=1)for(let p=0;p<c.height;p+=1){const m=f*4+(c.height-p-1)*4*t.width,v=(s=Bt.getBlockState(f-n.offset,p+c.minY))!=null?s:ve.AIR,g=(a=Wp[v.getName().toString()])!=null?a:[0,0,0];d[m]=g[0],d[m+1]=g[1],d[m+2]=g[2],d[m+3]=255}return}const r=new Yp(n.seed);r.reset(e.noise,(l=n.biomeDepth)!=null?l:0,(u=n.biomeScale)!=null?u:0,n.offset,n.width);const i=t.data,o=t.width*4;for(let c=0;c<n.width;c+=1){const d=r.iterateNoiseColumn(c-n.offset).reverse();for(let f=0;f<e.noise.height;f+=1){const p=f*o+c*4,m=Jp(d,f);i[p]=m,i[p+1]=m,i[p+2]=m,i[p+3]=255}}}function Zp(e,t){return Bt.getBlockState(e,t)}async function Xp(e,t,n){await Bt.loadVersion(n.version);const r=Bt.loadDensityFunction(e,n.seed),i=Bt.getNoiseSettings(),o=Array(n.width*i.height);let s=1/0,a=-1/0;for(let u=0;u<n.width;u+=1)for(let c=0;c<i.height;c+=1){const d=u+(i.height-c-1)*n.width,f=r.compute(ce.context(u-n.offset,c,0));s=Math.min(s,f),a=Math.max(a,f),o[d]=f}const l=t.data;for(let u=0;u<n.width*i.height;u+=1){const c=Math.floor(Fi(o[u],s,a,0,256));l[4*u]=c,l[4*u+1]=c,l[4*u+2]=c,l[4*u+3]=255}}function Jp(e,t){return e[t]>0?0:e[t+1]>0?150:255}function Kp(e,t,n){const r=new et(n.seed),i=jn.fromJson(M.DataModel.unwrapLists(e)),o=new Pr(r,i),s=-n.offset[0]-100,a=-n.offset[1]-100,l=t.data;for(let u=0;u<256;u+=1)for(let c=0;c<256;c+=1){const d=u*4+c*4*256,f=(u+s)*n.scale,p=(c+a)*n.scale,m=(o.sample(f,p,0)+1)*128;l[d]=m,l[d+1]=m,l[d+2]=m,l[d+3]=255}}const Qp=["biomes","temperature","humidity","continentalness","erosion","weirdness"],e1=({model:e,data:t,shown:n,version:r})=>{var C,S;const{locale:i}=Ee(),[o]=D(Vt()),[s,a]=D(2),[l,u]=D(void 0),[c,d]=D(new Set(["biomes"])),{biomeColors:f}=gc(),p=me([0,0]),m=me(1),v=me(),g=BigInt((C=e.get(new M.Path(["generator","seed"])))!=null?C:o),_=xe(()=>{if(!!n)return n1(e.get(new M.Path(["generator","settings"])))},[n]),b=n?t1(t,_):"",x=(S=t.type)==null?void 0:S.replace(/^minecraft:/,""),{canvas:w,redraw:A}=Tr({size(){return[200/m.current,200/m.current]},async draw(I){const O={octaves:_,biomeColors:f,layers:c,offset:p.current,scale:s,seed:g,res:m.current,version:r};await Np(t,I,O),m.current===4&&(clearTimeout(v.current),v.current=setTimeout(()=>{m.current=1,A()},150))},async onDrag(I,O){p.current[0]=p.current[0]+I*200,p.current[1]=p.current[1]+O*200,clearTimeout(v.current),m.current=x==="multi_noise"?4:1,A()},async onHover(I,O){const R={octaves:_,biomeColors:f,layers:c,offset:p.current,scale:s,seed:o,res:1,version:r},F=await Tp(t,Math.floor(I*200),Math.floor(O*200),R);u(F)},onLeave(){u(void 0)}},[r,b,s,o,c,f]);Q(()=>{n&&(m.current=x==="multi_noise"?4:1,A())},[r,b,s,o,c,n,f]);const E=I=>{p.current[0]=p.current[0]*s/I,p.current[1]=p.current[1]*s/I,a(I)};return h(ne,null,h("div",{class:"controls preview-controls"},l&&h(K,{label:l.biome,class:"no-pointer"}),x==="multi_noise"&&h(vt,{icon:"stack",tooltip:i("configure_layers")},Qp.map(I=>{const O=c.has(I);return h(K,{label:i(`layer.${I}`),active:O,tooltip:i(O?"enabled":"disabled"),onClick:R=>{d(new Set([I])),R.stopPropagation()}})})),(x==="multi_noise"||x==="checkerboard")&&h(ne,null,h(K,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>E(s*1.5)}),h(K,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>E(s/1.5)})),x==="multi_noise"&&h(K,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>Kl(e)})),(l==null?void 0:l.temperature)!==void 0&&h("div",{class:"controls secondary-controls"},h(K,{class:"no-pointer",label:Object.entries(l).filter(([I])=>I!=="biome").map(([I,O])=>`${I[0].toUpperCase()}: ${O.toFixed(2)}`).join(" ")})),h("canvas",{ref:w,width:"200",height:"200"}))};function t1(e,t){return JSON.stringify([e,t])}function n1(e){switch(typeof e!="string"&&(e=e.legacy_random_source?"minecraft:nether":"minecraft:overworld"),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"large_biomes":return{temperature:{firstOctave:-12,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-10,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-11,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-11,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,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]}}}}const r1=({data:e,version:t,shown:n})=>{const{locale:r}=Ee(),[i,o]=D(4),[s,a]=D(Vt()),l=JSON.stringify(e),{canvas:u,redraw:c}=Tr({size(){return[i*16,i*16]},async draw(d){Fp(e,d,{seed:s,version:t,size:[i*16,128,i*16]})}},[t,l,s]);return Q(()=>{n&&c()},[t,l,i,s,n]),h(ne,null,h("div",{class:"controls preview-controls"},h(K,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>o(Math.min(16,i+1))}),h(K,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>o(Math.max(1,i-1))}),h(K,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(Vt())})),h("canvas",{ref:u,width:"64",height:"64"}))},i1=({data:e,shown:t,version:n})=>{var g,_;const{locale:r}=Ee(),[i,o]=D(Vt()),[s,a]=D(!1),[l,u]=D(void 0),c=me(0),d=me(void 0),f=JSON.stringify([e]),p=(_=(g=e==null?void 0:e.noise)==null?void 0:g.height)!=null?_:256,{canvas:m,redraw:v}=Tr({size(){return[p,p]},async draw(b){const x={offset:c.current,width:b.width,seed:i,version:n};await Xp(e,b,x)},async onDrag(b){c.current+=b*p,v()},async onHover(b,x){var E,C;const w=Math.floor(b*p-c.current),A=p-Math.max(1,Math.ceil(x*p))+((C=(E=e==null?void 0:e.noise)==null?void 0:E.min_y)!=null?C:0);u(`X=${w} Y=${A}`)},onLeave(){u(void 0)}},[n,f,i]);return Q(()=>{d.current&&clearInterval(d.current),t&&(v(),s&&(d.current=setInterval(()=>{c.current-=8,v()},100)))},[n,f,i,t,s]),h(ne,null,h("div",{class:"controls preview-controls"},l&&h(K,{label:l,class:"no-pointer"}),h(vt,{icon:"gear",tooltip:r("terrain_settings")},h(K,{icon:s?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>a(!s)})),h(K,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:m,width:p,height:p}))},o1=({data:e,shown:t,version:n})=>{const{locale:r}=Ee(),[i,o]=D(Vt()),[s,a]=D(2),l=me([0,0]),u=JSON.stringify([e]),{canvas:c,redraw:d}=Tr({size(){return[256,256]},async draw(p){const m={offset:l.current,scale:s,seed:i,version:n};Kp(e,p,m)},async onDrag(p,m){l.current[0]=l.current[0]+p*256,l.current[1]=l.current[1]+m*256,d()}},[n,u,s,i]);Q(()=>{t&&d()},[n,u,s,i,t]);const f=p=>{l.current[0]=l.current[0]*s/p,l.current[1]=l.current[1]*s/p,a(p)};return h(ne,null,h("div",{class:"controls preview-controls"},h(K,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>f(s*1.5)}),h(K,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>f(s/1.5)}),h(K,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:c,width:"256",height:"256"}))},s1=({data:e,shown:t,version:n})=>{var C,S;const{locale:r}=Ee(),[i,o]=D(Vt()),[s,a]=D("minecraft:plains"),[l,u]=D(.2),[c,d]=D(.1),[f,p]=D(!1),[m,v]=D(void 0),g=me(0),_=me(void 0),b=JSON.stringify([e,l,c]),x=(S=(C=e==null?void 0:e.noise)==null?void 0:C.height)!=null?S:256,{canvas:w,redraw:A}=Tr({size(){return[x,x]},async draw(I){const O={biome:s,biomeDepth:c,biomeScale:l,offset:g.current,width:I.width,seed:i,version:n};await qp(e,I,O)},async onDrag(I){g.current+=I*x,A()},async onHover(I,O){var oe,le;const R=Math.floor(I*x-g.current),F=x-Math.max(1,Math.ceil(O*x))+((le=(oe=e==null?void 0:e.noise)==null?void 0:oe.min_y)!=null?le:0),j=Zp(R,F);v(j?`Y=${F} (${j.getName().path})`:`Y=${F}`)},onLeave(){v(void 0)}},[b,i]);Q(()=>{_.current&&clearInterval(_.current),t&&(async()=>{try{await A(),f&&(_.current=setInterval(()=>{g.current-=8,A()},100))}catch(I){throw I}})()},[n,b,i,t,s,l,c,f]);const E=xe(()=>{var I;return(I=or==null?void 0:or.get("worldgen/biome"))!=null?I:[]},[n]);return h(ne,null,h("div",{class:"controls preview-controls"},m&&h(K,{label:m,class:"no-pointer"}),h(vt,{icon:"gear",tooltip:r("terrain_settings")},qe(n,void 0,"1.17")?h(ne,null,h(Qr,{label:r("preview.scale"),value:`${l}`,onChange:I=>u(Number(I))}),h(Qr,{label:r("preview.depth"),value:`${c}`,onChange:I=>d(Number(I))})):h(Qr,{label:r("preview.biome"),value:s,onChange:a,dataList:E,larger:!0}),h(K,{icon:f?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>p(!f)})),h(K,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:w,width:x,height:x}))},a1=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function l1({model:e,version:t,id:n,shown:r}){var o;const[,i]=D(0);if(Pi(e,()=>{i(s=>s+1)}),!e)return h(ne,null);if(n==="dimension"&&((o=e.get(new M.Path(["generator","type"])))==null?void 0:o.endsWith("noise"))){const s=e.get(new M.Path(["generator","biome_source"]));if(s)return h(e1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/density_function"){const s=e.get(new M.Path([]));if(s)return h(i1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise"){const s=e.get(new M.Path([]));if(s)return h(o1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise_settings"){const s=e.get(new M.Path([]));if(s)return h(s1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&qe(t,"1.16","1.17")){const s=e.get(new M.Path([]));if(s)return h(r1,{model:e,version:t,shown:r,data:s})}return h(ne,null)}function ri(e,t){return e.schema.hook(c1,new M.ModelPath(e),e.data,{blockStates:t})}const c1={base({},e,t){return t},choice({switchNode:e},t,n,r){return e.hook(this,t,n,r)},list({children:e},t,n,r){if(!Array.isArray(n))return n;const i=n.map((o,s)=>e.hook(this,t.push(s),o.node,r));for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i},map({children:e,config:t},n,r,i){var a,l;if(r===void 0)return;const o=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[M.relativePath(n,t.validation.params.id).get()]:null,s={};Object.keys(r).forEach(u=>{var c;o&&!Object.keys((c=o.properties)!=null?c:{}).includes(u)||(s[u]=e.hook(this,n.push(u),r[u],i))});for(const u of Object.getOwnPropertySymbols(r))s[u]=r[u];return s},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},o=e(t);Object.keys(o).filter(s=>o[s].enabled(t)).forEach(s=>{const a=o[s].hook(this,t.push(s),n[s],r);a!=null&&(i[s]=a)});for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i}},eo={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let Jn=null;const to={json:{parse:async e=>{try{return JSON.parse(e)}catch{return Jn=await ae(()=>import("./index.82753987.js").then(function(n){return n.i}),[]),Jn.parse(e)}},stringify:(e,t)=>(Jn!=null?Jn:JSON).stringify(e,null,t)+`
`},yaml:{parse:async e=>_o.load(e),stringify:(e,t)=>_o.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function u1({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:o,copySuccess:s,onError:a}){const{locale:l}=Ee(),[u,c]=D(Ne.getIndent()),[d,f]=D(Ne.getFormat()),[p,m]=D(Ne.getHighlighting()),[v,g]=D(!1),_=me(null),b=me(()=>{}),x=me(async()=>{}),w=me(null),A=me(),E=Ce((O,R)=>{const F=ri(O,R);return to[d].stringify(F,eo[u])},[u,d]);Q(()=>{b.current=()=>{if(!!A.current&&!(!t||!n))try{const O=E(t,n);A.current.setValue(O)}catch(O){O instanceof Error?(O.message=`Error getting JSON output: ${O.message}`,a(O)):a(`Error getting JSON output: ${ct(O)}`),console.error(O),A.current.setValue("")}},x.current=async()=>{if(!A.current)return;const O=A.current.getValue();if(O.length!==0)try{const R=await to[d].parse(O);t==null||t.reset(M.DataModel.wrapLists(R),!1)}catch(R){R instanceof Error?(R.message=`Error importing: ${R.message}`,a(R)):a(`Error importing: ${ct(R)}`),console.error(R)}}},[t,n,u,d,p]),Q(()=>{p?(g(!1),A.current={getValue(){return""},setValue(){},configure(){},select(){}},ae(()=>import("./index.8ac52a74.js").then(function(O){return O.i}),[]).then(async O=>{await Promise.all([ae(()=>import("./json.c327d69b.js").then(function(F){return F.j}),[]),ae(()=>import("./yaml.e8f3b9ab.js"),[])]);const R=O.edit("editor");R.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),R.$blockScrolling=1/0,R.on("blur",()=>x.current()),R.getSession().setMode("ace/mode/json"),A.current={getValue(){return R.getSession().getValue()},setValue(F){R.getSession().setValue(F)},configure(F,j){R.setOption("useSoftTabs",F!=="tabs"),R.setOption("tabSize",F==="tabs"?4:eo[F]),R.getSession().setMode(`ace/mode/${j}`)},select(){R.selectAll()}},g(!0)})):A.current={getValue(){return w.current?w.current.value:""},setValue(O){!w.current||(w.current.value=O)},configure(){},select(){}}},[p]),Pi(t,()=>{!b.current||b.current()}),Q(()=>{!b.current||t&&b.current()},[t]),Q(()=>{!A.current||!b.current||(!p||v)&&(A.current.configure(u,d),b.current())},[u,d,p,v]),Q(()=>{r&&t&&n&&navigator.clipboard.writeText(E(t,n)).then(()=>{s()})},[r]),Q(()=>{if(i&&t&&n&&_.current){const O=encodeURIComponent(E(t,n));_.current.setAttribute("href",`data:text/json;charset=utf-8,${O}`),_.current.setAttribute("download",`${e}.${d}`),_.current.click()}},[i]),Q(()=>{o&&A.current&&(A.current.setValue(""),A.current.select())},[o]);const C=O=>{Ne.setIndent(O),c(O)},S=O=>{Ne.setFormat(O),f(O)},I=O=>{Ne.setHighlighting(O),m(O)};return h(ne,null,h("div",{class:"controls source-controls"},h(vt,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(eo).map(([O])=>h(K,{label:l(`indentation.${O}`),active:u===O,onClick:()=>C(O)})),h("hr",null),Object.keys(to).map(O=>h(K,{label:l(`format.${O}`),active:d===O,onClick:()=>S(O)})),h("hr",null),h(K,{icon:p?"square_fill":"square",label:l("highlighting"),onClick:()=>I(!p)}))),p?h("pre",{id:"editor",class:"source"}):h("textarea",{ref:w,class:"source",spellcheck:!1,autocorrect:"off",onBlur:x.current}),h("a",{ref:_,style:"display: none;"}))}function zc(e,t){for(var n in t)e[n]=t[n];return e}function Io(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Mo(e){this.props=e}function jc(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:Io(this.props,i)}function r(i){return this.shouldComponentUpdate=n,h(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Mo.prototype=new gt).isPureReactComponent=!0,Mo.prototype.shouldComponentUpdate=function(e,t){return Io(this.props,e)||Io(this.state,t)};var ha=G.__b;G.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ha&&ha(e)};var d1=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function h1(e){function t(n,r){var i=zc({},n);return delete i.ref,e(i,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return t.$$typeof=d1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var fa=function(e,t){return e==null?null:_t(_t(e).map(t))},f1={map:fa,forEach:fa,count:function(e){return e?_t(e).length:0},only:function(e){var t=_t(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:_t},p1=G.__e;G.__e=function(e,t,n){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}p1(e,t,n)};var pa=G.unmount;function ii(){this.__u=0,this.t=null,this.__b=null}function Vc(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function m1(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return h(n,o)}return i.displayName="Lazy",i.__f=!0,i}function er(){this.u=null,this.o=null}G.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),pa&&pa(e)},(ii.prototype=new gt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Vc(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function d(f,p,m){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(v){return d(v,p,m)}),f.__c&&f.__c.__P===p&&(f.__e&&m.insertBefore(f.__e,f.__d),f.__c.__e=!0,f.__c.__P=m)),f}(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__e:r.__b=null});c=r.t.pop();)c.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},ii.prototype.componentWillUnmount=function(){this.t=[]},ii.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function o(s,a,l){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),s.__c.__H=null),(s=zc({},s)).__c!=null&&(s.__c.__P===l&&(s.__c.__P=a),s.__c=null),s.__k=s.__k&&s.__k.map(function(u){return o(u,a,l)})),s}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&h(ne,null,e.fallback);return i&&(i.__h=null),[h(ne,null,t.__e?null:e.children),i]};var ma=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function g1(e){return this.getChildContext=function(){return e.context},e.children}function _1(e){var t=this,n=e.i;t.componentWillUnmount=function(){Rn(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Rn(h(g1,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function v1(e,t){return h(_1,{__v:e,i:t})}(er.prototype=new gt).__e=function(e){var t=this,n=Vc(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),ma(t,e,r)):i()};n?n(o):o()}},er.prototype.render=function(e){this.u=null,this.o=new Map;var t=_t(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},er.prototype.componentDidUpdate=er.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ma(e,n,t)})};var Hc=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,w1=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,y1=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function b1(e,t,n){return t.__k==null&&(t.textContent=""),Rn(e,t),typeof n=="function"&&n(),e?e.__c:null}function x1(e,t,n){return Qa(e,t),typeof n=="function"&&n(),e?e.__c:null}gt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(gt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var _a=G.event;function A1(){}function k1(){return this.cancelBubble}function S1(){return this.defaultPrevented}G.event=function(e){return _a&&(e=_a(e)),e.persist=A1,e.isPropagationStopped=k1,e.isDefaultPrevented=S1,e.nativeEvent=e};var Uc,va={configurable:!0,get:function(){return this.class}},wa=G.vnode;G.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){for(var i in r={},n){var o=n[i];i==="value"&&"defaultValue"in n&&o==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&o===!0?o="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!y1(n.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():w1.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():o===null&&(o=void 0),r[i]=o)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=_t(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=_t(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r}t&&n.class!=n.className&&(va.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",va)),e.$$typeof=Hc,wa&&wa(e)};var ya=G.__r;G.__r=function(e){ya&&ya(e),Uc=e.__c};var E1={ReactCurrentDispatcher:{current:{readContext:function(e){return Uc.__n[e.__c].props.value}}}};typeof performance=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function C1(e){return h.bind(null,e)}function Gc(e){return!!e&&e.$$typeof===Hc}function I1(e){return Gc(e)?el.apply(null,arguments):e}function M1(e){return!!e.__k&&(Rn(null,e),!0)}function O1(e){return e&&(e.base||e.nodeType===1&&e)||null}var N1=function(e,t){return e(t)},Oo={useState:D,useReducer:al,useEffect:Q,useLayoutEffect:ll,useRef:me,useImperativeHandle:ju,useMemo:xe,useCallback:Ce,useContext:gn,useDebugValue:Vu,version:"16.8.0",Children:f1,render:b1,hydrate:x1,unmountComponentAtNode:M1,createPortal:v1,createElement:h,createContext:pn,createFactory:C1,cloneElement:I1,createRef:ku,Fragment:ne,isValidElement:Gc,findDOMNode:O1,Component:gt,PureComponent:Mo,memo:jc,forwardRef:h1,unstable_batchedUpdates:N1,StrictMode:ne,Suspense:ii,SuspenseList:er,lazy:m1,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:E1};class Yc extends M.DataModel{constructor(t,n,r,i){super(t),this.mapper=n,this.getter=r,this.setter=i}map(t){return this.mapper(t)}get(t){return this.getter(t)}set(t,n,r){return this.setter(t,n,r)}}const T1=["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"],L1=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],R1=["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"],P1=["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","immersive_weathering.area_condition.type","immersive_weathering.block_growth.growth_for_face.entry.direction","immersive_weathering.position_test.predicate_type"],$1=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],D1=["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"],ba=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],B1=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],F1='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z"></path></svg>',z1=e=>he.generators.find(t=>t.id===e.replace(/^\$/,"")),j1=new M.DataModel(M.MapNode(M.StringNode(),M.StringNode()),{historyMax:0});function V1({model:e,lang:t,version:n,blockStates:r}){var l;const i=new M.ModelPath(e),[o,s,a]=e.schema.hook(Wc,i,Ri(e.data),t,n,r,{});return(l=s==null?void 0:s.props)!=null&&l.children.some(u=>u)?h("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i)},h("div",{class:"node-header"},o,s),h("div",{class:"node-body"},a)):a}const Wc={base(){return[null,null,null]},boolean(e,t,n,r,i,o,s){return[null,h(H1,Z({},ge(Z({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]},choice({choices:e,config:t,switchNode:n},r,i,o,s,a,l){const u=n.activeCase(r,!0),c=t!=null&&t.context?new M.ModelPath(r.getModel(),new M.Path(r.getArray(),[t.context])):r,[d,f,p]=u.node.hook(this,c,i,o,s,a,l);if(e.length===1)return[d,f,p];const m=t!=null&&t.choiceContext?new M.Path([],[t.choiceContext]):t!=null&&t.context?new M.Path([],[t.context]):r,v=_=>{var A;const b=(A=e.find(E=>E.type===_))!=null?A:u,x=b.node.default(),w=b.change?b.change(M.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(x==null?void 0:x.type)==="minecraft:decorated"?x.config.feature:x;r.model.set(r,M.DataModel.wrapLists(w))},g=h("select",{value:u.type,onChange:_=>v(_.target.value)},e.map(_=>h("option",{value:_.type},Ai(o,m.contextPush(_.type)))));return[d,h(ne,null,g,f),p]},list({children:e,config:t},n,r,i,o,s,a){const{expand:l,collapse:u,isToggled:c}=no(),[d,f]=D(50),p=n.getContext().join(".");if(D1.includes(p)){const b=h(ne,null,[...Array(t.maxLength)].map((w,A)=>h(tr,{lang:i,path:n.modelPush(A)})),h("div",{class:"fixed-list"})),x=h(ne,null,[...Array(t.maxLength)].map((w,A)=>{var C;return e.hook(this,n.modelPush(A),(C=r==null?void 0:r[A])==null?void 0:C.node,i,o,s,a)[1]}));return[b,x,null]}const m=()=>{Array.isArray(r)||(r=[]);const b=M.DataModel.wrapLists(e.default());n.model.set(n,[{node:b,id:sn()},...r])},v=()=>{Array.isArray(r)||(r=[]);const b=M.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:b,id:sn()}])},g=h("button",{class:"add tooltipped tip-se","aria-label":de(i,"add_top"),onClick:m},te.plus_circle),_=h(ne,null,r&&Array.isArray(r)&&r.map(({node:b,id:x},w)=>{if(w===d)return h("div",{class:"node node-header"},h("label",null,de(i,"entries_hidden",`${r.length-d}`)),h("button",{onClick:()=>f(Math.min(d+50,r.length))},de(i,"entries_hidden.more","50")),h("button",{onClick:()=>f(r.length)},de(i,"entries_hidden.all")));if(w>d)return null;const A=n.push(w).contextPush("entry"),E=e.type(A)==="object",C=c(x);let S;if(["loot_pool.entries.entry","loot_entry.alternatives.children.entry","loot_entry.group.children.entry","loot_entry.sequence.children.entry","function.set_contents.entries.entry"].includes(A.getContext().join("."))&&Qt(b)&&typeof b.type=="string"&&b.type.replace(/^minecraft:/,"")==="item"&&typeof b.name=="string"){const j=`item/${b.name.replace(/^minecraft:/,"")}`;or.get("texture").includes("minecraft:"+j)?S=h("img",{src:z0(o,j),alt:"",onError:oe=>oe.currentTarget.outerHTML=F1}):S=te.package}if(E&&(C===!1||C===void 0&&r.length>20))return h("div",{class:"node node-header","data-category":e.category(A)},h(tr,{lang:i,path:A,nested:!0}),h("button",{class:"toggle tooltipped tip-se","aria-label":`${de(i,"expand")}
${de(i,"expand_all","Ctrl")}`,onClick:l(x)},te.chevron_right),h("label",null,S!=null?S:Ai(i,A,`${w}`)),h(xa,{key:x,path:A,value:b,schema:e}));const I=()=>A.set(void 0),O=()=>{const j=[...n.get()];[j[w-1],j[w]]=[j[w],j[w-1]],n.model.set(n,j)},R=()=>{const j=[...n.get()];[j[w+1],j[w]]=[j[w],j[w+1]],n.model.set(n,j)};return h(ro,{key:x,label:S,path:A,schema:e,value:b,lang:i,version:o,states:s,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const j=[...n.get()];j.splice(w,0,{id:sn(),node:Ri(b)}),n.model.set(n,j)}}],ctx:ge(Z({},a),{index:(w===0?1:0)+(w===r.length-1?2:0)})},E&&h("button",{class:"toggle tooltipped tip-se","aria-label":`${de(i,"collapse")}
${de(i,"collapse_all","Ctrl")}`,onClick:u(x)},te.chevron_down),h("button",{class:"remove tooltipped tip-se","aria-label":de(i,"remove"),onClick:I},te.trashcan),r.length>1&&h("div",{class:"node-move"},h("button",{class:"move tooltipped tip-se","aria-label":de(i,"move_up"),onClick:O,disabled:w===0},te.chevron_up),h("button",{class:"move tooltipped tip-se","aria-label":de(i,"move_down"),onClick:R,disabled:w===r.length-1},te.chevron_down)))}),r&&r.length>0&&r.length<=d&&h("div",{class:"node node-header"},h("button",{class:"add tooltipped tip-se","aria-label":de(i,"add_bottom"),onClick:v},te.plus_circle)));return[null,g,_]},map({children:e,keys:t,config:n},r,i,o,s,a,l){var b,x,w,A,E;const{expand:u,collapse:c,isToggled:d}=no(),f=new M.ModelPath(j1,new M.Path([W1(r.toString())])),p=()=>{const C=f.get();r.model.set(r.push(C),M.DataModel.wrapLists(e.default()))},m=((b=n.validation)==null?void 0:b.validator)==="block_state_map"?a==null?void 0:a[M.relativePath(r,n.validation.params.id).get()]:null,v=m!=null&&m.properties?M.StringNode(null,{enum:Object.keys((x=m.properties)!=null?x:{})}):t;if(m&&r.last()==="Properties"){typeof i!="object"&&(i={});const C=Object.entries((w=m.properties)!=null?w:{}).map(([S,I])=>[S,M.StringNode(null,{enum:I})]);return Object.entries((A=m.properties)!=null?A:{}).forEach(([S,I])=>{typeof i[S]!="string"?r.model.errors.add(r.push(S),"error.expected_string"):I.includes(i[S])||r.model.errors.add(r.push(S),"error.invalid_enum_option",i[S])}),M.ObjectNode(Object.fromEntries(C)).hook(this,r,i,o,s,a,l)}const g=h(ne,null,v.hook(this,f,(E=f.get())!=null?E:"",o,s,a,l)[1],h("button",{class:"add tooltipped tip-se","aria-label":de(o,"add"),onClick:p},te.plus_circle)),_=h(ne,null,typeof i=="object"&&Object.entries(i).map(([C,S])=>{var oe,le,N,$;const I=r.modelPush(C),O=e.type(I)==="object",R=d(C);if(O&&(R===!1||R===void 0&&i.length>20))return h("div",{class:"node node-header","data-category":e.category(I)},h(tr,{lang:o,path:I,nested:!0}),h("button",{class:"toggle tooltipped tip-se","aria-label":`${de(o,"expand")}
${de(o,"expand_all","Ctrl")}`,onClick:u(C)},te.chevron_right),h("label",null,C),h(xa,{key:C,path:I,value:S,schema:e}));const F=m?M.StringNode(null,{enum:(le=(oe=m.properties)==null?void 0:oe[C])!=null?le:[]}):e;((N=m==null?void 0:m.properties)==null?void 0:N[C])&&typeof S=="string"&&!(($=m.properties)!=null&&$[C].includes(S))&&r.model.errors.add(I,"error.invalid_enum_option",S);const j=()=>I.set(void 0);return h(ro,{key:C,schema:F,path:I,value:S,lang:o,version:s,states:a,ctx:l,label:C},O&&h("button",{class:"toggle tooltipped tip-se","aria-label":`${de(o,"collapse")}
${de(o,"collapse_all","Ctrl")}`,onClick:c(C)},te.chevron_down),h("button",{class:"remove tooltipped tip-se","aria-label":de(o,"remove"),onClick:j},te.trashcan))}));return[null,g,_]},number(e,t,n,r,i,o,s){return[null,h(U1,Z({},ge(Z({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,o,s,a,l,u){var b;const{expand:c,collapse:d,isToggled:f}=no();if(i.getArray().length==0&&q1(t.context,o)){const{wrapper:x,fields:w}=Z1(n(i),i,o);o=x.data,n=()=>w,r=(A,E)=>new M.ModelPath(x,new M.Path(A.getArray(),["feature"])).push(E)}let p=null,m=null;if(e.optional())if(o===void 0){const x=()=>i.set(M.DataModel.wrapLists(e.default()));m=h("button",{class:"collapse closed tooltipped tip-se","aria-label":de(s,"expand"),onClick:x},te.plus_circle)}else{const x=()=>i.set(void 0);m=h("button",{class:"collapse open tooltipped tip-se","aria-label":de(s,"remove"),onClick:x},te.trashcan)}const v=i.getContext().join(".");if(B1.includes(v)||ba.includes(v)){const x=f(""),w=ba.includes(v)?x:!x;if(p=h(ne,null,h("button",{class:"toggle tooltipped tip-se","aria-label":de(s,w?"collapse":"expand"),onClick:x?d(""):c("")},w?te.chevron_down:te.chevron_right)),!w)return[p,m,null]}const g=typeof o=="object"&&o!==null&&((b=e.default())==null?void 0:b.pools)?ge(Z({},u),{loot:o==null?void 0:o.type}):u,_=h(ne,null,typeof o=="object"&&o!==null&&!(e.optional()&&o===void 0)&&Object.entries(n(i)).filter(([x,w])=>w.enabled(i)).map(([x,w])=>{const A=r(i,x),E=A.getContext().join(".");if(L1.includes(E))return null;const[C,S,I]=w.hook(this,A,o[x],s,a,l,g),O=w.type(A)==="object"&&R1.includes(E),R=P1.includes(E);return O||R?(p=h(ne,null,p,h(tr,{lang:s,path:A}),h(qc,{lang:s,path:A}),C),m=h(ne,null,m,S),O?I:null):h(ro,{key:x,schema:w,path:A,value:o[x],lang:s,version:a,states:l,ctx:g})}));return[p,m,_]},string(e,t,n,r,i,o,s){return[null,h(G1,Z({},ge(Z({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]}};function xa({path:e,value:t}){var r,i,o,s,a;switch(e.getContext().join(".")){case"loot_table.pools.entry":return h("label",null,(i=(r=t==null?void 0:t.entries)==null?void 0:r.length)!=null?i:0," entries");case"function.set_contents.entries.entry":case"loot_pool.entries.entry":return h("label",null,(a=(o=t==null?void 0:t.name)==null?void 0:o.replace(/^minecraft:/,""))!=null?a:(s=t==null?void 0:t.type)==null?void 0:s.replace(/^minecraft:/,""))}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return h("label",null,l.replace(/^minecraft:/,""));return null}function no(){const[e,t]=D(new Map),[n,r]=D(void 0);return{expand:a=>l=>{l.ctrlKey?(t(new Map),r(!0)):t(u=>new Map(u.set(a,!0)))},collapse:a=>l=>{l.ctrlKey?(t(new Map),r(!1)):t(u=>new Map(u.set(a,!1)))},isToggled:a=>{var l;return e instanceof Map?(l=e.get(a))!=null?l:n:!1}}}function H1({path:e,node:t,value:n,lang:r}){const i=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return h(ne,null,h("button",{class:n===!1?"selected":"",onClick:()=>i(!1)},de(r,"false")),h("button",{class:n===!0?"selected":"",onClick:()=>i(!0)},de(r,"true")))}function U1({path:e,config:t,integer:n,value:r,lang:i}){var a;const o=l=>{const u=l.target.value,c=n?parseInt(u):parseFloat(u);e.model.set(e,c)},s=l=>{const u=l.target.value,c=parseInt(u.slice(1),16);e.model.set(e,c)};return h(ne,null,h("input",{type:"text",value:r!=null?r:"",onBlur:o,onKeyDown:l=>{l.key==="Enter"&&o(l)}}),(t==null?void 0:t.color)&&h("input",{type:"color",value:"#"+((a=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?a:"000000"),onChange:s}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&h("button",{onClick:()=>Kl(e.model),class:"tooltipped tip-se","aria-label":de(i,"generate_new_seed")},te.sync))}function G1({path:e,getValues:t,config:n,node:r,value:i,lang:o,version:s,states:a}){var f,p,m;const l=v=>{v.stopPropagation();const g=v.target.value;g!==i&&e.model.set(e,g.length===0?void 0:g)},u=t(),c=e.getContext().join("."),d=!Kn(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if($1.includes(c))return h("textarea",{value:i!=null?i:"",onBlur:l});if(Kn(n)&&!n.additional||T1.includes(c)){let v=new M.Path([]);return Kn(n)&&typeof n.enum=="string"?v=v.contextPush(n.enum):d?v=v.contextPush(d):Kn(n)&&(v=e),h("select",{value:i!=null?i:"",onChange:l},r.optional()&&h("option",{value:""},de(o,"unset")),u.map(g=>h("option",{value:g},Ai(o,v.contextPush(g.replace(/^minecraft:/,""))))))}else if(!Kn(n)&&(n==null?void 0:n.validator)==="block_state_key"){const v=a==null?void 0:a[M.relativePath(e,n.params.id).get()],g=Object.keys((f=v==null?void 0:v.properties)!=null?f:{});return h("select",{value:i!=null?i:"",onChange:l},g.map(_=>h("option",null,_)))}else{const{biomeColors:v,setBiomeColor:g}=gc(),_=typeof i=="string"?i.includes(":")?i:"minecraft:"+i:"unknown",b=sn(),x=d?z1(d):void 0;return h(ne,null,h("input",{value:i!=null?i:"",onBlur:l,onKeyDown:w=>{w.key==="Enter"&&l(w)},list:u.length>0?b:""}),u.length>0&&h("datalist",{id:b},u.map(w=>h("option",{value:w}))),["generator_biome.biome"].includes(c)&&h("input",{type:"color",value:v0((m=(p=v[_])!=null?p:Fc[_])!=null?m:Ho(_)),onChange:w=>g(_,w0(w.currentTarget.value))}),["attribute_modifier.id","text_component_object.hoverEvent.show_entity.contents.id"].includes(c)&&h("button",{onClick:()=>e.set(f0()),class:"tooltipped tip-se","aria-label":de(o,"generate_new_uuid")},te.sync),x&&u.includes(i)&&i.startsWith("minecraft:")&&h("a",{href:`/${x.url}/?version=${s}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":de(o,"follow_reference")},te.link_external))}}function Y1({label:e,schema:t,path:n,value:r,lang:i,version:o,states:s,ctx:a,actions:l,children:u}){var w;const c=t.type(n),d=t.category(n),f=n.getContext().join("."),[p,m]=Uo(),v=A=>{A.preventDefault(),m()},g=ge(Z({},a),{depth:((w=a.depth)!=null?w:0)+1});delete g.index;const[_,b,x]=t.hook(Wc,n,r,i,o,s,g);return h("div",{class:`node ${c}-node`,"data-category":d},h("div",{class:"node-header",onContextMenu:v},h(tr,{lang:i,path:n}),h(qc,{lang:i,path:n}),u,_,h("label",null,e!=null?e:Ai(i,n,`${n.last()}`),p&&h("div",{class:"node-menu"},l==null?void 0:l.map(A=>{var E;return h("div",{key:A.label,class:"menu-item"},h(K,{icon:A.icon,tooltip:de(i,A.label),tooltipLoc:"se",onClick:()=>A.onSelect()}),h("span",null,(E=A.description)!=null?E:de(i,A.label)))}),h("div",{class:"menu-item"},h(K,{icon:"clippy",tooltip:de(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(f)}),h("span",null,f)))),b),x&&h("div",{class:"node-body"},x))}const ro=jc(Y1,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&cn(e.ctx,t.ctx)&&cn(e.value,t.value));function Kn(e){return!!(e!=null&&e.enum)}function W1(e){var t=0,n,r;for(n=0;n<e.length;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t|=0;return t}function Ai(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const o=r.slice(i).join("."),s=de(e,o,...n);if(o!==s)return s}return r[r.length-1]}function tr({lang:e,path:t,nested:n}){var o;t.model instanceof Yc&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(s=>s.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=de(e,r[0].error,...(o=r[0].params)!=null?o:[]);return Zc("node-error","issue_opened",i)}function qc({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=de(e,n);return r===n?null:Zc("node-help","info",r)}const Zc=(e,t,n)=>{const[r,i]=Uo();return h("div",{class:`node-icon ${e}${r?" show":""}`,onClick:i},te[t],h("span",{class:"icon-popup"},n))};function q1(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&Qt(t==null?void 0:t.config)}function Z1(e,t,n){const r=[],i=nr(n,r),o={type:e.type,config:M.ObjectNode({decorators:M.ListNode(ac),feature:lc},{context:"feature.decorated"})},s=M.ObjectNode(o,{context:"feature"}),a=new M.Path(["config","feature"]),l=new M.Path(["config","decorators"]),u=t.getModel(),c=new Yc(s,d=>{if(d.startsWith(a))return new M.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);if(d.startsWith(l)){if(d.modelArr.length===2)return new M.Path([]);const f=d.modelArr[2];if(typeof f=="number")return new M.Path([...[...Array(f)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)])}return d},d=>{if(d.equals(l)){const f=[];return nr(u.data,f),f}return u.get(c.map(d))},(d,f,p)=>{if(d.startsWith(a)){const m=[];nr(u.data,m);const v=new M.Path([...[...Array(m.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);return u.set(v,f,p)}else if(d.startsWith(l)){const m=d.modelArr[2];if(d.modelArr.length===2){const v=c.get(a);return u.set(new M.Path,No(v,f),p)}else if(typeof m=="number")if(d.modelArr.length===3&&f===void 0){const v=c.get(a),g=[];nr(u.data,g),g.splice(m,1);const _=No(v,g);return u.set(new M.Path,_,p)}else{const v=new M.Path([...[...Array(m)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)]);return u.set(v,f,p)}}u.set(d,f,p)});return c.data={type:u.data.type,config:{decorators:r,feature:i}},c.errors=u.errors,{fields:o,wrapper:c}}function nr(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!Qt(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),nr((r=e.config.feature)!=null?r:"",t))}function No(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:No(e,t)}}}function X1({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=Ee();if(!t||!n||i==="none")return h(ne,null);const[o]=cl(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(o)return h(ne,null);const[,s]=D(0);return Pi(t,()=>{s(a=>a+1)}),h("div",{class:"tree","data-cy":"tree"},h(V1,{model:t,lang:i,version:e,blockStates:n}))}var J1=Object.defineProperty,K1=Object.defineProperties,Q1=Object.getOwnPropertyDescriptors,Aa=Object.getOwnPropertySymbols,em=Object.prototype.hasOwnProperty,tm=Object.prototype.propertyIsEnumerable,ka=(e,t,n)=>t in e?J1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xc=(e,t)=>{for(var n in t||(t={}))em.call(t,n)&&ka(e,n,t[n]);if(Aa)for(var n of Aa(t))tm.call(t,n)&&ka(e,n,t[n]);return e};const Sa="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function Gr(e){return`[giscus] An error occurred. Error message: "${e}".`}function Ea(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function nm(){const e=document.getElementById("giscus-css")||document.createElement("style");e.id="giscus-css",e.textContent=`
.giscus, .giscus-frame {
width: 100%;
}
.giscus-frame {
border: none;
color-scheme: normal;
}
`,document.head.prepend(e)}function rm(e){const[t,n]=D(""),r=function({repo:s,repoId:a,category:l="",categoryId:u="",mapping:c,term:d="",theme:f="light",reactionsEnabled:p="1",emitMetadata:m="0",inputPosition:v="bottom",lang:g="en",session:_,origin:b}){const x=new URL(location.href);x.searchParams.delete("giscus");const w=x.toString(),A={origin:b=b||w,session:_,theme:f,reactionsEnabled:p,emitMetadata:m,inputPosition:v,repo:s,repoId:a,category:l,categoryId:u,description:Ea("description")};switch(c){case"url":A.term=w;break;case"title":A.term=document.title;break;case"og:title":A.term=Ea("title");break;case"specific":A.term=d;break;case"number":A.number=d;break;case"pathname":default:A.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${g}/widget?${new URLSearchParams(A)}`}((i=Xc({},e),K1(i,Q1({session:t}))));var i;const o=me(null);return Q(()=>{const s=location.href,a=new URL(s),l=localStorage.getItem("giscus-session"),u=a.searchParams.get("giscus")||"";if(u)return localStorage.setItem("giscus-session",JSON.stringify(u)),n(u),a.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,a.toString());if(l)try{n(JSON.parse(l||"")||"")}catch(c){n(""),localStorage.removeItem("giscus-session"),console.warn(`${Gr(c==null?void 0:c.message)} Session has been cleared.`)}},[]),Q(nm,[]),Q(()=>{const s=function(a,l=null){return function(u){if(u.origin!=="https://giscus.app")return;const{data:c}=u;if(typeof c!="object"||!c.giscus||(l&&c.giscus.resizeHeight&&(l.style.height=`${c.giscus.resizeHeight}px`),!c.giscus.error))return;const d=c.giscus.error;if(d.includes("Bad credentials")||d.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),a(),void console.warn(`${Gr(d)} Session has been cleared.`);console.error(`${Gr(d)} No session is stored initially. ${Sa}`)}d.includes("Discussion not found")?console.warn(`[giscus] ${d}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${Gr(d)} ${Sa}`)}}(()=>n(""),o.current);return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[]),Oo.createElement("div",{className:"giscus"},Oo.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:o}))}function im(e){const[t,n]=D(!1);return Q(()=>n(!0),[]),t?Oo.createElement(rm,Xc({},e)):null}function Qo({term:e}){const{actualTheme:t}=vc(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return h("div",{class:"giscus-container"},h(im,{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:r,lang:"en"}))}function Jc(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let qn=Jc();function om(e){qn=e}const sm=/[&<>"']/,am=/[&<>"']/g,lm=/[<>"']|&(?!#?\w+;)/,cm=/[<>"']|&(?!#?\w+;)/g,um={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ca=e=>um[e];function De(e,t){if(t){if(sm.test(e))return e.replace(am,Ca)}else if(lm.test(e))return e.replace(cm,Ca);return e}const dm=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Kc(e){return e.replace(dm,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const hm=/(^|[^\[])\^/g;function Ae(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(hm,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const fm=/[^\w:]/g,pm=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ia(e,t,n){if(e){let r;try{r=decodeURIComponent(Kc(n)).replace(fm,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!pm.test(n)&&(n=vm(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Yr={},mm=/^[^:]+:\/*[^/]*$/,gm=/^([^:]+:)[\s\S]*$/,_m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function vm(e,t){Yr[" "+e]||(mm.test(e)?Yr[" "+e]=e+"/":Yr[" "+e]=oi(e,"/",!0)),e=Yr[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(gm,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(_m,"$1")+t:e+t}const ki={exec:function(){}};function wt(e){let t=1,n,r;for(;t<arguments.length;t++){n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}function Ma(e,t){const n=e.replace(/\|/g,(o,s,a)=>{let l=!1,u=s;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r[r.length-1].trim()||r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function oi(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.substr(0,r-i)}function wm(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function Qc(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Oa(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Na(e,t,n,r){const i=t.href,o=t.title?De(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:o,text:De(s)}}function ym(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(`
`)}class es{constructor(t){this.options=t||qn}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:oi(r,`
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=ym(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim():n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=oi(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,o,s,a,l,u,c,d,f,p,m,v=n[1].trim();const g=v.length>1,_={type:"list",raw:"",ordered:g,start:g?+v.slice(0,-1):"",loose:!1,items:[]};v=g?`\\d{1,9}\\${v.slice(-1)}`:`\\${v}`,this.options.pedantic&&(v=g?v:"[*+-]");const b=new RegExp(`^( {0,3}${v})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(m=!1,!(!(n=b.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
`,1)[0],d=t.split(`
`,1)[0],this.options.pedantic?(s=2,p=c.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,p=c.slice(s),s+=n[1].length),l=!1,!c&&/^ *$/.test(d)&&(r+=d+`
`,t=t.substring(d.length+1),m=!0),!m){const w=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(f=t.split(`
`,1)[0],c=f,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(c));){if(c.search(/[^ ]/)>=s||!c.trim())p+=`
`+c.slice(s);else if(!l)p+=`
`+c;else break;!l&&!c.trim()&&(l=!0),r+=f+`
`,t=t.substring(f.length+1)}}_.loose||(u?_.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(p),i&&(o=i[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),_.items.push({type:"list_item",raw:r,task:!!i,checked:o,loose:!1,text:p}),_.raw+=r}_.items[_.items.length-1].raw=r.trimRight(),_.items[_.items.length-1].text=p.trimRight(),_.raw=_.raw.trimRight();const x=_.items.length;for(a=0;a<x;a++){this.lexer.state.top=!1,_.items[a].tokens=this.lexer.blockTokens(_.items[a].text,[]);const w=_.items[a].tokens.filter(E=>E.type==="space"),A=w.every(E=>{const C=E.raw.split("");let S=0;for(const I of C)if(I===`
`&&(S+=1),S>1)return!0;return!1});!_.loose&&w.length&&A&&(_.loose=!0,_.items[a].loose=!0)}return _}}html(t){const n=this.rules.block.html.exec(t);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(n[0]):De(n[0]),r.tokens=[],this.lexer.inline(r.text,r.tokens)),r}}def(t){const n=this.rules.block.def.exec(t);if(n){n[3]&&(n[3]=n[3].substring(1,n[3].length-1));const r=n[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:r,raw:n[0],href:n[2],title:n[3]}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:Ma(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,o,s,a,l;for(o=0;o<i;o++)/^ *-+: *$/.test(r.align[o])?r.align[o]="right":/^ *:-+: *$/.test(r.align[o])?r.align[o]="center":/^ *:-+ *$/.test(r.align[o])?r.align[o]="left":r.align[o]=null;for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=Ma(r.rows[o],r.header.length).map(u=>({text:u}));for(i=r.header.length,s=0;s<i;s++)r.header[s].tokens=[],this.lexer.inlineTokens(r.header[s].text,r.header[s].tokens);for(i=r.rows.length,s=0;s<i;s++)for(l=r.rows[s],a=0;a<l.length;a++)l[a].tokens=[],this.lexer.inlineTokens(l[a].text,l[a].tokens);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n){const r={type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r={type:"paragraph",raw:n[0],text:n[1].charAt(n[1].length-1)===`
`?n[1].slice(0,-1):n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}text(t){const n=this.rules.block.text.exec(t);if(n){const r={type:"text",raw:n[0],text:n[0],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:De(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):De(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const s=oi(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=wm(n[2],"()");if(s>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],o=s[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),Na(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i||!i.href){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return Na(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(r===""||this.rules.inline.punctuation.exec(r))){const s=i[0].length-1;let a,l,u=s,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(i=d.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=a.length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(s,l)%2){const p=t.slice(1,s+i.index+l);return{type:"em",raw:t.slice(0,s+i.index+l+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}const f=t.slice(2,s+i.index+l-1);return{type:"strong",raw:t.slice(0,s+i.index+l+1),text:f,tokens:this.lexer.inlineTokens(f,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=De(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2],[])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=De(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=De(r[1]),o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=De(this.options.mangle?n(r[0]):r[0]),o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);i=De(r[0]),r[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):De(r[0]):r[0]:i=De(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const W={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ki,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};W._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;W._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;W.def=Ae(W.def).replace("label",W._label).replace("title",W._title).getRegex();W.bullet=/(?:[*+-]|\d{1,9}[.)])/;W.listItemStart=Ae(/^( *)(bull) */).replace("bull",W.bullet).getRegex();W.list=Ae(W.list).replace(/bull/g,W.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+W.def.source+")").getRegex();W._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";W._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;W.html=Ae(W.html,"i").replace("comment",W._comment).replace("tag",W._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();W.paragraph=Ae(W._paragraph).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",W._tag).getRegex();W.blockquote=Ae(W.blockquote).replace("paragraph",W.paragraph).getRegex();W.normal=wt({},W);W.gfm=wt({},W.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});W.gfm.table=Ae(W.gfm.table).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",W._tag).getRegex();W.gfm.paragraph=Ae(W._paragraph).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",W.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",W._tag).getRegex();W.pedantic=wt({},W.normal,{html:Ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ki,paragraph:Ae(W.normal._paragraph).replace("hr",W.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",W.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const V={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ki,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ki,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};V._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";V.punctuation=Ae(V.punctuation).replace(/punctuation/g,V._punctuation).getRegex();V.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;V.escapedEmSt=/\\\*|\\_/g;V._comment=Ae(W._comment).replace("(?:-->|$)","-->").getRegex();V.emStrong.lDelim=Ae(V.emStrong.lDelim).replace(/punct/g,V._punctuation).getRegex();V.emStrong.rDelimAst=Ae(V.emStrong.rDelimAst,"g").replace(/punct/g,V._punctuation).getRegex();V.emStrong.rDelimUnd=Ae(V.emStrong.rDelimUnd,"g").replace(/punct/g,V._punctuation).getRegex();V._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;V._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;V._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;V.autolink=Ae(V.autolink).replace("scheme",V._scheme).replace("email",V._email).getRegex();V._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;V.tag=Ae(V.tag).replace("comment",V._comment).replace("attribute",V._attribute).getRegex();V._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;V._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;V._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;V.link=Ae(V.link).replace("label",V._label).replace("href",V._href).replace("title",V._title).getRegex();V.reflink=Ae(V.reflink).replace("label",V._label).replace("ref",W._label).getRegex();V.nolink=Ae(V.nolink).replace("ref",W._label).getRegex();V.reflinkSearch=Ae(V.reflinkSearch,"g").replace("reflink",V.reflink).replace("nolink",V.nolink).getRegex();V.normal=wt({},V);V.pedantic=wt({},V.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ae(/^!?\[(label)\]\((.*?)\)/).replace("label",V._label).getRegex(),reflink:Ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V._label).getRegex()});V.gfm=wt({},V.normal,{escape:Ae(V.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/});V.gfm.url=Ae(V.gfm.url,"i").replace("email",V.gfm._extended_email).getRegex();V.breaks=wt({},V.gfm,{br:Ae(V.br).replace("{2,}","*").getRegex(),text:Ae(V.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function bm(e){return e.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ta(e){let t="",n,r;const i=e.length;for(n=0;n<i;n++)r=e.charCodeAt(n),Math.random()>.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class Ut{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qn,this.options.tokenizer=this.options.tokenizer||new es,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:W.normal,inline:V.normal};this.options.pedantic?(n.block=W.pedantic,n.inline=V.pedantic):this.options.gfm&&(n.block=W.gfm,this.options.breaks?n.inline=V.breaks:n.inline=V.gfm),this.tokenizer.rules=n}static get rules(){return{block:W,inline:V}}static lex(t,n){return new Ut(n).lex(t)}static lexInline(t,n){return new Ut(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,i,o,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],s&&i.type==="paragraph"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),s=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,i,o,s=t,a,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+Oa("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+Oa("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,s,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,Ta)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,Ta))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(function(p){f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o,bm)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class ts{constructor(t){this.options=t||qn}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(t,i);o!=null&&o!==t&&(r=!0,t=o)}return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="'+this.options.langPrefix+De(i,!0)+'">'+(r?t:De(t,!0))+`</code></pre>
`:"<pre><code>"+(r?t:De(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
`+t+`</blockquote>
`}html(t){return t}heading(t,n,r,i){return this.options.headerIds?"<h"+n+' id="'+this.options.headerPrefix+i.slug(r)+'">'+t+"</h"+n+`>
`:"<h"+n+">"+t+"</h"+n+`>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(t,n,r){const i=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
`+t+"</"+i+`>
`}listitem(t){return"<li>"+t+`</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+`</p>
`}table(t,n){return n&&(n="<tbody>"+n+"</tbody>"),`<table>
<thead>
`+t+`</thead>
`+n+`</table>
`}tablerow(t){return`<tr>
`+t+`</tr>
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?"<"+r+' align="'+n.align+'">':"<"+r+">")+t+"</"+r+`>
`}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,n,r){if(t=Ia(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+De(t)+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=Ia(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<img src="'+t+'" alt="'+r+'"';return n&&(i+=' title="'+n+'"'),i+=this.options.xhtml?"/>":">",i}text(t){return t}}class eu{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class tu{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[t];do i++,r=t+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=i,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class Gt{constructor(t){this.options=t||qn,this.options.renderer=this.options.renderer||new ts,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new eu,this.slugger=new tu}static parse(t,n){return new Gt(n).parse(t)}static parseInline(t,n){return new Gt(n).parseInline(t)}parse(t,n=!0){let r="",i,o,s,a,l,u,c,d,f,p,m,v,g,_,b,x,w,A,E;const C=t.length;for(i=0;i<C;i++){if(p=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type]&&(E=this.options.extensions.renderers[p.type].call({parser:this},p),E!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type))){r+=E||"";continue}switch(p.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(p.tokens),p.depth,Kc(this.parseInline(p.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(p.text,p.lang,p.escaped);continue}case"table":{for(d="",c="",a=p.header.length,o=0;o<a;o++)c+=this.renderer.tablecell(this.parseInline(p.header[o].tokens),{header:!0,align:p.align[o]});for(d+=this.renderer.tablerow(c),f="",a=p.rows.length,o=0;o<a;o++){for(u=p.rows[o],c="",l=u.length,s=0;s<l;s++)c+=this.renderer.tablecell(this.parseInline(u[s].tokens),{header:!1,align:p.align[s]});f+=this.renderer.tablerow(c)}r+=this.renderer.table(d,f);continue}case"blockquote":{f=this.parse(p.tokens),r+=this.renderer.blockquote(f);continue}case"list":{for(m=p.ordered,v=p.start,g=p.loose,a=p.items.length,f="",o=0;o<a;o++)b=p.items[o],x=b.checked,w=b.task,_="",b.task&&(A=this.renderer.checkbox(x),g?b.tokens.length>0&&b.tokens[0].type==="paragraph"?(b.tokens[0].text=A+" "+b.tokens[0].text,b.tokens[0].tokens&&b.tokens[0].tokens.length>0&&b.tokens[0].tokens[0].type==="text"&&(b.tokens[0].tokens[0].text=A+" "+b.tokens[0].tokens[0].text)):b.tokens.unshift({type:"text",text:A}):_+=A),_+=this.parse(b.tokens,g),f+=this.renderer.listitem(_,w,x);r+=this.renderer.list(f,m,v);continue}case"html":{r+=this.renderer.html(p.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(f=p.tokens?this.parseInline(p.tokens):p.text;i+1<C&&t[i+1].type==="text";)p=t[++i],f+=`
`+(p.tokens?this.parseInline(p.tokens):p.text);r+=n?this.renderer.paragraph(f):f;continue}default:{const S='Token with "'+p.type+'" type was not found.';if(this.options.silent){console.error(S);return}else throw new Error(S)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,o,s;const a=t.length;for(i=0;i<a;i++){if(o=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(s=this.options.extensions.renderers[o.type].call({parser:this},o),s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){r+=s||"";continue}switch(o.type){case"escape":{r+=n.text(o.text);break}case"html":{r+=n.html(o.text);break}case"link":{r+=n.link(o.href,o.title,this.parseInline(o.tokens,n));break}case"image":{r+=n.image(o.href,o.title,o.text);break}case"strong":{r+=n.strong(this.parseInline(o.tokens,n));break}case"em":{r+=n.em(this.parseInline(o.tokens,n));break}case"codespan":{r+=n.codespan(o.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(o.tokens,n));break}case"text":{r+=n.text(o.text);break}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}function re(e,t,n){if(typeof e=="undefined"||e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(typeof t=="function"&&(n=t,t=null),t=wt({},re.defaults,t||{}),Qc(t),n){const r=t.highlight;let i;try{i=Ut.lex(e,t)}catch(a){return n(a)}const o=function(a){let l;if(!a)try{t.walkTokens&&re.walkTokens(i,t.walkTokens),l=Gt.parse(i,t)}catch(u){a=u}return t.highlight=r,a?n(a):n(null,l)};if(!r||r.length<3||(delete t.highlight,!i.length))return o();let s=0;re.walkTokens(i,function(a){a.type==="code"&&(s++,setTimeout(()=>{r(a.text,a.lang,function(l,u){if(l)return o(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),s--,s===0&&o()})},0))}),s===0&&o();return}try{const r=Ut.lex(e,t);return t.walkTokens&&re.walkTokens(r,t.walkTokens),Gt.parse(r,t)}catch(r){if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t.silent)return"<p>An error occurred:</p><pre>"+De(r.message+"",!0)+"</pre>";throw r}}re.options=re.setOptions=function(e){return wt(re.defaults,e),om(re.defaults),re};re.getDefaults=Jc;re.defaults=qn;re.use=function(...e){const t=wt({},...e),n=re.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const s=n.renderers?n.renderers[o.name]:null;s?n.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[o.level]?n[o.level].unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}o.childTokens&&(n.childTokens[o.name]=o.childTokens)})),i.renderer){const o=re.defaults.renderer||new ts;for(const s in i.renderer){const a=o[s];o[s]=(...l)=>{let u=i.renderer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}t.renderer=o}if(i.tokenizer){const o=re.defaults.tokenizer||new es;for(const s in i.tokenizer){const a=o[s];o[s]=(...l)=>{let u=i.tokenizer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}t.tokenizer=o}if(i.walkTokens){const o=re.defaults.walkTokens;t.walkTokens=function(s){i.walkTokens.call(this,s),o&&o.call(this,s)}}r&&(t.extensions=n),re.setOptions(t)})};re.walkTokens=function(e,t){for(const n of e)switch(t.call(re,n),n.type){case"table":{for(const r of n.header)re.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)re.walkTokens(i.tokens,t);break}case"list":{re.walkTokens(n.items,t);break}default:re.defaults.extensions&&re.defaults.extensions.childTokens&&re.defaults.extensions.childTokens[n.type]?re.defaults.extensions.childTokens[n.type].forEach(function(r){re.walkTokens(n[r],t)}):n.tokens&&re.walkTokens(n.tokens,t)}};re.parseInline=function(e,t){if(typeof e=="undefined"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=wt({},re.defaults,t||{}),Qc(t);try{const n=Ut.lexInline(e,t);return t.walkTokens&&re.walkTokens(n,t.walkTokens),Gt.parseInline(n,t)}catch(n){if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t.silent)return"<p>An error occurred:</p><pre>"+De(n.message+"",!0)+"</pre>";throw n}};re.Parser=Gt;re.parser=Gt.parse;re.Renderer=ts;re.TextRenderer=eu;re.Lexer=Ut;re.lexer=Ut.lex;re.Tokenizer=es;re.Slugger=tu;re.parse=re;Gt.parse;Ut.lex;function xm({change:e,activeTags:t,toggleTag:n}){return h("div",{class:"changelog-entry"},h("div",{class:"changelog-version"},h("a",{href:`/versions/?id=${e.version}`},e.version),h("a",{href:`/versions/?id=${e.group}`},e.group)),h("div",{class:"changelog-tags"},e.tags.map(r=>h(Dr,{label:r,onClick:n?()=>n(r):void 0,active:t==null?void 0:t.includes(r)}))),h("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:re(e.content)}}))}const Am="tags",io="|";function nu(){const[e,t]=un(Am),n=xe(()=>{var i;return(i=e==null?void 0:e.split(io))!=null?i:[]},[e]);return[n,(i,o)=>{o===!1||n.includes(i)&&o!==!0?t(n.filter(s=>s!==i).join(io),!0):t([...n,i].sort().join(io),!0)}]}function Dr({label:e,active:t,onClick:n}){const r=e==="breaking"?5:Ql(e)%360;return h("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n},e==="breaking"&&te.alert,e)}const km="search";function ru({changes:e,defaultOrder:t}){const{locale:n}=Ee(),[r,i]=un(km),[o,s]=nu(),a=xe(()=>{const d=(r!=null?r:"").split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return d.length===0&&o.length===0?e:e==null?void 0:e.filter(f=>{if(!o.every(m=>f.tags.includes(m)))return!1;const p=f.tags.join(" ")+" "+f.content.toLowerCase();return d.every(m=>m.startsWith("!")?m.length===1||!p.includes(m.slice(1)):p.includes(m))})},[e,r,o]),[l,u]=D(t==="desc"),c=xe(()=>a==null?void 0:a.sort((d,f)=>l?f.order-d.order:d.order-f.order),[a,l]);return h(ne,null,h("div",{class:"changelog-query"},h(dn,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:r,onChange:d=>i(d,!0)}),h(K,{icon:l?"sort_desc":"sort_asc",label:l?"Newest first":"Oldest first",onClick:()=>u(!l)})),o.length>0&&h("div",{class:"changelog-tags"},o.map(d=>h(Dr,{label:d,onClick:()=>s(d)}))),h("div",{class:"changelog-list"},c===void 0?h("span",{class:"note"},n("loading")):c.length===0?h("span",{class:"note"},n("changelog.no_results")):c.map(d=>h(xm,{change:d,activeTags:o,toggleTag:s}))))}function Sm({id:e,version:t}){var u,c;const{locale:n}=Ee(),[r,i]=D("changelog"),[o,s]=D(void 0);Q(()=>{rc().then(d=>s(d.map(f=>ge(Z({},f),{tags:f.tags.filter(p=>p!==f.group)})))).catch(d=>console.error(d))},[]);const a=xe(()=>o==null?void 0:o.filter(d=>d.version===e||d.group===e),[e,o]),l=t&&T0(t.id);return h(ne,null,h("div",{class:"version-detail"},h("h2",null,(u=t==null?void 0:t.name)!=null?u:e),h("div",{class:"version-info"},t?h(ne,null,h($t,{label:n("versions.released"),value:iu(t)}),h($t,{label:n("versions.release_target"),value:t.release_target,link:t.id!==t.release_target?`/versions/?id=${t.release_target}`:void 0}),h($t,{label:n("versions.data_version"),value:t.data_version}),h($t,{label:n("versions.protocol_version"),value:t.protocol_version}),h($t,{label:n("versions.data_pack_format"),value:t.data_pack_version}),h($t,{label:n("versions.resource_pack_format"),value:t.resource_pack_version})):((c=a==null?void 0:a.length)!=null?c:0>1)?h("p",null,"This version is not released yet."):h("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")),h("div",{class:"version-tabs"},h("span",{class:r==="changelog"?"selected":"",onClick:()=>i("changelog")},n("versions.technical_changes")),h("span",{class:r==="discussion"?"selected":"",onClick:()=>i("discussion")},n("versions.discussion")),l&&h("a",{href:l,target:"_blank"},n("versions.article"),te.link_external)),h("div",{class:"version-tab"},r==="changelog"&&h(ru,{changes:a,defaultOrder:"asc"}),r==="discussion"&&h(Qo,{term:`version/${e}/`}))))}function iu(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function Em({version:e,link:t}){const{locale:n}=Ee();return h("a",{class:"version-entry",href:t},h("span",{class:"version-id"},e.id),h($t,{label:n("versions.released"),value:iu(e),compact:!0}),h($t,{label:n("versions.data_version"),value:e.data_version,optional:!0}),h($t,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}const Cm="search";function Im({versions:e,link:t}){const{locale:n}=Ee(),[r,i]=D(!0),[o,s]=un(Cm),a=xe(()=>e.filter(l=>l.type==="snapshot"&&!r?!1:l.id.includes(o!=null?o:"")),[e,r,o]);return h(ne,null,h("div",{class:"versions-controls"},h(dn,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:o,onChange:s}),h(cp,{label:"Include snapshots",value:r,onChange:i})),h("div",{class:"version-list"},a.map(l=>h(Em,{version:l,link:t==null?void 0:t(l.id)})),a.length===0&&h("span",null,n("versions.no_results"))))}function $t({label:e,value:t,link:n,compact:r,optional:i}){return h("div",{class:`version-metadata${i?" version-metadata-hide":""}`},h("span",{class:r?"version-metadata-hide":void 0},e,": "),h("span",{class:"version-metadata-value"},t),n&&h("a",{href:n,class:"version-metadata-link"},te.link_external))}function Mm({title:e,link:t,versions:n,tags:r,activeTags:i,toggleTag:o}){const s=a=>l=>{o&&o(a),l.preventDefault(),l.stopImmediatePropagation()};return h("a",{class:"guide-card",href:t},h("span",{class:"guide-versions"},n.join(" \u2022 ")),h("h3",null,e),h("div",{class:"guide-tags"},r.sort().map(a=>h(Dr,{label:a,onClick:s(a),active:i==null?void 0:i.includes(a)}))))}const La={system:"device_desktop",dark:"moon",light:"sun"};function Om(){const{lang:e,locale:t,changeLocale:n}=Ee(),{theme:r,changeTheme:i}=vc(),{version:o}=Wn(),{title:s}=ut(),a=ec(Pn());return h("header",null,h("div",{class:"title"},h(sl,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},ou.home),h("h1",null,s),a&&h(vt,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},he.generators.filter(l=>l.category===(a==null?void 0:a.category)&&qe(o,l.minVersion)).map(l=>h(K,{label:t(l.partner?`partner.${l.partner}.${l.id}`:l.id),active:l.id===a.id,onClick:()=>Jt(It(l.url))})))),h("nav",null,h("ul",null,h("li",{"data-cy":"language-switcher"},h(vt,{icon:"globe",tooltip:t("language")},he.languages.map(({code:l,name:u})=>h(K,{label:u,active:l===e,onClick:()=>n(l)})))),h("li",{"data-cy":"theme-switcher"},h(vt,{icon:La[r],tooltip:t("theme")},Object.entries(La).map(([l,u])=>h(K,{icon:u,label:t(`theme.${l}`),active:l===r,onClick:()=>i(l)})))),h("li",{class:"dimmed"},h("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},te.mark_github)))))}const ou={home:h("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),h("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),h("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),h("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),h("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),h("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:h("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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:h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},h("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),h("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 Nm({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:o,onEdit:s,onDelete:a,delayedPlay:l}){const{locale:u}=Ee(),{version:c}=Wn(),[d,f]=D(!0),[p,m]=D(!1),[v,g]=D(!1),_=me([]),b=`playsound minecraft:${n} master @s ~ ~ ~ ${o} ${i}`;Q(()=>{var O,R,F;const I=t[n];g(((R=(O=I==null?void 0:I.sounds)==null?void 0:O.length)!=null?R:0)===0),_.current.forEach(j=>j.stop()),_.current=((F=I==null?void 0:I.sounds)!=null?F:[]).map(j=>{const oe=typeof j=="string"?j:j.name,le=B0(c,oe),N=e({src:[le],format:["ogg"],volume:o,rate:i});N.on("end",()=>{m(!1)});const $=()=>{d&&_.current.every(H=>H.state()==="loaded")&&f(!1)};return N.state()==="loaded"?setTimeout(()=>$()):N.on("load",()=>{$()}),N}),f(!0)},[n,t]),Q(()=>{_.current.forEach(I=>I.rate(i))},[i]),Q(()=>{_.current.forEach(I=>I.volume(o))},[o]);const x=()=>{if(d||v)return;w();const I=Math.floor(Math.random()*_.current.length);_.current[I].play(),m(!0)},w=()=>{_.current.forEach(I=>I.stop())};Q(()=>{l&&setTimeout(()=>x(),r*50)},[l]),Q(()=>()=>w(),[]);const[A,E]=D(!1),C=me(void 0),S=()=>{navigator.clipboard.writeText(b),E(!0),C.current!==void 0&&clearTimeout(C.current),C.current=setTimeout(()=>{E(!1)},2e3)};return h("div",{class:`sound-config${d?" loading":p?" playing":""}${v?" invalid":""}`},h(K,{class:"play",icon:v?"alert":d?"sync":"play",label:u("sounds.play"),onClick:x,tooltip:u(v?"sounds.unknown_sound":d?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),h(dn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:I=>s({sound:I})}),h("label",{class:"delay-label"},u("sounds.delay"),": "),h(up,{class:"btn btn-input delay",min:0,value:r,onChange:I=>s({delay:I})}),h("label",{class:"pitch-label"},u("sounds.pitch"),": "),h(Qs,{class:"pitch tooltipped tip-s",min:.5,max:2,step:.01,"aria-label":i.toFixed(2),style:`--x: ${(i-.5)*(100/1.5)}%`,value:i,onChange:I=>s({pitch:I})}),h("label",{class:"volume-label"},u("sounds.volume"),": "),h(Qs,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":o.toFixed(2),style:`--x: ${o*100}%`,value:o,onChange:I=>s({volume:I})}),h(K,{class:`copy${A?" active":""}`,icon:A?"check":"terminal",label:u("copy"),tooltip:u(A?"copied":"sounds.copy_command"),onClick:S}),h(K,{class:"remove",icon:"trashcan",tooltip:u("sounds.remove_sound"),onClick:()=>{a(),w()}}))}function je({title:e,desc:t,link:n,icon:r,children:i}){const o=h(ne,null,h("div",{class:"tool-head"},r&&ou[r],h("div",null,h("h3",null,e),h("p",null,t))),i&&h("div",{class:"tool-body"},i));return n?h("a",{class:"tool-card",href:n},o):h("div",{class:"tool-card"},o)}const Ra="/";function su({entries:e,onSelect:t,indent:n}){const r=xe(()=>{var u;const l={};for(const c of e){const d=c.indexOf(Ra);if(d>=0){const f=c.slice(0,d);((u=l[f])!=null?u:l[f]=[]).push(c.slice(d+1))}}return Object.entries(l)},e),i=xe(()=>e.filter(l=>!l.includes(Ra)),e),[o,s]=D(new Set),a=l=>{o.has(l)?o.delete(l):o.add(l),s(new Set(o))};return h("div",{class:"tree-view",style:`--indent: ${n!=null?n:0};`},r.map(([l,u])=>h("div",null,h(Pa,{icon:o.has(l)?"chevron_right":"chevron_down",key:l,label:l,onClick:()=>a(l)}),!o.has(l)&&h(su,{entries:u,onSelect:c=>t(`${l}/${c}`),indent:(n!=null?n:0)+1}))),i.map(l=>h(Pa,{icon:"file",key:l,label:l,onClick:()=>t(l)})))}function Pa({icon:e,label:t,onClick:n}){return h("div",{class:"entry",onClick:n},te[e],t)}function ji({value:e,allowed:t,hasAny:n,onChange:r,onAny:i}){const{locale:o}=Ee(),s=xe(()=>t||he.versions.map(a=>a.id).reverse(),[t]);return h(vt,{class:`version-switcher${Ne.getVersion()===null?" attention":""}`,icon:"tag",label:e!=null?e:o("any_version"),tooltip:o("switch_version")},n&&h(K,{label:o("any_version"),onClick:i,active:!e}),s.map(a=>h(K,{label:a,active:a===e,onClick:()=>r(a)})))}function oo({category:e}){const{locale:t}=Ee();return ut(t("title.generator_category",t(e))),h("main",null,h("div",{class:"category"},he.generators.filter(n=>n.category===e).map(n=>h(je,{title:t(n.id),link:It(n.url)}))),h(Wt,{donate:!1}))}function Tm({}){const{locale:e}=Ee();ut(e("title.changelog"));const{value:t,error:n}=Nr(rc,[]);return h("main",null,h(Ar,{type:"text",id:"changelog"}),n&&h(On,{error:n}),h("div",{class:"changelog"},h(ru,{changes:t,defaultOrder:"desc"})),h(Wt,null))}const so="share";function Lm({}){var cs;const{locale:e}=Ee(),{version:t,changeVersion:n,changeTargetVersion:r}=Wn(),{projects:i,project:o,file:s,updateFile:a,openFile:l,closeFile:u}=pc(),[c,d]=D(null),[f,p]=cl();if(f)return f.message=`Something went wrong rendering the generator: ${f.message}`,h("main",null,h(On,{error:f,onDismiss:p}));const m=ec(Pn());if(!m)return h("main",null,h(On,{error:`Cannot find generator "${Pn()}"`}));const v=xe(()=>he.versions.filter(q=>qe(q.id,m.minVersion,m.maxVersion)).map(q=>q.id).reverse(),[m.minVersion,m.maxVersion]);ut(e("title.generator",e(m.partner?`partner.${m.partner}.${m.id}`:m.id)),v),qe(t,m.minVersion)||d(`The minimum version for this generator is ${m.minVersion}`),qe(t,void 0,m.maxVersion)||d(`This generator is not available in versions above ${m.maxVersion}`);const[g,_]=un("preset"),[b,x]=un(so),w=me(!1),A=xe(()=>Ne.getBackup(m.id),[m.id]),E=()=>{A!==void 0&&(S==null||S.reset(M.DataModel.wrapLists(A),!1))},{value:C}=Nr(async()=>{let q;if(g&&b)return x(void 0),vo;if(g)q=await Ge(g);else if(b){const Ze=await X0(b);let Xe=!1;if(Ze.version&&Ze.version!==t&&(n(Ze.version,!1),Xe=!0),Ze.type&&Ze.type!==m.id){const qt=he.generators.find(vu=>vu.id===Ze.type);qt&&(Jt(`${It(qt.url)}?${so}=${Ze.id}`),Xe=!0)}if(Xe)return vo;Ze.show_preview&&!st&&(Ui(!0),ke(!1)),_e.openSnippet(m.id,b,t),q=Ze.data}const[we,Nt]=await Promise.all([G0(t,m.id),W0(t)]);return q&&(w.current=!0,we.reset(M.DataModel.wrapLists(q),!1)),_e.setGenerator(m.id),{model:we,blockStates:Nt}},[m.id,t,b,g]),S=C==null?void 0:C.model,I=C==null?void 0:C.blockStates,[O,R]=D(!1);Pi(S,()=>{w.current||(_(void 0,!0),x(void 0,!0)),w.current=!1,Ne.setBackup(m.id,M.DataModel.unwrapLists(S==null?void 0:S.data)),d(null),R(!0)},[m.id,_,x]);const[F,j]=D(""),[oe,le]=Qn(),[N,$]=Qn(),H=()=>{if(F!==(s==null?void 0:s.id)&&F&&S&&I){const q=ri(S,I);a(m.id,s==null?void 0:s.id,{id:F,data:q})?le():($(),s&&j(s==null?void 0:s.id))}else s&&j(s==null?void 0:s.id)},T=()=>{s&&a(m.id,s.id,{})};Q(()=>{s&&j(s.id)},[s]),Q(()=>{var q;S&&(j((q=s==null?void 0:s.id)!=null?q:""),s&&m.id===s.type&&S.reset(M.DataModel.wrapLists(s.data)),R(!1))},[s,S]);const y=()=>{var q;_e.resetGenerator(m.id,(q=S==null?void 0:S.historyIndex)!=null?q:1,"menu"),S==null||S.reset(M.DataModel.wrapLists(S.schema.default()),!0)},k=q=>{var we;q.stopPropagation(),_e.undoGenerator(m.id,(we=S==null?void 0:S.historyIndex)!=null?we:1,"menu"),S==null||S.undo()},L=q=>{var we;q.stopPropagation(),_e.redoGenerator(m.id,(we=S==null?void 0:S.historyIndex)!=null?we:1,"menu"),S==null||S.redo()},z=q=>{var we,Nt;q.ctrlKey&&q.key==="z"?(_e.undoGenerator(m.id,(we=S==null?void 0:S.historyIndex)!=null?we:1,"hotkey"),S==null||S.undo()):q.ctrlKey&&q.key==="y"&&(_e.redoGenerator(m.id,(Nt=S==null?void 0:S.historyIndex)!=null?Nt:1,"hotkey"),S==null||S.redo())},Y=q=>{if(q.ctrlKey&&q.key==="s"&&(q.preventDefault(),S&&I&&s)){_e.saveProjectFile(m.id,o.files.length,i.length,"hotkey");const we=ri(S,I);a(m.id,s==null?void 0:s.id,{id:s==null?void 0:s.id,data:we}),R(!1),le()}};Q(()=>(document.addEventListener("keyup",z),document.addEventListener("keydown",Y),()=>{document.removeEventListener("keyup",z),document.removeEventListener("keydown",Y)}),[S,I,s]);const[ue,Ue]=D([]);Q(()=>{Y0(t).then(q=>{Ue(q.get(m.id).map(we=>we.startsWith("minecraft:")?we.slice(10):we))}).catch(q=>{console.error(q),d(q)})},[t,m.id]);const ht=q=>{_e.loadPreset(m.id,q),x(void 0,!0),r(t,!0),_(q)},Ge=async q=>{var we,Nt,Ze;try{const Xe=await oc(t,(we=m.path)!=null?we:m.id,q),qt=S==null?void 0:S.get(new M.Path(["generator","seed"]));return((Nt=Xe==null?void 0:Xe.generator)==null?void 0:Nt.seed)!==void 0&&qt!==void 0&&(Xe.generator.seed=qt,((Ze=Xe.generator.biome_source)==null?void 0:Ze.seed)!==void 0&&(Xe.generator.biome_source.seed=qt)),Xe}catch{d(`Cannot load preset ${q} in ${t}`),_(void 0,!0)}},Ye=q=>{x(void 0,!0),n(q)},[Pe,yt]=D(void 0),[ft,ot]=D(!1),[Le,en]=Qn({cooldown:3e3}),Ot=()=>{if(ft){ot(!1);return}if(g)yt(`${location.origin}/${m.url}/?version=${t}&preset=${g}`),ot(!0),J();else if(S&&I){const q=ri(S,I);cn(q,S.schema.default())?(yt(`${location.origin}/${m.url}/?version=${t}`),ot(!0)):Z0(m.id,t,q,st).then(({id:we,length:Nt,compressed:Ze,rate:Xe})=>{_e.createSnippet(m.id,we,t,Nt,Ze,Xe);const qt=`${location.origin}/${m.url}/?${so}=${we}`;yt(qt),ot(!0)}).catch(we=>{we instanceof Error&&d(we)})}},J=()=>{navigator.clipboard.writeText(Pe!=null?Pe:""),en()};Q(()=>{Le||(yt(void 0),ot(!1))},[Le]);const[Fe,ke]=D(window.innerWidth>820),[fe,bt]=D(0),[tt,vn]=D(0),[wn,B]=D(0),U=()=>{_e.copyOutput(m.id,"menu"),bt(fe+1)},se=()=>{_e.downloadOutput(m.id,"menu"),vn(tt+1)},pe=()=>{_e.generatorEvent("import"),ke(!0),B(wn+1)},$e=()=>{Fe?_e.hideOutput(m.id,"menu"):_e.showOutput(m.id,"menu"),ke(!Fe),bt(0),vn(0),B(0)},[nt,Hi]=Qn(),[st,Ui]=D(!1),Gi=a1.includes(m.id)&&!(m.id==="worldgen/configured_feature"&&qe(t,"1.18"));st&&!Gi&&Ui(!1);let Yi=2;Gi&&(Yi+=1),Fe&&(Yi+=2);const _u=()=>{Fe?_e.hidePreview(m.id,"menu"):_e.showPreview(m.id,"menu"),Ui(!st),!st&&Fe&&ke(!1)};return h(ne,null,h("main",{class:st?"has-preview":""},!m.partner&&h(Ar,{id:"data-pack-generator",type:"text"}),h("div",{class:"controls"},h("div",{class:`project-controls ${s&&"has-file"}`},h("div",{class:"btn-row"},h(vt,{icon:"repo",label:o.name,relative:!1},h(K,{icon:"arrow_left",label:e("project.go_to"),onClick:()=>Jt("/project")}),s&&h(K,{icon:"file",label:e("project.new_file"),onClick:u}),A!==void 0&&h(K,{icon:"history",label:e("restore_backup"),onClick:E}),h(ea,{searchPlaceholder:e(o.name==="Drafts"?"project.search_drafts":"project.search"),noResults:e("project.no_files"),values:o.files.filter(q=>q.type===m.id).map(q=>q.id),onSelect:q=>l(m.id,q)})),h(dn,{class:"btn btn-input",placeholder:e("project.unsaved_file"),value:F,onChange:j,onEnter:H,onBlur:H}),s&&h(K,{icon:"trashcan",tooltip:e("project.delete_file"),onClick:T})),O?h("div",{class:"status-icon"},te.dot_fill):oe?h("div",{class:"status-icon active"},te.check):N&&h("div",{class:"status-icon danger"},te.x)),h("div",{class:"generator-controls"},h(K,{icon:"upload",label:e("import"),onClick:pe}),h(vt,{icon:"archive",label:e("presets"),relative:!1},h(ea,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:ue,onSelect:ht})),h(ji,{value:t,onChange:Ye,allowed:v}),h(vt,{icon:"kebab_horizontal",tooltip:e("more")},h(K,{icon:"history",label:e("reset"),onClick:y}),h(K,{icon:"arrow_left",label:e("undo"),onClick:k}),h(K,{icon:"arrow_right",label:e("redo"),onClick:L})))),c&&h(On,{error:c,onDismiss:()=>d(null)}),h(X1,{model:S,version:t,blockStates:I,onError:d}),h(Wt,{donate:!m.partner})),h("div",{class:"popup-actions",style:`--offset: -${8+Yi*50}px;`},h("div",{class:`popup-action action-preview${Gi?" shown":""} tooltipped tip-nw`,"aria-label":e(st?"hide_preview":"show_preview"),onClick:_u},st?te.x_circle:te.play),h("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:Ot},te.link),h("div",{class:`popup-action action-download${Fe?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:se},te.download),h("div",{class:`popup-action action-copy${Fe?" shown":""}${nt?" active":""} tooltipped tip-nw`,"aria-label":e(nt?"copied":"copy"),onClick:U},nt?te.check:te.clippy),h("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(Fe?"hide_output":"show_output"),onClick:$e},Fe?te.chevron_right:te.code)),h("div",{class:`popup-preview${st?" shown":""}`},h(l1,{model:S,version:t,id:m.id,shown:st,onError:d})),h("div",{class:`popup-source${Fe?" shown":""}`},h(u1,{model:S,blockStates:I,doCopy:fe,doDownload:tt,doImport:wn,name:(cs=m.schema)!=null?cs:"data",copySuccess:Hi,onError:d})),h("div",{class:`popup-share${ft?" shown":""}`},h(dn,{value:Pe,readonly:!0}),h(K,{icon:Le?"check":"clippy",onClick:J,tooltip:e(Le?"copied":"copy_share"),tooltipLoc:"nw",active:Le,showTooltip:Le})))}var ns={exports:{}};function rs(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];typeof n=="object"&&!Object.isFrozen(n)&&rs(n)}),e}ns.exports=rs;ns.exports.default=rs;var Rm=ns.exports;class $a{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function au(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Zt(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const Pm="</span>",Da=e=>!!e.kind,$m=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class Dm{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=au(t)}openNode(t){if(!Da(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=$m(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Da(t)||(this.buffer+=Pm)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class is{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n={kind:t,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{is._collapse(n)})))}}class Bm extends is{constructor(t){super(),this.options=t}addKeyword(t,n){t!==""&&(this.openNode(n),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,n){const r=t.root;r.kind=n,r.sublanguage=!0,this.add(r)}toHTML(){return new Dm(this,this.options).value()}finalize(){return!0}}function yr(e){return e?typeof e=="string"?e:e.source:null}function lu(e){return _n("(?=",e,")")}function Fm(e){return _n("(?:",e,")*")}function zm(e){return _n("(?:",e,")?")}function _n(...e){return e.map(n=>yr(n)).join("")}function jm(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function os(...e){const t=jm(e);return"("+(t.capture?"":"?:")+e.map(r=>yr(r)).join("|")+")"}function cu(e){return new RegExp(e.toString()+"|").exec("").length-1}function Vm(e,t){const n=e&&e.exec(t);return n&&n.index===0}const Hm=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ss(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=yr(r),s="";for(;o.length>0;){const a=Hm.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+i):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const Um=/\b\B/,uu="[a-zA-Z]\\w*",as="[a-zA-Z_]\\w*",du="\\b\\d+(\\.\\d+)?",hu="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",fu="\\b(0b[01]+)",Gm="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Ym=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=_n(t,/.*\b/,e.binary,/\b.*/)),Zt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},br={begin:"\\\\[\\s\\S]",relevance:0},Wm={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[br]},qm={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[br]},Zm={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Vi=function(e,t,n={}){const r=Zt({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=os("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_n(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Xm=Vi("//","$"),Jm=Vi("/\\*","\\*/"),Km=Vi("#","$"),Qm={scope:"number",begin:du,relevance:0},eg={scope:"number",begin:hu,relevance:0},tg={scope:"number",begin:fu,relevance:0},ng={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[br,{begin:/\[/,end:/\]/,relevance:0,contains:[br]}]}]},rg={scope:"title",begin:uu,relevance:0},ig={scope:"title",begin:as,relevance:0},og={begin:"\\.\\s*"+as,relevance:0},sg=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Wr=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Um,IDENT_RE:uu,UNDERSCORE_IDENT_RE:as,NUMBER_RE:du,C_NUMBER_RE:hu,BINARY_NUMBER_RE:fu,RE_STARTERS_RE:Gm,SHEBANG:Ym,BACKSLASH_ESCAPE:br,APOS_STRING_MODE:Wm,QUOTE_STRING_MODE:qm,PHRASAL_WORDS_MODE:Zm,COMMENT:Vi,C_LINE_COMMENT_MODE:Xm,C_BLOCK_COMMENT_MODE:Jm,HASH_COMMENT_MODE:Km,NUMBER_MODE:Qm,C_NUMBER_MODE:eg,BINARY_NUMBER_MODE:tg,REGEXP_MODE:ng,TITLE_MODE:rg,UNDERSCORE_TITLE_MODE:ig,METHOD_GUARD:og,END_SAME_AS_BEGIN:sg});function ag(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function lg(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function cg(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=ag,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ug(e,t){!Array.isArray(e.illegal)||(e.illegal=os(...e.illegal))}function dg(e,t){if(!!e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function hg(e,t){e.relevance===void 0&&(e.relevance=1)}const fg=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=_n(n.beforeMatch,lu(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},pg=["of","and","for","in","not","or","if","then","parent","list","value"],mg="keyword";function pu(e,t,n=mg){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(o){Object.assign(r,pu(e[o],t,o))}),r;function i(o,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){const l=a.split("|");r[l[0]]=[o,gg(l[0],l[1])]})}}function gg(e,t){return t?Number(t):_g(e)?0:1}function _g(e){return pg.includes(e.toLowerCase())}const Ba={},an=e=>{console.error(e)},Fa=(e,...t)=>{console.log(`WARN: ${e}`,...t)},An=(e,t)=>{Ba[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ba[`${e}/${t}`]=!0)},Si=new Error;function mu(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let a=1;a<=t.length;a++)s[a+r]=i[a],o[a+r]=!0,r+=cu(t[a-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function vg(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw an("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Si;if(typeof e.beginScope!="object"||e.beginScope===null)throw an("beginScope must be object"),Si;mu(e,e.begin,{key:"beginScope"}),e.begin=ss(e.begin,{joinWith:""})}}function wg(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw an("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Si;if(typeof e.endScope!="object"||e.endScope===null)throw an("endScope must be object"),Si;mu(e,e.end,{key:"endScope"}),e.end=ss(e.end,{joinWith:""})}}function yg(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function bg(e){yg(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),vg(e),wg(e)}function xg(e){function t(s,a){return new RegExp(yr(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=cu(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(ss(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(s){const a=new r;return s.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function o(s,a){const l=s;if(s.isCompiled)return l;[lg,dg,bg,fg].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[cg,ug,hg].forEach(c=>c(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=pu(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=yr(l.end)||"",s.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return Ag(c==="self"?s:c)})),s.contains.forEach(function(c){o(c,l)}),s.starts&&o(s.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Zt(e.classNameAliases||{}),o(e)}function gu(e){return e?e.endsWithParent||gu(e.starts):!1}function Ag(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Zt(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:gu(e)?Zt(e,{starts:e.starts?Zt(e.starts):null}):Object.isFrozen(e)?Zt(e):e}var kg="11.5.1";class Sg extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const ao=au,za=Zt,ja=Symbol("nomatch"),Eg=7,Cg=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Bm};function l(N){return a.noHighlightRe.test(N)}function u(N){let $=N.className+" ";$+=N.parentNode?N.parentNode.className:"";const H=a.languageDetectRe.exec($);if(H){const T=I(H[1]);return T||(Fa(o.replace("{}",H[1])),Fa("Falling back to no-highlight mode for this block.",N)),T?H[1]:"no-highlight"}return $.split(/\s+/).find(T=>l(T)||I(T))}function c(N,$,H){let T="",y="";typeof $=="object"?(T=N,H=$.ignoreIllegals,y=$.language):(An("10.7.0","highlight(lang, code, ...args) has been deprecated."),An("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),y=N,T=$),H===void 0&&(H=!0);const k={code:T,language:y};oe("before:highlight",k);const L=k.result?k.result:d(k.language,k.code,H);return L.code=k.code,oe("after:highlight",L),L}function d(N,$,H,T){const y=Object.create(null);function k(B,U){return B.keywords[U]}function L(){if(!J.keywords){ke.addText(fe);return}let B=0;J.keywordPatternRe.lastIndex=0;let U=J.keywordPatternRe.exec(fe),se="";for(;U;){se+=fe.substring(B,U.index);const pe=Le.case_insensitive?U[0].toLowerCase():U[0],$e=k(J,pe);if($e){const[nt,Hi]=$e;if(ke.addText(se),se="",y[pe]=(y[pe]||0)+1,y[pe]<=Eg&&(bt+=Hi),nt.startsWith("_"))se+=U[0];else{const st=Le.classNameAliases[nt]||nt;ke.addKeyword(U[0],st)}}else se+=U[0];B=J.keywordPatternRe.lastIndex,U=J.keywordPatternRe.exec(fe)}se+=fe.substr(B),ke.addText(se)}function z(){if(fe==="")return;let B=null;if(typeof J.subLanguage=="string"){if(!t[J.subLanguage]){ke.addText(fe);return}B=d(J.subLanguage,fe,!0,Fe[J.subLanguage]),Fe[J.subLanguage]=B._top}else B=p(fe,J.subLanguage.length?J.subLanguage:null);J.relevance>0&&(bt+=B.relevance),ke.addSublanguage(B._emitter,B.language)}function Y(){J.subLanguage!=null?z():L(),fe=""}function ue(B,U){let se=1;const pe=U.length-1;for(;se<=pe;){if(!B._emit[se]){se++;continue}const $e=Le.classNameAliases[B[se]]||B[se],nt=U[se];$e?ke.addKeyword(nt,$e):(fe=nt,L(),fe=""),se++}}function Ue(B,U){return B.scope&&typeof B.scope=="string"&&ke.openNode(Le.classNameAliases[B.scope]||B.scope),B.beginScope&&(B.beginScope._wrap?(ke.addKeyword(fe,Le.classNameAliases[B.beginScope._wrap]||B.beginScope._wrap),fe=""):B.beginScope._multi&&(ue(B.beginScope,U),fe="")),J=Object.create(B,{parent:{value:J}}),J}function ht(B,U,se){let pe=Vm(B.endRe,se);if(pe){if(B["on:end"]){const $e=new $a(B);B["on:end"](U,$e),$e.isMatchIgnored&&(pe=!1)}if(pe){for(;B.endsParent&&B.parent;)B=B.parent;return B}}if(B.endsWithParent)return ht(B.parent,U,se)}function Ge(B){return J.matcher.regexIndex===0?(fe+=B[0],1):(wn=!0,0)}function Ye(B){const U=B[0],se=B.rule,pe=new $a(se),$e=[se.__beforeBegin,se["on:begin"]];for(const nt of $e)if(!!nt&&(nt(B,pe),pe.isMatchIgnored))return Ge(U);return se.skip?fe+=U:(se.excludeBegin&&(fe+=U),Y(),!se.returnBegin&&!se.excludeBegin&&(fe=U)),Ue(se,B),se.returnBegin?0:U.length}function Pe(B){const U=B[0],se=$.substr(B.index),pe=ht(J,B,se);if(!pe)return ja;const $e=J;J.endScope&&J.endScope._wrap?(Y(),ke.addKeyword(U,J.endScope._wrap)):J.endScope&&J.endScope._multi?(Y(),ue(J.endScope,B)):$e.skip?fe+=U:($e.returnEnd||$e.excludeEnd||(fe+=U),Y(),$e.excludeEnd&&(fe=U));do J.scope&&ke.closeNode(),!J.skip&&!J.subLanguage&&(bt+=J.relevance),J=J.parent;while(J!==pe.parent);return pe.starts&&Ue(pe.starts,B),$e.returnEnd?0:U.length}function yt(){const B=[];for(let U=J;U!==Le;U=U.parent)U.scope&&B.unshift(U.scope);B.forEach(U=>ke.openNode(U))}let ft={};function ot(B,U){const se=U&&U[0];if(fe+=B,se==null)return Y(),0;if(ft.type==="begin"&&U.type==="end"&&ft.index===U.index&&se===""){if(fe+=$.slice(U.index,U.index+1),!i){const pe=new Error(`0 width match regex (${N})`);throw pe.languageName=N,pe.badRule=ft.rule,pe}return 1}if(ft=U,U.type==="begin")return Ye(U);if(U.type==="illegal"&&!H){const pe=new Error('Illegal lexeme "'+se+'" for mode "'+(J.scope||"<unnamed>")+'"');throw pe.mode=J,pe}else if(U.type==="end"){const pe=Pe(U);if(pe!==ja)return pe}if(U.type==="illegal"&&se==="")return 1;if(vn>1e5&&vn>U.index*3)throw new Error("potential infinite loop, way more iterations than matches");return fe+=se,se.length}const Le=I(N);if(!Le)throw an(o.replace("{}",N)),new Error('Unknown language: "'+N+'"');const en=xg(Le);let Ot="",J=T||en;const Fe={},ke=new a.__emitter(a);yt();let fe="",bt=0,tt=0,vn=0,wn=!1;try{for(J.matcher.considerAll();;){vn++,wn?wn=!1:J.matcher.considerAll(),J.matcher.lastIndex=tt;const B=J.matcher.exec($);if(!B)break;const U=$.substring(tt,B.index),se=ot(U,B);tt=B.index+se}return ot($.substr(tt)),ke.closeAllNodes(),ke.finalize(),Ot=ke.toHTML(),{language:N,value:Ot,relevance:bt,illegal:!1,_emitter:ke,_top:J}}catch(B){if(B.message&&B.message.includes("Illegal"))return{language:N,value:ao($),illegal:!0,relevance:0,_illegalBy:{message:B.message,index:tt,context:$.slice(tt-100,tt+100),mode:B.mode,resultSoFar:Ot},_emitter:ke};if(i)return{language:N,value:ao($),illegal:!1,relevance:0,errorRaised:B,_emitter:ke,_top:J};throw B}}function f(N){const $={value:ao(N),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return $._emitter.addText(N),$}function p(N,$){$=$||a.languages||Object.keys(t);const H=f(N),T=$.filter(I).filter(R).map(Y=>d(Y,N,!1));T.unshift(H);const y=T.sort((Y,ue)=>{if(Y.relevance!==ue.relevance)return ue.relevance-Y.relevance;if(Y.language&&ue.language){if(I(Y.language).supersetOf===ue.language)return 1;if(I(ue.language).supersetOf===Y.language)return-1}return 0}),[k,L]=y,z=k;return z.secondBest=L,z}function m(N,$,H){const T=$&&n[$]||H;N.classList.add("hljs"),N.classList.add(`language-${T}`)}function v(N){let $=null;const H=u(N);if(l(H))return;if(oe("before:highlightElement",{el:N,language:H}),N.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(N)),a.throwUnescapedHTML))throw new Sg("One of your code blocks includes unescaped HTML.",N.innerHTML);$=N;const T=$.textContent,y=H?c(T,{language:H,ignoreIllegals:!0}):p(T);N.innerHTML=y.value,m(N,H,y.language),N.result={language:y.language,re:y.relevance,relevance:y.relevance},y.secondBest&&(N.secondBest={language:y.secondBest.language,relevance:y.secondBest.relevance}),oe("after:highlightElement",{el:N,result:y,text:T})}function g(N){a=za(a,N)}const _=()=>{w(),An("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function b(){w(),An("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function w(){if(document.readyState==="loading"){x=!0;return}document.querySelectorAll(a.cssSelector).forEach(v)}function A(){x&&w()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function E(N,$){let H=null;try{H=$(e)}catch(T){if(an("Language definition for '{}' could not be registered.".replace("{}",N)),i)an(T);else throw T;H=s}H.name||(H.name=N),t[N]=H,H.rawDefinition=$.bind(null,e),H.aliases&&O(H.aliases,{languageName:N})}function C(N){delete t[N];for(const $ of Object.keys(n))n[$]===N&&delete n[$]}function S(){return Object.keys(t)}function I(N){return N=(N||"").toLowerCase(),t[N]||t[n[N]]}function O(N,{languageName:$}){typeof N=="string"&&(N=[N]),N.forEach(H=>{n[H.toLowerCase()]=$})}function R(N){const $=I(N);return $&&!$.disableAutodetect}function F(N){N["before:highlightBlock"]&&!N["before:highlightElement"]&&(N["before:highlightElement"]=$=>{N["before:highlightBlock"](Object.assign({block:$.el},$))}),N["after:highlightBlock"]&&!N["after:highlightElement"]&&(N["after:highlightElement"]=$=>{N["after:highlightBlock"](Object.assign({block:$.el},$))})}function j(N){F(N),r.push(N)}function oe(N,$){const H=N;r.forEach(function(T){T[H]&&T[H]($)})}function le(N){return An("10.7.0","highlightBlock will be removed entirely in v12.0"),An("10.7.0","Please use highlightElement now."),v(N)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:w,highlightElement:v,highlightBlock:le,configure:g,initHighlighting:_,initHighlightingOnLoad:b,registerLanguage:E,unregisterLanguage:C,listLanguages:S,getLanguage:I,registerAliases:O,autoDetection:R,inherit:za,addPlugin:j}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=kg,e.regex={concat:_n,lookahead:lu,either:os,optional:zm,anyNumberOfTimes:Fm};for(const N in Wr)typeof Wr[N]=="object"&&Rm(Wr[N]);return Object.assign(e,Wr),e};var xr=Cg({}),Ig=xr;xr.HighlightJS=xr;xr.default=xr;var ls=Ig;function Mg(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r={beginKeywords:["true","false","null"].join(" ")};return{name:"JSON",contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const Og='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M6.368 1.01a.75.75 0 01.623.859L6.57 4.5h3.98l.46-2.868a.75.75 0 011.48.237L12.07 4.5h2.18a.75.75 0 010 1.5h-2.42l-.64 4h2.56a.75.75 0 010 1.5h-2.8l-.46 2.869a.75.75 0 01-1.48-.237l.42-2.632H5.45l-.46 2.869a.75.75 0 01-1.48-.237l.42-2.632H1.75a.75.75 0 010-1.5h2.42l.64-4H2.25a.75.75 0 010-1.5h2.8l.46-2.868a.75.75 0 01.858-.622zM9.67 10l.64-4H6.33l-.64 4h3.98z"></path></svg>';ls.registerLanguage("json",Mg);re.use({highlight:(e,t)=>{if(t!=="")return ls.highlight(e,{language:t}).value}});function Ng({id:e}){const{locale:t}=Ee(),{version:n,changeVersion:r}=Wn(),{changeTitle:i}=ut(),{value:o,refresh:s}=Nr(async()=>await(await fetch(`../../guides/${e}.md`)).text(),[e]),a=xe(()=>{if(!o)return;const w=m0(o);return i(w==null?void 0:w.title,w==null?void 0:w.versions),w},[o]),l=xe(()=>{var A;const w=he.versions.map(E=>E.id);return(A=a==null?void 0:a.versions)==null?void 0:A.sort((E,C)=>w.indexOf(C)-w.indexOf(E))},[a==null?void 0:a.versions]),u=xe(()=>!l||l.includes(n)?n:l[0],[n,a==null?void 0:a.versions]),c=xe(()=>{if(!o)return;const w=[];let A=!1;re.use({extensions:[{name:"styledCode",level:"inline",start(S){var I,O;return(O=(I=S.match(/\b[fsnj]`/))==null?void 0:I.index)!=null?O:-1},tokenizer(S){const I=S.match(/^([fsnj])`([^`]+)`/);if(I)return{type:"styledCode",raw:I[0],prefix:I[1],text:I[2]}},renderer(S){let I=S.text,O={f:"hljs-attr",s:"hljs-string",n:"hljs-number"}[S.prefix];return S.prefix==="j"&&(I=ls.highlight("json",S.text).value,O="language-json"),`<code${O?` class="${O}"`:""}>${I}</code>`}}],walkTokens(S){S.type==="heading"&&w.push(S)},renderer:{link(S,I,O){if(S===null)return O;const R=I?` title="${I}"`:"",F=S!=null&&S.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${S}"${R}${F}>${O}</a>`},heading(S,I,O,R){let F="";A||(F=`<ol class="guide-toc">${w.filter(le=>le.depth===2).map(le=>{var H,T;const N=R.slug((T=(H=le.raw.match(/^#+ (.*)/))==null?void 0:H[1])!=null?T:"",{dryrun:!0}),$=le.text.replaceAll("`","");return`<li><a href="#${N}">${$}</a></li>`}).join("")}</ol>`,A=!0);const j=R.slug(O),oe=`<span id="guide-${j}" href="?version=${n}#${j}">${Og}</span>`;return`${F}<h${I}>${oe}${S}</h${I}>`}}});const E=o.substring(o.indexOf("---",3)+3),C=g0(E,u);return re(C,{version:"1.19"})},[u,o]),[d,f]=A0(),p=Ce(()=>{if(!c)return;const w=document.querySelector(`[id=guide-${d.slice(1)}]`);if(w){const A=w.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:A-68,behavior:"smooth"})}},[c,d]);Q(()=>{p()},[c===void 0,d]);const m=Ce(w=>{if(!(w.target instanceof HTMLSpanElement))return;const A="#"+w.target.id.replace(/^guide-/,"");r(n,!1,!0),f(A),A===d&&p()},[p,d,n]),[v,g]=Qn(),_=Ce(()=>{const w=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(w),g()},[e,n]),b=Ce(w=>{Jt(`/guides/?tags=${w}`)},[]),[x]=D(window.innerWidth>600);return h("main",null,h("div",{class:"guide"},h("div",{class:"navigation"},h("a",{class:"btn btn-link",href:"/guides/"},te.arrow_left,t("guides.all")),h(K,{icon:v?"check":"link",label:t("share"),onClick:_,active:v,tooltip:t(v?"copied":"copy_share"),class:"guide-share"}),l&&h(ji,{value:u,allowed:l,onChange:r})),(a==null?void 0:a.tags)&&a.tags.length>0&&h("div",{class:"guide-tags"},a.tags.map(w=>h(Dr,{label:w,active:!0,onClick:()=>b(w)}))),c&&h(ne,null,h(Ar,{id:"guide",type:x?"image":"text"}),h("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:c},onClick:m}),h(Qo,null))),h(Wt,null))}function Tg({}){const{locale:e}=Ee(),{version:t,changeVersion:n}=Wn();ut(e("title.guides"));const[r,i]=D(""),[o,s]=nu(),[a,l]=D(!1),u=xe(()=>a===!1?[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]},{id:"density-functions",title:"Density function types and their configuration",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]},{id:"feature-order-cycle",title:"How to fix feature order cycles",versions:["1.18","1.18.2","1.19"],tags:["worldgen","biomes","features"]},{id:"noise-router",title:"How terrain is generated using the noise router",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]}]:[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]},{id:"density-functions",title:"Density function types and their configuration",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]},{id:"feature-order-cycle",title:"How to fix feature order cycles",versions:["1.18","1.18.2","1.19"],tags:["worldgen","biomes","features"]},{id:"noise-router",title:"How terrain is generated using the noise router",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]}].filter(d=>{var f;return(f=d.versions)==null?void 0:f.includes(t)}),[t,a]),c=xe(()=>{const d=r.split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return u.filter(f=>{var m;if(!o.every(v=>{var g;return(g=f.tags)==null?void 0:g.includes(v)}))return!1;const p=((m=f.tags)==null?void 0:m.join(" "))+" "+f.title.toLowerCase();return d.every(v=>v.startsWith("!")?v.length===1||!p.includes(v.slice(1)):p.includes(v))})},[u,r,o]);return h("main",null,h("div",{class:"guides"},h("div",{class:"changelog-query"},h(dn,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:r,onChange:i}),h(ji,{value:a?t:void 0,onChange:d=>{n(d),l(!0)},hasAny:!0,onAny:()=>l(!1)})),o.length>0&&h("div",{class:"changelog-tags"},o.map(d=>h(Dr,{label:d,onClick:()=>s(d)}))),u.length===0?h(ne,null,h("span",{class:"note"},e("guides.no_results.version"))):c.length===0?h(ne,null,h("span",{class:"note"},e("guides.no_results.query"))):c.map(d=>{var f,p;return h(Mm,{title:d.title,link:`/guides/${d.id}/`,tags:(f=d.tags)!=null?f:[],versions:(p=d.versions)!=null?p:[],activeTags:o,toggleTag:s})})),h(Wt,null))}function Lg({}){const{locale:e}=Ee();return ut(e("title.home")),h("main",null,h("div",{class:"home"},h(je,{title:"Data packs"},he.generators.filter(t=>!t.category).map(t=>h(je,{title:e(t.id),link:It(t.url)})),h(je,{title:e("tags"),link:"/tags/"}),h(je,{title:e("worldgen"),link:"/worldgen/"})),h(je,{title:"Resource packs"},he.generators.filter(t=>t.category==="assets").map(t=>h(je,{title:e(t.id),link:It(t.url)}))),h(je,{title:"Partners",link:"/partners/"}),h(je,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),h(je,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),h(je,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),h(je,{title:"Technical Changelog",link:"/changelog/"}),h(je,{title:"Minecraft Versions",link:"/versions/"}),h(je,{title:"Data Pack Guides",link:"/guides/"}),h(Qo,null),h(Wt,null)))}const Rg=[...new Set(he.generators.filter(e=>e.partner!==void 0).map(e=>e.partner))];function Pg({}){const{locale:e}=Ee();return ut(e("title.partners")),h("main",null,h("div",{class:"category"},Rg.map(t=>h(je,{title:e(`partner.${t}`)},he.generators.filter(n=>n.partner===t).map(n=>h(je,{title:e(`partner.${t}.${n.id}`),link:It(n.url)}))))),h(Wt,{donate:!1}))}function $g({}){const{locale:e}=Ee(),{project:t,openFile:n}=pc();ut(e("title.project",t.name));const r=xe(()=>t.files.flatMap(o=>{const s=np(o);return s?[s]:[]}),t.files),i=Ce(o=>{const[,s,a,...l]=o.split("/");n(a,`${s}:${l}`)},[n]);return h("main",null,h(Ar,{id:"data-pack-project",type:"text"}),h("div",{class:"project"},h("h2",null,t.name),h("div",{class:"file-view"},h(su,{entries:r,onSelect:i}))))}function Dg({}){const{locale:e}=Ee(),{version:t,changeVersion:n}=Wn();ut(e("title.sounds"));const[r,i]=D(void 0);Q(()=>{(async()=>{const w=await ae(()=>import("./howler.65ddb130.js").then(function(A){return A.h}),[]);i(()=>A=>new w.Howl(A))})()},[]);const{value:o,error:s}=Nr(async()=>await D0(t),[t]),a=xe(()=>Object.keys(o!=null?o:{}),[o]),[l,u]=D(""),[c,d]=D([]),f=()=>{d([{id:sn(),sound:l,delay:0,pitch:1,volume:1},...c])},p=w=>A=>{d(c.map(E=>E.id===w?Z(Z({},E),A):E))},m=w=>()=>{d(c.filter(A=>A.id!==w))},[v,g]=D(0),_=()=>{g(v+1)},b=me(null),x=()=>{if(!b.current)return;const w=c.some(E=>E.delay>0),A=c.sort((E,C)=>E.delay-C.delay).map(E=>`${w?`execute if score @s delay matches ${E.delay} run `:""}playsound minecraft:${E.sound} master @s ~ ~ ~ ${E.volume} ${E.pitch}`).join(`
`);b.current.setAttribute("href","data:text/plain;charset=utf-8,"+A+"%0A"),b.current.setAttribute("download","sounds.mcfunction"),b.current.click()};return h("main",null,s&&h(On,{error:s}),a.length>0&&h(ne,null,h("div",{class:"controls sounds-controls"},h("div",{class:"sound-search-group"},h(dn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:l,onChange:u,onEnter:f}),h(K,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:f})),c.length>1&&h(K,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:_}),h("div",{class:"spacer"}),h(K,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),tooltipLoc:"se",class:"download-sounds",onClick:x}),h(ji,{value:t,onChange:n})),h("div",{class:"sounds"},o&&r&&c.map(w=>h(Nm,ge(Z({key:w.id},w),{howler:r,sounds:o,delayedPlay:v,onEdit:p(w.id),onDelete:m(w.id)})))),h("a",{ref:b,style:"display: none;"}),h("datalist",{id:"sound-list"},a.map(w=>h("option",{key:w,value:w})))),h(Wt,{donate:!1}))}function Bg({}){const{locale:e}=Ee();ut(e("title.versions"));const{value:t,error:n}=Nr(F0,[]),[r]=un("id"),i=(t!=null?t:[]).find(a=>a.id===r);ut(i?`Minecraft ${i.name}`:"Versions Explorer",i?[]:void 0,i?"Changes and metadata":void 0);const o=i&&Va(t!=null?t:[],i,-1),s=i&&Va(t!=null?t:[],i,1);return h("main",null,h(Ar,{type:"text",id:"versions"}),n&&h(On,{error:n}),h("div",{class:"versions"},r?h(ne,null,h("div",{class:"navigation"},h("a",{class:"btn btn-link",href:"/versions/"},te.three_bars,e("versions.all")),h("a",Z({class:"btn btn-link"},s?{href:`/versions/?id=${s.id}`}:{disabled:!0}),te.arrow_left,e("versions.previous")),h("a",Z({class:"btn btn-link"},o?{href:`/versions/?id=${o.id}`}:{disabled:!0}),e("versions.next"),te.arrow_right)),h(Sm,{id:r,version:i})):h(Im,{versions:t!=null?t:[],link:a=>`/versions/?id=${a}`})),h(Wt,{donate:!1}))}function Va(e,t,n){const i=e.findIndex(o=>o.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function Fg(){return h(ne,null,h(Om,null),h(jt,{onChange:t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>_e.pageview(It(t.url)))}},h(Lg,{path:"/"}),h(oo,{path:"/worldgen",category:"worldgen"}),h(oo,{path:"/tags",category:"tags"}),h(oo,{path:"/assets",category:"assets"}),h(Pg,{path:"/partners"}),h(Dg,{path:"/sounds"}),h(Tm,{path:"/changelog"}),h(Bg,{path:"/versions"}),h($g,{path:"/project"}),h(Tg,{path:"/guides/"}),h(Ng,{path:"/guides/:id"}),h(Lm,{default:!0})))}function zg(){return h(rp,null,h(ep,null,h(ip,null,h(lp,null,h(sp,null,h(tp,null,h(Fg,null)))))))}Rn(h(zg,null),document.body);export{Fr as c,Cc as e,M as l};
//# sourceMappingURL=index.245dbdc8.js.map