mirror of
https://github.com/misode/misode.github.io.git
synced 2026-05-03 22:22:54 +00:00
131 lines
534 KiB
JavaScript
131 lines
534 KiB
JavaScript
var rf=Object.defineProperty,sf=Object.defineProperties;var of=Object.getOwnPropertyDescriptors;var ti=Object.getOwnPropertySymbols;var ea=Object.prototype.hasOwnProperty,ta=Object.prototype.propertyIsEnumerable;var Qo=(e,t,n)=>t in e?rf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ue=(e,t)=>{for(var n in t||(t={}))ea.call(t,n)&&Qo(e,n,t[n]);if(ti)for(var n of ti(t))ta.call(t,n)&&Qo(e,n,t[n]);return e},Re=(e,t)=>sf(e,of(t));var ss=e=>typeof e=="symbol"?e:e+"",na=(e,t)=>{var n={};for(var r in e)ea.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ti)for(var r of ti(e))t.indexOf(r)<0&&ta.call(e,r)&&(n[r]=e[r]);return n};const af=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}};af();var ie,br,tu,ra,nu,Ei={},ao=[],lf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function nn(e,t){for(var n in t)e[n]=t[n];return e}function ru(e){var t=e.parentNode;t&&t.removeChild(e)}function w(e,t,n){var r,i,s,o=arguments,a={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:a[s]=t[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(o[s]);if(n!=null&&(a.children=n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return Dr(e,a,r,i,null)}function Dr(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++ie.__v:i};return ie.vnode!=null&&ie.vnode(s),s}function uf(){return{current:null}}function pe(e){return e.children}function Nt(e,t){this.props=e,this.context=t}function Fr(e,t){if(t==null)return e.__?Fr(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"?Fr(e):null}function iu(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 iu(e)}}function Fs(e){(!e.__d&&(e.__d=!0)&&br.push(e)&&!Ai.__r++||ra!==ie.debounceRendering)&&((ra=ie.debounceRendering)||tu)(Ai)}function Ai(){for(var e;Ai.__r=br.length;)e=br.sort(function(t,n){return t.__v.__b-n.__v.__b}),br=[],e.some(function(t){var n,r,i,s,o,a;t.__d&&(o=(s=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=nn({},s)).__v=s.__v+1,lo(a,s,i,n.__n,a.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o==null?Fr(s):o,s.__h),lu(r,s),s.__e!=o&&iu(s)))})}function su(e,t,n,r,i,s,o,a,l,c){var h,g,d,m,x,u,f,p=r&&r.__k||ao,v=p.length;for(n.__k=[],h=0;h<t.length;h++)if((m=n.__k[h]=(m=t[h])==null||typeof m=="boolean"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?Dr(null,m,null,null,m):Array.isArray(m)?Dr(pe,{children:m},null,null,null):m.__b>0?Dr(m.type,m.props,m.key,null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(d=p[h])===null||d&&m.key==d.key&&m.type===d.type)p[h]=void 0;else for(g=0;g<v;g++){if((d=p[g])&&m.key==d.key&&m.type===d.type){p[g]=void 0;break}d=null}lo(e,m,d=d||Ei,i,s,o,a,l,c),x=m.__e,(g=m.ref)&&d.ref!=g&&(f||(f=[]),d.ref&&f.push(d.ref,null,m),f.push(g,m.__c||x,m)),x!=null?(u==null&&(u=x),typeof m.type=="function"&&m.__k!=null&&m.__k===d.__k?m.__d=l=ou(m,l,e):l=au(e,m,d,p,x,l),c||n.type!=="option"?typeof n.type=="function"&&(n.__d=l):e.value=""):l&&d.__e==l&&l.parentNode!=e&&(l=Fr(d))}for(n.__e=u,h=v;h--;)p[h]!=null&&(typeof n.type=="function"&&p[h].__e!=null&&p[h].__e==n.__d&&(n.__d=Fr(r,h+1)),cu(p[h],p[h]));if(f)for(h=0;h<f.length;h++)uu(f[h],f[++h],f[++h])}function ou(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"?ou(i,t,n):au(n,i,i,e.__k,i.__e,t));return t}function Ot(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){Ot(n,t)}):t.push(e)),t}function au(e,t,n,r,i,s){var o,a,l;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=s||i.parentNode==null)e:if(s==null||s.parentNode!==e)e.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,s),o=s}return o!==void 0?o:i.nextSibling}function cf(e,t,n,r,i){var s;for(s in n)s==="children"||s==="key"||s in t||bi(e,s,null,n[s],r);for(s in t)i&&typeof t[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||n[s]===t[s]||bi(e,s,t[s],n[s],r)}function ia(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||lf.test(t)?n:n+"px"}function bi(e,t,n,r,i){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ia(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ia(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r||e.addEventListener(t,s?oa:sa,s):e.removeEventListener(t,s?oa:sa,s);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function sa(e){this.l[e.type+!1](ie.event?ie.event(e):e)}function oa(e){this.l[e.type+!0](ie.event?ie.event(e):e)}function lo(e,t,n,r,i,s,o,a,l){var c,h,g,d,m,x,u,f,p,v,E,A=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=t.__e=n.__e,t.__h=null,s=[a]),(c=ie.__b)&&c(t);try{e:if(typeof A=="function"){if(f=t.props,p=(c=A.contextType)&&r[c.__c],v=c?p?p.props.value:c.__:r,n.__c?u=(h=t.__c=n.__c).__=h.__E:("prototype"in A&&A.prototype.render?t.__c=h=new A(f,v):(t.__c=h=new Nt(f,v),h.constructor=A,h.render=ff),p&&p.sub(h),h.props=f,h.state||(h.state={}),h.context=v,h.__n=r,g=h.__d=!0,h.__h=[]),h.__s==null&&(h.__s=h.state),A.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=nn({},h.__s)),nn(h.__s,A.getDerivedStateFromProps(f,h.__s))),d=h.props,m=h.state,g)A.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(A.getDerivedStateFromProps==null&&f!==d&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(f,v),!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(f,h.__s,v)===!1||t.__v===n.__v){h.props=f,h.state=h.__s,t.__v!==n.__v&&(h.__d=!1),h.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(D){D&&(D.__=t)}),h.__h.length&&o.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(f,h.__s,v),h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(d,m,x)})}h.context=v,h.props=f,h.state=h.__s,(c=ie.__r)&&c(t),h.__d=!1,h.__v=t,h.__P=e,c=h.render(h.props,h.state,h.context),h.state=h.__s,h.getChildContext!=null&&(r=nn(nn({},r),h.getChildContext())),g||h.getSnapshotBeforeUpdate==null||(x=h.getSnapshotBeforeUpdate(d,m)),E=c!=null&&c.type===pe&&c.key==null?c.props.children:c,su(e,Array.isArray(E)?E:[E],t,n,r,i,s,o,a,l),h.base=t.__e,t.__h=null,h.__h.length&&o.push(h),u&&(h.__E=h.__=null),h.__e=!1}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=hf(n.__e,t,n,r,i,s,o,l);(c=ie.diffed)&&c(t)}catch(D){t.__v=null,(l||s!=null)&&(t.__e=a,t.__h=!!l,s[s.indexOf(a)]=null),ie.__e(D,t,n)}}function lu(e,t){ie.__c&&ie.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){ie.__e(r,n.__v)}})}function hf(e,t,n,r,i,s,o,a){var l,c,h,g,d=n.props,m=t.props,x=t.type,u=0;if(x==="svg"&&(i=!0),s!=null){for(;u<s.length;u++)if((l=s[u])&&(l===e||(x?l.localName==x:l.nodeType==3))){e=l,s[u]=null;break}}if(e==null){if(x===null)return document.createTextNode(m);e=i?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,m.is&&m),s=null,a=!1}if(x===null)d===m||a&&e.data===m||(e.data=m);else{if(s=s&&ao.slice.call(e.childNodes),c=(d=n.props||Ei).dangerouslySetInnerHTML,h=m.dangerouslySetInnerHTML,!a){if(s!=null)for(d={},g=0;g<e.attributes.length;g++)d[e.attributes[g].name]=e.attributes[g].value;(h||c)&&(h&&(c&&h.__html==c.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(cf(e,m,d,i,a),h)t.__k=[];else if(u=t.props.children,su(e,Array.isArray(u)?u:[u],t,n,r,i&&x!=="foreignObject",s,o,e.firstChild,a),s!=null)for(u=s.length;u--;)s[u]!=null&&ru(s[u]);a||("value"in m&&(u=m.value)!==void 0&&(u!==e.value||x==="progress"&&!u)&&bi(e,"value",u,d.value,!1),"checked"in m&&(u=m.checked)!==void 0&&u!==e.checked&&bi(e,"checked",u,d.checked,!1))}return e}function uu(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ie.__e(r,n)}}function cu(e,t,n){var r,i,s;if(ie.unmount&&ie.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||uu(r,null,t)),n||typeof e.type=="function"||(n=(i=e.__e)!=null),e.__e=e.__d=void 0,(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ie.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&cu(r[s],t,n);i!=null&&ru(i)}function ff(e,t,n){return this.constructor(e,n)}function Wn(e,t,n){var r,i,s;ie.__&&ie.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],lo(t,e=(!r&&n||t).__k=w(pe,null,[e]),i||Ei,Ei,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?ao.slice.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r),lu(s,e)}function hu(e,t){Wn(e,t,hu)}function fu(e,t,n){var r,i,s,o=arguments,a=nn({},e.props);for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:a[s]=t[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(o[s]);return n!=null&&(a.children=n),Dr(e.type,a,r||e.key,i||e.ref,null)}function lr(e,t){var n={__c:t="__cC"+nu++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(Fs)},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),a&&a.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ie={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(s){e=s}throw e},__v:0},Nt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=nn({},this.state),typeof e=="function"&&(e=e(nn({},n),this.props)),e&&nn(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),Fs(this))},Nt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fs(this))},Nt.prototype.render=pe,br=[],tu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ai.__r=0,nu=0;var df={};function du(e,t){for(var n in t)e[n]=t[n];return e}function pu(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),s={},o;if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var c=a[l].split("=");s[decodeURIComponent(c[0])]=decodeURIComponent(c.slice(1).join("="))}e=Is(e.replace(r,"")),t=Is(t||"");for(var h=Math.max(e.length,t.length),g=0;g<h;g++)if(t[g]&&t[g].charAt(0)===":"){var d=t[g].replace(/(^:|[+*?]+$)/g,""),m=(t[g].match(/[+*?]+$/)||df)[0]||"",x=~m.indexOf("+"),u=~m.indexOf("*"),f=e[g]||"";if(!f&&!u&&(m.indexOf("?")<0||x)){o=!1;break}if(s[d]=decodeURIComponent(f),x||u){s[d]=e.slice(g).map(decodeURIComponent).join("/");break}}else if(t[g]!==e[g]){o=!1;break}return n.default!==!0&&o===!1?!1:s}function pf(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function mf(e,t){return e.index=t,e.rank=yf(e),e.props}function Is(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function gf(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function vf(e){return Is(e).map(gf).join("")}function yf(e){return e.props.default?0:vf(e.props.path)}var xt=null,bn=[],Bs=[],xf={};function wf(e,t){t===void 0&&(t="push"),xt&&xt[t]?xt[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function Kn(){var e;return xt&&xt.location?e=xt.location:xt&&xt.getCurrentLocation?e=xt.getCurrentLocation():e=typeof location!="undefined"?location:xf,""+(e.pathname||"")+(e.search||"")}function mn(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),_f(e)&&wf(e,t?"replace":"push"),mu(e)}function _f(e){for(var t=bn.length;t--;)if(bn[t].canRoute(e))return!0;return!1}function mu(e){for(var t=!1,n=0;n<bn.length;n++)bn[n].routeTo(e)===!0&&(t=!0);for(var r=Bs.length;r--;)Bs[r](e);return t}function gu(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 mn(t)}}function Ef(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return gu(e.currentTarget||e.target||this),vu(e)}function vu(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function Af(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(gu(t))return vu(e)}while(t=t.parentNode)}}var aa=!1;function bf(){aa||(typeof addEventListener=="function"&&(xt||addEventListener("popstate",function(){mu(Kn())}),addEventListener("click",Af)),aa=!0)}var rn=function(e){function t(n){e.call(this,n),n.history&&(xt=n.history),this.state={url:n.url||Kn()},bf()}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=Ot(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(){bn.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;xt&&(this.unlisten=xt.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),bn.splice(bn.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,s){return r.filter(mf).sort(pf).map(function(o){var a=pu(i,o.props.path,o.props);if(a){if(s!==!1){var l={url:i,matches:a};return du(l,a),delete l.ref,delete l.key,fu(o,l)}return o}}).filter(Boolean)},t.prototype.render=function(r,i){var s=r.children,o=r.onChange,a=i.url,l=this.getMatchingChildren(Ot(s),a,!0),c=l[0]||null,h=this.previousUrl;return a!==h&&(this.previousUrl=a,typeof o=="function"&&o({router:this,url:a,previous:h,active:l,current:c})),c},t}(Nt),yu=function(e){return w("a",du({onClick:Ef},e))},Df=function(e){return w(e.component,e)};rn.subscribers=Bs;rn.getCurrentUrl=Kn;rn.route=mn;rn.Router=rn;rn.Route=Df;rn.Link=yu;rn.exec=pu;var Ye;(e=>{const t="Site",n="Generator";function c(E,A,D){ga("send","event",E,A,D)}function h(E,A){ga("set",`dimension${E}`,A)}function g(E){ga("set","page",E),ga("send","pageview")}e.pageview=g;function d(E){h(4,E),c(t,"set-language",E)}e.setLanguage=d;function m(E){h(1,E),c(t,"set-theme",E)}e.setTheme=m;function x(E){h(3,E),c(n,"set-version",E)}e.setVersion=x;function u(E){h(5,E),c(n,"set-preview",E)}e.setPreview=u;function f(E){h(6,E)}e.setGenerator=f;function p(E){h(7,E)}e.setPrefersColorScheme=p;function v(E,A){c(n,E,A)}e.generatorEvent=v})(Ye||(Ye={}));var Mn,st,la,qn=0,Ts=[],ua=ie.__b,ca=ie.__r,ha=ie.diffed,fa=ie.__c,da=ie.unmount;function ur(e,t){ie.__h&&ie.__h(st,e,qn||t),qn=0;var n=st.__H||(st.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function J(e){return qn=1,xu(Eu,e)}function xu(e,t,n){var r=ur(Mn++,2);return r.t=e,r.__c||(r.__=[n?n(t):Eu(void 0,t),function(i){var s=r.t(r.__[0],i);r.__[0]!==s&&(r.__=[s,r.__[1]],r.__c.setState({}))}],r.__c=st),r.__}function ce(e,t){var n=ur(Mn++,3);!ie.__s&&uo(n.__H,t)&&(n.__=e,n.__H=t,st.__H.__h.push(n))}function wu(e,t){var n=ur(Mn++,4);!ie.__s&&uo(n.__H,t)&&(n.__=e,n.__H=t,st.__h.push(n))}function Te(e){return qn=5,$e(function(){return{current:e}},[])}function Cf(e,t,n){qn=6,wu(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function $e(e,t){var n=ur(Mn++,7);return uo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function tt(e,t){return qn=8,$e(function(){return e},t)}function cr(e){var t=st.context[e.__c],n=ur(Mn++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(st)),t.props.value):e.__}function Sf(e,t){ie.useDebugValue&&ie.useDebugValue(t?t(e):e)}function _u(e){var t=ur(Mn++,10),n=J();return t.__=e,st.componentDidCatch||(st.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function kf(){Ts.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(ui),e.__H.__h.forEach(Ms),e.__H.__h=[]}catch(t){e.__H.__h=[],ie.__e(t,e.__v)}}),Ts=[]}ie.__b=function(e){st=null,ua&&ua(e)},ie.__r=function(e){ca&&ca(e),Mn=0;var t=(st=e.__c).__H;t&&(t.__h.forEach(ui),t.__h.forEach(Ms),t.__h=[])},ie.diffed=function(e){ha&&ha(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(Ts.push(t)!==1&&la===ie.requestAnimationFrame||((la=ie.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(s),pa&&cancelAnimationFrame(r),setTimeout(n)},s=setTimeout(i,100);pa&&(r=requestAnimationFrame(i))})(kf)),st=void 0},ie.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ui),n.__h=n.__h.filter(function(r){return!r.__||Ms(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],ie.__e(r,n.__v)}}),fa&&fa(e,t)},ie.unmount=function(e){da&&da(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(ui)}catch(n){ie.__e(n,t.__v)}};var pa=typeof requestAnimationFrame=="function";function ui(e){var t=st;typeof e.__c=="function"&&e.__c(),st=t}function Ms(e){var t=st;e.__c=e.__(),st=t}function uo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Eu(e,t){return typeof t=="function"?t(e):t}function Vr({type:e,id:t}){return ce(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&ðicalads.load()},[]),w("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function ae({icon:e,label:t,active:n,class:r,tooltip:i,tooltipLoc:s,onClick:o}){return w("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${s!=null?s:"sw"}`:""}${n?" tip-shown":""}`,onClick:o,"aria-label":i},e&&ye[e],t&&w("span",null,t))}var yr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Au(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 W={},Wt={},Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.ModelPath=Jt.Path=Jt.relativePath=void 0;function Ff(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}Jt.relativePath=Ff;class Zt{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 Zt(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Zt(this.modelArr.slice(1),this.contextArr)}pop(){return new Zt(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Zt([...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 Zt([...this.modelArr],[...this.contextArr,n])}copy(){return new Zt([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Qt(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)}}Jt.Path=Zt;class Qt extends Zt{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 Qt(this.model,super.slice(t,n))}shift(){return new Qt(this.model,super.shift())}pop(){return new Qt(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Qt(this.model,super.modelPush(t))}contextPush(t){return new Qt(this.model,super.contextPush(t))}copy(){return new Qt(this.model,super.copy())}}Jt.ModelPath=Qt;var hr={};Object.defineProperty(hr,"__esModule",{value:!0});hr.Errors=void 0;class If{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}}hr.Errors=If;var Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.hexId=Gt.quoteString=Gt.escapeString=void 0;function bu(e){return e.replace(/(\\|")/g,"\\$1")}Gt.escapeString=bu;function Bf(e){return`"${bu(e)}"`}Gt.quoteString=Bf;const Tf=e=>("0"+e.toString(16)).substr(-2);function Mf(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Tf).join("")}Gt.hexId=Mf;Object.defineProperty(Wt,"__esModule",{value:!0});Wt.DataModel=void 0;const Nf=Jt,ma=hr,os=Gt;class co{constructor(t,n){var r,i,s,o;this.historyMax=(r=n==null?void 0:n.historyMax)!==null&&r!==void 0?r:50,this.verbose=(i=n==null?void 0:n.verbose)!==null&&i!==void 0?i:!1,this.wrapLists=(s=n==null?void 0:n.wrapLists)!==null&&s!==void 0?s:!1,this.schema=t;const a=(o=n==null?void 0:n.initialData)!==null&&o!==void 0?o:t.default();this.data=this.wrapLists?co.wrapLists(a):a,this.listeners=[],this.errors=new ma.Errors,this.history=[JSON.stringify(this.data)],this.historyIndex=0}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n>-1&&this.listeners.splice(n,1)}invalidate(){const t=JSON.stringify(this.data);this.history[this.historyIndex]!==t&&(this.historyIndex+=1,this.history.splice(this.historyIndex,this.historyMax,t),this.history.length>this.historyMax&&(this.history.splice(0,1),this.historyIndex-=1)),this.silentInvalidate()}silentInvalidate(){this.listeners.forEach(t=>{t.invalidated&&t.invalidated(this),t.errors&&t.errors(this.errors)})}reset(t,n){this.data=t,this.validate(n),this.invalidate()}get(t){let n=this.data;return t.forEach(r=>{if(n===void 0)return n;this.wrapLists&&typeof r=="number"?n=n[r].node:n=n[r]}),n}set(t,n,r){if(t.getArray().length===0){this.reset(n,!0);return}let i=this.data;t.pop().forEach(s=>{(i[s]===void 0||typeof i[s]=="string"||typeof i[s]=="number")&&(this.wrapLists&&typeof s=="number"?i[s]={node:{},id:(0,os.hexId)()}:i[s]={}),this.wrapLists&&typeof s=="number"?i=i[s].node:i=i[s]}),i!==null&&(n===void 0||typeof n=="number"&&isNaN(n)?typeof t.last()=="number"?i.splice(t.last(),1):delete i[t.last()]:this.wrapLists&&typeof t.last()=="number"?i[t.last()]={node:n,id:(0,os.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 Nf.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 ma.Errors;i.add(t,n,r),this.listeners.forEach(s=>{s.errors&&s.errors(i)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(r=>({node:this.wrapLists(r),id:(0,os.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}}Wt.DataModel=co;var un={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:s=>s,suggest:()=>[],validate:(s,o)=>o,validationOption:()=>{},hook(s,o,...a){return s.base({node:this},o,...a)},canUpdate:()=>!1,update:()=>[]};const t=(s,o)=>ue(ue({},s),typeof o=="function"?o(s):o);e.Mod=t;const n=(s,o)=>(0,e.Mod)(o,{enabled:a=>a.push(s).get()!==void 0});e.Has=n;function r(s){return Re(ue({},s),{optional:()=>!0})}e.Opt=r;function i(s){return Re(ue({},s),{keep:()=>!0})}e.Keep=i})(un);var Pi={};Object.defineProperty(Pi,"__esModule",{value:!0});Pi.BooleanNode=void 0;const Of=Wt,Lf=un,Rf=()=>Re(ue({},Lf.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?Of.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)}});Pi.BooleanNode=Rf;var Du={},Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.ListNode=void 0;const Pf=Wt,$f=un,zf=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,s=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,o=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return Re(ue({},$f.Base),{type:()=>"list",default:()=>t!=null&&t.minLength?[...Array(i)].map(a=>e.default()):[],navigate(a,l){const c=l+1;return a.getArray().length<=c?this:e.navigate(a,c)},pathPush(a,l){return a.push(parseInt(l.toString())).contextPush("entry")},validate(a,l,c,h){if(h.loose&&!Array.isArray(l)&&(l=h.wrapLists?Pf.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))o&&(l.length<i||l.length>s)?i===s?c.add(a,"error.invalid_list_range.exact",l.length,i):c.add(a,"error.invalid_list_range.between",l.length,i,s):l.length<i?c.add(a,"error.invalid_list_range.smaller",l.length,i):l.length>s&&c.add(a,"error.invalid_list_range.larger",l.length,s);else return c.add(a,"error.expected_list"),l;const g=l.map((d,m)=>{const x=e.validate(a.push(m),h.wrapLists?d.node:d,c,h);return h.wrapLists?{node:x,id:d.id}:x});for(const d of Object.getOwnPropertySymbols(l))g[d]=l[d];return g},hook(a,l,...c){var h;return((h=a.list)!==null&&h!==void 0?h:a.base).call(a,{node:this,children:e,config:t!=null?t:{}},l,...c)}})};Hr.ListNode=zf;var Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.SwitchNode=void 0;const Uf=un,jf=e=>Re(ue({},Uf.Base),{type(t){return this.activeCase(t,!0).node.type(t)},category(t){return this.activeCase(t,!0).node.category(t)},default:()=>e[0].node.default(),navigate(t,n){var r;const i=n+1;return(r=this.activeCase(t.slice(0,i)))===null||r===void 0?void 0:r.node.navigate(t,n)},pathPush(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.pathPush(t,n))!==null&&i!==void 0?i:t},suggest(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.suggest(t,n))!==null&&i!==void 0?i:e.filter(s=>s.match(t)).map(s=>s.node.suggest(t,n)).reduce((s,o)=>s.concat(o))},validate(t,n,r,i){let s=this.activeCase(t);return s===void 0?n:s.node.validate(t,n,r,i)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const r=(s,o)=>{var a,l;return((a=o.priority)!==null&&a!==void 0?a:0)-((l=s.priority)!==null&&l!==void 0?l:0)},i=e.filter(s=>s.match(t)).sort(r);return n&&i.length===0?e.sort(r)[0]:i.length>0?i[0]:void 0},hook(t,n,...r){return this.activeCase(n,!0).node.hook(t,n,...r)}});Xr.SwitchNode=jf;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=Hr,n=Xr,r=(o,a)=>{const l=(h,g)=>{if(h.match)return h.match(g);switch(h.type){case"list":return Array.isArray(g);case"object":return typeof g=="object"&&!Array.isArray(g);default:return typeof g===h.type}},c=(0,n.SwitchNode)(o.map(h=>({type:h.type,priority:h.priority,match:g=>l(h,g.get()),node:h.node})));return Re(ue({},c),{validate(h,g,d,m){let x=c.activeCase(h,!0);return x.node.optional()?g:x.node.validate(h,g,d,m)},hook(h,g,...d){var m;return((m=h.choice)!==null&&m!==void 0?m:h.base).call(h,{node:this,choices:o,config:a!=null?a:{},switchNode:c},g,...d)}})};e.ChoiceNode=r;const i=o=>(a,l)=>(0,e.ChoiceNode)([{type:o,node:a,change:c=>{var h;return(h=c[0])!==null&&h!==void 0?h:a.default()}},{type:"list",node:(0,t.ListNode)(a),change:c=>c?[c]:[]}],l);e.ObjectOrList=i("object"),e.StringOrList=i("string");const s=(o,a,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:o,change:c=>Object.keys(l)[0]},{type:"object",node:a,change:c=>{var h;return(h=l[c])!==null&&h!==void 0?h:l[Object.keys(l)[0]]}}]);e.ObjectOrPreset=s})(Du);var $i={};Object.defineProperty($i,"__esModule",{value:!0});$i.MapNode=void 0;const Vf=un,Hf=Wt,Xf=(e,t,n)=>Re(ue({},Vf.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const s=i+1;return r.getArray().length<=s?this:t.navigate(r,s)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,s,o){if(o.loose&&typeof i!="object"&&(i=o.wrapLists?Hf.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return s.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(l=>{e.validate(r,l,s,o),a[l]=t.validate(r.push(l),i[l],s,o)});for(const l of Object.getOwnPropertySymbols(i))a[l]=i[l];return a},validationOption(r){var i;return(i=n==null?void 0:n.validation)!==null&&i!==void 0?i:e.validationOption(r.push(""))},hook(r,i,...s){var o;return((o=r.map)!==null&&o!==void 0?o:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...s)}});$i.MapNode=Xf;var Cu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=W,n=Wt,r=un,i=o=>{var a,l,c;const h=o!=null&&o.color?!0:(a=o==null?void 0:o.integer)!==null&&a!==void 0?a:!1,g=o!=null&&o.color?0:(l=o==null?void 0:o.min)!==null&&l!==void 0?l:-1/0,d=o!=null&&o.color?16777215:(c=o==null?void 0:o.max)!==null&&c!==void 0?c:1/0,m=(o==null?void 0:o.min)!==void 0&&(o==null?void 0:o.max)!==void 0;return Re(ue({},r.Base),{type:()=>"number",default:()=>g>0?g:0,validate(x,u,f,p){return p.loose&&typeof u!="number"&&(u=p.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof u!="number"?f.add(x,"error.expected_number"):h&&!Number.isInteger(u)?f.add(x,"error.expected_integer"):m&&(u<g||u>d)?f.add(x,"error.invalid_number_range.between",u,g,d):u<g?f.add(x,"error.invalid_number_range.smaller",u,g):u>d&&f.add(x,"error.invalid_number_range.larger",u,d),u},hook(x,u,...f){var p;return((p=x.number)!==null&&p!==void 0?p:x.base).call(x,{node:this,integer:h,min:g,max:d,between:m,config:o!=null?o:{}},u,...f)}})};e.NumberNode=i;const s=({integer:o,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:o}),l=>({validate:(c,h,g,d)=>(h=l.validate(c,h,g,d),a.includes(h)||g.add(c,"error.invalid_number_enum",a.join(", ")),h)}));e.NumberEnum=s})(Cu);var Su={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=un,n=Jt,r=hr,i=Gt,s=Wt;e.Switch=Symbol("switch"),e.Case=Symbol("case");const o=(a,l)=>{var x,u;const f=a,{[x=e.Switch]:c,[u=e.Case]:h}=f,g=na(f,[ss(x),ss(u)]),d=p=>{if(c===void 0)return g;const v=(0,n.relativePath)(p,c).get(),E=h[v];return ue(ue({},g),E)},m=(p,v)=>{var E;const A=c?(0,n.relativePath)(p,c).get():void 0,D=c?(E=h[A])!==null&&E!==void 0?E:{}:{},C=Object.keys(D),k=l!=null&&l.context?new n.ModelPath(p.getModel(),new n.Path(p.getArray(),[l.context])):p;return(!(l!=null&&l.disableSwitchContext)&&A&&C.includes(v)?k.contextPush(A):k).push(v)};return Re(ue({},t.Base),{type:()=>"object",category:()=>l==null?void 0:l.category,default:()=>({}),keep(){return this.optional()},navigate(p,v){const E=v+1,A=p.getArray();if(A.length<=E)return this;const C=d(p.slice(0,E))[A[E]];return C==null?void 0:C.navigate(p,E)},pathPush(p,v){return m(p,v.toString())},suggest(p,v){const E=d(p),A=Object.keys(typeof v=="object"?v:{});return Object.keys(E).filter(D=>E[D].enabled(p)).filter(D=>!A.includes(D)).map(i.quoteString)},validate(p,v,E,A){if(A.loose&&typeof v!="object"&&(v=A.wrapLists?s.DataModel.wrapLists(this.default()):this.default()),typeof v!="object"||v===null)return E.add(p,"error.expected_object"),v;let D=g;if(c){const L=(0,n.relativePath)(p,c);let $=L.get();if(p.equals(L.pop())){const H=L.last();$=g[H].validate(p.push(H),v[H],new r.Errors,A)}D=ue(ue({},D),h[$])}const C=Object.keys(D),k=C.filter(L=>!D[L].optional()),I=new Set([...k,...Object.keys(v)]),M={};I.forEach(L=>{if(C.includes(L)){if(!D[L].enabled(p))return;const $=D[L].validate(p.push(L),v[L],E,A);!D[L].keep()&&D[L].optional()&&($===void 0||Array.isArray($)&&$.length===0||$.constructor===Object&&Object.keys($).length===0)?delete M[L]:(M[L]=$,p.getModel().set(p.push(L),$,!0))}else M[L]=v[L]});for(const L of Object.getOwnPropertySymbols(v))M[L]=v[L];return M},hook(p,v,...E){var A;return((A=p.object)!==null&&A!==void 0?A:p.base).call(p,{node:this,fields:g,config:l!=null?l:{},filter:c,cases:h,getActiveFields:d,getChildModelPath:m},v,...E)}})};e.ObjectNode=o})(Su);var zi={};Object.defineProperty(zi,"__esModule",{value:!0});zi.Reference=void 0;const Jf=(e,t)=>({type(n){return e.get(t).type.bind(this)(n)},category(n){return e.get(t).category.bind(this)(n)},default(){return e.get(t).default.bind(this)()},transform(n,r){return e.get(t).transform(n,r)},enabled(n){return e.get(t).enabled.bind(this)(n)},keep(){return e.get(t).keep.bind(this)()},optional(){return e.get(t).optional.bind(this)()},navigate(n,r){return e.get(t).navigate.bind(this)(n,r)},pathPush(n,r){return e.get(t).pathPush.bind(this)(n,r)},suggest(n,r){return e.get(t).suggest.bind(this)(n,r)},validate(n,r,i,s){return e.get(t).validate.bind(this)(n,r,i,s)},validationOption(n){return e.get(t).validationOption.bind(this)(n)},hook(n,r,...i){return e.get(t).hook.bind(this)(n,r,...i)},activeCase(n,r){return e.get(t).activeCase.bind(this)(n,r)},canUpdate(n,r){return e.get(t).canUpdate.bind(this)(n,r)},update(n,r){return e.get(t).update.bind(this)(n,r)}});zi.Reference=Jf;var Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.StringNode=void 0;const Gf=un,Yf=Gt,Wf=Wt,va=e=>!!(e!=null&&e.enum),ya=e=>!!(e!=null&&e.validator),Kf=(e,t)=>{const n=()=>{var r,i,s,o;if(va(t))return typeof t.enum=="string"?(r=e==null?void 0:e.get(t.enum))!==null&&r!==void 0?r:[]:t.enum;if((t==null?void 0:t.validator)==="resource"){if(typeof t.params.pool=="string"){if(t.params.requireTag)return(i=e==null?void 0:e.get(`tag/${t.params.pool}`).map(l=>`#${l}`))!==null&&i!==void 0?i:[];const a=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag?(s=e==null?void 0:e.get(`tag/${a}`).map(l=>`#${l}`))!==null&&s!==void 0?s:[]:[],...(o=e==null?void 0:e.get(a))!==null&&o!==void 0?o:[]]}return t.params.pool}return[]};return Re(ue({},Gf.Base),{type:()=>"string",default:()=>"",validate(r,i,s,o){if(o.loose&&typeof i!="string"&&(i=(o.wrapLists?Wf.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return s.add(r,"error.expected_string"),i;if(ya(t)){if(t.validator==="resource"&&i.length>0&&!i.includes(":")&&(i=i.startsWith("#")?"#minecraft:"+i.slice(1):"minecraft:"+i),t.validator==="resource"&&typeof i=="string"){let l=i;if(i.startsWith("#")){if(typeof t.params.pool=="string"&&t.params.pool.startsWith("$tag/"))return s.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return s.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return s.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return s.add(r,"error.invalid_resource_location"),i}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&i.startsWith("#")||t.params.isDefinition||t.params.allowUnknown))return i}if(va(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&s.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(Yf.quoteString),validationOption(){return ya(t)?t:void 0},hook(r,i,...s){var o;return((o=r.string)!==null&&o!==void 0?o:r.base).call(r,{node:this,getValues:n,config:t},i,...s)}})};Ui.StringNode=Kf;var ku={};Object.defineProperty(ku,"__esModule",{value:!0});var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.CollectionRegistry=Zn.SchemaRegistry=void 0;class qf{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}}Zn.SchemaRegistry=qf;class Zf{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:[]}}Zn.CollectionRegistry=Zf;var Fu={};Object.defineProperty(Fu,"__esModule",{value:!0});(function(e){var t=yr&&yr.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,a)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),n=yr&&yr.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wt,e),n(Jt,e),n(hr,e),n(un,e),n(Pi,e),n(Du,e),n(Hr,e),n($i,e),n(Cu,e),n(Su,e),n(zi,e),n(Ui,e),n(Xr,e),n(ku,e),n(Zn,e),n(Fu,e)})(W);var Xe={},Jr={},Bt={};function Iu(e){return typeof e=="undefined"||e===null}function Qf(e){return typeof e=="object"&&e!==null}function e0(e){return Array.isArray(e)?e:Iu(e)?[]:[e]}function t0(e,t){var n,r,i,s;if(t)for(s=Object.keys(t),n=0,r=s.length;n<r;n+=1)i=s[n],e[i]=t[i];return e}function n0(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function r0(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}Bt.isNothing=Iu;Bt.isObject=Qf;Bt.toArray=e0;Bt.repeat=n0;Bt.isNegativeZero=r0;Bt.extend=t0;function Ir(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||""}Ir.prototype=Object.create(Error.prototype);Ir.prototype.constructor=Ir;Ir.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var Gr=Ir,xa=Bt;function ho(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}ho.prototype.getSnippet=function(t,n){var r,i,s,o,a;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(s="",o=this.position;o<this.buffer.length&&`\0\r
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(o))===-1;)if(o+=1,o-this.position>n/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(i,o),xa.repeat(" ",t)+r+a+s+`
|
|
`+xa.repeat(" ",t+this.position-i+r.length)+"^"};ho.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 i0=ho,wa=Gr,s0=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o0=["scalar","sequence","mapping"];function a0(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function l0(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(s0.indexOf(n)===-1)throw new wa('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=a0(t.styleAliases||null),o0.indexOf(this.kind)===-1)throw new wa('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var nt=l0,_a=Bt,ci=Gr,u0=nt;function Ns(e,t,n){var r=[];return e.include.forEach(function(i){n=Ns(i,t,n)}),e[t].forEach(function(i){n.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&r.push(o)}),n.push(i)}),n.filter(function(i,s){return r.indexOf(s)===-1})}function c0(){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 Vn(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 ci("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Ns(this,"implicit",[]),this.compiledExplicit=Ns(this,"explicit",[]),this.compiledTypeMap=c0(this.compiledImplicit,this.compiledExplicit)}Vn.DEFAULT=null;Vn.create=function(){var t,n;switch(arguments.length){case 1:t=Vn.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new ci("Wrong number of arguments for Schema.create function")}if(t=_a.toArray(t),n=_a.toArray(n),!t.every(function(r){return r instanceof Vn}))throw new ci("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof u0}))throw new ci("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Vn({include:t,explicit:n})};var fr=Vn,h0=nt,f0=new h0("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),d0=nt,p0=new d0("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),m0=nt,g0=new m0("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),v0=fr,fo=new v0({explicit:[f0,p0,g0]}),y0=nt;function x0(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function w0(){return null}function _0(e){return e===null}var E0=new y0("tag:yaml.org,2002:null",{kind:"scalar",resolve:x0,construct:w0,predicate:_0,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),A0=nt;function b0(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 D0(e){return e==="true"||e==="True"||e==="TRUE"}function C0(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var S0=new A0("tag:yaml.org,2002:bool",{kind:"scalar",resolve:b0,construct:D0,predicate:C0,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),k0=Bt,F0=nt;function I0(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function B0(e){return 48<=e&&e<=55}function T0(e){return 48<=e&&e<=57}function M0(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(!I0(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!B0(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(!T0(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function N0(e){var t=e,n=1,r,i,s=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(o){s.unshift(parseInt(o,10))}),t=0,i=1,s.forEach(function(o){t+=o*i,i*=60}),n*t):n*parseInt(t,10)}function O0(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!k0.isNegativeZero(e)}var L0=new F0("tag:yaml.org,2002:int",{kind:"scalar",resolve:M0,construct:N0,predicate:O0,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"]}}),Bu=Bt,R0=nt,P0=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 $0(e){return!(e===null||!P0.test(e)||e[e.length-1]==="_")}function z0(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(s){i.unshift(parseFloat(s,10))}),t=0,r=1,i.forEach(function(s){t+=s*r,r*=60}),n*t):n*parseFloat(t,10)}var U0=/^[-+]?[0-9]+e/;function j0(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(Bu.isNegativeZero(e))return"-0.0";return n=e.toString(10),U0.test(n)?n.replace("e",".e"):n}function V0(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Bu.isNegativeZero(e))}var H0=new R0("tag:yaml.org,2002:float",{kind:"scalar",resolve:$0,construct:z0,predicate:V0,represent:j0,defaultStyle:"lowercase"}),X0=fr,Tu=new X0({include:[fo],implicit:[E0,S0,L0,H0]}),J0=fr,Mu=new J0({include:[Tu]}),G0=nt,Nu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ou=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 Y0(e){return e===null?!1:Nu.exec(e)!==null||Ou.exec(e)!==null}function W0(e){var t,n,r,i,s,o,a,l=0,c=null,h,g,d;if(t=Nu.exec(e),t===null&&(t=Ou.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(s=+t[4],o=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],g=+(t[11]||0),c=(h*60+g)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(n,r,i,s,o,a,l)),c&&d.setTime(d.getTime()-c),d}function K0(e){return e.toISOString()}var q0=new G0("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Y0,construct:W0,instanceOf:Date,represent:K0}),Z0=nt;function Q0(e){return e==="<<"||e===null}var ed=new Z0("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Q0}),An;try{var td=Au;An=td("buffer").Buffer}catch{}var nd=nt,po=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
\r`;function rd(e){if(e===null)return!1;var t,n,r=0,i=e.length,s=po;for(n=0;n<i;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function id(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,s=po,o=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):n===18?(a.push(o>>10&255),a.push(o>>2&255)):n===12&&a.push(o>>4&255),An?An.from?An.from(a):new An(a):a}function sd(e){var t="",n=0,r,i,s=e.length,o=po;for(r=0;r<s;r++)r%3===0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function od(e){return An&&An.isBuffer(e)}var ad=new nd("tag:yaml.org,2002:binary",{kind:"scalar",resolve:rd,construct:id,predicate:od,represent:sd}),ld=nt,ud=Object.prototype.hasOwnProperty,cd=Object.prototype.toString;function hd(e){if(e===null)return!0;var t=[],n,r,i,s,o,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],o=!1,cd.call(i)!=="[object Object]")return!1;for(s in i)if(ud.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function fd(e){return e!==null?e:[]}var dd=new ld("tag:yaml.org,2002:omap",{kind:"sequence",resolve:hd,construct:fd}),pd=nt,md=Object.prototype.toString;function gd(e){if(e===null)return!0;var t,n,r,i,s,o=e;for(s=new Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],md.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;s[t]=[i[0],r[i[0]]]}return!0}function vd(e){if(e===null)return[];var t,n,r,i,s,o=e;for(s=new Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),s[t]=[i[0],r[i[0]]];return s}var yd=new pd("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:gd,construct:vd}),xd=nt,wd=Object.prototype.hasOwnProperty;function _d(e){if(e===null)return!0;var t,n=e;for(t in n)if(wd.call(n,t)&&n[t]!==null)return!1;return!0}function Ed(e){return e!==null?e:{}}var Ad=new xd("tag:yaml.org,2002:set",{kind:"mapping",resolve:_d,construct:Ed}),bd=fr,Yr=new bd({include:[Mu],implicit:[q0,ed],explicit:[ad,dd,yd,Ad]}),Dd=nt;function Cd(){return!0}function Sd(){}function kd(){return""}function Fd(e){return typeof e=="undefined"}var Id=new Dd("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Cd,construct:Sd,predicate:Fd,represent:kd}),Bd=nt;function Td(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 Md(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 Nd(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function Od(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Ld=new Bd("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Td,construct:Md,predicate:Od,represent:Nd}),Di;try{var Rd=Au;Di=Rd("esprima")}catch{typeof window!="undefined"&&(Di=window.esprima)}var Pd=nt;function $d(e){if(e===null)return!1;try{var t="("+e+")",n=Di.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 zd(e){var t="("+e+")",n=Di.parse(t,{range:!0}),r=[],i;if(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(s){r.push(s.name)}),i=n.body[0].expression.body.range,n.body[0].expression.body.type==="BlockStatement"?new Function(r,t.slice(i[0]+1,i[1]-1)):new Function(r,"return "+t.slice(i[0],i[1]))}function Ud(e){return e.toString()}function jd(e){return Object.prototype.toString.call(e)==="[object Function]"}var Vd=new Pd("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:$d,construct:zd,predicate:jd,represent:Ud}),Ea=fr,ji=Ea.DEFAULT=new Ea({include:[Yr],explicit:[Id,Ld,Vd]}),tn=Bt,Lu=Gr,Hd=i0,Ru=Yr,Xd=ji,gn=Object.prototype.hasOwnProperty,Ci=1,Pu=2,$u=3,Si=4,as=1,Jd=2,Aa=3,Gd=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Yd=/[\x85\u2028\u2029]/,Wd=/[,\[\]\{\}]/,zu=/^(?:!|!!|![a-z\-]+!)$/i,Uu=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ba(e){return Object.prototype.toString.call(e)}function Yt(e){return e===10||e===13}function Dn(e){return e===9||e===32}function dt(e){return e===9||e===32||e===10||e===13}function Hn(e){return e===44||e===91||e===93||e===123||e===125}function Kd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function qd(e){return e===120?2:e===117?4:e===85?8:0}function Zd(e){return 48<=e&&e<=57?e-48:-1}function Da(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 Qd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ju=new Array(256),Vu=new Array(256);for(var Ln=0;Ln<256;Ln++)ju[Ln]=Da(Ln)?1:0,Vu[Ln]=Da(Ln);function ep(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Xd,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 Hu(e,t){return new Lu(t,new Hd(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function le(e,t){throw Hu(e,t)}function ki(e,t){e.onWarning&&e.onWarning.call(null,Hu(e,t))}var Ca={YAML:function(t,n,r){var i,s,o;t.version!==null&&le(t,"duplication of %YAML directive"),r.length!==1&&le(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&le(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&le(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&ki(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,s;r.length!==2&&le(t,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],zu.test(i)||le(t,"ill-formed tag handle (first argument) of the TAG directive"),gn.call(t.tagMap,i)&&le(t,'there is a previously declared suffix for "'+i+'" tag handle'),Uu.test(s)||le(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=s}};function dn(e,t,n,r){var i,s,o,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||le(e,"expected valid JSON character");else Gd.test(a)&&le(e,"the stream contains non-printable characters");e.result+=a}}function Sa(e,t,n,r){var i,s,o,a;for(tn.isObject(n)||le(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;o<a;o+=1)s=i[o],gn.call(t,s)||(t[s]=n[s],r[s]=!0)}function Xn(e,t,n,r,i,s,o,a){var l,c;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,c=i.length;l<c;l+=1)Array.isArray(i[l])&&le(e,"nested arrays are not supported inside keys"),typeof i=="object"&&ba(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&ba(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,c=s.length;l<c;l+=1)Sa(e,t,s[l],n);else Sa(e,t,s,n);else!e.json&&!gn.call(n,i)&&gn.call(t,i)&&(e.line=o||e.line,e.position=a||e.position,le(e,"duplicated mapping key")),t[i]=s,delete n[i];return t}function mo(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++):le(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function We(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Dn(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(Yt(i))for(mo(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&&ki(e,"deficient indentation"),r}function Vi(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||dt(n)))}function go(e,t){t===1?e.result+=" ":t>1&&(e.result+=tn.repeat(`
|
|
`,t-1))}function tp(e,t,n){var r,i,s,o,a,l,c,h,g=e.kind,d=e.result,m;if(m=e.input.charCodeAt(e.position),dt(m)||Hn(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=e.input.charCodeAt(e.position+1),dt(i)||n&&Hn(i)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),dt(i)||n&&Hn(i))break}else if(m===35){if(r=e.input.charCodeAt(e.position-1),dt(r))break}else{if(e.position===e.lineStart&&Vi(e)||n&&Hn(m))break;if(Yt(m))if(l=e.line,c=e.lineStart,h=e.lineIndent,We(e,!1,-1),e.lineIndent>=t){a=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}a&&(dn(e,s,o,!1),go(e,e.line-l),s=o=e.position,a=!1),Dn(m)||(o=e.position+1),m=e.input.charCodeAt(++e.position)}return dn(e,s,o,!1),e.result?!0:(e.kind=g,e.result=d,!1)}function np(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(dn(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 Yt(n)?(dn(e,r,i,!0),go(e,We(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Vi(e)?le(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);le(e,"unexpected end of the stream within a single quoted scalar")}function rp(e,t){var n,r,i,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return dn(e,n,e.position,!0),e.position++,!0;if(a===92){if(dn(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),Yt(a))We(e,!1,t);else if(a<256&&ju[a])e.result+=Vu[a],e.position++;else if((o=qd(a))>0){for(i=o,s=0;i>0;i--)a=e.input.charCodeAt(++e.position),(o=Kd(a))>=0?s=(s<<4)+o:le(e,"expected hexadecimal character");e.result+=Qd(s),e.position++}else le(e,"unknown escape sequence");n=r=e.position}else Yt(a)?(dn(e,n,r,!0),go(e,We(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Vi(e)?le(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}le(e,"unexpected end of the stream within a double quoted scalar")}function ip(e,t){var n=!0,r,i=e.tag,s,o=e.anchor,a,l,c,h,g,d={},m,x,u,f;if(f=e.input.charCodeAt(e.position),f===91)l=93,g=!1,s=[];else if(f===123)l=125,g=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),f=e.input.charCodeAt(++e.position);f!==0;){if(We(e,!0,t),f=e.input.charCodeAt(e.position),f===l)return e.position++,e.tag=i,e.anchor=o,e.kind=g?"mapping":"sequence",e.result=s,!0;n||le(e,"missed comma between flow collection entries"),x=m=u=null,c=h=!1,f===63&&(a=e.input.charCodeAt(e.position+1),dt(a)&&(c=h=!0,e.position++,We(e,!0,t))),r=e.line,Qn(e,t,Ci,!1,!0),x=e.tag,m=e.result,We(e,!0,t),f=e.input.charCodeAt(e.position),(h||e.line===r)&&f===58&&(c=!0,f=e.input.charCodeAt(++e.position),We(e,!0,t),Qn(e,t,Ci,!1,!0),u=e.result),g?Xn(e,s,d,x,m,u):c?s.push(Xn(e,null,d,x,m,u)):s.push(m),We(e,!0,t),f=e.input.charCodeAt(e.position),f===44?(n=!0,f=e.input.charCodeAt(++e.position)):n=!1}le(e,"unexpected end of the stream within a flow collection")}function sp(e,t){var n,r,i=as,s=!1,o=!1,a=t,l=0,c=!1,h,g;if(g=e.input.charCodeAt(e.position),g===124)r=!1;else if(g===62)r=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)as===i?i=g===43?Aa:Jd:le(e,"repeat of a chomping mode identifier");else if((h=Zd(g))>=0)h===0?le(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?le(e,"repeat of an indentation width identifier"):(a=t+h-1,o=!0);else break;if(Dn(g)){do g=e.input.charCodeAt(++e.position);while(Dn(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!Yt(g)&&g!==0)}for(;g!==0;){for(mo(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),Yt(g)){l++;continue}if(e.lineIndent<a){i===Aa?e.result+=tn.repeat(`
|
|
`,s?1+l:l):i===as&&s&&(e.result+=`
|
|
`);break}for(r?Dn(g)?(c=!0,e.result+=tn.repeat(`
|
|
`,s?1+l:l)):c?(c=!1,e.result+=tn.repeat(`
|
|
`,l+1)):l===0?s&&(e.result+=" "):e.result+=tn.repeat(`
|
|
`,l):e.result+=tn.repeat(`
|
|
`,s?1+l:l),s=!0,o=!0,l=0,n=e.position;!Yt(g)&&g!==0;)g=e.input.charCodeAt(++e.position);dn(e,n,e.position,!1)}return!0}function ka(e,t){var n,r=e.tag,i=e.anchor,s=[],o,a=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(o=e.input.charCodeAt(e.position+1),!dt(o)));){if(a=!0,e.position++,We(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,Qn(e,t,$u,!1,!0),s.push(e.result),We(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)le(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function op(e,t,n){var r,i,s,o,a=e.tag,l=e.anchor,c={},h={},g=null,d=null,m=null,x=!1,u=!1,f;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),f=e.input.charCodeAt(e.position);f!==0;){if(r=e.input.charCodeAt(e.position+1),s=e.line,o=e.position,(f===63||f===58)&&dt(r))f===63?(x&&(Xn(e,c,h,g,d,null),g=d=m=null),u=!0,x=!0,i=!0):x?(x=!1,i=!0):le(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,f=r;else if(Qn(e,n,Pu,!1,!0))if(e.line===s){for(f=e.input.charCodeAt(e.position);Dn(f);)f=e.input.charCodeAt(++e.position);if(f===58)f=e.input.charCodeAt(++e.position),dt(f)||le(e,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(Xn(e,c,h,g,d,null),g=d=m=null),u=!0,x=!1,i=!1,g=e.tag,d=e.result;else if(u)le(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=l,!0}else if(u)le(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=a,e.anchor=l,!0;else break;if((e.line===s||e.lineIndent>t)&&(Qn(e,t,Si,!0,i)&&(x?d=e.result:m=e.result),x||(Xn(e,c,h,g,d,m,s,o),g=d=m=null),We(e,!0,-1),f=e.input.charCodeAt(e.position)),e.lineIndent>t&&f!==0)le(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return x&&Xn(e,c,h,g,d,null),u&&(e.tag=a,e.anchor=l,e.kind="mapping",e.result=c),u}function ap(e){var t,n=!1,r=!1,i,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&le(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i="!!",o=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):le(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!dt(o);)o===33&&(r?le(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),zu.test(i)||le(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Wd.test(s)&&le(e,"tag suffix cannot contain flow indicator characters")}return s&&!Uu.test(s)&&le(e,"tag name cannot contain such characters: "+s),n?e.tag=s:gn.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:le(e,'undeclared tag handle "'+i+'"'),!0}function lp(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&le(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!dt(n)&&!Hn(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&le(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function up(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&&!dt(r)&&!Hn(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&le(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),gn.call(e.anchorMap,n)||le(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],We(e,!0,-1),!0}function Qn(e,t,n,r,i){var s,o,a,l=1,c=!1,h=!1,g,d,m,x,u;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=a=Si===n||$u===n,r&&We(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;ap(e)||lp(e);)We(e,!0,-1)?(c=!0,a=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=c||i),(l===1||Si===n)&&(Ci===n||Pu===n?x=t:x=t+1,u=e.position-e.lineStart,l===1?a&&(ka(e,u)||op(e,u,x))||ip(e,x)?h=!0:(o&&sp(e,x)||np(e,x)||rp(e,x)?h=!0:up(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&le(e,"alias node should not have any properties")):tp(e,x,Ci===n)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=a&&ka(e,u))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&le(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,d=e.implicitTypes.length;g<d;g+=1)if(m=e.implicitTypes[g],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else gn.call(e.typeMap[e.kind||"fallback"],e.tag)?(m=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&m.kind!==e.kind&&le(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result)?(e.result=m.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):le(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):le(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}function cp(e){var t=e.position,n,r,i,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(o=e.input.charCodeAt(e.position))!==0&&(We(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!dt(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&le(e,"directive name must not be less than one character in length");o!==0;){for(;Dn(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Yt(o));break}if(Yt(o))break;for(n=e.position;o!==0&&!dt(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&mo(e),gn.call(Ca,r)?Ca[r](e,r,i):ki(e,'unknown document directive "'+r+'"')}if(We(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,We(e,!0,-1)):s&&le(e,"directives end mark is expected"),Qn(e,e.lineIndent-1,Si,!1,!0),We(e,!0,-1),e.checkLineBreaks&&Yd.test(e.input.slice(t,e.position))&&ki(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Vi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,We(e,!0,-1));return}if(e.position<e.length-1)le(e,"end of the stream or a document separator is expected");else return}function Xu(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 ep(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,le(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;)cp(n);return n.documents}function Ju(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=Xu(e,n);if(typeof t!="function")return r;for(var i=0,s=r.length;i<s;i+=1)t(r[i])}function Gu(e,t){var n=Xu(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new Lu("expected a single document in the stream, but found more")}}function hp(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),Ju(e,t,tn.extend({schema:Ru},n))}function fp(e,t){return Gu(e,tn.extend({schema:Ru},t))}Jr.loadAll=Ju;Jr.load=Gu;Jr.safeLoadAll=hp;Jr.safeLoad=fp;var vo={},Wr=Bt,Kr=Gr,dp=ji,pp=Yr,Yu=Object.prototype.toString,Wu=Object.prototype.hasOwnProperty,mp=9,Br=10,gp=13,vp=32,yp=33,xp=34,Ku=35,wp=37,_p=38,Ep=39,Ap=42,qu=44,bp=45,Zu=58,Dp=61,Cp=62,Sp=63,kp=64,Qu=91,ec=93,Fp=96,tc=123,Ip=124,nc=125,ct={};ct[0]="\\0";ct[7]="\\a";ct[8]="\\b";ct[9]="\\t";ct[10]="\\n";ct[11]="\\v";ct[12]="\\f";ct[13]="\\r";ct[27]="\\e";ct[34]='\\"';ct[92]="\\\\";ct[133]="\\N";ct[160]="\\_";ct[8232]="\\L";ct[8233]="\\P";var Bp=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Tp(e,t){var n,r,i,s,o,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,s=r.length;i<s;i+=1)o=r[i],a=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Wu.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[o]=a;return n}function Fa(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Kr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Wr.repeat("0",r-t.length)+t}function Mp(e){this.schema=e.schema||dp,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Wr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Tp(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 Ia(e,t){for(var n=Wr.repeat(" ",t),r=0,i=-1,s="",o,a=e.length;r<a;)i=e.indexOf(`
|
|
`,r),i===-1?(o=e.slice(r),r=a):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
|
|
`&&(s+=n),s+=o;return s}function Os(e,t){return`
|
|
`+Wr.repeat(" ",e.indent*t)}function Np(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 yo(e){return e===vp||e===mp}function er(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 Op(e){return er(e)&&!yo(e)&&e!==65279&&e!==gp&&e!==Br}function Ba(e,t){return er(e)&&e!==65279&&e!==qu&&e!==Qu&&e!==ec&&e!==tc&&e!==nc&&e!==Zu&&(e!==Ku||t&&Op(t))}function Lp(e){return er(e)&&e!==65279&&!yo(e)&&e!==bp&&e!==Sp&&e!==Zu&&e!==qu&&e!==Qu&&e!==ec&&e!==tc&&e!==nc&&e!==Ku&&e!==_p&&e!==Ap&&e!==yp&&e!==Ip&&e!==Dp&&e!==Cp&&e!==Ep&&e!==xp&&e!==wp&&e!==kp&&e!==Fp}function rc(e){var t=/^\n* /;return t.test(e)}var ic=1,sc=2,oc=3,ac=4,hi=5;function Rp(e,t,n,r,i){var s,o,a,l=!1,c=!1,h=r!==-1,g=-1,d=Lp(e.charCodeAt(0))&&!yo(e.charCodeAt(e.length-1));if(t)for(s=0;s<e.length;s++){if(o=e.charCodeAt(s),!er(o))return hi;a=s>0?e.charCodeAt(s-1):null,d=d&&Ba(o,a)}else{for(s=0;s<e.length;s++){if(o=e.charCodeAt(s),o===Br)l=!0,h&&(c=c||s-g-1>r&&e[g+1]!==" ",g=s);else if(!er(o))return hi;a=s>0?e.charCodeAt(s-1):null,d=d&&Ba(o,a)}c=c||h&&s-g-1>r&&e[g+1]!==" "}return!l&&!c?d&&!i(e)?ic:sc:n>9&&rc(e)?hi:c?ac:oc}function Pp(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&Bp.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),o=r||e.flowLevel>-1&&n>=e.flowLevel;function a(l){return Np(e,l)}switch(Rp(t,o,e.indent,s,a)){case ic:return t;case sc:return"'"+t.replace(/'/g,"''")+"'";case oc:return"|"+Ta(t,e.indent)+Ma(Ia(t,i));case ac:return">"+Ta(t,e.indent)+Ma(Ia($p(t,s),i));case hi:return'"'+zp(t)+'"';default:throw new Kr("impossible error: invalid scalar style")}}()}function Ta(e,t){var n=rc(e)?String(t):"",r=e[e.length-1]===`
|
|
`,i=r&&(e[e.length-2]===`
|
|
`||e===`
|
|
`),s=i?"+":r?"":"-";return n+s+`
|
|
`}function Ma(e){return e[e.length-1]===`
|
|
`?e.slice(0,-1):e}function $p(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var c=e.indexOf(`
|
|
`);return c=c!==-1?c:e.length,n.lastIndex=c,Na(e.slice(0,c),t)}(),i=e[0]===`
|
|
`||e[0]===" ",s,o;o=n.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",r+=a+(!i&&!s&&l!==""?`
|
|
`:"")+Na(l,t),i=s}return r}function Na(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,s,o=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(s=o>i?o:a,l+=`
|
|
`+e.slice(i,s),i=s+1),o=a;return l+=`
|
|
`,e.length-i>t&&o>i?l+=e.slice(i,o)+`
|
|
`+e.slice(o+1):l+=e.slice(i),l.slice(1)}function zp(e){for(var t="",n,r,i,s=0;s<e.length;s++){if(n=e.charCodeAt(s),n>=55296&&n<=56319&&(r=e.charCodeAt(s+1),r>=56320&&r<=57343)){t+=Fa((n-55296)*1024+r-56320+65536),s++;continue}i=ct[n],t+=!i&&er(n)?e[s]:i||Fa(n)}return t}function Up(e,t,n){var r="",i=e.tag,s,o;for(s=0,o=n.length;s<o;s+=1)Fn(e,t,n[s],!1,!1)&&(s!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function jp(e,t,n,r){var i="",s=e.tag,o,a;for(o=0,a=n.length;o<a;o+=1)Fn(e,t+1,n[o],!0,!0)&&((!r||o!==0)&&(i+=Os(e,t)),e.dump&&Br===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function Vp(e,t,n){var r="",i=e.tag,s=Object.keys(n),o,a,l,c,h;for(o=0,a=s.length;o<a;o+=1)h="",o!==0&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[o],c=n[l],Fn(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Fn(e,t,c,!1,!1)&&(h+=e.dump,r+=h));e.tag=i,e.dump="{"+r+"}"}function Hp(e,t,n,r){var i="",s=e.tag,o=Object.keys(n),a,l,c,h,g,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Kr("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)d="",(!r||a!==0)&&(d+=Os(e,t)),c=o[a],h=n[c],Fn(e,t+1,c,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&Br===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,g&&(d+=Os(e,t)),Fn(e,t+1,h,!0,g)&&(e.dump&&Br===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,i+=d));e.tag=s,e.dump=i||"{}"}function Oa(e,t,n){var r,i,s,o,a,l;for(i=n?e.explicitTypes:e.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(e.tag=n?a.tag:"?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,Yu.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Wu.call(a.represent,l))r=a.represent[l](t,l);else throw new Kr("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function Fn(e,t,n,r,i,s){e.tag=null,e.dump=n,Oa(e,n,!1)||Oa(e,n,!0);var o=Yu.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=e.duplicates.indexOf(n),c=l!==-1),(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0)&&(i=!1),c&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(a&&c&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),o==="[object Object]")r&&Object.keys(e.dump).length!==0?(Hp(e,t,e.dump,i),c&&(e.dump="&ref_"+l+e.dump)):(Vp(e,t,e.dump),c&&(e.dump="&ref_"+l+" "+e.dump));else if(o==="[object Array]"){var h=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(jp(e,h,e.dump,i),c&&(e.dump="&ref_"+l+e.dump)):(Up(e,h,e.dump),c&&(e.dump="&ref_"+l+" "+e.dump))}else if(o==="[object String]")e.tag!=="?"&&Pp(e,e.dump,t,s);else{if(e.skipInvalid)return!1;throw new Kr("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Xp(e,t){var n=[],r=[],i,s;for(Ls(e,n,r),i=0,s=r.length;i<s;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(s)}function Ls(e,t,n){var r,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)Ls(e[i],t,n);else for(r=Object.keys(e),i=0,s=r.length;i<s;i+=1)Ls(e[r[i]],t,n)}function lc(e,t){t=t||{};var n=new Mp(t);return n.noRefs||Xp(e,n),Fn(n,0,e,!0,!0)?n.dump+`
|
|
`:""}function Jp(e,t){return lc(e,Wr.extend({schema:pp},t))}vo.dump=lc;vo.safeDump=Jp;var Hi=Jr,uc=vo;function Xi(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Xe.Type=nt;Xe.Schema=fr;Xe.FAILSAFE_SCHEMA=fo;Xe.JSON_SCHEMA=Tu;Xe.CORE_SCHEMA=Mu;Xe.DEFAULT_SAFE_SCHEMA=Yr;Xe.DEFAULT_FULL_SCHEMA=ji;Xe.load=Hi.load;Xe.loadAll=Hi.loadAll;Xe.safeLoad=Hi.safeLoad;Xe.safeLoadAll=Hi.safeLoadAll;Xe.dump=uc.dump;Xe.safeDump=uc.safeDump;Xe.YAMLException=Gr;Xe.MINIMAL_SCHEMA=fo;Xe.SAFE_SCHEMA=Yr;Xe.DEFAULT_SCHEMA=ji;Xe.scan=Xi("scan");Xe.parse=Xi("parse");Xe.compose=Xi("compose");Xe.addConstructor=Xi("addConstructor");var Gp=Xe,Rs=Gp,Yp=Wp;function Jn(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function Wp(e){if(e=e||{},e.circles)return Kp(e);return e.proto?r:n;function t(i,s){for(var o=Object.keys(i),a=new Array(o.length),l=0;l<o.length;l++){var c=o[l],h=i[c];typeof h!="object"||h===null?a[c]=h:h instanceof Date?a[c]=new Date(h):ArrayBuffer.isView(h)?a[c]=Jn(h):a[c]=s(h)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var s={};for(var o in i)if(Object.hasOwnProperty.call(i,o)!==!1){var a=i[o];typeof a!="object"||a===null?s[o]=a:a instanceof Date?s[o]=new Date(a):a instanceof Map?s[o]=new Map(t(Array.from(a),n)):a instanceof Set?s[o]=new Set(t(Array.from(a),n)):ArrayBuffer.isView(a)?s[o]=Jn(a):s[o]=n(a)}return s}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var s={};for(var o in i){var a=i[o];typeof a!="object"||a===null?s[o]=a:a instanceof Date?s[o]=new Date(a):a instanceof Map?s[o]=new Map(t(Array.from(a),r)):a instanceof Set?s[o]=new Set(t(Array.from(a),r)):ArrayBuffer.isView(a)?s[o]=Jn(a):s[o]=r(a)}return s}}function Kp(e){var t=[],n=[];return e.proto?s:i;function r(o,a){for(var l=Object.keys(o),c=new Array(l.length),h=0;h<l.length;h++){var g=l[h],d=o[g];if(typeof d!="object"||d===null)c[g]=d;else if(d instanceof Date)c[g]=new Date(d);else if(ArrayBuffer.isView(d))c[g]=Jn(d);else{var m=t.indexOf(d);m!==-1?c[g]=n[m]:c[g]=a(d)}}return c}function i(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return r(o,i);if(o instanceof Map)return new Map(r(Array.from(o),i));if(o instanceof Set)return new Set(r(Array.from(o),i));var a={};t.push(o),n.push(a);for(var l in o)if(Object.hasOwnProperty.call(o,l)!==!1){var c=o[l];if(typeof c!="object"||c===null)a[l]=c;else if(c instanceof Date)a[l]=new Date(c);else if(c instanceof Map)a[l]=new Map(r(Array.from(c),i));else if(c instanceof Set)a[l]=new Set(r(Array.from(c),i));else if(ArrayBuffer.isView(c))a[l]=Jn(c);else{var h=t.indexOf(c);h!==-1?a[l]=n[h]:a[l]=i(c)}}return t.pop(),n.pop(),a}function s(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return r(o,s);if(o instanceof Map)return new Map(r(Array.from(o),s));if(o instanceof Set)return new Set(r(Array.from(o),s));var a={};t.push(o),n.push(a);for(var l in o){var c=o[l];if(typeof c!="object"||c===null)a[l]=c;else if(c instanceof Date)a[l]=new Date(c);else if(c instanceof Map)a[l]=new Map(r(Array.from(c),s));else if(c instanceof Set)a[l]=new Set(r(Array.from(c),s));else if(ArrayBuffer.isView(c))a[l]=Jn(c);else{var h=t.indexOf(c);h!==-1?a[l]=n[h]:a[l]=s(c)}}return t.pop(),n.pop(),a}}var ke=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 Nn(e){return typeof e=="object"&&e!==null}const qp=e=>("0"+e.toString(16)).substr(-2);function Cn(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,qp).join("")}function sn(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function cc(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new W.Path(["dimensions"]));e.set(new W.Path(["seed"]),t,!0),Nn(n)&&Object.keys(n).forEach(r=>{e.set(new W.Path(["dimensions",r,"generator","seed"]),t,!0),e.set(new W.Path(["dimensions",r,"generator","biome_source","seed"]),t,!0)}),e.set(new W.Path(["placement","salt"]),Math.abs(t),!0),e.set(new W.Path(["generator","seed"]),t,!0),e.set(new W.Path(["generator","biome_source","seed"]),t)}function hc(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function on(e){return`/${e}/`.replaceAll("//","/")}function Zp(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),on(e)}function fc(e){const t=Zp(e).replace(/^\//,"").replace(/\/$/,"");return ke.generators.find(n=>n.url===t)}function dc({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?on(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);mn(i,r)}function Qp(e){const t=Rs.load(e.substring(3,e.indexOf("---",3)));return Nn(t)?t:{}}function em(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const s=tm(e,i+2),o=e.indexOf("#[",i+1);let a="";if(o>=0&&o<s){const l=e.indexOf("]",o+2);e.substring(o+2,l)===t&&(a=e.substring(l+1,s).trim())}else{const l=e.substring(i+2,s),c=ke.versions.find(h=>h.id===t);a=(r={version:c==null?void 0:c.id,pack_format:c==null?void 0:c.pack_format.toString()}[l])!=null?r:""}e=e.substring(0,i)+a+e.substring(s+2),n=i}return e}function tm(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),s=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(s<0){if(n===0)return i;n-=1,t=i+2}else if(s<i)n+=1,t=s+2;else{if(n===0)return i;n-=1,t=i+2}}return console.warn("Exceeded max iterations while finding closing bracket"),e.length}function pc(e){const t=Math.abs(hc(e));return[t%256,(t>>8)%256,(t>>16)%256]}function mr(e){return e*e}function wt(e,t,n){return Math.max(e,Math.min(t,n))}function ls(e,t,n){return n<0?e:n>1?t:fi(n,e,t)}function fi(e,t,n){return t+e*(n-t)}function nm(e,t,n,r,i,s){return fi(t,fi(e,n,r),fi(e,i,s))}function It(e){return e instanceof Error?e.message:`${e}`}const Ji=Yp();function In(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(!In(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!In(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}class rm{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 di({icon:e,label:t,large:n,larger:r,doSelect:i,value:s,placeholder:o,dataList:a,onChange:l}){const c=l===void 0?()=>{}:d=>{const m=d.target.value;l==null||l(m)},h=Te(null);ce(()=>{i&&h.current&&h.current.select()},[i]);const g=a&&Cn();return w("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:d=>d.stopPropagation()},e&&ye[e],t&&w("span",null,t),w("input",{ref:h,type:"text",value:s,onChange:c,placeholder:o,list:g}),a&&w("datalist",{id:g},a.map(d=>w("option",{value:d}))))}function xr({cooldown:e,invert:t,initial:n}={}){const[r,i]=J(n),s=Te(void 0);return[r,()=>{i(!t),s.current!==void 0&&clearTimeout(s.current),s.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}function qr({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},s){const o=Te(null),a=Te(),l=Te(),c=Te([0,0]),h=Te(!1);ce(()=>{if(!o.current)return;const m=p=>{a.current=[p.offsetX,p.offsetY]},x=p=>{if(a.current===void 0){if(!o.current)return;const A=p.offsetX/o.current.clientWidth,D=p.offsetY/o.current.clientHeight;r==null||r(A,D);return}if(!n)return;const v=p.offsetX-a.current[0],E=p.offsetY-a.current[1];if(!(v===0&&E===0)&&(c.current=[c.current[0]+v,c.current[1]+E],!h.current)){if(!l.current)return;cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!o.current)return;h.current=!0;const A=c.current[0]/o.current.clientWidth,D=c.current[1]/o.current.clientHeight;c.current=[0,0],await(n==null?void 0:n(A,D)),h.current=!1})}a.current=[p.offsetX,p.offsetY]},u=()=>{a.current=void 0},f=()=>{i==null||i()};return o.current.addEventListener("mousedown",m),o.current.addEventListener("mousemove",x),o.current.addEventListener("mouseleave",f),document.body.addEventListener("mouseup",u),()=>{var p,v,E;(p=o.current)==null||p.removeEventListener("mousedown",m),(v=o.current)==null||v.removeEventListener("mousemove",x),(E=o.current)==null||E.removeEventListener("mouseleave",f),document.body.removeEventListener("mouseup",u)}},[...s!=null?s:[],o.current]);const g=Te(),d=Te(0);return g.current=async()=>{if(!o.current)return;const m=o.current.getContext("2d"),x=e();o.current.width=x[0],o.current.height=x[1];const u=m.getImageData(0,0,x[0],x[1]),f=d.current+=1;try{await t(u)}catch(p){throw p}f===d.current&&m.putImageData(u,0,0)},{canvas:o,redraw:g.current}}function xo(){const[e,t]=J(!1),n=()=>{t(!1)};return ce(()=>(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 im(){const[e,t]=J(window.location.hash),n=tt(()=>{t(window.location.hash)},[]);ce(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=tt(i=>{i!==e&&dc({hash:i})},[e]);return[e,r]}function La(e){const[t,n]=J(matchMedia(e).matches),r=i=>{n(i.matches)};return ce(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function Gi(e,t,n){const r={invalidated(){e&&t(e)}};ce(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const Ra=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function Tr(e){const t=window.location,[n,r]=J(Ra(t.search,e));ce(()=>{const s=()=>{r(Ra(t.search,e))};return window.addEventListener("popstate",s),window.addEventListener("pushstate",s),window.addEventListener("replacestate",s),()=>{window.removeEventListener("popstate",s),window.removeEventListener("pushstate",s),window.removeEventListener("replacestate",s)}},[]);const i=tt((s,o)=>{if(s!==n){const a=new URLSearchParams(t.search);s===void 0||s.length===0?a.delete(e):a.set(e,s),dc({search:a.toString().replaceAll("%7C","|"),replace:o})}},[n]);return[n,i]}function pt(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:s,children:o}=e,[a,l]=xo();return w("div",ue({class:`btn-menu${r===!1?" no-relative":""}`},e),w(ae,{icon:t,label:n,tooltip:i,tooltipLoc:s,onClick:l}),a&&w("div",{class:"btn-group"},o))}const sm="modulepreload",Pa={},om="/",Ee=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${om}${r}`,r in Pa)return;Pa[r]=!0;const i=r.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":sm,i||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),i)return new Promise((a,l)=>{o.addEventListener("load",a),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},ye={alert:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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"}),w("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"}),w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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"}),w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},w("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 Gn({error:e,onDismiss:t}){const[n,r]=J(!1),[i,s]=J(void 0);ce(()=>{if(e instanceof Error){const a=e.stack.split(`
|
|
`).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));s(a.join(`
|
|
`)),Ee(()=>import("./sourcemapped-stacktrace.6e08f7d7.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(a.join(`
|
|
`),c=>{const h=c.map(g=>g.replace(/..\/..\/src\//,"src/")).join(`
|
|
`);s(h)})})}},[e]);const o=$e(()=>{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 w("div",{class:"error"},t&&w("div",{class:"error-dismiss",onClick:t},ye.x),w("h3",null,e instanceof Error?e.message:e,i&&w("span",{onClick:()=>r(!n)},ye.info)),i&&n&&w("pre",null,i),w("p",null,"If you think this is a bug, you can report it ",w("a",{href:o,target:"_blank"},"on GitHub")))}function am({label:e,value:t,onChange:n}){const r=Cn();return w("label",{class:"checkbox"},w("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function wo(e,t,n){const r=i=>{const s=i.onChange&&(a=>{var c;const l=a.target.value;(c=i.onChange)==null||c.call(i,n(l))}),o=i.onEnter&&(a=>{var l;if(a.key==="Enter"){const c=a.target.value;(l=i.onEnter)==null||l.call(i,n(c))}});return w("input",Re(ue({},i),{type:t,onChange:s,onKeyDown:o}))};return r.displayName=e,r}const Bn=wo("TextInput","text",e=>e),lm=wo("NumberInput","number",e=>Number(e)),$a=wo("RangeInput","range",e=>Number(e));function za({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,s]=J(""),o=$e(()=>{var l;const a=i.trim().split(" ");return(l=e==null?void 0:e.filter(c=>a.every(h=>c.includes(h))))!=null?l:[]},[e,i]);return w(pe,null,w(di,{icon:"search",large:!0,value:i,onChange:s,doSelect:1,placeholder:n!=null?n:"Search"}),w("div",{class:"result-list"},o.map(a=>w(ae,{key:a,label:a,onClick:()=>t==null?void 0:t(a)})),o.length===0&&w(ae,{label:r!=null?r:"No results"})))}const _o="https://raw.githubusercontent.com/misode/technical-changes/main";let us=null;async function mc(){if(!us){const e=await(await fetch(`${_o}/index.json`)).json();us=(await Promise.all(e.map((t,n)=>um(gc(t),n)))).flat().map(t=>Re(ue({},t),{tags:[t.group.id,...t.tags]}))}return us}async function um(e,t){const n=await(await fetch(`${_o}/${e.id}/index.json`)).json();return(await Promise.all(n.map((r,i)=>cm(e,gc(r),t,i)))).flat()}async function cm(e,t,n,r){const i=await(await fetch(`${_o}/${e.id}/${t.id}.md`)).text();return hm(i).map(s=>ue({version:t,group:e,order:n*1e3+r},s))}function hm(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 gc(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}:Nn(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 Yn="misode-v2",Ua="cached_latest_version",cs="22w18a",wr="https://raw.githubusercontent.com/misode/mcmeta";function vn(e,t){return`${wr}/${e.dynamic?t:`${e.ref}-${t}`}`}async function Yi(e){e.dynamic&&(localStorage.getItem(Ua)!==cs&&(await xm(t=>t.startsWith(`${wr}/summary/`)||t.startsWith(`${wr}/data/`)||t.startsWith(`${wr}/assets/`)||t.startsWith(`${wr}/registries/`)),localStorage.setItem(Ua,cs)),e.ref=cs)}async function fm(e,t,n){const r=ke.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(ke.versions)}`);return}await Yi(r),await Promise.all([dm(r,t),pm(r,n)])}async function dm(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await tr(`${vn(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:",It(n))}}async function pm(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await tr(`${vn(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:",It(n))}}async function vc(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=ke.versions.find(i=>i.id===e);try{const i=["blockstates","models"].includes(t)?"assets":"data",s=`${vn(r,i)}/${i}/minecraft/${t}/${n}.json`;return await(await fetch(s)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${It(i)}`)}}async function mm(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=ke.versions.find(r=>r.id===e);await Yi(n);try{const r=await tr(`${vn(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await tr(`${vn(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${It(r)}`)}}async function gm(e){const t=ke.versions.find(n=>n.id===e);await Yi(t);try{const n=`${vn(t,"summary")}/sounds/data.min.json`;return await tr(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${It(n)}`)}}function vm(e,t){const n=ke.versions.find(r=>r.id===e);return`${vn(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function ym(){const e=ke.versions[ke.versions.length-1];await Yi(e);try{return tr(`${vn(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${It(t)}`)}}async function tr(e,t=n=>n){try{const n=await caches.open(Yn);console.debug(`[getData] Opened cache ${Yn} ${e}`);const r=await n.match(e);if(r&&r.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await r.json();console.debug(`[getData] fetching data ${e}`);const i=await fetch(e),s=t(await i.json());return await n.put(e,new Response(JSON.stringify(s))),s}catch(n){console.warn(`[getData] Failed to open cache ${Yn}: ${It(n)}`),console.debug(`[getData] fetching data ${e}`);const r=await fetch(e);return t(await r.json())}}async function xm(e){try{const t=await caches.open(Yn);console.debug(`[deleteMatching] Opened cache ${Yn}`);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 ${Yn}: ${It(t)}`)}}const yc=["1.15","1.16","1.17","1.18","1.18.2","1.19"],Rn={},Pn={},wm={1.15:()=>Ee(()=>import("./index.ade1a8ec.js").then(function(e){return e.i}),[]),1.16:()=>Ee(()=>import("./index.94660f53.js").then(function(e){return e.i}),[]),1.17:()=>Ee(()=>import("./index.8f3ba16d.js").then(function(e){return e.i}),[]),1.18:()=>Ee(()=>import("./index.537673e9.js").then(function(e){return e.i}),[]),"1.18.2":()=>Ee(()=>import("./index.344db5d5.js").then(function(e){return e.i}),[]),1.19:()=>Ee(()=>import("./index.ea631fcf.js").then(function(e){return e.i}),[])};let xc,wc,pi;async function Eo(e){return Rn[e]||(Rn[e]=(async()=>{try{const t=await wm[e](),n=t.getCollections(),r={};await fm(e,n,r);const i=t.getSchemas(n);return Rn[e]={collections:n,schemas:i,blockStates:r},Rn[e]}catch(t){throw new Error(`Cannot get version "${e}": ${It(t)}`)}})()),Rn[e]}async function _m(e,t){var n;if(!Pn[t]||Pn[t].version!==e){const r=await Eo(e);xc=W.Reference(r.schemas,"configured_decorator"),wc=W.ChoiceNode([{type:"string",node:W.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:W.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const i=(n=ke.generators.find(s=>s.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const s=r.schemas.get(i),o=new W.DataModel(s,{wrapLists:!0});Pn[t]?o.reset(Pn[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),Pn[t]={model:o,version:e}}catch(s){const o=new Error(`Cannot get generator "${t}" for version "${e}": ${It(s)}`);throw s instanceof Error&&(o.stack=s.stack),o}}return Pn[t].model}async function Em(e){const t=await Eo(e);return pi=t.collections,t.collections}async function Am(e){return(await Eo(e)).blockStates}function mt(e,t,n){const r=ke.versions.findIndex(o=>o.id===e),i=t?ke.versions.findIndex(o=>o.id===t):0,s=n?ke.versions.findIndex(o=>o.id===n):ke.versions.length-1;return i<=r&&r<=s}var _c={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function o(l,c){if(!s[l]){s[l]={};for(var h=0;h<l.length;h++)s[l][l.charAt(h)]=h}return s[l][c]}var a={compressToBase64:function(l){if(l==null)return"";var c=a._compress(l,6,function(h){return r.charAt(h)});switch(c.length%4){default:case 0:return c;case 1:return c+"===";case 2:return c+"==";case 3:return c+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:a._decompress(l.length,32,function(c){return o(r,l.charAt(c))})},compressToUTF16:function(l){return l==null?"":a._compress(l,15,function(c){return n(c+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:a._decompress(l.length,16384,function(c){return l.charCodeAt(c)-32})},compressToUint8Array:function(l){for(var c=a.compress(l),h=new Uint8Array(c.length*2),g=0,d=c.length;g<d;g++){var m=c.charCodeAt(g);h[g*2]=m>>>8,h[g*2+1]=m%256}return h},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var c=new Array(l.length/2),h=0,g=c.length;h<g;h++)c[h]=l[h*2]*256+l[h*2+1];var d=[];return c.forEach(function(m){d.push(n(m))}),a.decompress(d.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":a._compress(l,6,function(c){return i.charAt(c)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),a._decompress(l.length,32,function(c){return o(i,l.charAt(c))}))},compress:function(l){return a._compress(l,16,function(c){return n(c)})},_compress:function(l,c,h){if(l==null)return"";var g,d,m={},x={},u="",f="",p="",v=2,E=3,A=2,D=[],C=0,k=0,I;for(I=0;I<l.length;I+=1)if(u=l.charAt(I),Object.prototype.hasOwnProperty.call(m,u)||(m[u]=E++,x[u]=!0),f=p+u,Object.prototype.hasOwnProperty.call(m,f))p=f;else{if(Object.prototype.hasOwnProperty.call(x,p)){if(p.charCodeAt(0)<256){for(g=0;g<A;g++)C=C<<1,k==c-1?(k=0,D.push(h(C)),C=0):k++;for(d=p.charCodeAt(0),g=0;g<8;g++)C=C<<1|d&1,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=d>>1}else{for(d=1,g=0;g<A;g++)C=C<<1|d,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=0;for(d=p.charCodeAt(0),g=0;g<16;g++)C=C<<1|d&1,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=d>>1}v--,v==0&&(v=Math.pow(2,A),A++),delete x[p]}else for(d=m[p],g=0;g<A;g++)C=C<<1|d&1,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=d>>1;v--,v==0&&(v=Math.pow(2,A),A++),m[f]=E++,p=String(u)}if(p!==""){if(Object.prototype.hasOwnProperty.call(x,p)){if(p.charCodeAt(0)<256){for(g=0;g<A;g++)C=C<<1,k==c-1?(k=0,D.push(h(C)),C=0):k++;for(d=p.charCodeAt(0),g=0;g<8;g++)C=C<<1|d&1,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=d>>1}else{for(d=1,g=0;g<A;g++)C=C<<1|d,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=0;for(d=p.charCodeAt(0),g=0;g<16;g++)C=C<<1|d&1,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=d>>1}v--,v==0&&(v=Math.pow(2,A),A++),delete x[p]}else for(d=m[p],g=0;g<A;g++)C=C<<1|d&1,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=d>>1;v--,v==0&&(v=Math.pow(2,A),A++)}for(d=2,g=0;g<A;g++)C=C<<1|d&1,k==c-1?(k=0,D.push(h(C)),C=0):k++,d=d>>1;for(;;)if(C=C<<1,k==c-1){D.push(h(C));break}else k++;return D.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(c){return l.charCodeAt(c)})},_decompress:function(l,c,h){var g=[],d=4,m=4,x=3,u="",f=[],p,v,E,A,D,C,k,I={val:h(0),position:c,index:1};for(p=0;p<3;p+=1)g[p]=p;for(E=0,D=Math.pow(2,2),C=1;C!=D;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=c,I.val=h(I.index++)),E|=(A>0?1:0)*C,C<<=1;switch(E){case 0:for(E=0,D=Math.pow(2,8),C=1;C!=D;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=c,I.val=h(I.index++)),E|=(A>0?1:0)*C,C<<=1;k=n(E);break;case 1:for(E=0,D=Math.pow(2,16),C=1;C!=D;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=c,I.val=h(I.index++)),E|=(A>0?1:0)*C,C<<=1;k=n(E);break;case 2:return""}for(g[3]=k,v=k,f.push(k);;){if(I.index>l)return"";for(E=0,D=Math.pow(2,x),C=1;C!=D;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=c,I.val=h(I.index++)),E|=(A>0?1:0)*C,C<<=1;switch(k=E){case 0:for(E=0,D=Math.pow(2,8),C=1;C!=D;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=c,I.val=h(I.index++)),E|=(A>0?1:0)*C,C<<=1;g[m++]=n(E),k=m-1,d--;break;case 1:for(E=0,D=Math.pow(2,16),C=1;C!=D;)A=I.val&I.position,I.position>>=1,I.position==0&&(I.position=c,I.val=h(I.index++)),E|=(A>0?1:0)*C,C<<=1;g[m++]=n(E),k=m-1,d--;break;case 2:return f.join("")}if(d==0&&(d=Math.pow(2,x),x++),g[k])u=g[k];else if(k===m)u=v+v.charAt(0);else return null;f.push(u),g[m++]=v+u.charAt(0),d--,v=u,d==0&&(d=Math.pow(2,x),x++)}}};return a}();e!=null&&(e.exports=t)})(_c);var Ec=_c.exports;const bm="https://z15g7can.directus.app/items",Ps="share",ja=new Map;async function Dm(e,t,n,r){try{const i=Ec.compressToBase64(JSON.stringify(n)),s=btoa(JSON.stringify(n));console.log("Compression rate",s.length/i.length);const o=JSON.stringify({data:i,type:e,version:t,show_preview:r});let a=ja.get(o);if(!a){const c=await Ac("/snippets",o);ja.set(o,c.id),a=c.id}const l=ke.generators.find(c=>c.id===e);return`${location.protocol}//${location.host}/${l.url}/?${Ps}=${a}`}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function Va(e){var t;try{const n=await Ac(`/snippets/${e}`);return Re(ue({},n),{data:JSON.parse((t=Ec.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function Ac(e,t){var i,s,o;const r=await(await fetch(bm+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((o=(s=(i=r.errors)==null?void 0:i[0])==null?void 0:s.message)!=null?o:"Unknown error")}var bc=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"}'),Cm=Object.freeze(Object.defineProperty({__proto__:null,default:bc},Symbol.toStringTag,{value:"Module"})),et;(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 E;return(E=localStorage.getItem(e.ID_LANGUAGE))!=null?E:"en"}e.getLanguage=t;function n(){var E;return(E=localStorage.getItem(e.ID_THEME))!=null?E:"dark"}e.getTheme=n;function r(){const E=localStorage.getItem(e.ID_VERSION);return E&&yc.includes(E)?E:"1.18.2"}e.getVersion=r;function i(){var E;return(E=localStorage.getItem(e.ID_INDENT))!=null?E:"2_spaces"}e.getIndent=i;function s(){var E;return(E=localStorage.getItem(e.ID_FORMAT))!=null?E:"json"}e.getFormat=s;function o(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=o;function a(){var E;return(E=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?E:"latest"}e.getSoundsVersion=a;function l(){const E=localStorage.getItem(e.ID_PROJECTS);return E?JSON.parse(E):[Fi]}e.getProjects=l;function c(E){var D;return JSON.parse((D=localStorage.getItem(e.ID_BACKUPS))!=null?D:"{}")[E]}e.getBackup=c;function h(E){E&&localStorage.setItem(e.ID_LANGUAGE,E)}e.setLanguage=h;function g(E){E&&localStorage.setItem(e.ID_THEME,E)}e.setTheme=g;function d(E){E&&localStorage.setItem(e.ID_VERSION,E)}e.setVersion=d;function m(E){E&&localStorage.setItem(e.ID_INDENT,E)}e.setIndent=m;function x(E){E&&localStorage.setItem(e.ID_FORMAT,E)}e.setFormat=x;function u(E){E!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,E.toString())}e.setHighlighting=u;function f(E){E&&localStorage.setItem(e.ID_SOUNDS_VERSION,E)}e.setSoundsVersion=f;function p(E){E&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(E))}e.setProjects=p;function v(E,A){var C;const D=JSON.parse((C=localStorage.getItem(e.ID_BACKUPS))!=null?C:"{}");A===void 0?delete D[E]:D[E]=A,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(D))}e.setBackup=v})(et||(et={}));function Sm(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return Ee(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return Ee(()=>import("./de.8e2383d8.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return Ee(()=>import("./en.4ab98cb7.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return Ee(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return Ee(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return Ee(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return Ee(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return Ee(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return Ee(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return Ee(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return Ee(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return Ee(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return Ee(()=>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 km(e){switch(e){case"../../locales/de.json":return Ee(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return Ee(()=>Promise.resolve().then(function(){return Cm}),void 0);case"../../locales/es.json":return Ee(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return Ee(()=>import("./fr.f5531eea.js"),[]);case"../../locales/it.json":return Ee(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return Ee(()=>import("./ja.167de97b.js"),[]);case"../../locales/pl.json":return Ee(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return Ee(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return Ee(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return Ee(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return Ee(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return Ee(()=>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 Dc=lr({lang:"none",locale:e=>e,changeLanguage:()=>{}}),Cr={fallback:bc};function De(e,t,...n){var i,s,o,a,l;const r=(l=(a=(o=(i=Cr[e])==null?void 0:i[t])!=null?o:(s=Cr.en)==null?void 0:s[t])!=null?a:Cr.fallback[t])!=null?l:t;return Fm(r,n)}function Fm(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 hs(e){if(Cr[e])return;const t=ke.languages.find(i=>i.code===e);if(!t)return;const n=await km(`../../locales/${e}.json`),r=t.schemas!==!1&&await Sm(`../../../node_modules/@mcschema/locales/src/${e}.json`);Cr[e]=ue(ue({},n.default),r.default)}function je(){return cr(Dc)}function Im({children:e}){const[t,n]=J("none"),r=tt((o,...a)=>De(t,o,...a),[t]),i=tt(async o=>{await hs(o),Ye.setLanguage(o),et.setLanguage(o),n(o)},[]);ce(()=>{(async()=>{const o=et.getLanguage();await Promise.all([hs("en"),...o!=="en"?[hs(o)]:[]]),n(o)})()},[]);const s={lang:t,locale:r,changeLanguage:i};return w(Dc.Provider,{value:s},e)}const Fi={name:"Drafts",namespace:"draft",files:[]},Cc=lr({project:Fi,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function Sc(){return cr(Cc)}function Bm({children:e}){const[t,n]=J(et.getProjects()),[r,i]=J(Fi.name),s=$e(()=>{var u;return(u=t.find(f=>f.name===r))!=null?u:Fi},[t,r]),[o,a]=J(void 0),l=$e(()=>{if(!!o)return s.files.find(u=>u.type===o[0]&&u.id===o[1])},[s,o]),c=tt(u=>{et.setProjects(u),n(u)},[]),h=tt(u=>{c(t.map(f=>f.name===r?ue(ue({},f),u):f))},[t,r]),g=tt((u,f,p)=>{var v;if(!p.id)h({files:s.files.filter(E=>E.type!==u||E.id!==f)});else{const E=p.id.includes(":")?p.id:`${s.namespace}:${p.id}`,A=s.files.some(D=>D.type===u&&D.id===E);if(f){if((l==null?void 0:l.id)===f&&f!==E&&A)return!1;h({files:s.files.map(D=>D.type===u&&D.id===f?Re(ue(ue({},D),p),{id:E}):D)}),(l==null?void 0:l.id)===f&&a([u,E])}else{if(A)return!1;h({files:[...s.files,{type:u,id:E,data:(v=p.data)!=null?v:{}}]}),a([u,E])}}return!0},[h,s,l]),d=tt((u,f)=>{const p=ke.generators.find(v=>v.id===u||v.path===u);if(!p)throw new Error(`Cannot find generator of type ${u}`);a([p.id,f]),mn(on(p.url))},[]),m=tt(()=>{a(void 0)},[]),x={project:s,file:l,changeProject:i,updateProject:h,updateFile:g,openFile:d,closeFile:m};return w(Cc.Provider,{value:x},e)}function Tm(e){var i;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id],r=ke.generators.find(s=>s.id===e.type);if(!r)throw new Error(`Cannot find generator of type ${e.type}`);return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}`}const kc=lr({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function Fc(){return cr(kc)}function Mm({children:e}){const[t,n]=J(et.getTheme()),r=La("(prefers-color-scheme: light)"),i=La("(prefers-color-scheme: dark)");ce(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=tt(a=>{Ye.setTheme(a),et.setTheme(a),n(a)},[]);ce(()=>{Ye.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]);const o={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:s};return w(kc.Provider,{value:o},e)}const Nm=3,Ic=lr({title:"",changeTitle:()=>{}});function Lt(e,t){const n=cr(Ic);return ce(()=>{e&&n.changeTitle(e,t)},[e,t]),n}function Om({children:e}){const{locale:t}=je(),[n,r]=J(t("title.home")),i=tt((o,a)=>{a!=null||(a=ke.versions.map(c=>c.id));const l=a.slice(-Nm);document.title=`${o} Minecraft ${l.join(", ")}`,r(o)},[]),s={title:n,changeTitle:i};return w(Ic.Provider,{value:s},e)}const Lm="version",Bc=lr({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function dr(){return cr(Bc)}function Rm({children:e}){const[t,n]=J(et.getVersion()),[r,i]=Tr(Lm);ce(()=>{yc.includes(r)&&t!==r&&n(r)},[t,r]);const s=tt((a,l=!0,c=!1)=>{(c||r)&&i(a,!0),l&&(Ye.setVersion(a),et.setVersion(a)),n(a)},[r]),o={version:t,changeVersion:s,changeTargetVersion:i};return w(Bc.Provider,{value:o},e)}let ge,Tc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Tc.decode();let ni=null;function Pm(){return(ni===null||ni.buffer!==ge.memory.buffer)&&(ni=new Uint8Array(ge.memory.buffer)),ni}function $m(e,t){return Tc.decode(Pm().subarray(e,e+t))}const $s=new Uint32Array(2),zm=new BigInt64Array($s.buffer);let ri=null;function Mr(){return(ri===null||ri.buffer!==ge.memory.buffer)&&(ri=new Int32Array(ge.memory.buffer)),ri}let ii=null;function Mc(){return(ii===null||ii.buffer!==ge.memory.buffer)&&(ii=new Float64Array(ge.memory.buffer)),ii}function Um(e,t){return Mc().subarray(e/8,e/8+t)}let He=0;function Ke(e,t){const n=t(e.length*8);return Mc().set(e,n/8),He=e.length,n}let si=null;function jm(){return(si===null||si.buffer!==ge.memory.buffer)&&(si=new Uint32Array(ge.memory.buffer)),si}function Vm(e,t){const n=t(e.length*4);return jm().set(e,n/4),He=e.length,n}function Hm(e,t,n,r,i,s,o,a,l,c,h,g,d,m){var x=Ke(e,ge.__wbindgen_malloc),u=He,f=Ke(t,ge.__wbindgen_malloc),p=He,v=Ke(n,ge.__wbindgen_malloc),E=He,A=Ke(r,ge.__wbindgen_malloc),D=He,C=Ke(i,ge.__wbindgen_malloc),k=He,I=Ke(s,ge.__wbindgen_malloc),M=He,L=Ke(o,ge.__wbindgen_malloc),$=He,H=Ke(a,ge.__wbindgen_malloc),ee=He,he=Ke(l,ge.__wbindgen_malloc),xe=He,z=Ke(c,ge.__wbindgen_malloc),Y=He,te=Ke(h,ge.__wbindgen_malloc),U=He,F=Ke(g,ge.__wbindgen_malloc),B=He,j=Ke(d,ge.__wbindgen_malloc),K=He,ne=Vm(m,ge.__wbindgen_malloc),we=He,Je=ge.biome_parameters(x,u,f,p,v,E,A,D,C,k,I,M,L,$,H,ee,he,xe,z,Y,te,U,F,B,j,K,ne,we);return Wi.__wrap(Je)}function Xm(e,t,n,r,i,s,o,a,l,c,h,g,d){zm[0]=e;const m=$s[0],x=$s[1];var u=Ke(n,ge.__wbindgen_malloc),f=He,p=Ke(i,ge.__wbindgen_malloc),v=He,E=Ke(o,ge.__wbindgen_malloc),A=He,D=Ke(l,ge.__wbindgen_malloc),C=He,k=Ke(h,ge.__wbindgen_malloc),I=He,M=Ke(d,ge.__wbindgen_malloc),L=He,$=ge.climate_sampler(m,x,t,u,f,r,p,v,s,E,A,a,D,C,c,k,I,g,M,L);return Zr.__wrap($)}function zs(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function Jm(e,t){return Mr().subarray(e/4,e/4+t)}function Ha(e,t,n,r,i,s,o,a,l,c,h){try{const x=ge.__wbindgen_add_to_stack_pointer(-16);zs(e,Wi),zs(t,Zr),ge.multi_noise(x,e.ptr,t.ptr,n,r,i,s,o,a,l,c,h);var g=Mr()[x/4+0],d=Mr()[x/4+1],m=Jm(g,d).slice();return ge.__wbindgen_free(g,d*4),m}finally{ge.__wbindgen_add_to_stack_pointer(16)}}function Xa(e,t,n,r,i,s,o,a,l,c){try{const m=ge.__wbindgen_add_to_stack_pointer(-16);zs(e,Zr),ge.climate_noise(m,e.ptr,t,n,r,i,s,o,a,l,c);var h=Mr()[m/4+0],g=Mr()[m/4+1],d=Um(h,g).slice();return ge.__wbindgen_free(h,g*8),d}finally{ge.__wbindgen_add_to_stack_pointer(16)}}class Wi{static __wrap(t){const n=Object.create(Wi.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();ge.__wbg_parameterlist_free(t)}}class Zr{static __wrap(t){const n=Object.create(Zr.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();ge.__wbg_sampler_free(t)}}async function Gm(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 Nc(e){typeof e=="undefined"&&(e=new URL("/assets/deepslate_rs_bg.4990c219.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_throw=function(i,s){throw new Error($m(i,s))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await Gm(await e,t);return ge=n.exports,Nc.__wbindgen_wasm_module=r,ge}var Ja="/assets/deepslate_rs_bg.4990c219.wasm",Oc={exports:{}},Lc={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,s=0;i<n.length;i++,s+=8)r[s>>>5]|=n[i]<<24-s%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i<n.length*32;i+=8)r.push(n[i>>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i<n.length;i++)r.push((n[i]>>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substr(i,2),16));return r},bytesToBase64:function(n){for(var r=[],i=0;i<n.length;i+=3)for(var s=n[i]<<16|n[i+1]<<8|n[i+2],o=0;o<4;o++)i*8+o*6<=n.length*8?r.push(e.charAt(s>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,s=0;i<n.length;s=++i%4)s!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(n.charAt(i))>>>6-s*2);return r}};Lc.exports=t})();var Us={utf8:{stringToBytes:function(e){return Us.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Us.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("")}}},Ga=Us;/*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/var Ym=function(e){return e!=null&&(Rc(e)||Wm(e)||!!e._isBuffer)};function Rc(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Wm(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Rc(e.slice(0,0))}(function(){var e=Lc.exports,t=Ga.utf8,n=Ym,r=Ga.bin,i=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=r.stringToBytes(s):s=t.stringToBytes(s):n(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),l=s.length*8,c=1732584193,h=-271733879,g=-1732584194,d=271733878,m=0;m<a.length;m++)a[m]=(a[m]<<8|a[m]>>>24)&16711935|(a[m]<<24|a[m]>>>8)&4278255360;a[l>>>5]|=128<<l%32,a[(l+64>>>9<<4)+14]=l;for(var x=i._ff,u=i._gg,f=i._hh,p=i._ii,m=0;m<a.length;m+=16){var v=c,E=h,A=g,D=d;c=x(c,h,g,d,a[m+0],7,-680876936),d=x(d,c,h,g,a[m+1],12,-389564586),g=x(g,d,c,h,a[m+2],17,606105819),h=x(h,g,d,c,a[m+3],22,-1044525330),c=x(c,h,g,d,a[m+4],7,-176418897),d=x(d,c,h,g,a[m+5],12,1200080426),g=x(g,d,c,h,a[m+6],17,-1473231341),h=x(h,g,d,c,a[m+7],22,-45705983),c=x(c,h,g,d,a[m+8],7,1770035416),d=x(d,c,h,g,a[m+9],12,-1958414417),g=x(g,d,c,h,a[m+10],17,-42063),h=x(h,g,d,c,a[m+11],22,-1990404162),c=x(c,h,g,d,a[m+12],7,1804603682),d=x(d,c,h,g,a[m+13],12,-40341101),g=x(g,d,c,h,a[m+14],17,-1502002290),h=x(h,g,d,c,a[m+15],22,1236535329),c=u(c,h,g,d,a[m+1],5,-165796510),d=u(d,c,h,g,a[m+6],9,-1069501632),g=u(g,d,c,h,a[m+11],14,643717713),h=u(h,g,d,c,a[m+0],20,-373897302),c=u(c,h,g,d,a[m+5],5,-701558691),d=u(d,c,h,g,a[m+10],9,38016083),g=u(g,d,c,h,a[m+15],14,-660478335),h=u(h,g,d,c,a[m+4],20,-405537848),c=u(c,h,g,d,a[m+9],5,568446438),d=u(d,c,h,g,a[m+14],9,-1019803690),g=u(g,d,c,h,a[m+3],14,-187363961),h=u(h,g,d,c,a[m+8],20,1163531501),c=u(c,h,g,d,a[m+13],5,-1444681467),d=u(d,c,h,g,a[m+2],9,-51403784),g=u(g,d,c,h,a[m+7],14,1735328473),h=u(h,g,d,c,a[m+12],20,-1926607734),c=f(c,h,g,d,a[m+5],4,-378558),d=f(d,c,h,g,a[m+8],11,-2022574463),g=f(g,d,c,h,a[m+11],16,1839030562),h=f(h,g,d,c,a[m+14],23,-35309556),c=f(c,h,g,d,a[m+1],4,-1530992060),d=f(d,c,h,g,a[m+4],11,1272893353),g=f(g,d,c,h,a[m+7],16,-155497632),h=f(h,g,d,c,a[m+10],23,-1094730640),c=f(c,h,g,d,a[m+13],4,681279174),d=f(d,c,h,g,a[m+0],11,-358537222),g=f(g,d,c,h,a[m+3],16,-722521979),h=f(h,g,d,c,a[m+6],23,76029189),c=f(c,h,g,d,a[m+9],4,-640364487),d=f(d,c,h,g,a[m+12],11,-421815835),g=f(g,d,c,h,a[m+15],16,530742520),h=f(h,g,d,c,a[m+2],23,-995338651),c=p(c,h,g,d,a[m+0],6,-198630844),d=p(d,c,h,g,a[m+7],10,1126891415),g=p(g,d,c,h,a[m+14],15,-1416354905),h=p(h,g,d,c,a[m+5],21,-57434055),c=p(c,h,g,d,a[m+12],6,1700485571),d=p(d,c,h,g,a[m+3],10,-1894986606),g=p(g,d,c,h,a[m+10],15,-1051523),h=p(h,g,d,c,a[m+1],21,-2054922799),c=p(c,h,g,d,a[m+8],6,1873313359),d=p(d,c,h,g,a[m+15],10,-30611744),g=p(g,d,c,h,a[m+6],15,-1560198380),h=p(h,g,d,c,a[m+13],21,1309151649),c=p(c,h,g,d,a[m+4],6,-145523070),d=p(d,c,h,g,a[m+11],10,-1120210379),g=p(g,d,c,h,a[m+2],15,718787259),h=p(h,g,d,c,a[m+9],21,-343485551),c=c+v>>>0,h=h+E>>>0,g=g+A>>>0,d=d+D>>>0}return e.endian([c,h,g,d])};i._ff=function(s,o,a,l,c,h,g){var d=s+(o&a|~o&l)+(c>>>0)+g;return(d<<h|d>>>32-h)+o},i._gg=function(s,o,a,l,c,h,g){var d=s+(o&l|a&~l)+(c>>>0)+g;return(d<<h|d>>>32-h)+o},i._hh=function(s,o,a,l,c,h,g){var d=s+(o^a^l)+(c>>>0)+g;return(d<<h|d>>>32-h)+o},i._ii=function(s,o,a,l,c,h,g){var d=s+(a^(o|~l))+(c>>>0)+g;return(d<<h|d>>>32-h)+o},i._blocksize=16,i._digestsize=16,Oc.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(i(s,o));return o&&o.asBytes?a:o&&o.asString?r.bytesToString(a):e.bytesToHex(a)}})();var Pc=Oc.exports,G;(function(e){function t(h){return typeof h=="number"?h:void 0}e.readNumber=t;function n(h){return typeof h=="number"?Math.floor(h):void 0}e.readInt=n;function r(h){return typeof h=="string"?h:void 0}e.readString=r;function i(h){return typeof h=="boolean"?h:void 0}e.readBoolean=i;function s(h){return typeof h=="object"&&h!==null?h:void 0}e.readObject=s;function o(h,g){if(!!Array.isArray(h))return h.map(d=>g(d))}e.readArray=o;function a(h,g){var m;const d=(m=s(h))!=null?m:{};return Object.fromEntries(Object.entries(d).map(([x,u])=>[x,g(u)]))}e.readMap=a;function l(h,g,d){const m=g(h);return m?d(m):void 0}e.compose=l;function c(h,g){return typeof h!="string"?g[0]:g.includes(h)?h:g[0]}e.readEnum=c})(G||(G={}));function fs(e){let t=null;return()=>(t==null&&(t=e()),t)}function Ki(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}function cn(e){return e*e}function js(e,t,n){return Math.max(t,Math.min(n,e))}function pn(e,t,n){return t+e*(n-t)}function Vs(e,t,n,r,i,s){return pn(t,pn(e,n,r),pn(e,i,s))}function Km(e,t,n,r,i,s,o,a,l,c,h){return pn(n,Vs(e,t,r,i,s,o),Vs(e,t,a,l,c,h))}function mi(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function Ya(e,t,n,r,i,s){return mi(t,()=>mi(e,n,r),()=>mi(e,i,s))}function qm(e,t,n,r,i,s,o,a,l,c,h){return mi(n,()=>Ya(e,t,r,i,s,o),()=>Ya(e,t,a,l,c,h))}function Ao(e,t,n){return n<0?e:n>1?t:pn(n,e,t)}function $c(e,t,n){return(e-t)/(n-t)}function ds(e){return e*e*e*(e*(e*6-15)+10)}function Wa(e,t,n,r,i){return pn($c(e,t,n),r,i)}function zc(e,t,n,r,i){return Ao(r,i,$c(e,t,n))}function Zm(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),s=e+i;if(n(s)){r=i;continue}e=s+1,r-=i+1}return e}function Uc(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 Hs(e,t,n,r,i,s,o,a){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(s)<<BigInt(16)|BigInt(o)<<BigInt(8)|BigInt(a)}var Xs;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(Xs||(Xs={}));var Js;(function(e){function t(i,s){var c,h,g,d;if(typeof i=="number")return new n(i);const o=(c=G.readObject(i))!=null?c:{},a=new r(s(o.coordinate)),l=(h=G.readArray(o.points,m=>{var x;return(x=G.readObject(m))!=null?x:{}}))!=null?h:[];if(l.length===0)return new n(0);for(const m of l){const x=(g=G.readNumber(m.location))!=null?g:0,u=t(m.value,s),f=(d=G.readNumber(m.derivative))!=null?d:0;a.addPoint(x,u,f)}return a}e.fromJson=t;class n{constructor(s){this.value=s}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(s,o=[],a=[],l=[]){this.coordinate=s,this.locations=o,this.values=a,this.derivatives=l,this.calculatedMin=Number.NEGATIVE_INFINITY,this.calculatedMax=Number.POSITIVE_INFINITY}compute(s){const o=this.coordinate.compute(s),a=Zm(0,this.locations.length,E=>o<this.locations[E])-1,l=this.locations.length-1;if(a<0)return this.values[0].compute(s)+this.derivatives[0]*(o-this.locations[0]);if(a===l)return this.values[l].compute(s)+this.derivatives[l]*(o-this.locations[l]);const c=this.locations[a],h=this.locations[a+1],g=this.derivatives[a],d=this.derivatives[a+1],m=(o-c)/(h-c),x=this.values[a].compute(s),u=this.values[a+1].compute(s),f=g*(h-c)-(u-x),p=-d*(h-c)+(u-x);return pn(m,x,u)+m*(1-m)*pn(m,f,p)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(s){return new r(s(this.coordinate),this.locations,this.values.map(o=>o.mapAll(s)),this.derivatives)}addPoint(s,o,a=0){return this.locations.push(s),this.values.push(typeof o=="number"?new e.Constant(o):o),this.derivatives.push(a),this}calculateMinMax(){if(!Xs.is(this.coordinate))return;const s=this.locations.length-1;var o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),c=this.coordinate.maxValue();for(const g of this.values)g.calculateMinMax();if(l<this.locations[0]){const g=r.linearExtend(l,this.locations,this.values[0].min(),this.derivatives,0),d=r.linearExtend(l,this.locations,this.values[0].max(),this.derivatives,0);o=Math.min(o,Math.min(g,d)),a=Math.max(a,Math.max(g,d))}if(c>this.locations[s]){const g=r.linearExtend(c,this.locations,this.values[s].min(),this.derivatives,s),d=r.linearExtend(c,this.locations,this.values[s].max(),this.derivatives,s);o=Math.min(o,Math.min(g,d)),a=Math.max(a,Math.max(g,d))}for(const g of this.values)o=Math.min(o,g.min()),a=Math.max(a,g.max());for(var h=0;h<s;++h){const g=this.locations[h],m=this.locations[h+1]-g,x=this.values[h],u=this.values[h+1],f=x.min(),p=x.max(),v=u.min(),E=u.max(),A=this.derivatives[h],D=this.derivatives[h+1];if(A!==0||D!==0){const C=A*m,k=D*m,I=Math.min(f,v),M=Math.max(p,E),L=C-E+f,$=C-v+p,H=-k+v-p,ee=-k+E-f,he=Math.min(L,H),xe=Math.max($,ee);o=Math.min(o,I+.25*he),a=Math.max(a,M+.25*xe)}}this.calculatedMin=o,this.calculatedMax=a}static linearExtend(s,o,a,l,c){const h=l[c];return h==0?a:a+h*(s-o[c])}}e.MultiPoint=r})(Js||(Js={}));const zt=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new zt(this.nextLong())}forkPositional(){return new Qm(this.nextLong())}setSeed(e){this.seed=e^zt.MULTIPLIER&zt.MODULUS_MASK}advance(){this.seed=this.seed*zt.MULTIPLIER+zt.INCREMENT&zt.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(zt.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)*zt.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*zt.DOUBLE_MULTIPLIER}};let bt=zt;bt.MODULUS_BITS=48;bt.MODULUS_MASK=BigInt("281474976710655");bt.MULTIPLIER=BigInt("25214903917");bt.INCREMENT=BigInt("11");bt.FLOAT_MULTIPLIER=1/Math.pow(2,24);bt.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class Qm{constructor(t){this.seed=t}at(t,n,r){const i=Uc(t,n,r);return new bt(i^this.seed)}fromHashOf(t){const n=Pc(t,{asBytes:!0}),r=Hs(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new bt(r^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const fe=class{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new fe(fe.upgradeSeedTo128bit(e))}static mixStafford13(e){return e=(e^e>>fe.BIGINT_30)*fe.STAFFORD_1&fe.MAX_ULONG,e=(e^e>>fe.BIGINT_27)*fe.STAFFORD_2&fe.MAX_ULONG,(e^e>>fe.BIGINT_31)&fe.MAX_ULONG}static upgradeSeedTo128bit(e){e<0&&(e+=fe.POW2_60);const t=e^fe.SILVER_RATIO_64,n=t+fe.GOLDEN_RATIO_64&fe.MAX_ULONG;return[fe.mixStafford13(t),fe.mixStafford13(n)]}static rotateLeft(e,t){return e<<t&fe.MAX_ULONG|e>>fe.BIGINT_64-t}setSeed(e){this.seed=fe.upgradeSeedTo128bit(e)}fork(){return new fe([this.next(),this.next()])}forkPositional(){return new e1(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const n=fe.rotateLeft(e+t&fe.MAX_ULONG,fe.BIGINT_17)+e&fe.MAX_ULONG;return t^=e,this.seed=[fe.rotateLeft(e,fe.BIGINT_49)^t^t<<fe.BIGINT_21&fe.MAX_ULONG,fe.rotateLeft(t,fe.BIGINT_28)],n}nextLong(){let e=this.next();return e>fe.POW2_63&&(e-=fe.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=fe.rotateLeft(t,fe.BIGINT_49)^n^n<<fe.BIGINT_21,n=fe.rotateLeft(n,fe.BIGINT_28);this.seed=[t,n]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&fe.MAX_UINT;if(e){const n=BigInt(e);let r=t*n,i=r&fe.MAX_UINT;if(i<n){const o=((~n&fe.MAX_UINT)+fe.BIGINT_1)%n;for(;i<o;)t=this.next()&fe.MAX_UINT,r=t*n,i=r&fe.MAX_UINT}const s=r>>fe.BIGINT_32;return Number(s)}else{let n=Number(t);return n>=2147483648&&(n-=4294967296),n}}nextFloat(){return Number(this.nextBits(24))*fe.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*fe.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let ze=fe;ze.SILVER_RATIO_64=BigInt("7640891576956012809");ze.GOLDEN_RATIO_64=BigInt("-7046029254386353131");ze.FLOAT_MULTIPLIER=1/Math.pow(2,24);ze.DOUBLE_MULTIPLIER=11102230246251565e-32;ze.BIGINT_1=BigInt(1);ze.BIGINT_17=BigInt(17);ze.BIGINT_21=BigInt(21);ze.BIGINT_27=BigInt(27);ze.BIGINT_28=BigInt(28);ze.BIGINT_30=BigInt(30);ze.BIGINT_31=BigInt(31);ze.BIGINT_32=BigInt(32);ze.BIGINT_49=BigInt(49);ze.BIGINT_64=BigInt(64);ze.STAFFORD_1=BigInt("-4658895280553007687");ze.STAFFORD_2=BigInt("-7723592293110705685");ze.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF");ze.POW2_60=BigInt("0x10000000000000000");ze.POW2_63=BigInt("0x8000000000000000");ze.MAX_UINT=BigInt(4294967295);class e1{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,r){const s=Uc(t,n,r)^this.seedLo;return new ze([s,this.seedHi])}fromHashOf(t){const n=Pc(t,{asBytes:!0}),r=Hs(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=Hs(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new ze([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const qt=class{constructor(e){this.xo=e.nextDouble()*256,this.yo=e.nextDouble()*256,this.zo=e.nextDouble()*256,this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t;for(let t=0;t<256;t+=1){const n=e.nextInt(256-t),r=this.p[t];this.p[t]=this.p[t+n],this.p[t+n]=r}}sample2D(e,t){let n,r,i;const s=(e+t)*qt.F2,o=Math.floor(e+s),a=o-(n=(o+(r=Math.floor(t+s)))*qt.G2),l=e-a;let c,h;l>(i=t-(r-n))?(c=1,h=0):(c=0,h=1);const g=l-c+qt.G2,d=i-h+qt.G2,m=l-1+2*qt.G2,x=i-1+2*qt.G2,u=o&255,f=r&255,p=this.P(u+this.P(f))%12,v=this.P(u+c+this.P(f+h))%12,E=this.P(u+1+this.P(f+1))%12,A=this.getCornerNoise3D(p,l,i,0,.5),D=this.getCornerNoise3D(v,g,d,0,.5),C=this.getCornerNoise3D(E,m,x,0,.5);return 70*(A+D+C)}sample(e,t,n){const r=(e+t+n)*.3333333333333333,i=Math.floor(e+r),s=Math.floor(t+r),o=Math.floor(n+r),a=(i+s+o)*.16666666666666666,l=e-(i-a),c=t-(s-a),h=n-(o-a);let g,d,m,x,u,f;l>=c?c>=h?(g=1,d=0,m=0,x=1,u=1,f=0):l>=h?(g=1,d=0,m=0,x=1,u=0,f=1):(g=0,d=0,m=1,x=1,u=0,f=1):c<h?(g=0,d=0,m=1,x=0,u=1,f=1):l<h?(g=0,d=1,m=0,x=0,u=1,f=1):(g=0,d=1,m=0,x=1,u=1,f=0);const p=l-g+.16666666666666666,v=c-d+.16666666666666666,E=h-m+.16666666666666666,A=l-x+.3333333333333333,D=c-u+.3333333333333333,C=h-f+.3333333333333333,k=l-.5,I=c-.5,M=h-.5,L=i&255,$=s&255,H=o&255,ee=this.P(L+this.P($+this.P(H)))%12,he=this.P(L+g+this.P($+d+this.P(H+m)))%12,xe=this.P(L+x+this.P($+u+this.P(H+f)))%12,z=this.P(L+1+this.P($+1+this.P(H+1)))%12,Y=this.getCornerNoise3D(ee,l,c,h,.6),te=this.getCornerNoise3D(he,p,v,E,.6),U=this.getCornerNoise3D(xe,A,D,C,.6),F=this.getCornerNoise3D(z,k,I,M,.6);return 32*(Y+te+U+F)}P(e){return this.p[e&255]}getCornerNoise3D(e,t,n,r,i){let s,o=i-t*t-n*n-r*r;return o<0?s=0:(o*=o,s=o*o*qt.gradDot(e,t,n,r)),s}static gradDot(e,t,n,r){const i=qt.GRADIENT[e&15];return i[0]*t+i[1]*n+i[2]*r}};let Tt=qt;Tt.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]];Tt.F2=.5*(Math.sqrt(3)-1);Tt.G2=(3-Math.sqrt(3))/6;class Ka{constructor(t){this.xo=t.nextDouble()*256,this.yo=t.nextDouble()*256,this.zo=t.nextDouble()*256,this.p=Array(256);for(let n=0;n<256;n+=1)this.p[n]=n>127?n-256:n;for(let n=0;n<256;n+=1){const r=t.nextInt(256-n),i=this.p[n];this.p[n]=this.p[n+r],this.p[n+r]=i}}sample(t,n,r,i=0,s=0){const o=t+this.xo,a=n+this.yo,l=r+this.zo,c=Math.floor(o),h=Math.floor(a),g=Math.floor(l),d=o-c,m=a-h,x=l-g;let u=0;if(i!==0){const f=s>=0&&s<m?s:m;u=Math.floor(f/i+1e-7)*i}return this.sampleAndLerp(c,h,g,d,m-u,x,m)}sampleAndLerp(t,n,r,i,s,o,a){const l=this.P(t),c=this.P(t+1),h=this.P(l+n),g=this.P(l+n+1),d=this.P(c+n),m=this.P(c+n+1),x=Tt.gradDot(this.P(h+r),i,s,o),u=Tt.gradDot(this.P(d+r),i-1,s,o),f=Tt.gradDot(this.P(g+r),i,s-1,o),p=Tt.gradDot(this.P(m+r),i-1,s-1,o),v=Tt.gradDot(this.P(h+r+1),i,s,o-1),E=Tt.gradDot(this.P(d+r+1),i-1,s,o-1),A=Tt.gradDot(this.P(g+r+1),i,s-1,o-1),D=Tt.gradDot(this.P(m+r+1),i-1,s-1,o-1),C=ds(i),k=ds(a),I=ds(o);return Km(C,k,I,x,u,f,p,v,E,A,D)}P(t){return this.p[t&255]&255}}class Pe{constructor(t,n,r){if(t instanceof ze){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let s=0;s<r.length;s++)if(r[s]!==0){const o=n+s;this.noiseLevels[s]=new Ka(i.fromHashOf("octave_"+o))}}else{if(1-n<r.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(r.length);for(let i=-n;i>=0;i-=1)i<r.length&&r[i]!==0?this.noiseLevels[i]=new Ka(t):t.consume(262)}this.amplitudes=r,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,r.length-1)/(Math.pow(2,r.length)-1),this.maxValue=this.edgeValue(2)}sample(t,n,r,i=0,s=0,o=!1){let a=0,l=this.lowestFreqInputFactor,c=this.lowestFreqValueFactor;for(let h=0;h<this.noiseLevels.length;h+=1){const g=this.noiseLevels[h];g&&(a+=this.amplitudes[h]*c*g.sample(Pe.wrap(t*l),o?-g.yo:Pe.wrap(n*l),Pe.wrap(r*l),i*l,s*l)),l*=2,c/=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 t1{constructor(t,n,r,i,s,o){this.xzScale=n,this.yScale=r,this.xzFactor=i,this.yFactor=s,this.smearScaleMultiplier=o,this.minLimitNoise=new Pe(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new Pe(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new Pe(t,-7,[1,1,1,1,1,0,0,0]),this.xzMultiplier=684.412*n,this.yMultiplier=684.412*r,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(t,n,r){const i=t*this.xzMultiplier,s=n*this.yMultiplier,o=r*this.xzMultiplier,a=i/this.xzFactor,l=s/this.yFactor,c=o/this.xzFactor,h=this.yMultiplier*this.smearScaleMultiplier,g=h/this.yFactor;let d,m=0,x=1;for(let p=0;p<8;p+=1){if(d=this.mainNoise.getOctaveNoise(p),d){const v=Pe.wrap(a*x),E=Pe.wrap(l*x),A=Pe.wrap(c*x);m+=d.sample(v,E,A,g*x,l*x)/x}x/=2}m=(m/10+1)/2,x=1;let u=0,f=0;for(let p=0;p<16;p+=1){const v=Pe.wrap(i*x),E=Pe.wrap(s*x),A=Pe.wrap(o*x),D=h*x;m<1&&(d=this.minLimitNoise.getOctaveNoise(p))&&(u+=d.sample(v,E,A,D,s*x)/x),m>0&&(d=this.maxLimitNoise.getOctaveNoise(p))&&(f+=d.sample(v,E,A,D,s*x)/x),x/=2}return Ao(u/512,f/512,m)/128}}const gi=class{constructor(e,{firstOctave:t,amplitudes:n}){this.first=new Pe(e,t,n),this.second=new Pe(e,t,n);let r=1/0,i=-1/0;for(let o=0;o<n.length;o+=1)n[o]!==0&&(r=Math.min(r,o),i=Math.max(i,o));const s=.1*(1+1/(i-r+1));this.valueFactor=1/6/s,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,n){const r=e*gi.INPUT_FACTOR,i=t*gi.INPUT_FACTOR,s=n*gi.INPUT_FACTOR;return(this.first.sample(e,t,n)+this.second.sample(r,i,s))*this.valueFactor}};let qi=gi;qi.INPUT_FACTOR=1.0181268882175227;var nr;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var s,o,a;const i=(s=G.readObject(r))!=null?s:{};return{firstOctave:(o=G.readInt(i.firstOctave))!=null?o:0,amplitudes:(a=G.readArray(i.amplitudes,l=>{var c;return(c=G.readNumber(l))!=null?c:0}))!=null?a:[]}}e.fromJson=n})(nr||(nr={}));var Mt;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(Mt||(Mt={}));const n1={[Mt.UP]:[0,1,0],[Mt.DOWN]:[0,-1,0],[Mt.NORTH]:[0,0,-1],[Mt.EAST]:[1,0,0],[Mt.SOUTH]:[0,0,1],[Mt.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return n1[n]}e.normal=t})(Mt||(Mt={}));var rr;(function(e){function t(o,a,l){return[o,a,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(o,a,l,c){return[o[0]+a,o[1]+l,o[2]+c]}e.offset=n;function r(o,a){return e.offset(o,...Mt.normal(a))}e.towards=r;function i(o,a){return o===a?!0:o[0]===a[0]&&o[1]===a[1]&&o[2]===a[2]}e.equals=i;function s(o){return o[0]*o[0]+o[1]*o[1]+o[2]*o[2]}e.magnitude=s})(rr||(rr={}));function ps(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 r1(e,t){try{return e()}catch{return t}}const vi=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 vi(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 vi(n,r)}return new vi(this.DEFAULT_NAMESPACE,e)}};let Se=vi;Se.DEFAULT_NAMESPACE="minecraft";Se.SEPARATOR=":";const Ut=class{constructor(e,t={}){this.properties=t,this.name=typeof e=="string"?Se.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(Ut.WATER)||this.is(Ut.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=Se.parse(ps(e.value,"Name","string")),n=r1(()=>ps(e.value,"Properties","compound"),{}),r=Object.keys(n).reduce((i,s)=>Re(ue({},i),{[s]:ps(n,s,"string")}),{});return new Ut(t,r)}static fromJson(e){var i,s;const t=(i=G.readObject(e))!=null?i:{},n=Se.parse((s=G.readString(t.Name))!=null?s:Ut.STONE.name.toString()),r=G.readMap(t.Properties,o=>{var a;return(a=G.readString(o))!=null?a:""});return new Ut(n,r)}};let ht=Ut;ht.AIR=new Ut(Se.create("air"));ht.STONE=new Ut(Se.create("stone"));ht.WATER=new Ut(Se.create("water"),{level:"0"});ht.LAVA=new Ut(Se.create("lava"),{level:"0"});const Sr=class{constructor(e){this.minY=e,this.storage=Array(Sr.SIZE).fill(0),this.palette=[ht.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:ht.AIR}setBlockState(e,t,n,r){let i=this.palette.findIndex(s=>s.equals(r));i===-1&&(i=this.palette.length,this.palette.push(r)),this.storage[this.index(e,t,n)]=i}};let bo=Sr;bo.WIDTH=16;bo.SIZE=Sr.WIDTH*Sr.WIDTH*Sr.WIDTH;class i1{constructor(t,n,r){this.minY=t,this.height=n,this.pos=r,this.sections=Array(this.sectionsCount).fill(null)}get maxY(){return this.minY+this.height}get minSection(){return this.minY>>4}get maxSection(){return(this.maxY-1>>4)+1}get sectionsCount(){return this.maxSection-this.minSection}getSectionIndex(t){return(t>>4)-this.minSection}getBlockState(t){var o;const[n,r,i]=t,s=this.sections[this.getSectionIndex(r)];return(o=s==null?void 0:s.getBlockState(n&15,r&15,i&15))!=null?o:ht.AIR}setBlockState(t,n){const[r,i,s]=t,o=this.getSectionIndex(i);let a=this.sections[o];if(a===null){if(n.equals(ht.AIR))return;a=this.getOrCreateSection(o)}a.setBlockState(r&15,i&15,s&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new bo(this.minSection+t)),this.sections[t]}}var Et;(function(e){function t(h,g){return[h,g]}e.create=t;function n(h){return[h[0]>>4,h[2]>>4]}e.fromBlockPos=n;function r(h){return[Number(h)&4294967295,Number(h>>BigInt(32))]}e.fromLong=r;function i(h){return s(h[0],h[1])}e.toLong=i;function s(h,g){return BigInt(h&4294967295)|BigInt(g&4294967295)<<BigInt(32)}e.asLong=s;function o(h){return h[0]<<4}e.minBlockX=o;function a(h){return h[1]<<4}e.minBlockZ=a;function l(h){return(h[0]<<4)+15}e.maxBlockX=l;function c(h){return(h[1]<<4)+15}e.maxBlockZ=c})(Et||(Et={}));var ir;(function(e){function t(i,s){return o=>typeof o=="string"?r(i,Se.parse(o)):n(s(o))}e.parser=t;function n(i){return{value:()=>i,key:()=>{}}}e.direct=n;function r(i,s){return{value:()=>i.getOrThrow(s),key:()=>s}}e.reference=r})(ir||(ir={}));const Do=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),ir.reference(this,e)}keys(){return[...this.storage.keys()].map(e=>Se.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 Do(this.key,this.parser)}};let Nr=Do;Nr.REGISTRY=new Do(Se.create("root"));var yn;(function(e){e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function");function t(n){const r=new Nr(Se.create(n));return Nr.REGISTRY.register(r.key,r),r}})(yn||(yn={}));class Ae{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(U,F,B){return{x:U,y:F,z:B}}e.context=t;class n extends e{constructor(F){super(),this.input=F}compute(F){return this.transform(F,this.input.compute(F))}}const r=ir.parser(yn.NOISE,nr.fromJson);function i(U,F=i){var K,ne,we,Je,ot,Ue,Ve,Ge,ft,qe,Ze,Ne,at,gt,se,vt,be,_e,it,Oe;if(typeof U=="string")return new a(ir.reference(yn.DENSITY_FUNCTION,Se.parse(U)));if(typeof U=="number")return new o(U);const B=(K=G.readObject(U))!=null?K:{},j=(ne=G.readString(B.type))==null?void 0:ne.replace(/^minecraft:/,"");switch(j){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 c((we=G.readNumber(B.xz_scale))!=null?we:1,(Je=G.readNumber(B.y_scale))!=null?Je:1,(ot=G.readNumber(B.xz_factor))!=null?ot:80,(Ue=G.readNumber(B.y_factor))!=null?Ue:160,(Ve=G.readNumber(B.smear_scale_multiplier))!=null?Ve:8);case"flat_cache":return new g(F(B.argument));case"interpolated":return new u(F(B.argument));case"cache_2d":return new m(F(B.argument));case"cache_once":return new x(F(B.argument));case"cache_all_in_cell":return new d(F(B.argument));case"noise":return new f((Ge=G.readNumber(B.xz_scale))!=null?Ge:1,(ft=G.readNumber(B.y_scale))!=null?ft:1,r(B.noise));case"end_islands":return new p;case"weird_scaled_sampler":return new A(F(B.input),G.readEnum(B.rarity_value_mapper,v),r(B.noise));case"shifted_noise":return new D(F(B.shift_x),F(B.shift_y),F(B.shift_z),(qe=G.readNumber(B.xz_scale))!=null?qe:1,(Ze=G.readNumber(B.y_scale))!=null?Ze:1,r(B.noise));case"range_choice":return new C(F(B.input),(Ne=G.readNumber(B.min_inclusive))!=null?Ne:0,(at=G.readNumber(B.max_exclusive))!=null?at:1,F(B.when_in_range),F(B.when_out_of_range));case"shift_a":return new I(r(B.argument));case"shift_b":return new M(r(B.argument));case"shift":return new L(r(B.argument));case"blend_density":return new $(F(B.argument));case"clamp":return new H(F(B.input),(gt=G.readNumber(B.min))!=null?gt:0,(se=G.readNumber(B.max))!=null?se:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new he(j,F(B.argument));case"add":case"mul":case"min":case"max":return new z(G.readEnum(j,xe),F(B.argument1),F(B.argument2));case"spline":return new Y(Js.fromJson(B.spline,F));case"constant":return new o((vt=G.readNumber(B.argument))!=null?vt:0);case"y_clamped_gradient":return new te((be=G.readInt(B.from_y))!=null?be:-4064,(_e=G.readInt(B.to_y))!=null?_e:4062,(it=G.readNumber(B.from_value))!=null?it:-4064,(Oe=G.readNumber(B.to_value))!=null?Oe:4062)}return o.ZERO}e.fromJson=i;const s=class extends e{constructor(U){super(),this.value=U}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let o=s;o.ZERO=new s(0),o.ONE=new s(1),e.Constant=o;class a extends e{constructor(F){super(),this.holder=F}compute(F){return this.holder.value().compute(F)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=a;class l extends e.Constant{constructor(F,B,j){super(F),this.min=B,this.max=j}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=l;class c extends e{constructor(F,B,j,K,ne,we){super(),this.xzScale=F,this.yScale=B,this.xzFactor=j,this.yFactor=K,this.smearScaleMultiplier=ne,this.blendedNoise=we}compute(F){var B,j;return(j=(B=this.blendedNoise)==null?void 0:B.sample(F.x,F.y,F.z))!=null?j:0}maxValue(){var F,B;return(B=(F=this.blendedNoise)==null?void 0:F.maxValue)!=null?B:0}}e.OldBlendedNoise=c;class h extends e{constructor(F){super(),this.wrapped=F}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class g extends h{constructor(F){super(F),this.lastValue=0}compute(F){const B=F.x>>2,j=F.z>>2;return(this.lastQuartX!==B||this.lastQuartZ!==j)&&(this.lastValue=this.wrapped.compute(e.context(B<<2,0,j<<2)),this.lastQuartX=B,this.lastQuartZ=j),this.lastValue}mapAll(F){return F.map(new g(this.wrapped.mapAll(F)))}}e.FlatCache=g;class d extends h{constructor(F){super(F)}compute(F){return this.wrapped.compute(F)}mapAll(F){return F.map(new d(this.wrapped.mapAll(F)))}}e.CacheAllInCell=d;class m extends h{constructor(F){super(F),this.lastValue=0}compute(F){const B=F.x,j=F.z;return(this.lastBlockX!==B||this.lastBlockZ!==j)&&(this.lastValue=this.wrapped.compute(F),this.lastBlockX=B,this.lastBlockZ=j),this.lastValue}mapAll(F){return F.map(new m(this.wrapped.mapAll(F)))}}e.Cache2D=m;class x extends h{constructor(F){super(F),this.lastValue=0}compute(F){const B=F.x,j=F.y,K=F.z;return(this.lastBlockX!==B||this.lastBlockY!==j||this.lastBlockZ!==K)&&(this.lastValue=this.wrapped.compute(F),this.lastBlockX=B,this.lastBlockY=j,this.lastBlockZ=K),this.lastValue}mapAll(F){return F.map(new x(this.wrapped.mapAll(F)))}}e.CacheOnce=x;class u extends h{constructor(F,B=4,j=4){super(F),this.cellWidth=B,this.cellHeight=j,this.values=new Map}compute({x:F,y:B,z:j}){const K=this.cellWidth,ne=this.cellHeight,we=(F%K+K)%K/K,Je=(B%ne+ne)%ne/ne,ot=(j%K+K)%K/K,Ue=Math.floor(F/K)*K,Ve=Math.floor(B/ne)*ne,Ge=Math.floor(j/K)*K;return qm(we,Je,ot,()=>this.computeCorner(Ue,Ve,Ge),()=>this.computeCorner(Ue+K,Ve,Ge),()=>this.computeCorner(Ue,Ve+ne,Ge),()=>this.computeCorner(Ue+K,Ve+ne,Ge),()=>this.computeCorner(Ue,Ve,Ge+K),()=>this.computeCorner(Ue+K,Ve,Ge+K),()=>this.computeCorner(Ue,Ve+ne,Ge+K),()=>this.computeCorner(Ue+K,Ve+ne,Ge+K))}computeCorner(F,B,j){return Ki(this.values,`${F} ${B} ${j}`,()=>this.wrapped.compute(e.context(F,B,j)))}mapAll(F){return F.map(new u(this.wrapped.mapAll(F)))}withCellSize(F,B){return new u(this.wrapped,F,B)}}e.Interpolated=u;class f extends e{constructor(F,B,j,K){super(),this.xzScale=F,this.yScale=B,this.noiseData=j,this.noise=K}compute(F){var B,j;return(j=(B=this.noise)==null?void 0:B.sample(F.x*this.xzScale,F.y*this.yScale,F.z*this.xzScale))!=null?j:0}maxValue(){var F,B;return(B=(F=this.noise)==null?void 0:F.maxValue)!=null?B:2}}e.Noise=f;class p extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return .5625}}const v=["type_1","type_2"],E=class extends n{constructor(U,F,B,j){super(U),this.rarityValueMapper=F,this.noiseData=B,this.noise=j,this.mapper=E.ValueMapper[this.rarityValueMapper]}transform(U,F){if(!this.noise)return 0;const B=this.mapper(F);return B*Math.abs(this.noise.sample(U.x/B,U.y/B,U.z/B))}mapAll(U){return U.map(new E(this.input.mapAll(U),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return this.rarityValueMapper==="type_1"?2:3}static rarityValueMapper1(U){return U<-.5?.75:U<0?1:U<.5?1.5:2}static rarityValueMapper2(U){return U<-.75?.5:U<-.5?.75:U<.5?1:U<.75?2:3}};let A=E;A.ValueMapper={type_1:E.rarityValueMapper1,type_2:E.rarityValueMapper2},e.WeirdScaledSampler=A;class D extends f{constructor(F,B,j,K,ne,we,Je){super(K,ne,we,Je),this.shiftX=F,this.shiftY=B,this.shiftZ=j}compute(F){var ne,we;const B=F.x*this.xzScale+this.shiftX.compute(F),j=F.y*this.yScale+this.shiftY.compute(F),K=F.z*this.xzScale+this.shiftZ.compute(F);return(we=(ne=this.noise)==null?void 0:ne.sample(B,j,K))!=null?we:0}mapAll(F){return F.map(new D(this.shiftX.mapAll(F),this.shiftY.mapAll(F),this.shiftZ.mapAll(F),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=D;class C extends e{constructor(F,B,j,K,ne){super(),this.input=F,this.minInclusive=B,this.maxExclusive=j,this.whenInRange=K,this.whenOutOfRange=ne}compute(F){const B=this.input.compute(F);return this.minInclusive<=B&&B<this.maxExclusive?this.whenInRange.compute(F):this.whenOutOfRange.compute(F)}mapAll(F){return F.map(new C(this.input.mapAll(F),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(F),this.whenOutOfRange.mapAll(F)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=C;class k extends e{constructor(F,B){super(),this.noiseData=F,this.offsetNoise=B}compute(F){var B,j;return(j=(B=this.offsetNoise)==null?void 0:B.sample(F.x*.25,F.y*.25,F.z*.25))!=null?j:0}maxValue(){var F,B;return((B=(F=this.offsetNoise)==null?void 0:F.maxValue)!=null?B:2)*4}}e.ShiftNoise=k;class I extends k{constructor(F,B){super(F,B)}compute(F){return super.compute(e.context(F.x,0,F.z))}withNewNoise(F){return new I(this.noiseData,F)}}e.ShiftA=I;class M extends k{constructor(F,B){super(F,B)}compute(F){return super.compute(e.context(F.z,F.x,0))}withNewNoise(F){return new M(this.noiseData,F)}}e.ShiftB=M;class L extends k{constructor(F,B){super(F,B)}withNewNoise(F){return new L(this.noiseData,F)}}e.Shift=L;class $ extends n{constructor(F){super(F)}transform(F,B){return B}mapAll(F){return F.map(new $(this.input.mapAll(F)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=$;class H extends n{constructor(F,B,j){super(F),this.min=B,this.max=j}transform(F,B){return js(B,this.min,this.max)}mapAll(F){return F.map(new H(this.input.mapAll(F),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=H;const ee=class extends n{constructor(U,F,B,j){super(F),this.type=U,this.min=B,this.max=j,this.transformer=ee.MappedTypes[this.type]}transform(U,F){return this.transformer(F)}mapAll(U){return U.map(new ee(this.type,this.input.mapAll(U)))}minValue(){var U;return(U=this.min)!=null?U:-1/0}maxValue(){var U;return(U=this.max)!=null?U:1/0}withMinMax(){const U=this.input.minValue();let F=this.transformer(U),B=this.transformer(this.input.maxValue());return(this.type==="abs"||this.type==="square")&&(B=Math.max(F,B),F=Math.max(0,U)),new ee(this.type,this.input,F,B)}};let he=ee;he.MappedTypes={abs:U=>Math.abs(U),square:U=>U*U,cube:U=>U*U*U,half_negative:U=>U>0?U:U*.5,quarter_negative:U=>U>0?U:U*.25,squeeze:U=>{const F=js(U,-1,1);return F/2-F*F*F/24}},e.Mapped=he;const xe=["add","mul","min","max"];class z extends e{constructor(F,B,j,K,ne){super(),this.type=F,this.argument1=B,this.argument2=j,this.min=K,this.max=ne}compute(F){const B=this.argument1.compute(F);switch(this.type){case"add":return B+this.argument2.compute(F);case"mul":return B===0?0:B*this.argument2.compute(F);case"min":return B<this.argument2.minValue()?B:Math.min(B,this.argument2.compute(F));case"max":return B>this.argument2.maxValue()?B:Math.max(B,this.argument2.compute(F))}}mapAll(F){return F.map(new z(this.type,this.argument1.mapAll(F),this.argument2.mapAll(F)))}minValue(){var F;return(F=this.min)!=null?F:-1/0}maxValue(){var F;return(F=this.max)!=null?F:1/0}withMinMax(){const F=this.argument1.minValue(),B=this.argument2.minValue(),j=this.argument1.maxValue(),K=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(F>=K||B>=j)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let ne,we;switch(this.type){case"add":ne=F+B,we=j+K;break;case"mul":ne=F>0&&B>0?F*B||0:j<0&&K<0?j*K||0:Math.min(F*K||0,B*j||0),we=F>0&&B>0?j*K||0:j<0&&K<0?F*B||0:Math.max(F*B||0,j*K||0);break;case"min":ne=Math.min(F,B),we=Math.min(j,K);break;case"max":ne=Math.max(F,B),we=Math.max(j,K);break}return new z(this.type,this.argument1,this.argument2,ne,we)}}e.Ap2=z;class Y extends e{constructor(F){super(),this.spline=F}compute(F){return this.spline.compute(F)}mapAll(F){const B=this.spline.mapAll(j=>j instanceof e?j.mapAll(F):j);return B.calculateMinMax(),F.map(new Y(B))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=Y;class te extends e{constructor(F,B,j,K){super(),this.fromY=F,this.toY=B,this.fromValue=j,this.toValue=K}compute(F){return zc(F.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=te})(Ae||(Ae={}));class qa{constructor(t,n){this.level=t,this.type=n}at(t){return t<this.level?this.type:ht.AIR}}var Gs;(function(e){function t(n){return{compute({x:r,y:i,z:s},o){if(!(o>0))return n(r,i,s).at(i)}}}e.createDisabled=t})(Gs||(Gs={}));var Za;(function(e){function n(u,f,p,v,E,A){return new a(u,f,p,v,E,A)}e.target=n;function r(u,f,p,v,E,A,D){return new o(i(u),i(f),i(p),i(v),i(E),i(A),D)}e.parameters=r;function i(u,f){return typeof u=="number"?new s(u,f!=null?f:u):u}e.param=i;class s{constructor(f,p){this.min=f,this.max=p}distance(f){const p=(typeof f=="number"?f:f.min)-this.max,v=this.min-(typeof f=="number"?f:f.max);return p>0?p:Math.max(v,0)}union(f){return new s(Math.min(this.min,f.min),Math.max(this.max,f.max))}static fromJson(f){var E;if(typeof f=="number")return new s(f,f);const[p,v]=(E=G.readArray(f,A=>G.readNumber(A)))!=null?E:[];return new s(p!=null?p:0,v!=null?v:0)}}e.Param=s;class o{constructor(f,p,v,E,A,D,C){this.temperature=f,this.humidity=p,this.continentalness=v,this.erosion=E,this.depth=A,this.weirdness=D,this.offset=C}fittness(f){return cn(this.temperature.distance(f.temperature))+cn(this.humidity.distance(f.humidity))+cn(this.continentalness.distance(f.continentalness))+cn(this.erosion.distance(f.erosion))+cn(this.depth.distance(f.depth))+cn(this.weirdness.distance(f.weirdness))+cn(this.offset-f.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new s(this.offset,this.offset)]}static fromJson(f){var v,E;const p=(v=G.readObject(f))!=null?v:{};return new o(s.fromJson(p.temperature),s.fromJson(p.humidity),s.fromJson(p.continentalness),s.fromJson(p.erosion),s.fromJson(p.depth),s.fromJson(p.weirdness),(E=G.readInt(p.offset))!=null?E:0)}}e.ParamPoint=o;class a{constructor(f,p,v,E,A,D){this.temperature=f,this.humidity=p,this.continentalness=v,this.erosion=E,this.depth=A,this.weirdness=D}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(f){this.things=f,this.index=new g(f)}find(f){return this.index.search(f,(p,v)=>p.distance(v))}}e.Parameters=l;class c{constructor(f,p,v,E,A,D){this.temperature=f,this.humidity=p,this.continentalness=v,this.erosion=E,this.depth=A,this.weirdness=D}static fromRouter(f){return new e.Sampler(f.temperature,f.vegetation,f.continents,f.erosion,f.depth,f.ridges)}sample(f,p,v){const E=Ae.context(f<<2,p<<2,v<<2);return e.target(this.temperature.compute(E),this.humidity.compute(E),this.continentalness.compute(E),this.erosion.compute(E),this.depth.compute(E),this.weirdness.compute(E))}}e.Sampler=c;const h=class{constructor(u){this.root=h.build(u.map(([f,p])=>new x(f,p)))}static build(u){if(u.length===1)return u[0];if(u.length<=h.CHILDREN_PER_NODE){const E=u.map(A=>{let D=0;for(let C=0;C<7;C+=1){const k=A.space[C];D+=Math.abs((k.min+k.max)/2)}return{key:D,node:A}}).sort((A,D)=>A.key-D.key).map(({node:A})=>A);return new m(E)}let f=1/0,p=-1,v=[];for(let E=0;E<7;++E){u=h.sort(u,E,!1),v=h.bucketize(u);let A=0;for(const D of v)A+=h.area(D.space);f>A&&(f=A,p=E)}return u=h.sort(u,p,!1),v=h.bucketize(u),v=h.sort(v,p,!0),new m(v.map(E=>h.build(E.children)))}static sort(u,f,p){return u.map(v=>{const E=v.space[f],A=(E.min+E.max)/2;return{key:p?Math.abs(A):A,node:v}}).sort((v,E)=>v.key-E.key).map(({node:v})=>v)}static bucketize(u){const f=[];let p=[];const v=Math.pow(10,Math.floor(Math.log(u.length-.01)/Math.log(10)));for(const E of u)p.push(E),!(p.length<v)&&(f.push(new m(p)),p=[]);return p.length!==0&&f.push(new m(p)),f}static area(u){let f=0;for(const p of u)f+=Math.abs(p.max-p.min);return f}search(u,f){return this.root.search(u.toArray(),f).thing()}};let g=h;g.CHILDREN_PER_NODE=10,e.RTree=g;class d{constructor(f){this.space=f}distance(f){let p=0;for(let v=0;v<7;v+=1)p+=cn(this.space[v].distance(f[v]));return p}}e.RNode=d;class m extends d{constructor(f){super(m.buildSpace(f)),this.children=f}static buildSpace(f){let p=[...Array(7)].map(()=>new s(1/0,-1/0));for(const v of f)p=[...Array(7)].map((E,A)=>p[A].union(v.space[A]));return p}search(f,p){let v=1/0,E=null;for(const A of this.children){const D=p(A,f);if(v<=D)continue;const C=A.search(f,p),k=A==C?D:p(C,f);v<=k||(v=k,E=C)}return E}}e.RSubTree=m;class x extends d{constructor(f,p){super(f.space()),this.thing=p}search(){return this}}e.RLeaf=x})(Za||(Za={}));class Or{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,s;const n=(i=G.readObject(t))!=null?i:{},r=Se.parse((s=G.readString(n.biome))!=null?s:"minecraft:the_void");return new Or(r)}}var Xt;(function(e){e.TEMPERATURE=t("temperature",-10,[1.5,0,1,0,0,0]),e.VEGETATION=t("vegetation",-8,[1,1,0,0,0,0]),e.CONTINENTALNESS=t("continentalness",-9,[1,1,2,2,2,1,1,1,1]),e.EROSION=t("erosion",-9,[1,1,0,1,1]),e.TEMPERATURE_LARGE=t("temperature_large",-12,[1.5,0,1,0,0,0]),e.VEGETATION_LARGE=t("vegetation_large",-10,[1,1,0,0,0,0]),e.CONTINENTALNESS_LARGE=t("continentalness_large",-11,[1,1,2,2,2,1,1,1,1]),e.EROSION_LARGE=t("erosion_large",-11,[1,1,0,1,1]),e.RIDGE=t("ridge",-7,[1,2,1,0,0,0]),e.SHIFT=t("offset",-3,[1,1,1,0]),e.AQUIFER_BARRIER=t("aquifer_barrier",-3,[1]),e.AQUIFER_FLUID_LEVEL_FLOODEDNESS=t("aquifer_fluid_level_floodedness",-7,[1]),e.AQUIFER_FLUID_LEVEL_SPREAD=t("aquifer_fluid_level_spread",-5,[1]),e.AQUIFER_LAVA=t("aquifer_lava",-1,[1]),e.PILLAR=t("pillar",-7,[1,1]),e.PILLAR_RARENESS=t("pillar_rareness",-8,[1]),e.PILLAR_THICKNESS=t("pillar_thickness",-8,[1]),e.SPAGHETTI_2D=t("spaghetti_2d",-8,[1]),e.SPAGHETTI_2D_ELEVATION=t("spaghetti_2d_elevation",-8,[1]),e.SPAGHETTI_2D_MODULATOR=t("spaghetti_2d_modulator",-8,[1]),e.SPAGHETTI_2D_THICKNESS=t("spaghetti_2d_thickness",-8,[1]),e.SPAGHETTI_3D_1=t("spaghetti_3d_1",-8,[1]),e.SPAGHETTI_3D_2=t("spaghetti_3d_2",-8,[1]),e.SPAGHETTI_3D_RARITY=t("spaghetti_3d_rarity",-8,[1]),e.SPAGHETTI_3D_THICKNESS=t("spaghetti_3d_thickness",-8,[1]),e.SPAGHETTI_ROUGHNESS=t("spaghetti_roughness",-8,[1]),e.SPAGHETTI_ROUGHNESS_MODULATOR=t("spaghetti_roughness_modulator",-8,[1]),e.CAVE_ENTRANCE=t("cave_entrance",-7,[.4,.5,1]),e.CAVE_LAYER=t("cave_layer",-8,[1]),e.CAVE_CHEESE=t("cave_cheese",-8,[.5,1,2,1,2,1,0,2,0]),e.NOODLE=t("noodle",-8,[1]),e.NOODLE_THICKNESS=t("noodle_thickness",-8,[1]),e.NOODLE_RIDGE_A=t("noodle_ridge_a",-7,[1]),e.NOODLE_RIDGE_B=t("noodle_ridge_b",-7,[1]),e.JAGGED=t("jagged",-16,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),e.SURFACE=t("surface",-6,[1,1,1]),e.SURFACE_SECONDARY=t("surface_secondary",-6,[1,1,0,1]);function t(i,s,o){return yn.NOISE.register(Se.create(i),nr.create(s,o))}const n=new Map;function r(i,s){var h;const o=(h=s.key())==null?void 0:h.toString();if(!o)throw new Error("Cannot instantiate noise from direct holder");const a=i.seedKey(),l=n.get(o);if(l&&l[0]===a[0]&&l[1]===a[1])return l[2];const c=new qi(i.fromHashOf(o),s.value());return n.set(o,[a[0],a[1],c]),c}e.instantiate=r})(Xt||(Xt={}));var lt;(function(e){function t(o){var l,c,h,g,d;const a=(l=G.readObject(o))!=null?l:{};return{minY:(c=G.readInt(a.min_y))!=null?c:0,height:(h=G.readInt(a.height))!=null?h:256,xzSize:(g=G.readInt(a.size_horizontal))!=null?g:1,ySize:(d=G.readInt(a.size_vertical))!=null?d:1}}e.fromJson=t;function n(o){return o.ySize<<2}e.cellHeight=n;function r(o){return o.xzSize<<2}e.cellWidth=r;function i(o){return o.height/n(o)}e.cellCountY=i;function s(o){return Math.floor(o.minY/n(o))}e.minCellY=s})(lt||(lt={}));var Qa;(function(e){function t(r){var s,o,a,l;const i=(s=G.readObject(r))!=null?s:{};return{target:(o=G.readNumber(i.target))!=null?o:0,size:(a=G.readInt(i.size))!=null?a:0,offset:(l=G.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,s){if(r.size<=0)return i;const o=(s-r.offset)/r.size;return Ao(r.target,i,o)}e.apply=n})(Qa||(Qa={}));var sr;(function(e){const t=a=>ir.parser(yn.DENSITY_FUNCTION,Ae.fromJson)(a).value();function n(a){var c;const l=(c=G.readObject(a))!=null?c:{};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 ue({barrier:Ae.Constant.ZERO,fluidLevelFloodedness:Ae.Constant.ZERO,fluidLevelSpread:Ae.Constant.ZERO,lava:Ae.Constant.ZERO,temperature:Ae.Constant.ZERO,vegetation:Ae.Constant.ZERO,continents:Ae.Constant.ZERO,erosion:Ae.Constant.ZERO,depth:Ae.Constant.ZERO,ridges:Ae.Constant.ZERO,initialDensityWithoutJaggedness:Ae.Constant.ZERO,finalDensity:Ae.Constant.ZERO,veinToggle:Ae.Constant.ZERO,veinRidged:Ae.Constant.ZERO,veinGap:Ae.Constant.ZERO},a)}e.create=r;function i(a,l,c,h=!1){const g=(h?new bt(c):ze.create(c)).forkPositional(),d=new s(g,l);return Re(ue({},d.mapAll(a)),{aquiferPositionalRandomFactory:g.fromHashOf(Se.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:g.fromHashOf(Se.create("ore").toString()).forkPositional()})}e.withSettings=i;class s{constructor(l,c){this.random=l,this.settings=c,this.mapped=new Map}map(l){if(l instanceof Ae.HolderHolder){const c=l.holder.key();if(c!==void 0&&this.mapped.has(c.toString()))return this.mapped.get(c.toString());{const h=l.holder.value().mapAll(this);return c!==void 0&&this.mapped.set(c.toString(),h),h}}if(l instanceof Ae.Interpolated)return l.withCellSize(lt.cellWidth(this.settings),lt.cellHeight(this.settings));if(l instanceof Ae.ShiftedNoise){const c=Xt.instantiate(this.random,l.noiseData);return new Ae.ShiftedNoise(l.shiftX,l.shiftY,l.shiftZ,l.xzScale,l.yScale,l.noiseData,c)}return l instanceof Ae.Noise?new Ae.Noise(l.xzScale,l.yScale,l.noiseData,Xt.instantiate(this.random,l.noiseData)):l instanceof Ae.ShiftNoise?l.withNewNoise(Xt.instantiate(this.random,l.noiseData)):l instanceof Ae.WeirdScaledSampler?new Ae.WeirdScaledSampler(l.input,l.rarityValueMapper,l.noiseData,Xt.instantiate(this.random,l.noiseData)):l instanceof Ae.OldBlendedNoise?new Ae.OldBlendedNoise(l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier,new t1(this.random.fromHashOf(Se.create("terrain").toString()),l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier)):l instanceof Ae.Mapped||l instanceof Ae.Ap2?l.withMinMax():l}mapAll(l){return{barrier:l.barrier.mapAll(this),fluidLevelFloodedness:l.fluidLevelFloodedness.mapAll(this),fluidLevelSpread:l.fluidLevelSpread.mapAll(this),lava:l.lava.mapAll(this),temperature:l.temperature.mapAll(this),vegetation:l.vegetation.mapAll(this),continents:l.continents.mapAll(this),erosion:l.erosion.mapAll(this),depth:l.depth.mapAll(this),ridges:l.ridges.mapAll(this),initialDensityWithoutJaggedness:l.initialDensityWithoutJaggedness.mapAll(this),finalDensity:l.finalDensity.mapAll(this),veinToggle:l.veinToggle.mapAll(this),veinRidged:l.veinRidged.mapAll(this),veinGap:l.veinGap.mapAll(this)}}}e.Visitor=s;function o(a,l,c,h){const g=lt.minCellY(a)+lt.cellCountY(a),d=lt.minCellY(a),m=lt.cellHeight(a);for(let x=g;x>=d;x-=1){const u=x*m;if(js(l.compute(Ae.context(c,u,h)),-64,64)>=.390625)return u}return Number.MAX_SAFE_INTEGER}e.computePreliminarySurfaceLevelScanning=o})(sr||(sr={}));class s1{constructor(t,n,r,i,s,o,a,l,c){this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.router=i,this.minX=s,this.minZ=o,this.settings=a,this.preliminarySurfaceLevel=new Map,this.cellWidth=lt.cellWidth(a),this.cellHeight=lt.cellHeight(a),this.firstCellX=Math.floor(s/this.cellWidth),this.firstCellZ=Math.floor(o/this.cellWidth),this.firstNoiseX=s>>2,this.firstNoiseZ=o>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=Gs.createDisabled(c);const h=this.router.finalDensity;this.materialRule=Ys.fromList([g=>this.aquifer.compute(g,h.compute(g))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Ki(this.preliminarySurfaceLevel,Et.asLong(t,n),()=>sr.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}var Ys;(function(e){function t(n){return r=>{for(const i of n){const s=i(r);if(s)return s}}}e.fromList=t})(Ys||(Ys={}));var kr;(function(e){function t(s){var a,l,c,h;const o=(a=G.readObject(s))!=null?a:{};return o.absolute!==void 0?n((l=G.readNumber(o.absolute))!=null?l:0):o.above_bottom!==void 0?r((c=G.readNumber(o.above_bottom))!=null?c:0):o.below_top!==void 0?i((h=G.readNumber(o.below_top))!=null?h:0):()=>0}e.fromJson=t;function n(s){return()=>s}function r(s){return o=>o.minY+s}function i(s){return o=>o.maxY-s}})(kr||(kr={}));var Ws;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(Ws||(Ws={}));class o1{constructor(t,n,r){this.rule=t,this.defaultBlock=n,this.random=ze.create(r).forkPositional(),this.surfaceNoise=Xt.instantiate(this.random,Xt.SURFACE),this.surfaceSecondaryNoise=Xt.instantiate(this.random,Xt.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const s=Et.minBlockX(t.pos),o=Et.minBlockZ(t.pos),a=new a1(this,t,n,r,i),l=this.rule(a);for(let c=0;c<16;c+=1){const h=s+c;for(let g=0;g<1;g+=1){const d=o+g;a.updateXZ(h,d);let m=0,x=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER;for(let f=t.maxY;f>=t.minY;f-=1){const p=rr.create(h,f,d),v=t.getBlockState(p);if(v.equals(ht.AIR)){m=0,x=Number.MIN_SAFE_INTEGER;continue}if(v.isFluid()){x===Number.MIN_SAFE_INTEGER&&(x=f+1);continue}if(u>=f){u=Number.MIN_SAFE_INTEGER;for(let D=f-1;D>=t.minY;D-=1){const C=t.getBlockState(rr.create(h,D,d));if(C.equals(ht.AIR)||C.isFluid()){u=D+1;break}}}m+=1;const E=f-u+1;if(!v.equals(this.defaultBlock))continue;a.updateY(m,E,x,f);const A=l(h,f,d);A&&t.setBlockState(p,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 Ki(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class a1{constructor(t,n,r,i,s){this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=s,this.blockX=0,this.blockY=0,this.blockZ=0,this.stoneDepthAbove=0,this.stoneDepthBelow=0,this.surfaceDepth=0,this.waterHeight=0,this.biome=()=>"",this.surfaceSecondary=()=>0,this.minSurfaceLevel=()=>0}updateXZ(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=fs(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=fs(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=fs(()=>this.getBiome(rr.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,s=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),o=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i+1<<4),l=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i+1<<4);return Math.floor(Vs((t&15)/16,(n&15)/16,s,o,a,l))+this.surfaceDepth-8}}var Ks;(function(e){e.NOOP=()=>()=>{};function t(s){var l,c,h;const o=(l=G.readObject(s))!=null?l:{};switch((c=G.readString(o.type))==null?void 0:c.replace(/^minecraft:/,"")){case"block":return n(ht.fromJson(o.result_state));case"sequence":return r((h=G.readArray(o.sequence,e.fromJson))!=null?h:[]);case"condition":return i(qs.fromJson(o.if_true),e.fromJson(o.then_run))}return e.NOOP}e.fromJson=t;function n(s){return()=>()=>s}e.block=n;function r(s){return o=>{const a=s.map(l=>l(o));return(l,c,h)=>{for(const g of a){const d=g(l,c,h);if(d)return d}}}}e.sequence=r;function i(s,o){return a=>(l,c,h)=>{if(s(a))return o(a)(l,c,h)}}e.condition=i})(Ks||(Ks={}));var qs;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(c){var d,m,x,u,f,p,v,E,A,D,C,k;const h=(d=G.readObject(c))!=null?d:{};switch((m=G.readString(h.type))==null?void 0:m.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((x=G.readArray(h.biome_is,I=>{var M;return(M=G.readString(I))!=null?M:""}))!=null?x:[]);case"not":return i(e.fromJson(h.invert));case"stone_depth":return s((u=G.readInt(h.offset))!=null?u:0,(f=G.readBoolean(h.add_surface_depth))!=null?f:!1,(p=G.readInt(h.secondary_depth_range))!=null?p:0,G.readString(h.surface_type)==="ceiling");case"vertical_gradient":return o((v=G.readString(h.random_name))!=null?v:"",kr.fromJson(h.true_at_and_below),kr.fromJson(h.false_at_and_above));case"water":return a((E=G.readInt(h.offset))!=null?E:0,(A=G.readInt(h.surface_depth_multiplier))!=null?A:0,(D=G.readBoolean(h.add_surface_depth))!=null?D:!1);case"y_above":return l(kr.fromJson(h.anchor),(C=G.readInt(h.surface_depth_multiplier))!=null?C:0,(k=G.readBoolean(h.add_surface_depth))!=null?k:!1)}return e.FALSE}e.fromJson=t;function n(){return c=>c.blockY>=c.minSurfaceLevel()}e.abovePreliminarySurface=n;function r(c){const h=new Set(c);return g=>h.has(g.biome())}e.biome=r;function i(c){return h=>!c(h)}e.not=i;function s(c,h,g,d){return m=>{const x=d?m.stoneDepthBelow:m.stoneDepthAbove,u=h?m.surfaceDepth:0,f=g===0?0:Wa(m.surfaceSecondary(),-1,1,0,g);return x<=1+c+u+f}}e.stoneDepth=s;function o(c,h,g){return d=>{const m=h(d.context),x=g(d.context);if(d.blockY<=m)return!0;if(d.blockY>=x)return!1;const u=d.system.getRandom(c),f=Wa(d.blockY,m,x,1,0);return u.nextFloat()<f}}e.verticalGradient=o;function a(c,h,g){return d=>{if(d.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const m=g?d.stoneDepthAbove:0;return d.blockY+m>=d.waterHeight+c+d.surfaceDepth*h}}e.water=a;function l(c,h,g){return d=>{const m=g?d.stoneDepthAbove:0;return d.blockY+m>=c(d.context)+d.surfaceDepth*h}}e.yAbove=l})(qs||(qs={}));class l1{constructor(t,n,r){this.biomeSource=n,this.settings=r,this.router=sr.withSettings(r.noiseRouter,r.noise,t,r.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new o1(r.surfaceRule,r.defaultBlock,t);const i=new qa(-54,ht.LAVA),s=new qa(r.seaLevel,r.defaultFluid);this.globalFluidPicker=(o,a,l)=>a<Math.min(-54,r.seaLevel)?i:s}fill(t,n=!1){var m;const r=Math.max(t.minY,this.settings.noise.minY),i=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),s=lt.cellWidth(this.settings.noise),o=lt.cellHeight(this.settings.noise),a=Math.floor(16/s),l=Math.floor(r/o),c=Math.floor((i-r)/o),h=Et.minBlockX(t.pos),g=Et.minBlockZ(t.pos),d=this.getNoiseChunk(t);for(let x=0;x<a;x+=1)for(let u=0;u<(n?1:a);u+=1){let f=t.getOrCreateSection(t.sectionsCount-1);for(let p=c-1;p>=0;p-=1)for(let v=o-1;v>=0;v-=1){const E=(l+p)*o+v,A=E&15,D=t.getSectionIndex(E);t.getSectionIndex(f.minBlockY)!==D&&(f=t.getOrCreateSection(D));for(let C=0;C<s;C+=1){const k=h+x*s+C,I=k&15;for(let M=0;M<(n?1:s);M+=1){const L=g+u*s+M,$=L&15,H=(m=d.getFinalState(k,E,L))!=null?m:this.settings.defaultBlock;f.setBlockState(I,A,$,H)}}}}}buildSurface(t,n="minecraft:plains"){const r=this.getNoiseChunk(t),i=Ws.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,r,i,()=>n)}getNoiseChunk(t){return Ki(this.noiseChunkCache,Et.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=lt.cellWidth(this.settings.noise),s=lt.cellHeight(this.settings.noise),o=Math.floor(16/i),a=Math.floor(n/s),l=Math.floor((r-n)/s),c=Et.minBlockX(t.pos),h=Et.minBlockZ(t.pos);return new s1(o,l,a,this.router,c,h,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var Zs;(function(e){function t(n){var i,s,o,a,l,c;const r=(i=G.readObject(n))!=null?i:{};return{surfaceRule:Ks.fromJson(r.surface_rule),noise:lt.fromJson(r.noise),defaultBlock:ht.fromJson(r.default_block),defaultFluid:ht.fromJson(r.default_fluid),noiseRouter:sr.fromJson(r.noise_router),seaLevel:(s=G.readInt(r.sea_level))!=null?s:0,disableMobGeneration:(o=G.readBoolean(r.disable_mob_generation))!=null?o:!1,aquifersEnabled:(a=G.readBoolean(r.aquifers_enabled))!=null?a:!1,oreVeinsEnabled:(l=G.readBoolean(r.ore_veins_enabled))!=null?l:!1,legacyRandomSource:(c=G.readBoolean(r.legacy_random_source))!=null?c:!1}}e.fromJson=t})(Zs||(Zs={}));let el=!1;async function u1(){el||(await Nc(Ja),el=!0,console.debug(`Loaded deepslate-rs from "${Ja}"`))}const c1={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 tl,nl;async function h1(e,t,n){var x,u,f;const{biomeSource:r}=await jc(e,n),i=t.data,s=-Math.round(n.offset[0])-100+n.res/2,o=-Math.round(n.offset[1])-100+n.res/2,a=t.width*4/n.res,l=4/n.res,c=[s*n.scale,(200+s)*n.scale,n.res*n.scale],h=[o*n.scale,(200+o)*n.scale,n.res*n.scale],g=n.layers.has("biomes")?(x=r.getBiomes)==null?void 0:x.call(r,...c,64,65,1,...h):void 0,d=[...n.layers].filter(p=>p!=="biomes"),m=d.length===0||(u=r.getClimates)==null?void 0:u.call(r,...c,64,65,1,...h);for(let p=0;p<200;p+=n.res)for(let v=0;v<200;v+=n.res){const E=v*a+p*l,A=p/n.res*200/n.res+v/n.res,D=(p+s)*n.scale,C=(v+o)*n.scale;let k=[50,50,50];if(n.layers.has("biomes")){const I=(f=g==null?void 0:g[A])!=null?f:r.getBiome(D,64,C);k=p1(I.toString(),n.biomeColors)}else if(m&&d[0]){const I=m[A][d[0]],[M,L]=c1[d[0]],$=(I-M)/(L-M)*256;k=[$,$,$]}i[E]=k[0],i[E+1]=k[1],i[E+2]=k[2],i[E+3]=255}}async function f1(e,t,n,r){var a;const{biomeSource:i}=await jc(e,r),[s,o]=m1([t,n],r);return ue({biome:i.getBiome(s,64,o).toString()},(a=i.getClimate)==null?void 0:a.call(i,s,64,o))}async function jc(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return In(n,tl)||(tl=Ji(n),nl=await d1(e,t)),{biomeSource:nl}}async function d1(e,t){var n,r,i,s,o;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new Or(Se.parse(e.biome));case"checkerboard":const a=((r=e.scale)!=null?r:2)+2,l=(s=(i=e.biomes)==null?void 0:i.length)!=null?s:0;return{getBiome(c,h,g){var m;const d=(((c>>a)+(g>>a))%l+l)%l;return Se.parse((m=e.biomes)==null?void 0:m[d].node)}};case"multi_noise":switch((o=e.preset)==null?void 0:o.replace(/^minecraft:/,"")){case"nether":e=mt(t.version,"1.18")?y1:v1;break;case"overworld":e=mt(t.version,"1.18")?await x1():e;break}if(e=W.DataModel.unwrapLists(e),mt(t.version,"1.18")){await u1();const c=new rm,h=$=>typeof $=="number"?[$,$]:$,[g,d,m,x,u,f,p,v,E,A,D,C,k,I]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const $ of e.biomes){const{temperature:H,humidity:ee,continentalness:he,erosion:xe,weirdness:z,depth:Y,offset:te}=$.parameters;g.push(h(H)[0]),d.push(h(H)[1]),m.push(h(ee)[0]),x.push(h(ee)[1]),u.push(h(he)[0]),f.push(h(he)[1]),p.push(h(xe)[0]),v.push(h(xe)[1]),E.push(h(z)[0]),A.push(h(z)[1]),D.push(h(Y)[0]),C.push(h(Y)[1]),k.push(te),I.push(c.getOrPut($.biome,Math.floor(Math.random()*2147483647)))}const M=Hm(new Float64Array(g),new Float64Array(d),new Float64Array(m),new Float64Array(x),new Float64Array(u),new Float64Array(f),new Float64Array(p),new Float64Array(v),new Float64Array(E),new Float64Array(A),new Float64Array(D),new Float64Array(C),new Float64Array(k),new Int32Array(I)),L=Xm(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($,H,ee){var xe;const he=Ha(M,L,$,$+1,1,H,H+1,1,ee,ee+1,1);return Se.parse((xe=c.getA(he[0]))!=null?xe:"unknown")},getBiomes($,H,ee,he,xe,z,Y,te,U){return[...Ha(M,L,$,H,ee,he,xe,z,Y,te,U)].map(B=>{var j;return Se.parse((j=c.getA(B))!=null?j:"unknown")})},getClimate($,H,ee){const he=Xa(L,$,$+1,1,H,H+1,1,ee,ee+1,1),[xe,z,Y,te,U]=he.slice(0,5);return{temperature:xe,humidity:z,continentalness:Y,erosion:te,weirdness:U}},getClimates($,H,ee,he,xe,z,Y,te,U){const F=Xa(L,$,H,ee,he,xe,z,Y,te,U),B=[];for(let j=0;j<F.length;j+=7){const[K,ne,we,Je,ot]=F.slice(j,j+5);B.push({temperature:K,humidity:ne,continentalness:we,erosion:Je,weirdness:ot})}return B}}}else{const c=["altitude","temperature","humidity","weirdness"].map((h,g)=>{var m;const d=e[`${h}_noise`];return d.firstOctave=wt((m=d.firstOctave)!=null?m:-7,-100,-1),new qi(new bt(t.seed+BigInt(g)),d)});return!Array.isArray(e.biomes)||e.biomes.length===0?new Or(Se.create("unknown")):{getBiome(h,g,d){const m=c.map(f=>f.sample(h,d,0));let x=1/0,u="";for(const{biome:f,parameters:p}of e.biomes){const v=mr(p.altitude-m[0])+mr(p.temperature-m[1])+mr(p.humidity-m[2])+mr(p.weirdness-m[3])+mr(p.offset);v<x&&(x=v,u=f)}return Se.parse(u)}}}}throw new Error("Unknown biome source")}function p1(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:g1[e];return n===void 0?pc(e):n}function m1([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 g1={"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]},v1={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}}]},y1={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 x1(){return(await vc("1.18","dimension","overworld")).generator.biome_source}const En=[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],rl=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function w1(e,t,n){const r=new bt(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new Pe(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:o=>r.nextInt(o),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(o){return _1(o,this)}};for(let o=0;o<n.size[0]/16;o+=1)for(let a=0;a<n.size[2]/16;a+=1)mt(n.version,void 0,"1.17")?jn([o*16,0,a*16],W.DataModel.unwrapLists(e),i):D1([o*16,0,a*16],W.DataModel.unwrapLists(e.placement),i);const s=t.data;t.data.fill(255);for(const[o,a]of i.placements){if(o[0]<0||o[1]<0||o[2]<0||o[0]>=n.size[0]||o[1]>=n.size[1]||o[2]>=n.size[2])continue;const l=o[2]*(t.width*4)+o[0]*4,c=a<rl.length?rl[a]:pc(i.features[a]);s[l]=wt(50,205,c[0]),s[l+1]=wt(50,205,c[1]),s[l+2]=wt(50,205,c[2]),s[l+3]=255}for(let o=0;o<n.size[0];o+=1)for(let a=0;a<n.size[2];a+=1){if((Math.floor(o/16)+Math.floor(a/16))%2===0)continue;const l=a*(t.width*4)+o*4;for(let c=0;c<3;c+=1)s[l+c]=.85*s[l+c]}}function or(e){return e.startsWith("minecraft:")?e.slice(10):e}function St(e,t){return[[e[0],t,e[2]]]}function _1(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(or(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 wt(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(wt(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const s=e.distribution.reduce((a,l)=>a+l.weight,0);let o=t.nextInt(s);for(const a of e.distribution)if(o-=a.weight,o<0)return t.sampleInt(a.data);return 0}return 1}function $t(e,t){if(!Nn(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 E1(e,t){var n,r,i,s;if(!Nn(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return $t(e);switch(or(e.type)){case"constant":return $t(e.value);case"uniform":{const o=$t(e.min_inclusive),a=$t(e.max_inclusive);return o+t.nextInt(a-o+1)}case"biased_to_bottom":{const o=$t(e.min_inclusive),a=$t(e.max_inclusive),l=t.nextInt(a-o-((n=e.inner)!=null?n:1)+1);return o+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const o=$t(e.min_inclusive),a=$t(e.max_inclusive),l=(i=e.inner)!=null?i:1,c=o+l+t.nextInt(a-o-l+1),h=o+t.nextInt(c-o);return o+t.nextInt(h-o+l)}case"trapezoid":{const o=$t(e.min_inclusive),a=$t(e.max_inclusive),l=(s=e.plateau)!=null?s:0;if(l>=a-o)return o+t.nextInt(a-o+1);const c=(a-o-l)/2,h=a-o-c;return o+t.nextInt(h+1)+t.nextInt(c+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function il(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function jn(e,t,n){var s;if(typeof t=="string"){n.placements.push([e,il(t,n)]);return}const r=or((s=t==null?void 0:t.type)!=null?s:"no_op"),i=A1[r];i?i(t.config,e,n):n.placements.push([e,il(JSON.stringify(t),n)])}function Qs(e,t,n){var s;const r=or((s=t==null?void 0:t.type)!=null?s:"nope"),i=b1[r];return i?i(t==null?void 0:t.config,e,n):[e]}const A1={decorated:(e,t,n)=>{Qs(t,e==null?void 0:e.decorator,n).forEach(i=>jn(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;jn(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const s of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=s==null?void 0:s.chance)!=null?i:0)){jn(t,s.feature,n);return}jn(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,s,o;const r=(o=e==null?void 0:e.features)==null?void 0:o[n.nextInt((s=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?s:0)];jn(t,r,n)}},b1={chance:(e,t,n)=>{var r;return n.nextFloat()<1/((r=e==null?void 0:e.chance)!=null?r:1)?[t]:[]},count:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t)},count_extra:(e,t,n)=>{var i,s;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(s=e.extra_count)!=null?s:0),new Array(r).fill(t)},count_multilayer:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t).map(i=>[i[0]+n.nextInt(16),i[1],i[2]+n.nextInt(16)])},count_noise:(e,t,n)=>{const i=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(i).fill(t)},count_noise_biased:(e,t,n)=>{var o;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),s=Math.max(0,Math.ceil((i+((o=e.noise_offset)!=null?o:0))*e.noise_to_count_ratio));return new Array(s).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const s=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],o=Math.max(n.seaLevel,En[wt(0,63,s)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[s,o,a]}),decorated:(e,t,n)=>Qs(t,e==null?void 0:e.outer,n).flatMap(r=>Qs(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,s,o,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((s=e==null?void 0:e.spread)!=null?s:0)-((o=e.spread)!=null?o:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return St(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,En[wt(0,63,t[0])]);return St(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,En[wt(0,63,t[0])]);return St(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,En[wt(0,63,t[0])]);return St(t,r)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var r,i;if(n.nextInt(((r=e.chance)!=null?r:1)/10)===0){const s=n.nextInt(n.nextInt(248)+8);if(s<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const o=n.nextInt(16)+t[0],a=n.nextInt(16)+t[2];return[[o,s,a]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,s,o;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0);return St(t,r)},range_biased:(e,t,n)=>{var i,s,o;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0));return St(t,r)},range_very_biased:(e,t,n)=>{var i,s,o,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return St(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return St(t,r)},top_solid_heightmap:(e,t)=>{const n=En[wt(0,63,t[0])];return St(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return St(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var s,o;const n=En[wt(0,63,t[0])],r=n+((s=e==null?void 0:e.min_inclusive)!=null?s:-1/0),i=n+((o=e==null?void 0:e.max_inclusive)!=null?o:1/0);return t[1]<r||t[1]>i?[t]:[]},water_lake:(e,t,n)=>{var r;return n.nextInt((r=e.chance)!=null?r:1)===0?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function D1(e,t,n){var i;let r=[e];for(const s of t)!sl[or((i=s==null?void 0:s.type)!=null?i:"nope")]||(r=r.flatMap(a=>sl[or(s.type)](s,a,n)));for(const s of r)n.placements.push([s,0])}const sl={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)=>St(t,E1(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,En[wt(0,63,e[0])]);return St(e,n)},in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},r,i)=>{const s=Math.max(1,t),o=i.biomeInfoNoise.sample(r[0]/s,0,r[2]/s),a=Math.max(0,Math.ceil((o+(n!=null?n:0))*e));return new Array(a).fill(r)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},r,i)=>{const o=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(o).fill(r)},random_offset:({xz_spread:e,y_spread:t},n,r)=>[[n[0]+r.sampleInt(e),n[1]+r.sampleInt(t),n[2]+r.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(e!=null?e:1)?[t]:[]};class C1{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 bt(t);this.minLimitPerlinNoise=new Pe(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new Pe(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new Pe(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new Pe(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,s){this.settings=t,this.chunkWidth=t.size_horizontal*4,this.chunkHeight=t.size_vertical*4,this.chunkCountY=Math.floor(t.height/this.chunkHeight),t.amplified&&n>0&&(n=1+n*2,r=1+r*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(r*.9+.1),this.noiseColumnCache=Array(s).fill(null),this.xOffset=i}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),r=Math.floor(t/this.chunkWidth),i=Math.floor(t%this.chunkWidth)/this.chunkWidth,s=this.fillNoiseColumn(r),o=this.fillNoiseColumn(r+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let l=this.chunkHeight;l>=0;l-=1){const c=l/this.chunkHeight,h=a*this.chunkHeight+l;n[h]=nm(c,i,s[a],s[a+1],o[a],o[a+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const r=Array(this.chunkCountY+1),i=684.412*this.settings.sampling.xz_scale,s=684.412*this.settings.sampling.y_scale,o=i/this.settings.sampling.xz_factor,a=s/this.settings.sampling.y_factor,l=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let c=0;c<=this.chunkCountY;c+=1){let h=this.sampleAndClampNoise(t,c,this.mainPerlinNoise.getOctaveNoise(0).zo,i,s,o,a);const m=((1-c*2/this.chunkCountY+l)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;h+=m*(m>0?4:1),this.settings.top_slide.size>0&&(h=ls(this.settings.top_slide.target,h,(this.chunkCountY-c-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(h=ls(this.settings.bottom_slide.target,h,(c-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),r[c]=h}return this.noiseColumnCache[t-this.xOffset]=r,r}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),i=(n<0?-n*.3:n)*24.575625-2;return i<0?i*.009486607142857142:Math.min(i,1)*.006640625}sampleAndClampNoise(t,n,r,i,s,o,a){let l=0,c=0,h=0,g=1;for(let d=0;d<16;d+=1){const m=Pe.wrap(t*i*g),x=Pe.wrap(n*s*g),u=Pe.wrap(r*i*g),f=s*g,p=this.minLimitPerlinNoise.getOctaveNoise(d);p&&(l+=p.sample(m,x,u,f,n*f)/g);const v=this.maxLimitPerlinNoise.getOctaveNoise(d);if(v&&(c+=v.sample(m,x,u,f,n*f)/g),d<8){const E=this.mainPerlinNoise.getOctaveNoise(d);E&&(h+=E.sample(Pe.wrap(t*o*g),Pe.wrap(n*a*g),Pe.wrap(r*o*g),a*g,n*a*g)/g)}g/=2}return ls(l/512,c/512,(h/10+1)/2)}}const Co=0,S1={"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 ol,ms,Ii=[];const gs=new Map;async function k1(e,t,n){var o,a,l;if(mt(n.version,"1.18")){mt(n.version,"1.18.2")&&await Vc(n.version);const{settings:c,generator:h}=await N1(e,n),g=new L1(-n.offset,n.width,c.noise.minY,c.noise.height);g.generate(h,n.biome);const d=t.data;for(let m=0;m<n.width;m+=1)for(let x=0;x<c.noise.height;x+=1){const u=m*4+(c.noise.height-x-1)*4*t.width,f=g.getBlockState([m-n.offset,x+c.noise.minY,Co]),p=(o=S1[f.getName().toString()])!=null?o:[0,0,0];d[u]=p[0],d[u+1]=p[1],d[u+2]=p[2],d[u+3]=255}return}const r=new C1(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,s=t.width*4;for(let c=0;c<n.width;c+=1){const h=r.iterateNoiseColumn(c-n.offset).reverse();for(let g=0;g<e.noise.height;g+=1){const d=g*s+c*4,m=O1(h,g);i[d]=m,i[d+1]=m,i[d+2]=m,i[d+3]=255}}}function F1(e,t){const n=Ii.find(r=>Et.minBlockX(r.pos)<=e&&Et.maxBlockX(r.pos)>=e);if(!!n)return n.getBlockState(rr.create(e,t,Co))}async function I1(e,t,n){const{fn:r,settings:i}=await B1(e,n),s=Array(n.width*i.height);let o=1/0,a=-1/0;for(let c=0;c<n.width;c+=1)for(let h=0;h<i.height;h+=1){const g=c+(i.height-h-1)*n.width,d=r.compute(Ae.context(c-n.offset,h,0));o=Math.min(o,d),a=Math.max(a,d),s[g]=d}const l=t.data;for(let c=0;c<n.width*i.height;c+=1){const h=Math.floor(zc(s[c],o,a,0,256));l[4*c]=h,l[4*c+1]=h,l[4*c+2]=h,l[4*c+3]=255}}async function B1(e,t){await Vc(t.version);const n=ze.create(t.seed).forkPositional(),r=lt.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:Ae.fromJson(e).mapAll(new sr.Visitor(n,r)),settings:r}}const T1=[["worldgen/noise",nr],["worldgen/density_function",Ae]];async function Vc(e){var n;const t=(n=gs.get(e))!=null?n:new Nr(new Se("misode","temp"));gs.has(e)||(await Promise.all(T1.map(([r,i])=>M1(e,t,r,i))),gs.set(e,t)),yn.DENSITY_FUNCTION.clear().assign(t.getOrThrow(Se.create("worldgen/density_function"))),yn.NOISE.clear().assign(t.getOrThrow(Se.create("worldgen/noise")))}async function M1(e,t,n,r){const i=await mm(e,n),s=new Nr(Se.create(n));for(const[o,a]of i.entries())s.register(Se.parse(o),r.fromJson(a));t.register(s.key,s)}async function N1(e,t){const n=Zs.fromJson(W.DataModel.unwrapLists(e)),r=[e,`${t.seed}`,t.biome];if(!In(r,ol))if(ol=Ji(r),Ii=[],mt(t.version,"1.18.2")){const i=new Or(Se.create("unknown"));ms=new l1(t.seed,i,n)}else{const i=await Ee(()=>import("./deepslate.esm.a2c3a9f5.js"),[]),s=new i.FixedBiome("unknown");ms=new i.NoiseChunkGenerator(t.seed,s,n)}return{settings:n,generator:ms}}function O1(e,t){return e[t]>0?0:e[t+1]>0?150:255}class L1{constructor(t,n,r,i){this.minX=t,this.done=[],this.chunks=[...Array(Math.ceil(n/16)+1)].map((s,o)=>{const a=(t>>4)+o,l=Ii.find(c=>c.pos[0]===a);return l?(this.done[o]=!0,l):new i1(r,i,Et.create(a,Co>>4))})}generate(t,n){this.chunks.forEach((r,i)=>{this.done[i]||(t.fill(r,!0),t.buildSurface(r,n),this.done[i]=!0,Ii.push(r))})}getBlockState(t){const n=(t[0]>>4)-(this.minX>>4);return this.chunks[n].getBlockState(t)}}function R1(e,t,n){const r=new bt(n.seed),i=nr.fromJson(W.DataModel.unwrapLists(e)),s=new qi(r,i),o=-n.offset[0]-100,a=-n.offset[1]-100,l=t.data;for(let c=0;c<256;c+=1)for(let h=0;h<256;h+=1){const g=c*4+h*4*256,d=(c+o)*n.scale,m=(h+a)*n.scale,x=(s.sample(d,m,0)+1)*128;l[g]=x,l[g+1]=x,l[g+2]=x,l[g+3]=255}}const P1=["biomes","temperature","humidity","continentalness","erosion","weirdness"],$1=({model:e,data:t,shown:n,version:r})=>{var C,k;const{locale:i}=je(),[s]=J(sn()),[o,a]=J(2),[l,c]=J(void 0),[h,g]=J(new Set(["biomes"])),d=Te([0,0]),m=Te(1),x=Te(),u=BigInt((C=e.get(new W.Path(["generator","seed"])))!=null?C:s),f=$e(()=>{if(!!n)return U1(e.get(new W.Path(["generator","settings"])))},[n]),p=n?z1(t,f):"",v=(k=t.type)==null?void 0:k.replace(/^minecraft:/,""),{canvas:E,redraw:A}=qr({size(){return[200/m.current,200/m.current]},async draw(I){const M={octaves:f,biomeColors:{},layers:h,offset:d.current,scale:o,seed:u,res:m.current,version:r};await h1(t,I,M),m.current===4&&(clearTimeout(x.current),x.current=setTimeout(()=>{m.current=1,A()},150))},async onDrag(I,M){d.current[0]=d.current[0]+I*200,d.current[1]=d.current[1]+M*200,clearTimeout(x.current),m.current=v==="multi_noise"?4:1,A()},async onHover(I,M){const L={octaves:f,biomeColors:{},layers:h,offset:d.current,scale:o,seed:s,res:1,version:r},$=await f1(t,Math.floor(I*200),Math.floor(M*200),L);c($)},onLeave(){c(void 0)}},[p,o,s,h]);ce(()=>{n&&(m.current=v==="multi_noise"?4:1,A())},[p,o,s,h,n]);const D=I=>{d.current[0]=d.current[0]*o/I,d.current[1]=d.current[1]*o/I,a(I)};return w(pe,null,w("div",{class:"controls preview-controls"},l&&w(ae,{label:l.biome,class:"no-pointer"}),v==="multi_noise"&&w(pt,{icon:"stack",tooltip:i("configure_layers")},P1.map(I=>{const M=h.has(I);return w(ae,{label:i(`layer.${I}`),active:M,tooltip:i(M?"enabled":"disabled"),onClick:L=>{g(new Set([I])),L.stopPropagation()}})})),(v==="multi_noise"||v==="checkerboard")&&w(pe,null,w(ae,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>D(o*1.5)}),w(ae,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>D(o/1.5)})),v==="multi_noise"&&w(ae,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>cc(e)})),(l==null?void 0:l.temperature)!==void 0&&w("div",{class:"controls secondary-controls"},w(ae,{class:"no-pointer",label:Object.entries(l).filter(([I])=>I!=="biome").map(([I,M])=>`${I[0].toUpperCase()}: ${M.toFixed(2)}`).join(" ")})),w("canvas",{ref:E,width:"200",height:"200"}))};function z1(e,t){return JSON.stringify([e,t])}function U1(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 j1=({data:e,version:t,shown:n})=>{const{locale:r}=je(),[i,s]=J(4),[o,a]=J(sn()),{canvas:l,redraw:c}=qr({size(){return[i*16,i*16]},async draw(g){w1(e,g,{seed:o,version:t,size:[i*16,128,i*16]})}}),h=JSON.stringify(e);return ce(()=>{n&&c()},[h,i,o,n]),w(pe,null,w("div",{class:"controls preview-controls"},w(ae,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>s(Math.min(16,i+1))}),w(ae,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>s(Math.max(1,i-1))}),w(ae,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(sn())})),w("canvas",{ref:l,width:"64",height:"64"}))},V1=({data:e,shown:t,version:n})=>{var f,p;const{locale:r}=je(),[i,s]=J(sn()),[o,a]=J(!1),[l,c]=J(void 0),h=Te(0),g=Te(void 0),d=JSON.stringify([e]),m=(p=(f=e==null?void 0:e.noise)==null?void 0:f.height)!=null?p:256,{canvas:x,redraw:u}=qr({size(){return[m,m]},async draw(v){const E={offset:h.current,width:v.width,seed:i,version:n};await I1(e,v,E)},async onDrag(v){h.current+=v*m,u()},async onHover(v,E){var C,k;const A=Math.floor(v*m-h.current),D=m-Math.max(1,Math.ceil(E*m))+((k=(C=e==null?void 0:e.noise)==null?void 0:C.min_y)!=null?k:0);c(`X=${A} Y=${D}`)},onLeave(){c(void 0)}},[d,i]);return ce(()=>{g.current&&clearInterval(g.current),t&&(u(),o&&(g.current=setInterval(()=>{h.current-=8,u()},100)))},[d,i,t,o]),w(pe,null,w("div",{class:"controls preview-controls"},l&&w(ae,{label:l,class:"no-pointer"}),w(pt,{icon:"gear",tooltip:r("terrain_settings")},w(ae,{icon:o?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>a(!o)})),w(ae,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(sn())})),w("canvas",{ref:x,width:m,height:m}))},H1=({data:e,shown:t,version:n})=>{const{locale:r}=je(),[i,s]=J(sn()),[o,a]=J(2),l=Te([0,0]),c=JSON.stringify([e]),{canvas:h,redraw:g}=qr({size(){return[256,256]},async draw(m){const x={offset:l.current,scale:o,seed:i,version:n};R1(e,m,x)},async onDrag(m,x){l.current[0]=l.current[0]+m*256,l.current[1]=l.current[1]+x*256,g()}},[c,o,i]);ce(()=>{t&&g()},[c,o,i,t]);const d=m=>{l.current[0]=l.current[0]*o/m,l.current[1]=l.current[1]*o/m,a(m)};return w(pe,null,w("div",{class:"controls preview-controls"},w(ae,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>d(o*1.5)}),w(ae,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>d(o/1.5)}),w(ae,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(sn())})),w("canvas",{ref:h,width:"256",height:"256"}))},X1=({data:e,shown:t,version:n})=>{var k,I;const{locale:r}=je(),[i,s]=J(sn()),[o,a]=J("minecraft:plains"),[l,c]=J(.2),[h,g]=J(.1),[d,m]=J(!1),[x,u]=J(void 0),f=Te(0),p=Te(void 0),v=JSON.stringify([e,l,h]),E=(I=(k=e==null?void 0:e.noise)==null?void 0:k.height)!=null?I:256,{canvas:A,redraw:D}=qr({size(){return[E,E]},async draw(M){const L={biome:o,biomeDepth:h,biomeScale:l,offset:f.current,width:M.width,seed:i,version:n};await k1(e,M,L)},async onDrag(M){f.current+=M*E,D()},async onHover(M,L){var he,xe;const $=Math.floor(M*E-f.current),H=E-Math.max(1,Math.ceil(L*E))+((xe=(he=e==null?void 0:e.noise)==null?void 0:he.min_y)!=null?xe:0),ee=F1($,H);u(ee?`Y=${H} (${ee.getName().path})`:`Y=${H}`)},onLeave(){u(void 0)}},[v,i]);ce(()=>{p.current&&clearInterval(p.current),t&&(async()=>{try{await D(),d&&(p.current=setInterval(()=>{f.current-=8,D()},100))}catch(M){throw M}})()},[v,i,t,o,l,h,d]);const C=$e(()=>{var M;return(M=pi==null?void 0:pi.get("worldgen/biome"))!=null?M:[]},[n]);return w(pe,null,w("div",{class:"controls preview-controls"},x&&w(ae,{label:x,class:"no-pointer"}),w(pt,{icon:"gear",tooltip:r("terrain_settings")},mt(n,void 0,"1.17")?w(pe,null,w(di,{label:r("preview.scale"),value:`${l}`,onChange:M=>c(Number(M))}),w(di,{label:r("preview.depth"),value:`${h}`,onChange:M=>g(Number(M))})):w(di,{label:r("preview.biome"),value:o,onChange:a,dataList:C,larger:!0}),w(ae,{icon:d?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>m(!d)})),w(ae,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(sn())})),w("canvas",{ref:A,width:E,height:E}))},J1=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function G1({model:e,version:t,id:n,shown:r}){var s;const[,i]=J(0);if(Gi(e,()=>{i(o=>o+1)}),!e)return w(pe,null);if(n==="dimension"&&((s=e.get(new W.Path(["generator","type"])))==null?void 0:s.endsWith("noise"))){const o=e.get(new W.Path(["generator","biome_source"]));if(o)return w($1,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/density_function"){const o=e.get(new W.Path([]));if(o)return w(V1,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/noise"){const o=e.get(new W.Path([]));if(o)return w(H1,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/noise_settings"){const o=e.get(new W.Path([]));if(o)return w(X1,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&mt(t,"1.16","1.17")){const o=e.get(new W.Path([]));if(o)return w(j1,{model:e,version:t,shown:r,data:o})}return w(pe,null)}var Hc={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(yr,function(){return function(n){var r={};function i(s){if(r[s])return r[s].exports;var o=r[s]={exports:{},id:s,loaded:!1};return n[s].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}return i.m=n,i.c=r,i.p="",i(0)}([function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(1),o=i(3),a=i(8),l=i(15);function c(x,u,f){var p=null,v=function(L,$){f&&f(L,$),p&&p.visit(L,$)},E=typeof f=="function"?v:null,A=!1;if(u){A=typeof u.comment=="boolean"&&u.comment;var D=typeof u.attachComment=="boolean"&&u.attachComment;(A||D)&&(p=new s.CommentHandler,p.attach=D,u.comment=!0,E=v)}var C=!1;u&&typeof u.sourceType=="string"&&(C=u.sourceType==="module");var k;u&&typeof u.jsx=="boolean"&&u.jsx?k=new o.JSXParser(x,u,E):k=new a.Parser(x,u,E);var I=C?k.parseModule():k.parseScript(),M=I;return A&&p&&(M.comments=p.comments),k.config.tokens&&(M.tokens=k.tokens),k.config.tolerant&&(M.errors=k.errorHandler.errors),M}r.parse=c;function h(x,u,f){var p=u||{};return p.sourceType="module",c(x,p,f)}r.parseModule=h;function g(x,u,f){var p=u||{};return p.sourceType="script",c(x,p,f)}r.parseScript=g;function d(x,u,f){var p=new l.Tokenizer(x,u),v;v=[];try{for(;;){var E=p.getNextToken();if(!E)break;f&&(E=f(E)),v.push(E)}}catch(A){p.errorHandler.tolerate(A)}return p.errorHandler.tolerant&&(v.errors=p.errors()),v}r.tokenize=d;var m=i(2);r.Syntax=m.Syntax,r.version="4.0.1"},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(2),o=function(){function a(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return a.prototype.insertInnerComments=function(l,c){if(l.type===s.Syntax.BlockStatement&&l.body.length===0){for(var h=[],g=this.leading.length-1;g>=0;--g){var d=this.leading[g];c.end.offset>=d.start&&(h.unshift(d.comment),this.leading.splice(g,1),this.trailing.splice(g,1))}h.length&&(l.innerComments=h)}},a.prototype.findTrailingComments=function(l){var c=[];if(this.trailing.length>0){for(var h=this.trailing.length-1;h>=0;--h){var g=this.trailing[h];g.start>=l.end.offset&&c.unshift(g.comment)}return this.trailing.length=0,c}var d=this.stack[this.stack.length-1];if(d&&d.node.trailingComments){var m=d.node.trailingComments[0];m&&m.range[0]>=l.end.offset&&(c=d.node.trailingComments,delete d.node.trailingComments)}return c},a.prototype.findLeadingComments=function(l){for(var c=[],h;this.stack.length>0;){var g=this.stack[this.stack.length-1];if(g&&g.start>=l.start.offset)h=g.node,this.stack.pop();else break}if(h){for(var d=h.leadingComments?h.leadingComments.length:0,m=d-1;m>=0;--m){var x=h.leadingComments[m];x.range[1]<=l.start.offset&&(c.unshift(x),h.leadingComments.splice(m,1))}return h.leadingComments&&h.leadingComments.length===0&&delete h.leadingComments,c}for(var m=this.leading.length-1;m>=0;--m){var g=this.leading[m];g.start<=l.start.offset&&(c.unshift(g.comment),this.leading.splice(m,1))}return c},a.prototype.visitNode=function(l,c){if(!(l.type===s.Syntax.Program&&l.body.length>0)){this.insertInnerComments(l,c);var h=this.findTrailingComments(c),g=this.findLeadingComments(c);g.length>0&&(l.leadingComments=g),h.length>0&&(l.trailingComments=h),this.stack.push({node:l,start:c.start.offset})}},a.prototype.visitComment=function(l,c){var h=l.type[0]==="L"?"Line":"Block",g={type:h,value:l.value};if(l.range&&(g.range=l.range),l.loc&&(g.loc=l.loc),this.comments.push(g),this.attach){var d={comment:{type:h,value:l.value,range:[c.start.offset,c.end.offset]},start:c.start.offset};l.loc&&(d.comment.loc=l.loc),l.type=h,this.leading.push(d),this.trailing.push(d)}},a.prototype.visit=function(l,c){l.type==="LineComment"?this.visitComment(l,c):l.type==="BlockComment"?this.visitComment(l,c):this.attach&&this.visitNode(l,c)},a}();r.CommentHandler=o},function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(n,r,i){var s=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var v in p)p.hasOwnProperty(v)&&(f[v]=p[v])};return function(f,p){u(f,p);function v(){this.constructor=f}f.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(4),a=i(5),l=i(6),c=i(7),h=i(8),g=i(13),d=i(14);g.TokenName[100]="JSXIdentifier",g.TokenName[101]="JSXText";function m(u){var f;switch(u.type){case l.JSXSyntax.JSXIdentifier:var p=u;f=p.name;break;case l.JSXSyntax.JSXNamespacedName:var v=u;f=m(v.namespace)+":"+m(v.name);break;case l.JSXSyntax.JSXMemberExpression:var E=u;f=m(E.object)+"."+m(E.property);break}return f}var x=function(u){s(f,u);function f(p,v,E){return u.call(this,p,v,E)||this}return f.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():u.prototype.parsePrimaryExpression.call(this)},f.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},f.prototype.finishJSX=function(){this.nextToken()},f.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},f.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},f.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},f.prototype.scanXHTMLEntity=function(p){for(var v="&",E=!0,A=!1,D=!1,C=!1;!this.scanner.eof()&&E&&!A;){var k=this.scanner.source[this.scanner.index];if(k===p)break;if(A=k===";",v+=k,++this.scanner.index,!A)switch(v.length){case 2:D=k==="#";break;case 3:D&&(C=k==="x",E=C||o.Character.isDecimalDigit(k.charCodeAt(0)),D=D&&!C);break;default:E=E&&!(D&&!o.Character.isDecimalDigit(k.charCodeAt(0))),E=E&&!(C&&!o.Character.isHexDigit(k.charCodeAt(0)));break}}if(E&&A&&v.length>2){var I=v.substr(1,v.length-2);D&&I.length>1?v=String.fromCharCode(parseInt(I.substr(1),10)):C&&I.length>2?v=String.fromCharCode(parseInt("0"+I.substr(1),16)):!D&&!C&&d.XHTMLEntities[I]&&(v=d.XHTMLEntities[I])}return v},f.prototype.lexJSX=function(){var p=this.scanner.source.charCodeAt(this.scanner.index);if(p===60||p===62||p===47||p===58||p===61||p===123||p===125){var v=this.scanner.source[this.scanner.index++];return{type:7,value:v,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(p===34||p===39){for(var E=this.scanner.index,A=this.scanner.source[this.scanner.index++],D="";!this.scanner.eof();){var C=this.scanner.source[this.scanner.index++];if(C===A)break;C==="&"?D+=this.scanXHTMLEntity(A):D+=C}return{type:8,value:D,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:E,end:this.scanner.index}}if(p===46){var k=this.scanner.source.charCodeAt(this.scanner.index+1),I=this.scanner.source.charCodeAt(this.scanner.index+2),v=k===46&&I===46?"...":".",E=this.scanner.index;return this.scanner.index+=v.length,{type:7,value:v,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:E,end:this.scanner.index}}if(p===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(p)&&p!==92){var E=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var C=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(C)&&C!==92)++this.scanner.index;else if(C===45)++this.scanner.index;else break}var M=this.scanner.source.slice(E,this.scanner.index);return{type:100,value:M,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:E,end:this.scanner.index}}return this.scanner.lex()},f.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var p=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(p)),p},f.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var p=this.scanner.index,v="";!this.scanner.eof();){var E=this.scanner.source[this.scanner.index];if(E==="{"||E==="<")break;++this.scanner.index,v+=E,o.Character.isLineTerminator(E.charCodeAt(0))&&(++this.scanner.lineNumber,E==="\r"&&this.scanner.source[this.scanner.index]===`
|
|
`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var A={type:101,value:v,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:p,end:this.scanner.index};return v.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(A)),A},f.prototype.peekJSXToken=function(){var p=this.scanner.saveState();this.scanner.scanComments();var v=this.lexJSX();return this.scanner.restoreState(p),v},f.prototype.expectJSX=function(p){var v=this.nextJSXToken();(v.type!==7||v.value!==p)&&this.throwUnexpectedToken(v)},f.prototype.matchJSX=function(p){var v=this.peekJSXToken();return v.type===7&&v.value===p},f.prototype.parseJSXIdentifier=function(){var p=this.createJSXNode(),v=this.nextJSXToken();return v.type!==100&&this.throwUnexpectedToken(v),this.finalize(p,new a.JSXIdentifier(v.value))},f.prototype.parseJSXElementName=function(){var p=this.createJSXNode(),v=this.parseJSXIdentifier();if(this.matchJSX(":")){var E=v;this.expectJSX(":");var A=this.parseJSXIdentifier();v=this.finalize(p,new a.JSXNamespacedName(E,A))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var D=v;this.expectJSX(".");var C=this.parseJSXIdentifier();v=this.finalize(p,new a.JSXMemberExpression(D,C))}return v},f.prototype.parseJSXAttributeName=function(){var p=this.createJSXNode(),v,E=this.parseJSXIdentifier();if(this.matchJSX(":")){var A=E;this.expectJSX(":");var D=this.parseJSXIdentifier();v=this.finalize(p,new a.JSXNamespacedName(A,D))}else v=E;return v},f.prototype.parseJSXStringLiteralAttribute=function(){var p=this.createJSXNode(),v=this.nextJSXToken();v.type!==8&&this.throwUnexpectedToken(v);var E=this.getTokenRaw(v);return this.finalize(p,new c.Literal(v.value,E))},f.prototype.parseJSXExpressionAttribute=function(){var p=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var v=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(p,new a.JSXExpressionContainer(v))},f.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},f.prototype.parseJSXNameValueAttribute=function(){var p=this.createJSXNode(),v=this.parseJSXAttributeName(),E=null;return this.matchJSX("=")&&(this.expectJSX("="),E=this.parseJSXAttributeValue()),this.finalize(p,new a.JSXAttribute(v,E))},f.prototype.parseJSXSpreadAttribute=function(){var p=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var v=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(p,new a.JSXSpreadAttribute(v))},f.prototype.parseJSXAttributes=function(){for(var p=[];!this.matchJSX("/")&&!this.matchJSX(">");){var v=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();p.push(v)}return p},f.prototype.parseJSXOpeningElement=function(){var p=this.createJSXNode();this.expectJSX("<");var v=this.parseJSXElementName(),E=this.parseJSXAttributes(),A=this.matchJSX("/");return A&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(p,new a.JSXOpeningElement(v,A,E))},f.prototype.parseJSXBoundaryElement=function(){var p=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var v=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(p,new a.JSXClosingElement(v))}var E=this.parseJSXElementName(),A=this.parseJSXAttributes(),D=this.matchJSX("/");return D&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(p,new a.JSXOpeningElement(E,D,A))},f.prototype.parseJSXEmptyExpression=function(){var p=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(p,new a.JSXEmptyExpression)},f.prototype.parseJSXExpressionContainer=function(){var p=this.createJSXNode();this.expectJSX("{");var v;return this.matchJSX("}")?(v=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),v=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(p,new a.JSXExpressionContainer(v))},f.prototype.parseJSXChildren=function(){for(var p=[];!this.scanner.eof();){var v=this.createJSXChildNode(),E=this.nextJSXText();if(E.start<E.end){var A=this.getTokenRaw(E),D=this.finalize(v,new a.JSXText(E.value,A));p.push(D)}if(this.scanner.source[this.scanner.index]==="{"){var C=this.parseJSXExpressionContainer();p.push(C)}else break}return p},f.prototype.parseComplexJSXElement=function(p){for(var v=[];!this.scanner.eof();){p.children=p.children.concat(this.parseJSXChildren());var E=this.createJSXChildNode(),A=this.parseJSXBoundaryElement();if(A.type===l.JSXSyntax.JSXOpeningElement){var D=A;if(D.selfClosing){var C=this.finalize(E,new a.JSXElement(D,[],null));p.children.push(C)}else v.push(p),p={node:E,opening:D,closing:null,children:[]}}if(A.type===l.JSXSyntax.JSXClosingElement){p.closing=A;var k=m(p.opening.name),I=m(p.closing.name);if(k!==I&&this.tolerateError("Expected corresponding JSX closing tag for %0",k),v.length>0){var C=this.finalize(p.node,new a.JSXElement(p.opening,p.children,p.closing));p=v[v.length-1],p.children.push(C),v.pop()}else break}}return p},f.prototype.parseJSXElement=function(){var p=this.createJSXNode(),v=this.parseJSXOpeningElement(),E=[],A=null;if(!v.selfClosing){var D=this.parseComplexJSXElement({node:p,opening:v,closing:A,children:E});E=D.children,A=D.closing}return this.finalize(p,new a.JSXElement(v,E,A))},f.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var p=this.parseJSXElement();return this.finishJSX(),p},f.prototype.isStartOfExpression=function(){return u.prototype.isStartOfExpression.call(this)||this.match("<")},f}(h.Parser);r.JSXParser=x},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var i={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};r.Character={fromCodePoint:function(s){return s<65536?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10))+String.fromCharCode(56320+(s-65536&1023))},isWhiteSpace:function(s){return s===32||s===9||s===11||s===12||s===160||s>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(s)>=0},isLineTerminator:function(s){return s===10||s===13||s===8232||s===8233},isIdentifierStart:function(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s===92||s>=128&&i.NonAsciiIdentifierStart.test(r.Character.fromCodePoint(s))},isIdentifierPart:function(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s>=48&&s<=57||s===92||s>=128&&i.NonAsciiIdentifierPart.test(r.Character.fromCodePoint(s))},isDecimalDigit:function(s){return s>=48&&s<=57},isHexDigit:function(s){return s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102},isOctalDigit:function(s){return s>=48&&s<=55}}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(6),o=function(){function p(v){this.type=s.JSXSyntax.JSXClosingElement,this.name=v}return p}();r.JSXClosingElement=o;var a=function(){function p(v,E,A){this.type=s.JSXSyntax.JSXElement,this.openingElement=v,this.children=E,this.closingElement=A}return p}();r.JSXElement=a;var l=function(){function p(){this.type=s.JSXSyntax.JSXEmptyExpression}return p}();r.JSXEmptyExpression=l;var c=function(){function p(v){this.type=s.JSXSyntax.JSXExpressionContainer,this.expression=v}return p}();r.JSXExpressionContainer=c;var h=function(){function p(v){this.type=s.JSXSyntax.JSXIdentifier,this.name=v}return p}();r.JSXIdentifier=h;var g=function(){function p(v,E){this.type=s.JSXSyntax.JSXMemberExpression,this.object=v,this.property=E}return p}();r.JSXMemberExpression=g;var d=function(){function p(v,E){this.type=s.JSXSyntax.JSXAttribute,this.name=v,this.value=E}return p}();r.JSXAttribute=d;var m=function(){function p(v,E){this.type=s.JSXSyntax.JSXNamespacedName,this.namespace=v,this.name=E}return p}();r.JSXNamespacedName=m;var x=function(){function p(v,E,A){this.type=s.JSXSyntax.JSXOpeningElement,this.name=v,this.selfClosing=E,this.attributes=A}return p}();r.JSXOpeningElement=x;var u=function(){function p(v){this.type=s.JSXSyntax.JSXSpreadAttribute,this.argument=v}return p}();r.JSXSpreadAttribute=u;var f=function(){function p(v,E){this.type=s.JSXSyntax.JSXText,this.value=v,this.raw=E}return p}();r.JSXText=f},function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(2),o=function(){function O(R){this.type=s.Syntax.ArrayExpression,this.elements=R}return O}();r.ArrayExpression=o;var a=function(){function O(R){this.type=s.Syntax.ArrayPattern,this.elements=R}return O}();r.ArrayPattern=a;var l=function(){function O(R,V,ve){this.type=s.Syntax.ArrowFunctionExpression,this.id=null,this.params=R,this.body=V,this.generator=!1,this.expression=ve,this.async=!1}return O}();r.ArrowFunctionExpression=l;var c=function(){function O(R,V,ve){this.type=s.Syntax.AssignmentExpression,this.operator=R,this.left=V,this.right=ve}return O}();r.AssignmentExpression=c;var h=function(){function O(R,V){this.type=s.Syntax.AssignmentPattern,this.left=R,this.right=V}return O}();r.AssignmentPattern=h;var g=function(){function O(R,V,ve){this.type=s.Syntax.ArrowFunctionExpression,this.id=null,this.params=R,this.body=V,this.generator=!1,this.expression=ve,this.async=!0}return O}();r.AsyncArrowFunctionExpression=g;var d=function(){function O(R,V,ve){this.type=s.Syntax.FunctionDeclaration,this.id=R,this.params=V,this.body=ve,this.generator=!1,this.expression=!1,this.async=!0}return O}();r.AsyncFunctionDeclaration=d;var m=function(){function O(R,V,ve){this.type=s.Syntax.FunctionExpression,this.id=R,this.params=V,this.body=ve,this.generator=!1,this.expression=!1,this.async=!0}return O}();r.AsyncFunctionExpression=m;var x=function(){function O(R){this.type=s.Syntax.AwaitExpression,this.argument=R}return O}();r.AwaitExpression=x;var u=function(){function O(R,V,ve){var yt=R==="||"||R==="&&";this.type=yt?s.Syntax.LogicalExpression:s.Syntax.BinaryExpression,this.operator=R,this.left=V,this.right=ve}return O}();r.BinaryExpression=u;var f=function(){function O(R){this.type=s.Syntax.BlockStatement,this.body=R}return O}();r.BlockStatement=f;var p=function(){function O(R){this.type=s.Syntax.BreakStatement,this.label=R}return O}();r.BreakStatement=p;var v=function(){function O(R,V){this.type=s.Syntax.CallExpression,this.callee=R,this.arguments=V}return O}();r.CallExpression=v;var E=function(){function O(R,V){this.type=s.Syntax.CatchClause,this.param=R,this.body=V}return O}();r.CatchClause=E;var A=function(){function O(R){this.type=s.Syntax.ClassBody,this.body=R}return O}();r.ClassBody=A;var D=function(){function O(R,V,ve){this.type=s.Syntax.ClassDeclaration,this.id=R,this.superClass=V,this.body=ve}return O}();r.ClassDeclaration=D;var C=function(){function O(R,V,ve){this.type=s.Syntax.ClassExpression,this.id=R,this.superClass=V,this.body=ve}return O}();r.ClassExpression=C;var k=function(){function O(R,V){this.type=s.Syntax.MemberExpression,this.computed=!0,this.object=R,this.property=V}return O}();r.ComputedMemberExpression=k;var I=function(){function O(R,V,ve){this.type=s.Syntax.ConditionalExpression,this.test=R,this.consequent=V,this.alternate=ve}return O}();r.ConditionalExpression=I;var M=function(){function O(R){this.type=s.Syntax.ContinueStatement,this.label=R}return O}();r.ContinueStatement=M;var L=function(){function O(){this.type=s.Syntax.DebuggerStatement}return O}();r.DebuggerStatement=L;var $=function(){function O(R,V){this.type=s.Syntax.ExpressionStatement,this.expression=R,this.directive=V}return O}();r.Directive=$;var H=function(){function O(R,V){this.type=s.Syntax.DoWhileStatement,this.body=R,this.test=V}return O}();r.DoWhileStatement=H;var ee=function(){function O(){this.type=s.Syntax.EmptyStatement}return O}();r.EmptyStatement=ee;var he=function(){function O(R){this.type=s.Syntax.ExportAllDeclaration,this.source=R}return O}();r.ExportAllDeclaration=he;var xe=function(){function O(R){this.type=s.Syntax.ExportDefaultDeclaration,this.declaration=R}return O}();r.ExportDefaultDeclaration=xe;var z=function(){function O(R,V,ve){this.type=s.Syntax.ExportNamedDeclaration,this.declaration=R,this.specifiers=V,this.source=ve}return O}();r.ExportNamedDeclaration=z;var Y=function(){function O(R,V){this.type=s.Syntax.ExportSpecifier,this.exported=V,this.local=R}return O}();r.ExportSpecifier=Y;var te=function(){function O(R){this.type=s.Syntax.ExpressionStatement,this.expression=R}return O}();r.ExpressionStatement=te;var U=function(){function O(R,V,ve){this.type=s.Syntax.ForInStatement,this.left=R,this.right=V,this.body=ve,this.each=!1}return O}();r.ForInStatement=U;var F=function(){function O(R,V,ve){this.type=s.Syntax.ForOfStatement,this.left=R,this.right=V,this.body=ve}return O}();r.ForOfStatement=F;var B=function(){function O(R,V,ve,yt){this.type=s.Syntax.ForStatement,this.init=R,this.test=V,this.update=ve,this.body=yt}return O}();r.ForStatement=B;var j=function(){function O(R,V,ve,yt){this.type=s.Syntax.FunctionDeclaration,this.id=R,this.params=V,this.body=ve,this.generator=yt,this.expression=!1,this.async=!1}return O}();r.FunctionDeclaration=j;var K=function(){function O(R,V,ve,yt){this.type=s.Syntax.FunctionExpression,this.id=R,this.params=V,this.body=ve,this.generator=yt,this.expression=!1,this.async=!1}return O}();r.FunctionExpression=K;var ne=function(){function O(R){this.type=s.Syntax.Identifier,this.name=R}return O}();r.Identifier=ne;var we=function(){function O(R,V,ve){this.type=s.Syntax.IfStatement,this.test=R,this.consequent=V,this.alternate=ve}return O}();r.IfStatement=we;var Je=function(){function O(R,V){this.type=s.Syntax.ImportDeclaration,this.specifiers=R,this.source=V}return O}();r.ImportDeclaration=Je;var ot=function(){function O(R){this.type=s.Syntax.ImportDefaultSpecifier,this.local=R}return O}();r.ImportDefaultSpecifier=ot;var Ue=function(){function O(R){this.type=s.Syntax.ImportNamespaceSpecifier,this.local=R}return O}();r.ImportNamespaceSpecifier=Ue;var Ve=function(){function O(R,V){this.type=s.Syntax.ImportSpecifier,this.local=R,this.imported=V}return O}();r.ImportSpecifier=Ve;var Ge=function(){function O(R,V){this.type=s.Syntax.LabeledStatement,this.label=R,this.body=V}return O}();r.LabeledStatement=Ge;var ft=function(){function O(R,V){this.type=s.Syntax.Literal,this.value=R,this.raw=V}return O}();r.Literal=ft;var qe=function(){function O(R,V){this.type=s.Syntax.MetaProperty,this.meta=R,this.property=V}return O}();r.MetaProperty=qe;var Ze=function(){function O(R,V,ve,yt,is){this.type=s.Syntax.MethodDefinition,this.key=R,this.computed=V,this.value=ve,this.kind=yt,this.static=is}return O}();r.MethodDefinition=Ze;var Ne=function(){function O(R){this.type=s.Syntax.Program,this.body=R,this.sourceType="module"}return O}();r.Module=Ne;var at=function(){function O(R,V){this.type=s.Syntax.NewExpression,this.callee=R,this.arguments=V}return O}();r.NewExpression=at;var gt=function(){function O(R){this.type=s.Syntax.ObjectExpression,this.properties=R}return O}();r.ObjectExpression=gt;var se=function(){function O(R){this.type=s.Syntax.ObjectPattern,this.properties=R}return O}();r.ObjectPattern=se;var vt=function(){function O(R,V,ve,yt,is,nf){this.type=s.Syntax.Property,this.key=V,this.computed=ve,this.value=yt,this.kind=R,this.method=is,this.shorthand=nf}return O}();r.Property=vt;var be=function(){function O(R,V,ve,yt){this.type=s.Syntax.Literal,this.value=R,this.raw=V,this.regex={pattern:ve,flags:yt}}return O}();r.RegexLiteral=be;var _e=function(){function O(R){this.type=s.Syntax.RestElement,this.argument=R}return O}();r.RestElement=_e;var it=function(){function O(R){this.type=s.Syntax.ReturnStatement,this.argument=R}return O}();r.ReturnStatement=it;var Oe=function(){function O(R){this.type=s.Syntax.Program,this.body=R,this.sourceType="script"}return O}();r.Script=Oe;var Dt=function(){function O(R){this.type=s.Syntax.SequenceExpression,this.expressions=R}return O}();r.SequenceExpression=Dt;var Pt=function(){function O(R){this.type=s.Syntax.SpreadElement,this.argument=R}return O}();r.SpreadElement=Pt;var X=function(){function O(R,V){this.type=s.Syntax.MemberExpression,this.computed=!1,this.object=R,this.property=V}return O}();r.StaticMemberExpression=X;var Q=function(){function O(){this.type=s.Syntax.Super}return O}();r.Super=Q;var b=function(){function O(R,V){this.type=s.Syntax.SwitchCase,this.test=R,this.consequent=V}return O}();r.SwitchCase=b;var y=function(){function O(R,V){this.type=s.Syntax.SwitchStatement,this.discriminant=R,this.cases=V}return O}();r.SwitchStatement=y;var _=function(){function O(R,V){this.type=s.Syntax.TaggedTemplateExpression,this.tag=R,this.quasi=V}return O}();r.TaggedTemplateExpression=_;var S=function(){function O(R,V){this.type=s.Syntax.TemplateElement,this.value=R,this.tail=V}return O}();r.TemplateElement=S;var T=function(){function O(R,V){this.type=s.Syntax.TemplateLiteral,this.quasis=R,this.expressions=V}return O}();r.TemplateLiteral=T;var N=function(){function O(){this.type=s.Syntax.ThisExpression}return O}();r.ThisExpression=N;var P=function(){function O(R){this.type=s.Syntax.ThrowStatement,this.argument=R}return O}();r.ThrowStatement=P;var me=function(){function O(R,V,ve){this.type=s.Syntax.TryStatement,this.block=R,this.handler=V,this.finalizer=ve}return O}();r.TryStatement=me;var Ie=function(){function O(R,V){this.type=s.Syntax.UnaryExpression,this.operator=R,this.argument=V,this.prefix=!0}return O}();r.UnaryExpression=Ie;var Fe=function(){function O(R,V,ve){this.type=s.Syntax.UpdateExpression,this.operator=R,this.argument=V,this.prefix=ve}return O}();r.UpdateExpression=Fe;var Le=function(){function O(R,V){this.type=s.Syntax.VariableDeclaration,this.declarations=R,this.kind=V}return O}();r.VariableDeclaration=Le;var Ce=function(){function O(R,V){this.type=s.Syntax.VariableDeclarator,this.id=R,this.init=V}return O}();r.VariableDeclarator=Ce;var Z=function(){function O(R,V){this.type=s.Syntax.WhileStatement,this.test=R,this.body=V}return O}();r.WhileStatement=Z;var Be=function(){function O(R,V){this.type=s.Syntax.WithStatement,this.object=R,this.body=V}return O}();r.WithStatement=Be;var _n=function(){function O(R,V){this.type=s.Syntax.YieldExpression,this.argument=R,this.delegate=V}return O}();r.YieldExpression=_n},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(9),o=i(10),a=i(11),l=i(7),c=i(12),h=i(2),g=i(13),d="ArrowParameterPlaceHolder",m=function(){function x(u,f,p){f===void 0&&(f={}),this.config={range:typeof f.range=="boolean"&&f.range,loc:typeof f.loc=="boolean"&&f.loc,source:null,tokens:typeof f.tokens=="boolean"&&f.tokens,comment:typeof f.comment=="boolean"&&f.comment,tolerant:typeof f.tolerant=="boolean"&&f.tolerant},this.config.loc&&f.source&&f.source!==null&&(this.config.source=String(f.source)),this.delegate=p,this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new c.Scanner(u,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return x.prototype.throwError=function(u){for(var f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var v=Array.prototype.slice.call(arguments,1),E=u.replace(/%(\d)/g,function(k,I){return s.assert(I<v.length,"Message reference must be in range"),v[I]}),A=this.lastMarker.index,D=this.lastMarker.line,C=this.lastMarker.column+1;throw this.errorHandler.createError(A,D,C,E)},x.prototype.tolerateError=function(u){for(var f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var v=Array.prototype.slice.call(arguments,1),E=u.replace(/%(\d)/g,function(k,I){return s.assert(I<v.length,"Message reference must be in range"),v[I]}),A=this.lastMarker.index,D=this.scanner.lineNumber,C=this.lastMarker.column+1;this.errorHandler.tolerateError(A,D,C,E)},x.prototype.unexpectedTokenError=function(u,f){var p=f||a.Messages.UnexpectedToken,v;if(u?(f||(p=u.type===2?a.Messages.UnexpectedEOS:u.type===3?a.Messages.UnexpectedIdentifier:u.type===6?a.Messages.UnexpectedNumber:u.type===8?a.Messages.UnexpectedString:u.type===10?a.Messages.UnexpectedTemplate:a.Messages.UnexpectedToken,u.type===4&&(this.scanner.isFutureReservedWord(u.value)?p=a.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(u.value)&&(p=a.Messages.StrictReservedWord))),v=u.value):v="ILLEGAL",p=p.replace("%0",v),u&&typeof u.lineNumber=="number"){var E=u.start,A=u.lineNumber,D=this.lastMarker.index-this.lastMarker.column,C=u.start-D+1;return this.errorHandler.createError(E,A,C,p)}else{var E=this.lastMarker.index,A=this.lastMarker.line,C=this.lastMarker.column+1;return this.errorHandler.createError(E,A,C,p)}},x.prototype.throwUnexpectedToken=function(u,f){throw this.unexpectedTokenError(u,f)},x.prototype.tolerateUnexpectedToken=function(u,f){this.errorHandler.tolerate(this.unexpectedTokenError(u,f))},x.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var u=this.scanner.scanComments();if(u.length>0&&this.delegate)for(var f=0;f<u.length;++f){var p=u[f],v=void 0;v={type:p.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(p.slice[0],p.slice[1])},this.config.range&&(v.range=p.range),this.config.loc&&(v.loc=p.loc);var E={start:{line:p.loc.start.line,column:p.loc.start.column,offset:p.range[0]},end:{line:p.loc.end.line,column:p.loc.end.column,offset:p.range[1]}};this.delegate(v,E)}}},x.prototype.getTokenRaw=function(u){return this.scanner.source.slice(u.start,u.end)},x.prototype.convertToken=function(u){var f={type:g.TokenName[u.type],value:this.getTokenRaw(u)};if(this.config.range&&(f.range=[u.start,u.end]),this.config.loc&&(f.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),u.type===9){var p=u.pattern,v=u.flags;f.regex={pattern:p,flags:v}}return f},x.prototype.nextToken=function(){var u=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var f=this.scanner.lex();return this.hasLineTerminator=u.lineNumber!==f.lineNumber,f&&this.context.strict&&f.type===3&&this.scanner.isStrictModeReservedWord(f.value)&&(f.type=4),this.lookahead=f,this.config.tokens&&f.type!==2&&this.tokens.push(this.convertToken(f)),u},x.prototype.nextRegexToken=function(){this.collectComments();var u=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(u))),this.lookahead=u,this.nextToken(),u},x.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},x.prototype.startNode=function(u,f){f===void 0&&(f=0);var p=u.start-u.lineStart,v=u.lineNumber;return p<0&&(p+=f,v--),{index:u.start,line:v,column:p}},x.prototype.finalize=function(u,f){if(this.config.range&&(f.range=[u.index,this.lastMarker.index]),this.config.loc&&(f.loc={start:{line:u.line,column:u.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(f.loc.source=this.config.source)),this.delegate){var p={start:{line:u.line,column:u.column,offset:u.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(f,p)}return f},x.prototype.expect=function(u){var f=this.nextToken();(f.type!==7||f.value!==u)&&this.throwUnexpectedToken(f)},x.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var u=this.lookahead;u.type===7&&u.value===","?this.nextToken():u.type===7&&u.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(u)):this.tolerateUnexpectedToken(u,a.Messages.UnexpectedToken)}else this.expect(",")},x.prototype.expectKeyword=function(u){var f=this.nextToken();(f.type!==4||f.value!==u)&&this.throwUnexpectedToken(f)},x.prototype.match=function(u){return this.lookahead.type===7&&this.lookahead.value===u},x.prototype.matchKeyword=function(u){return this.lookahead.type===4&&this.lookahead.value===u},x.prototype.matchContextualKeyword=function(u){return this.lookahead.type===3&&this.lookahead.value===u},x.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var u=this.lookahead.value;return u==="="||u==="*="||u==="**="||u==="/="||u==="%="||u==="+="||u==="-="||u==="<<="||u===">>="||u===">>>="||u==="&="||u==="^="||u==="|="},x.prototype.isolateCoverGrammar=function(u){var f=this.context.isBindingElement,p=this.context.isAssignmentTarget,v=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var E=u.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=f,this.context.isAssignmentTarget=p,this.context.firstCoverInitializedNameError=v,E},x.prototype.inheritCoverGrammar=function(u){var f=this.context.isBindingElement,p=this.context.isAssignmentTarget,v=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var E=u.call(this);return this.context.isBindingElement=this.context.isBindingElement&&f,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&p,this.context.firstCoverInitializedNameError=v||this.context.firstCoverInitializedNameError,E},x.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},x.prototype.parsePrimaryExpression=function(){var u=this.createNode(),f,p,v;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),f=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(u,new l.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,p=this.nextToken(),v=this.getTokenRaw(p),f=this.finalize(u,new l.Literal(p.value,v));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,p=this.nextToken(),v=this.getTokenRaw(p),f=this.finalize(u,new l.Literal(p.value==="true",v));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,p=this.nextToken(),v=this.getTokenRaw(p),f=this.finalize(u,new l.Literal(null,v));break;case 10:f=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,f=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":f=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":f=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,p=this.nextRegexToken(),v=this.getTokenRaw(p),f=this.finalize(u,new l.RegexLiteral(p.regex,v,p.pattern,p.flags));break;default:f=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?f=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?f=this.finalize(u,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?f=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),f=this.finalize(u,new l.ThisExpression)):this.matchKeyword("class")?f=this.parseClassExpression():f=this.throwUnexpectedToken(this.nextToken()));break;default:f=this.throwUnexpectedToken(this.nextToken())}return f},x.prototype.parseSpreadElement=function(){var u=this.createNode();this.expect("...");var f=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(u,new l.SpreadElement(f))},x.prototype.parseArrayInitializer=function(){var u=this.createNode(),f=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),f.push(null);else if(this.match("...")){var p=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),f.push(p)}else f.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(u,new l.ArrayExpression(f))},x.prototype.parsePropertyMethod=function(u){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var f=this.context.strict,p=this.context.allowStrictDirective;this.context.allowStrictDirective=u.simple;var v=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&u.firstRestricted&&this.tolerateUnexpectedToken(u.firstRestricted,u.message),this.context.strict&&u.stricted&&this.tolerateUnexpectedToken(u.stricted,u.message),this.context.strict=f,this.context.allowStrictDirective=p,v},x.prototype.parsePropertyMethodFunction=function(){var u=!1,f=this.createNode(),p=this.context.allowYield;this.context.allowYield=!0;var v=this.parseFormalParameters(),E=this.parsePropertyMethod(v);return this.context.allowYield=p,this.finalize(f,new l.FunctionExpression(null,v.params,E,u))},x.prototype.parsePropertyMethodAsyncFunction=function(){var u=this.createNode(),f=this.context.allowYield,p=this.context.await;this.context.allowYield=!1,this.context.await=!0;var v=this.parseFormalParameters(),E=this.parsePropertyMethod(v);return this.context.allowYield=f,this.context.await=p,this.finalize(u,new l.AsyncFunctionExpression(null,v.params,E))},x.prototype.parseObjectPropertyKey=function(){var u=this.createNode(),f=this.nextToken(),p;switch(f.type){case 8:case 6:this.context.strict&&f.octal&&this.tolerateUnexpectedToken(f,a.Messages.StrictOctalLiteral);var v=this.getTokenRaw(f);p=this.finalize(u,new l.Literal(f.value,v));break;case 3:case 1:case 5:case 4:p=this.finalize(u,new l.Identifier(f.value));break;case 7:f.value==="["?(p=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):p=this.throwUnexpectedToken(f);break;default:p=this.throwUnexpectedToken(f)}return p},x.prototype.isPropertyKey=function(u,f){return u.type===h.Syntax.Identifier&&u.name===f||u.type===h.Syntax.Literal&&u.value===f},x.prototype.parseObjectProperty=function(u){var f=this.createNode(),p=this.lookahead,v,E=null,A=null,D=!1,C=!1,k=!1,I=!1;if(p.type===3){var M=p.value;this.nextToken(),D=this.match("["),I=!this.hasLineTerminator&&M==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),E=I?this.parseObjectPropertyKey():this.finalize(f,new l.Identifier(M))}else this.match("*")?this.nextToken():(D=this.match("["),E=this.parseObjectPropertyKey());var L=this.qualifiedPropertyName(this.lookahead);if(p.type===3&&!I&&p.value==="get"&&L)v="get",D=this.match("["),E=this.parseObjectPropertyKey(),this.context.allowYield=!1,A=this.parseGetterMethod();else if(p.type===3&&!I&&p.value==="set"&&L)v="set",D=this.match("["),E=this.parseObjectPropertyKey(),A=this.parseSetterMethod();else if(p.type===7&&p.value==="*"&&L)v="init",D=this.match("["),E=this.parseObjectPropertyKey(),A=this.parseGeneratorMethod(),C=!0;else if(E||this.throwUnexpectedToken(this.lookahead),v="init",this.match(":")&&!I)!D&&this.isPropertyKey(E,"__proto__")&&(u.value&&this.tolerateError(a.Messages.DuplicateProtoProperty),u.value=!0),this.nextToken(),A=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))A=I?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0;else if(p.type===3){var M=this.finalize(f,new l.Identifier(p.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),k=!0;var $=this.isolateCoverGrammar(this.parseAssignmentExpression);A=this.finalize(f,new l.AssignmentPattern(M,$))}else k=!0,A=M}else this.throwUnexpectedToken(this.nextToken());return this.finalize(f,new l.Property(v,E,D,A,C,k))},x.prototype.parseObjectInitializer=function(){var u=this.createNode();this.expect("{");for(var f=[],p={value:!1};!this.match("}");)f.push(this.parseObjectProperty(p)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(u,new l.ObjectExpression(f))},x.prototype.parseTemplateHead=function(){s.assert(this.lookahead.head,"Template literal must start with a template head");var u=this.createNode(),f=this.nextToken(),p=f.value,v=f.cooked;return this.finalize(u,new l.TemplateElement({raw:p,cooked:v},f.tail))},x.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var u=this.createNode(),f=this.nextToken(),p=f.value,v=f.cooked;return this.finalize(u,new l.TemplateElement({raw:p,cooked:v},f.tail))},x.prototype.parseTemplateLiteral=function(){var u=this.createNode(),f=[],p=[],v=this.parseTemplateHead();for(p.push(v);!v.tail;)f.push(this.parseExpression()),v=this.parseTemplateElement(),p.push(v);return this.finalize(u,new l.TemplateLiteral(p,f))},x.prototype.reinterpretExpressionAsPattern=function(u){switch(u.type){case h.Syntax.Identifier:case h.Syntax.MemberExpression:case h.Syntax.RestElement:case h.Syntax.AssignmentPattern:break;case h.Syntax.SpreadElement:u.type=h.Syntax.RestElement,this.reinterpretExpressionAsPattern(u.argument);break;case h.Syntax.ArrayExpression:u.type=h.Syntax.ArrayPattern;for(var f=0;f<u.elements.length;f++)u.elements[f]!==null&&this.reinterpretExpressionAsPattern(u.elements[f]);break;case h.Syntax.ObjectExpression:u.type=h.Syntax.ObjectPattern;for(var f=0;f<u.properties.length;f++)this.reinterpretExpressionAsPattern(u.properties[f].value);break;case h.Syntax.AssignmentExpression:u.type=h.Syntax.AssignmentPattern,delete u.operator,this.reinterpretExpressionAsPattern(u.left);break}},x.prototype.parseGroupExpression=function(){var u;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),u={type:d,params:[],async:!1};else{var f=this.lookahead,p=[];if(this.match("..."))u=this.parseRestElement(p),this.expect(")"),this.match("=>")||this.expect("=>"),u={type:d,params:[u],async:!1};else{var v=!1;if(this.context.isBindingElement=!0,u=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var E=[];for(this.context.isAssignmentTarget=!1,E.push(u);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var A=0;A<E.length;A++)this.reinterpretExpressionAsPattern(E[A]);v=!0,u={type:d,params:E,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),E.push(this.parseRestElement(p)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var A=0;A<E.length;A++)this.reinterpretExpressionAsPattern(E[A]);v=!0,u={type:d,params:E,async:!1}}else E.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(v)break}v||(u=this.finalize(this.startNode(f),new l.SequenceExpression(E)))}if(!v){if(this.expect(")"),this.match("=>")&&(u.type===h.Syntax.Identifier&&u.name==="yield"&&(v=!0,u={type:d,params:[u],async:!1}),!v)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),u.type===h.Syntax.SequenceExpression)for(var A=0;A<u.expressions.length;A++)this.reinterpretExpressionAsPattern(u.expressions[A]);else this.reinterpretExpressionAsPattern(u);var D=u.type===h.Syntax.SequenceExpression?u.expressions:[u];u={type:d,params:D,async:!1}}this.context.isBindingElement=!1}}}return u},x.prototype.parseArguments=function(){this.expect("(");var u=[];if(!this.match(")"))for(;;){var f=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(u.push(f),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),u},x.prototype.isIdentifierName=function(u){return u.type===3||u.type===4||u.type===1||u.type===5},x.prototype.parseIdentifierName=function(){var u=this.createNode(),f=this.nextToken();return this.isIdentifierName(f)||this.throwUnexpectedToken(f),this.finalize(u,new l.Identifier(f.value))},x.prototype.parseNewExpression=function(){var u=this.createNode(),f=this.parseIdentifierName();s.assert(f.name==="new","New expression must start with `new`");var p;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var v=this.parseIdentifierName();p=new l.MetaProperty(f,v)}else this.throwUnexpectedToken(this.lookahead);else{var E=this.isolateCoverGrammar(this.parseLeftHandSideExpression),A=this.match("(")?this.parseArguments():[];p=new l.NewExpression(E,A),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(u,p)},x.prototype.parseAsyncArgument=function(){var u=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,u},x.prototype.parseAsyncArguments=function(){this.expect("(");var u=[];if(!this.match(")"))for(;;){var f=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(u.push(f),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),u},x.prototype.parseLeftHandSideExpressionAllowCall=function(){var u=this.lookahead,f=this.matchContextualKeyword("async"),p=this.context.allowIn;this.context.allowIn=!0;var v;for(this.matchKeyword("super")&&this.context.inFunctionBody?(v=this.createNode(),this.nextToken(),v=this.finalize(v,new l.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):v=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var E=this.parseIdentifierName();v=this.finalize(this.startNode(u),new l.StaticMemberExpression(v,E))}else if(this.match("(")){var A=f&&u.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var D=A?this.parseAsyncArguments():this.parseArguments();if(v=this.finalize(this.startNode(u),new l.CallExpression(v,D)),A&&this.match("=>")){for(var C=0;C<D.length;++C)this.reinterpretExpressionAsPattern(D[C]);v={type:d,params:D,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var E=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),v=this.finalize(this.startNode(u),new l.ComputedMemberExpression(v,E))}else if(this.lookahead.type===10&&this.lookahead.head){var k=this.parseTemplateLiteral();v=this.finalize(this.startNode(u),new l.TaggedTemplateExpression(v,k))}else break;return this.context.allowIn=p,v},x.prototype.parseSuper=function(){var u=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(u,new l.Super)},x.prototype.parseLeftHandSideExpression=function(){s.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var u=this.startNode(this.lookahead),f=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var p=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),f=this.finalize(u,new l.ComputedMemberExpression(f,p))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var p=this.parseIdentifierName();f=this.finalize(u,new l.StaticMemberExpression(f,p))}else if(this.lookahead.type===10&&this.lookahead.head){var v=this.parseTemplateLiteral();f=this.finalize(u,new l.TaggedTemplateExpression(f,v))}else break;return f},x.prototype.parseUpdateExpression=function(){var u,f=this.lookahead;if(this.match("++")||this.match("--")){var p=this.startNode(f),v=this.nextToken();u=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&u.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(u.name)&&this.tolerateError(a.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment);var E=!0;u=this.finalize(p,new l.UpdateExpression(v.value,u,E)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(u=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&u.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(u.name)&&this.tolerateError(a.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var A=this.nextToken().value,E=!1;u=this.finalize(this.startNode(f),new l.UpdateExpression(A,u,E))}return u},x.prototype.parseAwaitExpression=function(){var u=this.createNode();this.nextToken();var f=this.parseUnaryExpression();return this.finalize(u,new l.AwaitExpression(f))},x.prototype.parseUnaryExpression=function(){var u;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var f=this.startNode(this.lookahead),p=this.nextToken();u=this.inheritCoverGrammar(this.parseUnaryExpression),u=this.finalize(f,new l.UnaryExpression(p.value,u)),this.context.strict&&u.operator==="delete"&&u.argument.type===h.Syntax.Identifier&&this.tolerateError(a.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?u=this.parseAwaitExpression():u=this.parseUpdateExpression();return u},x.prototype.parseExponentiationExpression=function(){var u=this.lookahead,f=this.inheritCoverGrammar(this.parseUnaryExpression);if(f.type!==h.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var p=f,v=this.isolateCoverGrammar(this.parseExponentiationExpression);f=this.finalize(this.startNode(u),new l.BinaryExpression("**",p,v))}return f},x.prototype.binaryPrecedence=function(u){var f=u.value,p;return u.type===7?p=this.operatorPrecedence[f]||0:u.type===4?p=f==="instanceof"||this.context.allowIn&&f==="in"?7:0:p=0,p},x.prototype.parseBinaryExpression=function(){var u=this.lookahead,f=this.inheritCoverGrammar(this.parseExponentiationExpression),p=this.lookahead,v=this.binaryPrecedence(p);if(v>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var E=[u,this.lookahead],A=f,D=this.isolateCoverGrammar(this.parseExponentiationExpression),C=[A,p.value,D],k=[v];v=this.binaryPrecedence(this.lookahead),!(v<=0);){for(;C.length>2&&v<=k[k.length-1];){D=C.pop();var I=C.pop();k.pop(),A=C.pop(),E.pop();var M=this.startNode(E[E.length-1]);C.push(this.finalize(M,new l.BinaryExpression(I,A,D)))}C.push(this.nextToken().value),k.push(v),E.push(this.lookahead),C.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var L=C.length-1;f=C[L];for(var $=E.pop();L>1;){var H=E.pop(),ee=$&&$.lineStart,M=this.startNode(H,ee),I=C[L-1];f=this.finalize(M,new l.BinaryExpression(I,C[L-2],f)),L-=2,$=H}}return f},x.prototype.parseConditionalExpression=function(){var u=this.lookahead,f=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var p=this.context.allowIn;this.context.allowIn=!0;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=p,this.expect(":");var E=this.isolateCoverGrammar(this.parseAssignmentExpression);f=this.finalize(this.startNode(u),new l.ConditionalExpression(f,v,E)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return f},x.prototype.checkPatternParam=function(u,f){switch(f.type){case h.Syntax.Identifier:this.validateParam(u,f,f.name);break;case h.Syntax.RestElement:this.checkPatternParam(u,f.argument);break;case h.Syntax.AssignmentPattern:this.checkPatternParam(u,f.left);break;case h.Syntax.ArrayPattern:for(var p=0;p<f.elements.length;p++)f.elements[p]!==null&&this.checkPatternParam(u,f.elements[p]);break;case h.Syntax.ObjectPattern:for(var p=0;p<f.properties.length;p++)this.checkPatternParam(u,f.properties[p].value);break}u.simple=u.simple&&f instanceof l.Identifier},x.prototype.reinterpretAsCoverFormalsList=function(u){var f=[u],p,v=!1;switch(u.type){case h.Syntax.Identifier:break;case d:f=u.params,v=u.async;break;default:return null}p={simple:!0,paramSet:{}};for(var E=0;E<f.length;++E){var A=f[E];A.type===h.Syntax.AssignmentPattern?A.right.type===h.Syntax.YieldExpression&&(A.right.argument&&this.throwUnexpectedToken(this.lookahead),A.right.type=h.Syntax.Identifier,A.right.name="yield",delete A.right.argument,delete A.right.delegate):v&&A.type===h.Syntax.Identifier&&A.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(p,A),f[E]=A}if(this.context.strict||!this.context.allowYield)for(var E=0;E<f.length;++E){var A=f[E];A.type===h.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(p.message===a.Messages.StrictParamDupe){var D=this.context.strict?p.stricted:p.firstRestricted;this.throwUnexpectedToken(D,p.message)}return{simple:p.simple,params:f,stricted:p.stricted,firstRestricted:p.firstRestricted,message:p.message}},x.prototype.parseAssignmentExpression=function(){var u;if(!this.context.allowYield&&this.matchKeyword("yield"))u=this.parseYieldExpression();else{var f=this.lookahead,p=f;if(u=this.parseConditionalExpression(),p.type===3&&p.lineNumber===this.lookahead.lineNumber&&p.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var v=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(v),u={type:d,params:[v],async:!0}}if(u.type===d||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var E=u.async,A=this.reinterpretAsCoverFormalsList(u);if(A){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var D=this.context.strict,C=this.context.allowStrictDirective;this.context.allowStrictDirective=A.simple;var k=this.context.allowYield,I=this.context.await;this.context.allowYield=!0,this.context.await=E;var M=this.startNode(f);this.expect("=>");var L=void 0;if(this.match("{")){var $=this.context.allowIn;this.context.allowIn=!0,L=this.parseFunctionSourceElements(),this.context.allowIn=$}else L=this.isolateCoverGrammar(this.parseAssignmentExpression);var H=L.type!==h.Syntax.BlockStatement;this.context.strict&&A.firstRestricted&&this.throwUnexpectedToken(A.firstRestricted,A.message),this.context.strict&&A.stricted&&this.tolerateUnexpectedToken(A.stricted,A.message),u=E?this.finalize(M,new l.AsyncArrowFunctionExpression(A.params,L,H)):this.finalize(M,new l.ArrowFunctionExpression(A.params,L,H)),this.context.strict=D,this.context.allowStrictDirective=C,this.context.allowYield=k,this.context.await=I}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(a.Messages.InvalidLHSInAssignment),this.context.strict&&u.type===h.Syntax.Identifier){var ee=u;this.scanner.isRestrictedWord(ee.name)&&this.tolerateUnexpectedToken(p,a.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(ee.name)&&this.tolerateUnexpectedToken(p,a.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(u):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),p=this.nextToken();var he=p.value,xe=this.isolateCoverGrammar(this.parseAssignmentExpression);u=this.finalize(this.startNode(f),new l.AssignmentExpression(he,u,xe)),this.context.firstCoverInitializedNameError=null}}return u},x.prototype.parseExpression=function(){var u=this.lookahead,f=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var p=[];for(p.push(f);this.lookahead.type!==2&&this.match(",");)this.nextToken(),p.push(this.isolateCoverGrammar(this.parseAssignmentExpression));f=this.finalize(this.startNode(u),new l.SequenceExpression(p))}return f},x.prototype.parseStatementListItem=function(){var u;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration),u=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration),u=this.parseImportDeclaration();break;case"const":u=this.parseLexicalDeclaration({inFor:!1});break;case"function":u=this.parseFunctionDeclaration();break;case"class":u=this.parseClassDeclaration();break;case"let":u=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:u=this.parseStatement();break}else u=this.parseStatement();return u},x.prototype.parseBlock=function(){var u=this.createNode();this.expect("{");for(var f=[];!this.match("}");)f.push(this.parseStatementListItem());return this.expect("}"),this.finalize(u,new l.BlockStatement(f))},x.prototype.parseLexicalBinding=function(u,f){var p=this.createNode(),v=[],E=this.parsePattern(v,u);this.context.strict&&E.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(E.name)&&this.tolerateError(a.Messages.StrictVarName);var A=null;return u==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),A=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(a.Messages.DeclarationMissingInitializer,"const")):(!f.inFor&&E.type!==h.Syntax.Identifier||this.match("="))&&(this.expect("="),A=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(p,new l.VariableDeclarator(E,A))},x.prototype.parseBindingList=function(u,f){for(var p=[this.parseLexicalBinding(u,f)];this.match(",");)this.nextToken(),p.push(this.parseLexicalBinding(u,f));return p},x.prototype.isLexicalDeclaration=function(){var u=this.scanner.saveState();this.scanner.scanComments();var f=this.scanner.lex();return this.scanner.restoreState(u),f.type===3||f.type===7&&f.value==="["||f.type===7&&f.value==="{"||f.type===4&&f.value==="let"||f.type===4&&f.value==="yield"},x.prototype.parseLexicalDeclaration=function(u){var f=this.createNode(),p=this.nextToken().value;s.assert(p==="let"||p==="const","Lexical declaration must be either let or const");var v=this.parseBindingList(p,u);return this.consumeSemicolon(),this.finalize(f,new l.VariableDeclaration(v,p))},x.prototype.parseBindingRestElement=function(u,f){var p=this.createNode();this.expect("...");var v=this.parsePattern(u,f);return this.finalize(p,new l.RestElement(v))},x.prototype.parseArrayPattern=function(u,f){var p=this.createNode();this.expect("[");for(var v=[];!this.match("]");)if(this.match(","))this.nextToken(),v.push(null);else{if(this.match("...")){v.push(this.parseBindingRestElement(u,f));break}else v.push(this.parsePatternWithDefault(u,f));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(p,new l.ArrayPattern(v))},x.prototype.parsePropertyPattern=function(u,f){var p=this.createNode(),v=!1,E=!1,A=!1,D,C;if(this.lookahead.type===3){var k=this.lookahead;D=this.parseVariableIdentifier();var I=this.finalize(p,new l.Identifier(k.value));if(this.match("=")){u.push(k),E=!0,this.nextToken();var M=this.parseAssignmentExpression();C=this.finalize(this.startNode(k),new l.AssignmentPattern(I,M))}else this.match(":")?(this.expect(":"),C=this.parsePatternWithDefault(u,f)):(u.push(k),E=!0,C=I)}else v=this.match("["),D=this.parseObjectPropertyKey(),this.expect(":"),C=this.parsePatternWithDefault(u,f);return this.finalize(p,new l.Property("init",D,v,C,A,E))},x.prototype.parseObjectPattern=function(u,f){var p=this.createNode(),v=[];for(this.expect("{");!this.match("}");)v.push(this.parsePropertyPattern(u,f)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(p,new l.ObjectPattern(v))},x.prototype.parsePattern=function(u,f){var p;return this.match("[")?p=this.parseArrayPattern(u,f):this.match("{")?p=this.parseObjectPattern(u,f):(this.matchKeyword("let")&&(f==="const"||f==="let")&&this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding),u.push(this.lookahead),p=this.parseVariableIdentifier(f)),p},x.prototype.parsePatternWithDefault=function(u,f){var p=this.lookahead,v=this.parsePattern(u,f);if(this.match("=")){this.nextToken();var E=this.context.allowYield;this.context.allowYield=!0;var A=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=E,v=this.finalize(this.startNode(p),new l.AssignmentPattern(v,A))}return v},x.prototype.parseVariableIdentifier=function(u){var f=this.createNode(),p=this.nextToken();return p.type===4&&p.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(p,a.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(p):p.type!==3?this.context.strict&&p.type===4&&this.scanner.isStrictModeReservedWord(p.value)?this.tolerateUnexpectedToken(p,a.Messages.StrictReservedWord):(this.context.strict||p.value!=="let"||u!=="var")&&this.throwUnexpectedToken(p):(this.context.isModule||this.context.await)&&p.type===3&&p.value==="await"&&this.tolerateUnexpectedToken(p),this.finalize(f,new l.Identifier(p.value))},x.prototype.parseVariableDeclaration=function(u){var f=this.createNode(),p=[],v=this.parsePattern(p,"var");this.context.strict&&v.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(v.name)&&this.tolerateError(a.Messages.StrictVarName);var E=null;return this.match("=")?(this.nextToken(),E=this.isolateCoverGrammar(this.parseAssignmentExpression)):v.type!==h.Syntax.Identifier&&!u.inFor&&this.expect("="),this.finalize(f,new l.VariableDeclarator(v,E))},x.prototype.parseVariableDeclarationList=function(u){var f={inFor:u.inFor},p=[];for(p.push(this.parseVariableDeclaration(f));this.match(",");)this.nextToken(),p.push(this.parseVariableDeclaration(f));return p},x.prototype.parseVariableStatement=function(){var u=this.createNode();this.expectKeyword("var");var f=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(u,new l.VariableDeclaration(f,"var"))},x.prototype.parseEmptyStatement=function(){var u=this.createNode();return this.expect(";"),this.finalize(u,new l.EmptyStatement)},x.prototype.parseExpressionStatement=function(){var u=this.createNode(),f=this.parseExpression();return this.consumeSemicolon(),this.finalize(u,new l.ExpressionStatement(f))},x.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(a.Messages.StrictFunction),this.parseStatement()},x.prototype.parseIfStatement=function(){var u=this.createNode(),f,p=null;this.expectKeyword("if"),this.expect("(");var v=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),f=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),f=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),p=this.parseIfClause())),this.finalize(u,new l.IfStatement(v,f,p))},x.prototype.parseDoWhileStatement=function(){var u=this.createNode();this.expectKeyword("do");var f=this.context.inIteration;this.context.inIteration=!0;var p=this.parseStatement();this.context.inIteration=f,this.expectKeyword("while"),this.expect("(");var v=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(u,new l.DoWhileStatement(p,v))},x.prototype.parseWhileStatement=function(){var u=this.createNode(),f;this.expectKeyword("while"),this.expect("(");var p=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),f=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,f=this.parseStatement(),this.context.inIteration=v}return this.finalize(u,new l.WhileStatement(p,f))},x.prototype.parseForStatement=function(){var u=null,f=null,p=null,v=!0,E,A,D=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){u=this.createNode(),this.nextToken();var C=this.context.allowIn;this.context.allowIn=!1;var k=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=C,k.length===1&&this.matchKeyword("in")){var I=k[0];I.init&&(I.id.type===h.Syntax.ArrayPattern||I.id.type===h.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in"),u=this.finalize(u,new l.VariableDeclaration(k,"var")),this.nextToken(),E=u,A=this.parseExpression(),u=null}else k.length===1&&k[0].init===null&&this.matchContextualKeyword("of")?(u=this.finalize(u,new l.VariableDeclaration(k,"var")),this.nextToken(),E=u,A=this.parseAssignmentExpression(),u=null,v=!1):(u=this.finalize(u,new l.VariableDeclaration(k,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){u=this.createNode();var M=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")u=this.finalize(u,new l.Identifier(M)),this.nextToken(),E=u,A=this.parseExpression(),u=null;else{var C=this.context.allowIn;this.context.allowIn=!1;var k=this.parseBindingList(M,{inFor:!0});this.context.allowIn=C,k.length===1&&k[0].init===null&&this.matchKeyword("in")?(u=this.finalize(u,new l.VariableDeclaration(k,M)),this.nextToken(),E=u,A=this.parseExpression(),u=null):k.length===1&&k[0].init===null&&this.matchContextualKeyword("of")?(u=this.finalize(u,new l.VariableDeclaration(k,M)),this.nextToken(),E=u,A=this.parseAssignmentExpression(),u=null,v=!1):(this.consumeSemicolon(),u=this.finalize(u,new l.VariableDeclaration(k,M)))}}else{var L=this.lookahead,C=this.context.allowIn;if(this.context.allowIn=!1,u=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=C,this.matchKeyword("in"))(!this.context.isAssignmentTarget||u.type===h.Syntax.AssignmentExpression)&&this.tolerateError(a.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(u),E=u,A=this.parseExpression(),u=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||u.type===h.Syntax.AssignmentExpression)&&this.tolerateError(a.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(u),E=u,A=this.parseAssignmentExpression(),u=null,v=!1;else{if(this.match(",")){for(var $=[u];this.match(",");)this.nextToken(),$.push(this.isolateCoverGrammar(this.parseAssignmentExpression));u=this.finalize(this.startNode(L),new l.SequenceExpression($))}this.expect(";")}}typeof E=="undefined"&&(this.match(";")||(f=this.parseExpression()),this.expect(";"),this.match(")")||(p=this.parseExpression()));var H;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),H=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var ee=this.context.inIteration;this.context.inIteration=!0,H=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=ee}return typeof E=="undefined"?this.finalize(D,new l.ForStatement(u,f,p,H)):v?this.finalize(D,new l.ForInStatement(E,A,H)):this.finalize(D,new l.ForOfStatement(E,A,H))},x.prototype.parseContinueStatement=function(){var u=this.createNode();this.expectKeyword("continue");var f=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var p=this.parseVariableIdentifier();f=p;var v="$"+p.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,v)||this.throwError(a.Messages.UnknownLabel,p.name)}return this.consumeSemicolon(),f===null&&!this.context.inIteration&&this.throwError(a.Messages.IllegalContinue),this.finalize(u,new l.ContinueStatement(f))},x.prototype.parseBreakStatement=function(){var u=this.createNode();this.expectKeyword("break");var f=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var p=this.parseVariableIdentifier(),v="$"+p.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,v)||this.throwError(a.Messages.UnknownLabel,p.name),f=p}return this.consumeSemicolon(),f===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(a.Messages.IllegalBreak),this.finalize(u,new l.BreakStatement(f))},x.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(a.Messages.IllegalReturn);var u=this.createNode();this.expectKeyword("return");var f=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,p=f?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(u,new l.ReturnStatement(p))},x.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(a.Messages.StrictModeWith);var u=this.createNode(),f;this.expectKeyword("with"),this.expect("(");var p=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),f=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),f=this.parseStatement()),this.finalize(u,new l.WithStatement(p,f))},x.prototype.parseSwitchCase=function(){var u=this.createNode(),f;this.matchKeyword("default")?(this.nextToken(),f=null):(this.expectKeyword("case"),f=this.parseExpression()),this.expect(":");for(var p=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)p.push(this.parseStatementListItem());return this.finalize(u,new l.SwitchCase(f,p))},x.prototype.parseSwitchStatement=function(){var u=this.createNode();this.expectKeyword("switch"),this.expect("(");var f=this.parseExpression();this.expect(")");var p=this.context.inSwitch;this.context.inSwitch=!0;var v=[],E=!1;for(this.expect("{");!this.match("}");){var A=this.parseSwitchCase();A.test===null&&(E&&this.throwError(a.Messages.MultipleDefaultsInSwitch),E=!0),v.push(A)}return this.expect("}"),this.context.inSwitch=p,this.finalize(u,new l.SwitchStatement(f,v))},x.prototype.parseLabelledStatement=function(){var u=this.createNode(),f=this.parseExpression(),p;if(f.type===h.Syntax.Identifier&&this.match(":")){this.nextToken();var v=f,E="$"+v.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,E)&&this.throwError(a.Messages.Redeclaration,"Label",v.name),this.context.labelSet[E]=!0;var A=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),A=this.parseClassDeclaration();else if(this.matchKeyword("function")){var D=this.lookahead,C=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(D,a.Messages.StrictFunction):C.generator&&this.tolerateUnexpectedToken(D,a.Messages.GeneratorInLegacyContext),A=C}else A=this.parseStatement();delete this.context.labelSet[E],p=new l.LabeledStatement(v,A)}else this.consumeSemicolon(),p=new l.ExpressionStatement(f);return this.finalize(u,p)},x.prototype.parseThrowStatement=function(){var u=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(a.Messages.NewlineAfterThrow);var f=this.parseExpression();return this.consumeSemicolon(),this.finalize(u,new l.ThrowStatement(f))},x.prototype.parseCatchClause=function(){var u=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var f=[],p=this.parsePattern(f),v={},E=0;E<f.length;E++){var A="$"+f[E].value;Object.prototype.hasOwnProperty.call(v,A)&&this.tolerateError(a.Messages.DuplicateBinding,f[E].value),v[A]=!0}this.context.strict&&p.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(p.name)&&this.tolerateError(a.Messages.StrictCatchVariable),this.expect(")");var D=this.parseBlock();return this.finalize(u,new l.CatchClause(p,D))},x.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},x.prototype.parseTryStatement=function(){var u=this.createNode();this.expectKeyword("try");var f=this.parseBlock(),p=this.matchKeyword("catch")?this.parseCatchClause():null,v=this.matchKeyword("finally")?this.parseFinallyClause():null;return!p&&!v&&this.throwError(a.Messages.NoCatchOrFinally),this.finalize(u,new l.TryStatement(f,p,v))},x.prototype.parseDebuggerStatement=function(){var u=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(u,new l.DebuggerStatement)},x.prototype.parseStatement=function(){var u;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:u=this.parseExpressionStatement();break;case 7:var f=this.lookahead.value;f==="{"?u=this.parseBlock():f==="("?u=this.parseExpressionStatement():f===";"?u=this.parseEmptyStatement():u=this.parseExpressionStatement();break;case 3:u=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":u=this.parseBreakStatement();break;case"continue":u=this.parseContinueStatement();break;case"debugger":u=this.parseDebuggerStatement();break;case"do":u=this.parseDoWhileStatement();break;case"for":u=this.parseForStatement();break;case"function":u=this.parseFunctionDeclaration();break;case"if":u=this.parseIfStatement();break;case"return":u=this.parseReturnStatement();break;case"switch":u=this.parseSwitchStatement();break;case"throw":u=this.parseThrowStatement();break;case"try":u=this.parseTryStatement();break;case"var":u=this.parseVariableStatement();break;case"while":u=this.parseWhileStatement();break;case"with":u=this.parseWithStatement();break;default:u=this.parseExpressionStatement();break}break;default:u=this.throwUnexpectedToken(this.lookahead)}return u},x.prototype.parseFunctionSourceElements=function(){var u=this.createNode();this.expect("{");var f=this.parseDirectivePrologues(),p=this.context.labelSet,v=this.context.inIteration,E=this.context.inSwitch,A=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)f.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=p,this.context.inIteration=v,this.context.inSwitch=E,this.context.inFunctionBody=A,this.finalize(u,new l.BlockStatement(f))},x.prototype.validateParam=function(u,f,p){var v="$"+p;this.context.strict?(this.scanner.isRestrictedWord(p)&&(u.stricted=f,u.message=a.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(u.paramSet,v)&&(u.stricted=f,u.message=a.Messages.StrictParamDupe)):u.firstRestricted||(this.scanner.isRestrictedWord(p)?(u.firstRestricted=f,u.message=a.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(p)?(u.firstRestricted=f,u.message=a.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(u.paramSet,v)&&(u.stricted=f,u.message=a.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(u.paramSet,v,{value:!0,enumerable:!0,writable:!0,configurable:!0}):u.paramSet[v]=!0},x.prototype.parseRestElement=function(u){var f=this.createNode();this.expect("...");var p=this.parsePattern(u);return this.match("=")&&this.throwError(a.Messages.DefaultRestParameter),this.match(")")||this.throwError(a.Messages.ParameterAfterRestParameter),this.finalize(f,new l.RestElement(p))},x.prototype.parseFormalParameter=function(u){for(var f=[],p=this.match("...")?this.parseRestElement(f):this.parsePatternWithDefault(f),v=0;v<f.length;v++)this.validateParam(u,f[v],f[v].value);u.simple=u.simple&&p instanceof l.Identifier,u.params.push(p)},x.prototype.parseFormalParameters=function(u){var f;if(f={simple:!0,params:[],firstRestricted:u},this.expect("("),!this.match(")"))for(f.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(f),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:f.simple,params:f.params,stricted:f.stricted,firstRestricted:f.firstRestricted,message:f.message}},x.prototype.matchAsyncFunction=function(){var u=this.matchContextualKeyword("async");if(u){var f=this.scanner.saveState();this.scanner.scanComments();var p=this.scanner.lex();this.scanner.restoreState(f),u=f.lineNumber===p.lineNumber&&p.type===4&&p.value==="function"}return u},x.prototype.parseFunctionDeclaration=function(u){var f=this.createNode(),p=this.matchContextualKeyword("async");p&&this.nextToken(),this.expectKeyword("function");var v=p?!1:this.match("*");v&&this.nextToken();var E,A=null,D=null;if(!u||!this.match("(")){var C=this.lookahead;A=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(C.value)&&this.tolerateUnexpectedToken(C,a.Messages.StrictFunctionName):this.scanner.isRestrictedWord(C.value)?(D=C,E=a.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(C.value)&&(D=C,E=a.Messages.StrictReservedWord)}var k=this.context.await,I=this.context.allowYield;this.context.await=p,this.context.allowYield=!v;var M=this.parseFormalParameters(D),L=M.params,$=M.stricted;D=M.firstRestricted,M.message&&(E=M.message);var H=this.context.strict,ee=this.context.allowStrictDirective;this.context.allowStrictDirective=M.simple;var he=this.parseFunctionSourceElements();return this.context.strict&&D&&this.throwUnexpectedToken(D,E),this.context.strict&&$&&this.tolerateUnexpectedToken($,E),this.context.strict=H,this.context.allowStrictDirective=ee,this.context.await=k,this.context.allowYield=I,p?this.finalize(f,new l.AsyncFunctionDeclaration(A,L,he)):this.finalize(f,new l.FunctionDeclaration(A,L,he,v))},x.prototype.parseFunctionExpression=function(){var u=this.createNode(),f=this.matchContextualKeyword("async");f&&this.nextToken(),this.expectKeyword("function");var p=f?!1:this.match("*");p&&this.nextToken();var v,E=null,A,D=this.context.await,C=this.context.allowYield;if(this.context.await=f,this.context.allowYield=!p,!this.match("(")){var k=this.lookahead;E=!this.context.strict&&!p&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(k.value)&&this.tolerateUnexpectedToken(k,a.Messages.StrictFunctionName):this.scanner.isRestrictedWord(k.value)?(A=k,v=a.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(k.value)&&(A=k,v=a.Messages.StrictReservedWord)}var I=this.parseFormalParameters(A),M=I.params,L=I.stricted;A=I.firstRestricted,I.message&&(v=I.message);var $=this.context.strict,H=this.context.allowStrictDirective;this.context.allowStrictDirective=I.simple;var ee=this.parseFunctionSourceElements();return this.context.strict&&A&&this.throwUnexpectedToken(A,v),this.context.strict&&L&&this.tolerateUnexpectedToken(L,v),this.context.strict=$,this.context.allowStrictDirective=H,this.context.await=D,this.context.allowYield=C,f?this.finalize(u,new l.AsyncFunctionExpression(E,M,ee)):this.finalize(u,new l.FunctionExpression(E,M,ee,p))},x.prototype.parseDirective=function(){var u=this.lookahead,f=this.createNode(),p=this.parseExpression(),v=p.type===h.Syntax.Literal?this.getTokenRaw(u).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(f,v?new l.Directive(p,v):new l.ExpressionStatement(p))},x.prototype.parseDirectivePrologues=function(){for(var u=null,f=[];;){var p=this.lookahead;if(p.type!==8)break;var v=this.parseDirective();f.push(v);var E=v.directive;if(typeof E!="string")break;E==="use strict"?(this.context.strict=!0,u&&this.tolerateUnexpectedToken(u,a.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(p,a.Messages.IllegalLanguageModeDirective)):!u&&p.octal&&(u=p)}return f},x.prototype.qualifiedPropertyName=function(u){switch(u.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return u.value==="["}return!1},x.prototype.parseGetterMethod=function(){var u=this.createNode(),f=!1,p=this.context.allowYield;this.context.allowYield=!f;var v=this.parseFormalParameters();v.params.length>0&&this.tolerateError(a.Messages.BadGetterArity);var E=this.parsePropertyMethod(v);return this.context.allowYield=p,this.finalize(u,new l.FunctionExpression(null,v.params,E,f))},x.prototype.parseSetterMethod=function(){var u=this.createNode(),f=!1,p=this.context.allowYield;this.context.allowYield=!f;var v=this.parseFormalParameters();v.params.length!==1?this.tolerateError(a.Messages.BadSetterArity):v.params[0]instanceof l.RestElement&&this.tolerateError(a.Messages.BadSetterRestParameter);var E=this.parsePropertyMethod(v);return this.context.allowYield=p,this.finalize(u,new l.FunctionExpression(null,v.params,E,f))},x.prototype.parseGeneratorMethod=function(){var u=this.createNode(),f=!0,p=this.context.allowYield;this.context.allowYield=!0;var v=this.parseFormalParameters();this.context.allowYield=!1;var E=this.parsePropertyMethod(v);return this.context.allowYield=p,this.finalize(u,new l.FunctionExpression(null,v.params,E,f))},x.prototype.isStartOfExpression=function(){var u=!0,f=this.lookahead.value;switch(this.lookahead.type){case 7:u=f==="["||f==="("||f==="{"||f==="+"||f==="-"||f==="!"||f==="~"||f==="++"||f==="--"||f==="/"||f==="/=";break;case 4:u=f==="class"||f==="delete"||f==="function"||f==="let"||f==="new"||f==="super"||f==="this"||f==="typeof"||f==="void"||f==="yield";break}return u},x.prototype.parseYieldExpression=function(){var u=this.createNode();this.expectKeyword("yield");var f=null,p=!1;if(!this.hasLineTerminator){var v=this.context.allowYield;this.context.allowYield=!1,p=this.match("*"),p?(this.nextToken(),f=this.parseAssignmentExpression()):this.isStartOfExpression()&&(f=this.parseAssignmentExpression()),this.context.allowYield=v}return this.finalize(u,new l.YieldExpression(f,p))},x.prototype.parseClassElement=function(u){var f=this.lookahead,p=this.createNode(),v="",E=null,A=null,D=!1,C=!1,k=!1,I=!1;if(this.match("*"))this.nextToken();else{D=this.match("["),E=this.parseObjectPropertyKey();var M=E;if(M.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(f=this.lookahead,k=!0,D=this.match("["),this.match("*")?this.nextToken():E=this.parseObjectPropertyKey()),f.type===3&&!this.hasLineTerminator&&f.value==="async"){var L=this.lookahead.value;L!==":"&&L!=="("&&L!=="*"&&(I=!0,f=this.lookahead,E=this.parseObjectPropertyKey(),f.type===3&&f.value==="constructor"&&this.tolerateUnexpectedToken(f,a.Messages.ConstructorIsAsync))}}var $=this.qualifiedPropertyName(this.lookahead);return f.type===3?f.value==="get"&&$?(v="get",D=this.match("["),E=this.parseObjectPropertyKey(),this.context.allowYield=!1,A=this.parseGetterMethod()):f.value==="set"&&$&&(v="set",D=this.match("["),E=this.parseObjectPropertyKey(),A=this.parseSetterMethod()):f.type===7&&f.value==="*"&&$&&(v="init",D=this.match("["),E=this.parseObjectPropertyKey(),A=this.parseGeneratorMethod(),C=!0),!v&&E&&this.match("(")&&(v="init",A=I?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0),v||this.throwUnexpectedToken(this.lookahead),v==="init"&&(v="method"),D||(k&&this.isPropertyKey(E,"prototype")&&this.throwUnexpectedToken(f,a.Messages.StaticPrototype),!k&&this.isPropertyKey(E,"constructor")&&((v!=="method"||!C||A&&A.generator)&&this.throwUnexpectedToken(f,a.Messages.ConstructorSpecialMethod),u.value?this.throwUnexpectedToken(f,a.Messages.DuplicateConstructor):u.value=!0,v="constructor")),this.finalize(p,new l.MethodDefinition(E,D,A,v,k))},x.prototype.parseClassElementList=function(){var u=[],f={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():u.push(this.parseClassElement(f));return this.expect("}"),u},x.prototype.parseClassBody=function(){var u=this.createNode(),f=this.parseClassElementList();return this.finalize(u,new l.ClassBody(f))},x.prototype.parseClassDeclaration=function(u){var f=this.createNode(),p=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var v=u&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),E=null;this.matchKeyword("extends")&&(this.nextToken(),E=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var A=this.parseClassBody();return this.context.strict=p,this.finalize(f,new l.ClassDeclaration(v,E,A))},x.prototype.parseClassExpression=function(){var u=this.createNode(),f=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var p=this.lookahead.type===3?this.parseVariableIdentifier():null,v=null;this.matchKeyword("extends")&&(this.nextToken(),v=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var E=this.parseClassBody();return this.context.strict=f,this.finalize(u,new l.ClassExpression(p,v,E))},x.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var u=this.createNode(),f=this.parseDirectivePrologues();this.lookahead.type!==2;)f.push(this.parseStatementListItem());return this.finalize(u,new l.Module(f))},x.prototype.parseScript=function(){for(var u=this.createNode(),f=this.parseDirectivePrologues();this.lookahead.type!==2;)f.push(this.parseStatementListItem());return this.finalize(u,new l.Script(f))},x.prototype.parseModuleSpecifier=function(){var u=this.createNode();this.lookahead.type!==8&&this.throwError(a.Messages.InvalidModuleSpecifier);var f=this.nextToken(),p=this.getTokenRaw(f);return this.finalize(u,new l.Literal(f.value,p))},x.prototype.parseImportSpecifier=function(){var u=this.createNode(),f,p;return this.lookahead.type===3?(f=this.parseVariableIdentifier(),p=f,this.matchContextualKeyword("as")&&(this.nextToken(),p=this.parseVariableIdentifier())):(f=this.parseIdentifierName(),p=f,this.matchContextualKeyword("as")?(this.nextToken(),p=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(u,new l.ImportSpecifier(p,f))},x.prototype.parseNamedImports=function(){this.expect("{");for(var u=[];!this.match("}");)u.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),u},x.prototype.parseImportDefaultSpecifier=function(){var u=this.createNode(),f=this.parseIdentifierName();return this.finalize(u,new l.ImportDefaultSpecifier(f))},x.prototype.parseImportNamespaceSpecifier=function(){var u=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(a.Messages.NoAsAfterImportNamespace),this.nextToken();var f=this.parseIdentifierName();return this.finalize(u,new l.ImportNamespaceSpecifier(f))},x.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(a.Messages.IllegalImportDeclaration);var u=this.createNode();this.expectKeyword("import");var f,p=[];if(this.lookahead.type===8)f=this.parseModuleSpecifier();else{if(this.match("{")?p=p.concat(this.parseNamedImports()):this.match("*")?p.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(p.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?p.push(this.parseImportNamespaceSpecifier()):this.match("{")?p=p.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var v=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(v,this.lookahead.value)}this.nextToken(),f=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(u,new l.ImportDeclaration(p,f))},x.prototype.parseExportSpecifier=function(){var u=this.createNode(),f=this.parseIdentifierName(),p=f;return this.matchContextualKeyword("as")&&(this.nextToken(),p=this.parseIdentifierName()),this.finalize(u,new l.ExportSpecifier(f,p))},x.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(a.Messages.IllegalExportDeclaration);var u=this.createNode();this.expectKeyword("export");var f;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var p=this.parseFunctionDeclaration(!0);f=this.finalize(u,new l.ExportDefaultDeclaration(p))}else if(this.matchKeyword("class")){var p=this.parseClassDeclaration(!0);f=this.finalize(u,new l.ExportDefaultDeclaration(p))}else if(this.matchContextualKeyword("async")){var p=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();f=this.finalize(u,new l.ExportDefaultDeclaration(p))}else{this.matchContextualKeyword("from")&&this.throwError(a.Messages.UnexpectedToken,this.lookahead.value);var p=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),f=this.finalize(u,new l.ExportDefaultDeclaration(p))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var v=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(v,this.lookahead.value)}this.nextToken();var E=this.parseModuleSpecifier();this.consumeSemicolon(),f=this.finalize(u,new l.ExportAllDeclaration(E))}else if(this.lookahead.type===4){var p=void 0;switch(this.lookahead.value){case"let":case"const":p=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":p=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}f=this.finalize(u,new l.ExportNamedDeclaration(p,[],null))}else if(this.matchAsyncFunction()){var p=this.parseFunctionDeclaration();f=this.finalize(u,new l.ExportNamedDeclaration(p,[],null))}else{var A=[],D=null,C=!1;for(this.expect("{");!this.match("}");)C=C||this.matchKeyword("default"),A.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),D=this.parseModuleSpecifier(),this.consumeSemicolon();else if(C){var v=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(v,this.lookahead.value)}else this.consumeSemicolon();f=this.finalize(u,new l.ExportNamedDeclaration(null,A,D))}return f},x}();r.Parser=m},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});function i(s,o){if(!s)throw new Error("ASSERT: "+o)}r.assert=i},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function s(){this.errors=[],this.tolerant=!1}return s.prototype.recordError=function(o){this.errors.push(o)},s.prototype.tolerate=function(o){if(this.tolerant)this.recordError(o);else throw o},s.prototype.constructError=function(o,a){var l=new Error(o);try{throw l}catch(c){Object.create&&Object.defineProperty&&(l=Object.create(c),Object.defineProperty(l,"column",{value:a}))}return l},s.prototype.createError=function(o,a,l,c){var h="Line "+a+": "+c,g=this.constructError(h,l);return g.index=o,g.lineNumber=a,g.description=c,g},s.prototype.throwError=function(o,a,l,c){throw this.createError(o,a,l,c)},s.prototype.tolerateError=function(o,a,l,c){var h=this.createError(o,a,l,c);if(this.tolerant)this.recordError(h);else throw h},s}();r.ErrorHandler=i},function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(9),o=i(4),a=i(11);function l(g){return"0123456789abcdef".indexOf(g.toLowerCase())}function c(g){return"01234567".indexOf(g)}var h=function(){function g(d,m){this.source=d,this.errorHandler=m,this.trackComment=!1,this.isModule=!1,this.length=d.length,this.index=0,this.lineNumber=d.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return g.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},g.prototype.restoreState=function(d){this.index=d.index,this.lineNumber=d.lineNumber,this.lineStart=d.lineStart},g.prototype.eof=function(){return this.index>=this.length},g.prototype.throwUnexpectedToken=function(d){return d===void 0&&(d=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},g.prototype.tolerateUnexpectedToken=function(d){d===void 0&&(d=a.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},g.prototype.skipSingleLineComment=function(d){var m=[],x,u;for(this.trackComment&&(m=[],x=this.index-d,u={start:{line:this.lineNumber,column:this.index-this.lineStart-d},end:{}});!this.eof();){var f=this.source.charCodeAt(this.index);if(++this.index,o.Character.isLineTerminator(f)){if(this.trackComment){u.end={line:this.lineNumber,column:this.index-this.lineStart-1};var p={multiLine:!1,slice:[x+d,this.index-1],range:[x,this.index-1],loc:u};m.push(p)}return f===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,m}}if(this.trackComment){u.end={line:this.lineNumber,column:this.index-this.lineStart};var p={multiLine:!1,slice:[x+d,this.index],range:[x,this.index],loc:u};m.push(p)}return m},g.prototype.skipMultiLineComment=function(){var d=[],m,x;for(this.trackComment&&(d=[],m=this.index-2,x={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var u=this.source.charCodeAt(this.index);if(o.Character.isLineTerminator(u))u===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(u===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){x.end={line:this.lineNumber,column:this.index-this.lineStart};var f={multiLine:!0,slice:[m+2,this.index-2],range:[m,this.index],loc:x};d.push(f)}return d}++this.index}else++this.index}if(this.trackComment){x.end={line:this.lineNumber,column:this.index-this.lineStart};var f={multiLine:!0,slice:[m+2,this.index],range:[m,this.index],loc:x};d.push(f)}return this.tolerateUnexpectedToken(),d},g.prototype.scanComments=function(){var d;this.trackComment&&(d=[]);for(var m=this.index===0;!this.eof();){var x=this.source.charCodeAt(this.index);if(o.Character.isWhiteSpace(x))++this.index;else if(o.Character.isLineTerminator(x))++this.index,x===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,m=!0;else if(x===47)if(x=this.source.charCodeAt(this.index+1),x===47){this.index+=2;var u=this.skipSingleLineComment(2);this.trackComment&&(d=d.concat(u)),m=!0}else if(x===42){this.index+=2;var u=this.skipMultiLineComment();this.trackComment&&(d=d.concat(u))}else break;else if(m&&x===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var u=this.skipSingleLineComment(3);this.trackComment&&(d=d.concat(u))}else break;else if(x===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var u=this.skipSingleLineComment(4);this.trackComment&&(d=d.concat(u))}else break;else break}return d},g.prototype.isFutureReservedWord=function(d){switch(d){case"enum":case"export":case"import":case"super":return!0;default:return!1}},g.prototype.isStrictModeReservedWord=function(d){switch(d){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},g.prototype.isRestrictedWord=function(d){return d==="eval"||d==="arguments"},g.prototype.isKeyword=function(d){switch(d.length){case 2:return d==="if"||d==="in"||d==="do";case 3:return d==="var"||d==="for"||d==="new"||d==="try"||d==="let";case 4:return d==="this"||d==="else"||d==="case"||d==="void"||d==="with"||d==="enum";case 5:return d==="while"||d==="break"||d==="catch"||d==="throw"||d==="const"||d==="yield"||d==="class"||d==="super";case 6:return d==="return"||d==="typeof"||d==="delete"||d==="switch"||d==="export"||d==="import";case 7:return d==="default"||d==="finally"||d==="extends";case 8:return d==="function"||d==="continue"||d==="debugger";case 10:return d==="instanceof";default:return!1}},g.prototype.codePointAt=function(d){var m=this.source.charCodeAt(d);if(m>=55296&&m<=56319){var x=this.source.charCodeAt(d+1);if(x>=56320&&x<=57343){var u=m;m=(u-55296)*1024+x-56320+65536}}return m},g.prototype.scanHexEscape=function(d){for(var m=d==="u"?4:2,x=0,u=0;u<m;++u)if(!this.eof()&&o.Character.isHexDigit(this.source.charCodeAt(this.index)))x=x*16+l(this.source[this.index++]);else return null;return String.fromCharCode(x)},g.prototype.scanUnicodeCodePointEscape=function(){var d=this.source[this.index],m=0;for(d==="}"&&this.throwUnexpectedToken();!this.eof()&&(d=this.source[this.index++],!!o.Character.isHexDigit(d.charCodeAt(0)));)m=m*16+l(d);return(m>1114111||d!=="}")&&this.throwUnexpectedToken(),o.Character.fromCodePoint(m)},g.prototype.getIdentifier=function(){for(var d=this.index++;!this.eof();){var m=this.source.charCodeAt(this.index);if(m===92)return this.index=d,this.getComplexIdentifier();if(m>=55296&&m<57343)return this.index=d,this.getComplexIdentifier();if(o.Character.isIdentifierPart(m))++this.index;else break}return this.source.slice(d,this.index)},g.prototype.getComplexIdentifier=function(){var d=this.codePointAt(this.index),m=o.Character.fromCodePoint(d);this.index+=m.length;var x;for(d===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,x=this.scanUnicodeCodePointEscape()):(x=this.scanHexEscape("u"),(x===null||x==="\\"||!o.Character.isIdentifierStart(x.charCodeAt(0)))&&this.throwUnexpectedToken()),m=x);!this.eof()&&(d=this.codePointAt(this.index),!!o.Character.isIdentifierPart(d));)x=o.Character.fromCodePoint(d),m+=x,this.index+=x.length,d===92&&(m=m.substr(0,m.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,x=this.scanUnicodeCodePointEscape()):(x=this.scanHexEscape("u"),(x===null||x==="\\"||!o.Character.isIdentifierPart(x.charCodeAt(0)))&&this.throwUnexpectedToken()),m+=x);return m},g.prototype.octalToDecimal=function(d){var m=d!=="0",x=c(d);return!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(m=!0,x=x*8+c(this.source[this.index++]),"0123".indexOf(d)>=0&&!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(x=x*8+c(this.source[this.index++]))),{code:x,octal:m}},g.prototype.scanIdentifier=function(){var d,m=this.index,x=this.source.charCodeAt(m)===92?this.getComplexIdentifier():this.getIdentifier();if(x.length===1?d=3:this.isKeyword(x)?d=4:x==="null"?d=5:x==="true"||x==="false"?d=1:d=3,d!==3&&m+x.length!==this.index){var u=this.index;this.index=m,this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord),this.index=u}return{type:d,value:x,lineNumber:this.lineNumber,lineStart:this.lineStart,start:m,end:this.index}},g.prototype.scanPunctuator=function(){var d=this.index,m=this.source[this.index];switch(m){case"(":case"{":m==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,m="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:m=this.source.substr(this.index,4),m===">>>="?this.index+=4:(m=m.substr(0,3),m==="==="||m==="!=="||m===">>>"||m==="<<="||m===">>="||m==="**="?this.index+=3:(m=m.substr(0,2),m==="&&"||m==="||"||m==="=="||m==="!="||m==="+="||m==="-="||m==="*="||m==="/="||m==="++"||m==="--"||m==="<<"||m===">>"||m==="&="||m==="|="||m==="^="||m==="%="||m==="<="||m===">="||m==="=>"||m==="**"?this.index+=2:(m=this.source[this.index],"<>=!+-*%&|^/".indexOf(m)>=0&&++this.index)))}return this.index===d&&this.throwUnexpectedToken(),{type:7,value:m,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanHexLiteral=function(d){for(var m="";!this.eof()&&o.Character.isHexDigit(this.source.charCodeAt(this.index));)m+=this.source[this.index++];return m.length===0&&this.throwUnexpectedToken(),o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+m,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanBinaryLiteral=function(d){for(var m="",x;!this.eof()&&(x=this.source[this.index],!(x!=="0"&&x!=="1"));)m+=this.source[this.index++];return m.length===0&&this.throwUnexpectedToken(),this.eof()||(x=this.source.charCodeAt(this.index),(o.Character.isIdentifierStart(x)||o.Character.isDecimalDigit(x))&&this.throwUnexpectedToken()),{type:6,value:parseInt(m,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanOctalLiteral=function(d,m){var x="",u=!1;for(o.Character.isOctalDigit(d.charCodeAt(0))?(u=!0,x="0"+this.source[this.index++]):++this.index;!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index));)x+=this.source[this.index++];return!u&&x.length===0&&this.throwUnexpectedToken(),(o.Character.isIdentifierStart(this.source.charCodeAt(this.index))||o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(x,8),octal:u,lineNumber:this.lineNumber,lineStart:this.lineStart,start:m,end:this.index}},g.prototype.isImplicitOctalLiteral=function(){for(var d=this.index+1;d<this.length;++d){var m=this.source[d];if(m==="8"||m==="9")return!1;if(!o.Character.isOctalDigit(m.charCodeAt(0)))return!0}return!0},g.prototype.scanNumericLiteral=function(){var d=this.index,m=this.source[d];s.assert(o.Character.isDecimalDigit(m.charCodeAt(0))||m===".","Numeric literal must start with a decimal digit or a decimal point");var x="";if(m!=="."){if(x=this.source[this.index++],m=this.source[this.index],x==="0"){if(m==="x"||m==="X")return++this.index,this.scanHexLiteral(d);if(m==="b"||m==="B")return++this.index,this.scanBinaryLiteral(d);if(m==="o"||m==="O")return this.scanOctalLiteral(m,d);if(m&&o.Character.isOctalDigit(m.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(m,d)}for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)x+=this.source[this.index++];m=this.source[this.index]}if(m==="."){for(x+=this.source[this.index++];o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)x+=this.source[this.index++];m=this.source[this.index]}if(m==="e"||m==="E")if(x+=this.source[this.index++],m=this.source[this.index],(m==="+"||m==="-")&&(x+=this.source[this.index++]),o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;o.Character.isDecimalDigit(this.source.charCodeAt(this.index));)x+=this.source[this.index++];else this.throwUnexpectedToken();return o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(x),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanStringLiteral=function(){var d=this.index,m=this.source[d];s.assert(m==="'"||m==='"',"String literal must starts with a quote"),++this.index;for(var x=!1,u="";!this.eof();){var f=this.source[this.index++];if(f===m){m="";break}else if(f==="\\")if(f=this.source[this.index++],!f||!o.Character.isLineTerminator(f.charCodeAt(0)))switch(f){case"u":if(this.source[this.index]==="{")++this.index,u+=this.scanUnicodeCodePointEscape();else{var p=this.scanHexEscape(f);p===null&&this.throwUnexpectedToken(),u+=p}break;case"x":var v=this.scanHexEscape(f);v===null&&this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence),u+=v;break;case"n":u+=`
|
|
`;break;case"r":u+="\r";break;case"t":u+=" ";break;case"b":u+="\b";break;case"f":u+="\f";break;case"v":u+="\v";break;case"8":case"9":u+=f,this.tolerateUnexpectedToken();break;default:if(f&&o.Character.isOctalDigit(f.charCodeAt(0))){var E=this.octalToDecimal(f);x=E.octal||x,u+=String.fromCharCode(E.code)}else u+=f;break}else++this.lineNumber,f==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index;else{if(o.Character.isLineTerminator(f.charCodeAt(0)))break;u+=f}}return m!==""&&(this.index=d,this.throwUnexpectedToken()),{type:8,value:u,octal:x,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanTemplate=function(){var d="",m=!1,x=this.index,u=this.source[x]==="`",f=!1,p=2;for(++this.index;!this.eof();){var v=this.source[this.index++];if(v==="`"){p=1,f=!0,m=!0;break}else if(v==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,m=!0;break}d+=v}else if(v==="\\")if(v=this.source[this.index++],o.Character.isLineTerminator(v.charCodeAt(0)))++this.lineNumber,v==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index;else switch(v){case"n":d+=`
|
|
`;break;case"r":d+="\r";break;case"t":d+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,d+=this.scanUnicodeCodePointEscape();else{var E=this.index,A=this.scanHexEscape(v);A!==null?d+=A:(this.index=E,d+=v)}break;case"x":var D=this.scanHexEscape(v);D===null&&this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence),d+=D;break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:v==="0"?(o.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral),d+="\0"):o.Character.isOctalDigit(v.charCodeAt(0))?this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral):d+=v;break}else o.Character.isLineTerminator(v.charCodeAt(0))?(++this.lineNumber,v==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index,d+=`
|
|
`):d+=v}return m||this.throwUnexpectedToken(),u||this.curlyStack.pop(),{type:10,value:this.source.slice(x+1,this.index-p),cooked:d,head:u,tail:f,lineNumber:this.lineNumber,lineStart:this.lineStart,start:x,end:this.index}},g.prototype.testRegExp=function(d,m){var x="\uFFFF",u=d,f=this;m.indexOf("u")>=0&&(u=u.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(p,v,E){var A=parseInt(v||E,16);return A>1114111&&f.throwUnexpectedToken(a.Messages.InvalidRegExp),A<=65535?String.fromCharCode(A):x}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x));try{RegExp(u)}catch{this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(d,m)}catch{return null}},g.prototype.scanRegExpBody=function(){var d=this.source[this.index];s.assert(d==="/","Regular expression literal must start with a slash");for(var m=this.source[this.index++],x=!1,u=!1;!this.eof();)if(d=this.source[this.index++],m+=d,d==="\\")d=this.source[this.index++],o.Character.isLineTerminator(d.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),m+=d;else if(o.Character.isLineTerminator(d.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(x)d==="]"&&(x=!1);else if(d==="/"){u=!0;break}else d==="["&&(x=!0);return u||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),m.substr(1,m.length-2)},g.prototype.scanRegExpFlags=function(){for(var d="",m="";!this.eof();){var x=this.source[this.index];if(!o.Character.isIdentifierPart(x.charCodeAt(0)))break;if(++this.index,x==="\\"&&!this.eof())if(x=this.source[this.index],x==="u"){++this.index;var u=this.index,f=this.scanHexEscape("u");if(f!==null)for(m+=f,d+="\\u";u<this.index;++u)d+=this.source[u];else this.index=u,m+="u",d+="\\u";this.tolerateUnexpectedToken()}else d+="\\",this.tolerateUnexpectedToken();else m+=x,d+=x}return m},g.prototype.scanRegExp=function(){var d=this.index,m=this.scanRegExpBody(),x=this.scanRegExpFlags(),u=this.testRegExp(m,x);return{type:9,value:"",pattern:m,flags:x,regex:u,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var d=this.source.charCodeAt(this.index);return o.Character.isIdentifierStart(d)?this.scanIdentifier():d===40||d===41||d===59?this.scanPunctuator():d===39||d===34?this.scanStringLiteral():d===46?o.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():o.Character.isDecimalDigit(d)?this.scanNumericLiteral():d===96||d===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():d>=55296&&d<57343&&o.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},g}();r.Scanner=h},function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TokenName={},r.TokenName[1]="Boolean",r.TokenName[2]="<end>",r.TokenName[3]="Identifier",r.TokenName[4]="Keyword",r.TokenName[5]="Null",r.TokenName[6]="Numeric",r.TokenName[7]="Punctuator",r.TokenName[8]="String",r.TokenName[9]="RegularExpression",r.TokenName[10]="Template"},function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(10),o=i(12),a=i(13),l=function(){function h(){this.values=[],this.curly=this.paren=-1}return h.prototype.beforeFunctionExpression=function(g){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(g)>=0},h.prototype.isRegexStart=function(){var g=this.values[this.values.length-1],d=g!==null;switch(g){case"this":case"]":d=!1;break;case")":var m=this.values[this.paren-1];d=m==="if"||m==="while"||m==="for"||m==="with";break;case"}":if(d=!1,this.values[this.curly-3]==="function"){var x=this.values[this.curly-4];d=x?!this.beforeFunctionExpression(x):!1}else if(this.values[this.curly-4]==="function"){var x=this.values[this.curly-5];d=x?!this.beforeFunctionExpression(x):!0}break}return d},h.prototype.push=function(g){g.type===7||g.type===4?(g.value==="{"?this.curly=this.values.length:g.value==="("&&(this.paren=this.values.length),this.values.push(g.value)):this.values.push(null)},h}(),c=function(){function h(g,d){this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=d?typeof d.tolerant=="boolean"&&d.tolerant:!1,this.scanner=new o.Scanner(g,this.errorHandler),this.scanner.trackComment=d?typeof d.comment=="boolean"&&d.comment:!1,this.trackRange=d?typeof d.range=="boolean"&&d.range:!1,this.trackLoc=d?typeof d.loc=="boolean"&&d.loc:!1,this.buffer=[],this.reader=new l}return h.prototype.errors=function(){return this.errorHandler.errors},h.prototype.getNextToken=function(){if(this.buffer.length===0){var g=this.scanner.scanComments();if(this.scanner.trackComment)for(var d=0;d<g.length;++d){var m=g[d],x=this.scanner.source.slice(m.slice[0],m.slice[1]),u={type:m.multiLine?"BlockComment":"LineComment",value:x};this.trackRange&&(u.range=m.range),this.trackLoc&&(u.loc=m.loc),this.buffer.push(u)}if(!this.scanner.eof()){var f=void 0;this.trackLoc&&(f={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var p=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),v=p?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(v);var E={type:a.TokenName[v.type],value:this.scanner.source.slice(v.start,v.end)};if(this.trackRange&&(E.range=[v.start,v.end]),this.trackLoc&&(f.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},E.loc=f),v.type===9){var A=v.pattern,D=v.flags;E.regex={pattern:A,flags:D}}this.buffer.push(E)}}return this.buffer.shift()},h}();r.Tokenizer=c}])})})(Hc);var rt={},Xc={},Zi={};Zi.byteLength=K1;Zi.toByteArray=Z1;Zi.fromByteArray=tg;var jt=[],kt=[],Y1=typeof Uint8Array!="undefined"?Uint8Array:Array,vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var $n=0,W1=vs.length;$n<W1;++$n)jt[$n]=vs[$n],kt[vs.charCodeAt($n)]=$n;kt["-".charCodeAt(0)]=62;kt["_".charCodeAt(0)]=63;function Jc(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function K1(e){var t=Jc(e),n=t[0],r=t[1];return(n+r)*3/4-r}function q1(e,t,n){return(t+n)*3/4-n}function Z1(e){var t,n=Jc(e),r=n[0],i=n[1],s=new Y1(q1(e,r,i)),o=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=kt[e.charCodeAt(l)]<<18|kt[e.charCodeAt(l+1)]<<12|kt[e.charCodeAt(l+2)]<<6|kt[e.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=kt[e.charCodeAt(l)]<<2|kt[e.charCodeAt(l+1)]>>4,s[o++]=t&255),i===1&&(t=kt[e.charCodeAt(l)]<<10|kt[e.charCodeAt(l+1)]<<4|kt[e.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function Q1(e){return jt[e>>18&63]+jt[e>>12&63]+jt[e>>6&63]+jt[e&63]}function eg(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(Q1(r));return i.join("")}function tg(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(eg(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(jt[t>>2]+jt[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(jt[t>>10]+jt[t>>4&63]+jt[t<<2&63]+"=")),i.join("")}var So={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */So.read=function(e,t,n,r,i){var s,o,a=i*8-r-1,l=(1<<a)-1,c=l>>1,h=-7,g=n?i-1:0,d=n?-1:1,m=e[t+g];for(g+=d,s=m&(1<<-h)-1,m>>=-h,h+=a;h>0;s=s*256+e[t+g],g+=d,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=r;h>0;o=o*256+e[t+g],g+=d,h-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-c}return(m?-1:1)*o*Math.pow(2,s-r)};So.write=function(e,t,n,r,i,s){var o,a,l,c=s*8-i-1,h=(1<<c)-1,g=h>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:s-1,x=r?1:-1,u=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+g>=1?t+=d/l:t+=d*Math.pow(2,1-g),t*l>=2&&(o++,l/=2),o+g>=h?(a=0,o=h):o+g>=1?(a=(t*l-1)*Math.pow(2,i),o=o+g):(a=t*Math.pow(2,g-1)*Math.pow(2,i),o=0));i>=8;e[n+m]=a&255,m+=x,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+m]=o&255,m+=x,o/=256,c-=8);e[n+m-x]|=u*128};/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/(function(e){const t=Zi,n=So,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const b=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(b,y),b.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function o(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');const y=new Uint8Array(b);return Object.setPrototypeOf(y,a.prototype),y}function a(b,y,_){if(typeof b=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(b)}return l(b,y,_)}a.poolSize=8192;function l(b,y,_){if(typeof b=="string")return d(b,y);if(ArrayBuffer.isView(b))return x(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(Oe(b,ArrayBuffer)||b&&Oe(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Oe(b,SharedArrayBuffer)||b&&Oe(b.buffer,SharedArrayBuffer)))return u(b,y,_);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const S=b.valueOf&&b.valueOf();if(S!=null&&S!==b)return a.from(S,y,_);const T=f(b);if(T)return T;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return a.from(b[Symbol.toPrimitive]("string"),y,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}a.from=function(b,y,_){return l(b,y,_)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function h(b,y,_){return c(b),b<=0?o(b):y!==void 0?typeof _=="string"?o(b).fill(y,_):o(b).fill(y):o(b)}a.alloc=function(b,y,_){return h(b,y,_)};function g(b){return c(b),o(b<0?0:p(b)|0)}a.allocUnsafe=function(b){return g(b)},a.allocUnsafeSlow=function(b){return g(b)};function d(b,y){if((typeof y!="string"||y==="")&&(y="utf8"),!a.isEncoding(y))throw new TypeError("Unknown encoding: "+y);const _=E(b,y)|0;let S=o(_);const T=S.write(b,y);return T!==_&&(S=S.slice(0,T)),S}function m(b){const y=b.length<0?0:p(b.length)|0,_=o(y);for(let S=0;S<y;S+=1)_[S]=b[S]&255;return _}function x(b){if(Oe(b,Uint8Array)){const y=new Uint8Array(b);return u(y.buffer,y.byteOffset,y.byteLength)}return m(b)}function u(b,y,_){if(y<0||b.byteLength<y)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<y+(_||0))throw new RangeError('"length" is outside of buffer bounds');let S;return y===void 0&&_===void 0?S=new Uint8Array(b):_===void 0?S=new Uint8Array(b,y):S=new Uint8Array(b,y,_),Object.setPrototypeOf(S,a.prototype),S}function f(b){if(a.isBuffer(b)){const y=p(b.length)|0,_=o(y);return _.length===0||b.copy(_,0,0,y),_}if(b.length!==void 0)return typeof b.length!="number"||Dt(b.length)?o(0):m(b);if(b.type==="Buffer"&&Array.isArray(b.data))return m(b.data)}function p(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function v(b){return+b!=b&&(b=0),a.alloc(+b)}a.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==a.prototype},a.compare=function(y,_){if(Oe(y,Uint8Array)&&(y=a.from(y,y.offset,y.byteLength)),Oe(_,Uint8Array)&&(_=a.from(_,_.offset,_.byteLength)),!a.isBuffer(y)||!a.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===_)return 0;let S=y.length,T=_.length;for(let N=0,P=Math.min(S,T);N<P;++N)if(y[N]!==_[N]){S=y[N],T=_[N];break}return S<T?-1:T<S?1:0},a.isEncoding=function(y){switch(String(y).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(y,_){if(!Array.isArray(y))throw new TypeError('"list" argument must be an Array of Buffers');if(y.length===0)return a.alloc(0);let S;if(_===void 0)for(_=0,S=0;S<y.length;++S)_+=y[S].length;const T=a.allocUnsafe(_);let N=0;for(S=0;S<y.length;++S){let P=y[S];if(Oe(P,Uint8Array))N+P.length>T.length?(a.isBuffer(P)||(P=a.from(P)),P.copy(T,N)):Uint8Array.prototype.set.call(T,P,N);else if(a.isBuffer(P))P.copy(T,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=P.length}return T};function E(b,y){if(a.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||Oe(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const _=b.length,S=arguments.length>2&&arguments[2]===!0;if(!S&&_===0)return 0;let T=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return se(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return _e(b).length;default:if(T)return S?-1:se(b).length;y=(""+y).toLowerCase(),T=!0}}a.byteLength=E;function A(b,y,_){let S=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,y>>>=0,_<=y))return"";for(b||(b="utf8");;)switch(b){case"hex":return U(this,y,_);case"utf8":case"utf-8":return he(this,y,_);case"ascii":return Y(this,y,_);case"latin1":case"binary":return te(this,y,_);case"base64":return ee(this,y,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,y,_);default:if(S)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),S=!0}}a.prototype._isBuffer=!0;function D(b,y,_){const S=b[y];b[y]=b[_],b[_]=S}a.prototype.swap16=function(){const y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;_<y;_+=2)D(this,_,_+1);return this},a.prototype.swap32=function(){const y=this.length;if(y%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let _=0;_<y;_+=4)D(this,_,_+3),D(this,_+1,_+2);return this},a.prototype.swap64=function(){const y=this.length;if(y%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let _=0;_<y;_+=8)D(this,_,_+7),D(this,_+1,_+6),D(this,_+2,_+5),D(this,_+3,_+4);return this},a.prototype.toString=function(){const y=this.length;return y===0?"":arguments.length===0?he(this,0,y):A.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(y){if(!a.isBuffer(y))throw new TypeError("Argument must be a Buffer");return this===y?!0:a.compare(this,y)===0},a.prototype.inspect=function(){let y="";const _=e.INSPECT_MAX_BYTES;return y=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(y+=" ... "),"<Buffer "+y+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(y,_,S,T,N){if(Oe(y,Uint8Array)&&(y=a.from(y,y.offset,y.byteLength)),!a.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(_===void 0&&(_=0),S===void 0&&(S=y?y.length:0),T===void 0&&(T=0),N===void 0&&(N=this.length),_<0||S>y.length||T<0||N>this.length)throw new RangeError("out of range index");if(T>=N&&_>=S)return 0;if(T>=N)return-1;if(_>=S)return 1;if(_>>>=0,S>>>=0,T>>>=0,N>>>=0,this===y)return 0;let P=N-T,me=S-_;const Ie=Math.min(P,me),Fe=this.slice(T,N),Le=y.slice(_,S);for(let Ce=0;Ce<Ie;++Ce)if(Fe[Ce]!==Le[Ce]){P=Fe[Ce],me=Le[Ce];break}return P<me?-1:me<P?1:0};function C(b,y,_,S,T){if(b.length===0)return-1;if(typeof _=="string"?(S=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Dt(_)&&(_=T?0:b.length-1),_<0&&(_=b.length+_),_>=b.length){if(T)return-1;_=b.length-1}else if(_<0)if(T)_=0;else return-1;if(typeof y=="string"&&(y=a.from(y,S)),a.isBuffer(y))return y.length===0?-1:k(b,y,_,S,T);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(b,y,_):Uint8Array.prototype.lastIndexOf.call(b,y,_):k(b,[y],_,S,T);throw new TypeError("val must be string, number or Buffer")}function k(b,y,_,S,T){let N=1,P=b.length,me=y.length;if(S!==void 0&&(S=String(S).toLowerCase(),S==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(b.length<2||y.length<2)return-1;N=2,P/=2,me/=2,_/=2}function Ie(Le,Ce){return N===1?Le[Ce]:Le.readUInt16BE(Ce*N)}let Fe;if(T){let Le=-1;for(Fe=_;Fe<P;Fe++)if(Ie(b,Fe)===Ie(y,Le===-1?0:Fe-Le)){if(Le===-1&&(Le=Fe),Fe-Le+1===me)return Le*N}else Le!==-1&&(Fe-=Fe-Le),Le=-1}else for(_+me>P&&(_=P-me),Fe=_;Fe>=0;Fe--){let Le=!0;for(let Ce=0;Ce<me;Ce++)if(Ie(b,Fe+Ce)!==Ie(y,Ce)){Le=!1;break}if(Le)return Fe}return-1}a.prototype.includes=function(y,_,S){return this.indexOf(y,_,S)!==-1},a.prototype.indexOf=function(y,_,S){return C(this,y,_,S,!0)},a.prototype.lastIndexOf=function(y,_,S){return C(this,y,_,S,!1)};function I(b,y,_,S){_=Number(_)||0;const T=b.length-_;S?(S=Number(S),S>T&&(S=T)):S=T;const N=y.length;S>N/2&&(S=N/2);let P;for(P=0;P<S;++P){const me=parseInt(y.substr(P*2,2),16);if(Dt(me))return P;b[_+P]=me}return P}function M(b,y,_,S){return it(se(y,b.length-_),b,_,S)}function L(b,y,_,S){return it(vt(y),b,_,S)}function $(b,y,_,S){return it(_e(y),b,_,S)}function H(b,y,_,S){return it(be(y,b.length-_),b,_,S)}a.prototype.write=function(y,_,S,T){if(_===void 0)T="utf8",S=this.length,_=0;else if(S===void 0&&typeof _=="string")T=_,S=this.length,_=0;else if(isFinite(_))_=_>>>0,isFinite(S)?(S=S>>>0,T===void 0&&(T="utf8")):(T=S,S=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const N=this.length-_;if((S===void 0||S>N)&&(S=N),y.length>0&&(S<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");let P=!1;for(;;)switch(T){case"hex":return I(this,y,_,S);case"utf8":case"utf-8":return M(this,y,_,S);case"ascii":case"latin1":case"binary":return L(this,y,_,S);case"base64":return $(this,y,_,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,y,_,S);default:if(P)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),P=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ee(b,y,_){return y===0&&_===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(y,_))}function he(b,y,_){_=Math.min(b.length,_);const S=[];let T=y;for(;T<_;){const N=b[T];let P=null,me=N>239?4:N>223?3:N>191?2:1;if(T+me<=_){let Ie,Fe,Le,Ce;switch(me){case 1:N<128&&(P=N);break;case 2:Ie=b[T+1],(Ie&192)===128&&(Ce=(N&31)<<6|Ie&63,Ce>127&&(P=Ce));break;case 3:Ie=b[T+1],Fe=b[T+2],(Ie&192)===128&&(Fe&192)===128&&(Ce=(N&15)<<12|(Ie&63)<<6|Fe&63,Ce>2047&&(Ce<55296||Ce>57343)&&(P=Ce));break;case 4:Ie=b[T+1],Fe=b[T+2],Le=b[T+3],(Ie&192)===128&&(Fe&192)===128&&(Le&192)===128&&(Ce=(N&15)<<18|(Ie&63)<<12|(Fe&63)<<6|Le&63,Ce>65535&&Ce<1114112&&(P=Ce))}}P===null?(P=65533,me=1):P>65535&&(P-=65536,S.push(P>>>10&1023|55296),P=56320|P&1023),S.push(P),T+=me}return z(S)}const xe=4096;function z(b){const y=b.length;if(y<=xe)return String.fromCharCode.apply(String,b);let _="",S=0;for(;S<y;)_+=String.fromCharCode.apply(String,b.slice(S,S+=xe));return _}function Y(b,y,_){let S="";_=Math.min(b.length,_);for(let T=y;T<_;++T)S+=String.fromCharCode(b[T]&127);return S}function te(b,y,_){let S="";_=Math.min(b.length,_);for(let T=y;T<_;++T)S+=String.fromCharCode(b[T]);return S}function U(b,y,_){const S=b.length;(!y||y<0)&&(y=0),(!_||_<0||_>S)&&(_=S);let T="";for(let N=y;N<_;++N)T+=Pt[b[N]];return T}function F(b,y,_){const S=b.slice(y,_);let T="";for(let N=0;N<S.length-1;N+=2)T+=String.fromCharCode(S[N]+S[N+1]*256);return T}a.prototype.slice=function(y,_){const S=this.length;y=~~y,_=_===void 0?S:~~_,y<0?(y+=S,y<0&&(y=0)):y>S&&(y=S),_<0?(_+=S,_<0&&(_=0)):_>S&&(_=S),_<y&&(_=y);const T=this.subarray(y,_);return Object.setPrototypeOf(T,a.prototype),T};function B(b,y,_){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+y>_)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(y,_,S){y=y>>>0,_=_>>>0,S||B(y,_,this.length);let T=this[y],N=1,P=0;for(;++P<_&&(N*=256);)T+=this[y+P]*N;return T},a.prototype.readUintBE=a.prototype.readUIntBE=function(y,_,S){y=y>>>0,_=_>>>0,S||B(y,_,this.length);let T=this[y+--_],N=1;for(;_>0&&(N*=256);)T+=this[y+--_]*N;return T},a.prototype.readUint8=a.prototype.readUInt8=function(y,_){return y=y>>>0,_||B(y,1,this.length),this[y]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(y,_){return y=y>>>0,_||B(y,2,this.length),this[y]|this[y+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(y,_){return y=y>>>0,_||B(y,2,this.length),this[y]<<8|this[y+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(y,_){return y=y>>>0,_||B(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(y,_){return y=y>>>0,_||B(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},a.prototype.readBigUInt64LE=X(function(y){y=y>>>0,Ze(y,"offset");const _=this[y],S=this[y+7];(_===void 0||S===void 0)&&Ne(y,this.length-8);const T=_+this[++y]*2**8+this[++y]*2**16+this[++y]*2**24,N=this[++y]+this[++y]*2**8+this[++y]*2**16+S*2**24;return BigInt(T)+(BigInt(N)<<BigInt(32))}),a.prototype.readBigUInt64BE=X(function(y){y=y>>>0,Ze(y,"offset");const _=this[y],S=this[y+7];(_===void 0||S===void 0)&&Ne(y,this.length-8);const T=_*2**24+this[++y]*2**16+this[++y]*2**8+this[++y],N=this[++y]*2**24+this[++y]*2**16+this[++y]*2**8+S;return(BigInt(T)<<BigInt(32))+BigInt(N)}),a.prototype.readIntLE=function(y,_,S){y=y>>>0,_=_>>>0,S||B(y,_,this.length);let T=this[y],N=1,P=0;for(;++P<_&&(N*=256);)T+=this[y+P]*N;return N*=128,T>=N&&(T-=Math.pow(2,8*_)),T},a.prototype.readIntBE=function(y,_,S){y=y>>>0,_=_>>>0,S||B(y,_,this.length);let T=_,N=1,P=this[y+--T];for(;T>0&&(N*=256);)P+=this[y+--T]*N;return N*=128,P>=N&&(P-=Math.pow(2,8*_)),P},a.prototype.readInt8=function(y,_){return y=y>>>0,_||B(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},a.prototype.readInt16LE=function(y,_){y=y>>>0,_||B(y,2,this.length);const S=this[y]|this[y+1]<<8;return S&32768?S|4294901760:S},a.prototype.readInt16BE=function(y,_){y=y>>>0,_||B(y,2,this.length);const S=this[y+1]|this[y]<<8;return S&32768?S|4294901760:S},a.prototype.readInt32LE=function(y,_){return y=y>>>0,_||B(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},a.prototype.readInt32BE=function(y,_){return y=y>>>0,_||B(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},a.prototype.readBigInt64LE=X(function(y){y=y>>>0,Ze(y,"offset");const _=this[y],S=this[y+7];(_===void 0||S===void 0)&&Ne(y,this.length-8);const T=this[y+4]+this[y+5]*2**8+this[y+6]*2**16+(S<<24);return(BigInt(T)<<BigInt(32))+BigInt(_+this[++y]*2**8+this[++y]*2**16+this[++y]*2**24)}),a.prototype.readBigInt64BE=X(function(y){y=y>>>0,Ze(y,"offset");const _=this[y],S=this[y+7];(_===void 0||S===void 0)&&Ne(y,this.length-8);const T=(_<<24)+this[++y]*2**16+this[++y]*2**8+this[++y];return(BigInt(T)<<BigInt(32))+BigInt(this[++y]*2**24+this[++y]*2**16+this[++y]*2**8+S)}),a.prototype.readFloatLE=function(y,_){return y=y>>>0,_||B(y,4,this.length),n.read(this,y,!0,23,4)},a.prototype.readFloatBE=function(y,_){return y=y>>>0,_||B(y,4,this.length),n.read(this,y,!1,23,4)},a.prototype.readDoubleLE=function(y,_){return y=y>>>0,_||B(y,8,this.length),n.read(this,y,!0,52,8)},a.prototype.readDoubleBE=function(y,_){return y=y>>>0,_||B(y,8,this.length),n.read(this,y,!1,52,8)};function j(b,y,_,S,T,N){if(!a.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>T||y<N)throw new RangeError('"value" argument is out of bounds');if(_+S>b.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(y,_,S,T){if(y=+y,_=_>>>0,S=S>>>0,!T){const me=Math.pow(2,8*S)-1;j(this,y,_,S,me,0)}let N=1,P=0;for(this[_]=y&255;++P<S&&(N*=256);)this[_+P]=y/N&255;return _+S},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(y,_,S,T){if(y=+y,_=_>>>0,S=S>>>0,!T){const me=Math.pow(2,8*S)-1;j(this,y,_,S,me,0)}let N=S-1,P=1;for(this[_+N]=y&255;--N>=0&&(P*=256);)this[_+N]=y/P&255;return _+S},a.prototype.writeUint8=a.prototype.writeUInt8=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,1,255,0),this[_]=y&255,_+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,2,65535,0),this[_]=y&255,this[_+1]=y>>>8,_+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,2,65535,0),this[_]=y>>>8,this[_+1]=y&255,_+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,4,4294967295,0),this[_+3]=y>>>24,this[_+2]=y>>>16,this[_+1]=y>>>8,this[_]=y&255,_+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,4,4294967295,0),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4};function K(b,y,_,S,T){qe(y,S,T,b,_,7);let N=Number(y&BigInt(4294967295));b[_++]=N,N=N>>8,b[_++]=N,N=N>>8,b[_++]=N,N=N>>8,b[_++]=N;let P=Number(y>>BigInt(32)&BigInt(4294967295));return b[_++]=P,P=P>>8,b[_++]=P,P=P>>8,b[_++]=P,P=P>>8,b[_++]=P,_}function ne(b,y,_,S,T){qe(y,S,T,b,_,7);let N=Number(y&BigInt(4294967295));b[_+7]=N,N=N>>8,b[_+6]=N,N=N>>8,b[_+5]=N,N=N>>8,b[_+4]=N;let P=Number(y>>BigInt(32)&BigInt(4294967295));return b[_+3]=P,P=P>>8,b[_+2]=P,P=P>>8,b[_+1]=P,P=P>>8,b[_]=P,_+8}a.prototype.writeBigUInt64LE=X(function(y,_=0){return K(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=X(function(y,_=0){return ne(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(y,_,S,T){if(y=+y,_=_>>>0,!T){const Ie=Math.pow(2,8*S-1);j(this,y,_,S,Ie-1,-Ie)}let N=0,P=1,me=0;for(this[_]=y&255;++N<S&&(P*=256);)y<0&&me===0&&this[_+N-1]!==0&&(me=1),this[_+N]=(y/P>>0)-me&255;return _+S},a.prototype.writeIntBE=function(y,_,S,T){if(y=+y,_=_>>>0,!T){const Ie=Math.pow(2,8*S-1);j(this,y,_,S,Ie-1,-Ie)}let N=S-1,P=1,me=0;for(this[_+N]=y&255;--N>=0&&(P*=256);)y<0&&me===0&&this[_+N+1]!==0&&(me=1),this[_+N]=(y/P>>0)-me&255;return _+S},a.prototype.writeInt8=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,1,127,-128),y<0&&(y=255+y+1),this[_]=y&255,_+1},a.prototype.writeInt16LE=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,2,32767,-32768),this[_]=y&255,this[_+1]=y>>>8,_+2},a.prototype.writeInt16BE=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,2,32767,-32768),this[_]=y>>>8,this[_+1]=y&255,_+2},a.prototype.writeInt32LE=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,4,2147483647,-2147483648),this[_]=y&255,this[_+1]=y>>>8,this[_+2]=y>>>16,this[_+3]=y>>>24,_+4},a.prototype.writeInt32BE=function(y,_,S){return y=+y,_=_>>>0,S||j(this,y,_,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4},a.prototype.writeBigInt64LE=X(function(y,_=0){return K(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=X(function(y,_=0){return ne(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function we(b,y,_,S,T,N){if(_+S>b.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Je(b,y,_,S,T){return y=+y,_=_>>>0,T||we(b,y,_,4),n.write(b,y,_,S,23,4),_+4}a.prototype.writeFloatLE=function(y,_,S){return Je(this,y,_,!0,S)},a.prototype.writeFloatBE=function(y,_,S){return Je(this,y,_,!1,S)};function ot(b,y,_,S,T){return y=+y,_=_>>>0,T||we(b,y,_,8),n.write(b,y,_,S,52,8),_+8}a.prototype.writeDoubleLE=function(y,_,S){return ot(this,y,_,!0,S)},a.prototype.writeDoubleBE=function(y,_,S){return ot(this,y,_,!1,S)},a.prototype.copy=function(y,_,S,T){if(!a.isBuffer(y))throw new TypeError("argument should be a Buffer");if(S||(S=0),!T&&T!==0&&(T=this.length),_>=y.length&&(_=y.length),_||(_=0),T>0&&T<S&&(T=S),T===S||y.length===0||this.length===0)return 0;if(_<0)throw new RangeError("targetStart out of bounds");if(S<0||S>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),y.length-_<T-S&&(T=y.length-_+S);const N=T-S;return this===y&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(_,S,T):Uint8Array.prototype.set.call(y,this.subarray(S,T),_),N},a.prototype.fill=function(y,_,S,T){if(typeof y=="string"){if(typeof _=="string"?(T=_,_=0,S=this.length):typeof S=="string"&&(T=S,S=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!a.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(y.length===1){const P=y.charCodeAt(0);(T==="utf8"&&P<128||T==="latin1")&&(y=P)}}else typeof y=="number"?y=y&255:typeof y=="boolean"&&(y=Number(y));if(_<0||this.length<_||this.length<S)throw new RangeError("Out of range index");if(S<=_)return this;_=_>>>0,S=S===void 0?this.length:S>>>0,y||(y=0);let N;if(typeof y=="number")for(N=_;N<S;++N)this[N]=y;else{const P=a.isBuffer(y)?y:a.from(y,T),me=P.length;if(me===0)throw new TypeError('The value "'+y+'" is invalid for argument "value"');for(N=0;N<S-_;++N)this[N+_]=P[N%me]}return this};const Ue={};function Ve(b,y,_){Ue[b]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:y.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(T){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:T,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}Ve("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ve("ERR_INVALID_ARG_TYPE",function(b,y){return`The "${b}" argument must be of type number. Received type ${typeof y}`},TypeError),Ve("ERR_OUT_OF_RANGE",function(b,y,_){let S=`The value of "${b}" is out of range.`,T=_;return Number.isInteger(_)&&Math.abs(_)>2**32?T=Ge(String(_)):typeof _=="bigint"&&(T=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(T=Ge(T)),T+="n"),S+=` It must be ${y}. Received ${T}`,S},RangeError);function Ge(b){let y="",_=b.length;const S=b[0]==="-"?1:0;for(;_>=S+4;_-=3)y=`_${b.slice(_-3,_)}${y}`;return`${b.slice(0,_)}${y}`}function ft(b,y,_){Ze(y,"offset"),(b[y]===void 0||b[y+_]===void 0)&&Ne(y,b.length-(_+1))}function qe(b,y,_,S,T,N){if(b>_||b<y){const P=typeof y=="bigint"?"n":"";let me;throw N>3?y===0||y===BigInt(0)?me=`>= 0${P} and < 2${P} ** ${(N+1)*8}${P}`:me=`>= -(2${P} ** ${(N+1)*8-1}${P}) and < 2 ** ${(N+1)*8-1}${P}`:me=`>= ${y}${P} and <= ${_}${P}`,new Ue.ERR_OUT_OF_RANGE("value",me,b)}ft(S,T,N)}function Ze(b,y){if(typeof b!="number")throw new Ue.ERR_INVALID_ARG_TYPE(y,"number",b)}function Ne(b,y,_){throw Math.floor(b)!==b?(Ze(b,_),new Ue.ERR_OUT_OF_RANGE(_||"offset","an integer",b)):y<0?new Ue.ERR_BUFFER_OUT_OF_BOUNDS:new Ue.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${y}`,b)}const at=/[^+/0-9A-Za-z-_]/g;function gt(b){if(b=b.split("=")[0],b=b.trim().replace(at,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function se(b,y){y=y||1/0;let _;const S=b.length;let T=null;const N=[];for(let P=0;P<S;++P){if(_=b.charCodeAt(P),_>55295&&_<57344){if(!T){if(_>56319){(y-=3)>-1&&N.push(239,191,189);continue}else if(P+1===S){(y-=3)>-1&&N.push(239,191,189);continue}T=_;continue}if(_<56320){(y-=3)>-1&&N.push(239,191,189),T=_;continue}_=(T-55296<<10|_-56320)+65536}else T&&(y-=3)>-1&&N.push(239,191,189);if(T=null,_<128){if((y-=1)<0)break;N.push(_)}else if(_<2048){if((y-=2)<0)break;N.push(_>>6|192,_&63|128)}else if(_<65536){if((y-=3)<0)break;N.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((y-=4)<0)break;N.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return N}function vt(b){const y=[];for(let _=0;_<b.length;++_)y.push(b.charCodeAt(_)&255);return y}function be(b,y){let _,S,T;const N=[];for(let P=0;P<b.length&&!((y-=2)<0);++P)_=b.charCodeAt(P),S=_>>8,T=_%256,N.push(T),N.push(S);return N}function _e(b){return t.toByteArray(gt(b))}function it(b,y,_,S){let T;for(T=0;T<S&&!(T+_>=y.length||T>=b.length);++T)y[T+_]=b[T];return T}function Oe(b,y){return b instanceof y||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===y.name}function Dt(b){return b!==b}const Pt=function(){const b="0123456789abcdef",y=new Array(256);for(let _=0;_<16;++_){const S=_*16;for(let T=0;T<16;++T)y[S+T]=b[_]+b[T]}return y}();function X(b){return typeof BigInt=="undefined"?Q:b}function Q(){throw new Error("BigInt not supported")}})(Xc);function ng(e){return Array.isArray?Array.isArray(e):Qi(e)==="[object Array]"}rt.isArray=ng;function rg(e){return typeof e=="boolean"}rt.isBoolean=rg;function ig(e){return e===null}rt.isNull=ig;function sg(e){return e==null}rt.isNullOrUndefined=sg;function og(e){return typeof e=="number"}rt.isNumber=og;function ag(e){return typeof e=="string"}rt.isString=ag;function lg(e){return typeof e=="symbol"}rt.isSymbol=lg;function ug(e){return e===void 0}rt.isUndefined=ug;function cg(e){return Qi(e)==="[object RegExp]"}rt.isRegExp=cg;function hg(e){return typeof e=="object"&&e!==null}rt.isObject=hg;function fg(e){return Qi(e)==="[object Date]"}rt.isDate=fg;function dg(e){return Qi(e)==="[object Error]"||e instanceof Error}rt.isError=dg;function pg(e){return typeof e=="function"}rt.isFunction=pg;function mg(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}rt.isPrimitive=mg;rt.isBuffer=Xc.Buffer.isBuffer;function Qi(e){return Object.prototype.toString.call(e)}const Gc=32,gr=7,al=256,ll=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];let re;const ul=e=>e<1e5?e<100?e<10?0:1:e<1e4?e<1e3?2:3:4:e<1e7?e<1e6?5:6:e<1e9?e<1e8?7:8:9;function cl(e,t){if(e===t)return 0;if(~~e===e&&~~t===t){if(e===0||t===0)return e<t?-1:1;if(e<0||t<0){if(t>=0)return-1;if(e>=0)return 1;e=-e,t=-t}const i=ul(e),s=ul(t);let o=0;return i<s?(e*=ll[s-i-1],t/=10,o=-1):i>s&&(t*=ll[i-s-1],e/=10,o=1),e===t?o:e<t?-1:1}const n=String(e),r=String(t);return n===r?0:n<r?-1:1}function gg(e){let t=0;for(;e>=Gc;)t|=e&1,e>>=1;return e+t}function hl(e,t,n,r){let i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;fl(e,t,i),fl(re,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function fl(e,t,n){for(n--;t<n;){const r=e[t];e[t++]=e[n],e[n--]=r}}function dl(e,t,n,r,i){for(r===t&&r++;r<n;r++){const s=e[r],o=re[r];let a=t,l=r;for(;a<l;){const h=a+l>>>1;i(s,e[h])<0?l=h:a=h+1}let c=r-a;switch(c){case 3:e[a+3]=e[a+2],re[a+3]=re[a+2];case 2:e[a+2]=e[a+1],re[a+2]=re[a+1];case 1:e[a+1]=e[a],re[a+1]=re[a];break;default:for(;c>0;)e[a+c]=e[a+c-1],re[a+c]=re[a+c-1],c--}e[a]=s,re[a]=o}}function ys(e,t,n,r,i,s){let o=0,a=0,l=1;if(s(e,t[n+i])>0){for(a=r-i;l<a&&s(e,t[n+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=a);l>a&&(l=a),o+=i,l+=i}else{for(a=i+1;l<a&&s(e,t[n+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=a);l>a&&(l=a);const c=o;o=i-l,l=i-c}for(o++;o<l;){const c=o+(l-o>>>1);s(e,t[n+c])>0?o=c+1:l=c}return l}function xs(e,t,n,r,i,s){let o=0,a=0,l=1;if(s(e,t[n+i])<0){for(a=i+1;l<a&&s(e,t[n+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=a);l>a&&(l=a);const c=o;o=i-l,l=i-c}else{for(a=r-i;l<a&&s(e,t[n+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=a);l>a&&(l=a),o+=i,l+=i}for(o++;o<l;){const c=o+(l-o>>>1);s(e,t[n+c])<0?l=c:o=c+1}return l}class vg{constructor(t,n){this.array=t,this.compare=n;const{length:r}=t;this.length=r,this.minGallop=gr,this.tmpStorageLength=r<2*al?r>>>1:al,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=r<120?5:r<1542?10:r<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(t,n){this.runStart[this.stackSize]=t,this.runLength[this.stackSize]=n,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let t=this.stackSize-2;if(t>=1&&this.runLength[t-1]<=this.runLength[t]+this.runLength[t+1]||t>=2&&this.runLength[t-2]<=this.runLength[t]+this.runLength[t-1])this.runLength[t-1]<this.runLength[t+1]&&t--;else if(this.runLength[t]>this.runLength[t+1])break;this.mergeAt(t)}}forceMergeRuns(){for(;this.stackSize>1;){let t=this.stackSize-2;t>0&&this.runLength[t-1]<this.runLength[t+1]&&t--,this.mergeAt(t)}}mergeAt(t){const{compare:n}=this,{array:r}=this;let i=this.runStart[t],s=this.runLength[t];const o=this.runStart[t+1];let a=this.runLength[t+1];this.runLength[t]=s+a,t===this.stackSize-3&&(this.runStart[t+1]=this.runStart[t+2],this.runLength[t+1]=this.runLength[t+2]),this.stackSize--;const l=xs(r[o],r,i,s,0,n);i+=l,s-=l,s!==0&&(a=ys(r[i+s-1],r,o,a,a-1,n),a!==0&&(s<=a?this.mergeLow(i,s,o,a):this.mergeHigh(i,s,o,a)))}mergeLow(t,n,r,i){const{compare:s}=this,{array:o}=this,{tmp:a}=this,{tmpIndex:l}=this;let c=0;for(c=0;c<n;c++)a[c]=o[t+c],l[c]=re[t+c];let h=0,g=r,d=t;if(o[d]=o[g],re[d]=re[g],d++,g++,--i===0){for(c=0;c<n;c++)o[d+c]=a[h+c],re[d+c]=l[h+c];return}if(n===1){for(c=0;c<i;c++)o[d+c]=o[g+c],re[d+c]=re[g+c];o[d+i]=a[h],re[d+i]=l[h];return}let{minGallop:m}=this;for(;;){let x=0,u=0,f=!1;do if(s(o[g],a[h])<0){if(o[d]=o[g],re[d]=re[g],d++,g++,u++,x=0,--i===0){f=!0;break}}else if(o[d]=a[h],re[d]=l[h],d++,h++,x++,u=0,--n===1){f=!0;break}while((x|u)<m);if(f)break;do{if(x=xs(o[g],a,h,n,0,s),x!==0){for(c=0;c<x;c++)o[d+c]=a[h+c],re[d+c]=l[h+c];if(d+=x,h+=x,n-=x,n<=1){f=!0;break}}if(o[d]=o[g],re[d]=re[g],d++,g++,--i===0){f=!0;break}if(u=ys(a[h],o,g,i,0,s),u!==0){for(c=0;c<u;c++)o[d+c]=o[g+c],re[d+c]=re[g+c];if(d+=u,g+=u,i-=u,i===0){f=!0;break}}if(o[d]=a[h],re[d]=l[h],d++,h++,--n===1){f=!0;break}m--}while(x>=gr||u>=gr);if(f)break;m<0&&(m=0),m+=2}if(this.minGallop=m,m<1&&(this.minGallop=1),n===1){for(c=0;c<i;c++)o[d+c]=o[g+c],re[d+c]=re[g+c];o[d+i]=a[h],re[d+i]=l[h]}else{if(n===0)throw new Error("mergeLow preconditions were not respected");for(c=0;c<n;c++)o[d+c]=a[h+c],re[d+c]=l[h+c]}}mergeHigh(t,n,r,i){const{compare:s}=this,{array:o}=this,{tmp:a}=this,{tmpIndex:l}=this;let c=0;for(c=0;c<i;c++)a[c]=o[r+c],l[c]=re[r+c];let h=t+n-1,g=i-1,d=r+i-1,m=0,x=0;if(o[d]=o[h],re[d]=re[h],d--,h--,--n===0){for(m=d-(i-1),c=0;c<i;c++)o[m+c]=a[c],re[m+c]=l[c];return}if(i===1){for(d-=n,h-=n,x=d+1,m=h+1,c=n-1;c>=0;c--)o[x+c]=o[m+c],re[x+c]=re[m+c];o[d]=a[g],re[d]=l[g];return}let{minGallop:u}=this;for(;;){let f=0,p=0,v=!1;do if(s(a[g],o[h])<0){if(o[d]=o[h],re[d]=re[h],d--,h--,f++,p=0,--n===0){v=!0;break}}else if(o[d]=a[g],re[d]=l[g],d--,g--,p++,f=0,--i===1){v=!0;break}while((f|p)<u);if(v)break;do{if(f=n-xs(a[g],o,t,n,n-1,s),f!==0){for(d-=f,h-=f,n-=f,x=d+1,m=h+1,c=f-1;c>=0;c--)o[x+c]=o[m+c],re[x+c]=re[m+c];if(n===0){v=!0;break}}if(o[d]=a[g],re[d]=l[g],d--,g--,--i===1){v=!0;break}if(p=i-ys(o[h],a,0,i,i-1,s),p!==0){for(d-=p,g-=p,i-=p,x=d+1,m=g+1,c=0;c<p;c++)o[x+c]=a[m+c],re[x+c]=l[m+c];if(i<=1){v=!0;break}}if(o[d]=o[h],re[d]=re[h],d--,h--,--n===0){v=!0;break}u--}while(f>=gr||p>=gr);if(v)break;u<0&&(u=0),u+=2}if(this.minGallop=u,u<1&&(this.minGallop=1),i===1){for(d-=n,h-=n,x=d+1,m=h+1,c=n-1;c>=0;c--)o[x+c]=o[m+c],re[x+c]=re[m+c];o[d]=a[g],re[d]=l[g]}else{if(i===0)throw new Error("mergeHigh preconditions were not respected");for(m=d-(i-1),c=0;c<i;c++)o[m+c]=a[c],re[m+c]=l[c]}}}function yg(e,t,n,r){if(!Array.isArray(e))throw new TypeError(`The "array" argument must be an array. Received ${e}`);re=[];const{length:i}=e;let s=0;for(;s<i;)re[s]=s++;t?typeof t!="function"&&(r=n,n=t,t=cl):t=cl,n||(n=0),r||(r=i);let o=r-n;if(o<2)return re;let a=0;if(o<Gc)return a=hl(e,n,r,t),dl(e,n,r,n+a,t),re;const l=new vg(e,t),c=gg(o);do{if(a=hl(e,n,r,t),a<c){let h=o;h>c&&(h=c),dl(e,n,n+h,n+a,t),a=h}l.pushRun(n,a),l.mergeRuns(),o-=a,n+=a}while(o!==0);return l.forceMergeRuns(),re}var xg={sort:yg};const wg=Object.prototype.hasOwnProperty;var _g=(e,t)=>wg.call(e,t);const ko=_g,{isObject:pl,isArray:Eg}=rt,Fo="before",Yc="after-prop",Wc="after-colon",Kc="after-value",qc="after",Zc="before-all",Qc="after-all",Ag="[",bg="]",Dg="{",Cg="}",Sg=",",kg="",Fg="-",Io=[Fo,Yc,Wc,Kc,qc],Ig=[Fo,Zc,Qc].map(Symbol.for),eh=":",ml=void 0,Lr=(e,t)=>Symbol.for(e+eh+t),es=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),eo=(e,t,n,r,i,s)=>{const o=Lr(i,r);if(!ko(t,o))return;const a=n===r?o:Lr(i,n);es(e,a,t[o]),s&&delete t[o]},th=(e,t,n,r,i)=>{Io.forEach(s=>{eo(e,t,n,r,s,i)})},Bg=(e,t,n)=>{t!==n&&Io.forEach(r=>{const i=Lr(r,n);if(!ko(e,i)){eo(e,e,n,t,r,!0);return}const s=e[i];delete e[i],eo(e,e,n,t,r,!0),es(e,Lr(r,t),s)})},ws=(e,t)=>{Ig.forEach(n=>{const r=t[n];r&&es(e,n,r)})},Tg=(e,t,n)=>(n.forEach(r=>{!ko(t,r)||(e[r]=t[r],th(e,t,r,r))}),e);var ts={SYMBOL_PREFIXES:Io,PREFIX_BEFORE:Fo,PREFIX_AFTER_PROP:Yc,PREFIX_AFTER_COLON:Wc,PREFIX_AFTER_VALUE:Kc,PREFIX_AFTER:qc,PREFIX_BEFORE_ALL:Zc,PREFIX_AFTER_ALL:Qc,BRACKET_OPEN:Ag,BRACKET_CLOSE:bg,CURLY_BRACKET_OPEN:Dg,CURLY_BRACKET_CLOSE:Cg,COLON:eh,COMMA:Sg,MINUS:Fg,EMPTY:kg,UNDEFINED:ml,symbol:Lr,define:es,copy_comments:th,swap_comments:Bg,assign_non_prop_comments:ws,assign(e,t,n){if(!pl(e))throw new TypeError("Cannot convert undefined or null to object");if(!pl(t))return e;if(n===ml)n=Object.keys(t),ws(e,t);else if(Eg(n))n.length===0&&ws(e,t);else throw new TypeError("keys must be array or undefined");return Tg(e,t,n)}};const{isArray:Mg}=rt,{sort:Ng}=xg,{SYMBOL_PREFIXES:Og,UNDEFINED:gl,symbol:Lg,copy_comments:Rg,swap_comments:nh}=ts,Pg=e=>{const{length:t}=e;let n=0;const r=t/2;for(;n<r;n++)nh(e,n,t-n-1)},vl=(e,t,n,r,i)=>{Rg(e,t,n+r,n,i)},zn=(e,t,n,r,i,s)=>{if(i>0){let a=r;for(;a-- >0;)vl(e,t,n+a,i,s);return}let o=0;for(;o<r;){const a=o++;vl(e,t,n+a,i,s)}},yl=(e,t)=>{Og.forEach(n=>{const r=Lg(n,t);delete e[r]})},$g=(e,t)=>{let n=t;for(;n in e;)n=e[n];return n};class Bi extends Array{splice(...t){const{length:n}=this,r=super.splice(...t);let[i,s,...o]=t;i<0&&(i+=n),arguments.length===1?s=n-i:s=Math.min(n-i,s);const{length:a}=o,l=a-s,c=i+s,h=n-c;return zn(this,this,c,h,l,!0),r}slice(...t){const{length:n}=this,r=super.slice(...t);if(!r.length)return new Bi;let[i,s]=t;return s===gl?s=n:s<0&&(s+=n),i<0?i+=n:i===gl&&(i=0),zn(r,this,i,s-i,-i),r}unshift(...t){const{length:n}=this,r=super.unshift(...t),{length:i}=t;return i>0&&zn(this,this,0,n,i,!0),r}shift(){const t=super.shift(),{length:n}=this;return yl(this,0),zn(this,this,1,n,-1,!0),t}reverse(){return super.reverse(),Pg(this),this}pop(){const t=super.pop();return yl(this,this.length),t}concat(...t){let{length:n}=this;const r=super.concat(...t);return t.length&&(zn(r,this,0,this.length,0),t.forEach(i=>{const s=n;n+=Mg(i)?i.length:1,i instanceof Bi&&zn(r,i,0,i.length,s)})),r}sort(...t){const n=Ng(this,...t.slice(0,1)),r=Object.create(null);return n.forEach((i,s)=>{if(i===s)return;const o=$g(r,i);o!==s&&(r[s]=o,nh(this,s,o))}),this}}var rh={CommentArray:Bi};const zg=Hc.exports,{CommentArray:Ug}=rh,{PREFIX_BEFORE:Ti,PREFIX_AFTER_PROP:jg,PREFIX_AFTER_COLON:Vg,PREFIX_AFTER_VALUE:ih,PREFIX_AFTER:Bo,PREFIX_BEFORE_ALL:Hg,PREFIX_AFTER_ALL:Xg,BRACKET_OPEN:Jg,BRACKET_CLOSE:xl,CURLY_BRACKET_OPEN:Gg,CURLY_BRACKET_CLOSE:wl,COLON:sh,COMMA:oh,MINUS:_l,EMPTY:Yg,UNDEFINED:ns,define:To,assign_non_prop_comments:Wg}=ts,ah=e=>zg.tokenize(e,{comment:!0,loc:!0}),Mo=[];let xn=null,Vt=null;const No=[];let wn,lh=!1,uh=!1,Rr=null,Pr=null,ut=null,ch,Mi=null;const hh=()=>{No.length=Mo.length=0,Pr=null,wn=ns},Kg=()=>{hh(),Rr.length=0,Vt=xn=Rr=Pr=ut=Mi=null},Oo=e=>Symbol.for(wn!==ns?e+sh+wn:e),Lo=(e,t)=>Mi?Mi(e,t):t,fh=()=>{const e=new SyntaxError(`Unexpected token ${ut.value.slice(0,1)}`);throw Object.assign(e,ut.loc.start),e},dh=()=>{const e=new SyntaxError("Unexpected end of JSON input");throw Object.assign(e,Pr?Pr.loc.end:{line:1,column:0}),e},Ft=()=>{const e=Rr[++ch];uh=ut&&e&&ut.loc.end.line===e.loc.start.line||!1,Pr=ut,ut=e},to=()=>(ut||dh(),ut.type==="Punctuator"?ut.value:ut.type),Tn=e=>to()===e,yi=e=>{Tn(e)||fh()},Ro=e=>{Mo.push(xn),xn=e},Po=()=>{xn=Mo.pop()},ph=()=>{if(!Vt)return;const e=[];for(const n of Vt)if(n.inline)e.push(n);else break;const{length:t}=e;!t||(t===Vt.length?Vt=null:Vt.splice(0,t),To(xn,Oo(Bo),e))},hn=e=>{!Vt||(To(xn,Oo(e),Vt),Vt=null)},Ht=e=>{const t=[];for(;ut&&(Tn("LineComment")||Tn("BlockComment"));){const n=Re(ue({},ut),{inline:uh});t.push(n),Ft()}if(!lh&&!!t.length){if(e){To(xn,Oo(e),t);return}Vt=t}},Ni=(e,t)=>{t&&No.push(wn),wn=e},mh=()=>{wn=No.pop()},qg=()=>{const e={};Ro(e),Ni(ns,!0);let t=!1,n;for(Ht();!Tn(wl)&&!(t&&(hn(ih),yi(oh),Ft(),Ht(),ph(),Tn(wl)));)t=!0,yi("String"),n=JSON.parse(ut.value),Ni(n),hn(Ti),Ft(),Ht(jg),yi(sh),Ft(),Ht(Vg),e[n]=Lo(n,$o()),Ht();return t&&hn(Bo),Ft(),wn=void 0,t||hn(Ti),Po(),mh(),e},Zg=()=>{const e=new Ug;Ro(e),Ni(ns,!0);let t=!1,n=0;for(Ht();!Tn(xl)&&!(t&&(hn(ih),yi(oh),Ft(),Ht(),ph(),Tn(xl)));)t=!0,Ni(n),hn(Ti),e[n]=Lo(n,$o()),n++,Ht();return t&&hn(Bo),Ft(),wn=void 0,t||hn(Ti),Po(),mh(),e};function $o(){let e=to();if(e===Gg)return Ft(),qg();if(e===Jg)return Ft(),Zg();let t=Yg;e===_l&&(Ft(),e=to(),t=_l);let n;switch(e){case"String":case"Boolean":case"Null":case"Numeric":return n=ut.value,Ft(),JSON.parse(t+n)}}const Qg=e=>Object(e)===e,ev=(e,t,n)=>{hh(),Rr=ah(e),Mi=t,lh=n,Rr.length||dh(),ch=-1,Ft(),Ro({}),Ht(Hg);let r=$o();return Ht(Xg),ut&&fh(),!n&&r!==null&&(Qg(r)||(r=new Object(r)),Wg(r,xn)),Po(),r=Lo("",r),Kg(),r};var tv={parse:ev,tokenize:ah};/*!
|
|
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
|
*
|
|
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
* Licensed under the MIT License.
|
|
*/var Kt="",_s,nv=rv;function rv(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var n=e.length*t;if(_s!==e||typeof _s=="undefined")_s=e,Kt="";else if(Kt.length>=n)return Kt.substr(0,n);for(;n>Kt.length&&t>1;)t&1&&(Kt+=e),t>>=1,e+=e;return Kt+=e,Kt=Kt.substr(0,n),Kt}const{isArray:zo,isObject:gh,isFunction:no,isNumber:iv,isString:sv}=rt,ov=nv,{PREFIX_BEFORE_ALL:av,PREFIX_BEFORE:vh,PREFIX_AFTER_PROP:lv,PREFIX_AFTER_COLON:uv,PREFIX_AFTER_VALUE:cv,PREFIX_AFTER:Uo,PREFIX_AFTER_ALL:hv,BRACKET_OPEN:fv,BRACKET_CLOSE:dv,CURLY_BRACKET_OPEN:pv,CURLY_BRACKET_CLOSE:mv,COLON:gv,COMMA:yh,EMPTY:At,UNDEFINED:vv}=ts,Es=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,jo=" ",Sn=`
|
|
`,xh="null",wh=e=>`${vh}:${e}`,yv=e=>`${lv}:${e}`,xv=e=>`${uv}:${e}`,_h=e=>`${cv}:${e}`,Eh=e=>`${Uo}:${e}`,wv={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},_v=e=>(Es.lastIndex=0,Es.test(e)?e.replace(Es,t=>{const n=wv[t];return typeof n=="string"?n:t}):e),Ah=e=>`"${_v(e)}"`,Ev=(e,t)=>t?`//${e}`:`/*${e}*/`,_t=(e,t,n,r)=>{const i=e[Symbol.for(t)];if(!i||!i.length)return At;let s=!1;const o=i.reduce((a,{inline:l,type:c,value:h})=>{const g=l?jo:Sn+n;return s=c==="LineComment",a+g+Ev(h,s)},At);return r||s?o+Sn+n:o};let ar=null,Qr=At;const Av=()=>{ar=null,Qr=At},$r=(e,t,n)=>e?t?e+t.trim()+Sn+n:e.trimRight()+Sn+n:t?t.trimRight()+Sn+n:At,bh=(e,t,n)=>{const r=_t(t,vh,n+Qr,!0);return $r(r,e,n)},bv=(e,t)=>{const n=t+Qr,{length:r}=e;let i=At,s=At;for(let o=0;o<r;o++)o!==0&&(i+=yh),i+=$r(s,_t(e,wh(o),n),n)||Sn+n,i+=Vo(o,e,n)||xh,i+=_t(e,_h(o),n),s=_t(e,Eh(o),n);return i+=$r(s,_t(e,Uo,n),n),fv+bh(i,e,t)+dv},Dv=(e,t)=>{if(!e)return"null";const n=t+Qr;let r=At,i=At,s=!0;const o=zo(ar)?ar:Object.keys(e),a=l=>{const c=Vo(l,e,n);if(c===vv)return;s||(r+=yh),s=!1,r+=$r(i,_t(e,wh(l),n),n)||Sn+n,r+=Ah(l)+_t(e,yv(l),n)+gv+_t(e,xv(l),n)+jo+c+_t(e,_h(l),n),i=_t(e,Eh(l),n)};return o.forEach(a),r+=$r(i,_t(e,Uo,n),n),pv+bh(r,e,t)+mv};function Vo(e,t,n){let r=t[e];switch(gh(r)&&no(r.toJSON)&&(r=r.toJSON(e)),no(ar)&&(r=ar.call(t,e,r)),typeof r){case"string":return Ah(r);case"number":return Number.isFinite(r)?String(r):xh;case"boolean":case"null":return String(r);case"object":return zo(r)?bv(r,n):Dv(r,n)}}const Cv=e=>sv(e)?e:iv(e)?ov(jo,e):At,{toString:Sv}=Object.prototype,kv=["[object Number]","[object String]","[object Boolean]"],Fv=e=>{if(typeof e!="object")return!1;const t=Sv.call(e);return kv.includes(t)};var Iv=(e,t,n)=>{const r=Cv(n);if(!r)return JSON.stringify(e,t);!no(t)&&!zo(t)&&(t=null),ar=t,Qr=r;const i=Fv(e)?JSON.stringify(e):Vo("",{"":e},At);return Av(),gh(e)?_t(e,av,At).trimLeft()+i+_t(e,hv,At).trimRight():i};const{parse:Bv,tokenize:Tv}=tv,Mv=Iv,{CommentArray:Nv}=rh,{assign:Ov}=ts;var El={parse:Bv,stringify:Mv,tokenize:Tv,CommentArray:Nv,assign:Ov};function xi(e,t){return e.schema.hook(Lv,new W.ModelPath(e),e.data,{blockStates:t})}const Lv={base({},e,t){return t},choice({switchNode:e},t,n,r){return e.hook(this,t,n,r)},list({children:e},t,n,r){if(!Array.isArray(n))return n;const i=n.map((s,o)=>e.hook(this,t.push(o),s.node,r));for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i},map({children:e,config:t},n,r,i){var a,l;if(r===void 0)return;const s=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[W.relativePath(n,t.validation.params.id).get()]:null,o={};Object.keys(r).forEach(c=>{var h;s&&!Object.keys((h=s.properties)!=null?h:{}).includes(c)||(o[c]=e.hook(this,n.push(c),r[c],i))});for(const c of Object.getOwnPropertySymbols(r))o[c]=r[c];return o},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},s=e(t);Object.keys(s).filter(o=>s[o].enabled(t)).forEach(o=>{const a=s[o].hook(this,t.push(o),n[o],r);a!=null&&(i[o]=a)});for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i}},As={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0},bs={json:{parse:El.parse,stringify:(e,t)=>El.stringify(e,null,t)+`
|
|
`},yaml:{parse:Rs.load,stringify:(e,t)=>Rs.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function Rv({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:s,copySuccess:o,onError:a}){const{locale:l}=je(),[c,h]=J(et.getIndent()),[g,d]=J(et.getFormat()),[m,x]=J(et.getHighlighting()),[u,f]=J(!1),p=Te(null),v=Te(()=>{}),E=Te(()=>{}),A=Te(null),D=Te(),C=tt((L,$)=>{const H=xi(L,$);return bs[g].stringify(H,As[c])},[c,g]);ce(()=>{v.current=()=>{if(!!D.current&&!(!t||!n))try{const L=C(t,n);D.current.setValue(L)}catch(L){L instanceof Error?(L.message=`Error getting JSON output: ${L.message}`,a(L)):a(`Error getting JSON output: ${It(L)}`),console.error(L),D.current.setValue("")}},E.current=()=>{if(!D.current)return;const L=D.current.getValue();if(L.length!==0)try{const $=bs[g].parse(L);t==null||t.reset(W.DataModel.wrapLists($),!1)}catch($){$ instanceof Error?($.message=`Error importing: ${$.message}`,a($)):a(`Error importing: ${It($)}`),console.error($)}}},[t,n,c,g,m]),ce(()=>{m?(f(!1),D.current={getValue(){return""},setValue(){},configure(){},select(){}},Ee(()=>import("./index.8ac52a74.js").then(function(L){return L.i}),[]).then(async L=>{await Promise.all([Ee(()=>import("./json.c327d69b.js").then(function(H){return H.j}),[]),Ee(()=>import("./yaml.e8f3b9ab.js"),[])]);const $=L.edit("editor");$.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),$.$blockScrolling=1/0,$.on("blur",H=>E.current(H)),$.getSession().setMode("ace/mode/json"),D.current={getValue(){return $.getSession().getValue()},setValue(H){$.getSession().setValue(H)},configure(H,ee){$.setOption("useSoftTabs",H!=="tabs"),$.setOption("tabSize",H==="tabs"?4:As[H]),$.getSession().setMode(`ace/mode/${ee}`)},select(){$.selectAll()}},f(!0)})):D.current={getValue(){return A.current?A.current.value:""},setValue(L){!A.current||(A.current.value=L)},configure(){},select(){}}},[m]),Gi(t,()=>{!v.current||v.current()}),ce(()=>{!v.current||t&&v.current()},[t]),ce(()=>{!D.current||!v.current||(!m||u)&&(D.current.configure(c,g),v.current())},[c,g,m,u]),ce(()=>{r&&t&&n&&navigator.clipboard.writeText(C(t,n)).then(()=>{o()})},[r]),ce(()=>{if(i&&t&&n&&p.current){const L=encodeURIComponent(C(t,n));p.current.setAttribute("href",`data:text/json;charset=utf-8,${L}`),p.current.setAttribute("download",`${e}.${g}`),p.current.click()}},[i]),ce(()=>{s&&D.current&&(D.current.setValue(""),D.current.select())},[s]);const k=L=>{et.setIndent(L),h(L)},I=L=>{et.setFormat(L),d(L)},M=L=>{et.setHighlighting(L),x(L)};return w(pe,null,w("div",{class:"controls source-controls"},w(pt,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(As).map(([L])=>w(ae,{label:l(`indentation.${L}`),active:c===L,onClick:()=>k(L)})),w("hr",null),Object.keys(bs).map(L=>w(ae,{label:l(`format.${L}`),active:g===L,onClick:()=>I(L)})),w("hr",null),w(ae,{icon:m?"square_fill":"square",label:l("highlighting"),onClick:()=>M(!m)}))),m?w("pre",{id:"editor",class:"source"}):w("textarea",{ref:A,class:"source",spellcheck:!1,autocorrect:"off",onBlur:E.current}),w("a",{ref:p,style:"display: none;"}))}function Dh(e,t){for(var n in t)e[n]=t[n];return e}function ro(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 io(e){this.props=e}function Ch(e,t){function n(i){var s=this.props.ref,o=s==i.ref;return!o&&s&&(s.call?s(null):s.current=null),t?!t(this.props,i)||!o:ro(this.props,i)}function r(i){return this.shouldComponentUpdate=n,w(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(io.prototype=new Nt).isPureReactComponent=!0,io.prototype.shouldComponentUpdate=function(e,t){return ro(this.props,e)||ro(this.state,t)};var Al=ie.__b;ie.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Al&&Al(e)};var Pv=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function $v(e){function t(n,r){var i=Dh({},n);return delete i.ref,e(i,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return t.$$typeof=Pv,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var bl=function(e,t){return e==null?null:Ot(Ot(e).map(t))},zv={map:bl,forEach:bl,count:function(e){return e?Ot(e).length:0},only:function(e){var t=Ot(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ot},Uv=ie.__e;ie.__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)}Uv(e,t,n)};var Dl=ie.unmount;function wi(){this.__u=0,this.t=null,this.__b=null}function Sh(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function jv(e){var t,n,r;function i(s){if(t||(t=e()).then(function(o){n=o.default||o},function(o){r=o}),r)throw r;if(!n)throw t;return w(n,s)}return i.displayName="Lazy",i.__f=!0,i}function _r(){this.u=null,this.o=null}ie.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Dl&&Dl(e)},(wi.prototype=new Nt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Sh(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__e){var c=r.state.__e;r.__v.__k[0]=function g(d,m,x){return d&&(d.__v=null,d.__k=d.__k&&d.__k.map(function(u){return g(u,m,x)}),d.__c&&d.__c.__P===m&&(d.__e&&x.insertBefore(d.__e,d.__d),d.__c.__e=!0,d.__c.__P=x)),d}(c,c.__c.__P,c.__c.__O)}var h;for(r.setState({__e:r.__b=null});h=r.t.pop();)h.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(o,o)},wi.prototype.componentWillUnmount=function(){this.t=[]},wi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function s(o,a,l){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),o.__c.__H=null),(o=Dh({},o)).__c!=null&&(o.__c.__P===l&&(o.__c.__P=a),o.__c=null),o.__k=o.__k&&o.__k.map(function(c){return s(c,a,l)})),o}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&w(pe,null,e.fallback);return i&&(i.__h=null),[w(pe,null,t.__e?null:e.children),i]};var Cl=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 Vv(e){return this.getChildContext=function(){return e.context},e.children}function Hv(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(w(Vv,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Xv(e,t){return w(Hv,{__v:e,i:t})}(_r.prototype=new Nt).__e=function(e){var t=this,n=Sh(t.__v),r=t.o.get(e);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),Cl(t,e,r)):i()};n?n(s):s()}},_r.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ot(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},_r.prototype.componentDidUpdate=_r.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Cl(e,n,t)})};var kh=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Jv=/^(?: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]/,Gv=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Yv(e,t,n){return t.__k==null&&(t.textContent=""),Wn(e,t),typeof n=="function"&&n(),e?e.__c:null}function Wv(e,t,n){return hu(e,t),typeof n=="function"&&n(),e?e.__c:null}Nt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Nt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Sl=ie.event;function Kv(){}function qv(){return this.cancelBubble}function Zv(){return this.defaultPrevented}ie.event=function(e){return Sl&&(e=Sl(e)),e.persist=Kv,e.isPropagationStopped=qv,e.isDefaultPrevented=Zv,e.nativeEvent=e};var Fh,kl={configurable:!0,get:function(){return this.class}},Fl=ie.vnode;ie.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){for(var i in r={},n){var s=n[i];i==="value"&&"defaultValue"in n&&s==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Gv(n.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():Jv.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():s===null&&(s=void 0),r[i]=s)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Ot(n.children).forEach(function(o){o.props.selected=r.value.indexOf(o.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=Ot(n.children).forEach(function(o){o.props.selected=r.multiple?r.defaultValue.indexOf(o.props.value)!=-1:r.defaultValue==o.props.value})),e.props=r}t&&n.class!=n.className&&(kl.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",kl)),e.$$typeof=kh,Fl&&Fl(e)};var Il=ie.__r;ie.__r=function(e){Il&&Il(e),Fh=e.__c};var Qv={ReactCurrentDispatcher:{current:{readContext:function(e){return Fh.__n[e.__c].props.value}}}};typeof performance=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function ey(e){return w.bind(null,e)}function Ih(e){return!!e&&e.$$typeof===kh}function ty(e){return Ih(e)?fu.apply(null,arguments):e}function ny(e){return!!e.__k&&(Wn(null,e),!0)}function ry(e){return e&&(e.base||e.nodeType===1&&e)||null}var iy=function(e,t){return e(t)},so={useState:J,useReducer:xu,useEffect:ce,useLayoutEffect:wu,useRef:Te,useImperativeHandle:Cf,useMemo:$e,useCallback:tt,useContext:cr,useDebugValue:Sf,version:"16.8.0",Children:zv,render:Yv,hydrate:Wv,unmountComponentAtNode:ny,createPortal:Xv,createElement:w,createContext:lr,createFactory:ey,cloneElement:ty,createRef:uf,Fragment:pe,isValidElement:Ih,findDOMNode:ry,Component:Nt,PureComponent:io,memo:Ch,forwardRef:$v,unstable_batchedUpdates:iy,StrictMode:pe,Suspense:wi,SuspenseList:_r,lazy:jv,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qv};class Bh extends W.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 sy=["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"],oy=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],ay=["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"],ly=["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"],uy=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],cy=["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"],Bl=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],hy=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],fy=e=>ke.generators.find(t=>t.id===e.replace(/^\$/,"")),dy=new W.DataModel(W.MapNode(W.StringNode(),W.StringNode()),{historyMax:0});function py({model:e,lang:t,version:n,blockStates:r}){var l;const i=new W.ModelPath(e),[s,o,a]=e.schema.hook(Th,i,Ji(e.data),t,n,r,{});return(l=o==null?void 0:o.props)!=null&&l.children.some(c=>c)?w("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i)},w("div",{class:"node-header"},s,o),w("div",{class:"node-body"},a)):a}const Th={base(){return[null,null,null]},boolean(e,t,n,r,i,s,o){return[null,w(my,ue({},Re(ue({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]},choice({choices:e,config:t,switchNode:n},r,i,s,o,a,l){const c=n.activeCase(r,!0),h=t!=null&&t.context?new W.ModelPath(r.getModel(),new W.Path(r.getArray(),[t.context])):r,[g,d,m]=c.node.hook(this,h,i,s,o,a,l);if(e.length===1)return[g,d,m];const x=t!=null&&t.choiceContext?new W.Path([],[t.choiceContext]):t!=null&&t.context?new W.Path([],[t.context]):r,u=p=>{var D;const v=(D=e.find(C=>C.type===p))!=null?D:c,E=v.node.default(),A=v.change?v.change(W.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(E==null?void 0:E.type)==="minecraft:decorated"?E.config.feature:E;r.model.set(r,W.DataModel.wrapLists(A))},f=w("select",{value:c.type,onChange:p=>u(p.target.value)},e.map(p=>w("option",{value:p.type},Oi(s,x.contextPush(p.type)))));return[g,w(pe,null,f,d),m]},list({children:e,config:t},n,r,i,s,o,a){const{expand:l,collapse:c,isToggled:h}=Ds(),[g,d]=J(50),m=n.getContext().join(".");if(cy.includes(m)){const v=w(pe,null,[...Array(t.maxLength)].map((A,D)=>w(Er,{lang:i,path:n.modelPush(D)})),w("div",{class:"fixed-list"})),E=w(pe,null,[...Array(t.maxLength)].map((A,D)=>{var k;return e.hook(this,n.modelPush(D),(k=r==null?void 0:r[D])==null?void 0:k.node,i,s,o,a)[1]}));return[v,E,null]}const x=()=>{Array.isArray(r)||(r=[]);const v=W.DataModel.wrapLists(e.default());n.model.set(n,[{node:v,id:Cn()},...r])},u=()=>{Array.isArray(r)||(r=[]);const v=W.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:v,id:Cn()}])},f=w("button",{class:"add tooltipped tip-se","aria-label":De(i,"add_top"),onClick:x},ye.plus_circle),p=w(pe,null,r&&Array.isArray(r)&&r.map(({node:v,id:E},A)=>{if(A===g)return w("div",{class:"node node-header"},w("label",null,De(i,"entries_hidden",`${r.length-g}`)),w("button",{onClick:()=>d(Math.min(g+50,r.length))},De(i,"entries_hidden.more","50")),w("button",{onClick:()=>d(r.length)},De(i,"entries_hidden.all")));if(A>g)return null;const D=n.push(A).contextPush("entry"),C=e.type(D)==="object",k=h(E);if(C&&(k===!1||k===void 0&&r.length>20))return w("div",{class:"node node-header","data-category":e.category(D)},w(Er,{lang:i,path:D,nested:!0}),w("button",{class:"toggle tooltipped tip-se","aria-label":`${De(i,"expand")}
|
|
${De(i,"expand_all","Ctrl")}`,onClick:l(E)},ye.chevron_right),w("label",null,Oi(i,D,`${A}`)),w(Tl,{key:E,path:D,value:v,schema:e}));const I=()=>D.set(void 0),M=()=>{const H=[...n.get()];[H[A-1],H[A]]=[H[A],H[A-1]],n.model.set(n,H)},L=()=>{const H=[...n.get()];[H[A+1],H[A]]=[H[A],H[A+1]],n.model.set(n,H)};return w(Cs,{key:E,path:D,schema:e,value:v,lang:i,version:s,states:o,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const H=[...n.get()];H.splice(A,0,{id:Cn(),node:Ji(v)}),n.model.set(n,H)}}],ctx:Re(ue({},a),{index:(A===0?1:0)+(A===r.length-1?2:0)})},C&&w("button",{class:"toggle tooltipped tip-se","aria-label":`${De(i,"collapse")}
|
|
${De(i,"collapse_all","Ctrl")}`,onClick:c(E)},ye.chevron_down),w("button",{class:"remove tooltipped tip-se","aria-label":De(i,"remove"),onClick:I},ye.trashcan),r.length>1&&w("div",{class:"node-move"},w("button",{class:"move tooltipped tip-se","aria-label":De(i,"move_up"),onClick:M,disabled:A===0},ye.chevron_up),w("button",{class:"move tooltipped tip-se","aria-label":De(i,"move_down"),onClick:L,disabled:A===r.length-1},ye.chevron_down)))}),r&&r.length>0&&r.length<=g&&w("div",{class:"node node-header"},w("button",{class:"add tooltipped tip-se","aria-label":De(i,"add_bottom"),onClick:u},ye.plus_circle)));return[null,f,p]},map({children:e,keys:t,config:n},r,i,s,o,a,l){var v,E,A,D,C;const{expand:c,collapse:h,isToggled:g}=Ds(),d=new W.ModelPath(dy,new W.Path([xy(r.toString())])),m=()=>{const k=d.get();r.model.set(r.push(k),W.DataModel.wrapLists(e.default()))},x=((v=n.validation)==null?void 0:v.validator)==="block_state_map"?a==null?void 0:a[W.relativePath(r,n.validation.params.id).get()]:null,u=x!=null&&x.properties?W.StringNode(null,{enum:Object.keys((E=x.properties)!=null?E:{})}):t;if(x&&r.last()==="Properties"){typeof i!="object"&&(i={});const k=Object.entries((A=x.properties)!=null?A:{}).map(([I,M])=>[I,W.StringNode(null,{enum:M})]);return Object.entries((D=x.properties)!=null?D:{}).forEach(([I,M])=>{typeof i[I]!="string"?r.model.errors.add(r.push(I),"error.expected_string"):M.includes(i[I])||r.model.errors.add(r.push(I),"error.invalid_enum_option",i[I])}),W.ObjectNode(Object.fromEntries(k)).hook(this,r,i,s,o,a,l)}const f=w(pe,null,u.hook(this,d,(C=d.get())!=null?C:"",s,o,a,l)[1],w("button",{class:"add tooltipped tip-se","aria-label":De(s,"add"),onClick:m},ye.plus_circle)),p=w(pe,null,typeof i=="object"&&Object.entries(i).map(([k,I])=>{var he,xe,z,Y;const M=r.modelPush(k),L=e.type(M)==="object",$=g(k);if(L&&($===!1||$===void 0&&i.length>20))return w("div",{class:"node node-header","data-category":e.category(M)},w(Er,{lang:s,path:M,nested:!0}),w("button",{class:"toggle tooltipped tip-se","aria-label":`${De(s,"expand")}
|
|
${De(s,"expand_all","Ctrl")}`,onClick:c(k)},ye.chevron_right),w("label",null,k),w(Tl,{key:k,path:M,value:I,schema:e}));const H=x?W.StringNode(null,{enum:(xe=(he=x.properties)==null?void 0:he[k])!=null?xe:[]}):e;((z=x==null?void 0:x.properties)==null?void 0:z[k])&&typeof I=="string"&&!((Y=x.properties)!=null&&Y[k].includes(I))&&r.model.errors.add(M,"error.invalid_enum_option",I);const ee=()=>M.set(void 0);return w(Cs,{key:k,schema:H,path:M,value:I,lang:s,version:o,states:a,ctx:l,label:k},L&&w("button",{class:"toggle tooltipped tip-se","aria-label":`${De(s,"collapse")}
|
|
${De(s,"collapse_all","Ctrl")}`,onClick:h(k)},ye.chevron_down),w("button",{class:"remove tooltipped tip-se","aria-label":De(s,"remove"),onClick:ee},ye.trashcan))}));return[null,f,p]},number(e,t,n,r,i,s,o){return[null,w(gy,ue({},Re(ue({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,s,o,a,l,c){var v;const{expand:h,collapse:g,isToggled:d}=Ds();if(i.getArray().length==0&&wy(t.context,s)){const{wrapper:E,fields:A}=_y(n(i),i,s);s=E.data,n=()=>A,r=(D,C)=>new W.ModelPath(E,new W.Path(D.getArray(),["feature"])).push(C)}let m=null,x=null;if(e.optional())if(s===void 0){const E=()=>i.set(W.DataModel.wrapLists(e.default()));x=w("button",{class:"collapse closed tooltipped tip-se","aria-label":De(o,"expand"),onClick:E},ye.plus_circle)}else{const E=()=>i.set(void 0);x=w("button",{class:"collapse open tooltipped tip-se","aria-label":De(o,"remove"),onClick:E},ye.trashcan)}const u=i.getContext().join(".");if(hy.includes(u)||Bl.includes(u)){const E=d(""),A=Bl.includes(u)?E:!E;if(m=w(pe,null,w("button",{class:"toggle tooltipped tip-se","aria-label":De(o,A?"collapse":"expand"),onClick:E?g(""):h("")},A?ye.chevron_down:ye.chevron_right)),!A)return[m,x,null]}const f=typeof s=="object"&&s!==null&&((v=e.default())==null?void 0:v.pools)?Re(ue({},c),{loot:s==null?void 0:s.type}):c,p=w(pe,null,typeof s=="object"&&s!==null&&!(e.optional()&&s===void 0)&&Object.entries(n(i)).filter(([E,A])=>A.enabled(i)).map(([E,A])=>{const D=r(i,E),C=D.getContext().join(".");if(oy.includes(C))return null;const[k,I,M]=A.hook(this,D,s[E],o,a,l,f),L=A.type(D)==="object"&&ay.includes(C),$=ly.includes(C);return L||$?(m=w(pe,null,m,w(Er,{lang:o,path:D}),w(Mh,{lang:o,path:D}),k),x=w(pe,null,x,I),L?M:null):w(Cs,{key:E,schema:A,path:D,value:s[E],lang:o,version:a,states:l,ctx:f})}));return[m,x,p]},string(e,t,n,r,i,s,o){return[null,w(vy,ue({},Re(ue({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]}};function Tl({path:e,value:t}){var r,i,s,o,a;switch(e.getContext().join(".")){case"loot_table.pools.entry":return w("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 w("label",null,(a=(s=t==null?void 0:t.name)==null?void 0:s.replace(/^minecraft:/,""))!=null?a:(o=t==null?void 0:t.type)==null?void 0:o.replace(/^minecraft:/,""))}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return w("label",null,l.replace(/^minecraft:/,""));return null}function Ds(){const[e,t]=J(new Map),[n,r]=J(void 0);return{expand:a=>l=>{l.ctrlKey?(t(new Map),r(!0)):t(c=>new Map(c.set(a,!0)))},collapse:a=>l=>{l.ctrlKey?(t(new Map),r(!1)):t(c=>new Map(c.set(a,!1)))},isToggled:a=>{var l;return e instanceof Map?(l=e.get(a))!=null?l:n:!1}}}function my({path:e,node:t,value:n,lang:r}){const i=s=>{e.model.set(e,t.optional()&&n===s?void 0:s)};return w(pe,null,w("button",{class:n===!1?"selected":"",onClick:()=>i(!1)},De(r,"false")),w("button",{class:n===!0?"selected":"",onClick:()=>i(!0)},De(r,"true")))}function gy({path:e,config:t,integer:n,value:r,lang:i}){var a;const s=l=>{const c=l.target.value,h=n?parseInt(c):parseFloat(c);e.model.set(e,h)},o=l=>{const c=l.target.value,h=parseInt(c.slice(1),16);e.model.set(e,h)};return w(pe,null,w("input",{type:"text",value:r!=null?r:"",onBlur:s,onKeyDown:l=>{l.key==="Enter"&&s(l)}}),(t==null?void 0:t.color)&&w("input",{type:"color",value:"#"+((a=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?a:"000000"),onChange:o}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&w("button",{onClick:()=>cc(e.model),class:"tooltipped tip-se","aria-label":De(i,"generate_new_seed")},ye.sync))}function vy({path:e,getValues:t,config:n,node:r,value:i,lang:s,version:o,states:a}){var d;const l=m=>{m.stopPropagation();const x=m.target.value;x!==i&&e.model.set(e,x.length===0?void 0:x)},c=t(),h=e.getContext().join("."),g=!vr(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(uy.includes(h))return w("textarea",{value:i!=null?i:"",onBlur:l});if(vr(n)&&!n.additional||sy.includes(h)){let m=new W.Path([]);return vr(n)&&typeof n.enum=="string"?m=m.contextPush(n.enum):g?m=m.contextPush(g):vr(n)&&(m=e),w("select",{value:i!=null?i:"",onChange:l},r.optional()&&w("option",{value:""},De(s,"unset")),c.map(x=>w("option",{value:x},Oi(s,m.contextPush(x.replace(/^minecraft:/,""))))))}else if(!vr(n)&&(n==null?void 0:n.validator)==="block_state_key"){const m=a==null?void 0:a[W.relativePath(e,n.params.id).get()],x=Object.keys((d=m==null?void 0:m.properties)!=null?d:{});return w("select",{value:i!=null?i:"",onChange:l},x.map(u=>w("option",null,u)))}else{const m=Cn(),x=g?fy(g):void 0;return w(pe,null,w("input",{value:i!=null?i:"",onBlur:l,onKeyDown:u=>{u.key==="Enter"&&l(u)},list:c.length>0?m:""}),c.length>0&&w("datalist",{id:m},c.map(u=>w("option",{value:u}))),x&&c.includes(i)&&i.startsWith("minecraft:")&&w("a",{href:`/${x.url}/?version=${o}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":De(s,"follow_reference")},ye.link_external))}}function yy({label:e,schema:t,path:n,value:r,lang:i,version:s,states:o,ctx:a,actions:l,children:c}){var A;const h=t.type(n),g=t.category(n),d=n.getContext().join("."),[m,x]=xo(),u=D=>{D.preventDefault(),x()},f=Re(ue({},a),{depth:((A=a.depth)!=null?A:0)+1});delete f.index;const[p,v,E]=t.hook(Th,n,r,i,s,o,f);return w("div",{class:`node ${h}-node`,"data-category":g},w("div",{class:"node-header",onContextMenu:u},w(Er,{lang:i,path:n}),w(Mh,{lang:i,path:n}),c,p,w("label",null,e!=null?e:Oi(i,n,`${n.last()}`),m&&w("div",{class:"node-menu"},l==null?void 0:l.map(D=>{var C;return w("div",{key:D.label,class:"menu-item"},w(ae,{icon:D.icon,tooltip:De(i,D.label),tooltipLoc:"se",onClick:()=>D.onSelect()}),w("span",null,(C=D.description)!=null?C:De(i,D.label)))}),w("div",{class:"menu-item"},w(ae,{icon:"clippy",tooltip:De(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(d)}),w("span",null,d)))),v),E&&w("div",{class:"node-body"},E))}const Cs=Ch(yy,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&In(e.ctx,t.ctx)&&In(e.value,t.value));function vr(e){return!!(e!=null&&e.enum)}function xy(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 Oi(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const s=r.slice(i).join("."),o=De(e,s,...n);if(s!==o)return o}return r[r.length-1]}function Er({lang:e,path:t,nested:n}){var s;t.model instanceof Bh&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(o=>o.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=De(e,r[0].error,...(s=r[0].params)!=null?s:[]);return Nh("node-error","issue_opened",i)}function Mh({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=De(e,n);return r===n?null:Nh("node-help","info",r)}const Nh=(e,t,n)=>{const[r,i]=xo();return w("div",{class:`node-icon ${e}${r?" show":""}`,onClick:i},ye[t],w("span",{class:"icon-popup"},n))};function wy(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&Nn(t==null?void 0:t.config)}function _y(e,t,n){const r=[],i=Ar(n,r),s={type:e.type,config:W.ObjectNode({decorators:W.ListNode(xc),feature:wc},{context:"feature.decorated"})},o=W.ObjectNode(s,{context:"feature"}),a=new W.Path(["config","feature"]),l=new W.Path(["config","decorators"]),c=t.getModel(),h=new Bh(o,g=>{if(g.startsWith(a))return new W.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...g.modelArr]);if(g.startsWith(l)){if(g.modelArr.length===2)return new W.Path([]);const d=g.modelArr[2];if(typeof d=="number")return new W.Path([...[...Array(d)].flatMap(()=>["config","feature"]),"config","decorator",...g.modelArr.slice(3)])}return g},g=>{if(g.equals(l)){const d=[];return Ar(c.data,d),d}return c.get(h.map(g))},(g,d,m)=>{if(g.startsWith(a)){const x=[];Ar(c.data,x);const u=new W.Path([...[...Array(x.length-1)].flatMap(()=>["config","feature"]),...g.modelArr]);return c.set(u,d,m)}else if(g.startsWith(l)){const x=g.modelArr[2];if(g.modelArr.length===2){const u=h.get(a);return c.set(new W.Path,oo(u,d),m)}else if(typeof x=="number")if(g.modelArr.length===3&&d===void 0){const u=h.get(a),f=[];Ar(c.data,f),f.splice(x,1);const p=oo(u,f);return c.set(new W.Path,p,m)}else{const u=new W.Path([...[...Array(x)].flatMap(()=>["config","feature"]),"config","decorator",...g.modelArr.slice(3)]);return c.set(u,d,m)}}c.set(g,d,m)});return h.data={type:c.data.type,config:{decorators:r,feature:i}},h.errors=c.errors,{fields:s,wrapper:h}}function Ar(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!Nn(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),Ar((r=e.config.feature)!=null?r:"",t))}function oo(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:oo(e,t)}}}function Ey({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=je();if(!t||!n||i==="none")return w(pe,null);const[s]=_u(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(s)return w(pe,null);const[,o]=J(0);return Gi(t,()=>{o(a=>a+1)}),w("div",{class:"tree","data-cy":"tree"},w(py,{model:t,lang:i,version:e,blockStates:n}))}var Ay=Object.defineProperty,by=Object.defineProperties,Dy=Object.getOwnPropertyDescriptors,Ml=Object.getOwnPropertySymbols,Cy=Object.prototype.hasOwnProperty,Sy=Object.prototype.propertyIsEnumerable,Nl=(e,t,n)=>t in e?Ay(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oh=(e,t)=>{for(var n in t||(t={}))Cy.call(t,n)&&Nl(e,n,t[n]);if(Ml)for(var n of Ml(t))Sy.call(t,n)&&Nl(e,n,t[n]);return e};const Ol="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function oi(e){return`[giscus] An error occurred. Error message: "${e}".`}function Ll(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function ky(){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 Fy(e){const[t,n]=J(""),r=function({repo:o,repoId:a,category:l="",categoryId:c="",mapping:h,term:g="",theme:d="light",reactionsEnabled:m="1",emitMetadata:x="0",inputPosition:u="bottom",lang:f="en",session:p,origin:v}){const E=new URL(location.href);E.searchParams.delete("giscus");const A=E.toString(),D={origin:v=v||A,session:p,theme:d,reactionsEnabled:m,emitMetadata:x,inputPosition:u,repo:o,repoId:a,category:l,categoryId:c,description:Ll("description")};switch(h){case"url":D.term=A;break;case"title":D.term=document.title;break;case"og:title":D.term=Ll("title");break;case"specific":D.term=g;break;case"number":D.number=g;break;case"pathname":default:D.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${f}/widget?${new URLSearchParams(D)}`}((i=Oh({},e),by(i,Dy({session:t}))));var i;const s=Te(null);return ce(()=>{const o=location.href,a=new URL(o),l=localStorage.getItem("giscus-session"),c=a.searchParams.get("giscus")||"";if(c)return localStorage.setItem("giscus-session",JSON.stringify(c)),n(c),a.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,a.toString());if(l)try{n(JSON.parse(l||"")||"")}catch(h){n(""),localStorage.removeItem("giscus-session"),console.warn(`${oi(h==null?void 0:h.message)} Session has been cleared.`)}},[]),ce(ky,[]),ce(()=>{const o=function(a,l=null){return function(c){if(c.origin!=="https://giscus.app")return;const{data:h}=c;if(typeof h!="object"||!h.giscus||(l&&h.giscus.resizeHeight&&(l.style.height=`${h.giscus.resizeHeight}px`),!h.giscus.error))return;const g=h.giscus.error;if(g.includes("Bad credentials")||g.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),a(),void console.warn(`${oi(g)} Session has been cleared.`);console.error(`${oi(g)} No session is stored initially. ${Ol}`)}g.includes("Discussion not found")?console.warn(`[giscus] ${g}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${oi(g)} ${Ol}`)}}(()=>n(""),s.current);return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),so.createElement("div",{className:"giscus"},so.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:s}))}function Iy(e){const[t,n]=J(!1);return ce(()=>n(!0),[]),t?so.createElement(Fy,Oh({},e)):null}function Ho({term:e}){const{actualTheme:t}=Fc(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return w(Iy,{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 Lh(){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 pr=Lh();function By(e){pr=e}const Ty=/[&<>"']/,My=/[&<>"']/g,Ny=/[<>"']|&(?!#?\w+;)/,Oy=/[<>"']|&(?!#?\w+;)/g,Ly={"&":"&","<":"<",">":">",'"':""","'":"'"},Rl=e=>Ly[e];function Qe(e,t){if(t){if(Ty.test(e))return e.replace(My,Rl)}else if(Ny.test(e))return e.replace(Oy,Rl);return e}const Ry=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Rh(e){return e.replace(Ry,(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 Py=/(^|[^\[])\^/g;function Me(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(Py,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const $y=/[^\w:]/g,zy=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Pl(e,t,n){if(e){let r;try{r=decodeURIComponent(Rh(n)).replace($y,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!zy.test(n)&&(n=Hy(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const ai={},Uy=/^[^:]+:\/*[^/]*$/,jy=/^([^:]+:)[\s\S]*$/,Vy=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Hy(e,t){ai[" "+e]||(Uy.test(e)?ai[" "+e]=e+"/":ai[" "+e]=_i(e,"/",!0)),e=ai[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(jy,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Vy,"$1")+t:e+t}const Li={exec:function(){}};function Rt(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 $l(e,t){const n=e.replace(/\|/g,(s,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)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 _i(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const s=e.charAt(r-i-1);if(s===t&&!n)i++;else if(s!==t&&n)i++;else break}return e.substr(0,r-i)}function Xy(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 Ph(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 zl(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Ul(e,t,n,r){const i=t.href,s=t.title?Qe(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:s,text:Qe(o)}}function Jy(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
`).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[o]=s;return o.length>=r.length?i.slice(r.length):i}).join(`
|
|
`)}class Xo{constructor(t){this.options=t||pr}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:_i(r,`
|
|
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=Jy(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim():n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const s=_i(r,"#");(this.options.pedantic||!s||/ $/.test(s))&&(r=s.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,s,o,a,l,c,h,g,d,m,x,u=n[1].trim();const f=u.length>1,p={type:"list",raw:"",ordered:f,start:f?+u.slice(0,-1):"",loose:!1,items:[]};u=f?`\\d{1,9}\\${u.slice(-1)}`:`\\${u}`,this.options.pedantic&&(u=f?u:"[*+-]");const v=new RegExp(`^( {0,3}${u})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(x=!1,!(!(n=v.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),h=n[2].split(`
|
|
`,1)[0],g=t.split(`
|
|
`,1)[0],this.options.pedantic?(o=2,m=h.trimLeft()):(o=n[2].search(/[^ ]/),o=o>4?1:o,m=h.slice(o),o+=n[1].length),l=!1,!h&&/^ *$/.test(g)&&(r+=g+`
|
|
`,t=t.substring(g.length+1),x=!0),!x){const A=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(d=t.split(`
|
|
`,1)[0],h=d,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!A.test(h));){if(h.search(/[^ ]/)>=o||!h.trim())m+=`
|
|
`+h.slice(o);else if(!l)m+=`
|
|
`+h;else break;!l&&!h.trim()&&(l=!0),r+=d+`
|
|
`,t=t.substring(d.length+1)}}p.loose||(c?p.loose=!0:/\n *\n *$/.test(r)&&(c=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(m),i&&(s=i[0]!=="[ ] ",m=m.replace(/^\[[ xX]\] +/,""))),p.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:m}),p.raw+=r}p.items[p.items.length-1].raw=r.trimRight(),p.items[p.items.length-1].text=m.trimRight(),p.raw=p.raw.trimRight();const E=p.items.length;for(a=0;a<E;a++){this.lexer.state.top=!1,p.items[a].tokens=this.lexer.blockTokens(p.items[a].text,[]);const A=p.items[a].tokens.filter(C=>C.type==="space"),D=A.every(C=>{const k=C.raw.split("");let I=0;for(const M of k)if(M===`
|
|
`&&(I+=1),I>1)return!0;return!1});!p.loose&&A.length&&D&&(p.loose=!0,p.items[a].loose=!0)}return p}}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]):Qe(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:$l(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,s,o,a,l;for(s=0;s<i;s++)/^ *-+: *$/.test(r.align[s])?r.align[s]="right":/^ *:-+: *$/.test(r.align[s])?r.align[s]="center":/^ *:-+ *$/.test(r.align[s])?r.align[s]="left":r.align[s]=null;for(i=r.rows.length,s=0;s<i;s++)r.rows[s]=$l(r.rows[s],r.header.length).map(c=>({text:c}));for(i=r.header.length,o=0;o<i;o++)r.header[o].tokens=[],this.lexer.inlineTokens(r.header[o].text,r.header[o].tokens);for(i=r.rows.length,o=0;o<i;o++)for(l=r.rows[o],a=0;a<l.length;a++)l[a].tokens=[],this.lexer.inlineTokens(l[a].text,l[a].tokens);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n){const r={type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r={type:"paragraph",raw:n[0],text:n[1].charAt(n[1].length-1)===`
|
|
`?n[1].slice(0,-1):n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}text(t){const n=this.rules.block.text.exec(t);if(n){const r={type:"text",raw:n[0],text:n[0],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:Qe(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]):Qe(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const o=_i(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=Xy(n[2],"()");if(o>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),Ul(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i||!i.href){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return Ul(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const o=i[0].length-1;let a,l,c=o,h=0;const g=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(g.lastIndex=0,n=n.slice(-1*t.length+o);(i=g.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]){c+=l;continue}else if((i[5]||i[6])&&o%3&&!((o+l)%3)){h+=l;continue}if(c-=l,c>0)continue;if(l=Math.min(l,l+c+h),Math.min(o,l)%2){const m=t.slice(1,o+i.index+l);return{type:"em",raw:t.slice(0,o+i.index+l+1),text:m,tokens:this.lexer.inlineTokens(m,[])}}const d=t.slice(2,o+i.index+l-1);return{type:"strong",raw:t.slice(0,o+i.index+l+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=Qe(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2],[])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=Qe(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=Qe(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=Qe(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(o!==r[0]);i=Qe(r[0]),r[1]==="www."?s="http://"+i:s=i}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Qe(r[0]):r[0]:i=Qe(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const oe={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:Li,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;oe.def=Me(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex();oe.bullet=/(?:[*+-]|\d{1,9}[.)])/;oe.listItemStart=Me(/^( *)(bull) */).replace("bull",oe.bullet).getRegex();oe.list=Me(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex();oe._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";oe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;oe.html=Me(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();oe.paragraph=Me(oe._paragraph).replace("hr",oe.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",oe._tag).getRegex();oe.blockquote=Me(oe.blockquote).replace("paragraph",oe.paragraph).getRegex();oe.normal=Rt({},oe);oe.gfm=Rt({},oe.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});oe.gfm.table=Me(oe.gfm.table).replace("hr",oe.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",oe._tag).getRegex();oe.gfm.paragraph=Me(oe._paragraph).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",oe.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",oe._tag).getRegex();oe.pedantic=Rt({},oe.normal,{html:Me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._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:Li,paragraph:Me(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Li,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:Li,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};q._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";q.punctuation=Me(q.punctuation).replace(/punctuation/g,q._punctuation).getRegex();q.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;q.escapedEmSt=/\\\*|\\_/g;q._comment=Me(oe._comment).replace("(?:-->|$)","-->").getRegex();q.emStrong.lDelim=Me(q.emStrong.lDelim).replace(/punct/g,q._punctuation).getRegex();q.emStrong.rDelimAst=Me(q.emStrong.rDelimAst,"g").replace(/punct/g,q._punctuation).getRegex();q.emStrong.rDelimUnd=Me(q.emStrong.rDelimUnd,"g").replace(/punct/g,q._punctuation).getRegex();q._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;q._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;q._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])?)+(?![-_])/;q.autolink=Me(q.autolink).replace("scheme",q._scheme).replace("email",q._email).getRegex();q._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;q.tag=Me(q.tag).replace("comment",q._comment).replace("attribute",q._attribute).getRegex();q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;q._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;q.link=Me(q.link).replace("label",q._label).replace("href",q._href).replace("title",q._title).getRegex();q.reflink=Me(q.reflink).replace("label",q._label).replace("ref",oe._label).getRegex();q.nolink=Me(q.nolink).replace("ref",oe._label).getRegex();q.reflinkSearch=Me(q.reflinkSearch,"g").replace("reflink",q.reflink).replace("nolink",q.nolink).getRegex();q.normal=Rt({},q);q.pedantic=Rt({},q.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:Me(/^!?\[(label)\]\((.*?)\)/).replace("label",q._label).getRegex(),reflink:Me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q._label).getRegex()});q.gfm=Rt({},q.normal,{escape:Me(q.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.!#$%&'*+\/=?_`{\|}~-]+@)))/});q.gfm.url=Me(q.gfm.url,"i").replace("email",q.gfm._extended_email).getRegex();q.breaks=Rt({},q.gfm,{br:Me(q.br).replace("{2,}","*").getRegex(),text:Me(q.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Gy(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 jl(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 an{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||pr,this.options.tokenizer=this.options.tokenizer||new Xo,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:oe.normal,inline:q.normal};this.options.pedantic?(n.block=oe.pedantic,n.inline=q.pedantic):this.options.gfm&&(n.block=oe.gfm,this.options.breaks?n.inline=q.breaks:n.inline=q.gfm),this.tokenizer.rules=n}static get rules(){return{block:oe,inline:q}}static lex(t,n){return new an(n).lex(t)}static lexInline(t,n){return new an(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,i,s,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
`+r.raw,i.text+=`
|
|
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
`+r.raw,i.text+=`
|
|
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let c;this.options.extensions.startBlock.forEach(function(h){c=h.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){i=n[n.length-1],o&&i.type==="paragraph"?(i.raw+=`
|
|
`+r.raw,i.text+=`
|
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),o=s.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
|
`+r.raw,i.text+=`
|
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,i,s,o=t,a,l,c;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)h.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+zl("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+zl("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(o))!=null;)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,o,c)){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,jl)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,jl))){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const g=t.slice(1);let d;this.options.extensions.startInline.forEach(function(m){d=m.call({lexer:this},g),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(s=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(s,Gy)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(c=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 h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class Jo{constructor(t){this.options=t||pr}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,i);s!=null&&s!==t&&(r=!0,t=s)}return t=t.replace(/\n$/,"")+`
|
|
`,i?'<pre><code class="'+this.options.langPrefix+Qe(i,!0)+'">'+(r?t:Qe(t,!0))+`</code></pre>
|
|
`:"<pre><code>"+(r?t:Qe(t,!0))+`</code></pre>
|
|
`}blockquote(t){return`<blockquote>
|
|
`+t+`</blockquote>
|
|
`}html(t){return t}heading(t,n,r,i){return this.options.headerIds?"<h"+n+' id="'+this.options.headerPrefix+i.slug(r)+'">'+t+"</h"+n+`>
|
|
`:"<h"+n+">"+t+"</h"+n+`>
|
|
`}hr(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`}list(t,n,r){const i=n?"ol":"ul",s=n&&r!==1?' start="'+r+'"':"";return"<"+i+s+`>
|
|
`+t+"</"+i+`>
|
|
`}listitem(t){return"<li>"+t+`</li>
|
|
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+`</p>
|
|
`}table(t,n){return n&&(n="<tbody>"+n+"</tbody>"),`<table>
|
|
<thead>
|
|
`+t+`</thead>
|
|
`+n+`</table>
|
|
`}tablerow(t){return`<tr>
|
|
`+t+`</tr>
|
|
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?"<"+r+' align="'+n.align+'">':"<"+r+">")+t+"</"+r+`>
|
|
`}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,n,r){if(t=Pl(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+Qe(t)+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=Pl(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 $h{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 zh{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 ln{constructor(t){this.options=t||pr,this.options.renderer=this.options.renderer||new Jo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new $h,this.slugger=new zh}static parse(t,n){return new ln(n).parse(t)}static parseInline(t,n){return new ln(n).parseInline(t)}parse(t,n=!0){let r="",i,s,o,a,l,c,h,g,d,m,x,u,f,p,v,E,A,D,C;const k=t.length;for(i=0;i<k;i++){if(m=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[m.type]&&(C=this.options.extensions.renderers[m.type].call({parser:this},m),C!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(m.type))){r+=C||"";continue}switch(m.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(m.tokens),m.depth,Rh(this.parseInline(m.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(m.text,m.lang,m.escaped);continue}case"table":{for(g="",h="",a=m.header.length,s=0;s<a;s++)h+=this.renderer.tablecell(this.parseInline(m.header[s].tokens),{header:!0,align:m.align[s]});for(g+=this.renderer.tablerow(h),d="",a=m.rows.length,s=0;s<a;s++){for(c=m.rows[s],h="",l=c.length,o=0;o<l;o++)h+=this.renderer.tablecell(this.parseInline(c[o].tokens),{header:!1,align:m.align[o]});d+=this.renderer.tablerow(h)}r+=this.renderer.table(g,d);continue}case"blockquote":{d=this.parse(m.tokens),r+=this.renderer.blockquote(d);continue}case"list":{for(x=m.ordered,u=m.start,f=m.loose,a=m.items.length,d="",s=0;s<a;s++)v=m.items[s],E=v.checked,A=v.task,p="",v.task&&(D=this.renderer.checkbox(E),f?v.tokens.length>0&&v.tokens[0].type==="paragraph"?(v.tokens[0].text=D+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&v.tokens[0].tokens[0].type==="text"&&(v.tokens[0].tokens[0].text=D+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:D}):p+=D),p+=this.parse(v.tokens,f),d+=this.renderer.listitem(p,A,E);r+=this.renderer.list(d,x,u);continue}case"html":{r+=this.renderer.html(m.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(m.tokens));continue}case"text":{for(d=m.tokens?this.parseInline(m.tokens):m.text;i+1<k&&t[i+1].type==="text";)m=t[++i],d+=`
|
|
`+(m.tokens?this.parseInline(m.tokens):m.text);r+=n?this.renderer.paragraph(d):d;continue}default:{const I='Token with "'+m.type+'" type was not found.';if(this.options.silent){console.error(I);return}else throw new Error(I)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,s,o;const a=t.length;for(i=0;i<a;i++){if(s=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(o=this.options.extensions.renderers[s.type].call({parser:this},s),o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){r+=o||"";continue}switch(s.type){case"escape":{r+=n.text(s.text);break}case"html":{r+=n.html(s.text);break}case"link":{r+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{r+=n.image(s.href,s.title,s.text);break}case"strong":{r+=n.strong(this.parseInline(s.tokens,n));break}case"em":{r+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{r+=n.codespan(s.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(s.tokens,n));break}case"text":{r+=n.text(s.text);break}default:{const l='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}function de(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=Rt({},de.defaults,t||{}),Ph(t),n){const r=t.highlight;let i;try{i=an.lex(e,t)}catch(a){return n(a)}const s=function(a){let l;if(!a)try{t.walkTokens&&de.walkTokens(i,t.walkTokens),l=ln.parse(i,t)}catch(c){a=c}return t.highlight=r,a?n(a):n(null,l)};if(!r||r.length<3||(delete t.highlight,!i.length))return s();let o=0;de.walkTokens(i,function(a){a.type==="code"&&(o++,setTimeout(()=>{r(a.text,a.lang,function(l,c){if(l)return s(l);c!=null&&c!==a.text&&(a.text=c,a.escaped=!0),o--,o===0&&s()})},0))}),o===0&&s();return}try{const r=an.lex(e,t);return t.walkTokens&&de.walkTokens(r,t.walkTokens),ln.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>"+Qe(r.message+"",!0)+"</pre>";throw r}}de.options=de.setOptions=function(e){return Rt(de.defaults,e),By(de.defaults),de};de.getDefaults=Lh;de.defaults=pr;de.use=function(...e){const t=Rt({},...e),n=de.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if(s.renderer){const o=n.renderers?n.renderers[s.name]:null;o?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if(s.tokenizer){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[s.level]?n[s.level].unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}s.childTokens&&(n.childTokens[s.name]=s.childTokens)})),i.renderer){const s=de.defaults.renderer||new Jo;for(const o in i.renderer){const a=s[o];s[o]=(...l)=>{let c=i.renderer[o].apply(s,l);return c===!1&&(c=a.apply(s,l)),c}}t.renderer=s}if(i.tokenizer){const s=de.defaults.tokenizer||new Xo;for(const o in i.tokenizer){const a=s[o];s[o]=(...l)=>{let c=i.tokenizer[o].apply(s,l);return c===!1&&(c=a.apply(s,l)),c}}t.tokenizer=s}if(i.walkTokens){const s=de.defaults.walkTokens;t.walkTokens=function(o){i.walkTokens.call(this,o),s&&s.call(this,o)}}r&&(t.extensions=n),de.setOptions(t)})};de.walkTokens=function(e,t){for(const n of e)switch(t.call(de,n),n.type){case"table":{for(const r of n.header)de.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)de.walkTokens(i.tokens,t);break}case"list":{de.walkTokens(n.items,t);break}default:de.defaults.extensions&&de.defaults.extensions.childTokens&&de.defaults.extensions.childTokens[n.type]?de.defaults.extensions.childTokens[n.type].forEach(function(r){de.walkTokens(n[r],t)}):n.tokens&&de.walkTokens(n.tokens,t)}};de.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=Rt({},de.defaults,t||{}),Ph(t);try{const n=an.lexInline(e,t);return t.walkTokens&&de.walkTokens(n,t.walkTokens),ln.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>"+Qe(n.message+"",!0)+"</pre>";throw n}};de.Parser=ln;de.parser=ln.parse;de.Renderer=Jo;de.TextRenderer=$h;de.Lexer=an;de.lexer=an.lex;de.Tokenizer=Xo;de.Slugger=zh;de.parse=de;ln.parse;an.lex;function Yy({change:e,activeTags:t,toggleTag:n}){return w("div",{class:"changelog-entry"},w("div",{class:"changelog-version"},w(Vl,ue({},e.version)),w(Vl,ue({},e.group))),w("div",{class:"changelog-tags"},e.tags.map(r=>w(ei,{label:r,onClick:n?()=>n(r):void 0,active:t==null?void 0:t.includes(r)}))),w("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:de(e.content)}}))}function Vl({id:e,article:t}){return t===null?w("span",null,e):w("a",{href:`https://www.minecraft.net/en-us/article/${t}`,target:"_blank"},e)}function ei({label:e,active:t,onClick:n}){const r=e==="breaking"?5:hc(e)%360;return w("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n},e==="breaking"&&ye.alert,e)}function Uh({changes:e,defaultOrder:t}){const{locale:n}=je(),[r,i]=J(""),[s,o]=J([]),a=d=>{s.includes(d)?o(s.filter(m=>m!==d)):o([...s,d])},l=$e(()=>{const d=r.split(" ").map(m=>m.trim().toLowerCase()).filter(m=>m.length>0);return d.length===0&&s.length===0?e:e==null?void 0:e.filter(m=>{if(!s.every(u=>m.tags.includes(u)))return!1;const x=m.tags.join(" ")+" "+m.content.toLowerCase();return d.every(u=>u.startsWith("!")?u.length===1||!x.includes(u.slice(1)):x.includes(u))})},[e,r,s]),[c,h]=J(t==="desc"),g=$e(()=>l==null?void 0:l.sort((d,m)=>c?m.order-d.order:d.order-m.order),[l,c]);return w(pe,null,w("div",{class:"changelog-query"},w(Bn,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:r,onChange:i}),w(ae,{icon:c?"sort_desc":"sort_asc",label:c?"Newest first":"Oldest first",onClick:()=>h(!c)})),s.length>0&&w("div",{class:"changelog-tags"},s.map(d=>w(ei,{label:d,onClick:()=>o(s.filter(m=>m!==d))}))),w("div",{class:"changelog-list"},g===void 0?w("span",{class:"note"},n("loading")):g.length===0?w("span",{class:"note"},n("changelog.no_results")):g.map(d=>w(Yy,{change:d,activeTags:s,toggleTag:a}))))}function Wy({version:e}){const{locale:t}=je(),[n,r]=J("changelog"),[i,s]=J(void 0);ce(()=>{mc().then(a=>s(a.map(l=>Re(ue({},l),{tags:l.tags.filter(c=>c!==l.group.id)})))).catch(a=>console.error(a))},[]);const o=$e(()=>i==null?void 0:i.filter(a=>a.version.id===e.id||a.group.id===e.id),[e.id,i]);return w(pe,null,w("div",{class:"version-detail"},w("h2",null,e.name),w("div",{class:"version-info"},w(en,{label:t("versions.released"),value:jh(e)}),w(en,{label:t("versions.release_target"),value:e.release_target,link:e.id!==e.release_target?`/versions/?id=${e.release_target}`:void 0}),w(en,{label:t("versions.data_version"),value:e.data_version}),w(en,{label:t("versions.protocol_version"),value:e.protocol_version}),w(en,{label:t("versions.data_pack_format"),value:e.data_pack_version}),w(en,{label:t("versions.resource_pack_format"),value:e.resource_pack_version})),w("div",{class:"version-tabs"},w("span",{class:n==="changelog"?"selected":"",onClick:()=>r("changelog")},t("versions.technical_changes")),w("span",{class:n==="discussion"?"selected":"",onClick:()=>r("discussion")},t("versions.discussion"))),w("div",{class:"version-tab"},n==="changelog"&&w(Uh,{changes:o,defaultOrder:"asc"}),n==="discussion"&&w(Ho,{term:`version/${e.id}`}))))}function jh(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function Ky({version:e,link:t}){const{locale:n}=je();return w("a",{class:"version-entry",href:t},w("span",{class:"version-id"},e.id),w(en,{label:n("versions.released"),value:jh(e),compact:!0}),w(en,{label:n("versions.data_version"),value:e.data_version,optional:!0}),w(en,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}function qy({versions:e,link:t}){const{locale:n}=je(),[r,i]=J(!0),[s,o]=J(""),a=$e(()=>e.filter(l=>l.type==="snapshot"&&!r?!1:l.id.includes(s)),[e,r,s]);return w(pe,null,w("div",{class:"versions-controls"},w(Bn,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:s,onChange:o}),w(am,{label:"Include snapshots",value:r,onChange:i})),w("div",{class:"version-list"},a.map(l=>w(Ky,{version:l,link:t==null?void 0:t(l.id)})),a.length===0&&w("span",null,n("versions.no_results"))))}function en({label:e,value:t,link:n,compact:r,optional:i}){return w("div",{class:`version-metadata${i?" version-metadata-hide":""}`},w("span",{class:r?"version-metadata-hide":void 0},e,": "),w("span",{class:"version-metadata-value"},t),n&&w("a",{href:n,class:"version-metadata-link"},ye.link_external))}function Zy({title:e,link:t,versions:n,tags:r,activeTags:i,toggleTag:s}){const o=a=>l=>{s&&s(a),l.preventDefault(),l.stopImmediatePropagation()};return w("a",{class:"guide-card",href:t},w("span",{class:"guide-versions"},n.join(" \u2022 ")),w("h3",null,e),w("div",{class:"guide-tags"},r.sort().map(a=>w(ei,{label:a,onClick:o(a),active:i==null?void 0:i.includes(a)}))))}const Hl={system:"device_desktop",dark:"moon",light:"sun"};function Qy(){const{lang:e,locale:t,changeLanguage:n}=je(),{theme:r,changeTheme:i}=Fc(),{version:s}=dr(),{title:o}=Lt(),a=fc(Kn());return w("header",null,w("div",{class:"title"},w(yu,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},Vh.home),w("h1",null,o),a&&w(pt,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},ke.generators.filter(l=>l.category===(a==null?void 0:a.category)&&mt(s,l.minVersion)).map(l=>w(ae,{label:t(l.id),active:l.id===a.id,onClick:()=>mn(on(l.url))})))),w("nav",null,w("ul",null,w("li",{"data-cy":"language-switcher"},w(pt,{icon:"globe",tooltip:t("language")},ke.languages.map(({code:l,name:c})=>w(ae,{label:c,active:l===e,onClick:()=>n(l)})))),w("li",{"data-cy":"theme-switcher"},w(pt,{icon:Hl[r],tooltip:t("theme")},Object.entries(Hl).map(([l,c])=>w(ae,{icon:c,label:t(`theme.${l}`),active:l===r,onClick:()=>i(l)})))),w("li",{class:"dimmed"},w("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},ye.mark_github)))))}const Vh={home:w("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),w("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),w("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),w("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),w("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),w("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:w("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},w("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"}),w("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"}),w("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"}),w("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"}),w("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"}),w("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:w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},w("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),w("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 ex({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:s,onEdit:o,onDelete:a,delayedPlay:l}){const{locale:c}=je(),{version:h}=dr(),[g,d]=J(!0),[m,x]=J(!1),[u,f]=J(!1),p=Te([]),v=`playsound minecraft:${n} master @s ~ ~ ~ ${s} ${i}`;ce(()=>{var L,$,H;const M=t[n];f((($=(L=M==null?void 0:M.sounds)==null?void 0:L.length)!=null?$:0)===0),p.current.forEach(ee=>ee.stop()),p.current=((H=M==null?void 0:M.sounds)!=null?H:[]).map(ee=>{const he=typeof ee=="string"?ee:ee.name,xe=vm(h,he),z=e({src:[xe],format:["ogg"],volume:s,rate:i});z.on("end",()=>{x(!1)});const Y=()=>{g&&p.current.every(te=>te.state()==="loaded")&&d(!1)};return z.state()==="loaded"?setTimeout(()=>Y()):z.on("load",()=>{Y()}),z}),d(!0)},[n,t]),ce(()=>{p.current.forEach(M=>M.rate(i))},[i]),ce(()=>{p.current.forEach(M=>M.volume(s))},[s]);const E=()=>{if(g||u)return;A();const M=Math.floor(Math.random()*p.current.length);p.current[M].play(),x(!0)},A=()=>{p.current.forEach(M=>M.stop())};ce(()=>{l&&setTimeout(()=>E(),r*50)},[l]),ce(()=>()=>A(),[]);const[D,C]=J(!1),k=Te(void 0),I=()=>{navigator.clipboard.writeText(v),C(!0),k.current!==void 0&&clearTimeout(k.current),k.current=setTimeout(()=>{C(!1)},2e3)};return w("div",{class:`sound-config${g?" loading":m?" playing":""}${u?" invalid":""}`},w(ae,{class:"play",icon:u?"alert":g?"sync":"play",label:c("sounds.play"),onClick:E,tooltip:c(u?"sounds.unknown_sound":g?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),w(Bn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:M=>o({sound:M})}),w("label",{class:"delay-label"},c("sounds.delay"),": "),w(lm,{class:"btn btn-input delay",min:0,value:r,onChange:M=>o({delay:M})}),w("label",{class:"pitch-label"},c("sounds.pitch"),": "),w($a,{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:M=>o({pitch:M})}),w("label",{class:"volume-label"},c("sounds.volume"),": "),w($a,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":s.toFixed(2),style:`--x: ${s*100}%`,value:s,onChange:M=>o({volume:M})}),w(ae,{class:`copy${D?" active":""}`,icon:D?"check":"terminal",label:c("copy"),tooltip:c(D?"copied":"sounds.copy_command"),onClick:I}),w(ae,{class:"remove",icon:"trashcan",tooltip:c("sounds.remove_sound"),onClick:()=>{a(),A()}}))}function Ct({title:e,desc:t,link:n,icon:r,children:i}){const s=w(pe,null,w("div",{class:"tool-head"},r&&Vh[r],w("div",null,w("h3",null,e),w("p",null,t))),i&&w("div",{class:"tool-body"},i));return n?w("a",{class:"tool-card",href:n},s):w("div",{class:"tool-card"},s)}const Xl="/";function Hh({entries:e,onSelect:t,indent:n}){const r=$e(()=>{var c;const l={};for(const h of e){const g=h.indexOf(Xl);if(g>=0){const d=h.slice(0,g);((c=l[d])!=null?c:l[d]=[]).push(h.slice(g+1))}}return Object.entries(l)},e),i=$e(()=>e.filter(l=>!l.includes(Xl)),e),[s,o]=J(new Set),a=l=>{s.has(l)?s.delete(l):s.add(l),o(new Set(s))};return w("div",{class:"tree-view",style:`--indent: ${n!=null?n:0};`},r.map(([l,c])=>w("div",null,w(Jl,{icon:s.has(l)?"chevron_right":"chevron_down",key:l,label:l,onClick:()=>a(l)}),!s.has(l)&&w(Hh,{entries:c,onSelect:h=>t(`${l}/${h}`),indent:(n!=null?n:0)+1}))),i.map(l=>w(Jl,{icon:"file",key:l,label:l,onClick:()=>t(l)})))}function Jl({icon:e,label:t,onClick:n}){return w("div",{class:"entry",onClick:n},ye[e],t)}function Gl({category:e}){const{locale:t}=je();return Lt(t("title.generator_category",t(e))),w("main",null,w("div",{class:"category"},ke.generators.filter(n=>n.category===e).map(n=>w(Ct,{title:t(n.id),link:on(n.url)}))))}function tx({}){const{locale:e}=je(),[t,n]=J(null);Lt(e("title.changelog"));const[r,i]=J([]);return ce(()=>{mc().then(s=>i(s)).catch(s=>{console.error(s),n(s)})},[]),w("main",null,w(Vr,{type:"text",id:"changelog"}),t&&w(Gn,{error:t,onDismiss:()=>n(null)}),w("div",{class:"changelog"},w(Uh,{changes:r,defaultOrder:"desc"})))}function nx({}){var Ce;const{locale:e}=je(),{version:t,changeVersion:n,changeTargetVersion:r}=dr(),{project:i,file:s,updateFile:o,openFile:a,closeFile:l}=Sc(),[c,h]=J(null),[g,d]=_u();if(g)return g.message=`Something went wrong rendering the generator: ${g.message}`,w("main",null,w(Gn,{error:g,onDismiss:d}));const m=fc(Kn());if(!m)return w("main",null,w(Gn,{error:`Cannot find generator "${Kn()}"`}));const x=$e(()=>ke.versions.filter(Z=>mt(Z.id,m.minVersion,m.maxVersion)).map(Z=>Z.id).reverse(),[m.minVersion,m.maxVersion]);Lt(e("title.generator",e(m.id)),x),mt(t,m.minVersion)||h(`The minimum version for this generator is ${m.minVersion}`),mt(t,void 0,m.maxVersion)||h(`This generator is not available in versions above ${m.maxVersion}`);const[u,f]=Tr("preset"),[p,v]=Tr(Ps),E=Te(!1);ce(()=>{k&&u?Ve(u).then(Z=>{E.current=!0,k.reset(W.DataModel.wrapLists(Z),!1),v(void 0)}):k&&p&&Va(p).then(Z=>A(k,Z))},[u,p]);const A=(Z,Be)=>{if(Be.version&&Be.version!==t&&n(Be.version,!1),Be.type&&Be.type!==m.id){const _n=ke.generators.find(O=>O.id===Be.type);_n&&mn(`${on(_n.url)}?${Ps}=${Be.id}`)}Be.show_preview&&!P&&(me(!0),_e(!1)),Z.reset(W.DataModel.wrapLists(Be.data),!1)},D=$e(()=>et.getBackup(m.id),[m.id]),C=()=>{D!==void 0&&(k==null||k.reset(W.DataModel.wrapLists(D),!1))},[k,I]=J(null),[M,L]=J(null);ce(()=>{h(null),I(null),Am(t).then(Z=>L(Z)),_m(t,m.id).then(async Z=>{if(Ye.setGenerator(m.id),u){const Be=await Ve(u);Z.reset(W.DataModel.wrapLists(Be),!1)}else if(p){const Be=await Va(p);A(Z,Be)}I(Z)}).catch(Z=>{console.error(Z),h(Z)})},[t,m.id]);const[$,H]=J(!1);Gi(k,()=>{E.current||(f(void 0,!0),v(void 0,!0)),E.current=!1,et.setBackup(m.id,W.DataModel.unwrapLists(k==null?void 0:k.data)),h(null),H(!0)},[m.id,f,v]);const[ee,he]=J(""),[xe,z]=xr(),[Y,te]=xr(),U=()=>{if(ee!==(s==null?void 0:s.id)&&ee&&k&&M){const Z=xi(k,M);o(m.id,s==null?void 0:s.id,{id:ee,data:Z})?z():(te(),s&&he(s==null?void 0:s.id))}else s&&he(s==null?void 0:s.id)},F=()=>{s&&o(m.id,s.id,{})};ce(()=>{s&&he(s.id)},[s]),ce(()=>{var Z;k&&(he((Z=s==null?void 0:s.id)!=null?Z:""),s&&m.id===s.type&&k.reset(W.DataModel.wrapLists(s.data)),H(!1))},[s,k]);const B=()=>{Ye.generatorEvent("reset"),k==null||k.reset(W.DataModel.wrapLists(k.schema.default()),!0)},j=Z=>{Z.stopPropagation(),Ye.generatorEvent("undo","Menu"),k==null||k.undo()},K=Z=>{Z.stopPropagation(),Ye.generatorEvent("redo","Menu"),k==null||k.redo()},ne=Z=>{Z.ctrlKey&&Z.key==="z"?(Ye.generatorEvent("undo","Hotkey"),k==null||k.undo()):Z.ctrlKey&&Z.key==="y"&&(Ye.generatorEvent("redo","Hotkey"),k==null||k.redo())},we=Z=>{if(Z.ctrlKey&&Z.key==="s"&&(Z.preventDefault(),k&&M&&s)){Ye.generatorEvent("save","Hotkey");const Be=xi(k,M);o(m.id,s==null?void 0:s.id,{id:s==null?void 0:s.id,data:Be}),H(!1),z()}};ce(()=>(document.addEventListener("keyup",ne),document.addEventListener("keydown",we),()=>{document.removeEventListener("keyup",ne),document.removeEventListener("keydown",we)}),[k,M,s]);const[Je,ot]=J([]);ce(()=>{Em(t).then(Z=>{ot(Z.get(m.id).map(Be=>Be.slice(10)))}).catch(Z=>{console.error(Z),h(Z)})},[t,m.id]);const Ue=Z=>{Ye.generatorEvent("load-preset",Z),v(void 0,!0),r(t,!0),f(Z)},Ve=async Z=>{var Be,_n,O;try{const R=await vc(t,(Be=m.path)!=null?Be:m.id,Z),V=k==null?void 0:k.get(new W.Path(["generator","seed"]));return((_n=R==null?void 0:R.generator)==null?void 0:_n.seed)!==void 0&&V!==void 0&&(R.generator.seed=V,((O=R.generator.biome_source)==null?void 0:O.seed)!==void 0&&(R.generator.biome_source.seed=V)),R}catch{h(`Cannot load preset ${Z} in ${t}`),f(void 0,!0)}},Ge=Z=>{v(void 0,!0),n(Z)},[ft,qe]=J(void 0),[Ze,Ne]=J(!1),[at,gt]=xr({cooldown:3e3}),se=()=>{if(Ze){Ne(!1);return}if(u)qe(`${location.origin}/${m.url}/?version=${t}&preset=${u}`),Ne(!0),vt();else if(k&&M){const Z=xi(k,M);In(Z,k.schema.default())?(qe(`${location.origin}/${m.url}/?version=${t}`),Ne(!0)):Dm(m.id,t,Z,P).then(Be=>{qe(Be),Ne(!0)}).catch(Be=>{Be instanceof Error&&h(Be)})}},vt=()=>{navigator.clipboard.writeText(ft!=null?ft:""),gt()};ce(()=>{at||(qe(void 0),Ne(!1))},[at]);const[be,_e]=J(window.innerWidth>820),[it,Oe]=J(0),[Dt,Pt]=J(0),[X,Q]=J(0),b=()=>{Ye.generatorEvent("copy"),Oe(it+1)},y=()=>{Ye.generatorEvent("download"),Pt(Dt+1)},_=()=>{Ye.generatorEvent("import"),_e(!0),Q(X+1)},S=()=>{Ye.generatorEvent("toggle-output",be?"hidden":"visible"),_e(!be),Oe(0),Pt(0),Q(0)},[T,N]=xr(),[P,me]=J(!1),Ie=J1.includes(m.id)&&!(m.id==="worldgen/configured_feature"&&mt(t,"1.18"));P&&!Ie&&me(!1);let Fe=2;Ie&&(Fe+=1),be&&(Fe+=2);const Le=()=>{Ye.generatorEvent("toggle-preview",P?"hidden":"visible"),me(!P),!P&&be&&_e(!1)};return w(pe,null,w("main",{class:P?"has-preview":""},w(Vr,{id:"data-pack-generator",type:"text"}),w("div",{class:"controls"},w("div",{class:`project-controls ${s&&"has-file"}`},w("div",{class:"btn-row"},w(pt,{icon:"repo",label:i.name,relative:!1},w(ae,{icon:"arrow_left",label:e("project.go_to"),onClick:()=>mn("/project")}),s&&w(ae,{icon:"file",label:e("project.new_file"),onClick:l}),D!==void 0&&w(ae,{icon:"history",label:e("restore_backup"),onClick:C}),w(za,{searchPlaceholder:e(i.name==="Drafts"?"project.search_drafts":"project.search"),noResults:e("project.no_files"),values:i.files.filter(Z=>Z.type===m.id).map(Z=>Z.id),onSelect:Z=>a(m.id,Z)})),w(Bn,{class:"btn btn-input",placeholder:e("project.unsaved_file"),value:ee,onChange:he,onEnter:U,onBlur:U}),s&&w(ae,{icon:"trashcan",tooltip:e("project.delete_file"),onClick:F})),$?w("div",{class:"status-icon"},ye.dot_fill):xe?w("div",{class:"status-icon active"},ye.check):Y&&w("div",{class:"status-icon danger"},ye.x)),w("div",{class:"generator-controls"},w(ae,{icon:"upload",label:e("import"),onClick:_}),w(pt,{icon:"archive",label:e("presets"),relative:!1},w(za,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:Je,onSelect:Ue})),w(pt,{icon:"tag",label:t,tooltip:e("switch_version"),"data-cy":"version-switcher"},x.map(Z=>w(ae,{label:Z,active:Z===t,onClick:()=>Ge(Z)}))),w(pt,{icon:"kebab_horizontal",tooltip:e("more")},w(ae,{icon:"history",label:e("reset"),onClick:B}),w(ae,{icon:"arrow_left",label:e("undo"),onClick:j}),w(ae,{icon:"arrow_right",label:e("redo"),onClick:K})))),c&&w(Gn,{error:c,onDismiss:()=>h(null)}),w(Ey,{model:k,version:t,blockStates:M,onError:h})),w("div",{class:"popup-actions",style:`--offset: -${8+Fe*50}px;`},w("div",{class:`popup-action action-preview${Ie?" shown":""} tooltipped tip-nw`,"aria-label":e(P?"hide_preview":"show_preview"),onClick:Le},P?ye.x_circle:ye.play),w("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:se},ye.link),w("div",{class:`popup-action action-download${be?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:y},ye.download),w("div",{class:`popup-action action-copy${be?" shown":""}${T?" active":""} tooltipped tip-nw`,"aria-label":e(T?"copied":"copy"),onClick:b},T?ye.check:ye.clippy),w("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(be?"hide_output":"show_output"),onClick:S},be?ye.chevron_right:ye.code)),w("div",{class:`popup-preview${P?" shown":""}`},w(G1,{model:k,version:t,id:m.id,shown:P,onError:h})),w("div",{class:`popup-source${be?" shown":""}`},w(Rv,{model:k,blockStates:M,doCopy:it,doDownload:Dt,doImport:X,name:(Ce=m.schema)!=null?Ce:"data",copySuccess:N,onError:h})),w("div",{class:`popup-share${Ze?" shown":""}`},w(Bn,{value:ft,readonly:!0}),w(ae,{icon:at?"check":"clippy",onClick:vt,tooltip:e(at?"copied":"copy_share"),tooltipLoc:"nw",active:at,showTooltip:at})))}var Go={exports:{}};function Yo(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)&&Yo(n)}),e}Go.exports=Yo;Go.exports.default=Yo;var rx=Go.exports;class Yl{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Xh(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function fn(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 ix="</span>",Wl=e=>!!e.kind,sx=(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 ox{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Xh(t)}openNode(t){if(!Wl(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=sx(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Wl(t)||(this.buffer+=ix)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class Wo{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=>{Wo._collapse(n)})))}}class ax extends Wo{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 ox(this,this.options).value()}finalize(){return!0}}function zr(e){return e?typeof e=="string"?e:e.source:null}function Jh(e){return On("(?=",e,")")}function lx(e){return On("(?:",e,")*")}function ux(e){return On("(?:",e,")?")}function On(...e){return e.map(n=>zr(n)).join("")}function cx(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ko(...e){const t=cx(e);return"("+(t.capture?"":"?:")+e.map(r=>zr(r)).join("|")+")"}function Gh(e){return new RegExp(e.toString()+"|").exec("").length-1}function hx(e,t){const n=e&&e.exec(t);return n&&n.index===0}const fx=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function qo(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=zr(r),o="";for(;s.length>0;){const a=fx.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const dx=/\b\B/,Yh="[a-zA-Z]\\w*",Zo="[a-zA-Z_]\\w*",Wh="\\b\\d+(\\.\\d+)?",Kh="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",qh="\\b(0b[01]+)",px="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",mx=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=On(t,/.*\b/,e.binary,/\b.*/)),fn({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Ur={begin:"\\\\[\\s\\S]",relevance:0},gx={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ur]},vx={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ur]},yx={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/},rs=function(e,t,n={}){const r=fn({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=Ko("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},xx=rs("//","$"),wx=rs("/\\*","\\*/"),_x=rs("#","$"),Ex={scope:"number",begin:Wh,relevance:0},Ax={scope:"number",begin:Kh,relevance:0},bx={scope:"number",begin:qh,relevance:0},Dx={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Ur,{begin:/\[/,end:/\]/,relevance:0,contains:[Ur]}]}]},Cx={scope:"title",begin:Yh,relevance:0},Sx={scope:"title",begin:Zo,relevance:0},kx={begin:"\\.\\s*"+Zo,relevance:0},Fx=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 li=Object.freeze({__proto__:null,MATCH_NOTHING_RE:dx,IDENT_RE:Yh,UNDERSCORE_IDENT_RE:Zo,NUMBER_RE:Wh,C_NUMBER_RE:Kh,BINARY_NUMBER_RE:qh,RE_STARTERS_RE:px,SHEBANG:mx,BACKSLASH_ESCAPE:Ur,APOS_STRING_MODE:gx,QUOTE_STRING_MODE:vx,PHRASAL_WORDS_MODE:yx,COMMENT:rs,C_LINE_COMMENT_MODE:xx,C_BLOCK_COMMENT_MODE:wx,HASH_COMMENT_MODE:_x,NUMBER_MODE:Ex,C_NUMBER_MODE:Ax,BINARY_NUMBER_MODE:bx,REGEXP_MODE:Dx,TITLE_MODE:Cx,UNDERSCORE_TITLE_MODE:Sx,METHOD_GUARD:kx,END_SAME_AS_BEGIN:Fx});function Ix(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Bx(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Tx(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Ix,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Mx(e,t){!Array.isArray(e.illegal)||(e.illegal=Ko(...e.illegal))}function Nx(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 Ox(e,t){e.relevance===void 0&&(e.relevance=1)}const Lx=(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,Jh(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Rx=["of","and","for","in","not","or","if","then","parent","list","value"],Px="keyword";function Zh(e,t,n=Px){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,Zh(e[s],t,s))}),r;function i(s,o){t&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,$x(l[0],l[1])]})}}function $x(e,t){return t?Number(t):zx(e)?0:1}function zx(e){return Rx.includes(e.toLowerCase())}const Kl={},kn=e=>{console.error(e)},ql=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Un=(e,t)=>{Kl[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Kl[`${e}/${t}`]=!0)},Ri=new Error;function Qh(e,t,{key:n}){let r=0;const i=e[n],s={},o={};for(let a=1;a<=t.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=Gh(t[a-1]);e[n]=o,e[n]._emit=s,e[n]._multi=!0}function Ux(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw kn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ri;if(typeof e.beginScope!="object"||e.beginScope===null)throw kn("beginScope must be object"),Ri;Qh(e,e.begin,{key:"beginScope"}),e.begin=qo(e.begin,{joinWith:""})}}function jx(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw kn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ri;if(typeof e.endScope!="object"||e.endScope===null)throw kn("endScope must be object"),Ri;Qh(e,e.end,{key:"endScope"}),e.end=qo(e.end,{joinWith:""})}}function Vx(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Hx(e){Vx(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Ux(e),jx(e)}function Xx(e){function t(o,a){return new RegExp(zr(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=Gh(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(qo(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((g,d)=>d>0&&g!==void 0),h=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,h)}}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(([c,h])=>l.addRule(c,h)),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 c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const h=this.getMatcher(0);h.lastIndex=this.lastIndex+1,c=h.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[Bx,Nx,Hx,Lx].forEach(h=>h(o,a)),e.compilerExtensions.forEach(h=>h(o,a)),o.__beforeBegin=null,[Tx,Mx,Ox].forEach(h=>h(o,a)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=Zh(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=t(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=t(l.end)),l.terminatorEnd=zr(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(h){return Jx(h==="self"?o:h)})),o.contains.forEach(function(h){s(h,l)}),o.starts&&s(o.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=fn(e.classNameAliases||{}),s(e)}function ef(e){return e?e.endsWithParent||ef(e.starts):!1}function Jx(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return fn(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:ef(e)?fn(e,{starts:e.starts?fn(e.starts):null}):Object.isFrozen(e)?fn(e):e}var Gx="11.5.1";class Yx extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Ss=Xh,Zl=fn,Ql=Symbol("nomatch"),Wx=7,Kx=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:ax};function l(z){return a.noHighlightRe.test(z)}function c(z){let Y=z.className+" ";Y+=z.parentNode?z.parentNode.className:"";const te=a.languageDetectRe.exec(Y);if(te){const U=M(te[1]);return U||(ql(s.replace("{}",te[1])),ql("Falling back to no-highlight mode for this block.",z)),U?te[1]:"no-highlight"}return Y.split(/\s+/).find(U=>l(U)||M(U))}function h(z,Y,te){let U="",F="";typeof Y=="object"?(U=z,te=Y.ignoreIllegals,F=Y.language):(Un("10.7.0","highlight(lang, code, ...args) has been deprecated."),Un("10.7.0",`Please use highlight(code, options) instead.
|
|
https://github.com/highlightjs/highlight.js/issues/2277`),F=z,U=Y),te===void 0&&(te=!0);const B={code:U,language:F};he("before:highlight",B);const j=B.result?B.result:g(B.language,B.code,te);return j.code=B.code,he("after:highlight",j),j}function g(z,Y,te,U){const F=Object.create(null);function B(X,Q){return X.keywords[Q]}function j(){if(!se.keywords){be.addText(_e);return}let X=0;se.keywordPatternRe.lastIndex=0;let Q=se.keywordPatternRe.exec(_e),b="";for(;Q;){b+=_e.substring(X,Q.index);const y=Ne.case_insensitive?Q[0].toLowerCase():Q[0],_=B(se,y);if(_){const[S,T]=_;if(be.addText(b),b="",F[y]=(F[y]||0)+1,F[y]<=Wx&&(it+=T),S.startsWith("_"))b+=Q[0];else{const N=Ne.classNameAliases[S]||S;be.addKeyword(Q[0],N)}}else b+=Q[0];X=se.keywordPatternRe.lastIndex,Q=se.keywordPatternRe.exec(_e)}b+=_e.substr(X),be.addText(b)}function K(){if(_e==="")return;let X=null;if(typeof se.subLanguage=="string"){if(!t[se.subLanguage]){be.addText(_e);return}X=g(se.subLanguage,_e,!0,vt[se.subLanguage]),vt[se.subLanguage]=X._top}else X=m(_e,se.subLanguage.length?se.subLanguage:null);se.relevance>0&&(it+=X.relevance),be.addSublanguage(X._emitter,X.language)}function ne(){se.subLanguage!=null?K():j(),_e=""}function we(X,Q){let b=1;const y=Q.length-1;for(;b<=y;){if(!X._emit[b]){b++;continue}const _=Ne.classNameAliases[X[b]]||X[b],S=Q[b];_?be.addKeyword(S,_):(_e=S,j(),_e=""),b++}}function Je(X,Q){return X.scope&&typeof X.scope=="string"&&be.openNode(Ne.classNameAliases[X.scope]||X.scope),X.beginScope&&(X.beginScope._wrap?(be.addKeyword(_e,Ne.classNameAliases[X.beginScope._wrap]||X.beginScope._wrap),_e=""):X.beginScope._multi&&(we(X.beginScope,Q),_e="")),se=Object.create(X,{parent:{value:se}}),se}function ot(X,Q,b){let y=hx(X.endRe,b);if(y){if(X["on:end"]){const _=new Yl(X);X["on:end"](Q,_),_.isMatchIgnored&&(y=!1)}if(y){for(;X.endsParent&&X.parent;)X=X.parent;return X}}if(X.endsWithParent)return ot(X.parent,Q,b)}function Ue(X){return se.matcher.regexIndex===0?(_e+=X[0],1):(Pt=!0,0)}function Ve(X){const Q=X[0],b=X.rule,y=new Yl(b),_=[b.__beforeBegin,b["on:begin"]];for(const S of _)if(!!S&&(S(X,y),y.isMatchIgnored))return Ue(Q);return b.skip?_e+=Q:(b.excludeBegin&&(_e+=Q),ne(),!b.returnBegin&&!b.excludeBegin&&(_e=Q)),Je(b,X),b.returnBegin?0:Q.length}function Ge(X){const Q=X[0],b=Y.substr(X.index),y=ot(se,X,b);if(!y)return Ql;const _=se;se.endScope&&se.endScope._wrap?(ne(),be.addKeyword(Q,se.endScope._wrap)):se.endScope&&se.endScope._multi?(ne(),we(se.endScope,X)):_.skip?_e+=Q:(_.returnEnd||_.excludeEnd||(_e+=Q),ne(),_.excludeEnd&&(_e=Q));do se.scope&&be.closeNode(),!se.skip&&!se.subLanguage&&(it+=se.relevance),se=se.parent;while(se!==y.parent);return y.starts&&Je(y.starts,X),_.returnEnd?0:Q.length}function ft(){const X=[];for(let Q=se;Q!==Ne;Q=Q.parent)Q.scope&&X.unshift(Q.scope);X.forEach(Q=>be.openNode(Q))}let qe={};function Ze(X,Q){const b=Q&&Q[0];if(_e+=X,b==null)return ne(),0;if(qe.type==="begin"&&Q.type==="end"&&qe.index===Q.index&&b===""){if(_e+=Y.slice(Q.index,Q.index+1),!i){const y=new Error(`0 width match regex (${z})`);throw y.languageName=z,y.badRule=qe.rule,y}return 1}if(qe=Q,Q.type==="begin")return Ve(Q);if(Q.type==="illegal"&&!te){const y=new Error('Illegal lexeme "'+b+'" for mode "'+(se.scope||"<unnamed>")+'"');throw y.mode=se,y}else if(Q.type==="end"){const y=Ge(Q);if(y!==Ql)return y}if(Q.type==="illegal"&&b==="")return 1;if(Dt>1e5&&Dt>Q.index*3)throw new Error("potential infinite loop, way more iterations than matches");return _e+=b,b.length}const Ne=M(z);if(!Ne)throw kn(s.replace("{}",z)),new Error('Unknown language: "'+z+'"');const at=Xx(Ne);let gt="",se=U||at;const vt={},be=new a.__emitter(a);ft();let _e="",it=0,Oe=0,Dt=0,Pt=!1;try{for(se.matcher.considerAll();;){Dt++,Pt?Pt=!1:se.matcher.considerAll(),se.matcher.lastIndex=Oe;const X=se.matcher.exec(Y);if(!X)break;const Q=Y.substring(Oe,X.index),b=Ze(Q,X);Oe=X.index+b}return Ze(Y.substr(Oe)),be.closeAllNodes(),be.finalize(),gt=be.toHTML(),{language:z,value:gt,relevance:it,illegal:!1,_emitter:be,_top:se}}catch(X){if(X.message&&X.message.includes("Illegal"))return{language:z,value:Ss(Y),illegal:!0,relevance:0,_illegalBy:{message:X.message,index:Oe,context:Y.slice(Oe-100,Oe+100),mode:X.mode,resultSoFar:gt},_emitter:be};if(i)return{language:z,value:Ss(Y),illegal:!1,relevance:0,errorRaised:X,_emitter:be,_top:se};throw X}}function d(z){const Y={value:Ss(z),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return Y._emitter.addText(z),Y}function m(z,Y){Y=Y||a.languages||Object.keys(t);const te=d(z),U=Y.filter(M).filter($).map(ne=>g(ne,z,!1));U.unshift(te);const F=U.sort((ne,we)=>{if(ne.relevance!==we.relevance)return we.relevance-ne.relevance;if(ne.language&&we.language){if(M(ne.language).supersetOf===we.language)return 1;if(M(we.language).supersetOf===ne.language)return-1}return 0}),[B,j]=F,K=B;return K.secondBest=j,K}function x(z,Y,te){const U=Y&&n[Y]||te;z.classList.add("hljs"),z.classList.add(`language-${U}`)}function u(z){let Y=null;const te=c(z);if(l(te))return;if(he("before:highlightElement",{el:z,language:te}),z.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(z)),a.throwUnescapedHTML))throw new Yx("One of your code blocks includes unescaped HTML.",z.innerHTML);Y=z;const U=Y.textContent,F=te?h(U,{language:te,ignoreIllegals:!0}):m(U);z.innerHTML=F.value,x(z,te,F.language),z.result={language:F.language,re:F.relevance,relevance:F.relevance},F.secondBest&&(z.secondBest={language:F.secondBest.language,relevance:F.secondBest.relevance}),he("after:highlightElement",{el:z,result:F,text:U})}function f(z){a=Zl(a,z)}const p=()=>{A(),Un("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){A(),Un("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let E=!1;function A(){if(document.readyState==="loading"){E=!0;return}document.querySelectorAll(a.cssSelector).forEach(u)}function D(){E&&A()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",D,!1);function C(z,Y){let te=null;try{te=Y(e)}catch(U){if(kn("Language definition for '{}' could not be registered.".replace("{}",z)),i)kn(U);else throw U;te=o}te.name||(te.name=z),t[z]=te,te.rawDefinition=Y.bind(null,e),te.aliases&&L(te.aliases,{languageName:z})}function k(z){delete t[z];for(const Y of Object.keys(n))n[Y]===z&&delete n[Y]}function I(){return Object.keys(t)}function M(z){return z=(z||"").toLowerCase(),t[z]||t[n[z]]}function L(z,{languageName:Y}){typeof z=="string"&&(z=[z]),z.forEach(te=>{n[te.toLowerCase()]=Y})}function $(z){const Y=M(z);return Y&&!Y.disableAutodetect}function H(z){z["before:highlightBlock"]&&!z["before:highlightElement"]&&(z["before:highlightElement"]=Y=>{z["before:highlightBlock"](Object.assign({block:Y.el},Y))}),z["after:highlightBlock"]&&!z["after:highlightElement"]&&(z["after:highlightElement"]=Y=>{z["after:highlightBlock"](Object.assign({block:Y.el},Y))})}function ee(z){H(z),r.push(z)}function he(z,Y){const te=z;r.forEach(function(U){U[te]&&U[te](Y)})}function xe(z){return Un("10.7.0","highlightBlock will be removed entirely in v12.0"),Un("10.7.0","Please use highlightElement now."),u(z)}Object.assign(e,{highlight:h,highlightAuto:m,highlightAll:A,highlightElement:u,highlightBlock:xe,configure:f,initHighlighting:p,initHighlightingOnLoad:v,registerLanguage:C,unregisterLanguage:k,listLanguages:I,getLanguage:M,registerAliases:L,autoDetection:$,inherit:Zl,addPlugin:ee}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Gx,e.regex={concat:On,lookahead:Jh,either:Ko,optional:ux,anyNumberOfTimes:lx};for(const z in li)typeof li[z]=="object"&&rx(li[z]);return Object.assign(e,li),e};var jr=Kx({}),qx=jr;jr.HighlightJS=jr;jr.default=jr;var tf=qx;function Zx(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 Qx='<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>';tf.registerLanguage("json",Zx);de.use({highlight:(e,t)=>{if(t!=="")return tf.highlight(e,{language:t}).value}});function ew({id:e}){const{locale:t}=je(),{version:n,changeVersion:r}=dr(),{changeTitle:i}=Lt(),[s,o]=J(void 0),a=$e(()=>{if(!s)return;const D=Qp(s);return i(D==null?void 0:D.title,D==null?void 0:D.versions),D},[s]),l=$e(()=>{var C;const D=ke.versions.map(k=>k.id);return(C=a==null?void 0:a.versions)==null?void 0:C.sort((k,I)=>D.indexOf(I)-D.indexOf(k))},[a==null?void 0:a.versions]),c=$e(()=>!l||l.includes(n)?n:l[0],[n,a==null?void 0:a.versions]),h=$e(()=>{if(!s)return;const D=s.substring(s.indexOf("---",3)+3);return em(D,c)},[c,s]),g=$e(()=>{if(!!h)return de.use({renderer:{link(D,C,k){if(D===null)return k;const I=C?` title="${C}"`:"",M=D!=null&&D.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${D}"${I}${M}>${k}</a>`},heading(D,C,k,I){const M=I.slug(k),L=`<span id="guide-${M}" href="?version=${n}#${M}">${Qx}</span>`;return`<h${C}>${L}${D}</h${C}>`}}}),de(h,{version:"1.19"})},[h]),[d,m]=im(),x=tt(()=>{if(!g)return;const D=document.querySelector(`[id=guide-${d.slice(1)}]`);if(D){const C=D.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:C-68,behavior:"smooth"})}},[g,d]);ce(()=>{x()},[g===void 0,d]);const u=tt(D=>{if(!(D.target instanceof HTMLSpanElement))return;const C="#"+D.target.id.replace(/^guide-/,"");r(n,!1,!0),m(C),C===d&&x()},[x,d,n]);ce(()=>{(async()=>{const C=await(await fetch(`../../guides/${e}.md`)).text();o(C)})()},[e]);const[f,p]=xr(),v=tt(()=>{const D=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(D),p()},[e,n]),E=D=>{mn(`/guides/?tags=${D}`)},[A]=J(window.innerWidth>600);return w("main",null,w("div",{class:"guide"},w("div",{class:"navigation"},w("a",{class:"btn btn-link",href:"/guides/"},ye.arrow_left,t("guides.all")),w(ae,{icon:f?"check":"link",label:t("share"),onClick:v,active:f,tooltip:t(f?"copied":"copy_share"),class:"guide-share"}),l&&w(pt,{icon:"tag",label:c,tooltip:t("switch_version")},l.map(D=>w(ae,{label:D,active:D===c,onClick:()=>r(D)})))),(a==null?void 0:a.tags)&&a.tags.length>0&&w("div",{class:"guide-tags"},a.tags.map(D=>w(ei,{label:D,active:!0,onClick:()=>E(D)}))),g&&w(pe,null,w(Vr,{id:"guide",type:A?"image":"text"}),w("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:g},onClick:u}),w(Ho,null))))}const tw="tags",ks="|";function nw({}){const{locale:e}=je(),{version:t,changeVersion:n}=dr();Lt(e("title.guides"));const[r,i]=J(""),[s,o]=Tr(tw),a=$e(()=>{var m;return(m=s==null?void 0:s.split(ks))!=null?m:[]},[s]),l=m=>{a.includes(m)?o(a.filter(x=>x!==m).join(ks)):o([...a,m].sort().join(ks))},[c,h]=J(!1),g=$e(()=>c===!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(m=>{var x;return(x=m.versions)==null?void 0:x.includes(t)}),[t,c]),d=$e(()=>{const m=r.split(" ").map(x=>x.trim().toLowerCase()).filter(x=>x.length>0);return g.filter(x=>{var f;if(!a.every(p=>{var v;return(v=x.tags)==null?void 0:v.includes(p)}))return!1;const u=((f=x.tags)==null?void 0:f.join(" "))+" "+x.title.toLowerCase();return m.every(p=>p.startsWith("!")?p.length===1||!u.includes(p.slice(1)):u.includes(p))})},[g,r,s]);return w("main",null,w("div",{class:"guides"},w("div",{class:"changelog-query"},w(Bn,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:r,onChange:i}),w(pt,{icon:"tag",label:c?t:e("any_version"),tooltip:e("switch_version")},w(ae,{label:e("any_version"),active:!c,onClick:()=>h(!c)}),ke.versions.slice().reverse().map(m=>w(ae,{label:m.id,active:c&&m.id===t,onClick:()=>{n(m.id),h(!0)}})))),a.length>0&&w("div",{class:"changelog-tags"},a.map(m=>w(ei,{label:m,onClick:()=>l(m)}))),g.length===0?w(pe,null,w("span",{class:"note"},e("guides.no_results.version"))):d.length===0?w(pe,null,w("span",{class:"note"},e("guides.no_results.query"))):d.map(m=>{var x,u;return w(Zy,{title:m.title,link:`/guides/${m.id}/`,tags:(x=m.tags)!=null?x:[],versions:(u=m.versions)!=null?u:[],activeTags:a,toggleTag:l})})))}function rw({}){const{locale:e}=je();return Lt(e("title.home")),w("main",null,w("div",{class:"home"},w(Ct,{title:"Data packs"},ke.generators.filter(t=>!t.category).map(t=>w(Ct,{title:e(t.id),link:on(t.url)})),w(Ct,{title:e("worldgen"),link:"/worldgen/"})),w(Ct,{title:"Resource packs"},ke.generators.filter(t=>t.category==="assets").map(t=>w(Ct,{title:e(t.id),link:on(t.url)}))),w(Ct,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),w(Ct,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),w(Ct,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),w(Ct,{title:"Technical Changelog",link:"/changelog/"}),w(Ct,{title:"Minecraft Versions",link:"/versions/"}),w(Ct,{title:"Data Pack Guides",link:"/guides/"}),w(Ho,null)))}function iw({}){const{locale:e}=je(),{project:t,openFile:n}=Sc();Lt(e("title.project",t.name));const r=$e(()=>t.files.map(Tm),t.files),i=s=>{const[,o,a,...l]=s.split("/");n(a,`${o}:${l}`)};return w("main",null,w(Vr,{id:"data-pack-project",type:"text"}),w("div",{class:"project"},w("h2",null,t.name),w("div",{class:"file-view"},w(Hh,{entries:r,onSelect:i}))))}function sw({}){const{locale:e}=je(),{version:t,changeVersion:n}=dr(),[r,i]=J(null);Lt(e("title.sounds"));const[s,o]=J(void 0);ce(()=>{(async()=>{const C=await Ee(()=>import("./howler.8f9f31bf.js").then(function(k){return k.h}),[]);o(()=>k=>new C.Howl(k))})()},[]);const[a,l]=J({}),c=Object.keys(a!=null?a:{});ce(()=>{gm(t).then(l).catch(C=>{console.error(C),i(C)})},[t]);const[h,g]=J(""),[d,m]=J([]),x=()=>{m([{id:Cn(),sound:h,delay:0,pitch:1,volume:1},...d])},u=C=>k=>{m(d.map(I=>I.id===C?ue(ue({},I),k):I))},f=C=>()=>{m(d.filter(k=>k.id!==C))},[p,v]=J(0),E=()=>{v(p+1)},A=Te(null),D=()=>{if(!A.current)return;const C=d.some(I=>I.delay>0),k=d.sort((I,M)=>I.delay-M.delay).map(I=>`${C?`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,"+k+"%0A"),A.current.setAttribute("download","sounds.mcfunction"),A.current.click()};return w("main",null,r&&w(Gn,{error:r,onDismiss:()=>i(null)}),c.length>0&&w(pe,null,w("div",{class:"controls sounds-controls"},w("div",{class:"sound-search-group"},w(Bn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:h,onChange:g,onEnter:x}),w(ae,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:x})),d.length>1&&w(ae,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:E}),w("div",{class:"spacer"}),w(ae,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),class:"download-sounds",onClick:D}),w(pt,{icon:"tag",label:t,tooltip:e("switch_version")},ke.versions.slice().reverse().map(C=>w(ae,{label:C.id,active:C.id===t,onClick:()=>n(C.id)})))),w("div",{class:"sounds"},s&&d.map(C=>w(ex,Re(ue({key:C.id},C),{howler:s,sounds:a,delayedPlay:p,onEdit:u(C.id),onDelete:f(C.id)})))),w("a",{ref:A,style:"display: none;"})),w("datalist",{id:"sound-list"},c.map(C=>w("option",{key:C,value:C}))))}function ow({}){const{locale:e}=je(),[t,n]=J(null);Lt(e("title.versions"));const[r,i]=J([]);ce(()=>{ym().then(c=>i(c)).catch(c=>{console.error(c),n(c)})},[]);const[s]=Tr("id"),o=r.find(c=>c.id===s);Lt(o?o.name:"Versions Explorer",o?[]:void 0);const a=o&&eu(r,o,-1),l=o&&eu(r,o,1);return w("main",null,w(Vr,{type:"text",id:"versions"}),t&&w(Gn,{error:t,onDismiss:()=>n(null)}),w("div",{class:"versions"},s?w(pe,null,w("div",{class:"navigation"},w("a",{class:"btn btn-link",href:"/versions/"},ye.three_bars,e("versions.all")),w("a",ue({class:"btn btn-link"},l?{href:`/versions/?id=${l.id}`}:{disabled:!0}),ye.arrow_left,e("versions.previous")),w("a",ue({class:"btn btn-link"},a?{href:`/versions/?id=${a.id}`}:{disabled:!0}),e("versions.next"),ye.arrow_right)),o?w(Wy,{version:o}):w("div",{class:"version-detail"},w("h2",null,s),w("div",{class:"version-info"},w("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")))):w(qy,{versions:r,link:c=>`/versions/?id=${c}`})))}function eu(e,t,n){const i=e.findIndex(s=>s.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function aw(){return w(pe,null,w(Qy,null),w(rn,{onChange:t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>Ye.pageview(on(t.url)))}},w(rw,{path:"/"}),w(Gl,{path:"/worldgen",category:"worldgen"}),w(Gl,{path:"/assets",category:"assets"}),w(sw,{path:"/sounds"}),w(tx,{path:"/changelog"}),w(ow,{path:"/versions"}),w(iw,{path:"/project"}),w(nw,{path:"/guides/"}),w(ew,{path:"/guides/:id"}),w(nx,{default:!0})))}function lw(){return w(Im,null,w(Mm,null,w(Rm,null,w(Om,null,w(Bm,null,w(aw,null))))))}Wn(w(lw,null),document.body);export{yr as c,Pc as e,W as l};
|
|
//# sourceMappingURL=index.cecfddbb.js.map
|