Files
misode.github.io/assets/index.33ea8fe3.js
2022-05-08 01:19:31 +00:00

113 lines
366 KiB
JavaScript

var cu=Object.defineProperty,uu=Object.defineProperties;var du=Object.getOwnPropertyDescriptors;var Nr=Object.getOwnPropertySymbols;var to=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable;var eo=(e,t,n)=>t in e?cu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||(t={}))to.call(t,n)&&eo(e,n,t[n]);if(Nr)for(var n of Nr(t))no.call(t,n)&&eo(e,n,t[n]);return e},ke=(e,t)=>uu(e,du(t));var Vi=e=>typeof e=="symbol"?e:e+"",ro=(e,t)=>{var n={};for(var r in e)to.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Nr)for(var r of Nr(e))t.indexOf(r)<0&&no.call(e,r)&&(n[r]=e[r]);return n};const hu=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 s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}};hu();var U,Kn,Pa,io,Da,ei={},ks=[],fu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Pt(e,t){for(var n in t)e[n]=t[n];return e}function $a(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,t,n){var r,i,s,o=arguments,a={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:a[s]=t[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(o[s]);if(n!=null&&(a.children=n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return Qn(e,a,r,i,null)}function Qn(e,t,n,r,i){var s={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?++U.__v:i};return U.vnode!=null&&U.vnode(s),s}function pu(){return{current:null}}function te(e){return e.children}function ht(e,t){this.props=e,this.context=t}function ir(e,t){if(t==null)return e.__?ir(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"?ir(e):null}function Ba(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 Ba(e)}}function ts(e){(!e.__d&&(e.__d=!0)&&Kn.push(e)&&!ti.__r++||io!==U.debounceRendering)&&((io=U.debounceRendering)||Pa)(ti)}function ti(){for(var e;ti.__r=Kn.length;)e=Kn.sort(function(t,n){return t.__v.__b-n.__v.__b}),Kn=[],e.some(function(t){var n,r,i,s,o,a;t.__d&&(o=(s=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=Pt({},s)).__v=s.__v+1,Ss(a,s,i,n.__n,a.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o==null?ir(s):o,s.__h),Va(r,s),s.__e!=o&&Ba(s)))})}function Fa(e,t,n,r,i,s,o,a,l,u){var c,h,p,d,v,_,m,g=r&&r.__k||ks,y=g.length;for(n.__k=[],c=0;c<t.length;c++)if((d=n.__k[c]=(d=t[c])==null||typeof d=="boolean"?null:typeof d=="string"||typeof d=="number"||typeof d=="bigint"?Qn(null,d,null,null,d):Array.isArray(d)?Qn(te,{children:d},null,null,null):d.__b>0?Qn(d.type,d.props,d.key,null,d.__v):d)!=null){if(d.__=n,d.__b=n.__b+1,(p=g[c])===null||p&&d.key==p.key&&d.type===p.type)g[c]=void 0;else for(h=0;h<y;h++){if((p=g[h])&&d.key==p.key&&d.type===p.type){g[h]=void 0;break}p=null}Ss(e,d,p=p||ei,i,s,o,a,l,u),v=d.__e,(h=d.ref)&&p.ref!=h&&(m||(m=[]),p.ref&&m.push(p.ref,null,d),m.push(h,d.__c||v,d)),v!=null?(_==null&&(_=v),typeof d.type=="function"&&d.__k!=null&&d.__k===p.__k?d.__d=l=za(d,l,e):l=ja(e,d,p,g,v,l),u||n.type!=="option"?typeof n.type=="function"&&(n.__d=l):e.value=""):l&&p.__e==l&&l.parentNode!=e&&(l=ir(p))}for(n.__e=_,c=y;c--;)g[c]!=null&&(typeof n.type=="function"&&g[c].__e!=null&&g[c].__e==n.__d&&(n.__d=ir(r,c+1)),Ua(g[c],g[c]));if(m)for(c=0;c<m.length;c++)Ha(m[c],m[++c],m[++c])}function za(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"?za(i,t,n):ja(n,i,i,e.__k,i.__e,t));return t}function ft(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){ft(n,t)}):t.push(e)),t}function ja(e,t,n,r,i,s){var o,a,l;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=s||i.parentNode==null)e:if(s==null||s.parentNode!==e)e.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,s),o=s}return o!==void 0?o:i.nextSibling}function mu(e,t,n,r,i){var s;for(s in n)s==="children"||s==="key"||s in t||ni(e,s,null,n[s],r);for(s in t)i&&typeof t[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||n[s]===t[s]||ni(e,s,t[s],n[s],r)}function so(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||fu.test(t)?n:n+"px"}function ni(e,t,n,r,i){var s;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||so(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||so(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r||e.addEventListener(t,s?ao:oo,s):e.removeEventListener(t,s?ao:oo,s);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 oo(e){this.l[e.type+!1](U.event?U.event(e):e)}function ao(e){this.l[e.type+!0](U.event?U.event(e):e)}function Ss(e,t,n,r,i,s,o,a,l){var u,c,h,p,d,v,_,m,g,y,w,A=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=t.__e=n.__e,t.__h=null,s=[a]),(u=U.__b)&&u(t);try{e:if(typeof A=="function"){if(m=t.props,g=(u=A.contextType)&&r[u.__c],y=u?g?g.props.value:u.__:r,n.__c?_=(c=t.__c=n.__c).__=c.__E:("prototype"in A&&A.prototype.render?t.__c=c=new A(m,y):(t.__c=c=new ht(m,y),c.constructor=A,c.render=_u),g&&g.sub(c),c.props=m,c.state||(c.state={}),c.context=y,c.__n=r,h=c.__d=!0,c.__h=[]),c.__s==null&&(c.__s=c.state),A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Pt({},c.__s)),Pt(c.__s,A.getDerivedStateFromProps(m,c.__s))),p=c.props,d=c.state,h)A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(A.getDerivedStateFromProps==null&&m!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(m,y),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(m,c.__s,y)===!1||t.__v===n.__v){c.props=m,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(b){b&&(b.__=t)}),c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(m,c.__s,y),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,d,v)})}c.context=y,c.props=m,c.state=c.__s,(u=U.__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=Pt(Pt({},r),c.getChildContext())),h||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(p,d)),w=u!=null&&u.type===te&&u.key==null?u.props.children:u,Fa(e,Array.isArray(w)?w:[w],t,n,r,i,s,o,a,l),c.base=t.__e,t.__h=null,c.__h.length&&o.push(c),_&&(c.__E=c.__=null),c.__e=!1}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=gu(n.__e,t,n,r,i,s,o,l);(u=U.diffed)&&u(t)}catch(b){t.__v=null,(l||s!=null)&&(t.__e=a,t.__h=!!l,s[s.indexOf(a)]=null),U.__e(b,t,n)}}function Va(e,t){U.__c&&U.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){U.__e(r,n.__v)}})}function gu(e,t,n,r,i,s,o,a){var l,u,c,h,p=n.props,d=t.props,v=t.type,_=0;if(v==="svg"&&(i=!0),s!=null){for(;_<s.length;_++)if((l=s[_])&&(l===e||(v?l.localName==v:l.nodeType==3))){e=l,s[_]=null;break}}if(e==null){if(v===null)return document.createTextNode(d);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,d.is&&d),s=null,a=!1}if(v===null)p===d||a&&e.data===d||(e.data=d);else{if(s=s&&ks.slice.call(e.childNodes),u=(p=n.props||ei).dangerouslySetInnerHTML,c=d.dangerouslySetInnerHTML,!a){if(s!=null)for(p={},h=0;h<e.attributes.length;h++)p[e.attributes[h].name]=e.attributes[h].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(mu(e,d,p,i,a),c)t.__k=[];else if(_=t.props.children,Fa(e,Array.isArray(_)?_:[_],t,n,r,i&&v!=="foreignObject",s,o,e.firstChild,a),s!=null)for(_=s.length;_--;)s[_]!=null&&$a(s[_]);a||("value"in d&&(_=d.value)!==void 0&&(_!==e.value||v==="progress"&&!_)&&ni(e,"value",_,p.value,!1),"checked"in d&&(_=d.checked)!==void 0&&_!==e.checked&&ni(e,"checked",_,p.checked,!1))}return e}function Ha(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){U.__e(r,n)}}function Ua(e,t,n){var r,i,s;if(U.unmount&&U.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ha(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(o){U.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&Ua(r[s],t,n);i!=null&&$a(i)}function _u(e,t,n){return this.constructor(e,n)}function Sn(e,t,n){var r,i,s;U.__&&U.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],Ss(t,e=(!r&&n||t).__k=f(te,null,[e]),i||ei,ei,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?ks.slice.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r),Va(s,e)}function Ga(e,t){Sn(e,t,Ga)}function Ya(e,t,n){var r,i,s,o=arguments,a=Pt({},e.props);for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:a[s]=t[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(o[s]);return n!=null&&(a.children=n),Qn(e.type,a,r||e.key,i||e.ref,null)}function Pn(e,t){var n={__c:t="__cC"+Da++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(ts)},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),a&&a.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}U={__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(s){e=s}throw e},__v:0},ht.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Pt({},this.state),typeof e=="function"&&(e=e(Pt({},n),this.props)),e&&Pt(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),ts(this))},ht.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ts(this))},ht.prototype.render=te,Kn=[],Pa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ti.__r=0,Da=0;var vu={};function Wa(e,t){for(var n in t)e[n]=t[n];return e}function qa(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),s={},o;if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var u=a[l].split("=");s[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}e=ns(e.replace(r,"")),t=ns(t||"");for(var c=Math.max(e.length,t.length),h=0;h<c;h++)if(t[h]&&t[h].charAt(0)===":"){var p=t[h].replace(/(^:|[+*?]+$)/g,""),d=(t[h].match(/[+*?]+$/)||vu)[0]||"",v=~d.indexOf("+"),_=~d.indexOf("*"),m=e[h]||"";if(!m&&!_&&(d.indexOf("?")<0||v)){o=!1;break}if(s[p]=decodeURIComponent(m),v||_){s[p]=e.slice(h).map(decodeURIComponent).join("/");break}}else if(t[h]!==e[h]){o=!1;break}return n.default!==!0&&o===!1?!1:s}function wu(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function yu(e,t){return e.index=t,e.rank=Au(e),e.props}function ns(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function bu(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function xu(e){return ns(e).map(bu).join("")}function Au(e){return e.props.default?0:xu(e.props.path)}var Qe=null,Jt=[],rs=[],ku={};function Su(e,t){t===void 0&&(t="push"),Qe&&Qe[t]?Qe[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function En(){var e;return Qe&&Qe.location?e=Qe.location:Qe&&Qe.getCurrentLocation?e=Qe.getCurrentLocation():e=typeof location!="undefined"?location:ku,""+(e.pathname||"")+(e.search||"")}function Yt(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),Eu(e)&&Su(e,t?"replace":"push"),Za(e)}function Eu(e){for(var t=Jt.length;t--;)if(Jt[t].canRoute(e))return!0;return!1}function Za(e){for(var t=!1,n=0;n<Jt.length;n++)Jt[n].routeTo(e)===!0&&(t=!0);for(var r=rs.length;r--;)rs[r](e);return t}function Xa(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 Yt(t)}}function Iu(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return Xa(e.currentTarget||e.target||this),Ja(e)}function Ja(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function Cu(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(Xa(t))return Ja(e)}while(t=t.parentNode)}}var lo=!1;function Mu(){lo||(typeof addEventListener=="function"&&(Qe||addEventListener("popstate",function(){Za(En())}),addEventListener("click",Cu)),lo=!0)}var $t=function(e){function t(n){e.call(this,n),n.history&&(Qe=n.history),this.state={url:n.url||En()},Mu()}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=ft(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(){Jt.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;Qe&&(this.unlisten=Qe.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),Jt.splice(Jt.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,s){return r.filter(yu).sort(wu).map(function(o){var a=qa(i,o.props.path,o.props);if(a){if(s!==!1){var l={url:i,matches:a};return Wa(l,a),delete l.ref,delete l.key,Ya(o,l)}return o}}).filter(Boolean)},t.prototype.render=function(r,i){var s=r.children,o=r.onChange,a=i.url,l=this.getMatchingChildren(ft(s),a,!0),u=l[0]||null,c=this.previousUrl;return a!==c&&(this.previousUrl=a,typeof o=="function"&&o({router:this,url:a,previous:c,active:l,current:u})),u},t}(ht),Ka=function(e){return f("a",Wa({onClick:Iu},e))},Ou=function(e){return f(e.component,e)};$t.subscribers=rs;$t.getCurrentUrl=En;$t.route=Yt;$t.Router=$t;$t.Route=Ou;$t.Link=Ka;$t.exec=qa;var Ce;(e=>{const t="Site",n="Generator";function u(w,A,b){ga("send","event",w,A,b)}function c(w,A){ga("set",`dimension${w}`,A)}function h(w){ga("set","page",w),ga("send","pageview")}e.pageview=h;function p(w){c(4,w),u(t,"set-language",w)}e.setLanguage=p;function d(w){c(1,w),u(t,"set-theme",w)}e.setTheme=d;function v(w){c(3,w),u(n,"set-version",w)}e.setVersion=v;function _(w){c(5,w),u(n,"set-preview",w)}e.setPreview=_;function m(w){c(6,w)}e.setGenerator=m;function g(w){c(7,w)}e.setPrefersColorScheme=g;function y(w,A){u(n,w,A)}e.generatorEvent=y})(Ce||(Ce={}));var an,$e,co,In=0,is=[],uo=U.__b,ho=U.__r,fo=U.diffed,po=U.__c,mo=U.unmount;function Dn(e,t){U.__h&&U.__h($e,e,In||t),In=0;var n=$e.__H||($e.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function P(e){return In=1,Qa(nl,e)}function Qa(e,t,n){var r=Dn(an++,2);return r.t=e,r.__c||(r.__=[n?n(t):nl(void 0,t),function(i){var s=r.t(r.__[0],i);r.__[0]!==s&&(r.__=[s,r.__[1]],r.__c.setState({}))}],r.__c=$e),r.__}function X(e,t){var n=Dn(an++,3);!U.__s&&Es(n.__H,t)&&(n.__=e,n.__H=t,$e.__H.__h.push(n))}function el(e,t){var n=Dn(an++,4);!U.__s&&Es(n.__H,t)&&(n.__=e,n.__H=t,$e.__h.push(n))}function _e(e){return In=5,xe(function(){return{current:e}},[])}function Tu(e,t,n){In=6,el(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function xe(e,t){var n=Dn(an++,7);return Es(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Pe(e,t){return In=8,xe(function(){return e},t)}function $n(e){var t=$e.context[e.__c],n=Dn(an++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub($e)),t.props.value):e.__}function Nu(e,t){U.useDebugValue&&U.useDebugValue(t?t(e):e)}function tl(e){var t=Dn(an++,10),n=P();return t.__=e,$e.componentDidCatch||($e.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Lu(){is.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Vr),e.__H.__h.forEach(ss),e.__H.__h=[]}catch(t){e.__H.__h=[],U.__e(t,e.__v)}}),is=[]}U.__b=function(e){$e=null,uo&&uo(e)},U.__r=function(e){ho&&ho(e),an=0;var t=($e=e.__c).__H;t&&(t.__h.forEach(Vr),t.__h.forEach(ss),t.__h=[])},U.diffed=function(e){fo&&fo(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(is.push(t)!==1&&co===U.requestAnimationFrame||((co=U.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(s),go&&cancelAnimationFrame(r),setTimeout(n)},s=setTimeout(i,100);go&&(r=requestAnimationFrame(i))})(Lu)),$e=void 0},U.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Vr),n.__h=n.__h.filter(function(r){return!r.__||ss(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],U.__e(r,n.__v)}}),po&&po(e,t)},U.unmount=function(e){mo&&mo(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Vr)}catch(n){U.__e(n,t.__v)}};var go=typeof requestAnimationFrame=="function";function Vr(e){var t=$e;typeof e.__c=="function"&&e.__c(),$e=t}function ss(e){var t=$e;e.__c=e.__(),$e=t}function Es(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function nl(e,t){return typeof t=="function"?t(e):t}function _r({type:e,id:t}){return X(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&&ethicalads.load()},[]),f("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function q({icon:e,label:t,active:n,class:r,tooltip:i,tooltipLoc:s,onClick:o}){return f("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${s!=null?s:"sw"}`:""}${n?" tip-shown":""}`,onClick:o,"aria-label":i},e&&se[e],t&&f("span",null,t))}var Lr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function rl(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 D={},kt={},bt={};Object.defineProperty(bt,"__esModule",{value:!0});bt.ModelPath=bt.Path=bt.relativePath=void 0;function Ru(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}bt.relativePath=Ru;class Ot{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 Ot(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Ot(this.modelArr.slice(1),this.contextArr)}pop(){return new Ot(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Ot([...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 Ot([...this.modelArr],[...this.contextArr,n])}copy(){return new Ot([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Tt(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)}}bt.Path=Ot;class Tt extends Ot{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 Tt(this.model,super.slice(t,n))}shift(){return new Tt(this.model,super.shift())}pop(){return new Tt(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Tt(this.model,super.modelPush(t))}contextPush(t){return new Tt(this.model,super.contextPush(t))}copy(){return new Tt(this.model,super.copy())}}bt.ModelPath=Tt;var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Errors=void 0;class Pu{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}}Bn.Errors=Pu;var xt={};Object.defineProperty(xt,"__esModule",{value:!0});xt.hexId=xt.quoteString=xt.escapeString=void 0;function il(e){return e.replace(/(\\|")/g,"\\$1")}xt.escapeString=il;function Du(e){return`"${il(e)}"`}xt.quoteString=Du;const $u=e=>("0"+e.toString(16)).substr(-2);function Bu(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,$u).join("")}xt.hexId=Bu;Object.defineProperty(kt,"__esModule",{value:!0});kt.DataModel=void 0;const Fu=bt,_o=Bn,Hi=xt;class Is{constructor(t,n){var r,i,s,o;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=(s=n==null?void 0:n.wrapLists)!==null&&s!==void 0?s:!1,this.schema=t;const a=(o=n==null?void 0:n.initialData)!==null&&o!==void 0?o:t.default();this.data=this.wrapLists?Is.wrapLists(a):a,this.listeners=[],this.errors=new _o.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(s=>{(i[s]===void 0||typeof i[s]=="string"||typeof i[s]=="number")&&(this.wrapLists&&typeof s=="number"?i[s]={node:{},id:(0,Hi.hexId)()}:i[s]={}),this.wrapLists&&typeof s=="number"?i=i[s].node:i=i[s]}),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,Hi.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 Fu.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 _o.Errors;i.add(t,n,r),this.listeners.forEach(s=>{s.errors&&s.errors(i)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(r=>({node:this.wrapLists(r),id:(0,Hi.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}}kt.DataModel=Is;var Vt={};(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:s=>s,suggest:()=>[],validate:(s,o)=>o,validationOption:()=>{},hook(s,o,...a){return s.base({node:this},o,...a)},canUpdate:()=>!1,update:()=>[]};const t=(s,o)=>K(K({},s),typeof o=="function"?o(s):o);e.Mod=t;const n=(s,o)=>(0,e.Mod)(o,{enabled:a=>a.push(s).get()!==void 0});e.Has=n;function r(s){return ke(K({},s),{optional:()=>!0})}e.Opt=r;function i(s){return ke(K({},s),{keep:()=>!0})}e.Keep=i})(Vt);var bi={};Object.defineProperty(bi,"__esModule",{value:!0});bi.BooleanNode=void 0;const zu=kt,ju=Vt,Vu=()=>ke(K({},ju.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?zu.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)}});bi.BooleanNode=Vu;var sl={},vr={};Object.defineProperty(vr,"__esModule",{value:!0});vr.ListNode=void 0;const Hu=kt,Uu=Vt,Gu=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,s=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,o=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return ke(K({},Uu.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?Hu.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))o&&(l.length<i||l.length>s)?i===s?u.add(a,"error.invalid_list_range.exact",l.length,i):u.add(a,"error.invalid_list_range.between",l.length,i,s):l.length<i?u.add(a,"error.invalid_list_range.smaller",l.length,i):l.length>s&&u.add(a,"error.invalid_list_range.larger",l.length,s);else return u.add(a,"error.expected_list"),l;const h=l.map((p,d)=>{const v=e.validate(a.push(d),c.wrapLists?p.node:p,u,c);return c.wrapLists?{node:v,id:p.id}:v});for(const p of Object.getOwnPropertySymbols(l))h[p]=l[p];return h},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)}})};vr.ListNode=Gu;var wr={};Object.defineProperty(wr,"__esModule",{value:!0});wr.SwitchNode=void 0;const Yu=Vt,Wu=e=>ke(K({},Yu.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(s=>s.match(t)).map(s=>s.node.suggest(t,n)).reduce((s,o)=>s.concat(o))},validate(t,n,r,i){let s=this.activeCase(t);return s===void 0?n:s.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=(s,o)=>{var a,l;return((a=o.priority)!==null&&a!==void 0?a:0)-((l=s.priority)!==null&&l!==void 0?l:0)},i=e.filter(s=>s.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)}});wr.SwitchNode=Wu;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=vr,n=wr,r=(o,a)=>{const l=(c,h)=>{if(c.match)return c.match(h);switch(c.type){case"list":return Array.isArray(h);case"object":return typeof h=="object"&&!Array.isArray(h);default:return typeof h===c.type}},u=(0,n.SwitchNode)(o.map(c=>({type:c.type,priority:c.priority,match:h=>l(c,h.get()),node:c.node})));return ke(K({},u),{validate(c,h,p,d){let v=u.activeCase(c,!0);return v.node.optional()?h:v.node.validate(c,h,p,d)},hook(c,h,...p){var d;return((d=c.choice)!==null&&d!==void 0?d:c.base).call(c,{node:this,choices:o,config:a!=null?a:{},switchNode:u},h,...p)}})};e.ChoiceNode=r;const i=o=>(a,l)=>(0,e.ChoiceNode)([{type:o,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 s=(o,a,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:o,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=s})(sl);var xi={};Object.defineProperty(xi,"__esModule",{value:!0});xi.MapNode=void 0;const qu=Vt,Zu=kt,Xu=(e,t,n)=>ke(K({},qu.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const s=i+1;return r.getArray().length<=s?this:t.navigate(r,s)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,s,o){if(o.loose&&typeof i!="object"&&(i=o.wrapLists?Zu.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return s.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(l=>{e.validate(r,l,s,o),a[l]=t.validate(r.push(l),i[l],s,o)});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,...s){var o;return((o=r.map)!==null&&o!==void 0?o:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...s)}});xi.MapNode=Xu;var ol={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=D,n=kt,r=Vt,i=o=>{var a,l,u;const c=o!=null&&o.color?!0:(a=o==null?void 0:o.integer)!==null&&a!==void 0?a:!1,h=o!=null&&o.color?0:(l=o==null?void 0:o.min)!==null&&l!==void 0?l:-1/0,p=o!=null&&o.color?16777215:(u=o==null?void 0:o.max)!==null&&u!==void 0?u:1/0,d=(o==null?void 0:o.min)!==void 0&&(o==null?void 0:o.max)!==void 0;return ke(K({},r.Base),{type:()=>"number",default:()=>h>0?h:0,validate(v,_,m,g){return g.loose&&typeof _!="number"&&(_=g.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof _!="number"?m.add(v,"error.expected_number"):c&&!Number.isInteger(_)?m.add(v,"error.expected_integer"):d&&(_<h||_>p)?m.add(v,"error.invalid_number_range.between",_,h,p):_<h?m.add(v,"error.invalid_number_range.smaller",_,h):_>p&&m.add(v,"error.invalid_number_range.larger",_,p),_},hook(v,_,...m){var g;return((g=v.number)!==null&&g!==void 0?g:v.base).call(v,{node:this,integer:c,min:h,max:p,between:d,config:o!=null?o:{}},_,...m)}})};e.NumberNode=i;const s=({integer:o,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:o}),l=>({validate:(u,c,h,p)=>(c=l.validate(u,c,h,p),a.includes(c)||h.add(u,"error.invalid_number_enum",a.join(", ")),c)}));e.NumberEnum=s})(ol);var al={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=Vt,n=bt,r=Bn,i=xt,s=kt;e.Switch=Symbol("switch"),e.Case=Symbol("case");const o=(a,l)=>{var v,_;const m=a,{[v=e.Switch]:u,[_=e.Case]:c}=m,h=ro(m,[Vi(v),Vi(_)]),p=g=>{if(u===void 0)return h;const y=(0,n.relativePath)(g,u).get(),w=c[y];return K(K({},h),w)},d=(g,y)=>{var w;const A=u?(0,n.relativePath)(g,u).get():void 0,b=u?(w=c[A])!==null&&w!==void 0?w:{}:{},k=Object.keys(b),S=l!=null&&l.context?new n.ModelPath(g.getModel(),new n.Path(g.getArray(),[l.context])):g;return(!(l!=null&&l.disableSwitchContext)&&A&&k.includes(y)?S.contextPush(A):S).push(y)};return ke(K({},t.Base),{type:()=>"object",category:()=>l==null?void 0:l.category,default:()=>({}),keep(){return this.optional()},navigate(g,y){const w=y+1,A=g.getArray();if(A.length<=w)return this;const k=p(g.slice(0,w))[A[w]];return k==null?void 0:k.navigate(g,w)},pathPush(g,y){return d(g,y.toString())},suggest(g,y){const w=p(g),A=Object.keys(typeof y=="object"?y:{});return Object.keys(w).filter(b=>w[b].enabled(g)).filter(b=>!A.includes(b)).map(i.quoteString)},validate(g,y,w,A){if(A.loose&&typeof y!="object"&&(y=A.wrapLists?s.DataModel.wrapLists(this.default()):this.default()),typeof y!="object"||y===null)return w.add(g,"error.expected_object"),y;let b=h;if(u){const M=(0,n.relativePath)(g,u);let N=M.get();if(g.equals(M.pop())){const F=M.last();N=h[F].validate(g.push(F),y[F],new r.Errors,A)}b=K(K({},b),c[N])}const k=Object.keys(b),S=k.filter(M=>!b[M].optional()),I=new Set([...S,...Object.keys(y)]),C={};I.forEach(M=>{if(k.includes(M)){if(!b[M].enabled(g))return;const N=b[M].validate(g.push(M),y[M],w,A);!b[M].keep()&&b[M].optional()&&(N===void 0||Array.isArray(N)&&N.length===0||N.constructor===Object&&Object.keys(N).length===0)?delete C[M]:(C[M]=N,g.getModel().set(g.push(M),N,!0))}else C[M]=y[M]});for(const M of Object.getOwnPropertySymbols(y))C[M]=y[M];return C},hook(g,y,...w){var A;return((A=g.object)!==null&&A!==void 0?A:g.base).call(g,{node:this,fields:h,config:l!=null?l:{},filter:u,cases:c,getActiveFields:p,getChildModelPath:d},y,...w)}})};e.ObjectNode=o})(al);var Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.Reference=void 0;const Ju=(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,s){return e.get(t).validate.bind(this)(n,r,i,s)},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)}});Ai.Reference=Ju;var ki={};Object.defineProperty(ki,"__esModule",{value:!0});ki.StringNode=void 0;const Ku=Vt,Qu=xt,ed=kt,vo=e=>!!(e!=null&&e.enum),wo=e=>!!(e!=null&&e.validator),td=(e,t)=>{const n=()=>{var r,i,s,o;if(vo(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?(s=e==null?void 0:e.get(`tag/${a}`).map(l=>`#${l}`))!==null&&s!==void 0?s:[]:[],...(o=e==null?void 0:e.get(a))!==null&&o!==void 0?o:[]]}return t.params.pool}return[]};return ke(K({},Ku.Base),{type:()=>"string",default:()=>"",validate(r,i,s,o){if(o.loose&&typeof i!="string"&&(i=(o.wrapLists?ed.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return s.add(r,"error.expected_string"),i;if(wo(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 s.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return s.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return s.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return s.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("#")||t.params.isDefinition||t.params.allowUnknown))return i}if(vo(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&s.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(Qu.quoteString),validationOption(){return wo(t)?t:void 0},hook(r,i,...s){var o;return((o=r.string)!==null&&o!==void 0?o:r.base).call(r,{node:this,getValues:n,config:t},i,...s)}})};ki.StringNode=td;var ll={};Object.defineProperty(ll,"__esModule",{value:!0});var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.CollectionRegistry=Cn.SchemaRegistry=void 0;class nd{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}}Cn.SchemaRegistry=nd;class rd{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:[]}}Cn.CollectionRegistry=rd;var cl={};Object.defineProperty(cl,"__esModule",{value:!0});(function(e){var t=Lr&&Lr.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,a)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),n=Lr&&Lr.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(kt,e),n(bt,e),n(Bn,e),n(Vt,e),n(bi,e),n(sl,e),n(vr,e),n(xi,e),n(ol,e),n(al,e),n(Ai,e),n(ki,e),n(wr,e),n(ll,e),n(Cn,e),n(cl,e)})(D);var Ie={},yr={},ot={};function ul(e){return typeof e=="undefined"||e===null}function id(e){return typeof e=="object"&&e!==null}function sd(e){return Array.isArray(e)?e:ul(e)?[]:[e]}function od(e,t){var n,r,i,s;if(t)for(s=Object.keys(t),n=0,r=s.length;n<r;n+=1)i=s[n],e[i]=t[i];return e}function ad(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function ld(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}ot.isNothing=ul;ot.isObject=id;ot.toArray=sd;ot.repeat=ad;ot.isNegativeZero=ld;ot.extend=od;function sr(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||""}sr.prototype=Object.create(Error.prototype);sr.prototype.constructor=sr;sr.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var br=sr,yo=ot;function Cs(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}Cs.prototype.getSnippet=function(t,n){var r,i,s,o,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(s="",o=this.position;o<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(o))===-1;)if(o+=1,o-this.position>n/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(i,o),yo.repeat(" ",t)+r+a+s+`
`+yo.repeat(" ",t+this.position-i+r.length)+"^"};Cs.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 cd=Cs,bo=br,ud=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dd=["scalar","sequence","mapping"];function hd(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function fd(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(ud.indexOf(n)===-1)throw new bo('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=hd(t.styleAliases||null),dd.indexOf(this.kind)===-1)throw new bo('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var De=fd,xo=ot,Hr=br,pd=De;function os(e,t,n){var r=[];return e.include.forEach(function(i){n=os(i,t,n)}),e[t].forEach(function(i){n.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&r.push(o)}),n.push(i)}),n.filter(function(i,s){return r.indexOf(s)===-1})}function md(){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 _n(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 Hr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=os(this,"implicit",[]),this.compiledExplicit=os(this,"explicit",[]),this.compiledTypeMap=md(this.compiledImplicit,this.compiledExplicit)}_n.DEFAULT=null;_n.create=function(){var t,n;switch(arguments.length){case 1:t=_n.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Hr("Wrong number of arguments for Schema.create function")}if(t=xo.toArray(t),n=xo.toArray(n),!t.every(function(r){return r instanceof _n}))throw new Hr("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof pd}))throw new Hr("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new _n({include:t,explicit:n})};var Fn=_n,gd=De,_d=new gd("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),vd=De,wd=new vd("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),yd=De,bd=new yd("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),xd=Fn,Ms=new xd({explicit:[_d,wd,bd]}),Ad=De;function kd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Sd(){return null}function Ed(e){return e===null}var Id=new Ad("tag:yaml.org,2002:null",{kind:"scalar",resolve:kd,construct:Sd,predicate:Ed,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),Cd=De;function Md(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 Od(e){return e==="true"||e==="True"||e==="TRUE"}function Td(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Nd=new Cd("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Md,construct:Od,predicate:Td,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),Ld=ot,Rd=De;function Pd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Dd(e){return 48<=e&&e<=55}function $d(e){return 48<=e&&e<=57}function Bd(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(!Pd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!Dd(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(!$d(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function Fd(e){var t=e,n=1,r,i,s=[];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(o){s.unshift(parseInt(o,10))}),t=0,i=1,s.forEach(function(o){t+=o*i,i*=60}),n*t):n*parseInt(t,10)}function zd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ld.isNegativeZero(e)}var jd=new Rd("tag:yaml.org,2002:int",{kind:"scalar",resolve:Bd,construct:Fd,predicate:zd,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"]}}),dl=ot,Vd=De,Hd=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 Ud(e){return!(e===null||!Hd.test(e)||e[e.length-1]==="_")}function Gd(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(s){i.unshift(parseFloat(s,10))}),t=0,r=1,i.forEach(function(s){t+=s*r,r*=60}),n*t):n*parseFloat(t,10)}var Yd=/^[-+]?[0-9]+e/;function Wd(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(dl.isNegativeZero(e))return"-0.0";return n=e.toString(10),Yd.test(n)?n.replace("e",".e"):n}function qd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||dl.isNegativeZero(e))}var Zd=new Vd("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ud,construct:Gd,predicate:qd,represent:Wd,defaultStyle:"lowercase"}),Xd=Fn,hl=new Xd({include:[Ms],implicit:[Id,Nd,jd,Zd]}),Jd=Fn,fl=new Jd({include:[hl]}),Kd=De,pl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ml=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 Qd(e){return e===null?!1:pl.exec(e)!==null||ml.exec(e)!==null}function eh(e){var t,n,r,i,s,o,a,l=0,u=null,c,h,p;if(t=pl.exec(e),t===null&&(t=ml.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(s=+t[4],o=+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],h=+(t[11]||0),u=(c*60+h)*6e4,t[9]==="-"&&(u=-u)),p=new Date(Date.UTC(n,r,i,s,o,a,l)),u&&p.setTime(p.getTime()-u),p}function th(e){return e.toISOString()}var nh=new Kd("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Qd,construct:eh,instanceOf:Date,represent:th}),rh=De;function ih(e){return e==="<<"||e===null}var sh=new rh("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ih}),Xt;try{var oh=rl;Xt=oh("buffer").Buffer}catch{}var ah=De,Os=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function lh(e){if(e===null)return!1;var t,n,r=0,i=e.length,s=Os;for(n=0;n<i;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function ch(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,s=Os,o=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):n===18?(a.push(o>>10&255),a.push(o>>2&255)):n===12&&a.push(o>>4&255),Xt?Xt.from?Xt.from(a):new Xt(a):a}function uh(e){var t="",n=0,r,i,s=e.length,o=Os;for(r=0;r<s;r++)r%3===0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function dh(e){return Xt&&Xt.isBuffer(e)}var hh=new ah("tag:yaml.org,2002:binary",{kind:"scalar",resolve:lh,construct:ch,predicate:dh,represent:uh}),fh=De,ph=Object.prototype.hasOwnProperty,mh=Object.prototype.toString;function gh(e){if(e===null)return!0;var t=[],n,r,i,s,o,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],o=!1,mh.call(i)!=="[object Object]")return!1;for(s in i)if(ph.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function _h(e){return e!==null?e:[]}var vh=new fh("tag:yaml.org,2002:omap",{kind:"sequence",resolve:gh,construct:_h}),wh=De,yh=Object.prototype.toString;function bh(e){if(e===null)return!0;var t,n,r,i,s,o=e;for(s=new Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],yh.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;s[t]=[i[0],r[i[0]]]}return!0}function xh(e){if(e===null)return[];var t,n,r,i,s,o=e;for(s=new Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),s[t]=[i[0],r[i[0]]];return s}var Ah=new wh("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:bh,construct:xh}),kh=De,Sh=Object.prototype.hasOwnProperty;function Eh(e){if(e===null)return!0;var t,n=e;for(t in n)if(Sh.call(n,t)&&n[t]!==null)return!1;return!0}function Ih(e){return e!==null?e:{}}var Ch=new kh("tag:yaml.org,2002:set",{kind:"mapping",resolve:Eh,construct:Ih}),Mh=Fn,xr=new Mh({include:[fl],implicit:[nh,sh],explicit:[hh,vh,Ah,Ch]}),Oh=De;function Th(){return!0}function Nh(){}function Lh(){return""}function Rh(e){return typeof e=="undefined"}var Ph=new Oh("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Th,construct:Nh,predicate:Rh,represent:Lh}),Dh=De;function $h(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 Bh(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 Fh(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function zh(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var jh=new Dh("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:$h,construct:Bh,predicate:zh,represent:Fh}),ri;try{var Vh=rl;ri=Vh("esprima")}catch{typeof window!="undefined"&&(ri=window.esprima)}var Hh=De;function Uh(e){if(e===null)return!1;try{var t="("+e+")",n=ri.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 Gh(e){var t="("+e+")",n=ri.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(s){r.push(s.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 Yh(e){return e.toString()}function Wh(e){return Object.prototype.toString.call(e)==="[object Function]"}var qh=new Hh("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Uh,construct:Gh,predicate:Wh,represent:Yh}),Ao=Fn,Si=Ao.DEFAULT=new Ao({include:[xr],explicit:[Ph,jh,qh]}),Lt=ot,gl=br,Zh=cd,_l=xr,Xh=Si,Wt=Object.prototype.hasOwnProperty,ii=1,vl=2,wl=3,si=4,Ui=1,Jh=2,ko=3,Kh=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Qh=/[\x85\u2028\u2029]/,ef=/[,\[\]\{\}]/,yl=/^(?:!|!!|![a-z\-]+!)$/i,bl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function So(e){return Object.prototype.toString.call(e)}function At(e){return e===10||e===13}function Kt(e){return e===9||e===32}function We(e){return e===9||e===32||e===10||e===13}function vn(e){return e===44||e===91||e===93||e===123||e===125}function tf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function nf(e){return e===120?2:e===117?4:e===85?8:0}function rf(e){return 48<=e&&e<=57?e-48:-1}function Eo(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 sf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var xl=new Array(256),Al=new Array(256);for(var hn=0;hn<256;hn++)xl[hn]=Eo(hn)?1:0,Al[hn]=Eo(hn);function of(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Xh,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 kl(e,t){return new gl(t,new Zh(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function Z(e,t){throw kl(e,t)}function oi(e,t){e.onWarning&&e.onWarning.call(null,kl(e,t))}var Io={YAML:function(t,n,r){var i,s,o;t.version!==null&&Z(t,"duplication of %YAML directive"),r.length!==1&&Z(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&Z(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&Z(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&oi(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,s;r.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],yl.test(i)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),Wt.call(t.tagMap,i)&&Z(t,'there is a previously declared suffix for "'+i+'" tag handle'),bl.test(s)||Z(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=s}};function Gt(e,t,n,r){var i,s,o,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||Z(e,"expected valid JSON character");else Kh.test(a)&&Z(e,"the stream contains non-printable characters");e.result+=a}}function Co(e,t,n,r){var i,s,o,a;for(Lt.isObject(n)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;o<a;o+=1)s=i[o],Wt.call(t,s)||(t[s]=n[s],r[s]=!0)}function wn(e,t,n,r,i,s,o,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])&&Z(e,"nested arrays are not supported inside keys"),typeof i=="object"&&So(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&So(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,u=s.length;l<u;l+=1)Co(e,t,s[l],n);else Co(e,t,s,n);else!e.json&&!Wt.call(n,i)&&Wt.call(t,i)&&(e.line=o||e.line,e.position=a||e.position,Z(e,"duplicated mapping key")),t[i]=s,delete n[i];return t}function Ts(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++):Z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Me(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Kt(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(At(i))for(Ts(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&&oi(e,"deficient indentation"),r}function Ei(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||We(n)))}function Ns(e,t){t===1?e.result+=" ":t>1&&(e.result+=Lt.repeat(`
`,t-1))}function af(e,t,n){var r,i,s,o,a,l,u,c,h=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),We(d)||vn(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(i=e.input.charCodeAt(e.position+1),We(i)||n&&vn(i)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;d!==0;){if(d===58){if(i=e.input.charCodeAt(e.position+1),We(i)||n&&vn(i))break}else if(d===35){if(r=e.input.charCodeAt(e.position-1),We(r))break}else{if(e.position===e.lineStart&&Ei(e)||n&&vn(d))break;if(At(d))if(l=e.line,u=e.lineStart,c=e.lineIndent,Me(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=u,e.lineIndent=c;break}}a&&(Gt(e,s,o,!1),Ns(e,e.line-l),s=o=e.position,a=!1),Kt(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Gt(e,s,o,!1),e.result?!0:(e.kind=h,e.result=p,!1)}function lf(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(Gt(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 At(n)?(Gt(e,r,i,!0),Ns(e,Me(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ei(e)?Z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Z(e,"unexpected end of the stream within a single quoted scalar")}function cf(e,t){var n,r,i,s,o,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 Gt(e,n,e.position,!0),e.position++,!0;if(a===92){if(Gt(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),At(a))Me(e,!1,t);else if(a<256&&xl[a])e.result+=Al[a],e.position++;else if((o=nf(a))>0){for(i=o,s=0;i>0;i--)a=e.input.charCodeAt(++e.position),(o=tf(a))>=0?s=(s<<4)+o:Z(e,"expected hexadecimal character");e.result+=sf(s),e.position++}else Z(e,"unknown escape sequence");n=r=e.position}else At(a)?(Gt(e,n,r,!0),Ns(e,Me(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ei(e)?Z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Z(e,"unexpected end of the stream within a double quoted scalar")}function uf(e,t){var n=!0,r,i=e.tag,s,o=e.anchor,a,l,u,c,h,p={},d,v,_,m;if(m=e.input.charCodeAt(e.position),m===91)l=93,h=!1,s=[];else if(m===123)l=125,h=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),m=e.input.charCodeAt(++e.position);m!==0;){if(Me(e,!0,t),m=e.input.charCodeAt(e.position),m===l)return e.position++,e.tag=i,e.anchor=o,e.kind=h?"mapping":"sequence",e.result=s,!0;n||Z(e,"missed comma between flow collection entries"),v=d=_=null,u=c=!1,m===63&&(a=e.input.charCodeAt(e.position+1),We(a)&&(u=c=!0,e.position++,Me(e,!0,t))),r=e.line,Mn(e,t,ii,!1,!0),v=e.tag,d=e.result,Me(e,!0,t),m=e.input.charCodeAt(e.position),(c||e.line===r)&&m===58&&(u=!0,m=e.input.charCodeAt(++e.position),Me(e,!0,t),Mn(e,t,ii,!1,!0),_=e.result),h?wn(e,s,p,v,d,_):u?s.push(wn(e,null,p,v,d,_)):s.push(d),Me(e,!0,t),m=e.input.charCodeAt(e.position),m===44?(n=!0,m=e.input.charCodeAt(++e.position)):n=!1}Z(e,"unexpected end of the stream within a flow collection")}function df(e,t){var n,r,i=Ui,s=!1,o=!1,a=t,l=0,u=!1,c,h;if(h=e.input.charCodeAt(e.position),h===124)r=!1;else if(h===62)r=!0;else return!1;for(e.kind="scalar",e.result="";h!==0;)if(h=e.input.charCodeAt(++e.position),h===43||h===45)Ui===i?i=h===43?ko:Jh:Z(e,"repeat of a chomping mode identifier");else if((c=rf(h))>=0)c===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Z(e,"repeat of an indentation width identifier"):(a=t+c-1,o=!0);else break;if(Kt(h)){do h=e.input.charCodeAt(++e.position);while(Kt(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!At(h)&&h!==0)}for(;h!==0;){for(Ts(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&h===32;)e.lineIndent++,h=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),At(h)){l++;continue}if(e.lineIndent<a){i===ko?e.result+=Lt.repeat(`
`,s?1+l:l):i===Ui&&s&&(e.result+=`
`);break}for(r?Kt(h)?(u=!0,e.result+=Lt.repeat(`
`,s?1+l:l)):u?(u=!1,e.result+=Lt.repeat(`
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Lt.repeat(`
`,l):e.result+=Lt.repeat(`
`,s?1+l:l),s=!0,o=!0,l=0,n=e.position;!At(h)&&h!==0;)h=e.input.charCodeAt(++e.position);Gt(e,n,e.position,!1)}return!0}function Mo(e,t){var n,r=e.tag,i=e.anchor,s=[],o,a=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(o=e.input.charCodeAt(e.position+1),!We(o)));){if(a=!0,e.position++,Me(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,Mn(e,t,wl,!1,!0),s.push(e.result),Me(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)Z(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=s,!0):!1}function hf(e,t,n){var r,i,s,o,a=e.tag,l=e.anchor,u={},c={},h=null,p=null,d=null,v=!1,_=!1,m;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),m=e.input.charCodeAt(e.position);m!==0;){if(r=e.input.charCodeAt(e.position+1),s=e.line,o=e.position,(m===63||m===58)&&We(r))m===63?(v&&(wn(e,u,c,h,p,null),h=p=d=null),_=!0,v=!0,i=!0):v?(v=!1,i=!0):Z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=r;else if(Mn(e,n,vl,!1,!0))if(e.line===s){for(m=e.input.charCodeAt(e.position);Kt(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),We(m)||Z(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(wn(e,u,c,h,p,null),h=p=d=null),_=!0,v=!1,i=!1,h=e.tag,p=e.result;else if(_)Z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=l,!0}else if(_)Z(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===s||e.lineIndent>t)&&(Mn(e,t,si,!0,i)&&(v?p=e.result:d=e.result),v||(wn(e,u,c,h,p,d,s,o),h=p=d=null),Me(e,!0,-1),m=e.input.charCodeAt(e.position)),e.lineIndent>t&&m!==0)Z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&wn(e,u,c,h,p,null),_&&(e.tag=a,e.anchor=l,e.kind="mapping",e.result=u),_}function ff(e){var t,n=!1,r=!1,i,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&Z(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i="!!",o=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Z(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!We(o);)o===33&&(r?Z(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),yl.test(i)||Z(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),ef.test(s)&&Z(e,"tag suffix cannot contain flow indicator characters")}return s&&!bl.test(s)&&Z(e,"tag name cannot contain such characters: "+s),n?e.tag=s:Wt.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:Z(e,'undeclared tag handle "'+i+'"'),!0}function pf(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&Z(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!We(n)&&!vn(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function mf(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&&!We(r)&&!vn(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Wt.call(e.anchorMap,n)||Z(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Me(e,!0,-1),!0}function Mn(e,t,n,r,i){var s,o,a,l=1,u=!1,c=!1,h,p,d,v,_;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=a=si===n||wl===n,r&&Me(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;ff(e)||pf(e);)Me(e,!0,-1)?(u=!0,a=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=u||i),(l===1||si===n)&&(ii===n||vl===n?v=t:v=t+1,_=e.position-e.lineStart,l===1?a&&(Mo(e,_)||hf(e,_,v))||uf(e,v)?c=!0:(o&&df(e,v)||lf(e,v)||cf(e,v)?c=!0:mf(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):af(e,v,ii===n)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=a&&Mo(e,_))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),h=0,p=e.implicitTypes.length;h<p;h+=1)if(d=e.implicitTypes[h],d.resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Wt.call(e.typeMap[e.kind||"fallback"],e.tag)?(d=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&d.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result)?(e.result=d.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):Z(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function gf(e){var t=e.position,n,r,i,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(o=e.input.charCodeAt(e.position))!==0&&(Me(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!We(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&Z(e,"directive name must not be less than one character in length");o!==0;){for(;Kt(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!At(o));break}if(At(o))break;for(n=e.position;o!==0&&!We(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&Ts(e),Wt.call(Io,r)?Io[r](e,r,i):oi(e,'unknown document directive "'+r+'"')}if(Me(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,Me(e,!0,-1)):s&&Z(e,"directives end mark is expected"),Mn(e,e.lineIndent-1,si,!1,!0),Me(e,!0,-1),e.checkLineBreaks&&Qh.test(e.input.slice(t,e.position))&&oi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ei(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Me(e,!0,-1));return}if(e.position<e.length-1)Z(e,"end of the stream or a document separator is expected");else return}function Sl(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 of(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,Z(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;)gf(n);return n.documents}function El(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=Sl(e,n);if(typeof t!="function")return r;for(var i=0,s=r.length;i<s;i+=1)t(r[i])}function Il(e,t){var n=Sl(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new gl("expected a single document in the stream, but found more")}}function _f(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),El(e,t,Lt.extend({schema:_l},n))}function vf(e,t){return Il(e,Lt.extend({schema:_l},t))}yr.loadAll=El;yr.load=Il;yr.safeLoadAll=_f;yr.safeLoad=vf;var Ls={},Ar=ot,kr=br,wf=Si,yf=xr,Cl=Object.prototype.toString,Ml=Object.prototype.hasOwnProperty,bf=9,or=10,xf=13,Af=32,kf=33,Sf=34,Ol=35,Ef=37,If=38,Cf=39,Mf=42,Tl=44,Of=45,Nl=58,Tf=61,Nf=62,Lf=63,Rf=64,Ll=91,Rl=93,Pf=96,Pl=123,Df=124,Dl=125,ze={};ze[0]="\\0";ze[7]="\\a";ze[8]="\\b";ze[9]="\\t";ze[10]="\\n";ze[11]="\\v";ze[12]="\\f";ze[13]="\\r";ze[27]="\\e";ze[34]='\\"';ze[92]="\\\\";ze[133]="\\N";ze[160]="\\_";ze[8232]="\\L";ze[8233]="\\P";var $f=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Bf(e,t){var n,r,i,s,o,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,s=r.length;i<s;i+=1)o=r[i],a=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Ml.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[o]=a;return n}function Oo(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 kr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Ar.repeat("0",r-t.length)+t}function Ff(e){this.schema=e.schema||wf,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ar.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Bf(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 To(e,t){for(var n=Ar.repeat(" ",t),r=0,i=-1,s="",o,a=e.length;r<a;)i=e.indexOf(`
`,r),i===-1?(o=e.slice(r),r=a):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
`&&(s+=n),s+=o;return s}function as(e,t){return`
`+Ar.repeat(" ",e.indent*t)}function zf(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 Rs(e){return e===Af||e===bf}function On(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 On(e)&&!Rs(e)&&e!==65279&&e!==xf&&e!==or}function No(e,t){return On(e)&&e!==65279&&e!==Tl&&e!==Ll&&e!==Rl&&e!==Pl&&e!==Dl&&e!==Nl&&(e!==Ol||t&&jf(t))}function Vf(e){return On(e)&&e!==65279&&!Rs(e)&&e!==Of&&e!==Lf&&e!==Nl&&e!==Tl&&e!==Ll&&e!==Rl&&e!==Pl&&e!==Dl&&e!==Ol&&e!==If&&e!==Mf&&e!==kf&&e!==Df&&e!==Tf&&e!==Nf&&e!==Cf&&e!==Sf&&e!==Ef&&e!==Rf&&e!==Pf}function $l(e){var t=/^\n* /;return t.test(e)}var Bl=1,Fl=2,zl=3,jl=4,Ur=5;function Hf(e,t,n,r,i){var s,o,a,l=!1,u=!1,c=r!==-1,h=-1,p=Vf(e.charCodeAt(0))&&!Rs(e.charCodeAt(e.length-1));if(t)for(s=0;s<e.length;s++){if(o=e.charCodeAt(s),!On(o))return Ur;a=s>0?e.charCodeAt(s-1):null,p=p&&No(o,a)}else{for(s=0;s<e.length;s++){if(o=e.charCodeAt(s),o===or)l=!0,c&&(u=u||s-h-1>r&&e[h+1]!==" ",h=s);else if(!On(o))return Ur;a=s>0?e.charCodeAt(s-1):null,p=p&&No(o,a)}u=u||c&&s-h-1>r&&e[h+1]!==" "}return!l&&!u?p&&!i(e)?Bl:Fl:n>9&&$l(e)?Ur:u?jl:zl}function Uf(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&$f.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),o=r||e.flowLevel>-1&&n>=e.flowLevel;function a(l){return zf(e,l)}switch(Hf(t,o,e.indent,s,a)){case Bl:return t;case Fl:return"'"+t.replace(/'/g,"''")+"'";case zl:return"|"+Lo(t,e.indent)+Ro(To(t,i));case jl:return">"+Lo(t,e.indent)+Ro(To(Gf(t,s),i));case Ur:return'"'+Yf(t)+'"';default:throw new kr("impossible error: invalid scalar style")}}()}function Lo(e,t){var n=$l(e)?String(t):"",r=e[e.length-1]===`
`,i=r&&(e[e.length-2]===`
`||e===`
`),s=i?"+":r?"":"-";return n+s+`
`}function Ro(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function Gf(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,n.lastIndex=u,Po(e.slice(0,u),t)}(),i=e[0]===`
`||e[0]===" ",s,o;o=n.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",r+=a+(!i&&!s&&l!==""?`
`:"")+Po(l,t),i=s}return r}function Po(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,s,o=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(s=o>i?o:a,l+=`
`+e.slice(i,s),i=s+1),o=a;return l+=`
`,e.length-i>t&&o>i?l+=e.slice(i,o)+`
`+e.slice(o+1):l+=e.slice(i),l.slice(1)}function Yf(e){for(var t="",n,r,i,s=0;s<e.length;s++){if(n=e.charCodeAt(s),n>=55296&&n<=56319&&(r=e.charCodeAt(s+1),r>=56320&&r<=57343)){t+=Oo((n-55296)*1024+r-56320+65536),s++;continue}i=ze[n],t+=!i&&On(n)?e[s]:i||Oo(n)}return t}function Wf(e,t,n){var r="",i=e.tag,s,o;for(s=0,o=n.length;s<o;s+=1)tn(e,t,n[s],!1,!1)&&(s!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function qf(e,t,n,r){var i="",s=e.tag,o,a;for(o=0,a=n.length;o<a;o+=1)tn(e,t+1,n[o],!0,!0)&&((!r||o!==0)&&(i+=as(e,t)),e.dump&&or===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function Zf(e,t,n){var r="",i=e.tag,s=Object.keys(n),o,a,l,u,c;for(o=0,a=s.length;o<a;o+=1)c="",o!==0&&(c+=", "),e.condenseFlow&&(c+='"'),l=s[o],u=n[l],tn(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),tn(e,t,u,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function Xf(e,t,n,r){var i="",s=e.tag,o=Object.keys(n),a,l,u,c,h,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new kr("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)p="",(!r||a!==0)&&(p+=as(e,t)),u=o[a],c=n[u],tn(e,t+1,u,!0,!0,!0)&&(h=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,h&&(e.dump&&or===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,h&&(p+=as(e,t)),tn(e,t+1,c,!0,h)&&(e.dump&&or===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=s,e.dump=i||"{}"}function Do(e,t,n){var r,i,s,o,a,l;for(i=n?e.explicitTypes:e.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(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,Cl.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Ml.call(a.represent,l))r=a.represent[l](t,l);else throw new kr("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function tn(e,t,n,r,i,s){e.tag=null,e.dump=n,Do(e,n,!1)||Do(e,n,!0);var o=Cl.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=o==="[object Object]"||o==="[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),o==="[object Object]")r&&Object.keys(e.dump).length!==0?(Xf(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(Zf(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if(o==="[object Array]"){var c=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(qf(e,c,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(Wf(e,c,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else if(o==="[object String]")e.tag!=="?"&&Uf(e,e.dump,t,s);else{if(e.skipInvalid)return!1;throw new kr("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Jf(e,t){var n=[],r=[],i,s;for(ls(e,n,r),i=0,s=r.length;i<s;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(s)}function ls(e,t,n){var r,i,s;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,s=e.length;i<s;i+=1)ls(e[i],t,n);else for(r=Object.keys(e),i=0,s=r.length;i<s;i+=1)ls(e[r[i]],t,n)}function Vl(e,t){t=t||{};var n=new Ff(t);return n.noRefs||Jf(e,n),tn(n,0,e,!0,!0)?n.dump+`
`:""}function Kf(e,t){return Vl(e,Ar.extend({schema:yf},t))}Ls.dump=Vl;Ls.safeDump=Kf;var Ii=yr,Hl=Ls;function Ci(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Ie.Type=De;Ie.Schema=Fn;Ie.FAILSAFE_SCHEMA=Ms;Ie.JSON_SCHEMA=hl;Ie.CORE_SCHEMA=fl;Ie.DEFAULT_SAFE_SCHEMA=xr;Ie.DEFAULT_FULL_SCHEMA=Si;Ie.load=Ii.load;Ie.loadAll=Ii.loadAll;Ie.safeLoad=Ii.safeLoad;Ie.safeLoadAll=Ii.safeLoadAll;Ie.dump=Hl.dump;Ie.safeDump=Hl.safeDump;Ie.YAMLException=br;Ie.MINIMAL_SCHEMA=Ms;Ie.SAFE_SCHEMA=xr;Ie.DEFAULT_SCHEMA=Si;Ie.scan=Ci("scan");Ie.parse=Ci("parse");Ie.compose=Ci("compose");Ie.addConstructor=Ci("addConstructor");var Qf=Ie,cs=Qf,e0=t0;function yn(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function t0(e){if(e=e||{},e.circles)return n0(e);return e.proto?r:n;function t(i,s){for(var o=Object.keys(i),a=new Array(o.length),l=0;l<o.length;l++){var u=o[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]=yn(c):a[u]=s(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 s={};for(var o in i)if(Object.hasOwnProperty.call(i,o)!==!1){var a=i[o];typeof a!="object"||a===null?s[o]=a:a instanceof Date?s[o]=new Date(a):a instanceof Map?s[o]=new Map(t(Array.from(a),n)):a instanceof Set?s[o]=new Set(t(Array.from(a),n)):ArrayBuffer.isView(a)?s[o]=yn(a):s[o]=n(a)}return s}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 s={};for(var o in i){var a=i[o];typeof a!="object"||a===null?s[o]=a:a instanceof Date?s[o]=new Date(a):a instanceof Map?s[o]=new Map(t(Array.from(a),r)):a instanceof Set?s[o]=new Set(t(Array.from(a),r)):ArrayBuffer.isView(a)?s[o]=yn(a):s[o]=r(a)}return s}}function n0(e){var t=[],n=[];return e.proto?s:i;function r(o,a){for(var l=Object.keys(o),u=new Array(l.length),c=0;c<l.length;c++){var h=l[c],p=o[h];if(typeof p!="object"||p===null)u[h]=p;else if(p instanceof Date)u[h]=new Date(p);else if(ArrayBuffer.isView(p))u[h]=yn(p);else{var d=t.indexOf(p);d!==-1?u[h]=n[d]:u[h]=a(p)}}return u}function i(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return r(o,i);if(o instanceof Map)return new Map(r(Array.from(o),i));if(o instanceof Set)return new Set(r(Array.from(o),i));var a={};t.push(o),n.push(a);for(var l in o)if(Object.hasOwnProperty.call(o,l)!==!1){var u=o[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]=yn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=i(u)}}return t.pop(),n.pop(),a}function s(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return r(o,s);if(o instanceof Map)return new Map(r(Array.from(o),s));if(o instanceof Set)return new Set(r(Array.from(o),s));var a={};t.push(o),n.push(a);for(var l in o){var u=o[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),s));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),s));else if(ArrayBuffer.isView(u))a[l]=yn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=s(u)}}return t.pop(),n.pop(),a}}var me=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":"block_definition","url":"assets/blockstate","path":"blockstates","category":"assets","schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","category":"assets","schema":"model"}]}');function ln(e){return typeof e=="object"&&e!==null}const r0=e=>("0"+e.toString(16)).substr(-2);function Qt(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,r0).join("")}function Bt(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function Ul(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new D.Path(["dimensions"]));e.set(new D.Path(["seed"]),t,!0),ln(n)&&Object.keys(n).forEach(r=>{e.set(new D.Path(["dimensions",r,"generator","seed"]),t,!0),e.set(new D.Path(["dimensions",r,"generator","biome_source","seed"]),t,!0)}),e.set(new D.Path(["placement","salt"]),Math.abs(t),!0),e.set(new D.Path(["generator","seed"]),t,!0),e.set(new D.Path(["generator","biome_source","seed"]),t)}function Gl(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function Ft(e){return`/${e}/`.replaceAll("//","/")}function i0(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),Ft(e)}function Yl(e){const t=i0(e).replace(/^\//,"").replace(/\/$/,"");return me.generators.find(n=>n.url===t)}function Wl({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?Ft(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);Yt(i,r)}function s0(e){const t=cs.load(e.substring(3,e.indexOf("---",3)));return ln(t)?t:{}}function o0(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const s=a0(e,i+2),o=e.indexOf("#[",i+1);let a="";if(o>=0&&o<s){const l=e.indexOf("]",o+2);e.substring(o+2,l)===t&&(a=e.substring(l+1,s).trim())}else{const l=e.substring(i+2,s),u=me.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(s+2),n=i}return e}function a0(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),s=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(s<0){if(n===0)return i;n-=1,t=i+2}else if(s<i)n+=1,t=s+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 ql(e){const t=Math.abs(Gl(e));return[t%256,(t>>8)%256,(t>>16)%256]}function Un(e){return e*e}function et(e,t,n){return Math.max(e,Math.min(t,n))}function Gi(e,t,n){return n<0?e:n>1?t:Gr(n,e,t)}function Gr(e,t,n){return t+e*(n-t)}function l0(e,t,n,r,i,s){return Gr(t,Gr(e,n,r),Gr(e,i,s))}function st(e){return e instanceof Error?e.message:`${e}`}const Mi=e0();function nn(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(!nn(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 s=i[r];if(!nn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}class c0{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 Yr({icon:e,label:t,large:n,larger:r,doSelect:i,value:s,placeholder:o,dataList:a,onChange:l}){const u=l===void 0?()=>{}:p=>{const d=p.target.value;l==null||l(d)},c=_e(null);X(()=>{i&&c.current&&c.current.select()},[i]);const h=a&&Qt();return f("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:p=>p.stopPropagation()},e&&se[e],t&&f("span",null,t),f("input",{ref:c,type:"text",value:s,onChange:u,placeholder:o,list:h}),a&&f("datalist",{id:h},a.map(p=>f("option",{value:p}))))}function Wn({cooldown:e,invert:t,initial:n}={}){const[r,i]=P(n),s=_e(void 0);return[r,()=>{i(!t),s.current!==void 0&&clearTimeout(s.current),s.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}function Sr({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},s){const o=_e(null),a=_e(),l=_e(),u=_e([0,0]),c=_e(!1);X(()=>{if(!o.current)return;const d=g=>{a.current=[g.offsetX,g.offsetY]},v=g=>{if(a.current===void 0){if(!o.current)return;const A=g.offsetX/o.current.clientWidth,b=g.offsetY/o.current.clientHeight;r==null||r(A,b);return}if(!n)return;const y=g.offsetX-a.current[0],w=g.offsetY-a.current[1];y===0&&w===0||(u.current=[u.current[0]+y,u.current[1]+w],c.current||(l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!o.current)return;c.current=!0;const A=u.current[0]/o.current.clientWidth,b=u.current[1]/o.current.clientHeight;u.current=[0,0],await(n==null?void 0:n(A,b)),c.current=!1}))),a.current=[g.offsetX,g.offsetY]},_=()=>{a.current=void 0},m=()=>{i==null||i()};return o.current.addEventListener("mousedown",d),o.current.addEventListener("mousemove",v),o.current.addEventListener("mouseleave",m),document.body.addEventListener("mouseup",_),()=>{var g,y,w;(g=o.current)==null||g.removeEventListener("mousedown",d),(y=o.current)==null||y.removeEventListener("mousemove",v),(w=o.current)==null||w.removeEventListener("mouseleave",m),document.body.removeEventListener("mouseup",_)}},[...s!=null?s:[],o.current]);const h=_e(),p=_e(0);return h.current=async()=>{if(!o.current)return;const d=o.current.getContext("2d"),v=e();o.current.width=v[0],o.current.height=v[1];const _=d.getImageData(0,0,v[0],v[1]),m=p.current+=1;try{await t(_)}catch(g){throw g}m===p.current&&d.putImageData(_,0,0)},{canvas:o,redraw:h.current}}function Ps(){const[e,t]=P(!1),n=()=>{t(!1)};return X(()=>(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 u0(){const[e,t]=P(window.location.hash),n=Pe(()=>{t(window.location.hash)},[]);X(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Pe(i=>{i!==e&&Wl({hash:i})},[e]);return[e,r]}function $o(e){const[t,n]=P(matchMedia(e).matches),r=i=>{n(i.matches)};return X(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function Oi(e,t,n){const r={invalidated(){e&&t(e)}};X(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const Bo=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function ar(e){const t=window.location,[n,r]=P(Bo(t.search,e));X(()=>{const s=()=>{r(Bo(t.search,e))};return window.addEventListener("popstate",s),window.addEventListener("pushstate",s),window.addEventListener("replacestate",s),()=>{window.removeEventListener("popstate",s),window.removeEventListener("pushstate",s),window.removeEventListener("replacestate",s)}},[]);const i=Pe((s,o)=>{if(s!==n){const a=new URLSearchParams(t.search);s===void 0||s.length===0?a.delete(e):a.set(e,s),Wl({search:a.toString().replaceAll("%7C","|"),replace:o})}},[n]);return[n,i]}function qe(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:s,children:o}=e,[a,l]=Ps();return f("div",K({class:`btn-menu${r===!1?" no-relative":""}`},e),f(q,{icon:t,label:n,tooltip:i,tooltipLoc:s,onClick:l}),a&&f("div",{class:"btn-group"},o))}const d0="modulepreload",Fo={},h0="/",le=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${h0}${r}`,r in Fo)return;Fo[r]=!0;const i=r.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":d0,i||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),i)return new Promise((a,l)=>{o.addEventListener("load",a),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},se={alert:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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"}),f("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"}),f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"})),history:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z"})),play:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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"}),f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("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 bn({error:e,onDismiss:t}){const[n,r]=P(!1),[i,s]=P(void 0);X(()=>{if(e instanceof Error){const a=e.stack.split(`
`).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));s(a.join(`
`)),le(()=>import("./sourcemapped-stacktrace.868c95d1.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(a.join(`
`),u=>{const c=u.map(h=>h.replace(/..\/..\/src\//,"src/")).join(`
`);s(c)})})}},[e]);const o=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 f("div",{class:"error"},t&&f("div",{class:"error-dismiss",onClick:t},se.x),f("h3",null,e instanceof Error?e.message:e,i&&f("span",{onClick:()=>r(!n)},se.info)),i&&n&&f("pre",null,i),f("p",null,"If you think this is a bug, you can report it ",f("a",{href:o,target:"_blank"},"on GitHub")))}function f0({label:e,value:t,onChange:n}){const r=Qt();return f("label",{class:"checkbox"},f("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function Ds(e,t,n){const r=i=>{const s=i.onChange&&(a=>{var u;const l=a.target.value;(u=i.onChange)==null||u.call(i,n(l))}),o=i.onEnter&&(a=>{var l;if(a.key==="Enter"){const u=a.target.value;(l=i.onEnter)==null||l.call(i,n(u))}});return f("input",ke(K({},i),{type:t,onChange:s,onKeyDown:o}))};return r.displayName=e,r}const rn=Ds("TextInput","text",e=>e),p0=Ds("NumberInput","number",e=>Number(e)),zo=Ds("RangeInput","range",e=>Number(e));function jo({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,s]=P(""),o=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 f(te,null,f(Yr,{icon:"search",large:!0,value:i,onChange:s,doSelect:1,placeholder:n!=null?n:"Search"}),f("div",{class:"result-list"},o.map(a=>f(q,{key:a,label:a,onClick:()=>t==null?void 0:t(a)})),o.length===0&&f(q,{label:r!=null?r:"No results"})))}const $s="https://raw.githubusercontent.com/misode/technical-changes/main";let Yi=null;async function Zl(){if(!Yi){const e=await(await fetch(`${$s}/index.json`)).json();Yi=(await Promise.all(e.map((t,n)=>m0(Xl(t),n)))).flat().map(t=>ke(K({},t),{tags:[t.group.id,...t.tags]}))}return Yi}async function m0(e,t){const n=await(await fetch(`${$s}/${e.id}/index.json`)).json();return(await Promise.all(n.map((r,i)=>g0(e,Xl(r),t,i)))).flat()}async function g0(e,t,n,r){const i=await(await fetch(`${$s}/${e.id}/${t.id}.md`)).text();return _0(i).map(s=>K({version:t,group:e,order:n*1e3+r},s))}function _0(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 Xl(e){return typeof e=="string"?{id:e,article:e.match(/\d\dw\d\d[a-z]/)?"minecraft-snapshot-"+e:e.match(/\d+\.\d+(\.\d+)?-pre[0-9]+/)?"minecraft-"+e.replaceAll(".","-").replaceAll("pre","pre-release-"):null}:ln(e)?e:{id:"unknown",article:null}}["1.15","1.16","1.17"].forEach(e=>localStorage.removeItem(`cache_${e}`));["mcdata_master","vanilla_datapack_summary"].forEach(e=>localStorage.removeItem(`cached_${e}`));caches.delete("misode-v1");const xn="misode-v2",Vo="cached_latest_version",Wi="22w18a",qn="https://raw.githubusercontent.com/misode/mcmeta";function qt(e,t){return`${qn}/${e.dynamic?t:`${e.ref}-${t}`}`}async function Ti(e){e.dynamic&&(localStorage.getItem(Vo)!==Wi&&(await S0(t=>t.startsWith(`${qn}/summary/`)||t.startsWith(`${qn}/data/`)||t.startsWith(`${qn}/assets/`)||t.startsWith(`${qn}/registries/`)),localStorage.setItem(Vo,Wi)),e.ref=Wi)}async function v0(e,t,n){const r=me.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(me.versions)}`);return}await Ti(r),await Promise.all([w0(r,t),y0(r,n)])}async function w0(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await Tn(`${qt(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:",st(n))}}async function y0(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await Tn(`${qt(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:",st(n))}}async function Jl(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=me.versions.find(i=>i.id===e);try{const i=["blockstates","models"].includes(t)?"assets":"data",s=`${qt(r,i)}/${i}/minecraft/${t}/${n}.json`;return await(await fetch(s)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${st(i)}`)}}async function b0(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=me.versions.find(r=>r.id===e);await Ti(n);try{const r=await Tn(`${qt(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await Tn(`${qt(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${st(r)}`)}}async function x0(e){const t=me.versions.find(n=>n.id===e);await Ti(t);try{const n=`${qt(t,"summary")}/sounds/data.min.json`;return await Tn(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${st(n)}`)}}function A0(e,t){const n=me.versions.find(r=>r.id===e);return`${qt(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function k0(){const e=me.versions[me.versions.length-1];await Ti(e);try{return Tn(`${qt(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${st(t)}`)}}async function Tn(e,t=n=>n){try{const n=await caches.open(xn);console.debug(`[getData] Opened cache ${xn} ${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),s=t(await i.json());return await n.put(e,new Response(JSON.stringify(s))),s}catch(n){console.warn(`[getData] Failed to open cache ${xn}: ${st(n)}`),console.debug(`[getData] fetching data ${e}`);const r=await fetch(e);return t(await r.json())}}async function S0(e){try{const t=await caches.open(xn);console.debug(`[deleteMatching] Opened cache ${xn}`);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 ${xn}: ${st(t)}`)}}const Kl=["1.15","1.16","1.17","1.18","1.18.2","1.19"],fn={},pn={},E0={1.15:()=>le(()=>import("./index.0ad2e404.js").then(function(e){return e.i}),[]),1.16:()=>le(()=>import("./index.f88a112a.js").then(function(e){return e.i}),[]),1.17:()=>le(()=>import("./index.5bce9dd1.js").then(function(e){return e.i}),[]),1.18:()=>le(()=>import("./index.72ba052d.js").then(function(e){return e.i}),[]),"1.18.2":()=>le(()=>import("./index.85f391e9.js").then(function(e){return e.i}),[]),1.19:()=>le(()=>import("./index.0852bf3c.js").then(function(e){return e.i}),[])};let Ql,ec,Wr;async function Bs(e){return fn[e]||(fn[e]=(async()=>{try{const t=await E0[e](),n=t.getCollections(),r={};await v0(e,n,r);const i=t.getSchemas(n);return fn[e]={collections:n,schemas:i,blockStates:r},fn[e]}catch(t){throw new Error(`Cannot get version "${e}": ${st(t)}`)}})()),fn[e]}async function I0(e,t){var n;if(!pn[t]||pn[t].version!==e){const r=await Bs(e);Ql=D.Reference(r.schemas,"configured_decorator"),ec=D.ChoiceNode([{type:"string",node:D.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:D.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const i=(n=me.generators.find(s=>s.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const s=r.schemas.get(i),o=new D.DataModel(s,{wrapLists:!0});pn[t]?o.reset(pn[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),pn[t]={model:o,version:e}}catch(s){const o=new Error(`Cannot get generator "${t}" for version "${e}": ${st(s)}`);throw s instanceof Error&&(o.stack=s.stack),o}}return pn[t].model}async function C0(e){const t=await Bs(e);return Wr=t.collections,t.collections}async function M0(e){return(await Bs(e)).blockStates}function Ze(e,t,n){const r=me.versions.findIndex(o=>o.id===e),i=t?me.versions.findIndex(o=>o.id===t):0,s=n?me.versions.findIndex(o=>o.id===n):me.versions.length-1;return i<=r&&r<=s}var tc={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function o(l,u){if(!s[l]){s[l]={};for(var c=0;c<l.length;c++)s[l][l.charAt(c)]=c}return s[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 o(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),h=0,p=u.length;h<p;h++){var d=u.charCodeAt(h);c[h*2]=d>>>8,c[h*2+1]=d%256}return c},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var u=new Array(l.length/2),c=0,h=u.length;c<h;c++)u[c]=l[c*2]*256+l[c*2+1];var p=[];return u.forEach(function(d){p.push(n(d))}),a.decompress(p.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 o(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 h,p,d={},v={},_="",m="",g="",y=2,w=3,A=2,b=[],k=0,S=0,I;for(I=0;I<l.length;I+=1)if(_=l.charAt(I),Object.prototype.hasOwnProperty.call(d,_)||(d[_]=w++,v[_]=!0),m=g+_,Object.prototype.hasOwnProperty.call(d,m))g=m;else{if(Object.prototype.hasOwnProperty.call(v,g)){if(g.charCodeAt(0)<256){for(h=0;h<A;h++)k=k<<1,S==u-1?(S=0,b.push(c(k)),k=0):S++;for(p=g.charCodeAt(0),h=0;h<8;h++)k=k<<1|p&1,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=p>>1}else{for(p=1,h=0;h<A;h++)k=k<<1|p,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=0;for(p=g.charCodeAt(0),h=0;h<16;h++)k=k<<1|p&1,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=p>>1}y--,y==0&&(y=Math.pow(2,A),A++),delete v[g]}else for(p=d[g],h=0;h<A;h++)k=k<<1|p&1,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=p>>1;y--,y==0&&(y=Math.pow(2,A),A++),d[m]=w++,g=String(_)}if(g!==""){if(Object.prototype.hasOwnProperty.call(v,g)){if(g.charCodeAt(0)<256){for(h=0;h<A;h++)k=k<<1,S==u-1?(S=0,b.push(c(k)),k=0):S++;for(p=g.charCodeAt(0),h=0;h<8;h++)k=k<<1|p&1,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=p>>1}else{for(p=1,h=0;h<A;h++)k=k<<1|p,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=0;for(p=g.charCodeAt(0),h=0;h<16;h++)k=k<<1|p&1,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=p>>1}y--,y==0&&(y=Math.pow(2,A),A++),delete v[g]}else for(p=d[g],h=0;h<A;h++)k=k<<1|p&1,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=p>>1;y--,y==0&&(y=Math.pow(2,A),A++)}for(p=2,h=0;h<A;h++)k=k<<1|p&1,S==u-1?(S=0,b.push(c(k)),k=0):S++,p=p>>1;for(;;)if(k=k<<1,S==u-1){b.push(c(k));break}else S++;return b.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 h=[],p=4,d=4,v=3,_="",m=[],g,y,w,A,b,k,S,I={val:c(0),position:u,index:1};for(g=0;g<3;g+=1)h[g]=g;for(w=0,b=Math.pow(2,2),k=1;k!=b;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),w|=(A>0?1:0)*k,k<<=1;switch(w){case 0:for(w=0,b=Math.pow(2,8),k=1;k!=b;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),w|=(A>0?1:0)*k,k<<=1;S=n(w);break;case 1:for(w=0,b=Math.pow(2,16),k=1;k!=b;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),w|=(A>0?1:0)*k,k<<=1;S=n(w);break;case 2:return""}for(h[3]=S,y=S,m.push(S);;){if(I.index>l)return"";for(w=0,b=Math.pow(2,v),k=1;k!=b;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),w|=(A>0?1:0)*k,k<<=1;switch(S=w){case 0:for(w=0,b=Math.pow(2,8),k=1;k!=b;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),w|=(A>0?1:0)*k,k<<=1;h[d++]=n(w),S=d-1,p--;break;case 1:for(w=0,b=Math.pow(2,16),k=1;k!=b;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),w|=(A>0?1:0)*k,k<<=1;h[d++]=n(w),S=d-1,p--;break;case 2:return m.join("")}if(p==0&&(p=Math.pow(2,v),v++),h[S])_=h[S];else if(S===d)_=y+y.charAt(0);else return null;m.push(_),h[d++]=y+_.charAt(0),p--,y=_,p==0&&(p=Math.pow(2,v),v++)}}};return a}();e!=null&&(e.exports=t)})(tc);var nc=tc.exports;const O0="https://z15g7can.directus.app/items",us="share",Ho=new Map;async function T0(e,t,n,r){try{const i=nc.compressToBase64(JSON.stringify(n)),s=btoa(JSON.stringify(n));console.log("Compression rate",s.length/i.length);const o=JSON.stringify({data:i,type:e,version:t,show_preview:r});let a=Ho.get(o);if(!a){const u=await rc("/snippets",o);Ho.set(o,u.id),a=u.id}const l=me.generators.find(u=>u.id===e);return`${location.protocol}//${location.host}/${l.url}/?${us}=${a}`}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function Uo(e){var t;try{const n=await rc(`/snippets/${e}`);return ke(K({},n),{data:JSON.parse((t=nc.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function rc(e,t){var i,s,o;const r=await(await fetch(O0+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((o=(s=(i=r.errors)==null?void 0:i[0])==null?void 0:s.message)!=null?o:"Unknown error")}var ic=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","dimension_type":"Dimension Type","dimension":"Dimension","disabled":"Disabled","download":"Download","duplicate":"Duplicate","enabled":"Enabled","entries_hidden":"%0% entries hidden","entries_hidden.more":"Show %0% more","entries_hidden.all":"Show all","expand":"Expand","expand_all":"Hold %0% to expand all","feature.decorated.decorators":"Decorators","feature.decorated.decorators.entry":"Decorator","follow_reference":"Follow reference","format.json":"JSON","format.yaml":"YAML","fields":"Fields","generate_new_seed":"Generate new seed","github":"GitHub","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","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.project":"%0% Project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","presets":"Presets","preview":"Visualize","preview.auto_scroll":"Auto scroll","preview.biome":"Biome","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.width":"Width","project.delete_file":"Delete file","project.go_to":"Go to project","project.new_file":"New file","project.no_files":"No files","project.search":"Search project","project.search_drafts":"Search drafts","project.unsaved_file":"Unsaved file","remove":"Remove","search":"Search","show_output":"Show output","show_preview":"Show preview","sounds.play":"Play","sounds.play_sound":"Play sound","sounds.play_all":"Play all","sounds.search":"Search sounds","sounds.download_function":"Download Mcfunction","sounds.delay":"Delay","sounds.pitch":"Pitch","sounds.volume":"Volume","sounds.copy_command":"Copy command","sounds.add_sound":"Add sound","sounds.remove_sound":"Remove sound","sounds.unknown_sound":"Unknown sound","sounds.loading_sound":"Loading sound","source_placeholder":"Paste raw %0% content here","switch_generator":"Switch generator","switch_version":"Switch version","terrain_settings":"Terrain settings","text_component":"Text Component","undo":"Undo","versions.search":"Search versions","versions.no_results":"No results","versions.all":"All versions","versions.previous":"Previous","versions.next":"Next","versions.released":"Released","versions.release_target":"Release target","versions.data_version":"Data version","versions.protocol_version":"Protocol version","versions.pack_format":"Pack format","versions.data_pack_format":"Data pack format","versions.resource_pack_format":"Resource pack format","versions.technical_changes":"Technical changes","versions.discussion":"Discussion","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/density_function":"Density Function","worldgen/placed_feature":"Placed Feature","worldgen/noise":"Noise","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/structure":"Structure","worldgen/structure_set":"Structure Set","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","worldgen/world_preset":"World Preset","worldgen/flat_level_generator_preset":"Flat World Preset","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),N0=Object.freeze(Object.defineProperty({__proto__:null,default:ic},Symbol.toStringTag,{value:"Module"})),Re;(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&&Kl.includes(w)?w:"1.18.2"}e.getVersion=r;function i(){var w;return(w=localStorage.getItem(e.ID_INDENT))!=null?w:"2_spaces"}e.getIndent=i;function s(){var w;return(w=localStorage.getItem(e.ID_FORMAT))!=null?w:"json"}e.getFormat=s;function o(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=o;function a(){var w;return(w=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?w:"latest"}e.getSoundsVersion=a;function l(){const w=localStorage.getItem(e.ID_PROJECTS);return w?JSON.parse(w):[ai]}e.getProjects=l;function u(w){var b;return JSON.parse((b=localStorage.getItem(e.ID_BACKUPS))!=null?b:"{}")[w]}e.getBackup=u;function c(w){w&&localStorage.setItem(e.ID_LANGUAGE,w)}e.setLanguage=c;function h(w){w&&localStorage.setItem(e.ID_THEME,w)}e.setTheme=h;function p(w){w&&localStorage.setItem(e.ID_VERSION,w)}e.setVersion=p;function d(w){w&&localStorage.setItem(e.ID_INDENT,w)}e.setIndent=d;function v(w){w&&localStorage.setItem(e.ID_FORMAT,w)}e.setFormat=v;function _(w){w!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,w.toString())}e.setHighlighting=_;function m(w){w&&localStorage.setItem(e.ID_SOUNDS_VERSION,w)}e.setSoundsVersion=m;function g(w){w&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(w))}e.setProjects=g;function y(w,A){var k;const b=JSON.parse((k=localStorage.getItem(e.ID_BACKUPS))!=null?k:"{}");A===void 0?delete b[w]:b[w]=A,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(b))}e.setBackup=y})(Re||(Re={}));function L0(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return le(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return le(()=>import("./de.8e2383d8.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return le(()=>import("./en.4ab98cb7.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return le(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return le(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return le(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return le(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return le(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return le(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return le(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return le(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return le(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return le(()=>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 R0(e){switch(e){case"../../locales/de.json":return le(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return le(()=>Promise.resolve().then(function(){return N0}),void 0);case"../../locales/es.json":return le(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return le(()=>import("./fr.f5531eea.js"),[]);case"../../locales/it.json":return le(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return le(()=>import("./ja.167de97b.js"),[]);case"../../locales/pl.json":return le(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return le(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return le(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return le(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return le(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return le(()=>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 sc=Pn({lang:"none",locale:e=>e,changeLanguage:()=>{}}),er={fallback:ic};function de(e,t,...n){var i,s,o,a,l;const r=(l=(a=(o=(i=er[e])==null?void 0:i[t])!=null?o:(s=er.en)==null?void 0:s[t])!=null?a:er.fallback[t])!=null?l:t;return P0(r,n)}function P0(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(er[e])return;const t=me.languages.find(i=>i.code===e);if(!t)return;const n=await R0(`../../locales/${e}.json`),r=t.schemas!==!1&&await L0(`../../../node_modules/@mcschema/locales/src/${e}.json`);er[e]=K(K({},n.default),r.default)}function Se(){return $n(sc)}function D0({children:e}){const[t,n]=P("none"),r=Pe((o,...a)=>de(t,o,...a),[t]),i=Pe(async o=>{await qi(o),Ce.setLanguage(o),Re.setLanguage(o),n(o)},[]);X(()=>{(async()=>{const o=Re.getLanguage();await Promise.all([qi("en"),...o!=="en"?[qi(o)]:[]]),n(o)})()},[]);const s={lang:t,locale:r,changeLanguage:i};return f(sc.Provider,{value:s},e)}const ai={name:"Drafts",namespace:"draft",files:[]},oc=Pn({project:ai,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function ac(){return $n(oc)}function $0({children:e}){const[t,n]=P(Re.getProjects()),[r,i]=P(ai.name),s=xe(()=>{var _;return(_=t.find(m=>m.name===r))!=null?_:ai},[t,r]),[o,a]=P(void 0),l=xe(()=>{if(!!o)return s.files.find(_=>_.type===o[0]&&_.id===o[1])},[s,o]),u=Pe(_=>{Re.setProjects(_),n(_)},[]),c=Pe(_=>{u(t.map(m=>m.name===r?K(K({},m),_):m))},[t,r]),h=Pe((_,m,g)=>{var y;if(!g.id)c({files:s.files.filter(w=>w.type!==_||w.id!==m)});else{const w=g.id.includes(":")?g.id:`${s.namespace}:${g.id}`,A=s.files.some(b=>b.type===_&&b.id===w);if(m){if((l==null?void 0:l.id)===m&&m!==w&&A)return!1;c({files:s.files.map(b=>b.type===_&&b.id===m?ke(K(K({},b),g),{id:w}):b)}),(l==null?void 0:l.id)===m&&a([_,w])}else{if(A)return!1;c({files:[...s.files,{type:_,id:w,data:(y=g.data)!=null?y:{}}]}),a([_,w])}}return!0},[c,s,l]),p=Pe((_,m)=>{const g=me.generators.find(y=>y.id===_||y.path===_);if(!g)throw new Error(`Cannot find generator of type ${_}`);a([g.id,m]),Yt(Ft(g.url))},[]),d=Pe(()=>{a(void 0)},[]),v={project:s,file:l,changeProject:i,updateProject:c,updateFile:h,openFile:p,closeFile:d};return f(oc.Provider,{value:v},e)}function B0(e){var i;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id],r=me.generators.find(s=>s.id===e.type);if(!r)throw new Error(`Cannot find generator of type ${e.type}`);return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}`}const lc=Pn({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function cc(){return $n(lc)}function F0({children:e}){const[t,n]=P(Re.getTheme()),r=$o("(prefers-color-scheme: light)"),i=$o("(prefers-color-scheme: dark)");X(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=Pe(a=>{Ce.setTheme(a),Re.setTheme(a),n(a)},[]);X(()=>{Ce.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]);const o={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:s};return f(lc.Provider,{value:o},e)}const z0=3,uc=Pn({title:"",changeTitle:()=>{}});function pt(e,t){const n=$n(uc);return X(()=>{e&&n.changeTitle(e,t)},[e,t]),n}function j0({children:e}){const{locale:t}=Se(),[n,r]=P(t("title.home")),i=Pe((o,a)=>{a!=null||(a=me.versions.map(u=>u.id));const l=a.slice(-z0);document.title=`${o} Minecraft ${l.join(", ")}`,r(o)},[]),s={title:n,changeTitle:i};return f(uc.Provider,{value:s},e)}const V0="version",dc=Pn({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function zn(){return $n(dc)}function H0({children:e}){const[t,n]=P(Re.getVersion()),[r,i]=ar(V0);X(()=>{Kl.includes(r)&&t!==r&&n(r)},[t,r]);const s=Pe((a,l=!0,u=!1)=>{(u||r)&&i(a,!0),l&&(Ce.setVersion(a),Re.setVersion(a)),n(a)},[r]),o={version:t,changeVersion:s,changeTargetVersion:i};return f(dc.Provider,{value:o},e)}let re,hc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});hc.decode();let Rr=null;function U0(){return(Rr===null||Rr.buffer!==re.memory.buffer)&&(Rr=new Uint8Array(re.memory.buffer)),Rr}function G0(e,t){return hc.decode(U0().subarray(e,e+t))}const ds=new Uint32Array(2),Y0=new BigInt64Array(ds.buffer);let Pr=null;function lr(){return(Pr===null||Pr.buffer!==re.memory.buffer)&&(Pr=new Int32Array(re.memory.buffer)),Pr}let Dr=null;function fc(){return(Dr===null||Dr.buffer!==re.memory.buffer)&&(Dr=new Float64Array(re.memory.buffer)),Dr}function W0(e,t){return fc().subarray(e/8,e/8+t)}let Ee=0;function Oe(e,t){const n=t(e.length*8);return fc().set(e,n/8),Ee=e.length,n}let $r=null;function q0(){return($r===null||$r.buffer!==re.memory.buffer)&&($r=new Uint32Array(re.memory.buffer)),$r}function Z0(e,t){const n=t(e.length*4);return q0().set(e,n/4),Ee=e.length,n}function X0(e,t,n,r,i,s,o,a,l,u,c,h,p,d){var v=Oe(e,re.__wbindgen_malloc),_=Ee,m=Oe(t,re.__wbindgen_malloc),g=Ee,y=Oe(n,re.__wbindgen_malloc),w=Ee,A=Oe(r,re.__wbindgen_malloc),b=Ee,k=Oe(i,re.__wbindgen_malloc),S=Ee,I=Oe(s,re.__wbindgen_malloc),C=Ee,M=Oe(o,re.__wbindgen_malloc),N=Ee,F=Oe(a,re.__wbindgen_malloc),ne=Ee,oe=Oe(l,re.__wbindgen_malloc),he=Ee,O=Oe(u,re.__wbindgen_malloc),$=Ee,G=Oe(c,re.__wbindgen_malloc),T=Ee,x=Oe(h,re.__wbindgen_malloc),E=Ee,L=Oe(p,re.__wbindgen_malloc),j=Ee,W=Z0(d,re.__wbindgen_malloc),ce=Ee,je=re.biome_parameters(v,_,m,g,y,w,A,b,k,S,I,C,M,N,F,ne,oe,he,O,$,G,T,x,E,L,j,W,ce);return Ni.__wrap(je)}function J0(e,t,n,r,i,s,o,a,l,u,c,h,p){Y0[0]=e;const d=ds[0],v=ds[1];var _=Oe(n,re.__wbindgen_malloc),m=Ee,g=Oe(i,re.__wbindgen_malloc),y=Ee,w=Oe(o,re.__wbindgen_malloc),A=Ee,b=Oe(l,re.__wbindgen_malloc),k=Ee,S=Oe(c,re.__wbindgen_malloc),I=Ee,C=Oe(p,re.__wbindgen_malloc),M=Ee,N=re.climate_sampler(d,v,t,_,m,r,g,y,s,w,A,a,b,k,u,S,I,h,C,M);return Er.__wrap(N)}function hs(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function K0(e,t){return lr().subarray(e/4,e/4+t)}function Go(e,t,n,r,i,s,o,a,l,u,c){try{const v=re.__wbindgen_add_to_stack_pointer(-16);hs(e,Ni),hs(t,Er),re.multi_noise(v,e.ptr,t.ptr,n,r,i,s,o,a,l,u,c);var h=lr()[v/4+0],p=lr()[v/4+1],d=K0(h,p).slice();return re.__wbindgen_free(h,p*4),d}finally{re.__wbindgen_add_to_stack_pointer(16)}}function Yo(e,t,n,r,i,s,o,a,l,u){try{const d=re.__wbindgen_add_to_stack_pointer(-16);hs(e,Er),re.climate_noise(d,e.ptr,t,n,r,i,s,o,a,l,u);var c=lr()[d/4+0],h=lr()[d/4+1],p=W0(c,h).slice();return re.__wbindgen_free(c,h*8),p}finally{re.__wbindgen_add_to_stack_pointer(16)}}class Ni{static __wrap(t){const n=Object.create(Ni.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();re.__wbg_parameterlist_free(t)}}class Er{static __wrap(t){const n=Object.create(Er.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();re.__wbg_sampler_free(t)}}async function Q0(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 pc(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,s){throw new Error(G0(i,s))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await Q0(await e,t);return re=n.exports,pc.__wbindgen_wasm_module=r,re}var Wo="/assets/deepslate_rs_bg.4990c219.wasm",mc={exports:{}},gc={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,s=0;i<n.length;i++,s+=8)r[s>>>5]|=n[i]<<24-s%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 s=n[i]<<16|n[i+1]<<8|n[i+2],o=0;o<4;o++)i*8+o*6<=n.length*8?r.push(e.charAt(s>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,s=0;i<n.length;s=++i%4)s!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(n.charAt(i))>>>6-s*2);return r}};gc.exports=t})();var fs={utf8:{stringToBytes:function(e){return fs.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(fs.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("")}}},qo=fs;/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var ep=function(e){return e!=null&&(_c(e)||tp(e)||!!e._isBuffer)};function _c(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function tp(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&_c(e.slice(0,0))}(function(){var e=gc.exports,t=qo.utf8,n=ep,r=qo.bin,i=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=r.stringToBytes(s):s=t.stringToBytes(s):n(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),l=s.length*8,u=1732584193,c=-271733879,h=-1732584194,p=271733878,d=0;d<a.length;d++)a[d]=(a[d]<<8|a[d]>>>24)&16711935|(a[d]<<24|a[d]>>>8)&4278255360;a[l>>>5]|=128<<l%32,a[(l+64>>>9<<4)+14]=l;for(var v=i._ff,_=i._gg,m=i._hh,g=i._ii,d=0;d<a.length;d+=16){var y=u,w=c,A=h,b=p;u=v(u,c,h,p,a[d+0],7,-680876936),p=v(p,u,c,h,a[d+1],12,-389564586),h=v(h,p,u,c,a[d+2],17,606105819),c=v(c,h,p,u,a[d+3],22,-1044525330),u=v(u,c,h,p,a[d+4],7,-176418897),p=v(p,u,c,h,a[d+5],12,1200080426),h=v(h,p,u,c,a[d+6],17,-1473231341),c=v(c,h,p,u,a[d+7],22,-45705983),u=v(u,c,h,p,a[d+8],7,1770035416),p=v(p,u,c,h,a[d+9],12,-1958414417),h=v(h,p,u,c,a[d+10],17,-42063),c=v(c,h,p,u,a[d+11],22,-1990404162),u=v(u,c,h,p,a[d+12],7,1804603682),p=v(p,u,c,h,a[d+13],12,-40341101),h=v(h,p,u,c,a[d+14],17,-1502002290),c=v(c,h,p,u,a[d+15],22,1236535329),u=_(u,c,h,p,a[d+1],5,-165796510),p=_(p,u,c,h,a[d+6],9,-1069501632),h=_(h,p,u,c,a[d+11],14,643717713),c=_(c,h,p,u,a[d+0],20,-373897302),u=_(u,c,h,p,a[d+5],5,-701558691),p=_(p,u,c,h,a[d+10],9,38016083),h=_(h,p,u,c,a[d+15],14,-660478335),c=_(c,h,p,u,a[d+4],20,-405537848),u=_(u,c,h,p,a[d+9],5,568446438),p=_(p,u,c,h,a[d+14],9,-1019803690),h=_(h,p,u,c,a[d+3],14,-187363961),c=_(c,h,p,u,a[d+8],20,1163531501),u=_(u,c,h,p,a[d+13],5,-1444681467),p=_(p,u,c,h,a[d+2],9,-51403784),h=_(h,p,u,c,a[d+7],14,1735328473),c=_(c,h,p,u,a[d+12],20,-1926607734),u=m(u,c,h,p,a[d+5],4,-378558),p=m(p,u,c,h,a[d+8],11,-2022574463),h=m(h,p,u,c,a[d+11],16,1839030562),c=m(c,h,p,u,a[d+14],23,-35309556),u=m(u,c,h,p,a[d+1],4,-1530992060),p=m(p,u,c,h,a[d+4],11,1272893353),h=m(h,p,u,c,a[d+7],16,-155497632),c=m(c,h,p,u,a[d+10],23,-1094730640),u=m(u,c,h,p,a[d+13],4,681279174),p=m(p,u,c,h,a[d+0],11,-358537222),h=m(h,p,u,c,a[d+3],16,-722521979),c=m(c,h,p,u,a[d+6],23,76029189),u=m(u,c,h,p,a[d+9],4,-640364487),p=m(p,u,c,h,a[d+12],11,-421815835),h=m(h,p,u,c,a[d+15],16,530742520),c=m(c,h,p,u,a[d+2],23,-995338651),u=g(u,c,h,p,a[d+0],6,-198630844),p=g(p,u,c,h,a[d+7],10,1126891415),h=g(h,p,u,c,a[d+14],15,-1416354905),c=g(c,h,p,u,a[d+5],21,-57434055),u=g(u,c,h,p,a[d+12],6,1700485571),p=g(p,u,c,h,a[d+3],10,-1894986606),h=g(h,p,u,c,a[d+10],15,-1051523),c=g(c,h,p,u,a[d+1],21,-2054922799),u=g(u,c,h,p,a[d+8],6,1873313359),p=g(p,u,c,h,a[d+15],10,-30611744),h=g(h,p,u,c,a[d+6],15,-1560198380),c=g(c,h,p,u,a[d+13],21,1309151649),u=g(u,c,h,p,a[d+4],6,-145523070),p=g(p,u,c,h,a[d+11],10,-1120210379),h=g(h,p,u,c,a[d+2],15,718787259),c=g(c,h,p,u,a[d+9],21,-343485551),u=u+y>>>0,c=c+w>>>0,h=h+A>>>0,p=p+b>>>0}return e.endian([u,c,h,p])};i._ff=function(s,o,a,l,u,c,h){var p=s+(o&a|~o&l)+(u>>>0)+h;return(p<<c|p>>>32-c)+o},i._gg=function(s,o,a,l,u,c,h){var p=s+(o&l|a&~l)+(u>>>0)+h;return(p<<c|p>>>32-c)+o},i._hh=function(s,o,a,l,u,c,h){var p=s+(o^a^l)+(u>>>0)+h;return(p<<c|p>>>32-c)+o},i._ii=function(s,o,a,l,u,c,h){var p=s+(a^(o|~l))+(u>>>0)+h;return(p<<c|p>>>32-c)+o},i._blocksize=16,i._digestsize=16,mc.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(i(s,o));return o&&o.asBytes?a:o&&o.asString?r.bytesToString(a):e.bytesToHex(a)}})();var vc=mc.exports,R;(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 s(c){return typeof c=="object"&&c!==null?c:void 0}e.readObject=s;function o(c,h){if(!!Array.isArray(c))return c.map(p=>h(p))}e.readArray=o;function a(c,h){var d;const p=(d=s(c))!=null?d:{};return Object.fromEntries(Object.entries(p).map(([v,_])=>[v,h(_)]))}e.readMap=a;function l(c,h,p){const d=h(c);return d?p(d):void 0}e.compose=l;function u(c,h){return typeof c!="string"?h[0]:h.includes(c)?c:h[0]}e.readEnum=u})(R||(R={}));function tr(e){let t=null;return()=>(t==null&&(t=e()),t)}function Ir(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}function Ct(e){return e*e}function cr(e,t,n){return Math.max(t,Math.min(n,e))}function Dt(e,t,n){return t+e*(n-t)}function li(e,t,n,r,i,s){return Dt(t,Dt(e,n,r),Dt(e,i,s))}function wc(e,t,n,r,i,s,o,a,l,u,c){return Dt(n,li(e,t,r,i,s,o),li(e,t,a,l,u,c))}function nr(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function ps(e,t,n,r,i,s){return nr(t,()=>nr(e,n,r),()=>nr(e,i,s))}function yc(e,t,n,r,i,s,o,a,l,u,c){return nr(n,()=>ps(e,t,r,i,s,o),()=>ps(e,t,a,l,u,c))}function Li(e,t,n){return n<0?e:n>1?t:Dt(n,e,t)}function Fs(e,t,n){return(e-t)/(n-t)}function qr(e){return e*e*e*(e*(e*6-15)+10)}function ur(e,t,n,r,i){return Dt(Fs(e,t,n),r,i)}function Ri(e,t,n,r,i){return Li(r,i,Fs(e,t,n))}function bc(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),s=e+i;if(n(s)){r=i;continue}e=s+1,r-=i+1}return e}function zs(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 ci(e,t,n,r,i,s,o,a){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(s)<<BigInt(16)|BigInt(o)<<BigInt(8)|BigInt(a)}function np(e){return(e&e-1)===0}function rp(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 ui;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(ui||(ui={}));var di;(function(e){function t(i,s){var u,c,h,p;if(typeof i=="number")return new n(i);const o=(u=R.readObject(i))!=null?u:{},a=new r(s(o.coordinate)),l=(c=R.readArray(o.points,d=>{var v;return(v=R.readObject(d))!=null?v:{}}))!=null?c:[];if(l.length===0)return new n(0);for(const d of l){const v=(h=R.readNumber(d.location))!=null?h:0,_=t(d.value,s),m=(p=R.readNumber(d.derivative))!=null?p:0;a.addPoint(v,_,m)}return a}e.fromJson=t;class n{constructor(s){this.value=s}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(s,o=[],a=[],l=[]){this.coordinate=s,this.locations=o,this.values=a,this.derivatives=l,this.calculatedMin=Number.NEGATIVE_INFINITY,this.calculatedMax=Number.POSITIVE_INFINITY}compute(s){const o=this.coordinate.compute(s),a=bc(0,this.locations.length,w=>o<this.locations[w])-1,l=this.locations.length-1;if(a<0)return this.values[0].compute(s)+this.derivatives[0]*(o-this.locations[0]);if(a===l)return this.values[l].compute(s)+this.derivatives[l]*(o-this.locations[l]);const u=this.locations[a],c=this.locations[a+1],h=this.derivatives[a],p=this.derivatives[a+1],d=(o-u)/(c-u),v=this.values[a].compute(s),_=this.values[a+1].compute(s),m=h*(c-u)-(_-v),g=-p*(c-u)+(_-v);return Dt(d,v,_)+d*(1-d)*Dt(d,m,g)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(s){return new r(s(this.coordinate),this.locations,this.values.map(o=>o.mapAll(s)),this.derivatives)}addPoint(s,o,a=0){return this.locations.push(s),this.values.push(typeof o=="number"?new e.Constant(o):o),this.derivatives.push(a),this}calculateMinMax(){if(!ui.is(this.coordinate))return;const s=this.locations.length-1;var o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),u=this.coordinate.maxValue();for(const h of this.values)h.calculateMinMax();if(l<this.locations[0]){const h=r.linearExtend(l,this.locations,this.values[0].min(),this.derivatives,0),p=r.linearExtend(l,this.locations,this.values[0].max(),this.derivatives,0);o=Math.min(o,Math.min(h,p)),a=Math.max(a,Math.max(h,p))}if(u>this.locations[s]){const h=r.linearExtend(u,this.locations,this.values[s].min(),this.derivatives,s),p=r.linearExtend(u,this.locations,this.values[s].max(),this.derivatives,s);o=Math.min(o,Math.min(h,p)),a=Math.max(a,Math.max(h,p))}for(const h of this.values)o=Math.min(o,h.min()),a=Math.max(a,h.max());for(var c=0;c<s;++c){const h=this.locations[c],d=this.locations[c+1]-h,v=this.values[c],_=this.values[c+1],m=v.min(),g=v.max(),y=_.min(),w=_.max(),A=this.derivatives[c],b=this.derivatives[c+1];if(A!==0||b!==0){const k=A*d,S=b*d,I=Math.min(m,y),C=Math.max(g,w),M=k-w+m,N=k-y+g,F=-S+y-g,ne=-S+w-m,oe=Math.min(M,F),he=Math.max(N,ne);o=Math.min(o,I+.25*oe),a=Math.max(a,C+.25*he)}}this.calculatedMin=o,this.calculatedMax=a}static linearExtend(s,o,a,l,u){const c=l[u];return c==0?a:a+c*(s-o[u])}}e.MultiPoint=r})(di||(di={}));const wt=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new wt(this.nextLong())}forkPositional(){return new xc(this.nextLong())}setSeed(e){this.seed=e^wt.MULTIPLIER&wt.MODULUS_MASK}advance(){this.seed=this.seed*wt.MULTIPLIER+wt.INCREMENT&wt.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(wt.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)*wt.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*wt.DOUBLE_MULTIPLIER}};let Xe=wt;Xe.MODULUS_BITS=48;Xe.MODULUS_MASK=BigInt("281474976710655");Xe.MULTIPLIER=BigInt("25214903917");Xe.INCREMENT=BigInt("11");Xe.FLOAT_MULTIPLIER=1/Math.pow(2,24);Xe.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class xc{constructor(t){this.seed=t}at(t,n,r){const i=zs(t,n,r);return new Xe(i^this.seed)}fromHashOf(t){const n=vc(t,{asBytes:!0}),r=ci(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new Xe(r^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const Q=class{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new Q(Q.upgradeSeedTo128bit(e))}static mixStafford13(e){return e=(e^e>>Q.BIGINT_30)*Q.STAFFORD_1&Q.MAX_ULONG,e=(e^e>>Q.BIGINT_27)*Q.STAFFORD_2&Q.MAX_ULONG,(e^e>>Q.BIGINT_31)&Q.MAX_ULONG}static upgradeSeedTo128bit(e){e<0&&(e+=Q.POW2_60);const t=e^Q.SILVER_RATIO_64,n=t+Q.GOLDEN_RATIO_64&Q.MAX_ULONG;return[Q.mixStafford13(t),Q.mixStafford13(n)]}static rotateLeft(e,t){return e<<t&Q.MAX_ULONG|e>>Q.BIGINT_64-t}setSeed(e){this.seed=Q.upgradeSeedTo128bit(e)}fork(){return new Q([this.next(),this.next()])}forkPositional(){return new Ac(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const n=Q.rotateLeft(e+t&Q.MAX_ULONG,Q.BIGINT_17)+e&Q.MAX_ULONG;return t^=e,this.seed=[Q.rotateLeft(e,Q.BIGINT_49)^t^t<<Q.BIGINT_21&Q.MAX_ULONG,Q.rotateLeft(t,Q.BIGINT_28)],n}nextLong(){let e=this.next();return e>Q.POW2_63&&(e-=Q.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=Q.rotateLeft(t,Q.BIGINT_49)^n^n<<Q.BIGINT_21,n=Q.rotateLeft(n,Q.BIGINT_28);this.seed=[t,n]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&Q.MAX_UINT;if(e){const n=BigInt(e);let r=t*n,i=r&Q.MAX_UINT;if(i<n){const o=((~n&Q.MAX_UINT)+Q.BIGINT_1)%n;for(;i<o;)t=this.next()&Q.MAX_UINT,r=t*n,i=r&Q.MAX_UINT}const s=r>>Q.BIGINT_32;return Number(s)}else{let n=Number(t);return n>=2147483648&&(n-=4294967296),n}}nextFloat(){return Number(this.nextBits(24))*Q.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*Q.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let Ae=Q;Ae.SILVER_RATIO_64=BigInt("7640891576956012809");Ae.GOLDEN_RATIO_64=BigInt("-7046029254386353131");Ae.FLOAT_MULTIPLIER=1/Math.pow(2,24);Ae.DOUBLE_MULTIPLIER=11102230246251565e-32;Ae.BIGINT_1=BigInt(1);Ae.BIGINT_17=BigInt(17);Ae.BIGINT_21=BigInt(21);Ae.BIGINT_27=BigInt(27);Ae.BIGINT_28=BigInt(28);Ae.BIGINT_30=BigInt(30);Ae.BIGINT_31=BigInt(31);Ae.BIGINT_32=BigInt(32);Ae.BIGINT_49=BigInt(49);Ae.BIGINT_64=BigInt(64);Ae.STAFFORD_1=BigInt("-4658895280553007687");Ae.STAFFORD_2=BigInt("-7723592293110705685");Ae.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF");Ae.POW2_60=BigInt("0x10000000000000000");Ae.POW2_63=BigInt("0x8000000000000000");Ae.MAX_UINT=BigInt(4294967295);class Ac{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,r){const s=zs(t,n,r)^this.seedLo;return new Ae([s,this.seedHi])}fromHashOf(t){const n=vc(t,{asBytes:!0}),r=ci(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=ci(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new Ae([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const Mt=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 s=(e+t)*Mt.F2,o=Math.floor(e+s),a=o-(n=(o+(r=Math.floor(t+s)))*Mt.G2),l=e-a;let u,c;l>(i=t-(r-n))?(u=1,c=0):(u=0,c=1);const h=l-u+Mt.G2,p=i-c+Mt.G2,d=l-1+2*Mt.G2,v=i-1+2*Mt.G2,_=o&255,m=r&255,g=this.P(_+this.P(m))%12,y=this.P(_+u+this.P(m+c))%12,w=this.P(_+1+this.P(m+1))%12,A=this.getCornerNoise3D(g,l,i,0,.5),b=this.getCornerNoise3D(y,h,p,0,.5),k=this.getCornerNoise3D(w,d,v,0,.5);return 70*(A+b+k)}sample(e,t,n){const r=(e+t+n)*.3333333333333333,i=Math.floor(e+r),s=Math.floor(t+r),o=Math.floor(n+r),a=(i+s+o)*.16666666666666666,l=e-(i-a),u=t-(s-a),c=n-(o-a);let h,p,d,v,_,m;l>=u?u>=c?(h=1,p=0,d=0,v=1,_=1,m=0):l>=c?(h=1,p=0,d=0,v=1,_=0,m=1):(h=0,p=0,d=1,v=1,_=0,m=1):u<c?(h=0,p=0,d=1,v=0,_=1,m=1):l<c?(h=0,p=1,d=0,v=0,_=1,m=1):(h=0,p=1,d=0,v=1,_=1,m=0);const g=l-h+.16666666666666666,y=u-p+.16666666666666666,w=c-d+.16666666666666666,A=l-v+.3333333333333333,b=u-_+.3333333333333333,k=c-m+.3333333333333333,S=l-.5,I=u-.5,C=c-.5,M=i&255,N=s&255,F=o&255,ne=this.P(M+this.P(N+this.P(F)))%12,oe=this.P(M+h+this.P(N+p+this.P(F+d)))%12,he=this.P(M+v+this.P(N+_+this.P(F+m)))%12,O=this.P(M+1+this.P(N+1+this.P(F+1)))%12,$=this.getCornerNoise3D(ne,l,u,c,.6),G=this.getCornerNoise3D(oe,g,y,w,.6),T=this.getCornerNoise3D(he,A,b,k,.6),x=this.getCornerNoise3D(O,S,I,C,.6);return 32*($+G+T+x)}P(e){return this.p[e&255]}getCornerNoise3D(e,t,n,r,i){let s,o=i-t*t-n*n-r*r;return o<0?s=0:(o*=o,s=o*o*Mt.gradDot(e,t,n,r)),s}static gradDot(e,t,n,r){const i=Mt.GRADIENT[e&15];return i[0]*t+i[1]*n+i[2]*r}};let Ge=Mt;Ge.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]];Ge.F2=.5*(Math.sqrt(3)-1);Ge.G2=(3-Math.sqrt(3))/6;class ms{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,s=0){const o=t+this.xo,a=n+this.yo,l=r+this.zo,u=Math.floor(o),c=Math.floor(a),h=Math.floor(l),p=o-u,d=a-c,v=l-h;let _=0;if(i!==0){const m=s>=0&&s<d?s:d;_=Math.floor(m/i+1e-7)*i}return this.sampleAndLerp(u,c,h,p,d-_,v,d)}sampleAndLerp(t,n,r,i,s,o,a){const l=this.P(t),u=this.P(t+1),c=this.P(l+n),h=this.P(l+n+1),p=this.P(u+n),d=this.P(u+n+1),v=Ge.gradDot(this.P(c+r),i,s,o),_=Ge.gradDot(this.P(p+r),i-1,s,o),m=Ge.gradDot(this.P(h+r),i,s-1,o),g=Ge.gradDot(this.P(d+r),i-1,s-1,o),y=Ge.gradDot(this.P(c+r+1),i,s,o-1),w=Ge.gradDot(this.P(p+r+1),i-1,s,o-1),A=Ge.gradDot(this.P(h+r+1),i,s-1,o-1),b=Ge.gradDot(this.P(d+r+1),i-1,s-1,o-1),k=qr(i),S=qr(a),I=qr(o);return wc(k,S,I,v,_,m,g,y,w,A,b)}P(t){return this.p[t&255]&255}}class ve{constructor(t,n,r){if(t instanceof Ae){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let s=0;s<r.length;s++)if(r[s]!==0){const o=n+s;this.noiseLevels[s]=new ms(i.fromHashOf("octave_"+o))}}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 ms(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,s=0,o=!1){let a=0,l=this.lowestFreqInputFactor,u=this.lowestFreqValueFactor;for(let c=0;c<this.noiseLevels.length;c+=1){const h=this.noiseLevels[c];h&&(a+=this.amplitudes[c]*u*h.sample(ve.wrap(t*l),o?-h.yo:ve.wrap(n*l),ve.wrap(r*l),i*l,s*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 kc{constructor(t,n,r,i,s,o){this.xzScale=n,this.yScale=r,this.xzFactor=i,this.yFactor=s,this.smearScaleMultiplier=o,this.minLimitNoise=new ve(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new ve(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new ve(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,s=n*this.yMultiplier,o=r*this.xzMultiplier,a=i/this.xzFactor,l=s/this.yFactor,u=o/this.xzFactor,c=this.yMultiplier*this.smearScaleMultiplier,h=c/this.yFactor;let p,d=0,v=1;for(let g=0;g<8;g+=1){if(p=this.mainNoise.getOctaveNoise(g),p){const y=ve.wrap(a*v),w=ve.wrap(l*v),A=ve.wrap(u*v);d+=p.sample(y,w,A,h*v,l*v)/v}v/=2}d=(d/10+1)/2,v=1;let _=0,m=0;for(let g=0;g<16;g+=1){const y=ve.wrap(i*v),w=ve.wrap(s*v),A=ve.wrap(o*v),b=c*v;d<1&&(p=this.minLimitNoise.getOctaveNoise(g))&&(_+=p.sample(y,w,A,b,s*v)/v),d>0&&(p=this.maxLimitNoise.getOctaveNoise(g))&&(m+=p.sample(y,w,A,b,s*v)/v),v/=2}return Li(_/512,m/512,d)/128}}const Zr=class{constructor(e,{firstOctave:t,amplitudes:n}){this.first=new ve(e,t,n),this.second=new ve(e,t,n);let r=1/0,i=-1/0;for(let o=0;o<n.length;o+=1)n[o]!==0&&(r=Math.min(r,o),i=Math.max(i,o));const s=.1*(1+1/(i-r+1));this.valueFactor=1/6/s,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,n){const r=e*Zr.INPUT_FACTOR,i=t*Zr.INPUT_FACTOR,s=n*Zr.INPUT_FACTOR;return(this.first.sample(e,t,n)+this.second.sample(r,i,s))*this.valueFactor}};let Cr=Zr;Cr.INPUT_FACTOR=1.0181268882175227;var Nn;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var s,o,a;const i=(s=R.readObject(r))!=null?s:{};return{firstOctave:(o=R.readInt(i.firstOctave))!=null?o:0,amplitudes:(a=R.readArray(i.amplitudes,l=>{var u;return(u=R.readNumber(l))!=null?u:0}))!=null?a:[]}}e.fromJson=n})(Nn||(Nn={}));class ip{constructor(t,n){const r=n[n.length-1],s=-n[0]+r+1,o=new Set(n),a=new Ge(t);this.noiseLevels=Array(s),r>=0&&r<s&&o.has(0)&&(this.noiseLevels[r]=a);for(let l=r+1;l<s;l+=1)l>=0&&o.has(r-l)?this.noiseLevels[l]=new Ge(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,s)-1)}sample(t,n,r){let i=0,s=this.highestFreqInputFactor,o=this.highestFreqValueFactor;for(let a=0;a<this.noiseLevels.length;a+=1){const l=this.noiseLevels[a];l&&(i+=o*l.sample2D(t*s+(r?l.xo:0),n*s+(r?l.yo:0))),s/=2,o*=2}return i}}var it;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(it||(it={}));const sp={[it.UP]:[0,1,0],[it.DOWN]:[0,-1,0],[it.NORTH]:[0,0,-1],[it.EAST]:[1,0,0],[it.SOUTH]:[0,0,1],[it.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return sp[n]}e.normal=t})(it||(it={}));var Ye;(function(e){function t(o,a,l){return[o,a,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(o,a,l,u){return[o[0]+a,o[1]+l,o[2]+u]}e.offset=n;function r(o,a){return e.offset(o,...it.normal(a))}e.towards=r;function i(o,a){return o===a?!0:o[0]===a[0]&&o[1]===a[1]&&o[2]===a[2]}e.equals=i;function s(o){return o[0]*o[0]+o[1]*o[1]+o[2]*o[2]}e.magnitude=s})(Ye||(Ye={}));function An(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 Br(e,t,n,r){const i=An(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 Sc(e,t){try{return e()}catch{return t}}const Xr=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 Xr(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 Xr(n,r)}return new Xr(this.DEFAULT_NAMESPACE,e)}};let we=Xr;we.DEFAULT_NAMESPACE="minecraft";we.SEPARATOR=":";const yt=class{constructor(e,t={}){this.properties=t,this.name=typeof e=="string"?we.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(yt.WATER)||this.is(yt.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=we.parse(An(e.value,"Name","string")),n=Sc(()=>An(e.value,"Properties","compound"),{}),r=Object.keys(n).reduce((i,s)=>ke(K({},i),{[s]:An(n,s,"string")}),{});return new yt(t,r)}static fromJson(e){var i,s;const t=(i=R.readObject(e))!=null?i:{},n=we.parse((s=R.readString(t.Name))!=null?s:yt.STONE.name.toString()),r=R.readMap(t.Properties,o=>{var a;return(a=R.readString(o))!=null?a:""});return new yt(n,r)}};let ge=yt;ge.AIR=new yt(we.create("air"));ge.STONE=new yt(we.create("stone"));ge.WATER=new yt(we.create("water"),{level:"0"});ge.LAVA=new yt(we.create("lava"),{level:"0"});const rr=class{constructor(e){this.minY=e,this.storage=Array(rr.SIZE).fill(0),this.palette=[ge.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:ge.AIR}setBlockState(e,t,n,r){let i=this.palette.findIndex(s=>s.equals(r));i===-1&&(i=this.palette.length,this.palette.push(r)),this.storage[this.index(e,t,n)]=i}};let Pi=rr;Pi.WIDTH=16;Pi.SIZE=rr.WIDTH*rr.WIDTH*rr.WIDTH;class op{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 o;const[n,r,i]=t,s=this.sections[this.getSectionIndex(r)];return(o=s==null?void 0:s.getBlockState(n&15,r&15,i&15))!=null?o:ge.AIR}setBlockState(t,n){const[r,i,s]=t,o=this.getSectionIndex(i);let a=this.sections[o];if(a===null){if(n.equals(ge.AIR))return;a=this.getOrCreateSection(o)}a.setBlockState(r&15,i&15,s&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new Pi(this.minSection+t)),this.sections[t]}}var Ue;(function(e){function t(c,h){return[c,h]}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 s(c[0],c[1])}e.toLong=i;function s(c,h){return BigInt(c&4294967295)|BigInt(h&4294967295)<<BigInt(32)}e.asLong=s;function o(c){return c[0]<<4}e.minBlockX=o;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})(Ue||(Ue={}));var sn;(function(e){function t(i,s){return o=>typeof o=="string"?r(i,we.parse(o)):n(s(o))}e.parser=t;function n(i){return{value:()=>i,key:()=>{}}}e.direct=n;function r(i,s){return{value:()=>i.getOrThrow(s),key:()=>s}}e.reference=r})(sn||(sn={}));const js=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),sn.reference(this,e)}keys(){return[...this.storage.keys()].map(e=>we.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 js(this.key,this.parser)}};let hi=js;hi.REGISTRY=new js(we.create("root"));class Vs{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 s=new ge(n,r);let o=this.palette.findIndex(a=>a.equals(s));return o===-1&&(o=this.palette.length,this.palette.push(s)),this.blocks.push({pos:t,state:o,nbt:i}),this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]]={pos:t,state:o,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=Br(t.value,"size","int",3),r=Br(t.value,"palette","compound").map(s=>ge.fromNbt({name:"",value:s})),i=Br(t.value,"blocks","compound").map(s=>{const o=Br(s,"pos","int",3),a=An(s,"state","int"),l=Sc(()=>An(s,"nbt","compound"),void 0);return{pos:o,state:a,nbt:l}});return new Vs(n,r,i)}}var on;(function(e){e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function");function t(n){const r=new hi(we.create(n));return hi.REGISTRY.register(r.key,r),r}})(on||(on={}));class ae{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(T,x,E){return{x:T,y:x,z:E}}e.context=t;class n extends e{constructor(x){super(),this.input=x}compute(x){return this.transform(x,this.input.compute(x))}}const r=sn.parser(on.NOISE,Nn.fromJson);function i(T,x=i){var j,W,ce,je,at,Ve,Be,He,gt,Je,St,Te,tt,Et,J,It,fe,ue,_t,Ke;if(typeof T=="string")return new a(sn.reference(on.DENSITY_FUNCTION,we.parse(T)));if(typeof T=="number")return new o(T);const E=(j=R.readObject(T))!=null?j:{},L=(W=R.readString(E.type))==null?void 0:W.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((ce=R.readNumber(E.xz_scale))!=null?ce:1,(je=R.readNumber(E.y_scale))!=null?je:1,(at=R.readNumber(E.xz_factor))!=null?at:80,(Ve=R.readNumber(E.y_factor))!=null?Ve:160,(Be=R.readNumber(E.smear_scale_multiplier))!=null?Be:8);case"flat_cache":return new h(x(E.argument));case"interpolated":return new _(x(E.argument));case"cache_2d":return new d(x(E.argument));case"cache_once":return new v(x(E.argument));case"cache_all_in_cell":return new p(x(E.argument));case"noise":return new m((He=R.readNumber(E.xz_scale))!=null?He:1,(gt=R.readNumber(E.y_scale))!=null?gt:1,r(E.noise));case"end_islands":return new g;case"weird_scaled_sampler":return new A(x(E.input),R.readEnum(E.rarity_value_mapper,y),r(E.noise));case"shifted_noise":return new b(x(E.shift_x),x(E.shift_y),x(E.shift_z),(Je=R.readNumber(E.xz_scale))!=null?Je:1,(St=R.readNumber(E.y_scale))!=null?St:1,r(E.noise));case"range_choice":return new k(x(E.input),(Te=R.readNumber(E.min_inclusive))!=null?Te:0,(tt=R.readNumber(E.max_exclusive))!=null?tt:1,x(E.when_in_range),x(E.when_out_of_range));case"shift_a":return new I(r(E.argument));case"shift_b":return new C(r(E.argument));case"shift":return new M(r(E.argument));case"blend_density":return new N(x(E.argument));case"clamp":return new F(x(E.input),(Et=R.readNumber(E.min))!=null?Et:0,(J=R.readNumber(E.max))!=null?J:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new oe(L,x(E.argument));case"add":case"mul":case"min":case"max":return new O(R.readEnum(L,he),x(E.argument1),x(E.argument2));case"spline":return new $(di.fromJson(E.spline,x));case"constant":return new o((It=R.readNumber(E.argument))!=null?It:0);case"y_clamped_gradient":return new G((fe=R.readInt(E.from_y))!=null?fe:-4064,(ue=R.readInt(E.to_y))!=null?ue:4062,(_t=R.readNumber(E.from_value))!=null?_t:-4064,(Ke=R.readNumber(E.to_value))!=null?Ke:4062)}return o.ZERO}e.fromJson=i;const s=class extends e{constructor(T){super(),this.value=T}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let o=s;o.ZERO=new s(0),o.ONE=new s(1),e.Constant=o;class a extends e{constructor(x){super(),this.holder=x}compute(x){return this.holder.value().compute(x)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=a;class l extends e.Constant{constructor(x,E,L){super(x),this.min=E,this.max=L}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=l;class u extends e{constructor(x,E,L,j,W,ce){super(),this.xzScale=x,this.yScale=E,this.xzFactor=L,this.yFactor=j,this.smearScaleMultiplier=W,this.blendedNoise=ce}compute(x){var E,L;return(L=(E=this.blendedNoise)==null?void 0:E.sample(x.x,x.y,x.z))!=null?L:0}maxValue(){var x,E;return(E=(x=this.blendedNoise)==null?void 0:x.maxValue)!=null?E:0}}e.OldBlendedNoise=u;class c extends e{constructor(x){super(),this.wrapped=x}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class h extends c{constructor(x){super(x),this.lastValue=0}compute(x){const E=x.x>>2,L=x.z>>2;return(this.lastQuartX!==E||this.lastQuartZ!==L)&&(this.lastValue=this.wrapped.compute(e.context(E<<2,0,L<<2)),this.lastQuartX=E,this.lastQuartZ=L),this.lastValue}mapAll(x){return x.map(new h(this.wrapped.mapAll(x)))}}e.FlatCache=h;class p extends c{constructor(x){super(x)}compute(x){return this.wrapped.compute(x)}mapAll(x){return x.map(new p(this.wrapped.mapAll(x)))}}e.CacheAllInCell=p;class d extends c{constructor(x){super(x),this.lastValue=0}compute(x){const E=x.x,L=x.z;return(this.lastBlockX!==E||this.lastBlockZ!==L)&&(this.lastValue=this.wrapped.compute(x),this.lastBlockX=E,this.lastBlockZ=L),this.lastValue}mapAll(x){return x.map(new d(this.wrapped.mapAll(x)))}}e.Cache2D=d;class v extends c{constructor(x){super(x),this.lastValue=0}compute(x){const E=x.x,L=x.y,j=x.z;return(this.lastBlockX!==E||this.lastBlockY!==L||this.lastBlockZ!==j)&&(this.lastValue=this.wrapped.compute(x),this.lastBlockX=E,this.lastBlockY=L,this.lastBlockZ=j),this.lastValue}mapAll(x){return x.map(new v(this.wrapped.mapAll(x)))}}e.CacheOnce=v;class _ extends c{constructor(x,E=4,L=4){super(x),this.cellWidth=E,this.cellHeight=L,this.values=new Map}compute({x,y:E,z:L}){const j=this.cellWidth,W=this.cellHeight,ce=(x%j+j)%j/j,je=(E%W+W)%W/W,at=(L%j+j)%j/j,Ve=Math.floor(x/j)*j,Be=Math.floor(E/W)*W,He=Math.floor(L/j)*j;return yc(ce,je,at,()=>this.computeCorner(Ve,Be,He),()=>this.computeCorner(Ve+j,Be,He),()=>this.computeCorner(Ve,Be+W,He),()=>this.computeCorner(Ve+j,Be+W,He),()=>this.computeCorner(Ve,Be,He+j),()=>this.computeCorner(Ve+j,Be,He+j),()=>this.computeCorner(Ve,Be+W,He+j),()=>this.computeCorner(Ve+j,Be+W,He+j))}computeCorner(x,E,L){return Ir(this.values,`${x} ${E} ${L}`,()=>this.wrapped.compute(e.context(x,E,L)))}mapAll(x){return x.map(new _(this.wrapped.mapAll(x)))}withCellSize(x,E){return new _(this.wrapped,x,E)}}e.Interpolated=_;class m extends e{constructor(x,E,L,j){super(),this.xzScale=x,this.yScale=E,this.noiseData=L,this.noise=j}compute(x){var E,L;return(L=(E=this.noise)==null?void 0:E.sample(x.x*this.xzScale,x.y*this.yScale,x.z*this.xzScale))!=null?L:0}maxValue(){var x,E;return(E=(x=this.noise)==null?void 0:x.maxValue)!=null?E:2}}e.Noise=m;class g extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return .5625}}const y=["type_1","type_2"],w=class extends n{constructor(T,x,E,L){super(T),this.rarityValueMapper=x,this.noiseData=E,this.noise=L,this.mapper=w.ValueMapper[this.rarityValueMapper]}transform(T,x){if(!this.noise)return 0;const E=this.mapper(x);return E*Math.abs(this.noise.sample(T.x/E,T.y/E,T.z/E))}mapAll(T){return T.map(new w(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 A=w;A.ValueMapper={type_1:w.rarityValueMapper1,type_2:w.rarityValueMapper2},e.WeirdScaledSampler=A;class b extends m{constructor(x,E,L,j,W,ce,je){super(j,W,ce,je),this.shiftX=x,this.shiftY=E,this.shiftZ=L}compute(x){var W,ce;const E=x.x*this.xzScale+this.shiftX.compute(x),L=x.y*this.yScale+this.shiftY.compute(x),j=x.z*this.xzScale+this.shiftZ.compute(x);return(ce=(W=this.noise)==null?void 0:W.sample(E,L,j))!=null?ce:0}mapAll(x){return x.map(new b(this.shiftX.mapAll(x),this.shiftY.mapAll(x),this.shiftZ.mapAll(x),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=b;class k extends e{constructor(x,E,L,j,W){super(),this.input=x,this.minInclusive=E,this.maxExclusive=L,this.whenInRange=j,this.whenOutOfRange=W}compute(x){const E=this.input.compute(x);return this.minInclusive<=E&&E<this.maxExclusive?this.whenInRange.compute(x):this.whenOutOfRange.compute(x)}mapAll(x){return x.map(new k(this.input.mapAll(x),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(x),this.whenOutOfRange.mapAll(x)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=k;class S extends e{constructor(x,E){super(),this.noiseData=x,this.offsetNoise=E}compute(x){var E,L;return(L=(E=this.offsetNoise)==null?void 0:E.sample(x.x*.25,x.y*.25,x.z*.25))!=null?L:0}maxValue(){var x,E;return((E=(x=this.offsetNoise)==null?void 0:x.maxValue)!=null?E:2)*4}}e.ShiftNoise=S;class I extends S{constructor(x,E){super(x,E)}compute(x){return super.compute(e.context(x.x,0,x.z))}withNewNoise(x){return new I(this.noiseData,x)}}e.ShiftA=I;class C extends S{constructor(x,E){super(x,E)}compute(x){return super.compute(e.context(x.z,x.x,0))}withNewNoise(x){return new C(this.noiseData,x)}}e.ShiftB=C;class M extends S{constructor(x,E){super(x,E)}withNewNoise(x){return new M(this.noiseData,x)}}e.Shift=M;class N extends n{constructor(x){super(x)}transform(x,E){return E}mapAll(x){return x.map(new N(this.input.mapAll(x)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=N;class F extends n{constructor(x,E,L){super(x),this.min=E,this.max=L}transform(x,E){return cr(E,this.min,this.max)}mapAll(x){return x.map(new F(this.input.mapAll(x),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=F;const ne=class extends n{constructor(T,x,E,L){super(x),this.type=T,this.min=E,this.max=L,this.transformer=ne.MappedTypes[this.type]}transform(T,x){return this.transformer(x)}mapAll(T){return T.map(new ne(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 x=this.transformer(T),E=this.transformer(this.input.maxValue());return(this.type==="abs"||this.type==="square")&&(E=Math.max(x,E),x=Math.max(0,T)),new ne(this.type,this.input,x,E)}};let oe=ne;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 x=cr(T,-1,1);return x/2-x*x*x/24}},e.Mapped=oe;const he=["add","mul","min","max"];class O extends e{constructor(x,E,L,j,W){super(),this.type=x,this.argument1=E,this.argument2=L,this.min=j,this.max=W}compute(x){const E=this.argument1.compute(x);switch(this.type){case"add":return E+this.argument2.compute(x);case"mul":return E===0?0:E*this.argument2.compute(x);case"min":return E<this.argument2.minValue()?E:Math.min(E,this.argument2.compute(x));case"max":return E>this.argument2.maxValue()?E:Math.max(E,this.argument2.compute(x))}}mapAll(x){return x.map(new O(this.type,this.argument1.mapAll(x),this.argument2.mapAll(x)))}minValue(){var x;return(x=this.min)!=null?x:-1/0}maxValue(){var x;return(x=this.max)!=null?x:1/0}withMinMax(){const x=this.argument1.minValue(),E=this.argument2.minValue(),L=this.argument1.maxValue(),j=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(x>=j||E>=L)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let W,ce;switch(this.type){case"add":W=x+E,ce=L+j;break;case"mul":W=x>0&&E>0?x*E||0:L<0&&j<0?L*j||0:Math.min(x*j||0,E*L||0),ce=x>0&&E>0?L*j||0:L<0&&j<0?x*E||0:Math.max(x*E||0,L*j||0);break;case"min":W=Math.min(x,E),ce=Math.min(L,j);break;case"max":W=Math.max(x,E),ce=Math.max(L,j);break}return new O(this.type,this.argument1,this.argument2,W,ce)}}e.Ap2=O;class $ extends e{constructor(x){super(),this.spline=x}compute(x){return this.spline.compute(x)}mapAll(x){const E=this.spline.mapAll(L=>L instanceof e?L.mapAll(x):L);return E.calculateMinMax(),x.map(new $(E))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=$;class G extends e{constructor(x,E,L,j){super(),this.fromY=x,this.toY=E,this.fromValue=L,this.toValue=j}compute(x){return Ri(x.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=G})(ae||(ae={}));class dr{constructor(t,n){this.level=t,this.type=n}at(t){return t<this.level?this.type:ge.AIR}}var fi;(function(e){function t(n){return{compute({x:r,y:i,z:s},o){if(!(o>0))return n(r,i,s).at(i)}}}e.createDisabled=t})(fi||(fi={}));const ut=class{constructor(e,t,n,r,i,s,o,a,l,u){this.noiseChunk=e,this.barrierNoise=n,this.fluidLevelFloodednessNoise=r,this.fluidLevelSpreadNoise=i,this.lavaNoise=s,this.random=o,this.globalFluidPicker=u,this.minGridX=this.gridX(Ue.minBlockX(t))-1,this.gridSizeX=this.gridX(Ue.maxBlockX(t))+1-this.minGridX+1,this.minGridY=this.gridY(a)-1,this.minGridZ=this.gridZ(Ue.minBlockZ(t))-1,this.gridSizeZ=this.gridZ(Ue.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(Ye.ZERO)}compute({x:e,y:t,z:n},r){if(r<=0){if(this.globalFluidPicker(e,t,n).at(t).is(ge.LAVA))return ge.LAVA;{const i=this.gridX(e-5),s=this.gridY(t+1),o=this.gridZ(n-5);let a=Number.MAX_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,c=Ye.ZERO,h=Ye.ZERO,p=Ye.ZERO;for(let A=0;A<=1;A+=1)for(let b=-1;b<=1;b+=1)for(let k=0;k<=1;k+=1){const S=this.getLocation(i+A,s+b,o+k),I=Ye.magnitude(S);a>=I?(p=h,h=c,c=S,u=l,l=a,a=I):l>=I?(p=h,h=S,u=l,l=I):u>=I&&(p=S,u=I)}const d=this.getStatus(c),v=this.getStatus(h),_=this.getStatus(p),m=ut.similarity(a,l),g=ut.similarity(a,u),y=ut.similarity(l,u);let w;if(d.at(t).is(ge.WATER)&&this.globalFluidPicker(e,t-1,n).at(t-1).is(ge.LAVA))w=1;else if(m>-1){const A=tr(()=>this.barrierNoise.compute(ae.context(e,t*.5,n))),b=this.calculatePressure(t,d,v,A),k=this.calculatePressure(t,d,_,A),S=this.calculatePressure(t,v,_,A),I=Math.max(b,k*Math.max(0,g),S*Math.max(y));w=Math.max(0,2*Math.max(0,m)*I)}else w=0;if(r+w<=0)return d.at(t)}}}static similarity(e,t){return 1-Math.abs(t-e)/25}calculatePressure(e,t,n,r){const i=t.at(e),s=n.at(e);if(i.is(ge.LAVA)&&s.is(ge.WATER)||i.is(ge.WATER)&&s.is(ge.LAVA))return 1;const o=Math.abs(t.level-n.level);if(o===0)return 0;const a=(t.level+n.level)/2,l=e+.5-a,u=o/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)),s=this.aquiferCache[i];if(s!==void 0)return s;const o=this.computeStatus(t,n,r);return this.aquiferCache[i]=o,o}computeStatus(e,t,n){const r=this.globalFluidPicker(e,t,n);let i=Number.MAX_SAFE_INTEGER,s=!1;for(const[d,v]of ut.SURFACE_SAMPLING){const _=e+(v<<4),m=n+(v<<4),g=this.noiseChunk.getPreliminarySurfaceLevel(_,m);i=Math.min(i,g);const y=d===0&&v===0;if(y&&t-12>g+8)return r;if(y||t+12>g+8){const w=this.globalFluidPicker(_,g+8,m);if(!w.at(g+8).is(ge.AIR)){if(y)return w;s=!0}}}const o=s?Ri(i+8-t,0,64,1,0):0,a=cr(this.fluidLevelFloodednessNoise.compute(ae.context(e,t*.67,n)),-1,1);if(a>ur(o,1,0,-.3,.8))return r;if(a<=ur(o,1,0,-.8,.4))return new dr(Number.MIN_SAFE_INTEGER,r.type);const l=Math.floor(t/40),u=this.fluidLevelSpreadNoise.compute(ae.context(Math.floor(e/16),l,Math.floor(n/16))),c=l*40+20+Math.floor(u/3)*3,h=Math.min(i,c),p=this.getFluidType(e,t,n,r.type,c);return new dr(h,p)}getFluidType(e,t,n,r,i){if(i<=-10){const s=this.lavaNoise.compute(ae.context(Math.floor(e/64),Math.floor(t/40),Math.floor(n/64)));if(Math.abs(s)>.3)return ge.LAVA}return r}getLocation(e,t,n){const r=this.getIndex(e,t,n),i=this.aquiferLocationCache[r];if(Ye.equals(i,Ye.ZERO))return i;const s=this.random.at(e,t,n),o=Ye.create(e*ut.X_SPACING+s.nextInt(10),t*ut.Y_SPACING+s.nextInt(9),n*ut.Z_SPACING+s.nextInt(10));return this.aquiferLocationCache[r]=o,o}getIndex(e,t,n){const r=e-this.minGridX,i=t-this.minGridY,s=n-this.minGridZ,o=(i*this.gridSizeZ+s)*this.gridSizeX+r;if(o<0||o>=this.gridSize)throw new Error(`Invalid aquifer index at ${e} ${t} ${n}: 0 <= ${o} < ${this.gridSize}`);return o}gridX(e){return Math.floor(e/ut.X_SPACING)}gridY(e){return Math.floor(e/ut.Y_SPACING)}gridZ(e){return Math.floor(e/ut.Z_SPACING)}};let Mr=ut;Mr.X_SPACING=16;Mr.Y_SPACING=12;Mr.Z_SPACING=16;Mr.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 hr;(function(e){function n(_,m,g,y,w,A){return new a(_,m,g,y,w,A)}e.target=n;function r(_,m,g,y,w,A,b){return new o(i(_),i(m),i(g),i(y),i(w),i(A),b)}e.parameters=r;function i(_,m){return typeof _=="number"?new s(_,m!=null?m:_):_}e.param=i;class s{constructor(m,g){this.min=m,this.max=g}distance(m){const g=(typeof m=="number"?m:m.min)-this.max,y=this.min-(typeof m=="number"?m:m.max);return g>0?g:Math.max(y,0)}union(m){return new s(Math.min(this.min,m.min),Math.max(this.max,m.max))}static fromJson(m){var w;if(typeof m=="number")return new s(m,m);const[g,y]=(w=R.readArray(m,A=>R.readNumber(A)))!=null?w:[];return new s(g!=null?g:0,y!=null?y:0)}}e.Param=s;class o{constructor(m,g,y,w,A,b,k){this.temperature=m,this.humidity=g,this.continentalness=y,this.erosion=w,this.depth=A,this.weirdness=b,this.offset=k}fittness(m){return Ct(this.temperature.distance(m.temperature))+Ct(this.humidity.distance(m.humidity))+Ct(this.continentalness.distance(m.continentalness))+Ct(this.erosion.distance(m.erosion))+Ct(this.depth.distance(m.depth))+Ct(this.weirdness.distance(m.weirdness))+Ct(this.offset-m.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new s(this.offset,this.offset)]}static fromJson(m){var y,w;const g=(y=R.readObject(m))!=null?y:{};return new o(s.fromJson(g.temperature),s.fromJson(g.humidity),s.fromJson(g.continentalness),s.fromJson(g.erosion),s.fromJson(g.depth),s.fromJson(g.weirdness),(w=R.readInt(g.offset))!=null?w:0)}}e.ParamPoint=o;class a{constructor(m,g,y,w,A,b){this.temperature=m,this.humidity=g,this.continentalness=y,this.erosion=w,this.depth=A,this.weirdness=b}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(m){this.things=m,this.index=new h(m)}find(m){return this.index.search(m,(g,y)=>g.distance(y))}}e.Parameters=l;class u{constructor(m,g,y,w,A,b){this.temperature=m,this.humidity=g,this.continentalness=y,this.erosion=w,this.depth=A,this.weirdness=b}static fromRouter(m){return new e.Sampler(m.temperature,m.vegetation,m.continents,m.erosion,m.depth,m.ridges)}sample(m,g,y){const w=ae.context(m<<2,g<<2,y<<2);return e.target(this.temperature.compute(w),this.humidity.compute(w),this.continentalness.compute(w),this.erosion.compute(w),this.depth.compute(w),this.weirdness.compute(w))}}e.Sampler=u;const c=class{constructor(_){this.root=c.build(_.map(([m,g])=>new v(m,g)))}static build(_){if(_.length===1)return _[0];if(_.length<=c.CHILDREN_PER_NODE){const w=_.map(A=>{let b=0;for(let k=0;k<7;k+=1){const S=A.space[k];b+=Math.abs((S.min+S.max)/2)}return{key:b,node:A}}).sort((A,b)=>A.key-b.key).map(({node:A})=>A);return new d(w)}let m=1/0,g=-1,y=[];for(let w=0;w<7;++w){_=c.sort(_,w,!1),y=c.bucketize(_);let A=0;for(const b of y)A+=c.area(b.space);m>A&&(m=A,g=w)}return _=c.sort(_,g,!1),y=c.bucketize(_),y=c.sort(y,g,!0),new d(y.map(w=>c.build(w.children)))}static sort(_,m,g){return _.map(y=>{const w=y.space[m],A=(w.min+w.max)/2;return{key:g?Math.abs(A):A,node:y}}).sort((y,w)=>y.key-w.key).map(({node:y})=>y)}static bucketize(_){const m=[];let g=[];const y=Math.pow(10,Math.floor(Math.log(_.length-.01)/Math.log(10)));for(const w of _)g.push(w),!(g.length<y)&&(m.push(new d(g)),g=[]);return g.length!==0&&m.push(new d(g)),m}static area(_){let m=0;for(const g of _)m+=Math.abs(g.max-g.min);return m}search(_,m){return this.root.search(_.toArray(),m).thing()}};let h=c;h.CHILDREN_PER_NODE=10,e.RTree=h;class p{constructor(m){this.space=m}distance(m){let g=0;for(let y=0;y<7;y+=1)g+=Ct(this.space[y].distance(m[y]));return g}}e.RNode=p;class d extends p{constructor(m){super(d.buildSpace(m)),this.children=m}static buildSpace(m){let g=[...Array(7)].map(()=>new s(1/0,-1/0));for(const y of m)g=[...Array(7)].map((w,A)=>g[A].union(y.space[A]));return g}search(m,g){let y=1/0,w=null;for(const A of this.children){const b=g(A,m);if(y<=b)continue;const k=A.search(m,g),S=A==k?b:g(k,m);y<=S||(y=S,w=k)}return w}}e.RSubTree=d;class v extends p{constructor(m,g){super(m.space()),this.thing=g}search(){return this}}e.RLeaf=v})(hr||(hr={}));class fr{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,s;const n=(i=R.readObject(t))!=null?i:{},r=we.parse((s=R.readString(n.biome))!=null?s:"minecraft:the_void");return new fr(r)}}class Hs{constructor(t){this.parameters=t}getBiome(t,n,r,i){const s=i.sample(t,n,r);return this.parameters.find(s)}static fromJson(t){var s,o;const n=(s=R.readObject(t))!=null?s:{},i=((o=R.readArray(n.biomes,a=>{var l;return(u=>{var c;return{biome:we.parse((c=R.readString(u.biome))!=null?c:"minecraft:the_void"),parameters:hr.ParamPoint.fromJson(u.parameters)}})((l=R.readObject(a))!=null?l:{})}))!=null?o:[]).map(a=>[a.parameters,()=>a.biome]);return new Hs(new hr.Parameters(i))}}var dt;(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,s,o){return on.NOISE.register(we.create(i),Nn.create(s,o))}const n=new Map;function r(i,s){var c;const o=(c=s.key())==null?void 0:c.toString();if(!o)throw new Error("Cannot instantiate noise from direct holder");const a=i.seedKey(),l=n.get(o);if(l&&l[0]===a[0]&&l[1]===a[1])return l[2];const u=new Cr(i.fromHashOf(o),s.value());return n.set(o,[a[0],a[1],u]),u}e.instantiate=r})(dt||(dt={}));var Fe;(function(e){function t(o){var l,u,c,h,p;const a=(l=R.readObject(o))!=null?l:{};return{minY:(u=R.readInt(a.min_y))!=null?u:0,height:(c=R.readInt(a.height))!=null?c:256,xzSize:(h=R.readInt(a.size_horizontal))!=null?h:1,ySize:(p=R.readInt(a.size_vertical))!=null?p:1}}e.fromJson=t;function n(o){return o.ySize<<2}e.cellHeight=n;function r(o){return o.xzSize<<2}e.cellWidth=r;function i(o){return o.height/n(o)}e.cellCountY=i;function s(o){return Math.floor(o.minY/n(o))}e.minCellY=s})(Fe||(Fe={}));var gs;(function(e){function t(r){var s,o,a,l;const i=(s=R.readObject(r))!=null?s:{};return{target:(o=R.readNumber(i.target))!=null?o:0,size:(a=R.readInt(i.size))!=null?a:0,offset:(l=R.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,s){if(r.size<=0)return i;const o=(s-r.offset)/r.size;return Li(r.target,i,o)}e.apply=n})(gs||(gs={}));var Ln;(function(e){const t=a=>sn.parser(on.DENSITY_FUNCTION,ae.fromJson)(a).value();function n(a){var u;const l=(u=R.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 K({barrier:ae.Constant.ZERO,fluidLevelFloodedness:ae.Constant.ZERO,fluidLevelSpread:ae.Constant.ZERO,lava:ae.Constant.ZERO,temperature:ae.Constant.ZERO,vegetation:ae.Constant.ZERO,continents:ae.Constant.ZERO,erosion:ae.Constant.ZERO,depth:ae.Constant.ZERO,ridges:ae.Constant.ZERO,initialDensityWithoutJaggedness:ae.Constant.ZERO,finalDensity:ae.Constant.ZERO,veinToggle:ae.Constant.ZERO,veinRidged:ae.Constant.ZERO,veinGap:ae.Constant.ZERO},a)}e.create=r;function i(a,l,u,c=!1){const h=(c?new Xe(u):Ae.create(u)).forkPositional(),p=new s(h,l);return ke(K({},p.mapAll(a)),{aquiferPositionalRandomFactory:h.fromHashOf(we.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:h.fromHashOf(we.create("ore").toString()).forkPositional()})}e.withSettings=i;class s{constructor(l,u){this.random=l,this.settings=u,this.mapped=new Map}map(l){if(l instanceof ae.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 ae.Interpolated)return l.withCellSize(Fe.cellWidth(this.settings),Fe.cellHeight(this.settings));if(l instanceof ae.ShiftedNoise){const u=dt.instantiate(this.random,l.noiseData);return new ae.ShiftedNoise(l.shiftX,l.shiftY,l.shiftZ,l.xzScale,l.yScale,l.noiseData,u)}return l instanceof ae.Noise?new ae.Noise(l.xzScale,l.yScale,l.noiseData,dt.instantiate(this.random,l.noiseData)):l instanceof ae.ShiftNoise?l.withNewNoise(dt.instantiate(this.random,l.noiseData)):l instanceof ae.WeirdScaledSampler?new ae.WeirdScaledSampler(l.input,l.rarityValueMapper,l.noiseData,dt.instantiate(this.random,l.noiseData)):l instanceof ae.OldBlendedNoise?new ae.OldBlendedNoise(l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier,new kc(this.random.fromHashOf(we.create("terrain").toString()),l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier)):l instanceof ae.Mapped||l instanceof ae.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=s;function o(a,l,u,c){const h=Fe.minCellY(a)+Fe.cellCountY(a),p=Fe.minCellY(a),d=Fe.cellHeight(a);for(let v=h;v>=p;v-=1){const _=v*d;if(cr(l.compute(ae.context(u,_,c)),-64,64)>=.390625)return _}return Number.MAX_SAFE_INTEGER}e.computePreliminarySurfaceLevelScanning=o})(Ln||(Ln={}));class Ec{constructor(t,n,r,i,s,o,a,l,u){this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.router=i,this.minX=s,this.minZ=o,this.settings=a,this.preliminarySurfaceLevel=new Map,this.cellWidth=Fe.cellWidth(a),this.cellHeight=Fe.cellHeight(a),this.firstCellX=Math.floor(s/this.cellWidth),this.firstCellZ=Math.floor(o/this.cellWidth),this.firstNoiseX=s>>2,this.firstNoiseZ=o>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=fi.createDisabled(u);const c=this.router.finalDensity;this.materialRule=pi.fromList([h=>this.aquifer.compute(h,c.compute(h))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Ir(this.preliminarySurfaceLevel,Ue.asLong(t,n),()=>Ln.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}var pi;(function(e){function t(n){return r=>{for(const i of n){const s=i(r);if(s)return s}}}e.fromList=t})(pi||(pi={}));var kn;(function(e){function t(s){var a,l,u,c;const o=(a=R.readObject(s))!=null?a:{};return o.absolute!==void 0?n((l=R.readNumber(o.absolute))!=null?l:0):o.above_bottom!==void 0?r((u=R.readNumber(o.above_bottom))!=null?u:0):o.below_top!==void 0?i((c=R.readNumber(o.below_top))!=null?c:0):()=>0}e.fromJson=t;function n(s){return()=>s}function r(s){return o=>o.minY+s}function i(s){return o=>o.maxY-s}})(kn||(kn={}));var mi;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(mi||(mi={}));class Ic{constructor(t,n,r){this.rule=t,this.defaultBlock=n,this.random=Ae.create(r).forkPositional(),this.surfaceNoise=dt.instantiate(this.random,dt.SURFACE),this.surfaceSecondaryNoise=dt.instantiate(this.random,dt.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const s=Ue.minBlockX(t.pos),o=Ue.minBlockZ(t.pos),a=new Cc(this,t,n,r,i),l=this.rule(a);for(let u=0;u<16;u+=1){const c=s+u;for(let h=0;h<1;h+=1){const p=o+h;a.updateXZ(c,p);let d=0,v=Number.MIN_SAFE_INTEGER,_=Number.MAX_SAFE_INTEGER;for(let m=t.maxY;m>=t.minY;m-=1){const g=Ye.create(c,m,p),y=t.getBlockState(g);if(y.equals(ge.AIR)){d=0,v=Number.MIN_SAFE_INTEGER;continue}if(y.isFluid()){v===Number.MIN_SAFE_INTEGER&&(v=m+1);continue}if(_>=m){_=Number.MIN_SAFE_INTEGER;for(let b=m-1;b>=t.minY;b-=1){const k=t.getBlockState(Ye.create(c,b,p));if(k.equals(ge.AIR)||k.isFluid()){_=b+1;break}}}d+=1;const w=m-_+1;if(!y.equals(this.defaultBlock))continue;a.updateY(d,w,v,m);const A=l(c,m,p);A&&t.setBlockState(g,A)}}}}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 Ir(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class Cc{constructor(t,n,r,i,s){this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=s,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=tr(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=tr(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=tr(()=>this.getBiome(Ye.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,s=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),o=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(li((t&15)/16,(n&15)/16,s,o,a,l))+this.surfaceDepth-8}}var gi;(function(e){e.NOOP=()=>()=>{};function t(s){var l,u,c;const o=(l=R.readObject(s))!=null?l:{};switch((u=R.readString(o.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return n(ge.fromJson(o.result_state));case"sequence":return r((c=R.readArray(o.sequence,e.fromJson))!=null?c:[]);case"condition":return i(_i.fromJson(o.if_true),e.fromJson(o.then_run))}return e.NOOP}e.fromJson=t;function n(s){return()=>()=>s}e.block=n;function r(s){return o=>{const a=s.map(l=>l(o));return(l,u,c)=>{for(const h of a){const p=h(l,u,c);if(p)return p}}}}e.sequence=r;function i(s,o){return a=>(l,u,c)=>{if(s(a))return o(a)(l,u,c)}}e.condition=i})(gi||(gi={}));var _i;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(u){var p,d,v,_,m,g,y,w,A,b,k,S;const c=(p=R.readObject(u))!=null?p:{};switch((d=R.readString(c.type))==null?void 0:d.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((v=R.readArray(c.biome_is,I=>{var C;return(C=R.readString(I))!=null?C:""}))!=null?v:[]);case"not":return i(e.fromJson(c.invert));case"stone_depth":return s((_=R.readInt(c.offset))!=null?_:0,(m=R.readBoolean(c.add_surface_depth))!=null?m:!1,(g=R.readInt(c.secondary_depth_range))!=null?g:0,R.readString(c.surface_type)==="ceiling");case"vertical_gradient":return o((y=R.readString(c.random_name))!=null?y:"",kn.fromJson(c.true_at_and_below),kn.fromJson(c.false_at_and_above));case"water":return a((w=R.readInt(c.offset))!=null?w:0,(A=R.readInt(c.surface_depth_multiplier))!=null?A:0,(b=R.readBoolean(c.add_surface_depth))!=null?b:!1);case"y_above":return l(kn.fromJson(c.anchor),(k=R.readInt(c.surface_depth_multiplier))!=null?k:0,(S=R.readBoolean(c.add_surface_depth))!=null?S:!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 h=>c.has(h.biome())}e.biome=r;function i(u){return c=>!u(c)}e.not=i;function s(u,c,h,p){return d=>{const v=p?d.stoneDepthBelow:d.stoneDepthAbove,_=c?d.surfaceDepth:0,m=h===0?0:ur(d.surfaceSecondary(),-1,1,0,h);return v<=1+u+_+m}}e.stoneDepth=s;function o(u,c,h){return p=>{const d=c(p.context),v=h(p.context);if(p.blockY<=d)return!0;if(p.blockY>=v)return!1;const _=p.system.getRandom(u),m=ur(p.blockY,d,v,1,0);return _.nextFloat()<m}}e.verticalGradient=o;function a(u,c,h){return p=>{if(p.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const d=h?p.stoneDepthAbove:0;return p.blockY+d>=p.waterHeight+u+p.surfaceDepth*c}}e.water=a;function l(u,c,h){return p=>{const d=h?p.stoneDepthAbove:0;return p.blockY+d>=u(p.context)+p.surfaceDepth*c}}e.yAbove=l})(_i||(_i={}));class ap{constructor(t,n,r){this.biomeSource=n,this.settings=r,this.router=Ln.withSettings(r.noiseRouter,r.noise,t,r.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new Ic(r.surfaceRule,r.defaultBlock,t);const i=new dr(-54,ge.LAVA),s=new dr(r.seaLevel,r.defaultFluid);this.globalFluidPicker=(o,a,l)=>a<Math.min(-54,r.seaLevel)?i:s}fill(t,n=!1){var d;const r=Math.max(t.minY,this.settings.noise.minY),i=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),s=Fe.cellWidth(this.settings.noise),o=Fe.cellHeight(this.settings.noise),a=Math.floor(16/s),l=Math.floor(r/o),u=Math.floor((i-r)/o),c=Ue.minBlockX(t.pos),h=Ue.minBlockZ(t.pos),p=this.getNoiseChunk(t);for(let v=0;v<a;v+=1)for(let _=0;_<(n?1:a);_+=1){let m=t.getOrCreateSection(t.sectionsCount-1);for(let g=u-1;g>=0;g-=1)for(let y=o-1;y>=0;y-=1){const w=(l+g)*o+y,A=w&15,b=t.getSectionIndex(w);t.getSectionIndex(m.minBlockY)!==b&&(m=t.getOrCreateSection(b));for(let k=0;k<s;k+=1){const S=c+v*s+k,I=S&15;for(let C=0;C<(n?1:s);C+=1){const M=h+_*s+C,N=M&15,F=(d=p.getFinalState(S,w,M))!=null?d:this.settings.defaultBlock;m.setBlockState(I,A,N,F)}}}}}buildSurface(t,n="minecraft:plains"){const r=this.getNoiseChunk(t),i=mi.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,r,i,()=>n)}getNoiseChunk(t){return Ir(this.noiseChunkCache,Ue.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=Fe.cellWidth(this.settings.noise),s=Fe.cellHeight(this.settings.noise),o=Math.floor(16/i),a=Math.floor(n/s),l=Math.floor((r-n)/s),u=Ue.minBlockX(t.pos),c=Ue.minBlockZ(t.pos);return new Ec(o,l,a,this.router,u,c,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var _s;(function(e){function t(n){var i,s,o,a,l,u;const r=(i=R.readObject(n))!=null?i:{};return{surfaceRule:gi.fromJson(r.surface_rule),noise:Fe.fromJson(r.noise),defaultBlock:ge.fromJson(r.default_block),defaultFluid:ge.fromJson(r.default_fluid),noiseRouter:Ln.fromJson(r.noise_router),seaLevel:(s=R.readInt(r.sea_level))!=null?s:0,disableMobGeneration:(o=R.readBoolean(r.disable_mob_generation))!=null?o:!1,aquifersEnabled:(a=R.readBoolean(r.aquifers_enabled))!=null?a:!1,oreVeinsEnabled:(l=R.readBoolean(r.ore_veins_enabled))!=null?l:!1,legacyRandomSource:(u=R.readBoolean(r.legacy_random_source))!=null?u:!1}}e.fromJson=t})(_s||(_s={}));var Zo=Object.freeze(Object.defineProperty({__proto__:null,get Aquifer(){return fi},BlendedNoise:kc,get BlockPos(){return Ye},BlockState:ge,Chunk:op,get ChunkPos(){return Ue},ChunkSection:Pi,get Climate(){return hr},get CubicSpline(){return di},get DensityFunction(){return ae},get Direction(){return it},FixedBiome:fr,FluidStatus:dr,get Holder(){return sn},Identifier:we,ImprovedNoise:ms,get Json(){return R},LegacyPositionalRandom:xc,LegacyRandom:Xe,get MaterialRule(){return pi},get MinMaxNumberFunction(){return ui},MultiNoise:Hs,NoiseAquifer:Mr,NoiseChunk:Ec,NoiseChunkGenerator:ap,get NoiseGeneratorSettings(){return _s},get NoiseParameters(){return Nn},get NoiseRouter(){return Ln},get NoiseSettings(){return Fe},get NoiseSlideSettings(){return gs},get Noises(){return dt},NormalNoise:Cr,PerlinNoise:ve,PerlinSimplexNoise:ip,Registry:hi,SimplexNoise:Ge,Structure:Vs,get SurfaceCondition(){return _i},SurfaceContext:Cc,get SurfaceRule(){return gi},SurfaceSystem:Ic,get VerticalAnchor(){return kn},get WorldgenContext(){return mi},get WorldgenRegistries(){return on},XoroshiroPositionalRandom:Ac,XoroshiroRandom:Ae,binarySearch:bc,clamp:cr,clampedLerp:Li,clampedMap:Ri,computeIfAbsent:Ir,getSeed:zs,inverseLerp:Fs,isPowerOfTwo:np,lazy:tr,lazyLerp:nr,lazyLerp2:ps,lazyLerp3:yc,lerp:Dt,lerp2:li,lerp3:wc,longfromBytes:ci,map:ur,smoothstep:qr,square:Ct,upperPowerOfTwo:rp},Symbol.toStringTag,{value:"Module"}));let Xo=!1;async function lp(){Xo||(await pc(Wo),Xo=!0,console.debug(`Loaded deepslate-rs from "${Wo}"`))}const cp={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 Jo,Ko;async function up(e,t,n){var v,_,m;const{biomeSource:r}=await Mc(e,n),i=t.data,s=-Math.round(n.offset[0])-100+n.res/2,o=-Math.round(n.offset[1])-100+n.res/2,a=t.width*4/n.res,l=4/n.res,u=[s*n.scale,(200+s)*n.scale,n.res*n.scale],c=[o*n.scale,(200+o)*n.scale,n.res*n.scale],h=n.layers.has("biomes")?(v=r.getBiomes)==null?void 0:v.call(r,...u,64,65,1,...c):void 0,p=[...n.layers].filter(g=>g!=="biomes"),d=p.length===0||(_=r.getClimates)==null?void 0:_.call(r,...u,64,65,1,...c);for(let g=0;g<200;g+=n.res)for(let y=0;y<200;y+=n.res){const w=y*a+g*l,A=g/n.res*200/n.res+y/n.res,b=(g+s)*n.scale,k=(y+o)*n.scale;let S=[50,50,50];if(n.layers.has("biomes")){const I=(m=h==null?void 0:h[A])!=null?m:r.getBiome(b,64,k);S=fp(I.toString(),n.biomeColors)}else if(d&&p[0]){const I=d[A][p[0]],[C,M]=cp[p[0]],N=(I-C)/(M-C)*256;S=[N,N,N]}i[w]=S[0],i[w+1]=S[1],i[w+2]=S[2],i[w+3]=255}}async function dp(e,t,n,r){var a;const{biomeSource:i}=await Mc(e,r),[s,o]=pp([t,n],r);return K({biome:i.getBiome(s,64,o).toString()},(a=i.getClimate)==null?void 0:a.call(i,s,64,o))}async function Mc(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return nn(n,Jo)||(Jo=Mi(n),Ko=await hp(e,t)),{biomeSource:Ko}}async function hp(e,t){var n,r,i,s,o;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new fr(we.parse(e.biome));case"checkerboard":const a=((r=e.scale)!=null?r:2)+2,l=(s=(i=e.biomes)==null?void 0:i.length)!=null?s:0;return{getBiome(u,c,h){var d;const p=(((u>>a)+(h>>a))%l+l)%l;return we.parse((d=e.biomes)==null?void 0:d[p].node)}};case"multi_noise":switch((o=e.preset)==null?void 0:o.replace(/^minecraft:/,"")){case"nether":e=Ze(t.version,"1.18")?_p:gp;break;case"overworld":e=Ze(t.version,"1.18")?await vp():e;break}if(e=D.DataModel.unwrapLists(e),Ze(t.version,"1.18")){await lp();const u=new c0,c=N=>typeof N=="number"?[N,N]:N,[h,p,d,v,_,m,g,y,w,A,b,k,S,I]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const N of e.biomes){const{temperature:F,humidity:ne,continentalness:oe,erosion:he,weirdness:O,depth:$,offset:G}=N.parameters;h.push(c(F)[0]),p.push(c(F)[1]),d.push(c(ne)[0]),v.push(c(ne)[1]),_.push(c(oe)[0]),m.push(c(oe)[1]),g.push(c(he)[0]),y.push(c(he)[1]),w.push(c(O)[0]),A.push(c(O)[1]),b.push(c($)[0]),k.push(c($)[1]),S.push(G),I.push(u.getOrPut(N.biome,Math.floor(Math.random()*2147483647)))}const C=X0(new Float64Array(h),new Float64Array(p),new Float64Array(d),new Float64Array(v),new Float64Array(_),new Float64Array(m),new Float64Array(g),new Float64Array(y),new Float64Array(w),new Float64Array(A),new Float64Array(b),new Float64Array(k),new Float64Array(S),new Int32Array(I)),M=J0(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(N,F,ne){var he;const oe=Go(C,M,N,N+1,1,F,F+1,1,ne,ne+1,1);return we.parse((he=u.getA(oe[0]))!=null?he:"unknown")},getBiomes(N,F,ne,oe,he,O,$,G,T){return[...Go(C,M,N,F,ne,oe,he,O,$,G,T)].map(E=>{var L;return we.parse((L=u.getA(E))!=null?L:"unknown")})},getClimate(N,F,ne){const oe=Yo(M,N,N+1,1,F,F+1,1,ne,ne+1,1),[he,O,$,G,T]=oe.slice(0,5);return{temperature:he,humidity:O,continentalness:$,erosion:G,weirdness:T}},getClimates(N,F,ne,oe,he,O,$,G,T){const x=Yo(M,N,F,ne,oe,he,O,$,G,T),E=[];for(let L=0;L<x.length;L+=7){const[j,W,ce,je,at]=x.slice(L,L+5);E.push({temperature:j,humidity:W,continentalness:ce,erosion:je,weirdness:at})}return E}}}else{const u=["altitude","temperature","humidity","weirdness"].map((c,h)=>{var d;const p=e[`${c}_noise`];return p.firstOctave=et((d=p.firstOctave)!=null?d:-7,-100,-1),new Cr(new Xe(t.seed+BigInt(h)),p)});return!Array.isArray(e.biomes)||e.biomes.length===0?new fr(we.create("unknown")):{getBiome(c,h,p){const d=u.map(m=>m.sample(c,p,0));let v=1/0,_="";for(const{biome:m,parameters:g}of e.biomes){const y=Un(g.altitude-d[0])+Un(g.temperature-d[1])+Un(g.humidity-d[2])+Un(g.weirdness-d[3])+Un(g.offset);y<v&&(v=y,_=m)}return we.parse(_)}}}}throw new Error("Unknown biome source")}function fp(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:mp[e];return n===void 0?ql(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 mp={"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]},gp={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}}]},_p={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 vp(){return(await Jl("1.18","dimension","overworld")).generator.biome_source}const Zt=[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],Qo=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function wp(e,t,n){const r=new Xe(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new ve(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:o=>r.nextInt(o),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(o){return yp(o,this)}};for(let o=0;o<n.size[0]/16;o+=1)for(let a=0;a<n.size[2]/16;a+=1)Ze(n.version,void 0,"1.17")?gn([o*16,0,a*16],D.DataModel.unwrapLists(e),i):kp([o*16,0,a*16],D.DataModel.unwrapLists(e.placement),i);const s=t.data;t.data.fill(255);for(const[o,a]of i.placements){if(o[0]<0||o[1]<0||o[2]<0||o[0]>=n.size[0]||o[1]>=n.size[1]||o[2]>=n.size[2])continue;const l=o[2]*(t.width*4)+o[0]*4,u=a<Qo.length?Qo[a]:ql(i.features[a]);s[l]=et(50,205,u[0]),s[l+1]=et(50,205,u[1]),s[l+2]=et(50,205,u[2]),s[l+3]=255}for(let o=0;o<n.size[0];o+=1)for(let a=0;a<n.size[2];a+=1){if((Math.floor(o/16)+Math.floor(a/16))%2===0)continue;const l=a*(t.width*4)+o*4;for(let u=0;u<3;u+=1)s[l+u]=.85*s[l+u]}}function Rn(e){return e.startsWith("minecraft:")?e.slice(10):e}function rt(e,t){return[[e[0],t,e[2]]]}function yp(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(Rn(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 et(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(et(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const s=e.distribution.reduce((a,l)=>a+l.weight,0);let o=t.nextInt(s);for(const a of e.distribution)if(o-=a.weight,o<0)return t.sampleInt(a.data);return 0}return 1}function vt(e,t){if(!ln(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 bp(e,t){var n,r,i,s;if(!ln(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return vt(e);switch(Rn(e.type)){case"constant":return vt(e.value);case"uniform":{const o=vt(e.min_inclusive),a=vt(e.max_inclusive);return o+t.nextInt(a-o+1)}case"biased_to_bottom":{const o=vt(e.min_inclusive),a=vt(e.max_inclusive),l=t.nextInt(a-o-((n=e.inner)!=null?n:1)+1);return o+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const o=vt(e.min_inclusive),a=vt(e.max_inclusive),l=(i=e.inner)!=null?i:1,u=o+l+t.nextInt(a-o-l+1),c=o+t.nextInt(u-o);return o+t.nextInt(c-o+l)}case"trapezoid":{const o=vt(e.min_inclusive),a=vt(e.max_inclusive),l=(s=e.plateau)!=null?s:0;if(l>=a-o)return o+t.nextInt(a-o+1);const u=(a-o-l)/2,c=a-o-u;return o+t.nextInt(c+1)+t.nextInt(u+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function ea(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function gn(e,t,n){var s;if(typeof t=="string"){n.placements.push([e,ea(t,n)]);return}const r=Rn((s=t==null?void 0:t.type)!=null?s:"no_op"),i=xp[r];i?i(t.config,e,n):n.placements.push([e,ea(JSON.stringify(t),n)])}function vs(e,t,n){var s;const r=Rn((s=t==null?void 0:t.type)!=null?s:"nope"),i=Ap[r];return i?i(t==null?void 0:t.config,e,n):[e]}const xp={decorated:(e,t,n)=>{vs(t,e==null?void 0:e.decorator,n).forEach(i=>gn(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;gn(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const s of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=s==null?void 0:s.chance)!=null?i:0)){gn(t,s.feature,n);return}gn(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,s,o;const r=(o=e==null?void 0:e.features)==null?void 0:o[n.nextInt((s=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?s:0)];gn(t,r,n)}},Ap={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,s;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(s=e.extra_count)!=null?s: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 o;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),s=Math.max(0,Math.ceil((i+((o=e.noise_offset)!=null?o:0))*e.noise_to_count_ratio));return new Array(s).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const s=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],o=Math.max(n.seaLevel,Zt[et(0,63,s)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[s,o,a]}),decorated:(e,t,n)=>vs(t,e==null?void 0:e.outer,n).flatMap(r=>vs(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,s,o,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((s=e==null?void 0:e.spread)!=null?s:0)-((o=e.spread)!=null?o:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return rt(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,Zt[et(0,63,t[0])]);return rt(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,Zt[et(0,63,t[0])]);return rt(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,Zt[et(0,63,t[0])]);return rt(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 s=n.nextInt(n.nextInt(248)+8);if(s<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const o=n.nextInt(16)+t[0],a=n.nextInt(16)+t[2];return[[o,s,a]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,s,o;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0);return rt(t,r)},range_biased:(e,t,n)=>{var i,s,o;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0));return rt(t,r)},range_very_biased:(e,t,n)=>{var i,s,o,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return rt(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return rt(t,r)},top_solid_heightmap:(e,t)=>{const n=Zt[et(0,63,t[0])];return rt(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return rt(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var s,o;const n=Zt[et(0,63,t[0])],r=n+((s=e==null?void 0:e.min_inclusive)!=null?s:-1/0),i=n+((o=e==null?void 0:e.max_inclusive)!=null?o: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 kp(e,t,n){var i;let r=[e];for(const s of t)!ta[Rn((i=s==null?void 0:s.type)!=null?i:"nope")]||(r=r.flatMap(a=>ta[Rn(s.type)](s,a,n)));for(const s of r)n.placements.push([s,0])}const ta={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)=>rt(t,bp(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,Zt[et(0,63,e[0])]);return rt(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 s=Math.max(1,t),o=i.biomeInfoNoise.sample(r[0]/s,0,r[2]/s),a=Math.max(0,Math.ceil((o+(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 o=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(o).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]:[]},ws=class{constructor(){this.d=Zo,this.registriesLoaded=new Set,this.chunksCache=[]}async loadVersion(e){if(console.debug("Load deepslate version",this.loadedVersion,"->",e),Ze(e,"1.19")?this.d=Zo:Ze(e,"1.18.2")?this.d=await le(()=>import("./deepslate.esm.30593a54.js"),["assets/deepslate.esm.30593a54.js","assets/vec3.7a0b0b73.js"]):this.d=await le(()=>import("./deepslate.esm.819ae5b6.js"),["assets/deepslate.esm.819ae5b6.js","assets/vec3.7a0b0b73.js"]),this.d.WorldgenRegistries&&!this.registriesLoaded.has(e)){const t=[["worldgen/noise","NOISE",this.d.NoiseParameters],["worldgen/density_function","DENSITY_FUNCTION",this.d.DensityFunction]];await Promise.all(t.map(async([n,r,i])=>{const s=await b0(e,n),o=new this.d.Registry(this.d.Identifier.create(n));for(const[a,l]of s.entries())o.register(this.d.Identifier.parse(a),i.fromJson(l));this.d.WorldgenRegistries[r].assign(o)})),this.registriesLoaded.add(e)}console.debug("Finished loading deepslate version",this.loadedVersion,"->",e),this.loadedVersion=e}loadChunkGenerator(e,t,n="unknown"){const r=[e,`${t}`,n];if(!nn(this.cacheState,r)){const i=new this.d.FixedBiome(this.d.Identifier.parse(n)),s=this.d.NoiseGeneratorSettings.fromJson(D.DataModel.unwrapLists(e)),o=new this.d.NoiseChunkGenerator(t,i,s);this.settingsCache=s.noise,this.generatorCache=o,this.chunksCache=[],this.cacheState=Mi(r)}}generateChunks(e,t,n="unknown"){if(!this.settingsCache)throw new Error("Tried to generate chunks before settings are loaded");const r=this.settingsCache.minY,i=this.settingsCache.height;return[...Array(Math.ceil(t/16)+1)].map((s,o)=>{const a=(e>>4)+o,l=this.chunksCache.find(c=>c.pos[0]===a);if(l)return l;const u=new this.d.Chunk(r,i,this.d.ChunkPos.create(a,ws.Z>>4));if(!this.generatorCache)throw new Error("Tried to generate chunks before generator is loaded");return this.generatorCache.fill(u,!0),this.generatorCache.buildSurface(u,n),this.chunksCache.push(u),u})}loadDensityFunction(e,t){const n=this.d.XoroshiroRandom.create(t).forkPositional(),r=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=r,this.d.DensityFunction.fromJson(e).mapAll(new this.d.NoiseRouter.Visitor(n,r))}getNoiseSettings(){if(!this.settingsCache)throw new Error("Tried to access noise settings when they are not loaded");return this.settingsCache}getBlockState(e,t){const n=this.chunksCache.find(r=>this.d.ChunkPos.minBlockX(r.pos)<=e&&this.d.ChunkPos.maxBlockX(r.pos)>=e);return n==null?void 0:n.getBlockState(this.d.BlockPos.create(e,t,ws.Z))}};let Oc=ws;Oc.Z=0;class Sp{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 Xe(t);this.minLimitPerlinNoise=new ve(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new ve(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new ve(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new ve(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,s){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(s).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,s=this.fillNoiseColumn(r),o=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]=l0(u,i,s[a],s[a+1],o[a],o[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,s=684.412*this.settings.sampling.y_scale,o=i/this.settings.sampling.xz_factor,a=s/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,s,o,a);const d=((1-u*2/this.chunkCountY+l)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;c+=d*(d>0?4:1),this.settings.top_slide.size>0&&(c=Gi(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=Gi(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,s,o,a){let l=0,u=0,c=0,h=1;for(let p=0;p<16;p+=1){const d=ve.wrap(t*i*h),v=ve.wrap(n*s*h),_=ve.wrap(r*i*h),m=s*h,g=this.minLimitPerlinNoise.getOctaveNoise(p);g&&(l+=g.sample(d,v,_,m,n*m)/h);const y=this.maxLimitPerlinNoise.getOctaveNoise(p);if(y&&(u+=y.sample(d,v,_,m,n*m)/h),p<8){const w=this.mainPerlinNoise.getOctaveNoise(p);w&&(c+=w.sample(ve.wrap(t*o*h),ve.wrap(n*a*h),ve.wrap(r*o*h),a*h,n*a*h)/h)}h/=2}return Gi(l/512,u/512,(c/10+1)/2)}}const Ep={"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]},Rt=new Oc;async function Ip(e,t,n){var o,a,l,u;if(Ze(n.version,"1.18")){await Rt.loadVersion(n.version),Rt.loadChunkGenerator(e,n.seed,n.biome),Rt.generateChunks(-n.offset,n.width,n.biome);const c=Rt.getNoiseSettings(),h=t.data;for(let p=0;p<n.width;p+=1)for(let d=0;d<c.height;d+=1){const v=p*4+(c.height-d-1)*4*t.width,_=(o=Rt.getBlockState(p-n.offset,d+c.minY))!=null?o:ge.AIR,m=(a=Ep[_.getName().toString()])!=null?a:[0,0,0];h[v]=m[0],h[v+1]=m[1],h[v+2]=m[2],h[v+3]=255}return}const r=new Sp(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,s=t.width*4;for(let c=0;c<n.width;c+=1){const h=r.iterateNoiseColumn(c-n.offset).reverse();for(let p=0;p<e.noise.height;p+=1){const d=p*s+c*4,v=Op(h,p);i[d]=v,i[d+1]=v,i[d+2]=v,i[d+3]=255}}}function Cp(e,t){return Rt.getBlockState(e,t)}async function Mp(e,t,n){await Rt.loadVersion(n.version);const r=Rt.loadDensityFunction(e,n.seed),i=Rt.getNoiseSettings(),s=Array(n.width*i.height);let o=1/0,a=-1/0;for(let u=0;u<n.width;u+=1)for(let c=0;c<i.height;c+=1){const h=u+(i.height-c-1)*n.width,p=r.compute(ae.context(u-n.offset,c,0));o=Math.min(o,p),a=Math.max(a,p),s[h]=p}const l=t.data;for(let u=0;u<n.width*i.height;u+=1){const c=Math.floor(Ri(s[u],o,a,0,256));l[4*u]=c,l[4*u+1]=c,l[4*u+2]=c,l[4*u+3]=255}}function Op(e,t){return e[t]>0?0:e[t+1]>0?150:255}function Tp(e,t,n){const r=new Xe(n.seed),i=Nn.fromJson(D.DataModel.unwrapLists(e)),s=new Cr(r,i),o=-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 h=u*4+c*4*256,p=(u+o)*n.scale,d=(c+a)*n.scale,v=(s.sample(p,d,0)+1)*128;l[h]=v,l[h+1]=v,l[h+2]=v,l[h+3]=255}}const Np=["biomes","temperature","humidity","continentalness","erosion","weirdness"],Lp=({model:e,data:t,shown:n,version:r})=>{var k,S;const{locale:i}=Se(),[s]=P(Bt()),[o,a]=P(2),[l,u]=P(void 0),[c,h]=P(new Set(["biomes"])),p=_e([0,0]),d=_e(1),v=_e(),_=BigInt((k=e.get(new D.Path(["generator","seed"])))!=null?k:s),m=xe(()=>{if(!!n)return Pp(e.get(new D.Path(["generator","settings"])))},[n]),g=n?Rp(t,m):"",y=(S=t.type)==null?void 0:S.replace(/^minecraft:/,""),{canvas:w,redraw:A}=Sr({size(){return[200/d.current,200/d.current]},async draw(I){const C={octaves:m,biomeColors:{},layers:c,offset:p.current,scale:o,seed:_,res:d.current,version:r};await up(t,I,C),d.current===4&&(clearTimeout(v.current),v.current=setTimeout(()=>{d.current=1,A()},150))},async onDrag(I,C){p.current[0]=p.current[0]+I*200,p.current[1]=p.current[1]+C*200,clearTimeout(v.current),d.current=y==="multi_noise"?4:1,A()},async onHover(I,C){const M={octaves:m,biomeColors:{},layers:c,offset:p.current,scale:o,seed:s,res:1,version:r},N=await dp(t,Math.floor(I*200),Math.floor(C*200),M);u(N)},onLeave(){u(void 0)}},[g,o,s,c]);X(()=>{n&&(d.current=y==="multi_noise"?4:1,A())},[g,o,s,c,n]);const b=I=>{p.current[0]=p.current[0]*o/I,p.current[1]=p.current[1]*o/I,a(I)};return f(te,null,f("div",{class:"controls preview-controls"},l&&f(q,{label:l.biome,class:"no-pointer"}),y==="multi_noise"&&f(qe,{icon:"stack",tooltip:i("configure_layers")},Np.map(I=>{const C=c.has(I);return f(q,{label:i(`layer.${I}`),active:C,tooltip:i(C?"enabled":"disabled"),onClick:M=>{h(new Set([I])),M.stopPropagation()}})})),(y==="multi_noise"||y==="checkerboard")&&f(te,null,f(q,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>b(o*1.5)}),f(q,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>b(o/1.5)})),y==="multi_noise"&&f(q,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>Ul(e)})),(l==null?void 0:l.temperature)!==void 0&&f("div",{class:"controls secondary-controls"},f(q,{class:"no-pointer",label:Object.entries(l).filter(([I])=>I!=="biome").map(([I,C])=>`${I[0].toUpperCase()}: ${C.toFixed(2)}`).join(" ")})),f("canvas",{ref:w,width:"200",height:"200"}))};function Rp(e,t){return JSON.stringify([e,t])}function Pp(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"end":case"floating_islands":return{temperature:{firstOctave:0,amplitudes:[0]},humidity:{firstOctave:0,amplitudes:[0]},continentalness:{firstOctave:0,amplitudes:[0]},erosion:{firstOctave:0,amplitudes:[0]},weirdness:{firstOctave:0,amplitudes:[0]},shift:{firstOctave:0,amplitudes:[0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}}const Dp=({data:e,version:t,shown:n})=>{const{locale:r}=Se(),[i,s]=P(4),[o,a]=P(Bt()),{canvas:l,redraw:u}=Sr({size(){return[i*16,i*16]},async draw(h){wp(e,h,{seed:o,version:t,size:[i*16,128,i*16]})}}),c=JSON.stringify(e);return X(()=>{n&&u()},[c,i,o,n]),f(te,null,f("div",{class:"controls preview-controls"},f(q,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>s(Math.min(16,i+1))}),f(q,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>s(Math.max(1,i-1))}),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(Bt())})),f("canvas",{ref:l,width:"64",height:"64"}))},$p=({data:e,shown:t,version:n})=>{var m,g;const{locale:r}=Se(),[i,s]=P(Bt()),[o,a]=P(!1),[l,u]=P(void 0),c=_e(0),h=_e(void 0),p=JSON.stringify([e]),d=(g=(m=e==null?void 0:e.noise)==null?void 0:m.height)!=null?g:256,{canvas:v,redraw:_}=Sr({size(){return[d,d]},async draw(y){const w={offset:c.current,width:y.width,seed:i,version:n};await Mp(e,y,w)},async onDrag(y){c.current+=y*d,_()},async onHover(y,w){var k,S;const A=Math.floor(y*d-c.current),b=d-Math.max(1,Math.ceil(w*d))+((S=(k=e==null?void 0:e.noise)==null?void 0:k.min_y)!=null?S:0);u(`X=${A} Y=${b}`)},onLeave(){u(void 0)}},[p,i]);return X(()=>{h.current&&clearInterval(h.current),t&&(_(),o&&(h.current=setInterval(()=>{c.current-=8,_()},100)))},[p,i,t,o]),f(te,null,f("div",{class:"controls preview-controls"},l&&f(q,{label:l,class:"no-pointer"}),f(qe,{icon:"gear",tooltip:r("terrain_settings")},f(q,{icon:o?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>a(!o)})),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(Bt())})),f("canvas",{ref:v,width:d,height:d}))},Bp=({data:e,shown:t,version:n})=>{const{locale:r}=Se(),[i,s]=P(Bt()),[o,a]=P(2),l=_e([0,0]),u=JSON.stringify([e]),{canvas:c,redraw:h}=Sr({size(){return[256,256]},async draw(d){const v={offset:l.current,scale:o,seed:i,version:n};Tp(e,d,v)},async onDrag(d,v){l.current[0]=l.current[0]+d*256,l.current[1]=l.current[1]+v*256,h()}},[u,o,i]);X(()=>{t&&h()},[u,o,i,t]);const p=d=>{l.current[0]=l.current[0]*o/d,l.current[1]=l.current[1]*o/d,a(d)};return f(te,null,f("div",{class:"controls preview-controls"},f(q,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>p(o*1.5)}),f(q,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>p(o/1.5)}),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(Bt())})),f("canvas",{ref:c,width:"256",height:"256"}))},Fp=({data:e,shown:t,version:n})=>{var S,I;const{locale:r}=Se(),[i,s]=P(Bt()),[o,a]=P("minecraft:plains"),[l,u]=P(.2),[c,h]=P(.1),[p,d]=P(!1),[v,_]=P(void 0),m=_e(0),g=_e(void 0),y=JSON.stringify([e,l,c]),w=(I=(S=e==null?void 0:e.noise)==null?void 0:S.height)!=null?I:256,{canvas:A,redraw:b}=Sr({size(){return[w,w]},async draw(C){const M={biome:o,biomeDepth:c,biomeScale:l,offset:m.current,width:C.width,seed:i,version:n};await Ip(e,C,M)},async onDrag(C){m.current+=C*w,b()},async onHover(C,M){var oe,he;const N=Math.floor(C*w-m.current),F=w-Math.max(1,Math.ceil(M*w))+((he=(oe=e==null?void 0:e.noise)==null?void 0:oe.min_y)!=null?he:0),ne=Cp(N,F);_(ne?`Y=${F} (${ne.getName().path})`:`Y=${F}`)},onLeave(){_(void 0)}},[y,i]);X(()=>{g.current&&clearInterval(g.current),t&&(async()=>{try{await b(),p&&(g.current=setInterval(()=>{m.current-=8,b()},100))}catch(C){throw C}})()},[y,i,t,o,l,c,p]);const k=xe(()=>{var C;return(C=Wr==null?void 0:Wr.get("worldgen/biome"))!=null?C:[]},[n]);return f(te,null,f("div",{class:"controls preview-controls"},v&&f(q,{label:v,class:"no-pointer"}),f(qe,{icon:"gear",tooltip:r("terrain_settings")},Ze(n,void 0,"1.17")?f(te,null,f(Yr,{label:r("preview.scale"),value:`${l}`,onChange:C=>u(Number(C))}),f(Yr,{label:r("preview.depth"),value:`${c}`,onChange:C=>h(Number(C))})):f(Yr,{label:r("preview.biome"),value:o,onChange:a,dataList:k,larger:!0}),f(q,{icon:p?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>d(!p)})),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(Bt())})),f("canvas",{ref:A,width:w,height:w}))},zp=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function jp({model:e,version:t,id:n,shown:r}){var s;const[,i]=P(0);if(Oi(e,()=>{i(o=>o+1)}),!e)return f(te,null);if(n==="dimension"&&((s=e.get(new D.Path(["generator","type"])))==null?void 0:s.endsWith("noise"))){const o=e.get(new D.Path(["generator","biome_source"]));if(o)return f(Lp,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/density_function"){const o=e.get(new D.Path([]));if(o)return f($p,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/noise"){const o=e.get(new D.Path([]));if(o)return f(Bp,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/noise_settings"){const o=e.get(new D.Path([]));if(o)return f(Fp,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&Ze(t,"1.16","1.17")){const o=e.get(new D.Path([]));if(o)return f(Dp,{model:e,version:t,shown:r,data:o})}return f(te,null)}function Jr(e,t){return e.schema.hook(Vp,new D.ModelPath(e),e.data,{blockStates:t})}const Vp={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((s,o)=>e.hook(this,t.push(o),s.node,r));for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i},map({children:e,config:t},n,r,i){var a,l;if(r===void 0)return;const s=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[D.relativePath(n,t.validation.params.id).get()]:null,o={};Object.keys(r).forEach(u=>{var c;s&&!Object.keys((c=s.properties)!=null?c:{}).includes(u)||(o[u]=e.hook(this,n.push(u),r[u],i))});for(const u of Object.getOwnPropertySymbols(r))o[u]=r[u];return o},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},s=e(t);Object.keys(s).filter(o=>s[o].enabled(t)).forEach(o=>{const a=s[o].hook(this,t.push(o),n[o],r);a!=null&&(i[o]=a)});for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i}},Zi={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let Gn=null;const Xi={json:{parse:async e=>{try{return JSON.parse(e)}catch{return Gn=await le(()=>import("./index.f23a6c5d.js").then(function(n){return n.i}),[]),Gn.parse(e)}},stringify:(e,t)=>(Gn!=null?Gn:JSON).stringify(e,null,t)+`
`},yaml:{parse:async e=>cs.load(e),stringify:(e,t)=>cs.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function Hp({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:s,copySuccess:o,onError:a}){const{locale:l}=Se(),[u,c]=P(Re.getIndent()),[h,p]=P(Re.getFormat()),[d,v]=P(Re.getHighlighting()),[_,m]=P(!1),g=_e(null),y=_e(()=>{}),w=_e(async()=>{}),A=_e(null),b=_e(),k=Pe((M,N)=>{const F=Jr(M,N);return Xi[h].stringify(F,Zi[u])},[u,h]);X(()=>{y.current=()=>{if(!!b.current&&!(!t||!n))try{const M=k(t,n);b.current.setValue(M)}catch(M){M instanceof Error?(M.message=`Error getting JSON output: ${M.message}`,a(M)):a(`Error getting JSON output: ${st(M)}`),console.error(M),b.current.setValue("")}},w.current=async()=>{if(!b.current)return;const M=b.current.getValue();if(M.length!==0)try{const N=await Xi[h].parse(M);t==null||t.reset(D.DataModel.wrapLists(N),!1)}catch(N){N instanceof Error?(N.message=`Error importing: ${N.message}`,a(N)):a(`Error importing: ${st(N)}`),console.error(N)}}},[t,n,u,h,d]),X(()=>{d?(m(!1),b.current={getValue(){return""},setValue(){},configure(){},select(){}},le(()=>import("./index.8ac52a74.js").then(function(M){return M.i}),[]).then(async M=>{await Promise.all([le(()=>import("./json.c327d69b.js").then(function(F){return F.j}),[]),le(()=>import("./yaml.e8f3b9ab.js"),[])]);const N=M.edit("editor");N.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),N.$blockScrolling=1/0,N.on("blur",()=>w.current()),N.getSession().setMode("ace/mode/json"),b.current={getValue(){return N.getSession().getValue()},setValue(F){N.getSession().setValue(F)},configure(F,ne){N.setOption("useSoftTabs",F!=="tabs"),N.setOption("tabSize",F==="tabs"?4:Zi[F]),N.getSession().setMode(`ace/mode/${ne}`)},select(){N.selectAll()}},m(!0)})):b.current={getValue(){return A.current?A.current.value:""},setValue(M){!A.current||(A.current.value=M)},configure(){},select(){}}},[d]),Oi(t,()=>{!y.current||y.current()}),X(()=>{!y.current||t&&y.current()},[t]),X(()=>{!b.current||!y.current||(!d||_)&&(b.current.configure(u,h),y.current())},[u,h,d,_]),X(()=>{r&&t&&n&&navigator.clipboard.writeText(k(t,n)).then(()=>{o()})},[r]),X(()=>{if(i&&t&&n&&g.current){const M=encodeURIComponent(k(t,n));g.current.setAttribute("href",`data:text/json;charset=utf-8,${M}`),g.current.setAttribute("download",`${e}.${h}`),g.current.click()}},[i]),X(()=>{s&&b.current&&(b.current.setValue(""),b.current.select())},[s]);const S=M=>{Re.setIndent(M),c(M)},I=M=>{Re.setFormat(M),p(M)},C=M=>{Re.setHighlighting(M),v(M)};return f(te,null,f("div",{class:"controls source-controls"},f(qe,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(Zi).map(([M])=>f(q,{label:l(`indentation.${M}`),active:u===M,onClick:()=>S(M)})),f("hr",null),Object.keys(Xi).map(M=>f(q,{label:l(`format.${M}`),active:h===M,onClick:()=>I(M)})),f("hr",null),f(q,{icon:d?"square_fill":"square",label:l("highlighting"),onClick:()=>C(!d)}))),d?f("pre",{id:"editor",class:"source"}):f("textarea",{ref:A,class:"source",spellcheck:!1,autocorrect:"off",onBlur:w.current}),f("a",{ref:g,style:"display: none;"}))}function Tc(e,t){for(var n in t)e[n]=t[n];return e}function ys(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 bs(e){this.props=e}function Nc(e,t){function n(i){var s=this.props.ref,o=s==i.ref;return!o&&s&&(s.call?s(null):s.current=null),t?!t(this.props,i)||!o:ys(this.props,i)}function r(i){return this.shouldComponentUpdate=n,f(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(bs.prototype=new ht).isPureReactComponent=!0,bs.prototype.shouldComponentUpdate=function(e,t){return ys(this.props,e)||ys(this.state,t)};var na=U.__b;U.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),na&&na(e)};var Up=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Gp(e){function t(n,r){var i=Tc({},n);return delete i.ref,e(i,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return t.$$typeof=Up,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ra=function(e,t){return e==null?null:ft(ft(e).map(t))},Yp={map:ra,forEach:ra,count:function(e){return e?ft(e).length:0},only:function(e){var t=ft(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:ft},Wp=U.__e;U.__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)}Wp(e,t,n)};var ia=U.unmount;function Kr(){this.__u=0,this.t=null,this.__b=null}function Lc(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function qp(e){var t,n,r;function i(s){if(t||(t=e()).then(function(o){n=o.default||o},function(o){r=o}),r)throw r;if(!n)throw t;return f(n,s)}return i.displayName="Lazy",i.__f=!0,i}function Zn(){this.u=null,this.o=null}U.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),ia&&ia(e)},(Kr.prototype=new ht).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Lc(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function h(p,d,v){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(_){return h(_,d,v)}),p.__c&&p.__c.__P===d&&(p.__e&&v.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=v)),p}(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(o,o)},Kr.prototype.componentWillUnmount=function(){this.t=[]},Kr.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 s(o,a,l){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),o.__c.__H=null),(o=Tc({},o)).__c!=null&&(o.__c.__P===l&&(o.__c.__P=a),o.__c=null),o.__k=o.__k&&o.__k.map(function(u){return s(u,a,l)})),o}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&f(te,null,e.fallback);return i&&(i.__h=null),[f(te,null,t.__e?null:e.children),i]};var sa=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 Zp(e){return this.getChildContext=function(){return e.context},e.children}function Xp(e){var t=this,n=e.i;t.componentWillUnmount=function(){Sn(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)}}),Sn(f(Zp,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Jp(e,t){return f(Xp,{__v:e,i:t})}(Zn.prototype=new ht).__e=function(e){var t=this,n=Lc(t.__v),r=t.o.get(e);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),sa(t,e,r)):i()};n?n(s):s()}},Zn.prototype.render=function(e){this.u=null,this.o=new Map;var t=ft(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},Zn.prototype.componentDidUpdate=Zn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){sa(e,n,t)})};var Rc=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Kp=/^(?: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]/,Qp=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function e1(e,t,n){return t.__k==null&&(t.textContent=""),Sn(e,t),typeof n=="function"&&n(),e?e.__c:null}function t1(e,t,n){return Ga(e,t),typeof n=="function"&&n(),e?e.__c:null}ht.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ht.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var oa=U.event;function n1(){}function r1(){return this.cancelBubble}function i1(){return this.defaultPrevented}U.event=function(e){return oa&&(e=oa(e)),e.persist=n1,e.isPropagationStopped=r1,e.isDefaultPrevented=i1,e.nativeEvent=e};var Pc,aa={configurable:!0,get:function(){return this.class}},la=U.vnode;U.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){for(var i in r={},n){var s=n[i];i==="value"&&"defaultValue"in n&&s==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Qp(n.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():Kp.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():s===null&&(s=void 0),r[i]=s)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=ft(n.children).forEach(function(o){o.props.selected=r.value.indexOf(o.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=ft(n.children).forEach(function(o){o.props.selected=r.multiple?r.defaultValue.indexOf(o.props.value)!=-1:r.defaultValue==o.props.value})),e.props=r}t&&n.class!=n.className&&(aa.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",aa)),e.$$typeof=Rc,la&&la(e)};var ca=U.__r;U.__r=function(e){ca&&ca(e),Pc=e.__c};var s1={ReactCurrentDispatcher:{current:{readContext:function(e){return Pc.__n[e.__c].props.value}}}};typeof performance=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function o1(e){return f.bind(null,e)}function Dc(e){return!!e&&e.$$typeof===Rc}function a1(e){return Dc(e)?Ya.apply(null,arguments):e}function l1(e){return!!e.__k&&(Sn(null,e),!0)}function c1(e){return e&&(e.base||e.nodeType===1&&e)||null}var u1=function(e,t){return e(t)},xs={useState:P,useReducer:Qa,useEffect:X,useLayoutEffect:el,useRef:_e,useImperativeHandle:Tu,useMemo:xe,useCallback:Pe,useContext:$n,useDebugValue:Nu,version:"16.8.0",Children:Yp,render:e1,hydrate:t1,unmountComponentAtNode:l1,createPortal:Jp,createElement:f,createContext:Pn,createFactory:o1,cloneElement:a1,createRef:pu,Fragment:te,isValidElement:Dc,findDOMNode:c1,Component:ht,PureComponent:bs,memo:Nc,forwardRef:Gp,unstable_batchedUpdates:u1,StrictMode:te,Suspense:Kr,SuspenseList:Zn,lazy:qp,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:s1};class $c extends D.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 d1=["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"],h1=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],f1=["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"],m1=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],g1=["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"],ua=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],_1=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],v1=e=>me.generators.find(t=>t.id===e.replace(/^\$/,"")),w1=new D.DataModel(D.MapNode(D.StringNode(),D.StringNode()),{historyMax:0});function y1({model:e,lang:t,version:n,blockStates:r}){var l;const i=new D.ModelPath(e),[s,o,a]=e.schema.hook(Bc,i,Mi(e.data),t,n,r,{});return(l=o==null?void 0:o.props)!=null&&l.children.some(u=>u)?f("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i)},f("div",{class:"node-header"},s,o),f("div",{class:"node-body"},a)):a}const Bc={base(){return[null,null,null]},boolean(e,t,n,r,i,s,o){return[null,f(b1,K({},ke(K({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]},choice({choices:e,config:t,switchNode:n},r,i,s,o,a,l){const u=n.activeCase(r,!0),c=t!=null&&t.context?new D.ModelPath(r.getModel(),new D.Path(r.getArray(),[t.context])):r,[h,p,d]=u.node.hook(this,c,i,s,o,a,l);if(e.length===1)return[h,p,d];const v=t!=null&&t.choiceContext?new D.Path([],[t.choiceContext]):t!=null&&t.context?new D.Path([],[t.context]):r,_=g=>{var b;const y=(b=e.find(k=>k.type===g))!=null?b:u,w=y.node.default(),A=y.change?y.change(D.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(w==null?void 0:w.type)==="minecraft:decorated"?w.config.feature:w;r.model.set(r,D.DataModel.wrapLists(A))},m=f("select",{value:u.type,onChange:g=>_(g.target.value)},e.map(g=>f("option",{value:g.type},vi(s,v.contextPush(g.type)))));return[h,f(te,null,m,p),d]},list({children:e,config:t},n,r,i,s,o,a){const{expand:l,collapse:u,isToggled:c}=Ji(),[h,p]=P(50),d=n.getContext().join(".");if(g1.includes(d)){const y=f(te,null,[...Array(t.maxLength)].map((A,b)=>f(Xn,{lang:i,path:n.modelPush(b)})),f("div",{class:"fixed-list"})),w=f(te,null,[...Array(t.maxLength)].map((A,b)=>{var S;return e.hook(this,n.modelPush(b),(S=r==null?void 0:r[b])==null?void 0:S.node,i,s,o,a)[1]}));return[y,w,null]}const v=()=>{Array.isArray(r)||(r=[]);const y=D.DataModel.wrapLists(e.default());n.model.set(n,[{node:y,id:Qt()},...r])},_=()=>{Array.isArray(r)||(r=[]);const y=D.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:y,id:Qt()}])},m=f("button",{class:"add tooltipped tip-se","aria-label":de(i,"add_top"),onClick:v},se.plus_circle),g=f(te,null,r&&Array.isArray(r)&&r.map(({node:y,id:w},A)=>{if(A===h)return f("div",{class:"node node-header"},f("label",null,de(i,"entries_hidden",`${r.length-h}`)),f("button",{onClick:()=>p(Math.min(h+50,r.length))},de(i,"entries_hidden.more","50")),f("button",{onClick:()=>p(r.length)},de(i,"entries_hidden.all")));if(A>h)return null;const b=n.push(A).contextPush("entry"),k=e.type(b)==="object",S=c(w);if(k&&(S===!1||S===void 0&&r.length>20))return f("div",{class:"node node-header","data-category":e.category(b)},f(Xn,{lang:i,path:b,nested:!0}),f("button",{class:"toggle tooltipped tip-se","aria-label":`${de(i,"expand")}
${de(i,"expand_all","Ctrl")}`,onClick:l(w)},se.chevron_right),f("label",null,vi(i,b,`${A}`)),f(da,{key:w,path:b,value:y,schema:e}));const I=()=>b.set(void 0),C=()=>{const F=[...n.get()];[F[A-1],F[A]]=[F[A],F[A-1]],n.model.set(n,F)},M=()=>{const F=[...n.get()];[F[A+1],F[A]]=[F[A],F[A+1]],n.model.set(n,F)};return f(Ki,{key:w,path:b,schema:e,value:y,lang:i,version:s,states:o,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const F=[...n.get()];F.splice(A,0,{id:Qt(),node:Mi(y)}),n.model.set(n,F)}}],ctx:ke(K({},a),{index:(A===0?1:0)+(A===r.length-1?2:0)})},k&&f("button",{class:"toggle tooltipped tip-se","aria-label":`${de(i,"collapse")}
${de(i,"collapse_all","Ctrl")}`,onClick:u(w)},se.chevron_down),f("button",{class:"remove tooltipped tip-se","aria-label":de(i,"remove"),onClick:I},se.trashcan),r.length>1&&f("div",{class:"node-move"},f("button",{class:"move tooltipped tip-se","aria-label":de(i,"move_up"),onClick:C,disabled:A===0},se.chevron_up),f("button",{class:"move tooltipped tip-se","aria-label":de(i,"move_down"),onClick:M,disabled:A===r.length-1},se.chevron_down)))}),r&&r.length>0&&r.length<=h&&f("div",{class:"node node-header"},f("button",{class:"add tooltipped tip-se","aria-label":de(i,"add_bottom"),onClick:_},se.plus_circle)));return[null,m,g]},map({children:e,keys:t,config:n},r,i,s,o,a,l){var y,w,A,b,k;const{expand:u,collapse:c,isToggled:h}=Ji(),p=new D.ModelPath(w1,new D.Path([S1(r.toString())])),d=()=>{const S=p.get();r.model.set(r.push(S),D.DataModel.wrapLists(e.default()))},v=((y=n.validation)==null?void 0:y.validator)==="block_state_map"?a==null?void 0:a[D.relativePath(r,n.validation.params.id).get()]:null,_=v!=null&&v.properties?D.StringNode(null,{enum:Object.keys((w=v.properties)!=null?w:{})}):t;if(v&&r.last()==="Properties"){typeof i!="object"&&(i={});const S=Object.entries((A=v.properties)!=null?A:{}).map(([I,C])=>[I,D.StringNode(null,{enum:C})]);return Object.entries((b=v.properties)!=null?b:{}).forEach(([I,C])=>{typeof i[I]!="string"?r.model.errors.add(r.push(I),"error.expected_string"):C.includes(i[I])||r.model.errors.add(r.push(I),"error.invalid_enum_option",i[I])}),D.ObjectNode(Object.fromEntries(S)).hook(this,r,i,s,o,a,l)}const m=f(te,null,_.hook(this,p,(k=p.get())!=null?k:"",s,o,a,l)[1],f("button",{class:"add tooltipped tip-se","aria-label":de(s,"add"),onClick:d},se.plus_circle)),g=f(te,null,typeof i=="object"&&Object.entries(i).map(([S,I])=>{var oe,he,O,$;const C=r.modelPush(S),M=e.type(C)==="object",N=h(S);if(M&&(N===!1||N===void 0&&i.length>20))return f("div",{class:"node node-header","data-category":e.category(C)},f(Xn,{lang:s,path:C,nested:!0}),f("button",{class:"toggle tooltipped tip-se","aria-label":`${de(s,"expand")}
${de(s,"expand_all","Ctrl")}`,onClick:u(S)},se.chevron_right),f("label",null,S),f(da,{key:S,path:C,value:I,schema:e}));const F=v?D.StringNode(null,{enum:(he=(oe=v.properties)==null?void 0:oe[S])!=null?he:[]}):e;((O=v==null?void 0:v.properties)==null?void 0:O[S])&&typeof I=="string"&&!(($=v.properties)!=null&&$[S].includes(I))&&r.model.errors.add(C,"error.invalid_enum_option",I);const ne=()=>C.set(void 0);return f(Ki,{key:S,schema:F,path:C,value:I,lang:s,version:o,states:a,ctx:l,label:S},M&&f("button",{class:"toggle tooltipped tip-se","aria-label":`${de(s,"collapse")}
${de(s,"collapse_all","Ctrl")}`,onClick:c(S)},se.chevron_down),f("button",{class:"remove tooltipped tip-se","aria-label":de(s,"remove"),onClick:ne},se.trashcan))}));return[null,m,g]},number(e,t,n,r,i,s,o){return[null,f(x1,K({},ke(K({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,s,o,a,l,u){var y;const{expand:c,collapse:h,isToggled:p}=Ji();if(i.getArray().length==0&&E1(t.context,s)){const{wrapper:w,fields:A}=I1(n(i),i,s);s=w.data,n=()=>A,r=(b,k)=>new D.ModelPath(w,new D.Path(b.getArray(),["feature"])).push(k)}let d=null,v=null;if(e.optional())if(s===void 0){const w=()=>i.set(D.DataModel.wrapLists(e.default()));v=f("button",{class:"collapse closed tooltipped tip-se","aria-label":de(o,"expand"),onClick:w},se.plus_circle)}else{const w=()=>i.set(void 0);v=f("button",{class:"collapse open tooltipped tip-se","aria-label":de(o,"remove"),onClick:w},se.trashcan)}const _=i.getContext().join(".");if(_1.includes(_)||ua.includes(_)){const w=p(""),A=ua.includes(_)?w:!w;if(d=f(te,null,f("button",{class:"toggle tooltipped tip-se","aria-label":de(o,A?"collapse":"expand"),onClick:w?h(""):c("")},A?se.chevron_down:se.chevron_right)),!A)return[d,v,null]}const m=typeof s=="object"&&s!==null&&((y=e.default())==null?void 0:y.pools)?ke(K({},u),{loot:s==null?void 0:s.type}):u,g=f(te,null,typeof s=="object"&&s!==null&&!(e.optional()&&s===void 0)&&Object.entries(n(i)).filter(([w,A])=>A.enabled(i)).map(([w,A])=>{const b=r(i,w),k=b.getContext().join(".");if(h1.includes(k))return null;const[S,I,C]=A.hook(this,b,s[w],o,a,l,m),M=A.type(b)==="object"&&f1.includes(k),N=p1.includes(k);return M||N?(d=f(te,null,d,f(Xn,{lang:o,path:b}),f(Fc,{lang:o,path:b}),S),v=f(te,null,v,I),M?C:null):f(Ki,{key:w,schema:A,path:b,value:s[w],lang:o,version:a,states:l,ctx:m})}));return[d,v,g]},string(e,t,n,r,i,s,o){return[null,f(A1,K({},ke(K({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]}};function da({path:e,value:t}){var r,i,s,o,a;switch(e.getContext().join(".")){case"loot_table.pools.entry":return f("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 f("label",null,(a=(s=t==null?void 0:t.name)==null?void 0:s.replace(/^minecraft:/,""))!=null?a:(o=t==null?void 0:t.type)==null?void 0:o.replace(/^minecraft:/,""))}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return f("label",null,l.replace(/^minecraft:/,""));return null}function Ji(){const[e,t]=P(new Map),[n,r]=P(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 b1({path:e,node:t,value:n,lang:r}){const i=s=>{e.model.set(e,t.optional()&&n===s?void 0:s)};return f(te,null,f("button",{class:n===!1?"selected":"",onClick:()=>i(!1)},de(r,"false")),f("button",{class:n===!0?"selected":"",onClick:()=>i(!0)},de(r,"true")))}function x1({path:e,config:t,integer:n,value:r,lang:i}){var a;const s=l=>{const u=l.target.value,c=n?parseInt(u):parseFloat(u);e.model.set(e,c)},o=l=>{const u=l.target.value,c=parseInt(u.slice(1),16);e.model.set(e,c)};return f(te,null,f("input",{type:"text",value:r!=null?r:"",onBlur:s,onKeyDown:l=>{l.key==="Enter"&&s(l)}}),(t==null?void 0:t.color)&&f("input",{type:"color",value:"#"+((a=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?a:"000000"),onChange:o}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&f("button",{onClick:()=>Ul(e.model),class:"tooltipped tip-se","aria-label":de(i,"generate_new_seed")},se.sync))}function A1({path:e,getValues:t,config:n,node:r,value:i,lang:s,version:o,states:a}){var p;const l=d=>{d.stopPropagation();const v=d.target.value;v!==i&&e.model.set(e,v.length===0?void 0:v)},u=t(),c=e.getContext().join("."),h=!Yn(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(m1.includes(c))return f("textarea",{value:i!=null?i:"",onBlur:l});if(Yn(n)&&!n.additional||d1.includes(c)){let d=new D.Path([]);return Yn(n)&&typeof n.enum=="string"?d=d.contextPush(n.enum):h?d=d.contextPush(h):Yn(n)&&(d=e),f("select",{value:i!=null?i:"",onChange:l},r.optional()&&f("option",{value:""},de(s,"unset")),u.map(v=>f("option",{value:v},vi(s,d.contextPush(v.replace(/^minecraft:/,""))))))}else if(!Yn(n)&&(n==null?void 0:n.validator)==="block_state_key"){const d=a==null?void 0:a[D.relativePath(e,n.params.id).get()],v=Object.keys((p=d==null?void 0:d.properties)!=null?p:{});return f("select",{value:i!=null?i:"",onChange:l},v.map(_=>f("option",null,_)))}else{const d=Qt(),v=h?v1(h):void 0;return f(te,null,f("input",{value:i!=null?i:"",onBlur:l,onKeyDown:_=>{_.key==="Enter"&&l(_)},list:u.length>0?d:""}),u.length>0&&f("datalist",{id:d},u.map(_=>f("option",{value:_}))),v&&u.includes(i)&&i.startsWith("minecraft:")&&f("a",{href:`/${v.url}/?version=${o}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":de(s,"follow_reference")},se.link_external))}}function k1({label:e,schema:t,path:n,value:r,lang:i,version:s,states:o,ctx:a,actions:l,children:u}){var A;const c=t.type(n),h=t.category(n),p=n.getContext().join("."),[d,v]=Ps(),_=b=>{b.preventDefault(),v()},m=ke(K({},a),{depth:((A=a.depth)!=null?A:0)+1});delete m.index;const[g,y,w]=t.hook(Bc,n,r,i,s,o,m);return f("div",{class:`node ${c}-node`,"data-category":h},f("div",{class:"node-header",onContextMenu:_},f(Xn,{lang:i,path:n}),f(Fc,{lang:i,path:n}),u,g,f("label",null,e!=null?e:vi(i,n,`${n.last()}`),d&&f("div",{class:"node-menu"},l==null?void 0:l.map(b=>{var k;return f("div",{key:b.label,class:"menu-item"},f(q,{icon:b.icon,tooltip:de(i,b.label),tooltipLoc:"se",onClick:()=>b.onSelect()}),f("span",null,(k=b.description)!=null?k:de(i,b.label)))}),f("div",{class:"menu-item"},f(q,{icon:"clippy",tooltip:de(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(p)}),f("span",null,p)))),y),w&&f("div",{class:"node-body"},w))}const Ki=Nc(k1,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&nn(e.ctx,t.ctx)&&nn(e.value,t.value));function Yn(e){return!!(e!=null&&e.enum)}function S1(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 vi(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const s=r.slice(i).join("."),o=de(e,s,...n);if(s!==o)return o}return r[r.length-1]}function Xn({lang:e,path:t,nested:n}){var s;t.model instanceof $c&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(o=>o.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=de(e,r[0].error,...(s=r[0].params)!=null?s:[]);return zc("node-error","issue_opened",i)}function Fc({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]=Ps();return f("div",{class:`node-icon ${e}${r?" show":""}`,onClick:i},se[t],f("span",{class:"icon-popup"},n))};function E1(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&ln(t==null?void 0:t.config)}function I1(e,t,n){const r=[],i=Jn(n,r),s={type:e.type,config:D.ObjectNode({decorators:D.ListNode(Ql),feature:ec},{context:"feature.decorated"})},o=D.ObjectNode(s,{context:"feature"}),a=new D.Path(["config","feature"]),l=new D.Path(["config","decorators"]),u=t.getModel(),c=new $c(o,h=>{if(h.startsWith(a))return new D.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...h.modelArr]);if(h.startsWith(l)){if(h.modelArr.length===2)return new D.Path([]);const p=h.modelArr[2];if(typeof p=="number")return new D.Path([...[...Array(p)].flatMap(()=>["config","feature"]),"config","decorator",...h.modelArr.slice(3)])}return h},h=>{if(h.equals(l)){const p=[];return Jn(u.data,p),p}return u.get(c.map(h))},(h,p,d)=>{if(h.startsWith(a)){const v=[];Jn(u.data,v);const _=new D.Path([...[...Array(v.length-1)].flatMap(()=>["config","feature"]),...h.modelArr]);return u.set(_,p,d)}else if(h.startsWith(l)){const v=h.modelArr[2];if(h.modelArr.length===2){const _=c.get(a);return u.set(new D.Path,As(_,p),d)}else if(typeof v=="number")if(h.modelArr.length===3&&p===void 0){const _=c.get(a),m=[];Jn(u.data,m),m.splice(v,1);const g=As(_,m);return u.set(new D.Path,g,d)}else{const _=new D.Path([...[...Array(v)].flatMap(()=>["config","feature"]),"config","decorator",...h.modelArr.slice(3)]);return u.set(_,p,d)}}u.set(h,p,d)});return c.data={type:u.data.type,config:{decorators:r,feature:i}},c.errors=u.errors,{fields:s,wrapper:c}}function Jn(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!ln(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),Jn((r=e.config.feature)!=null?r:"",t))}function As(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:As(e,t)}}}function C1({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=Se();if(!t||!n||i==="none")return f(te,null);const[s]=tl(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(s)return f(te,null);const[,o]=P(0);return Oi(t,()=>{o(a=>a+1)}),f("div",{class:"tree","data-cy":"tree"},f(y1,{model:t,lang:i,version:e,blockStates:n}))}var M1=Object.defineProperty,O1=Object.defineProperties,T1=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,N1=Object.prototype.hasOwnProperty,L1=Object.prototype.propertyIsEnumerable,fa=(e,t,n)=>t in e?M1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jc=(e,t)=>{for(var n in t||(t={}))N1.call(t,n)&&fa(e,n,t[n]);if(ha)for(var n of ha(t))L1.call(t,n)&&fa(e,n,t[n]);return e};const pa="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function Fr(e){return`[giscus] An error occurred. Error message: "${e}".`}function ma(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function R1(){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 P1(e){const[t,n]=P(""),r=function({repo:o,repoId:a,category:l="",categoryId:u="",mapping:c,term:h="",theme:p="light",reactionsEnabled:d="1",emitMetadata:v="0",inputPosition:_="bottom",lang:m="en",session:g,origin:y}){const w=new URL(location.href);w.searchParams.delete("giscus");const A=w.toString(),b={origin:y=y||A,session:g,theme:p,reactionsEnabled:d,emitMetadata:v,inputPosition:_,repo:o,repoId:a,category:l,categoryId:u,description:ma("description")};switch(c){case"url":b.term=A;break;case"title":b.term=document.title;break;case"og:title":b.term=ma("title");break;case"specific":b.term=h;break;case"number":b.number=h;break;case"pathname":default:b.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${m}/widget?${new URLSearchParams(b)}`}((i=jc({},e),O1(i,T1({session:t}))));var i;const s=_e(null);return X(()=>{const o=location.href,a=new URL(o),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(`${Fr(c==null?void 0:c.message)} Session has been cleared.`)}},[]),X(R1,[]),X(()=>{const o=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 h=c.giscus.error;if(h.includes("Bad credentials")||h.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),a(),void console.warn(`${Fr(h)} Session has been cleared.`);console.error(`${Fr(h)} No session is stored initially. ${pa}`)}h.includes("Discussion not found")?console.warn(`[giscus] ${h}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${Fr(h)} ${pa}`)}}(()=>n(""),s.current);return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),xs.createElement("div",{className:"giscus"},xs.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:s}))}function D1(e){const[t,n]=P(!1);return X(()=>n(!0),[]),t?xs.createElement(P1,jc({},e)):null}function Us({term:e}){const{actualTheme:t}=cc(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return f(D1,{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 Vc(){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 jn=Vc();function $1(e){jn=e}const B1=/[&<>"']/,F1=/[&<>"']/g,z1=/[<>"']|&(?!#?\w+;)/,j1=/[<>"']|&(?!#?\w+;)/g,V1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_a=e=>V1[e];function Le(e,t){if(t){if(B1.test(e))return e.replace(F1,_a)}else if(z1.test(e))return e.replace(j1,_a);return e}const H1=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Hc(e){return e.replace(H1,(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 U1=/(^|[^\[])\^/g;function ye(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(U1,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const G1=/[^\w:]/g,Y1=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function va(e,t,n){if(e){let r;try{r=decodeURIComponent(Hc(n)).replace(G1,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!Y1.test(n)&&(n=X1(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const zr={},W1=/^[^:]+:\/*[^/]*$/,q1=/^([^:]+:)[\s\S]*$/,Z1=/^([^:]+:\/*[^/]*)[\s\S]*$/;function X1(e,t){zr[" "+e]||(W1.test(e)?zr[" "+e]=e+"/":zr[" "+e]=Qr(e,"/",!0)),e=zr[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(q1,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Z1,"$1")+t:e+t}const wi={exec:function(){}};function mt(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 wa(e,t){const n=e.replace(/\|/g,(s,o,a)=>{let l=!1,u=o;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 Qr(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const s=e.charAt(r-i-1);if(s===t&&!n)i++;else if(s!==t&&n)i++;else break}return e.substr(0,r-i)}function J1(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 Uc(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 ya(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function ba(e,t,n,r){const i=t.href,s=t.title?Le(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:s,text:Le(o)}}function K1(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
`).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[o]=s;return o.length>=r.length?i.slice(r.length):i}).join(`
`)}class Gs{constructor(t){this.options=t||jn}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:Qr(r,`
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=K1(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 s=Qr(r,"#");(this.options.pedantic||!s||/ $/.test(s))&&(r=s.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,s,o,a,l,u,c,h,p,d,v,_=n[1].trim();const m=_.length>1,g={type:"list",raw:"",ordered:m,start:m?+_.slice(0,-1):"",loose:!1,items:[]};_=m?`\\d{1,9}\\${_.slice(-1)}`:`\\${_}`,this.options.pedantic&&(_=m?_:"[*+-]");const y=new RegExp(`^( {0,3}${_})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(v=!1,!(!(n=y.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
`,1)[0],h=t.split(`
`,1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=n[2].search(/[^ ]/),o=o>4?1:o,d=c.slice(o),o+=n[1].length),l=!1,!c&&/^ *$/.test(h)&&(r+=h+`
`,t=t.substring(h.length+1),v=!0),!v){const A=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(p=t.split(`
`,1)[0],c=p,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!A.test(c));){if(c.search(/[^ ]/)>=o||!c.trim())d+=`
`+c.slice(o);else if(!l)d+=`
`+c;else break;!l&&!c.trim()&&(l=!0),r+=p+`
`,t=t.substring(p.length+1)}}g.loose||(u?g.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(d),i&&(s=i[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:d}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=d.trimRight(),g.raw=g.raw.trimRight();const w=g.items.length;for(a=0;a<w;a++){this.lexer.state.top=!1,g.items[a].tokens=this.lexer.blockTokens(g.items[a].text,[]);const A=g.items[a].tokens.filter(k=>k.type==="space"),b=A.every(k=>{const S=k.raw.split("");let I=0;for(const C of S)if(C===`
`&&(I+=1),I>1)return!0;return!1});!g.loose&&A.length&&b&&(g.loose=!0,g.items[a].loose=!0)}return g}}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]):Le(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:wa(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,s,o,a,l;for(s=0;s<i;s++)/^ *-+: *$/.test(r.align[s])?r.align[s]="right":/^ *:-+: *$/.test(r.align[s])?r.align[s]="center":/^ *:-+ *$/.test(r.align[s])?r.align[s]="left":r.align[s]=null;for(i=r.rows.length,s=0;s<i;s++)r.rows[s]=wa(r.rows[s],r.header.length).map(u=>({text:u}));for(i=r.header.length,o=0;o<i;o++)r.header[o].tokens=[],this.lexer.inlineTokens(r.header[o].text,r.header[o].tokens);for(i=r.rows.length,o=0;o<i;o++)for(l=r.rows[o],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:Le(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]):Le(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 o=Qr(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=J1(n[2],"()");if(o>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],s=o[3])}else s=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)),ba(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.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 s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return ba(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 s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const o=i[0].length-1;let a,l,u=o,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,n=n.slice(-1*t.length+o);(i=h.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])&&o%3&&!((o+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(o,l)%2){const d=t.slice(1,o+i.index+l);return{type:"em",raw:t.slice(0,o+i.index+l+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}const p=t.slice(2,o+i.index+l-1);return{type:"strong",raw:t.slice(0,o+i.index+l+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=Le(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,s;return r[2]==="@"?(i=Le(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=Le(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=Le(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(o!==r[0]);i=Le(r[0]),r[1]==="www."?s="http://"+i:s=i}return{type:"link",raw:r[0],text:i,href:s,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]):Le(r[0]):r[0]:i=Le(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const Y={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:wi,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Y._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Y._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Y.def=ye(Y.def).replace("label",Y._label).replace("title",Y._title).getRegex();Y.bullet=/(?:[*+-]|\d{1,9}[.)])/;Y.listItemStart=ye(/^( *)(bull) */).replace("bull",Y.bullet).getRegex();Y.list=ye(Y.list).replace(/bull/g,Y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Y.def.source+")").getRegex();Y._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";Y._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;Y.html=ye(Y.html,"i").replace("comment",Y._comment).replace("tag",Y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Y.paragraph=ye(Y._paragraph).replace("hr",Y.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",Y._tag).getRegex();Y.blockquote=ye(Y.blockquote).replace("paragraph",Y.paragraph).getRegex();Y.normal=mt({},Y);Y.gfm=mt({},Y.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Y.gfm.table=ye(Y.gfm.table).replace("hr",Y.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",Y._tag).getRegex();Y.gfm.paragraph=ye(Y._paragraph).replace("hr",Y.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Y.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",Y._tag).getRegex();Y.pedantic=mt({},Y.normal,{html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Y._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:wi,paragraph:ye(Y.normal._paragraph).replace("hr",Y.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Y.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:wi,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:wi,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};z._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";z.punctuation=ye(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex();z.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;z.escapedEmSt=/\\\*|\\_/g;z._comment=ye(Y._comment).replace("(?:-->|$)","-->").getRegex();z.emStrong.lDelim=ye(z.emStrong.lDelim).replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimAst=ye(z.emStrong.rDelimAst,"g").replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimUnd=ye(z.emStrong.rDelimUnd,"g").replace(/punct/g,z._punctuation).getRegex();z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;z._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])?)+(?![-_])/;z.autolink=ye(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex();z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;z.tag=ye(z.tag).replace("comment",z._comment).replace("attribute",z._attribute).getRegex();z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;z._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;z.link=ye(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex();z.reflink=ye(z.reflink).replace("label",z._label).replace("ref",Y._label).getRegex();z.nolink=ye(z.nolink).replace("ref",Y._label).getRegex();z.reflinkSearch=ye(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex();z.normal=mt({},z);z.pedantic=mt({},z.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:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()});z.gfm=mt({},z.normal,{escape:ye(z.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.!#$%&'*+\/=?_`{\|}~-]+@)))/});z.gfm.url=ye(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex();z.breaks=mt({},z.gfm,{br:ye(z.br).replace("{2,}","*").getRegex(),text:ye(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Q1(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 xa(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 zt{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||jn,this.options.tokenizer=this.options.tokenizer||new Gs,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:Y.normal,inline:z.normal};this.options.pedantic?(n.block=Y.pedantic,n.inline=z.pedantic):this.options.gfm&&(n.block=Y.gfm,this.options.breaks?n.inline=z.breaks:n.inline=z.gfm),this.tokenizer.rules=n}static get rules(){return{block:Y,inline:z}}static lex(t,n){return new zt(n).lex(t)}static lexInline(t,n){return new zt(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,s,o;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(s=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&&(s=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){i=n[n.length-1],o&&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),o=s.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,s,o=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(o))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+ya("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+ya("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(o))!=null;)o=o.slice(0,a.index)+"++"+o.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,o,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,xa)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,xa))){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const h=t.slice(1);let p;this.options.extensions.startInline.forEach(function(d){p=d.call({lexer:this},h),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(s=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(s,Q1)){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 Ys{constructor(t){this.options=t||jn}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,i);s!=null&&s!==t&&(r=!0,t=s)}return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="'+this.options.langPrefix+Le(i,!0)+'">'+(r?t:Le(t,!0))+`</code></pre>
`:"<pre><code>"+(r?t:Le(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",s=n&&r!==1?' start="'+r+'"':"";return"<"+i+s+`>
`+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=va(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+Le(t)+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=va(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 Gc{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 Yc{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 jt{constructor(t){this.options=t||jn,this.options.renderer=this.options.renderer||new Ys,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Gc,this.slugger=new Yc}static parse(t,n){return new jt(n).parse(t)}static parseInline(t,n){return new jt(n).parseInline(t)}parse(t,n=!0){let r="",i,s,o,a,l,u,c,h,p,d,v,_,m,g,y,w,A,b,k;const S=t.length;for(i=0;i<S;i++){if(d=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(k=this.options.extensions.renderers[d.type].call({parser:this},d),k!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))){r+=k||"";continue}switch(d.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(d.tokens),d.depth,Hc(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(d.text,d.lang,d.escaped);continue}case"table":{for(h="",c="",a=d.header.length,s=0;s<a;s++)c+=this.renderer.tablecell(this.parseInline(d.header[s].tokens),{header:!0,align:d.align[s]});for(h+=this.renderer.tablerow(c),p="",a=d.rows.length,s=0;s<a;s++){for(u=d.rows[s],c="",l=u.length,o=0;o<l;o++)c+=this.renderer.tablecell(this.parseInline(u[o].tokens),{header:!1,align:d.align[o]});p+=this.renderer.tablerow(c)}r+=this.renderer.table(h,p);continue}case"blockquote":{p=this.parse(d.tokens),r+=this.renderer.blockquote(p);continue}case"list":{for(v=d.ordered,_=d.start,m=d.loose,a=d.items.length,p="",s=0;s<a;s++)y=d.items[s],w=y.checked,A=y.task,g="",y.task&&(b=this.renderer.checkbox(w),m?y.tokens.length>0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=b+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=b+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(y.tokens,m),p+=this.renderer.listitem(g,A,w);r+=this.renderer.list(p,v,_);continue}case"html":{r+=this.renderer.html(d.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(d.tokens));continue}case"text":{for(p=d.tokens?this.parseInline(d.tokens):d.text;i+1<S&&t[i+1].type==="text";)d=t[++i],p+=`
`+(d.tokens?this.parseInline(d.tokens):d.text);r+=n?this.renderer.paragraph(p):p;continue}default:{const I='Token with "'+d.type+'" type was not found.';if(this.options.silent){console.error(I);return}else throw new Error(I)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,s,o;const a=t.length;for(i=0;i<a;i++){if(s=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(o=this.options.extensions.renderers[s.type].call({parser:this},s),o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){r+=o||"";continue}switch(s.type){case"escape":{r+=n.text(s.text);break}case"html":{r+=n.html(s.text);break}case"link":{r+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{r+=n.image(s.href,s.title,s.text);break}case"strong":{r+=n.strong(this.parseInline(s.tokens,n));break}case"em":{r+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{r+=n.codespan(s.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(s.tokens,n));break}case"text":{r+=n.text(s.text);break}default:{const l='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}function ee(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=mt({},ee.defaults,t||{}),Uc(t),n){const r=t.highlight;let i;try{i=zt.lex(e,t)}catch(a){return n(a)}const s=function(a){let l;if(!a)try{t.walkTokens&&ee.walkTokens(i,t.walkTokens),l=jt.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 s();let o=0;ee.walkTokens(i,function(a){a.type==="code"&&(o++,setTimeout(()=>{r(a.text,a.lang,function(l,u){if(l)return s(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),o--,o===0&&s()})},0))}),o===0&&s();return}try{const r=zt.lex(e,t);return t.walkTokens&&ee.walkTokens(r,t.walkTokens),jt.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>"+Le(r.message+"",!0)+"</pre>";throw r}}ee.options=ee.setOptions=function(e){return mt(ee.defaults,e),$1(ee.defaults),ee};ee.getDefaults=Vc;ee.defaults=jn;ee.use=function(...e){const t=mt({},...e),n=ee.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if(s.renderer){const o=n.renderers?n.renderers[s.name]:null;o?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if(s.tokenizer){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[s.level]?n[s.level].unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}s.childTokens&&(n.childTokens[s.name]=s.childTokens)})),i.renderer){const s=ee.defaults.renderer||new Ys;for(const o in i.renderer){const a=s[o];s[o]=(...l)=>{let u=i.renderer[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}t.renderer=s}if(i.tokenizer){const s=ee.defaults.tokenizer||new Gs;for(const o in i.tokenizer){const a=s[o];s[o]=(...l)=>{let u=i.tokenizer[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}t.tokenizer=s}if(i.walkTokens){const s=ee.defaults.walkTokens;t.walkTokens=function(o){i.walkTokens.call(this,o),s&&s.call(this,o)}}r&&(t.extensions=n),ee.setOptions(t)})};ee.walkTokens=function(e,t){for(const n of e)switch(t.call(ee,n),n.type){case"table":{for(const r of n.header)ee.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)ee.walkTokens(i.tokens,t);break}case"list":{ee.walkTokens(n.items,t);break}default:ee.defaults.extensions&&ee.defaults.extensions.childTokens&&ee.defaults.extensions.childTokens[n.type]?ee.defaults.extensions.childTokens[n.type].forEach(function(r){ee.walkTokens(n[r],t)}):n.tokens&&ee.walkTokens(n.tokens,t)}};ee.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=mt({},ee.defaults,t||{}),Uc(t);try{const n=zt.lexInline(e,t);return t.walkTokens&&ee.walkTokens(n,t.walkTokens),jt.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>"+Le(n.message+"",!0)+"</pre>";throw n}};ee.Parser=jt;ee.parser=jt.parse;ee.Renderer=Ys;ee.TextRenderer=Gc;ee.Lexer=zt;ee.lexer=zt.lex;ee.Tokenizer=Gs;ee.Slugger=Yc;ee.parse=ee;jt.parse;zt.lex;function em({change:e,activeTags:t,toggleTag:n}){return f("div",{class:"changelog-entry"},f("div",{class:"changelog-version"},f(Aa,K({},e.version)),f(Aa,K({},e.group))),f("div",{class:"changelog-tags"},e.tags.map(r=>f(Or,{label:r,onClick:n?()=>n(r):void 0,active:t==null?void 0:t.includes(r)}))),f("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:ee(e.content)}}))}function Aa({id:e,article:t}){return t===null?f("span",null,e):f("a",{href:`https://www.minecraft.net/en-us/article/${t}`,target:"_blank"},e)}function Or({label:e,active:t,onClick:n}){const r=e==="breaking"?5:Gl(e)%360;return f("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n},e==="breaking"&&se.alert,e)}function Wc({changes:e,defaultOrder:t}){const{locale:n}=Se(),[r,i]=P(""),[s,o]=P([]),a=p=>{s.includes(p)?o(s.filter(d=>d!==p)):o([...s,p])},l=xe(()=>{const p=r.split(" ").map(d=>d.trim().toLowerCase()).filter(d=>d.length>0);return p.length===0&&s.length===0?e:e==null?void 0:e.filter(d=>{if(!s.every(_=>d.tags.includes(_)))return!1;const v=d.tags.join(" ")+" "+d.content.toLowerCase();return p.every(_=>_.startsWith("!")?_.length===1||!v.includes(_.slice(1)):v.includes(_))})},[e,r,s]),[u,c]=P(t==="desc"),h=xe(()=>l==null?void 0:l.sort((p,d)=>u?d.order-p.order:p.order-d.order),[l,u]);return f(te,null,f("div",{class:"changelog-query"},f(rn,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:r,onChange:i}),f(q,{icon:u?"sort_desc":"sort_asc",label:u?"Newest first":"Oldest first",onClick:()=>c(!u)})),s.length>0&&f("div",{class:"changelog-tags"},s.map(p=>f(Or,{label:p,onClick:()=>o(s.filter(d=>d!==p))}))),f("div",{class:"changelog-list"},h===void 0?f("span",{class:"note"},n("loading")):h.length===0?f("span",{class:"note"},n("changelog.no_results")):h.map(p=>f(em,{change:p,activeTags:s,toggleTag:a}))))}function tm({version:e}){const{locale:t}=Se(),[n,r]=P("changelog"),[i,s]=P(void 0);X(()=>{Zl().then(a=>s(a.map(l=>ke(K({},l),{tags:l.tags.filter(u=>u!==l.group.id)})))).catch(a=>console.error(a))},[]);const o=xe(()=>i==null?void 0:i.filter(a=>a.version.id===e.id||a.group.id===e.id),[e.id,i]);return f(te,null,f("div",{class:"version-detail"},f("h2",null,e.name),f("div",{class:"version-info"},f(Nt,{label:t("versions.released"),value:qc(e)}),f(Nt,{label:t("versions.release_target"),value:e.release_target,link:e.id!==e.release_target?`/versions/?id=${e.release_target}`:void 0}),f(Nt,{label:t("versions.data_version"),value:e.data_version}),f(Nt,{label:t("versions.protocol_version"),value:e.protocol_version}),f(Nt,{label:t("versions.data_pack_format"),value:e.data_pack_version}),f(Nt,{label:t("versions.resource_pack_format"),value:e.resource_pack_version})),f("div",{class:"version-tabs"},f("span",{class:n==="changelog"?"selected":"",onClick:()=>r("changelog")},t("versions.technical_changes")),f("span",{class:n==="discussion"?"selected":"",onClick:()=>r("discussion")},t("versions.discussion"))),f("div",{class:"version-tab"},n==="changelog"&&f(Wc,{changes:o,defaultOrder:"asc"}),n==="discussion"&&f(Us,{term:`version/${e.id}`}))))}function qc(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function nm({version:e,link:t}){const{locale:n}=Se();return f("a",{class:"version-entry",href:t},f("span",{class:"version-id"},e.id),f(Nt,{label:n("versions.released"),value:qc(e),compact:!0}),f(Nt,{label:n("versions.data_version"),value:e.data_version,optional:!0}),f(Nt,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}function rm({versions:e,link:t}){const{locale:n}=Se(),[r,i]=P(!0),[s,o]=P(""),a=xe(()=>e.filter(l=>l.type==="snapshot"&&!r?!1:l.id.includes(s)),[e,r,s]);return f(te,null,f("div",{class:"versions-controls"},f(rn,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:s,onChange:o}),f(f0,{label:"Include snapshots",value:r,onChange:i})),f("div",{class:"version-list"},a.map(l=>f(nm,{version:l,link:t==null?void 0:t(l.id)})),a.length===0&&f("span",null,n("versions.no_results"))))}function Nt({label:e,value:t,link:n,compact:r,optional:i}){return f("div",{class:`version-metadata${i?" version-metadata-hide":""}`},f("span",{class:r?"version-metadata-hide":void 0},e,": "),f("span",{class:"version-metadata-value"},t),n&&f("a",{href:n,class:"version-metadata-link"},se.link_external))}function im({title:e,link:t,versions:n,tags:r,activeTags:i,toggleTag:s}){const o=a=>l=>{s&&s(a),l.preventDefault(),l.stopImmediatePropagation()};return f("a",{class:"guide-card",href:t},f("span",{class:"guide-versions"},n.join(" \u2022 ")),f("h3",null,e),f("div",{class:"guide-tags"},r.sort().map(a=>f(Or,{label:a,onClick:o(a),active:i==null?void 0:i.includes(a)}))))}const ka={system:"device_desktop",dark:"moon",light:"sun"};function sm(){const{lang:e,locale:t,changeLanguage:n}=Se(),{theme:r,changeTheme:i}=cc(),{version:s}=zn(),{title:o}=pt(),a=Yl(En());return f("header",null,f("div",{class:"title"},f(Ka,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},Zc.home),f("h1",null,o),a&&f(qe,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},me.generators.filter(l=>l.category===(a==null?void 0:a.category)&&Ze(s,l.minVersion)).map(l=>f(q,{label:t(l.id),active:l.id===a.id,onClick:()=>Yt(Ft(l.url))})))),f("nav",null,f("ul",null,f("li",{"data-cy":"language-switcher"},f(qe,{icon:"globe",tooltip:t("language")},me.languages.map(({code:l,name:u})=>f(q,{label:u,active:l===e,onClick:()=>n(l)})))),f("li",{"data-cy":"theme-switcher"},f(qe,{icon:ka[r],tooltip:t("theme")},Object.entries(ka).map(([l,u])=>f(q,{icon:u,label:t(`theme.${l}`),active:l===r,onClick:()=>i(l)})))),f("li",{class:"dimmed"},f("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},se.mark_github)))))}const Zc={home:f("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),f("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),f("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),f("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),f("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),f("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:f("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},f("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"}),f("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"}),f("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"}),f("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"}),f("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"}),f("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:f("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},f("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),f("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 om({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:s,onEdit:o,onDelete:a,delayedPlay:l}){const{locale:u}=Se(),{version:c}=zn(),[h,p]=P(!0),[d,v]=P(!1),[_,m]=P(!1),g=_e([]),y=`playsound minecraft:${n} master @s ~ ~ ~ ${s} ${i}`;X(()=>{var M,N,F;const C=t[n];m(((N=(M=C==null?void 0:C.sounds)==null?void 0:M.length)!=null?N:0)===0),g.current.forEach(ne=>ne.stop()),g.current=((F=C==null?void 0:C.sounds)!=null?F:[]).map(ne=>{const oe=typeof ne=="string"?ne:ne.name,he=A0(c,oe),O=e({src:[he],format:["ogg"],volume:s,rate:i});O.on("end",()=>{v(!1)});const $=()=>{h&&g.current.every(G=>G.state()==="loaded")&&p(!1)};return O.state()==="loaded"?setTimeout(()=>$()):O.on("load",()=>{$()}),O}),p(!0)},[n,t]),X(()=>{g.current.forEach(C=>C.rate(i))},[i]),X(()=>{g.current.forEach(C=>C.volume(s))},[s]);const w=()=>{if(h||_)return;A();const C=Math.floor(Math.random()*g.current.length);g.current[C].play(),v(!0)},A=()=>{g.current.forEach(C=>C.stop())};X(()=>{l&&setTimeout(()=>w(),r*50)},[l]),X(()=>()=>A(),[]);const[b,k]=P(!1),S=_e(void 0),I=()=>{navigator.clipboard.writeText(y),k(!0),S.current!==void 0&&clearTimeout(S.current),S.current=setTimeout(()=>{k(!1)},2e3)};return f("div",{class:`sound-config${h?" loading":d?" playing":""}${_?" invalid":""}`},f(q,{class:"play",icon:_?"alert":h?"sync":"play",label:u("sounds.play"),onClick:w,tooltip:u(_?"sounds.unknown_sound":h?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),f(rn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:C=>o({sound:C})}),f("label",{class:"delay-label"},u("sounds.delay"),": "),f(p0,{class:"btn btn-input delay",min:0,value:r,onChange:C=>o({delay:C})}),f("label",{class:"pitch-label"},u("sounds.pitch"),": "),f(zo,{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:C=>o({pitch:C})}),f("label",{class:"volume-label"},u("sounds.volume"),": "),f(zo,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":s.toFixed(2),style:`--x: ${s*100}%`,value:s,onChange:C=>o({volume:C})}),f(q,{class:`copy${b?" active":""}`,icon:b?"check":"terminal",label:u("copy"),tooltip:u(b?"copied":"sounds.copy_command"),onClick:I}),f(q,{class:"remove",icon:"trashcan",tooltip:u("sounds.remove_sound"),onClick:()=>{a(),A()}}))}function nt({title:e,desc:t,link:n,icon:r,children:i}){const s=f(te,null,f("div",{class:"tool-head"},r&&Zc[r],f("div",null,f("h3",null,e),f("p",null,t))),i&&f("div",{class:"tool-body"},i));return n?f("a",{class:"tool-card",href:n},s):f("div",{class:"tool-card"},s)}const Sa="/";function Xc({entries:e,onSelect:t,indent:n}){const r=xe(()=>{var u;const l={};for(const c of e){const h=c.indexOf(Sa);if(h>=0){const p=c.slice(0,h);((u=l[p])!=null?u:l[p]=[]).push(c.slice(h+1))}}return Object.entries(l)},e),i=xe(()=>e.filter(l=>!l.includes(Sa)),e),[s,o]=P(new Set),a=l=>{s.has(l)?s.delete(l):s.add(l),o(new Set(s))};return f("div",{class:"tree-view",style:`--indent: ${n!=null?n:0};`},r.map(([l,u])=>f("div",null,f(Ea,{icon:s.has(l)?"chevron_right":"chevron_down",key:l,label:l,onClick:()=>a(l)}),!s.has(l)&&f(Xc,{entries:u,onSelect:c=>t(`${l}/${c}`),indent:(n!=null?n:0)+1}))),i.map(l=>f(Ea,{icon:"file",key:l,label:l,onClick:()=>t(l)})))}function Ea({icon:e,label:t,onClick:n}){return f("div",{class:"entry",onClick:n},se[e],t)}function Ia({category:e}){const{locale:t}=Se();return pt(t("title.generator_category",t(e))),f("main",null,f("div",{class:"category"},me.generators.filter(n=>n.category===e).map(n=>f(nt,{title:t(n.id),link:Ft(n.url)}))))}function am({}){const{locale:e}=Se(),[t,n]=P(null);pt(e("title.changelog"));const[r,i]=P([]);return X(()=>{Zl().then(s=>i(s)).catch(s=>{console.error(s),n(s)})},[]),f("main",null,f(_r,{type:"text",id:"changelog"}),t&&f(bn,{error:t,onDismiss:()=>n(null)}),f("div",{class:"changelog"},f(Wc,{changes:r,defaultOrder:"desc"})))}function lm({}){var Qs;const{locale:e}=Se(),{version:t,changeVersion:n,changeTargetVersion:r}=zn(),{project:i,file:s,updateFile:o,openFile:a,closeFile:l}=ac(),[u,c]=P(null),[h,p]=tl();if(h)return h.message=`Something went wrong rendering the generator: ${h.message}`,f("main",null,f(bn,{error:h,onDismiss:p}));const d=Yl(En());if(!d)return f("main",null,f(bn,{error:`Cannot find generator "${En()}"`}));const v=xe(()=>me.versions.filter(V=>Ze(V.id,d.minVersion,d.maxVersion)).map(V=>V.id).reverse(),[d.minVersion,d.maxVersion]);pt(e("title.generator",e(d.id)),v),Ze(t,d.minVersion)||c(`The minimum version for this generator is ${d.minVersion}`),Ze(t,void 0,d.maxVersion)||c(`This generator is not available in versions above ${d.maxVersion}`);const[_,m]=ar("preset"),[g,y]=ar(us),w=_e(!1);X(()=>{S&&_?Be(_).then(V=>{w.current=!0,S.reset(D.DataModel.wrapLists(V),!1),y(void 0)}):S&&g&&Uo(g).then(V=>A(S,V))},[_,g]);const A=(V,be)=>{if(be.version&&be.version!==t&&n(be.version,!1),be.type&&be.type!==d.id){const Hn=me.generators.find(Tr=>Tr.id===be.type);Hn&&Yt(`${Ft(Hn.url)}?${us}=${be.id}`)}be.show_preview&&!ct&&(Bi(!0),ue(!1)),V.reset(D.DataModel.wrapLists(be.data),!1)},b=xe(()=>Re.getBackup(d.id),[d.id]),k=()=>{b!==void 0&&(S==null||S.reset(D.DataModel.wrapLists(b),!1))},[S,I]=P(null),[C,M]=P(null);X(()=>{c(null),I(null),M0(t).then(V=>M(V)),I0(t,d.id).then(async V=>{if(Ce.setGenerator(d.id),_){const be=await Be(_);V.reset(D.DataModel.wrapLists(be),!1)}else if(g){const be=await Uo(g);A(V,be)}I(V)}).catch(V=>{console.error(V),c(V)})},[t,d.id]);const[N,F]=P(!1);Oi(S,()=>{w.current||(m(void 0,!0),y(void 0,!0)),w.current=!1,Re.setBackup(d.id,D.DataModel.unwrapLists(S==null?void 0:S.data)),c(null),F(!0)},[d.id,m,y]);const[ne,oe]=P(""),[he,O]=Wn(),[$,G]=Wn(),T=()=>{if(ne!==(s==null?void 0:s.id)&&ne&&S&&C){const V=Jr(S,C);o(d.id,s==null?void 0:s.id,{id:ne,data:V})?O():(G(),s&&oe(s==null?void 0:s.id))}else s&&oe(s==null?void 0:s.id)},x=()=>{s&&o(d.id,s.id,{})};X(()=>{s&&oe(s.id)},[s]),X(()=>{var V;S&&(oe((V=s==null?void 0:s.id)!=null?V:""),s&&d.id===s.type&&S.reset(D.DataModel.wrapLists(s.data)),F(!1))},[s,S]);const E=()=>{Ce.generatorEvent("reset"),S==null||S.reset(D.DataModel.wrapLists(S.schema.default()),!0)},L=V=>{V.stopPropagation(),Ce.generatorEvent("undo","Menu"),S==null||S.undo()},j=V=>{V.stopPropagation(),Ce.generatorEvent("redo","Menu"),S==null||S.redo()},W=V=>{V.ctrlKey&&V.key==="z"?(Ce.generatorEvent("undo","Hotkey"),S==null||S.undo()):V.ctrlKey&&V.key==="y"&&(Ce.generatorEvent("redo","Hotkey"),S==null||S.redo())},ce=V=>{if(V.ctrlKey&&V.key==="s"&&(V.preventDefault(),S&&C&&s)){Ce.generatorEvent("save","Hotkey");const be=Jr(S,C);o(d.id,s==null?void 0:s.id,{id:s==null?void 0:s.id,data:be}),F(!1),O()}};X(()=>(document.addEventListener("keyup",W),document.addEventListener("keydown",ce),()=>{document.removeEventListener("keyup",W),document.removeEventListener("keydown",ce)}),[S,C,s]);const[je,at]=P([]);X(()=>{C0(t).then(V=>{at(V.get(d.id).map(be=>be.slice(10)))}).catch(V=>{console.error(V),c(V)})},[t,d.id]);const Ve=V=>{Ce.generatorEvent("load-preset",V),y(void 0,!0),r(t,!0),m(V)},Be=async V=>{var be,Hn,Tr;try{const Ht=await Jl(t,(be=d.path)!=null?be:d.id,V),ji=S==null?void 0:S.get(new D.Path(["generator","seed"]));return((Hn=Ht==null?void 0:Ht.generator)==null?void 0:Hn.seed)!==void 0&&ji!==void 0&&(Ht.generator.seed=ji,((Tr=Ht.generator.biome_source)==null?void 0:Tr.seed)!==void 0&&(Ht.generator.biome_source.seed=ji)),Ht}catch{c(`Cannot load preset ${V} in ${t}`),m(void 0,!0)}},He=V=>{y(void 0,!0),n(V)},[gt,Je]=P(void 0),[St,Te]=P(!1),[tt,Et]=Wn({cooldown:3e3}),J=()=>{if(St){Te(!1);return}if(_)Je(`${location.origin}/${d.url}/?version=${t}&preset=${_}`),Te(!0),It();else if(S&&C){const V=Jr(S,C);nn(V,S.schema.default())?(Je(`${location.origin}/${d.url}/?version=${t}`),Te(!0)):T0(d.id,t,V,ct).then(be=>{Je(be),Te(!0)}).catch(be=>{be instanceof Error&&c(be)})}},It=()=>{navigator.clipboard.writeText(gt!=null?gt:""),Et()};X(()=>{tt||(Je(void 0),Te(!1))},[tt]);const[fe,ue]=P(window.innerWidth>820),[_t,Ke]=P(0),[un,dn]=P(0),[B,H]=P(0),ie=()=>{Ce.generatorEvent("copy"),Ke(_t+1)},pe=()=>{Ce.generatorEvent("download"),dn(un+1)},Ne=()=>{Ce.generatorEvent("import"),ue(!0),H(B+1)},lt=()=>{Ce.generatorEvent("toggle-output",fe?"hidden":"visible"),ue(!fe),Ke(0),dn(0),H(0)},[Vn,$i]=Wn(),[ct,Bi]=P(!1),Fi=zp.includes(d.id)&&!(d.id==="worldgen/configured_feature"&&Ze(t,"1.18"));ct&&!Fi&&Bi(!1);let zi=2;Fi&&(zi+=1),fe&&(zi+=2);const lu=()=>{Ce.generatorEvent("toggle-preview",ct?"hidden":"visible"),Bi(!ct),!ct&&fe&&ue(!1)};return f(te,null,f("main",{class:ct?"has-preview":""},f(_r,{id:"data-pack-generator",type:"text"}),f("div",{class:"controls"},f("div",{class:`project-controls ${s&&"has-file"}`},f("div",{class:"btn-row"},f(qe,{icon:"repo",label:i.name,relative:!1},f(q,{icon:"arrow_left",label:e("project.go_to"),onClick:()=>Yt("/project")}),s&&f(q,{icon:"file",label:e("project.new_file"),onClick:l}),b!==void 0&&f(q,{icon:"history",label:e("restore_backup"),onClick:k}),f(jo,{searchPlaceholder:e(i.name==="Drafts"?"project.search_drafts":"project.search"),noResults:e("project.no_files"),values:i.files.filter(V=>V.type===d.id).map(V=>V.id),onSelect:V=>a(d.id,V)})),f(rn,{class:"btn btn-input",placeholder:e("project.unsaved_file"),value:ne,onChange:oe,onEnter:T,onBlur:T}),s&&f(q,{icon:"trashcan",tooltip:e("project.delete_file"),onClick:x})),N?f("div",{class:"status-icon"},se.dot_fill):he?f("div",{class:"status-icon active"},se.check):$&&f("div",{class:"status-icon danger"},se.x)),f("div",{class:"generator-controls"},f(q,{icon:"upload",label:e("import"),onClick:Ne}),f(qe,{icon:"archive",label:e("presets"),relative:!1},f(jo,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:je,onSelect:Ve})),f(qe,{icon:"tag",label:t,tooltip:e("switch_version"),"data-cy":"version-switcher"},v.map(V=>f(q,{label:V,active:V===t,onClick:()=>He(V)}))),f(qe,{icon:"kebab_horizontal",tooltip:e("more")},f(q,{icon:"history",label:e("reset"),onClick:E}),f(q,{icon:"arrow_left",label:e("undo"),onClick:L}),f(q,{icon:"arrow_right",label:e("redo"),onClick:j})))),u&&f(bn,{error:u,onDismiss:()=>c(null)}),f(C1,{model:S,version:t,blockStates:C,onError:c})),f("div",{class:"popup-actions",style:`--offset: -${8+zi*50}px;`},f("div",{class:`popup-action action-preview${Fi?" shown":""} tooltipped tip-nw`,"aria-label":e(ct?"hide_preview":"show_preview"),onClick:lu},ct?se.x_circle:se.play),f("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:J},se.link),f("div",{class:`popup-action action-download${fe?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:pe},se.download),f("div",{class:`popup-action action-copy${fe?" shown":""}${Vn?" active":""} tooltipped tip-nw`,"aria-label":e(Vn?"copied":"copy"),onClick:ie},Vn?se.check:se.clippy),f("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(fe?"hide_output":"show_output"),onClick:lt},fe?se.chevron_right:se.code)),f("div",{class:`popup-preview${ct?" shown":""}`},f(jp,{model:S,version:t,id:d.id,shown:ct,onError:c})),f("div",{class:`popup-source${fe?" shown":""}`},f(Hp,{model:S,blockStates:C,doCopy:_t,doDownload:un,doImport:B,name:(Qs=d.schema)!=null?Qs:"data",copySuccess:$i,onError:c})),f("div",{class:`popup-share${St?" shown":""}`},f(rn,{value:gt,readonly:!0}),f(q,{icon:tt?"check":"clippy",onClick:It,tooltip:e(tt?"copied":"copy_share"),tooltipLoc:"nw",active:tt,showTooltip:tt})))}var Ws={exports:{}};function qs(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)&&qs(n)}),e}Ws.exports=qs;Ws.exports.default=qs;var cm=Ws.exports;class Ca{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Jc(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Ut(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 um="</span>",Ma=e=>!!e.kind,dm=(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 hm{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Jc(t)}openNode(t){if(!Ma(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=dm(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Ma(t)||(this.buffer+=um)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class Zs{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=>{Zs._collapse(n)})))}}class fm extends Zs{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 hm(this,this.options).value()}finalize(){return!0}}function pr(e){return e?typeof e=="string"?e:e.source:null}function Kc(e){return cn("(?=",e,")")}function pm(e){return cn("(?:",e,")*")}function mm(e){return cn("(?:",e,")?")}function cn(...e){return e.map(n=>pr(n)).join("")}function gm(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Xs(...e){const t=gm(e);return"("+(t.capture?"":"?:")+e.map(r=>pr(r)).join("|")+")"}function Qc(e){return new RegExp(e.toString()+"|").exec("").length-1}function _m(e,t){const n=e&&e.exec(t);return n&&n.index===0}const vm=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Js(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=pr(r),o="";for(;s.length>0;){const a=vm.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const wm=/\b\B/,eu="[a-zA-Z]\\w*",Ks="[a-zA-Z_]\\w*",tu="\\b\\d+(\\.\\d+)?",nu="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ru="\\b(0b[01]+)",ym="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",bm=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=cn(t,/.*\b/,e.binary,/\b.*/)),Ut({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},mr={begin:"\\\\[\\s\\S]",relevance:0},xm={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[mr]},Am={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[mr]},km={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/},Di=function(e,t,n={}){const r=Ut({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=Xs("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:cn(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Sm=Di("//","$"),Em=Di("/\\*","\\*/"),Im=Di("#","$"),Cm={scope:"number",begin:tu,relevance:0},Mm={scope:"number",begin:nu,relevance:0},Om={scope:"number",begin:ru,relevance:0},Tm={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[mr,{begin:/\[/,end:/\]/,relevance:0,contains:[mr]}]}]},Nm={scope:"title",begin:eu,relevance:0},Lm={scope:"title",begin:Ks,relevance:0},Rm={begin:"\\.\\s*"+Ks,relevance:0},Pm=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 jr=Object.freeze({__proto__:null,MATCH_NOTHING_RE:wm,IDENT_RE:eu,UNDERSCORE_IDENT_RE:Ks,NUMBER_RE:tu,C_NUMBER_RE:nu,BINARY_NUMBER_RE:ru,RE_STARTERS_RE:ym,SHEBANG:bm,BACKSLASH_ESCAPE:mr,APOS_STRING_MODE:xm,QUOTE_STRING_MODE:Am,PHRASAL_WORDS_MODE:km,COMMENT:Di,C_LINE_COMMENT_MODE:Sm,C_BLOCK_COMMENT_MODE:Em,HASH_COMMENT_MODE:Im,NUMBER_MODE:Cm,C_NUMBER_MODE:Mm,BINARY_NUMBER_MODE:Om,REGEXP_MODE:Tm,TITLE_MODE:Nm,UNDERSCORE_TITLE_MODE:Lm,METHOD_GUARD:Rm,END_SAME_AS_BEGIN:Pm});function Dm(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function $m(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Bm(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Dm,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Fm(e,t){!Array.isArray(e.illegal)||(e.illegal=Xs(...e.illegal))}function zm(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 jm(e,t){e.relevance===void 0&&(e.relevance=1)}const Vm=(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=cn(n.beforeMatch,Kc(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Hm=["of","and","for","in","not","or","if","then","parent","list","value"],Um="keyword";function iu(e,t,n=Um){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,iu(e[s],t,s))}),r;function i(s,o){t&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,Gm(l[0],l[1])]})}}function Gm(e,t){return t?Number(t):Ym(e)?0:1}function Ym(e){return Hm.includes(e.toLowerCase())}const Oa={},en=e=>{console.error(e)},Ta=(e,...t)=>{console.log(`WARN: ${e}`,...t)},mn=(e,t)=>{Oa[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Oa[`${e}/${t}`]=!0)},yi=new Error;function su(e,t,{key:n}){let r=0;const i=e[n],s={},o={};for(let a=1;a<=t.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=Qc(t[a-1]);e[n]=o,e[n]._emit=s,e[n]._multi=!0}function Wm(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw en("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),yi;if(typeof e.beginScope!="object"||e.beginScope===null)throw en("beginScope must be object"),yi;su(e,e.begin,{key:"beginScope"}),e.begin=Js(e.begin,{joinWith:""})}}function qm(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw en("skip, excludeEnd, returnEnd not compatible with endScope: {}"),yi;if(typeof e.endScope!="object"||e.endScope===null)throw en("endScope must be object"),yi;su(e,e.end,{key:"endScope"}),e.end=Js(e.end,{joinWith:""})}}function Zm(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Xm(e){Zm(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Wm(e),qm(e)}function Jm(e){function t(o,a){return new RegExp(pr(o),"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+=Qc(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(Js(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((h,p)=>p>0&&h!==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(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[$m,zm,Xm,Vm].forEach(c=>c(o,a)),e.compilerExtensions.forEach(c=>c(o,a)),o.__beforeBegin=null,[Bm,Fm,jm].forEach(c=>c(o,a)),o.isCompiled=!0;let u=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=iu(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=t(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=t(l.end)),l.terminatorEnd=pr(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(c){return Km(c==="self"?o:c)})),o.contains.forEach(function(c){s(c,l)}),o.starts&&s(o.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=Ut(e.classNameAliases||{}),s(e)}function ou(e){return e?e.endsWithParent||ou(e.starts):!1}function Km(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ut(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:ou(e)?Ut(e,{starts:e.starts?Ut(e.starts):null}):Object.isFrozen(e)?Ut(e):e}var Qm="11.5.1";class eg extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Qi=Jc,Na=Ut,La=Symbol("nomatch"),tg=7,ng=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={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:fm};function l(O){return a.noHighlightRe.test(O)}function u(O){let $=O.className+" ";$+=O.parentNode?O.parentNode.className:"";const G=a.languageDetectRe.exec($);if(G){const T=C(G[1]);return T||(Ta(s.replace("{}",G[1])),Ta("Falling back to no-highlight mode for this block.",O)),T?G[1]:"no-highlight"}return $.split(/\s+/).find(T=>l(T)||C(T))}function c(O,$,G){let T="",x="";typeof $=="object"?(T=O,G=$.ignoreIllegals,x=$.language):(mn("10.7.0","highlight(lang, code, ...args) has been deprecated."),mn("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),x=O,T=$),G===void 0&&(G=!0);const E={code:T,language:x};oe("before:highlight",E);const L=E.result?E.result:h(E.language,E.code,G);return L.code=E.code,oe("after:highlight",L),L}function h(O,$,G,T){const x=Object.create(null);function E(B,H){return B.keywords[H]}function L(){if(!J.keywords){fe.addText(ue);return}let B=0;J.keywordPatternRe.lastIndex=0;let H=J.keywordPatternRe.exec(ue),ie="";for(;H;){ie+=ue.substring(B,H.index);const pe=Te.case_insensitive?H[0].toLowerCase():H[0],Ne=E(J,pe);if(Ne){const[lt,Vn]=Ne;if(fe.addText(ie),ie="",x[pe]=(x[pe]||0)+1,x[pe]<=tg&&(_t+=Vn),lt.startsWith("_"))ie+=H[0];else{const $i=Te.classNameAliases[lt]||lt;fe.addKeyword(H[0],$i)}}else ie+=H[0];B=J.keywordPatternRe.lastIndex,H=J.keywordPatternRe.exec(ue)}ie+=ue.substr(B),fe.addText(ie)}function j(){if(ue==="")return;let B=null;if(typeof J.subLanguage=="string"){if(!t[J.subLanguage]){fe.addText(ue);return}B=h(J.subLanguage,ue,!0,It[J.subLanguage]),It[J.subLanguage]=B._top}else B=d(ue,J.subLanguage.length?J.subLanguage:null);J.relevance>0&&(_t+=B.relevance),fe.addSublanguage(B._emitter,B.language)}function W(){J.subLanguage!=null?j():L(),ue=""}function ce(B,H){let ie=1;const pe=H.length-1;for(;ie<=pe;){if(!B._emit[ie]){ie++;continue}const Ne=Te.classNameAliases[B[ie]]||B[ie],lt=H[ie];Ne?fe.addKeyword(lt,Ne):(ue=lt,L(),ue=""),ie++}}function je(B,H){return B.scope&&typeof B.scope=="string"&&fe.openNode(Te.classNameAliases[B.scope]||B.scope),B.beginScope&&(B.beginScope._wrap?(fe.addKeyword(ue,Te.classNameAliases[B.beginScope._wrap]||B.beginScope._wrap),ue=""):B.beginScope._multi&&(ce(B.beginScope,H),ue="")),J=Object.create(B,{parent:{value:J}}),J}function at(B,H,ie){let pe=_m(B.endRe,ie);if(pe){if(B["on:end"]){const Ne=new Ca(B);B["on:end"](H,Ne),Ne.isMatchIgnored&&(pe=!1)}if(pe){for(;B.endsParent&&B.parent;)B=B.parent;return B}}if(B.endsWithParent)return at(B.parent,H,ie)}function Ve(B){return J.matcher.regexIndex===0?(ue+=B[0],1):(dn=!0,0)}function Be(B){const H=B[0],ie=B.rule,pe=new Ca(ie),Ne=[ie.__beforeBegin,ie["on:begin"]];for(const lt of Ne)if(!!lt&&(lt(B,pe),pe.isMatchIgnored))return Ve(H);return ie.skip?ue+=H:(ie.excludeBegin&&(ue+=H),W(),!ie.returnBegin&&!ie.excludeBegin&&(ue=H)),je(ie,B),ie.returnBegin?0:H.length}function He(B){const H=B[0],ie=$.substr(B.index),pe=at(J,B,ie);if(!pe)return La;const Ne=J;J.endScope&&J.endScope._wrap?(W(),fe.addKeyword(H,J.endScope._wrap)):J.endScope&&J.endScope._multi?(W(),ce(J.endScope,B)):Ne.skip?ue+=H:(Ne.returnEnd||Ne.excludeEnd||(ue+=H),W(),Ne.excludeEnd&&(ue=H));do J.scope&&fe.closeNode(),!J.skip&&!J.subLanguage&&(_t+=J.relevance),J=J.parent;while(J!==pe.parent);return pe.starts&&je(pe.starts,B),Ne.returnEnd?0:H.length}function gt(){const B=[];for(let H=J;H!==Te;H=H.parent)H.scope&&B.unshift(H.scope);B.forEach(H=>fe.openNode(H))}let Je={};function St(B,H){const ie=H&&H[0];if(ue+=B,ie==null)return W(),0;if(Je.type==="begin"&&H.type==="end"&&Je.index===H.index&&ie===""){if(ue+=$.slice(H.index,H.index+1),!i){const pe=new Error(`0 width match regex (${O})`);throw pe.languageName=O,pe.badRule=Je.rule,pe}return 1}if(Je=H,H.type==="begin")return Be(H);if(H.type==="illegal"&&!G){const pe=new Error('Illegal lexeme "'+ie+'" for mode "'+(J.scope||"<unnamed>")+'"');throw pe.mode=J,pe}else if(H.type==="end"){const pe=He(H);if(pe!==La)return pe}if(H.type==="illegal"&&ie==="")return 1;if(un>1e5&&un>H.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ue+=ie,ie.length}const Te=C(O);if(!Te)throw en(s.replace("{}",O)),new Error('Unknown language: "'+O+'"');const tt=Jm(Te);let Et="",J=T||tt;const It={},fe=new a.__emitter(a);gt();let ue="",_t=0,Ke=0,un=0,dn=!1;try{for(J.matcher.considerAll();;){un++,dn?dn=!1:J.matcher.considerAll(),J.matcher.lastIndex=Ke;const B=J.matcher.exec($);if(!B)break;const H=$.substring(Ke,B.index),ie=St(H,B);Ke=B.index+ie}return St($.substr(Ke)),fe.closeAllNodes(),fe.finalize(),Et=fe.toHTML(),{language:O,value:Et,relevance:_t,illegal:!1,_emitter:fe,_top:J}}catch(B){if(B.message&&B.message.includes("Illegal"))return{language:O,value:Qi($),illegal:!0,relevance:0,_illegalBy:{message:B.message,index:Ke,context:$.slice(Ke-100,Ke+100),mode:B.mode,resultSoFar:Et},_emitter:fe};if(i)return{language:O,value:Qi($),illegal:!1,relevance:0,errorRaised:B,_emitter:fe,_top:J};throw B}}function p(O){const $={value:Qi(O),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return $._emitter.addText(O),$}function d(O,$){$=$||a.languages||Object.keys(t);const G=p(O),T=$.filter(C).filter(N).map(W=>h(W,O,!1));T.unshift(G);const x=T.sort((W,ce)=>{if(W.relevance!==ce.relevance)return ce.relevance-W.relevance;if(W.language&&ce.language){if(C(W.language).supersetOf===ce.language)return 1;if(C(ce.language).supersetOf===W.language)return-1}return 0}),[E,L]=x,j=E;return j.secondBest=L,j}function v(O,$,G){const T=$&&n[$]||G;O.classList.add("hljs"),O.classList.add(`language-${T}`)}function _(O){let $=null;const G=u(O);if(l(G))return;if(oe("before:highlightElement",{el:O,language:G}),O.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(O)),a.throwUnescapedHTML))throw new eg("One of your code blocks includes unescaped HTML.",O.innerHTML);$=O;const T=$.textContent,x=G?c(T,{language:G,ignoreIllegals:!0}):d(T);O.innerHTML=x.value,v(O,G,x.language),O.result={language:x.language,re:x.relevance,relevance:x.relevance},x.secondBest&&(O.secondBest={language:x.secondBest.language,relevance:x.secondBest.relevance}),oe("after:highlightElement",{el:O,result:x,text:T})}function m(O){a=Na(a,O)}const g=()=>{A(),mn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){A(),mn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let w=!1;function A(){if(document.readyState==="loading"){w=!0;return}document.querySelectorAll(a.cssSelector).forEach(_)}function b(){w&&A()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",b,!1);function k(O,$){let G=null;try{G=$(e)}catch(T){if(en("Language definition for '{}' could not be registered.".replace("{}",O)),i)en(T);else throw T;G=o}G.name||(G.name=O),t[O]=G,G.rawDefinition=$.bind(null,e),G.aliases&&M(G.aliases,{languageName:O})}function S(O){delete t[O];for(const $ of Object.keys(n))n[$]===O&&delete n[$]}function I(){return Object.keys(t)}function C(O){return O=(O||"").toLowerCase(),t[O]||t[n[O]]}function M(O,{languageName:$}){typeof O=="string"&&(O=[O]),O.forEach(G=>{n[G.toLowerCase()]=$})}function N(O){const $=C(O);return $&&!$.disableAutodetect}function F(O){O["before:highlightBlock"]&&!O["before:highlightElement"]&&(O["before:highlightElement"]=$=>{O["before:highlightBlock"](Object.assign({block:$.el},$))}),O["after:highlightBlock"]&&!O["after:highlightElement"]&&(O["after:highlightElement"]=$=>{O["after:highlightBlock"](Object.assign({block:$.el},$))})}function ne(O){F(O),r.push(O)}function oe(O,$){const G=O;r.forEach(function(T){T[G]&&T[G]($)})}function he(O){return mn("10.7.0","highlightBlock will be removed entirely in v12.0"),mn("10.7.0","Please use highlightElement now."),_(O)}Object.assign(e,{highlight:c,highlightAuto:d,highlightAll:A,highlightElement:_,highlightBlock:he,configure:m,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:S,listLanguages:I,getLanguage:C,registerAliases:M,autoDetection:N,inherit:Na,addPlugin:ne}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Qm,e.regex={concat:cn,lookahead:Kc,either:Xs,optional:mm,anyNumberOfTimes:pm};for(const O in jr)typeof jr[O]=="object"&&cm(jr[O]);return Object.assign(e,jr),e};var gr=ng({}),rg=gr;gr.HighlightJS=gr;gr.default=gr;var au=rg;function ig(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 sg='<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>';au.registerLanguage("json",ig);ee.use({highlight:(e,t)=>{if(t!=="")return au.highlight(e,{language:t}).value}});function og({id:e}){const{locale:t}=Se(),{version:n,changeVersion:r}=zn(),{changeTitle:i}=pt(),[s,o]=P(void 0),a=xe(()=>{if(!s)return;const b=s0(s);return i(b==null?void 0:b.title,b==null?void 0:b.versions),b},[s]),l=xe(()=>{var k;const b=me.versions.map(S=>S.id);return(k=a==null?void 0:a.versions)==null?void 0:k.sort((S,I)=>b.indexOf(I)-b.indexOf(S))},[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(!s)return;const b=s.substring(s.indexOf("---",3)+3);return o0(b,u)},[u,s]),h=xe(()=>{if(!!c)return ee.use({renderer:{link(b,k,S){if(b===null)return S;const I=k?` title="${k}"`:"",C=b!=null&&b.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${b}"${I}${C}>${S}</a>`},heading(b,k,S,I){const C=I.slug(S),M=`<span id="guide-${C}" href="?version=${n}#${C}">${sg}</span>`;return`<h${k}>${M}${b}</h${k}>`}}}),ee(c,{version:"1.19"})},[c]),[p,d]=u0(),v=Pe(()=>{if(!h)return;const b=document.querySelector(`[id=guide-${p.slice(1)}]`);if(b){const k=b.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:k-68,behavior:"smooth"})}},[h,p]);X(()=>{v()},[h===void 0,p]);const _=Pe(b=>{if(!(b.target instanceof HTMLSpanElement))return;const k="#"+b.target.id.replace(/^guide-/,"");r(n,!1,!0),d(k),k===p&&v()},[v,p,n]);X(()=>{(async()=>{const k=await(await fetch(`../../guides/${e}.md`)).text();o(k)})()},[e]);const[m,g]=Wn(),y=Pe(()=>{const b=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(b),g()},[e,n]),w=b=>{Yt(`/guides/?tags=${b}`)},[A]=P(window.innerWidth>600);return f("main",null,f("div",{class:"guide"},f("div",{class:"navigation"},f("a",{class:"btn btn-link",href:"/guides/"},se.arrow_left,t("guides.all")),f(q,{icon:m?"check":"link",label:t("share"),onClick:y,active:m,tooltip:t(m?"copied":"copy_share"),class:"guide-share"}),l&&f(qe,{icon:"tag",label:u,tooltip:t("switch_version")},l.map(b=>f(q,{label:b,active:b===u,onClick:()=>r(b)})))),(a==null?void 0:a.tags)&&a.tags.length>0&&f("div",{class:"guide-tags"},a.tags.map(b=>f(Or,{label:b,active:!0,onClick:()=>w(b)}))),h&&f(te,null,f(_r,{id:"guide",type:A?"image":"text"}),f("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:h},onClick:_}),f(Us,null))))}const ag="tags",es="|";function lg({}){const{locale:e}=Se(),{version:t,changeVersion:n}=zn();pt(e("title.guides"));const[r,i]=P(""),[s,o]=ar(ag),a=xe(()=>{var d;return(d=s==null?void 0:s.split(es))!=null?d:[]},[s]),l=d=>{a.includes(d)?o(a.filter(v=>v!==d).join(es)):o([...a,d].sort().join(es))},[u,c]=P(!1),h=xe(()=>u===!1?[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]}]:[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]}].filter(d=>{var v;return(v=d.versions)==null?void 0:v.includes(t)}),[t,u]),p=xe(()=>{const d=r.split(" ").map(v=>v.trim().toLowerCase()).filter(v=>v.length>0);return h.filter(v=>{var m;if(!a.every(g=>{var y;return(y=v.tags)==null?void 0:y.includes(g)}))return!1;const _=((m=v.tags)==null?void 0:m.join(" "))+" "+v.title.toLowerCase();return d.every(g=>g.startsWith("!")?g.length===1||!_.includes(g.slice(1)):_.includes(g))})},[h,r,s]);return f("main",null,f("div",{class:"guides"},f("div",{class:"changelog-query"},f(rn,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:r,onChange:i}),f(qe,{icon:"tag",label:u?t:e("any_version"),tooltip:e("switch_version")},f(q,{label:e("any_version"),active:!u,onClick:()=>c(!u)}),me.versions.slice().reverse().map(d=>f(q,{label:d.id,active:u&&d.id===t,onClick:()=>{n(d.id),c(!0)}})))),a.length>0&&f("div",{class:"changelog-tags"},a.map(d=>f(Or,{label:d,onClick:()=>l(d)}))),h.length===0?f(te,null,f("span",{class:"note"},e("guides.no_results.version"))):p.length===0?f(te,null,f("span",{class:"note"},e("guides.no_results.query"))):p.map(d=>{var v,_;return f(im,{title:d.title,link:`/guides/${d.id}/`,tags:(v=d.tags)!=null?v:[],versions:(_=d.versions)!=null?_:[],activeTags:a,toggleTag:l})})))}function cg({}){const{locale:e}=Se();return pt(e("title.home")),f("main",null,f("div",{class:"home"},f(nt,{title:"Data packs"},me.generators.filter(t=>!t.category).map(t=>f(nt,{title:e(t.id),link:Ft(t.url)})),f(nt,{title:e("worldgen"),link:"/worldgen/"})),f(nt,{title:"Resource packs"},me.generators.filter(t=>t.category==="assets").map(t=>f(nt,{title:e(t.id),link:Ft(t.url)}))),f(nt,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),f(nt,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),f(nt,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),f(nt,{title:"Technical Changelog",link:"/changelog/"}),f(nt,{title:"Minecraft Versions",link:"/versions/"}),f(nt,{title:"Data Pack Guides",link:"/guides/"}),f(Us,null)))}function ug({}){const{locale:e}=Se(),{project:t,openFile:n}=ac();pt(e("title.project",t.name));const r=xe(()=>t.files.map(B0),t.files),i=s=>{const[,o,a,...l]=s.split("/");n(a,`${o}:${l}`)};return f("main",null,f(_r,{id:"data-pack-project",type:"text"}),f("div",{class:"project"},f("h2",null,t.name),f("div",{class:"file-view"},f(Xc,{entries:r,onSelect:i}))))}function dg({}){const{locale:e}=Se(),{version:t,changeVersion:n}=zn(),[r,i]=P(null);pt(e("title.sounds"));const[s,o]=P(void 0);X(()=>{(async()=>{const k=await le(()=>import("./howler.0168f0b7.js").then(function(S){return S.h}),[]);o(()=>S=>new k.Howl(S))})()},[]);const[a,l]=P({}),u=Object.keys(a!=null?a:{});X(()=>{x0(t).then(l).catch(k=>{console.error(k),i(k)})},[t]);const[c,h]=P(""),[p,d]=P([]),v=()=>{d([{id:Qt(),sound:c,delay:0,pitch:1,volume:1},...p])},_=k=>S=>{d(p.map(I=>I.id===k?K(K({},I),S):I))},m=k=>()=>{d(p.filter(S=>S.id!==k))},[g,y]=P(0),w=()=>{y(g+1)},A=_e(null),b=()=>{if(!A.current)return;const k=p.some(I=>I.delay>0),S=p.sort((I,C)=>I.delay-C.delay).map(I=>`${k?`execute if score @s delay matches ${I.delay} run `:""}playsound minecraft:${I.sound} master @s ~ ~ ~ ${I.volume} ${I.pitch}`).join(`
`);A.current.setAttribute("href","data:text/plain;charset=utf-8,"+S+"%0A"),A.current.setAttribute("download","sounds.mcfunction"),A.current.click()};return f("main",null,r&&f(bn,{error:r,onDismiss:()=>i(null)}),u.length>0&&f(te,null,f("div",{class:"controls sounds-controls"},f("div",{class:"sound-search-group"},f(rn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:c,onChange:h,onEnter:v}),f(q,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:v})),p.length>1&&f(q,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:w}),f("div",{class:"spacer"}),f(q,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),class:"download-sounds",onClick:b}),f(qe,{icon:"tag",label:t,tooltip:e("switch_version")},me.versions.slice().reverse().map(k=>f(q,{label:k.id,active:k.id===t,onClick:()=>n(k.id)})))),f("div",{class:"sounds"},s&&p.map(k=>f(om,ke(K({key:k.id},k),{howler:s,sounds:a,delayedPlay:g,onEdit:_(k.id),onDelete:m(k.id)})))),f("a",{ref:A,style:"display: none;"})),f("datalist",{id:"sound-list"},u.map(k=>f("option",{key:k,value:k}))))}function hg({}){const{locale:e}=Se(),[t,n]=P(null);pt(e("title.versions"));const[r,i]=P([]);X(()=>{k0().then(u=>i(u)).catch(u=>{console.error(u),n(u)})},[]);const[s]=ar("id"),o=r.find(u=>u.id===s);pt(o?o.name:"Versions Explorer",o?[]:void 0);const a=o&&Ra(r,o,-1),l=o&&Ra(r,o,1);return f("main",null,f(_r,{type:"text",id:"versions"}),t&&f(bn,{error:t,onDismiss:()=>n(null)}),f("div",{class:"versions"},s?f(te,null,f("div",{class:"navigation"},f("a",{class:"btn btn-link",href:"/versions/"},se.three_bars,e("versions.all")),f("a",K({class:"btn btn-link"},l?{href:`/versions/?id=${l.id}`}:{disabled:!0}),se.arrow_left,e("versions.previous")),f("a",K({class:"btn btn-link"},a?{href:`/versions/?id=${a.id}`}:{disabled:!0}),e("versions.next"),se.arrow_right)),o?f(tm,{version:o}):f("div",{class:"version-detail"},f("h2",null,s),f("div",{class:"version-info"},f("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")))):f(rm,{versions:r,link:u=>`/versions/?id=${u}`})))}function Ra(e,t,n){const i=e.findIndex(s=>s.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function fg(){return f(te,null,f(sm,null),f($t,{onChange:t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>Ce.pageview(Ft(t.url)))}},f(cg,{path:"/"}),f(Ia,{path:"/worldgen",category:"worldgen"}),f(Ia,{path:"/assets",category:"assets"}),f(dg,{path:"/sounds"}),f(am,{path:"/changelog"}),f(hg,{path:"/versions"}),f(ug,{path:"/project"}),f(lg,{path:"/guides/"}),f(og,{path:"/guides/:id"}),f(lm,{default:!0})))}function pg(){return f(D0,null,f(F0,null,f(H0,null,f(j0,null,f($0,null,f(fg,null))))))}Sn(f(pg,null),document.body);export{Lr as c,vc as e,D as l};
//# sourceMappingURL=index.33ea8fe3.js.map