Files
misode.github.io/assets/index.e29e5ef6.js
2022-05-07 00:11:13 +00:00

113 lines
356 KiB
JavaScript

var Jc=Object.defineProperty,Xc=Object.defineProperties;var Kc=Object.getOwnPropertyDescriptors;var br=Object.getOwnPropertySymbols;var Uo=Object.prototype.hasOwnProperty,Go=Object.prototype.propertyIsEnumerable;var Ho=(e,t,n)=>t in e?Jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||(t={}))Uo.call(t,n)&&Ho(e,n,t[n]);if(br)for(var n of br(t))Go.call(t,n)&&Ho(e,n,t[n]);return e},Ae=(e,t)=>Xc(e,Kc(t));var yi=e=>typeof e=="symbol"?e:e+"",Yo=(e,t)=>{var n={};for(var r in e)Uo.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&br)for(var r of br(e))t.indexOf(r)<0&&Go.call(e,r)&&(n[r]=e[r]);return n};const Qc=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};Qc();var U,qn,Ma,Wo,Oa,Vr={},po=[],eu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Tt(e,t){for(var n in t)e[n]=t[n];return e}function Ta(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,t,n){var r,i,o,s=arguments,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(s[o]);if(n!=null&&(a.children=n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Zn(e,a,r,i,null)}function Zn(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++U.__v:i};return U.vnode!=null&&U.vnode(o),o}function tu(){return{current:null}}function te(e){return e.children}function ct(e,t){this.props=e,this.context=t}function Qn(e,t){if(t==null)return e.__?Qn(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"?Qn(e):null}function La(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 La(e)}}function Bi(e){(!e.__d&&(e.__d=!0)&&qn.push(e)&&!Hr.__r++||Wo!==U.debounceRendering)&&((Wo=U.debounceRendering)||Ma)(Hr)}function Hr(){for(var e;Hr.__r=qn.length;)e=qn.sort(function(t,n){return t.__v.__b-n.__v.__b}),qn=[],e.some(function(t){var n,r,i,o,s,a;t.__d&&(s=(o=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=Tt({},o)).__v=o.__v+1,mo(a,o,i,n.__n,a.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s==null?Qn(o):s,o.__h),Da(r,o),o.__e!=s&&La(o)))})}function Na(e,t,n,r,i,o,s,a,l,u){var c,h,p,d,v,_,m,g=r&&r.__k||po,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"?Zn(null,d,null,null,d):Array.isArray(d)?Zn(te,{children:d},null,null,null):d.__b>0?Zn(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}mo(e,d,p=p||Vr,i,o,s,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=Ra(d,l,e):l=Pa(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=Qn(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=Qn(r,c+1)),Ba(g[c],g[c]));if(m)for(c=0;c<m.length;c++)$a(m[c],m[++c],m[++c])}function Ra(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"?Ra(i,t,n):Pa(n,i,i,e.__k,i.__e,t));return t}function ut(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){ut(n,t)}):t.push(e)),t}function Pa(e,t,n,r,i,o){var s,a,l;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return s!==void 0?s:i.nextSibling}function nu(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||Ur(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||Ur(e,o,t[o],n[o],r)}function qo(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||eu.test(t)?n:n+"px"}function Ur(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||qo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||qo(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Jo:Zo,o):e.removeEventListener(t,o?Jo:Zo,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function Zo(e){this.l[e.type+!1](U.event?U.event(e):e)}function Jo(e){this.l[e.type+!0](U.event?U.event(e):e)}function mo(e,t,n,r,i,o,s,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,o=[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 ct(m,y),c.constructor=A,c.render=iu),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=Tt({},c.__s)),Tt(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&&s.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=Tt(Tt({},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,Na(e,Array.isArray(w)?w:[w],t,n,r,i,o,s,a,l),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),_&&(c.__E=c.__=null),c.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ru(n.__e,t,n,r,i,o,s,l);(u=U.diffed)&&u(t)}catch(b){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),U.__e(b,t,n)}}function Da(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 ru(e,t,n,r,i,o,s,a){var l,u,c,h,p=n.props,d=t.props,v=t.type,_=0;if(v==="svg"&&(i=!0),o!=null){for(;_<o.length;_++)if((l=o[_])&&(l===e||(v?l.localName==v:l.nodeType==3))){e=l,o[_]=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),o=null,a=!1}if(v===null)p===d||a&&e.data===d||(e.data=d);else{if(o=o&&po.slice.call(e.childNodes),u=(p=n.props||Vr).dangerouslySetInnerHTML,c=d.dangerouslySetInnerHTML,!a){if(o!=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(nu(e,d,p,i,a),c)t.__k=[];else if(_=t.props.children,Na(e,Array.isArray(_)?_:[_],t,n,r,i&&v!=="foreignObject",o,s,e.firstChild,a),o!=null)for(_=o.length;_--;)o[_]!=null&&Ta(o[_]);a||("value"in d&&(_=d.value)!==void 0&&(_!==e.value||v==="progress"&&!_)&&Ur(e,"value",_,p.value,!1),"checked"in d&&(_=d.checked)!==void 0&&_!==e.checked&&Ur(e,"checked",_,p.checked,!1))}return e}function $a(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){U.__e(r,n)}}function Ba(e,t,n){var r,i,o;if(U.unmount&&U.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||$a(r,null,t)),n||typeof e.type=="function"||(n=(i=e.__e)!=null),e.__e=e.__d=void 0,(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){U.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Ba(r[o],t,n);i!=null&&Ta(i)}function iu(e,t,n){return this.constructor(e,n)}function wn(e,t,n){var r,i,o;U.__&&U.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],mo(t,e=(!r&&n||t).__k=f(te,null,[e]),i||Vr,Vr,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?po.slice.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Da(o,e)}function Fa(e,t){wn(e,t,Fa)}function za(e,t,n){var r,i,o,s=arguments,a=Tt({},e.props);for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(s[o]);return n!=null&&(a.children=n),Zn(e.type,a,r||e.key,i||e.ref,null)}function Tn(e,t){var n={__c:t="__cC"+Oa++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(Bi)},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}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(o){e=o}throw e},__v:0},ct.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Tt({},this.state),typeof e=="function"&&(e=e(Tt({},n),this.props)),e&&Tt(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),Bi(this))},ct.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Bi(this))},ct.prototype.render=te,qn=[],Ma=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hr.__r=0,Oa=0;var ou={};function ja(e,t){for(var n in t)e[n]=t[n];return e}function Va(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),o={},s;if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var u=a[l].split("=");o[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}e=Fi(e.replace(r,"")),t=Fi(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(/[+*?]+$/)||ou)[0]||"",v=~d.indexOf("+"),_=~d.indexOf("*"),m=e[h]||"";if(!m&&!_&&(d.indexOf("?")<0||v)){s=!1;break}if(o[p]=decodeURIComponent(m),v||_){o[p]=e.slice(h).map(decodeURIComponent).join("/");break}}else if(t[h]!==e[h]){s=!1;break}return n.default!==!0&&s===!1?!1:o}function su(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function au(e,t){return e.index=t,e.rank=uu(e),e.props}function Fi(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function lu(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function cu(e){return Fi(e).map(lu).join("")}function uu(e){return e.props.default?0:cu(e.props.path)}var Ze=null,Zt=[],zi=[],du={};function fu(e,t){t===void 0&&(t="push"),Ze&&Ze[t]?Ze[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function yn(){var e;return Ze&&Ze.location?e=Ze.location:Ze&&Ze.getCurrentLocation?e=Ze.getCurrentLocation():e=typeof location!="undefined"?location:du,""+(e.pathname||"")+(e.search||"")}function Ht(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),hu(e)&&fu(e,t?"replace":"push"),Ha(e)}function hu(e){for(var t=Zt.length;t--;)if(Zt[t].canRoute(e))return!0;return!1}function Ha(e){for(var t=!1,n=0;n<Zt.length;n++)Zt[n].routeTo(e)===!0&&(t=!0);for(var r=zi.length;r--;)zi[r](e);return t}function Ua(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 Ht(t)}}function pu(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return Ua(e.currentTarget||e.target||this),Ga(e)}function Ga(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function mu(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(Ua(t))return Ga(e)}while(t=t.parentNode)}}var Xo=!1;function gu(){Xo||(typeof addEventListener=="function"&&(Ze||addEventListener("popstate",function(){Ha(yn())}),addEventListener("click",mu)),Xo=!0)}var Lt=function(e){function t(n){e.call(this,n),n.history&&(Ze=n.history),this.state={url:n.url||yn()},gu()}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=ut(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(){Zt.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;Ze&&(this.unlisten=Ze.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),Zt.splice(Zt.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,o){return r.filter(au).sort(su).map(function(s){var a=Va(i,s.props.path,s.props);if(a){if(o!==!1){var l={url:i,matches:a};return ja(l,a),delete l.ref,delete l.key,za(s,l)}return s}}).filter(Boolean)},t.prototype.render=function(r,i){var o=r.children,s=r.onChange,a=i.url,l=this.getMatchingChildren(ut(o),a,!0),u=l[0]||null,c=this.previousUrl;return a!==c&&(this.previousUrl=a,typeof s=="function"&&s({router:this,url:a,previous:c,active:l,current:u})),u},t}(ct),Ya=function(e){return f("a",ja({onClick:pu},e))},_u=function(e){return f(e.component,e)};Lt.subscribers=zi;Lt.getCurrentUrl=yn;Lt.route=Ht;Lt.Router=Lt;Lt.Route=_u;Lt.Link=Ya;Lt.exec=Va;var Ie;(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})(Ie||(Ie={}));var nn,De,Ko,bn=0,ji=[],Qo=U.__b,es=U.__r,ts=U.diffed,ns=U.__c,rs=U.unmount;function Ln(e,t){U.__h&&U.__h(De,e,bn||t),bn=0;var n=De.__H||(De.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function R(e){return bn=1,Wa(Ja,e)}function Wa(e,t,n){var r=Ln(nn++,2);return r.t=e,r.__c||(r.__=[n?n(t):Ja(void 0,t),function(i){var o=r.t(r.__[0],i);r.__[0]!==o&&(r.__=[o,r.__[1]],r.__c.setState({}))}],r.__c=De),r.__}function J(e,t){var n=Ln(nn++,3);!U.__s&&go(n.__H,t)&&(n.__=e,n.__H=t,De.__H.__h.push(n))}function qa(e,t){var n=Ln(nn++,4);!U.__s&&go(n.__H,t)&&(n.__=e,n.__H=t,De.__h.push(n))}function _e(e){return bn=5,be(function(){return{current:e}},[])}function vu(e,t,n){bn=6,qa(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function be(e,t){var n=Ln(nn++,7);return go(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Re(e,t){return bn=8,be(function(){return e},t)}function Nn(e){var t=De.context[e.__c],n=Ln(nn++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(De)),t.props.value):e.__}function wu(e,t){U.useDebugValue&&U.useDebugValue(t?t(e):e)}function Za(e){var t=Ln(nn++,10),n=R();return t.__=e,De.componentDidCatch||(De.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function yu(){ji.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Or),e.__H.__h.forEach(Vi),e.__H.__h=[]}catch(t){e.__H.__h=[],U.__e(t,e.__v)}}),ji=[]}U.__b=function(e){De=null,Qo&&Qo(e)},U.__r=function(e){es&&es(e),nn=0;var t=(De=e.__c).__H;t&&(t.__h.forEach(Or),t.__h.forEach(Vi),t.__h=[])},U.diffed=function(e){ts&&ts(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(ji.push(t)!==1&&Ko===U.requestAnimationFrame||((Ko=U.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(o),is&&cancelAnimationFrame(r),setTimeout(n)},o=setTimeout(i,100);is&&(r=requestAnimationFrame(i))})(yu)),De=void 0},U.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Or),n.__h=n.__h.filter(function(r){return!r.__||Vi(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],U.__e(r,n.__v)}}),ns&&ns(e,t)},U.unmount=function(e){rs&&rs(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Or)}catch(n){U.__e(n,t.__v)}};var is=typeof requestAnimationFrame=="function";function Or(e){var t=De;typeof e.__c=="function"&&e.__c(),De=t}function Vi(e){var t=De;e.__c=e.__(),De=t}function go(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Ja(e,t){return typeof t=="function"?t(e):t}function cr({type:e,id:t}){return J(()=>{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:o,onClick:s}){return f("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${o!=null?o:"sw"}`:""}${n?" tip-shown":""}`,onClick:s,"aria-label":i},e&&oe[e],t&&f("span",null,t))}var xr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Xa(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={},xt={},wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.ModelPath=wt.Path=wt.relativePath=void 0;function bu(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}wt.relativePath=bu;class It{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 It(this.modelArr.slice(t,n),this.contextArr)}shift(){return new It(this.modelArr.slice(1),this.contextArr)}pop(){return new It(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new It([...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 It([...this.modelArr],[...this.contextArr,n])}copy(){return new It([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Ct(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)}}wt.Path=It;class Ct extends It{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 Ct(this.model,super.slice(t,n))}shift(){return new Ct(this.model,super.shift())}pop(){return new Ct(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Ct(this.model,super.modelPush(t))}contextPush(t){return new Ct(this.model,super.contextPush(t))}copy(){return new Ct(this.model,super.copy())}}wt.ModelPath=Ct;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.Errors=void 0;class xu{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}}Rn.Errors=xu;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});yt.hexId=yt.quoteString=yt.escapeString=void 0;function Ka(e){return e.replace(/(\\|")/g,"\\$1")}yt.escapeString=Ka;function Au(e){return`"${Ka(e)}"`}yt.quoteString=Au;const ku=e=>("0"+e.toString(16)).substr(-2);function Eu(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,ku).join("")}yt.hexId=Eu;Object.defineProperty(xt,"__esModule",{value:!0});xt.DataModel=void 0;const Su=wt,os=Rn,bi=yt;class _o{constructor(t,n){var r,i,o,s;this.historyMax=(r=n==null?void 0:n.historyMax)!==null&&r!==void 0?r:50,this.verbose=(i=n==null?void 0:n.verbose)!==null&&i!==void 0?i:!1,this.wrapLists=(o=n==null?void 0:n.wrapLists)!==null&&o!==void 0?o:!1,this.schema=t;const a=(s=n==null?void 0:n.initialData)!==null&&s!==void 0?s:t.default();this.data=this.wrapLists?_o.wrapLists(a):a,this.listeners=[],this.errors=new os.Errors,this.history=[JSON.stringify(this.data)],this.historyIndex=0}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n>-1&&this.listeners.splice(n,1)}invalidate(){const t=JSON.stringify(this.data);this.history[this.historyIndex]!==t&&(this.historyIndex+=1,this.history.splice(this.historyIndex,this.historyMax,t),this.history.length>this.historyMax&&(this.history.splice(0,1),this.historyIndex-=1)),this.silentInvalidate()}silentInvalidate(){this.listeners.forEach(t=>{t.invalidated&&t.invalidated(this),t.errors&&t.errors(this.errors)})}reset(t,n){this.data=t,this.validate(n),this.invalidate()}get(t){let n=this.data;return t.forEach(r=>{if(n===void 0)return n;this.wrapLists&&typeof r=="number"?n=n[r].node:n=n[r]}),n}set(t,n,r){if(t.getArray().length===0){this.reset(n,!0);return}let i=this.data;t.pop().forEach(o=>{(i[o]===void 0||typeof i[o]=="string"||typeof i[o]=="number")&&(this.wrapLists&&typeof o=="number"?i[o]={node:{},id:(0,bi.hexId)()}:i[o]={}),this.wrapLists&&typeof o=="number"?i=i[o].node:i=i[o]}),i!==null&&(n===void 0||typeof n=="number"&&isNaN(n)?typeof t.last()=="number"?i.splice(t.last(),1):delete i[t.last()]:this.wrapLists&&typeof t.last()=="number"?i[t.last()]={node:n,id:(0,bi.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 Su.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 os.Errors;i.add(t,n,r),this.listeners.forEach(o=>{o.errors&&o.errors(i)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(r=>({node:this.wrapLists(r),id:(0,bi.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}}xt.DataModel=_o;var $t={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:o=>o,suggest:()=>[],validate:(o,s)=>s,validationOption:()=>{},hook(o,s,...a){return o.base({node:this},s,...a)},canUpdate:()=>!1,update:()=>[]};const t=(o,s)=>K(K({},o),typeof s=="function"?s(o):s);e.Mod=t;const n=(o,s)=>(0,e.Mod)(s,{enabled:a=>a.push(o).get()!==void 0});e.Has=n;function r(o){return Ae(K({},o),{optional:()=>!0})}e.Opt=r;function i(o){return Ae(K({},o),{keep:()=>!0})}e.Keep=i})($t);var ei={};Object.defineProperty(ei,"__esModule",{value:!0});ei.BooleanNode=void 0;const Iu=xt,Cu=$t,Mu=()=>Ae(K({},Cu.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?Iu.DataModel.wrapLists(this.default()):this.default()),(typeof t!="boolean"||t===void 0)&&n.add(e,"error.expected_boolean"),t},hook(e,t,...n){var r;return((r=e.boolean)!==null&&r!==void 0?r:e.base).call(e,{node:this},t,...n)}});ei.BooleanNode=Mu;var Qa={},ur={};Object.defineProperty(ur,"__esModule",{value:!0});ur.ListNode=void 0;const Ou=xt,Tu=$t,Lu=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,o=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,s=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return Ae(K({},Tu.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?Ou.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))s&&(l.length<i||l.length>o)?i===o?u.add(a,"error.invalid_list_range.exact",l.length,i):u.add(a,"error.invalid_list_range.between",l.length,i,o):l.length<i?u.add(a,"error.invalid_list_range.smaller",l.length,i):l.length>o&&u.add(a,"error.invalid_list_range.larger",l.length,o);else return u.add(a,"error.expected_list"),l;const 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)}})};ur.ListNode=Lu;var dr={};Object.defineProperty(dr,"__esModule",{value:!0});dr.SwitchNode=void 0;const Nu=$t,Ru=e=>Ae(K({},Nu.Base),{type(t){return this.activeCase(t,!0).node.type(t)},category(t){return this.activeCase(t,!0).node.category(t)},default:()=>e[0].node.default(),navigate(t,n){var r;const i=n+1;return(r=this.activeCase(t.slice(0,i)))===null||r===void 0?void 0:r.node.navigate(t,n)},pathPush(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.pathPush(t,n))!==null&&i!==void 0?i:t},suggest(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.suggest(t,n))!==null&&i!==void 0?i:e.filter(o=>o.match(t)).map(o=>o.node.suggest(t,n)).reduce((o,s)=>o.concat(s))},validate(t,n,r,i){let o=this.activeCase(t);return o===void 0?n:o.node.validate(t,n,r,i)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const r=(o,s)=>{var a,l;return((a=s.priority)!==null&&a!==void 0?a:0)-((l=o.priority)!==null&&l!==void 0?l:0)},i=e.filter(o=>o.match(t)).sort(r);return n&&i.length===0?e.sort(r)[0]:i.length>0?i[0]:void 0},hook(t,n,...r){return this.activeCase(n,!0).node.hook(t,n,...r)}});dr.SwitchNode=Ru;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=ur,n=dr,r=(s,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)(s.map(c=>({type:c.type,priority:c.priority,match:h=>l(c,h.get()),node:c.node})));return Ae(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:s,config:a!=null?a:{},switchNode:u},h,...p)}})};e.ChoiceNode=r;const i=s=>(a,l)=>(0,e.ChoiceNode)([{type:s,node:a,change:u=>{var c;return(c=u[0])!==null&&c!==void 0?c:a.default()}},{type:"list",node:(0,t.ListNode)(a),change:u=>u?[u]:[]}],l);e.ObjectOrList=i("object"),e.StringOrList=i("string");const o=(s,a,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:s,change:u=>Object.keys(l)[0]},{type:"object",node:a,change:u=>{var c;return(c=l[u])!==null&&c!==void 0?c:l[Object.keys(l)[0]]}}]);e.ObjectOrPreset=o})(Qa);var ti={};Object.defineProperty(ti,"__esModule",{value:!0});ti.MapNode=void 0;const Pu=$t,Du=xt,$u=(e,t,n)=>Ae(K({},Pu.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const o=i+1;return r.getArray().length<=o?this:t.navigate(r,o)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,o,s){if(s.loose&&typeof i!="object"&&(i=s.wrapLists?Du.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return o.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(l=>{e.validate(r,l,o,s),a[l]=t.validate(r.push(l),i[l],o,s)});for(const l of Object.getOwnPropertySymbols(i))a[l]=i[l];return a},validationOption(r){var i;return(i=n==null?void 0:n.validation)!==null&&i!==void 0?i:e.validationOption(r.push(""))},hook(r,i,...o){var s;return((s=r.map)!==null&&s!==void 0?s:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...o)}});ti.MapNode=$u;var el={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=D,n=xt,r=$t,i=s=>{var a,l,u;const c=s!=null&&s.color?!0:(a=s==null?void 0:s.integer)!==null&&a!==void 0?a:!1,h=s!=null&&s.color?0:(l=s==null?void 0:s.min)!==null&&l!==void 0?l:-1/0,p=s!=null&&s.color?16777215:(u=s==null?void 0:s.max)!==null&&u!==void 0?u:1/0,d=(s==null?void 0:s.min)!==void 0&&(s==null?void 0:s.max)!==void 0;return Ae(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:s!=null?s:{}},_,...m)}})};e.NumberNode=i;const o=({integer:s,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:s}),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=o})(el);var tl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=$t,n=wt,r=Rn,i=yt,o=xt;e.Switch=Symbol("switch"),e.Case=Symbol("case");const s=(a,l)=>{var v,_;const m=a,{[v=e.Switch]:u,[_=e.Case]:c}=m,h=Yo(m,[yi(v),yi(_)]),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),E=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)?E.contextPush(A):E).push(y)};return Ae(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?o.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 L=M.get();if(g.equals(M.pop())){const F=M.last();L=h[F].validate(g.push(F),y[F],new r.Errors,A)}b=K(K({},b),c[L])}const k=Object.keys(b),E=k.filter(M=>!b[M].optional()),I=new Set([...E,...Object.keys(y)]),C={};I.forEach(M=>{if(k.includes(M)){if(!b[M].enabled(g))return;const L=b[M].validate(g.push(M),y[M],w,A);!b[M].keep()&&b[M].optional()&&(L===void 0||Array.isArray(L)&&L.length===0||L.constructor===Object&&Object.keys(L).length===0)?delete C[M]:(C[M]=L,g.getModel().set(g.push(M),L,!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=s})(tl);var ni={};Object.defineProperty(ni,"__esModule",{value:!0});ni.Reference=void 0;const Bu=(e,t)=>({type(n){return e.get(t).type.bind(this)(n)},category(n){return e.get(t).category.bind(this)(n)},default(){return e.get(t).default.bind(this)()},transform(n,r){return e.get(t).transform(n,r)},enabled(n){return e.get(t).enabled.bind(this)(n)},keep(){return e.get(t).keep.bind(this)()},optional(){return e.get(t).optional.bind(this)()},navigate(n,r){return e.get(t).navigate.bind(this)(n,r)},pathPush(n,r){return e.get(t).pathPush.bind(this)(n,r)},suggest(n,r){return e.get(t).suggest.bind(this)(n,r)},validate(n,r,i,o){return e.get(t).validate.bind(this)(n,r,i,o)},validationOption(n){return e.get(t).validationOption.bind(this)(n)},hook(n,r,...i){return e.get(t).hook.bind(this)(n,r,...i)},activeCase(n,r){return e.get(t).activeCase.bind(this)(n,r)},canUpdate(n,r){return e.get(t).canUpdate.bind(this)(n,r)},update(n,r){return e.get(t).update.bind(this)(n,r)}});ni.Reference=Bu;var ri={};Object.defineProperty(ri,"__esModule",{value:!0});ri.StringNode=void 0;const Fu=$t,zu=yt,ju=xt,ss=e=>!!(e!=null&&e.enum),as=e=>!!(e!=null&&e.validator),Vu=(e,t)=>{const n=()=>{var r,i,o,s;if(ss(t))return typeof t.enum=="string"?(r=e==null?void 0:e.get(t.enum))!==null&&r!==void 0?r:[]:t.enum;if((t==null?void 0:t.validator)==="resource"){if(typeof t.params.pool=="string"){if(t.params.requireTag)return(i=e==null?void 0:e.get(`tag/${t.params.pool}`).map(l=>`#${l}`))!==null&&i!==void 0?i:[];const a=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag?(o=e==null?void 0:e.get(`tag/${a}`).map(l=>`#${l}`))!==null&&o!==void 0?o:[]:[],...(s=e==null?void 0:e.get(a))!==null&&s!==void 0?s:[]]}return t.params.pool}return[]};return Ae(K({},Fu.Base),{type:()=>"string",default:()=>"",validate(r,i,o,s){if(s.loose&&typeof i!="string"&&(i=(s.wrapLists?ju.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return o.add(r,"error.expected_string"),i;if(as(t)){if(t.validator==="resource"&&i.length>0&&!i.includes(":")&&(i=i.startsWith("#")?"#minecraft:"+i.slice(1):"minecraft:"+i),t.validator==="resource"&&typeof i=="string"){let l=i;if(i.startsWith("#")){if(typeof t.params.pool=="string"&&t.params.pool.startsWith("$tag/"))return o.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return o.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return o.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return o.add(r,"error.invalid_resource_location"),i}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&i.startsWith("#")||t.params.isDefinition||t.params.allowUnknown))return i}if(ss(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&o.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(zu.quoteString),validationOption(){return as(t)?t:void 0},hook(r,i,...o){var s;return((s=r.string)!==null&&s!==void 0?s:r.base).call(r,{node:this,getValues:n,config:t},i,...o)}})};ri.StringNode=Vu;var nl={};Object.defineProperty(nl,"__esModule",{value:!0});var xn={};Object.defineProperty(xn,"__esModule",{value:!0});xn.CollectionRegistry=xn.SchemaRegistry=void 0;class Hu{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}}xn.SchemaRegistry=Hu;class Uu{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:[]}}xn.CollectionRegistry=Uu;var rl={};Object.defineProperty(rl,"__esModule",{value:!0});(function(e){var t=xr&&xr.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=xr&&xr.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(xt,e),n(wt,e),n(Rn,e),n($t,e),n(ei,e),n(Qa,e),n(ur,e),n(ti,e),n(el,e),n(tl,e),n(ni,e),n(ri,e),n(dr,e),n(nl,e),n(xn,e),n(rl,e)})(D);var Se={},fr={},rt={};function il(e){return typeof e=="undefined"||e===null}function Gu(e){return typeof e=="object"&&e!==null}function Yu(e){return Array.isArray(e)?e:il(e)?[]:[e]}function Wu(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}function qu(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function Zu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}rt.isNothing=il;rt.isObject=Gu;rt.toArray=Yu;rt.repeat=qu;rt.isNegativeZero=Zu;rt.extend=Wu;function er(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||""}er.prototype=Object.create(Error.prototype);er.prototype.constructor=er;er.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var hr=er,ls=rt;function vo(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}vo.prototype.getSnippet=function(t,n){var r,i,o,s,a;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),ls.repeat(" ",t)+r+a+o+`
`+ls.repeat(" ",t+this.position-i+r.length)+"^"};vo.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 Ju=vo,cs=hr,Xu=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Ku=["scalar","sequence","mapping"];function Qu(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function ed(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(Xu.indexOf(n)===-1)throw new cs('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=Qu(t.styleAliases||null),Ku.indexOf(this.kind)===-1)throw new cs('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Pe=ed,us=rt,Tr=hr,td=Pe;function Hi(e,t,n){var r=[];return e.include.forEach(function(i){n=Hi(i,t,n)}),e[t].forEach(function(i){n.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&r.push(s)}),n.push(i)}),n.filter(function(i,o){return r.indexOf(o)===-1})}function nd(){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 hn(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 Tr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Hi(this,"implicit",[]),this.compiledExplicit=Hi(this,"explicit",[]),this.compiledTypeMap=nd(this.compiledImplicit,this.compiledExplicit)}hn.DEFAULT=null;hn.create=function(){var t,n;switch(arguments.length){case 1:t=hn.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Tr("Wrong number of arguments for Schema.create function")}if(t=us.toArray(t),n=us.toArray(n),!t.every(function(r){return r instanceof hn}))throw new Tr("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof td}))throw new Tr("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new hn({include:t,explicit:n})};var Pn=hn,rd=Pe,id=new rd("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),od=Pe,sd=new od("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),ad=Pe,ld=new ad("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),cd=Pn,wo=new cd({explicit:[id,sd,ld]}),ud=Pe;function dd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function fd(){return null}function hd(e){return e===null}var pd=new ud("tag:yaml.org,2002:null",{kind:"scalar",resolve:dd,construct:fd,predicate:hd,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),md=Pe;function gd(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 _d(e){return e==="true"||e==="True"||e==="TRUE"}function vd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var wd=new md("tag:yaml.org,2002:bool",{kind:"scalar",resolve:gd,construct:_d,predicate:vd,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),yd=rt,bd=Pe;function xd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Ad(e){return 48<=e&&e<=55}function kd(e){return 48<=e&&e<=57}function Ed(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(!xd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!Ad(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(!kd(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function Sd(e){var t=e,n=1,r,i,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,i=1,o.forEach(function(s){t+=s*i,i*=60}),n*t):n*parseInt(t,10)}function Id(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!yd.isNegativeZero(e)}var Cd=new bd("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ed,construct:Sd,predicate:Id,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"]}}),ol=rt,Md=Pe,Od=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 Td(e){return!(e===null||!Od.test(e)||e[e.length-1]==="_")}function Ld(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){i.unshift(parseFloat(o,10))}),t=0,r=1,i.forEach(function(o){t+=o*r,r*=60}),n*t):n*parseFloat(t,10)}var Nd=/^[-+]?[0-9]+e/;function Rd(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(ol.isNegativeZero(e))return"-0.0";return n=e.toString(10),Nd.test(n)?n.replace("e",".e"):n}function Pd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ol.isNegativeZero(e))}var Dd=new Md("tag:yaml.org,2002:float",{kind:"scalar",resolve:Td,construct:Ld,predicate:Pd,represent:Rd,defaultStyle:"lowercase"}),$d=Pn,sl=new $d({include:[wo],implicit:[pd,wd,Cd,Dd]}),Bd=Pn,al=new Bd({include:[sl]}),Fd=Pe,ll=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),cl=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 zd(e){return e===null?!1:ll.exec(e)!==null||cl.exec(e)!==null}function jd(e){var t,n,r,i,o,s,a,l=0,u=null,c,h,p;if(t=ll.exec(e),t===null&&(t=cl.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],h=+(t[11]||0),u=(c*60+h)*6e4,t[9]==="-"&&(u=-u)),p=new Date(Date.UTC(n,r,i,o,s,a,l)),u&&p.setTime(p.getTime()-u),p}function Vd(e){return e.toISOString()}var Hd=new Fd("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:zd,construct:jd,instanceOf:Date,represent:Vd}),Ud=Pe;function Gd(e){return e==="<<"||e===null}var Yd=new Ud("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Gd}),qt;try{var Wd=Xa;qt=Wd("buffer").Buffer}catch{}var qd=Pe,yo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function Zd(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=yo;for(n=0;n<i;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function Jd(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=yo,s=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),qt?qt.from?qt.from(a):new qt(a):a}function Xd(e){var t="",n=0,r,i,o=e.length,s=yo;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function Kd(e){return qt&&qt.isBuffer(e)}var Qd=new qd("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Zd,construct:Jd,predicate:Kd,represent:Xd}),ef=Pe,tf=Object.prototype.hasOwnProperty,nf=Object.prototype.toString;function rf(e){if(e===null)return!0;var t=[],n,r,i,o,s,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,nf.call(i)!=="[object Object]")return!1;for(o in i)if(tf.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function of(e){return e!==null?e:[]}var sf=new ef("tag:yaml.org,2002:omap",{kind:"sequence",resolve:rf,construct:of}),af=Pe,lf=Object.prototype.toString;function cf(e){if(e===null)return!0;var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],lf.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function uf(e){if(e===null)return[];var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1)r=s[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var df=new af("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:cf,construct:uf}),ff=Pe,hf=Object.prototype.hasOwnProperty;function pf(e){if(e===null)return!0;var t,n=e;for(t in n)if(hf.call(n,t)&&n[t]!==null)return!1;return!0}function mf(e){return e!==null?e:{}}var gf=new ff("tag:yaml.org,2002:set",{kind:"mapping",resolve:pf,construct:mf}),_f=Pn,pr=new _f({include:[al],implicit:[Hd,Yd],explicit:[Qd,sf,df,gf]}),vf=Pe;function wf(){return!0}function yf(){}function bf(){return""}function xf(e){return typeof e=="undefined"}var Af=new vf("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:wf,construct:yf,predicate:xf,represent:bf}),kf=Pe;function Ef(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 Sf(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 If(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function Cf(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Mf=new kf("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Ef,construct:Sf,predicate:Cf,represent:If}),Gr;try{var Of=Xa;Gr=Of("esprima")}catch{typeof window!="undefined"&&(Gr=window.esprima)}var Tf=Pe;function Lf(e){if(e===null)return!1;try{var t="("+e+")",n=Gr.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 Nf(e){var t="("+e+")",n=Gr.parse(t,{range:!0}),r=[],i;if(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(o){r.push(o.name)}),i=n.body[0].expression.body.range,n.body[0].expression.body.type==="BlockStatement"?new Function(r,t.slice(i[0]+1,i[1]-1)):new Function(r,"return "+t.slice(i[0],i[1]))}function Rf(e){return e.toString()}function Pf(e){return Object.prototype.toString.call(e)==="[object Function]"}var Df=new Tf("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Lf,construct:Nf,predicate:Pf,represent:Rf}),ds=Pn,ii=ds.DEFAULT=new ds({include:[pr],explicit:[Af,Mf,Df]}),Ot=rt,ul=hr,$f=Ju,dl=pr,Bf=ii,Ut=Object.prototype.hasOwnProperty,Yr=1,fl=2,hl=3,Wr=4,xi=1,Ff=2,fs=3,zf=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jf=/[\x85\u2028\u2029]/,Vf=/[,\[\]\{\}]/,pl=/^(?:!|!!|![a-z\-]+!)$/i,ml=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function hs(e){return Object.prototype.toString.call(e)}function bt(e){return e===10||e===13}function Jt(e){return e===9||e===32}function Ue(e){return e===9||e===32||e===10||e===13}function pn(e){return e===44||e===91||e===93||e===123||e===125}function Hf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Uf(e){return e===120?2:e===117?4:e===85?8:0}function Gf(e){return 48<=e&&e<=57?e-48:-1}function ps(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Yf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var gl=new Array(256),_l=new Array(256);for(var ln=0;ln<256;ln++)gl[ln]=ps(ln)?1:0,_l[ln]=ps(ln);function Wf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Bf,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 vl(e,t){return new ul(t,new $f(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function Z(e,t){throw vl(e,t)}function qr(e,t){e.onWarning&&e.onWarning.call(null,vl(e,t))}var ms={YAML:function(t,n,r){var i,o,s;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"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&Z(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&qr(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],pl.test(i)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),Ut.call(t.tagMap,i)&&Z(t,'there is a previously declared suffix for "'+i+'" tag handle'),ml.test(o)||Z(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function jt(e,t,n,r){var i,o,s,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||Z(e,"expected valid JSON character");else zf.test(a)&&Z(e,"the stream contains non-printable characters");e.result+=a}}function gs(e,t,n,r){var i,o,s,a;for(Ot.isObject(n)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],Ut.call(t,o)||(t[o]=n[o],r[o]=!0)}function mn(e,t,n,r,i,o,s,a){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&Z(e,"nested arrays are not supported inside keys"),typeof i=="object"&&hs(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&hs(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,u=o.length;l<u;l+=1)gs(e,t,o[l],n);else gs(e,t,o,n);else!e.json&&!Ut.call(n,i)&&Ut.call(t,i)&&(e.line=s||e.line,e.position=a||e.position,Z(e,"duplicated mapping key")),t[i]=o,delete n[i];return t}function bo(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 Ce(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Jt(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(bt(i))for(bo(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&&qr(e,"deficient indentation"),r}function oi(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||Ue(n)))}function xo(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ot.repeat(`
`,t-1))}function qf(e,t,n){var r,i,o,s,a,l,u,c,h=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Ue(d)||pn(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),Ue(i)||n&&pn(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,a=!1;d!==0;){if(d===58){if(i=e.input.charCodeAt(e.position+1),Ue(i)||n&&pn(i))break}else if(d===35){if(r=e.input.charCodeAt(e.position-1),Ue(r))break}else{if(e.position===e.lineStart&&oi(e)||n&&pn(d))break;if(bt(d))if(l=e.line,u=e.lineStart,c=e.lineIndent,Ce(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=u,e.lineIndent=c;break}}a&&(jt(e,o,s,!1),xo(e,e.line-l),o=s=e.position,a=!1),Jt(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return jt(e,o,s,!1),e.result?!0:(e.kind=h,e.result=p,!1)}function Zf(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(jt(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 bt(n)?(jt(e,r,i,!0),xo(e,Ce(e,!1,t)),r=i=e.position):e.position===e.lineStart&&oi(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 Jf(e,t){var n,r,i,o,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return jt(e,n,e.position,!0),e.position++,!0;if(a===92){if(jt(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),bt(a))Ce(e,!1,t);else if(a<256&&gl[a])e.result+=_l[a],e.position++;else if((s=Uf(a))>0){for(i=s,o=0;i>0;i--)a=e.input.charCodeAt(++e.position),(s=Hf(a))>=0?o=(o<<4)+s:Z(e,"expected hexadecimal character");e.result+=Yf(o),e.position++}else Z(e,"unknown escape sequence");n=r=e.position}else bt(a)?(jt(e,n,r,!0),xo(e,Ce(e,!1,t)),n=r=e.position):e.position===e.lineStart&&oi(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 Xf(e,t){var n=!0,r,i=e.tag,o,s=e.anchor,a,l,u,c,h,p={},d,v,_,m;if(m=e.input.charCodeAt(e.position),m===91)l=93,h=!1,o=[];else if(m===123)l=125,h=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),m=e.input.charCodeAt(++e.position);m!==0;){if(Ce(e,!0,t),m=e.input.charCodeAt(e.position),m===l)return e.position++,e.tag=i,e.anchor=s,e.kind=h?"mapping":"sequence",e.result=o,!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),Ue(a)&&(u=c=!0,e.position++,Ce(e,!0,t))),r=e.line,An(e,t,Yr,!1,!0),v=e.tag,d=e.result,Ce(e,!0,t),m=e.input.charCodeAt(e.position),(c||e.line===r)&&m===58&&(u=!0,m=e.input.charCodeAt(++e.position),Ce(e,!0,t),An(e,t,Yr,!1,!0),_=e.result),h?mn(e,o,p,v,d,_):u?o.push(mn(e,null,p,v,d,_)):o.push(d),Ce(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 Kf(e,t){var n,r,i=xi,o=!1,s=!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)xi===i?i=h===43?fs:Ff:Z(e,"repeat of a chomping mode identifier");else if((c=Gf(h))>=0)c===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Z(e,"repeat of an indentation width identifier"):(a=t+c-1,s=!0);else break;if(Jt(h)){do h=e.input.charCodeAt(++e.position);while(Jt(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!bt(h)&&h!==0)}for(;h!==0;){for(bo(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&h===32;)e.lineIndent++,h=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),bt(h)){l++;continue}if(e.lineIndent<a){i===fs?e.result+=Ot.repeat(`
`,o?1+l:l):i===xi&&o&&(e.result+=`
`);break}for(r?Jt(h)?(u=!0,e.result+=Ot.repeat(`
`,o?1+l:l)):u?(u=!1,e.result+=Ot.repeat(`
`,l+1)):l===0?o&&(e.result+=" "):e.result+=Ot.repeat(`
`,l):e.result+=Ot.repeat(`
`,o?1+l:l),o=!0,s=!0,l=0,n=e.position;!bt(h)&&h!==0;)h=e.input.charCodeAt(++e.position);jt(e,n,e.position,!1)}return!0}function _s(e,t){var n,r=e.tag,i=e.anchor,o=[],s,a=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(s=e.input.charCodeAt(e.position+1),!Ue(s)));){if(a=!0,e.position++,Ce(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,An(e,t,hl,!1,!0),o.push(e.result),Ce(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=o,!0):!1}function Qf(e,t,n){var r,i,o,s,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),o=e.line,s=e.position,(m===63||m===58)&&Ue(r))m===63?(v&&(mn(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(An(e,n,fl,!1,!0))if(e.line===o){for(m=e.input.charCodeAt(e.position);Jt(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),Ue(m)||Z(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(mn(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===o||e.lineIndent>t)&&(An(e,t,Wr,!0,i)&&(v?p=e.result:d=e.result),v||(mn(e,u,c,h,p,d,o,s),h=p=d=null),Ce(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&&mn(e,u,c,h,p,null),_&&(e.tag=a,e.anchor=l,e.kind="mapping",e.result=u),_}function eh(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&Z(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):Z(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Ue(s);)s===33&&(r?Z(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),pl.test(i)||Z(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),Vf.test(o)&&Z(e,"tag suffix cannot contain flow indicator characters")}return o&&!ml.test(o)&&Z(e,"tag name cannot contain such characters: "+o),n?e.tag=o:Ut.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:Z(e,'undeclared tag handle "'+i+'"'),!0}function th(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&&!Ue(n)&&!pn(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 nh(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&&!Ue(r)&&!pn(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),Ut.call(e.anchorMap,n)||Z(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Ce(e,!0,-1),!0}function An(e,t,n,r,i){var o,s,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,o=s=a=Wr===n||hl===n,r&&Ce(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;eh(e)||th(e);)Ce(e,!0,-1)?(u=!0,a=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=u||i),(l===1||Wr===n)&&(Yr===n||fl===n?v=t:v=t+1,_=e.position-e.lineStart,l===1?a&&(_s(e,_)||Qf(e,_,v))||Xf(e,v)?c=!0:(s&&Kf(e,v)||Zf(e,v)||Jf(e,v)?c=!0:nh(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):qf(e,v,Yr===n)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=a&&_s(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 Ut.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 rh(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(Ce(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Ue(s);)s=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");s!==0;){for(;Jt(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!bt(s));break}if(bt(s))break;for(n=e.position;s!==0&&!Ue(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&bo(e),Ut.call(ms,r)?ms[r](e,r,i):qr(e,'unknown document directive "'+r+'"')}if(Ce(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,Ce(e,!0,-1)):o&&Z(e,"directives end mark is expected"),An(e,e.lineIndent-1,Wr,!1,!0),Ce(e,!0,-1),e.checkLineBreaks&&jf.test(e.input.slice(t,e.position))&&qr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&oi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ce(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 wl(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 Wf(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;)rh(n);return n.documents}function yl(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=wl(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function bl(e,t){var n=wl(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new ul("expected a single document in the stream, but found more")}}function ih(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),yl(e,t,Ot.extend({schema:dl},n))}function oh(e,t){return bl(e,Ot.extend({schema:dl},t))}fr.loadAll=yl;fr.load=bl;fr.safeLoadAll=ih;fr.safeLoad=oh;var Ao={},mr=rt,gr=hr,sh=ii,ah=pr,xl=Object.prototype.toString,Al=Object.prototype.hasOwnProperty,lh=9,tr=10,ch=13,uh=32,dh=33,fh=34,kl=35,hh=37,ph=38,mh=39,gh=42,El=44,_h=45,Sl=58,vh=61,wh=62,yh=63,bh=64,Il=91,Cl=93,xh=96,Ml=123,Ah=124,Ol=125,Fe={};Fe[0]="\\0";Fe[7]="\\a";Fe[8]="\\b";Fe[9]="\\t";Fe[10]="\\n";Fe[11]="\\v";Fe[12]="\\f";Fe[13]="\\r";Fe[27]="\\e";Fe[34]='\\"';Fe[92]="\\\\";Fe[133]="\\N";Fe[160]="\\_";Fe[8232]="\\L";Fe[8233]="\\P";var kh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Eh(e,t){var n,r,i,o,s,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Al.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[s]=a;return n}function vs(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 gr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+mr.repeat("0",r-t.length)+t}function Sh(e){this.schema=e.schema||sh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=mr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Eh(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 ws(e,t){for(var n=mr.repeat(" ",t),r=0,i=-1,o="",s,a=e.length;r<a;)i=e.indexOf(`
`,r),i===-1?(s=e.slice(r),r=a):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
`&&(o+=n),o+=s;return o}function Ui(e,t){return`
`+mr.repeat(" ",e.indent*t)}function Ih(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 ko(e){return e===uh||e===lh}function kn(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 Ch(e){return kn(e)&&!ko(e)&&e!==65279&&e!==ch&&e!==tr}function ys(e,t){return kn(e)&&e!==65279&&e!==El&&e!==Il&&e!==Cl&&e!==Ml&&e!==Ol&&e!==Sl&&(e!==kl||t&&Ch(t))}function Mh(e){return kn(e)&&e!==65279&&!ko(e)&&e!==_h&&e!==yh&&e!==Sl&&e!==El&&e!==Il&&e!==Cl&&e!==Ml&&e!==Ol&&e!==kl&&e!==ph&&e!==gh&&e!==dh&&e!==Ah&&e!==vh&&e!==wh&&e!==mh&&e!==fh&&e!==hh&&e!==bh&&e!==xh}function Tl(e){var t=/^\n* /;return t.test(e)}var Ll=1,Nl=2,Rl=3,Pl=4,Lr=5;function Oh(e,t,n,r,i){var o,s,a,l=!1,u=!1,c=r!==-1,h=-1,p=Mh(e.charCodeAt(0))&&!ko(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!kn(s))return Lr;a=o>0?e.charCodeAt(o-1):null,p=p&&ys(s,a)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===tr)l=!0,c&&(u=u||o-h-1>r&&e[h+1]!==" ",h=o);else if(!kn(s))return Lr;a=o>0?e.charCodeAt(o-1):null,p=p&&ys(s,a)}u=u||c&&o-h-1>r&&e[h+1]!==" "}return!l&&!u?p&&!i(e)?Ll:Nl:n>9&&Tl(e)?Lr:u?Pl:Rl}function Th(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&kh.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=r||e.flowLevel>-1&&n>=e.flowLevel;function a(l){return Ih(e,l)}switch(Oh(t,s,e.indent,o,a)){case Ll:return t;case Nl:return"'"+t.replace(/'/g,"''")+"'";case Rl:return"|"+bs(t,e.indent)+xs(ws(t,i));case Pl:return">"+bs(t,e.indent)+xs(ws(Lh(t,o),i));case Lr:return'"'+Nh(t)+'"';default:throw new gr("impossible error: invalid scalar style")}}()}function bs(e,t){var n=Tl(e)?String(t):"",r=e[e.length-1]===`
`,i=r&&(e[e.length-2]===`
`||e===`
`),o=i?"+":r?"":"-";return n+o+`
`}function xs(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function Lh(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,n.lastIndex=u,As(e.slice(0,u),t)}(),i=e[0]===`
`||e[0]===" ",o,s;s=n.exec(e);){var a=s[1],l=s[2];o=l[0]===" ",r+=a+(!i&&!o&&l!==""?`
`:"")+As(l,t),i=o}return r}function As(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(o=s>i?s:a,l+=`
`+e.slice(i,o),i=o+1),s=a;return l+=`
`,e.length-i>t&&s>i?l+=e.slice(i,s)+`
`+e.slice(s+1):l+=e.slice(i),l.slice(1)}function Nh(e){for(var t="",n,r,i,o=0;o<e.length;o++){if(n=e.charCodeAt(o),n>=55296&&n<=56319&&(r=e.charCodeAt(o+1),r>=56320&&r<=57343)){t+=vs((n-55296)*1024+r-56320+65536),o++;continue}i=Fe[n],t+=!i&&kn(n)?e[o]:i||vs(n)}return t}function Rh(e,t,n){var r="",i=e.tag,o,s;for(o=0,s=n.length;o<s;o+=1)Qt(e,t,n[o],!1,!1)&&(o!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function Ph(e,t,n,r){var i="",o=e.tag,s,a;for(s=0,a=n.length;s<a;s+=1)Qt(e,t+1,n[s],!0,!0)&&((!r||s!==0)&&(i+=Ui(e,t)),e.dump&&tr===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function Dh(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,a,l,u,c;for(s=0,a=o.length;s<a;s+=1)c="",s!==0&&(c+=", "),e.condenseFlow&&(c+='"'),l=o[s],u=n[l],Qt(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Qt(e,t,u,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function $h(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),a,l,u,c,h,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new gr("sortKeys must be a boolean or a function");for(a=0,l=s.length;a<l;a+=1)p="",(!r||a!==0)&&(p+=Ui(e,t)),u=s[a],c=n[u],Qt(e,t+1,u,!0,!0,!0)&&(h=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,h&&(e.dump&&tr===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,h&&(p+=Ui(e,t)),Qt(e,t+1,c,!0,h)&&(e.dump&&tr===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=o,e.dump=i||"{}"}function ks(e,t,n){var r,i,o,s,a,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(e.tag=n?a.tag:"?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,xl.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Al.call(a.represent,l))r=a.represent[l](t,l);else throw new gr("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function Qt(e,t,n,r,i,o){e.tag=null,e.dump=n,ks(e,n,!1)||ks(e,n,!0);var s=xl.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=s==="[object Object]"||s==="[object Array]",l,u;if(a&&(l=e.duplicates.indexOf(n),u=l!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&t>0)&&(i=!1),u&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(a&&u&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),s==="[object Object]")r&&Object.keys(e.dump).length!==0?($h(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(Dh(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if(s==="[object Array]"){var c=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(Ph(e,c,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(Rh(e,c,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&Th(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new gr("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Bh(e,t){var n=[],r=[],i,o;for(Gi(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function Gi(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)Gi(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)Gi(e[r[i]],t,n)}function Dl(e,t){t=t||{};var n=new Sh(t);return n.noRefs||Bh(e,n),Qt(n,0,e,!0,!0)?n.dump+`
`:""}function Fh(e,t){return Dl(e,mr.extend({schema:ah},t))}Ao.dump=Dl;Ao.safeDump=Fh;var si=fr,$l=Ao;function ai(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Se.Type=Pe;Se.Schema=Pn;Se.FAILSAFE_SCHEMA=wo;Se.JSON_SCHEMA=sl;Se.CORE_SCHEMA=al;Se.DEFAULT_SAFE_SCHEMA=pr;Se.DEFAULT_FULL_SCHEMA=ii;Se.load=si.load;Se.loadAll=si.loadAll;Se.safeLoad=si.safeLoad;Se.safeLoadAll=si.safeLoadAll;Se.dump=$l.dump;Se.safeDump=$l.safeDump;Se.YAMLException=hr;Se.MINIMAL_SCHEMA=wo;Se.SAFE_SCHEMA=pr;Se.DEFAULT_SCHEMA=ii;Se.scan=ai("scan");Se.parse=ai("parse");Se.compose=ai("compose");Se.addConstructor=ai("addConstructor");var zh=Se,Yi=zh,jh=Vh;function gn(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function Vh(e){if(e=e||{},e.circles)return Hh(e);return e.proto?r:n;function t(i,o){for(var s=Object.keys(i),a=new Array(s.length),l=0;l<s.length;l++){var u=s[l],c=i[u];typeof c!="object"||c===null?a[u]=c:c instanceof Date?a[u]=new Date(c):ArrayBuffer.isView(c)?a[u]=gn(c):a[u]=o(c)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var o={};for(var s in i)if(Object.hasOwnProperty.call(i,s)!==!1){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),n)):a instanceof Set?o[s]=new Set(t(Array.from(a),n)):ArrayBuffer.isView(a)?o[s]=gn(a):o[s]=n(a)}return o}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var o={};for(var s in i){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),r)):a instanceof Set?o[s]=new Set(t(Array.from(a),r)):ArrayBuffer.isView(a)?o[s]=gn(a):o[s]=r(a)}return o}}function Hh(e){var t=[],n=[];return e.proto?o:i;function r(s,a){for(var l=Object.keys(s),u=new Array(l.length),c=0;c<l.length;c++){var h=l[c],p=s[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]=gn(p);else{var d=t.indexOf(p);d!==-1?u[h]=n[d]:u[h]=a(p)}}return u}function i(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,i);if(s instanceof Map)return new Map(r(Array.from(s),i));if(s instanceof Set)return new Set(r(Array.from(s),i));var a={};t.push(s),n.push(a);for(var l in s)if(Object.hasOwnProperty.call(s,l)!==!1){var u=s[l];if(typeof u!="object"||u===null)a[l]=u;else if(u instanceof Date)a[l]=new Date(u);else if(u instanceof Map)a[l]=new Map(r(Array.from(u),i));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),i));else if(ArrayBuffer.isView(u))a[l]=gn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=i(u)}}return t.pop(),n.pop(),a}function o(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,o);if(s instanceof Map)return new Map(r(Array.from(s),o));if(s instanceof Set)return new Set(r(Array.from(s),o));var a={};t.push(s),n.push(a);for(var l in s){var u=s[l];if(typeof u!="object"||u===null)a[l]=u;else if(u instanceof Date)a[l]=new Date(u);else if(u instanceof Map)a[l]=new Map(r(Array.from(u),o));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),o));else if(ArrayBuffer.isView(u))a[l]=gn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=o(u)}}return t.pop(),n.pop(),a}}var ge=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 rn(e){return typeof e=="object"&&e!==null}const Uh=e=>("0"+e.toString(16)).substr(-2);function Xt(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Uh).join("")}function Nt(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function Bl(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new D.Path(["dimensions"]));e.set(new D.Path(["seed"]),t,!0),rn(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 Fl(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function Rt(e){return`/${e}/`.replaceAll("//","/")}function Gh(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),Rt(e)}function zl(e){const t=Gh(e).replace(/^\//,"").replace(/\/$/,"");return ge.generators.find(n=>n.url===t)}function jl({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?Rt(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);Ht(i,r)}function Yh(e){const t=Yi.load(e.substring(3,e.indexOf("---",3)));return rn(t)?t:{}}function Wh(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const o=qh(e,i+2),s=e.indexOf("#[",i+1);let a="";if(s>=0&&s<o){const l=e.indexOf("]",s+2);e.substring(s+2,l)===t&&(a=e.substring(l+1,o).trim())}else{const l=e.substring(i+2,o),u=ge.versions.find(c=>c.id===t);a=(r={version:u==null?void 0:u.id,pack_format:u==null?void 0:u.pack_format.toString()}[l])!=null?r:""}e=e.substring(0,i)+a+e.substring(o+2),n=i}return e}function qh(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),o=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(o<0){if(n===0)return i;n-=1,t=i+2}else if(o<i)n+=1,t=o+2;else{if(n===0)return i;n-=1,t=i+2}}return console.warn("Exceeded max iterations while finding closing bracket"),e.length}function Vl(e){const t=Math.abs(Fl(e));return[t%256,(t>>8)%256,(t>>16)%256]}function zn(e){return e*e}function Je(e,t,n){return Math.max(e,Math.min(t,n))}function Ai(e,t,n){return n<0?e:n>1?t:Nr(n,e,t)}function Nr(e,t,n){return t+e*(n-t)}function Zh(e,t,n,r,i,o){return Nr(t,Nr(e,n,r),Nr(e,i,o))}function nt(e){return e instanceof Error?e.message:`${e}`}const li=jh();function en(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(!en(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!en(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}class Jh{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 Rr({icon:e,label:t,large:n,larger:r,doSelect:i,value:o,placeholder:s,dataList:a,onChange:l}){const u=l===void 0?()=>{}:p=>{const d=p.target.value;l==null||l(d)},c=_e(null);J(()=>{i&&c.current&&c.current.select()},[i]);const h=a&&Xt();return f("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:p=>p.stopPropagation()},e&&oe[e],t&&f("span",null,t),f("input",{ref:c,type:"text",value:o,onChange:u,placeholder:s,list:h}),a&&f("datalist",{id:h},a.map(p=>f("option",{value:p}))))}function Hn({cooldown:e,invert:t,initial:n}={}){const[r,i]=R(n),o=_e(void 0);return[r,()=>{i(!t),o.current!==void 0&&clearTimeout(o.current),o.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}function _r({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},o){const s=_e(null),a=_e(),l=_e(),u=_e([0,0]),c=_e(!1);J(()=>{if(!s.current)return;const d=g=>{a.current=[g.offsetX,g.offsetY]},v=g=>{if(a.current===void 0){if(!s.current)return;const A=g.offsetX/s.current.clientWidth,b=g.offsetY/s.current.clientHeight;r==null||r(A,b);return}if(!n)return;const y=g.offsetX-a.current[0],w=g.offsetY-a.current[1];if(!(y===0&&w===0)&&(u.current=[u.current[0]+y,u.current[1]+w],!c.current)){if(!l.current)return;cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!s.current)return;c.current=!0;const A=u.current[0]/s.current.clientWidth,b=u.current[1]/s.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 s.current.addEventListener("mousedown",d),s.current.addEventListener("mousemove",v),s.current.addEventListener("mouseleave",m),document.body.addEventListener("mouseup",_),()=>{var g,y,w;(g=s.current)==null||g.removeEventListener("mousedown",d),(y=s.current)==null||y.removeEventListener("mousemove",v),(w=s.current)==null||w.removeEventListener("mouseleave",m),document.body.removeEventListener("mouseup",_)}},[...o!=null?o:[],s.current]);const h=_e(),p=_e(0);return h.current=async()=>{if(!s.current)return;const d=s.current.getContext("2d"),v=e();s.current.width=v[0],s.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:s,redraw:h.current}}function Eo(){const[e,t]=R(!1),n=()=>{t(!1)};return J(()=>(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 Xh(){const[e,t]=R(window.location.hash),n=Re(()=>{t(window.location.hash)},[]);J(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Re(i=>{i!==e&&jl({hash:i})},[e]);return[e,r]}function Es(e){const[t,n]=R(matchMedia(e).matches),r=i=>{n(i.matches)};return J(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function ci(e,t,n){const r={invalidated(){e&&t(e)}};J(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const Ss=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function nr(e){const t=window.location,[n,r]=R(Ss(t.search,e));J(()=>{const o=()=>{r(Ss(t.search,e))};return window.addEventListener("popstate",o),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",o),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]);const i=Re((o,s)=>{if(o!==n){const a=new URLSearchParams(t.search);o===void 0||o.length===0?a.delete(e):a.set(e,o),jl({search:a.toString().replaceAll("%7C","|"),replace:s})}},[n]);return[n,i]}function Ge(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:o,children:s}=e,[a,l]=Eo();return f("div",K({class:`btn-menu${r===!1?" no-relative":""}`},e),f(q,{icon:t,label:n,tooltip:i,tooltipLoc:o,onClick:l}),a&&f("div",{class:"btn-group"},s))}const Kh="modulepreload",Is={},Qh="/",ae=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Qh}${r}`,r in Is)return;Is[r]=!0;const i=r.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${o}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":Kh,i||(s.as="script",s.crossOrigin=""),s.href=r,document.head.appendChild(s),i)return new Promise((a,l)=>{s.addEventListener("load",a),s.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},oe={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 _n({error:e,onDismiss:t}){const[n,r]=R(!1),[i,o]=R(void 0);J(()=>{if(e instanceof Error){const a=e.stack.split(`
`).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));o(a.join(`
`)),ae(()=>import("./sourcemapped-stacktrace.06e708d3.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(a.join(`
`),u=>{const c=u.map(h=>h.replace(/..\/..\/src\//,"src/")).join(`
`);o(c)})})}},[e]);const s=be(()=>{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},oe.x),f("h3",null,e instanceof Error?e.message:e,i&&f("span",{onClick:()=>r(!n)},oe.info)),i&&n&&f("pre",null,i),f("p",null,"If you think this is a bug, you can report it ",f("a",{href:s,target:"_blank"},"on GitHub")))}function e0({label:e,value:t,onChange:n}){const r=Xt();return f("label",{class:"checkbox"},f("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function So(e,t,n){const r=i=>{const o=i.onChange&&(a=>{var u;const l=a.target.value;(u=i.onChange)==null||u.call(i,n(l))}),s=i.onEnter&&(a=>{var l;if(a.key==="Enter"){const u=a.target.value;(l=i.onEnter)==null||l.call(i,n(u))}});return f("input",Ae(K({},i),{type:t,onChange:o,onKeyDown:s}))};return r.displayName=e,r}const tn=So("TextInput","text",e=>e),t0=So("NumberInput","number",e=>Number(e)),Cs=So("RangeInput","range",e=>Number(e));function Ms({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,o]=R(""),s=be(()=>{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(Rr,{icon:"search",large:!0,value:i,onChange:o,doSelect:1,placeholder:n!=null?n:"Search"}),f("div",{class:"result-list"},s.map(a=>f(q,{key:a,label:a,onClick:()=>t==null?void 0:t(a)})),s.length===0&&f(q,{label:r!=null?r:"No results"})))}const Io="https://raw.githubusercontent.com/misode/technical-changes/main";let ki=null;async function Hl(){if(!ki){const e=await(await fetch(`${Io}/index.json`)).json();ki=(await Promise.all(e.map((t,n)=>n0(Ul(t),n)))).flat().map(t=>Ae(K({},t),{tags:[t.group.id,...t.tags]}))}return ki}async function n0(e,t){const n=await(await fetch(`${Io}/${e.id}/index.json`)).json();return(await Promise.all(n.map((r,i)=>r0(e,Ul(r),t,i)))).flat()}async function r0(e,t,n,r){const i=await(await fetch(`${Io}/${e.id}/${t.id}.md`)).text();return i0(i).map(o=>K({version:t,group:e,order:n*1e3+r},o))}function i0(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 Ul(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}:rn(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 vn="misode-v2",Os="cached_latest_version",Ei="22w18a",Un="https://raw.githubusercontent.com/misode/mcmeta";function Gt(e,t){return`${Un}/${e.dynamic?t:`${e.ref}-${t}`}`}async function ui(e){e.dynamic&&(localStorage.getItem(Os)!==Ei&&(await f0(t=>t.startsWith(`${Un}/summary/`)||t.startsWith(`${Un}/data/`)||t.startsWith(`${Un}/assets/`)||t.startsWith(`${Un}/registries/`)),localStorage.setItem(Os,Ei)),e.ref=Ei)}async function o0(e,t,n){const r=ge.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(ge.versions)}`);return}await ui(r),await Promise.all([s0(r,t),a0(r,n)])}async function s0(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await En(`${Gt(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:",nt(n))}}async function a0(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await En(`${Gt(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:",nt(n))}}async function Gl(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=ge.versions.find(i=>i.id===e);try{const i=["blockstates","models"].includes(t)?"assets":"data",o=`${Gt(r,i)}/${i}/minecraft/${t}/${n}.json`;return await(await fetch(o)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${nt(i)}`)}}async function l0(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=ge.versions.find(r=>r.id===e);await ui(n);try{const r=await En(`${Gt(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await En(`${Gt(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${nt(r)}`)}}async function c0(e){const t=ge.versions.find(n=>n.id===e);await ui(t);try{const n=`${Gt(t,"summary")}/sounds/data.min.json`;return await En(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${nt(n)}`)}}function u0(e,t){const n=ge.versions.find(r=>r.id===e);return`${Gt(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function d0(){const e=ge.versions[ge.versions.length-1];await ui(e);try{return En(`${Gt(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${nt(t)}`)}}async function En(e,t=n=>n){try{const n=await caches.open(vn);console.debug(`[getData] Opened cache ${vn} ${e}`);const r=await n.match(e);if(r&&r.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await r.json();console.debug(`[getData] fetching data ${e}`);const i=await fetch(e),o=t(await i.json());return await n.put(e,new Response(JSON.stringify(o))),o}catch(n){console.warn(`[getData] Failed to open cache ${vn}: ${nt(n)}`),console.debug(`[getData] fetching data ${e}`);const r=await fetch(e);return t(await r.json())}}async function f0(e){try{const t=await caches.open(vn);console.debug(`[deleteMatching] Opened cache ${vn}`);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 ${vn}: ${nt(t)}`)}}const Yl=["1.15","1.16","1.17","1.18","1.18.2","1.19"],cn={},un={},h0={1.15:()=>ae(()=>import("./index.c6f3422e.js").then(function(e){return e.i}),[]),1.16:()=>ae(()=>import("./index.774de984.js").then(function(e){return e.i}),[]),1.17:()=>ae(()=>import("./index.9aa136f0.js").then(function(e){return e.i}),[]),1.18:()=>ae(()=>import("./index.63c420c7.js").then(function(e){return e.i}),[]),"1.18.2":()=>ae(()=>import("./index.673068e7.js").then(function(e){return e.i}),[]),1.19:()=>ae(()=>import("./index.4d272359.js").then(function(e){return e.i}),[])};let Wl,ql,Pr;async function Co(e){return cn[e]||(cn[e]=(async()=>{try{const t=await h0[e](),n=t.getCollections(),r={};await o0(e,n,r);const i=t.getSchemas(n);return cn[e]={collections:n,schemas:i,blockStates:r},cn[e]}catch(t){throw new Error(`Cannot get version "${e}": ${nt(t)}`)}})()),cn[e]}async function p0(e,t){var n;if(!un[t]||un[t].version!==e){const r=await Co(e);Wl=D.Reference(r.schemas,"configured_decorator"),ql=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=ge.generators.find(o=>o.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const o=r.schemas.get(i),s=new D.DataModel(o,{wrapLists:!0});un[t]?s.reset(un[t].model.data,!1):(s.validate(!0),s.history=[JSON.stringify(s.data)]),un[t]={model:s,version:e}}catch(o){const s=new Error(`Cannot get generator "${t}" for version "${e}": ${nt(o)}`);throw o instanceof Error&&(s.stack=o.stack),s}}return un[t].model}async function m0(e){const t=await Co(e);return Pr=t.collections,t.collections}async function g0(e){return(await Co(e)).blockStates}function Ye(e,t,n){const r=ge.versions.findIndex(s=>s.id===e),i=t?ge.versions.findIndex(s=>s.id===t):0,o=n?ge.versions.findIndex(s=>s.id===n):ge.versions.length-1;return i<=r&&r<=o}var Zl={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function s(l,u){if(!o[l]){o[l]={};for(var c=0;c<l.length;c++)o[l][l.charAt(c)]=c}return o[l][u]}var a={compressToBase64:function(l){if(l==null)return"";var u=a._compress(l,6,function(c){return r.charAt(c)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:a._decompress(l.length,32,function(u){return s(r,l.charAt(u))})},compressToUTF16:function(l){return l==null?"":a._compress(l,15,function(u){return n(u+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:a._decompress(l.length,16384,function(u){return l.charCodeAt(u)-32})},compressToUint8Array:function(l){for(var u=a.compress(l),c=new Uint8Array(u.length*2),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 s(i,l.charAt(u))}))},compress:function(l){return a._compress(l,16,function(u){return n(u)})},_compress:function(l,u,c){if(l==null)return"";var h,p,d={},v={},_="",m="",g="",y=2,w=3,A=2,b=[],k=0,E=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,E==u-1?(E=0,b.push(c(k)),k=0):E++;for(p=g.charCodeAt(0),h=0;h<8;h++)k=k<<1|p&1,E==u-1?(E=0,b.push(c(k)),k=0):E++,p=p>>1}else{for(p=1,h=0;h<A;h++)k=k<<1|p,E==u-1?(E=0,b.push(c(k)),k=0):E++,p=0;for(p=g.charCodeAt(0),h=0;h<16;h++)k=k<<1|p&1,E==u-1?(E=0,b.push(c(k)),k=0):E++,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,E==u-1?(E=0,b.push(c(k)),k=0):E++,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,E==u-1?(E=0,b.push(c(k)),k=0):E++;for(p=g.charCodeAt(0),h=0;h<8;h++)k=k<<1|p&1,E==u-1?(E=0,b.push(c(k)),k=0):E++,p=p>>1}else{for(p=1,h=0;h<A;h++)k=k<<1|p,E==u-1?(E=0,b.push(c(k)),k=0):E++,p=0;for(p=g.charCodeAt(0),h=0;h<16;h++)k=k<<1|p&1,E==u-1?(E=0,b.push(c(k)),k=0):E++,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,E==u-1?(E=0,b.push(c(k)),k=0):E++,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,E==u-1?(E=0,b.push(c(k)),k=0):E++,p=p>>1;for(;;)if(k=k<<1,E==u-1){b.push(c(k));break}else E++;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,E,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;E=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;E=n(w);break;case 2:return""}for(h[3]=E,y=E,m.push(E);;){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(E=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),E=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),E=d-1,p--;break;case 2:return m.join("")}if(p==0&&(p=Math.pow(2,v),v++),h[E])_=h[E];else if(E===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)})(Zl);var Jl=Zl.exports;const _0="https://z15g7can.directus.app/items",Wi="share",Ts=new Map;async function v0(e,t,n,r){try{const i=Jl.compressToBase64(JSON.stringify(n)),o=btoa(JSON.stringify(n));console.log("Compression rate",o.length/i.length);const s=JSON.stringify({data:i,type:e,version:t,show_preview:r});let a=Ts.get(s);if(!a){const u=await Xl("/snippets",s);Ts.set(s,u.id),a=u.id}const l=ge.generators.find(u=>u.id===e);return`${location.protocol}//${location.host}/${l.url}/?${Wi}=${a}`}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function Ls(e){var t;try{const n=await Xl(`/snippets/${e}`);return Ae(K({},n),{data:JSON.parse((t=Jl.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function Xl(e,t){var i,o,s;const r=await(await fetch(_0+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((s=(o=(i=r.errors)==null?void 0:i[0])==null?void 0:o.message)!=null?s:"Unknown error")}var Kl=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"}'),w0=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"})),Ne;(e=>{e.ID_LANGUAGE="language",e.ID_THEME="theme",e.ID_VERSION="schema_version",e.ID_INDENT="indentation",e.ID_FORMAT="output_format",e.ID_HIGHLIGHTING="output_highlighting",e.ID_SOUNDS_VERSION="minecraft_sounds_version",e.ID_PROJECTS="misode_projects",e.ID_BACKUPS="misode_generator_backups";function t(){var w;return(w=localStorage.getItem(e.ID_LANGUAGE))!=null?w:"en"}e.getLanguage=t;function n(){var w;return(w=localStorage.getItem(e.ID_THEME))!=null?w:"dark"}e.getTheme=n;function r(){const w=localStorage.getItem(e.ID_VERSION);return w&&Yl.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 o(){var w;return(w=localStorage.getItem(e.ID_FORMAT))!=null?w:"json"}e.getFormat=o;function s(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=s;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):[Zr]}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})(Ne||(Ne={}));function y0(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return ae(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return ae(()=>import("./de.8e2383d8.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return ae(()=>import("./en.4ab98cb7.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return ae(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return ae(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return ae(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return ae(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return ae(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return ae(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return ae(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return ae(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return ae(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return ae(()=>import("./zh-tw.bdc36a24.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}function b0(e){switch(e){case"../../locales/de.json":return ae(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return ae(()=>Promise.resolve().then(function(){return w0}),void 0);case"../../locales/es.json":return ae(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return ae(()=>import("./fr.f5531eea.js"),[]);case"../../locales/it.json":return ae(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return ae(()=>import("./ja.167de97b.js"),[]);case"../../locales/pl.json":return ae(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return ae(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return ae(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return ae(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return ae(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return ae(()=>import("./zh-tw.42e9d37d.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}const Ql=Tn({lang:"none",locale:e=>e,changeLanguage:()=>{}}),Jn={fallback:Kl};function de(e,t,...n){var i,o,s,a,l;const r=(l=(a=(s=(i=Jn[e])==null?void 0:i[t])!=null?s:(o=Jn.en)==null?void 0:o[t])!=null?a:Jn.fallback[t])!=null?l:t;return x0(r,n)}function x0(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 Si(e){if(Jn[e])return;const t=ge.languages.find(i=>i.code===e);if(!t)return;const n=await b0(`../../locales/${e}.json`),r=t.schemas!==!1&&await y0(`../../../node_modules/@mcschema/locales/src/${e}.json`);Jn[e]=K(K({},n.default),r.default)}function ke(){return Nn(Ql)}function A0({children:e}){const[t,n]=R("none"),r=Re((s,...a)=>de(t,s,...a),[t]),i=Re(async s=>{await Si(s),Ie.setLanguage(s),Ne.setLanguage(s),n(s)},[]);J(()=>{(async()=>{const s=Ne.getLanguage();await Promise.all([Si("en"),...s!=="en"?[Si(s)]:[]]),n(s)})()},[]);const o={lang:t,locale:r,changeLanguage:i};return f(Ql.Provider,{value:o},e)}const Zr={name:"Drafts",namespace:"draft",files:[]},ec=Tn({project:Zr,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function tc(){return Nn(ec)}function k0({children:e}){const[t,n]=R(Ne.getProjects()),[r,i]=R(Zr.name),o=be(()=>{var _;return(_=t.find(m=>m.name===r))!=null?_:Zr},[t,r]),[s,a]=R(void 0),l=be(()=>{if(!!s)return o.files.find(_=>_.type===s[0]&&_.id===s[1])},[o,s]),u=Re(_=>{Ne.setProjects(_),n(_)},[]),c=Re(_=>{u(t.map(m=>m.name===r?K(K({},m),_):m))},[t,r]),h=Re((_,m,g)=>{var y;if(!g.id)c({files:o.files.filter(w=>w.type!==_||w.id!==m)});else{const w=g.id.includes(":")?g.id:`${o.namespace}:${g.id}`,A=o.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:o.files.map(b=>b.type===_&&b.id===m?Ae(K(K({},b),g),{id:w}):b)}),(l==null?void 0:l.id)===m&&a([_,w])}else{if(A)return!1;c({files:[...o.files,{type:_,id:w,data:(y=g.data)!=null?y:{}}]}),a([_,w])}}return!0},[c,o,l]),p=Re((_,m)=>{const g=ge.generators.find(y=>y.id===_||y.path===_);if(!g)throw new Error(`Cannot find generator of type ${_}`);a([g.id,m]),Ht(Rt(g.url))},[]),d=Re(()=>{a(void 0)},[]),v={project:o,file:l,changeProject:i,updateProject:c,updateFile:h,openFile:p,closeFile:d};return f(ec.Provider,{value:v},e)}function E0(e){var i;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id],r=ge.generators.find(o=>o.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 nc=Tn({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function rc(){return Nn(nc)}function S0({children:e}){const[t,n]=R(Ne.getTheme()),r=Es("(prefers-color-scheme: light)"),i=Es("(prefers-color-scheme: dark)");J(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const o=Re(a=>{Ie.setTheme(a),Ne.setTheme(a),n(a)},[]);J(()=>{Ie.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]);const s={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:o};return f(nc.Provider,{value:s},e)}const I0=3,ic=Tn({title:"",changeTitle:()=>{}});function dt(e,t){const n=Nn(ic);return J(()=>{e&&n.changeTitle(e,t)},[e,t]),n}function C0({children:e}){const{locale:t}=ke(),[n,r]=R(t("title.home")),i=Re((s,a)=>{a!=null||(a=ge.versions.map(u=>u.id));const l=a.slice(-I0);document.title=`${s} Minecraft ${l.join(", ")}`,r(s)},[]),o={title:n,changeTitle:i};return f(ic.Provider,{value:o},e)}const M0="version",oc=Tn({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function Dn(){return Nn(oc)}function O0({children:e}){const[t,n]=R(Ne.getVersion()),[r,i]=nr(M0);J(()=>{Yl.includes(r)&&t!==r&&n(r)},[t,r]);const o=Re((a,l=!0,u=!1)=>{(u||r)&&i(a,!0),l&&(Ie.setVersion(a),Ne.setVersion(a)),n(a)},[r]),s={version:t,changeVersion:o,changeTargetVersion:i};return f(oc.Provider,{value:s},e)}let re,sc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});sc.decode();let Ar=null;function T0(){return(Ar===null||Ar.buffer!==re.memory.buffer)&&(Ar=new Uint8Array(re.memory.buffer)),Ar}function L0(e,t){return sc.decode(T0().subarray(e,e+t))}const qi=new Uint32Array(2),N0=new BigInt64Array(qi.buffer);let kr=null;function rr(){return(kr===null||kr.buffer!==re.memory.buffer)&&(kr=new Int32Array(re.memory.buffer)),kr}let Er=null;function ac(){return(Er===null||Er.buffer!==re.memory.buffer)&&(Er=new Float64Array(re.memory.buffer)),Er}function R0(e,t){return ac().subarray(e/8,e/8+t)}let Ee=0;function Me(e,t){const n=t(e.length*8);return ac().set(e,n/8),Ee=e.length,n}let Sr=null;function P0(){return(Sr===null||Sr.buffer!==re.memory.buffer)&&(Sr=new Uint32Array(re.memory.buffer)),Sr}function D0(e,t){const n=t(e.length*4);return P0().set(e,n/4),Ee=e.length,n}function $0(e,t,n,r,i,o,s,a,l,u,c,h,p,d){var v=Me(e,re.__wbindgen_malloc),_=Ee,m=Me(t,re.__wbindgen_malloc),g=Ee,y=Me(n,re.__wbindgen_malloc),w=Ee,A=Me(r,re.__wbindgen_malloc),b=Ee,k=Me(i,re.__wbindgen_malloc),E=Ee,I=Me(o,re.__wbindgen_malloc),C=Ee,M=Me(s,re.__wbindgen_malloc),L=Ee,F=Me(a,re.__wbindgen_malloc),ne=Ee,se=Me(l,re.__wbindgen_malloc),fe=Ee,O=Me(u,re.__wbindgen_malloc),$=Ee,G=Me(c,re.__wbindgen_malloc),T=Ee,x=Me(h,re.__wbindgen_malloc),S=Ee,N=Me(p,re.__wbindgen_malloc),j=Ee,W=D0(d,re.__wbindgen_malloc),ce=Ee,ze=re.biome_parameters(v,_,m,g,y,w,A,b,k,E,I,C,M,L,F,ne,se,fe,O,$,G,T,x,S,N,j,W,ce);return di.__wrap(ze)}function B0(e,t,n,r,i,o,s,a,l,u,c,h,p){N0[0]=e;const d=qi[0],v=qi[1];var _=Me(n,re.__wbindgen_malloc),m=Ee,g=Me(i,re.__wbindgen_malloc),y=Ee,w=Me(s,re.__wbindgen_malloc),A=Ee,b=Me(l,re.__wbindgen_malloc),k=Ee,E=Me(c,re.__wbindgen_malloc),I=Ee,C=Me(p,re.__wbindgen_malloc),M=Ee,L=re.climate_sampler(d,v,t,_,m,r,g,y,o,w,A,a,b,k,u,E,I,h,C,M);return vr.__wrap(L)}function Zi(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function F0(e,t){return rr().subarray(e/4,e/4+t)}function Ns(e,t,n,r,i,o,s,a,l,u,c){try{const v=re.__wbindgen_add_to_stack_pointer(-16);Zi(e,di),Zi(t,vr),re.multi_noise(v,e.ptr,t.ptr,n,r,i,o,s,a,l,u,c);var h=rr()[v/4+0],p=rr()[v/4+1],d=F0(h,p).slice();return re.__wbindgen_free(h,p*4),d}finally{re.__wbindgen_add_to_stack_pointer(16)}}function Rs(e,t,n,r,i,o,s,a,l,u){try{const d=re.__wbindgen_add_to_stack_pointer(-16);Zi(e,vr),re.climate_noise(d,e.ptr,t,n,r,i,o,s,a,l,u);var c=rr()[d/4+0],h=rr()[d/4+1],p=R0(c,h).slice();return re.__wbindgen_free(c,h*8),p}finally{re.__wbindgen_add_to_stack_pointer(16)}}class di{static __wrap(t){const n=Object.create(di.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();re.__wbg_parameterlist_free(t)}}class vr{static __wrap(t){const n=Object.create(vr.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 z0(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 lc(e){typeof e=="undefined"&&(e=new URL("/assets/deepslate_rs_bg.4990c219.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_throw=function(i,o){throw new Error(L0(i,o))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await z0(await e,t);return re=n.exports,lc.__wbindgen_wasm_module=r,re}var Ps="/assets/deepslate_rs_bg.4990c219.wasm",cc={exports:{}},uc={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,o=0;i<n.length;i++,o+=8)r[o>>>5]|=n[i]<<24-o%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i<n.length*32;i+=8)r.push(n[i>>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i<n.length;i++)r.push((n[i]>>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substr(i,2),16));return r},bytesToBase64:function(n){for(var r=[],i=0;i<n.length;i+=3)for(var o=n[i]<<16|n[i+1]<<8|n[i+2],s=0;s<4;s++)i*8+s*6<=n.length*8?r.push(e.charAt(o>>>6*(3-s)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,o=0;i<n.length;o=++i%4)o!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*o+8)-1)<<o*2|e.indexOf(n.charAt(i))>>>6-o*2);return r}};uc.exports=t})();var Ji={utf8:{stringToBytes:function(e){return Ji.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Ji.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("")}}},Ds=Ji;/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var j0=function(e){return e!=null&&(dc(e)||V0(e)||!!e._isBuffer)};function dc(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function V0(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&dc(e.slice(0,0))}(function(){var e=uc.exports,t=Ds.utf8,n=j0,r=Ds.bin,i=function(o,s){o.constructor==String?s&&s.encoding==="binary"?o=r.stringToBytes(o):o=t.stringToBytes(o):n(o)?o=Array.prototype.slice.call(o,0):!Array.isArray(o)&&o.constructor!==Uint8Array&&(o=o.toString());for(var a=e.bytesToWords(o),l=o.length*8,u=1732584193,c=-271733879,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(o,s,a,l,u,c,h){var p=o+(s&a|~s&l)+(u>>>0)+h;return(p<<c|p>>>32-c)+s},i._gg=function(o,s,a,l,u,c,h){var p=o+(s&l|a&~l)+(u>>>0)+h;return(p<<c|p>>>32-c)+s},i._hh=function(o,s,a,l,u,c,h){var p=o+(s^a^l)+(u>>>0)+h;return(p<<c|p>>>32-c)+s},i._ii=function(o,s,a,l,u,c,h){var p=o+(a^(s|~l))+(u>>>0)+h;return(p<<c|p>>>32-c)+s},i._blocksize=16,i._digestsize=16,cc.exports=function(o,s){if(o==null)throw new Error("Illegal argument "+o);var a=e.wordsToBytes(i(o,s));return s&&s.asBytes?a:s&&s.asString?r.bytesToString(a):e.bytesToHex(a)}})();var fc=cc.exports,P;(function(e){function t(c){return typeof c=="number"?c:void 0}e.readNumber=t;function n(c){return typeof c=="number"?Math.floor(c):void 0}e.readInt=n;function r(c){return typeof c=="string"?c:void 0}e.readString=r;function i(c){return typeof c=="boolean"?c:void 0}e.readBoolean=i;function o(c){return typeof c=="object"&&c!==null?c:void 0}e.readObject=o;function s(c,h){if(!!Array.isArray(c))return c.map(p=>h(p))}e.readArray=s;function a(c,h){var d;const p=(d=o(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})(P||(P={}));function Ii(e){let t=null;return()=>(t==null&&(t=e()),t)}function fi(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}function Ft(e){return e*e}function Xi(e,t,n){return Math.max(t,Math.min(n,e))}function Vt(e,t,n){return t+e*(n-t)}function Ki(e,t,n,r,i,o){return Vt(t,Vt(e,n,r),Vt(e,i,o))}function H0(e,t,n,r,i,o,s,a,l,u,c){return Vt(n,Ki(e,t,r,i,o,s),Ki(e,t,a,l,u,c))}function Dr(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function $s(e,t,n,r,i,o){return Dr(t,()=>Dr(e,n,r),()=>Dr(e,i,o))}function U0(e,t,n,r,i,o,s,a,l,u,c){return Dr(n,()=>$s(e,t,r,i,o,s),()=>$s(e,t,a,l,u,c))}function Mo(e,t,n){return n<0?e:n>1?t:Vt(n,e,t)}function hc(e,t,n){return(e-t)/(n-t)}function Ci(e){return e*e*e*(e*(e*6-15)+10)}function Bs(e,t,n,r,i){return Vt(hc(e,t,n),r,i)}function pc(e,t,n,r,i){return Mo(r,i,hc(e,t,n))}function G0(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),o=e+i;if(n(o)){r=i;continue}e=o+1,r-=i+1}return e}function mc(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 Qi(e,t,n,r,i,o,s,a){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(o)<<BigInt(16)|BigInt(s)<<BigInt(8)|BigInt(a)}var eo;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(eo||(eo={}));var to;(function(e){function t(i,o){var u,c,h,p;if(typeof i=="number")return new n(i);const s=(u=P.readObject(i))!=null?u:{},a=new r(o(s.coordinate)),l=(c=P.readArray(s.points,d=>{var v;return(v=P.readObject(d))!=null?v:{}}))!=null?c:[];if(l.length===0)return new n(0);for(const d of l){const v=(h=P.readNumber(d.location))!=null?h:0,_=t(d.value,o),m=(p=P.readNumber(d.derivative))!=null?p:0;a.addPoint(v,_,m)}return a}e.fromJson=t;class n{constructor(o){this.value=o}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(o,s=[],a=[],l=[]){this.coordinate=o,this.locations=s,this.values=a,this.derivatives=l,this.calculatedMin=Number.NEGATIVE_INFINITY,this.calculatedMax=Number.POSITIVE_INFINITY}compute(o){const s=this.coordinate.compute(o),a=G0(0,this.locations.length,w=>s<this.locations[w])-1,l=this.locations.length-1;if(a<0)return this.values[0].compute(o)+this.derivatives[0]*(s-this.locations[0]);if(a===l)return this.values[l].compute(o)+this.derivatives[l]*(s-this.locations[l]);const u=this.locations[a],c=this.locations[a+1],h=this.derivatives[a],p=this.derivatives[a+1],d=(s-u)/(c-u),v=this.values[a].compute(o),_=this.values[a+1].compute(o),m=h*(c-u)-(_-v),g=-p*(c-u)+(_-v);return Vt(d,v,_)+d*(1-d)*Vt(d,m,g)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(o){return new r(o(this.coordinate),this.locations,this.values.map(s=>s.mapAll(o)),this.derivatives)}addPoint(o,s,a=0){return this.locations.push(o),this.values.push(typeof s=="number"?new e.Constant(s):s),this.derivatives.push(a),this}calculateMinMax(){if(!eo.is(this.coordinate))return;const o=this.locations.length-1;var s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),u=this.coordinate.maxValue();for(const 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);s=Math.min(s,Math.min(h,p)),a=Math.max(a,Math.max(h,p))}if(u>this.locations[o]){const h=r.linearExtend(u,this.locations,this.values[o].min(),this.derivatives,o),p=r.linearExtend(u,this.locations,this.values[o].max(),this.derivatives,o);s=Math.min(s,Math.min(h,p)),a=Math.max(a,Math.max(h,p))}for(const h of this.values)s=Math.min(s,h.min()),a=Math.max(a,h.max());for(var c=0;c<o;++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,E=b*d,I=Math.min(m,y),C=Math.max(g,w),M=k-w+m,L=k-y+g,F=-E+y-g,ne=-E+w-m,se=Math.min(M,F),fe=Math.max(L,ne);s=Math.min(s,I+.25*se),a=Math.max(a,C+.25*fe)}}this.calculatedMin=s,this.calculatedMax=a}static linearExtend(o,s,a,l,u){const c=l[u];return c==0?a:a+c*(o-s[u])}}e.MultiPoint=r})(to||(to={}));const gt=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new gt(this.nextLong())}forkPositional(){return new Y0(this.nextLong())}setSeed(e){this.seed=e^gt.MULTIPLIER&gt.MODULUS_MASK}advance(){this.seed=this.seed*gt.MULTIPLIER+gt.INCREMENT&gt.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(gt.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)*gt.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*gt.DOUBLE_MULTIPLIER}};let Ke=gt;Ke.MODULUS_BITS=48;Ke.MODULUS_MASK=BigInt("281474976710655");Ke.MULTIPLIER=BigInt("25214903917");Ke.INCREMENT=BigInt("11");Ke.FLOAT_MULTIPLIER=1/Math.pow(2,24);Ke.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class Y0{constructor(t){this.seed=t}at(t,n,r){const i=mc(t,n,r);return new Ke(i^this.seed)}fromHashOf(t){const n=fc(t,{asBytes:!0}),r=Qi(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new Ke(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 W0(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 s=((~n&Q.MAX_UINT)+Q.BIGINT_1)%n;for(;i<s;)t=this.next()&Q.MAX_UINT,r=t*n,i=r&Q.MAX_UINT}const o=r>>Q.BIGINT_32;return Number(o)}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 xe=Q;xe.SILVER_RATIO_64=BigInt("7640891576956012809");xe.GOLDEN_RATIO_64=BigInt("-7046029254386353131");xe.FLOAT_MULTIPLIER=1/Math.pow(2,24);xe.DOUBLE_MULTIPLIER=11102230246251565e-32;xe.BIGINT_1=BigInt(1);xe.BIGINT_17=BigInt(17);xe.BIGINT_21=BigInt(21);xe.BIGINT_27=BigInt(27);xe.BIGINT_28=BigInt(28);xe.BIGINT_30=BigInt(30);xe.BIGINT_31=BigInt(31);xe.BIGINT_32=BigInt(32);xe.BIGINT_49=BigInt(49);xe.BIGINT_64=BigInt(64);xe.STAFFORD_1=BigInt("-4658895280553007687");xe.STAFFORD_2=BigInt("-7723592293110705685");xe.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF");xe.POW2_60=BigInt("0x10000000000000000");xe.POW2_63=BigInt("0x8000000000000000");xe.MAX_UINT=BigInt(4294967295);class W0{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,r){const o=mc(t,n,r)^this.seedLo;return new xe([o,this.seedHi])}fromHashOf(t){const n=fc(t,{asBytes:!0}),r=Qi(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=Qi(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new xe([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const St=class{constructor(e){this.xo=e.nextDouble()*256,this.yo=e.nextDouble()*256,this.zo=e.nextDouble()*256,this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t;for(let t=0;t<256;t+=1){const n=e.nextInt(256-t),r=this.p[t];this.p[t]=this.p[t+n],this.p[t+n]=r}}sample2D(e,t){let n,r,i;const o=(e+t)*St.F2,s=Math.floor(e+o),a=s-(n=(s+(r=Math.floor(t+o)))*St.G2),l=e-a;let u,c;l>(i=t-(r-n))?(u=1,c=0):(u=0,c=1);const h=l-u+St.G2,p=i-c+St.G2,d=l-1+2*St.G2,v=i-1+2*St.G2,_=s&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),o=Math.floor(t+r),s=Math.floor(n+r),a=(i+o+s)*.16666666666666666,l=e-(i-a),u=t-(o-a),c=n-(s-a);let 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,E=l-.5,I=u-.5,C=c-.5,M=i&255,L=o&255,F=s&255,ne=this.P(M+this.P(L+this.P(F)))%12,se=this.P(M+h+this.P(L+p+this.P(F+d)))%12,fe=this.P(M+v+this.P(L+_+this.P(F+m)))%12,O=this.P(M+1+this.P(L+1+this.P(F+1)))%12,$=this.getCornerNoise3D(ne,l,u,c,.6),G=this.getCornerNoise3D(se,g,y,w,.6),T=this.getCornerNoise3D(fe,A,b,k,.6),x=this.getCornerNoise3D(O,E,I,C,.6);return 32*($+G+T+x)}P(e){return this.p[e&255]}getCornerNoise3D(e,t,n,r,i){let o,s=i-t*t-n*n-r*r;return s<0?o=0:(s*=s,o=s*s*St.gradDot(e,t,n,r)),o}static gradDot(e,t,n,r){const i=St.GRADIENT[e&15];return i[0]*t+i[1]*n+i[2]*r}};let at=St;at.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]];at.F2=.5*(Math.sqrt(3)-1);at.G2=(3-Math.sqrt(3))/6;class Fs{constructor(t){this.xo=t.nextDouble()*256,this.yo=t.nextDouble()*256,this.zo=t.nextDouble()*256,this.p=Array(256);for(let n=0;n<256;n+=1)this.p[n]=n>127?n-256:n;for(let n=0;n<256;n+=1){const r=t.nextInt(256-n),i=this.p[n];this.p[n]=this.p[n+r],this.p[n+r]=i}}sample(t,n,r,i=0,o=0){const s=t+this.xo,a=n+this.yo,l=r+this.zo,u=Math.floor(s),c=Math.floor(a),h=Math.floor(l),p=s-u,d=a-c,v=l-h;let _=0;if(i!==0){const m=o>=0&&o<d?o:d;_=Math.floor(m/i+1e-7)*i}return this.sampleAndLerp(u,c,h,p,d-_,v,d)}sampleAndLerp(t,n,r,i,o,s,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=at.gradDot(this.P(c+r),i,o,s),_=at.gradDot(this.P(p+r),i-1,o,s),m=at.gradDot(this.P(h+r),i,o-1,s),g=at.gradDot(this.P(d+r),i-1,o-1,s),y=at.gradDot(this.P(c+r+1),i,o,s-1),w=at.gradDot(this.P(p+r+1),i-1,o,s-1),A=at.gradDot(this.P(h+r+1),i,o-1,s-1),b=at.gradDot(this.P(d+r+1),i-1,o-1,s-1),k=Ci(i),E=Ci(a),I=Ci(s);return H0(k,E,I,v,_,m,g,y,w,A,b)}P(t){return this.p[t&255]&255}}class ye{constructor(t,n,r){if(t instanceof xe){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let o=0;o<r.length;o++)if(r[o]!==0){const s=n+o;this.noiseLevels[o]=new Fs(i.fromHashOf("octave_"+s))}}else{if(1-n<r.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(r.length);for(let i=-n;i>=0;i-=1)i<r.length&&r[i]!==0?this.noiseLevels[i]=new Fs(t):t.consume(262)}this.amplitudes=r,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,r.length-1)/(Math.pow(2,r.length)-1),this.maxValue=this.edgeValue(2)}sample(t,n,r,i=0,o=0,s=!1){let a=0,l=this.lowestFreqInputFactor,u=this.lowestFreqValueFactor;for(let c=0;c<this.noiseLevels.length;c+=1){const h=this.noiseLevels[c];h&&(a+=this.amplitudes[c]*u*h.sample(ye.wrap(t*l),s?-h.yo:ye.wrap(n*l),ye.wrap(r*l),i*l,o*l)),l*=2,u/=2}return a}getOctaveNoise(t){return this.noiseLevels[this.noiseLevels.length-1-t]}edgeValue(t){let n=0,r=this.lowestFreqValueFactor;for(let i=0;i<this.noiseLevels.length;i+=1)this.noiseLevels[i]&&(n+=this.amplitudes[i]*t*r),r/=2;return n}static wrap(t){return t-Math.floor(t/33554432+.5)*33554432}}class q0{constructor(t,n,r,i,o,s){this.xzScale=n,this.yScale=r,this.xzFactor=i,this.yFactor=o,this.smearScaleMultiplier=s,this.minLimitNoise=new ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new ye(t,-7,[1,1,1,1,1,0,0,0]),this.xzMultiplier=684.412*n,this.yMultiplier=684.412*r,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(t,n,r){const i=t*this.xzMultiplier,o=n*this.yMultiplier,s=r*this.xzMultiplier,a=i/this.xzFactor,l=o/this.yFactor,u=s/this.xzFactor,c=this.yMultiplier*this.smearScaleMultiplier,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=ye.wrap(a*v),w=ye.wrap(l*v),A=ye.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=ye.wrap(i*v),w=ye.wrap(o*v),A=ye.wrap(s*v),b=c*v;d<1&&(p=this.minLimitNoise.getOctaveNoise(g))&&(_+=p.sample(y,w,A,b,o*v)/v),d>0&&(p=this.maxLimitNoise.getOctaveNoise(g))&&(m+=p.sample(y,w,A,b,o*v)/v),v/=2}return Mo(_/512,m/512,d)/128}}const $r=class{constructor(e,{firstOctave:t,amplitudes:n}){this.first=new ye(e,t,n),this.second=new ye(e,t,n);let r=1/0,i=-1/0;for(let s=0;s<n.length;s+=1)n[s]!==0&&(r=Math.min(r,s),i=Math.max(i,s));const o=.1*(1+1/(i-r+1));this.valueFactor=1/6/o,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,n){const r=e*$r.INPUT_FACTOR,i=t*$r.INPUT_FACTOR,o=n*$r.INPUT_FACTOR;return(this.first.sample(e,t,n)+this.second.sample(r,i,o))*this.valueFactor}};let hi=$r;hi.INPUT_FACTOR=1.0181268882175227;var Sn;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var o,s,a;const i=(o=P.readObject(r))!=null?o:{};return{firstOctave:(s=P.readInt(i.firstOctave))!=null?s:0,amplitudes:(a=P.readArray(i.amplitudes,l=>{var u;return(u=P.readNumber(l))!=null?u:0}))!=null?a:[]}}e.fromJson=n})(Sn||(Sn={}));var lt;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(lt||(lt={}));const Z0={[lt.UP]:[0,1,0],[lt.DOWN]:[0,-1,0],[lt.NORTH]:[0,0,-1],[lt.EAST]:[1,0,0],[lt.SOUTH]:[0,0,1],[lt.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return Z0[n]}e.normal=t})(lt||(lt={}));var In;(function(e){function t(s,a,l){return[s,a,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(s,a,l,u){return[s[0]+a,s[1]+l,s[2]+u]}e.offset=n;function r(s,a){return e.offset(s,...lt.normal(a))}e.towards=r;function i(s,a){return s===a?!0:s[0]===a[0]&&s[1]===a[1]&&s[2]===a[2]}e.equals=i;function o(s){return s[0]*s[0]+s[1]*s[1]+s[2]*s[2]}e.magnitude=o})(In||(In={}));function Mi(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 J0(e,t){try{return e()}catch{return t}}const Br=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 Br(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 Br(n,r)}return new Br(this.DEFAULT_NAMESPACE,e)}};let me=Br;me.DEFAULT_NAMESPACE="minecraft";me.SEPARATOR=":";const _t=class{constructor(e,t={}){this.properties=t,this.name=typeof e=="string"?me.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(_t.WATER)||this.is(_t.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=me.parse(Mi(e.value,"Name","string")),n=J0(()=>Mi(e.value,"Properties","compound"),{}),r=Object.keys(n).reduce((i,o)=>Ae(K({},i),{[o]:Mi(n,o,"string")}),{});return new _t(t,r)}static fromJson(e){var i,o;const t=(i=P.readObject(e))!=null?i:{},n=me.parse((o=P.readString(t.Name))!=null?o:_t.STONE.name.toString()),r=P.readMap(t.Properties,s=>{var a;return(a=P.readString(s))!=null?a:""});return new _t(n,r)}};let He=_t;He.AIR=new _t(me.create("air"));He.STONE=new _t(me.create("stone"));He.WATER=new _t(me.create("water"),{level:"0"});He.LAVA=new _t(me.create("lava"),{level:"0"});const Xn=class{constructor(e){this.minY=e,this.storage=Array(Xn.SIZE).fill(0),this.palette=[He.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:He.AIR}setBlockState(e,t,n,r){let i=this.palette.findIndex(o=>o.equals(r));i===-1&&(i=this.palette.length,this.palette.push(r)),this.storage[this.index(e,t,n)]=i}};let Oo=Xn;Oo.WIDTH=16;Oo.SIZE=Xn.WIDTH*Xn.WIDTH*Xn.WIDTH;class X0{constructor(t,n,r){this.minY=t,this.height=n,this.pos=r,this.sections=Array(this.sectionsCount).fill(null)}get maxY(){return this.minY+this.height}get minSection(){return this.minY>>4}get maxSection(){return(this.maxY-1>>4)+1}get sectionsCount(){return this.maxSection-this.minSection}getSectionIndex(t){return(t>>4)-this.minSection}getBlockState(t){var s;const[n,r,i]=t,o=this.sections[this.getSectionIndex(r)];return(s=o==null?void 0:o.getBlockState(n&15,r&15,i&15))!=null?s:He.AIR}setBlockState(t,n){const[r,i,o]=t,s=this.getSectionIndex(i);let a=this.sections[s];if(a===null){if(n.equals(He.AIR))return;a=this.getOrCreateSection(s)}a.setBlockState(r&15,i&15,o&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new Oo(this.minSection+t)),this.sections[t]}}var Xe;(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 o(c[0],c[1])}e.toLong=i;function o(c,h){return BigInt(c&4294967295)|BigInt(h&4294967295)<<BigInt(32)}e.asLong=o;function s(c){return c[0]<<4}e.minBlockX=s;function a(c){return c[1]<<4}e.minBlockZ=a;function l(c){return(c[0]<<4)+15}e.maxBlockX=l;function u(c){return(c[1]<<4)+15}e.maxBlockZ=u})(Xe||(Xe={}));var Cn;(function(e){function t(i,o){return s=>typeof s=="string"?r(i,me.parse(s)):n(o(s))}e.parser=t;function n(i){return{value:()=>i,key:()=>{}}}e.direct=n;function r(i,o){return{value:()=>i.getOrThrow(o),key:()=>o}}e.reference=r})(Cn||(Cn={}));const To=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),Cn.reference(this,e)}keys(){return[...this.storage.keys()].map(e=>me.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 To(this.key,this.parser)}};let ir=To;ir.REGISTRY=new To(me.create("root"));var Yt;(function(e){e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function");function t(n){const r=new ir(me.create(n));return ir.REGISTRY.register(r.key,r),r}})(Yt||(Yt={}));class le{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(T,x,S){return{x:T,y:x,z:S}}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=Cn.parser(Yt.NOISE,Sn.fromJson);function i(T,x=i){var j,W,ce,ze,it,je,$e,Ve,ht,We,At,Oe,Qe,kt,X,Et,he,ue,pt,qe;if(typeof T=="string")return new a(Cn.reference(Yt.DENSITY_FUNCTION,me.parse(T)));if(typeof T=="number")return new s(T);const S=(j=P.readObject(T))!=null?j:{},N=(W=P.readString(S.type))==null?void 0:W.replace(/^minecraft:/,"");switch(N){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=P.readNumber(S.xz_scale))!=null?ce:1,(ze=P.readNumber(S.y_scale))!=null?ze:1,(it=P.readNumber(S.xz_factor))!=null?it:80,(je=P.readNumber(S.y_factor))!=null?je:160,($e=P.readNumber(S.smear_scale_multiplier))!=null?$e:8);case"flat_cache":return new h(x(S.argument));case"interpolated":return new _(x(S.argument));case"cache_2d":return new d(x(S.argument));case"cache_once":return new v(x(S.argument));case"cache_all_in_cell":return new p(x(S.argument));case"noise":return new m((Ve=P.readNumber(S.xz_scale))!=null?Ve:1,(ht=P.readNumber(S.y_scale))!=null?ht:1,r(S.noise));case"end_islands":return new g;case"weird_scaled_sampler":return new A(x(S.input),P.readEnum(S.rarity_value_mapper,y),r(S.noise));case"shifted_noise":return new b(x(S.shift_x),x(S.shift_y),x(S.shift_z),(We=P.readNumber(S.xz_scale))!=null?We:1,(At=P.readNumber(S.y_scale))!=null?At:1,r(S.noise));case"range_choice":return new k(x(S.input),(Oe=P.readNumber(S.min_inclusive))!=null?Oe:0,(Qe=P.readNumber(S.max_exclusive))!=null?Qe:1,x(S.when_in_range),x(S.when_out_of_range));case"shift_a":return new I(r(S.argument));case"shift_b":return new C(r(S.argument));case"shift":return new M(r(S.argument));case"blend_density":return new L(x(S.argument));case"clamp":return new F(x(S.input),(kt=P.readNumber(S.min))!=null?kt:0,(X=P.readNumber(S.max))!=null?X:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new se(N,x(S.argument));case"add":case"mul":case"min":case"max":return new O(P.readEnum(N,fe),x(S.argument1),x(S.argument2));case"spline":return new $(to.fromJson(S.spline,x));case"constant":return new s((Et=P.readNumber(S.argument))!=null?Et:0);case"y_clamped_gradient":return new G((he=P.readInt(S.from_y))!=null?he:-4064,(ue=P.readInt(S.to_y))!=null?ue:4062,(pt=P.readNumber(S.from_value))!=null?pt:-4064,(qe=P.readNumber(S.to_value))!=null?qe:4062)}return s.ZERO}e.fromJson=i;const o=class extends e{constructor(T){super(),this.value=T}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let s=o;s.ZERO=new o(0),s.ONE=new o(1),e.Constant=s;class a extends e{constructor(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,S,N){super(x),this.min=S,this.max=N}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=l;class u extends e{constructor(x,S,N,j,W,ce){super(),this.xzScale=x,this.yScale=S,this.xzFactor=N,this.yFactor=j,this.smearScaleMultiplier=W,this.blendedNoise=ce}compute(x){var S,N;return(N=(S=this.blendedNoise)==null?void 0:S.sample(x.x,x.y,x.z))!=null?N:0}maxValue(){var x,S;return(S=(x=this.blendedNoise)==null?void 0:x.maxValue)!=null?S: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 S=x.x>>2,N=x.z>>2;return(this.lastQuartX!==S||this.lastQuartZ!==N)&&(this.lastValue=this.wrapped.compute(e.context(S<<2,0,N<<2)),this.lastQuartX=S,this.lastQuartZ=N),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 S=x.x,N=x.z;return(this.lastBlockX!==S||this.lastBlockZ!==N)&&(this.lastValue=this.wrapped.compute(x),this.lastBlockX=S,this.lastBlockZ=N),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 S=x.x,N=x.y,j=x.z;return(this.lastBlockX!==S||this.lastBlockY!==N||this.lastBlockZ!==j)&&(this.lastValue=this.wrapped.compute(x),this.lastBlockX=S,this.lastBlockY=N,this.lastBlockZ=j),this.lastValue}mapAll(x){return x.map(new v(this.wrapped.mapAll(x)))}}e.CacheOnce=v;class _ extends c{constructor(x,S=4,N=4){super(x),this.cellWidth=S,this.cellHeight=N,this.values=new Map}compute({x,y:S,z:N}){const j=this.cellWidth,W=this.cellHeight,ce=(x%j+j)%j/j,ze=(S%W+W)%W/W,it=(N%j+j)%j/j,je=Math.floor(x/j)*j,$e=Math.floor(S/W)*W,Ve=Math.floor(N/j)*j;return U0(ce,ze,it,()=>this.computeCorner(je,$e,Ve),()=>this.computeCorner(je+j,$e,Ve),()=>this.computeCorner(je,$e+W,Ve),()=>this.computeCorner(je+j,$e+W,Ve),()=>this.computeCorner(je,$e,Ve+j),()=>this.computeCorner(je+j,$e,Ve+j),()=>this.computeCorner(je,$e+W,Ve+j),()=>this.computeCorner(je+j,$e+W,Ve+j))}computeCorner(x,S,N){return fi(this.values,`${x} ${S} ${N}`,()=>this.wrapped.compute(e.context(x,S,N)))}mapAll(x){return x.map(new _(this.wrapped.mapAll(x)))}withCellSize(x,S){return new _(this.wrapped,x,S)}}e.Interpolated=_;class m extends e{constructor(x,S,N,j){super(),this.xzScale=x,this.yScale=S,this.noiseData=N,this.noise=j}compute(x){var S,N;return(N=(S=this.noise)==null?void 0:S.sample(x.x*this.xzScale,x.y*this.yScale,x.z*this.xzScale))!=null?N:0}maxValue(){var x,S;return(S=(x=this.noise)==null?void 0:x.maxValue)!=null?S: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,S,N){super(T),this.rarityValueMapper=x,this.noiseData=S,this.noise=N,this.mapper=w.ValueMapper[this.rarityValueMapper]}transform(T,x){if(!this.noise)return 0;const S=this.mapper(x);return S*Math.abs(this.noise.sample(T.x/S,T.y/S,T.z/S))}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,S,N,j,W,ce,ze){super(j,W,ce,ze),this.shiftX=x,this.shiftY=S,this.shiftZ=N}compute(x){var W,ce;const S=x.x*this.xzScale+this.shiftX.compute(x),N=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(S,N,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,S,N,j,W){super(),this.input=x,this.minInclusive=S,this.maxExclusive=N,this.whenInRange=j,this.whenOutOfRange=W}compute(x){const S=this.input.compute(x);return this.minInclusive<=S&&S<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 E extends e{constructor(x,S){super(),this.noiseData=x,this.offsetNoise=S}compute(x){var S,N;return(N=(S=this.offsetNoise)==null?void 0:S.sample(x.x*.25,x.y*.25,x.z*.25))!=null?N:0}maxValue(){var x,S;return((S=(x=this.offsetNoise)==null?void 0:x.maxValue)!=null?S:2)*4}}e.ShiftNoise=E;class I extends E{constructor(x,S){super(x,S)}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 E{constructor(x,S){super(x,S)}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 E{constructor(x,S){super(x,S)}withNewNoise(x){return new M(this.noiseData,x)}}e.Shift=M;class L extends n{constructor(x){super(x)}transform(x,S){return S}mapAll(x){return x.map(new L(this.input.mapAll(x)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=L;class F extends n{constructor(x,S,N){super(x),this.min=S,this.max=N}transform(x,S){return Xi(S,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,S,N){super(x),this.type=T,this.min=S,this.max=N,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),S=this.transformer(this.input.maxValue());return(this.type==="abs"||this.type==="square")&&(S=Math.max(x,S),x=Math.max(0,T)),new ne(this.type,this.input,x,S)}};let se=ne;se.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=Xi(T,-1,1);return x/2-x*x*x/24}},e.Mapped=se;const fe=["add","mul","min","max"];class O extends e{constructor(x,S,N,j,W){super(),this.type=x,this.argument1=S,this.argument2=N,this.min=j,this.max=W}compute(x){const S=this.argument1.compute(x);switch(this.type){case"add":return S+this.argument2.compute(x);case"mul":return S===0?0:S*this.argument2.compute(x);case"min":return S<this.argument2.minValue()?S:Math.min(S,this.argument2.compute(x));case"max":return S>this.argument2.maxValue()?S:Math.max(S,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(),S=this.argument2.minValue(),N=this.argument1.maxValue(),j=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(x>=j||S>=N)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let W,ce;switch(this.type){case"add":W=x+S,ce=N+j;break;case"mul":W=x>0&&S>0?x*S||0:N<0&&j<0?N*j||0:Math.min(x*j||0,S*N||0),ce=x>0&&S>0?N*j||0:N<0&&j<0?x*S||0:Math.max(x*S||0,N*j||0);break;case"min":W=Math.min(x,S),ce=Math.min(N,j);break;case"max":W=Math.max(x,S),ce=Math.max(N,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 S=this.spline.mapAll(N=>N instanceof e?N.mapAll(x):N);return S.calculateMinMax(),x.map(new $(S))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=$;class G extends e{constructor(x,S,N,j){super(),this.fromY=x,this.toY=S,this.fromValue=N,this.toValue=j}compute(x){return pc(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})(le||(le={}));class zs{constructor(t,n){this.level=t,this.type=n}at(t){return t<this.level?this.type:He.AIR}}var no;(function(e){function t(n){return{compute({x:r,y:i,z:o},s){if(!(s>0))return n(r,i,o).at(i)}}}e.createDisabled=t})(no||(no={}));var js;(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 s(i(_),i(m),i(g),i(y),i(w),i(A),b)}e.parameters=r;function i(_,m){return typeof _=="number"?new o(_,m!=null?m:_):_}e.param=i;class o{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 o(Math.min(this.min,m.min),Math.max(this.max,m.max))}static fromJson(m){var w;if(typeof m=="number")return new o(m,m);const[g,y]=(w=P.readArray(m,A=>P.readNumber(A)))!=null?w:[];return new o(g!=null?g:0,y!=null?y:0)}}e.Param=o;class s{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 Ft(this.temperature.distance(m.temperature))+Ft(this.humidity.distance(m.humidity))+Ft(this.continentalness.distance(m.continentalness))+Ft(this.erosion.distance(m.erosion))+Ft(this.depth.distance(m.depth))+Ft(this.weirdness.distance(m.weirdness))+Ft(this.offset-m.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new o(this.offset,this.offset)]}static fromJson(m){var y,w;const g=(y=P.readObject(m))!=null?y:{};return new s(o.fromJson(g.temperature),o.fromJson(g.humidity),o.fromJson(g.continentalness),o.fromJson(g.erosion),o.fromJson(g.depth),o.fromJson(g.weirdness),(w=P.readInt(g.offset))!=null?w:0)}}e.ParamPoint=s;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=le.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 E=A.space[k];b+=Math.abs((E.min+E.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+=Ft(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 o(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),E=A==k?b:g(k,m);y<=E||(y=E,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})(js||(js={}));class or{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,o;const n=(i=P.readObject(t))!=null?i:{},r=me.parse((o=P.readString(n.biome))!=null?o:"minecraft:the_void");return new or(r)}}var vt;(function(e){e.TEMPERATURE=t("temperature",-10,[1.5,0,1,0,0,0]),e.VEGETATION=t("vegetation",-8,[1,1,0,0,0,0]),e.CONTINENTALNESS=t("continentalness",-9,[1,1,2,2,2,1,1,1,1]),e.EROSION=t("erosion",-9,[1,1,0,1,1]),e.TEMPERATURE_LARGE=t("temperature_large",-12,[1.5,0,1,0,0,0]),e.VEGETATION_LARGE=t("vegetation_large",-10,[1,1,0,0,0,0]),e.CONTINENTALNESS_LARGE=t("continentalness_large",-11,[1,1,2,2,2,1,1,1,1]),e.EROSION_LARGE=t("erosion_large",-11,[1,1,0,1,1]),e.RIDGE=t("ridge",-7,[1,2,1,0,0,0]),e.SHIFT=t("offset",-3,[1,1,1,0]),e.AQUIFER_BARRIER=t("aquifer_barrier",-3,[1]),e.AQUIFER_FLUID_LEVEL_FLOODEDNESS=t("aquifer_fluid_level_floodedness",-7,[1]),e.AQUIFER_FLUID_LEVEL_SPREAD=t("aquifer_fluid_level_spread",-5,[1]),e.AQUIFER_LAVA=t("aquifer_lava",-1,[1]),e.PILLAR=t("pillar",-7,[1,1]),e.PILLAR_RARENESS=t("pillar_rareness",-8,[1]),e.PILLAR_THICKNESS=t("pillar_thickness",-8,[1]),e.SPAGHETTI_2D=t("spaghetti_2d",-8,[1]),e.SPAGHETTI_2D_ELEVATION=t("spaghetti_2d_elevation",-8,[1]),e.SPAGHETTI_2D_MODULATOR=t("spaghetti_2d_modulator",-8,[1]),e.SPAGHETTI_2D_THICKNESS=t("spaghetti_2d_thickness",-8,[1]),e.SPAGHETTI_3D_1=t("spaghetti_3d_1",-8,[1]),e.SPAGHETTI_3D_2=t("spaghetti_3d_2",-8,[1]),e.SPAGHETTI_3D_RARITY=t("spaghetti_3d_rarity",-8,[1]),e.SPAGHETTI_3D_THICKNESS=t("spaghetti_3d_thickness",-8,[1]),e.SPAGHETTI_ROUGHNESS=t("spaghetti_roughness",-8,[1]),e.SPAGHETTI_ROUGHNESS_MODULATOR=t("spaghetti_roughness_modulator",-8,[1]),e.CAVE_ENTRANCE=t("cave_entrance",-7,[.4,.5,1]),e.CAVE_LAYER=t("cave_layer",-8,[1]),e.CAVE_CHEESE=t("cave_cheese",-8,[.5,1,2,1,2,1,0,2,0]),e.NOODLE=t("noodle",-8,[1]),e.NOODLE_THICKNESS=t("noodle_thickness",-8,[1]),e.NOODLE_RIDGE_A=t("noodle_ridge_a",-7,[1]),e.NOODLE_RIDGE_B=t("noodle_ridge_b",-7,[1]),e.JAGGED=t("jagged",-16,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),e.SURFACE=t("surface",-6,[1,1,1]),e.SURFACE_SECONDARY=t("surface_secondary",-6,[1,1,0,1]);function t(i,o,s){return Yt.NOISE.register(me.create(i),Sn.create(o,s))}const n=new Map;function r(i,o){var c;const s=(c=o.key())==null?void 0:c.toString();if(!s)throw new Error("Cannot instantiate noise from direct holder");const a=i.seedKey(),l=n.get(s);if(l&&l[0]===a[0]&&l[1]===a[1])return l[2];const u=new hi(i.fromHashOf(s),o.value());return n.set(s,[a[0],a[1],u]),u}e.instantiate=r})(vt||(vt={}));var Be;(function(e){function t(s){var l,u,c,h,p;const a=(l=P.readObject(s))!=null?l:{};return{minY:(u=P.readInt(a.min_y))!=null?u:0,height:(c=P.readInt(a.height))!=null?c:256,xzSize:(h=P.readInt(a.size_horizontal))!=null?h:1,ySize:(p=P.readInt(a.size_vertical))!=null?p:1}}e.fromJson=t;function n(s){return s.ySize<<2}e.cellHeight=n;function r(s){return s.xzSize<<2}e.cellWidth=r;function i(s){return s.height/n(s)}e.cellCountY=i;function o(s){return Math.floor(s.minY/n(s))}e.minCellY=o})(Be||(Be={}));var Vs;(function(e){function t(r){var o,s,a,l;const i=(o=P.readObject(r))!=null?o:{};return{target:(s=P.readNumber(i.target))!=null?s:0,size:(a=P.readInt(i.size))!=null?a:0,offset:(l=P.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,o){if(r.size<=0)return i;const s=(o-r.offset)/r.size;return Mo(r.target,i,s)}e.apply=n})(Vs||(Vs={}));var Mn;(function(e){const t=a=>Cn.parser(Yt.DENSITY_FUNCTION,le.fromJson)(a).value();function n(a){var u;const l=(u=P.readObject(a))!=null?u:{};return{barrier:t(l.barrier),fluidLevelFloodedness:t(l.fluid_level_floodedness),fluidLevelSpread:t(l.fluid_level_spread),lava:t(l.lava),temperature:t(l.temperature),vegetation:t(l.vegetation),continents:t(l.continents),erosion:t(l.erosion),depth:t(l.depth),ridges:t(l.ridges),initialDensityWithoutJaggedness:t(l.initial_density_without_jaggedness),finalDensity:t(l.final_density),veinToggle:t(l.vein_toggle),veinRidged:t(l.vein_ridged),veinGap:t(l.vein_gap)}}e.fromJson=n;function r(a){return K({barrier:le.Constant.ZERO,fluidLevelFloodedness:le.Constant.ZERO,fluidLevelSpread:le.Constant.ZERO,lava:le.Constant.ZERO,temperature:le.Constant.ZERO,vegetation:le.Constant.ZERO,continents:le.Constant.ZERO,erosion:le.Constant.ZERO,depth:le.Constant.ZERO,ridges:le.Constant.ZERO,initialDensityWithoutJaggedness:le.Constant.ZERO,finalDensity:le.Constant.ZERO,veinToggle:le.Constant.ZERO,veinRidged:le.Constant.ZERO,veinGap:le.Constant.ZERO},a)}e.create=r;function i(a,l,u,c=!1){const h=(c?new Ke(u):xe.create(u)).forkPositional(),p=new o(h,l);return Ae(K({},p.mapAll(a)),{aquiferPositionalRandomFactory:h.fromHashOf(me.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:h.fromHashOf(me.create("ore").toString()).forkPositional()})}e.withSettings=i;class o{constructor(l,u){this.random=l,this.settings=u,this.mapped=new Map}map(l){if(l instanceof le.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 le.Interpolated)return l.withCellSize(Be.cellWidth(this.settings),Be.cellHeight(this.settings));if(l instanceof le.ShiftedNoise){const u=vt.instantiate(this.random,l.noiseData);return new le.ShiftedNoise(l.shiftX,l.shiftY,l.shiftZ,l.xzScale,l.yScale,l.noiseData,u)}return l instanceof le.Noise?new le.Noise(l.xzScale,l.yScale,l.noiseData,vt.instantiate(this.random,l.noiseData)):l instanceof le.ShiftNoise?l.withNewNoise(vt.instantiate(this.random,l.noiseData)):l instanceof le.WeirdScaledSampler?new le.WeirdScaledSampler(l.input,l.rarityValueMapper,l.noiseData,vt.instantiate(this.random,l.noiseData)):l instanceof le.OldBlendedNoise?new le.OldBlendedNoise(l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier,new q0(this.random.fromHashOf(me.create("terrain").toString()),l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier)):l instanceof le.Mapped||l instanceof le.Ap2?l.withMinMax():l}mapAll(l){return{barrier:l.barrier.mapAll(this),fluidLevelFloodedness:l.fluidLevelFloodedness.mapAll(this),fluidLevelSpread:l.fluidLevelSpread.mapAll(this),lava:l.lava.mapAll(this),temperature:l.temperature.mapAll(this),vegetation:l.vegetation.mapAll(this),continents:l.continents.mapAll(this),erosion:l.erosion.mapAll(this),depth:l.depth.mapAll(this),ridges:l.ridges.mapAll(this),initialDensityWithoutJaggedness:l.initialDensityWithoutJaggedness.mapAll(this),finalDensity:l.finalDensity.mapAll(this),veinToggle:l.veinToggle.mapAll(this),veinRidged:l.veinRidged.mapAll(this),veinGap:l.veinGap.mapAll(this)}}}e.Visitor=o;function s(a,l,u,c){const h=Be.minCellY(a)+Be.cellCountY(a),p=Be.minCellY(a),d=Be.cellHeight(a);for(let v=h;v>=p;v-=1){const _=v*d;if(Xi(l.compute(le.context(u,_,c)),-64,64)>=.390625)return _}return Number.MAX_SAFE_INTEGER}e.computePreliminarySurfaceLevelScanning=s})(Mn||(Mn={}));class K0{constructor(t,n,r,i,o,s,a,l,u){this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.router=i,this.minX=o,this.minZ=s,this.settings=a,this.preliminarySurfaceLevel=new Map,this.cellWidth=Be.cellWidth(a),this.cellHeight=Be.cellHeight(a),this.firstCellX=Math.floor(o/this.cellWidth),this.firstCellZ=Math.floor(s/this.cellWidth),this.firstNoiseX=o>>2,this.firstNoiseZ=s>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=no.createDisabled(u);const c=this.router.finalDensity;this.materialRule=ro.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 fi(this.preliminarySurfaceLevel,Xe.asLong(t,n),()=>Mn.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}var ro;(function(e){function t(n){return r=>{for(const i of n){const o=i(r);if(o)return o}}}e.fromList=t})(ro||(ro={}));var Kn;(function(e){function t(o){var a,l,u,c;const s=(a=P.readObject(o))!=null?a:{};return s.absolute!==void 0?n((l=P.readNumber(s.absolute))!=null?l:0):s.above_bottom!==void 0?r((u=P.readNumber(s.above_bottom))!=null?u:0):s.below_top!==void 0?i((c=P.readNumber(s.below_top))!=null?c:0):()=>0}e.fromJson=t;function n(o){return()=>o}function r(o){return s=>s.minY+o}function i(o){return s=>s.maxY-o}})(Kn||(Kn={}));var io;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(io||(io={}));class Q0{constructor(t,n,r){this.rule=t,this.defaultBlock=n,this.random=xe.create(r).forkPositional(),this.surfaceNoise=vt.instantiate(this.random,vt.SURFACE),this.surfaceSecondaryNoise=vt.instantiate(this.random,vt.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const o=Xe.minBlockX(t.pos),s=Xe.minBlockZ(t.pos),a=new ep(this,t,n,r,i),l=this.rule(a);for(let u=0;u<16;u+=1){const c=o+u;for(let h=0;h<1;h+=1){const p=s+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=In.create(c,m,p),y=t.getBlockState(g);if(y.equals(He.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(In.create(c,b,p));if(k.equals(He.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 fi(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class ep{constructor(t,n,r,i,o){this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=o,this.blockX=0,this.blockY=0,this.blockZ=0,this.stoneDepthAbove=0,this.stoneDepthBelow=0,this.surfaceDepth=0,this.waterHeight=0,this.biome=()=>"",this.surfaceSecondary=()=>0,this.minSurfaceLevel=()=>0}updateXZ(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=Ii(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=Ii(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=Ii(()=>this.getBiome(In.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,o=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),s=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i+1<<4),l=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i+1<<4);return Math.floor(Ki((t&15)/16,(n&15)/16,o,s,a,l))+this.surfaceDepth-8}}var oo;(function(e){e.NOOP=()=>()=>{};function t(o){var l,u,c;const s=(l=P.readObject(o))!=null?l:{};switch((u=P.readString(s.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return n(He.fromJson(s.result_state));case"sequence":return r((c=P.readArray(s.sequence,e.fromJson))!=null?c:[]);case"condition":return i(so.fromJson(s.if_true),e.fromJson(s.then_run))}return e.NOOP}e.fromJson=t;function n(o){return()=>()=>o}e.block=n;function r(o){return s=>{const a=o.map(l=>l(s));return(l,u,c)=>{for(const h of a){const p=h(l,u,c);if(p)return p}}}}e.sequence=r;function i(o,s){return a=>(l,u,c)=>{if(o(a))return s(a)(l,u,c)}}e.condition=i})(oo||(oo={}));var so;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(u){var p,d,v,_,m,g,y,w,A,b,k,E;const c=(p=P.readObject(u))!=null?p:{};switch((d=P.readString(c.type))==null?void 0:d.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((v=P.readArray(c.biome_is,I=>{var C;return(C=P.readString(I))!=null?C:""}))!=null?v:[]);case"not":return i(e.fromJson(c.invert));case"stone_depth":return o((_=P.readInt(c.offset))!=null?_:0,(m=P.readBoolean(c.add_surface_depth))!=null?m:!1,(g=P.readInt(c.secondary_depth_range))!=null?g:0,P.readString(c.surface_type)==="ceiling");case"vertical_gradient":return s((y=P.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=P.readInt(c.offset))!=null?w:0,(A=P.readInt(c.surface_depth_multiplier))!=null?A:0,(b=P.readBoolean(c.add_surface_depth))!=null?b:!1);case"y_above":return l(Kn.fromJson(c.anchor),(k=P.readInt(c.surface_depth_multiplier))!=null?k:0,(E=P.readBoolean(c.add_surface_depth))!=null?E:!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 o(u,c,h,p){return d=>{const v=p?d.stoneDepthBelow:d.stoneDepthAbove,_=c?d.surfaceDepth:0,m=h===0?0:Bs(d.surfaceSecondary(),-1,1,0,h);return v<=1+u+_+m}}e.stoneDepth=o;function s(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=Bs(p.blockY,d,v,1,0);return _.nextFloat()<m}}e.verticalGradient=s;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})(so||(so={}));class tp{constructor(t,n,r){this.biomeSource=n,this.settings=r,this.router=Mn.withSettings(r.noiseRouter,r.noise,t,r.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new Q0(r.surfaceRule,r.defaultBlock,t);const i=new zs(-54,He.LAVA),o=new zs(r.seaLevel,r.defaultFluid);this.globalFluidPicker=(s,a,l)=>a<Math.min(-54,r.seaLevel)?i:o}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),o=Be.cellWidth(this.settings.noise),s=Be.cellHeight(this.settings.noise),a=Math.floor(16/o),l=Math.floor(r/s),u=Math.floor((i-r)/s),c=Xe.minBlockX(t.pos),h=Xe.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=s-1;y>=0;y-=1){const w=(l+g)*s+y,A=w&15,b=t.getSectionIndex(w);t.getSectionIndex(m.minBlockY)!==b&&(m=t.getOrCreateSection(b));for(let k=0;k<o;k+=1){const E=c+v*o+k,I=E&15;for(let C=0;C<(n?1:o);C+=1){const M=h+_*o+C,L=M&15,F=(d=p.getFinalState(E,w,M))!=null?d:this.settings.defaultBlock;m.setBlockState(I,A,L,F)}}}}}buildSurface(t,n="minecraft:plains"){const r=this.getNoiseChunk(t),i=io.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,r,i,()=>n)}getNoiseChunk(t){return fi(this.noiseChunkCache,Xe.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=Be.cellWidth(this.settings.noise),o=Be.cellHeight(this.settings.noise),s=Math.floor(16/i),a=Math.floor(n/o),l=Math.floor((r-n)/o),u=Xe.minBlockX(t.pos),c=Xe.minBlockZ(t.pos);return new K0(s,l,a,this.router,u,c,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var ao;(function(e){function t(n){var i,o,s,a,l,u;const r=(i=P.readObject(n))!=null?i:{};return{surfaceRule:oo.fromJson(r.surface_rule),noise:Be.fromJson(r.noise),defaultBlock:He.fromJson(r.default_block),defaultFluid:He.fromJson(r.default_fluid),noiseRouter:Mn.fromJson(r.noise_router),seaLevel:(o=P.readInt(r.sea_level))!=null?o:0,disableMobGeneration:(s=P.readBoolean(r.disable_mob_generation))!=null?s:!1,aquifersEnabled:(a=P.readBoolean(r.aquifers_enabled))!=null?a:!1,oreVeinsEnabled:(l=P.readBoolean(r.ore_veins_enabled))!=null?l:!1,legacyRandomSource:(u=P.readBoolean(r.legacy_random_source))!=null?u:!1}}e.fromJson=t})(ao||(ao={}));let Hs=!1;async function np(){Hs||(await lc(Ps),Hs=!0,console.debug(`Loaded deepslate-rs from "${Ps}"`))}const rp={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 Us,Gs;async function ip(e,t,n){var v,_,m;const{biomeSource:r}=await gc(e,n),i=t.data,o=-Math.round(n.offset[0])-100+n.res/2,s=-Math.round(n.offset[1])-100+n.res/2,a=t.width*4/n.res,l=4/n.res,u=[o*n.scale,(200+o)*n.scale,n.res*n.scale],c=[s*n.scale,(200+s)*n.scale,n.res*n.scale],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+o)*n.scale,k=(y+s)*n.scale;let E=[50,50,50];if(n.layers.has("biomes")){const I=(m=h==null?void 0:h[A])!=null?m:r.getBiome(b,64,k);E=ap(I.toString(),n.biomeColors)}else if(d&&p[0]){const I=d[A][p[0]],[C,M]=rp[p[0]],L=(I-C)/(M-C)*256;E=[L,L,L]}i[w]=E[0],i[w+1]=E[1],i[w+2]=E[2],i[w+3]=255}}async function op(e,t,n,r){var a;const{biomeSource:i}=await gc(e,r),[o,s]=lp([t,n],r);return K({biome:i.getBiome(o,64,s).toString()},(a=i.getClimate)==null?void 0:a.call(i,o,64,s))}async function gc(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return en(n,Us)||(Us=li(n),Gs=await sp(e,t)),{biomeSource:Gs}}async function sp(e,t){var n,r,i,o,s;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new or(me.parse(e.biome));case"checkerboard":const a=((r=e.scale)!=null?r:2)+2,l=(o=(i=e.biomes)==null?void 0:i.length)!=null?o:0;return{getBiome(u,c,h){var d;const p=(((u>>a)+(h>>a))%l+l)%l;return me.parse((d=e.biomes)==null?void 0:d[p].node)}};case"multi_noise":switch((s=e.preset)==null?void 0:s.replace(/^minecraft:/,"")){case"nether":e=Ye(t.version,"1.18")?dp:up;break;case"overworld":e=Ye(t.version,"1.18")?await fp():e;break}if(e=D.DataModel.unwrapLists(e),Ye(t.version,"1.18")){await np();const u=new Jh,c=L=>typeof L=="number"?[L,L]:L,[h,p,d,v,_,m,g,y,w,A,b,k,E,I]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const L of e.biomes){const{temperature:F,humidity:ne,continentalness:se,erosion:fe,weirdness:O,depth:$,offset:G}=L.parameters;h.push(c(F)[0]),p.push(c(F)[1]),d.push(c(ne)[0]),v.push(c(ne)[1]),_.push(c(se)[0]),m.push(c(se)[1]),g.push(c(fe)[0]),y.push(c(fe)[1]),w.push(c(O)[0]),A.push(c(O)[1]),b.push(c($)[0]),k.push(c($)[1]),E.push(G),I.push(u.getOrPut(L.biome,Math.floor(Math.random()*2147483647)))}const C=$0(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(E),new Int32Array(I)),M=B0(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(L,F,ne){var fe;const se=Ns(C,M,L,L+1,1,F,F+1,1,ne,ne+1,1);return me.parse((fe=u.getA(se[0]))!=null?fe:"unknown")},getBiomes(L,F,ne,se,fe,O,$,G,T){return[...Ns(C,M,L,F,ne,se,fe,O,$,G,T)].map(S=>{var N;return me.parse((N=u.getA(S))!=null?N:"unknown")})},getClimate(L,F,ne){const se=Rs(M,L,L+1,1,F,F+1,1,ne,ne+1,1),[fe,O,$,G,T]=se.slice(0,5);return{temperature:fe,humidity:O,continentalness:$,erosion:G,weirdness:T}},getClimates(L,F,ne,se,fe,O,$,G,T){const x=Rs(M,L,F,ne,se,fe,O,$,G,T),S=[];for(let N=0;N<x.length;N+=7){const[j,W,ce,ze,it]=x.slice(N,N+5);S.push({temperature:j,humidity:W,continentalness:ce,erosion:ze,weirdness:it})}return S}}}else{const u=["altitude","temperature","humidity","weirdness"].map((c,h)=>{var d;const p=e[`${c}_noise`];return p.firstOctave=Je((d=p.firstOctave)!=null?d:-7,-100,-1),new hi(new Ke(t.seed+BigInt(h)),p)});return!Array.isArray(e.biomes)||e.biomes.length===0?new or(me.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=zn(g.altitude-d[0])+zn(g.temperature-d[1])+zn(g.humidity-d[2])+zn(g.weirdness-d[3])+zn(g.offset);y<v&&(v=y,_=m)}return me.parse(_)}}}}throw new Error("Unknown biome source")}function ap(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:cp[e];return n===void 0?Vl(e):n}function lp([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 cp={"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]},up={type:"minecraft:multi_noise",seed:0,altitude_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},humidity_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{biome:"minecraft:nether_wastes",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{altitude:0,temperature:0,humidity:-.5,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{altitude:0,temperature:.4,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{altitude:0,temperature:0,humidity:.5,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{altitude:0,temperature:-.5,humidity:0,weirdness:0,offset:.175}}]},dp={type:"minecraft:multi_noise",biomes:[{biome:"minecraft:nether_wastes",parameters:{temperature:0,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{temperature:0,humidity:-.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{temperature:.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{temperature:0,humidity:.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{temperature:-.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.175}}]};async function fp(){return(await Gl("1.18","dimension","overworld")).generator.biome_source}const Wt=[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],Ys=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function hp(e,t,n){const r=new Ke(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new ye(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:s=>r.nextInt(s),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(s){return pp(s,this)}};for(let s=0;s<n.size[0]/16;s+=1)for(let a=0;a<n.size[2]/16;a+=1)Ye(n.version,void 0,"1.17")?fn([s*16,0,a*16],D.DataModel.unwrapLists(e),i):vp([s*16,0,a*16],D.DataModel.unwrapLists(e.placement),i);const o=t.data;t.data.fill(255);for(const[s,a]of i.placements){if(s[0]<0||s[1]<0||s[2]<0||s[0]>=n.size[0]||s[1]>=n.size[1]||s[2]>=n.size[2])continue;const l=s[2]*(t.width*4)+s[0]*4,u=a<Ys.length?Ys[a]:Vl(i.features[a]);o[l]=Je(50,205,u[0]),o[l+1]=Je(50,205,u[1]),o[l+2]=Je(50,205,u[2]),o[l+3]=255}for(let s=0;s<n.size[0];s+=1)for(let a=0;a<n.size[2];a+=1){if((Math.floor(s/16)+Math.floor(a/16))%2===0)continue;const l=a*(t.width*4)+s*4;for(let u=0;u<3;u+=1)o[l+u]=.85*o[l+u]}}function On(e){return e.startsWith("minecraft:")?e.slice(10):e}function tt(e,t){return[[e[0],t,e[2]]]}function pp(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(On(e.type)){case"constant":return e.value;case"uniform":return e.value.min_inclusive+t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1);case"biased_to_bottom":return e.value.min_inclusive+t.nextInt(t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1)+1);case"clamped":return Je(t.sampleInt(e.value.source),e.value.min_inclusive,e.value.max_inclusive);case"clamped_normal":const i=e.value.mean+t.nextGaussian()*e.value.deviation;return Math.floor(Je(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const o=e.distribution.reduce((a,l)=>a+l.weight,0);let s=t.nextInt(o);for(const a of e.distribution)if(s-=a.weight,s<0)return t.sampleInt(a.data);return 0}return 1}function mt(e,t){if(!rn(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 mp(e,t){var n,r,i,o;if(!rn(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return mt(e);switch(On(e.type)){case"constant":return mt(e.value);case"uniform":{const s=mt(e.min_inclusive),a=mt(e.max_inclusive);return s+t.nextInt(a-s+1)}case"biased_to_bottom":{const s=mt(e.min_inclusive),a=mt(e.max_inclusive),l=t.nextInt(a-s-((n=e.inner)!=null?n:1)+1);return s+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const s=mt(e.min_inclusive),a=mt(e.max_inclusive),l=(i=e.inner)!=null?i:1,u=s+l+t.nextInt(a-s-l+1),c=s+t.nextInt(u-s);return s+t.nextInt(c-s+l)}case"trapezoid":{const s=mt(e.min_inclusive),a=mt(e.max_inclusive),l=(o=e.plateau)!=null?o:0;if(l>=a-s)return s+t.nextInt(a-s+1);const u=(a-s-l)/2,c=a-s-u;return s+t.nextInt(c+1)+t.nextInt(u+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function Ws(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function fn(e,t,n){var o;if(typeof t=="string"){n.placements.push([e,Ws(t,n)]);return}const r=On((o=t==null?void 0:t.type)!=null?o:"no_op"),i=gp[r];i?i(t.config,e,n):n.placements.push([e,Ws(JSON.stringify(t),n)])}function lo(e,t,n){var o;const r=On((o=t==null?void 0:t.type)!=null?o:"nope"),i=_p[r];return i?i(t==null?void 0:t.config,e,n):[e]}const gp={decorated:(e,t,n)=>{lo(t,e==null?void 0:e.decorator,n).forEach(i=>fn(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;fn(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const o of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=o==null?void 0:o.chance)!=null?i:0)){fn(t,o.feature,n);return}fn(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,o,s;const r=(s=e==null?void 0:e.features)==null?void 0:s[n.nextInt((o=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?o:0)];fn(t,r,n)}},_p={chance:(e,t,n)=>{var r;return n.nextFloat()<1/((r=e==null?void 0:e.chance)!=null?r:1)?[t]:[]},count:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t)},count_extra:(e,t,n)=>{var i,o;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(o=e.extra_count)!=null?o:0),new Array(r).fill(t)},count_multilayer:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t).map(i=>[i[0]+n.nextInt(16),i[1],i[2]+n.nextInt(16)])},count_noise:(e,t,n)=>{const i=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(i).fill(t)},count_noise_biased:(e,t,n)=>{var s;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),o=Math.max(0,Math.ceil((i+((s=e.noise_offset)!=null?s:0))*e.noise_to_count_ratio));return new Array(o).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const o=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],s=Math.max(n.seaLevel,Wt[Je(0,63,o)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[o,s,a]}),decorated:(e,t,n)=>lo(t,e==null?void 0:e.outer,n).flatMap(r=>lo(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,o,s,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((o=e==null?void 0:e.spread)!=null?o:0)-((s=e.spread)!=null?s:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return tt(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,Wt[Je(0,63,t[0])]);return tt(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,Wt[Je(0,63,t[0])]);return tt(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,Wt[Je(0,63,t[0])]);return tt(t,r)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var r,i;if(n.nextInt(((r=e.chance)!=null?r:1)/10)===0){const o=n.nextInt(n.nextInt(248)+8);if(o<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const s=n.nextInt(16)+t[0],a=n.nextInt(16)+t[2];return[[s,o,a]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,o,s;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0);return tt(t,r)},range_biased:(e,t,n)=>{var i,o,s;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0));return tt(t,r)},range_very_biased:(e,t,n)=>{var i,o,s,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return tt(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return tt(t,r)},top_solid_heightmap:(e,t)=>{const n=Wt[Je(0,63,t[0])];return tt(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return tt(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var o,s;const n=Wt[Je(0,63,t[0])],r=n+((o=e==null?void 0:e.min_inclusive)!=null?o:-1/0),i=n+((s=e==null?void 0:e.max_inclusive)!=null?s:1/0);return t[1]<r||t[1]>i?[t]:[]},water_lake:(e,t,n)=>{var r;return n.nextInt((r=e.chance)!=null?r:1)===0?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function vp(e,t,n){var i;let r=[e];for(const o of t)!qs[On((i=o==null?void 0:o.type)!=null?i:"nope")]||(r=r.flatMap(a=>qs[On(o.type)](o,a,n)));for(const o of r)n.placements.push([o,0])}const qs={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)=>tt(t,mp(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,Wt[Je(0,63,e[0])]);return tt(e,n)},in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},r,i)=>{const o=Math.max(1,t),s=i.biomeInfoNoise.sample(r[0]/o,0,r[2]/o),a=Math.max(0,Math.ceil((s+(n!=null?n:0))*e));return new Array(a).fill(r)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},r,i)=>{const s=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(s).fill(r)},random_offset:({xz_spread:e,y_spread:t},n,r)=>[[n[0]+r.sampleInt(e),n[1]+r.sampleInt(t),n[2]+r.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(e!=null?e:1)?[t]:[]};class wp{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 Ke(t);this.minLimitPerlinNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new ye(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,o){this.settings=t,this.chunkWidth=t.size_horizontal*4,this.chunkHeight=t.size_vertical*4,this.chunkCountY=Math.floor(t.height/this.chunkHeight),t.amplified&&n>0&&(n=1+n*2,r=1+r*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(r*.9+.1),this.noiseColumnCache=Array(o).fill(null),this.xOffset=i}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),r=Math.floor(t/this.chunkWidth),i=Math.floor(t%this.chunkWidth)/this.chunkWidth,o=this.fillNoiseColumn(r),s=this.fillNoiseColumn(r+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let l=this.chunkHeight;l>=0;l-=1){const u=l/this.chunkHeight,c=a*this.chunkHeight+l;n[c]=Zh(u,i,o[a],o[a+1],s[a],s[a+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const r=Array(this.chunkCountY+1),i=684.412*this.settings.sampling.xz_scale,o=684.412*this.settings.sampling.y_scale,s=i/this.settings.sampling.xz_factor,a=o/this.settings.sampling.y_factor,l=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let u=0;u<=this.chunkCountY;u+=1){let c=this.sampleAndClampNoise(t,u,this.mainPerlinNoise.getOctaveNoise(0).zo,i,o,s,a);const 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=Ai(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=Ai(this.settings.bottom_slide.target,c,(u-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),r[u]=c}return this.noiseColumnCache[t-this.xOffset]=r,r}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),i=(n<0?-n*.3:n)*24.575625-2;return i<0?i*.009486607142857142:Math.min(i,1)*.006640625}sampleAndClampNoise(t,n,r,i,o,s,a){let l=0,u=0,c=0,h=1;for(let p=0;p<16;p+=1){const d=ye.wrap(t*i*h),v=ye.wrap(n*o*h),_=ye.wrap(r*i*h),m=o*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(ye.wrap(t*s*h),ye.wrap(n*a*h),ye.wrap(r*s*h),a*h,n*a*h)/h)}h/=2}return Ai(l/512,u/512,(c/10+1)/2)}}const Lo=0,yp={"minecraft:air":[150,160,170],"minecraft:water":[20,80,170],"minecraft:lava":[200,100,0],"minecraft:stone":[55,55,55],"minecraft:deepslate":[34,34,36],"minecraft:bedrock":[10,10,10],"minecraft:grass_block":[47,120,23],"minecraft:dirt":[64,40,8],"minecraft:gravel":[70,70,70],"minecraft:sand":[196,180,77],"minecraft:sandstone":[148,135,52],"minecraft:netherrack":[100,40,40],"minecraft:crimson_nylium":[144,22,22],"minecraft:warped_nylium":[28,115,113],"minecraft:basalt":[73,74,85],"minecraft:end_stone":[200,200,140]};let Zs,Oi,Jr=[];const Ti=new Map;async function bp(e,t,n){var s,a,l;if(Ye(n.version,"1.18")){Ye(n.version,"1.18.2")&&await _c(n.version);const{settings:u,generator:c}=await Ip(e,n),h=new Mp(-n.offset,n.width,u.noise.minY,u.noise.height);h.generate(c,n.biome);const p=t.data;for(let d=0;d<n.width;d+=1)for(let v=0;v<u.noise.height;v+=1){const _=d*4+(u.noise.height-v-1)*4*t.width,m=h.getBlockState([d-n.offset,v+u.noise.minY,Lo]),g=(s=yp[m.getName().toString()])!=null?s:[0,0,0];p[_]=g[0],p[_+1]=g[1],p[_+2]=g[2],p[_+3]=255}return}const r=new wp(n.seed);r.reset(e.noise,(a=n.biomeDepth)!=null?a:0,(l=n.biomeScale)!=null?l:0,n.offset,n.width);const i=t.data,o=t.width*4;for(let u=0;u<n.width;u+=1){const c=r.iterateNoiseColumn(u-n.offset).reverse();for(let h=0;h<e.noise.height;h+=1){const p=h*o+u*4,d=Cp(c,h);i[p]=d,i[p+1]=d,i[p+2]=d,i[p+3]=255}}}function xp(e,t){const n=Jr.find(r=>Xe.minBlockX(r.pos)<=e&&Xe.maxBlockX(r.pos)>=e);if(!!n)return n.getBlockState(In.create(e,t,Lo))}async function Ap(e,t,n){const{fn:r,settings:i}=await kp(e,n),o=Array(n.width*i.height);let s=1/0,a=-1/0;for(let u=0;u<n.width;u+=1)for(let c=0;c<i.height;c+=1){const h=u+(i.height-c-1)*n.width,p=r.compute(le.context(u-n.offset,c,0));s=Math.min(s,p),a=Math.max(a,p),o[h]=p}const l=t.data;for(let u=0;u<n.width*i.height;u+=1){const c=Math.floor(pc(o[u],s,a,0,256));l[4*u]=c,l[4*u+1]=c,l[4*u+2]=c,l[4*u+3]=255}}async function kp(e,t){await _c(t.version);const n=xe.create(t.seed).forkPositional(),r=Be.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{fn:le.fromJson(e).mapAll(new Mn.Visitor(n,r)),settings:r}}const Ep=[["worldgen/noise",Sn],["worldgen/density_function",le]];async function _c(e){var n;const t=(n=Ti.get(e))!=null?n:new ir(new me("misode","temp"));Ti.has(e)||(await Promise.all(Ep.map(([r,i])=>Sp(e,t,r,i))),Ti.set(e,t)),Yt.DENSITY_FUNCTION.clear().assign(t.getOrThrow(me.create("worldgen/density_function"))),Yt.NOISE.clear().assign(t.getOrThrow(me.create("worldgen/noise")))}async function Sp(e,t,n,r){const i=await l0(e,n),o=new ir(me.create(n));for(const[s,a]of i.entries())o.register(me.parse(s),r.fromJson(a));t.register(o.key,o)}async function Ip(e,t){const n=ao.fromJson(D.DataModel.unwrapLists(e)),r=[e,`${t.seed}`,t.biome];if(!en(r,Zs))if(Zs=li(r),Jr=[],Ye(t.version,"1.18.2")){const i=new or(me.create("unknown"));Oi=new tp(t.seed,i,n)}else{const i=await ae(()=>import("./deepslate.esm.37434e44.js"),[]),o=new i.FixedBiome("unknown");Oi=new i.NoiseChunkGenerator(t.seed,o,n)}return{settings:n,generator:Oi}}function Cp(e,t){return e[t]>0?0:e[t+1]>0?150:255}class Mp{constructor(t,n,r,i){this.minX=t,this.done=[],this.chunks=[...Array(Math.ceil(n/16)+1)].map((o,s)=>{const a=(t>>4)+s,l=Jr.find(u=>u.pos[0]===a);return l?(this.done[s]=!0,l):new X0(r,i,Xe.create(a,Lo>>4))})}generate(t,n){this.chunks.forEach((r,i)=>{this.done[i]||(t.fill(r,!0),t.buildSurface(r,n),this.done[i]=!0,Jr.push(r))})}getBlockState(t){const n=(t[0]>>4)-(this.minX>>4);return this.chunks[n].getBlockState(t)}}function Op(e,t,n){const r=new Ke(n.seed),i=Sn.fromJson(D.DataModel.unwrapLists(e)),o=new hi(r,i),s=-n.offset[0]-100,a=-n.offset[1]-100,l=t.data;for(let u=0;u<256;u+=1)for(let c=0;c<256;c+=1){const h=u*4+c*4*256,p=(u+s)*n.scale,d=(c+a)*n.scale,v=(o.sample(p,d,0)+1)*128;l[h]=v,l[h+1]=v,l[h+2]=v,l[h+3]=255}}const Tp=["biomes","temperature","humidity","continentalness","erosion","weirdness"],Lp=({model:e,data:t,shown:n,version:r})=>{var k,E;const{locale:i}=ke(),[o]=R(Nt()),[s,a]=R(2),[l,u]=R(void 0),[c,h]=R(new Set(["biomes"])),p=_e([0,0]),d=_e(1),v=_e(),_=BigInt((k=e.get(new D.Path(["generator","seed"])))!=null?k:o),m=be(()=>{if(!!n)return Rp(e.get(new D.Path(["generator","settings"])))},[n]),g=n?Np(t,m):"",y=(E=t.type)==null?void 0:E.replace(/^minecraft:/,""),{canvas:w,redraw:A}=_r({size(){return[200/d.current,200/d.current]},async draw(I){const C={octaves:m,biomeColors:{},layers:c,offset:p.current,scale:s,seed:_,res:d.current,version:r};await ip(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:s,seed:o,res:1,version:r},L=await op(t,Math.floor(I*200),Math.floor(C*200),M);u(L)},onLeave(){u(void 0)}},[g,s,o,c]);J(()=>{n&&(d.current=y==="multi_noise"?4:1,A())},[g,s,o,c,n]);const b=I=>{p.current[0]=p.current[0]*s/I,p.current[1]=p.current[1]*s/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(Ge,{icon:"stack",tooltip:i("configure_layers")},Tp.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(s*1.5)}),f(q,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>b(s/1.5)})),y==="multi_noise"&&f(q,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>Bl(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 Np(e,t){return JSON.stringify([e,t])}function Rp(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 Pp=({data:e,version:t,shown:n})=>{const{locale:r}=ke(),[i,o]=R(4),[s,a]=R(Nt()),{canvas:l,redraw:u}=_r({size(){return[i*16,i*16]},async draw(h){hp(e,h,{seed:s,version:t,size:[i*16,128,i*16]})}}),c=JSON.stringify(e);return J(()=>{n&&u()},[c,i,s,n]),f(te,null,f("div",{class:"controls preview-controls"},f(q,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>o(Math.min(16,i+1))}),f(q,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>o(Math.max(1,i-1))}),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(Nt())})),f("canvas",{ref:l,width:"64",height:"64"}))},Dp=({data:e,shown:t,version:n})=>{var m,g;const{locale:r}=ke(),[i,o]=R(Nt()),[s,a]=R(!1),[l,u]=R(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:_}=_r({size(){return[d,d]},async draw(y){const w={offset:c.current,width:y.width,seed:i,version:n};await Ap(e,y,w)},async onDrag(y){c.current+=y*d,_()},async onHover(y,w){var k,E;const A=Math.floor(y*d-c.current),b=d-Math.max(1,Math.ceil(w*d))+((E=(k=e==null?void 0:e.noise)==null?void 0:k.min_y)!=null?E:0);u(`X=${A} Y=${b}`)},onLeave(){u(void 0)}},[p,i]);return J(()=>{h.current&&clearInterval(h.current),t&&(_(),s&&(h.current=setInterval(()=>{c.current-=8,_()},100)))},[p,i,t,s]),f(te,null,f("div",{class:"controls preview-controls"},l&&f(q,{label:l,class:"no-pointer"}),f(Ge,{icon:"gear",tooltip:r("terrain_settings")},f(q,{icon:s?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>a(!s)})),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Nt())})),f("canvas",{ref:v,width:d,height:d}))},$p=({data:e,shown:t,version:n})=>{const{locale:r}=ke(),[i,o]=R(Nt()),[s,a]=R(2),l=_e([0,0]),u=JSON.stringify([e]),{canvas:c,redraw:h}=_r({size(){return[256,256]},async draw(d){const v={offset:l.current,scale:s,seed:i,version:n};Op(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,s,i]);J(()=>{t&&h()},[u,s,i,t]);const p=d=>{l.current[0]=l.current[0]*s/d,l.current[1]=l.current[1]*s/d,a(d)};return f(te,null,f("div",{class:"controls preview-controls"},f(q,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>p(s*1.5)}),f(q,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>p(s/1.5)}),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Nt())})),f("canvas",{ref:c,width:"256",height:"256"}))},Bp=({data:e,shown:t,version:n})=>{var E,I;const{locale:r}=ke(),[i,o]=R(Nt()),[s,a]=R("minecraft:plains"),[l,u]=R(.2),[c,h]=R(.1),[p,d]=R(!1),[v,_]=R(void 0),m=_e(0),g=_e(void 0),y=JSON.stringify([e,l,c]),w=(I=(E=e==null?void 0:e.noise)==null?void 0:E.height)!=null?I:256,{canvas:A,redraw:b}=_r({size(){return[w,w]},async draw(C){const M={biome:s,biomeDepth:c,biomeScale:l,offset:m.current,width:C.width,seed:i,version:n};await bp(e,C,M)},async onDrag(C){m.current+=C*w,b()},async onHover(C,M){var se,fe;const L=Math.floor(C*w-m.current),F=w-Math.max(1,Math.ceil(M*w))+((fe=(se=e==null?void 0:e.noise)==null?void 0:se.min_y)!=null?fe:0),ne=xp(L,F);_(ne?`Y=${F} (${ne.getName().path})`:`Y=${F}`)},onLeave(){_(void 0)}},[y,i]);J(()=>{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,s,l,c,p]);const k=be(()=>{var C;return(C=Pr==null?void 0:Pr.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(Ge,{icon:"gear",tooltip:r("terrain_settings")},Ye(n,void 0,"1.17")?f(te,null,f(Rr,{label:r("preview.scale"),value:`${l}`,onChange:C=>u(Number(C))}),f(Rr,{label:r("preview.depth"),value:`${c}`,onChange:C=>h(Number(C))})):f(Rr,{label:r("preview.biome"),value:s,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:()=>o(Nt())})),f("canvas",{ref:A,width:w,height:w}))},Fp=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function zp({model:e,version:t,id:n,shown:r}){var o;const[,i]=R(0);if(ci(e,()=>{i(s=>s+1)}),!e)return f(te,null);if(n==="dimension"&&((o=e.get(new D.Path(["generator","type"])))==null?void 0:o.endsWith("noise"))){const s=e.get(new D.Path(["generator","biome_source"]));if(s)return f(Lp,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/density_function"){const s=e.get(new D.Path([]));if(s)return f(Dp,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise"){const s=e.get(new D.Path([]));if(s)return f($p,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise_settings"){const s=e.get(new D.Path([]));if(s)return f(Bp,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&Ye(t,"1.16","1.17")){const s=e.get(new D.Path([]));if(s)return f(Pp,{model:e,version:t,shown:r,data:s})}return f(te,null)}function Fr(e,t){return e.schema.hook(jp,new D.ModelPath(e),e.data,{blockStates:t})}const jp={base({},e,t){return t},choice({switchNode:e},t,n,r){return e.hook(this,t,n,r)},list({children:e},t,n,r){if(!Array.isArray(n))return n;const i=n.map((o,s)=>e.hook(this,t.push(s),o.node,r));for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i},map({children:e,config:t},n,r,i){var a,l;if(r===void 0)return;const o=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[D.relativePath(n,t.validation.params.id).get()]:null,s={};Object.keys(r).forEach(u=>{var c;o&&!Object.keys((c=o.properties)!=null?c:{}).includes(u)||(s[u]=e.hook(this,n.push(u),r[u],i))});for(const u of Object.getOwnPropertySymbols(r))s[u]=r[u];return s},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},o=e(t);Object.keys(o).filter(s=>o[s].enabled(t)).forEach(s=>{const a=o[s].hook(this,t.push(s),n[s],r);a!=null&&(i[s]=a)});for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i}},Li={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let jn=null;const Ni={json:{parse:async e=>{try{return JSON.parse(e)}catch{return jn=await ae(()=>import("./index.ad402f16.js").then(function(n){return n.i}),[]),jn.parse(e)}},stringify:(e,t)=>(jn!=null?jn:JSON).stringify(e,null,t)+`
`},yaml:{parse:async e=>Yi.load(e),stringify:(e,t)=>Yi.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function Vp({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:o,copySuccess:s,onError:a}){const{locale:l}=ke(),[u,c]=R(Ne.getIndent()),[h,p]=R(Ne.getFormat()),[d,v]=R(Ne.getHighlighting()),[_,m]=R(!1),g=_e(null),y=_e(()=>{}),w=_e(async()=>{}),A=_e(null),b=_e(),k=Re((M,L)=>{const F=Fr(M,L);return Ni[h].stringify(F,Li[u])},[u,h]);J(()=>{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: ${nt(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 L=await Ni[h].parse(M);t==null||t.reset(D.DataModel.wrapLists(L),!1)}catch(L){L instanceof Error?(L.message=`Error importing: ${L.message}`,a(L)):a(`Error importing: ${nt(L)}`),console.error(L)}}},[t,n,u,h,d]),J(()=>{d?(m(!1),b.current={getValue(){return""},setValue(){},configure(){},select(){}},ae(()=>import("./index.8ac52a74.js").then(function(M){return M.i}),[]).then(async M=>{await Promise.all([ae(()=>import("./json.c327d69b.js").then(function(F){return F.j}),[]),ae(()=>import("./yaml.e8f3b9ab.js"),[])]);const L=M.edit("editor");L.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),L.$blockScrolling=1/0,L.on("blur",()=>w.current()),L.getSession().setMode("ace/mode/json"),b.current={getValue(){return L.getSession().getValue()},setValue(F){L.getSession().setValue(F)},configure(F,ne){L.setOption("useSoftTabs",F!=="tabs"),L.setOption("tabSize",F==="tabs"?4:Li[F]),L.getSession().setMode(`ace/mode/${ne}`)},select(){L.selectAll()}},m(!0)})):b.current={getValue(){return A.current?A.current.value:""},setValue(M){!A.current||(A.current.value=M)},configure(){},select(){}}},[d]),ci(t,()=>{!y.current||y.current()}),J(()=>{!y.current||t&&y.current()},[t]),J(()=>{!b.current||!y.current||(!d||_)&&(b.current.configure(u,h),y.current())},[u,h,d,_]),J(()=>{r&&t&&n&&navigator.clipboard.writeText(k(t,n)).then(()=>{s()})},[r]),J(()=>{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]),J(()=>{o&&b.current&&(b.current.setValue(""),b.current.select())},[o]);const E=M=>{Ne.setIndent(M),c(M)},I=M=>{Ne.setFormat(M),p(M)},C=M=>{Ne.setHighlighting(M),v(M)};return f(te,null,f("div",{class:"controls source-controls"},f(Ge,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(Li).map(([M])=>f(q,{label:l(`indentation.${M}`),active:u===M,onClick:()=>E(M)})),f("hr",null),Object.keys(Ni).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 vc(e,t){for(var n in t)e[n]=t[n];return e}function co(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 uo(e){this.props=e}function wc(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:co(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}(uo.prototype=new ct).isPureReactComponent=!0,uo.prototype.shouldComponentUpdate=function(e,t){return co(this.props,e)||co(this.state,t)};var Js=U.__b;U.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Js&&Js(e)};var Hp=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Up(e){function t(n,r){var i=vc({},n);return delete i.ref,e(i,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return t.$$typeof=Hp,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Xs=function(e,t){return e==null?null:ut(ut(e).map(t))},Gp={map:Xs,forEach:Xs,count:function(e){return e?ut(e).length:0},only:function(e){var t=ut(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:ut},Yp=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)}Yp(e,t,n)};var Ks=U.unmount;function zr(){this.__u=0,this.t=null,this.__b=null}function yc(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Wp(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return f(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Gn(){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),Ks&&Ks(e)},(zr.prototype=new ct).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=yc(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function 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(s,s)},zr.prototype.componentWillUnmount=function(){this.t=[]},zr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function o(s,a,l){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),s.__c.__H=null),(s=vc({},s)).__c!=null&&(s.__c.__P===l&&(s.__c.__P=a),s.__c=null),s.__k=s.__k&&s.__k.map(function(u){return o(u,a,l)})),s}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&f(te,null,e.fallback);return i&&(i.__h=null),[f(te,null,t.__e?null:e.children),i]};var Qs=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 qp(e){return this.getChildContext=function(){return e.context},e.children}function Zp(e){var t=this,n=e.i;t.componentWillUnmount=function(){wn(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)}}),wn(f(qp,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Jp(e,t){return f(Zp,{__v:e,i:t})}(Gn.prototype=new ct).__e=function(e){var t=this,n=yc(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Qs(t,e,r)):i()};n?n(o):o()}},Gn.prototype.render=function(e){this.u=null,this.o=new Map;var t=ut(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},Gn.prototype.componentDidUpdate=Gn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Qs(e,n,t)})};var bc=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Xp=/^(?: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]/,Kp=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Qp(e,t,n){return t.__k==null&&(t.textContent=""),wn(e,t),typeof n=="function"&&n(),e?e.__c:null}function e1(e,t,n){return Fa(e,t),typeof n=="function"&&n(),e?e.__c:null}ct.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ct.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ea=U.event;function t1(){}function n1(){return this.cancelBubble}function r1(){return this.defaultPrevented}U.event=function(e){return ea&&(e=ea(e)),e.persist=t1,e.isPropagationStopped=n1,e.isDefaultPrevented=r1,e.nativeEvent=e};var xc,ta={configurable:!0,get:function(){return this.class}},na=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 o=n[i];i==="value"&&"defaultValue"in n&&o==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&o===!0?o="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Kp(n.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():Xp.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():o===null&&(o=void 0),r[i]=o)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=ut(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=ut(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r}t&&n.class!=n.className&&(ta.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",ta)),e.$$typeof=bc,na&&na(e)};var ra=U.__r;U.__r=function(e){ra&&ra(e),xc=e.__c};var i1={ReactCurrentDispatcher:{current:{readContext:function(e){return xc.__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 Ac(e){return!!e&&e.$$typeof===bc}function s1(e){return Ac(e)?za.apply(null,arguments):e}function a1(e){return!!e.__k&&(wn(null,e),!0)}function l1(e){return e&&(e.base||e.nodeType===1&&e)||null}var c1=function(e,t){return e(t)},fo={useState:R,useReducer:Wa,useEffect:J,useLayoutEffect:qa,useRef:_e,useImperativeHandle:vu,useMemo:be,useCallback:Re,useContext:Nn,useDebugValue:wu,version:"16.8.0",Children:Gp,render:Qp,hydrate:e1,unmountComponentAtNode:a1,createPortal:Jp,createElement:f,createContext:Tn,createFactory:o1,cloneElement:s1,createRef:tu,Fragment:te,isValidElement:Ac,findDOMNode:l1,Component:ct,PureComponent:uo,memo:wc,forwardRef:Up,unstable_batchedUpdates:c1,StrictMode:te,Suspense:zr,SuspenseList:Gn,lazy:Wp,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:i1};class kc 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 u1=["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"],d1=["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"],h1=["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"],p1=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],m1=["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"],ia=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],g1=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],_1=e=>ge.generators.find(t=>t.id===e.replace(/^\$/,"")),v1=new D.DataModel(D.MapNode(D.StringNode(),D.StringNode()),{historyMax:0});function w1({model:e,lang:t,version:n,blockStates:r}){var l;const i=new D.ModelPath(e),[o,s,a]=e.schema.hook(Ec,i,li(e.data),t,n,r,{});return(l=s==null?void 0:s.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"},o,s),f("div",{class:"node-body"},a)):a}const Ec={base(){return[null,null,null]},boolean(e,t,n,r,i,o,s){return[null,f(y1,K({},Ae(K({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]},choice({choices:e,config:t,switchNode:n},r,i,o,s,a,l){const u=n.activeCase(r,!0),c=t!=null&&t.context?new D.ModelPath(r.getModel(),new D.Path(r.getArray(),[t.context])):r,[h,p,d]=u.node.hook(this,c,i,o,s,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},Xr(o,v.contextPush(g.type)))));return[h,f(te,null,m,p),d]},list({children:e,config:t},n,r,i,o,s,a){const{expand:l,collapse:u,isToggled:c}=Ri(),[h,p]=R(50),d=n.getContext().join(".");if(m1.includes(d)){const y=f(te,null,[...Array(t.maxLength)].map((A,b)=>f(Yn,{lang:i,path:n.modelPush(b)})),f("div",{class:"fixed-list"})),w=f(te,null,[...Array(t.maxLength)].map((A,b)=>{var E;return e.hook(this,n.modelPush(b),(E=r==null?void 0:r[b])==null?void 0:E.node,i,o,s,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:Xt()},...r])},_=()=>{Array.isArray(r)||(r=[]);const y=D.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:y,id:Xt()}])},m=f("button",{class:"add tooltipped tip-se","aria-label":de(i,"add_top"),onClick:v},oe.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",E=c(w);if(k&&(E===!1||E===void 0&&r.length>20))return f("div",{class:"node node-header","data-category":e.category(b)},f(Yn,{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)},oe.chevron_right),f("label",null,Xr(i,b,`${A}`)),f(oa,{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(Pi,{key:w,path:b,schema:e,value:y,lang:i,version:o,states:s,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const F=[...n.get()];F.splice(A,0,{id:Xt(),node:li(y)}),n.model.set(n,F)}}],ctx:Ae(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)},oe.chevron_down),f("button",{class:"remove tooltipped tip-se","aria-label":de(i,"remove"),onClick:I},oe.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},oe.chevron_up),f("button",{class:"move tooltipped tip-se","aria-label":de(i,"move_down"),onClick:M,disabled:A===r.length-1},oe.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:_},oe.plus_circle)));return[null,m,g]},map({children:e,keys:t,config:n},r,i,o,s,a,l){var y,w,A,b,k;const{expand:u,collapse:c,isToggled:h}=Ri(),p=new D.ModelPath(v1,new D.Path([k1(r.toString())])),d=()=>{const E=p.get();r.model.set(r.push(E),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 E=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(E)).hook(this,r,i,o,s,a,l)}const m=f(te,null,_.hook(this,p,(k=p.get())!=null?k:"",o,s,a,l)[1],f("button",{class:"add tooltipped tip-se","aria-label":de(o,"add"),onClick:d},oe.plus_circle)),g=f(te,null,typeof i=="object"&&Object.entries(i).map(([E,I])=>{var se,fe,O,$;const C=r.modelPush(E),M=e.type(C)==="object",L=h(E);if(M&&(L===!1||L===void 0&&i.length>20))return f("div",{class:"node node-header","data-category":e.category(C)},f(Yn,{lang:o,path:C,nested:!0}),f("button",{class:"toggle tooltipped tip-se","aria-label":`${de(o,"expand")}
${de(o,"expand_all","Ctrl")}`,onClick:u(E)},oe.chevron_right),f("label",null,E),f(oa,{key:E,path:C,value:I,schema:e}));const F=v?D.StringNode(null,{enum:(fe=(se=v.properties)==null?void 0:se[E])!=null?fe:[]}):e;((O=v==null?void 0:v.properties)==null?void 0:O[E])&&typeof I=="string"&&!(($=v.properties)!=null&&$[E].includes(I))&&r.model.errors.add(C,"error.invalid_enum_option",I);const ne=()=>C.set(void 0);return f(Pi,{key:E,schema:F,path:C,value:I,lang:o,version:s,states:a,ctx:l,label:E},M&&f("button",{class:"toggle tooltipped tip-se","aria-label":`${de(o,"collapse")}
${de(o,"collapse_all","Ctrl")}`,onClick:c(E)},oe.chevron_down),f("button",{class:"remove tooltipped tip-se","aria-label":de(o,"remove"),onClick:ne},oe.trashcan))}));return[null,m,g]},number(e,t,n,r,i,o,s){return[null,f(b1,K({},Ae(K({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,o,s,a,l,u){var y;const{expand:c,collapse:h,isToggled:p}=Ri();if(i.getArray().length==0&&E1(t.context,o)){const{wrapper:w,fields:A}=S1(n(i),i,o);o=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(o===void 0){const w=()=>i.set(D.DataModel.wrapLists(e.default()));v=f("button",{class:"collapse closed tooltipped tip-se","aria-label":de(s,"expand"),onClick:w},oe.plus_circle)}else{const w=()=>i.set(void 0);v=f("button",{class:"collapse open tooltipped tip-se","aria-label":de(s,"remove"),onClick:w},oe.trashcan)}const _=i.getContext().join(".");if(g1.includes(_)||ia.includes(_)){const w=p(""),A=ia.includes(_)?w:!w;if(d=f(te,null,f("button",{class:"toggle tooltipped tip-se","aria-label":de(s,A?"collapse":"expand"),onClick:w?h(""):c("")},A?oe.chevron_down:oe.chevron_right)),!A)return[d,v,null]}const m=typeof o=="object"&&o!==null&&((y=e.default())==null?void 0:y.pools)?Ae(K({},u),{loot:o==null?void 0:o.type}):u,g=f(te,null,typeof o=="object"&&o!==null&&!(e.optional()&&o===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(d1.includes(k))return null;const[E,I,C]=A.hook(this,b,o[w],s,a,l,m),M=A.type(b)==="object"&&f1.includes(k),L=h1.includes(k);return M||L?(d=f(te,null,d,f(Yn,{lang:s,path:b}),f(Sc,{lang:s,path:b}),E),v=f(te,null,v,I),M?C:null):f(Pi,{key:w,schema:A,path:b,value:o[w],lang:s,version:a,states:l,ctx:m})}));return[d,v,g]},string(e,t,n,r,i,o,s){return[null,f(x1,K({},Ae(K({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]}};function oa({path:e,value:t}){var r,i,o,s,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=(o=t==null?void 0:t.name)==null?void 0:o.replace(/^minecraft:/,""))!=null?a:(s=t==null?void 0:t.type)==null?void 0:s.replace(/^minecraft:/,""))}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return f("label",null,l.replace(/^minecraft:/,""));return null}function Ri(){const[e,t]=R(new Map),[n,r]=R(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 y1({path:e,node:t,value:n,lang:r}){const i=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};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 b1({path:e,config:t,integer:n,value:r,lang:i}){var a;const o=l=>{const u=l.target.value,c=n?parseInt(u):parseFloat(u);e.model.set(e,c)},s=l=>{const u=l.target.value,c=parseInt(u.slice(1),16);e.model.set(e,c)};return f(te,null,f("input",{type:"text",value:r!=null?r:"",onBlur:o,onKeyDown:l=>{l.key==="Enter"&&o(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:s}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&f("button",{onClick:()=>Bl(e.model),class:"tooltipped tip-se","aria-label":de(i,"generate_new_seed")},oe.sync))}function x1({path:e,getValues:t,config:n,node:r,value:i,lang:o,version:s,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=!Vn(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(p1.includes(c))return f("textarea",{value:i!=null?i:"",onBlur:l});if(Vn(n)&&!n.additional||u1.includes(c)){let d=new D.Path([]);return Vn(n)&&typeof n.enum=="string"?d=d.contextPush(n.enum):h?d=d.contextPush(h):Vn(n)&&(d=e),f("select",{value:i!=null?i:"",onChange:l},r.optional()&&f("option",{value:""},de(o,"unset")),u.map(v=>f("option",{value:v},Xr(o,d.contextPush(v.replace(/^minecraft:/,""))))))}else if(!Vn(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=Xt(),v=h?_1(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=${s}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":de(o,"follow_reference")},oe.link_external))}}function A1({label:e,schema:t,path:n,value:r,lang:i,version:o,states:s,ctx:a,actions:l,children:u}){var A;const c=t.type(n),h=t.category(n),p=n.getContext().join("."),[d,v]=Eo(),_=b=>{b.preventDefault(),v()},m=Ae(K({},a),{depth:((A=a.depth)!=null?A:0)+1});delete m.index;const[g,y,w]=t.hook(Ec,n,r,i,o,s,m);return f("div",{class:`node ${c}-node`,"data-category":h},f("div",{class:"node-header",onContextMenu:_},f(Yn,{lang:i,path:n}),f(Sc,{lang:i,path:n}),u,g,f("label",null,e!=null?e:Xr(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 Pi=wc(A1,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&en(e.ctx,t.ctx)&&en(e.value,t.value));function Vn(e){return!!(e!=null&&e.enum)}function k1(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 Xr(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const o=r.slice(i).join("."),s=de(e,o,...n);if(o!==s)return s}return r[r.length-1]}function Yn({lang:e,path:t,nested:n}){var o;t.model instanceof kc&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(s=>s.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=de(e,r[0].error,...(o=r[0].params)!=null?o:[]);return Ic("node-error","issue_opened",i)}function Sc({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=de(e,n);return r===n?null:Ic("node-help","info",r)}const Ic=(e,t,n)=>{const[r,i]=Eo();return f("div",{class:`node-icon ${e}${r?" show":""}`,onClick:i},oe[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"&&rn(t==null?void 0:t.config)}function S1(e,t,n){const r=[],i=Wn(n,r),o={type:e.type,config:D.ObjectNode({decorators:D.ListNode(Wl),feature:ql},{context:"feature.decorated"})},s=D.ObjectNode(o,{context:"feature"}),a=new D.Path(["config","feature"]),l=new D.Path(["config","decorators"]),u=t.getModel(),c=new kc(s,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 Wn(u.data,p),p}return u.get(c.map(h))},(h,p,d)=>{if(h.startsWith(a)){const v=[];Wn(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,ho(_,p),d)}else if(typeof v=="number")if(h.modelArr.length===3&&p===void 0){const _=c.get(a),m=[];Wn(u.data,m),m.splice(v,1);const g=ho(_,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:o,wrapper:c}}function Wn(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!rn(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),Wn((r=e.config.feature)!=null?r:"",t))}function ho(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:ho(e,t)}}}function I1({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=ke();if(!t||!n||i==="none")return f(te,null);const[o]=Za(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(o)return f(te,null);const[,s]=R(0);return ci(t,()=>{s(a=>a+1)}),f("div",{class:"tree","data-cy":"tree"},f(w1,{model:t,lang:i,version:e,blockStates:n}))}var C1=Object.defineProperty,M1=Object.defineProperties,O1=Object.getOwnPropertyDescriptors,sa=Object.getOwnPropertySymbols,T1=Object.prototype.hasOwnProperty,L1=Object.prototype.propertyIsEnumerable,aa=(e,t,n)=>t in e?C1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cc=(e,t)=>{for(var n in t||(t={}))T1.call(t,n)&&aa(e,n,t[n]);if(sa)for(var n of sa(t))L1.call(t,n)&&aa(e,n,t[n]);return e};const la="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function Ir(e){return`[giscus] An error occurred. Error message: "${e}".`}function ca(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function N1(){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 R1(e){const[t,n]=R(""),r=function({repo:s,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:s,repoId:a,category:l,categoryId:u,description:ca("description")};switch(c){case"url":b.term=A;break;case"title":b.term=document.title;break;case"og:title":b.term=ca("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=Cc({},e),M1(i,O1({session:t}))));var i;const o=_e(null);return J(()=>{const s=location.href,a=new URL(s),l=localStorage.getItem("giscus-session"),u=a.searchParams.get("giscus")||"";if(u)return localStorage.setItem("giscus-session",JSON.stringify(u)),n(u),a.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,a.toString());if(l)try{n(JSON.parse(l||"")||"")}catch(c){n(""),localStorage.removeItem("giscus-session"),console.warn(`${Ir(c==null?void 0:c.message)} Session has been cleared.`)}},[]),J(N1,[]),J(()=>{const s=function(a,l=null){return function(u){if(u.origin!=="https://giscus.app")return;const{data:c}=u;if(typeof c!="object"||!c.giscus||(l&&c.giscus.resizeHeight&&(l.style.height=`${c.giscus.resizeHeight}px`),!c.giscus.error))return;const 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(`${Ir(h)} Session has been cleared.`);console.error(`${Ir(h)} No session is stored initially. ${la}`)}h.includes("Discussion not found")?console.warn(`[giscus] ${h}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${Ir(h)} ${la}`)}}(()=>n(""),o.current);return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[]),fo.createElement("div",{className:"giscus"},fo.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:o}))}function P1(e){const[t,n]=R(!1);return J(()=>n(!0),[]),t?fo.createElement(R1,Cc({},e)):null}function No({term:e}){const{actualTheme:t}=rc(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return f(P1,{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 Mc(){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 $n=Mc();function D1(e){$n=e}const $1=/[&<>"']/,B1=/[&<>"']/g,F1=/[<>"']|&(?!#?\w+;)/,z1=/[<>"']|&(?!#?\w+;)/g,j1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ua=e=>j1[e];function Le(e,t){if(t){if($1.test(e))return e.replace(B1,ua)}else if(F1.test(e))return e.replace(z1,ua);return e}const V1=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Oc(e){return e.replace(V1,(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 H1=/(^|[^\[])\^/g;function ve(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(H1,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const U1=/[^\w:]/g,G1=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function da(e,t,n){if(e){let r;try{r=decodeURIComponent(Oc(n)).replace(U1,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!G1.test(n)&&(n=Z1(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Cr={},Y1=/^[^:]+:\/*[^/]*$/,W1=/^([^:]+:)[\s\S]*$/,q1=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Z1(e,t){Cr[" "+e]||(Y1.test(e)?Cr[" "+e]=e+"/":Cr[" "+e]=jr(e,"/",!0)),e=Cr[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(W1,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(q1,"$1")+t:e+t}const Kr={exec:function(){}};function ft(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 fa(e,t){const n=e.replace(/\|/g,(o,s,a)=>{let l=!1,u=s;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r[r.length-1].trim()||r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function jr(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.substr(0,r-i)}function 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 Tc(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 ha(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function pa(e,t,n,r){const i=t.href,o=t.title?Le(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:o,text:Le(s)}}function X1(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(`
`)}class Ro{constructor(t){this.options=t||$n}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:jr(r,`
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=X1(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim():n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=jr(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,o,s,a,l,u,c,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?(s=2,d=c.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,d=c.slice(s),s+=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,s-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(/[^ ]/)>=s||!c.trim())d+=`
`+c.slice(s);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&&(o=i[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!i,checked:o,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 E=k.raw.split("");let I=0;for(const C of E)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:fa(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,o,s,a,l;for(o=0;o<i;o++)/^ *-+: *$/.test(r.align[o])?r.align[o]="right":/^ *:-+: *$/.test(r.align[o])?r.align[o]="center":/^ *:-+ *$/.test(r.align[o])?r.align[o]="left":r.align[o]=null;for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=fa(r.rows[o],r.header.length).map(u=>({text:u}));for(i=r.header.length,s=0;s<i;s++)r.header[s].tokens=[],this.lexer.inlineTokens(r.header[s].text,r.header[s].tokens);for(i=r.rows.length,s=0;s<i;s++)for(l=r.rows[s],a=0;a<l.length;a++)l[a].tokens=[],this.lexer.inlineTokens(l[a].text,l[a].tokens);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n){const r={type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r={type:"paragraph",raw:n[0],text:n[1].charAt(n[1].length-1)===`
`?n[1].slice(0,-1):n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}text(t){const n=this.rules.block.text.exec(t);if(n){const r={type:"text",raw:n[0],text:n[0],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text: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 s=jr(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=J1(n[2],"()");if(s>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],o=s[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),pa(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i||!i.href){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return pa(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(r===""||this.rules.inline.punctuation.exec(r))){const s=i[0].length-1;let a,l,u=s,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,n=n.slice(-1*t.length+s);(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])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(s,l)%2){const d=t.slice(1,s+i.index+l);return{type:"em",raw:t.slice(0,s+i.index+l+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}const p=t.slice(2,s+i.index+l-1);return{type:"strong",raw:t.slice(0,s+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),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(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,o;return r[2]==="@"?(i=Le(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=Le(r[1]),o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=Le(this.options.mangle?n(r[0]):r[0]),o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);i=Le(r[0]),r[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):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:Kr,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=ve(Y.def).replace("label",Y._label).replace("title",Y._title).getRegex();Y.bullet=/(?:[*+-]|\d{1,9}[.)])/;Y.listItemStart=ve(/^( *)(bull) */).replace("bull",Y.bullet).getRegex();Y.list=ve(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=ve(Y.html,"i").replace("comment",Y._comment).replace("tag",Y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Y.paragraph=ve(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=ve(Y.blockquote).replace("paragraph",Y.paragraph).getRegex();Y.normal=ft({},Y);Y.gfm=ft({},Y.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Y.gfm.table=ve(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=ve(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=ft({},Y.normal,{html:ve(`^ *(?: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:Kr,paragraph:ve(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:Kr,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:Kr,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};z._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";z.punctuation=ve(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex();z.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;z.escapedEmSt=/\\\*|\\_/g;z._comment=ve(Y._comment).replace("(?:-->|$)","-->").getRegex();z.emStrong.lDelim=ve(z.emStrong.lDelim).replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimAst=ve(z.emStrong.rDelimAst,"g").replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimUnd=ve(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=ve(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=ve(z.tag).replace("comment",z._comment).replace("attribute",z._attribute).getRegex();z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;z._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;z.link=ve(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex();z.reflink=ve(z.reflink).replace("label",z._label).replace("ref",Y._label).getRegex();z.nolink=ve(z.nolink).replace("ref",Y._label).getRegex();z.reflinkSearch=ve(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex();z.normal=ft({},z);z.pedantic=ft({},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:ve(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()});z.gfm=ft({},z.normal,{escape:ve(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=ve(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex();z.breaks=ft({},z.gfm,{br:ve(z.br).replace("{2,}","*").getRegex(),text:ve(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function K1(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 ma(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 Pt{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||$n,this.options.tokenizer=this.options.tokenizer||new Ro,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 Pt(n).lex(t)}static lexInline(t,n){return new Pt(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,i,o,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],s&&i.type==="paragraph"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),s=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,i,o,s=t,a,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+ha("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+ha("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,s,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,ma)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,ma))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const 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&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o,K1)){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 Po{constructor(t){this.options=t||$n}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(t,i);o!=null&&o!==t&&(r=!0,t=o)}return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="'+this.options.langPrefix+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",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
`+t+"</"+i+`>
`}listitem(t){return"<li>"+t+`</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+`</p>
`}table(t,n){return n&&(n="<tbody>"+n+"</tbody>"),`<table>
<thead>
`+t+`</thead>
`+n+`</table>
`}tablerow(t){return`<tr>
`+t+`</tr>
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?"<"+r+' align="'+n.align+'">':"<"+r+">")+t+"</"+r+`>
`}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,n,r){if(t=da(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=da(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 Lc{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 Nc{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 Dt{constructor(t){this.options=t||$n,this.options.renderer=this.options.renderer||new Po,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Lc,this.slugger=new Nc}static parse(t,n){return new Dt(n).parse(t)}static parseInline(t,n){return new Dt(n).parseInline(t)}parse(t,n=!0){let r="",i,o,s,a,l,u,c,h,p,d,v,_,m,g,y,w,A,b,k;const E=t.length;for(i=0;i<E;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,Oc(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,o=0;o<a;o++)c+=this.renderer.tablecell(this.parseInline(d.header[o].tokens),{header:!0,align:d.align[o]});for(h+=this.renderer.tablerow(c),p="",a=d.rows.length,o=0;o<a;o++){for(u=d.rows[o],c="",l=u.length,s=0;s<l;s++)c+=this.renderer.tablecell(this.parseInline(u[s].tokens),{header:!1,align:d.align[s]});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="",o=0;o<a;o++)y=d.items[o],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<E&&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,o,s;const a=t.length;for(i=0;i<a;i++){if(o=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(s=this.options.extensions.renderers[o.type].call({parser:this},o),s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){r+=s||"";continue}switch(o.type){case"escape":{r+=n.text(o.text);break}case"html":{r+=n.html(o.text);break}case"link":{r+=n.link(o.href,o.title,this.parseInline(o.tokens,n));break}case"image":{r+=n.image(o.href,o.title,o.text);break}case"strong":{r+=n.strong(this.parseInline(o.tokens,n));break}case"em":{r+=n.em(this.parseInline(o.tokens,n));break}case"codespan":{r+=n.codespan(o.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(o.tokens,n));break}case"text":{r+=n.text(o.text);break}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}function 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=ft({},ee.defaults,t||{}),Tc(t),n){const r=t.highlight;let i;try{i=Pt.lex(e,t)}catch(a){return n(a)}const o=function(a){let l;if(!a)try{t.walkTokens&&ee.walkTokens(i,t.walkTokens),l=Dt.parse(i,t)}catch(u){a=u}return t.highlight=r,a?n(a):n(null,l)};if(!r||r.length<3||(delete t.highlight,!i.length))return o();let s=0;ee.walkTokens(i,function(a){a.type==="code"&&(s++,setTimeout(()=>{r(a.text,a.lang,function(l,u){if(l)return o(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),s--,s===0&&o()})},0))}),s===0&&o();return}try{const r=Pt.lex(e,t);return t.walkTokens&&ee.walkTokens(r,t.walkTokens),Dt.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 ft(ee.defaults,e),D1(ee.defaults),ee};ee.getDefaults=Mc;ee.defaults=$n;ee.use=function(...e){const t=ft({},...e),n=ee.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const s=n.renderers?n.renderers[o.name]:null;s?n.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[o.level]?n[o.level].unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}o.childTokens&&(n.childTokens[o.name]=o.childTokens)})),i.renderer){const o=ee.defaults.renderer||new Po;for(const s in i.renderer){const a=o[s];o[s]=(...l)=>{let u=i.renderer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}t.renderer=o}if(i.tokenizer){const o=ee.defaults.tokenizer||new Ro;for(const s in i.tokenizer){const a=o[s];o[s]=(...l)=>{let u=i.tokenizer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}t.tokenizer=o}if(i.walkTokens){const o=ee.defaults.walkTokens;t.walkTokens=function(s){i.walkTokens.call(this,s),o&&o.call(this,s)}}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=ft({},ee.defaults,t||{}),Tc(t);try{const n=Pt.lexInline(e,t);return t.walkTokens&&ee.walkTokens(n,t.walkTokens),Dt.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=Dt;ee.parser=Dt.parse;ee.Renderer=Po;ee.TextRenderer=Lc;ee.Lexer=Pt;ee.lexer=Pt.lex;ee.Tokenizer=Ro;ee.Slugger=Nc;ee.parse=ee;Dt.parse;Pt.lex;function Q1({change:e,activeTags:t,toggleTag:n}){return f("div",{class:"changelog-entry"},f("div",{class:"changelog-version"},f(_a,K({},e.version)),f(_a,K({},e.group))),f("div",{class:"changelog-tags"},e.tags.map(r=>f(wr,{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 _a({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 wr({label:e,active:t,onClick:n}){const r=e==="breaking"?5:Fl(e)%360;return f("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n},e==="breaking"&&oe.alert,e)}function Rc({changes:e,defaultOrder:t}){const{locale:n}=ke(),[r,i]=R(""),[o,s]=R([]),a=p=>{o.includes(p)?s(o.filter(d=>d!==p)):s([...o,p])},l=be(()=>{const p=r.split(" ").map(d=>d.trim().toLowerCase()).filter(d=>d.length>0);return p.length===0&&o.length===0?e:e==null?void 0:e.filter(d=>{if(!o.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,o]),[u,c]=R(t==="desc"),h=be(()=>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(tn,{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)})),o.length>0&&f("div",{class:"changelog-tags"},o.map(p=>f(wr,{label:p,onClick:()=>s(o.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(Q1,{change:p,activeTags:o,toggleTag:a}))))}function em({version:e}){const{locale:t}=ke(),[n,r]=R("changelog"),[i,o]=R(void 0);J(()=>{Hl().then(a=>o(a.map(l=>Ae(K({},l),{tags:l.tags.filter(u=>u!==l.group.id)})))).catch(a=>console.error(a))},[]);const s=be(()=>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(Mt,{label:t("versions.released"),value:Pc(e)}),f(Mt,{label:t("versions.release_target"),value:e.release_target,link:e.id!==e.release_target?`/versions/?id=${e.release_target}`:void 0}),f(Mt,{label:t("versions.data_version"),value:e.data_version}),f(Mt,{label:t("versions.protocol_version"),value:e.protocol_version}),f(Mt,{label:t("versions.data_pack_format"),value:e.data_pack_version}),f(Mt,{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(Rc,{changes:s,defaultOrder:"asc"}),n==="discussion"&&f(No,{term:`version/${e.id}`}))))}function Pc(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function tm({version:e,link:t}){const{locale:n}=ke();return f("a",{class:"version-entry",href:t},f("span",{class:"version-id"},e.id),f(Mt,{label:n("versions.released"),value:Pc(e),compact:!0}),f(Mt,{label:n("versions.data_version"),value:e.data_version,optional:!0}),f(Mt,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}function nm({versions:e,link:t}){const{locale:n}=ke(),[r,i]=R(!0),[o,s]=R(""),a=be(()=>e.filter(l=>l.type==="snapshot"&&!r?!1:l.id.includes(o)),[e,r,o]);return f(te,null,f("div",{class:"versions-controls"},f(tn,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:o,onChange:s}),f(e0,{label:"Include snapshots",value:r,onChange:i})),f("div",{class:"version-list"},a.map(l=>f(tm,{version:l,link:t==null?void 0:t(l.id)})),a.length===0&&f("span",null,n("versions.no_results"))))}function Mt({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"},oe.link_external))}function rm({title:e,link:t,versions:n,tags:r,activeTags:i,toggleTag:o}){const s=a=>l=>{o&&o(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(wr,{label:a,onClick:s(a),active:i==null?void 0:i.includes(a)}))))}const va={system:"device_desktop",dark:"moon",light:"sun"};function im(){const{lang:e,locale:t,changeLanguage:n}=ke(),{theme:r,changeTheme:i}=rc(),{version:o}=Dn(),{title:s}=dt(),a=zl(yn());return f("header",null,f("div",{class:"title"},f(Ya,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},Dc.home),f("h1",null,s),a&&f(Ge,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},ge.generators.filter(l=>l.category===(a==null?void 0:a.category)&&Ye(o,l.minVersion)).map(l=>f(q,{label:t(l.id),active:l.id===a.id,onClick:()=>Ht(Rt(l.url))})))),f("nav",null,f("ul",null,f("li",{"data-cy":"language-switcher"},f(Ge,{icon:"globe",tooltip:t("language")},ge.languages.map(({code:l,name:u})=>f(q,{label:u,active:l===e,onClick:()=>n(l)})))),f("li",{"data-cy":"theme-switcher"},f(Ge,{icon:va[r],tooltip:t("theme")},Object.entries(va).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")},oe.mark_github)))))}const Dc={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:o,onEdit:s,onDelete:a,delayedPlay:l}){const{locale:u}=ke(),{version:c}=Dn(),[h,p]=R(!0),[d,v]=R(!1),[_,m]=R(!1),g=_e([]),y=`playsound minecraft:${n} master @s ~ ~ ~ ${o} ${i}`;J(()=>{var M,L,F;const C=t[n];m(((L=(M=C==null?void 0:C.sounds)==null?void 0:M.length)!=null?L:0)===0),g.current.forEach(ne=>ne.stop()),g.current=((F=C==null?void 0:C.sounds)!=null?F:[]).map(ne=>{const se=typeof ne=="string"?ne:ne.name,fe=u0(c,se),O=e({src:[fe],format:["ogg"],volume:o,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]),J(()=>{g.current.forEach(C=>C.rate(i))},[i]),J(()=>{g.current.forEach(C=>C.volume(o))},[o]);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())};J(()=>{l&&setTimeout(()=>w(),r*50)},[l]),J(()=>()=>A(),[]);const[b,k]=R(!1),E=_e(void 0),I=()=>{navigator.clipboard.writeText(y),k(!0),E.current!==void 0&&clearTimeout(E.current),E.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(tn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:C=>s({sound:C})}),f("label",{class:"delay-label"},u("sounds.delay"),": "),f(t0,{class:"btn btn-input delay",min:0,value:r,onChange:C=>s({delay:C})}),f("label",{class:"pitch-label"},u("sounds.pitch"),": "),f(Cs,{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=>s({pitch:C})}),f("label",{class:"volume-label"},u("sounds.volume"),": "),f(Cs,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":o.toFixed(2),style:`--x: ${o*100}%`,value:o,onChange:C=>s({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 et({title:e,desc:t,link:n,icon:r,children:i}){const o=f(te,null,f("div",{class:"tool-head"},r&&Dc[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},o):f("div",{class:"tool-card"},o)}const wa="/";function $c({entries:e,onSelect:t,indent:n}){const r=be(()=>{var u;const l={};for(const c of e){const h=c.indexOf(wa);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=be(()=>e.filter(l=>!l.includes(wa)),e),[o,s]=R(new Set),a=l=>{o.has(l)?o.delete(l):o.add(l),s(new Set(o))};return f("div",{class:"tree-view",style:`--indent: ${n!=null?n:0};`},r.map(([l,u])=>f("div",null,f(ya,{icon:o.has(l)?"chevron_right":"chevron_down",key:l,label:l,onClick:()=>a(l)}),!o.has(l)&&f($c,{entries:u,onSelect:c=>t(`${l}/${c}`),indent:(n!=null?n:0)+1}))),i.map(l=>f(ya,{icon:"file",key:l,label:l,onClick:()=>t(l)})))}function ya({icon:e,label:t,onClick:n}){return f("div",{class:"entry",onClick:n},oe[e],t)}function ba({category:e}){const{locale:t}=ke();return dt(t("title.generator_category",t(e))),f("main",null,f("div",{class:"category"},ge.generators.filter(n=>n.category===e).map(n=>f(et,{title:t(n.id),link:Rt(n.url)}))))}function sm({}){const{locale:e}=ke(),[t,n]=R(null);dt(e("title.changelog"));const[r,i]=R([]);return J(()=>{Hl().then(o=>i(o)).catch(o=>{console.error(o),n(o)})},[]),f("main",null,f(cr,{type:"text",id:"changelog"}),t&&f(_n,{error:t,onDismiss:()=>n(null)}),f("div",{class:"changelog"},f(Rc,{changes:r,defaultOrder:"desc"})))}function am({}){var Vo;const{locale:e}=ke(),{version:t,changeVersion:n,changeTargetVersion:r}=Dn(),{project:i,file:o,updateFile:s,openFile:a,closeFile:l}=tc(),[u,c]=R(null),[h,p]=Za();if(h)return h.message=`Something went wrong rendering the generator: ${h.message}`,f("main",null,f(_n,{error:h,onDismiss:p}));const d=zl(yn());if(!d)return f("main",null,f(_n,{error:`Cannot find generator "${yn()}"`}));const v=be(()=>ge.versions.filter(V=>Ye(V.id,d.minVersion,d.maxVersion)).map(V=>V.id).reverse(),[d.minVersion,d.maxVersion]);dt(e("title.generator",e(d.id)),v),Ye(t,d.minVersion)||c(`The minimum version for this generator is ${d.minVersion}`),Ye(t,void 0,d.maxVersion)||c(`This generator is not available in versions above ${d.maxVersion}`);const[_,m]=nr("preset"),[g,y]=nr(Wi),w=_e(!1);J(()=>{E&&_?$e(_).then(V=>{w.current=!0,E.reset(D.DataModel.wrapLists(V),!1),y(void 0)}):E&&g&&Ls(g).then(V=>A(E,V))},[_,g]);const A=(V,we)=>{if(we.version&&we.version!==t&&n(we.version,!1),we.type&&we.type!==d.id){const Fn=ge.generators.find(yr=>yr.id===we.type);Fn&&Ht(`${Rt(Fn.url)}?${Wi}=${we.id}`)}we.show_preview&&!st&&(gi(!0),ue(!1)),V.reset(D.DataModel.wrapLists(we.data),!1)},b=be(()=>Ne.getBackup(d.id),[d.id]),k=()=>{b!==void 0&&(E==null||E.reset(D.DataModel.wrapLists(b),!1))},[E,I]=R(null),[C,M]=R(null);J(()=>{c(null),I(null),g0(t).then(V=>M(V)),p0(t,d.id).then(async V=>{if(Ie.setGenerator(d.id),_){const we=await $e(_);V.reset(D.DataModel.wrapLists(we),!1)}else if(g){const we=await Ls(g);A(V,we)}I(V)}).catch(V=>{console.error(V),c(V)})},[t,d.id]);const[L,F]=R(!1);ci(E,()=>{w.current||(m(void 0,!0),y(void 0,!0)),w.current=!1,Ne.setBackup(d.id,D.DataModel.unwrapLists(E==null?void 0:E.data)),c(null),F(!0)},[d.id,m,y]);const[ne,se]=R(""),[fe,O]=Hn(),[$,G]=Hn(),T=()=>{if(ne!==(o==null?void 0:o.id)&&ne&&E&&C){const V=Fr(E,C);s(d.id,o==null?void 0:o.id,{id:ne,data:V})?O():(G(),o&&se(o==null?void 0:o.id))}else o&&se(o==null?void 0:o.id)},x=()=>{o&&s(d.id,o.id,{})};J(()=>{o&&se(o.id)},[o]),J(()=>{var V;E&&(se((V=o==null?void 0:o.id)!=null?V:""),o&&d.id===o.type&&E.reset(D.DataModel.wrapLists(o.data)),F(!1))},[o,E]);const S=()=>{Ie.generatorEvent("reset"),E==null||E.reset(D.DataModel.wrapLists(E.schema.default()),!0)},N=V=>{V.stopPropagation(),Ie.generatorEvent("undo","Menu"),E==null||E.undo()},j=V=>{V.stopPropagation(),Ie.generatorEvent("redo","Menu"),E==null||E.redo()},W=V=>{V.ctrlKey&&V.key==="z"?(Ie.generatorEvent("undo","Hotkey"),E==null||E.undo()):V.ctrlKey&&V.key==="y"&&(Ie.generatorEvent("redo","Hotkey"),E==null||E.redo())},ce=V=>{if(V.ctrlKey&&V.key==="s"&&(V.preventDefault(),E&&C&&o)){Ie.generatorEvent("save","Hotkey");const we=Fr(E,C);s(d.id,o==null?void 0:o.id,{id:o==null?void 0:o.id,data:we}),F(!1),O()}};J(()=>(document.addEventListener("keyup",W),document.addEventListener("keydown",ce),()=>{document.removeEventListener("keyup",W),document.removeEventListener("keydown",ce)}),[E,C,o]);const[ze,it]=R([]);J(()=>{m0(t).then(V=>{it(V.get(d.id).map(we=>we.slice(10)))}).catch(V=>{console.error(V),c(V)})},[t,d.id]);const je=V=>{Ie.generatorEvent("load-preset",V),y(void 0,!0),r(t,!0),m(V)},$e=async V=>{var we,Fn,yr;try{const Bt=await Gl(t,(we=d.path)!=null?we:d.id,V),wi=E==null?void 0:E.get(new D.Path(["generator","seed"]));return((Fn=Bt==null?void 0:Bt.generator)==null?void 0:Fn.seed)!==void 0&&wi!==void 0&&(Bt.generator.seed=wi,((yr=Bt.generator.biome_source)==null?void 0:yr.seed)!==void 0&&(Bt.generator.biome_source.seed=wi)),Bt}catch{c(`Cannot load preset ${V} in ${t}`),m(void 0,!0)}},Ve=V=>{y(void 0,!0),n(V)},[ht,We]=R(void 0),[At,Oe]=R(!1),[Qe,kt]=Hn({cooldown:3e3}),X=()=>{if(At){Oe(!1);return}if(_)We(`${location.origin}/${d.url}/?version=${t}&preset=${_}`),Oe(!0),Et();else if(E&&C){const V=Fr(E,C);en(V,E.schema.default())?(We(`${location.origin}/${d.url}/?version=${t}`),Oe(!0)):v0(d.id,t,V,st).then(we=>{We(we),Oe(!0)}).catch(we=>{we instanceof Error&&c(we)})}},Et=()=>{navigator.clipboard.writeText(ht!=null?ht:""),kt()};J(()=>{Qe||(We(void 0),Oe(!1))},[Qe]);const[he,ue]=R(window.innerWidth>820),[pt,qe]=R(0),[sn,an]=R(0),[B,H]=R(0),ie=()=>{Ie.generatorEvent("copy"),qe(pt+1)},pe=()=>{Ie.generatorEvent("download"),an(sn+1)},Te=()=>{Ie.generatorEvent("import"),ue(!0),H(B+1)},ot=()=>{Ie.generatorEvent("toggle-output",he?"hidden":"visible"),ue(!he),qe(0),an(0),H(0)},[Bn,mi]=Hn(),[st,gi]=R(!1),_i=Fp.includes(d.id)&&!(d.id==="worldgen/configured_feature"&&Ye(t,"1.18"));st&&!_i&&gi(!1);let vi=2;_i&&(vi+=1),he&&(vi+=2);const Zc=()=>{Ie.generatorEvent("toggle-preview",st?"hidden":"visible"),gi(!st),!st&&he&&ue(!1)};return f(te,null,f("main",{class:st?"has-preview":""},f(cr,{id:"data-pack-generator",type:"text"}),f("div",{class:"controls"},f("div",{class:`project-controls ${o&&"has-file"}`},f("div",{class:"btn-row"},f(Ge,{icon:"repo",label:i.name,relative:!1},f(q,{icon:"arrow_left",label:e("project.go_to"),onClick:()=>Ht("/project")}),o&&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(Ms,{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(tn,{class:"btn btn-input",placeholder:e("project.unsaved_file"),value:ne,onChange:se,onEnter:T,onBlur:T}),o&&f(q,{icon:"trashcan",tooltip:e("project.delete_file"),onClick:x})),L?f("div",{class:"status-icon"},oe.dot_fill):fe?f("div",{class:"status-icon active"},oe.check):$&&f("div",{class:"status-icon danger"},oe.x)),f("div",{class:"generator-controls"},f(q,{icon:"upload",label:e("import"),onClick:Te}),f(Ge,{icon:"archive",label:e("presets"),relative:!1},f(Ms,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:ze,onSelect:je})),f(Ge,{icon:"tag",label:t,tooltip:e("switch_version"),"data-cy":"version-switcher"},v.map(V=>f(q,{label:V,active:V===t,onClick:()=>Ve(V)}))),f(Ge,{icon:"kebab_horizontal",tooltip:e("more")},f(q,{icon:"history",label:e("reset"),onClick:S}),f(q,{icon:"arrow_left",label:e("undo"),onClick:N}),f(q,{icon:"arrow_right",label:e("redo"),onClick:j})))),u&&f(_n,{error:u,onDismiss:()=>c(null)}),f(I1,{model:E,version:t,blockStates:C,onError:c})),f("div",{class:"popup-actions",style:`--offset: -${8+vi*50}px;`},f("div",{class:`popup-action action-preview${_i?" shown":""} tooltipped tip-nw`,"aria-label":e(st?"hide_preview":"show_preview"),onClick:Zc},st?oe.x_circle:oe.play),f("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:X},oe.link),f("div",{class:`popup-action action-download${he?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:pe},oe.download),f("div",{class:`popup-action action-copy${he?" shown":""}${Bn?" active":""} tooltipped tip-nw`,"aria-label":e(Bn?"copied":"copy"),onClick:ie},Bn?oe.check:oe.clippy),f("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(he?"hide_output":"show_output"),onClick:ot},he?oe.chevron_right:oe.code)),f("div",{class:`popup-preview${st?" shown":""}`},f(zp,{model:E,version:t,id:d.id,shown:st,onError:c})),f("div",{class:`popup-source${he?" shown":""}`},f(Vp,{model:E,blockStates:C,doCopy:pt,doDownload:sn,doImport:B,name:(Vo=d.schema)!=null?Vo:"data",copySuccess:mi,onError:c})),f("div",{class:`popup-share${At?" shown":""}`},f(tn,{value:ht,readonly:!0}),f(q,{icon:Qe?"check":"clippy",onClick:Et,tooltip:e(Qe?"copied":"copy_share"),tooltipLoc:"nw",active:Qe,showTooltip:Qe})))}var Do={exports:{}};function $o(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)&&$o(n)}),e}Do.exports=$o;Do.exports.default=$o;var lm=Do.exports;class xa{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Bc(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function zt(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const cm="</span>",Aa=e=>!!e.kind,um=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class dm{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Bc(t)}openNode(t){if(!Aa(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=um(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Aa(t)||(this.buffer+=cm)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class Bo{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=>{Bo._collapse(n)})))}}class fm extends Bo{constructor(t){super(),this.options=t}addKeyword(t,n){t!==""&&(this.openNode(n),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,n){const r=t.root;r.kind=n,r.sublanguage=!0,this.add(r)}toHTML(){return new dm(this,this.options).value()}finalize(){return!0}}function sr(e){return e?typeof e=="string"?e:e.source:null}function Fc(e){return on("(?=",e,")")}function hm(e){return on("(?:",e,")*")}function pm(e){return on("(?:",e,")?")}function on(...e){return e.map(n=>sr(n)).join("")}function mm(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Fo(...e){const t=mm(e);return"("+(t.capture?"":"?:")+e.map(r=>sr(r)).join("|")+")"}function zc(e){return new RegExp(e.toString()+"|").exec("").length-1}function gm(e,t){const n=e&&e.exec(t);return n&&n.index===0}const _m=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function zo(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=sr(r),s="";for(;o.length>0;){const a=_m.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+i):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const vm=/\b\B/,jc="[a-zA-Z]\\w*",jo="[a-zA-Z_]\\w*",Vc="\\b\\d+(\\.\\d+)?",Hc="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Uc="\\b(0b[01]+)",wm="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ym=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=on(t,/.*\b/,e.binary,/\b.*/)),zt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ar={begin:"\\\\[\\s\\S]",relevance:0},bm={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ar]},xm={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ar]},Am={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/},pi=function(e,t,n={}){const r=zt({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Fo("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:on(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},km=pi("//","$"),Em=pi("/\\*","\\*/"),Sm=pi("#","$"),Im={scope:"number",begin:Vc,relevance:0},Cm={scope:"number",begin:Hc,relevance:0},Mm={scope:"number",begin:Uc,relevance:0},Om={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[ar,{begin:/\[/,end:/\]/,relevance:0,contains:[ar]}]}]},Tm={scope:"title",begin:jc,relevance:0},Lm={scope:"title",begin:jo,relevance:0},Nm={begin:"\\.\\s*"+jo,relevance:0},Rm=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 Mr=Object.freeze({__proto__:null,MATCH_NOTHING_RE:vm,IDENT_RE:jc,UNDERSCORE_IDENT_RE:jo,NUMBER_RE:Vc,C_NUMBER_RE:Hc,BINARY_NUMBER_RE:Uc,RE_STARTERS_RE:wm,SHEBANG:ym,BACKSLASH_ESCAPE:ar,APOS_STRING_MODE:bm,QUOTE_STRING_MODE:xm,PHRASAL_WORDS_MODE:Am,COMMENT:pi,C_LINE_COMMENT_MODE:km,C_BLOCK_COMMENT_MODE:Em,HASH_COMMENT_MODE:Sm,NUMBER_MODE:Im,C_NUMBER_MODE:Cm,BINARY_NUMBER_MODE:Mm,REGEXP_MODE:Om,TITLE_MODE:Tm,UNDERSCORE_TITLE_MODE:Lm,METHOD_GUARD:Nm,END_SAME_AS_BEGIN:Rm});function Pm(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Dm(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function $m(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Pm,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Bm(e,t){!Array.isArray(e.illegal)||(e.illegal=Fo(...e.illegal))}function Fm(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 zm(e,t){e.relevance===void 0&&(e.relevance=1)}const jm=(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=on(n.beforeMatch,Fc(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Vm=["of","and","for","in","not","or","if","then","parent","list","value"],Hm="keyword";function Gc(e,t,n=Hm){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(o){Object.assign(r,Gc(e[o],t,o))}),r;function i(o,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){const l=a.split("|");r[l[0]]=[o,Um(l[0],l[1])]})}}function Um(e,t){return t?Number(t):Gm(e)?0:1}function Gm(e){return Vm.includes(e.toLowerCase())}const ka={},Kt=e=>{console.error(e)},Ea=(e,...t)=>{console.log(`WARN: ${e}`,...t)},dn=(e,t)=>{ka[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ka[`${e}/${t}`]=!0)},Qr=new Error;function Yc(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let a=1;a<=t.length;a++)s[a+r]=i[a],o[a+r]=!0,r+=zc(t[a-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function Ym(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Kt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Qr;if(typeof e.beginScope!="object"||e.beginScope===null)throw Kt("beginScope must be object"),Qr;Yc(e,e.begin,{key:"beginScope"}),e.begin=zo(e.begin,{joinWith:""})}}function Wm(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Kt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Qr;if(typeof e.endScope!="object"||e.endScope===null)throw Kt("endScope must be object"),Qr;Yc(e,e.end,{key:"endScope"}),e.end=zo(e.end,{joinWith:""})}}function qm(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Zm(e){qm(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Ym(e),Wm(e)}function Jm(e){function t(s,a){return new RegExp(sr(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=zc(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(zo(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(s){const a=new r;return s.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function o(s,a){const l=s;if(s.isCompiled)return l;[Dm,Fm,Zm,jm].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[$m,Bm,zm].forEach(c=>c(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=Gc(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=sr(l.end)||"",s.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return Xm(c==="self"?s:c)})),s.contains.forEach(function(c){o(c,l)}),s.starts&&o(s.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=zt(e.classNameAliases||{}),o(e)}function Wc(e){return e?e.endsWithParent||Wc(e.starts):!1}function Xm(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return zt(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Wc(e)?zt(e,{starts:e.starts?zt(e.starts):null}):Object.isFrozen(e)?zt(e):e}var Km="11.5.1";class Qm extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Di=Bc,Sa=zt,Ia=Symbol("nomatch"),eg=7,tg=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter: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||(Ea(o.replace("{}",G[1])),Ea("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):(dn("10.7.0","highlight(lang, code, ...args) has been deprecated."),dn("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 S={code:T,language:x};se("before:highlight",S);const N=S.result?S.result:h(S.language,S.code,G);return N.code=S.code,se("after:highlight",N),N}function h(O,$,G,T){const x=Object.create(null);function S(B,H){return B.keywords[H]}function N(){if(!X.keywords){he.addText(ue);return}let B=0;X.keywordPatternRe.lastIndex=0;let H=X.keywordPatternRe.exec(ue),ie="";for(;H;){ie+=ue.substring(B,H.index);const pe=Oe.case_insensitive?H[0].toLowerCase():H[0],Te=S(X,pe);if(Te){const[ot,Bn]=Te;if(he.addText(ie),ie="",x[pe]=(x[pe]||0)+1,x[pe]<=eg&&(pt+=Bn),ot.startsWith("_"))ie+=H[0];else{const mi=Oe.classNameAliases[ot]||ot;he.addKeyword(H[0],mi)}}else ie+=H[0];B=X.keywordPatternRe.lastIndex,H=X.keywordPatternRe.exec(ue)}ie+=ue.substr(B),he.addText(ie)}function j(){if(ue==="")return;let B=null;if(typeof X.subLanguage=="string"){if(!t[X.subLanguage]){he.addText(ue);return}B=h(X.subLanguage,ue,!0,Et[X.subLanguage]),Et[X.subLanguage]=B._top}else B=d(ue,X.subLanguage.length?X.subLanguage:null);X.relevance>0&&(pt+=B.relevance),he.addSublanguage(B._emitter,B.language)}function W(){X.subLanguage!=null?j():N(),ue=""}function ce(B,H){let ie=1;const pe=H.length-1;for(;ie<=pe;){if(!B._emit[ie]){ie++;continue}const Te=Oe.classNameAliases[B[ie]]||B[ie],ot=H[ie];Te?he.addKeyword(ot,Te):(ue=ot,N(),ue=""),ie++}}function ze(B,H){return B.scope&&typeof B.scope=="string"&&he.openNode(Oe.classNameAliases[B.scope]||B.scope),B.beginScope&&(B.beginScope._wrap?(he.addKeyword(ue,Oe.classNameAliases[B.beginScope._wrap]||B.beginScope._wrap),ue=""):B.beginScope._multi&&(ce(B.beginScope,H),ue="")),X=Object.create(B,{parent:{value:X}}),X}function it(B,H,ie){let pe=gm(B.endRe,ie);if(pe){if(B["on:end"]){const Te=new xa(B);B["on:end"](H,Te),Te.isMatchIgnored&&(pe=!1)}if(pe){for(;B.endsParent&&B.parent;)B=B.parent;return B}}if(B.endsWithParent)return it(B.parent,H,ie)}function je(B){return X.matcher.regexIndex===0?(ue+=B[0],1):(an=!0,0)}function $e(B){const H=B[0],ie=B.rule,pe=new xa(ie),Te=[ie.__beforeBegin,ie["on:begin"]];for(const ot of Te)if(!!ot&&(ot(B,pe),pe.isMatchIgnored))return je(H);return ie.skip?ue+=H:(ie.excludeBegin&&(ue+=H),W(),!ie.returnBegin&&!ie.excludeBegin&&(ue=H)),ze(ie,B),ie.returnBegin?0:H.length}function Ve(B){const H=B[0],ie=$.substr(B.index),pe=it(X,B,ie);if(!pe)return Ia;const Te=X;X.endScope&&X.endScope._wrap?(W(),he.addKeyword(H,X.endScope._wrap)):X.endScope&&X.endScope._multi?(W(),ce(X.endScope,B)):Te.skip?ue+=H:(Te.returnEnd||Te.excludeEnd||(ue+=H),W(),Te.excludeEnd&&(ue=H));do X.scope&&he.closeNode(),!X.skip&&!X.subLanguage&&(pt+=X.relevance),X=X.parent;while(X!==pe.parent);return pe.starts&&ze(pe.starts,B),Te.returnEnd?0:H.length}function ht(){const B=[];for(let H=X;H!==Oe;H=H.parent)H.scope&&B.unshift(H.scope);B.forEach(H=>he.openNode(H))}let We={};function At(B,H){const ie=H&&H[0];if(ue+=B,ie==null)return W(),0;if(We.type==="begin"&&H.type==="end"&&We.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=We.rule,pe}return 1}if(We=H,H.type==="begin")return $e(H);if(H.type==="illegal"&&!G){const pe=new Error('Illegal lexeme "'+ie+'" for mode "'+(X.scope||"<unnamed>")+'"');throw pe.mode=X,pe}else if(H.type==="end"){const pe=Ve(H);if(pe!==Ia)return pe}if(H.type==="illegal"&&ie==="")return 1;if(sn>1e5&&sn>H.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ue+=ie,ie.length}const Oe=C(O);if(!Oe)throw Kt(o.replace("{}",O)),new Error('Unknown language: "'+O+'"');const Qe=Jm(Oe);let kt="",X=T||Qe;const Et={},he=new a.__emitter(a);ht();let ue="",pt=0,qe=0,sn=0,an=!1;try{for(X.matcher.considerAll();;){sn++,an?an=!1:X.matcher.considerAll(),X.matcher.lastIndex=qe;const B=X.matcher.exec($);if(!B)break;const H=$.substring(qe,B.index),ie=At(H,B);qe=B.index+ie}return At($.substr(qe)),he.closeAllNodes(),he.finalize(),kt=he.toHTML(),{language:O,value:kt,relevance:pt,illegal:!1,_emitter:he,_top:X}}catch(B){if(B.message&&B.message.includes("Illegal"))return{language:O,value:Di($),illegal:!0,relevance:0,_illegalBy:{message:B.message,index:qe,context:$.slice(qe-100,qe+100),mode:B.mode,resultSoFar:kt},_emitter:he};if(i)return{language:O,value:Di($),illegal:!1,relevance:0,errorRaised:B,_emitter:he,_top:X};throw B}}function p(O){const $={value:Di(O),illegal:!1,relevance:0,_top:s,_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(L).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}),[S,N]=x,j=S;return j.secondBest=N,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(se("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 Qm("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}),se("after:highlightElement",{el:O,result:x,text:T})}function m(O){a=Sa(a,O)}const g=()=>{A(),dn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){A(),dn("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(Kt("Language definition for '{}' could not be registered.".replace("{}",O)),i)Kt(T);else throw T;G=s}G.name||(G.name=O),t[O]=G,G.rawDefinition=$.bind(null,e),G.aliases&&M(G.aliases,{languageName:O})}function E(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 L(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 se(O,$){const G=O;r.forEach(function(T){T[G]&&T[G]($)})}function fe(O){return dn("10.7.0","highlightBlock will be removed entirely in v12.0"),dn("10.7.0","Please use highlightElement now."),_(O)}Object.assign(e,{highlight:c,highlightAuto:d,highlightAll:A,highlightElement:_,highlightBlock:fe,configure:m,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:E,listLanguages:I,getLanguage:C,registerAliases:M,autoDetection:L,inherit:Sa,addPlugin:ne}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Km,e.regex={concat:on,lookahead:Fc,either:Fo,optional:pm,anyNumberOfTimes:hm};for(const O in Mr)typeof Mr[O]=="object"&&lm(Mr[O]);return Object.assign(e,Mr),e};var lr=tg({}),ng=lr;lr.HighlightJS=lr;lr.default=lr;var qc=ng;function rg(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 ig='<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>';qc.registerLanguage("json",rg);ee.use({highlight:(e,t)=>{if(t!=="")return qc.highlight(e,{language:t}).value}});function og({id:e}){const{locale:t}=ke(),{version:n,changeVersion:r}=Dn(),{changeTitle:i}=dt(),[o,s]=R(void 0),a=be(()=>{if(!o)return;const b=Yh(o);return i(b==null?void 0:b.title,b==null?void 0:b.versions),b},[o]),l=be(()=>{var k;const b=ge.versions.map(E=>E.id);return(k=a==null?void 0:a.versions)==null?void 0:k.sort((E,I)=>b.indexOf(I)-b.indexOf(E))},[a==null?void 0:a.versions]),u=be(()=>!l||l.includes(n)?n:l[0],[n,a==null?void 0:a.versions]),c=be(()=>{if(!o)return;const b=o.substring(o.indexOf("---",3)+3);return Wh(b,u)},[u,o]),h=be(()=>{if(!!c)return ee.use({renderer:{link(b,k,E){if(b===null)return E;const I=k?` title="${k}"`:"",C=b!=null&&b.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${b}"${I}${C}>${E}</a>`},heading(b,k,E,I){const C=I.slug(E),M=`<span id="guide-${C}" href="?version=${n}#${C}">${ig}</span>`;return`<h${k}>${M}${b}</h${k}>`}}}),ee(c,{version:"1.19"})},[c]),[p,d]=Xh(),v=Re(()=>{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]);J(()=>{v()},[h===void 0,p]);const _=Re(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]);J(()=>{(async()=>{const k=await(await fetch(`../../guides/${e}.md`)).text();s(k)})()},[e]);const[m,g]=Hn(),y=Re(()=>{const b=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(b),g()},[e,n]),w=b=>{Ht(`/guides/?tags=${b}`)},[A]=R(window.innerWidth>600);return f("main",null,f("div",{class:"guide"},f("div",{class:"navigation"},f("a",{class:"btn btn-link",href:"/guides/"},oe.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(Ge,{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(wr,{label:b,active:!0,onClick:()=>w(b)}))),h&&f(te,null,f(cr,{id:"guide",type:A?"image":"text"}),f("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:h},onClick:_}),f(No,null))))}const sg="tags",$i="|";function ag({}){const{locale:e}=ke(),{version:t,changeVersion:n}=Dn();dt(e("title.guides"));const[r,i]=R(""),[o,s]=nr(sg),a=be(()=>{var d;return(d=o==null?void 0:o.split($i))!=null?d:[]},[o]),l=d=>{a.includes(d)?s(a.filter(v=>v!==d).join($i)):s([...a,d].sort().join($i))},[u,c]=R(!1),h=be(()=>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=be(()=>{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,o]);return f("main",null,f("div",{class:"guides"},f("div",{class:"changelog-query"},f(tn,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:r,onChange:i}),f(Ge,{icon:"tag",label:u?t:e("any_version"),tooltip:e("switch_version")},f(q,{label:e("any_version"),active:!u,onClick:()=>c(!u)}),ge.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(wr,{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(rm,{title:d.title,link:`/guides/${d.id}/`,tags:(v=d.tags)!=null?v:[],versions:(_=d.versions)!=null?_:[],activeTags:a,toggleTag:l})})))}function lg({}){const{locale:e}=ke();return dt(e("title.home")),f("main",null,f("div",{class:"home"},f(et,{title:"Data packs"},ge.generators.filter(t=>!t.category).map(t=>f(et,{title:e(t.id),link:Rt(t.url)})),f(et,{title:e("worldgen"),link:"/worldgen/"})),f(et,{title:"Resource packs"},ge.generators.filter(t=>t.category==="assets").map(t=>f(et,{title:e(t.id),link:Rt(t.url)}))),f(et,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),f(et,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),f(et,{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(et,{title:"Technical Changelog",link:"/changelog/"}),f(et,{title:"Minecraft Versions",link:"/versions/"}),f(et,{title:"Data Pack Guides",link:"/guides/"}),f(No,null)))}function cg({}){const{locale:e}=ke(),{project:t,openFile:n}=tc();dt(e("title.project",t.name));const r=be(()=>t.files.map(E0),t.files),i=o=>{const[,s,a,...l]=o.split("/");n(a,`${s}:${l}`)};return f("main",null,f(cr,{id:"data-pack-project",type:"text"}),f("div",{class:"project"},f("h2",null,t.name),f("div",{class:"file-view"},f($c,{entries:r,onSelect:i}))))}function ug({}){const{locale:e}=ke(),{version:t,changeVersion:n}=Dn(),[r,i]=R(null);dt(e("title.sounds"));const[o,s]=R(void 0);J(()=>{(async()=>{const k=await ae(()=>import("./howler.53afbec5.js").then(function(E){return E.h}),[]);s(()=>E=>new k.Howl(E))})()},[]);const[a,l]=R({}),u=Object.keys(a!=null?a:{});J(()=>{c0(t).then(l).catch(k=>{console.error(k),i(k)})},[t]);const[c,h]=R(""),[p,d]=R([]),v=()=>{d([{id:Xt(),sound:c,delay:0,pitch:1,volume:1},...p])},_=k=>E=>{d(p.map(I=>I.id===k?K(K({},I),E):I))},m=k=>()=>{d(p.filter(E=>E.id!==k))},[g,y]=R(0),w=()=>{y(g+1)},A=_e(null),b=()=>{if(!A.current)return;const k=p.some(I=>I.delay>0),E=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,"+E+"%0A"),A.current.setAttribute("download","sounds.mcfunction"),A.current.click()};return f("main",null,r&&f(_n,{error:r,onDismiss:()=>i(null)}),u.length>0&&f(te,null,f("div",{class:"controls sounds-controls"},f("div",{class:"sound-search-group"},f(tn,{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(Ge,{icon:"tag",label:t,tooltip:e("switch_version")},ge.versions.slice().reverse().map(k=>f(q,{label:k.id,active:k.id===t,onClick:()=>n(k.id)})))),f("div",{class:"sounds"},o&&p.map(k=>f(om,Ae(K({key:k.id},k),{howler:o,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 dg({}){const{locale:e}=ke(),[t,n]=R(null);dt(e("title.versions"));const[r,i]=R([]);J(()=>{d0().then(u=>i(u)).catch(u=>{console.error(u),n(u)})},[]);const[o]=nr("id"),s=r.find(u=>u.id===o);dt(s?s.name:"Versions Explorer",s?[]:void 0);const a=s&&Ca(r,s,-1),l=s&&Ca(r,s,1);return f("main",null,f(cr,{type:"text",id:"versions"}),t&&f(_n,{error:t,onDismiss:()=>n(null)}),f("div",{class:"versions"},o?f(te,null,f("div",{class:"navigation"},f("a",{class:"btn btn-link",href:"/versions/"},oe.three_bars,e("versions.all")),f("a",K({class:"btn btn-link"},l?{href:`/versions/?id=${l.id}`}:{disabled:!0}),oe.arrow_left,e("versions.previous")),f("a",K({class:"btn btn-link"},a?{href:`/versions/?id=${a.id}`}:{disabled:!0}),e("versions.next"),oe.arrow_right)),s?f(em,{version:s}):f("div",{class:"version-detail"},f("h2",null,o),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(nm,{versions:r,link:u=>`/versions/?id=${u}`})))}function Ca(e,t,n){const i=e.findIndex(o=>o.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function fg(){return f(te,null,f(im,null),f(Lt,{onChange:t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>Ie.pageview(Rt(t.url)))}},f(lg,{path:"/"}),f(ba,{path:"/worldgen",category:"worldgen"}),f(ba,{path:"/assets",category:"assets"}),f(ug,{path:"/sounds"}),f(sm,{path:"/changelog"}),f(dg,{path:"/versions"}),f(cg,{path:"/project"}),f(ag,{path:"/guides/"}),f(og,{path:"/guides/:id"}),f(am,{default:!0})))}function hg(){return f(A0,null,f(S0,null,f(O0,null,f(C0,null,f(k0,null,f(fg,null))))))}wn(f(hg,null),document.body);export{xr as c,fc as e,D as l};
//# sourceMappingURL=index.e29e5ef6.js.map