Files
misode.github.io/assets/index.f7262d42.js
2022-10-20 18:49:33 +00:00

141 lines
674 KiB
JavaScript

var Kg=Object.defineProperty,Jg=Object.defineProperties;var Qg=Object.getOwnPropertyDescriptors;var xa=Object.getOwnPropertySymbols;var a0=Object.prototype.hasOwnProperty,s0=Object.prototype.propertyIsEnumerable;var xl=(e,t,n)=>t in e?Kg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))a0.call(t,n)&&xl(e,n,t[n]);if(xa)for(var n of xa(t))s0.call(t,n)&&xl(e,n,t[n]);return e},be=(e,t)=>Jg(e,Qg(t));var yl=e=>typeof e=="symbol"?e:e+"",l0=(e,t)=>{var n={};for(var r in e)a0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xa)for(var r of xa(e))t.indexOf(r)<0&&s0.call(e,r)&&(n[r]=e[r]);return n};var I=(e,t,n)=>(xl(e,typeof t!="symbol"?t+"":t,n),n);const kk={},em=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};em();var oa,ce,$f,Bf,Io,zf,c0,jf,_s={},Vf=[],tm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Kn(e,t){for(var n in t)e[n]=t[n];return e}function Uf(e){var t=e.parentNode;t&&t.removeChild(e)}function Yt(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?oa.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Mo(e,a,r,i,null)}function Mo(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++$f:i};return i==null&&ce.vnode!=null&&ce.vnode(o),o}function Hf(){return{current:null}}function nr(e){return e.children}function en(e,t){this.props=e,this.context=t}function Vi(e,t){if(t==null)return e.__?Vi(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"?Vi(e):null}function Zf(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 Zf(e)}}function wc(e){(!e.__d&&(e.__d=!0)&&Io.push(e)&&!ws.__r++||c0!==ce.debounceRendering)&&((c0=ce.debounceRendering)||zf)(ws)}function ws(){for(var e;ws.__r=Io.length;)e=Io.sort(function(t,n){return t.__v.__b-n.__v.__b}),Io=[],e.some(function(t){var n,r,i,o,a,s;t.__d&&(a=(o=(n=t).__v).__e,(s=n.__P)&&(r=[],(i=Kn({},o)).__v=o.__v+1,dd(s,o,i,n.__n,s.ownerSVGElement!==void 0,o.__h!=null?[a]:null,r,a==null?Vi(o):a,o.__h),qf(r,o),o.__e!=a&&Zf(o)))})}function Gf(e,t,n,r,i,o,a,s,l,d){var c,u,f,h,w,_,g,m=r&&r.__k||Vf,v=m.length;for(n.__k=[],c=0;c<t.length;c++)if((h=n.__k[c]=(h=t[c])==null||typeof h=="boolean"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"?Mo(null,h,null,null,h):Array.isArray(h)?Mo(nr,{children:h},null,null,null):h.__b>0?Mo(h.type,h.props,h.key,null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(f=m[c])===null||f&&h.key==f.key&&h.type===f.type)m[c]=void 0;else for(u=0;u<v;u++){if((f=m[u])&&h.key==f.key&&h.type===f.type){m[u]=void 0;break}f=null}dd(e,h,f=f||_s,i,o,a,s,l,d),w=h.__e,(u=h.ref)&&f.ref!=u&&(g||(g=[]),f.ref&&g.push(f.ref,null,h),g.push(u,h.__c||w,h)),w!=null?(_==null&&(_=w),typeof h.type=="function"&&h.__k===f.__k?h.__d=l=Yf(h,l,e):l=Wf(e,h,f,m,w,l),typeof n.type=="function"&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=Vi(f))}for(n.__e=_,c=v;c--;)m[c]!=null&&(typeof n.type=="function"&&m[c].__e!=null&&m[c].__e==n.__d&&(n.__d=Vi(r,c+1)),Kf(m[c],m[c]));if(g)for(c=0;c<g.length;c++)Xf(g[c],g[++c],g[++c])}function Yf(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t=typeof r.type=="function"?Yf(r,t,n):Wf(n,r,r,i,r.__e,t));return t}function tn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){tn(n,t)}):t.push(e)),t}function Wf(e,t,n,r,i,o){var a,s,l;if(t.__d!==void 0)a=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=2)if(s==i)break e;e.insertBefore(i,o),a=o}return a!==void 0?a:i.nextSibling}function nm(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||vs(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||vs(e,o,t[o],n[o],r)}function d0(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||tm.test(t)?n:n+"px"}function vs(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||d0(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||d0(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?f0:u0,o):e.removeEventListener(t,o?f0:u0,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function u0(e){this.l[e.type+!1](ce.event?ce.event(e):e)}function f0(e){this.l[e.type+!0](ce.event?ce.event(e):e)}function dd(e,t,n,r,i,o,a,s,l){var d,c,u,f,h,w,_,g,m,v,x,b,y,k=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(d=ce.__b)&&d(t);try{e:if(typeof k=="function"){if(g=t.props,m=(d=k.contextType)&&r[d.__c],v=d?m?m.props.value:d.__:r,n.__c?_=(c=t.__c=n.__c).__=c.__E:("prototype"in k&&k.prototype.render?t.__c=c=new k(g,v):(t.__c=c=new en(g,v),c.constructor=k,c.render=im),m&&m.sub(c),c.props=g,c.state||(c.state={}),c.context=v,c.__n=r,u=c.__d=!0,c.__h=[]),c.__s==null&&(c.__s=c.state),k.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Kn({},c.__s)),Kn(c.__s,k.getDerivedStateFromProps(g,c.__s))),f=c.props,h=c.state,u)k.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(k.getDerivedStateFromProps==null&&g!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(g,v),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(g,c.__s,v)===!1||t.__v===n.__v){c.props=g,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(C){C&&(C.__=t)}),c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(g,c.__s,v),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(f,h,w)})}if(c.context=v,c.props=g,c.__v=t,c.__P=e,x=ce.__r,b=0,"prototype"in k&&k.prototype.render)c.state=c.__s,c.__d=!1,x&&x(t),d=c.render(c.props,c.state,c.context);else do c.__d=!1,x&&x(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++b<25);c.state=c.__s,c.getChildContext!=null&&(r=Kn(Kn({},r),c.getChildContext())),u||c.getSnapshotBeforeUpdate==null||(w=c.getSnapshotBeforeUpdate(f,h)),y=d!=null&&d.type===nr&&d.key==null?d.props.children:d,Gf(e,Array.isArray(y)?y:[y],t,n,r,i,o,a,s,l),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),_&&(c.__E=c.__=null),c.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=rm(n.__e,t,n,r,i,o,a,l);(d=ce.diffed)&&d(t)}catch(C){t.__v=null,(l||o!=null)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),ce.__e(C,t,n)}}function qf(e,t){ce.__c&&ce.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){ce.__e(r,n.__v)}})}function rm(e,t,n,r,i,o,a,s){var l,d,c,u=n.props,f=t.props,h=t.type,w=0;if(h==="svg"&&(i=!0),o!=null){for(;w<o.length;w++)if((l=o[w])&&"setAttribute"in l==!!h&&(h?l.localName===h:l.nodeType===3)){e=l,o[w]=null;break}}if(e==null){if(h===null)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),o=null,s=!1}if(h===null)u===f||s&&e.data===f||(e.data=f);else{if(o=o&&oa.call(e.childNodes),d=(u=n.props||_s).dangerouslySetInnerHTML,c=f.dangerouslySetInnerHTML,!s){if(o!=null)for(u={},w=0;w<e.attributes.length;w++)u[e.attributes[w].name]=e.attributes[w].value;(c||d)&&(c&&(d&&c.__html==d.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(nm(e,f,u,i,s),c)t.__k=[];else if(w=t.props.children,Gf(e,Array.isArray(w)?w:[w],t,n,r,i&&h!=="foreignObject",o,a,o?o[0]:n.__k&&Vi(n,0),s),o!=null)for(w=o.length;w--;)o[w]!=null&&Uf(o[w]);s||("value"in f&&(w=f.value)!==void 0&&(w!==e.value||h==="progress"&&!w||h==="option"&&w!==u.value)&&vs(e,"value",w,u.value,!1),"checked"in f&&(w=f.checked)!==void 0&&w!==e.checked&&vs(e,"checked",w,u.checked,!1))}return e}function Xf(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ce.__e(r,n)}}function Kf(e,t,n){var r,i;if(ce.unmount&&ce.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Xf(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ce.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Kf(r[i],t,typeof e.type!="function");n||e.__e==null||Uf(e.__e),e.__e=e.__d=void 0}function im(e,t,n){return this.constructor(e,n)}function Gr(e,t,n){var r,i,o;ce.__&&ce.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],dd(t,e=(!r&&n||t).__k=Yt(nr,null,[e]),i||_s,_s,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?oa.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),qf(o,e)}function ud(e,t){Gr(e,t,ud)}function fd(e,t,n){var r,i,o,a=Kn({},e.props);for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];return arguments.length>2&&(a.children=arguments.length>3?oa.call(arguments,2):n),Mo(e.type,a,r||e.key,i||e.ref,null)}function Mr(e,t){var n={__c:t="__cC"+jf++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(wc)},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}oa=Vf.slice,ce={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},$f=0,Bf=function(e){return e!=null&&e.constructor===void 0},en.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Kn({},this.state),typeof e=="function"&&(e=e(Kn({},n),this.props)),e&&Kn(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),wc(this))},en.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),wc(this))},en.prototype.render=nr,Io=[],zf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ws.__r=0,jf=0;var om=Object.freeze(Object.defineProperty({__proto__:null,render:Gr,hydrate:ud,createElement:Yt,h:Yt,Fragment:nr,createRef:Hf,get isValidElement(){return Bf},Component:en,cloneElement:fd,createContext:Mr,toChildArray:tn,get options(){return ce}},Symbol.toStringTag,{value:"Module"}));var am={};function Jf(e,t){for(var n in t)e[n]=t[n];return e}function Qf(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),o={},a;if(i&&i[1])for(var s=i[1].split("&"),l=0;l<s.length;l++){var d=s[l].split("=");o[decodeURIComponent(d[0])]=decodeURIComponent(d.slice(1).join("="))}e=vc(e.replace(r,"")),t=vc(t||"");for(var c=Math.max(e.length,t.length),u=0;u<c;u++)if(t[u]&&t[u].charAt(0)===":"){var f=t[u].replace(/(^:|[+*?]+$)/g,""),h=(t[u].match(/[+*?]+$/)||am)[0]||"",w=~h.indexOf("+"),_=~h.indexOf("*"),g=e[u]||"";if(!g&&!_&&(h.indexOf("?")<0||w)){a=!1;break}if(o[f]=decodeURIComponent(g),w||_){o[f]=e.slice(u).map(decodeURIComponent).join("/");break}}else if(t[u]!==e[u]){a=!1;break}return n.default!==!0&&a===!1?!1:o}function sm(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function lm(e,t){return e.index=t,e.rank=um(e),e.props}function vc(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function cm(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function dm(e){return vc(e).map(cm).join("")}function um(e){return e.props.default?0:dm(e.props.path)}var Ut=null,jr=[],bc=[],fm={};function hm(e,t){t===void 0&&(t="push"),Ut&&Ut[t]?Ut[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function Ui(){var e;return Ut&&Ut.location?e=Ut.location:Ut&&Ut.getCurrentLocation?e=Ut.getCurrentLocation():e=typeof location!="undefined"?location:fm,""+(e.pathname||"")+(e.search||"")}function ti(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),pm(e)&&hm(e,t?"replace":"push"),eh(e)}function pm(e){for(var t=jr.length;t--;)if(jr[t].canRoute(e))return!0;return!1}function eh(e){for(var t=!1,n=0;n<jr.length;n++)jr[n].routeTo(e)===!0&&(t=!0);for(var r=bc.length;r--;)bc[r](e);return t}function th(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 ti(t)}}function gm(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return th(e.currentTarget||e.target||this),nh(e)}function nh(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function mm(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(th(t))return nh(e)}while(t=t.parentNode)}}var h0=!1;function _m(){h0||(typeof addEventListener=="function"&&(Ut||addEventListener("popstate",function(){eh(Ui())}),addEventListener("click",mm)),h0=!0)}var rr=function(e){function t(n){e.call(this,n),n.history&&(Ut=n.history),this.state={url:n.url||Ui()},_m()}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=tn(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(){jr.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;Ut&&(this.unlisten=Ut.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),jr.splice(jr.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,o){return r.filter(lm).sort(sm).map(function(a){var s=Qf(i,a.props.path,a.props);if(s){if(o!==!1){var l={url:i,matches:s};return Jf(l,s),delete l.ref,delete l.key,fd(a,l)}return a}}).filter(Boolean)},t.prototype.render=function(r,i){var o=r.children,a=r.onChange,s=i.url,l=this.getMatchingChildren(tn(o),s,!0),d=l[0]||null,c=this.previousUrl;return s!==c&&(this.previousUrl=s,typeof a=="function"&&a({router:this,url:s,previous:c,active:l,current:d})),d},t}(en),rh=function(e){return Yt("a",Jf({onClick:gm},e))},wm=function(e){return Yt(e.component,e)};rr.subscribers=bc;rr.getCurrentUrl=Ui;rr.route=ti;rr.Router=rr;rr.Route=wm;rr.Link=rh;rr.exec=Qf;var Ne;(e=>{const t="Site",n="Generator";function l(B,K,de){ga("send","event",B,K,de)}function d(B,K){ga("set",`dimension${B}`,K)}function c(B){ga("set","page",B),ga("send","pageview")}e.pageview=c;function u(B,K){l(n,B,K)}e.generatorEvent=u;function f(B){return B==="menu"?"Menu":"Hotkey"}function h(B){d(4,B),gtag("set",{locale:B})}e.setLocale=h;function w(B,K){h(K),l(t,"set-language",K),gtag("event","change_locale",{prev_locale:B})}e.changeLocale=w;function _(B){d(1,B),gtag("set",{theme:B})}e.setTheme=_;function g(B,K){_(K),l(t,"set-theme",K),gtag("event","change_theme",{prev_theme:B})}e.changeTheme=g;function m(B){d(3,B),gtag("set",{version:B})}e.setVersion=m;function v(B){gtag("set",{selected_version:B})}e.setSelectedVersion=v;function x(B,K){m(K),l(n,"set-version",K),gtag("event","change_version",{prev_version:B})}e.changeVersion=x;function b(B){d(6,B),gtag("event","use_generator",{file_type:B})}e.setGenerator=b;function y(B){d(7,B),gtag("set",{prefers_color_scheme:B})}e.setPrefersColorScheme=y;function k(B){gtag("set",{tree_view_mode:B})}e.setTreeViewMode=k;function C(B,K,de){l(n,"reset"),gtag("event","reset_generator",{file_type:B,history:K,method:de})}e.resetGenerator=C;function E(B,K,de){l(n,"undo",f(de)),gtag("event","undo_generator",{file_type:B,history:K,method:de})}e.undoGenerator=E;function M(B,K,de){l(n,"undo",f(de)),gtag("event","redo_generator",{file_type:B,history:K,method:de})}e.redoGenerator=M;function S(B,K){l(n,"load-preset",K),gtag("event","load_generator_preset",{file_type:B,file_name:K})}e.loadPreset=S;function T(B,K){gtag("event","open_generator_preset",{file_type:B,file_name:K})}e.openPreset=T;function z(B,K,de,he,De,Ie){gtag("event","create_generator_snippet",{file_type:B,snippet_id:K,version:de,data_size:he,compressed_size:De,compression_rate:Ie})}e.createSnippet=z;function F(B,K,de){gtag("event","open_generator_snippet",{file_type:B,snippet_id:K,version:de})}e.openSnippet=F;function R(B,K){l(n,"copy"),gtag("event","copy_generator_output",{file_type:B,method:K})}e.copyOutput=R;function V(B,K){l(n,"download"),gtag("event","download_generator_output",{file_type:B,method:K})}e.downloadOutput=V;function L(B,K){l(n,"toggle-output","visible"),gtag("event","show_generator_output",{file_type:B,method:K})}e.showOutput=L;function j(B,K){l(n,"toggle-output","hidden"),gtag("event","hide_generator_output",{file_type:B,method:K})}e.hideOutput=j;function Z(B,K){l(n,"toggle-preview","visible"),gtag("event","show_generator_preview",{file_type:B,method:K})}e.showPreview=Z;function Q(B,K){l(n,"toggle-preview","hidden"),gtag("event","hide_generator_preview",{file_type:B,method:K})}e.hidePreview=Q;function D(B,K,de,he){l(n,"show-project",f(he)),gtag("event","show_project",{file_type:B,projects_count:K,project_size:de,method:he})}e.showProject=D;function A(B,K,de,he){l(n,"hide-project",f(he)),gtag("event","hide_project",{file_type:B,projects_count:K,project_size:de,method:he})}e.hideProject=A;function O(B,K,de,he){l(n,"save-project-file",f(he)),gtag("event","save_project_file",{file_type:B,projects_count:K,project_size:de,method:he})}e.saveProjectFile=O;function $(B,K,de,he){l(n,"delete-project-file",f(he)),gtag("event","delete_project_file",{file_type:B,projects_count:K,project_size:de,method:he})}e.deleteProjectFile=$;function X(B,K,de,he){l(n,"rename-project-file",f(he)),gtag("event","rename_project_file",{file_type:B,projects_count:K,project_size:de,method:he})}e.renameProjectFile=X;function ie(B,K,de){l(n,"delete-project",f(de)),gtag("event","delete_project",{projects_count:B,project_size:K,method:de})}e.deleteProject=ie})(Ne||(Ne={}));var ni,st,kl,p0,Hi=0,ih=[],g0=ce.__b,m0=ce.__r,_0=ce.diffed,w0=ce.__c,v0=ce.unmount;function Qi(e,t){ce.__h&&ce.__h(st,e,Hi||t),Hi=0;var n=st.__H||(st.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Y(e){return Hi=1,oh(lh,e)}function oh(e,t,n){var r=Qi(ni++,2);return r.t=e,r.__c||(r.__=[n?n(t):lh(void 0,t),function(i){var o=r.t(r.__[0],i);r.__[0]!==o&&(r.__=[o,r.__[1]],r.__c.setState({}))}],r.__c=st),r.__}function me(e,t){var n=Qi(ni++,3);!ce.__s&&hd(n.__H,t)&&(n.__=e,n.__H=t,st.__H.__h.push(n))}function ah(e,t){var n=Qi(ni++,4);!ce.__s&&hd(n.__H,t)&&(n.__=e,n.__H=t,st.__h.push(n))}function Me(e){return Hi=5,Ee(function(){return{current:e}},[])}function vm(e,t,n){Hi=6,ah(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Ee(e,t){var n=Qi(ni++,7);return hd(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ve(e,t){return Hi=8,Ee(function(){return e},t)}function ri(e){var t=st.context[e.__c],n=Qi(ni++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(st)),t.props.value):e.__}function bm(e,t){ce.useDebugValue&&ce.useDebugValue(t?t(e):e)}function sh(e){var t=Qi(ni++,10),n=Y();return t.__=e,st.componentDidCatch||(st.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function xm(){for(var e;e=ih.shift();)if(e.__P)try{e.__H.__h.forEach(Za),e.__H.__h.forEach(xc),e.__H.__h=[]}catch(t){e.__H.__h=[],ce.__e(t,e.__v)}}ce.__b=function(e){st=null,g0&&g0(e)},ce.__r=function(e){m0&&m0(e),ni=0;var t=(st=e.__c).__H;t&&(kl===st?(t.__h=[],st.__h=[],t.__.forEach(function(n){n.__H&&(n.__H=void 0)})):(t.__h.forEach(Za),t.__h.forEach(xc),t.__h=[])),kl=st},ce.diffed=function(e){_0&&_0(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(ih.push(t)!==1&&p0===ce.requestAnimationFrame||((p0=ce.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(o),b0&&cancelAnimationFrame(r),setTimeout(n)},o=setTimeout(i,100);b0&&(r=requestAnimationFrame(i))})(xm)),st=null,kl=null},ce.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Za),n.__h=n.__h.filter(function(r){return!r.__||xc(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],ce.__e(r,n.__v)}}),w0&&w0(e,t)},ce.unmount=function(e){v0&&v0(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Za(r)}catch(i){t=i}}),t&&ce.__e(t,n.__v))};var b0=typeof requestAnimationFrame=="function";function Za(e){var t=st,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),st=t}function xc(e){var t=st;e.__c=e.__(),st=t}function hd(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function lh(e,t){return typeof t=="function"?t(e):t}var ya=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ym(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}function ch(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 km=ym(om),dh,uh,fh,yc=km,Cm=0;function x0(e,t,n,r,i){var o,a,s={};for(a in t)a=="ref"?o=t[a]:s[a]=t[a];var l={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Cm,__source:i,__self:r};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)s[a]===void 0&&(s[a]=o[a]);return yc.options.vnode&&yc.options.vnode(l),l}fh=yc.Fragment,uh=x0,dh=x0;const p=uh,N=dh,le=fh;function hh({type:e,id:t}){return me(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&&ethicalads.load()},[]),p("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:o,onClick:a,disabled:s}){return N("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${o!=null?o:"sw"}`:""}${s?" disabled":""}${n?" tip-shown":""}`,onClick:s?void 0:a,"aria-label":i,children:[e&&ue[e],t&&p("span",{children:t})]})}var P={},Pn={},Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.ModelPath=Ln.Path=Ln.relativePath=void 0;function Em(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}Ln.relativePath=Em;class Zn{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 Zn(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Zn(this.modelArr.slice(1),this.contextArr)}pop(){return new Zn(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Zn([...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 Zn([...this.modelArr],[...this.contextArr,n])}copy(){return new Zn([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Gn(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)}}Ln.Path=Zn;class Gn extends Zn{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 Gn(this.model,super.slice(t,n))}shift(){return new Gn(this.model,super.shift())}pop(){return new Gn(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Gn(this.model,super.modelPush(t))}contextPush(t){return new Gn(this.model,super.contextPush(t))}copy(){return new Gn(this.model,super.copy())}}Ln.ModelPath=Gn;var eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.Errors=void 0;class Am{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}}eo.Errors=Am;var On={};Object.defineProperty(On,"__esModule",{value:!0});On.hexId=On.quoteString=On.escapeString=void 0;function ph(e){return e.replace(/(\\|")/g,"\\$1")}On.escapeString=ph;function Sm(e){return`"${ph(e)}"`}On.quoteString=Sm;const Im=e=>("0"+e.toString(16)).substr(-2);function Mm(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Im).join("")}On.hexId=Mm;Object.defineProperty(Pn,"__esModule",{value:!0});Pn.DataModel=void 0;const Tm=Ln,y0=eo,Cl=On;class pd{constructor(t,n){var r,i,o,a;this.historyMax=(r=n==null?void 0:n.historyMax)!==null&&r!==void 0?r:50,this.verbose=(i=n==null?void 0:n.verbose)!==null&&i!==void 0?i:!1,this.wrapLists=(o=n==null?void 0:n.wrapLists)!==null&&o!==void 0?o:!1,this.schema=t;const s=(a=n==null?void 0:n.initialData)!==null&&a!==void 0?a:t.default();this.data=this.wrapLists?pd.wrapLists(s):s,this.listeners=[],this.errors=new y0.Errors,this.history=[JSON.stringify(this.data)],this.historyIndex=0}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n>-1&&this.listeners.splice(n,1)}invalidate(){const t=JSON.stringify(this.data);this.history[this.historyIndex]!==t&&(this.historyIndex+=1,this.history.splice(this.historyIndex,this.historyMax,t),this.history.length>this.historyMax&&(this.history.splice(0,1),this.historyIndex-=1)),this.silentInvalidate()}silentInvalidate(){this.listeners.forEach(t=>{t.invalidated&&t.invalidated(this),t.errors&&t.errors(this.errors)})}reset(t,n){this.data=t,this.validate(n),this.invalidate()}get(t){let n=this.data;return t.forEach(r=>{if(n===void 0)return n;this.wrapLists&&typeof r=="number"?n=n[r].node:n=n[r]}),n}set(t,n,r){if(t.getArray().length===0){this.reset(n,!0);return}let i=this.data;t.pop().forEach(o=>{(i[o]===void 0||typeof i[o]=="string"||typeof i[o]=="number")&&(this.wrapLists&&typeof o=="number"?i[o]={node:{},id:(0,Cl.hexId)()}:i[o]={}),this.wrapLists&&typeof o=="number"?i=i[o].node:i=i[o]}),i!==null&&(n===void 0||typeof n=="number"&&isNaN(n)?typeof t.last()=="number"?i.splice(t.last(),1):delete i[t.last()]:this.wrapLists&&typeof t.last()=="number"?i[t.last()]={node:n,id:(0,Cl.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 Tm.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 y0.Errors;i.add(t,n,r),this.listeners.forEach(o=>{o.errors&&o.errors(i)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(r=>({node:this.wrapLists(r),id:(0,Cl.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}}Pn.DataModel=pd;var ar={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:o=>o,suggest:()=>[],validate:(o,a)=>a,validationOption:()=>{},hook(o,a,...s){return o.base({node:this},a,...s)},canUpdate:()=>!1,update:()=>[]};const t=(o,a)=>oe(oe({},o),typeof a=="function"?a(o):a);e.Mod=t;const n=(o,a)=>(0,e.Mod)(a,{enabled:s=>s.push(o).get()!==void 0});e.Has=n;function r(o){return be(oe({},o),{optional:()=>!0})}e.Opt=r;function i(o){return be(oe({},o),{keep:()=>!0})}e.Keep=i})(ar);var qs={};Object.defineProperty(qs,"__esModule",{value:!0});qs.BooleanNode=void 0;const Lm=Pn,Om=ar,Nm=()=>be(oe({},Om.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?Lm.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)}});qs.BooleanNode=Nm;var gh={},aa={};Object.defineProperty(aa,"__esModule",{value:!0});aa.ListNode=void 0;const Rm=Pn,Dm=ar,Fm=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,o=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,a=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return be(oe({},Dm.Base),{type:()=>"list",default:()=>t!=null&&t.minLength?[...Array(i)].map(s=>e.default()):[],navigate(s,l){const d=l+1;return s.getArray().length<=d?this:e.navigate(s,d)},pathPush(s,l){return s.push(parseInt(l.toString())).contextPush("entry")},validate(s,l,d,c){if(c.loose&&!Array.isArray(l)&&(l=c.wrapLists?Rm.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))a&&(l.length<i||l.length>o)?i===o?d.add(s,"error.invalid_list_range.exact",l.length,i):d.add(s,"error.invalid_list_range.between",l.length,i,o):l.length<i?d.add(s,"error.invalid_list_range.smaller",l.length,i):l.length>o&&d.add(s,"error.invalid_list_range.larger",l.length,o);else return d.add(s,"error.expected_list"),l;const u=l.map((f,h)=>{const w=e.validate(s.push(h),c.wrapLists?f.node:f,d,c);return c.wrapLists?{node:w,id:f.id}:w});for(const f of Object.getOwnPropertySymbols(l))u[f]=l[f];return u},hook(s,l,...d){var c;return((c=s.list)!==null&&c!==void 0?c:s.base).call(s,{node:this,children:e,config:t!=null?t:{}},l,...d)}})};aa.ListNode=Fm;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});sa.SwitchNode=void 0;const Pm=ar,$m=e=>be(oe({},Pm.Base),{type(t){return this.activeCase(t,!0).node.type(t)},category(t){return this.activeCase(t,!0).node.category(t)},default:()=>e[0].node.default(),navigate(t,n){var r;const i=n+1;return(r=this.activeCase(t.slice(0,i)))===null||r===void 0?void 0:r.node.navigate(t,n)},pathPush(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.pathPush(t,n))!==null&&i!==void 0?i:t},suggest(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.suggest(t,n))!==null&&i!==void 0?i:e.filter(o=>o.match(t)).map(o=>o.node.suggest(t,n)).reduce((o,a)=>o.concat(a))},validate(t,n,r,i){let o=this.activeCase(t);return o===void 0?n:o.node.validate(t,n,r,i)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const r=(o,a)=>{var s,l;return((s=a.priority)!==null&&s!==void 0?s:0)-((l=o.priority)!==null&&l!==void 0?l:0)},i=e.filter(o=>o.match(t)).sort(r);return n&&i.length===0?e.sort(r)[0]:i.length>0?i[0]:void 0},hook(t,n,...r){return this.activeCase(n,!0).node.hook(t,n,...r)}});sa.SwitchNode=$m;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=aa,n=sa,r=(a,s)=>{const l=(c,u)=>{if(c.match)return c.match(u);switch(c.type){case"list":return Array.isArray(u);case"object":return typeof u=="object"&&!Array.isArray(u);default:return typeof u===c.type}},d=(0,n.SwitchNode)(a.map(c=>({type:c.type,priority:c.priority,match:u=>l(c,u.get()),node:c.node})));return be(oe({},d),{validate(c,u,f,h){let w=d.activeCase(c,!0);return w.node.optional()?u:w.node.validate(c,u,f,h)},hook(c,u,...f){var h;return((h=c.choice)!==null&&h!==void 0?h:c.base).call(c,{node:this,choices:a,config:s!=null?s:{},switchNode:d},u,...f)}})};e.ChoiceNode=r;const i=a=>(s,l)=>(0,e.ChoiceNode)([{type:a,node:s,change:d=>{var c;return(c=d[0])!==null&&c!==void 0?c:s.default()}},{type:"list",node:(0,t.ListNode)(s),change:d=>d?[d]:[]}],l);e.ObjectOrList=i("object"),e.StringOrList=i("string");const o=(a,s,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:a,change:d=>Object.keys(l)[0]},{type:"object",node:s,change:d=>{var c;return(c=l[d])!==null&&c!==void 0?c:l[Object.keys(l)[0]]}}]);e.ObjectOrPreset=o})(gh);var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.MapNode=void 0;const Bm=ar,zm=Pn,jm=(e,t,n)=>be(oe({},Bm.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const o=i+1;return r.getArray().length<=o?this:t.navigate(r,o)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,o,a){if(a.loose&&typeof i!="object"&&(i=a.wrapLists?zm.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return o.add(r,"error.expected_object"),i;const s={};Object.keys(i).forEach(l=>{e.validate(r,l,o,a),s[l]=t.validate(r.push(l),i[l],o,a)});for(const l of Object.getOwnPropertySymbols(i))s[l]=i[l];return s},validationOption(r){var i;return(i=n==null?void 0:n.validation)!==null&&i!==void 0?i:e.validationOption(r.push(""))},hook(r,i,...o){var a;return((a=r.map)!==null&&a!==void 0?a:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...o)}});Xs.MapNode=jm;var mh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=P,n=Pn,r=ar,i=a=>{var s,l,d;const c=a!=null&&a.color?!0:(s=a==null?void 0:a.integer)!==null&&s!==void 0?s:!1,u=a!=null&&a.color?0:(l=a==null?void 0:a.min)!==null&&l!==void 0?l:-1/0,f=a!=null&&a.color?16777215:(d=a==null?void 0:a.max)!==null&&d!==void 0?d:1/0,h=(a==null?void 0:a.min)!==void 0&&(a==null?void 0:a.max)!==void 0;return be(oe({},r.Base),{type:()=>"number",default:()=>u>0?u:0,validate(w,_,g,m){return m.loose&&typeof _!="number"&&(_=m.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof _!="number"?g.add(w,"error.expected_number"):c&&!Number.isInteger(_)?g.add(w,"error.expected_integer"):h&&(_<u||_>f)?g.add(w,"error.invalid_number_range.between",_,u,f):_<u?g.add(w,"error.invalid_number_range.smaller",_,u):_>f&&g.add(w,"error.invalid_number_range.larger",_,f),_},hook(w,_,...g){var m;return((m=w.number)!==null&&m!==void 0?m:w.base).call(w,{node:this,integer:c,min:u,max:f,between:h,config:a!=null?a:{}},_,...g)}})};e.NumberNode=i;const o=({integer:a,values:s})=>(0,t.Mod)((0,e.NumberNode)({integer:a}),l=>({validate:(d,c,u,f)=>(c=l.validate(d,c,u,f),s.includes(c)||u.add(d,"error.invalid_number_enum",s.join(", ")),c)}));e.NumberEnum=o})(mh);var _h={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=ar,n=Ln,r=eo,i=On,o=Pn;e.Switch=Symbol("switch"),e.Case=Symbol("case");const a=(s,l)=>{var w,_;const g=s,{[w=e.Switch]:d,[_=e.Case]:c}=g,u=l0(g,[yl(w),yl(_)]),f=m=>{if(d===void 0)return u;const v=(0,n.relativePath)(m,d).get(),x=c[v];return oe(oe({},u),x)},h=(m,v)=>{var x;const b=d?(0,n.relativePath)(m,d).get():void 0,y=d?(x=c[b])!==null&&x!==void 0?x:{}:{},k=Object.keys(y),C=l!=null&&l.context?new n.ModelPath(m.getModel(),new n.Path(m.getArray(),[l.context])):m;return(!(l!=null&&l.disableSwitchContext)&&b&&k.includes(v)?C.contextPush(b):C).push(v)};return be(oe({},t.Base),{type:()=>"object",category:()=>l==null?void 0:l.category,default:()=>({}),keep(){return this.optional()},navigate(m,v){const x=v+1,b=m.getArray();if(b.length<=x)return this;const k=f(m.slice(0,x))[b[x]];return k==null?void 0:k.navigate(m,x)},pathPush(m,v){return h(m,v.toString())},suggest(m,v){const x=f(m),b=Object.keys(typeof v=="object"?v:{});return Object.keys(x).filter(y=>x[y].enabled(m)).filter(y=>!b.includes(y)).map(i.quoteString)},validate(m,v,x,b){if(b.loose&&typeof v!="object"&&(v=b.wrapLists?o.DataModel.wrapLists(this.default()):this.default()),typeof v!="object"||v===null)return x.add(m,"error.expected_object"),v;let y=u;if(d){const S=(0,n.relativePath)(m,d);let T=S.get();if(m.equals(S.pop())){const z=S.last();T=u[z].validate(m.push(z),v[z],new r.Errors,b)}y=oe(oe({},y),c[T])}const k=Object.keys(y),C=k.filter(S=>!y[S].optional()),E=new Set([...C,...Object.keys(v)]),M={};E.forEach(S=>{if(k.includes(S)){if(!y[S].enabled(m))return;const T=y[S].validate(m.push(S),v[S],x,b);!y[S].keep()&&y[S].optional()&&(T===void 0||Array.isArray(T)&&T.length===0||T.constructor===Object&&Object.keys(T).length===0)?delete M[S]:(M[S]=T,m.getModel().set(m.push(S),T,!0))}else M[S]=v[S]});for(const S of Object.getOwnPropertySymbols(v))M[S]=v[S];return M},hook(m,v,...x){var b;return((b=m.object)!==null&&b!==void 0?b:m.base).call(m,{node:this,fields:u,config:l!=null?l:{},filter:d,cases:c,getActiveFields:f,getChildModelPath:h},v,...x)}})};e.ObjectNode=a})(_h);var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.Reference=void 0;const Vm=(e,t)=>({type(n){return e.get(t).type.bind(this)(n)},category(n){return e.get(t).category.bind(this)(n)},default(){return e.get(t).default.bind(this)()},transform(n,r){return e.get(t).transform(n,r)},enabled(n){return e.get(t).enabled.bind(this)(n)},keep(){return e.get(t).keep.bind(this)()},optional(){return e.get(t).optional.bind(this)()},navigate(n,r){return e.get(t).navigate.bind(this)(n,r)},pathPush(n,r){return e.get(t).pathPush.bind(this)(n,r)},suggest(n,r){return e.get(t).suggest.bind(this)(n,r)},validate(n,r,i,o){return e.get(t).validate.bind(this)(n,r,i,o)},validationOption(n){return e.get(t).validationOption.bind(this)(n)},hook(n,r,...i){return e.get(t).hook.bind(this)(n,r,...i)},activeCase(n,r){return e.get(t).activeCase.bind(this)(n,r)},canUpdate(n,r){return e.get(t).canUpdate.bind(this)(n,r)},update(n,r){return e.get(t).update.bind(this)(n,r)}});Ks.Reference=Vm;var Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.StringNode=void 0;const Um=ar,Hm=On,Zm=Pn,k0=e=>!!(e!=null&&e.enum),C0=e=>!!(e!=null&&e.validator),Gm=(e,t)=>{const n=()=>{var r,i,o,a;if(k0(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(d=>`#${d}`))!==null&&i!==void 0?i:[];const s=t.params.pool.replace(/^\$/,""),l=(o=e==null?void 0:e.get(s))!==null&&o!==void 0?o:[];return[...t.params.allowTag?(a=e==null?void 0:e.get(`tag/${s}`).map(d=>`#${d}`))!==null&&a!==void 0?a:[]:[],...t.params.suffix?l.map(d=>d+t.params.suffix):l]}return t.params.pool}return[]};return be(oe({},Um.Base),{type:()=>"string",default:()=>"",validate(r,i,o,a){if(a.loose&&typeof i!="string"&&(i=(a.wrapLists?Zm.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return o.add(r,"error.expected_string"),i;if(C0(t)){if(t.validator==="resource"&&i.length>0&&!i.includes(":")&&(i=i.startsWith("#")?"#minecraft:"+i.slice(1):"minecraft:"+i),t.validator==="resource"&&typeof i=="string"){let l=i;if(i.startsWith("#")){if(typeof t.params.pool=="string"&&t.params.pool.startsWith("$tag/"))return o.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return o.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return o.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return o.add(r,"error.invalid_resource_location"),i;if(t.params.suffix&&!l.endsWith(t.params.suffix))return o.add(r,"error.expected_suffix",t.params.suffix),i}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&i.startsWith("#")||typeof i=="string"&&i.includes(":")&&!i.startsWith("minecraft:")||t.params.isDefinition||t.params.allowUnknown))return i}if(k0(t)&&t.additional)return i;const s=n();return s.length>0&&!s.includes(i)&&o.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(Hm.quoteString),validationOption(){return C0(t)?t:void 0},hook(r,i,...o){var a;return((a=r.string)!==null&&a!==void 0?a:r.base).call(r,{node:this,getValues:n,config:t},i,...o)}})};Js.StringNode=Gm;var wh={};Object.defineProperty(wh,"__esModule",{value:!0});var Zi={};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.CollectionRegistry=Zi.SchemaRegistry=void 0;class Ym{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}}Zi.SchemaRegistry=Ym;class Wm{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:[]}}Zi.CollectionRegistry=Wm;var vh={};Object.defineProperty(vh,"__esModule",{value:!0});(function(e){var t=ya&&ya.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,a,s)}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=ya&&ya.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Ln,e),n(eo,e),n(ar,e),n(qs,e),n(gh,e),n(aa,e),n(Xs,e),n(mh,e),n(_h,e),n(Ks,e),n(Js,e),n(sa,e),n(wh,e),n(Zi,e),n(vh,e)})(P);const Po=15,kc=30,Cc=19,qm=29,bs=256,gd=bs+1+qm,E0=2*gd+1,co=256,Xm=7,A0=16,S0=17,I0=18,El=8*2,xs=-1,Km=1,ka=2,Jm=0,xi=0,M0=1,Qm=3,Nt=4,cn=0,bh=1,Ca=2,hn=-2,e5=-3,ci=-5;function Qs(e){return el(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function el(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?el(n):n),[])}const T0=[0,1,2,3].concat(...Qs([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(i){const o=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,d=e.stat_desc.max_length;let c,u,f,h,w,_,g=0;for(h=0;h<=Po;h++)i.bl_count[h]=0;for(o[i.heap[i.heap_max]*2+1]=0,c=i.heap_max+1;c<E0;c++)u=i.heap[c],h=o[o[u*2+1]*2+1]+1,h>d&&(h=d,g++),o[u*2+1]=h,!(u>e.max_code)&&(i.bl_count[h]++,w=0,u>=l&&(w=s[u-l]),_=o[u*2],i.opt_len+=_*(h+w),a&&(i.static_len+=_*(a[u*2+1]+w)));if(g!==0){do{for(h=d-1;i.bl_count[h]===0;)h--;i.bl_count[h]--,i.bl_count[h+1]+=2,i.bl_count[d]--,g-=2}while(g>0);for(h=d;h!==0;h--)for(u=i.bl_count[h];u!==0;)f=i.heap[--c],!(f>e.max_code)&&(o[f*2+1]!=h&&(i.opt_len+=(h-o[f*2+1])*o[f*2],o[f*2+1]=h),u--)}}function n(i,o){let a=0;do a|=i&1,i>>>=1,a<<=1;while(--o>0);return a>>>1}function r(i,o,a){const s=[];let l=0,d,c,u;for(d=1;d<=Po;d++)s[d]=l=l+a[d-1]<<1;for(c=0;c<=o;c++)u=i[c*2+1],u!==0&&(i[c*2]=n(s[u]++,u))}e.build_tree=function(i){const o=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.elems;let l,d,c=-1,u;for(i.heap_len=0,i.heap_max=E0,l=0;l<s;l++)o[l*2]!==0?(i.heap[++i.heap_len]=c=l,i.depth[l]=0):o[l*2+1]=0;for(;i.heap_len<2;)u=i.heap[++i.heap_len]=c<2?++c:0,o[u*2]=1,i.depth[u]=0,i.opt_len--,a&&(i.static_len-=a[u*2+1]);for(e.max_code=c,l=Math.floor(i.heap_len/2);l>=1;l--)i.pqdownheap(o,l);u=s;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(o,1),d=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=d,o[u*2]=o[l*2]+o[d*2],i.depth[u]=Math.max(i.depth[l],i.depth[d])+1,o[l*2+1]=o[d*2+1]=u,i.heap[1]=u++,i.pqdownheap(o,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(o,e.max_code,i.bl_count)}}Ke._length_code=[0,1,2,3,4,5,6,7].concat(...Qs([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));Ke.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];Ke.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];Ke.d_code=function(e){return e<256?T0[e]:T0[256+(e>>>7)]};Ke.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];Ke.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];Ke.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];Ke.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function kt(e,t,n,r,i){const o=this;o.static_tree=e,o.extra_bits=t,o.extra_base=n,o.elems=r,o.max_length=i}const t5=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],n5=Qs([[144,8],[112,9],[24,7],[8,8]]);kt.static_ltree=el(t5.map((e,t)=>[e,n5[t]]));const r5=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],i5=Qs([[30,5]]);kt.static_dtree=el(r5.map((e,t)=>[e,i5[t]]));kt.static_l_desc=new kt(kt.static_ltree,Ke.extra_lbits,bs+1,gd,Po);kt.static_d_desc=new kt(kt.static_dtree,Ke.extra_dbits,0,kc,Po);kt.static_bl_desc=new kt(null,Ke.extra_blbits,0,Cc,Xm);const o5=9,a5=8;function kn(e,t,n,r,i){const o=this;o.good_length=e,o.max_lazy=t,o.nice_length=n,o.max_chain=r,o.func=i}const xh=0,Ga=1,Rr=2,ln=[new kn(0,0,0,0,xh),new kn(4,4,8,4,Ga),new kn(4,5,16,8,Ga),new kn(4,6,32,32,Ga),new kn(4,4,16,16,Rr),new kn(8,16,32,32,Rr),new kn(8,16,128,128,Rr),new kn(8,32,128,256,Rr),new kn(32,128,258,1024,Rr),new kn(32,258,258,4096,Rr)],Ea=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xt=0,Aa=1,uo=2,Sa=3,s5=32,Al=42,Ia=113,fo=666,Sl=8,l5=0,Il=1,c5=2,tt=3,Ya=258,jt=Ya+tt+1;function L0(e,t,n,r){const i=e[t*2],o=e[n*2];return i<o||i==o&&r[t]<=r[n]}function d5(){const e=this;let t,n,r,i,o,a,s,l,d,c,u,f,h,w,_,g,m,v,x,b,y,k,C,E,M,S,T,z,F,R,V,L,j;const Z=new Ke,Q=new Ke,D=new Ke;e.depth=[];let A,O,$,X,ie,B;e.bl_count=[],e.heap=[],V=[],L=[],j=[];function K(){d=2*o,u[h-1]=0;for(let U=0;U<h-1;U++)u[U]=0;S=ln[T].max_lazy,F=ln[T].good_length,R=ln[T].nice_length,M=ln[T].max_chain,y=0,m=0,C=0,v=E=tt-1,b=0,f=0}function de(){let U;for(U=0;U<gd;U++)V[U*2]=0;for(U=0;U<kc;U++)L[U*2]=0;for(U=0;U<Cc;U++)j[U*2]=0;V[co*2]=1,e.opt_len=e.static_len=0,O=$=0}function he(){Z.dyn_tree=V,Z.stat_desc=kt.static_l_desc,Q.dyn_tree=L,Q.stat_desc=kt.static_d_desc,D.dyn_tree=j,D.stat_desc=kt.static_bl_desc,ie=0,B=0,X=8,de()}e.pqdownheap=function(U,G){const H=e.heap,W=H[G];let te=G<<1;for(;te<=e.heap_len&&(te<e.heap_len&&L0(U,H[te+1],H[te],e.depth)&&te++,!L0(U,W,H[te],e.depth));)H[G]=H[te],G=te,te<<=1;H[G]=W};function De(U,G){let H=-1,W,te=U[0*2+1],pe=0,J=7,ke=4;te===0&&(J=138,ke=3),U[(G+1)*2+1]=65535;for(let ot=0;ot<=G;ot++)W=te,te=U[(ot+1)*2+1],!(++pe<J&&W==te)&&(pe<ke?j[W*2]+=pe:W!==0?(W!=H&&j[W*2]++,j[A0*2]++):pe<=10?j[S0*2]++:j[I0*2]++,pe=0,H=W,te===0?(J=138,ke=3):W==te?(J=6,ke=3):(J=7,ke=4))}function Ie(){let U;for(De(V,Z.max_code),De(L,Q.max_code),D.build_tree(e),U=Cc-1;U>=3&&j[Ke.bl_order[U]*2+1]===0;U--);return e.opt_len+=3*(U+1)+5+5+4,U}function Ze(U){e.pending_buf[e.pending++]=U}function nt(U){Ze(U&255),Ze(U>>>8&255)}function Se(U){Ze(U>>8&255),Ze(U&255&255)}function Te(U,G){let H;const W=G;B>El-W?(H=U,ie|=H<<B&65535,nt(ie),ie=H>>>El-B,B+=W-El):(ie|=U<<B&65535,B+=W)}function Le(U,G){const H=U*2;Te(G[H]&65535,G[H+1]&65535)}function se(U,G){let H,W=-1,te,pe=U[0*2+1],J=0,ke=7,ot=4;for(pe===0&&(ke=138,ot=3),H=0;H<=G;H++)if(te=pe,pe=U[(H+1)*2+1],!(++J<ke&&te==pe)){if(J<ot)do Le(te,j);while(--J!==0);else te!==0?(te!=W&&(Le(te,j),J--),Le(A0,j),Te(J-3,2)):J<=10?(Le(S0,j),Te(J-3,3)):(Le(I0,j),Te(J-11,7));J=0,W=te,pe===0?(ke=138,ot=3):te==pe?(ke=6,ot=3):(ke=7,ot=4)}}function xn(U,G,H){let W;for(Te(U-257,5),Te(G-1,5),Te(H-4,4),W=0;W<H;W++)Te(j[Ke.bl_order[W]*2+1],3);se(V,U-1),se(L,G-1)}function Ge(){B==16?(nt(ie),ie=0,B=0):B>=8&&(Ze(ie&255),ie>>>=8,B-=8)}function Be(){Te(Il<<1,3),Le(co,kt.static_ltree),Ge(),1+X+10-B<9&&(Te(Il<<1,3),Le(co,kt.static_ltree),Ge()),X=7}function Qe(U,G){let H,W,te;if(e.dist_buf[O]=U,e.lc_buf[O]=G&255,O++,U===0?V[G*2]++:($++,U--,V[(Ke._length_code[G]+bs+1)*2]++,L[Ke.d_code(U)*2]++),(O&8191)===0&&T>2){for(H=O*8,W=y-m,te=0;te<kc;te++)H+=L[te*2]*(5+Ke.extra_dbits[te]);if(H>>>=3,$<Math.floor(O/2)&&H<Math.floor(W/2))return!0}return O==A-1}function vt(U,G){let H,W,te=0,pe,J;if(O!==0)do H=e.dist_buf[te],W=e.lc_buf[te],te++,H===0?Le(W,U):(pe=Ke._length_code[W],Le(pe+bs+1,U),J=Ke.extra_lbits[pe],J!==0&&(W-=Ke.base_length[pe],Te(W,J)),H--,pe=Ke.d_code(H),Le(pe,G),J=Ke.extra_dbits[pe],J!==0&&(H-=Ke.base_dist[pe],Te(H,J)));while(te<O);Le(co,U),X=U[co*2+1]}function yn(){B>8?nt(ie):B>0&&Ze(ie&255),ie=0,B=0}function zn(U,G,H){yn(),X=8,H&&(nt(G),nt(~G)),e.pending_buf.set(l.subarray(U,U+G),e.pending),e.pending+=G}function ee(U,G,H){Te((l5<<1)+(H?1:0),3),zn(U,G,!0)}function ne(U,G,H){let W,te,pe=0;T>0?(Z.build_tree(e),Q.build_tree(e),pe=Ie(),W=e.opt_len+3+7>>>3,te=e.static_len+3+7>>>3,te<=W&&(W=te)):W=te=G+5,G+4<=W&&U!=-1?ee(U,G,H):te==W?(Te((Il<<1)+(H?1:0),3),vt(kt.static_ltree,kt.static_dtree)):(Te((c5<<1)+(H?1:0),3),xn(Z.max_code+1,Q.max_code+1,pe+1),vt(V,L)),de(),H&&yn()}function _e(U){ne(m>=0?m:-1,y-m,U),m=y,t.flush_pending()}function Oe(){let U,G,H,W;do{if(W=d-C-y,W===0&&y===0&&C===0)W=o;else if(W==-1)W--;else if(y>=o+o-jt){l.set(l.subarray(o,o+o),0),k-=o,y-=o,m-=o,U=h,H=U;do G=u[--H]&65535,u[H]=G>=o?G-o:0;while(--U!==0);U=o,H=U;do G=c[--H]&65535,c[H]=G>=o?G-o:0;while(--U!==0);W+=o}if(t.avail_in===0)return;U=t.read_buf(l,y+C,W),C+=U,C>=tt&&(f=l[y]&255,f=(f<<g^l[y+1]&255)&_)}while(C<jt&&t.avail_in!==0)}function at(U){let G=65535,H;for(G>r-5&&(G=r-5);;){if(C<=1){if(Oe(),C===0&&U==xi)return Xt;if(C===0)break}if(y+=C,C=0,H=m+G,(y===0||y>=H)&&(C=y-H,y=H,_e(!1),t.avail_out===0)||y-m>=o-jt&&(_e(!1),t.avail_out===0))return Xt}return _e(U==Nt),t.avail_out===0?U==Nt?uo:Xt:U==Nt?Sa:Aa}function Mt(U){let G=M,H=y,W,te,pe=E;const J=y>o-jt?y-(o-jt):0;let ke=R;const ot=s,ut=y+Ya;let bt=l[H+pe-1],sn=l[H+pe];E>=F&&(G>>=2),ke>C&&(ke=C);do if(W=U,!(l[W+pe]!=sn||l[W+pe-1]!=bt||l[W]!=l[H]||l[++W]!=l[H+1])){H+=2,W++;do;while(l[++H]==l[++W]&&l[++H]==l[++W]&&l[++H]==l[++W]&&l[++H]==l[++W]&&l[++H]==l[++W]&&l[++H]==l[++W]&&l[++H]==l[++W]&&l[++H]==l[++W]&&H<ut);if(te=Ya-(ut-H),H=ut-Ya,te>pe){if(k=U,pe=te,te>=ke)break;bt=l[H+pe-1],sn=l[H+pe]}}while((U=c[U&ot]&65535)>J&&--G!==0);return pe<=C?pe:C}function lo(U){let G=0,H;for(;;){if(C<jt){if(Oe(),C<jt&&U==xi)return Xt;if(C===0)break}if(C>=tt&&(f=(f<<g^l[y+(tt-1)]&255)&_,G=u[f]&65535,c[y&s]=u[f],u[f]=y),G!==0&&(y-G&65535)<=o-jt&&z!=ka&&(v=Mt(G)),v>=tt)if(H=Qe(y-k,v-tt),C-=v,v<=S&&C>=tt){v--;do y++,f=(f<<g^l[y+(tt-1)]&255)&_,G=u[f]&65535,c[y&s]=u[f],u[f]=y;while(--v!==0);y++}else y+=v,v=0,f=l[y]&255,f=(f<<g^l[y+1]&255)&_;else H=Qe(0,l[y]&255),C--,y++;if(H&&(_e(!1),t.avail_out===0))return Xt}return _e(U==Nt),t.avail_out===0?U==Nt?uo:Xt:U==Nt?Sa:Aa}function li(U){let G=0,H,W;for(;;){if(C<jt){if(Oe(),C<jt&&U==xi)return Xt;if(C===0)break}if(C>=tt&&(f=(f<<g^l[y+(tt-1)]&255)&_,G=u[f]&65535,c[y&s]=u[f],u[f]=y),E=v,x=k,v=tt-1,G!==0&&E<S&&(y-G&65535)<=o-jt&&(z!=ka&&(v=Mt(G)),v<=5&&(z==Km||v==tt&&y-k>4096)&&(v=tt-1)),E>=tt&&v<=E){W=y+C-tt,H=Qe(y-1-x,E-tt),C-=E-1,E-=2;do++y<=W&&(f=(f<<g^l[y+(tt-1)]&255)&_,G=u[f]&65535,c[y&s]=u[f],u[f]=y);while(--E!==0);if(b=0,v=tt-1,y++,H&&(_e(!1),t.avail_out===0))return Xt}else if(b!==0){if(H=Qe(0,l[y-1]&255),H&&_e(!1),y++,C--,t.avail_out===0)return Xt}else b=1,y++,C--}return b!==0&&(H=Qe(0,l[y-1]&255),b=0),_e(U==Nt),t.avail_out===0?U==Nt?uo:Xt:U==Nt?Sa:Aa}function ba(U){return U.total_in=U.total_out=0,U.msg=null,e.pending=0,e.pending_out=0,n=Ia,i=xi,he(),K(),cn}e.deflateInit=function(U,G,H,W,te,pe){return W||(W=Sl),te||(te=a5),pe||(pe=Jm),U.msg=null,G==xs&&(G=6),te<1||te>o5||W!=Sl||H<9||H>15||G<0||G>9||pe<0||pe>ka?hn:(U.dstate=e,a=H,o=1<<a,s=o-1,w=te+7,h=1<<w,_=h-1,g=Math.floor((w+tt-1)/tt),l=new Uint8Array(o*2),c=[],u=[],A=1<<te+6,e.pending_buf=new Uint8Array(A*4),r=A*4,e.dist_buf=new Uint16Array(A),e.lc_buf=new Uint8Array(A),T=G,z=pe,ba(U))},e.deflateEnd=function(){return n!=Al&&n!=Ia&&n!=fo?hn:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,u=null,c=null,l=null,e.dstate=null,n==Ia?e5:cn)},e.deflateParams=function(U,G,H){let W=cn;return G==xs&&(G=6),G<0||G>9||H<0||H>ka?hn:(ln[T].func!=ln[G].func&&U.total_in!==0&&(W=U.deflate(M0)),T!=G&&(T=G,S=ln[T].max_lazy,F=ln[T].good_length,R=ln[T].nice_length,M=ln[T].max_chain),z=H,W)},e.deflateSetDictionary=function(U,G,H){let W=H,te,pe=0;if(!G||n!=Al)return hn;if(W<tt)return cn;for(W>o-jt&&(W=o-jt,pe=H-W),l.set(G.subarray(pe,pe+W),0),y=W,m=W,f=l[0]&255,f=(f<<g^l[1]&255)&_,te=0;te<=W-tt;te++)f=(f<<g^l[te+(tt-1)]&255)&_,c[te&s]=u[f],u[f]=te;return cn},e.deflate=function(U,G){let H,W,te,pe,J;if(G>Nt||G<0)return hn;if(!U.next_out||!U.next_in&&U.avail_in!==0||n==fo&&G!=Nt)return U.msg=Ea[Ca-hn],hn;if(U.avail_out===0)return U.msg=Ea[Ca-ci],ci;if(t=U,pe=i,i=G,n==Al&&(W=Sl+(a-8<<4)<<8,te=(T-1&255)>>1,te>3&&(te=3),W|=te<<6,y!==0&&(W|=s5),W+=31-W%31,n=Ia,Se(W)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,cn}else if(t.avail_in===0&&G<=pe&&G!=Nt)return t.msg=Ea[Ca-ci],ci;if(n==fo&&t.avail_in!==0)return U.msg=Ea[Ca-ci],ci;if(t.avail_in!==0||C!==0||G!=xi&&n!=fo){switch(J=-1,ln[T].func){case xh:J=at(G);break;case Ga:J=lo(G);break;case Rr:J=li(G);break}if((J==uo||J==Sa)&&(n=fo),J==Xt||J==uo)return t.avail_out===0&&(i=-1),cn;if(J==Aa){if(G==M0)Be();else if(ee(0,0,!1),G==Qm)for(H=0;H<h;H++)u[H]=0;if(t.flush_pending(),t.avail_out===0)return i=-1,cn}}return G!=Nt?cn:bh}}function yh(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}yh.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new d5,t||(t=Po),n.dstate.deflateInit(n,e,t)},deflate:function(e){const t=this;return t.dstate?t.dstate.deflate(t,e):hn},deflateEnd:function(){const e=this;if(!e.dstate)return hn;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams:function(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):hn},deflateSetDictionary:function(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):hn},read_buf:function(e,t,n){const r=this;let i=r.avail_in;return i>n&&(i=n),i===0?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending:function(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function u5(e){const t=this,n=new yh,r=f5(e&&e.chunkSize?e.chunkSize:64*1024),i=xi,o=new Uint8Array(r);let a=e?e.level:xs;typeof a=="undefined"&&(a=xs),n.deflateInit(a),n.next_out=o,t.append=function(s,l){let d,c,u=0,f=0,h=0;const w=[];if(!!s.length){n.next_in_index=0,n.next_in=s,n.avail_in=s.length;do{if(n.next_out_index=0,n.avail_out=r,d=n.deflate(i),d!=cn)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?w.push(new Uint8Array(o)):w.push(o.slice(0,n.next_out_index))),h+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=u&&(l(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return w.length>1?(c=new Uint8Array(h),w.forEach(function(_){c.set(_,f),f+=_.length})):c=w[0]||new Uint8Array(0),c}},t.flush=function(){let s,l,d=0,c=0;const u=[];do{if(n.next_out_index=0,n.avail_out=r,s=n.deflate(Nt),s!=bh&&s!=cn)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&u.push(o.slice(0,n.next_out_index)),c+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(c),u.forEach(function(f){l.set(f,d),d+=f.length}),l}}function f5(e){return e+5*(Math.floor(e/16383)+1)}const h5=15,$e=0,Jn=1,p5=2,Dt=-2,Je=-3,O0=-4,Qn=-5,Vt=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],kh=1440,g5=0,m5=4,_5=9,w5=5,v5=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],b5=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],x5=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],y5=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],k5=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],C5=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],sr=15;function Ec(){const e=this;let t,n,r,i,o,a;function s(d,c,u,f,h,w,_,g,m,v,x){let b,y,k,C,E,M,S,T,z,F,R,V,L,j,Z;F=0,E=u;do r[d[c+F]]++,F++,E--;while(E!==0);if(r[0]==u)return _[0]=-1,g[0]=0,$e;for(T=g[0],M=1;M<=sr&&r[M]===0;M++);for(S=M,T<M&&(T=M),E=sr;E!==0&&r[E]===0;E--);for(k=E,T>E&&(T=E),g[0]=T,j=1<<M;M<E;M++,j<<=1)if((j-=r[M])<0)return Je;if((j-=r[E])<0)return Je;for(r[E]+=j,a[1]=M=0,F=1,L=2;--E!==0;)a[L]=M+=r[F],L++,F++;E=0,F=0;do(M=d[c+F])!==0&&(x[a[M]++]=E),F++;while(++E<u);for(u=a[k],a[0]=E=0,F=0,C=-1,V=-T,o[0]=0,R=0,Z=0;S<=k;S++)for(b=r[S];b--!==0;){for(;S>V+T;){if(C++,V+=T,Z=k-V,Z=Z>T?T:Z,(y=1<<(M=S-V))>b+1&&(y-=b+1,L=S,M<Z))for(;++M<Z&&!((y<<=1)<=r[++L]);)y-=r[L];if(Z=1<<M,v[0]+Z>kh)return Je;o[C]=R=v[0],v[0]+=Z,C!==0?(a[C]=E,i[0]=M,i[1]=T,M=E>>>V-T,i[2]=R-o[C-1]-M,m.set(i,(o[C-1]+M)*3)):_[0]=R}for(i[1]=S-V,F>=u?i[0]=128+64:x[F]<f?(i[0]=x[F]<256?0:32+64,i[2]=x[F++]):(i[0]=w[x[F]-f]+16+64,i[2]=h[x[F++]-f]),y=1<<S-V,M=E>>>V;M<Z;M+=y)m.set(i,(R+M)*3);for(M=1<<S-1;(E&M)!==0;M>>>=1)E^=M;for(E^=M,z=(1<<V)-1;(E&z)!=a[C];)C--,V-=T,z=(1<<V)-1}return j!==0&&k!=1?Qn:$e}function l(d){let c;for(t||(t=[],n=[],r=new Int32Array(sr+1),i=[],o=new Int32Array(sr),a=new Int32Array(sr+1)),n.length<d&&(n=[]),c=0;c<d;c++)n[c]=0;for(c=0;c<sr+1;c++)r[c]=0;for(c=0;c<3;c++)i[c]=0;o.set(r.subarray(0,sr),0),a.set(r.subarray(0,sr+1),0)}e.inflate_trees_bits=function(d,c,u,f,h){let w;return l(19),t[0]=0,w=s(d,0,19,19,null,null,u,c,f,t,n),w==Je?h.msg="oversubscribed dynamic bit lengths tree":(w==Qn||c[0]===0)&&(h.msg="incomplete dynamic bit lengths tree",w=Je),w},e.inflate_trees_dynamic=function(d,c,u,f,h,w,_,g,m){let v;return l(288),t[0]=0,v=s(u,0,d,257,x5,y5,w,f,g,t,n),v!=$e||f[0]===0?(v==Je?m.msg="oversubscribed literal/length tree":v!=O0&&(m.msg="incomplete literal/length tree",v=Je),v):(l(288),v=s(u,d,c,0,k5,C5,_,h,g,t,n),v!=$e||h[0]===0&&d>257?(v==Je?m.msg="oversubscribed distance tree":v==Qn?(m.msg="incomplete distance tree",v=Je):v!=O0&&(m.msg="empty distance tree with lengths",v=Je),v):$e)}}Ec.inflate_trees_fixed=function(e,t,n,r){return e[0]=_5,t[0]=w5,n[0]=v5,r[0]=b5,$e};const Ma=0,N0=1,R0=2,D0=3,F0=4,P0=5,$0=6,Ml=7,B0=8,Ta=9;function E5(){const e=this;let t,n=0,r,i=0,o=0,a=0,s=0,l=0,d=0,c=0,u,f=0,h,w=0;function _(g,m,v,x,b,y,k,C){let E,M,S,T,z,F,R,V,L,j,Z,Q,D,A,O,$;R=C.next_in_index,V=C.avail_in,z=k.bitb,F=k.bitk,L=k.write,j=L<k.read?k.read-L-1:k.end-L,Z=Vt[g],Q=Vt[m];do{for(;F<20;)V--,z|=(C.read_byte(R++)&255)<<F,F+=8;if(E=z&Z,M=v,S=x,$=(S+E)*3,(T=M[$])===0){z>>=M[$+1],F-=M[$+1],k.win[L++]=M[$+2],j--;continue}do{if(z>>=M[$+1],F-=M[$+1],(T&16)!==0){for(T&=15,D=M[$+2]+(z&Vt[T]),z>>=T,F-=T;F<15;)V--,z|=(C.read_byte(R++)&255)<<F,F+=8;E=z&Q,M=b,S=y,$=(S+E)*3,T=M[$];do if(z>>=M[$+1],F-=M[$+1],(T&16)!==0){for(T&=15;F<T;)V--,z|=(C.read_byte(R++)&255)<<F,F+=8;if(A=M[$+2]+(z&Vt[T]),z>>=T,F-=T,j-=D,L>=A)O=L-A,L-O>0&&2>L-O?(k.win[L++]=k.win[O++],k.win[L++]=k.win[O++],D-=2):(k.win.set(k.win.subarray(O,O+2),L),L+=2,O+=2,D-=2);else{O=L-A;do O+=k.end;while(O<0);if(T=k.end-O,D>T){if(D-=T,L-O>0&&T>L-O)do k.win[L++]=k.win[O++];while(--T!==0);else k.win.set(k.win.subarray(O,O+T),L),L+=T,O+=T,T=0;O=0}}if(L-O>0&&D>L-O)do k.win[L++]=k.win[O++];while(--D!==0);else k.win.set(k.win.subarray(O,O+D),L),L+=D,O+=D,D=0;break}else if((T&64)===0)E+=M[$+2],E+=z&Vt[T],$=(S+E)*3,T=M[$];else return C.msg="invalid distance code",D=C.avail_in-V,D=F>>3<D?F>>3:D,V+=D,R-=D,F-=D<<3,k.bitb=z,k.bitk=F,C.avail_in=V,C.total_in+=R-C.next_in_index,C.next_in_index=R,k.write=L,Je;while(!0);break}if((T&64)===0){if(E+=M[$+2],E+=z&Vt[T],$=(S+E)*3,(T=M[$])===0){z>>=M[$+1],F-=M[$+1],k.win[L++]=M[$+2],j--;break}}else return(T&32)!==0?(D=C.avail_in-V,D=F>>3<D?F>>3:D,V+=D,R-=D,F-=D<<3,k.bitb=z,k.bitk=F,C.avail_in=V,C.total_in+=R-C.next_in_index,C.next_in_index=R,k.write=L,Jn):(C.msg="invalid literal/length code",D=C.avail_in-V,D=F>>3<D?F>>3:D,V+=D,R-=D,F-=D<<3,k.bitb=z,k.bitk=F,C.avail_in=V,C.total_in+=R-C.next_in_index,C.next_in_index=R,k.write=L,Je)}while(!0)}while(j>=258&&V>=10);return D=C.avail_in-V,D=F>>3<D?F>>3:D,V+=D,R-=D,F-=D<<3,k.bitb=z,k.bitk=F,C.avail_in=V,C.total_in+=R-C.next_in_index,C.next_in_index=R,k.write=L,$e}e.init=function(g,m,v,x,b,y){t=Ma,d=g,c=m,u=v,f=x,h=b,w=y,r=null},e.proc=function(g,m,v){let x,b,y,k=0,C=0,E=0,M,S,T,z;for(E=m.next_in_index,M=m.avail_in,k=g.bitb,C=g.bitk,S=g.write,T=S<g.read?g.read-S-1:g.end-S;;)switch(t){case Ma:if(T>=258&&M>=10&&(g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,v=_(d,c,u,f,h,w,g,m),E=m.next_in_index,M=m.avail_in,k=g.bitb,C=g.bitk,S=g.write,T=S<g.read?g.read-S-1:g.end-S,v!=$e)){t=v==Jn?Ml:Ta;break}o=d,r=u,i=f,t=N0;case N0:for(x=o;C<x;){if(M!==0)v=$e;else return g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);M--,k|=(m.read_byte(E++)&255)<<C,C+=8}if(b=(i+(k&Vt[x]))*3,k>>>=r[b+1],C-=r[b+1],y=r[b],y===0){a=r[b+2],t=$0;break}if((y&16)!==0){s=y&15,n=r[b+2],t=R0;break}if((y&64)===0){o=y,i=b/3+r[b+2];break}if((y&32)!==0){t=Ml;break}return t=Ta,m.msg="invalid literal/length code",v=Je,g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);case R0:for(x=s;C<x;){if(M!==0)v=$e;else return g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);M--,k|=(m.read_byte(E++)&255)<<C,C+=8}n+=k&Vt[x],k>>=x,C-=x,o=c,r=h,i=w,t=D0;case D0:for(x=o;C<x;){if(M!==0)v=$e;else return g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);M--,k|=(m.read_byte(E++)&255)<<C,C+=8}if(b=(i+(k&Vt[x]))*3,k>>=r[b+1],C-=r[b+1],y=r[b],(y&16)!==0){s=y&15,l=r[b+2],t=F0;break}if((y&64)===0){o=y,i=b/3+r[b+2];break}return t=Ta,m.msg="invalid distance code",v=Je,g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);case F0:for(x=s;C<x;){if(M!==0)v=$e;else return g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);M--,k|=(m.read_byte(E++)&255)<<C,C+=8}l+=k&Vt[x],k>>=x,C-=x,t=P0;case P0:for(z=S-l;z<0;)z+=g.end;for(;n!==0;){if(T===0&&(S==g.end&&g.read!==0&&(S=0,T=S<g.read?g.read-S-1:g.end-S),T===0&&(g.write=S,v=g.inflate_flush(m,v),S=g.write,T=S<g.read?g.read-S-1:g.end-S,S==g.end&&g.read!==0&&(S=0,T=S<g.read?g.read-S-1:g.end-S),T===0)))return g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);g.win[S++]=g.win[z++],T--,z==g.end&&(z=0),n--}t=Ma;break;case $0:if(T===0&&(S==g.end&&g.read!==0&&(S=0,T=S<g.read?g.read-S-1:g.end-S),T===0&&(g.write=S,v=g.inflate_flush(m,v),S=g.write,T=S<g.read?g.read-S-1:g.end-S,S==g.end&&g.read!==0&&(S=0,T=S<g.read?g.read-S-1:g.end-S),T===0)))return g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);v=$e,g.win[S++]=a,T--,t=Ma;break;case Ml:if(C>7&&(C-=8,M++,E--),g.write=S,v=g.inflate_flush(m,v),S=g.write,T=S<g.read?g.read-S-1:g.end-S,g.read!=g.write)return g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);t=B0;case B0:return v=Jn,g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);case Ta:return v=Je,g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v);default:return v=Dt,g.bitb=k,g.bitk=C,m.avail_in=M,m.total_in+=E-m.next_in_index,m.next_in_index=E,g.write=S,g.inflate_flush(m,v)}},e.free=function(){}}const z0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],di=0,Tl=1,j0=2,V0=3,U0=4,H0=5,La=6,Oa=7,Z0=8,Tr=9;function A5(e,t){const n=this;let r=di,i=0,o=0,a=0,s;const l=[0],d=[0],c=new E5;let u=0,f=new Int32Array(kh*3);const h=0,w=new Ec;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(_,g){g&&(g[0]=h),r==La&&c.free(_),r=di,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(_,g){let m,v,x;return v=_.next_out_index,x=n.read,m=(x<=n.write?n.write:n.end)-x,m>_.avail_out&&(m=_.avail_out),m!==0&&g==Qn&&(g=$e),_.avail_out-=m,_.total_out+=m,_.next_out.set(n.win.subarray(x,x+m),v),v+=m,x+=m,x==n.end&&(x=0,n.write==n.end&&(n.write=0),m=n.write-x,m>_.avail_out&&(m=_.avail_out),m!==0&&g==Qn&&(g=$e),_.avail_out-=m,_.total_out+=m,_.next_out.set(n.win.subarray(x,x+m),v),v+=m,x+=m),_.next_out_index=v,n.read=x,g},n.proc=function(_,g){let m,v,x,b,y,k,C,E;for(b=_.next_in_index,y=_.avail_in,v=n.bitb,x=n.bitk,k=n.write,C=k<n.read?n.read-k-1:n.end-k;;){let M,S,T,z,F,R,V,L;switch(r){case di:for(;x<3;){if(y!==0)g=$e;else return n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);y--,v|=(_.read_byte(b++)&255)<<x,x+=8}switch(m=v&7,u=m&1,m>>>1){case 0:v>>>=3,x-=3,m=x&7,v>>>=m,x-=m,r=Tl;break;case 1:M=[],S=[],T=[[]],z=[[]],Ec.inflate_trees_fixed(M,S,T,z),c.init(M[0],S[0],T[0],0,z[0],0),v>>>=3,x-=3,r=La;break;case 2:v>>>=3,x-=3,r=V0;break;case 3:return v>>>=3,x-=3,r=Tr,_.msg="invalid block type",g=Je,n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g)}break;case Tl:for(;x<32;){if(y!==0)g=$e;else return n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);y--,v|=(_.read_byte(b++)&255)<<x,x+=8}if((~v>>>16&65535)!=(v&65535))return r=Tr,_.msg="invalid stored block lengths",g=Je,n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);i=v&65535,v=x=0,r=i!==0?j0:u!==0?Oa:di;break;case j0:if(y===0||C===0&&(k==n.end&&n.read!==0&&(k=0,C=k<n.read?n.read-k-1:n.end-k),C===0&&(n.write=k,g=n.inflate_flush(_,g),k=n.write,C=k<n.read?n.read-k-1:n.end-k,k==n.end&&n.read!==0&&(k=0,C=k<n.read?n.read-k-1:n.end-k),C===0)))return n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);if(g=$e,m=i,m>y&&(m=y),m>C&&(m=C),n.win.set(_.read_buf(b,m),k),b+=m,y-=m,k+=m,C-=m,(i-=m)!==0)break;r=u!==0?Oa:di;break;case V0:for(;x<14;){if(y!==0)g=$e;else return n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);y--,v|=(_.read_byte(b++)&255)<<x,x+=8}if(o=m=v&16383,(m&31)>29||(m>>5&31)>29)return r=Tr,_.msg="too many length or distance symbols",g=Je,n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);if(m=258+(m&31)+(m>>5&31),!s||s.length<m)s=[];else for(E=0;E<m;E++)s[E]=0;v>>>=14,x-=14,a=0,r=U0;case U0:for(;a<4+(o>>>10);){for(;x<3;){if(y!==0)g=$e;else return n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);y--,v|=(_.read_byte(b++)&255)<<x,x+=8}s[z0[a++]]=v&7,v>>>=3,x-=3}for(;a<19;)s[z0[a++]]=0;if(l[0]=7,m=w.inflate_trees_bits(s,l,d,f,_),m!=$e)return g=m,g==Je&&(s=null,r=Tr),n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);a=0,r=H0;case H0:for(;m=o,!(a>=258+(m&31)+(m>>5&31));){let j,Z;for(m=l[0];x<m;){if(y!==0)g=$e;else return n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);y--,v|=(_.read_byte(b++)&255)<<x,x+=8}if(m=f[(d[0]+(v&Vt[m]))*3+1],Z=f[(d[0]+(v&Vt[m]))*3+2],Z<16)v>>>=m,x-=m,s[a++]=Z;else{for(E=Z==18?7:Z-14,j=Z==18?11:3;x<m+E;){if(y!==0)g=$e;else return n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);y--,v|=(_.read_byte(b++)&255)<<x,x+=8}if(v>>>=m,x-=m,j+=v&Vt[E],v>>>=E,x-=E,E=a,m=o,E+j>258+(m&31)+(m>>5&31)||Z==16&&E<1)return s=null,r=Tr,_.msg="invalid bit length repeat",g=Je,n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);Z=Z==16?s[E-1]:0;do s[E++]=Z;while(--j!==0);a=E}}if(d[0]=-1,F=[],R=[],V=[],L=[],F[0]=9,R[0]=6,m=o,m=w.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),s,F,R,V,L,f,_),m!=$e)return m==Je&&(s=null,r=Tr),g=m,n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);c.init(F[0],R[0],f,V[0],f,L[0]),r=La;case La:if(n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,(g=c.proc(n,_,g))!=Jn)return n.inflate_flush(_,g);if(g=$e,c.free(_),b=_.next_in_index,y=_.avail_in,v=n.bitb,x=n.bitk,k=n.write,C=k<n.read?n.read-k-1:n.end-k,u===0){r=di;break}r=Oa;case Oa:if(n.write=k,g=n.inflate_flush(_,g),k=n.write,C=k<n.read?n.read-k-1:n.end-k,n.read!=n.write)return n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);r=Z0;case Z0:return g=Jn,n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);case Tr:return g=Je,n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g);default:return g=Dt,n.bitb=v,n.bitk=x,_.avail_in=y,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=k,n.inflate_flush(_,g)}}},n.free=function(_){n.reset(_,null),n.win=null,f=null},n.set_dictionary=function(_,g,m){n.win.set(_.subarray(g,g+m),0),n.read=n.write=m},n.sync_point=function(){return r==Tl?1:0}}const S5=32,I5=8,M5=0,G0=1,Y0=2,W0=3,q0=4,X0=5,Ll=6,ho=7,K0=12,lr=13,T5=[0,0,255,255];function L5(){const e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function t(n){return!n||!n.istate?Dt:(n.total_in=n.total_out=0,n.msg=null,n.istate.mode=ho,n.istate.blocks.reset(n,null),$e)}e.inflateEnd=function(n){return e.blocks&&e.blocks.free(n),e.blocks=null,$e},e.inflateInit=function(n,r){return n.msg=null,e.blocks=null,r<8||r>15?(e.inflateEnd(n),Dt):(e.wbits=r,n.istate.blocks=new A5(n,1<<r),t(n),$e)},e.inflate=function(n,r){let i,o;if(!n||!n.istate||!n.next_in)return Dt;const a=n.istate;for(r=r==m5?Qn:$e,i=Qn;;)switch(a.mode){case M5:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,((a.method=n.read_byte(n.next_in_index++))&15)!=I5){a.mode=lr,n.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=lr,n.msg="invalid win size",a.marker=5;break}a.mode=G0;case G0:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,o=n.read_byte(n.next_in_index++)&255,((a.method<<8)+o)%31!==0){a.mode=lr,n.msg="incorrect header check",a.marker=5;break}if((o&S5)===0){a.mode=ho;break}a.mode=Y0;case Y0:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,a.mode=W0;case W0:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,a.mode=q0;case q0:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,a.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,a.mode=X0;case X0:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,a.need+=n.read_byte(n.next_in_index++)&255,a.mode=Ll,p5);case Ll:return a.mode=lr,n.msg="need dictionary",a.marker=0,Dt;case ho:if(i=a.blocks.proc(n,i),i==Je){a.mode=lr,a.marker=0;break}if(i==$e&&(i=r),i!=Jn)return i;i=r,a.blocks.reset(n,a.was),a.mode=K0;case K0:return Jn;case lr:return Je;default:return Dt}},e.inflateSetDictionary=function(n,r,i){let o=0,a=i;if(!n||!n.istate||n.istate.mode!=Ll)return Dt;const s=n.istate;return a>=1<<s.wbits&&(a=(1<<s.wbits)-1,o=i-a),s.blocks.set_dictionary(r,o,a),s.mode=ho,$e},e.inflateSync=function(n){let r,i,o,a,s;if(!n||!n.istate)return Dt;const l=n.istate;if(l.mode!=lr&&(l.mode=lr,l.marker=0),(r=n.avail_in)===0)return Qn;for(i=n.next_in_index,o=l.marker;r!==0&&o<4;)n.read_byte(i)==T5[o]?o++:n.read_byte(i)!==0?o=0:o=4-o,i++,r--;return n.total_in+=i-n.next_in_index,n.next_in_index=i,n.avail_in=r,l.marker=o,o!=4?Je:(a=n.total_in,s=n.total_out,t(n),n.total_in=a,n.total_out=s,l.mode=ho,$e)},e.inflateSyncPoint=function(n){return!n||!n.istate||!n.istate.blocks?Dt:n.istate.blocks.sync_point()}}function Ch(){}Ch.prototype={inflateInit:function(e){const t=this;return t.istate=new L5,e||(e=h5),t.istate.inflateInit(t,e)},inflate:function(e){const t=this;return t.istate?t.istate.inflate(t,e):Dt},inflateEnd:function(){const e=this;if(!e.istate)return Dt;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync:function(){const e=this;return e.istate?e.istate.inflateSync(e):Dt},inflateSetDictionary:function(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):Dt},read_byte:function(e){return this.next_in[e]},read_buf:function(e,t){return this.next_in.subarray(e,e+t)}};function O5(e){const t=this,n=new Ch,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,i=g5,o=new Uint8Array(r);let a=!1;n.inflateInit(),n.next_out=o,t.append=function(s,l){const d=[];let c,u,f=0,h=0,w=0;if(s.length!==0){n.next_in_index=0,n.next_in=s,n.avail_in=s.length;do{if(n.next_out_index=0,n.avail_out=r,n.avail_in===0&&!a&&(n.next_in_index=0,a=!0),c=n.inflate(i),a&&c===Qn){if(n.avail_in!==0)throw new Error("inflating: bad input")}else if(c!==$e&&c!==Jn)throw new Error("inflating: "+n.msg);if((a||c===Jn)&&n.avail_in===s.length)throw new Error("inflating: bad input");n.next_out_index&&(n.next_out_index===r?d.push(new Uint8Array(o)):d.push(o.slice(0,n.next_out_index))),w+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=f&&(l(n.next_in_index),f=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return d.length>1?(u=new Uint8Array(w),d.forEach(function(_){u.set(_,h),h+=_.length})):u=d[0]||new Uint8Array(0),u}},t.flush=function(){n.inflateEnd()}}const N5={chunkSize:512*1024,maxWorkers:typeof navigator!="undefined"&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},Rt=Object.assign({},N5);function Eh(){return Rt}function md(e){if(e.baseURL!==void 0&&(Rt.baseURL=e.baseURL),e.chunkSize!==void 0&&(Rt.chunkSize=e.chunkSize),e.maxWorkers!==void 0&&(Rt.maxWorkers=e.maxWorkers),e.terminateWorkerTimeout!==void 0&&(Rt.terminateWorkerTimeout=e.terminateWorkerTimeout),e.useWebWorkers!==void 0&&(Rt.useWebWorkers=e.useWebWorkers),e.Deflate!==void 0&&(Rt.Deflate=e.Deflate),e.Inflate!==void 0&&(Rt.Inflate=e.Inflate),e.workerScripts!==void 0){if(e.workerScripts.deflate){if(!Array.isArray(e.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");Rt.workerScripts||(Rt.workerScripts={}),Rt.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");Rt.workerScripts||(Rt.workerScripts={}),Rt.workerScripts.inflate=e.workerScripts.inflate}}}const po={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{avif:".avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}};(()=>{const e={};for(let t in po)if(po.hasOwnProperty(t)){for(let n in po[t])if(po[t].hasOwnProperty(n)){const r=po[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i<r.length;i++)e[r[i]]=t+"/"+n}}return e})();const Ah=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=t>>>1^3988292384:t=t>>>1;Ah[e]=t}class $o{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r<i;r++)n=n>>>8^Ah[(n^t[r])&255];this.crc=n}get(){return~this.crc}}function Ac(e){if(typeof TextEncoder=="undefined"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}const $t={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);const n=e[e.length-1],r=$t.getPartial(n);return r===32?e.concat(t):$t._shiftRight(t,r,n|0,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(t===0)return 0;const n=e[t-1];return(t-1)*32+$t.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));const n=e.length;return t=t&31,n>0&&t&&(e[n-1]=$t.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let a=0;a<e.length;a++)r.push(n|e[a]>>>t),n=e[a]<<32-t;const i=e.length?e[e.length-1]:0,o=$t.getPartial(i);return r.push($t.partial(t+o&31,t+o>32?n:r.pop(),1)),r}},Sh={bytes:{fromBits(e){const n=$t.bitLength(e)/8,r=new Uint8Array(n);let i;for(let o=0;o<n;o++)(o&3)===0&&(i=e[o/4]),r[o]=i>>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],(n&3)===3&&(t.push(r),r=0);return n&3&&t.push($t.partial(8*(n&3),r)),t}}},_d={};_d.sha1=function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()};_d.sha1.prototype={blockSize:512,reset:function(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update:function(e){const t=this;typeof e=="string"&&(e=Sh.utf8String.toBits(e));const n=t._buffer=$t.concat(t._buffer,e),r=t._length,i=t._length=r+$t.bitLength(e);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const o=new Uint32Array(n);let a=0;for(let s=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s<=i;s+=t.blockSize)t._block(o.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize:function(){const e=this;let t=e._buffer;const n=e._h;t=$t.concat(t,[$t.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S:function(e,t){return t<<e|t>>>32-e},_block:function(e){const t=this,n=t._h,r=Array(80);for(let d=0;d<16;d++)r[d]=e[d];let i=n[0],o=n[1],a=n[2],s=n[3],l=n[4];for(let d=0;d<=79;d++){d>=16&&(r[d]=t._S(1,r[d-3]^r[d-8]^r[d-14]^r[d-16]));const c=t._S(5,i)+t._f(d,o,a,s)+l+r[d]+t._key[Math.floor(d/20)]|0;l=s,s=a,a=t._S(30,o),o=i,i=c}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+a|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0}};const Ih={};Ih.aes=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let o,a,s,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),s=[]],o=i;o<4*i+28;o++){let d=a[o-1];(o%i===0||i===8&&o%i===4)&&(d=n[d>>>24]<<24^n[d>>16&255]<<16^n[d>>8&255]<<8^n[d&255],o%i===0&&(d=d<<8^d>>>24^l<<24,l=l<<1^(l>>7)*283)),a[o]=a[o-i]^d}for(let d=0;o;d++,o--){const c=a[d&3?o:o-4];o<=4||d<4?s[d]=c:s[d]=r[0][n[c>>>24]]^r[1][n[c>>16&255]]^r[2][n[c>>8&255]]^r[3][n[c&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],o=[];let a,s,l,d;for(let c=0;c<256;c++)o[(i[c]=c<<1^(c>>7)*283)^c]=c;for(let c=a=0;!n[c];c^=s||1,a=o[a]||1){let u=a^a<<1^a<<2^a<<3^a<<4;u=u>>8^u&255^99,n[c]=u,r[u]=c,d=i[l=i[s=i[c]]];let f=d*16843009^l*65537^s*257^c*16843008,h=i[u]*257^u*16843008;for(let w=0;w<4;w++)e[w][c]=h=h<<24^h>>>8,t[w][u]=f=f<<24^f>>>8}for(let c=0;c<5;c++)e[c]=e[c].slice(0),t[c]=t[c].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],o=this._tables[t],a=o[0],s=o[1],l=o[2],d=o[3],c=o[4];let u=e[0]^n[0],f=e[t?3:1]^n[1],h=e[2]^n[2],w=e[t?1:3]^n[3],_=4,g,m,v;for(let x=0;x<r;x++)g=a[u>>>24]^s[f>>16&255]^l[h>>8&255]^d[w&255]^n[_],m=a[f>>>24]^s[h>>16&255]^l[w>>8&255]^d[u&255]^n[_+1],v=a[h>>>24]^s[w>>16&255]^l[u>>8&255]^d[f&255]^n[_+2],w=a[w>>>24]^s[u>>16&255]^l[f>>8&255]^d[h&255]^n[_+3],_+=4,u=g,f=m,h=v;for(let x=0;x<4;x++)i[t?3&-x:x]=c[u>>>24]<<24^c[f>>16&255]<<16^c[h>>8&255]<<8^c[w&255]^n[_++],g=u,u=f,f=h,h=w,w=g;return i}};const Mh={};Mh.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=$t.bitLength(t);for(let o=0;o<r;o+=4){this.incCounter(n);const a=e.encrypt(n);t[o]^=a[0],t[o+1]^=a[1],t[o+2]^=a[2],t[o+3]^=a[3]}return $t.clamp(t,i)}};const Th={};Th.hmacSha1=class{constructor(e){const t=this,n=t._hash=_d.sha1,r=[[],[]],i=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>i&&(e=n.hash(e));for(let o=0;o<i;o++)r[0][o]=e[o]^909522486,r[1][o]=e[o]^1549556828;t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){const t=this;t._updated=!0,t._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}};const Lh="Invalid pasword",Ci=16,R5="raw",Oh={name:"PBKDF2"},D5={name:"HMAC"},F5="SHA-1",P5=Object.assign({hash:D5},Oh),$5=Object.assign({iterations:1e3,hash:{name:F5}},Oh),B5=["deriveBits"],Bo=[8,12,16],go=[16,24,32],cr=10,Nh=[0,0,0,0],Nn=Sh.bytes,Rh=Ih.aes,Dh=Mh.ctrGladman,Fh=Th.hmacSha1;class z5{constructor(t,n,r){Object.assign(this,{password:t,signed:n,strength:r-1,pendingInput:new Uint8Array(0)})}async append(t){const n=this;if(n.password){const i=Ht(t,0,Bo[n.strength]+2);await V5(n,i,n.password),n.password=null,n.aesCtrGladman=new Dh(new Rh(n.keys.key),Array.from(Nh)),n.hmac=new Fh(n.keys.authentication),t=Ht(t,Bo[n.strength]+2)}const r=new Uint8Array(t.length-cr-(t.length-cr)%Ci);return Ph(n,t,r,0,cr,!0)}flush(){const t=this,n=t.pendingInput,r=Ht(n,0,n.length-cr),i=Ht(n,n.length-cr);let o=new Uint8Array(0);if(r.length){const s=Nn.toBits(r);t.hmac.update(s);const l=t.aesCtrGladman.update(s);o=Nn.fromBits(l)}let a=!0;if(t.signed){const s=Ht(Nn.fromBits(t.hmac.digest()),0,cr);for(let l=0;l<cr;l++)s[l]!=i[l]&&(a=!1)}return{valid:a,data:o}}}class j5{constructor(t,n){Object.assign(this,{password:t,strength:n-1,pendingInput:new Uint8Array(0)})}async append(t){const n=this;let r=new Uint8Array(0);n.password&&(r=await U5(n,n.password),n.password=null,n.aesCtrGladman=new Dh(new Rh(n.keys.key),Array.from(Nh)),n.hmac=new Fh(n.keys.authentication));const i=new Uint8Array(r.length+t.length-t.length%Ci);return i.set(r,0),Ph(n,t,i,r.length,0)}flush(){const t=this;let n=new Uint8Array(0);if(t.pendingInput.length){const i=t.aesCtrGladman.update(Nn.toBits(t.pendingInput));t.hmac.update(i),n=Nn.fromBits(i)}const r=Ht(Nn.fromBits(t.hmac.digest()),0,cr);return{data:wd(n,r),signature:r}}}function Ph(e,t,n,r,i,o){const a=t.length-i;e.pendingInput.length&&(t=wd(e.pendingInput,t),n=H5(n,a-a%Ci));let s;for(s=0;s<=a-Ci;s+=Ci){const l=Nn.toBits(Ht(t,s,s+Ci));o&&e.hmac.update(l);const d=e.aesCtrGladman.update(l);o||e.hmac.update(d),n.set(Nn.fromBits(d),s+r)}return e.pendingInput=Ht(t,s),n}async function V5(e,t,n){await $h(e,n,Ht(t,0,Bo[e.strength]));const r=Ht(t,Bo[e.strength]),i=e.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(Lh)}async function U5(e,t){const n=crypto.getRandomValues(new Uint8Array(Bo[e.strength]));return await $h(e,t,n),wd(n,e.keys.passwordVerification)}async function $h(e,t,n){const r=Ac(t),i=await crypto.subtle.importKey(R5,r,P5,!1,B5),o=await crypto.subtle.deriveBits(Object.assign({salt:n},$5),i,8*(go[e.strength]*2+2)),a=new Uint8Array(o);e.keys={key:Nn.toBits(Ht(a,0,go[e.strength])),authentication:Nn.toBits(Ht(a,go[e.strength],go[e.strength]*2)),passwordVerification:Ht(a,go[e.strength]*2)}}function wd(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function H5(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function Ht(e,t,n){return e.subarray(t,n)}const Oi=12;class Z5{constructor(t,n){const r=this;Object.assign(r,{password:t,passwordVerification:n}),Bh(r,t)}append(t){const n=this;if(n.password){const r=J0(n,t.subarray(0,Oi));if(n.password=null,r[Oi-1]!=n.passwordVerification)throw new Error(Lh);t=t.subarray(Oi)}return J0(n,t)}flush(){return{valid:!0,data:new Uint8Array(0)}}}class G5{constructor(t,n){const r=this;Object.assign(r,{password:t,passwordVerification:n}),Bh(r,t)}append(t){const n=this;let r,i;if(n.password){n.password=null;const o=crypto.getRandomValues(new Uint8Array(Oi));o[Oi-1]=n.passwordVerification,r=new Uint8Array(t.length+o.length),r.set(Q0(n,o),0),i=Oi}else r=new Uint8Array(t.length),i=0;return r.set(Q0(n,t),i),r}flush(){return{data:new Uint8Array(0)}}}function J0(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=zh(e)^t[r],vd(e,n[r]);return n}function Q0(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=zh(e)^t[r],vd(e,t[r]);return n}function Bh(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new $o(e.keys[0]),e.crcKey2=new $o(e.keys[2]);for(let n=0;n<t.length;n++)vd(e,t.charCodeAt(n))}function vd(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=e1(e.keys[1]+jh(e.keys[0])),e.keys[1]=e1(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function zh(e){const t=e.keys[2]|2;return jh(Math.imul(t,t^1)>>>8)}function jh(e){return e&255}function e1(e){return e&4294967295}const Vh="deflate",Uh="inflate",t1="Invalid signature";class Y5{constructor(t,{signature:n,password:r,signed:i,compressed:o,zipCrypto:a,passwordVerification:s,encryptionStrength:l},{chunkSize:d}){const c=Boolean(r);Object.assign(this,{signature:n,encrypted:c,signed:i,compressed:o,inflate:o&&new t({chunkSize:d}),crc32:i&&new $o,zipCrypto:a,decrypt:c&&a?new Z5(r,s):new z5(r,i,l)})}async append(t){const n=this;return n.encrypted&&t.length&&(t=await n.decrypt.append(t)),n.compressed&&t.length&&(t=await n.inflate.append(t)),(!n.encrypted||n.zipCrypto)&&n.signed&&t.length&&n.crc32.append(t),t}async flush(){const t=this;let n,r=new Uint8Array(0);if(t.encrypted){const i=t.decrypt.flush();if(!i.valid)throw new Error(t1);r=i.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const i=new DataView(new Uint8Array(4).buffer);if(n=t.crc32.get(),i.setUint32(0,n),t.signature!=i.getUint32(0,!1))throw new Error(t1)}return t.compressed&&(r=await t.inflate.append(r)||new Uint8Array(0),await t.inflate.flush()),{data:r,signature:n}}}class W5{constructor(t,{encrypted:n,signed:r,compressed:i,level:o,zipCrypto:a,password:s,passwordVerification:l,encryptionStrength:d},{chunkSize:c}){Object.assign(this,{encrypted:n,signed:r,compressed:i,deflate:i&&new t({level:o||5,chunkSize:c}),crc32:r&&new $o,zipCrypto:a,encrypt:n&&a?new G5(s,l):new j5(s,d)})}async append(t){const n=this;let r=t;return n.compressed&&t.length&&(r=await n.deflate.append(t)),n.encrypted&&r.length&&(r=await n.encrypt.append(r)),(!n.encrypted||n.zipCrypto)&&n.signed&&t.length&&n.crc32.append(t),r}async flush(){const t=this;let n,r=new Uint8Array(0);if(t.compressed&&(r=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){r=await t.encrypt.append(r);const i=t.encrypt.flush();n=i.signature;const o=new Uint8Array(r.length+i.data.length);o.set(r,0),o.set(i.data,r.length),r=o}return(!t.encrypted||t.zipCrypto)&&t.signed&&(n=t.crc32.get()),{data:r,signature:n}}}function q5(e,t,n){if(t.codecType.startsWith(Vh))return new W5(e,t,n);if(t.codecType.startsWith(Uh))return new Y5(e,t,n)}const n1="init",r1="append",Ol="flush",X5="message";let i1=!0;var Nl=(e,t,n,r,i,o,a)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:a,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,i(e)}}),o?J5(e,r):K5(e,r));function K5(e,t){const n=q5(e.codecConstructor,e.options,t);return{async append(r){try{return await n.append(r)}catch(i){throw e.onTaskFinished(),i}},async flush(){try{return await n.flush()}finally{e.onTaskFinished()}},abort(){e.onTaskFinished()}}}function J5(e,t){let n;const r={type:"module"};if(!e.interface){if(!i1)e.worker=i(r,t.baseURL);else try{e.worker=i({},t.baseURL)}catch{i1=!1,e.worker=i(r,t.baseURL)}e.worker.addEventListener(X5,s,!1),e.interface={append(l){return o({type:r1,data:l})},flush(){return o({type:Ol})},abort(){e.onTaskFinished()}}}return e.interface;function i(l,d){let c,u;c=e.scripts[0],typeof c=="function"&&(c=c());try{u=new URL(c,d)}catch{u=c}return new Worker(u,l)}async function o(l){if(!n){const d=e.options,c=e.scripts.slice(1);await a({scripts:c,type:n1,options:d,config:{chunkSize:t.chunkSize}})}return a(l)}function a(l){const d=e.worker,c=new Promise((u,f)=>n={resolve:u,reject:f});try{if(l.data)try{l.data=l.data.buffer,d.postMessage(l,[l.data])}catch{d.postMessage(l)}else d.postMessage(l)}catch(u){n.reject(u),n=null,e.onTaskFinished()}return c}function s(l){const d=l.data;if(n){const c=d.error,u=d.type;if(c){const f=new Error(c.message);f.stack=c.stack,n.reject(f),n=null,e.onTaskFinished()}else if(u==n1||u==Ol||u==r1){const f=d.data;u==Ol?(n.resolve({data:new Uint8Array(f),signature:d.signature}),n=null,e.onTaskFinished()):n.resolve(f&&new Uint8Array(f))}}}}let Lr=[],Rl=[];function Hh(e,t,n){const i=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||t.useWebWorkers===void 0&&n.useWebWorkers),o=i&&n.workerScripts?n.workerScripts[t.codecType]:[];if(Lr.length<n.maxWorkers){const s={};return Lr.push(s),Nl(s,e,t,n,a,i,o)}else{const s=Lr.find(l=>!l.busy);return s?(o1(s),Nl(s,e,t,n,a,i,o)):new Promise(l=>Rl.push({resolve:l,codecConstructor:e,options:t,webWorker:i,scripts:o}))}function a(s){if(Rl.length){const[{resolve:l,codecConstructor:d,options:c,webWorker:u,scripts:f}]=Rl.splice(0,1);l(Nl(s,d,c,n,a,u,f))}else s.worker?(o1(s),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(s.terminateTimeout=setTimeout(()=>{Lr=Lr.filter(l=>l!=s),s.terminate()},n.terminateWorkerTimeout))):Lr=Lr.filter(l=>l!=s)}}function o1(e){e.terminateTimeout&&(clearTimeout(e.terminateTimeout),e.terminateTimeout=null)}var Q5=e=>{if(typeof URL.createObjectURL=="function"){const t=()=>URL.createObjectURL(new Blob([`const{Array:t,Object:e,Math:n,Error:r,Uint8Array:i,Uint16Array:s,Uint32Array:o,Int32Array:f,DataView:c,TextEncoder:l,crypto:u,postMessage:a}=globalThis,w=[];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)1&e?e=e>>>1^3988292384:e>>>=1;w[t]=e}class h{constructor(t){this.t=t||-1}append(t){let e=0|this.t;for(let n=0,r=0|t.length;r>n;n++)e=e>>>8^w[255&(e^t[n])];this.t=e}get(){return~this.t}}const d={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=d.i(n);return 32===r?t.concat(e):d.o(e,r,0|n,t.slice(0,t.length-1))},l(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+d.i(n)},u(t,e){if(32*t.length<e)return t;const r=(t=t.slice(0,n.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=d.h(e,t[r-1]&2147483648>>e-1,1)),t},h:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,i:t=>n.round(t/1099511627776)||32,o(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let i=0;i<t.length;i++)r.push(n|t[i]>>>e),n=t[i]<<32-e;const i=t.length?t[t.length-1]:0,s=d.i(i);return r.push(d.h(e+s&31,e+s>32?n:r.pop(),1)),r}},p={p:{k(t){const e=d.l(t)/8,n=new i(e);let r;for(let i=0;e>i;i++)0==(3&i)&&(r=t[i/4]),n[i]=r>>>24,r<<=8;return n},g(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],3==(3&n)&&(e.push(r),r=0);return 3&n&&e.push(d.h(8*(3&n),r)),e}}},b={v:function(t){t?(this.m=t.m.slice(0),this.S=t.S.slice(0),this._=t._):this.reset()}};b.v.prototype={blockSize:512,reset:function(){const t=this;return t.m=this.I.slice(0),t.S=[],t._=0,t},update:function(t){const e=this;"string"==typeof t&&(t=p.C.g(t));const n=e.S=d.concat(e.S,t),i=e._,s=e._=i+d.l(t);if(s>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const f=new o(n);let c=0;for(let t=e.blockSize+i-(e.blockSize+i&e.blockSize-1);s>=t;t+=e.blockSize)e.A(f.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),e},V:function(){const t=this;let e=t.S;const r=t.m;e=d.concat(e,[d.h(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(n.floor(t._/4294967296)),e.push(0|t._);e.length;)t.A(e.splice(0,16));return t.reset(),r},I:[1732584193,4023233417,2562383102,271733878,3285377520],B:[1518500249,1859775393,2400959708,3395469782],D:(t,e,n,r)=>t>19?t>39?t>59?t>79?void 0:e^n^r:e&n|e&r|n&r:e^n^r:e&n|~e&r,U:(t,e)=>e<<t|e>>>32-t,A:function(e){const r=this,i=r.m,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let o=i[0],f=i[1],c=i[2],l=i[3],u=i[4];for(let t=0;79>=t;t++){16>t||(s[t]=r.U(1,s[t-3]^s[t-8]^s[t-14]^s[t-16]));const e=r.U(5,o)+r.D(t,f,c,l)+u+s[t]+r.B[n.floor(t/20)]|0;u=l,l=c,c=r.U(30,f),f=o,o=e}i[0]=i[0]+o|0,i[1]=i[1]+f|0,i[2]=i[2]+c|0,i[3]=i[3]+l|0,i[4]=i[4]+u|0}};const y={name:"PBKDF2"},k=e.assign({hash:{name:"HMAC"}},y),g=e.assign({iterations:1e3,hash:{name:"SHA-1"}},y),v=["deriveBits"],m=[8,12,16],z=[16,24,32],S=[0,0,0,0],_=p.p,I=class{constructor(t){const e=this;e.M=[[[],[],[],[],[]],[[],[],[],[],[]]],e.M[0][0][0]||e.P();const n=e.M[0][4],i=e.M[1],s=t.length;let o,f,c,l=1;if(4!==s&&6!==s&&8!==s)throw new r("invalid aes key size");for(e.B=[f=t.slice(0),c=[]],o=s;4*s+28>o;o++){let t=f[o-1];(o%s==0||8===s&&o%s==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],o%s==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),f[o]=f[o-s]^t}for(let t=0;o;t++,o--){const e=f[3&t?o:o-4];c[t]=4>=o||4>t?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this.H(t,0)}decrypt(t){return this.H(t,1)}P(){const t=this.M[0],e=this.M[1],n=t[4],r=e[4],i=[],s=[];let o,f,c,l;for(let t=0;256>t;t++)s[(i[t]=t<<1^283*(t>>7))^t]=t;for(let u=o=0;!n[u];u^=f||1,o=s[o]||1){let s=o^o<<1^o<<2^o<<3^o<<4;s=s>>8^255&s^99,n[u]=s,r[s]=u,l=i[c=i[f=i[u]]];let a=16843009*l^65537*c^257*f^16843008*u,w=257*i[s]^16843008*s;for(let n=0;4>n;n++)t[n][u]=w=w<<24^w>>>8,e[n][s]=a=a<<24^a>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}H(t,e){if(4!==t.length)throw new r("invalid aes block size");const n=this.B[e],i=n.length/4-2,s=[0,0,0,0],o=this.M[e],f=o[0],c=o[1],l=o[2],u=o[3],a=o[4];let w,h,d,p=t[0]^n[0],b=t[e?3:1]^n[1],y=t[2]^n[2],k=t[e?1:3]^n[3],g=4;for(let t=0;i>t;t++)w=f[p>>>24]^c[b>>16&255]^l[y>>8&255]^u[255&k]^n[g],h=f[b>>>24]^c[y>>16&255]^l[k>>8&255]^u[255&p]^n[g+1],d=f[y>>>24]^c[k>>16&255]^l[p>>8&255]^u[255&b]^n[g+2],k=f[k>>>24]^c[p>>16&255]^l[b>>8&255]^u[255&y]^n[g+3],g+=4,p=w,b=h,y=d;for(let t=0;4>t;t++)s[e?3&-t:t]=a[p>>>24]<<24^a[b>>16&255]<<16^a[y>>8&255]<<8^a[255&k]^n[g++],w=p,p=b,b=y,y=k,k=w;return s}},C=class{constructor(t,e){this.L=t,this.R=e,this.T=e}reset(){this.T=this.R}update(t){return this.j(this.L,t,this.T)}F(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}K(t){0===(t[0]=this.F(t[0]))&&(t[1]=this.F(t[1]))}j(t,e,n){let r;if(!(r=e.length))return[];const i=d.l(e);for(let i=0;r>i;i+=4){this.K(n);const r=t.encrypt(n);e[i]^=r[0],e[i+1]^=r[1],e[i+2]^=r[2],e[i+3]^=r[3]}return d.u(e,i)}},A=class{constructor(t){const e=this,n=e.O=b.v,r=[[],[]],i=n.prototype.blockSize/32;e.W=[new n,new n],t.length>i&&(t=n.hash(t));for(let e=0;i>e;e++)r[0][e]=909522486^t[e],r[1][e]=1549556828^t[e];e.W[0].update(r[0]),e.W[1].update(r[1]),e.q=new n(e.W[0])}reset(){const t=this;t.q=new t.O(t.W[0]),t.G=!1}update(t){this.G=!0,this.q.update(t)}digest(){const t=this,e=t.q.V(),n=new t.O(t.W[1]).update(e).V();return t.reset(),n}};class V{constructor(t,n,r){e.assign(this,{password:t,signed:n,J:r-1,N:new i(0)})}async append(e){const n=this;if(n.password){const i=M(e,0,m[n.J]+2);await(async(t,e,n)=>{await D(t,n,M(e,0,m[t.J]));const i=M(e,m[t.J]),s=t.keys.passwordVerification;if(s[0]!=i[0]||s[1]!=i[1])throw new r("Invalid pasword")})(n,i,n.password),n.password=null,n.X=new C(new I(n.keys.key),t.from(S)),n.Y=new A(n.keys.Z),e=M(e,m[n.J]+2)}return B(n,e,new i(e.length-10-(e.length-10)%16),0,10,!0)}flush(){const t=this,e=t.N,n=M(e,0,e.length-10),r=M(e,e.length-10);let s=new i(0);if(n.length){const e=_.g(n);t.Y.update(e);const r=t.X.update(e);s=_.k(r)}let o=!0;if(t.signed){const e=M(_.k(t.Y.digest()),0,10);for(let t=0;10>t;t++)e[t]!=r[t]&&(o=!1)}return{valid:o,data:s}}}class E{constructor(t,n){e.assign(this,{password:t,J:n-1,N:new i(0)})}async append(e){const n=this;let r=new i(0);n.password&&(r=await(async(t,e)=>{const n=u.getRandomValues(new i(m[t.J]));return await D(t,e,n),U(n,t.keys.passwordVerification)})(n,n.password),n.password=null,n.X=new C(new I(n.keys.key),t.from(S)),n.Y=new A(n.keys.Z));const s=new i(r.length+e.length-e.length%16);return s.set(r,0),B(n,e,s,r.length,0)}flush(){const t=this;let e=new i(0);if(t.N.length){const n=t.X.update(_.g(t.N));t.Y.update(n),e=_.k(n)}const n=M(_.k(t.Y.digest()),0,10);return{data:U(e,n),signature:n}}}function B(t,e,n,r,s,o){const f=e.length-s;let c;for(t.N.length&&(e=U(t.N,e),n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new i(e)).set(n,0)}return t})(n,f-f%16)),c=0;f-16>=c;c+=16){const i=_.g(M(e,c,c+16));o&&t.Y.update(i);const s=t.X.update(i);o||t.Y.update(s),n.set(_.k(s),c+r)}return t.N=M(e,c),n}async function D(t,n,r){const s=(t=>{if(void 0===l){const e=new i((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new l).encode(t)})(n),o=await u.subtle.importKey("raw",s,k,!1,v),f=await u.subtle.deriveBits(e.assign({salt:r},g),o,8*(2*z[t.J]+2)),c=new i(f);t.keys={key:_.g(M(c,0,z[t.J])),Z:_.g(M(c,z[t.J],2*z[t.J])),passwordVerification:M(c,2*z[t.J])}}function U(t,e){let n=t;return t.length+e.length&&(n=new i(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function M(t,e,n){return t.subarray(e,n)}class P{constructor(t,n){e.assign(this,{password:t,passwordVerification:n}),T(this,t)}append(t){const e=this;if(e.password){const n=L(e,t.subarray(0,12));if(e.password=null,n[11]!=e.passwordVerification)throw new r("Invalid pasword");t=t.subarray(12)}return L(e,t)}flush(){return{valid:!0,data:new i(0)}}}class H{constructor(t,n){e.assign(this,{password:t,passwordVerification:n}),T(this,t)}append(t){const e=this;let n,r;if(e.password){e.password=null;const s=u.getRandomValues(new i(12));s[11]=e.passwordVerification,n=new i(t.length+s.length),n.set(R(e,s),0),r=12}else n=new i(t.length),r=0;return n.set(R(e,t),r),n}flush(){return{data:new i(0)}}}function L(t,e){const n=new i(e.length);for(let r=0;r<e.length;r++)n[r]=x(t)^e[r],j(t,n[r]);return n}function R(t,e){const n=new i(e.length);for(let r=0;r<e.length;r++)n[r]=x(t)^e[r],j(t,e[r]);return n}function T(t,e){t.keys=[305419896,591751049,878082192],t.$=new h(t.keys[0]),t.tt=new h(t.keys[2]);for(let n=0;n<e.length;n++)j(t,e.charCodeAt(n))}function j(t,e){t.$.append([e]),t.keys[0]=~t.$.get(),t.keys[1]=K(t.keys[1]+F(t.keys[0])),t.keys[1]=K(n.imul(t.keys[1],134775813)+1),t.tt.append([t.keys[1]>>>24]),t.keys[2]=~t.tt.get()}function x(t){const e=2|t.keys[2];return F(n.imul(e,1^e)>>>8)}function F(t){return 255&t}function K(t){return 4294967295&t}class O{constructor(t,{signature:n,password:r,signed:i,compressed:s,zipCrypto:o,passwordVerification:f,encryptionStrength:c},{et:l}){const u=!!r;e.assign(this,{signature:n,encrypted:u,signed:i,compressed:s,nt:s&&new t({et:l}),rt:i&&new h,zipCrypto:o,decrypt:u&&o?new P(r,f):new V(r,i,c)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.nt.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.rt.append(t),t}async flush(){const t=this;let e,n=new i(0);if(t.encrypted){const e=t.decrypt.flush();if(!e.valid)throw new r("Invalid signature");n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new c(new i(4).buffer);if(e=t.rt.get(),n.setUint32(0,e),t.signature!=n.getUint32(0,!1))throw new r("Invalid signature")}return t.compressed&&(n=await t.nt.append(n)||new i(0),await t.nt.flush()),{data:n,signature:e}}}class W{constructor(t,{encrypted:n,signed:r,compressed:i,level:s,zipCrypto:o,password:f,passwordVerification:c,encryptionStrength:l},{et:u}){e.assign(this,{encrypted:n,signed:r,compressed:i,it:i&&new t({level:s||5,et:u}),rt:r&&new h,zipCrypto:o,encrypt:n&&o?new H(f,c):new E(f,l)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.it.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.rt.append(t),n}async flush(){const t=this;let e,n=new i(0);if(t.compressed&&(n=await t.it.flush()||new i(0)),t.encrypted){n=await t.encrypt.append(n);const r=t.encrypt.flush();e=r.signature;const s=new i(n.length+r.data.length);s.set(n,0),s.set(r.data,n.length),n=s}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.rt.get()),{data:n,signature:e}}}const q={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),G=((t,e,n)=>e.codecType.startsWith("deflate")?new W(t,e,n):e.codecType.startsWith("inflate")?new O(t,e,n):void 0)(n,e,t.config)},append:async t=>({data:await G.append(t.data)}),flush:()=>G.flush()};let G;function J(e){return N(e.map((([e,n])=>new t(e).fill(n,0,e))))}function N(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?N(n):n)),[])}addEventListener("message",(async t=>{const e=t.data,n=e.type,r=q[n];if(r)try{e.data&&(e.data=new i(e.data));const t=await r(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,a(t,[t.data])}catch(e){a(t)}else a(t)}catch(t){a({type:n,error:{message:t.message,stack:t.stack}})}}));const Q=[0,1,2,3].concat(...J([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function X(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.st=r=>{const i=t.ot,s=t.ct.ft,o=t.ct.lt;let f,c,l,u=-1;for(r.ut=0,r.at=573,f=0;o>f;f++)0!==i[2*f]?(r.wt[++r.ut]=u=f,r.ht[f]=0):i[2*f+1]=0;for(;2>r.ut;)l=r.wt[++r.ut]=2>u?++u:0,i[2*l]=1,r.ht[l]=0,r.dt--,s&&(r.bt-=s[2*l+1]);for(t.yt=u,f=n.floor(r.ut/2);f>=1;f--)r.kt(i,f);l=o;do{f=r.wt[1],r.wt[1]=r.wt[r.ut--],r.kt(i,1),c=r.wt[1],r.wt[--r.at]=f,r.wt[--r.at]=c,i[2*l]=i[2*f]+i[2*c],r.ht[l]=n.max(r.ht[f],r.ht[c])+1,i[2*f+1]=i[2*c+1]=l,r.wt[1]=l++,r.kt(i,1)}while(r.ut>=2);r.wt[--r.at]=r.wt[1],(e=>{const n=t.ot,r=t.ct.ft,i=t.ct.gt,s=t.ct.vt,o=t.ct.zt;let f,c,l,u,a,w,h=0;for(u=0;15>=u;u++)e.St[u]=0;for(n[2*e.wt[e.at]+1]=0,f=e.at+1;573>f;f++)c=e.wt[f],u=n[2*n[2*c+1]+1]+1,u>o&&(u=o,h++),n[2*c+1]=u,c>t.yt||(e.St[u]++,a=0,s>c||(a=i[c-s]),w=n[2*c],e.dt+=w*(u+a),r&&(e.bt+=w*(r[2*c+1]+a)));if(0!==h){do{for(u=o-1;0===e.St[u];)u--;e.St[u]--,e.St[u+1]+=2,e.St[o]--,h-=2}while(h>0);for(u=o;0!==u;u--)for(c=e.St[u];0!==c;)l=e.wt[--f],l>t.yt||(n[2*l+1]!=u&&(e.dt+=(u-n[2*l+1])*n[2*l],n[2*l+1]=u),c--)}})(r),((t,n,r)=>{const i=[];let s,o,f,c=0;for(s=1;15>=s;s++)i[s]=c=c+r[s-1]<<1;for(o=0;n>=o;o++)f=t[2*o+1],0!==f&&(t[2*o]=e(i[f]++,f))})(i,t.yt,r.St)}}function Y(t,e,n,r,i){const s=this;s.ft=t,s.gt=e,s.vt=n,s.lt=r,s.zt=i}X._t=[0,1,2,3,4,5,6,7].concat(...J([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),X.It=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],X.Ct=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],X.At=t=>256>t?Q[t]:Q[256+(t>>>7)],X.Vt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],X.Et=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],X.Bt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],X.Dt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Z=J([[144,8],[112,9],[24,7],[8,8]]);Y.Ut=N([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((t,e)=>[t,Z[e]])));const $=J([[30,5]]);function tt(t,e,n,r,i){const s=this;s.Mt=t,s.Pt=e,s.Ht=n,s.Lt=r,s.Rt=i}Y.Tt=N([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((t,e)=>[t,$[e]]))),Y.jt=new Y(Y.Ut,X.Vt,257,286,15),Y.xt=new Y(Y.Tt,X.Et,0,30,15),Y.Ft=new Y(null,X.Bt,0,19,7);const et=[new tt(0,0,0,0,0),new tt(4,4,8,4,1),new tt(4,5,16,8,1),new tt(4,6,32,32,1),new tt(4,4,16,16,2),new tt(8,16,32,32,2),new tt(8,16,128,128,2),new tt(8,32,128,256,2),new tt(32,128,258,1024,2),new tt(32,258,258,4096,2)],nt=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function rt(t,e,n,r){const i=t[2*e],s=t[2*n];return s>i||i==s&&r[e]<=r[n]}function it(){const t=this;let e,r,o,f,c,l,u,a,w,h,d,p,b,y,k,g,v,m,z,S,_,I,C,A,V,E,B,D,U,M,P,H,L;const R=new X,T=new X,j=new X;let x,F,K,O,W,q;function G(){let e;for(e=0;286>e;e++)P[2*e]=0;for(e=0;30>e;e++)H[2*e]=0;for(e=0;19>e;e++)L[2*e]=0;P[512]=1,t.dt=t.bt=0,F=K=0}function J(t,e){let n,r=-1,i=t[1],s=0,o=7,f=4;0===i&&(o=138,f=3),t[2*(e+1)+1]=65535;for(let c=0;e>=c;c++)n=i,i=t[2*(c+1)+1],++s<o&&n==i||(f>s?L[2*n]+=s:0!==n?(n!=r&&L[2*n]++,L[32]++):s>10?L[36]++:L[34]++,s=0,r=n,0===i?(o=138,f=3):n==i?(o=6,f=3):(o=7,f=4))}function N(e){t.Kt[t.pending++]=e}function Q(t){N(255&t),N(t>>>8&255)}function Z(t,e){let n;const r=e;q>16-r?(n=t,W|=n<<q&65535,Q(W),W=n>>>16-q,q+=r-16):(W|=t<<q&65535,q+=r)}function $(t,e){const n=2*t;Z(65535&e[n],65535&e[n+1])}function tt(t,e){let n,r,i=-1,s=t[1],o=0,f=7,c=4;for(0===s&&(f=138,c=3),n=0;e>=n;n++)if(r=s,s=t[2*(n+1)+1],++o>=f||r!=s){if(c>o)do{$(r,L)}while(0!=--o);else 0!==r?(r!=i&&($(r,L),o--),$(16,L),Z(o-3,2)):o>10?($(18,L),Z(o-11,7)):($(17,L),Z(o-3,3));o=0,i=r,0===s?(f=138,c=3):r==s?(f=6,c=3):(f=7,c=4)}}function it(){16==q?(Q(W),W=0,q=0):8>q||(N(255&W),W>>>=8,q-=8)}function st(e,r){let i,s,o;if(t.Ot[F]=e,t.Wt[F]=255&r,F++,0===e?P[2*r]++:(K++,e--,P[2*(X._t[r]+256+1)]++,H[2*X.At(e)]++),0==(8191&F)&&B>2){for(i=8*F,s=_-v,o=0;30>o;o++)i+=H[2*o]*(5+X.Et[o]);if(i>>>=3,K<n.floor(F/2)&&i<n.floor(s/2))return!0}return F==x-1}function ot(e,n){let r,i,s,o,f=0;if(0!==F)do{r=t.Ot[f],i=t.Wt[f],f++,0===r?$(i,e):(s=X._t[i],$(s+256+1,e),o=X.Vt[s],0!==o&&(i-=X.It[s],Z(i,o)),r--,s=X.At(r),$(s,n),o=X.Et[s],0!==o&&(r-=X.Ct[s],Z(r,o)))}while(F>f);$(256,e),O=e[513]}function ft(){q>8?Q(W):q>0&&N(255&W),W=0,q=0}function ct(e,n,r){Z(0+(r?1:0),3),((e,n)=>{ft(),O=8,Q(n),Q(~n),t.Kt.set(a.subarray(e,e+n),t.pending),t.pending+=n})(e,n)}function lt(n){((e,n,r)=>{let i,s,o=0;B>0?(R.st(t),T.st(t),o=(()=>{let e;for(J(P,R.yt),J(H,T.yt),j.st(t),e=18;e>=3&&0===L[2*X.Dt[e]+1];e--);return t.dt+=14+3*(e+1),e})(),i=t.dt+3+7>>>3,s=t.bt+3+7>>>3,s>i||(i=s)):i=s=n+5,n+4>i||-1==e?s==i?(Z(2+(r?1:0),3),ot(Y.Ut,Y.Tt)):(Z(4+(r?1:0),3),((t,e,n)=>{let r;for(Z(t-257,5),Z(e-1,5),Z(n-4,4),r=0;n>r;r++)Z(L[2*X.Dt[r]+1],3);tt(P,t-1),tt(H,e-1)})(R.yt+1,T.yt+1,o+1),ot(P,H)):ct(e,n,r),G(),r&&ft()})(0>v?-1:v,_-v,n),v=_,e.qt()}function ut(){let t,n,r,i;do{if(i=w-C-_,0===i&&0===_&&0===C)i=c;else if(-1==i)i--;else if(_>=c+c-262){a.set(a.subarray(c,c+c),0),I-=c,_-=c,v-=c,t=b,r=t;do{n=65535&d[--r],d[r]=c>n?0:n-c}while(0!=--t);t=c,r=t;do{n=65535&h[--r],h[r]=c>n?0:n-c}while(0!=--t);i+=c}if(0===e.Gt)return;t=e.Jt(a,_+C,i),C+=t,3>C||(p=255&a[_],p=(p<<g^255&a[_+1])&k)}while(262>C&&0!==e.Gt)}function at(t){let e,n,r=V,i=_,s=A;const o=_>c-262?_-(c-262):0;let f=M;const l=u,w=_+258;let d=a[i+s-1],p=a[i+s];U>A||(r>>=2),f>C&&(f=C);do{if(e=t,a[e+s]==p&&a[e+s-1]==d&&a[e]==a[i]&&a[++e]==a[i+1]){i+=2,e++;do{}while(a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&w>i);if(n=258-(w-i),i=w-258,n>s){if(I=t,s=n,n>=f)break;d=a[i+s-1],p=a[i+s]}}}while((t=65535&h[t&l])>o&&0!=--r);return s>C?C:s}t.ht=[],t.St=[],t.wt=[],P=[],H=[],L=[],t.kt=(e,n)=>{const r=t.wt,i=r[n];let s=n<<1;for(;s<=t.ut&&(s<t.ut&&rt(e,r[s+1],r[s],t.ht)&&s++,!rt(e,i,r[s],t.ht));)r[n]=r[s],n=s,s<<=1;r[n]=i},t.Nt=(e,z,I,F,K,J)=>(F||(F=8),K||(K=8),J||(J=0),e.Qt=null,-1==z&&(z=6),1>K||K>9||8!=F||9>I||I>15||0>z||z>9||0>J||J>2?-2:(e.Xt=t,l=I,c=1<<l,u=c-1,y=K+7,b=1<<y,k=b-1,g=n.floor((y+3-1)/3),a=new i(2*c),h=[],d=[],x=1<<K+6,t.Kt=new i(4*x),o=4*x,t.Ot=new s(x),t.Wt=new i(x),B=z,D=J,(e=>(e.Yt=e.Zt=0,e.Qt=null,t.pending=0,t.$t=0,r=113,f=0,R.ot=P,R.ct=Y.jt,T.ot=H,T.ct=Y.xt,j.ot=L,j.ct=Y.Ft,W=0,q=0,O=8,G(),(()=>{w=2*c,d[b-1]=0;for(let t=0;b-1>t;t++)d[t]=0;E=et[B].Pt,U=et[B].Mt,M=et[B].Ht,V=et[B].Lt,_=0,v=0,C=0,m=A=2,S=0,p=0})(),0))(e))),t.te=()=>42!=r&&113!=r&&666!=r?-2:(t.Wt=null,t.Ot=null,t.Kt=null,d=null,h=null,a=null,t.Xt=null,113==r?-3:0),t.ee=(t,e,n)=>{let r=0;return-1==e&&(e=6),0>e||e>9||0>n||n>2?-2:(et[B].Rt!=et[e].Rt&&0!==t.Yt&&(r=t.it(1)),B!=e&&(B=e,E=et[B].Pt,U=et[B].Mt,M=et[B].Ht,V=et[B].Lt),D=n,r)},t.ne=(t,e,n)=>{let i,s=n,o=0;if(!e||42!=r)return-2;if(3>s)return 0;for(s>c-262&&(s=c-262,o=n-s),a.set(e.subarray(o,o+s),0),_=s,v=s,p=255&a[0],p=(p<<g^255&a[1])&k,i=0;s-3>=i;i++)p=(p<<g^255&a[i+2])&k,h[i&u]=d[p],d[p]=i;return 0},t.it=(n,i)=>{let s,w,y,V,U;if(i>4||0>i)return-2;if(!n.re||!n.ie&&0!==n.Gt||666==r&&4!=i)return n.Qt=nt[4],-2;if(0===n.se)return n.Qt=nt[7],-5;var M;if(e=n,V=f,f=i,42==r&&(w=8+(l-8<<4)<<8,y=(B-1&255)>>1,y>3&&(y=3),w|=y<<6,0!==_&&(w|=32),w+=31-w%31,r=113,N((M=w)>>8&255),N(255&M)),0!==t.pending){if(e.qt(),0===e.se)return f=-1,0}else if(0===e.Gt&&V>=i&&4!=i)return e.Qt=nt[7],-5;if(666==r&&0!==e.Gt)return n.Qt=nt[7],-5;if(0!==e.Gt||0!==C||0!=i&&666!=r){switch(U=-1,et[B].Rt){case 0:U=(t=>{let n,r=65535;for(r>o-5&&(r=o-5);;){if(1>=C){if(ut(),0===C&&0==t)return 0;if(0===C)break}if(_+=C,C=0,n=v+r,(0===_||_>=n)&&(C=_-n,_=n,lt(!1),0===e.se))return 0;if(_-v>=c-262&&(lt(!1),0===e.se))return 0}return lt(4==t),0===e.se?4==t?2:0:4==t?3:1})(i);break;case 1:U=(t=>{let n,r=0;for(;;){if(262>C){if(ut(),262>C&&0==t)return 0;if(0===C)break}if(3>C||(p=(p<<g^255&a[_+2])&k,r=65535&d[p],h[_&u]=d[p],d[p]=_),0===r||(_-r&65535)>c-262||2!=D&&(m=at(r)),3>m)n=st(0,255&a[_]),C--,_++;else if(n=st(_-I,m-3),C-=m,m>E||3>C)_+=m,m=0,p=255&a[_],p=(p<<g^255&a[_+1])&k;else{m--;do{_++,p=(p<<g^255&a[_+2])&k,r=65535&d[p],h[_&u]=d[p],d[p]=_}while(0!=--m);_++}if(n&&(lt(!1),0===e.se))return 0}return lt(4==t),0===e.se?4==t?2:0:4==t?3:1})(i);break;case 2:U=(t=>{let n,r,i=0;for(;;){if(262>C){if(ut(),262>C&&0==t)return 0;if(0===C)break}if(3>C||(p=(p<<g^255&a[_+2])&k,i=65535&d[p],h[_&u]=d[p],d[p]=_),A=m,z=I,m=2,0!==i&&E>A&&c-262>=(_-i&65535)&&(2!=D&&(m=at(i)),5>=m&&(1==D||3==m&&_-I>4096)&&(m=2)),3>A||m>A)if(0!==S){if(n=st(0,255&a[_-1]),n&&lt(!1),_++,C--,0===e.se)return 0}else S=1,_++,C--;else{r=_+C-3,n=st(_-1-z,A-3),C-=A-1,A-=2;do{++_>r||(p=(p<<g^255&a[_+2])&k,i=65535&d[p],h[_&u]=d[p],d[p]=_)}while(0!=--A);if(S=0,m=2,_++,n&&(lt(!1),0===e.se))return 0}}return 0!==S&&(n=st(0,255&a[_-1]),S=0),lt(4==t),0===e.se?4==t?2:0:4==t?3:1})(i)}if(2!=U&&3!=U||(r=666),0==U||2==U)return 0===e.se&&(f=-1),0;if(1==U){if(1==i)Z(2,3),$(256,Y.Ut),it(),9>1+O+10-q&&(Z(2,3),$(256,Y.Ut),it()),O=7;else if(ct(0,0,!1),3==i)for(s=0;b>s;s++)d[s]=0;if(e.qt(),0===e.se)return f=-1,0}}return 4!=i?0:1}}function st(){const t=this;t.oe=0,t.fe=0,t.Gt=0,t.Yt=0,t.se=0,t.Zt=0}function ot(t){const e=new st,s=(o=t&&t.et?t.et:65536)+5*(n.floor(o/16383)+1);var o;const f=new i(s);let c=t?t.level:-1;void 0===c&&(c=-1),e.Nt(c),e.re=f,this.append=(t,n)=>{let o,c,l=0,u=0,a=0;const w=[];if(t.length){e.oe=0,e.ie=t,e.Gt=t.length;do{if(e.fe=0,e.se=s,o=e.it(0),0!=o)throw new r("deflating: "+e.Qt);e.fe&&(e.fe==s?w.push(new i(f)):w.push(f.slice(0,e.fe))),a+=e.fe,n&&e.oe>0&&e.oe!=l&&(n(e.oe),l=e.oe)}while(e.Gt>0||0===e.se);return w.length>1?(c=new i(a),w.forEach((t=>{c.set(t,u),u+=t.length}))):c=w[0]||new i(0),c}},this.flush=()=>{let t,n,o=0,c=0;const l=[];do{if(e.fe=0,e.se=s,t=e.it(4),1!=t&&0!=t)throw new r("deflating: "+e.Qt);s-e.se>0&&l.push(f.slice(0,e.fe)),c+=e.fe}while(e.Gt>0||0===e.se);return e.te(),n=new i(c),l.forEach((t=>{n.set(t,o),o+=t.length})),n}}st.prototype={Nt:function(t,e){const n=this;return n.Xt=new it,e||(e=15),n.Xt.Nt(n,t,e)},it:function(t){const e=this;return e.Xt?e.Xt.it(e,t):-2},te:function(){const t=this;if(!t.Xt)return-2;const e=t.Xt.te();return t.Xt=null,e},ee:function(t,e){const n=this;return n.Xt?n.Xt.ee(n,t,e):-2},ne:function(t,e){const n=this;return n.Xt?n.Xt.ne(n,t,e):-2},Jt:function(t,e,n){const r=this;let i=r.Gt;return i>n&&(i=n),0===i?0:(r.Gt-=i,t.set(r.ie.subarray(r.oe,r.oe+i),e),r.oe+=i,r.Yt+=i,i)},qt:function(){const t=this;let e=t.Xt.pending;e>t.se&&(e=t.se),0!==e&&(t.re.set(t.Xt.Kt.subarray(t.Xt.$t,t.Xt.$t+e),t.fe),t.fe+=e,t.Xt.$t+=e,t.Zt+=e,t.se-=e,t.Xt.pending-=e,0===t.Xt.pending&&(t.Xt.$t=0))}};const ft=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],lt=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ut=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],at=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],wt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],ht=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function dt(){let t,e,n,r,i,s;function o(t,e,o,f,c,l,u,a,w,h,d){let p,b,y,k,g,v,m,z,S,_,I,C,A,V,E;_=0,g=o;do{n[t[e+_]]++,_++,g--}while(0!==g);if(n[0]==o)return u[0]=-1,a[0]=0,0;for(z=a[0],v=1;15>=v&&0===n[v];v++);for(m=v,v>z&&(z=v),g=15;0!==g&&0===n[g];g--);for(y=g,z>g&&(z=g),a[0]=z,V=1<<v;g>v;v++,V<<=1)if(0>(V-=n[v]))return-3;if(0>(V-=n[g]))return-3;for(n[g]+=V,s[1]=v=0,_=1,A=2;0!=--g;)s[A]=v+=n[_],A++,_++;g=0,_=0;do{0!==(v=t[e+_])&&(d[s[v]++]=g),_++}while(++g<o);for(o=s[y],s[0]=g=0,_=0,k=-1,C=-z,i[0]=0,I=0,E=0;y>=m;m++)for(p=n[m];0!=p--;){for(;m>C+z;){if(k++,C+=z,E=y-C,E=E>z?z:E,(b=1<<(v=m-C))>p+1&&(b-=p+1,A=m,E>v))for(;++v<E&&(b<<=1)>n[++A];)b-=n[A];if(E=1<<v,h[0]+E>1440)return-3;i[k]=I=h[0],h[0]+=E,0!==k?(s[k]=g,r[0]=v,r[1]=z,v=g>>>C-z,r[2]=I-i[k-1]-v,w.set(r,3*(i[k-1]+v))):u[0]=I}for(r[1]=m-C,o>_?d[_]<f?(r[0]=256>d[_]?0:96,r[2]=d[_++]):(r[0]=l[d[_]-f]+16+64,r[2]=c[d[_++]-f]):r[0]=192,b=1<<m-C,v=g>>>C;E>v;v+=b)w.set(r,3*(I+v));for(v=1<<m-1;0!=(g&v);v>>>=1)g^=v;for(g^=v,S=(1<<C)-1;(g&S)!=s[k];)k--,C-=z,S=(1<<C)-1}return 0!==V&&1!=y?-5:0}function c(o){let c;for(t||(t=[],e=[],n=new f(16),r=[],i=new f(15),s=new f(16)),e.length<o&&(e=[]),c=0;o>c;c++)e[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;i.set(n.subarray(0,15),0),s.set(n.subarray(0,16),0)}this.ce=(n,r,i,s,f)=>{let l;return c(19),t[0]=0,l=o(n,0,19,19,null,null,i,r,s,t,e),-3==l?f.Qt="oversubscribed dynamic bit lengths tree":-5!=l&&0!==r[0]||(f.Qt="incomplete dynamic bit lengths tree",l=-3),l},this.le=(n,r,i,s,f,l,u,a,w)=>{let h;return c(288),t[0]=0,h=o(i,0,n,257,ut,at,l,s,a,t,e),0!=h||0===s[0]?(-3==h?w.Qt="oversubscribed literal/length tree":-4!=h&&(w.Qt="incomplete literal/length tree",h=-3),h):(c(288),h=o(i,n,r,0,wt,ht,u,f,a,t,e),0!=h||0===f[0]&&n>257?(-3==h?w.Qt="oversubscribed distance tree":-5==h?(w.Qt="incomplete distance tree",h=-3):-4!=h&&(w.Qt="empty distance tree with lengths",h=-3),h):0)}}function pt(){const t=this;let e,n,r,i,s=0,o=0,f=0,c=0,l=0,u=0,a=0,w=0,h=0,d=0;function p(t,e,n,r,i,s,o,f){let c,l,u,a,w,h,d,p,b,y,k,g,v,m,z,S;d=f.oe,p=f.Gt,w=o.ue,h=o.ae,b=o.write,y=b<o.read?o.read-b-1:o.end-b,k=ft[t],g=ft[e];do{for(;20>h;)p--,w|=(255&f.we(d++))<<h,h+=8;if(c=w&k,l=n,u=r,S=3*(u+c),0!==(a=l[S]))for(;;){if(w>>=l[S+1],h-=l[S+1],0!=(16&a)){for(a&=15,v=l[S+2]+(w&ft[a]),w>>=a,h-=a;15>h;)p--,w|=(255&f.we(d++))<<h,h+=8;for(c=w&g,l=i,u=s,S=3*(u+c),a=l[S];;){if(w>>=l[S+1],h-=l[S+1],0!=(16&a)){for(a&=15;a>h;)p--,w|=(255&f.we(d++))<<h,h+=8;if(m=l[S+2]+(w&ft[a]),w>>=a,h-=a,y-=v,m>b){z=b-m;do{z+=o.end}while(0>z);if(a=o.end-z,v>a){if(v-=a,b-z>0&&a>b-z)do{o.he[b++]=o.he[z++]}while(0!=--a);else o.he.set(o.he.subarray(z,z+a),b),b+=a,z+=a,a=0;z=0}}else z=b-m,b-z>0&&2>b-z?(o.he[b++]=o.he[z++],o.he[b++]=o.he[z++],v-=2):(o.he.set(o.he.subarray(z,z+2),b),b+=2,z+=2,v-=2);if(b-z>0&&v>b-z)do{o.he[b++]=o.he[z++]}while(0!=--v);else o.he.set(o.he.subarray(z,z+v),b),b+=v,z+=v,v=0;break}if(0!=(64&a))return f.Qt="invalid distance code",v=f.Gt-p,v=v>h>>3?h>>3:v,p+=v,d-=v,h-=v<<3,o.ue=w,o.ae=h,f.Gt=p,f.Yt+=d-f.oe,f.oe=d,o.write=b,-3;c+=l[S+2],c+=w&ft[a],S=3*(u+c),a=l[S]}break}if(0!=(64&a))return 0!=(32&a)?(v=f.Gt-p,v=v>h>>3?h>>3:v,p+=v,d-=v,h-=v<<3,o.ue=w,o.ae=h,f.Gt=p,f.Yt+=d-f.oe,f.oe=d,o.write=b,1):(f.Qt="invalid literal/length code",v=f.Gt-p,v=v>h>>3?h>>3:v,p+=v,d-=v,h-=v<<3,o.ue=w,o.ae=h,f.Gt=p,f.Yt+=d-f.oe,f.oe=d,o.write=b,-3);if(c+=l[S+2],c+=w&ft[a],S=3*(u+c),0===(a=l[S])){w>>=l[S+1],h-=l[S+1],o.he[b++]=l[S+2],y--;break}}else w>>=l[S+1],h-=l[S+1],o.he[b++]=l[S+2],y--}while(y>=258&&p>=10);return v=f.Gt-p,v=v>h>>3?h>>3:v,p+=v,d-=v,h-=v<<3,o.ue=w,o.ae=h,f.Gt=p,f.Yt+=d-f.oe,f.oe=d,o.write=b,0}t.init=(t,s,o,f,c,l)=>{e=0,a=t,w=s,r=o,h=f,i=c,d=l,n=null},t.de=(t,b,y)=>{let k,g,v,m,z,S,_,I=0,C=0,A=0;for(A=b.oe,m=b.Gt,I=t.ue,C=t.ae,z=t.write,S=z<t.read?t.read-z-1:t.end-z;;)switch(e){case 0:if(S>=258&&m>=10&&(t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,y=p(a,w,r,h,i,d,t,b),A=b.oe,m=b.Gt,I=t.ue,C=t.ae,z=t.write,S=z<t.read?t.read-z-1:t.end-z,0!=y)){e=1==y?7:9;break}f=a,n=r,o=h,e=1;case 1:for(k=f;k>C;){if(0===m)return t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);y=0,m--,I|=(255&b.we(A++))<<C,C+=8}if(g=3*(o+(I&ft[k])),I>>>=n[g+1],C-=n[g+1],v=n[g],0===v){c=n[g+2],e=6;break}if(0!=(16&v)){l=15&v,s=n[g+2],e=2;break}if(0==(64&v)){f=v,o=g/3+n[g+2];break}if(0!=(32&v)){e=7;break}return e=9,b.Qt="invalid literal/length code",y=-3,t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);case 2:for(k=l;k>C;){if(0===m)return t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);y=0,m--,I|=(255&b.we(A++))<<C,C+=8}s+=I&ft[k],I>>=k,C-=k,f=w,n=i,o=d,e=3;case 3:for(k=f;k>C;){if(0===m)return t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);y=0,m--,I|=(255&b.we(A++))<<C,C+=8}if(g=3*(o+(I&ft[k])),I>>=n[g+1],C-=n[g+1],v=n[g],0!=(16&v)){l=15&v,u=n[g+2],e=4;break}if(0==(64&v)){f=v,o=g/3+n[g+2];break}return e=9,b.Qt="invalid distance code",y=-3,t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);case 4:for(k=l;k>C;){if(0===m)return t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);y=0,m--,I|=(255&b.we(A++))<<C,C+=8}u+=I&ft[k],I>>=k,C-=k,e=5;case 5:for(_=z-u;0>_;)_+=t.end;for(;0!==s;){if(0===S&&(z==t.end&&0!==t.read&&(z=0,S=z<t.read?t.read-z-1:t.end-z),0===S&&(t.write=z,y=t.pe(b,y),z=t.write,S=z<t.read?t.read-z-1:t.end-z,z==t.end&&0!==t.read&&(z=0,S=z<t.read?t.read-z-1:t.end-z),0===S)))return t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);t.he[z++]=t.he[_++],S--,_==t.end&&(_=0),s--}e=0;break;case 6:if(0===S&&(z==t.end&&0!==t.read&&(z=0,S=z<t.read?t.read-z-1:t.end-z),0===S&&(t.write=z,y=t.pe(b,y),z=t.write,S=z<t.read?t.read-z-1:t.end-z,z==t.end&&0!==t.read&&(z=0,S=z<t.read?t.read-z-1:t.end-z),0===S)))return t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);y=0,t.he[z++]=c,S--,e=0;break;case 7:if(C>7&&(C-=8,m++,A--),t.write=z,y=t.pe(b,y),z=t.write,S=z<t.read?t.read-z-1:t.end-z,t.read!=t.write)return t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);e=8;case 8:return y=1,t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);case 9:return y=-3,t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y);default:return y=-2,t.ue=I,t.ae=C,b.Gt=m,b.Yt+=A-b.oe,b.oe=A,t.write=z,t.pe(b,y)}},t.be=()=>{}}dt.ye=(t,e,n,r)=>(t[0]=9,e[0]=5,n[0]=ct,r[0]=lt,0);const bt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(t,e){const n=this;let r,s=0,o=0,c=0,l=0;const u=[0],a=[0],w=new pt;let h=0,d=new f(4320);const p=new dt;n.ae=0,n.ue=0,n.he=new i(e),n.end=e,n.read=0,n.write=0,n.reset=(t,e)=>{e&&(e[0]=0),6==s&&w.be(t),s=0,n.ae=0,n.ue=0,n.read=n.write=0},n.reset(t,null),n.pe=(t,e)=>{let r,i,s;return i=t.fe,s=n.read,r=(s>n.write?n.end:n.write)-s,r>t.se&&(r=t.se),0!==r&&-5==e&&(e=0),t.se-=r,t.Zt+=r,t.re.set(n.he.subarray(s,s+r),i),i+=r,s+=r,s==n.end&&(s=0,n.write==n.end&&(n.write=0),r=n.write-s,r>t.se&&(r=t.se),0!==r&&-5==e&&(e=0),t.se-=r,t.Zt+=r,t.re.set(n.he.subarray(s,s+r),i),i+=r,s+=r),t.fe=i,n.read=s,e},n.de=(t,e)=>{let i,f,b,y,k,g,v,m;for(y=t.oe,k=t.Gt,f=n.ue,b=n.ae,g=n.write,v=g<n.read?n.read-g-1:n.end-g;;){let z,S,_,I,C,A,V,E;switch(s){case 0:for(;3>b;){if(0===k)return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);e=0,k--,f|=(255&t.we(y++))<<b,b+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,b-=3,i=7&b,f>>>=i,b-=i,s=1;break;case 1:z=[],S=[],_=[[]],I=[[]],dt.ye(z,S,_,I),w.init(z[0],S[0],_[0],0,I[0],0),f>>>=3,b-=3,s=6;break;case 2:f>>>=3,b-=3,s=3;break;case 3:return f>>>=3,b-=3,s=9,t.Qt="invalid block type",e=-3,n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e)}break;case 1:for(;32>b;){if(0===k)return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);e=0,k--,f|=(255&t.we(y++))<<b,b+=8}if((~f>>>16&65535)!=(65535&f))return s=9,t.Qt="invalid stored block lengths",e=-3,n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);o=65535&f,f=b=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===k)return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);if(0===v&&(g==n.end&&0!==n.read&&(g=0,v=g<n.read?n.read-g-1:n.end-g),0===v&&(n.write=g,e=n.pe(t,e),g=n.write,v=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,v=g<n.read?n.read-g-1:n.end-g),0===v)))return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);if(e=0,i=o,i>k&&(i=k),i>v&&(i=v),n.he.set(t.Jt(y,i),g),y+=i,k-=i,g+=i,v-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>b;){if(0===k)return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);e=0,k--,f|=(255&t.we(y++))<<b,b+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,t.Qt="too many length or distance symbols",e=-3,n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(m=0;i>m;m++)r[m]=0;f>>>=14,b-=14,l=0,s=4;case 4:for(;4+(c>>>10)>l;){for(;3>b;){if(0===k)return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);e=0,k--,f|=(255&t.we(y++))<<b,b+=8}r[bt[l++]]=7&f,f>>>=3,b-=3}for(;19>l;)r[bt[l++]]=0;if(u[0]=7,i=p.ce(r,u,a,d,t),0!=i)return-3==(e=i)&&(r=null,s=9),n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);l=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>l;){let o,w;for(i=u[0];i>b;){if(0===k)return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);e=0,k--,f|=(255&t.we(y++))<<b,b+=8}if(i=d[3*(a[0]+(f&ft[i]))+1],w=d[3*(a[0]+(f&ft[i]))+2],16>w)f>>>=i,b-=i,r[l++]=w;else{for(m=18==w?7:w-14,o=18==w?11:3;i+m>b;){if(0===k)return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);e=0,k--,f|=(255&t.we(y++))<<b,b+=8}if(f>>>=i,b-=i,o+=f&ft[m],f>>>=m,b-=m,m=l,i=c,m+o>258+(31&i)+(i>>5&31)||16==w&&1>m)return r=null,s=9,t.Qt="invalid bit length repeat",e=-3,n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);w=16==w?r[m-1]:0;do{r[m++]=w}while(0!=--o);l=m}}if(a[0]=-1,C=[],A=[],V=[],E=[],C[0]=9,A[0]=6,i=c,i=p.le(257+(31&i),1+(i>>5&31),r,C,A,V,E,d,t),0!=i)return-3==i&&(r=null,s=9),e=i,n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);w.init(C[0],A[0],d,V[0],d,E[0]),s=6;case 6:if(n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,1!=(e=w.de(n,t,e)))return n.pe(t,e);if(e=0,w.be(t),y=t.oe,k=t.Gt,f=n.ue,b=n.ae,g=n.write,v=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,e=n.pe(t,e),g=n.write,v=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);s=8;case 8:return e=1,n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);case 9:return e=-3,n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e);default:return e=-2,n.ue=f,n.ae=b,t.Gt=k,t.Yt+=y-t.oe,t.oe=y,n.write=g,n.pe(t,e)}}},n.be=t=>{n.reset(t,null),n.he=null,d=null},n.ke=(t,e,r)=>{n.he.set(t.subarray(e,e+r),0),n.read=n.write=r},n.ge=()=>1==s?1:0}const kt=[0,0,255,255];function gt(){const t=this;function e(t){return t&&t.ve?(t.Yt=t.Zt=0,t.Qt=null,t.ve.mode=7,t.ve.me.reset(t,null),0):-2}t.mode=0,t.method=0,t.ze=[0],t.Se=0,t.marker=0,t._e=0,t.Ie=e=>(t.me&&t.me.be(e),t.me=null,0),t.Ce=(n,r)=>(n.Qt=null,t.me=null,8>r||r>15?(t.Ie(n),-2):(t._e=r,n.ve.me=new yt(n,1<<r),e(n),0)),t.nt=(t,e)=>{let n,r;if(!t||!t.ve||!t.ie)return-2;const i=t.ve;for(e=4==e?-5:0,n=-5;;)switch(i.mode){case 0:if(0===t.Gt)return n;if(n=e,t.Gt--,t.Yt++,8!=(15&(i.method=t.we(t.oe++)))){i.mode=13,t.Qt="unknown compression method",i.marker=5;break}if(8+(i.method>>4)>i._e){i.mode=13,t.Qt="invalid win size",i.marker=5;break}i.mode=1;case 1:if(0===t.Gt)return n;if(n=e,t.Gt--,t.Yt++,r=255&t.we(t.oe++),((i.method<<8)+r)%31!=0){i.mode=13,t.Qt="incorrect header check",i.marker=5;break}if(0==(32&r)){i.mode=7;break}i.mode=2;case 2:if(0===t.Gt)return n;n=e,t.Gt--,t.Yt++,i.Se=(255&t.we(t.oe++))<<24&4278190080,i.mode=3;case 3:if(0===t.Gt)return n;n=e,t.Gt--,t.Yt++,i.Se+=(255&t.we(t.oe++))<<16&16711680,i.mode=4;case 4:if(0===t.Gt)return n;n=e,t.Gt--,t.Yt++,i.Se+=(255&t.we(t.oe++))<<8&65280,i.mode=5;case 5:return 0===t.Gt?n:(n=e,t.Gt--,t.Yt++,i.Se+=255&t.we(t.oe++),i.mode=6,2);case 6:return i.mode=13,t.Qt="need dictionary",i.marker=0,-2;case 7:if(n=i.me.de(t,n),-3==n){i.mode=13,i.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,i.me.reset(t,i.ze),i.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.Ae=(t,e,n)=>{let r=0,i=n;if(!t||!t.ve||6!=t.ve.mode)return-2;const s=t.ve;return i<1<<s._e||(i=(1<<s._e)-1,r=n-i),s.me.ke(e,r,i),s.mode=7,0},t.Ve=t=>{let n,r,i,s,o;if(!t||!t.ve)return-2;const f=t.ve;if(13!=f.mode&&(f.mode=13,f.marker=0),0===(n=t.Gt))return-5;for(r=t.oe,i=f.marker;0!==n&&4>i;)t.we(r)==kt[i]?i++:i=0!==t.we(r)?0:4-i,r++,n--;return t.Yt+=r-t.oe,t.oe=r,t.Gt=n,f.marker=i,4!=i?-3:(s=t.Yt,o=t.Zt,e(t),t.Yt=s,t.Zt=o,f.mode=7,0)},t.Ee=t=>t&&t.ve&&t.ve.me?t.ve.me.ge():-2}function vt(){}function mt(t){const e=new vt,s=t&&t.et?n.floor(2*t.et):131072,o=new i(s);let f=!1;e.Ce(),e.re=o,this.append=(t,n)=>{const c=[];let l,u,a=0,w=0,h=0;if(0!==t.length){e.oe=0,e.ie=t,e.Gt=t.length;do{if(e.fe=0,e.se=s,0!==e.Gt||f||(e.oe=0,f=!0),l=e.nt(0),f&&-5===l){if(0!==e.Gt)throw new r("inflating: bad input")}else if(0!==l&&1!==l)throw new r("inflating: "+e.Qt);if((f||1===l)&&e.Gt===t.length)throw new r("inflating: bad input");e.fe&&(e.fe===s?c.push(new i(o)):c.push(o.slice(0,e.fe))),h+=e.fe,n&&e.oe>0&&e.oe!=a&&(n(e.oe),a=e.oe)}while(e.Gt>0||0===e.se);return c.length>1?(u=new i(h),c.forEach((t=>{u.set(t,w),w+=t.length}))):u=c[0]||new i(0),u}},this.flush=()=>{e.Ie()}}vt.prototype={Ce:function(t){const e=this;return e.ve=new gt,t||(t=15),e.ve.Ce(e,t)},nt:function(t){const e=this;return e.ve?e.ve.nt(e,t):-2},Ie:function(){const t=this;if(!t.ve)return-2;const e=t.ve.Ie(t);return t.ve=null,e},Ve:function(){const t=this;return t.ve?t.ve.Ve(t):-2},Ae:function(t,e){const n=this;return n.ve?n.ve.Ae(n,t,e):-2},we:function(t){return this.ie[t]},Jt:function(t,e){return this.ie.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=ot,self.Inflate=mt};
`],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}};const Sc="text/plain";class Zh{constructor(){this.size=0}init(){this.initialized=!0}}class Gh extends Zh{}class bd extends Zh{writeUint8Array(t){this.size+=t.length}}class e_ extends Gh{constructor(t){super(),this.blobReader=new Yh(new Blob([t],{type:Sc}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,n){return this.blobReader.readUint8Array(t,n)}}class t_ extends bd{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Sc})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Sc})}getData(){if(this.blob.text)return this.blob.text();{const t=new FileReader;return new Promise((n,r)=>{t.onload=i=>n(i.target.result),t.onerror=()=>r(t.error),t.readAsText(this.blob,this.encoding)})}}}class n_ extends bd{constructor(t){super(),this.data="data:"+(t||"")+";base64,",this.pending=[]}async writeUint8Array(t){super.writeUint8Array(t);let n=0,r=this.pending;const i=this.pending.length;for(this.pending="",n=0;n<Math.floor((i+t.length)/3)*3-i;n++)r+=String.fromCharCode(t[n]);for(;n<t.length;n++)this.pending+=String.fromCharCode(t[n]);r.length>2?this.data+=btoa(r):this.pending=r}getData(){return this.data+btoa(this.pending)}}class Yh extends Gh{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,n){if(this.blob.arrayBuffer)return new Uint8Array(await this.blob.slice(t,t+n).arrayBuffer());{const r=new FileReader;return new Promise((i,o)=>{r.onload=a=>i(new Uint8Array(a.target.result)),r.onerror=()=>o(r.error),r.readAsArrayBuffer(this.blob.slice(t,t+n))})}}}class r_ extends bd{constructor(t){super(),this.contentType=t,this.arrayBuffers=[]}async writeUint8Array(t){super.writeUint8Array(t),this.arrayBuffers.push(t.buffer)}getData(){return this.blob||(this.blob=new Blob(this.arrayBuffers,{type:this.contentType})),this.blob}}const Ct=4294967295,pn=65535,Ic=8,Wh=0,qh=99,Xh=67324752,i_=134695760,Mc=33639248,Kh=101010256,Tc=101075792,Jh=117853008,ys=22,Wa=20,qa=56,o_=ys+Wa+qa,a_=1,Qh=1,ep=39169,tp=10,np=1,xd=21589,s_=28789,l_=25461,Lc=1,c_=6,Oc=8,Nc=2048,Rc=16,d_=20,a1=45,s1=51,Xa="/",l1=new Date(2107,11,31),c1=new Date(1980,0,1),u_="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split("");var f_=e=>{let t="";for(let n=0;n<e.length;n++)t+=u_[e[n]];return t};async function Dc(e,t){if(t&&t.trim().toLowerCase()=="cp437")return f_(e);if(typeof TextDecoder=="undefined"){const n=new FileReader;return new Promise((r,i)=>{n.onload=o=>r(o.target.result),n.onerror=()=>i(n.error),n.readAsText(new Blob([e]))})}else return new TextDecoder(t).decode(e)}const h_=64,p_="Abort error";async function rp(e,t,n,r,i,o,a){const s=Math.max(o.chunkSize,h_);return l();async function l(d=0,c=0){const u=a.signal;if(d<i){Dl(u,e);const f=await t.readUint8Array(d+r,Math.min(s,i-d)),h=f.length;Dl(u,e);const w=await e.append(f);if(Dl(u,e),c+=await d1(n,w),a.onprogress)try{a.onprogress(d+h,i)}catch{}return l(d+s,c)}else{const f=await e.flush();return c+=await d1(n,f.data),{signature:f.signature,length:c}}}}function Dl(e,t){if(e&&e.aborted)throw t.abort(),new Error(p_)}async function d1(e,t){return t.length&&await e.writeUint8Array(t),t.length}const g_=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class ks{constructor(t){g_.forEach(n=>this[n]=t[n])}}const Fl="File format is not recognized",m_="End of central directory not found",__="End of Zip64 central directory not found",w_="End of Zip64 central directory locator not found",v_="Central directory header not found",b_="Local file header not found",x_="Zip64 extra field not found",y_="File contains encrypted entry",k_="Encryption method not supported",u1="Compression method not supported",f1="utf-8",h1="cp437",p1=["uncompressedSize","compressedSize","offset"];class C_{constructor(t,n={}){Object.assign(this,{reader:t,options:n,config:Eh()})}async getEntries(t={}){const n=this,r=n.reader;if(r.initialized||await r.init(),r.size<ys)throw new Error(Fl);const i=await T_(r,Kh,r.size,ys,pn*16);if(!i)throw new Error(m_);const o=St(i);let a=ft(o,12),s=ft(o,16),l=Zt(o,8),d=0;if(s==Ct||a==Ct||l==pn){const w=await hr(r,i.offset-Wa,Wa),_=St(w);if(ft(_,0)!=Jh)throw new Error(__);s=Ka(_,8);let g=await hr(r,s,qa),m=St(g);const v=i.offset-Wa-qa;if(ft(m,0)!=Tc&&s!=v){const x=s;s=v,d=s-x,g=await hr(r,s,qa),m=St(g)}if(ft(m,0)!=Tc)throw new Error(w_);l=Ka(m,32),a=Ka(m,40),s-=a}if(s<0||s>=r.size)throw new Error(Fl);let c=0,u=await hr(r,s,a),f=St(u);if(a){const w=i.offset-a;if(ft(f,c)!=Mc&&s!=w){const _=s;s=w,d=s-_,u=await hr(r,s,a),f=St(u)}}if(s<0||s>=r.size)throw new Error(Fl);const h=[];for(let w=0;w<l;w++){const _=new E_(r,n.config,n.options);if(ft(f,c)!=Mc)throw new Error(v_);ip(_,f,c+6);const g=Boolean(_.bitFlag.languageEncodingFlag),m=c+46,v=m+_.filenameLength,x=v+_.extraFieldLength,b=Zt(f,c+4),y=(b&0)==0;Object.assign(_,{versionMadeBy:b,msDosCompatible:y,compressedSize:0,uncompressedSize:0,commentLength:Zt(f,c+32),directory:y&&(Ni(f,c+38)&Rc)==Rc,offset:ft(f,c+42)+d,internalFileAttribute:ft(f,c+34),externalFileAttribute:ft(f,c+38),rawFilename:u.subarray(m,v),filenameUTF8:g,commentUTF8:g,rawExtraField:u.subarray(v,x)});const k=x+_.commentLength;_.rawComment=u.subarray(x,k);const C=Ei(n,t,"filenameEncoding"),E=Ei(n,t,"commentEncoding"),[M,S]=await Promise.all([Dc(_.rawFilename,_.filenameUTF8?f1:C||h1),Dc(_.rawComment,_.commentUTF8?f1:E||h1)]);_.filename=M,_.comment=S,!_.directory&&_.filename.endsWith(Xa)&&(_.directory=!0),await op(_,_,f,c+6);const T=new ks(_);if(T.getData=(z,F)=>_.getData(z,T,F),h.push(T),c=k,t.onprogress)try{t.onprogress(w+1,l,new ks(_))}catch{}}return h}async close(){}}class E_{constructor(t,n,r){Object.assign(this,{reader:t,config:n,options:r})}async getData(t,n,r={}){const i=this,{reader:o,offset:a,extraFieldAES:s,compressionMethod:l,config:d,bitFlag:c,signature:u,rawLastModDate:f,compressedSize:h}=i,w=i.localDirectory={};o.initialized||await o.init();let _=await hr(o,a,30);const g=St(_);let m=Ei(i,r,"password");if(m=m&&m.length&&m,s&&s.originalCompressionMethod!=qh)throw new Error(u1);if(l!=Wh&&l!=Ic)throw new Error(u1);if(ft(g,0)!=Xh)throw new Error(b_);ip(w,g,4),_=await hr(o,a,30+w.filenameLength+w.extraFieldLength),w.rawExtraField=_.subarray(30+w.filenameLength),await op(i,w,g,4),n.lastAccessDate=w.lastAccessDate,n.creationDate=w.creationDate;const v=i.encrypted&&w.encrypted,x=v&&!s;if(v){if(!x&&s.strength===void 0)throw new Error(k_);if(!m)throw new Error(y_)}const b=await Hh(d.Inflate,{codecType:Uh,password:m,zipCrypto:x,encryptionStrength:s&&s.strength,signed:Ei(i,r,"checkSignature"),passwordVerification:x&&(c.dataDescriptor?f>>>8&255:u>>>24&255),signature:u,compressed:l!=0,encrypted:v,useWebWorkers:Ei(i,r,"useWebWorkers")},d);t.initialized||await t.init();const y=Ei(i,r,"signal"),k=a+30+w.filenameLength+w.extraFieldLength;return await rp(b,o,t,k,h,d,{onprogress:r.onprogress,signal:y}),t.getData()}}function ip(e,t,n){const r=e.rawBitFlag=Zt(t,n+2),i=(r&Lc)==Lc,o=ft(t,n+6);Object.assign(e,{encrypted:i,version:Zt(t,n),bitFlag:{level:(r&c_)>>1,dataDescriptor:(r&Oc)==Oc,languageEncodingFlag:(r&Nc)==Nc},rawLastModDate:o,lastModDate:L_(o),filenameLength:Zt(t,n+22),extraFieldLength:Zt(t,n+24)})}async function op(e,t,n,r){const i=t.rawExtraField,o=t.extraField=new Map,a=St(new Uint8Array(i));let s=0;try{for(;s<i.length;){const _=Zt(a,s),g=Zt(a,s+2);o.set(_,{type:_,data:i.slice(s+4,s+4+g)}),s+=4+g}}catch{}const l=Zt(n,r+4);t.signature=ft(n,r+10),t.uncompressedSize=ft(n,r+18),t.compressedSize=ft(n,r+14);const d=o.get(Qh);d&&(A_(d,t),t.extraFieldZip64=d);const c=o.get(s_);c&&(await g1(c,"filename","rawFilename",t,e),t.extraFieldUnicodePath=c);const u=o.get(l_);u&&(await g1(u,"comment","rawComment",t,e),t.extraFieldUnicodeComment=u);const f=o.get(ep);f?(S_(f,t,l),t.extraFieldAES=f):t.compressionMethod=l;const h=o.get(tp);h&&(I_(h,t),t.extraFieldNTFS=h);const w=o.get(xd);w&&(M_(w,t),t.extraFieldExtendedTimestamp=w)}function A_(e,t){t.zip64=!0;const n=St(e.data);e.values=[];for(let i=0;i<Math.floor(e.data.length/8);i++)e.values.push(Ka(n,0+i*8));const r=p1.filter(i=>t[i]==Ct);for(let i=0;i<r.length;i++)e[r[i]]=e.values[i];p1.forEach(i=>{if(t[i]==Ct)if(e[i]!==void 0)t[i]=e[i];else throw new Error(x_)})}async function g1(e,t,n,r,i){const o=St(e.data);e.version=Ni(o,0),e.signature=ft(o,1);const a=new $o;a.append(i[n]);const s=St(new Uint8Array(4));s.setUint32(0,a.get(),!0),e[t]=await Dc(e.data.subarray(5)),e.valid=!i.bitFlag.languageEncodingFlag&&e.signature==ft(s,0),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function S_(e,t,n){const r=St(e.data);e.vendorVersion=Ni(r,0),e.vendorId=Ni(r,2);const i=Ni(r,4);e.strength=i,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=Zt(r,5)}function I_(e,t){const n=St(e.data);let r=4,i;try{for(;r<e.data.length&&!i;){const o=Zt(n,r),a=Zt(n,r+2);o==np&&(i=e.data.slice(r+4,r+4+a)),r+=4+a}}catch{}try{if(i&&i.length==24){const o=St(i),a=o.getBigUint64(0,!0),s=o.getBigUint64(8,!0),l=o.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:a,rawLastAccessDate:s,rawCreationDate:l});const d=Pl(a),c=Pl(s),u=Pl(l),f={lastModDate:d,lastAccessDate:c,creationDate:u};Object.assign(e,f),Object.assign(t,f)}}catch{}}function M_(e,t){const n=St(e.data),r=Ni(n,0),i=[],o=[];(r&1)==1&&(i.push("lastModDate"),o.push("rawLastModDate")),(r&2)==2&&(i.push("lastAccessDate"),o.push("rawLastAccessDate")),(r&4)==4&&(i.push("creationDate"),o.push("rawCreationDate"));let a=1;i.forEach((s,l)=>{if(e.data.length>=a+4){const d=ft(n,a);t[s]=e[s]=new Date(d*1e3);const c=o[l];e[c]=d}a+=4})}async function T_(e,t,n,r,i){const o=new Uint8Array(4),a=St(o);O_(a,0,t);const s=r+i;return await l(r)||await l(Math.min(s,n));async function l(d){const c=n-d,u=await hr(e,c,d);for(let f=u.length-r;f>=0;f--)if(u[f]==o[0]&&u[f+1]==o[1]&&u[f+2]==o[2]&&u[f+3]==o[3])return{offset:c+f,buffer:u.slice(f,f+r).buffer}}}function Ei(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function L_(e){const t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function Pl(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function Ni(e,t){return e.getUint8(t)}function Zt(e,t){return e.getUint16(t,!0)}function ft(e,t){return e.getUint32(t,!0)}function Ka(e,t){return Number(e.getBigUint64(t,!0))}function O_(e,t,n){e.setUint32(t,n,!0)}function St(e){return new DataView(e.buffer)}function hr(e,t,n){return e.readUint8Array(t,n)}const N_="File already exists",R_="Zip file comment exceeds 64KB",D_="File entry comment exceeds 64KB",F_="File entry name exceeds 64KB",m1="Version exceeds 65535",P_="The strength must equal 1, 2, or 3",$_="Extra field type exceeds 65535",B_="Extra field data exceeds 64KB",yd="Zip64 is not supported",_1=new Uint8Array([7,0,2,0,65,69,3,0,0]),w1=24;let $l=0;class z_{constructor(t,n={}){Object.assign(this,{writer:t,options:n,config:Eh(),files:new Map,offset:t.size,pendingCompressedSize:0,pendingEntries:[]})}async add(t="",n,r={}){const i=this;if($l<i.config.maxWorkers){$l++;try{return await j_(i,t,n,r)}finally{$l--;const o=i.pendingEntries.shift();o&&i.add(o.name,o.reader,o.options).then(o.resolve).catch(o.reject)}}else return new Promise((o,a)=>i.pendingEntries.push({name:t,reader:n,options:r,resolve:o,reject:a}))}async close(t=new Uint8Array(0),n={}){return await H_(this,t,n),this.writer.getData()}}async function j_(e,t,n,r){if(t=t.trim(),r.directory&&!t.endsWith(Xa)?t+=Xa:r.directory=t.endsWith(Xa),e.files.has(t))throw new Error(N_);const i=Ac(t);if(i.length>pn)throw new Error(F_);const o=r.comment||"",a=Ac(o);if(a.length>pn)throw new Error(D_);const s=e.options.version||r.version||0;if(s>pn)throw new Error(m1);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>pn)throw new Error(m1);const d=xt(e,r,"lastModDate")||new Date,c=xt(e,r,"lastAccessDate"),u=xt(e,r,"creationDate"),f=xt(e,r,"password"),h=xt(e,r,"encryptionStrength")||3,w=xt(e,r,"zipCrypto");if(f!==void 0&&h!==void 0&&(h<1||h>3))throw new Error(P_);let _=new Uint8Array(0);const g=r.extraField;if(g){let L=0,j=0;g.forEach(Z=>L+=4+Z.length),_=new Uint8Array(L),g.forEach((Z,Q)=>{if(Q>pn)throw new Error($_);if(Z.length>pn)throw new Error(B_);gt(_,new Uint16Array([Q]),j),gt(_,new Uint16Array([Z.length]),j+2),gt(_,Z,j+4),j+=4+Z.length})}let m=xt(e,r,"extendedTimestamp");m===void 0&&(m=!0);let v=0,x=xt(e,r,"keepOrder");x===void 0&&(x=!0);let b=0,y=xt(e,r,"msDosCompatible");y===void 0&&(y=!0);const k=xt(e,r,"internalFileAttribute")||0,C=xt(e,r,"externalFileAttribute")||0;n&&(n.initialized||await n.init(),b=n.size,v=G_(b));let E=r.zip64||e.options.zip64||!1;if(e.offset+e.pendingCompressedSize>=Ct||b>=Ct||v>=Ct){if(r.zip64===!1||e.options.zip64===!1||!x)throw new Error(yd);E=!0}e.pendingCompressedSize+=v,await Promise.resolve();const M=xt(e,r,"level"),S=xt(e,r,"useWebWorkers"),T=xt(e,r,"bufferedWrite");let z=xt(e,r,"dataDescriptor"),F=xt(e,r,"dataDescriptorSignature");const R=xt(e,r,"signal");z===void 0&&(z=!0),z&&F===void 0&&(F=!0);const V=await V_(e,t,n,Object.assign({},r,{rawFilename:i,rawComment:a,version:s,versionMadeBy:l,lastModDate:d,lastAccessDate:c,creationDate:u,rawExtraField:_,zip64:E,password:f,level:M,useWebWorkers:S,encryptionStrength:h,extendedTimestamp:m,zipCrypto:w,bufferedWrite:T,keepOrder:x,dataDescriptor:z,dataDescriptorSignature:F,signal:R,msDosCompatible:y,internalFileAttribute:k,externalFileAttribute:C}));return v&&(e.pendingCompressedSize-=v),Object.assign(V,{name:t,comment:o,extraField:g}),new ks(V)}async function V_(e,t,n,r){const i=e.files,o=e.writer,a=Array.from(i.values()).pop();let s={},l,d,c;i.set(t,s);try{let u,f,h;if(r.keepOrder&&(u=a&&a.lock),s.lock=h=new Promise(w=>c=w),r.bufferedWrite||e.lockWrite||!r.dataDescriptor?(f=new r_,f.init(),l=!0):(e.lockWrite=new Promise(w=>d=w),o.initialized||await o.init(),f=o),s=await U_(n,f,e.config,r),s.lock=h,i.set(t,s),s.filename=t,l){let w=0;const _=f.getData();await Promise.all([e.lockWrite,u]);let g;do g=Array.from(i.values()).find(m=>m.writingBufferedData),g&&await g.lock;while(g&&g.lock);if(s.writingBufferedData=!0,!r.dataDescriptor){const v=await ap(_,0,26),x=new DataView(v);(!s.encrypted||r.zipCrypto)&&Ue(x,14,s.signature),s.zip64?(Ue(x,18,Ct),Ue(x,22,Ct)):(Ue(x,18,s.compressedSize),Ue(x,22,s.uncompressedSize)),await o.writeUint8Array(new Uint8Array(v)),w=26}await Z_(o,_,w),delete s.writingBufferedData}if(s.offset=e.offset,s.zip64){const w=fn(s.rawExtraFieldZip64);Pt(w,20,BigInt(s.offset))}else if(s.offset>=Ct)throw new Error(yd);return e.offset+=s.length,s}catch(u){throw(l&&s.writingBufferedData||!l&&s.dataWritten)&&(u.corruptedEntry=e.hasCorruptedEntries=!0,s.uncompressedSize&&(e.offset+=s.uncompressedSize)),i.delete(t),u}finally{c(),d&&d()}}async function U_(e,t,n,r){const{rawFilename:i,lastAccessDate:o,creationDate:a,password:s,level:l,zip64:d,zipCrypto:c,dataDescriptor:u,dataDescriptorSignature:f,directory:h,version:w,versionMadeBy:_,rawComment:g,rawExtraField:m,useWebWorkers:v,onprogress:x,signal:b,encryptionStrength:y,extendedTimestamp:k,msDosCompatible:C,internalFileAttribute:E,externalFileAttribute:M}=r,S=Boolean(s&&s.length),T=l!==0&&!h;let z;if(S&&!c){z=new Uint8Array(_1.length+2);const Se=fn(z);Xe(Se,0,ep),gt(z,_1,2),Cs(Se,8,y)}else z=new Uint8Array(0);let F,R;if(k){R=new Uint8Array(9+(o?4:0)+(a?4:0));const Se=fn(R);Xe(Se,0,xd),Xe(Se,2,R.length-4);const Te=1+(o?2:0)+(a?4:0);Cs(Se,4,Te),Ue(Se,5,Math.floor(r.lastModDate.getTime()/1e3)),o&&Ue(Se,9,Math.floor(o.getTime()/1e3)),a&&Ue(Se,13,Math.floor(a.getTime()/1e3));try{F=new Uint8Array(36);const Le=fn(F),se=Bl(r.lastModDate);Xe(Le,0,tp),Xe(Le,2,32),Xe(Le,8,np),Xe(Le,10,24),Pt(Le,12,se),Pt(Le,20,Bl(o)||se),Pt(Le,28,Bl(a)||se)}catch{F=new Uint8Array(0)}}else F=R=new Uint8Array(0);const V={version:w||d_,versionMadeBy:_,zip64:d,directory:Boolean(h),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:g,rawExtraFieldZip64:d?new Uint8Array(w1+4):new Uint8Array(0),rawExtraFieldExtendedTimestamp:R,rawExtraFieldNTFS:F,rawExtraFieldAES:z,rawExtraField:m,extendedTimestamp:k,msDosCompatible:C,internalFileAttribute:E,externalFileAttribute:M};let L=V.uncompressedSize=0,j=Nc;u&&(j=j|Oc);let Z=Wh;T&&(Z=Ic),d&&(V.version=V.version>a1?V.version:a1),S&&(j=j|Lc,c||(V.version=V.version>s1?V.version:s1,Z=qh,T&&(V.rawExtraFieldAES[9]=Ic))),V.compressionMethod=Z;const Q=V.headerArray=new Uint8Array(26),D=fn(Q);Xe(D,0,V.version),Xe(D,2,j),Xe(D,4,Z);const A=new Uint32Array(1),O=fn(A);let $;r.lastModDate<c1?$=c1:r.lastModDate>l1?$=l1:$=r.lastModDate,Xe(O,0,($.getHours()<<6|$.getMinutes())<<5|$.getSeconds()/2),Xe(O,2,($.getFullYear()-1980<<4|$.getMonth()+1)<<5|$.getDate());const X=A[0];Ue(D,6,X),Xe(D,22,i.length);const ie=z.length+R.length+F.length+V.rawExtraField.length;Xe(D,24,ie);const B=new Uint8Array(30+i.length+ie),K=fn(B);Ue(K,0,Xh),gt(B,Q,4),gt(B,i,30),gt(B,z,30+i.length),gt(B,R,30+i.length+z.length),gt(B,F,30+i.length+z.length+R.length),gt(B,V.rawExtraField,30+i.length+z.length+R.length+F.length);let de,he=0;if(e){L=V.uncompressedSize=e.size;const Se=await Hh(n.Deflate,{codecType:Vh,level:l,password:s,encryptionStrength:y,zipCrypto:S&&c,passwordVerification:S&&c&&X>>8&255,signed:!0,compressed:T,encrypted:S,useWebWorkers:v},n);await t.writeUint8Array(B),V.dataWritten=!0,de=await rp(Se,e,t,0,L,n,{onprogress:x,signal:b}),he=de.length}else await t.writeUint8Array(B),V.dataWritten=!0;let De=new Uint8Array(0),Ie,Ze=0;if(u&&(De=new Uint8Array(d?f?24:20:f?16:12),Ie=fn(De),f&&(Ze=4,Ue(Ie,0,i_))),e){const Se=de.signature;if((!S||c)&&Se!==void 0&&(Ue(D,10,Se),V.signature=Se,u&&Ue(Ie,Ze,Se)),d){const Te=fn(V.rawExtraFieldZip64);Xe(Te,0,Qh),Xe(Te,2,w1),Ue(D,14,Ct),Pt(Te,12,BigInt(he)),Ue(D,18,Ct),Pt(Te,4,BigInt(L)),u&&(Pt(Ie,Ze+4,BigInt(he)),Pt(Ie,Ze+12,BigInt(L)))}else Ue(D,14,he),Ue(D,18,L),u&&(Ue(Ie,Ze+4,he),Ue(Ie,Ze+8,L))}u&&await t.writeUint8Array(De);const nt=B.length+he+De.length;return Object.assign(V,{compressedSize:he,lastModDate:$,rawLastModDate:X,creationDate:a,lastAccessDate:o,encrypted:S,length:nt}),V}async function H_(e,t,n){const r=e.writer,i=e.files;let o=0,a=0,s=e.offset,l=i.size;for(const[,f]of i)a+=46+f.rawFilename.length+f.rawComment.length+f.rawExtraFieldZip64.length+f.rawExtraFieldAES.length+f.rawExtraFieldExtendedTimestamp.length+f.rawExtraFieldNTFS.length+f.rawExtraField.length;let d=n.zip64||e.options.zip64||!1;if(s>=Ct||a>=Ct||l>=pn){if(n.zip64===!1||e.options.zip64===!1)throw new Error(yd);d=!0}const c=new Uint8Array(a+(d?o_:ys)),u=fn(c);if(t&&t.length)if(t.length<=pn)Xe(u,o+20,t.length);else throw new Error(R_);for(const[f,h]of Array.from(i.values()).entries()){const{rawFilename:w,rawExtraFieldZip64:_,rawExtraFieldAES:g,rawExtraField:m,rawComment:v,versionMadeBy:x,headerArray:b,directory:y,zip64:k,msDosCompatible:C,internalFileAttribute:E,externalFileAttribute:M}=h;let S,T;if(h.extendedTimestamp){T=h.rawExtraFieldNTFS,S=new Uint8Array(9);const F=fn(S);Xe(F,0,xd),Xe(F,2,S.length-4),Cs(F,4,1),Ue(F,5,Math.floor(h.lastModDate.getTime()/1e3))}else T=S=new Uint8Array(0);const z=_.length+g.length+S.length+T.length+m.length;if(Ue(u,o,Mc),Xe(u,o+4,x),gt(c,b,o+6),Xe(u,o+30,z),Xe(u,o+32,v.length),Ue(u,o+34,E),M?Ue(u,o+38,M):y&&C&&Cs(u,o+38,Rc),k?Ue(u,o+42,Ct):Ue(u,o+42,h.offset),gt(c,w,o+46),gt(c,_,o+46+w.length),gt(c,g,o+46+w.length+_.length),gt(c,S,o+46+w.length+_.length+g.length),gt(c,T,o+46+w.length+_.length+g.length+S.length),gt(c,m,o+46+w.length+_.length+g.length+S.length+T.length),gt(c,v,o+46+w.length+z),o+=46+w.length+z+v.length,n.onprogress)try{n.onprogress(f+1,i.size,new ks(h))}catch{}}d&&(Ue(u,o,Tc),Pt(u,o+4,BigInt(44)),Xe(u,o+12,45),Xe(u,o+14,45),Pt(u,o+24,BigInt(l)),Pt(u,o+32,BigInt(l)),Pt(u,o+40,BigInt(a)),Pt(u,o+48,BigInt(s)),Ue(u,o+56,Jh),Pt(u,o+64,BigInt(s)+BigInt(a)),Ue(u,o+72,a_),l=pn,s=Ct,a=Ct,o+=76),Ue(u,o,Kh),Xe(u,o+8,l),Xe(u,o+10,l),Ue(u,o+12,a),Ue(u,o+16,s),await r.writeUint8Array(c),t&&t.length&&await r.writeUint8Array(t)}function ap(e,t,n){if(e.arrayBuffer)return t||n?e.slice(t,n).arrayBuffer():e.arrayBuffer();{const r=new FileReader;return new Promise((i,o)=>{r.onload=a=>i(a.target.result),r.onerror=()=>o(r.error),r.readAsArrayBuffer(t||n?e.slice(t,n):e)})}}async function Z_(e,t,n=0){await i();async function i(){if(n<t.size){const o=await ap(t,n,n+536870912);await e.writeUint8Array(new Uint8Array(o)),n+=536870912,await i()}}}function Bl(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function xt(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function G_(e){return e+5*(Math.floor(e/16383)+1)}function Cs(e,t,n){e.setUint8(t,n)}function Xe(e,t,n){e.setUint16(t,n,!0)}function Ue(e,t,n){e.setUint32(t,n,!0)}function Pt(e,t,n){e.setBigUint64(t,n,!0)}function gt(e,t,n){e.set(t,n)}function fn(e){return new DataView(e.buffer)}let sp;try{sp=kk.url}catch{}md({baseURL:sp});Q5(md);md({Deflate:u5,Inflate:O5});var it={},la={},an={};function lp(e){return typeof e=="undefined"||e===null}function Y_(e){return typeof e=="object"&&e!==null}function W_(e){return Array.isArray(e)?e:lp(e)?[]:[e]}function q_(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}function X_(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function K_(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}an.isNothing=lp;an.isObject=Y_;an.toArray=W_;an.repeat=X_;an.isNegativeZero=K_;an.extend=q_;function zo(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||""}zo.prototype=Object.create(Error.prototype);zo.prototype.constructor=zo;zo.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var ca=zo,v1=an;function kd(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}kd.prototype.getSnippet=function(t,n){var r,i,o,a,s;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(o="",a=this.position;a<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a))===-1;)if(a+=1,a-this.position>n/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),v1.repeat(" ",t)+r+s+o+`
`+v1.repeat(" ",t+this.position-i+r.length)+"^"};kd.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 J_=kd,b1=ca,Q_=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],e8=["scalar","sequence","mapping"];function t8(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function n8(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(Q_.indexOf(n)===-1)throw new b1('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=t8(t.styleAliases||null),e8.indexOf(this.kind)===-1)throw new b1('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var wt=n8,x1=an,Ja=ca,r8=wt;function Fc(e,t,n){var r=[];return e.include.forEach(function(i){n=Fc(i,t,n)}),e[t].forEach(function(i){n.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&r.push(a)}),n.push(i)}),n.filter(function(i,o){return r.indexOf(o)===-1})}function i8(){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 Ai(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 Ja("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Fc(this,"implicit",[]),this.compiledExplicit=Fc(this,"explicit",[]),this.compiledTypeMap=i8(this.compiledImplicit,this.compiledExplicit)}Ai.DEFAULT=null;Ai.create=function(){var t,n;switch(arguments.length){case 1:t=Ai.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Ja("Wrong number of arguments for Schema.create function")}if(t=x1.toArray(t),n=x1.toArray(n),!t.every(function(r){return r instanceof Ai}))throw new Ja("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof r8}))throw new Ja("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Ai({include:t,explicit:n})};var to=Ai,o8=wt,a8=new o8("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),s8=wt,l8=new s8("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),c8=wt,d8=new c8("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),u8=to,Cd=new u8({explicit:[a8,l8,d8]}),f8=wt;function h8(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function p8(){return null}function g8(e){return e===null}var m8=new f8("tag:yaml.org,2002:null",{kind:"scalar",resolve:h8,construct:p8,predicate:g8,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),_8=wt;function w8(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 v8(e){return e==="true"||e==="True"||e==="TRUE"}function b8(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var x8=new _8("tag:yaml.org,2002:bool",{kind:"scalar",resolve:w8,construct:v8,predicate:b8,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),y8=an,k8=wt;function C8(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function E8(e){return 48<=e&&e<=55}function A8(e){return 48<=e&&e<=57}function S8(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(!C8(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!E8(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(!A8(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function I8(e){var t=e,n=1,r,i,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(a){o.unshift(parseInt(a,10))}),t=0,i=1,o.forEach(function(a){t+=a*i,i*=60}),n*t):n*parseInt(t,10)}function M8(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!y8.isNegativeZero(e)}var T8=new k8("tag:yaml.org,2002:int",{kind:"scalar",resolve:S8,construct:I8,predicate:M8,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"]}}),cp=an,L8=wt,O8=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 N8(e){return!(e===null||!O8.test(e)||e[e.length-1]==="_")}function R8(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){i.unshift(parseFloat(o,10))}),t=0,r=1,i.forEach(function(o){t+=o*r,r*=60}),n*t):n*parseFloat(t,10)}var D8=/^[-+]?[0-9]+e/;function F8(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(cp.isNegativeZero(e))return"-0.0";return n=e.toString(10),D8.test(n)?n.replace("e",".e"):n}function P8(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||cp.isNegativeZero(e))}var $8=new L8("tag:yaml.org,2002:float",{kind:"scalar",resolve:N8,construct:R8,predicate:P8,represent:F8,defaultStyle:"lowercase"}),B8=to,dp=new B8({include:[Cd],implicit:[m8,x8,T8,$8]}),z8=to,up=new z8({include:[dp]}),j8=wt,fp=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),hp=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 V8(e){return e===null?!1:fp.exec(e)!==null||hp.exec(e)!==null}function U8(e){var t,n,r,i,o,a,s,l=0,d=null,c,u,f;if(t=fp.exec(e),t===null&&(t=hp.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),d=(c*60+u)*6e4,t[9]==="-"&&(d=-d)),f=new Date(Date.UTC(n,r,i,o,a,s,l)),d&&f.setTime(f.getTime()-d),f}function H8(e){return e.toISOString()}var Z8=new j8("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:V8,construct:U8,instanceOf:Date,represent:H8}),G8=wt;function Y8(e){return e==="<<"||e===null}var W8=new G8("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Y8}),$r;try{var q8=ch;$r=q8("buffer").Buffer}catch{}var X8=wt,Ed=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function K8(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Ed;for(n=0;n<i;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function J8(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Ed,a=0,s=[];for(t=0;t<i;t++)t%4===0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):n===18?(s.push(a>>10&255),s.push(a>>2&255)):n===12&&s.push(a>>4&255),$r?$r.from?$r.from(s):new $r(s):s}function Q8(e){var t="",n=0,r,i,o=e.length,a=Ed;for(r=0;r<o;r++)r%3===0&&r&&(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]):i===2?(t+=a[n>>10&63],t+=a[n>>4&63],t+=a[n<<2&63],t+=a[64]):i===1&&(t+=a[n>>2&63],t+=a[n<<4&63],t+=a[64],t+=a[64]),t}function e3(e){return $r&&$r.isBuffer(e)}var t3=new X8("tag:yaml.org,2002:binary",{kind:"scalar",resolve:K8,construct:J8,predicate:e3,represent:Q8}),n3=wt,r3=Object.prototype.hasOwnProperty,i3=Object.prototype.toString;function o3(e){if(e===null)return!0;var t=[],n,r,i,o,a,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],a=!1,i3.call(i)!=="[object Object]")return!1;for(o in i)if(r3.call(i,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function a3(e){return e!==null?e:[]}var s3=new n3("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o3,construct:a3}),l3=wt,c3=Object.prototype.toString;function d3(e){if(e===null)return!0;var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(r=a[t],c3.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function u3(e){if(e===null)return[];var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var f3=new l3("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:d3,construct:u3}),h3=wt,p3=Object.prototype.hasOwnProperty;function g3(e){if(e===null)return!0;var t,n=e;for(t in n)if(p3.call(n,t)&&n[t]!==null)return!1;return!0}function m3(e){return e!==null?e:{}}var _3=new h3("tag:yaml.org,2002:set",{kind:"mapping",resolve:g3,construct:m3}),w3=to,da=new w3({include:[up],implicit:[Z8,W8],explicit:[t3,s3,f3,_3]}),v3=wt;function b3(){return!0}function x3(){}function y3(){return""}function k3(e){return typeof e=="undefined"}var C3=new v3("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:b3,construct:x3,predicate:k3,represent:y3}),E3=wt;function A3(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 S3(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 I3(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function M3(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var T3=new E3("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:A3,construct:S3,predicate:M3,represent:I3}),Es;try{var L3=ch;Es=L3("esprima")}catch{typeof window!="undefined"&&(Es=window.esprima)}var O3=wt;function N3(e){if(e===null)return!1;try{var t="("+e+")",n=Es.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 R3(e){var t="("+e+")",n=Es.parse(t,{range:!0}),r=[],i;if(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(o){r.push(o.name)}),i=n.body[0].expression.body.range,n.body[0].expression.body.type==="BlockStatement"?new Function(r,t.slice(i[0]+1,i[1]-1)):new Function(r,"return "+t.slice(i[0],i[1]))}function D3(e){return e.toString()}function F3(e){return Object.prototype.toString.call(e)==="[object Function]"}var P3=new O3("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:N3,construct:R3,predicate:F3,represent:D3}),y1=to,tl=y1.DEFAULT=new y1({include:[da],explicit:[C3,T3,P3]}),Xn=an,pp=ca,$3=J_,gp=da,B3=tl,kr=Object.prototype.hasOwnProperty,As=1,mp=2,_p=3,Ss=4,zl=1,z3=2,k1=3,j3=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,V3=/[\x85\u2028\u2029]/,U3=/[,\[\]\{\}]/,wp=/^(?:!|!!|![a-z\-]+!)$/i,vp=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function C1(e){return Object.prototype.toString.call(e)}function Rn(e){return e===10||e===13}function Vr(e){return e===9||e===32}function Bt(e){return e===9||e===32||e===10||e===13}function Si(e){return e===44||e===91||e===93||e===123||e===125}function H3(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Z3(e){return e===120?2:e===117?4:e===85?8:0}function G3(e){return 48<=e&&e<=57?e-48:-1}function E1(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 Y3(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var bp=new Array(256),xp=new Array(256);for(var ui=0;ui<256;ui++)bp[ui]=E1(ui)?1:0,xp[ui]=E1(ui);function W3(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||B3,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 yp(e,t){return new pp(t,new $3(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function ge(e,t){throw yp(e,t)}function Is(e,t){e.onWarning&&e.onWarning.call(null,yp(e,t))}var A1={YAML:function(t,n,r){var i,o,a;t.version!==null&&ge(t,"duplication of %YAML directive"),r.length!==1&&ge(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&ge(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),o!==1&&ge(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Is(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&ge(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],wp.test(i)||ge(t,"ill-formed tag handle (first argument) of the TAG directive"),kr.call(t.tagMap,i)&&ge(t,'there is a previously declared suffix for "'+i+'" tag handle'),vp.test(o)||ge(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function vr(e,t,n,r){var i,o,a,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,o=s.length;i<o;i+=1)a=s.charCodeAt(i),a===9||32<=a&&a<=1114111||ge(e,"expected valid JSON character");else j3.test(s)&&ge(e,"the stream contains non-printable characters");e.result+=s}}function S1(e,t,n,r){var i,o,a,s;for(Xn.isObject(n)||ge(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),a=0,s=i.length;a<s;a+=1)o=i[a],kr.call(t,o)||(t[o]=n[o],r[o]=!0)}function Ii(e,t,n,r,i,o,a,s){var l,d;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,d=i.length;l<d;l+=1)Array.isArray(i[l])&&ge(e,"nested arrays are not supported inside keys"),typeof i=="object"&&C1(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&C1(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,d=o.length;l<d;l+=1)S1(e,t,o[l],n);else S1(e,t,o,n);else!e.json&&!kr.call(n,i)&&kr.call(t,i)&&(e.line=a||e.line,e.position=s||e.position,ge(e,"duplicated mapping key")),t[i]=o,delete n[i];return t}function Ad(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++):ge(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function lt(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Vr(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(Rn(i))for(Ad(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&&Is(e,"deficient indentation"),r}function nl(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||Bt(n)))}function Sd(e,t){t===1?e.result+=" ":t>1&&(e.result+=Xn.repeat(`
`,t-1))}function q3(e,t,n){var r,i,o,a,s,l,d,c,u=e.kind,f=e.result,h;if(h=e.input.charCodeAt(e.position),Bt(h)||Si(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(i=e.input.charCodeAt(e.position+1),Bt(i)||n&&Si(i)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,s=!1;h!==0;){if(h===58){if(i=e.input.charCodeAt(e.position+1),Bt(i)||n&&Si(i))break}else if(h===35){if(r=e.input.charCodeAt(e.position-1),Bt(r))break}else{if(e.position===e.lineStart&&nl(e)||n&&Si(h))break;if(Rn(h))if(l=e.line,d=e.lineStart,c=e.lineIndent,lt(e,!1,-1),e.lineIndent>=t){s=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=d,e.lineIndent=c;break}}s&&(vr(e,o,a,!1),Sd(e,e.line-l),o=a=e.position,s=!1),Vr(h)||(a=e.position+1),h=e.input.charCodeAt(++e.position)}return vr(e,o,a,!1),e.result?!0:(e.kind=u,e.result=f,!1)}function X3(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(vr(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 Rn(n)?(vr(e,r,i,!0),Sd(e,lt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&nl(e)?ge(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);ge(e,"unexpected end of the stream within a single quoted scalar")}function K3(e,t){var n,r,i,o,a,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return vr(e,n,e.position,!0),e.position++,!0;if(s===92){if(vr(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),Rn(s))lt(e,!1,t);else if(s<256&&bp[s])e.result+=xp[s],e.position++;else if((a=Z3(s))>0){for(i=a,o=0;i>0;i--)s=e.input.charCodeAt(++e.position),(a=H3(s))>=0?o=(o<<4)+a:ge(e,"expected hexadecimal character");e.result+=Y3(o),e.position++}else ge(e,"unknown escape sequence");n=r=e.position}else Rn(s)?(vr(e,n,r,!0),Sd(e,lt(e,!1,t)),n=r=e.position):e.position===e.lineStart&&nl(e)?ge(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}ge(e,"unexpected end of the stream within a double quoted scalar")}function J3(e,t){var n=!0,r,i=e.tag,o,a=e.anchor,s,l,d,c,u,f={},h,w,_,g;if(g=e.input.charCodeAt(e.position),g===91)l=93,u=!1,o=[];else if(g===123)l=125,u=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(lt(e,!0,t),g=e.input.charCodeAt(e.position),g===l)return e.position++,e.tag=i,e.anchor=a,e.kind=u?"mapping":"sequence",e.result=o,!0;n||ge(e,"missed comma between flow collection entries"),w=h=_=null,d=c=!1,g===63&&(s=e.input.charCodeAt(e.position+1),Bt(s)&&(d=c=!0,e.position++,lt(e,!0,t))),r=e.line,Gi(e,t,As,!1,!0),w=e.tag,h=e.result,lt(e,!0,t),g=e.input.charCodeAt(e.position),(c||e.line===r)&&g===58&&(d=!0,g=e.input.charCodeAt(++e.position),lt(e,!0,t),Gi(e,t,As,!1,!0),_=e.result),u?Ii(e,o,f,w,h,_):d?o.push(Ii(e,null,f,w,h,_)):o.push(h),lt(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(n=!0,g=e.input.charCodeAt(++e.position)):n=!1}ge(e,"unexpected end of the stream within a flow collection")}function Q3(e,t){var n,r,i=zl,o=!1,a=!1,s=t,l=0,d=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)r=!1;else if(u===62)r=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)zl===i?i=u===43?k1:z3:ge(e,"repeat of a chomping mode identifier");else if((c=G3(u))>=0)c===0?ge(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?ge(e,"repeat of an indentation width identifier"):(s=t+c-1,a=!0);else break;if(Vr(u)){do u=e.input.charCodeAt(++e.position);while(Vr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Rn(u)&&u!==0)}for(;u!==0;){for(Ad(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!a||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>s&&(s=e.lineIndent),Rn(u)){l++;continue}if(e.lineIndent<s){i===k1?e.result+=Xn.repeat(`
`,o?1+l:l):i===zl&&o&&(e.result+=`
`);break}for(r?Vr(u)?(d=!0,e.result+=Xn.repeat(`
`,o?1+l:l)):d?(d=!1,e.result+=Xn.repeat(`
`,l+1)):l===0?o&&(e.result+=" "):e.result+=Xn.repeat(`
`,l):e.result+=Xn.repeat(`
`,o?1+l:l),o=!0,a=!0,l=0,n=e.position;!Rn(u)&&u!==0;)u=e.input.charCodeAt(++e.position);vr(e,n,e.position,!1)}return!0}function I1(e,t){var n,r=e.tag,i=e.anchor,o=[],a,s=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(a=e.input.charCodeAt(e.position+1),!Bt(a)));){if(s=!0,e.position++,lt(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,Gi(e,t,_p,!1,!0),o.push(e.result),lt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)ge(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function ew(e,t,n){var r,i,o,a,s=e.tag,l=e.anchor,d={},c={},u=null,f=null,h=null,w=!1,_=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),g=e.input.charCodeAt(e.position);g!==0;){if(r=e.input.charCodeAt(e.position+1),o=e.line,a=e.position,(g===63||g===58)&&Bt(r))g===63?(w&&(Ii(e,d,c,u,f,null),u=f=h=null),_=!0,w=!0,i=!0):w?(w=!1,i=!0):ge(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=r;else if(Gi(e,n,mp,!1,!0))if(e.line===o){for(g=e.input.charCodeAt(e.position);Vr(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),Bt(g)||ge(e,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(Ii(e,d,c,u,f,null),u=f=h=null),_=!0,w=!1,i=!1,u=e.tag,f=e.result;else if(_)ge(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=l,!0}else if(_)ge(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=s,e.anchor=l,!0;else break;if((e.line===o||e.lineIndent>t)&&(Gi(e,t,Ss,!0,i)&&(w?f=e.result:h=e.result),w||(Ii(e,d,c,u,f,h,o,a),u=f=h=null),lt(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)ge(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return w&&Ii(e,d,c,u,f,null),_&&(e.tag=s,e.anchor=l,e.kind="mapping",e.result=d),_}function tw(e){var t,n=!1,r=!1,i,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&ge(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(n=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):ge(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Bt(a);)a===33&&(r?ge(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),wp.test(i)||ge(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),U3.test(o)&&ge(e,"tag suffix cannot contain flow indicator characters")}return o&&!vp.test(o)&&ge(e,"tag name cannot contain such characters: "+o),n?e.tag=o:kr.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:ge(e,'undeclared tag handle "'+i+'"'),!0}function nw(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&ge(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Bt(n)&&!Si(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ge(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function rw(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&&!Bt(r)&&!Si(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ge(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),kr.call(e.anchorMap,n)||ge(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],lt(e,!0,-1),!0}function Gi(e,t,n,r,i){var o,a,s,l=1,d=!1,c=!1,u,f,h,w,_;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=Ss===n||_p===n,r&&lt(e,!0,-1)&&(d=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;tw(e)||nw(e);)lt(e,!0,-1)?(d=!0,s=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=d||i),(l===1||Ss===n)&&(As===n||mp===n?w=t:w=t+1,_=e.position-e.lineStart,l===1?s&&(I1(e,_)||ew(e,_,w))||J3(e,w)?c=!0:(a&&Q3(e,w)||X3(e,w)||K3(e,w)?c=!0:rw(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&ge(e,"alias node should not have any properties")):q3(e,w,As===n)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=s&&I1(e,_))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ge(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(h=e.implicitTypes[u],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else kr.call(e.typeMap[e.kind||"fallback"],e.tag)?(h=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&h.kind!==e.kind&&ge(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result)?(e.result=h.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ge(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):ge(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function iw(e){var t=e.position,n,r,i,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(a=e.input.charCodeAt(e.position))!==0&&(lt(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),n=e.position;a!==0&&!Bt(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&ge(e,"directive name must not be less than one character in length");a!==0;){for(;Vr(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Rn(a));break}if(Rn(a))break;for(n=e.position;a!==0&&!Bt(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}a!==0&&Ad(e),kr.call(A1,r)?A1[r](e,r,i):Is(e,'unknown document directive "'+r+'"')}if(lt(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,lt(e,!0,-1)):o&&ge(e,"directives end mark is expected"),Gi(e,e.lineIndent-1,Ss,!1,!0),lt(e,!0,-1),e.checkLineBreaks&&V3.test(e.input.slice(t,e.position))&&Is(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&nl(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,lt(e,!0,-1));return}if(e.position<e.length-1)ge(e,"end of the stream or a document separator is expected");else return}function kp(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 W3(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,ge(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;)iw(n);return n.documents}function Cp(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=kp(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function Ep(e,t){var n=kp(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new pp("expected a single document in the stream, but found more")}}function ow(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),Cp(e,t,Xn.extend({schema:gp},n))}function aw(e,t){return Ep(e,Xn.extend({schema:gp},t))}la.loadAll=Cp;la.load=Ep;la.safeLoadAll=ow;la.safeLoad=aw;var Id={},ua=an,fa=ca,sw=tl,lw=da,Ap=Object.prototype.toString,Sp=Object.prototype.hasOwnProperty,cw=9,jo=10,dw=13,uw=32,fw=33,hw=34,Ip=35,pw=37,gw=38,mw=39,_w=42,Mp=44,ww=45,Tp=58,vw=61,bw=62,xw=63,yw=64,Lp=91,Op=93,kw=96,Np=123,Cw=124,Rp=125,It={};It[0]="\\0";It[7]="\\a";It[8]="\\b";It[9]="\\t";It[10]="\\n";It[11]="\\v";It[12]="\\f";It[13]="\\r";It[27]="\\e";It[34]='\\"';It[92]="\\\\";It[133]="\\N";It[160]="\\_";It[8232]="\\L";It[8233]="\\P";var Ew=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Aw(e,t){var n,r,i,o,a,s,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)a=r[i],s=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&Sp.call(l.styleAliases,s)&&(s=l.styleAliases[s]),n[a]=s;return n}function M1(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 fa("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+ua.repeat("0",r-t.length)+t}function Sw(e){this.schema=e.schema||sw,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ua.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Aw(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 T1(e,t){for(var n=ua.repeat(" ",t),r=0,i=-1,o="",a,s=e.length;r<s;)i=e.indexOf(`
`,r),i===-1?(a=e.slice(r),r=s):(a=e.slice(r,i+1),r=i+1),a.length&&a!==`
`&&(o+=n),o+=a;return o}function Pc(e,t){return`
`+ua.repeat(" ",e.indent*t)}function Iw(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 Md(e){return e===uw||e===cw}function Yi(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 Mw(e){return Yi(e)&&!Md(e)&&e!==65279&&e!==dw&&e!==jo}function L1(e,t){return Yi(e)&&e!==65279&&e!==Mp&&e!==Lp&&e!==Op&&e!==Np&&e!==Rp&&e!==Tp&&(e!==Ip||t&&Mw(t))}function Tw(e){return Yi(e)&&e!==65279&&!Md(e)&&e!==ww&&e!==xw&&e!==Tp&&e!==Mp&&e!==Lp&&e!==Op&&e!==Np&&e!==Rp&&e!==Ip&&e!==gw&&e!==_w&&e!==fw&&e!==Cw&&e!==vw&&e!==bw&&e!==mw&&e!==hw&&e!==pw&&e!==yw&&e!==kw}function Dp(e){var t=/^\n* /;return t.test(e)}var Fp=1,Pp=2,$p=3,Bp=4,Qa=5;function Lw(e,t,n,r,i){var o,a,s,l=!1,d=!1,c=r!==-1,u=-1,f=Tw(e.charCodeAt(0))&&!Md(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(a=e.charCodeAt(o),!Yi(a))return Qa;s=o>0?e.charCodeAt(o-1):null,f=f&&L1(a,s)}else{for(o=0;o<e.length;o++){if(a=e.charCodeAt(o),a===jo)l=!0,c&&(d=d||o-u-1>r&&e[u+1]!==" ",u=o);else if(!Yi(a))return Qa;s=o>0?e.charCodeAt(o-1):null,f=f&&L1(a,s)}d=d||c&&o-u-1>r&&e[u+1]!==" "}return!l&&!d?f&&!i(e)?Fp:Pp:n>9&&Dp(e)?Qa:d?Bp:$p}function Ow(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&Ew.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=r||e.flowLevel>-1&&n>=e.flowLevel;function s(l){return Iw(e,l)}switch(Lw(t,a,e.indent,o,s)){case Fp:return t;case Pp:return"'"+t.replace(/'/g,"''")+"'";case $p:return"|"+O1(t,e.indent)+N1(T1(t,i));case Bp:return">"+O1(t,e.indent)+N1(T1(Nw(t,o),i));case Qa:return'"'+Rw(t)+'"';default:throw new fa("impossible error: invalid scalar style")}}()}function O1(e,t){var n=Dp(e)?String(t):"",r=e[e.length-1]===`
`,i=r&&(e[e.length-2]===`
`||e===`
`),o=i?"+":r?"":"-";return n+o+`
`}function N1(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function Nw(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var d=e.indexOf(`
`);return d=d!==-1?d:e.length,n.lastIndex=d,R1(e.slice(0,d),t)}(),i=e[0]===`
`||e[0]===" ",o,a;a=n.exec(e);){var s=a[1],l=a[2];o=l[0]===" ",r+=s+(!i&&!o&&l!==""?`
`:"")+R1(l,t),i=o}return r}function R1(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,a=0,s=0,l="";r=n.exec(e);)s=r.index,s-i>t&&(o=a>i?a:s,l+=`
`+e.slice(i,o),i=o+1),a=s;return l+=`
`,e.length-i>t&&a>i?l+=e.slice(i,a)+`
`+e.slice(a+1):l+=e.slice(i),l.slice(1)}function Rw(e){for(var t="",n,r,i,o=0;o<e.length;o++){if(n=e.charCodeAt(o),n>=55296&&n<=56319&&(r=e.charCodeAt(o+1),r>=56320&&r<=57343)){t+=M1((n-55296)*1024+r-56320+65536),o++;continue}i=It[n],t+=!i&&Yi(n)?e[o]:i||M1(n)}return t}function Dw(e,t,n){var r="",i=e.tag,o,a;for(o=0,a=n.length;o<a;o+=1)Yr(e,t,n[o],!1,!1)&&(o!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function Fw(e,t,n,r){var i="",o=e.tag,a,s;for(a=0,s=n.length;a<s;a+=1)Yr(e,t+1,n[a],!0,!0)&&((!r||a!==0)&&(i+=Pc(e,t)),e.dump&&jo===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function Pw(e,t,n){var r="",i=e.tag,o=Object.keys(n),a,s,l,d,c;for(a=0,s=o.length;a<s;a+=1)c="",a!==0&&(c+=", "),e.condenseFlow&&(c+='"'),l=o[a],d=n[l],Yr(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Yr(e,t,d,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function $w(e,t,n,r){var i="",o=e.tag,a=Object.keys(n),s,l,d,c,u,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new fa("sortKeys must be a boolean or a function");for(s=0,l=a.length;s<l;s+=1)f="",(!r||s!==0)&&(f+=Pc(e,t)),d=a[s],c=n[d],Yr(e,t+1,d,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&jo===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Pc(e,t)),Yr(e,t+1,c,!0,u)&&(e.dump&&jo===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=o,e.dump=i||"{}"}function D1(e,t,n){var r,i,o,a,s,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o<a;o+=1)if(s=i[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,Ap.call(s.represent)==="[object Function]")r=s.represent(t,l);else if(Sp.call(s.represent,l))r=s.represent[l](t,l);else throw new fa("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function Yr(e,t,n,r,i,o){e.tag=null,e.dump=n,D1(e,n,!1)||D1(e,n,!0);var a=Ap.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var s=a==="[object Object]"||a==="[object Array]",l,d;if(s&&(l=e.duplicates.indexOf(n),d=l!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(i=!1),d&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(s&&d&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),a==="[object Object]")r&&Object.keys(e.dump).length!==0?($w(e,t,e.dump,i),d&&(e.dump="&ref_"+l+e.dump)):(Pw(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object Array]"){var c=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(Fw(e,c,e.dump,i),d&&(e.dump="&ref_"+l+e.dump)):(Dw(e,c,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump))}else if(a==="[object String]")e.tag!=="?"&&Ow(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new fa("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Bw(e,t){var n=[],r=[],i,o;for($c(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function $c(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)$c(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)$c(e[r[i]],t,n)}function zp(e,t){t=t||{};var n=new Sw(t);return n.noRefs||Bw(e,n),Yr(n,0,e,!0,!0)?n.dump+`
`:""}function zw(e,t){return zp(e,ua.extend({schema:lw},t))}Id.dump=zp;Id.safeDump=zw;var rl=la,jp=Id;function il(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}it.Type=wt;it.Schema=to;it.FAILSAFE_SCHEMA=Cd;it.JSON_SCHEMA=dp;it.CORE_SCHEMA=up;it.DEFAULT_SAFE_SCHEMA=da;it.DEFAULT_FULL_SCHEMA=tl;it.load=rl.load;it.loadAll=rl.loadAll;it.safeLoad=rl.safeLoad;it.safeLoadAll=rl.safeLoadAll;it.dump=jp.dump;it.safeDump=jp.safeDump;it.YAMLException=ca;it.MINIMAL_SCHEMA=Cd;it.SAFE_SCHEMA=da;it.DEFAULT_SCHEMA=tl;it.scan=il("scan");it.parse=il("parse");it.compose=il("compose");it.addConstructor=il("addConstructor");var jw=it,Bc=jw,Vw=Uw;function Ri(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function Uw(e){if(e=e||{},e.circles)return Hw(e);return e.proto?r:n;function t(i,o){for(var a=Object.keys(i),s=new Array(a.length),l=0;l<a.length;l++){var d=a[l],c=i[d];typeof c!="object"||c===null?s[d]=c:c instanceof Date?s[d]=new Date(c):ArrayBuffer.isView(c)?s[d]=Ri(c):s[d]=o(c)}return s}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var o={};for(var a in i)if(Object.hasOwnProperty.call(i,a)!==!1){var s=i[a];typeof s!="object"||s===null?o[a]=s:s instanceof Date?o[a]=new Date(s):s instanceof Map?o[a]=new Map(t(Array.from(s),n)):s instanceof Set?o[a]=new Set(t(Array.from(s),n)):ArrayBuffer.isView(s)?o[a]=Ri(s):o[a]=n(s)}return o}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var o={};for(var a in i){var s=i[a];typeof s!="object"||s===null?o[a]=s:s instanceof Date?o[a]=new Date(s):s instanceof Map?o[a]=new Map(t(Array.from(s),r)):s instanceof Set?o[a]=new Set(t(Array.from(s),r)):ArrayBuffer.isView(s)?o[a]=Ri(s):o[a]=r(s)}return o}}function Hw(e){var t=[],n=[];return e.proto?o:i;function r(a,s){for(var l=Object.keys(a),d=new Array(l.length),c=0;c<l.length;c++){var u=l[c],f=a[u];if(typeof f!="object"||f===null)d[u]=f;else if(f instanceof Date)d[u]=new Date(f);else if(ArrayBuffer.isView(f))d[u]=Ri(f);else{var h=t.indexOf(f);h!==-1?d[u]=n[h]:d[u]=s(f)}}return d}function i(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return r(a,i);if(a instanceof Map)return new Map(r(Array.from(a),i));if(a instanceof Set)return new Set(r(Array.from(a),i));var s={};t.push(a),n.push(s);for(var l in a)if(Object.hasOwnProperty.call(a,l)!==!1){var d=a[l];if(typeof d!="object"||d===null)s[l]=d;else if(d instanceof Date)s[l]=new Date(d);else if(d instanceof Map)s[l]=new Map(r(Array.from(d),i));else if(d instanceof Set)s[l]=new Set(r(Array.from(d),i));else if(ArrayBuffer.isView(d))s[l]=Ri(d);else{var c=t.indexOf(d);c!==-1?s[l]=n[c]:s[l]=i(d)}}return t.pop(),n.pop(),s}function o(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return r(a,o);if(a instanceof Map)return new Map(r(Array.from(a),o));if(a instanceof Set)return new Set(r(Array.from(a),o));var s={};t.push(a),n.push(s);for(var l in a){var d=a[l];if(typeof d!="object"||d===null)s[l]=d;else if(d instanceof Date)s[l]=new Date(d);else if(d instanceof Map)s[l]=new Map(r(Array.from(d),o));else if(d instanceof Set)s[l]=new Set(r(Array.from(d),o));else if(ArrayBuffer.isView(d))s[l]=Ri(d);else{var c=t.indexOf(d);c!==-1?s[l]=n[c]:s[l]=o(d)}}return t.pop(),n.pop(),s}}var Pe=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":"ko","name":"\uD55C\uAD6D\uC5B4","schemas":false},{"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","noPath":true},{"id":"chat_type","url":"chat-type","schema":"chat_type","minVersion":"1.19"},{"id":"pack_mcmeta","url":"pack-mcmeta","schema":"pack_mcmeta"},{"id":"dimension","url":"dimension","schema":"dimension","tags":["worldgen"],"minVersion":"1.16"},{"id":"dimension_type","url":"dimension-type","schema":"dimension_type","tags":["worldgen"],"minVersion":"1.16"},{"id":"worldgen/biome","url":"worldgen/biome","tags":["worldgen"],"schema":"biome","minVersion":"1.16"},{"id":"worldgen/configured_carver","url":"worldgen/carver","tags":["worldgen"],"schema":"configured_carver","minVersion":"1.16"},{"id":"worldgen/configured_feature","url":"worldgen/feature","tags":["worldgen"],"schema":"configured_feature","minVersion":"1.16"},{"id":"worldgen/placed_feature","url":"worldgen/placed-feature","tags":["worldgen"],"schema":"placed_feature","minVersion":"1.18"},{"id":"worldgen/density_function","url":"worldgen/density-function","tags":["worldgen"],"schema":"density_function","minVersion":"1.18.2"},{"id":"worldgen/noise","url":"worldgen/noise","tags":["worldgen"],"schema":"noise_parameters","minVersion":"1.18"},{"id":"worldgen/noise_settings","url":"worldgen/noise-settings","tags":["worldgen"],"schema":"noise_settings","minVersion":"1.16"},{"id":"worldgen/configured_structure_feature","url":"worldgen/structure-feature","tags":["worldgen"],"schema":"configured_structure_feature","minVersion":"1.16","maxVersion":"1.18.2"},{"id":"worldgen/structure","url":"worldgen/structure","tags":["worldgen"],"schema":"structure","minVersion":"1.19"},{"id":"worldgen/structure_set","url":"worldgen/structure-set","tags":["worldgen"],"schema":"structure_set","minVersion":"1.18.2"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","tags":["worldgen"],"schema":"configured_surface_builder","minVersion":"1.16","maxVersion":"1.17"},{"id":"worldgen/processor_list","url":"worldgen/processor-list","tags":["worldgen"],"schema":"processor_list","minVersion":"1.16"},{"id":"worldgen/template_pool","url":"worldgen/template-pool","tags":["worldgen"],"schema":"template_pool","minVersion":"1.16"},{"id":"worldgen/world_preset","url":"worldgen/world-preset","tags":["worldgen"],"schema":"world_preset","minVersion":"1.19"},{"id":"worldgen/flat_level_generator_preset","url":"worldgen/flat-world-preset","tags":["worldgen"],"schema":"flat_level_generator_preset","minVersion":"1.19"},{"id":"world","url":"world","schema":"world_settings","noPath":true,"tags":["worldgen"],"minVersion":"1.16"},{"id":"tag/block","url":"tags/block","tags":["tags"],"path":"tags/blocks","schema":"block_tag"},{"id":"tag/entity_type","url":"tags/entity-type","tags":["tags"],"path":"tags/entity_types","schema":"entity_type_tag"},{"id":"tag/fluid","url":"tags/fluid","tags":["tags"],"path":"tags/fluids","schema":"fluid_tag"},{"id":"tag/game_event","url":"tags/game-event","tags":["tags"],"path":"tags/game_events","schema":"game_event_tag","minVersion":"1.17"},{"id":"tag/item","url":"tags/item","tags":["tags"],"path":"tags/items","schema":"item_tag"},{"id":"tag/worldgen/biome","url":"tags/biome","tags":["tags","worldgen"],"path":"tags/worldgen/biome","schema":"biome_tag","minVersion":"1.18.2"},{"id":"block_definition","url":"assets/blockstate","path":"blockstates","tags":["assets"],"schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","tags":["assets"],"schema":"model"},{"id":"font","url":"assets/font","path":"font","tags":["assets"],"schema":"font","minVersion":"1.16"},{"id":"block_growth","url":"partners/immersive-weathering/block-growth","path":"block_growths","tags":["partners"],"partner":"immersive_weathering","schema":"immersive_weathering:block_growth","minVersion":"1.18.2"}]}');function mn(e){return typeof e=="object"&&e!==null}function es(e){return e.toString(16).padStart(2,"0")}function Ur(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,es).join("")}function rn(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function Zw(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function Gw(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new P.Path(["dimensions"]));e.set(new P.Path(["seed"]),t,!0),mn(n)&&Object.keys(n).forEach(r=>{e.set(new P.Path(["dimensions",r,"generator","seed"]),t,!0),e.set(new P.Path(["dimensions",r,"generator","biome_source","seed"]),t,!0)}),e.set(new P.Path(["placement","salt"]),Math.abs(t),!0),e.set(new P.Path(["generator","seed"]),t,!0),e.set(new P.Path(["generator","biome_source","seed"]),t)}function Vp(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function Cr(e){return`/${e}/`.replaceAll("//","/")}function Yw(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),Cr(e)}function Up(e){const t=Yw(e).replace(/^\//,"").replace(/\/$/,"");return Pe.generators.find(n=>n.url===t)}function Hp({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?Cr(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);ti(i,r)}function Ww(e){const t=Bc.load(e.substring(3,e.indexOf("---",3)));return mn(t)?t:{}}function qw(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const o=Xw(e,i+2),a=e.indexOf("#[",i+1);let s="";if(a>=0&&a<o){const l=e.indexOf("]",a+2);e.substring(a+2,l)===t&&(s=e.substring(l+1,o).trim())}else{const l=e.substring(i+2,o),d=Pe.versions.find(c=>c.id===t);s=(r={version:d==null?void 0:d.id,pack_format:d==null?void 0:d.pack_format.toString()}[l])!=null?r:""}e=e.substring(0,i)+s+e.substring(o+2),n=i}return e}function Xw(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),o=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(o<0){if(n===0)return i;n-=1,t=i+2}else if(o<i)n+=1,t=o+2;else{if(n===0)return i;n-=1,t=i+2}}return console.warn("Exceeded max iterations while finding closing bracket"),e.length}function Td(e){const t=Math.abs(Vp(e));return[t%256,(t>>8)%256,(t>>16)%256]}function Kw(e){if(!Array.isArray(e)||e.length!==3)return"#000000";const[t,n,r]=e;return"#"+es(t)+es(n)+es(r)}function Jw(e){if(typeof e!="string")return[0,0,0];const t=parseInt(e.startsWith("#")?e.slice(1):e,16),n=t>>16&255,r=t>>8&255,i=t&255;return[n,r,i]}function mo(e){return e*e}function ct(e,t,n){return Math.max(t,Math.min(e,n))}function jl(e,t,n){return n<0?e:n>1?t:ts(n,e,t)}function ts(e,t,n){return t+e*(n-t)}function Qw(e,t,n,r,i,o){return ts(t,ts(e,n,r),ts(e,i,o))}function At(e){return e instanceof Error?e.message:`${e}`}const ol=Vw();function Wi(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(!Wi(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!Wi(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}class ev{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}computeIfAbsent(t,n){const r=this.forward.get(t);if(r===void 0){const i=n();return this.set(t,i),i}return r}}async function tv(e,t=()=>!0){const n=e instanceof File?await e.arrayBuffer():e,i=await new C_(new Yh(new Blob([n]))).getEntries();return await Promise.all(i.filter(o=>!o.directory&&t(o.filename)).map(async o=>{var s;const a=new t_("utf-8");return[o.filename,await((s=o.getData)==null?void 0:s.call(o,a))]}))}async function nv(e){const t=new z_(new n_("application/zip"));return await Promise.all(e.map(async([n,r])=>{await t.add(n,new e_(r))})),await t.close()}async function rv(e,t,n){const r=e.get(t);if(r)return r;const i=await n(t);return e.set(t,i),i}function F1(e,t,n){let r=0;for(const o of t)r+=n(o);if(r<=0)return;let i=e.nextInt(r);for(const o of t)if(i-=n(o),i<0)return o}function ns({icon:e,label:t,large:n,larger:r,doSelect:i,value:o,placeholder:a,dataList:s,onChange:l}){const d=l===void 0?()=>{}:f=>{const h=f.target.value;l==null||l(h)},c=Me(null);me(()=>{i&&c.current&&c.current.select()},[i]);const u=s&&Ur();return N("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:f=>f.stopPropagation(),children:[e&&ue[e],t&&p("span",{children:t}),p("input",{ref:c,type:"text",value:o,onChange:d,placeholder:a,list:u}),s&&p("datalist",{id:u,children:s.map(f=>p("option",{value:f}))})]})}function yo({link:e,icon:t,label:n,tooltip:r,tooltipLoc:i,swapped:o}){return p("a",be(oe({},e?{href:e}:{disabled:!0}),{class:`btn btn-link${r?` tooltipped tip-${i!=null?i:"sw"}`:""}`,"aria-label":r,children:o?N(le,{children:[n&&p("span",{children:n}),t&&ue[t]]}):N(le,{children:[t&&ue[t],n&&p("span",{children:n})]})}))}function zc({cooldown:e,invert:t,initial:n}={}){const[r,i]=Y(n),o=Me(void 0);return[r,()=>{i(!t),o.current!==void 0&&clearTimeout(o.current),o.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}function Wt(e,t=[],n={loading:!0}){const[r,i]=iv(e,t,n);return me(()=>{i()},[i]),be(oe({},r),{refresh:i})}const rs=Symbol("async-cancel");function iv(e,t=[],n={loading:!1}){const[r,i]=Y(n),o=Me(!1),a=Me(0);me(()=>(o.current=!0,()=>o.current=!1),[]);const s=Ve((...l)=>{const d=++a.current;return r.loading||i(c=>be(oe({},c),{loading:!0})),e(...l).then(c=>(o.current&&d===a.current&&c!==rs&&i({value:c,loading:!1}),c),c=>{o.current&&d===a.current&&i({error:c,loading:!1})})},t);return[r,s]}function ha({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},o){const a=Me(null),s=Me(),l=Me(),d=Me([0,0]),c=Me(!1);me(()=>{if(!a.current)return;const h=m=>{s.current=[m.offsetX,m.offsetY]},w=m=>{if(s.current===void 0){if(!a.current)return;const b=m.offsetX/a.current.clientWidth,y=m.offsetY/a.current.clientHeight;r==null||r(b,y);return}if(!n)return;const v=m.offsetX-s.current[0],x=m.offsetY-s.current[1];v===0&&x===0||(d.current=[d.current[0]+v,d.current[1]+x],c.current||(l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!a.current)return;c.current=!0;const b=d.current[0]/a.current.clientWidth,y=d.current[1]/a.current.clientHeight;d.current=[0,0],await(n==null?void 0:n(b,y)),c.current=!1}))),s.current=[m.offsetX,m.offsetY]},_=()=>{s.current=void 0},g=()=>{i==null||i()};return a.current.addEventListener("mousedown",h),a.current.addEventListener("mousemove",w),a.current.addEventListener("mouseleave",g),document.body.addEventListener("mouseup",_),()=>{var m,v,x;(m=a.current)==null||m.removeEventListener("mousedown",h),(v=a.current)==null||v.removeEventListener("mousemove",w),(x=a.current)==null||x.removeEventListener("mouseleave",g),document.body.removeEventListener("mouseup",_)}},[...o!=null?o:[],a.current]);const u=Me(),f=Me(0);return u.current=async()=>{if(!a.current)return;const h=a.current.getContext("2d"),w=e();a.current.width=w[0],a.current.height=w[1];const _=h.getImageData(0,0,w[0],w[1]),g=f.current+=1;try{await t(_)}catch(m){throw m}g===f.current&&h.putImageData(_,0,0)},{canvas:a,redraw:u.current}}const jc="misode-lose-focus";function al(){const[e,t]=Y(!1),n=()=>{t(!1)};return me(()=>(e&&(document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n),document.body.addEventListener(jc,n)),()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n),document.body.removeEventListener(jc,n)}),[e]),[e,(r=!0)=>t(r)]}function ov(){const[e,t]=Y(window.location.hash),n=Ve(()=>{t(window.location.hash)},[]);me(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Ve(i=>{i!==e&&Hp({hash:i})},[e]);return[e,r]}function Zp(e,t,n,r){const i=Ve(()=>{const l=localStorage.getItem(e);return l===null?t:n===void 0?l:n(l)},[]),[o,a]=Y(i()),s=Ve(l=>{l==null?(localStorage.removeItem(e),a(t)):r!==void 0?(localStorage.setItem(e,r(l)),a(l)):(localStorage.setItem(e,l),a(l))},[]);return[o,s]}function Ms(e){const[t,n]=Y(matchMedia(e).matches),r=i=>{n(i.matches)};return me(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function sl(e,t,n){const r={invalidated(){e&&t(e)}};me(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const P1=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function Wr(e){const t=window.location,[n,r]=Y(P1(t.search,e));me(()=>{const o=()=>{r(P1(t.search,e))};return window.addEventListener("popstate",o),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",o),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]);const i=Ve((o,a)=>{if(o!==n){r(o);const s=new URLSearchParams(t.search);o===void 0||o.length===0?s.delete(e):s.set(e,o),Hp({search:s.toString().replaceAll("%7C","|"),replace:a})}},[n]);return[n,i]}const av="tags",Vl="|";function Gp(){const[e,t]=Wr(av),n=Ee(()=>{var i;return(i=e==null?void 0:e.split(Vl))!=null?i:[]},[e]);return[n,(i,o)=>{o===!1||n.includes(i)&&o!==!0?t(n.filter(a=>a!==i).join(Vl),!0):t([...n,i].sort().join(Vl),!0)}]}function Ot(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:o,children:a}=e,[s,l]=al();return N("div",be(oe({},e),{class:`btn-menu${r===!1?" no-relative":""} ${e.class}`,children:[p(ae,{icon:t,label:n,tooltip:i,tooltipLoc:o,onClick:()=>l()}),s&&p("div",{class:"btn-group",children:a})]}))}function Ld({title:e,overlay:t,link:n,children:r}){const i=N(le,{children:[t&&p("span",{class:"card-overlay",children:t}),N("div",{class:"card-content",children:[e&&p("h3",{class:"card-title",children:e}),r]})]});return n===void 0?p("div",{class:"card",children:i}):p("a",{class:"card",href:n,children:i})}const sv="modulepreload",$1={},lv="/",Ce=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${lv}${r}`,r in $1)return;$1[r]=!0;const i=r.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${o}`))return;const a=document.createElement("link");if(a.rel=i?"stylesheet":sv,i||(a.as="script",a.crossOrigin=""),a.href=r,document.head.appendChild(a),i)return new Promise((s,l)=>{a.addEventListener("load",s),a.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};function Di({error:e,onDismiss:t}){const[n,r]=Y(!1),[i,o]=Y(void 0);me(()=>{if(e instanceof Error){const s=e.stack.split(`
`).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));o(s.join(`
`)),Ce(()=>import("./sourcemapped-stacktrace.b5d54a90.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(s.join(`
`),d=>{const c=d.map(u=>u.replace(/..\/..\/src\//,"src/")).join(`
`);o(c)})})}},[e]);const a=Ee(()=>{let s="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(s+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,i&&(s+=`&body=${encodeURIComponent(`\`\`\`
${e.name}: ${e.message}
${i}
\`\`\`
`)}`)):s+=`?title=${encodeURIComponent(e.toString())}`,s},[e,i]);return N("div",{class:"error",children:[t&&p("div",{class:"error-dismiss",onClick:t,children:ue.x}),N("h3",{children:[e instanceof Error?e.message:e,i&&p("span",{onClick:()=>r(!n),children:ue.info})]}),i&&n&&p("pre",{children:i}),N("p",{children:["If you think this is a bug, you can report it ",p("a",{href:a,target:"_blank",children:"on GitHub"})]})]})}const _o="https://www.minecraft.net/article/",cv=new Map(Object.entries({"1.16-pre2":"minecraft-1-16-pre-release-1","1.16-pre4":"minecraft-1-16-pre-release-3","1.16-pre5":"minecraft-1-16-pre-release-3","1.16-pre7":"minecraft-1-16-pre-release-6","1.16-pre8":"minecraft-1-16-pre-release-6","1.16-rc1":"minecraft-1-16-release-candidate",1.16:"nether-update-java","1.16.2-pre3":"minecraft-1-16-2-pre-release-2","1.16.2-rc1":"minecraft-1-16-2-pre-release-2","1.16.2-rc2":"minecraft-1-16-2-pre-release-2","1.17-pre3":"minecraft-1-17-pre-release-2","1.17-pre4":"minecraft-1-17-pre-release-2","1.17-pre5":"minecraft-1-17-pre-release-2","1.17.1-pre3":"minecraft-1-17-1-pre-release-2",1.17:"caves---cliffs--part-i-out-today-java","1.18-pre3":"minecraft-1-18-pre-release-2","1.18-pre4":"minecraft-1-18-pre-release-2","1.18-pre5":"minecraft-1-18-pre-release-2","1.18-pre7":"minecraft-1-18-pre-release-6","1.18-pre8":"minecraft-1-18-pre-release-6",1.18:"caves---cliffs--part-ii-out-today-java","1.18.2-pre3":"minecraft-1-18-2-pre-release-2","1.18.2-pre5":"minecraft-1-18-2-pre-release-4","1.19-pre3":"minecraft-1-19-pre-release-2","1.19-pre5":"minecraft-1-19-pre-release-4",1.19:"the-wild-update-out-today-java","1.19.1-pre4":"minecraft-1-19-1-pre-release-3"}));function dv(e){const t=cv.get(e);if(t)return _o+t;let n;if((n=e.match(/^(\d\dw\d\d)[a-z]$/))&&n[1])return _o+"minecraft-snapshot-"+n[1]+"a";if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-pre([0-9]+)$/))&&n[1]&&n[2])return _o+"minecraft-"+n[1].replaceAll(".","-")+"-pre-release-"+n[2];if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-rc[0-9]+$/))&&n[1])return _o+"minecraft-"+n[1].replaceAll(".","-")+"-release-candidate-1";if(e.match(/^\d+\.\d+\.\d+$/))return _o+"minecraft-java-edition-"+e.replaceAll(".","-")}const Fi="misode-v2",B1="cached_latest_version",z1="misode_cache_patch",Ul="22w42a",Pr="https://raw.githubusercontent.com/misode/mcmeta",Yp="https://github.com/misode/mcmeta/tarball",uv="https://raw.githubusercontent.com/misode/technical-changes";function _n(e,t,n){return`${n?Yp:Pr}/${e.dynamic?t:`${e.ref}-${t}`}`}async function no(e){await xv(),e.dynamic&&(localStorage.getItem(B1)!==Ul&&(await qp(t=>t.startsWith(`${Pr}/summary/`)||t.startsWith(`${Pr}/data/`)||t.startsWith(`${Pr}/assets/`)||t.startsWith(`${Pr}/registries/`)||t.startsWith(`${Pr}/atlas/`)||t.startsWith(`${Yp}/assets-json/`)),localStorage.setItem(B1,Ul)),e.ref=Ul)}async function fv(e,t,n){const r=Pe.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(Pe.versions)}`);return}await no(r),await Promise.all([hv(r,t),pv(r,n)])}async function hv(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await ii(`${_n(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:",At(n))}}async function pv(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await ii(`${_n(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:",At(n))}}async function Wp(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=Pe.versions.find(i=>i.id===e);try{let i;if(n.startsWith("immersive_weathering:"))i=`https://raw.githubusercontent.com/AstralOrdana/Immersive-Weathering/main/src/main/resources/data/immersive_weathering/block_growths/${n.slice(21)}.json`;else{const a=["blockstates","models","font"].includes(t)?"assets":"data";i=`${_n(r,a)}/${a}/minecraft/${t}/${n}.json`}return await(await fetch(i)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${At(i)}`)}}async function Vc(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=Pe.versions.find(r=>r.id===e);await no(n);try{const r=["block_definition","model","font"].includes(t)?"assets":"data";return new Map(Object.entries(await ii(`${_n(n,"summary")}/${r}/${t}/data.min.json`)))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${At(r)}`)}}async function gv(e){const t=Pe.versions.find(n=>n.id===e);await no(t);try{const n=`${_n(t,"summary")}/sounds/data.min.json`;return await ii(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${At(n)}`)}}function mv(e,t){const n=Pe.versions.find(r=>r.id===e);return`${_n(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function Od(){await no({dynamic:!0});try{return ii(`${_n({dynamic:!0},"summary")}/versions/data.min.json`,{refresh:!0})}catch(e){throw new Error(`Error occured while fetching versions: ${At(e)}`)}}function _v(e,t,n){const r=Pe.versions.find(i=>i.id===e);return`${_n(r,"assets")}/assets/minecraft/${t}/${n}.png`}async function wv(e){const t=Pe.versions.find(n=>n.id===e);await no(t);try{const[n,r,i]=await Promise.all([Vc(e,"model"),fetch(`${_n(t,"atlas")}/all/data.min.json`).then(o=>o.json()),vv(`${_n(t,"atlas")}/all/atlas.png`)]);return{models:n,uvMapping:r,atlas:i}}catch(n){throw new Error(`Error occured while fetching resources: ${At(n)}`)}}async function vv(e){return new Promise(t=>{const n=new Image;n.onload=()=>t(n),n.crossOrigin="Anonymous",n.src=e})}async function bv(e,t="en_us"){const n=Pe.versions.find(r=>r.id===e);await no(n);try{return await ii(`${_n(n,"assets")}/assets/minecraft/lang/${t}.json`)}catch(r){throw new Error(`Error occured while fetching language: ${At(r)}`)}}async function Nd(){try{const[e,t]=await Promise.all([ii(`${uv}/generated/changes.json`,{refresh:!0}),Od()]),n=new Map(t.map((r,i)=>[r.id,t.length-i]));return e.map(r=>{var i;return be(oe({},r),{order:(i=n.get(r.version))!=null?i:0})})}catch(e){throw new Error(`Error occured while fetching technical changes: ${At(e)}`)}}const j1=new Set;async function ii(e,{decode:t=r=>r.json(),refresh:n}={}){try{const r=await caches.open(Fi);console.debug(`[cachedFetch] Opened cache ${Fi} ${e}`);const i=await r.match(e);if(n&&(j1.has(e)?n=!1:j1.add(e)),n)try{return await V1(r,e,t)}catch{if(i&&i.ok)return console.debug(`[cachedFetch] Cannot refresh, using cache ${e}`),await t(i);throw new Error("Failed to fetch")}else return i&&i.ok?(console.debug(`[cachedFetch] Retrieving cached data ${e}`),await t(i)):await V1(r,e,t)}catch(r){console.warn(`[cachedFetch] Failed to open cache ${Fi}: ${r.message}`),console.debug(`[cachedFetch] Fetching data ${e}`);const i=await fetch(e);return await t(i)}}async function V1(e,t,n){console.debug(`[cachedFetch] Fetching data ${t}`);const r=await fetch(t),i=r.clone(),o=await n(r);return await e.put(t,i),o}async function qp(e){try{const t=await caches.open(Fi);console.debug(`[deleteMatching] Opened cache ${Fi}`);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 ${Fi}: ${At(t)}`)}}const U1=[async()=>{["1.15","1.16","1.17"].forEach(e=>localStorage.removeItem(`cache_${e}`)),["mcdata_master","vanilla_datapack_summary"].forEach(e=>localStorage.removeItem(`cached_${e}`)),caches.delete("misode-v1")},async()=>{await qp(e=>e.startsWith(`${Pr}/1.18.2-summary/`))}];async function xv(){var t;const e=parseInt((t=localStorage.getItem(z1))!=null?t:"0");for(let n=e+1;n<=U1.length;n+=1){const r=U1[n-1];r&&await r(),localStorage.setItem(z1,n.toFixed())}}const rt="immersive_weathering";function yv(e,t){const n=P.Reference.bind(void 0,e),r=P.StringNode.bind(void 0,t),i=o=>P.ChoiceNode([{type:"string",node:r({validator:"resource",params:{pool:o,allowTag:!0}}),change:a=>{if(Array.isArray(a)&&typeof a[0]=="string"&&!a[0].startsWith("#"))return a[0]}},{type:"list",node:P.ListNode(r({validator:"resource",params:{pool:o}})),change:a=>typeof a=="string"&&!a.startsWith("#")?[a]:[]}],{choiceContext:"tag"});e.register(`${rt}:block_growth`,P.ObjectNode({area_condition:n(`${rt}:area_condition`),position_predicates:P.Opt(P.ListNode(n(`${rt}:position_test`))),growth_chance:P.NumberNode({min:0,max:1}),growth_for_face:P.ListNode(P.ObjectNode({direction:P.Opt(r({enum:"direction"})),weight:P.Opt(P.NumberNode({integer:!0})),growth:P.ListNode(P.ObjectNode({data:n(`${rt}:block_pair`),weight:P.NumberNode({integer:!0})}))},{category:"pool"})),owners:P.ListNode(r({validator:"resource",params:{pool:"block"}})),replacing_target:n(`${rt}:rule_test`),target_self:P.Opt(P.BooleanNode()),destroy_target:P.Opt(P.BooleanNode())},{context:`${rt}.block_growth`})),e.register(`${rt}:area_condition`,P.ObjectNode({type:r({enum:["generate_if_not_too_many","neighbor_based_generation"]}),[P.Switch]:[{push:"type"}],[P.Case]:{generate_if_not_too_many:{radiusX:P.NumberNode({integer:!0}),radiusY:P.NumberNode({integer:!0}),radiusZ:P.NumberNode({integer:!0}),requiredAmount:P.NumberNode({integer:!0}),yOffset:P.Opt(P.NumberNode({integer:!0})),must_have:P.Opt(n(`${rt}:rule_test`)),must_not_have:P.Opt(n(`${rt}:rule_test`)),includes:P.Opt(i("block"))},neighbor_based_generation:{must_have:n(`${rt}:rule_test`),must_not_have:P.Opt(n(`${rt}:rule_test`)),required_amount:P.Opt(P.NumberNode({integer:!0})),directions:P.ListNode(r({enum:"direction"}))}}},{context:`${rt}.area_condition`})),e.register(`${rt}:block_pair`,P.ObjectNode({block:n(`${rt}:block_state`),above_block:P.Opt(n(`${rt}:block_state`))},{context:`${rt}.block_pair`})),e.register(`${rt}:block_state`,P.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:P.Opt(P.MapNode(r(),r()))},{context:"block_state"})),e.register(`${rt}:position_test`,P.ObjectNode({predicate_type:r({enum:["biome_match","day_test","nand","precipitation_test","temperature_range"]}),[P.Switch]:[{push:"predicate_type"}],[P.Case]:{biome_match:{biomes:i("$worldgen/biome")},day_test:{day:P.BooleanNode()},nand:{predicates:P.ListNode(n(`${rt}:position_test`))},precipitation_test:{precipitation:r({enum:["none","rain","snow"]})},temperature_range:{min:P.NumberNode(),max:P.NumberNode(),use_local_pos:P.Opt(P.BooleanNode())}}},{context:`${rt}.position_test`,category:"predicate"})),t.register(`${rt}:rule_test`,[...t.get("rule_test"),"immersive_weathering:block_set_match","immersive_weathering:fluid_match","immersive_weathering:tree_log"]),e.register(`${rt}:rule_test`,P.ObjectNode({predicate_type:r({validator:"resource",params:{pool:`${rt}:rule_test`}}),[P.Switch]:[{push:"predicate_type"}],[P.Case]:{"minecraft:block_match":{block:r({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:n("block_state")},"minecraft:random_block_match":{block:r({validator:"resource",params:{pool:"block"}}),probability:P.NumberNode({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:n("block_state"),probability:P.NumberNode({min:0,max:1})},"minecraft:tag_match":{tag:r({validator:"resource",params:{pool:"$tag/block"}})},"immersive_weathering:block_set_match":{blocks:i("block"),probability:P.Opt(P.NumberNode({min:0,max:1}))},"immersive_weathering:fluid_match":{fluid:r({validator:"resource",params:{pool:"fluid"}})}}},{context:"rule_test",disableSwitchContext:!0})),t.register("block_growth",["immersive_weathering:brain_coral","immersive_weathering:bubble_coral","immersive_weathering:cracked_mud_rivers","immersive_weathering:crimson_nylium","immersive_weathering:cryosol","immersive_weathering:farmland_rare_weeds","immersive_weathering:farmland_weeds","immersive_weathering:fire_coral","immersive_weathering:fire_soot","immersive_weathering:fluvisol","immersive_weathering:grass_base","immersive_weathering:grass_block_badlands","immersive_weathering:grass_block_bamboo_jungle","immersive_weathering:grass_block_birch_forest","immersive_weathering:grass_block_dark_forest","immersive_weathering:grass_block_flower_forest","immersive_weathering:grass_block_forest","immersive_weathering:grass_block_jungle","immersive_weathering:grass_block_lush_caves","immersive_weathering:grass_block_old_growth_spruce","immersive_weathering:grass_block_plains","immersive_weathering:grass_block_sunflower_plains","immersive_weathering:grass_block_swamp","immersive_weathering:grass_block_taiga","immersive_weathering:grass_block_wooded_badlands","immersive_weathering:hanging_roots","immersive_weathering:horn_coral","immersive_weathering:humus","immersive_weathering:icicle_growth","immersive_weathering:large_fern","immersive_weathering:magma","immersive_weathering:mycelium","immersive_weathering:podzol","immersive_weathering:red_sand_weathering","immersive_weathering:rooted_dirt","immersive_weathering:rooted_grass","immersive_weathering:sand_weathering","immersive_weathering:sapling","immersive_weathering:sapling_nether","immersive_weathering:silt","immersive_weathering:tall_grass","immersive_weathering:tall_seagrass","immersive_weathering:tube_coral","immersive_weathering:vertisol","immersive_weathering:warped_nylium"])}function kv(e,t){yv(e,t)}const Uc=["1.15","1.16","1.17","1.18","1.18.2","1.19"],Cv="1.19",fi={},hi={},Ev={1.15:()=>Ce(()=>import("./index.a40d347c.js").then(function(e){return e.i}),[]),1.16:()=>Ce(()=>import("./index.4c6ffed6.js").then(function(e){return e.i}),[]),1.17:()=>Ce(()=>import("./index.14d21078.js").then(function(e){return e.i}),[]),1.18:()=>Ce(()=>import("./index.39427360.js").then(function(e){return e.i}),[]),"1.18.2":()=>Ce(()=>import("./index.d07340ff.js").then(function(e){return e.i}),[]),1.19:()=>Ce(()=>import("./index.d0677d31.js").then(function(e){return e.i}),[])};let Xp,Kp,is;async function Rd(e){return fi[e]||(fi[e]=(async()=>{try{const t=await Ev[e](),n=t.getCollections(),r={};await fv(e,n,r);const i=t.getSchemas(n);return kv(i,n),fi[e]={collections:n,schemas:i,blockStates:r},fi[e]}catch(t){throw new Error(`Cannot get version "${e}": ${At(t)}`)}})()),fi[e]}async function Av(e,t){var n;if(!hi[t]||hi[t].version!==e){const r=await Rd(e);Xp=P.Reference(r.schemas,"configured_decorator"),Kp=P.ChoiceNode([{type:"string",node:P.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:P.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const i=(n=Pe.generators.find(o=>o.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const o=r.schemas.get(i),a=new P.DataModel(o,{wrapLists:!0});hi[t]?a.reset(hi[t].model.data,!1):(a.validate(!0),a.history=[JSON.stringify(a.data)]),hi[t]={model:a,version:e}}catch(o){const a=new Error(`Cannot get generator "${t}" for version "${e}": ${At(o)}`);throw o instanceof Error&&(a.stack=o.stack),a}}return hi[t].model}async function Jp(e){const t=await Rd(e);return is=t.collections,t.collections}async function Sv(e){return(await Rd(e)).blockStates}function _t(e,t,n){const r=Pe.versions.findIndex(a=>a.id===e),i=t?Pe.versions.findIndex(a=>a.id===t):0,o=n?Pe.versions.findIndex(a=>a.id===n):Pe.versions.length-1;return i<=r&&r<=o}var Qp={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function a(l,d){if(!o[l]){o[l]={};for(var c=0;c<l.length;c++)o[l][l.charAt(c)]=c}return o[l][d]}var s={compressToBase64:function(l){if(l==null)return"";var d=s._compress(l,6,function(c){return r.charAt(c)});switch(d.length%4){default:case 0:return d;case 1:return d+"===";case 2:return d+"==";case 3:return d+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:s._decompress(l.length,32,function(d){return a(r,l.charAt(d))})},compressToUTF16:function(l){return l==null?"":s._compress(l,15,function(d){return n(d+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:s._decompress(l.length,16384,function(d){return l.charCodeAt(d)-32})},compressToUint8Array:function(l){for(var d=s.compress(l),c=new Uint8Array(d.length*2),u=0,f=d.length;u<f;u++){var h=d.charCodeAt(u);c[u*2]=h>>>8,c[u*2+1]=h%256}return c},decompressFromUint8Array:function(l){if(l==null)return s.decompress(l);for(var d=new Array(l.length/2),c=0,u=d.length;c<u;c++)d[c]=l[c*2]*256+l[c*2+1];var f=[];return d.forEach(function(h){f.push(n(h))}),s.decompress(f.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":s._compress(l,6,function(d){return i.charAt(d)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),s._decompress(l.length,32,function(d){return a(i,l.charAt(d))}))},compress:function(l){return s._compress(l,16,function(d){return n(d)})},_compress:function(l,d,c){if(l==null)return"";var u,f,h={},w={},_="",g="",m="",v=2,x=3,b=2,y=[],k=0,C=0,E;for(E=0;E<l.length;E+=1)if(_=l.charAt(E),Object.prototype.hasOwnProperty.call(h,_)||(h[_]=x++,w[_]=!0),g=m+_,Object.prototype.hasOwnProperty.call(h,g))m=g;else{if(Object.prototype.hasOwnProperty.call(w,m)){if(m.charCodeAt(0)<256){for(u=0;u<b;u++)k=k<<1,C==d-1?(C=0,y.push(c(k)),k=0):C++;for(f=m.charCodeAt(0),u=0;u<8;u++)k=k<<1|f&1,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=f>>1}else{for(f=1,u=0;u<b;u++)k=k<<1|f,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=0;for(f=m.charCodeAt(0),u=0;u<16;u++)k=k<<1|f&1,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=f>>1}v--,v==0&&(v=Math.pow(2,b),b++),delete w[m]}else for(f=h[m],u=0;u<b;u++)k=k<<1|f&1,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=f>>1;v--,v==0&&(v=Math.pow(2,b),b++),h[g]=x++,m=String(_)}if(m!==""){if(Object.prototype.hasOwnProperty.call(w,m)){if(m.charCodeAt(0)<256){for(u=0;u<b;u++)k=k<<1,C==d-1?(C=0,y.push(c(k)),k=0):C++;for(f=m.charCodeAt(0),u=0;u<8;u++)k=k<<1|f&1,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=f>>1}else{for(f=1,u=0;u<b;u++)k=k<<1|f,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=0;for(f=m.charCodeAt(0),u=0;u<16;u++)k=k<<1|f&1,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=f>>1}v--,v==0&&(v=Math.pow(2,b),b++),delete w[m]}else for(f=h[m],u=0;u<b;u++)k=k<<1|f&1,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=f>>1;v--,v==0&&(v=Math.pow(2,b),b++)}for(f=2,u=0;u<b;u++)k=k<<1|f&1,C==d-1?(C=0,y.push(c(k)),k=0):C++,f=f>>1;for(;;)if(k=k<<1,C==d-1){y.push(c(k));break}else C++;return y.join("")},decompress:function(l){return l==null?"":l==""?null:s._decompress(l.length,32768,function(d){return l.charCodeAt(d)})},_decompress:function(l,d,c){var u=[],f=4,h=4,w=3,_="",g=[],m,v,x,b,y,k,C,E={val:c(0),position:d,index:1};for(m=0;m<3;m+=1)u[m]=m;for(x=0,y=Math.pow(2,2),k=1;k!=y;)b=E.val&E.position,E.position>>=1,E.position==0&&(E.position=d,E.val=c(E.index++)),x|=(b>0?1:0)*k,k<<=1;switch(x){case 0:for(x=0,y=Math.pow(2,8),k=1;k!=y;)b=E.val&E.position,E.position>>=1,E.position==0&&(E.position=d,E.val=c(E.index++)),x|=(b>0?1:0)*k,k<<=1;C=n(x);break;case 1:for(x=0,y=Math.pow(2,16),k=1;k!=y;)b=E.val&E.position,E.position>>=1,E.position==0&&(E.position=d,E.val=c(E.index++)),x|=(b>0?1:0)*k,k<<=1;C=n(x);break;case 2:return""}for(u[3]=C,v=C,g.push(C);;){if(E.index>l)return"";for(x=0,y=Math.pow(2,w),k=1;k!=y;)b=E.val&E.position,E.position>>=1,E.position==0&&(E.position=d,E.val=c(E.index++)),x|=(b>0?1:0)*k,k<<=1;switch(C=x){case 0:for(x=0,y=Math.pow(2,8),k=1;k!=y;)b=E.val&E.position,E.position>>=1,E.position==0&&(E.position=d,E.val=c(E.index++)),x|=(b>0?1:0)*k,k<<=1;u[h++]=n(x),C=h-1,f--;break;case 1:for(x=0,y=Math.pow(2,16),k=1;k!=y;)b=E.val&E.position,E.position>>=1,E.position==0&&(E.position=d,E.val=c(E.index++)),x|=(b>0?1:0)*k,k<<=1;u[h++]=n(x),C=h-1,f--;break;case 2:return g.join("")}if(f==0&&(f=Math.pow(2,w),w++),u[C])_=u[C];else if(C===h)_=v+v.charAt(0);else return null;g.push(_),u[h++]=v+_.charAt(0),f--,v=_,f==0&&(f=Math.pow(2,w),w++)}}};return s}();e!=null&&(e.exports=t)})(Qp);var e2=Qp.exports;const Iv="https://z15g7can.directus.app/items",H1=new Map;async function Mv(e,t,n,r){try{const i=JSON.stringify(n),o=e2.compressToBase64(i);console.debug("Compression rate",i.length/i.length);const a=JSON.stringify({data:o,type:e,version:t,show_preview:r});let s=H1.get(a);if(!s){const l=await t2("/snippets",a);H1.set(a,l.id),s=l.id}return{id:s,length:i.length,compressed:o.length,rate:i.length/o.length}}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function Tv(e){var t;try{const n=await t2(`/snippets/${e}`);return be(oe({},n),{data:JSON.parse((t=e2.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function t2(e,t){var i,o,a;const r=await(await fetch(Iv+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((a=(o=(i=r.errors)==null?void 0:i[0])==null?void 0:o.message)!=null?a:"Unknown error")}const Dd={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let wo=null;const Fd={json:{parse:async e=>{try{return JSON.parse(e)}catch{return wo=await Ce(()=>import("./index.4f6020c7.js").then(function(n){return n.i}),[]),wo.parse(e)}},stringify:(e,t)=>(wo!=null?wo:JSON).stringify(e,null,t)+`
`},yaml:{parse:async e=>Bc.load(e),stringify:(e,t)=>Bc.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function Hc(e,t,n){return Fd[t!=null?t:He.getFormat()].stringify(e,Dd[n!=null?n:He.getIndent()])}async function n2(e,t){return await Fd[t].parse(e)}function Lv(e){return Dd[e]}function Ov(){return Object.keys(Dd)}function Nv(){return Object.keys(Fd)}var He;(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",e.ID_PREVIEW_PANEL_OPEN="misode_preview_panel_open",e.ID_PROJECT_PANEL_OPEN="misode_project_panel_open",e.ID_OPEN_PROJECT="misode_open_project",e.ID_TREE_VIEW_MODE="misode_tree_view_mode",e.ID_GENERATOR_HISTORY="misode_generator_history";function t(){var R;return(R=localStorage.getItem(e.ID_LANGUAGE))!=null?R:"en"}e.getLanguage=t;function n(){var R;return(R=localStorage.getItem(e.ID_THEME))!=null?R:"dark"}e.getTheme=n;function r(){const R=localStorage.getItem(e.ID_VERSION);return R&&Uc.includes(R)?R:"1.19"}e.getVersionOrDefault=r;function i(){const R=localStorage.getItem(e.ID_VERSION);return R&&Uc.includes(R)?R:null}e.getVersion=i;function o(){var R;return(R=localStorage.getItem(e.ID_INDENT))!=null?R:"2_spaces"}e.getIndent=o;function a(){var R;return(R=localStorage.getItem(e.ID_FORMAT))!=null?R:"json"}e.getFormat=a;function s(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=s;function l(){var R;return(R=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?R:"latest"}e.getSoundsVersion=l;function d(){const R=localStorage.getItem(e.ID_PROJECTS);return R?JSON.parse(R):[Er]}e.getProjects=d;function c(R){var L;return JSON.parse((L=localStorage.getItem(e.ID_BACKUPS))!=null?L:"{}")[R]}e.getBackup=c;function u(){const R=localStorage.getItem(e.ID_PREVIEW_PANEL_OPEN);if(R!==null)return JSON.parse(R)}e.getPreviewPanelOpen=u;function f(){const R=localStorage.getItem(e.ID_PROJECT_PANEL_OPEN);if(R!==null)return JSON.parse(R)}e.getProjectPanelOpen=f;function h(){var R;return(R=localStorage.getItem(e.ID_OPEN_PROJECT))!=null?R:Er.name}e.getOpenProject=h;function w(){var R;return(R=localStorage.getItem(e.ID_TREE_VIEW_MODE))!=null?R:"resources"}e.getTreeViewMode=w;function _(){var R;return JSON.parse((R=localStorage.getItem(e.ID_GENERATOR_HISTORY))!=null?R:"[]")}e.getGeneratorHistory=_;function g(R){R&&localStorage.setItem(e.ID_LANGUAGE,R)}e.setLanguage=g;function m(R){R&&localStorage.setItem(e.ID_THEME,R)}e.setTheme=m;function v(R){R&&localStorage.setItem(e.ID_VERSION,R)}e.setVersion=v;function x(R){R&&localStorage.setItem(e.ID_INDENT,R)}e.setIndent=x;function b(R){R&&localStorage.setItem(e.ID_FORMAT,R)}e.setFormat=b;function y(R){R!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,R.toString())}e.setHighlighting=y;function k(R){R&&localStorage.setItem(e.ID_SOUNDS_VERSION,R)}e.setSoundsVersion=k;function C(R){R&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(R))}e.setProjects=C;function E(R,V){var j;const L=JSON.parse((j=localStorage.getItem(e.ID_BACKUPS))!=null?j:"{}");V===void 0?delete L[R]:L[R]=V,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(L))}e.setBackup=E;function M(R){R===void 0?localStorage.removeItem(e.ID_PREVIEW_PANEL_OPEN):localStorage.setItem(e.ID_PREVIEW_PANEL_OPEN,JSON.stringify(R))}e.setPreviewPanelOpen=M;function S(R){R===void 0?localStorage.removeItem(e.ID_PROJECT_PANEL_OPEN):localStorage.setItem(e.ID_PROJECT_PANEL_OPEN,JSON.stringify(R))}e.setProjectPanelOpen=S;function T(R){R===void 0?localStorage.removeItem(e.ID_OPEN_PROJECT):localStorage.setItem(e.ID_OPEN_PROJECT,R)}e.setOpenProject=T;function z(R){R&&localStorage.setItem(e.ID_TREE_VIEW_MODE,R)}e.setTreeViewMode=z;function F(R){const V=_();V.push(R),localStorage.setItem(e.ID_GENERATOR_HISTORY,JSON.stringify(V.slice(-50)))}e.visitGenerator=F})(He||(He={}));var r2=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","any_version":"Any","assets":"Assets","back":"Back","block_definition":"Blockstate","changelog":"Technical changelog","changelog.search":"Search changes","changelog.no_results":"No documented changes","changelog.show_more":"Show %0% more changes","choose_file":"Choose file","choose_zip_file":"Choose zip file","chat_type":"Chat Type","collapse":"Collapse","collapse_all":"Hold %0% to collapse all","configure_layers":"Configure layers","copy":"Copy","copy_share":"Copy share link","copied":"Copied!","copy_context":"Copy context","developed_by":"Developed by","dimension_type":"Dimension Type","dimension":"Dimension","disabled":"Disabled","donate":"Donate","download":"Download","duplicate":"Duplicate","enabled":"Enabled","entries_hidden":"%0% entries hidden","entries_hidden.more":"Show %0% more","entries_hidden.all":"Show all","expand":"Expand","expand_all":"Hold %0% to expand all","feature.decorated.decorators":"Decorators","feature.decorated.decorators.entry":"Decorator","follow_reference":"Follow reference","font":"Font","format.json":"JSON","format.yaml":"YAML","fields":"Fields","generate_new_seed":"Generate new seed","generate_new_uuid":"Generate new UUID","generators.all":"All generators","generators.popular":"Popular Generators","generators.recent":"Recently Used Generators","generators.search":"Search generators","generators.no_results":"No generators for this query","github":"GitHub","guides":"Guides","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","hide_project":"Hide project","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_file_chosen":"No file chosen","no_presets":"No presets","output_settings":"Output settings","predicate":"Predicate","recipe":"Recipe","redo":"Redo","reset":"Reset","reset_default":"Reset to default","restore_backup":"Restore last backup","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme":"Theme","tag/block":"Block Tag","tag/entity_type":"Entity Type Tag","tag/fluid":"Fluid Tag","tag/game_event":"Game Event Tag","tag/item":"Item Tag","tag/worldgen/biome":"Biome Tag","tags":"Tags","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.changelog":"Technical Changelog","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.generators":"Data Pack Generators","title.guides":"Data Pack Guides","title.home":"Data Pack Generators","title.partners":"Partners","title.project":"%0% Project","title.new_project":"Create a new project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","title.worldgen":"Worldgen Generators and Guides","tools":"Tools","pack_mcmeta":"Pack.mcmeta","partner.immersive_weathering":"Immersive Weathering","partner.immersive_weathering.block_growth":"Block Growth","presets":"Presets","preview":"Visualize","preview.auto_scroll":"Auto scroll","preview.biome":"Biome","preview.daytime":"Daytime","preview.luck":"Luck","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.weather":"Weather","preview.weather.clear":"Clear","preview.weather.rain":"Rain","preview.weather.thunder":"Thunder","preview.width":"Width","project.new":"New project","project.cancel":"Cancel","project.create":"Create a new project","project.delete":"Delete project","project.delete_confirm.1":"You are about to delete %0%","project.delete_confirm.2":"This cannot be undone!","project.delete_file":"Delete file","project.download":"Download data pack","project.go_to":"Go to project","project.new_file":"New file","project.no_files":"No files","project.rename":"Rename","project.rename_file":"Rename file","project.save":"Save","project.save_current_file":"Save file to project","project.search":"Search project","project.search_drafts":"Search drafts","project.show_file_paths":"Show file paths","project.show_resources":"Show resources","project.unsaved_file":"Unsaved file","project.name":"Project name","project.name.already_exists":"There already exists a project with this name","project.namespace":"Default namespace","project.namespace.invalid":"Invalid namespace","remove":"Remove","resource_location":"Resource location","search":"Search","show_output":"Show output","show_preview":"Show preview","show_project":"Show project","sounds.play":"Play","sounds.play_sound":"Play sound","sounds.play_all":"Play all","sounds.search":"Search sounds","sounds.download_function":"Download Mcfunction","sounds.delay":"Delay","sounds.pitch":"Pitch","sounds.volume":"Volume","sounds.copy_command":"Copy command","sounds.add_sound":"Add sound","sounds.remove_sound":"Remove sound","sounds.unknown_sound":"Unknown sound","sounds.loading_sound":"Loading sound","source_code_on":"Source code on","source_placeholder":"Paste raw %0% content here","switch_generator":"Switch generator","switch_project":"Switch project","switch_version":"Switch version","terrain_settings":"Terrain settings","text_component":"Text Component","undo":"Undo","versions.article":"Article","versions.search":"Search versions","versions.no_results":"No results","versions.all":"All versions","versions.previous":"Previous","versions.next":"Next","versions.released":"Released","versions.release_target":"Release target","versions.data_version":"Data version","versions.protocol_version":"Protocol version","versions.pack_format":"Pack format","versions.data_pack_format":"Data pack format","versions.resource_pack_format":"Resource pack format","versions.technical_changes":"Technical changes","versions.discussion":"Discussion","versions.minecraft_versions":"Minecraft Versions","versions.latest_snapshot":"Latest snapshot","versions.latest_release":"Latest release","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Configured Carver","worldgen/configured_feature":"Configured 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","y":"Y","zoom_in":"Zoom in","zoom_in_limit":"Cannot zoom in further\\n1 pixel = 4 blocks","zoom_out":"Zoom out"}'),Rv=Object.freeze(Object.defineProperty({__proto__:null,default:r2},Symbol.toStringTag,{value:"Module"}));function Dv(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return Ce(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return Ce(()=>import("./de.489974c1.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return Ce(()=>import("./en.746071a5.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return Ce(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return Ce(()=>import("./fr.9ee7053a.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return Ce(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return Ce(()=>import("./ja.a4b5e855.js"),[]);case"../../../node_modules/@mcschema/locales/src/ko.json":return Ce(()=>import("./ko.430d6f93.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return Ce(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return Ce(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return Ce(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return Ce(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return Ce(()=>import("./zh-cn.c7dcc874.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return Ce(()=>import("./zh-tw.fe4ef73c.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}function Fv(e){switch(e){case"../../locales/de.json":return Ce(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return Ce(()=>Promise.resolve().then(function(){return Rv}),void 0);case"../../locales/es.json":return Ce(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return Ce(()=>import("./fr.3cd861bf.js"),[]);case"../../locales/it.json":return Ce(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return Ce(()=>import("./ja.0530e336.js"),[]);case"../../locales/ko.json":return Ce(()=>import("./ko.b4055eb4.js"),[]);case"../../locales/pl.json":return Ce(()=>import("./pl.8c27ef9b.js"),[]);case"../../locales/pt.json":return Ce(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return Ce(()=>import("./ru.c5e64dad.js"),[]);case"../../locales/sk.json":return Ce(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return Ce(()=>import("./zh-cn.de5ac87e.js"),[]);case"../../locales/zh-tw.json":return Ce(()=>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 i2=Mr({lang:"none",locale:e=>e,changeLocale:()=>{}}),To={fallback:r2};function Fe(e,t,...n){var i,o,a,s,l;const r=(l=(s=(a=(i=To[e])==null?void 0:i[t])!=null?a:(o=To.en)==null?void 0:o[t])!=null?s:To.fallback[t])!=null?l:t;return Pv(r,n)}function Pv(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 Hl(e){if(To[e])return;const t=Pe.languages.find(o=>o.code===e);if(!t)return;const n=await Fv(`../../locales/${e}.json`),r=t.schemas!==!1&&await Dv(`../../../node_modules/@mcschema/locales/src/${e}.json`);let i={default:{}};e==="en"&&(i=await Ce(()=>import("./en.321d8b56.js"),[])),To[e]=oe(oe(oe({},n.default),r.default),i.default)}function Ae(){return ri(i2)}function $v({children:e}){const[t,n]=Y("none"),r=Ve((a,...s)=>Fe(t,a,...s),[t]),i=Ve(async a=>{await Hl(a),Ne.changeLocale(t,a),He.setLanguage(a),n(a)},[t]);me(()=>{(async()=>{const a=He.getLanguage();Ne.setLocale(a),await Promise.all([Hl("en"),...a!=="en"?[Hl(a)]:[]]),n(a)})()},[]);const o={lang:t,locale:r,changeLocale:i};return p(i2.Provider,{value:o,children:e})}const Er={name:"Drafts",namespace:"draft",files:[]},Bv=["worldgen/[a-z_]+","tags/worldgen/[a-z_]+","tags/[a-z_]+","[a-z_]+"].map(e=>RegExp(`^data/([a-z0-9._-]+)/(${e})/([a-z0-9/._-]+)$`)),o2=Mr({projects:[Er],project:Er,createProject:()=>{},deleteProject:()=>{},changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function $n(){return ri(o2)}function zv({children:e}){const[t,n]=Y(He.getProjects()),[r,i]=Y(He.getOpenProject()),o=Ee(()=>{var v;return(v=t.find(x=>x.name===r))!=null?v:Er},[t,r]),[a,s]=Y(void 0),l=Ee(()=>{if(!!a)return o.files.find(v=>v.type===a[0]&&v.id===a[1])},[o,a]),d=Ve(v=>{He.setProjects(v),n(v)},[]),c=Ve((v,x,b)=>{d([...t,{name:v,namespace:x,version:b,files:[]}])},[t]),u=Ve(v=>{v!==Er.name&&d(t.filter(x=>x.name!==v))},[t]),f=Ve(v=>{He.setOpenProject(v),i(v)},[]),h=Ve(v=>{d(t.map(x=>x.name===r?oe(oe({},x),v):x))},[t,r]),w=Ve((v,x,b)=>{var y,k;if(!b.id)h({files:o.files.filter(C=>C.type!==v||C.id!==x)});else{const C=v==="pack_mcmeta"?"pack":b.id.includes(":")?b.id:`${(y=o.namespace)!=null?y:"minecraft"}:${b.id}`,E=o.files.some(M=>M.type===v&&M.id===C);if(x){if((l==null?void 0:l.id)===x&&x!==C&&E)return!1;h({files:o.files.map(M=>M.type===v&&M.id===x?be(oe(oe({},M),b),{id:C}):M)}),(l==null?void 0:l.id)===x&&s([v,C])}else{if(E)return!1;h({files:[...o.files,{type:v,id:C,data:(k=b.data)!=null?k:{}}]}),s([v,C])}}return!0},[h,o,l]),_=Ve((v,x)=>{const b=Pe.generators.find(y=>y.id===v||y.path===v);if(!b)throw new Error(`Cannot find generator of type ${v}`);s([b.id,x]),ti(Cr(b.url))},[]),g=Ve(()=>{s(void 0)},[]),m={projects:t,project:o,file:l,createProject:c,changeProject:f,deleteProject:u,updateProject:h,updateFile:w,openFile:_,closeFile:g};return p(o2.Provider,{value:m,children:e})}function Zl(e){var i;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id];if(e.type==="pack_mcmeta")return e.id==="pack"?"pack.mcmeta":void 0;const r=Pe.generators.find(o=>o.id===e.type);if(!!r)return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}.json`}function a2(e){if(e==="pack.mcmeta")return{type:"pack_mcmeta",id:"pack"};for(const t of Bv){const n=e.match(t);if(!n)continue;const r=Pe.generators.find(a=>{var s;return((s=a.path)!=null?s:a.id)===n[2]});if(!r)continue;const i=n[1],o=n[3].replace(/\.[a-z]+$/,"");return{type:r.id,id:`${i}:${o}`}}}const s2=Mr({biomeColors:{},setBiomeColor:()=>{}});function l2(){return ri(s2)}function jv({children:e}){const[t,n]=Zp("misode_biome_colors",{},JSON.parse,JSON.stringify),r=Ve((o,a)=>{n(be(oe({},t),{[o]:a}))},[t]),i={biomeColors:t,setBiomeColor:r};return p(s2.Provider,{value:i,children:e})}const c2=Mr({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function d2(){return ri(c2)}function Vv({children:e}){const[t,n]=Y(He.getTheme()),r=Ms("(prefers-color-scheme: light)"),i=Ms("(prefers-color-scheme: dark)");me(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const o=Ve(s=>{Ne.changeTheme(t,s),He.setTheme(s),n(s)},[t]);me(()=>{Ne.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]),me(()=>{Ne.setTheme(t)},[]);const a={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:o};return p(c2.Provider,{value:a,children:e})}const Uv=3,u2=Mr({title:"",changeTitle:()=>{}});function vn(e,t,n){const r=ri(u2);return me(()=>{e&&r.changeTitle(e,t,n)},[e,t,n]),r}function Hv({children:e}){const{locale:t}=Ae(),[n,r]=Y(t("title.home")),i=Ve((a,s,l)=>{let d=Pe.versions;s!==void 0&&(d=Pe.versions.filter(u=>s==null?void 0:s.includes(u.id)));let c="";l&&(c=` - ${l}`),(s==null?void 0:s.length)!==0&&(c=` - Minecraft ${d.map(f=>f.id).slice(-Uv).join(", ")}`),document.title=a+c,r(a)},[]),o={title:n,changeTitle:i};return p(u2.Provider,{value:o,children:e})}const Zv="version",f2=Mr({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function qt(){return ri(f2)}function Gv({children:e}){const[t,n]=Y(He.getVersionOrDefault()),[r,i]=Wr(Zv);me(()=>{Uc.includes(r)&&t!==r&&(Ne.setVersion(r),n(r))},[t,r]);const o=Ve((s,l=!0,d=!1)=>{(d||r)&&i(s,!0),l&&(Ne.changeVersion(t,s),He.setVersion(s)),n(s)},[t,r]);me(()=>{var s;Ne.setVersion(t),Ne.setSelectedVersion((s=He.getVersion())!=null?s:"default")},[]);const a={version:t,changeVersion:o,changeTargetVersion:i};return p(f2.Provider,{value:a,children:e})}function Yv({value:e,onChange:t,label:n,accept:r}){const{locale:i}=Ae(),o=Me(null),a=()=>{var l,d;if(o.current!==null)for(let c=0;c<((d=(l=o.current.files)==null?void 0:l.length)!=null?d:0);c++){const u=o.current.files[c];t(u)}},s=Ve(l=>{if(l.preventDefault(),!!l.dataTransfer)for(let d=0;d<l.dataTransfer.files.length;d++){const c=l.dataTransfer.files[d];t(c)}},[t]);return N("label",{class:"file-upload",onDrop:s,onDragOver:l=>l.preventDefault(),children:[p("input",{ref:o,type:"file",onChange:a,accept:r}),p(ae,{label:n!=null?n:i("choose_file")}),p("span",{children:e?e.name:i("no_file_chosen")})]})}function Bn({donate:e}){const{locale:t}=Ae();return N("footer",{children:[p("p",{children:N("span",{children:[t("developed_by")," ",p("a",{href:"https://github.com/misode",target:"_blank",rel:"noreferrer",children:"Misode"})]})}),e!==!1&&N("p",{class:"donate",children:[ue.heart,p("a",{href:"https://ko-fi.com/misode",target:"_blank",rel:"noreferrer",children:t("donate")})]}),N("p",{children:[ue.mark_github,N("span",{children:[t("source_code_on")," ",p("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",children:t("github")})]})]})]})}function Wv({label:e,value:t,onChange:n}){const r=Ur();return N("label",{class:"checkbox",children:[p("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e]})}function Pd(e,t,n){const r=i=>{const o=i.onChange&&(l=>{var c;const d=l.target.value;(c=i.onChange)==null||c.call(i,n(d))}),a=i.onEnter&&(l=>{var d,c;if(l.key==="Enter"){const u=l.target.value;(d=i.onEnter)==null||d.call(i,n(u))}else l.key==="Escape"&&((c=i.onCancel)==null||c.call(i))}),s=Me(null);return me(()=>{var l;i.autofocus&&((l=s.current)==null||l.select())},[i.autofocus]),p("input",be(oe({ref:s},i),{type:t,onChange:o,onKeyDown:a}))};return r.displayName=e,r}const wn=Pd("TextInput","text",e=>e),Ts=Pd("NumberInput","number",e=>Number(e)),Z1=Pd("RangeInput","range",e=>Number(e));function qv({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,o]=Y(""),a=Ee(()=>{var l;const s=i.trim().split(" ");return(l=e==null?void 0:e.filter(d=>s.every(c=>d.includes(c))))!=null?l:[]},[e,i]);return N(le,{children:[p(ns,{icon:"search",large:!0,value:i,onChange:o,doSelect:1,placeholder:n!=null?n:"Search"}),N("div",{class:"result-list",children:[a.map(s=>p(ae,{label:s,onClick:()=>t==null?void 0:t(s)},s)),a.length===0&&p(ae,{label:r!=null?r:"No results"})]})]})}const Gl="data-modals";function ll(e){var n;me(()=>(G1(1),window.addEventListener("click",e.onDismiss),()=>{G1(-1),window.removeEventListener("click",e.onDismiss)}));const t=Ve(r=>{var i;r.stopPropagation(),(i=r.target)==null||i.dispatchEvent(new Event(jc,{bubbles:!0}))},[]);return p("div",be(oe({},e),{class:`modal ${(n=e.class)!=null?n:""}`,onClick:t,children:e.children}))}function G1(e){var r;const n=parseInt((r=document.body.getAttribute(Gl))!=null?r:"0")+e;n<=0?document.body.removeAttribute(Gl):document.body.setAttribute(Gl,n.toFixed())}function Xv({model:e,id:t,method:n,onClose:r}){const{locale:i}=Ae(),{projects:o,project:a,updateFile:s}=$n(),[l,d]=Y(t==="pack_mcmeta"?"pack":""),c=()=>{Ne.saveProjectFile(t,o.length,a.files.length,n),s(t,void 0,{type:t,id:l,data:P.DataModel.unwrapLists(e.data)}),r()};return N(ll,{class:"file-modal",onDismiss:r,children:[p("p",{children:i("project.save_current_file")}),p(wn,{autofocus:t!=="pack_mcmeta",class:"btn btn-input",value:l,onChange:d,onEnter:c,onCancel:r,placeholder:i("resource_location"),spellcheck:!1,readOnly:t==="pack_mcmeta"}),p(ae,{icon:"file",label:i("project.save"),onClick:c})]})}function Kv({id:e,name:t,onClose:n}){const{locale:r}=Ae(),{projects:i,project:o,updateFile:a}=$n(),[s,l]=Y(t),d=()=>{Ne.renameProjectFile(e,i.length,o.files.length,"menu"),a(e,t,{type:e,id:s}),n()};return N(ll,{class:"file-modal",onDismiss:n,children:[p("p",{children:r("project.rename_file")}),p(wn,{autofocus:!0,class:"btn btn-input",value:s,onChange:l,onEnter:d,placeholder:r("resource_location"),spellcheck:!1}),p(ae,{icon:"pencil",label:r("project.rename"),onClick:d})]})}function Sn({id:e,minimal:t}){var l;const{locale:n}=Ae(),r=Ee(()=>{const d=Pe.generators.find(c=>c.id===e);return d===void 0?{id:e,schema:e,url:e}:d},[e]),i=n(r.partner?`partner.${r.partner}.${r.id}`:r.id),o=Object.keys(Ji).includes(e)?e:void 0;if(t)return p(tr,{title:i,link:Cr(r.url),titleIcon:o});const a=Ee(()=>r?Pe.versions.filter(d=>_t(d.id,r.minVersion,r.maxVersion)).map(d=>d.id):[],[r]),s=Ee(()=>{var d;return(d=r.tags)!=null&&d.includes("assets")?["resource-pack"]:[]},[r]);return N(Ld,{title:N(le,{children:[i,o&&Ji[o]]}),overlay:r.partner?n(`partner.${r.partner}`):a.join(" \u2022 "),link:Cr(r.url),children:[!r.noPath&&N("p",{class:"card-subtitle",children:["/",(l=r.path)!=null?l:r.id]}),s.length>0&&p("div",{class:"badges-list",children:s.sort().map(d=>p(ao,{label:d}))})]})}function $d({predicate:e}){const{locale:t}=Ae(),{version:n,changeVersion:r}=qt(),[i,o]=Y(""),[a,s]=Y(!0),l=Ee(()=>Pe.generators.filter(c=>e===void 0||!e(c)?!1:a===!1?!0:_t(n,c.minVersion,c.maxVersion)),[n,a]),d=Ee(()=>{const c=i.split(" ").map(u=>u.trim().toLowerCase()).filter(u=>u.length>0);return l.filter(u=>{var h,w,_,g;const f=`${u.id} ${(w=(h=u.tags)==null?void 0:h.join(" "))!=null?w:""} ${(_=u.path)!=null?_:""} ${(g=u.partner)!=null?g:""} ${t(u.id).toLowerCase()}`;return c.every(m=>m.startsWith("!")?m.length===1||!f.includes(m.slice(1)):f.includes(m))})},[l,i,t]);return N("div",{class:"generator-list",children:[N("div",{class:"navigation",children:[p(wn,{class:"btn btn-input query-search",placeholder:t("generators.search"),value:i,onChange:o}),p(va,{value:a?n:void 0,onChange:c=>{r(c),s(!0)},hasAny:!0,onAny:()=>s(!1)})]}),d.length===0?p(le,{children:p("span",{class:"note",children:t("generators.no_results")})}):p("div",{class:"card-column",children:d.map(c=>p(Sn,{id:c.id}))})]})}var Qt;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(Qt||(Qt={}));const Jv={[Qt.UP]:[0,1,0],[Qt.DOWN]:[0,-1,0],[Qt.NORTH]:[0,0,-1],[Qt.EAST]:[1,0,0],[Qt.SOUTH]:[0,0,1],[Qt.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return Jv[n]}e.normal=t})(Qt||(Qt={}));var Ft;(function(e){function t(a,s,l){return[a,s,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(a,s,l,d){return[a[0]+s,a[1]+l,a[2]+d]}e.offset=n;function r(a,s){return e.offset(a,...Qt.normal(s))}e.towards=r;function i(a,s){return a===s?!0:a[0]===s[0]&&a[1]===s[1]&&a[2]===s[2]}e.equals=i;function o(a){return a[0]*a[0]+a[1]*a[1]+a[2]*a[2]}e.magnitude=o})(Ft||(Ft={}));/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Qv=4,Y1=0,W1=1,eb=2;function ro(e){let t=e.length;for(;--t>=0;)e[t]=0}const tb=0,h2=1,nb=2,rb=3,ib=258,Bd=29,pa=256,Vo=pa+1+Bd,Pi=30,zd=19,p2=2*Vo+1,Br=15,Yl=16,ob=7,jd=256,g2=16,m2=17,_2=18,Zc=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),os=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ab=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),w2=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sb=512,Yn=new Array((Vo+2)*2);ro(Yn);const Lo=new Array(Pi*2);ro(Lo);const Uo=new Array(sb);ro(Uo);const Ho=new Array(ib-rb+1);ro(Ho);const Vd=new Array(Bd);ro(Vd);const Ls=new Array(Pi);ro(Ls);function Wl(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let v2,b2,x2;function ql(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const y2=e=>e<256?Uo[e]:Uo[256+(e>>>7)],Zo=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},zt=(e,t,n)=>{e.bi_valid>Yl-n?(e.bi_buf|=t<<e.bi_valid&65535,Zo(e,e.bi_buf),e.bi_buf=t>>Yl-e.bi_valid,e.bi_valid+=n-Yl):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},In=(e,t,n)=>{zt(e,n[t*2],n[t*2+1])},k2=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},lb=e=>{e.bi_valid===16?(Zo(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},cb=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let d,c,u,f,h,w,_=0;for(f=0;f<=Br;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,d=e.heap_max+1;d<p2;d++)c=e.heap[d],f=n[n[c*2+1]*2+1]+1,f>l&&(f=l,_++),n[c*2+1]=f,!(c>r)&&(e.bl_count[f]++,h=0,c>=s&&(h=a[c-s]),w=n[c*2],e.opt_len+=w*(f+h),o&&(e.static_len+=w*(i[c*2+1]+h)));if(_!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,_-=2}while(_>0);for(f=l;f!==0;f--)for(c=e.bl_count[f];c!==0;)u=e.heap[--d],!(u>r)&&(n[u*2+1]!==f&&(e.opt_len+=(f-n[u*2+1])*n[u*2],n[u*2+1]=f),c--)}},C2=(e,t,n)=>{const r=new Array(Br+1);let i=0,o,a;for(o=1;o<=Br;o++)r[o]=i=i+n[o-1]<<1;for(a=0;a<=t;a++){let s=e[a*2+1];s!==0&&(e[a*2]=k2(r[s]++,s))}},db=()=>{let e,t,n,r,i;const o=new Array(Br+1);for(n=0,r=0;r<Bd-1;r++)for(Vd[r]=n,e=0;e<1<<Zc[r];e++)Ho[n++]=r;for(Ho[n-1]=r,i=0,r=0;r<16;r++)for(Ls[r]=i,e=0;e<1<<os[r];e++)Uo[i++]=r;for(i>>=7;r<Pi;r++)for(Ls[r]=i<<7,e=0;e<1<<os[r]-7;e++)Uo[256+i++]=r;for(t=0;t<=Br;t++)o[t]=0;for(e=0;e<=143;)Yn[e*2+1]=8,e++,o[8]++;for(;e<=255;)Yn[e*2+1]=9,e++,o[9]++;for(;e<=279;)Yn[e*2+1]=7,e++,o[7]++;for(;e<=287;)Yn[e*2+1]=8,e++,o[8]++;for(C2(Yn,Vo+1,o),e=0;e<Pi;e++)Lo[e*2+1]=5,Lo[e*2]=k2(e,5);v2=new Wl(Yn,Zc,pa+1,Vo,Br),b2=new Wl(Lo,os,0,Pi,Br),x2=new Wl(new Array(0),ab,0,zd,ob)},E2=e=>{let t;for(t=0;t<Vo;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Pi;t++)e.dyn_dtree[t*2]=0;for(t=0;t<zd;t++)e.bl_tree[t*2]=0;e.dyn_ltree[jd*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},A2=e=>{e.bi_valid>8?Zo(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},ub=(e,t,n,r)=>{A2(e),r&&(Zo(e,n),Zo(e,~n)),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},q1=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},Xl=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&q1(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!q1(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},X1=(e,t,n)=>{let r,i,o=0,a,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,r===0?In(e,i,t):(a=Ho[i],In(e,a+pa+1,t),s=Zc[a],s!==0&&(i-=Vd[a],zt(e,i,s)),r--,a=y2(r),In(e,a,n),s=os[a],s!==0&&(r-=Ls[a],zt(e,r,s)));while(o<e.last_lit);In(e,jd,t)},Gc=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,l=-1,d;for(e.heap_len=0,e.heap_max=p2,a=0;a<o;a++)n[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=l<2?++l:0,n[d*2]=1,e.depth[d]=0,e.opt_len--,i&&(e.static_len-=r[d*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)Xl(e,n,a);d=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Xl(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[d*2]=n[a*2]+n[s*2],e.depth[d]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=d,e.heap[1]=d++,Xl(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],cb(e,t),C2(n,l,e.bl_count)},K1=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,l=7,d=4;for(a===0&&(l=138,d=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s<l&&o===a)&&(s<d?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[g2*2]++):s<=10?e.bl_tree[m2*2]++:e.bl_tree[_2*2]++,s=0,i=o,a===0?(l=138,d=3):o===a?(l=6,d=3):(l=7,d=4))},J1=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,l=7,d=4;for(a===0&&(l=138,d=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s<l&&o===a)){if(s<d)do In(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(In(e,o,e.bl_tree),s--),In(e,g2,e.bl_tree),zt(e,s-3,2)):s<=10?(In(e,m2,e.bl_tree),zt(e,s-3,3)):(In(e,_2,e.bl_tree),zt(e,s-11,7));s=0,i=o,a===0?(l=138,d=3):o===a?(l=6,d=3):(l=7,d=4)}},fb=e=>{let t;for(K1(e,e.dyn_ltree,e.l_desc.max_code),K1(e,e.dyn_dtree,e.d_desc.max_code),Gc(e,e.bl_desc),t=zd-1;t>=3&&e.bl_tree[w2[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},hb=(e,t,n,r)=>{let i;for(zt(e,t-257,5),zt(e,n-1,5),zt(e,r-4,4),i=0;i<r;i++)zt(e,e.bl_tree[w2[i]*2+1],3);J1(e,e.dyn_ltree,t-1),J1(e,e.dyn_dtree,n-1)},pb=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return Y1;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return W1;for(n=32;n<pa;n++)if(e.dyn_ltree[n*2]!==0)return W1;return Y1};let Q1=!1;const gb=e=>{Q1||(db(),Q1=!0),e.l_desc=new ql(e.dyn_ltree,v2),e.d_desc=new ql(e.dyn_dtree,b2),e.bl_desc=new ql(e.bl_tree,x2),e.bi_buf=0,e.bi_valid=0,E2(e)},S2=(e,t,n,r)=>{zt(e,(tb<<1)+(r?1:0),3),ub(e,t,n,!0)},mb=e=>{zt(e,h2<<1,3),In(e,jd,Yn),lb(e)},_b=(e,t,n,r)=>{let i,o,a=0;e.level>0?(e.strm.data_type===eb&&(e.strm.data_type=pb(e)),Gc(e,e.l_desc),Gc(e,e.d_desc),a=fb(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?S2(e,t,n,r):e.strategy===Qv||o===i?(zt(e,(h2<<1)+(r?1:0),3),X1(e,Yn,Lo)):(zt(e,(nb<<1)+(r?1:0),3),hb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),X1(e,e.dyn_ltree,e.dyn_dtree)),E2(e),r&&A2(e)},wb=(e,t,n)=>(e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Ho[n]+pa+1)*2]++,e.dyn_dtree[y2(t)*2]++),e.last_lit===e.lit_bufsize-1);var vb=gb,bb=S2,xb=_b,yb=wb,kb=mb,Cb={_tr_init:vb,_tr_stored_block:bb,_tr_flush_block:xb,_tr_tally:yb,_tr_align:kb};const Eb=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0};var Go=Eb;const Ab=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},Sb=new Uint32Array(Ab()),Ib=(e,t,n,r)=>{const i=Sb,o=r+n;e^=-1;for(let a=r;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1};var ht=Ib,qr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},oi={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Mb,_tr_stored_block:Tb,_tr_flush_block:Lb,_tr_tally:br,_tr_align:Ob}=Cb,{Z_NO_FLUSH:ai,Z_PARTIAL_FLUSH:Nb,Z_FULL_FLUSH:Rb,Z_FINISH:xr,Z_BLOCK:eu,Z_OK:Mn,Z_STREAM_END:tu,Z_STREAM_ERROR:nn,Z_DATA_ERROR:Db,Z_BUF_ERROR:Kl,Z_DEFAULT_COMPRESSION:Fb,Z_FILTERED:Pb,Z_HUFFMAN_ONLY:Na,Z_RLE:$b,Z_FIXED:Bb,Z_DEFAULT_STRATEGY:zb,Z_UNKNOWN:jb,Z_DEFLATED:cl}=oi,Vb=9,Ub=15,Hb=8,Zb=29,Gb=256,Yc=Gb+1+Zb,Yb=30,Wb=19,qb=2*Yc+1,Xb=15,Re=3,gr=258,gn=gr+Re+1,Kb=32,dl=42,Wc=69,as=73,ss=91,ls=103,zr=113,ko=666,dt=1,ma=2,Xr=3,io=4,Jb=3,mr=(e,t)=>(e.msg=qr[t],t),nu=e=>(e<<1)-(e>4?9:0),pr=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let Qb=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,yr=Qb;const dr=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Et=(e,t)=>{Lb(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,dr(e.strm)},ze=(e,t)=>{e.pending_buf[e.pending++]=t},vo=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},e6=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Go(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ht(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},I2=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-gn?e.strstart-(e.w_size-gn):0,d=e.window,c=e.w_mask,u=e.prev,f=e.strstart+gr;let h=d[r+a-1],w=d[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(d[i+a]!==w||d[i+a-1]!==h||d[i]!==d[r]||d[++i]!==d[r+1])){r+=2,i++;do;while(d[++r]===d[++i]&&d[++r]===d[++i]&&d[++r]===d[++i]&&d[++r]===d[++i]&&d[++r]===d[++i]&&d[++r]===d[++i]&&d[++r]===d[++i]&&d[++r]===d[++i]&&r<f);if(o=gr-(f-r),r=f-gr,o>a){if(e.match_start=t,a=o,o>=s)break;h=d[r+a-1],w=d[r+a]}}while((t=u[t&c])>l&&--n!==0);return a<=e.lookahead?a:e.lookahead},Kr=e=>{const t=e.w_size;let n,r,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-gn)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);o+=t}if(e.strm.avail_in===0)break;if(r=e6(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=Re)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=yr(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=yr(e,e.ins_h,e.window[a+Re-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<Re)););}while(e.lookahead<gn&&e.strm.avail_in!==0)},t6=(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Kr(e),e.lookahead===0&&t===ai)return dt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Et(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-gn&&(Et(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===xr?(Et(e,!0),e.strm.avail_out===0?Xr:io):(e.strstart>e.block_start&&(Et(e,!1),e.strm.avail_out===0),dt)},Jl=(e,t)=>{let n,r;for(;;){if(e.lookahead<gn){if(Kr(e),e.lookahead<gn&&t===ai)return dt;if(e.lookahead===0)break}if(n=0,e.lookahead>=Re&&(e.ins_h=yr(e,e.ins_h,e.window[e.strstart+Re-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-gn&&(e.match_length=I2(e,n)),e.match_length>=Re)if(r=br(e,e.strstart-e.match_start,e.match_length-Re),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Re){e.match_length--;do e.strstart++,e.ins_h=yr(e,e.ins_h,e.window[e.strstart+Re-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=yr(e,e.ins_h,e.window[e.strstart+1]);else r=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Et(e,!1),e.strm.avail_out===0))return dt}return e.insert=e.strstart<Re-1?e.strstart:Re-1,t===xr?(Et(e,!0),e.strm.avail_out===0?Xr:io):e.last_lit&&(Et(e,!1),e.strm.avail_out===0)?dt:ma},pi=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<gn){if(Kr(e),e.lookahead<gn&&t===ai)return dt;if(e.lookahead===0)break}if(n=0,e.lookahead>=Re&&(e.ins_h=yr(e,e.ins_h,e.window[e.strstart+Re-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Re-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-gn&&(e.match_length=I2(e,n),e.match_length<=5&&(e.strategy===Pb||e.match_length===Re&&e.strstart-e.match_start>4096)&&(e.match_length=Re-1)),e.prev_length>=Re&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Re,r=br(e,e.strstart-1-e.prev_match,e.prev_length-Re),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=yr(e,e.ins_h,e.window[e.strstart+Re-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Re-1,e.strstart++,r&&(Et(e,!1),e.strm.avail_out===0))return dt}else if(e.match_available){if(r=br(e,0,e.window[e.strstart-1]),r&&Et(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return dt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=br(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Re-1?e.strstart:Re-1,t===xr?(Et(e,!0),e.strm.avail_out===0?Xr:io):e.last_lit&&(Et(e,!1),e.strm.avail_out===0)?dt:ma},n6=(e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=gr){if(Kr(e),e.lookahead<=gr&&t===ai)return dt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Re&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+gr;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=gr-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Re?(n=br(e,1,e.match_length-Re),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Et(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===xr?(Et(e,!0),e.strm.avail_out===0?Xr:io):e.last_lit&&(Et(e,!1),e.strm.avail_out===0)?dt:ma},r6=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Kr(e),e.lookahead===0)){if(t===ai)return dt;break}if(e.match_length=0,n=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Et(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===xr?(Et(e,!0),e.strm.avail_out===0?Xr:io):e.last_lit&&(Et(e,!1),e.strm.avail_out===0)?dt:ma};function Cn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const Co=[new Cn(0,0,0,0,t6),new Cn(4,4,8,4,Jl),new Cn(4,5,16,8,Jl),new Cn(4,6,32,32,Jl),new Cn(4,4,16,16,pi),new Cn(8,16,32,32,pi),new Cn(8,16,128,128,pi),new Cn(8,32,128,256,pi),new Cn(32,128,258,1024,pi),new Cn(32,258,258,4096,pi)],i6=e=>{e.window_size=2*e.w_size,pr(e.head),e.max_lazy_match=Co[e.level].max_lazy,e.good_match=Co[e.level].good_length,e.nice_match=Co[e.level].nice_length,e.max_chain_length=Co[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Re-1,e.match_available=0,e.ins_h=0};function o6(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=cl,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(qb*2),this.dyn_dtree=new Uint16Array((2*Yb+1)*2),this.bl_tree=new Uint16Array((2*Wb+1)*2),pr(this.dyn_ltree),pr(this.dyn_dtree),pr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Xb+1),this.heap=new Uint16Array(2*Yc+1),pr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Yc+1),pr(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const M2=e=>{if(!e||!e.state)return mr(e,nn);e.total_in=e.total_out=0,e.data_type=jb;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?dl:zr,e.adler=t.wrap===2?0:1,t.last_flush=ai,Mb(t),Mn},T2=e=>{const t=M2(e);return t===Mn&&i6(e.state),t},a6=(e,t)=>!e||!e.state||e.state.wrap!==2?nn:(e.state.gzhead=t,Mn),L2=(e,t,n,r,i,o)=>{if(!e)return nn;let a=1;if(t===Fb&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>Vb||n!==cl||r<8||r>15||t<0||t>9||o<0||o>Bb)return mr(e,nn);r===8&&(r=9);const s=new o6;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Re-1)/Re),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=o,s.method=n,T2(e)},s6=(e,t)=>L2(e,t,cl,Ub,Hb,zb),l6=(e,t)=>{let n,r;if(!e||!e.state||t>eu||t<0)return e?mr(e,nn):nn;const i=e.state;if(!e.output||!e.input&&e.avail_in!==0||i.status===ko&&t!==xr)return mr(e,e.avail_out===0?Kl:nn);i.strm=e;const o=i.last_flush;if(i.last_flush=t,i.status===dl)if(i.wrap===2)e.adler=0,ze(i,31),ze(i,139),ze(i,8),i.gzhead?(ze(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),ze(i,i.gzhead.time&255),ze(i,i.gzhead.time>>8&255),ze(i,i.gzhead.time>>16&255),ze(i,i.gzhead.time>>24&255),ze(i,i.level===9?2:i.strategy>=Na||i.level<2?4:0),ze(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(ze(i,i.gzhead.extra.length&255),ze(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=ht(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Wc):(ze(i,0),ze(i,0),ze(i,0),ze(i,0),ze(i,0),ze(i,i.level===9?2:i.strategy>=Na||i.level<2?4:0),ze(i,Jb),i.status=zr);else{let a=cl+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=Na||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,a|=s<<6,i.strstart!==0&&(a|=Kb),a+=31-a%31,i.status=zr,vo(i,a),i.strstart!==0&&(vo(i,e.adler>>>16),vo(i,e.adler&65535)),e.adler=1}if(i.status===Wc)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=ht(e.adler,i.pending_buf,i.pending-n,n)),dr(e),n=i.pending,i.pending===i.pending_buf_size));)ze(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=ht(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=as)}else i.status=as;if(i.status===as)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=ht(e.adler,i.pending_buf,i.pending-n,n)),dr(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}i.gzindex<i.gzhead.name.length?r=i.gzhead.name.charCodeAt(i.gzindex++)&255:r=0,ze(i,r)}while(r!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=ht(e.adler,i.pending_buf,i.pending-n,n)),r===0&&(i.gzindex=0,i.status=ss)}else i.status=ss;if(i.status===ss)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=ht(e.adler,i.pending_buf,i.pending-n,n)),dr(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}i.gzindex<i.gzhead.comment.length?r=i.gzhead.comment.charCodeAt(i.gzindex++)&255:r=0,ze(i,r)}while(r!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=ht(e.adler,i.pending_buf,i.pending-n,n)),r===0&&(i.status=ls)}else i.status=ls;if(i.status===ls&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&dr(e),i.pending+2<=i.pending_buf_size&&(ze(i,e.adler&255),ze(i,e.adler>>8&255),e.adler=0,i.status=zr)):i.status=zr),i.pending!==0){if(dr(e),e.avail_out===0)return i.last_flush=-1,Mn}else if(e.avail_in===0&&nu(t)<=nu(o)&&t!==xr)return mr(e,Kl);if(i.status===ko&&e.avail_in!==0)return mr(e,Kl);if(e.avail_in!==0||i.lookahead!==0||t!==ai&&i.status!==ko){let a=i.strategy===Na?r6(i,t):i.strategy===$b?n6(i,t):Co[i.level].func(i,t);if((a===Xr||a===io)&&(i.status=ko),a===dt||a===Xr)return e.avail_out===0&&(i.last_flush=-1),Mn;if(a===ma&&(t===Nb?Ob(i):t!==eu&&(Tb(i,0,0,!1),t===Rb&&(pr(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),dr(e),e.avail_out===0))return i.last_flush=-1,Mn}return t!==xr?Mn:i.wrap<=0?tu:(i.wrap===2?(ze(i,e.adler&255),ze(i,e.adler>>8&255),ze(i,e.adler>>16&255),ze(i,e.adler>>24&255),ze(i,e.total_in&255),ze(i,e.total_in>>8&255),ze(i,e.total_in>>16&255),ze(i,e.total_in>>24&255)):(vo(i,e.adler>>>16),vo(i,e.adler&65535)),dr(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Mn:tu)},c6=e=>{if(!e||!e.state)return nn;const t=e.state.status;return t!==dl&&t!==Wc&&t!==as&&t!==ss&&t!==ls&&t!==zr&&t!==ko?mr(e,nn):(e.state=null,t===zr?mr(e,Db):Mn)},d6=(e,t)=>{let n=t.length;if(!e||!e.state)return nn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==dl||r.lookahead)return nn;if(i===1&&(e.adler=Go(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(pr(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(t.subarray(n-r.w_size,n),0),t=l,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Kr(r);r.lookahead>=Re;){let l=r.strstart,d=r.lookahead-(Re-1);do r.ins_h=yr(r,r.ins_h,r.window[l+Re-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--d);r.strstart=l,r.lookahead=Re-1,Kr(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=Re-1,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,Mn};var u6=s6,f6=L2,h6=T2,p6=M2,g6=a6,m6=l6,_6=c6,w6=d6,v6="pako deflate (from Nodeca project)",Oo={deflateInit:u6,deflateInit2:f6,deflateReset:h6,deflateResetKeep:p6,deflateSetHeader:g6,deflate:m6,deflateEnd:_6,deflateSetDictionary:w6,deflateInfo:v6};const b6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var x6=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(!!n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)b6(n,r)&&(e[r]=n[r])}}return e},y6=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,o=e.length;r<o;r++){let a=e[r];n.set(a,i),i+=a.length}return n},ul={assign:x6,flattenChunks:y6};let O2=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{O2=!1}const Yo=new Uint8Array(256);for(let e=0;e<256;e++)Yo[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Yo[254]=Yo[254]=1;var k6=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const C6=(e,t)=>{if(t<65534&&e.subarray&&O2)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var E6=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const o=new Array(n*2);for(i=0,r=0;r<n;){let a=e[r++];if(a<128){o[i++]=a;continue}let s=Yo[a];if(s>4){o[i++]=65533,r+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&r<n;)a=a<<6|e[r++]&63,s--;if(s>1){o[i++]=65533;continue}a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|a&1023)}return C6(o,i)},A6=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Yo[e[n]]>t?n:t},Wo={string2buf:k6,buf2string:E6,utf8border:A6};function S6(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var N2=S6;const R2=Object.prototype.toString,{Z_NO_FLUSH:I6,Z_SYNC_FLUSH:M6,Z_FULL_FLUSH:T6,Z_FINISH:L6,Z_OK:Os,Z_STREAM_END:O6,Z_DEFAULT_COMPRESSION:N6,Z_DEFAULT_STRATEGY:R6,Z_DEFLATED:D6}=oi;function _a(e){this.options=ul.assign({level:N6,method:D6,chunkSize:16384,windowBits:15,memLevel:8,strategy:R6},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new N2,this.strm.avail_out=0;let n=Oo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Os)throw new Error(qr[n]);if(t.header&&Oo.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Wo.string2buf(t.dictionary):R2.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Oo.deflateSetDictionary(this.strm,r),n!==Os)throw new Error(qr[n]);this._dict_set=!0}}_a.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?L6:I6,typeof e=="string"?n.input=Wo.string2buf(e):R2.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===M6||o===T6)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Oo.deflate(n,o),i===O6)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Oo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Os;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};_a.prototype.onData=function(e){this.chunks.push(e)};_a.prototype.onEnd=function(e){e===Os&&(this.result=ul.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ud(e,t){const n=new _a(t);if(n.push(e,!0),n.err)throw n.msg||qr[n.err];return n.result}function F6(e,t){return t=t||{},t.raw=!0,Ud(e,t)}function P6(e,t){return t=t||{},t.gzip=!0,Ud(e,t)}var $6=_a,B6=Ud,z6=F6,j6=P6,V6=oi,U6={Deflate:$6,deflate:B6,deflateRaw:z6,gzip:j6,constants:V6};const Ra=30,H6=12;var Z6=function(t,n){let r,i,o,a,s,l,d,c,u,f,h,w,_,g,m,v,x,b,y,k,C,E,M,S;const T=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),o=t.next_out,S=t.output,a=o-(n-t.avail_out),s=o+(t.avail_out-257),l=T.dmax,d=T.wsize,c=T.whave,u=T.wnext,f=T.window,h=T.hold,w=T.bits,_=T.lencode,g=T.distcode,m=(1<<T.lenbits)-1,v=(1<<T.distbits)-1;e:do{w<15&&(h+=M[r++]<<w,w+=8,h+=M[r++]<<w,w+=8),x=_[h&m];t:for(;;){if(b=x>>>24,h>>>=b,w-=b,b=x>>>16&255,b===0)S[o++]=x&65535;else if(b&16){y=x&65535,b&=15,b&&(w<b&&(h+=M[r++]<<w,w+=8),y+=h&(1<<b)-1,h>>>=b,w-=b),w<15&&(h+=M[r++]<<w,w+=8,h+=M[r++]<<w,w+=8),x=g[h&v];n:for(;;){if(b=x>>>24,h>>>=b,w-=b,b=x>>>16&255,b&16){if(k=x&65535,b&=15,w<b&&(h+=M[r++]<<w,w+=8,w<b&&(h+=M[r++]<<w,w+=8)),k+=h&(1<<b)-1,k>l){t.msg="invalid distance too far back",T.mode=Ra;break e}if(h>>>=b,w-=b,b=o-a,k>b){if(b=k-b,b>c&&T.sane){t.msg="invalid distance too far back",T.mode=Ra;break e}if(C=0,E=f,u===0){if(C+=d-b,b<y){y-=b;do S[o++]=f[C++];while(--b);C=o-k,E=S}}else if(u<b){if(C+=d+u-b,b-=u,b<y){y-=b;do S[o++]=f[C++];while(--b);if(C=0,u<y){b=u,y-=b;do S[o++]=f[C++];while(--b);C=o-k,E=S}}}else if(C+=u-b,b<y){y-=b;do S[o++]=f[C++];while(--b);C=o-k,E=S}for(;y>2;)S[o++]=E[C++],S[o++]=E[C++],S[o++]=E[C++],y-=3;y&&(S[o++]=E[C++],y>1&&(S[o++]=E[C++]))}else{C=o-k;do S[o++]=S[C++],S[o++]=S[C++],S[o++]=S[C++],y-=3;while(y>2);y&&(S[o++]=S[C++],y>1&&(S[o++]=S[C++]))}}else if((b&64)===0){x=g[(x&65535)+(h&(1<<b)-1)];continue n}else{t.msg="invalid distance code",T.mode=Ra;break e}break}}else if((b&64)===0){x=_[(x&65535)+(h&(1<<b)-1)];continue t}else if(b&32){T.mode=H6;break e}else{t.msg="invalid literal/length code",T.mode=Ra;break e}break}}while(r<i&&o<s);y=w>>3,r-=y,w-=y<<3,h&=(1<<w)-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=o<s?257+(s-o):257-(o-s),T.hold=h,T.bits=w};const gi=15,ru=852,iu=592,ou=0,Ql=1,au=2,G6=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Y6=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),W6=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),q6=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),X6=(e,t,n,r,i,o,a,s)=>{const l=s.bits;let d=0,c=0,u=0,f=0,h=0,w=0,_=0,g=0,m=0,v=0,x,b,y,k,C,E=null,M=0,S;const T=new Uint16Array(gi+1),z=new Uint16Array(gi+1);let F=null,R=0,V,L,j;for(d=0;d<=gi;d++)T[d]=0;for(c=0;c<r;c++)T[t[n+c]]++;for(h=l,f=gi;f>=1&&T[f]===0;f--);if(h>f&&(h=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(u=1;u<f&&T[u]===0;u++);for(h<u&&(h=u),g=1,d=1;d<=gi;d++)if(g<<=1,g-=T[d],g<0)return-1;if(g>0&&(e===ou||f!==1))return-1;for(z[1]=0,d=1;d<gi;d++)z[d+1]=z[d]+T[d];for(c=0;c<r;c++)t[n+c]!==0&&(a[z[t[n+c]]++]=c);if(e===ou?(E=F=a,S=19):e===Ql?(E=G6,M-=257,F=Y6,R-=257,S=256):(E=W6,F=q6,S=-1),v=0,c=0,d=u,C=o,w=h,_=0,y=-1,m=1<<h,k=m-1,e===Ql&&m>ru||e===au&&m>iu)return 1;for(;;){V=d-_,a[c]<S?(L=0,j=a[c]):a[c]>S?(L=F[R+a[c]],j=E[M+a[c]]):(L=32+64,j=0),x=1<<d-_,b=1<<w,u=b;do b-=x,i[C+(v>>_)+b]=V<<24|L<<16|j|0;while(b!==0);for(x=1<<d-1;v&x;)x>>=1;if(x!==0?(v&=x-1,v+=x):v=0,c++,--T[d]===0){if(d===f)break;d=t[n+a[c]]}if(d>h&&(v&k)!==y){for(_===0&&(_=h),C+=u,w=d-_,g=1<<w;w+_<f&&(g-=T[w+_],!(g<=0));)w++,g<<=1;if(m+=1<<w,e===Ql&&m>ru||e===au&&m>iu)return 1;y=v&k,i[y]=h<<24|w<<16|C-o|0}}return v!==0&&(i[C+v]=d-_<<24|64<<16|0),s.bits=h,0};var No=X6;const K6=0,D2=1,F2=2,{Z_FINISH:su,Z_BLOCK:J6,Z_TREES:Da,Z_OK:Jr,Z_STREAM_END:Q6,Z_NEED_DICT:ex,Z_STREAM_ERROR:on,Z_DATA_ERROR:P2,Z_MEM_ERROR:$2,Z_BUF_ERROR:tx,Z_DEFLATED:lu}=oi,B2=1,cu=2,du=3,uu=4,fu=5,hu=6,pu=7,gu=8,mu=9,_u=10,Ns=11,jn=12,ec=13,wu=14,tc=15,vu=16,bu=17,xu=18,yu=19,Fa=20,Pa=21,ku=22,Cu=23,Eu=24,Au=25,Su=26,nc=27,Iu=28,Mu=29,et=30,z2=31,nx=32,rx=852,ix=592,ox=15,ax=ox,Tu=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function sx(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const j2=e=>{if(!e||!e.state)return on;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=B2,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(rx),t.distcode=t.distdyn=new Int32Array(ix),t.sane=1,t.back=-1,Jr},V2=e=>{if(!e||!e.state)return on;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,j2(e)},U2=(e,t)=>{let n;if(!e||!e.state)return on;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?on:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,V2(e))},H2=(e,t)=>{if(!e)return on;const n=new sx;e.state=n,n.window=null;const r=U2(e,t);return r!==Jr&&(e.state=null),r},lx=e=>H2(e,ax);let Lu=!0,rc,ic;const cx=e=>{if(Lu){rc=new Int32Array(512),ic=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(No(D2,e.lens,0,288,rc,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;No(F2,e.lens,0,32,ic,0,e.work,{bits:5}),Lu=!1}e.lencode=rc,e.lenbits=9,e.distcode=ic,e.distbits=5},Z2=(e,t,n,r)=>{let i;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},dx=(e,t)=>{let n,r,i,o,a,s,l,d,c,u,f,h,w,_,g=0,m,v,x,b,y,k,C,E;const M=new Uint8Array(4);let S,T;const z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return on;n=e.state,n.mode===jn&&(n.mode=ec),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,d=n.hold,c=n.bits,u=s,f=l,E=Jr;e:for(;;)switch(n.mode){case B2:if(n.wrap===0){n.mode=ec;break}for(;c<16;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if(n.wrap&2&&d===35615){n.check=0,M[0]=d&255,M[1]=d>>>8&255,n.check=ht(n.check,M,2,0),d=0,c=0,n.mode=cu;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((d&255)<<8)+(d>>8))%31){e.msg="incorrect header check",n.mode=et;break}if((d&15)!==lu){e.msg="unknown compression method",n.mode=et;break}if(d>>>=4,c-=4,C=(d&15)+8,n.wbits===0)n.wbits=C;else if(C>n.wbits){e.msg="invalid window size",n.mode=et;break}n.dmax=1<<n.wbits,e.adler=n.check=1,n.mode=d&512?_u:jn,d=0,c=0;break;case cu:for(;c<16;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if(n.flags=d,(n.flags&255)!==lu){e.msg="unknown compression method",n.mode=et;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=et;break}n.head&&(n.head.text=d>>8&1),n.flags&512&&(M[0]=d&255,M[1]=d>>>8&255,n.check=ht(n.check,M,2,0)),d=0,c=0,n.mode=du;case du:for(;c<32;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}n.head&&(n.head.time=d),n.flags&512&&(M[0]=d&255,M[1]=d>>>8&255,M[2]=d>>>16&255,M[3]=d>>>24&255,n.check=ht(n.check,M,4,0)),d=0,c=0,n.mode=uu;case uu:for(;c<16;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=d&255,n.head.os=d>>8),n.flags&512&&(M[0]=d&255,M[1]=d>>>8&255,n.check=ht(n.check,M,2,0)),d=0,c=0,n.mode=fu;case fu:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}n.length=d,n.head&&(n.head.extra_len=d),n.flags&512&&(M[0]=d&255,M[1]=d>>>8&255,n.check=ht(n.check,M,2,0)),d=0,c=0}else n.head&&(n.head.extra=null);n.mode=hu;case hu:if(n.flags&1024&&(h=n.length,h>s&&(h=s),h&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+h),C)),n.flags&512&&(n.check=ht(n.check,r,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=pu;case pu:if(n.flags&2048){if(s===0)break e;h=0;do C=r[o+h++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&h<s);if(n.flags&512&&(n.check=ht(n.check,r,h,o)),s-=h,o+=h,C)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=gu;case gu:if(n.flags&4096){if(s===0)break e;h=0;do C=r[o+h++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&h<s);if(n.flags&512&&(n.check=ht(n.check,r,h,o)),s-=h,o+=h,C)break e}else n.head&&(n.head.comment=null);n.mode=mu;case mu:if(n.flags&512){for(;c<16;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if(d!==(n.check&65535)){e.msg="header crc mismatch",n.mode=et;break}d=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=jn;break;case _u:for(;c<32;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}e.adler=n.check=Tu(d),d=0,c=0,n.mode=Ns;case Ns:if(n.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=d,n.bits=c,ex;e.adler=n.check=1,n.mode=jn;case jn:if(t===J6||t===Da)break e;case ec:if(n.last){d>>>=c&7,c-=c&7,n.mode=nc;break}for(;c<3;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}switch(n.last=d&1,d>>>=1,c-=1,d&3){case 0:n.mode=wu;break;case 1:if(cx(n),n.mode=Fa,t===Da){d>>>=2,c-=2;break e}break;case 2:n.mode=bu;break;case 3:e.msg="invalid block type",n.mode=et}d>>>=2,c-=2;break;case wu:for(d>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if((d&65535)!==(d>>>16^65535)){e.msg="invalid stored block lengths",n.mode=et;break}if(n.length=d&65535,d=0,c=0,n.mode=tc,t===Da)break e;case tc:n.mode=vu;case vu:if(h=n.length,h){if(h>s&&(h=s),h>l&&(h=l),h===0)break e;i.set(r.subarray(o,o+h),a),s-=h,o+=h,l-=h,a+=h,n.length-=h;break}n.mode=jn;break;case bu:for(;c<14;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if(n.nlen=(d&31)+257,d>>>=5,c-=5,n.ndist=(d&31)+1,d>>>=5,c-=5,n.ncode=(d&15)+4,d>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=et;break}n.have=0,n.mode=xu;case xu:for(;n.have<n.ncode;){for(;c<3;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}n.lens[z[n.have++]]=d&7,d>>>=3,c-=3}for(;n.have<19;)n.lens[z[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},E=No(K6,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,E){e.msg="invalid code lengths set",n.mode=et;break}n.have=0,n.mode=yu;case yu:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[d&(1<<n.lenbits)-1],m=g>>>24,v=g>>>16&255,x=g&65535,!(m<=c);){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if(x<16)d>>>=m,c-=m,n.lens[n.have++]=x;else{if(x===16){for(T=m+2;c<T;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if(d>>>=m,c-=m,n.have===0){e.msg="invalid bit length repeat",n.mode=et;break}C=n.lens[n.have-1],h=3+(d&3),d>>>=2,c-=2}else if(x===17){for(T=m+3;c<T;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}d>>>=m,c-=m,C=0,h=3+(d&7),d>>>=3,c-=3}else{for(T=m+7;c<T;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}d>>>=m,c-=m,C=0,h=11+(d&127),d>>>=7,c-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=et;break}for(;h--;)n.lens[n.have++]=C}}if(n.mode===et)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=et;break}if(n.lenbits=9,S={bits:n.lenbits},E=No(D2,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,E){e.msg="invalid literal/lengths set",n.mode=et;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},E=No(F2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,E){e.msg="invalid distances set",n.mode=et;break}if(n.mode=Fa,t===Da)break e;case Fa:n.mode=Pa;case Pa:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=d,n.bits=c,Z6(e,f),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,d=n.hold,c=n.bits,n.mode===jn&&(n.back=-1);break}for(n.back=0;g=n.lencode[d&(1<<n.lenbits)-1],m=g>>>24,v=g>>>16&255,x=g&65535,!(m<=c);){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if(v&&(v&240)===0){for(b=m,y=v,k=x;g=n.lencode[k+((d&(1<<b+y)-1)>>b)],m=g>>>24,v=g>>>16&255,x=g&65535,!(b+m<=c);){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}d>>>=b,c-=b,n.back+=b}if(d>>>=m,c-=m,n.back+=m,n.length=x,v===0){n.mode=Su;break}if(v&32){n.back=-1,n.mode=jn;break}if(v&64){e.msg="invalid literal/length code",n.mode=et;break}n.extra=v&15,n.mode=ku;case ku:if(n.extra){for(T=n.extra;c<T;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}n.length+=d&(1<<n.extra)-1,d>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Cu;case Cu:for(;g=n.distcode[d&(1<<n.distbits)-1],m=g>>>24,v=g>>>16&255,x=g&65535,!(m<=c);){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if((v&240)===0){for(b=m,y=v,k=x;g=n.distcode[k+((d&(1<<b+y)-1)>>b)],m=g>>>24,v=g>>>16&255,x=g&65535,!(b+m<=c);){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}d>>>=b,c-=b,n.back+=b}if(d>>>=m,c-=m,n.back+=m,v&64){e.msg="invalid distance code",n.mode=et;break}n.offset=x,n.extra=v&15,n.mode=Eu;case Eu:if(n.extra){for(T=n.extra;c<T;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}n.offset+=d&(1<<n.extra)-1,d>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=et;break}n.mode=Au;case Au:if(l===0)break e;if(h=f-l,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=et;break}h>n.wnext?(h-=n.wnext,w=n.wsize-h):w=n.wnext-h,h>n.length&&(h=n.length),_=n.window}else _=i,w=a-n.offset,h=n.length;h>l&&(h=l),l-=h,n.length-=h;do i[a++]=_[w++];while(--h);n.length===0&&(n.mode=Pa);break;case Su:if(l===0)break e;i[a++]=n.length,l--,n.mode=Pa;break;case nc:if(n.wrap){for(;c<32;){if(s===0)break e;s--,d|=r[o++]<<c,c+=8}if(f-=l,e.total_out+=f,n.total+=f,f&&(e.adler=n.check=n.flags?ht(n.check,i,f,a-f):Go(n.check,i,f,a-f)),f=l,(n.flags?d:Tu(d))!==n.check){e.msg="incorrect data check",n.mode=et;break}d=0,c=0}n.mode=Iu;case Iu:if(n.wrap&&n.flags){for(;c<32;){if(s===0)break e;s--,d+=r[o++]<<c,c+=8}if(d!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=et;break}d=0,c=0}n.mode=Mu;case Mu:E=Q6;break e;case et:E=P2;break e;case z2:return $2;case nx:default:return on}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=d,n.bits=c,(n.wsize||f!==e.avail_out&&n.mode<et&&(n.mode<nc||t!==su))&&Z2(e,e.output,e.next_out,f-e.avail_out),u-=e.avail_in,f-=e.avail_out,e.total_in+=u,e.total_out+=f,n.total+=f,n.wrap&&f&&(e.adler=n.check=n.flags?ht(n.check,i,f,e.next_out-f):Go(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===jn?128:0)+(n.mode===Fa||n.mode===tc?256:0),(u===0&&f===0||t===su)&&E===Jr&&(E=tx),E},ux=e=>{if(!e||!e.state)return on;let t=e.state;return t.window&&(t.window=null),e.state=null,Jr},fx=(e,t)=>{if(!e||!e.state)return on;const n=e.state;return(n.wrap&2)===0?on:(n.head=t,t.done=!1,Jr)},hx=(e,t)=>{const n=t.length;let r,i,o;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==Ns)?on:r.mode===Ns&&(i=1,i=Go(i,t,n,0),i!==r.check)?P2:(o=Z2(e,t,n,n),o?(r.mode=z2,$2):(r.havedict=1,Jr))};var px=V2,gx=U2,mx=j2,_x=lx,wx=H2,vx=dx,bx=ux,xx=fx,yx=hx,kx="pako inflate (from Nodeca project)",Wn={inflateReset:px,inflateReset2:gx,inflateResetKeep:mx,inflateInit:_x,inflateInit2:wx,inflate:vx,inflateEnd:bx,inflateGetHeader:xx,inflateSetDictionary:yx,inflateInfo:kx};function Cx(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Ex=Cx;const G2=Object.prototype.toString,{Z_NO_FLUSH:Ax,Z_FINISH:Sx,Z_OK:qo,Z_STREAM_END:oc,Z_NEED_DICT:ac,Z_STREAM_ERROR:Ix,Z_DATA_ERROR:Ou,Z_MEM_ERROR:Mx}=oi;function wa(e){this.options=ul.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new N2,this.strm.avail_out=0;let n=Wn.inflateInit2(this.strm,t.windowBits);if(n!==qo)throw new Error(qr[n]);if(this.header=new Ex,Wn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Wo.string2buf(t.dictionary):G2.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Wn.inflateSetDictionary(this.strm,t.dictionary),n!==qo)))throw new Error(qr[n])}wa.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?Sx:Ax,G2.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Wn.inflate(n,a),o===ac&&i&&(o=Wn.inflateSetDictionary(n,i),o===qo?o=Wn.inflate(n,a):o===Ou&&(o=ac));n.avail_in>0&&o===oc&&n.state.wrap>0&&e[n.next_in]!==0;)Wn.inflateReset(n),o=Wn.inflate(n,a);switch(o){case Ix:case Ou:case ac:case Mx:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===oc))if(this.options.to==="string"){let l=Wo.utf8border(n.output,n.next_out),d=n.next_out-l,c=Wo.buf2string(n.output,l);n.next_out=d,n.avail_out=r-d,d&&n.output.set(n.output.subarray(l,l+d),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===qo&&s===0)){if(o===oc)return o=Wn.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};wa.prototype.onData=function(e){this.chunks.push(e)};wa.prototype.onEnd=function(e){e===qo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ul.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Hd(e,t){const n=new wa(t);if(n.push(e),n.err)throw n.msg||qr[n.err];return n.result}function Tx(e,t){return t=t||{},t.raw=!0,Hd(e,t)}var Lx=wa,Ox=Hd,Nx=Tx,Rx=Hd,Dx=oi,Fx={Inflate:Lx,inflate:Ox,inflateRaw:Nx,ungzip:Rx,constants:Dx};const{Deflate:Px,deflate:$x,deflateRaw:Bx,gzip:zx}=U6,{Inflate:jx,inflate:Vx,inflateRaw:Ux,ungzip:Hx}=Fx;var Zx=Px,Gx=$x,Yx=Bx,Wx=zx,qx=jx,Xx=Vx,Kx=Ux,Jx=Hx,Qx=oi,Ek={Deflate:Zx,deflate:Gx,deflateRaw:Yx,gzip:Wx,Inflate:qx,inflate:Xx,inflateRaw:Kx,ungzip:Jx,constants:Qx};function $i(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 $a(e,t,n,r){const i=$i(e,t,"list");if(i.type!==n)throw new Error(`Expected ${t} to be a list of ${n}s, but found ${i.type}s`);if(r&&i.value.length!==r)throw new Error(`Expected ${t} to be a list of length ${r}, but found length ${i.value.length}`);return i.value}function Y2(e,t){try{return e()}catch{return t}}var q;(function(e){function t(c){return typeof c=="number"?c:void 0}e.readNumber=t;function n(c){return typeof c=="number"?Math.floor(c):void 0}e.readInt=n;function r(c){return typeof c=="string"?c:void 0}e.readString=r;function i(c){return typeof c=="boolean"?c:void 0}e.readBoolean=i;function o(c){return typeof c=="object"&&c!==null?c:void 0}e.readObject=o;function a(c,u){if(!!Array.isArray(c))return c.map(f=>u(f))}e.readArray=a;function s(c,u){var h;const f=(h=o(c))!=null?h:{};return Object.fromEntries(Object.entries(f).map(([w,_])=>[w,u(_)]))}e.readMap=s;function l(c,u,f){const h=u(c);return h?f(h):void 0}e.compose=l;function d(c,u){return typeof c!="string"?u[0]:u.includes(c)?c:u[0]}e.readEnum=d})(q||(q={}));function Ro(e){let t=null;return()=>(t==null&&(t=e()),t)}function Qr(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}const Hn=class{constructor(t,n){I(this,"namespace");I(this,"path");if(this.namespace=t,this.path=n,!t.match(/^[a-z0-9._-]*$/))throw new Error(`Non [a-z0-9._-] character in namespace of ${t}${Hn.SEPARATOR}${n}`);if(!n.match(/^[a-z0-9/._-]*$/))throw new Error(`Non [a-z0-9/._-] character in path of ${t}${Hn.SEPARATOR}${n}`)}equals(t){return this===t?!0:this.namespace===t.namespace&&this.path===t.path}toString(){return this.namespace+Hn.SEPARATOR+this.path}withPrefix(t){return new Hn(this.namespace,t+this.path)}static create(t){return new Hn(this.DEFAULT_NAMESPACE,t)}static parse(t){const n=t.indexOf(this.SEPARATOR);if(n>=0){const r=n>=1?t.substring(0,n):this.DEFAULT_NAMESPACE,i=t.substring(n+1);return new Hn(r,i)}return new Hn(this.DEFAULT_NAMESPACE,t)}};let ve=Hn;I(ve,"DEFAULT_NAMESPACE","minecraft"),I(ve,"SEPARATOR",":");const dn=class{constructor(t,n={}){I(this,"properties");I(this,"name");this.properties=n,this.name=typeof t=="string"?ve.parse(t):t}getName(){return this.name}getProperties(){return this.properties}getProperty(t){return this.properties[t]}isFluid(){return this.is(dn.WATER)||this.is(dn.LAVA)}equals(t){return this.name.equals(t.name)?Object.keys(this.properties).every(n=>t.properties[n]===this.properties[n]):!1}is(t){return this.name.equals(t.name)}toString(){return Object.keys(this.properties).length===0?this.name.toString():`${this.name.toString()}[${Object.entries(this.properties).map(([t,n])=>t+"="+n).join(",")}]`}static fromNbt(t){const n=ve.parse($i(t.value,"Name","string")),r=Y2(()=>$i(t.value,"Properties","compound"),{}),i=Object.keys(r).reduce((o,a)=>be(oe({},o),{[a]:$i(r,a,"string")}),{});return new dn(n,i)}static fromJson(t){var o,a;const n=(o=q.readObject(t))!=null?o:{},r=ve.parse((a=q.readString(n.Name))!=null?a:dn.STONE.name.toString()),i=q.readMap(n.Properties,s=>{var l;return(l=q.readString(s))!=null?l:""});return new dn(r,i)}};let je=dn;I(je,"AIR",new dn(ve.create("air"))),I(je,"STONE",new dn(ve.create("stone"))),I(je,"WATER",new dn(ve.create("water"),{level:"0"})),I(je,"LAVA",new dn(ve.create("lava"),{level:"0"}));class W2{constructor(t,n){I(this,"size");I(this,"defaultValue");I(this,"storage");I(this,"palette");this.size=t,this.defaultValue=n,this.storage=Array(t).fill(0),this.palette=[n]}index(t,n,r){return(t<<8)+(n<<4)+r}get(t,n,r){const i=this.storage[this.index(t,n,r)];return this.palette[i]}set(t,n,r,i){let o=this.palette.findIndex(a=>a.equals(i));o===-1&&(o=this.palette.length,this.palette.push(i)),this.storage[this.index(t,n,r)]=o}}const Ti=class{constructor(t){I(this,"minY");I(this,"states");this.minY=t,this.states=new W2(Ti.SIZE,je.AIR)}get minBlockY(){return this.minY<<4}getBlockState(t,n,r){return this.states.get(t,n,r)}setBlockState(t,n,r,i){this.states.set(t,n,r,i)}};let Mi=Ti;I(Mi,"WIDTH",16),I(Mi,"SIZE",Ti.WIDTH*Ti.WIDTH*Ti.WIDTH);class e4{constructor(t,n,r){I(this,"minY");I(this,"height");I(this,"pos");I(this,"sections");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 a;const[n,r,i]=t,o=this.sections[this.getSectionIndex(r)];return(a=o==null?void 0:o.getBlockState(n&15,r&15,i&15))!=null?a:je.AIR}setBlockState(t,n){const[r,i,o]=t,a=this.getSectionIndex(i);let s=this.sections[a];if(s===null){if(n.equals(je.AIR))return;s=this.getOrCreateSection(a)}s.setBlockState(r&15,i&15,o&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new Mi(this.minSection+t)),this.sections[t]}}var Tt;(function(e){function t(c,u){return[c,u]}e.create=t;function n(c){return[c[0]>>4,c[2]>>4]}e.fromBlockPos=n;function r(c){return[Number(c)&4294967295,Number(c>>BigInt(32))]}e.fromLong=r;function i(c){return o(c[0],c[1])}e.toLong=i;function o(c,u){return BigInt(c&4294967295)|BigInt(u&4294967295)<<BigInt(32)}e.asLong=o;function a(c){return c[0]<<4}e.minBlockX=a;function s(c){return c[1]<<4}e.minBlockZ=s;function l(c){return(c[0]<<4)+15}e.maxBlockX=l;function d(c){return(c[1]<<4)+15}e.maxBlockZ=d})(Tt||(Tt={}));var ei;(function(e){function t(i,o){return a=>typeof a=="string"?r(i,ve.parse(a)):n(o(a))}e.parser=t;function n(i,o){return{value:()=>i,key:()=>o}}e.direct=n;function r(i,o){return{value:()=>i.getOrThrow(o),key:()=>o}}e.reference=r})(ei||(ei={}));const Ws=class{constructor(t,n){I(this,"key");I(this,"parser");I(this,"storage",new Map);I(this,"builtin",new Map);this.key=t,this.parser=n}register(t,n,r){return this.storage.set(t.toString(),n),r&&this.builtin.set(t.toString(),n),ei.reference(this,t)}delete(t){const n=this.storage.delete(t.toString());return this.builtin.delete(t.toString()),n}keys(){return[...this.storage.keys()].map(t=>ve.parse(t))}has(t){return this.storage.has(t.toString())}get(t){return this.storage.get(t.toString())}getOrThrow(t){const n=this.storage.get(t.toString());if(n===void 0)throw new Error(`Missing key in ${this.key.toString()}: ${t.toString()}`);return n}parse(t){if(!this.parser)throw new Error(`No parser exists for ${this.key.toString()}`);return this.parser(t)}clear(){this.storage.clear();for(const[t,n]of this.builtin.entries())this.storage.set(t,n);return this}assign(t){if(!this.key.equals(t.key))throw new Error(`Cannot assign registry of type ${t.key.toString()} to registry of type ${this.key.toString()}`);for(const n of t.keys())this.storage.set(n.toString(),t.getOrThrow(n));return this}cloneEmpty(){return new Ws(this.key,this.parser)}forEach(t){for(const[n,r]of this.storage.entries())t(ve.parse(n),r,this)}map(t){return[...this.storage.entries()].map(([n,r])=>t(ve.parse(n),r,this))}};let Hr=Ws;I(Hr,"REGISTRY",new Ws(ve.create("root")));class Zd{constructor(t,n=[],r=[]){I(this,"size");I(this,"palette");I(this,"blocks");I(this,"blocksMap",[]);this.size=t,this.palette=n,this.blocks=r,r.forEach(i=>{if(!this.isInside(i.pos))throw new Error(`Found block at ${i.pos} which is outside the structure bounds ${this.size}`);this.blocksMap[i.pos[0]*t[1]*t[2]+i.pos[1]*t[2]+i.pos[2]]=i})}getSize(){return this.size}addBlock(t,n,r,i){if(!this.isInside(t))throw new Error(`Cannot add block at ${t} outside the structure bounds ${this.size}`);const o=new je(n,r);let a=this.palette.findIndex(s=>s.equals(o));return a===-1&&(a=this.palette.length,this.palette.push(o)),this.blocks.push({pos:t,state:a,nbt:i}),this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]]={pos:t,state:a,nbt:i},this}getBlocks(){return this.blocks.map(t=>({pos:t.pos,state:this.palette[t.state],nbt:t.nbt}))}getBlock(t){if(!this.isInside(t))return null;const n=this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]];return n?{pos:n.pos,state:this.palette[n.state],nbt:n.nbt}:null}isInside(t){return t[0]>=0&&t[0]<this.size[0]&&t[1]>=0&&t[1]<this.size[1]&&t[2]>=0&&t[2]<this.size[2]}static fromNbt(t){const n=$a(t.value,"size","int",3),r=$a(t.value,"palette","compound").map(o=>je.fromNbt({name:"",value:o})),i=$a(t.value,"blocks","compound").map(o=>{const a=$a(o,"pos","int",3),s=$i(o,"state","int"),l=Y2(()=>$i(o,"nbt","compound"),void 0);return{pos:a,state:s,nbt:l}});return new Zd(n,r,i)}}function Un(e){return e*e}function _r(e,t,n){return Math.max(t,Math.min(n,e))}function er(e,t,n){return t+e*(n-t)}function Rs(e,t,n,r,i,o){return er(t,er(e,n,r),er(e,i,o))}function q2(e,t,n,r,i,o,a,s,l,d,c){return er(n,Rs(e,t,r,i,o,a),Rs(e,t,s,l,d,c))}function Do(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function qc(e,t,n,r,i,o){return Do(t,()=>Do(e,n,r),()=>Do(e,i,o))}function X2(e,t,n,r,i,o,a,s,l,d,c){return Do(n,()=>qc(e,t,r,i,o,a),()=>qc(e,t,s,l,d,c))}function fl(e,t,n){return n<0?e:n>1?t:er(n,e,t)}function Gd(e,t,n){return(e-t)/(n-t)}function cs(e){return e*e*e*(e*(e*6-15)+10)}function Xo(e,t,n,r,i){return er(Gd(e,t,n),r,i)}function hl(e,t,n,r,i){return fl(r,i,Gd(e,t,n))}function K2(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),o=e+i;if(n(o)){r=i;continue}e=o+1,r-=i+1}return e}function Yd(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 Ds(e,t,n,r,i,o,a,s){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(o)<<BigInt(16)|BigInt(a)<<BigInt(8)|BigInt(s)}function Xc(e){return(e&e-1)===0}function Fs(e){return e-=1,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>18,e|=e>>32,e+1}var Ps;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(Ps||(Ps={}));var $s;(function(e){function t(i,o){var d,c,u,f;if(typeof i=="number")return new n(i);const a=(d=q.readObject(i))!=null?d:{},s=new r(o(a.coordinate)),l=(c=q.readArray(a.points,h=>{var w;return(w=q.readObject(h))!=null?w:{}}))!=null?c:[];if(l.length===0)return new n(0);for(const h of l){const w=(u=q.readNumber(h.location))!=null?u:0,_=t(h.value,o),g=(f=q.readNumber(h.derivative))!=null?f:0;s.addPoint(w,_,g)}return s}e.fromJson=t;class n{constructor(o){I(this,"value");this.value=o}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(o,a=[],s=[],l=[]){I(this,"coordinate");I(this,"locations");I(this,"values");I(this,"derivatives");I(this,"calculatedMin",Number.NEGATIVE_INFINITY);I(this,"calculatedMax",Number.POSITIVE_INFINITY);this.coordinate=o,this.locations=a,this.values=s,this.derivatives=l}compute(o){const a=this.coordinate.compute(o),s=K2(0,this.locations.length,x=>a<this.locations[x])-1,l=this.locations.length-1;if(s<0)return this.values[0].compute(o)+this.derivatives[0]*(a-this.locations[0]);if(s===l)return this.values[l].compute(o)+this.derivatives[l]*(a-this.locations[l]);const d=this.locations[s],c=this.locations[s+1],u=this.derivatives[s],f=this.derivatives[s+1],h=(a-d)/(c-d),w=this.values[s].compute(o),_=this.values[s+1].compute(o),g=u*(c-d)-(_-w),m=-f*(c-d)+(_-w);return er(h,w,_)+h*(1-h)*er(h,g,m)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(o){return new r(o(this.coordinate),this.locations,this.values.map(a=>a.mapAll(o)),this.derivatives)}addPoint(o,a,s=0){return this.locations.push(o),this.values.push(typeof a=="number"?new e.Constant(a):a),this.derivatives.push(s),this}calculateMinMax(){if(!Ps.is(this.coordinate))return;const o=this.locations.length-1;var a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),d=this.coordinate.maxValue();for(const u of this.values)u.calculateMinMax();if(l<this.locations[0]){const u=r.linearExtend(l,this.locations,this.values[0].min(),this.derivatives,0),f=r.linearExtend(l,this.locations,this.values[0].max(),this.derivatives,0);a=Math.min(a,Math.min(u,f)),s=Math.max(s,Math.max(u,f))}if(d>this.locations[o]){const u=r.linearExtend(d,this.locations,this.values[o].min(),this.derivatives,o),f=r.linearExtend(d,this.locations,this.values[o].max(),this.derivatives,o);a=Math.min(a,Math.min(u,f)),s=Math.max(s,Math.max(u,f))}for(const u of this.values)a=Math.min(a,u.min()),s=Math.max(s,u.max());for(var c=0;c<o;++c){const u=this.locations[c],h=this.locations[c+1]-u,w=this.values[c],_=this.values[c+1],g=w.min(),m=w.max(),v=_.min(),x=_.max(),b=this.derivatives[c],y=this.derivatives[c+1];if(b!==0||y!==0){const k=b*h,C=y*h,E=Math.min(g,v),M=Math.max(m,x),S=k-x+g,T=k-v+m,z=-C+v-m,F=-C+x-g,R=Math.min(S,z),V=Math.max(T,F);a=Math.min(a,E+.25*R),s=Math.max(s,M+.25*V)}}this.calculatedMin=a,this.calculatedMax=s}static linearExtend(o,a,s,l,d){const c=l[d];return c==0?s:s+c*(o-a[d])}}e.MultiPoint=r})($s||($s={}));var J2={exports:{}},Q2={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,o=0;i<n.length;i++,o+=8)r[o>>>5]|=n[i]<<24-o%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i<n.length*32;i+=8)r.push(n[i>>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i<n.length;i++)r.push((n[i]>>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substr(i,2),16));return r},bytesToBase64:function(n){for(var r=[],i=0;i<n.length;i+=3)for(var o=n[i]<<16|n[i+1]<<8|n[i+2],a=0;a<4;a++)i*8+a*6<=n.length*8?r.push(e.charAt(o>>>6*(3-a)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,o=0;i<n.length;o=++i%4)o!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*o+8)-1)<<o*2|e.indexOf(n.charAt(i))>>>6-o*2);return r}};Q2.exports=t})();var Kc={utf8:{stringToBytes:function(e){return Kc.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Kc.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("")}}},Nu=Kc;/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var t4=function(e){return e!=null&&(eg(e)||n4(e)||!!e._isBuffer)};function eg(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function n4(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&eg(e.slice(0,0))}(function(){var e=Q2.exports,t=Nu.utf8,n=t4,r=Nu.bin,i=function(o,a){o.constructor==String?a&&a.encoding==="binary"?o=r.stringToBytes(o):o=t.stringToBytes(o):n(o)?o=Array.prototype.slice.call(o,0):!Array.isArray(o)&&o.constructor!==Uint8Array&&(o=o.toString());for(var s=e.bytesToWords(o),l=o.length*8,d=1732584193,c=-271733879,u=-1732584194,f=271733878,h=0;h<s.length;h++)s[h]=(s[h]<<8|s[h]>>>24)&16711935|(s[h]<<24|s[h]>>>8)&4278255360;s[l>>>5]|=128<<l%32,s[(l+64>>>9<<4)+14]=l;for(var w=i._ff,_=i._gg,g=i._hh,m=i._ii,h=0;h<s.length;h+=16){var v=d,x=c,b=u,y=f;d=w(d,c,u,f,s[h+0],7,-680876936),f=w(f,d,c,u,s[h+1],12,-389564586),u=w(u,f,d,c,s[h+2],17,606105819),c=w(c,u,f,d,s[h+3],22,-1044525330),d=w(d,c,u,f,s[h+4],7,-176418897),f=w(f,d,c,u,s[h+5],12,1200080426),u=w(u,f,d,c,s[h+6],17,-1473231341),c=w(c,u,f,d,s[h+7],22,-45705983),d=w(d,c,u,f,s[h+8],7,1770035416),f=w(f,d,c,u,s[h+9],12,-1958414417),u=w(u,f,d,c,s[h+10],17,-42063),c=w(c,u,f,d,s[h+11],22,-1990404162),d=w(d,c,u,f,s[h+12],7,1804603682),f=w(f,d,c,u,s[h+13],12,-40341101),u=w(u,f,d,c,s[h+14],17,-1502002290),c=w(c,u,f,d,s[h+15],22,1236535329),d=_(d,c,u,f,s[h+1],5,-165796510),f=_(f,d,c,u,s[h+6],9,-1069501632),u=_(u,f,d,c,s[h+11],14,643717713),c=_(c,u,f,d,s[h+0],20,-373897302),d=_(d,c,u,f,s[h+5],5,-701558691),f=_(f,d,c,u,s[h+10],9,38016083),u=_(u,f,d,c,s[h+15],14,-660478335),c=_(c,u,f,d,s[h+4],20,-405537848),d=_(d,c,u,f,s[h+9],5,568446438),f=_(f,d,c,u,s[h+14],9,-1019803690),u=_(u,f,d,c,s[h+3],14,-187363961),c=_(c,u,f,d,s[h+8],20,1163531501),d=_(d,c,u,f,s[h+13],5,-1444681467),f=_(f,d,c,u,s[h+2],9,-51403784),u=_(u,f,d,c,s[h+7],14,1735328473),c=_(c,u,f,d,s[h+12],20,-1926607734),d=g(d,c,u,f,s[h+5],4,-378558),f=g(f,d,c,u,s[h+8],11,-2022574463),u=g(u,f,d,c,s[h+11],16,1839030562),c=g(c,u,f,d,s[h+14],23,-35309556),d=g(d,c,u,f,s[h+1],4,-1530992060),f=g(f,d,c,u,s[h+4],11,1272893353),u=g(u,f,d,c,s[h+7],16,-155497632),c=g(c,u,f,d,s[h+10],23,-1094730640),d=g(d,c,u,f,s[h+13],4,681279174),f=g(f,d,c,u,s[h+0],11,-358537222),u=g(u,f,d,c,s[h+3],16,-722521979),c=g(c,u,f,d,s[h+6],23,76029189),d=g(d,c,u,f,s[h+9],4,-640364487),f=g(f,d,c,u,s[h+12],11,-421815835),u=g(u,f,d,c,s[h+15],16,530742520),c=g(c,u,f,d,s[h+2],23,-995338651),d=m(d,c,u,f,s[h+0],6,-198630844),f=m(f,d,c,u,s[h+7],10,1126891415),u=m(u,f,d,c,s[h+14],15,-1416354905),c=m(c,u,f,d,s[h+5],21,-57434055),d=m(d,c,u,f,s[h+12],6,1700485571),f=m(f,d,c,u,s[h+3],10,-1894986606),u=m(u,f,d,c,s[h+10],15,-1051523),c=m(c,u,f,d,s[h+1],21,-2054922799),d=m(d,c,u,f,s[h+8],6,1873313359),f=m(f,d,c,u,s[h+15],10,-30611744),u=m(u,f,d,c,s[h+6],15,-1560198380),c=m(c,u,f,d,s[h+13],21,1309151649),d=m(d,c,u,f,s[h+4],6,-145523070),f=m(f,d,c,u,s[h+11],10,-1120210379),u=m(u,f,d,c,s[h+2],15,718787259),c=m(c,u,f,d,s[h+9],21,-343485551),d=d+v>>>0,c=c+x>>>0,u=u+b>>>0,f=f+y>>>0}return e.endian([d,c,u,f])};i._ff=function(o,a,s,l,d,c,u){var f=o+(a&s|~a&l)+(d>>>0)+u;return(f<<c|f>>>32-c)+a},i._gg=function(o,a,s,l,d,c,u){var f=o+(a&l|s&~l)+(d>>>0)+u;return(f<<c|f>>>32-c)+a},i._hh=function(o,a,s,l,d,c,u){var f=o+(a^s^l)+(d>>>0)+u;return(f<<c|f>>>32-c)+a},i._ii=function(o,a,s,l,d,c,u){var f=o+(s^(a|~l))+(d>>>0)+u;return(f<<c|f>>>32-c)+a},i._blocksize=16,i._digestsize=16,J2.exports=function(o,a){if(o==null)throw new Error("Illegal argument "+o);var s=e.wordsToBytes(i(o,a));return a&&a.asBytes?s:a&&a.asString?r.bytesToString(s):e.bytesToHex(s)}})();var tg=J2.exports;const un=class{constructor(t){I(this,"seed",BigInt(0));this.setSeed(t)}fork(){return new un(this.nextLong())}forkPositional(){return new ng(this.nextLong())}setSeed(t){this.seed=t^un.MULTIPLIER&un.MODULUS_MASK}advance(){this.seed=this.seed*un.MULTIPLIER+un.INCREMENT&un.MODULUS_MASK}consume(t){for(let n=0;n<t;n+=1)this.advance()}next(t){this.advance();const n=Number(this.seed>>BigInt(un.MODULUS_BITS-t));return n>2147483647?n-4294967296:n}nextInt(t){if(t===void 0)return this.next(32);if((t&t-1)==0)return Number(BigInt(t)*BigInt(this.next(31))>>BigInt(31));let n,r;for(;(n=this.next(31))-(r=n%t)+(t-1)<0;);return r}nextLong(){return(BigInt(this.next(32))<<BigInt(32))+BigInt(this.next(32))}nextFloat(){return this.next(24)*un.FLOAT_MULTIPLIER}nextDouble(){const t=this.next(30);return this.advance(),t*un.DOUBLE_MULTIPLIER}};let mt=un;I(mt,"MODULUS_BITS",48),I(mt,"MODULUS_MASK",BigInt("281474976710655")),I(mt,"MULTIPLIER",BigInt("25214903917")),I(mt,"INCREMENT",BigInt("11")),I(mt,"FLOAT_MULTIPLIER",1/Math.pow(2,24)),I(mt,"DOUBLE_MULTIPLIER",1/Math.pow(2,30));class ng{constructor(t){I(this,"seed");this.seed=t}at(t,n,r){const i=Yd(t,n,r);return new mt(i^this.seed)}fromHashOf(t){const n=tg(t,{asBytes:!0}),r=Ds(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new mt(r^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const we=class{constructor(t){I(this,"seed",[BigInt(0),BigInt(0)]);this.seed=t}static create(t){return new we(we.upgradeSeedTo128bit(t))}static mixStafford13(t){return t=(t^t>>we.BIGINT_30)*we.STAFFORD_1&we.MAX_ULONG,t=(t^t>>we.BIGINT_27)*we.STAFFORD_2&we.MAX_ULONG,(t^t>>we.BIGINT_31)&we.MAX_ULONG}static upgradeSeedTo128bit(t){t<0&&(t+=we.POW2_60);const n=t^we.SILVER_RATIO_64,r=n+we.GOLDEN_RATIO_64&we.MAX_ULONG;return[we.mixStafford13(n),we.mixStafford13(r)]}static rotateLeft(t,n){return t<<n&we.MAX_ULONG|t>>we.BIGINT_64-n}setSeed(t){this.seed=we.upgradeSeedTo128bit(t)}fork(){return new we([this.next(),this.next()])}forkPositional(){return new rg(this.next(),this.next())}next(){const t=this.seed[0];let n=this.seed[1];const r=we.rotateLeft(t+n&we.MAX_ULONG,we.BIGINT_17)+t&we.MAX_ULONG;return n^=t,this.seed=[we.rotateLeft(t,we.BIGINT_49)^n^n<<we.BIGINT_21&we.MAX_ULONG,we.rotateLeft(n,we.BIGINT_28)],r}nextLong(){let t=this.next();return t>we.POW2_63&&(t-=we.POW2_60),t}consume(t){let n=this.seed[0],r=this.seed[1];for(let i=0;i<t;i+=1)r^=n,n=we.rotateLeft(n,we.BIGINT_49)^r^r<<we.BIGINT_21,r=we.rotateLeft(r,we.BIGINT_28);this.seed=[n,r]}nextBits(t){return this.next()>>BigInt(64-t)}nextInt(t){let n=this.next()&we.MAX_UINT;if(t){const r=BigInt(t);let i=n*r,o=i&we.MAX_UINT;if(o<r){const s=((~r&we.MAX_UINT)+we.BIGINT_1)%r;for(;o<s;)n=this.next()&we.MAX_UINT,i=n*r,o=i&we.MAX_UINT}const a=i>>we.BIGINT_32;return Number(a)}else{let r=Number(n);return r>=2147483648&&(r-=4294967296),r}}nextFloat(){return Number(this.nextBits(24))*we.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*we.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let Ye=we;I(Ye,"SILVER_RATIO_64",BigInt("7640891576956012809")),I(Ye,"GOLDEN_RATIO_64",BigInt("-7046029254386353131")),I(Ye,"FLOAT_MULTIPLIER",1/Math.pow(2,24)),I(Ye,"DOUBLE_MULTIPLIER",11102230246251565e-32),I(Ye,"BIGINT_1",BigInt(1)),I(Ye,"BIGINT_17",BigInt(17)),I(Ye,"BIGINT_21",BigInt(21)),I(Ye,"BIGINT_27",BigInt(27)),I(Ye,"BIGINT_28",BigInt(28)),I(Ye,"BIGINT_30",BigInt(30)),I(Ye,"BIGINT_31",BigInt(31)),I(Ye,"BIGINT_32",BigInt(32)),I(Ye,"BIGINT_49",BigInt(49)),I(Ye,"BIGINT_64",BigInt(64)),I(Ye,"STAFFORD_1",BigInt("-4658895280553007687")),I(Ye,"STAFFORD_2",BigInt("-7723592293110705685")),I(Ye,"MAX_ULONG",BigInt("0xFFFFFFFFFFFFFFFF")),I(Ye,"POW2_60",BigInt("0x10000000000000000")),I(Ye,"POW2_63",BigInt("0x8000000000000000")),I(Ye,"MAX_UINT",BigInt(4294967295));class rg{constructor(t,n){I(this,"seedLo");I(this,"seedHi");this.seedLo=t,this.seedHi=n}at(t,n,r){const o=Yd(t,n,r)^this.seedLo;return new Ye([o,this.seedHi])}fromHashOf(t){const n=tg(t,{asBytes:!0}),r=Ds(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=Ds(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new Ye([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const An=class{constructor(t){I(this,"p");I(this,"xo");I(this,"yo");I(this,"zo");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;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}}sample2D(t,n){let r,i,o;const a=(t+n)*An.F2,s=Math.floor(t+a),l=s-(r=(s+(i=Math.floor(n+a)))*An.G2),d=t-l;let c,u;d>(o=n-(i-r))?(c=1,u=0):(c=0,u=1);const f=d-c+An.G2,h=o-u+An.G2,w=d-1+2*An.G2,_=o-1+2*An.G2,g=s&255,m=i&255,v=this.P(g+this.P(m))%12,x=this.P(g+c+this.P(m+u))%12,b=this.P(g+1+this.P(m+1))%12,y=this.getCornerNoise3D(v,d,o,0,.5),k=this.getCornerNoise3D(x,f,h,0,.5),C=this.getCornerNoise3D(b,w,_,0,.5);return 70*(y+k+C)}sample(t,n,r){const i=(t+n+r)*.3333333333333333,o=Math.floor(t+i),a=Math.floor(n+i),s=Math.floor(r+i),l=(o+a+s)*.16666666666666666,d=t-(o-l),c=n-(a-l),u=r-(s-l);let f,h,w,_,g,m;d>=c?c>=u?(f=1,h=0,w=0,_=1,g=1,m=0):d>=u?(f=1,h=0,w=0,_=1,g=0,m=1):(f=0,h=0,w=1,_=1,g=0,m=1):c<u?(f=0,h=0,w=1,_=0,g=1,m=1):d<u?(f=0,h=1,w=0,_=0,g=1,m=1):(f=0,h=1,w=0,_=1,g=1,m=0);const v=d-f+.16666666666666666,x=c-h+.16666666666666666,b=u-w+.16666666666666666,y=d-_+.3333333333333333,k=c-g+.3333333333333333,C=u-m+.3333333333333333,E=d-.5,M=c-.5,S=u-.5,T=o&255,z=a&255,F=s&255,R=this.P(T+this.P(z+this.P(F)))%12,V=this.P(T+f+this.P(z+h+this.P(F+w)))%12,L=this.P(T+_+this.P(z+g+this.P(F+m)))%12,j=this.P(T+1+this.P(z+1+this.P(F+1)))%12,Z=this.getCornerNoise3D(R,d,c,u,.6),Q=this.getCornerNoise3D(V,v,x,b,.6),D=this.getCornerNoise3D(L,y,k,C,.6),A=this.getCornerNoise3D(j,E,M,S,.6);return 32*(Z+Q+D+A)}P(t){return this.p[t&255]}getCornerNoise3D(t,n,r,i,o){let a,s=o-n*n-r*r-i*i;return s<0?a=0:(s*=s,a=s*s*An.gradDot(t,n,r,i)),a}static gradDot(t,n,r,i){const o=An.GRADIENT[t&15];return o[0]*n+o[1]*r+o[2]*i}};let yt=An;I(yt,"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]]),I(yt,"F2",.5*(Math.sqrt(3)-1)),I(yt,"G2",(3-Math.sqrt(3))/6);class Jc{constructor(t){I(this,"p");I(this,"xo");I(this,"yo");I(this,"zo");this.xo=t.nextDouble()*256,this.yo=t.nextDouble()*256,this.zo=t.nextDouble()*256,this.p=Array(256);for(let n=0;n<256;n+=1)this.p[n]=n>127?n-256:n;for(let n=0;n<256;n+=1){const r=t.nextInt(256-n),i=this.p[n];this.p[n]=this.p[n+r],this.p[n+r]=i}}sample(t,n,r,i=0,o=0){const a=t+this.xo,s=n+this.yo,l=r+this.zo,d=Math.floor(a),c=Math.floor(s),u=Math.floor(l),f=a-d,h=s-c,w=l-u;let _=0;if(i!==0){const g=o>=0&&o<h?o:h;_=Math.floor(g/i+1e-7)*i}return this.sampleAndLerp(d,c,u,f,h-_,w,h)}sampleAndLerp(t,n,r,i,o,a,s){const l=this.P(t),d=this.P(t+1),c=this.P(l+n),u=this.P(l+n+1),f=this.P(d+n),h=this.P(d+n+1),w=yt.gradDot(this.P(c+r),i,o,a),_=yt.gradDot(this.P(f+r),i-1,o,a),g=yt.gradDot(this.P(u+r),i,o-1,a),m=yt.gradDot(this.P(h+r),i-1,o-1,a),v=yt.gradDot(this.P(c+r+1),i,o,a-1),x=yt.gradDot(this.P(f+r+1),i-1,o,a-1),b=yt.gradDot(this.P(u+r+1),i,o-1,a-1),y=yt.gradDot(this.P(h+r+1),i-1,o-1,a-1),k=cs(i),C=cs(s),E=cs(a);return q2(k,C,E,w,_,g,m,v,x,b,y)}P(t){return this.p[t&255]&255}}class We{constructor(t,n,r){I(this,"noiseLevels");I(this,"amplitudes");I(this,"lowestFreqInputFactor");I(this,"lowestFreqValueFactor");I(this,"maxValue");if(t instanceof Ye){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let o=0;o<r.length;o++)if(r[o]!==0){const a=n+o;this.noiseLevels[o]=new Jc(i.fromHashOf("octave_"+a))}}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 Jc(t):t.consume(262)}this.amplitudes=r,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,r.length-1)/(Math.pow(2,r.length)-1),this.maxValue=this.edgeValue(2)}sample(t,n,r,i=0,o=0,a=!1){let s=0,l=this.lowestFreqInputFactor,d=this.lowestFreqValueFactor;for(let c=0;c<this.noiseLevels.length;c+=1){const u=this.noiseLevels[c];u&&(s+=this.amplitudes[c]*d*u.sample(We.wrap(t*l),a?-u.yo:We.wrap(n*l),We.wrap(r*l),i*l,o*l)),l*=2,d/=2}return s}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 ig{constructor(t,n,r,i,o,a){I(this,"xzScale");I(this,"yScale");I(this,"xzFactor");I(this,"yFactor");I(this,"smearScaleMultiplier");I(this,"minLimitNoise");I(this,"maxLimitNoise");I(this,"mainNoise");I(this,"xzMultiplier");I(this,"yMultiplier");I(this,"maxValue");this.xzScale=n,this.yScale=r,this.xzFactor=i,this.yFactor=o,this.smearScaleMultiplier=a,this.minLimitNoise=new We(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new We(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new We(t,-7,[1,1,1,1,1,0,0,0]),this.xzMultiplier=684.412*n,this.yMultiplier=684.412*r,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(t,n,r){const i=t*this.xzMultiplier,o=n*this.yMultiplier,a=r*this.xzMultiplier,s=i/this.xzFactor,l=o/this.yFactor,d=a/this.xzFactor,c=this.yMultiplier*this.smearScaleMultiplier,u=c/this.yFactor;let f,h=0,w=1;for(let m=0;m<8;m+=1){if(f=this.mainNoise.getOctaveNoise(m),f){const v=We.wrap(s*w),x=We.wrap(l*w),b=We.wrap(d*w);h+=f.sample(v,x,b,u*w,l*w)/w}w/=2}h=(h/10+1)/2,w=1;let _=0,g=0;for(let m=0;m<16;m+=1){const v=We.wrap(i*w),x=We.wrap(o*w),b=We.wrap(a*w),y=c*w;h<1&&(f=this.minLimitNoise.getOctaveNoise(m))&&(_+=f.sample(v,x,b,y,o*w)/w),h>0&&(f=this.maxLimitNoise.getOctaveNoise(m))&&(g+=f.sample(v,x,b,y,o*w)/w),w/=2}return fl(_/512,g/512,h)/128}}const Fo=class{constructor(t,{firstOctave:n,amplitudes:r}){I(this,"valueFactor");I(this,"first");I(this,"second");I(this,"maxValue");this.first=new We(t,n,r),this.second=new We(t,n,r);let i=1/0,o=-1/0;for(let s=0;s<r.length;s+=1)r[s]!==0&&(i=Math.min(i,s),o=Math.max(o,s));const a=.1*(1+1/(o-i+1));this.valueFactor=1/6/a,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(t,n,r){const i=t*Fo.INPUT_FACTOR,o=n*Fo.INPUT_FACTOR,a=r*Fo.INPUT_FACTOR;return(this.first.sample(t,n,r)+this.second.sample(i,o,a))*this.valueFactor}};let Tn=Fo;I(Tn,"INPUT_FACTOR",1.0181268882175227);var Dn;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var o,a,s;const i=(o=q.readObject(r))!=null?o:{};return{firstOctave:(a=q.readInt(i.firstOctave))!=null?a:0,amplitudes:(s=q.readArray(i.amplitudes,l=>{var d;return(d=q.readNumber(l))!=null?d:0}))!=null?s:[]}}e.fromJson=n})(Dn||(Dn={}));class r4{constructor(t,n){I(this,"noiseLevels");I(this,"highestFreqInputFactor");I(this,"highestFreqValueFactor");const r=n[n.length-1],o=-n[0]+r+1,a=new Set(n),s=new yt(t);this.noiseLevels=Array(o),r>=0&&r<o&&a.has(0)&&(this.noiseLevels[r]=s);for(let l=r+1;l<o;l+=1)l>=0&&a.has(r-l)?this.noiseLevels[l]=new yt(t):t.consume(262);if(r>0)throw new Error("Positive octaves are not allowed");this.highestFreqInputFactor=Math.pow(2,r),this.highestFreqValueFactor=1/(Math.pow(2,o)-1)}sample(t,n,r){let i=0,o=this.highestFreqInputFactor,a=this.highestFreqValueFactor;for(let s=0;s<this.noiseLevels.length;s+=1){const l=this.noiseLevels[s];l&&(i+=a*l.sample2D(t*o+(r?l.xo:0),n*o+(r?l.yo:0))),o/=2,a*=2}return i}}var Ar;(function(e){const t=s=>new ye.HolderHolder(ei.parser(Sr.DENSITY_FUNCTION,ye.fromJson)(s));function n(s){var d;const l=(d=q.readObject(s))!=null?d:{};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(s){return oe({barrier:ye.Constant.ZERO,fluidLevelFloodedness:ye.Constant.ZERO,fluidLevelSpread:ye.Constant.ZERO,lava:ye.Constant.ZERO,temperature:ye.Constant.ZERO,vegetation:ye.Constant.ZERO,continents:ye.Constant.ZERO,erosion:ye.Constant.ZERO,depth:ye.Constant.ZERO,ridges:ye.Constant.ZERO,initialDensityWithoutJaggedness:ye.Constant.ZERO,finalDensity:ye.Constant.ZERO,veinToggle:ye.Constant.ZERO,veinRidged:ye.Constant.ZERO,veinGap:ye.Constant.ZERO},s)}e.create=r;function i(s,l){return{barrier:s.barrier.mapAll(l),fluidLevelFloodedness:s.fluidLevelFloodedness.mapAll(l),fluidLevelSpread:s.fluidLevelSpread.mapAll(l),lava:s.lava.mapAll(l),temperature:s.temperature.mapAll(l),vegetation:s.vegetation.mapAll(l),continents:s.continents.mapAll(l),erosion:s.erosion.mapAll(l),depth:s.depth.mapAll(l),ridges:s.ridges.mapAll(l),initialDensityWithoutJaggedness:s.initialDensityWithoutJaggedness.mapAll(l),finalDensity:s.finalDensity.mapAll(l),veinToggle:s.veinToggle.mapAll(l),veinRidged:s.veinRidged.mapAll(l),veinGap:s.veinGap.mapAll(l)}}e.mapAll=i;const o=new Map;function a(s,l){var h;const d=(h=l.key())==null?void 0:h.toString();if(!d)throw new Error("Cannot instantiate noise from direct holder");const c=s.seedKey(),u=o.get(d);if(u&&u[0]===c[0]&&u[1]===c[1])return u[2];const f=new Tn(s.fromHashOf(d),l.value());return o.set(d,[c[0],c[1],f]),f}e.instantiate=a})(Ar||(Ar={}));var Gt;(function(e){function t(s){var d,c,u,f,h;const l=(d=q.readObject(s))!=null?d:{};return{minY:(c=q.readInt(l.min_y))!=null?c:0,height:(u=q.readInt(l.height))!=null?u:256,xzSize:(f=q.readInt(l.size_horizontal))!=null?f:1,ySize:(h=q.readInt(l.size_vertical))!=null?h:1}}e.fromJson=t;function n(s){return oe({minY:0,height:256,xzSize:1,ySize:1},s)}e.create=n;function r(s){return s.ySize<<2}e.cellHeight=r;function i(s){return s.xzSize<<2}e.cellWidth=i;function o(s){return s.height/r(s)}e.cellCountY=o;function a(s){return Math.floor(s.minY/r(s))}e.minCellY=a})(Gt||(Gt={}));var Qc;(function(e){function t(r){var o,a,s,l;const i=(o=q.readObject(r))!=null?o:{};return{target:(a=q.readNumber(i.target))!=null?a:0,size:(s=q.readInt(i.size))!=null?s:0,offset:(l=q.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,o){if(r.size<=0)return i;const a=(o-r.offset)/r.size;return fl(r.target,i,a)}e.apply=n})(Qc||(Qc={}));var Bi;(function(e){function t(o){var s,l,d,c;const a=(s=q.readObject(o))!=null?s:{};return a.absolute!==void 0?n((l=q.readNumber(a.absolute))!=null?l:0):a.above_bottom!==void 0?r((d=q.readNumber(a.above_bottom))!=null?d:0):a.below_top!==void 0?i((c=q.readNumber(a.below_top))!=null?c:0):()=>0}e.fromJson=t;function n(o){return()=>o}function r(o){return a=>a.minY+o}function i(o){return a=>a.maxY-o}})(Bi||(Bi={}));var Bs;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(Bs||(Bs={}));class og{constructor(t,n,r){I(this,"rule");I(this,"defaultBlock");I(this,"surfaceNoise");I(this,"surfaceSecondaryNoise");I(this,"random");I(this,"positionalRandoms");this.rule=t,this.defaultBlock=n,this.random=Ye.create(r).forkPositional(),this.surfaceNoise=Ar.instantiate(this.random,Sr.SURFACE_NOISE),this.surfaceSecondaryNoise=Ar.instantiate(this.random,Sr.SURFACE_SECONDARY_NOISE),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const o=Tt.minBlockX(t.pos),a=Tt.minBlockZ(t.pos),s=new ag(this,t,n,r,i),l=this.rule(s);for(let d=0;d<16;d+=1){const c=o+d;for(let u=0;u<1;u+=1){const f=a+u;s.updateXZ(c,f);let h=0,w=Number.MIN_SAFE_INTEGER,_=Number.MAX_SAFE_INTEGER;for(let g=t.maxY;g>=t.minY;g-=1){const m=Ft.create(c,g,f),v=t.getBlockState(m);if(v.equals(je.AIR)){h=0,w=Number.MIN_SAFE_INTEGER;continue}if(v.isFluid()){w===Number.MIN_SAFE_INTEGER&&(w=g+1);continue}if(_>=g){_=Number.MIN_SAFE_INTEGER;for(let y=g-1;y>=t.minY;y-=1){const k=t.getBlockState(Ft.create(c,y,f));if(k.equals(je.AIR)||k.isFluid()){_=y+1;break}}}h+=1;const x=g-_+1;if(!v.equals(this.defaultBlock))continue;s.updateY(h,x,w,g);const b=l(c,g,f);b&&t.setBlockState(m,b)}}}}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 Qr(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class ag{constructor(t,n,r,i,o){I(this,"system");I(this,"chunk");I(this,"noiseChunk");I(this,"context");I(this,"getBiome");I(this,"blockX",0);I(this,"blockY",0);I(this,"blockZ",0);I(this,"stoneDepthAbove",0);I(this,"stoneDepthBelow",0);I(this,"surfaceDepth",0);I(this,"waterHeight",0);I(this,"biome",()=>"");I(this,"surfaceSecondary",()=>0);I(this,"minSurfaceLevel",()=>0);this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=o}updateXZ(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=Ro(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=Ro(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=Ro(()=>this.getBiome(Ft.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,o=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i<<4),s=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i+1<<4),l=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i+1<<4);return Math.floor(Rs((t&15)/16,(n&15)/16,o,a,s,l))+this.surfaceDepth-8}}var Ko;(function(e){e.NOOP=()=>()=>{};function t(o){var l,d,c;const a=(l=q.readObject(o))!=null?l:{};switch((d=q.readString(a.type))==null?void 0:d.replace(/^minecraft:/,"")){case"block":return n(je.fromJson(a.result_state));case"sequence":return r((c=q.readArray(a.sequence,e.fromJson))!=null?c:[]);case"condition":return i(zs.fromJson(a.if_true),e.fromJson(a.then_run))}return e.NOOP}e.fromJson=t;function n(o){return()=>()=>o}e.block=n;function r(o){return a=>{const s=o.map(l=>l(a));return(l,d,c)=>{for(const u of s){const f=u(l,d,c);if(f)return f}}}}e.sequence=r;function i(o,a){return s=>(l,d,c)=>{if(o(s))return a(s)(l,d,c)}}e.condition=i})(Ko||(Ko={}));var zs;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(d){var f,h,w,_,g,m,v,x,b,y,k,C;const c=(f=q.readObject(d))!=null?f:{};switch((h=q.readString(c.type))==null?void 0:h.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((w=q.readArray(c.biome_is,E=>{var M;return(M=q.readString(E))!=null?M:""}))!=null?w:[]);case"not":return i(e.fromJson(c.invert));case"stone_depth":return o((_=q.readInt(c.offset))!=null?_:0,(g=q.readBoolean(c.add_surface_depth))!=null?g:!1,(m=q.readInt(c.secondary_depth_range))!=null?m:0,q.readString(c.surface_type)==="ceiling");case"vertical_gradient":return a((v=q.readString(c.random_name))!=null?v:"",Bi.fromJson(c.true_at_and_below),Bi.fromJson(c.false_at_and_above));case"water":return s((x=q.readInt(c.offset))!=null?x:0,(b=q.readInt(c.surface_depth_multiplier))!=null?b:0,(y=q.readBoolean(c.add_surface_depth))!=null?y:!1);case"y_above":return l(Bi.fromJson(c.anchor),(k=q.readInt(c.surface_depth_multiplier))!=null?k:0,(C=q.readBoolean(c.add_surface_depth))!=null?C:!1)}return e.FALSE}e.fromJson=t;function n(){return d=>d.blockY>=d.minSurfaceLevel()}e.abovePreliminarySurface=n;function r(d){const c=new Set(d);return u=>c.has(u.biome())}e.biome=r;function i(d){return c=>!d(c)}e.not=i;function o(d,c,u,f){return h=>{const w=f?h.stoneDepthBelow:h.stoneDepthAbove,_=c?h.surfaceDepth:0,g=u===0?0:Xo(h.surfaceSecondary(),-1,1,0,u);return w<=1+d+_+g}}e.stoneDepth=o;function a(d,c,u){return f=>{const h=c(f.context),w=u(f.context);if(f.blockY<=h)return!0;if(f.blockY>=w)return!1;const _=f.system.getRandom(d),g=Xo(f.blockY,h,w,1,0);return _.nextFloat()<g}}e.verticalGradient=a;function s(d,c,u){return f=>{if(f.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const h=u?f.stoneDepthAbove:0;return f.blockY+h>=f.waterHeight+d+f.surfaceDepth*c}}e.water=s;function l(d,c,u){return f=>{const h=u?f.stoneDepthAbove:0;return f.blockY+h>=d(f.context)+f.surfaceDepth*c}}e.yAbove=l})(zs||(zs={}));var js;(function(e){function t(r){var o,a,s,l,d,c;const i=(o=q.readObject(r))!=null?o:{};return{surfaceRule:Ko.fromJson(i.surface_rule),noise:Gt.fromJson(i.noise),defaultBlock:je.fromJson(i.default_block),defaultFluid:je.fromJson(i.default_fluid),noiseRouter:Ar.fromJson(i.noise_router),seaLevel:(a=q.readInt(i.sea_level))!=null?a:0,disableMobGeneration:(s=q.readBoolean(i.disable_mob_generation))!=null?s:!1,aquifersEnabled:(l=q.readBoolean(i.aquifers_enabled))!=null?l:!1,oreVeinsEnabled:(d=q.readBoolean(i.ore_veins_enabled))!=null?d:!1,legacyRandomSource:(c=q.readBoolean(i.legacy_random_source))!=null?c:!1}}e.fromJson=t;function n(r){return oe({surfaceRule:Ko.NOOP,noise:Gt.create({}),defaultBlock:je.STONE,defaultFluid:je.WATER,noiseRouter:Ar.create({}),seaLevel:0,disableMobGeneration:!1,aquifersEnabled:!1,oreVeinsEnabled:!1,legacyRandomSource:!1},r)}e.create=n})(js||(js={}));var Sr;(function(e){e.NOISE=t("worldgen/noise",Dn.fromJson),e.DENSITY_FUNCTION=t("worldgen/density_function",r=>ye.fromJson(r)),e.NOISE_SETTINGS=t("worldgen/noise_settings",js.fromJson);function t(r,i){const o=new Hr(ve.create(r),i);return Hr.REGISTRY.register(o.key,o),o}e.SURFACE_NOISE=n("surface",-6,[1,1,1]),e.SURFACE_SECONDARY_NOISE=n("surface_secondary",-6,[1,1,0,1]);function n(r,i,o){return e.NOISE.register(ve.create(r),Dn.create(i,o),!0)}})(Sr||(Sr={}));class ye{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(Q,D,A){return{x:Q,y:D,z:A}}e.context=t;class n extends e{constructor(A){super();I(this,"input");this.input=A}compute(A){return this.transform(A,this.input.compute(A))}}const r=ei.parser(Sr.NOISE,Dn.fromJson);function i(Q,D=i){var $,X,ie,B,K,de,he,De,Ie,Ze,nt,Se,Te,Le,se,xn,Ge,Be,Qe,vt;if(typeof Q=="string")return new a(ei.reference(Sr.DENSITY_FUNCTION,ve.parse(Q)));if(typeof Q=="number")return new o(Q);const A=($=q.readObject(Q))!=null?$:{},O=(X=q.readString(A.type))==null?void 0:X.replace(/^minecraft:/,"");switch(O){case"blend_alpha":return new s(1,0,1);case"blend_offset":return new s(0,-1/0,1/0);case"beardifier":return new s(0,-1/0,1/0);case"old_blended_noise":return new l((ie=q.readNumber(A.xz_scale))!=null?ie:1,(B=q.readNumber(A.y_scale))!=null?B:1,(K=q.readNumber(A.xz_factor))!=null?K:80,(de=q.readNumber(A.y_factor))!=null?de:160,(he=q.readNumber(A.smear_scale_multiplier))!=null?he:8);case"flat_cache":return new c(D(A.argument));case"interpolated":return new w(D(A.argument));case"cache_2d":return new f(D(A.argument));case"cache_once":return new h(D(A.argument));case"cache_all_in_cell":return new u(D(A.argument));case"noise":return new _((De=q.readNumber(A.xz_scale))!=null?De:1,(Ie=q.readNumber(A.y_scale))!=null?Ie:1,r(A.noise));case"end_islands":return new g;case"weird_scaled_sampler":return new v(D(A.input),q.readEnum(A.rarity_value_mapper,m),r(A.noise));case"shifted_noise":return new x(D(A.shift_x),D(A.shift_y),D(A.shift_z),(Ze=q.readNumber(A.xz_scale))!=null?Ze:1,(nt=q.readNumber(A.y_scale))!=null?nt:1,r(A.noise));case"range_choice":return new b(D(A.input),(Se=q.readNumber(A.min_inclusive))!=null?Se:0,(Te=q.readNumber(A.max_exclusive))!=null?Te:1,D(A.when_in_range),D(A.when_out_of_range));case"shift_a":return new k(r(A.argument));case"shift_b":return new C(r(A.argument));case"shift":return new E(r(A.argument));case"blend_density":return new M(D(A.argument));case"clamp":return new S(D(A.input),(Le=q.readNumber(A.min))!=null?Le:0,(se=q.readNumber(A.max))!=null?se:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new T(O,D(A.argument));case"add":case"mul":case"min":case"max":return new F(q.readEnum(O,z),D(A.argument1),D(A.argument2));case"spline":return new R($s.fromJson(A.spline,D));case"constant":return new o((xn=q.readNumber(A.argument))!=null?xn:0);case"y_clamped_gradient":return new V((Ge=q.readInt(A.from_y))!=null?Ge:-4064,(Be=q.readInt(A.to_y))!=null?Be:4062,(Qe=q.readNumber(A.from_value))!=null?Qe:-4064,(vt=q.readNumber(A.to_value))!=null?vt:4062)}return o.ZERO}e.fromJson=i;const L=class extends e{constructor(A){super();I(this,"value");this.value=A}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let o=L;I(o,"ZERO",new L(0)),I(o,"ONE",new L(1)),e.Constant=o;class a extends e{constructor(A){super();I(this,"holder");this.holder=A}compute(A){return this.holder.value().compute(A)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=a;class s extends e.Constant{constructor(A,O,$){super(A);I(this,"min");I(this,"max");this.min=O,this.max=$}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=s;class l extends e{constructor(A,O,$,X,ie,B){super();I(this,"xzScale");I(this,"yScale");I(this,"xzFactor");I(this,"yFactor");I(this,"smearScaleMultiplier");I(this,"blendedNoise");this.xzScale=A,this.yScale=O,this.xzFactor=$,this.yFactor=X,this.smearScaleMultiplier=ie,this.blendedNoise=B}compute(A){var O,$;return($=(O=this.blendedNoise)==null?void 0:O.sample(A.x,A.y,A.z))!=null?$:0}maxValue(){var A,O;return(O=(A=this.blendedNoise)==null?void 0:A.maxValue)!=null?O:0}}e.OldBlendedNoise=l;class d extends e{constructor(A){super();I(this,"wrapped");this.wrapped=A}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class c extends d{constructor(A){super(A);I(this,"lastQuartX");I(this,"lastQuartZ");I(this,"lastValue",0)}compute(A){const O=A.x>>2,$=A.z>>2;return(this.lastQuartX!==O||this.lastQuartZ!==$)&&(this.lastValue=this.wrapped.compute(e.context(O<<2,0,$<<2)),this.lastQuartX=O,this.lastQuartZ=$),this.lastValue}mapAll(A){return A.map(new c(this.wrapped.mapAll(A)))}}e.FlatCache=c;class u extends d{constructor(D){super(D)}compute(D){return this.wrapped.compute(D)}mapAll(D){return D.map(new u(this.wrapped.mapAll(D)))}}e.CacheAllInCell=u;class f extends d{constructor(A){super(A);I(this,"lastBlockX");I(this,"lastBlockZ");I(this,"lastValue",0)}compute(A){const O=A.x,$=A.z;return(this.lastBlockX!==O||this.lastBlockZ!==$)&&(this.lastValue=this.wrapped.compute(A),this.lastBlockX=O,this.lastBlockZ=$),this.lastValue}mapAll(A){return A.map(new f(this.wrapped.mapAll(A)))}}e.Cache2D=f;class h extends d{constructor(A){super(A);I(this,"lastBlockX");I(this,"lastBlockY");I(this,"lastBlockZ");I(this,"lastValue",0)}compute(A){const O=A.x,$=A.y,X=A.z;return(this.lastBlockX!==O||this.lastBlockY!==$||this.lastBlockZ!==X)&&(this.lastValue=this.wrapped.compute(A),this.lastBlockX=O,this.lastBlockY=$,this.lastBlockZ=X),this.lastValue}mapAll(A){return A.map(new h(this.wrapped.mapAll(A)))}}e.CacheOnce=h;class w extends d{constructor(A,O=4,$=4){super(A);I(this,"cellWidth");I(this,"cellHeight");I(this,"values");this.cellWidth=O,this.cellHeight=$,this.values=new Map}compute({x:A,y:O,z:$}){const X=this.cellWidth,ie=this.cellHeight,B=(A%X+X)%X/X,K=(O%ie+ie)%ie/ie,de=($%X+X)%X/X,he=Math.floor(A/X)*X,De=Math.floor(O/ie)*ie,Ie=Math.floor($/X)*X;return X2(B,K,de,()=>this.computeCorner(he,De,Ie),()=>this.computeCorner(he+X,De,Ie),()=>this.computeCorner(he,De+ie,Ie),()=>this.computeCorner(he+X,De+ie,Ie),()=>this.computeCorner(he,De,Ie+X),()=>this.computeCorner(he+X,De,Ie+X),()=>this.computeCorner(he,De+ie,Ie+X),()=>this.computeCorner(he+X,De+ie,Ie+X))}computeCorner(A,O,$){return Qr(this.values,`${A} ${O} ${$}`,()=>this.wrapped.compute(e.context(A,O,$)))}mapAll(A){return A.map(new w(this.wrapped.mapAll(A)))}withCellSize(A,O){return new w(this.wrapped,A,O)}}e.Interpolated=w;class _ extends e{constructor(A,O,$,X){super();I(this,"xzScale");I(this,"yScale");I(this,"noiseData");I(this,"noise");this.xzScale=A,this.yScale=O,this.noiseData=$,this.noise=X}compute(A){var O,$;return($=(O=this.noise)==null?void 0:O.sample(A.x*this.xzScale,A.y*this.yScale,A.z*this.xzScale))!=null?$:0}maxValue(){var A,O;return(O=(A=this.noise)==null?void 0:A.maxValue)!=null?O:2}}e.Noise=_;class g extends e{constructor(A){super();I(this,"islandNoise");const O=new mt(A!=null?A:BigInt(0));O.consume(17292),this.islandNoise=new yt(O)}getHeightValue(A,O){const $=Math.floor(A/2),X=Math.floor(O/2),ie=A%2,B=O%2;let K=_r(100-Math.sqrt(A*A+O*O),-100,80);for(let de=-12;de<=12;de+=1)for(let he=-12;he<=12;he+=1){const De=$+de,Ie=X+he;if(De*De+Ie*Ie<=4096||this.islandNoise.sample2D(De,Ie)>=-.9)continue;const Ze=(Math.abs(De)*3439+Math.abs(Ie)*147)%13+9,nt=ie+de*2,Se=B+he*2,Te=100-Math.sqrt(nt*nt+Se*Se)*Ze,Le=_r(Te,-100,80);K=Math.max(K,Le)}return K}compute({x:A,y:O,z:$}){return(this.getHeightValue(Math.floor(A/8),Math.floor($/8))-8)/128}minValue(){return-.84375}maxValue(){return .5625}}e.EndIslands=g;const m=["type_1","type_2"],j=class extends n{constructor(A,O,$,X){super(A);I(this,"rarityValueMapper");I(this,"noiseData");I(this,"noise");I(this,"mapper");this.rarityValueMapper=O,this.noiseData=$,this.noise=X,this.mapper=j.ValueMapper[this.rarityValueMapper]}transform(A,O){if(!this.noise)return 0;const $=this.mapper(O);return $*Math.abs(this.noise.sample(A.x/$,A.y/$,A.z/$))}mapAll(A){return A.map(new j(this.input.mapAll(A),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return this.rarityValueMapper==="type_1"?2:3}static rarityValueMapper1(A){return A<-.5?.75:A<0?1:A<.5?1.5:2}static rarityValueMapper2(A){return A<-.75?.5:A<-.5?.75:A<.5?1:A<.75?2:3}};let v=j;I(v,"ValueMapper",{type_1:j.rarityValueMapper1,type_2:j.rarityValueMapper2}),e.WeirdScaledSampler=v;class x extends _{constructor(A,O,$,X,ie,B,K){super(X,ie,B,K);I(this,"shiftX");I(this,"shiftY");I(this,"shiftZ");this.shiftX=A,this.shiftY=O,this.shiftZ=$}compute(A){var ie,B;const O=A.x*this.xzScale+this.shiftX.compute(A),$=A.y*this.yScale+this.shiftY.compute(A),X=A.z*this.xzScale+this.shiftZ.compute(A);return(B=(ie=this.noise)==null?void 0:ie.sample(O,$,X))!=null?B:0}mapAll(A){return A.map(new x(this.shiftX.mapAll(A),this.shiftY.mapAll(A),this.shiftZ.mapAll(A),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=x;class b extends e{constructor(A,O,$,X,ie){super();I(this,"input");I(this,"minInclusive");I(this,"maxExclusive");I(this,"whenInRange");I(this,"whenOutOfRange");this.input=A,this.minInclusive=O,this.maxExclusive=$,this.whenInRange=X,this.whenOutOfRange=ie}compute(A){const O=this.input.compute(A);return this.minInclusive<=O&&O<this.maxExclusive?this.whenInRange.compute(A):this.whenOutOfRange.compute(A)}mapAll(A){return A.map(new b(this.input.mapAll(A),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(A),this.whenOutOfRange.mapAll(A)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=b;class y extends e{constructor(A,O){super();I(this,"noiseData");I(this,"offsetNoise");this.noiseData=A,this.offsetNoise=O}compute(A){var O,$;return($=(O=this.offsetNoise)==null?void 0:O.sample(A.x*.25,A.y*.25,A.z*.25))!=null?$:0}maxValue(){var A,O;return((O=(A=this.offsetNoise)==null?void 0:A.maxValue)!=null?O:2)*4}}e.ShiftNoise=y;class k extends y{constructor(D,A){super(D,A)}compute(D){return super.compute(e.context(D.x,0,D.z))}withNewNoise(D){return new k(this.noiseData,D)}}e.ShiftA=k;class C extends y{constructor(D,A){super(D,A)}compute(D){return super.compute(e.context(D.z,D.x,0))}withNewNoise(D){return new C(this.noiseData,D)}}e.ShiftB=C;class E extends y{constructor(D,A){super(D,A)}withNewNoise(D){return new E(this.noiseData,D)}}e.Shift=E;class M extends n{constructor(D){super(D)}transform(D,A){return A}mapAll(D){return D.map(new M(this.input.mapAll(D)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=M;class S extends n{constructor(A,O,$){super(A);I(this,"min");I(this,"max");this.min=O,this.max=$}transform(A,O){return _r(O,this.min,this.max)}mapAll(A){return A.map(new S(this.input.mapAll(A),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=S;const Z=class extends n{constructor(A,O,$,X){super(O);I(this,"type");I(this,"min");I(this,"max");I(this,"transformer");this.type=A,this.min=$,this.max=X,this.transformer=Z.MappedTypes[this.type]}transform(A,O){return this.transformer(O)}mapAll(A){return A.map(new Z(this.type,this.input.mapAll(A)))}minValue(){var A;return(A=this.min)!=null?A:-1/0}maxValue(){var A;return(A=this.max)!=null?A:1/0}withMinMax(){const A=this.input.minValue();let O=this.transformer(A),$=this.transformer(this.input.maxValue());return(this.type==="abs"||this.type==="square")&&($=Math.max(O,$),O=Math.max(0,A)),new Z(this.type,this.input,O,$)}};let T=Z;I(T,"MappedTypes",{abs:A=>Math.abs(A),square:A=>A*A,cube:A=>A*A*A,half_negative:A=>A>0?A:A*.5,quarter_negative:A=>A>0?A:A*.25,squeeze:A=>{const O=_r(A,-1,1);return O/2-O*O*O/24}}),e.Mapped=T;const z=["add","mul","min","max"];class F extends e{constructor(A,O,$,X,ie){super();I(this,"type");I(this,"argument1");I(this,"argument2");I(this,"min");I(this,"max");this.type=A,this.argument1=O,this.argument2=$,this.min=X,this.max=ie}compute(A){const O=this.argument1.compute(A);switch(this.type){case"add":return O+this.argument2.compute(A);case"mul":return O===0?0:O*this.argument2.compute(A);case"min":return O<this.argument2.minValue()?O:Math.min(O,this.argument2.compute(A));case"max":return O>this.argument2.maxValue()?O:Math.max(O,this.argument2.compute(A))}}mapAll(A){return A.map(new F(this.type,this.argument1.mapAll(A),this.argument2.mapAll(A)))}minValue(){var A;return(A=this.min)!=null?A:-1/0}maxValue(){var A;return(A=this.max)!=null?A:1/0}withMinMax(){const A=this.argument1.minValue(),O=this.argument2.minValue(),$=this.argument1.maxValue(),X=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(A>=X||O>=$)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let ie,B;switch(this.type){case"add":ie=A+O,B=$+X;break;case"mul":ie=A>0&&O>0?A*O||0:$<0&&X<0?$*X||0:Math.min(A*X||0,O*$||0),B=A>0&&O>0?$*X||0:$<0&&X<0?A*O||0:Math.max(A*O||0,$*X||0);break;case"min":ie=Math.min(A,O),B=Math.min($,X);break;case"max":ie=Math.max(A,O),B=Math.max($,X);break}return new F(this.type,this.argument1,this.argument2,ie,B)}}e.Ap2=F;class R extends e{constructor(A){super();I(this,"spline");this.spline=A}compute(A){return this.spline.compute(A)}mapAll(A){const O=this.spline.mapAll($=>$ instanceof e?$.mapAll(A):$);return O.calculateMinMax(),A.map(new R(O))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=R;class V extends e{constructor(A,O,$,X){super();I(this,"fromY");I(this,"toY");I(this,"fromValue");I(this,"toValue");this.fromY=A,this.toY=O,this.fromValue=$,this.toValue=X}compute(A){return hl(A.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=V})(ye||(ye={}));class Jo{constructor(t,n){I(this,"level");I(this,"type");this.level=t,this.type=n}at(t){return t<this.level?this.type:je.AIR}}var Vs;(function(e){function t(n){return{compute({x:r,y:i,z:o},a){if(!(a>0))return n(r,i,o).at(i)}}}e.createDisabled=t})(Vs||(Vs={}));const Jt=class{constructor(t,n,r,i,o,a,s){I(this,"noiseChunk");I(this,"router");I(this,"random");I(this,"globalFluidPicker");I(this,"minGridX");I(this,"minGridY");I(this,"minGridZ");I(this,"gridSizeX");I(this,"gridSizeZ");I(this,"gridSize");I(this,"aquiferCache");I(this,"aquiferLocationCache");this.noiseChunk=t,this.router=r,this.random=i,this.globalFluidPicker=s,this.minGridX=this.gridX(Tt.minBlockX(n))-1,this.gridSizeX=this.gridX(Tt.maxBlockX(n))+1-this.minGridX+1,this.minGridY=this.gridY(o)-1,this.minGridZ=this.gridZ(Tt.minBlockZ(n))-1,this.gridSizeZ=this.gridZ(Tt.maxBlockZ(n))+1-this.minGridZ+1;const l=this.gridY(o+a)+1-this.minGridY+1;this.gridSize=this.gridSizeX*l*this.gridSizeZ,this.aquiferCache=Array(this.gridSize).fill(void 0),this.aquiferLocationCache=Array(this.gridSize).fill(Ft.ZERO)}compute({x:t,y:n,z:r},i){if(i<=0){if(this.globalFluidPicker(t,n,r).at(n).is(je.LAVA))return je.LAVA;{const o=this.gridX(t-5),a=this.gridY(n+1),s=this.gridZ(r-5);let l=Number.MAX_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,c=Number.MAX_SAFE_INTEGER,u=Ft.ZERO,f=Ft.ZERO,h=Ft.ZERO;for(let y=0;y<=1;y+=1)for(let k=-1;k<=1;k+=1)for(let C=0;C<=1;C+=1){const E=this.getLocation(o+y,a+k,s+C),M=Ft.magnitude(E);l>=M?(h=f,f=u,u=E,c=d,d=l,l=M):d>=M?(h=f,f=E,c=d,d=M):c>=M&&(h=E,c=M)}const w=this.getStatus(u),_=this.getStatus(f),g=this.getStatus(h),m=Jt.similarity(l,d),v=Jt.similarity(l,c),x=Jt.similarity(d,c);let b;if(w.at(n).is(je.WATER)&&this.globalFluidPicker(t,n-1,r).at(n-1).is(je.LAVA))b=1;else if(m>-1){const y=Ro(()=>this.router.barrier.compute(ye.context(t,n*.5,r))),k=this.calculatePressure(n,w,_,y),C=this.calculatePressure(n,w,g,y),E=this.calculatePressure(n,_,g,y),M=Math.max(k,C*Math.max(0,v),E*Math.max(x));b=Math.max(0,2*Math.max(0,m)*M)}else b=0;if(i+b<=0)return w.at(n)}}}static similarity(t,n){return 1-Math.abs(n-t)/25}calculatePressure(t,n,r,i){const o=n.at(t),a=r.at(t);if(o.is(je.LAVA)&&a.is(je.WATER)||o.is(je.WATER)&&a.is(je.LAVA))return 1;const s=Math.abs(n.level-r.level);if(s===0)return 0;const l=(n.level+r.level)/2,d=t+.5-l,c=s/2-Math.abs(d),u=d>0?c>0?c/1.5:c/2.5:c>-3?(c+3)/3:(c+3)/10;return u<-2||u>2?u:u+i()}getStatus(t){const[n,r,i]=t,o=this.getIndex(this.gridX(n),this.gridY(r),this.gridZ(i)),a=this.aquiferCache[o];if(a!==void 0)return a;const s=this.computeStatus(n,r,i);return this.aquiferCache[o]=s,s}computeStatus(t,n,r){const i=this.globalFluidPicker(t,n,r);let o=Number.MAX_SAFE_INTEGER,a=!1;for(const[w,_]of Jt.SURFACE_SAMPLING){const g=t+(_<<4),m=r+(_<<4),v=this.noiseChunk.getPreliminarySurfaceLevel(g,m);o=Math.min(o,v);const x=w===0&&_===0;if(x&&n-12>v+8)return i;if(x||n+12>v+8){const b=this.globalFluidPicker(g,v+8,m);if(!b.at(v+8).is(je.AIR)){if(x)return b;a=!0}}}const s=a?hl(o+8-n,0,64,1,0):0,l=_r(this.router.fluidLevelFloodedness.compute(ye.context(t,n*.67,r)),-1,1);if(l>Xo(s,1,0,-.3,.8))return i;if(l<=Xo(s,1,0,-.8,.4))return new Jo(Number.MIN_SAFE_INTEGER,i.type);const d=Math.floor(n/40),c=this.router.fluidLevelSpread.compute(ye.context(Math.floor(t/16),d,Math.floor(r/16))),u=d*40+20+Math.floor(c/3)*3,f=Math.min(o,u),h=this.getFluidType(t,n,r,i.type,u);return new Jo(f,h)}getFluidType(t,n,r,i,o){if(o<=-10){const a=this.router.lava.compute(ye.context(Math.floor(t/64),Math.floor(n/40),Math.floor(r/64)));if(Math.abs(a)>.3)return je.LAVA}return i}getLocation(t,n,r){const i=this.getIndex(t,n,r),o=this.aquiferLocationCache[i];if(Ft.equals(o,Ft.ZERO))return o;const a=this.random.at(t,n,r),s=Ft.create(t*Jt.X_SPACING+a.nextInt(10),n*Jt.Y_SPACING+a.nextInt(9),r*Jt.Z_SPACING+a.nextInt(10));return this.aquiferLocationCache[i]=s,s}getIndex(t,n,r){const i=t-this.minGridX,o=n-this.minGridY,a=r-this.minGridZ,s=(o*this.gridSizeZ+a)*this.gridSizeX+i;if(s<0||s>=this.gridSize)throw new Error(`Invalid aquifer index at ${t} ${n} ${r}: 0 <= ${s} < ${this.gridSize}`);return s}gridX(t){return Math.floor(t/Jt.X_SPACING)}gridY(t){return Math.floor(t/Jt.Y_SPACING)}gridZ(t){return Math.floor(t/Jt.Z_SPACING)}};let Dr=Jt;I(Dr,"X_SPACING",16),I(Dr,"Y_SPACING",12),I(Dr,"Z_SPACING",16),I(Dr,"SURFACE_SAMPLING",[[-2,-1],[-1,-1],[0,-1],[1,-1],[-3,0],[-2,0],[-1,0],[0,0],[1,0],[-2,1],[-1,1],[0,1],[1,1]]);class pl{constructor(t,n){I(this,"shift");I(this,"biomes");I(this,"n");if(this.shift=t,this.biomes=n,n.length===0)throw new Error("Cannot create checkerboard biome source without biomes");this.n=n.length}getBiome(t,n,r){const i=(((t>>this.shift)+(r>>this.shift))%this.n+this.n)%this.n;return ve.parse(this.biomes[i].toString())}static fromJson(t){var o,a,s;const n=(o=q.readObject(t))!=null?o:{},r=(a=q.readInt(n.scale))!=null?a:2;let i;return typeof n.biomes=="string"?i=[ve.parse(n.biomes)]:i=(s=q.readArray(n.biomes,l=>{var d;return ve.parse((d=q.readString(l))!=null?d:"")}))!=null?s:[],new pl(r+2,i)}}class gl{constructor(t){I(this,"biome");this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,o;const n=(i=q.readObject(t))!=null?i:{},r=ve.parse((o=q.readString(n.biome))!=null?o:"plains");return new gl(r)}}var qi;(function(e){function n(_,g,m,v,x,b){return new s(_,g,m,v,x,b)}e.target=n;function r(_,g,m,v,x,b,y){return new a(i(_),i(g),i(m),i(v),i(x),i(b),y)}e.parameters=r;function i(_,g){return typeof _=="number"?new o(_,g!=null?g:_):_}e.param=i;class o{constructor(g,m){I(this,"min");I(this,"max");this.min=g,this.max=m}distance(g){const m=(typeof g=="number"?g:g.min)-this.max,v=this.min-(typeof g=="number"?g:g.max);return m>0?m:Math.max(v,0)}union(g){return new o(Math.min(this.min,g.min),Math.max(this.max,g.max))}static fromJson(g){var x;if(typeof g=="number")return new o(g,g);const[m,v]=(x=q.readArray(g,b=>q.readNumber(b)))!=null?x:[];return new o(m!=null?m:0,v!=null?v:0)}}e.Param=o;class a{constructor(g,m,v,x,b,y,k){I(this,"temperature");I(this,"humidity");I(this,"continentalness");I(this,"erosion");I(this,"depth");I(this,"weirdness");I(this,"offset");this.temperature=g,this.humidity=m,this.continentalness=v,this.erosion=x,this.depth=b,this.weirdness=y,this.offset=k}fittness(g){return Un(this.temperature.distance(g.temperature))+Un(this.humidity.distance(g.humidity))+Un(this.continentalness.distance(g.continentalness))+Un(this.erosion.distance(g.erosion))+Un(this.depth.distance(g.depth))+Un(this.weirdness.distance(g.weirdness))+Un(this.offset-g.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new o(this.offset,this.offset)]}static fromJson(g){var v,x;const m=(v=q.readObject(g))!=null?v:{};return new a(o.fromJson(m.temperature),o.fromJson(m.humidity),o.fromJson(m.continentalness),o.fromJson(m.erosion),o.fromJson(m.depth),o.fromJson(m.weirdness),(x=q.readInt(m.offset))!=null?x:0)}}e.ParamPoint=a;class s{constructor(g,m,v,x,b,y){I(this,"temperature");I(this,"humidity");I(this,"continentalness");I(this,"erosion");I(this,"depth");I(this,"weirdness");this.temperature=g,this.humidity=m,this.continentalness=v,this.erosion=x,this.depth=b,this.weirdness=y}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=s;class l{constructor(g){I(this,"things");I(this,"index");this.things=g,this.index=new c(g)}find(g){return this.index.search(g,(m,v)=>m.distance(v))}}e.Parameters=l;class d{constructor(g,m,v,x,b,y){I(this,"temperature");I(this,"humidity");I(this,"continentalness");I(this,"erosion");I(this,"depth");I(this,"weirdness");this.temperature=g,this.humidity=m,this.continentalness=v,this.erosion=x,this.depth=b,this.weirdness=y}static fromRouter(g){return new e.Sampler(g.temperature,g.vegetation,g.continents,g.erosion,g.depth,g.ridges)}sample(g,m,v){const x=ye.context(g<<2,m<<2,v<<2);return e.target(this.temperature.compute(x),this.humidity.compute(x),this.continentalness.compute(x),this.erosion.compute(x),this.depth.compute(x),this.weirdness.compute(x))}}e.Sampler=d;const w=class{constructor(g){I(this,"root");if(g.length===0)throw new Error("At least one point is required to build search tree");this.root=w.build(g.map(([m,v])=>new h(m,v)))}static build(g){if(g.length===1)return g[0];if(g.length<=w.CHILDREN_PER_NODE){const b=g.map(y=>{let k=0;for(let C=0;C<7;C+=1){const E=y.space[C];k+=Math.abs((E.min+E.max)/2)}return{key:k,node:y}}).sort((y,k)=>y.key-k.key).map(({node:y})=>y);return new f(b)}let m=1/0,v=-1,x=[];for(let b=0;b<7;++b){g=w.sort(g,b,!1),x=w.bucketize(g);let y=0;for(const k of x)y+=w.area(k.space);m>y&&(m=y,v=b)}return g=w.sort(g,v,!1),x=w.bucketize(g),x=w.sort(x,v,!0),new f(x.map(b=>w.build(b.children)))}static sort(g,m,v){return g.map(x=>{const b=x.space[m],y=(b.min+b.max)/2;return{key:v?Math.abs(y):y,node:x}}).sort((x,b)=>x.key-b.key).map(({node:x})=>x)}static bucketize(g){const m=[];let v=[];const x=Math.pow(10,Math.floor(Math.log(g.length-.01)/Math.log(10)));for(const b of g)v.push(b),!(v.length<x)&&(m.push(new f(v)),v=[]);return v.length!==0&&m.push(new f(v)),m}static area(g){let m=0;for(const v of g)m+=Math.abs(v.max-v.min);return m}search(g,m){return this.root.search(g.toArray(),m).thing()}};let c=w;I(c,"CHILDREN_PER_NODE",10),e.RTree=c;class u{constructor(g){I(this,"space");this.space=g}distance(g){let m=0;for(let v=0;v<7;v+=1)m+=Un(this.space[v].distance(g[v]));return m}}e.RNode=u;class f extends u{constructor(m){super(f.buildSpace(m));I(this,"children");this.children=m}static buildSpace(m){let v=[...Array(7)].map(()=>new o(1/0,-1/0));for(const x of m)v=[...Array(7)].map((b,y)=>v[y].union(x.space[y]));return v}search(m,v){let x=1/0,b=null;for(const y of this.children){const k=v(y,m);if(x<=k)continue;const C=y.search(m,v),E=y==C?k:v(C,m);x<=E||(x=E,b=C)}return b}}e.RSubTree=f;class h extends u{constructor(m,v){super(m.space());I(this,"thing");this.thing=v}search(){return this}}e.RLeaf=h})(qi||(qi={}));class ml{constructor(t){I(this,"parameters");this.parameters=new qi.Parameters(t)}getBiome(t,n,r,i){const o=i.sample(t,n,r);return this.parameters.find(o)}static fromJson(t){var o,a;const n=(o=q.readObject(t))!=null?o:{},i=((a=q.readArray(n.biomes,s=>{var l;return(d=>{var c;return{biome:ve.parse((c=q.readString(d.biome))!=null?c:"plains"),parameters:qi.ParamPoint.fromJson(d.parameters)}})((l=q.readObject(s))!=null?l:{})}))!=null?a:[]).map(s=>[s.parameters,()=>s.biome]);return new ml(i)}}const fr=class{getBiome(t,n,r,i){const o=t<<2,a=n<<2,s=r<<2,l=o>>4,d=s>>4;if(l*l+d*d<=4096)return fr.END;const c=ye.context((l*2+1)*8,a,(d*2+1)*8),u=i.erosion.compute(c);return u>.25?fr.HIGHLANDS:u>=-.0625?fr.MIDLANDS:u>=-.21875?fr.BARRENS:fr.ISLANDS}static fromJson(t){return new fr}};let ur=fr;I(ur,"END",ve.create("the_end")),I(ur,"HIGHLANDS",ve.create("end_highlands")),I(ur,"MIDLANDS",ve.create("end_midlands")),I(ur,"ISLANDS",ve.create("small_end_islands")),I(ur,"BARRENS",ve.create("end_barrens"));var ed;(function(e){function t(n){var o,a;const r=(o=q.readObject(n))!=null?o:{};switch((a=q.readString(r.type))==null?void 0:a.replace(/^minecraft:/,"")){case"fixed":return gl.fromJson(n);case"checkerboard":return pl.fromJson(n);case"multi_noise":return ml.fromJson(n);case"the_end":return ur.fromJson(n);default:return{getBiome:()=>ve.create("plains")}}}e.fromJson=t})(ed||(ed={}));class sg{constructor(t,n,r,i,o,a,s,l,d){I(this,"cellCountXZ");I(this,"cellCountY");I(this,"cellNoiseMinY");I(this,"minX");I(this,"minZ");I(this,"settings");I(this,"cellWidth");I(this,"cellHeight");I(this,"firstCellX");I(this,"firstCellZ");I(this,"firstNoiseX");I(this,"firstNoiseZ");I(this,"noiseSizeXZ");I(this,"preliminarySurfaceLevel",new Map);I(this,"aquifer");I(this,"materialRule");I(this,"initialDensity");this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.minX=o,this.minZ=a,this.settings=s,this.cellWidth=Gt.cellWidth(s),this.cellHeight=Gt.cellHeight(s),this.firstCellX=Math.floor(o/this.cellWidth),this.firstCellZ=Math.floor(a/this.cellWidth),this.firstNoiseX=o>>2,this.firstNoiseZ=a>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=Vs.createDisabled(d);const c=i.router.finalDensity;this.materialRule=Us.fromList([u=>this.aquifer.compute(u,c.compute(u))]),this.initialDensity=i.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Qr(this.preliminarySurfaceLevel,Tt.asLong(t,n),()=>{const r=t<<2,i=n<<2;for(let o=this.settings.minY+this.settings.height;o>=this.settings.minY;o-=this.cellHeight)if(this.initialDensity.compute(ye.context(r,o,i))>.390625)return o;return Number.MAX_SAFE_INTEGER})}}var Us;(function(e){function t(n){return r=>{for(const i of n){const o=i(r);if(o)return o}}}e.fromList=t})(Us||(Us={}));class i4{constructor(t,n){I(this,"biomeSource");I(this,"settings");I(this,"noiseChunkCache");I(this,"globalFluidPicker");this.biomeSource=t,this.settings=n,this.noiseChunkCache=new Map;const r=new Jo(-54,je.LAVA),i=new Jo(n.seaLevel,n.defaultFluid);this.globalFluidPicker=(o,a,s)=>a<Math.min(-54,n.seaLevel)?r:i}fill(t,n,r=!1){var w;const i=Math.max(n.minY,this.settings.noise.minY),o=Math.min(n.maxY,this.settings.noise.minY+this.settings.noise.height),a=Gt.cellWidth(this.settings.noise),s=Gt.cellHeight(this.settings.noise),l=Math.floor(16/a),d=Math.floor(i/s),c=Math.floor((o-i)/s),u=Tt.minBlockX(n.pos),f=Tt.minBlockZ(n.pos),h=this.getOrCreateNoiseChunk(t,n);for(let _=0;_<l;_+=1)for(let g=0;g<(r?1:l);g+=1){let m=n.getOrCreateSection(n.sectionsCount-1);for(let v=c-1;v>=0;v-=1)for(let x=s-1;x>=0;x-=1){const b=(d+v)*s+x,y=b&15,k=n.getSectionIndex(b);n.getSectionIndex(m.minBlockY)!==k&&(m=n.getOrCreateSection(k));for(let C=0;C<a;C+=1){const E=u+_*a+C,M=E&15;for(let S=0;S<(r?1:a);S+=1){const T=f+g*a+S,z=T&15,F=(w=h.getFinalState(E,b,T))!=null?w:this.settings.defaultBlock;m.setBlockState(M,y,z,F)}}}}}buildSurface(t,n,r="minecraft:plains"){const i=this.getOrCreateNoiseChunk(t,n),o=Bs.create(this.settings.noise.minY,this.settings.noise.height);t.surfaceSystem.buildSurface(n,i,o,()=>r)}computeBiome(t,n,r,i){return this.biomeSource.getBiome(n,r,i,t.sampler)}getOrCreateNoiseChunk(t,n){return Qr(this.noiseChunkCache,Tt.toLong(n.pos),()=>{const r=Math.max(n.minY,this.settings.noise.minY),i=Math.min(n.maxY,this.settings.noise.minY+this.settings.noise.height),o=Gt.cellWidth(this.settings.noise),a=Gt.cellHeight(this.settings.noise),s=Math.floor(16/o),l=Math.floor(r/a),d=Math.floor((i-r)/a),c=Tt.minBlockX(n.pos),u=Tt.minBlockZ(n.pos);return new sg(s,d,l,t,c,u,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}const oo=e=>{const t=e>>16&255,n=e>>8&255,r=e&255;return[t/256,n/256,r/256]},Or=[124/256,189/256,107/256],o4=oo(6396257),a4=oo(8431445),bo=oo(4764952),sc=oo(4159204),Ru=oo(8431445),s4=oo(2129968),l4=e=>{const t=e/15,n=t*.6+(t>0?.4:.3),r=_r(t*t*.7-.5,0,1),i=_r(t*t*.6-.7,0,1);return[n,r,i]},Du=e=>[e/8,1-e/32,e*64],lc={large_fern:()=>Or,tall_grass:()=>Or,grass_block:()=>Or,fern:()=>Or,grass:()=>Or,potted_fern:()=>Or,spruce_leaves:()=>o4,birch_leaves:()=>a4,oak_leaves:()=>bo,jungle_leaves:()=>bo,acacia_leaves:()=>bo,dark_oak_leaves:()=>bo,vine:()=>bo,water:()=>sc,bubble_column:()=>sc,cauldron:()=>sc,redstone_wire:e=>{var t;return l4(parseInt((t=e.power)!=null?t:"0"))},sugar_cane:()=>Or,attached_melon_stem:()=>Ru,attached_pumpkin_stem:()=>Ru,melon_stem:e=>{var t;return Du(parseInt((t=e.age)!=null?t:"0"))},pumpkin_stem:e=>{var t;return Du(parseInt((t=e.age)!=null?t:"0"))},lily_pad:()=>s4};var ds=1e-6,Qo=typeof Float32Array!="undefined"?Float32Array:Array,c4=Math.PI/180;function d4(e){return e*c4}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});function ea(){var e=new Qo(16);return Qo!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Ak(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Fu(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function yi(e,t,n){var r=n[0],i=n[1],o=n[2],a,s,l,d,c,u,f,h,w,_,g,m;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*o+t[12],e[13]=t[1]*r+t[5]*i+t[9]*o+t[13],e[14]=t[2]*r+t[6]*i+t[10]*o+t[14],e[15]=t[3]*r+t[7]*i+t[11]*o+t[15]):(a=t[0],s=t[1],l=t[2],d=t[3],c=t[4],u=t[5],f=t[6],h=t[7],w=t[8],_=t[9],g=t[10],m=t[11],e[0]=a,e[1]=s,e[2]=l,e[3]=d,e[4]=c,e[5]=u,e[6]=f,e[7]=h,e[8]=w,e[9]=_,e[10]=g,e[11]=m,e[12]=a*r+c*i+w*o+t[12],e[13]=s*r+u*i+_*o+t[13],e[14]=l*r+f*i+g*o+t[14],e[15]=d*r+h*i+m*o+t[15]),e}function Pu(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function u4(e,t,n,r){var i=r[0],o=r[1],a=r[2],s=Math.hypot(i,o,a),l,d,c,u,f,h,w,_,g,m,v,x,b,y,k,C,E,M,S,T,z,F,R,V;return s<ds?null:(s=1/s,i*=s,o*=s,a*=s,l=Math.sin(n),d=Math.cos(n),c=1-d,u=t[0],f=t[1],h=t[2],w=t[3],_=t[4],g=t[5],m=t[6],v=t[7],x=t[8],b=t[9],y=t[10],k=t[11],C=i*i*c+d,E=o*i*c+a*l,M=a*i*c-o*l,S=i*o*c-a*l,T=o*o*c+d,z=a*o*c+i*l,F=i*a*c+o*l,R=o*a*c-i*l,V=a*a*c+d,e[0]=u*C+_*E+x*M,e[1]=f*C+g*E+b*M,e[2]=h*C+m*E+y*M,e[3]=w*C+v*E+k*M,e[4]=u*S+_*T+x*z,e[5]=f*S+g*T+b*z,e[6]=h*S+m*T+y*z,e[7]=w*S+v*T+k*z,e[8]=u*F+_*R+x*V,e[9]=f*F+g*R+b*V,e[10]=h*F+m*R+y*V,e[11]=w*F+v*R+k*V,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function f4(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],d=t[8],c=t[9],u=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+d*r,e[5]=a*i+c*r,e[6]=s*i+u*r,e[7]=l*i+f*r,e[8]=d*i-o*r,e[9]=c*i-a*r,e[10]=u*i-s*r,e[11]=f*i-l*r,e}function h4(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],d=t[8],c=t[9],u=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i-d*r,e[1]=a*i-c*r,e[2]=s*i-u*r,e[3]=l*i-f*r,e[8]=o*r+d*i,e[9]=a*r+c*i,e[10]=s*r+u*i,e[11]=l*r+f*i,e}function p4(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],d=t[4],c=t[5],u=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+d*r,e[1]=a*i+c*r,e[2]=s*i+u*r,e[3]=l*i+f*r,e[4]=d*i-o*r,e[5]=c*i-a*r,e[6]=u*i-s*r,e[7]=f*i-l*r,e}function g4(e,t,n,r,i){var o=1/Math.tan(t/2),a;return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0?(a=1/(r-i),e[10]=(i+r)*a,e[14]=2*i*r*a):(e[10]=-1,e[14]=-2*r),e}var m4=g4;function _4(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),d=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*d,e[15]=1,e}var w4=_4;function lg(){var e=new Qo(3);return Qo!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Ba(e,t,n){var r=new Qo(3);return r[0]=e,r[1]=t,r[2]=n,r}function $u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function v4(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function b4(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function x4(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}function y4(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}function Sk(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(n-o)<=ds*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=ds*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=ds*Math.max(1,Math.abs(i),Math.abs(s))}(function(){var e=lg();return function(t,n,r,i,o,a){var s,l;for(n||(n=3),r||(r=0),i?l=Math.min(i*n+r,t.length):l=t.length,s=r;s<l;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],o(e,e,a),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}})();var td;(function(e){function t(r,i,o){let{up:a,down:s,north:l,east:d,south:c,west:u}=r;switch(o){case 90:[l,d,c,u]=[d,c,u,l];break;case 180:[l,d,c,u]=[c,u,l,d];break;case 270:[l,d,c,u]=[u,l,d,c]}switch(i){case 90:[a,l,s,c]=[l,s,c,a];break;case 180:[a,l,s,c]=[s,c,a,l];break;case 270:[a,l,s,c]=[c,a,l,s]}return{up:a,down:s,north:l,east:d,south:c,west:u}}e.rotate=t;function n(){return Object.create(null)}e.none=n})(td||(td={}));function k4(...e){let t=0;for(const i of e)t+=i.length;const n=new Float32Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Bu(e,t){const n=lg();for(let r=0;r<e.length;r+=3)n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],y4(n,n,t),e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2]}const C4={0:[0,3,2,3,2,1,0,1],90:[2,3,2,1,0,1,0,3],180:[2,1,0,1,0,3,2,3],270:[0,1,0,3,2,3,2,1]},E4={x:[1,0,0],y:[0,1,0],z:[0,0,1]},mi=1.41421356237,A4={x:[1,mi,mi],y:[mi,1,mi],z:[mi,mi,1]},Li=class{constructor(t,n,r,i,o,a){I(this,"id");I(this,"parent");I(this,"textures");I(this,"elements");I(this,"display");I(this,"guiLight");this.id=t,this.parent=n,this.textures=r,this.elements=i,this.display=o,this.guiLight=a}getDisplayBuffers(t,n,r,i){var d;const o=this.getBuffers(n,r,td.none(),i),a=(d=this.display)==null?void 0:d[t],s=ea();Fu(s),yi(s,s,[8,8,8]),a!=null&&a.translation&&yi(s,s,a.translation),a!=null&&a.rotation&&(f4(s,s,a.rotation[0]*Math.PI/180),h4(s,s,a.rotation[1]*Math.PI/180),p4(s,s,-a.rotation[2]*Math.PI/180)),a!=null&&a.scale&&Pu(s,s,a.scale),yi(s,s,[-8,-8,-8]),Bu(o.position,s);const l=[];for(let c=0;c<o.position.length;c+=12){const u=Ba(o.position[c],o.position[c+1],o.position[c+2]),f=Ba(o.position[c+3],o.position[c+4],o.position[c+5]),h=Ba(o.position[c+6],o.position[c+7],o.position[c+8]);$u(f,f,u),$u(h,h,u),x4(f,f,h),b4(f,f),l.push(...f,...f,...f,...f)}return be(oe({},o),{normal:l})}getBuffers(t,n,r,i){var d;const o=[],a=[],s=[],l=[];for(const c of(d=this.elements)!=null?d:[]){const u=this.getElementBuffers(c,n,t,r,i);o.push(u.position),a.push(...u.texCoord),s.push(...u.tintColor),l.push(...u.index),n+=u.texCoord.length/2}return{position:k4(...o),texCoord:a,tintColor:s,index:l}}getElementBuffers(t,n,r,i,o){var x,b,y,k,C,E,M,S,T,z,F,R;const a=t.from[0],s=t.from[1],l=t.from[2],d=t.to[0],c=t.to[1],u=t.to[2],f=[],h=[],w=[],_=[],g=(V,L,j)=>{var de,he,De,Ie,Ze,nt,Se,Te,Le,se;const[Z,Q,D,A]=r.getTextureUV(this.getTexture(V.texture)),O=(D-Z)/16,$=(A-Q)/16,X=O/16,ie=$/16;L[0]=((he=(de=V.uv)==null?void 0:de[0])!=null?he:L[0])*O+X,L[1]=((Ie=(De=V.uv)==null?void 0:De[1])!=null?Ie:L[1])*$+ie,L[2]=((nt=(Ze=V.uv)==null?void 0:Ze[2])!=null?nt:L[2])*O-X,L[3]=((Te=(Se=V.uv)==null?void 0:Se[3])!=null?Te:L[3])*$-ie;const B=C4[(Le=V.rotation)!=null?Le:0];h.push(Z+L[B[0]],Q+L[B[1]],Z+L[B[2]],Q+L[B[3]],Z+L[B[4]],Q+L[B[5]],Z+L[B[6]],Q+L[B[7]]);const K=((se=V.tintindex)!=null?se:-1)>=0?o!=null?o:[1,1,1]:[1,1,1];w.push(...K,...K,...K,...K),f.push(...j),_.push(n,n+1,n+2,n,n+2,n+3),n+=4};((b=(x=t.faces)==null?void 0:x.up)==null?void 0:b.texture)&&(!t.faces.up.cullface||!i[t.faces.up.cullface])&&g(t.faces.up,[a,16-u,d,16-l],[a,c,u,d,c,u,d,c,l,a,c,l]),((k=(y=t.faces)==null?void 0:y.down)==null?void 0:k.texture)&&(!t.faces.down.cullface||!i[t.faces.down.cullface])&&g(t.faces.down,[16-u,16-d,16-l,16-a],[a,s,l,d,s,l,d,s,u,a,s,u]),((E=(C=t.faces)==null?void 0:C.south)==null?void 0:E.texture)&&(!t.faces.south.cullface||!i[t.faces.south.cullface])&&g(t.faces.south,[a,16-c,d,16-s],[a,s,u,d,s,u,d,c,u,a,c,u]),((S=(M=t.faces)==null?void 0:M.north)==null?void 0:S.texture)&&(!t.faces.north.cullface||!i[t.faces.north.cullface])&&g(t.faces.north,[16-d,16-c,16-a,16-s],[d,s,l,a,s,l,a,c,l,d,c,l]),((z=(T=t.faces)==null?void 0:T.east)==null?void 0:z.texture)&&(!t.faces.east.cullface||!i[t.faces.east.cullface])&&g(t.faces.east,[16-u,16-c,16-l,16-s],[d,s,u,d,s,l,d,c,l,d,c,u]),((R=(F=t.faces)==null?void 0:F.west)==null?void 0:R.texture)&&(!t.faces.west.cullface||!i[t.faces.west.cullface])&&g(t.faces.west,[l,16-c,u,16-s],[a,s,l,a,s,u,a,c,u,a,c,l]);const m=ea();if(Fu(m),t.rotation){const V=Ba(...t.rotation.origin);yi(m,m,V),u4(m,m,d4(t.rotation.angle),E4[t.rotation.axis]),t.rotation.rescale&&Pu(m,m,A4[t.rotation.axis]),v4(V,V),yi(m,m,V)}const v=new Float32Array(f);return Bu(v,m),{position:v,texCoord:h,tintColor:w,index:_}}getTexture(t){var n,r;for(;t.startsWith("#");)t=(r=(n=this.textures)==null?void 0:n[t.slice(1)])!=null?r:"";return ve.parse(t)}flatten(t){var r,i;if(!this.parent)return;const n=this.getParent(t);if(!n){console.warn(`parent ${this.parent} does not exist!`),this.parent=void 0;return}n.flatten(t),this.elements||(this.elements=n.elements),this.textures||(this.textures={}),Object.keys((r=n.textures)!=null?r:{}).forEach(o=>{this.textures[o]||(this.textures[o]=n.textures[o])}),this.display||(this.display={}),Object.keys((i=n.display)!=null?i:{}).forEach(o=>{var s;const a=o;this.display[a]?Object.keys((s=n.display[a])!=null?s:{}).forEach(l=>{const d=l;this.display[a][d]||(this.display[a][d]=n.display[a][d])}):this.display[a]=n.display[a]}),this.guiLight||(this.guiLight=n.guiLight),this.parent=void 0}getParent(t){return this.parent?this.parent.equals(Li.BUILTIN_GENERATED)?new Li(Li.BUILTIN_GENERATED,void 0,void 0,[{from:[0,0,0],to:[16,16,0],faces:{south:{texture:"#layer0",tintindex:0}}}]):t.getBlockModel(this.parent):null}static fromJson(t,n){const r=n.parent===void 0?void 0:ve.parse(n.parent);return new Li(ve.parse(t),r,n.textures,n.elements,n.display)}};let us=Li;I(us,"BUILTIN_GENERATED",ve.create("builtin/generated"));class S4{constructor(t,n,r){I(this,"gl");I(this,"program");this.gl=t,this.program=this.initShaderProgram(n,r)}getProgram(){return this.program}initShaderProgram(t,n){const r=this.loadShader(this.gl.VERTEX_SHADER,t),i=this.loadShader(this.gl.FRAGMENT_SHADER,n),o=this.gl.createProgram();if(this.gl.attachShader(o,r),this.gl.attachShader(o,i),this.gl.linkProgram(o),!this.gl.getProgramParameter(o,this.gl.LINK_STATUS))throw new Error(`Unable to link shader program: ${this.gl.getProgramInfoLog(o)}`);return o}loadShader(t,n){const r=this.gl.createShader(t);if(this.gl.shaderSource(r,n),this.gl.compileShader(r),!this.gl.getShaderParameter(r,this.gl.COMPILE_STATUS)){const i=new Error(`Compiling ${t===this.gl.VERTEX_SHADER?"vertex":"fragment"} shader: ${this.gl.getShaderInfoLog(r)}`);throw this.gl.deleteShader(r),i}return r}}const I4=`
attribute vec4 vertPos;
attribute vec2 texCoord;
attribute vec3 tintColor;
attribute vec3 normal;
uniform mat4 mView;
uniform mat4 mProj;
varying highp vec2 vTexCoord;
varying highp vec3 vTintColor;
varying highp float vLighting;
void main(void) {
gl_Position = mProj * mView * vertPos;
vTexCoord = texCoord;
vTintColor = tintColor;
vLighting = normal.y * 0.2 + abs(normal.z) * 0.1 + 0.8;
}
`,M4=`
precision highp float;
varying highp vec2 vTexCoord;
varying highp vec3 vTintColor;
varying highp float vLighting;
uniform sampler2D sampler;
void main(void) {
vec4 texColor = texture2D(sampler, vTexCoord);
if(texColor.a < 0.01) discard;
gl_FragColor = vec4(texColor.xyz * vTintColor * vLighting, texColor.a);
}
`;class T4{constructor(t){I(this,"gl");I(this,"shaderProgram");I(this,"projMatrix");I(this,"activeShader");this.gl=t,this.shaderProgram=new S4(t,I4,M4).getProgram(),this.activeShader=this.shaderProgram,this.projMatrix=this.getPerspective(),this.initialize()}setViewport(t,n,r,i){this.gl.viewport(t,n,r,i),this.projMatrix=this.getPerspective()}getPerspective(){const t=70*Math.PI/180,n=this.gl.canvas.clientWidth/this.gl.canvas.clientHeight,r=ea();return m4(r,t,n,.1,500),r}initialize(){this.gl.enable(this.gl.DEPTH_TEST),this.gl.depthFunc(this.gl.LEQUAL),this.gl.enable(this.gl.BLEND),this.gl.blendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA),this.gl.enable(this.gl.CULL_FACE),this.gl.cullFace(this.gl.BACK)}setShader(t){this.gl.useProgram(t),this.activeShader=t}setVertexAttr(t,n,r){const i=this.gl.getAttribLocation(this.activeShader,t);this.gl.bindBuffer(this.gl.ARRAY_BUFFER,r),this.gl.vertexAttribPointer(i,n,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(i)}setUniform(t,n){const r=this.gl.getUniformLocation(this.activeShader,t);this.gl.uniformMatrix4fv(r,!1,n)}setTexture(t){this.gl.activeTexture(this.gl.TEXTURE0),this.gl.bindTexture(this.gl.TEXTURE_2D,t)}createBuffer(t,n){const r=this.gl.createBuffer();if(r===null)throw new Error("Renderer Error: Cannot create new buffer");return this.gl.bindBuffer(t,r),this.gl.bufferData(t,n,this.gl.DYNAMIC_DRAW),r}updateBuffer(t,n,r){this.gl.bindBuffer(n,t),this.gl.bufferData(n,r,this.gl.STATIC_DRAW)}createAtlasTexture(t){const n=this.gl.createTexture();return this.gl.bindTexture(this.gl.TEXTURE_2D,n),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,t),this.gl.generateMipmap(this.gl.TEXTURE_2D),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),n}prepareDraw(t){this.setUniform("mView",t),this.setUniform("mProj",this.projMatrix)}drawBuffers(t){this.setVertexAttr("vertPos",3,t.position),this.setVertexAttr("texCoord",2,t.texCoord),this.setVertexAttr("tintColor",3,t.tintColor),this.setVertexAttr("normal",3,t.normal),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,t.index),this.gl.drawElements(this.gl.TRIANGLES,t.length,this.gl.UNSIGNED_SHORT,0)}}class L4 extends T4{constructor(n,r,i,o){super(n);I(this,"item");I(this,"resources");I(this,"buffers");I(this,"tint");I(this,"atlasTexture");this.item=r,this.resources=i,this.buffers=this.getItemBuffers(),this.tint=o==null?void 0:o.tint,this.atlasTexture=this.createAtlasTexture(this.resources.getTextureAtlas())}setItem(n){this.item=n,this.buffers=this.getItemBuffers()}getItemBuffers(){var o;const n=this.resources.getBlockModel(this.item.withPrefix("item/"));if(!n)throw new Error(`Item model for ${this.item.toString()} does not exist`);let r=this.tint;!r&&this.item.namespace===ve.DEFAULT_NAMESPACE&&(r=(o=lc[this.item.path])==null?void 0:o.call(lc,{}));const i=n.getDisplayBuffers("gui",this.resources,0,r);return{position:this.createBuffer(this.gl.ARRAY_BUFFER,i.position),texCoord:this.createBuffer(this.gl.ARRAY_BUFFER,new Float32Array(i.texCoord)),tintColor:this.createBuffer(this.gl.ARRAY_BUFFER,new Float32Array(i.tintColor)),normal:this.createBuffer(this.gl.ARRAY_BUFFER,new Float32Array(i.normal)),index:this.createBuffer(this.gl.ELEMENT_ARRAY_BUFFER,new Uint16Array(i.index)),length:i.index.length}}getPerspective(){const n=ea();return w4(n,0,16,0,16,.1,500),n}drawItem(){const n=ea();yi(n,n,[0,0,-32]),this.setShader(this.shaderProgram),this.setTexture(this.atlasTexture),this.prepareDraw(n),this.drawBuffers(this.buffers)}}class zi{constructor(t,n){I(this,"img");I(this,"idMap");I(this,"part");if(this.img=t,this.idMap=n,!Xc(t.width)||!Xc(t.height))throw new Error(`Expected texture atlas dimensions to be powers of two, got ${t.width}x${t.height}.`);this.part=16/t.width}getTextureAtlas(){return this.img}getTextureUV(t){var n;return(n=this.idMap[t.toString()])!=null?n:[0,0,this.part,this.part]}static async fromBlobs(t){const n=Math.sqrt(Object.keys(t).length+1),r=Fs(n),i=r*16,o=1/r,a=document.createElement("canvas");a.width=i,a.height=i;const s=a.getContext("2d");this.drawInvalidTexture(s);const l={};let d=1;return await Promise.all(Object.keys(t).map(async c=>{const u=d%r,f=Math.floor(d/r);d+=1,l[c]=[o*u,o*f,o*u+o,o*f+o];const h=await createImageBitmap(t[c]);s.drawImage(h,0,0,16,16,16*u,16*f,16,16)})),new zi(s.getImageData(0,0,i,i),l)}static empty(){const t=document.createElement("canvas");t.width=16,t.height=16;const n=t.getContext("2d");return zi.drawInvalidTexture(n),new zi(n.getImageData(0,0,16,16),{})}static drawInvalidTexture(t){t.fillStyle="black",t.fillRect(0,0,16,16),t.fillStyle="magenta",t.fillRect(0,0,8,8),t.fillRect(8,8,8,8)}}class O4{constructor(t,n){I(this,"seed");I(this,"noiseCache");I(this,"randomCache");I(this,"random");I(this,"aquiferRandom");I(this,"oreRandom");I(this,"surfaceSystem");I(this,"router");I(this,"sampler");this.seed=n,this.noiseCache=new Map,this.randomCache=new Map,this.random=(t.legacyRandomSource?new mt(n):Ye.create(n)).forkPositional(),this.aquiferRandom=this.random.fromHashOf(ve.create("aquifer").toString()).forkPositional(),this.oreRandom=this.random.fromHashOf(ve.create("ore").toString()).forkPositional(),this.surfaceSystem=new og(t.surfaceRule,t.defaultBlock,n),this.router=Ar.mapAll(t.noiseRouter,this.createVisitor(t.noise,t.legacyRandomSource)),this.sampler=qi.Sampler.fromRouter(this.router)}createVisitor(t,n){const r=new Map,i=a=>{const s=a.key();if(s===void 0)throw new Error("Cannot create noise without key");if(n){if(s.equals(ve.create("temperature")))return new Tn(new mt(this.seed+BigInt(0)),Dn.create(-7,[1,1]));if(s.equals(ve.create("vegetation")))return new Tn(new mt(this.seed+BigInt(1)),Dn.create(-7,[1,1]));if(s.equals(ve.create("offset")))return new Tn(this.random.fromHashOf("offset"),Dn.create(0,[0]))}return this.getOrCreateNoise(s)},o={map:a=>{if(a instanceof ye.HolderHolder){const s=a.holder.key();if(s!==void 0&&r.has(s.toString()))return r.get(s.toString());{const l=a.holder.value().mapAll(o);return s!==void 0&&r.set(s.toString(),l),l}}return a instanceof ye.Interpolated?a.withCellSize(Gt.cellWidth(t),Gt.cellHeight(t)):a instanceof ye.ShiftedNoise?new ye.ShiftedNoise(a.shiftX,a.shiftY,a.shiftZ,a.xzScale,a.yScale,a.noiseData,i(a.noiseData)):a instanceof ye.Noise?new ye.Noise(a.xzScale,a.yScale,a.noiseData,i(a.noiseData)):a instanceof ye.ShiftNoise?a.withNewNoise(i(a.noiseData)):a instanceof ye.WeirdScaledSampler?new ye.WeirdScaledSampler(a.input,a.rarityValueMapper,a.noiseData,i(a.noiseData)):a instanceof ye.OldBlendedNoise?new ye.OldBlendedNoise(a.xzScale,a.yScale,a.xzFactor,a.yFactor,a.smearScaleMultiplier,new ig(this.random.fromHashOf(ve.create("terrain").toString()),a.xzScale,a.yScale,a.xzFactor,a.yFactor,a.smearScaleMultiplier)):a instanceof ye.EndIslands?new ye.EndIslands(this.seed):a instanceof ye.Mapped||a instanceof ye.Ap2?a.withMinMax():a}};return o}getOrCreateNoise(t){const n=Hr.REGISTRY.getOrThrow(ve.create("worldgen/noise"));return Qr(this.noiseCache,t.toString(),r=>new Tn(this.random.fromHashOf(r),n.getOrThrow(t)))}getOrCreateRandom(t){return Qr(this.randomCache,t.toString(),n=>this.random.fromHashOf(n).forkPositional())}}var zu=Object.freeze(Object.defineProperty({__proto__:null,get BlockPos(){return Ft},BlockState:je,Chunk:e4,get ChunkPos(){return Tt},ChunkSection:Mi,get Direction(){return Qt},get Holder(){return ei},Identifier:ve,PalettedContainer:W2,Registry:Hr,Structure:Zd,get MinMaxNumberFunction(){return Ps},get CubicSpline(){return $s},BlendedNoise:ig,ImprovedNoise:Jc,NormalNoise:Tn,get NoiseParameters(){return Dn},PerlinNoise:We,PerlinSimplexNoise:r4,SimplexNoise:yt,LegacyRandom:mt,LegacyPositionalRandom:ng,XoroshiroRandom:Ye,XoroshiroPositionalRandom:rg,square:Un,clamp:_r,lerp:er,lerp2:Rs,lerp3:q2,lazyLerp:Do,lazyLerp2:qc,lazyLerp3:X2,clampedLerp:fl,inverseLerp:Gd,smoothstep:cs,map:Xo,clampedMap:hl,binarySearch:K2,getSeed:Yd,longfromBytes:Ds,isPowerOfTwo:Xc,upperPowerOfTwo:Fs,get Json(){return q},lazy:Ro,computeIfAbsent:Qr,FluidStatus:Jo,get Aquifer(){return Vs},NoiseAquifer:Dr,get BiomeSource(){return ed},CheckerboardBiomeSource:pl,get Climate(){return qi},FixedBiomeSource:gl,MultiNoiseBiomeSource:ml,get DensityFunction(){return ye},NoiseChunk:sg,get MaterialRule(){return Us},NoiseChunkGenerator:i4,get NoiseGeneratorSettings(){return js},get NoiseRouter(){return Ar},get NoiseSettings(){return Gt},get NoiseSlideSettings(){return Qc},RandomState:O4,SurfaceSystem:og,SurfaceContext:ag,get SurfaceRule(){return Ko},get SurfaceCondition(){return zs},get VerticalAnchor(){return Bi},get WorldgenContext(){return Bs},get WorldgenRegistries(){return Sr}},Symbol.toStringTag,{value:"Module"}));const cc=new Set(["minecraft:worldgen/noise","minecraft:worldgen/density_function","minecraft:worldgen/noise_settings"]);class N4{constructor(){this.d=zu,this.deepslateCache=new Map,this.Z=0,this.DEBUG=!1,this.chunksCache=[],this.biomeCache=new Map,this.presetCache=new Map}async loadVersion(t,n){if(this.loadedVersion===t){this.applyProjectData(t,n);return}return(this.loadingVersion!==t||!this.loadingPromise)&&(this.loadingVersion=t,this.loadingPromise=this.doLoadVersion(t,n)),this.loadingPromise}async doLoadVersion(t,n){const r=this.deepslateCache.get(t);r?this.d=r:(_t(t,"1.19")?this.d=zu:_t(t,"1.18.2")?this.d=await Ce(()=>import("./deepslate.esm.e21d3d0c.js"),[]):this.d=await Ce(()=>import("./deepslate.esm.e13f77be.js"),[]),_t(t,"1.19")?await Promise.all(this.d.Registry.REGISTRY.map(async(i,o)=>{if(cc.has(i.toString())){const a=await Vc(t,i.path);for(const[s,l]of a.entries())o.register(this.d.Identifier.parse(s),o.parse(l),!0)}})):_t(t,"1.18.2")&&await Promise.all([...cc].map(async i=>{const o=await Vc(t,i.replace(/^minecraft:/,""));for(const[a,s]of o.entries())i==="minecraft:worldgen/noise"?this.d.WorldgenRegistries.NOISE.register(this.d.Identifier.parse(a),this.d.NoiseParameters.fromJson(s),!0):i==="minecraft:worldgen/density_function"&&this.d.WorldgenRegistries.DENSITY_FUNCTION.register(this.d.Identifier.parse(a),this.d.DensityFunction.fromJson(s),!0)})),this.deepslateCache.set(t,this.d)),this.applyProjectData(t,n),this.loadedVersion=t,this.loadingVersion=void 0}applyProjectData(t,n){_t(t,"1.19")&&this.d.Registry.REGISTRY.forEach((r,i)=>{var o;if(cc.has(r.toString())){i.clear();for(const[a,s]of Object.entries((o=n==null?void 0:n[r.path])!=null?o:{}))i.register(this.d.Identifier.parse(a),i.parse(s))}})}async loadChunkGenerator(t,n,r){const i=[t,`${r}`,n];if(!Wi(this.cacheState,i)){const o=this.createNoiseSettings(t),a=await this.createBiomeSource(o,n,r),s=this.isVersion("1.19")?new this.d.NoiseChunkGenerator(a,o):new this.d.NoiseChunkGenerator(r,a,o);this.settingsCache=o.noise,this.generatorCache=s,this.isVersion("1.19")?this.randomStateCache=new this.d.RandomState(o,r):this.randomStateCache=void 0,this.biomeSourceCache={getBiome:(l,d,c)=>a.getBiome(l,d,c,void 0)},this.chunksCache=[],this.biomeCache=new Map,this.cacheState=ol(i)}}async createBiomeSource(t,n,r){var i,o,a;if(this.loadedVersion&&mn(n)&&typeof n.preset=="string"){const s=this.loadedVersion,l=n.preset.replace(/^minecraft:/,""),d=await rv(this.presetCache,`${s}-${l}`,async()=>(await Wp(s,"dimension",l==="overworld"?"overworld":"the_nether")).generator.biome_source.biomes);n={type:n.type,biomes:d}}if(this.isVersion("1.19"))return this.d.BiomeSource.fromJson(n);{const s=mn(n)?n:{},l=typeof s.type=="string"?s.type.replace(/^minecraft:/,""):void 0;switch(l){case"fixed":return new this.d.FixedBiome(this.isVersion("1.18.2")?this.d.Identifier.parse(s.biome):s.biome);case"checkerboard":const d=((i=s.scale)!=null?i:2)+2,c=(a=(o=s.biomes)==null?void 0:o.length)!=null?a:0;return{getBiome:(u,f,h)=>{var g;const w=(((u>>d)+(h>>d))%c+c)%c,_=(g=s.biomes)==null?void 0:g[w];return this.isVersion("1.18.2")?this.d.Identifier.parse(_):_}};case"multi_noise":if(this.isVersion("1.18")){const u=new this.d.Climate.Parameters(s.biomes.map(w=>{const _=this.isVersion("1.18.2")?this.d.Identifier.parse(w.biome):w.biome;return[this.d.Climate.ParamPoint.fromJson(w.parameters),()=>_]})),f=new this.d.MultiNoise(u);let h;if(this.isVersion("1.18.2")){const w=this.d.NoiseRouter.create({temperature:new this.d.DensityFunction.Noise(.25,0,this.d.Noises.TEMPERATURE),vegetation:new this.d.DensityFunction.Noise(.25,0,this.d.Noises.VEGETATION),continents:new this.d.DensityFunction.Noise(.25,0,this.d.Noises.CONTINENTALNESS),erosion:new this.d.DensityFunction.Noise(.25,0,this.d.Noises.EROSION),ridges:new this.d.DensityFunction.Noise(.25,0,this.d.Noises.RIDGE)});h=this.d.Climate.Sampler.fromRouter(this.d.NoiseRouter.withSettings(w,t,r))}else{const w=new this.d.NoiseSampler(this.d.NoiseSettings.fromJson(null),!0,r,!0);h=(_,g,m)=>w.sample(_,g,m)}return{getBiome:(w,_,g)=>f.getBiome(w,_,g,h)}}else{const u=["altitude","temperature","humidity","weirdness"].map((f,h)=>{var _;const w=s[`${f}_noise`];return w.firstOctave=ct((_=w.firstOctave)!=null?_:-7,-100,-1),new this.d.NormalNoise(new this.d.LegacyRandom(r+BigInt(h)),w)});return!Array.isArray(s.biomes)||s.biomes.length===0?{getBiome:()=>this.d.Identifier.create("unknown")}:{getBiome:(f,h,w)=>{const _=u.map(v=>v.sample(f,w,0));let g=1/0,m="unknown";for(const{biome:v,parameters:x}of s.biomes){const b=mo(x.altitude-_[0])+mo(x.temperature-_[1])+mo(x.humidity-_[2])+mo(x.weirdness-_[3])+mo(x.offset);b<g&&(g=b,m=v)}return m}}}default:throw new Error(`Unsupported biome source ${l}`)}}}createNoiseSettings(t){return typeof t=="string"?this.isVersion("1.19")?this.d.WorldgenRegistries.NOISE_SETTINGS.getOrThrow(this.d.Identifier.parse(t)):this.d.NoiseGeneratorSettings.fromJson(void 0):this.d.NoiseGeneratorSettings.fromJson(t)}generateChunks(t,n,r="unknown"){if(t=Math.floor(t),!this.settingsCache)throw new Error("Tried to generate chunks before settings are loaded");const i=this.settingsCache.minY,o=this.settingsCache.height;return[...Array(Math.ceil(n/16)+1)].map((a,s)=>{const l=(t>>4)+s,d=this.chunksCache.find(u=>u.pos[0]===l);if(d)return d;const c=new this.d.Chunk(i,o,this.d.ChunkPos.create(l,this.Z>>4));if(!this.generatorCache)throw new Error("Tried to generate chunks before generator is loaded");if(_t(this.loadedVersion,"1.19")){if(!this.randomStateCache)throw new Error("Tried to generate chunks before random state is loaded");this.generatorCache.fill(this.randomStateCache,c,!0),this.generatorCache.buildSurface(this.randomStateCache,c,r)}else this.generatorCache.fill(c,!0),this.generatorCache.buildSurface(c,r);return this.chunksCache.push(c),c})}fillBiomes(t,n,r,i,o=1,a=64){if(!this.generatorCache||!this.settingsCache)throw new Error("Tried to fill biomes before generator is loaded");const s=a-this.settingsCache.minY>>2,l=t>>2,d=n>>2,c=r>>2,u=i>>2,f=Math.floor((d-l)/o),h=Math.floor((u-c)/o),w=new ev,_=new Int8Array(f*h);let g=0,m=0;for(let v=l;v<d;v+=o)for(let x=c;x<u;x+=o){const b=`${v}:${s}:${x}`;let y=this.biomeCache.get(b);if(!y){if(this.DEBUG)y=this.computeDebugBiome(v,x);else if(this.isVersion("1.19")){if(!this.randomStateCache)throw new Error("Tried to compute biomes before random state is loaded");y=this.generatorCache.computeBiome(this.randomStateCache,v,s,x).toString()}else{if(!this.biomeSourceCache)throw new Error("Tried to compute biomes before biome source is loaded");y=this.biomeSourceCache.getBiome(v,s,x).toString()}this.biomeCache.set(b,y)}_[m++]=w.computeIfAbsent(y,()=>g++)}return{palette:w.backward,data:_,width:f,height:h}}computeDebugBiome(t,n){return t>0?n>0?"minecraft:plains":"minecraft:forest":n>0?"minecraft:badlands":"minecraft:desert"}loadDensityFunction(t,n){if(this.isVersion("1.19")){const r=this.d.NoiseGeneratorSettings.create({noise:{minY:-64,height:384,xzSize:1,ySize:2},noiseRouter:this.d.NoiseRouter.create({finalDensity:this.d.DensityFunction.fromJson(t)})});return this.settingsCache=r.noise,new this.d.RandomState(r,n).router.finalDensity}else{const r=this.d.XoroshiroRandom.create(n).forkPositional(),i=this.d.NoiseSettings.fromJson({min_y:-64,height:384,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},bottom_slide:{target:.1171875,size:3,offset:0},top_slide:{target:-.078125,size:2,offset:8},terrain_shaper:{offset:.044,factor:4,jaggedness:0}});return this.settingsCache=i,this.d.DensityFunction.fromJson(t).mapAll(new this.d.NoiseRouter.Visitor(r,i))}}getNoiseSettings(){if(!this.settingsCache)throw new Error("Tried to access noise settings when they are not loaded");return this.settingsCache}getBlockState(t,n){t=Math.floor(t),n=Math.floor(n);const r=this.chunksCache.find(i=>this.d.ChunkPos.minBlockX(i.pos)<=t&&this.d.ChunkPos.maxBlockX(i.pos)>=t);return r==null?void 0:r.getBlockState(this.d.BlockPos.create(t,n,this.Z))}isVersion(t,n){if(!this.loadedVersion)throw new Error("No deepslate version loaded");return _t(this.loadedVersion,t,n)}}const Lt=new N4;class R4{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 mt(t);this.minLimitPerlinNoise=new We(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new We(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new We(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new We(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,o){this.settings=t,this.chunkWidth=t.size_horizontal*4,this.chunkHeight=t.size_vertical*4,this.chunkCountY=Math.floor(t.height/this.chunkHeight),t.amplified&&n>0&&(n=1+n*2,r=1+r*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(r*.9+.1),this.noiseColumnCache=Array(o).fill(null),this.xOffset=i}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),r=Math.floor(t/this.chunkWidth),i=Math.floor(t%this.chunkWidth)/this.chunkWidth,o=this.fillNoiseColumn(r),a=this.fillNoiseColumn(r+1);for(let s=this.chunkCountY-1;s>=0;s-=1)for(let l=this.chunkHeight;l>=0;l-=1){const d=l/this.chunkHeight,c=s*this.chunkHeight+l;n[c]=Qw(d,i,o[s],o[s+1],a[s],a[s+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const r=Array(this.chunkCountY+1),i=684.412*this.settings.sampling.xz_scale,o=684.412*this.settings.sampling.y_scale,a=i/this.settings.sampling.xz_factor,s=o/this.settings.sampling.y_factor,l=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let d=0;d<=this.chunkCountY;d+=1){let c=this.sampleAndClampNoise(t,d,this.mainPerlinNoise.getOctaveNoise(0).zo,i,o,a,s);const h=((1-d*2/this.chunkCountY+l)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;c+=h*(h>0?4:1),this.settings.top_slide.size>0&&(c=jl(this.settings.top_slide.target,c,(this.chunkCountY-d-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(c=jl(this.settings.bottom_slide.target,c,(d-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),r[d]=c}return this.noiseColumnCache[t-this.xOffset]=r,r}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),i=(n<0?-n*.3:n)*24.575625-2;return i<0?i*.009486607142857142:Math.min(i,1)*.006640625}sampleAndClampNoise(t,n,r,i,o,a,s){let l=0,d=0,c=0,u=1;for(let f=0;f<16;f+=1){const h=We.wrap(t*i*u),w=We.wrap(n*o*u),_=We.wrap(r*i*u),g=o*u,m=this.minLimitPerlinNoise.getOctaveNoise(f);m&&(l+=m.sample(h,w,_,g,n*g)/u);const v=this.maxLimitPerlinNoise.getOctaveNoise(f);if(v&&(d+=v.sample(h,w,_,g,n*g)/u),f<8){const x=this.mainPerlinNoise.getOctaveNoise(f);x&&(c+=x.sample(We.wrap(t*a*u),We.wrap(n*s*u),We.wrap(r*a*u),s*u,n*s*u)/u)}u/=2}return jl(l/512,d/512,(c/10+1)/2)}}const D4={"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]};async function F4(e,t,n){var a,s,l,d;if(_t(n.version,"1.18")){await Lt.loadVersion(n.version,_l(n.project));const c={type:"fixed",biome:n.biome};await Lt.loadChunkGenerator(P.DataModel.unwrapLists(e),c,n.seed),Lt.generateChunks(-n.offset,n.width);const u=Lt.getNoiseSettings(),f=t.data;for(let h=0;h<n.width;h+=1)for(let w=0;w<u.height;w+=1){const _=h*4+(u.height-w-1)*4*t.width,g=(a=Lt.getBlockState(h-n.offset,w+u.minY))!=null?a:je.AIR,m=(s=D4[g.getName().toString()])!=null?s:[0,0,0];f[_]=m[0],f[_+1]=m[1],f[_+2]=m[2],f[_+3]=255}return}const r=new R4(n.seed);r.reset(e.noise,(l=n.biomeDepth)!=null?l:0,(d=n.biomeScale)!=null?d:0,n.offset,n.width);const i=t.data,o=t.width*4;for(let c=0;c<n.width;c+=1){const u=r.iterateNoiseColumn(c-n.offset).reverse();for(let f=0;f<e.noise.height;f+=1){const h=f*o+c*4,w=B4(u,f);i[h]=w,i[h+1]=w,i[h+2]=w,i[h+3]=255}}}function P4(e,t){return Lt.getBlockState(e,t)}async function $4(e,t,n){await Lt.loadVersion(n.version,_l(n.project));const r=Lt.loadDensityFunction(P.DataModel.unwrapLists(e),n.seed),i=Lt.getNoiseSettings(),o=Array(n.width*i.height);let a=1/0,s=-1/0;for(let d=0;d<n.width;d+=1)for(let c=0;c<i.height;c+=1){const u=d+(i.height-c-1)*n.width,f=r.compute(ye.context(d-n.offset,c,0));a=Math.min(a,f),s=Math.max(s,f),o[u]=f}const l=t.data;for(let d=0;d<n.width*i.height;d+=1){const c=Math.floor(hl(o[d],a,s,0,256));l[4*d]=c,l[4*d+1]=c,l[4*d+2]=c,l[4*d+3]=255}}function _l(e){return Object.fromEntries(["worldgen/noise_settings","worldgen/noise","worldgen/density_function"].map(t=>{const n=Object.fromEntries(e.files.filter(r=>r.type===t).map(r=>[r.id,r.data]));return[t,n]}))}function B4(e,t){return e[t]>0?0:e[t+1]>0?150:255}async function z4(e,t,n){await Lt.loadVersion(n.version,_l(n.project)),await Lt.loadChunkGenerator(P.DataModel.unwrapLists(n.settings),P.DataModel.unwrapLists(e),n.seed);const r=Math.max(1,Math.round(n.scale)),i=200*r,o=Math.round(-n.offset[0]*n.scale),a=Math.round(-n.offset[1]*n.scale),s=Math.floor(o-i/2),l=Math.floor(a-i/2),d=s+i,c=l+i,{palette:u,data:f,width:h,height:w}=Lt.fillBiomes(s*4,d*4,l*4,c*4,r*n.res,n.y);let _=0,g=0;for(let m=0;m<f.length;m+=1){const v=u.get(f[m]),x=V4(v!=null?v:"",n.biomeColors),b=g*h+_;t.data[b*4]=x[0],t.data[b*4+1]=x[1],t.data[b*4+2]=x[2],t.data[b*4+3]=255,g+=1,g>=w&&(g=0,_+=1)}}async function j4(e,t,n,r){await Lt.loadVersion(r.version,_l(r.project)),await Lt.loadChunkGenerator(P.DataModel.unwrapLists(r.settings),P.DataModel.unwrapLists(e),r.seed);const i=Math.max(1,Math.round(r.scale)),o=Math.round(-r.offset[0]*r.scale),a=Math.round(-r.offset[1]*r.scale),s=Math.floor(o+(t-100)*i),l=Math.floor(a+(n-100)*i),{palette:d,data:c}=Lt.fillBiomes(s*4,s*4+4,l*4,l*4+4,1,r.y);return{biome:d.get(c[0])}}function V4(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:cg[e];return n===void 0?Td(e):n}const cg={"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":[39,30,61],"minecraft:end_highlands":[232,244,178],"minecraft:end_midlands":[194,187,136],"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":[16,12,28],"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":[59,39,84],"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],"minecraft:deep_dark":[10,14,19],"minecraft:mangrove_swamp":[36,196,142]},Fr=[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],ju=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function U4(e,t,n){const r=new mt(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new We(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:a=>r.nextInt(a),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(a){return H4(a,this)}};for(let a=0;a<n.size[0]/16;a+=1)for(let s=0;s<n.size[2]/16;s+=1)_t(n.version,void 0,"1.17")?ki([a*16,0,s*16],P.DataModel.unwrapLists(e),i):W4([a*16,0,s*16],P.DataModel.unwrapLists(e.placement),i);const o=t.data;t.data.fill(255);for(const[a,s]of i.placements){if(a[0]<0||a[1]<0||a[2]<0||a[0]>=n.size[0]||a[1]>=n.size[1]||a[2]>=n.size[2])continue;const l=a[2]*(t.width*4)+a[0]*4,d=s<ju.length?ju[s]:Td(i.features[s]);o[l]=ct(d[0],50,205),o[l+1]=ct(d[1],50,205),o[l+2]=ct(d[2],50,205),o[l+3]=255}for(let a=0;a<n.size[0];a+=1)for(let s=0;s<n.size[2];s+=1){if((Math.floor(a/16)+Math.floor(s/16))%2===0)continue;const l=s*(t.width*4)+a*4;for(let d=0;d<3;d+=1)o[l+d]=.85*o[l+d]}}function Xi(e){return e.startsWith("minecraft:")?e.slice(10):e}function Kt(e,t){return[[e[0],t,e[2]]]}function H4(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(Xi(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 ct(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(ct(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const o=e.distribution.reduce((s,l)=>s+l.weight,0);let a=t.nextInt(o);for(const s of e.distribution)if(a-=s.weight,a<0)return t.sampleInt(s.data);return 0}return 1}function En(e,t){if(!mn(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 Z4(e,t){var n,r,i,o;if(!mn(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return En(e);switch(Xi(e.type)){case"constant":return En(e.value);case"uniform":{const a=En(e.min_inclusive),s=En(e.max_inclusive);return a+t.nextInt(s-a+1)}case"biased_to_bottom":{const a=En(e.min_inclusive),s=En(e.max_inclusive),l=t.nextInt(s-a-((n=e.inner)!=null?n:1)+1);return a+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const a=En(e.min_inclusive),s=En(e.max_inclusive),l=(i=e.inner)!=null?i:1,d=a+l+t.nextInt(s-a-l+1),c=a+t.nextInt(d-a);return a+t.nextInt(c-a+l)}case"trapezoid":{const a=En(e.min_inclusive),s=En(e.max_inclusive),l=(o=e.plateau)!=null?o:0;if(l>=s-a)return a+t.nextInt(s-a+1);const d=(s-a-l)/2,c=s-a-d;return a+t.nextInt(c+1)+t.nextInt(d+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function Vu(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function ki(e,t,n){var o;if(typeof t=="string"){n.placements.push([e,Vu(t,n)]);return}const r=Xi((o=t==null?void 0:t.type)!=null?o:"no_op"),i=G4[r];i?i(t.config,e,n):n.placements.push([e,Vu(JSON.stringify(t),n)])}function nd(e,t,n){var o;const r=Xi((o=t==null?void 0:t.type)!=null?o:"nope"),i=Y4[r];return i?i(t==null?void 0:t.config,e,n):[e]}const G4={decorated:(e,t,n)=>{nd(t,e==null?void 0:e.decorator,n).forEach(i=>ki(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;ki(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const o of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=o==null?void 0:o.chance)!=null?i:0)){ki(t,o.feature,n);return}ki(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,o,a;const r=(a=e==null?void 0:e.features)==null?void 0:a[n.nextInt((o=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?o:0)];ki(t,r,n)}},Y4={chance:(e,t,n)=>{var r;return n.nextFloat()<1/((r=e==null?void 0:e.chance)!=null?r:1)?[t]:[]},count:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t)},count_extra:(e,t,n)=>{var i,o;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(o=e.extra_count)!=null?o:0),new Array(r).fill(t)},count_multilayer:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t).map(i=>[i[0]+n.nextInt(16),i[1],i[2]+n.nextInt(16)])},count_noise:(e,t,n)=>{const i=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(i).fill(t)},count_noise_biased:(e,t,n)=>{var a;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),o=Math.max(0,Math.ceil((i+((a=e.noise_offset)!=null?a:0))*e.noise_to_count_ratio));return new Array(o).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const o=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],a=Math.max(n.seaLevel,Fr[ct(0,63,o)]),s=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[o,a,s]}),decorated:(e,t,n)=>nd(t,e==null?void 0:e.outer,n).flatMap(r=>nd(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,o,a,s;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((o=e==null?void 0:e.spread)!=null?o:0)-((a=e.spread)!=null?a:0)+((s=e==null?void 0:e.baseline)!=null?s:0);return Kt(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,Fr[ct(0,63,t[0])]);return Kt(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,Fr[ct(0,63,t[0])]);return Kt(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,Fr[ct(0,63,t[0])]);return Kt(t,r)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var r,i;if(n.nextInt(((r=e.chance)!=null?r:1)/10)===0){const o=n.nextInt(n.nextInt(248)+8);if(o<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const a=n.nextInt(16)+t[0],s=n.nextInt(16)+t[2];return[[a,o,s]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,o,a;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0);return Kt(t,r)},range_biased:(e,t,n)=>{var i,o,a;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return Kt(t,r)},range_very_biased:(e,t,n)=>{var i,o,a,s;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0));return Kt(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return Kt(t,r)},top_solid_heightmap:(e,t)=>{const n=Fr[ct(0,63,t[0])];return Kt(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return Kt(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var o,a;const n=Fr[ct(0,63,t[0])],r=n+((o=e==null?void 0:e.min_inclusive)!=null?o:-1/0),i=n+((a=e==null?void 0:e.max_inclusive)!=null?a: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 W4(e,t,n){var i;let r=[e];for(const o of t)!Uu[Xi((i=o==null?void 0:o.type)!=null?i:"nope")]||(r=r.flatMap(s=>Uu[Xi(o.type)](o,s,n)));for(const o of r)n.placements.push([o,0])}const Uu={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)=>Kt(t,Z4(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,Fr[ct(0,63,e[0])]);return Kt(e,n)},in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},r,i)=>{const o=Math.max(1,t),a=i.biomeInfoNoise.sample(r[0]/o,0,r[2]/o),s=Math.max(0,Math.ceil((a+(n!=null?n:0))*e));return new Array(s).fill(r)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},r,i)=>{const a=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(a).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]:[]};function q4(e,t,n){const r=Ye.create(n.seed),i=Dn.fromJson(P.DataModel.unwrapLists(e)),o=new Tn(r,i),a=-n.offset[0]-100,s=-n.offset[1]-100,l=t.data;for(let d=0;d<256;d+=1)for(let c=0;c<256;c+=1){const u=d*4+c*4*256,f=(d+a)*n.scale,h=(c+s)*n.scale,w=(o.sample(f,h,0)+1)*128;l[u]=w,l[u+1]=w,l[u+2]=w,l[u+3]=255}}const X4=({model:e,data:t,shown:n,version:r})=>{var M;const{locale:i}=Ae(),{project:o}=$n(),[a,s]=Y(rn()),[l,d]=Y(2),[c,u]=Y(64),[f,h]=Y(void 0),{biomeColors:w}=l2(),_=Me([0,0]),g=Me(1),m=Me(),v=P.DataModel.unwrapLists(e.get(new P.Path(["generator","settings"]))),x=JSON.stringify([t,v]),b=(M=t.type)==null?void 0:M.replace(/^minecraft:/,""),y=b==="multi_noise"||b==="the_end",{canvas:k,redraw:C}=ha({size(){return[200/g.current,200/g.current]},async draw(S){const T={settings:v,biomeColors:w,offset:_.current,scale:l,seed:a,res:g.current,version:r,project:o,y:c};await z4(t,S,T),g.current===4&&(clearTimeout(m.current),m.current=setTimeout(()=>{g.current=1,C()},150))},async onDrag(S,T){_.current[0]=_.current[0]+S*200,_.current[1]=_.current[1]+T*200,clearTimeout(m.current),g.current=y?4:1,C()},async onHover(S,T){const z={settings:v,biomeColors:w,offset:_.current,scale:l,seed:a,res:1,version:r,project:o,y:c},F=await j4(t,Math.floor(S*200),Math.floor(T*200),z);h(F)},onLeave(){h(void 0)}},[r,x,l,a,c,w,o]);me(()=>{n&&(g.current=y?4:1,C())},[r,x,l,a,c,n,w,o]);const E=S=>{S=Math.max(1,Math.round(S)),_.current[0]=_.current[0]*l/S,_.current[1]=_.current[1]*l/S,d(S)};return N(le,{children:[N("div",{class:"controls preview-controls",children:[f&&p(ae,{label:f.biome,class:"no-pointer"}),p(ae,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>E(l*2)}),p(ae,{icon:"plus",tooltip:i(Math.round(l)<=1?"zoom_in_limit":"zoom_in"),disabled:Math.round(l)<=1,onClick:()=>E(l/2)}),y&&N(le,{children:[p(Ot,{icon:"stack",children:N("div",{class:"btn btn-input",onClick:S=>S.stopPropagation(),children:[p("span",{children:i("y")}),p(Ts,{value:c,onChange:u})]})}),p(ae,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>s(rn())})]})]}),(f==null?void 0:f.temperature)!==void 0&&p("div",{class:"controls secondary-controls",children:p(ae,{class:"no-pointer",label:Object.entries(f).filter(([S])=>S!=="biome").map(([S,T])=>`${S[0].toUpperCase()}: ${T.toFixed(2)}`).join(" ")})}),p("canvas",{ref:k,width:"200",height:"200"})]})},K4=({data:e,version:t,shown:n})=>{const{locale:r}=Ae(),[i,o]=Y(4),[a,s]=Y(rn()),l=JSON.stringify(e),{canvas:d,redraw:c}=ha({size(){return[i*16,i*16]},async draw(u){U4(e,u,{seed:a,version:t,size:[i*16,128,i*16]})}},[t,l,a]);return me(()=>{n&&c()},[t,l,i,a,n]),N(le,{children:[N("div",{class:"controls preview-controls",children:[p(ae,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>o(Math.min(16,i+1))}),p(ae,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>o(Math.max(1,i-1))}),p(ae,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(rn())})]}),p("canvas",{ref:d,width:"64",height:"64"})]})},J4=({data:e,shown:t,version:n})=>{var m,v;const{locale:r}=Ae(),{project:i}=$n(),[o,a]=Y(rn()),[s,l]=Y(!1),[d,c]=Y(void 0),u=Me(0),f=Me(void 0),h=JSON.stringify([e]),w=(v=(m=e==null?void 0:e.noise)==null?void 0:m.height)!=null?v:256,{canvas:_,redraw:g}=ha({size(){return[w,w]},async draw(x){const b={offset:u.current,width:x.width,seed:o,version:n,project:i};await $4(e,x,b)},async onDrag(x){u.current+=x*w,g()},async onHover(x,b){var C,E;const y=Math.floor(x*w-u.current),k=w-Math.max(1,Math.ceil(b*w))+((E=(C=e==null?void 0:e.noise)==null?void 0:C.min_y)!=null?E:0);c(`X=${y} Y=${k}`)},onLeave(){c(void 0)}},[n,h,o,i]);return me(()=>{f.current&&clearInterval(f.current),t&&(g(),s&&(f.current=setInterval(()=>{u.current-=8,g()},100)))},[n,h,o,i,t,s]),N(le,{children:[N("div",{class:"controls preview-controls",children:[d&&p(ae,{label:d,class:"no-pointer"}),p(Ot,{icon:"gear",tooltip:r("terrain_settings"),children:p(ae,{icon:s?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>l(!s)})}),p(ae,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(rn())})]}),p("canvas",{ref:_,width:w,height:w})]})},Q4=({data:e,shown:t,version:n})=>{const{locale:r}=Ae(),[i,o]=Y(rn()),[a,s]=Y(2),l=Me([0,0]),d=JSON.stringify([e]),{canvas:c,redraw:u}=ha({size(){return[256,256]},async draw(h){const w={offset:l.current,scale:a,seed:i,version:n};q4(e,h,w)},async onDrag(h,w){l.current[0]=l.current[0]+h*256,l.current[1]=l.current[1]+w*256,u()}},[n,d,a,i]);me(()=>{t&&u()},[n,d,a,i,t]);const f=h=>{l.current[0]=l.current[0]*a/h,l.current[1]=l.current[1]*a/h,s(h)};return N(le,{children:[N("div",{class:"controls preview-controls",children:[p(ae,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>f(a*1.5)}),p(ae,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>f(a/1.5)}),p(ae,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(rn())})]}),p("canvas",{ref:c,width:"256",height:"256"})]})},e7=({data:e,shown:t,version:n})=>{var E,M;const{locale:r}=Ae(),{project:i}=$n(),[o,a]=Y(rn()),[s,l]=Y("minecraft:plains"),[d,c]=Y(.2),[u,f]=Y(.1),[h,w]=Y(!1),[_,g]=Y(void 0),m=Me(0),v=Me(void 0),x=JSON.stringify([e,d,u]),b=(M=(E=e==null?void 0:e.noise)==null?void 0:E.height)!=null?M:256,{canvas:y,redraw:k}=ha({size(){return[b,b]},async draw(S){const T={biome:s,biomeDepth:u,biomeScale:d,offset:m.current,width:S.width,seed:o,version:n,project:i};await F4(e,S,T)},async onDrag(S){m.current+=S*b,k()},async onHover(S,T){var V,L;const z=Math.floor(S*b-m.current),F=b-Math.max(1,Math.ceil(T*b))+((L=(V=e==null?void 0:e.noise)==null?void 0:V.min_y)!=null?L:0),R=P4(z,F);g(R?`Y=${F} (${R.getName().path})`:`Y=${F}`)},onLeave(){g(void 0)}},[x,o,i]);me(()=>{v.current&&clearInterval(v.current),t&&(async()=>{try{await k(),h&&(v.current=setInterval(()=>{m.current-=8,k()},100))}catch(S){throw S}})()},[n,x,o,i,t,s,d,u,h]);const C=Ee(()=>{var S;return(S=is==null?void 0:is.get("worldgen/biome"))!=null?S:[]},[n]);return N(le,{children:[N("div",{class:"controls preview-controls",children:[_&&p(ae,{label:_,class:"no-pointer"}),N(Ot,{icon:"gear",tooltip:r("terrain_settings"),children:[_t(n,void 0,"1.17")?N(le,{children:[p(ns,{label:r("preview.scale"),value:`${d}`,onChange:S=>c(Number(S))}),p(ns,{label:r("preview.depth"),value:`${u}`,onChange:S=>f(Number(S))})]}):p(ns,{label:r("preview.biome"),value:s,onChange:l,dataList:C,larger:!0}),p(ae,{icon:h?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>w(!h)})]}),p(ae,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(rn())})]}),p("canvas",{ref:y,width:b,height:b})]})},t7={container:r7,default:i7};function n7(e,t){const n=a7(t),r=[];return dg(e,o=>r.push(o),n),console.log("...",r),t7[t.stackMixer](r,n)}const Hu=27;function r7(e,t){const n=Zu([...Array(Hu)].map((o,a)=>a),t),r=e.filter(o=>o.id!=="minecraft:air"&&o.count>1);for(e=e.filter(o=>o.id!=="minecraft:air"&&o.count===1);Hu-e.length-r.length>0&&r.length>0;){const[o]=r.splice(t.random.nextInt(r.length),1),a=t.random.nextInt(Math.floor(o.count/2))+1,s=o7(o,a);for(const l of[o,s])l.count>1&&t.random.nextFloat()<.5?r.push(l):e.push(l)}e.push(...r),Zu(e,t);const i=[];for(const o of e){const a=n.pop();if(a===void 0)break;o.id!=="minecraft:air"&&o.count>0&&i.push({slot:a,item:o})}return i}function i7(e){return e.map((t,n)=>({slot:n,item:t}))}function o7(e,t){const n=Math.min(t,e.count),r=ol(e);return r.count=n,e.count=e.count-n,r}function Zu(e,t){let n=e.length;for(;n>0;){const r=t.random.nextInt(n);n-=1,[e[n],e[r]]=[e[r],e[n]]}return e}function dg(e,t,n){var i,o;const r=Wd((i=e.functions)!=null?i:[],t,n);for(const a of(o=e.pools)!=null?o:[])s7(a,r,n)}function a7(e){return be(oe({},e),{random:new mt(e.seed),luck:e.luck,weather:e.weather,dayTime:e.daytime,getItemTag:()=>[],getLootTable:()=>({pools:[]}),getPredicate:()=>[]})}function s7(e,t,n){var r,i,o;if(wl((r=e.conditions)!=null?r:[])(n)){const a=Wd((i=e.functions)!=null?i:[],t,n),s=Fn(e.rolls,n)+Math.floor(ji(e.bonus_rolls,n)*n.luck);for(let l=0;l<s;l+=1){let d=0;const c=[];for(const f of(o=e.entries)!=null?o:[])fs(f,n,h=>{const w=Yu(h,n.luck);w>0&&(c.push(h),d+=w)});if(d===0||c.length===0)continue;if(c.length===1){Gu(c[0],a,n);continue}let u=n.random.nextInt(d);for(const f of c)if(u-=Yu(f,n.luck),u<0){Gu(f,a,n);break}}}}function fs(e,t,n){var i,o,a,s,l;if(!l7(e,t))return!1;switch((i=e.type)==null?void 0:i.replace(/^minecraft:/,"")){case"group":for(const d of(o=e.children)!=null?o:[])fs(d,t,n);return!0;case"alternatives":for(const d of(a=e.children)!=null?a:[])if(fs(d,t,n))return!0;return!1;case"sequence":for(const d of(s=e.children)!=null?s:[])if(!fs(d,t,n))return!1;return!0;case"tag":return e.expand?t.getItemTag((l=e.tag)!=null?l:"").forEach(d=>{n({type:"item",name:d})}):n(e),!0;default:return n(e),!0}}function l7(e,t){var n;return wl((n=e.conditions)!=null?n:[])(t)}function Gu(e,t,n){var o,a,s;const r=Wd((o=e.functions)!=null?o:[],t,n);switch((a=e.type)==null?void 0:a.replace(/^minecraft:/,"")){case"item":r({id:e.name,count:1});break;case"tag":n.getItemTag((s=e.name)!=null?s:"").forEach(l=>{r({id:l,count:1})});break;case"loot_table":dg(n.getLootTable(e.name),r,n);break}}function Yu(e,t){var n,r;return Math.max(Math.floor(((n=e.weight)!=null?n:1)+((r=e.quality)!=null?r:0)*t),0)}function Wd(e,t,n){const r=c7(e);return i=>{r(i,n),t(i)}}function c7(e){return(t,n)=>{var r,i,o,a;for(const s of e)if(wl((r=s.conditions)!=null?r:[])(n)){const l=(i=s.function)==null?void 0:i.replace(/^minecraft:/,"");((a=(o=dc[l])==null?void 0:o.call(dc,s))!=null?a:d=>d)(t,n)}}}const dc={enchant_randomly:({enchantments:e})=>(t,n)=>{const r=t.id==="minecraft:book";if((e===void 0||e.length===0)&&(e=[...qd.keys()].filter(i=>{const o=Ki(i);return o.discoverable&&(r||o.canEnchant(t.id))})),e.length>0){const i=e[n.random.nextInt(e.length)],o=Ki(i),a=n.random.nextInt(o.maxLevel-o.minLevel+1)+o.minLevel;r&&(t.tag={},t.count=1),fc(t,{id:i,lvl:a}),r&&(t.id="minecraft:enchanted_book")}},enchant_with_levels:({levels:e,treasure:t})=>(n,r)=>{const i=p7(r.random,n,Fn(e,r),t),o=n.id==="minecraft:book";o&&(n.count=1,n.tag={});for(const a of i)fc(n,a);o&&(n.id="minecraft:enchanted_book")},limit_count:({limit:e})=>(t,n)=>{const{min:r,max:i}=ug(e,n);t.count=ct(t.count,r,i)},set_count:({count:e,add:t})=>(n,r)=>{const i=t?n.count:0;n.count=ct(i+Fn(e,r),0,64)},set_damage:({damage:e,add:t})=>(n,r)=>{var o,a;const i=vl.get(n.id);if(i){const s=t?1-((a=(o=n.tag)==null?void 0:o.Damage)!=null?a:0)/i:0,l=1-ct(ji(e,r)+s,0,1),d=Math.floor(l*i);n.tag=be(oe({},n.tag),{Damage:d})}},set_enchantments:({enchantments:e,add:t})=>(n,r)=>{Object.entries(e).forEach(([i,o])=>{const a=Fn(o,r);fc(n,{id:i,lvl:a},t)})},set_lore:({lore:e,replace:t})=>n=>{var o,a,s,l;const r=e.map(d=>JSON.stringify(d)),i=t?r:[...(s=(a=(o=n.tag)==null?void 0:o.display)==null?void 0:a.Lore)!=null?s:[],...r];n.tag=be(oe({},n.tag),{display:be(oe({},(l=n.tag)==null?void 0:l.display),{Lore:i})})},set_name:({name:e})=>t=>{var r;const n=JSON.stringify(e);t.tag=be(oe({},t.tag),{display:be(oe({},(r=t.tag)==null?void 0:r.display),{Name:n})})}};function wl(e){return t=>{for(const n of e)if(!hs(n,t))return!1;return!0}}function hs(e,t){var r,i,o;const n=(r=e.condition)==null?void 0:r.replace(/^minecraft:/,"");return((o=(i=uc[n])==null?void 0:i.call(uc,e))!=null?o:()=>!0)(t)}const uc={alternative:({terms:e})=>t=>{for(const n of e)if(hs(n,t))return!0;return!1},block_state_property:()=>()=>!1,damage_source_properties:({predicate:e})=>t=>h7(),entity_properties:({predicate:e})=>t=>f7(),entity_scores:()=>()=>!1,inverted:({term:e})=>t=>!hs(e,t),killed_by_player:({inverted:e})=>()=>(e!=null?e:!1)===!1,location_check:({predicate:e})=>t=>u7(),match_tool:({predicate:e})=>t=>d7(),random_chance:({chance:e})=>t=>t.random.nextFloat()<e,random_chance_with_looting:({chance:e,looting_multiplier:t})=>n=>{const i=e+0*t;return n.random.nextFloat()<i},reference:({name:e})=>t=>{var r;const n=(r=t.getPredicate(e))!=null?r:[];return Array.isArray(n)?wl(n)(t):hs(n,t)},survives_explosion:()=>()=>!0,table_bonus:({chances:e})=>t=>{const r=e[ct(0,0,e.length-1)];return t.random.nextFloat()<r},time_check:({value:e,period:t})=>n=>{let r=n.dayTime;t!==void 0&&(r=r%t);const{min:i,max:o}=ug(e,n);return i<=r&&r<=o},value_check:()=>()=>!1,weather_check:({raining:e,thundering:t})=>n=>{const r=n.weather==="rain"||n.weather==="thunder",i=n.weather==="thunder";return!(e!==void 0&&e!==r||t!==void 0&&t!==i)}};function Fn(e,t){var r,i,o;if(typeof e=="number")return e;if(!mn(e))return 0;switch((i=(r=e.type)==null?void 0:r.replace(/^minecraft:/,""))!=null?i:"uniform"){case"constant":return Math.round((o=e.value)!=null?o:0);case"uniform":const a=Fn(e.min,t),s=Fn(e.max,t);return s<a?a:t.random.nextInt(s-a+1)+a;case"binomial":const l=Fn(e.n,t),d=ji(e.p,t);let c=0;for(let u=0;u<l;u+=1)t.random.nextFloat()<d&&(c+=1);return c}return 0}function ji(e,t){var r,i,o;if(typeof e=="number")return e;if(!mn(e))return 0;switch((i=(r=e.type)==null?void 0:r.replace(/^minecraft:/,""))!=null?i:"uniform"){case"constant":return(o=e.value)!=null?o:0;case"uniform":const a=ji(e.min,t),s=ji(e.max,t);return s<a?a:t.random.nextFloat()*(s-a)+a;case"binomial":const l=Fn(e.n,t),d=ji(e.p,t);let c=0;for(let u=0;u<l;u+=1)t.random.nextFloat()<d&&(c+=1);return c}return 0}function ug(e,t){typeof e=="number"&&(e={min:e,max:e});const n=Fn(e.min,t),r=Fn(e.max,t);return{min:n,max:r}}function d7(e,t){return!1}function u7(e,t){return!1}function f7(e,t){return!1}function h7(e,t){return!1}function fc(e,t,n){e.tag||(e.tag={});const r=e.id==="minecraft:book"?"StoredEnchantments":"Enchantments";(!e.tag[r]||!Array.isArray(e.tag[r]))&&(e.tag[r]=[]);const i=e.tag[r];let o=i.findIndex(a=>a.id===t.id);if(o!==-1){const a=i[o];a.lvl=Math.max(n?a.lvl+t.lvl:t.lvl,0)}else i.push(t),o=i.length-1;i[o].lvl===0&&i.splice(o,1)}function p7(e,t,n,r){var d;const i=(d=_7.get(t.id))!=null?d:0;if(i<=0)return[];n+=1+e.nextInt(Math.floor(i/4+1))+e.nextInt(Math.floor(i/4+1));const o=(e.nextFloat()+e.nextFloat()-1)*.15;n=ct(Math.round(n+n*o),1,Number.MAX_SAFE_INTEGER);let a=g7(t,n,r);if(a.length===0)return[];const s=[],l=F1(e,a,Wu);for(l&&s.push(l);e.nextInt(50)<=n;){if(s.length>0){const u=s[s.length-1];a=a.filter(f=>m7(f.id,u.id))}if(a.length===0)break;const c=F1(e,a,Wu);c&&s.push(c),n=Math.floor(n/2)}return s}function Wu(e){var t,n,r;return(r=w7.get((n=(t=Ki(e.id))==null?void 0:t.rarity)!=null?n:"common"))!=null?r:0}function g7(e,t,n){const r=[],i=e.id==="minecraft:book";for(const o of qd.keys()){const a=Ki(o);if((!a.treasure||n)&&a.discoverable&&(a.canEnchant(e.id)||i))for(let s=a.maxLevel;s>a.minLevel-1;s-=1)t>=a.minCost(s)&&t<=a.maxCost(s)&&r.push({id:o,lvl:s})}return r}function m7(e,t){return e!==t&&qu(e,t)&&qu(t,e)}function qu(e,t){const n=Ki(e);return n==null?void 0:n.isCompatible(t)}const vl=new Map(Object.entries({"minecraft:carrot_on_a_stick":25,"minecraft:warped_fungus_on_a_stick":100,"minecraft:flint_and_steel":64,"minecraft:elytra":432,"minecraft:bow":384,"minecraft:fishing_rod":64,"minecraft:shears":238,"minecraft:shield":336,"minecraft:trident":250,"minecraft:crossbow":465,"minecraft:leather_helmet":11*5,"minecraft:leather_chestplate":16*5,"minecraft:leather_leggings":15*5,"minecraft:leather_boots":13*5,"minecraft:chainmail_helmet":11*15,"minecraft:chainmail_chestplate":16*15,"minecraft:chainmail_leggings":15*15,"minecraft:chainmail_boots":13*15,"minecraft:iron_helmet":11*15,"minecraft:iron_chestplate":16*15,"minecraft:iron_leggings":15*15,"minecraft:iron_boots":13*15,"minecraft:diamond_helmet":11*33,"minecraft:diamond_chestplate":16*33,"minecraft:diamond_leggings":15*33,"minecraft:diamond_boots":13*33,"minecraft:golden_helmet":11*7,"minecraft:golden_chestplate":16*7,"minecraft:golden_leggings":15*7,"minecraft:golden_boots":13*7,"minecraft:netherite_helmet":11*37,"minecraft:netherite_chestplate":16*37,"minecraft:netherite_leggings":15*37,"minecraft:netherite_boots":13*37,"minecraft:turtle_helmet":11*25,"minecraft:wooden_sword":59,"minecraft:wooden_shovel":59,"minecraft:wooden_pickaxe":59,"minecraft:wooden_axe":59,"minecraft:wooden_hoe":59,"minecraft:stone_sword":131,"minecraft:stone_shovel":131,"minecraft:stone_pickaxe":131,"minecraft:stone_axe":131,"minecraft:stone_hoe":131,"minecraft:iron_sword":250,"minecraft:iron_shovel":250,"minecraft:iron_pickaxe":250,"minecraft:iron_axe":250,"minecraft:iron_hoe":250,"minecraft:diamond_sword":1561,"minecraft:diamond_shovel":1561,"minecraft:diamond_pickaxe":1561,"minecraft:diamond_axe":1561,"minecraft:diamond_hoe":1561,"minecraft:gold_sword":32,"minecraft:gold_shovel":32,"minecraft:gold_pickaxe":32,"minecraft:gold_axe":32,"minecraft:gold_hoe":32,"minecraft:netherite_sword":2031,"minecraft:netherite_shovel":2031,"minecraft:netherite_pickaxe":2031,"minecraft:netherite_axe":2031,"minecraft:netherite_hoe":2031})),_7=new Map(Object.entries({"minecraft:book":1,"minecraft:fishing_rod":1,"minecraft:trident":1,"minecraft:bow":1,"minecraft:crossbow":1,"minecraft:leather_helmet":15,"minecraft:leather_chestplate":15,"minecraft:leather_leggings":15,"minecraft:leather_boots":15,"minecraft:chainmail_helmet":12,"minecraft:chainmail_chestplate":12,"minecraft:chainmail_leggings":12,"minecraft:chainmail_boots":12,"minecraft:iron_helmet":9,"minecraft:iron_chestplate":9,"minecraft:iron_leggings":9,"minecraft:iron_boots":9,"minecraft:diamond_helmet":10,"minecraft:diamond_chestplate":10,"minecraft:diamond_leggings":10,"minecraft:diamond_boots":10,"minecraft:golden_helmet":25,"minecraft:golden_chestplate":25,"minecraft:golden_leggings":25,"minecraft:golden_boots":25,"minecraft:netherite_helmet":15,"minecraft:netherite_chestplate":15,"minecraft:netherite_leggings":15,"minecraft:netherite_boots":15,"minecraft:turtle_helmet":15,"minecraft:wooden_sword":15,"minecraft:wooden_shovel":15,"minecraft:wooden_pickaxe":15,"minecraft:wooden_axe":15,"minecraft:wooden_hoe":15,"minecraft:stone_sword":5,"minecraft:stone_shovel":5,"minecraft:stone_pickaxe":5,"minecraft:stone_axe":5,"minecraft:stone_hoe":5,"minecraft:iron_sword":14,"minecraft:iron_shovel":14,"minecraft:iron_pickaxe":14,"minecraft:iron_axe":14,"minecraft:iron_hoe":14,"minecraft:diamond_sword":10,"minecraft:diamond_shovel":10,"minecraft:diamond_pickaxe":10,"minecraft:diamond_axe":10,"minecraft:diamond_hoe":10,"minecraft:gold_sword":22,"minecraft:gold_shovel":22,"minecraft:gold_pickaxe":22,"minecraft:gold_axe":22,"minecraft:gold_hoe":22,"minecraft:netherite_sword":15,"minecraft:netherite_shovel":15,"minecraft:netherite_pickaxe":15,"minecraft:netherite_axe":15,"minecraft:netherite_hoe":15}));function Ki(e){var r,i,o,a,s,l,d,c,u,f;const t=qd.get(e),n=(r=t==null?void 0:t.category)!=null?r:"armor";return{id:e,rarity:(i=t==null?void 0:t.rarity)!=null?i:"common",category:n,minLevel:(o=t==null?void 0:t.minLevel)!=null?o:1,maxLevel:(a=t==null?void 0:t.maxLevel)!=null?a:1,minCost:(s=t==null?void 0:t.minCost)!=null?s:h=>1+h*10,maxCost:(l=t==null?void 0:t.maxCost)!=null?l:h=>6+h*10,discoverable:(d=t==null?void 0:t.discoverable)!=null?d:!0,treasure:(c=t==null?void 0:t.treasure)!=null?c:!1,curse:(u=t==null?void 0:t.curse)!=null?u:!1,canEnchant:h=>_g.get(n).includes(h),isCompatible:(f=t==null?void 0:t.isCompatible)!=null?f:()=>!0}}const za=["minecraft:protection","minecraft:fire_protection","minecraft:blast_protection","minecraft:projectile_protection"],hc=["minecraft:sharpness","minecraft:smite","minecraft:bane_of_arthropods"],qd=new Map(Object.entries({"minecraft:protection":{rarity:"common",category:"armor",maxLevel:4,minCost:e=>1+(e-1)*11,maxCost:e=>1+(e-1)*11+11,isCompatible:e=>!za.includes(e)},"minecraft:fire_protection":{rarity:"uncommon",category:"armor",maxLevel:4,minCost:e=>10+(e-1)*8,maxCost:e=>10+(e-1)*8+8,isCompatible:e=>!za.includes(e)},"minecraft:feather_falling":{rarity:"uncommon",category:"armor_feet",maxLevel:4,minCost:e=>5+(e-1)*6,maxCost:e=>5+(e-1)*6+6},"minecraft:blast_protection":{rarity:"rare",category:"armor",maxLevel:4,minCost:e=>5+(e-1)*8,maxCost:e=>5+(e-1)*8+8,isCompatible:e=>!za.includes(e)},"minecraft:projectile_protection":{rarity:"uncommon",category:"armor",maxLevel:4,minCost:e=>3+(e-1)*6,maxCost:e=>3+(e-1)*6+6,isCompatible:e=>!za.includes(e)},"minecraft:respiration":{rarity:"rare",category:"armor_head",maxLevel:3,minCost:e=>10*e,maxCost:e=>10*e+30},"minecraft:aqua_affinity":{rarity:"rare",category:"armor_head",minCost:()=>1,maxCost:()=>40},"minecraft:thorns":{rarity:"very_rare",category:"armor_chest",maxLevel:3,minCost:e=>10+20*(e-1),maxCost:e=>10+20*(e-1)+50},"minecraft:depth_strider":{rarity:"rare",category:"armor_feet",maxLevel:3,minCost:e=>10*e,maxCost:e=>10*e+15,isCompatible:e=>e!=="minecraft:frost_walker"},"minecraft:frost_walker":{rarity:"rare",category:"armor_feet",maxLevel:2,treasure:!0,minCost:e=>10*e,maxCost:e=>10*e+15,isCompatible:e=>e!=="minecraft:depth_strider"},"minecraft:binding_curse":{rarity:"very_rare",category:"wearable",treasure:!0,curse:!0,minCost:()=>25,maxCost:()=>50},"minecraft:soul_speed":{rarity:"very_rare",category:"armor_feet",maxLevel:3,discoverable:!1,treasure:!0,minCost:e=>10*e,maxCost:e=>10*e+15},"minecraft:swift_sneak":{rarity:"very_rare",category:"armor_legs",maxLevel:3,discoverable:!1,treasure:!0,minCost:e=>25*e,maxCost:e=>25*e+50},"minecraft:sharpness":{rarity:"common",category:"weapon",maxLevel:5,minCost:e=>1+(e-1)*11,maxCost:e=>1+(e-1)*11+20,isCompatible:e=>!hc.includes(e)},"minecraft:smite":{rarity:"common",category:"weapon",maxLevel:5,minCost:e=>5+(e-1)*8,maxCost:e=>5+(e-1)*8+20,isCompatible:e=>!hc.includes(e)},"minecraft:bane_of_arthropods":{rarity:"common",category:"weapon",maxLevel:5,minCost:e=>5+(e-1)*8,maxCost:e=>5+(e-1)*8+20,isCompatible:e=>!hc.includes(e)},"minecraft:knockback":{rarity:"uncommon",category:"weapon",maxLevel:2,minCost:e=>5+20*(e-1),maxCost:e=>1+e*10+50},"minecraft:fire_aspect":{rarity:"rare",category:"weapon",maxLevel:2,minCost:e=>5+20*(e-1),maxCost:e=>1+e*10+50},"minecraft:looting":{rarity:"rare",category:"weapon",maxLevel:3,minCost:e=>15+(e-1)*9,maxCost:e=>1+e*10+50,isCompatible:e=>e!=="minecraft:silk_touch"},"minecraft:sweeping":{rarity:"rare",category:"weapon",maxLevel:3,minCost:e=>5+(e-1)*9,maxCost:e=>5+(e-1)*9+15},"minecraft:efficiency":{rarity:"common",category:"digger",maxLevel:5,minCost:e=>1+10*(e-1),maxCost:e=>1+e*10+50,canEnchant:e=>e==="minecraft:shears"||_g.get("digger").includes(e)},"minecraft:silk_touch":{rarity:"very_rare",category:"digger",minCost:()=>15,maxCost:e=>1+e*10+50,isCompatible:e=>e!=="minecraft:fortune"},"minecraft:unbreaking":{rarity:"uncommon",category:"breakable",maxLevel:3,minCost:e=>5+(e-1)*8,maxCost:e=>1+e*10+50},"minecraft:fortune":{rarity:"rare",category:"digger",maxLevel:3,minCost:e=>15+(e-1)*9,maxCost:e=>1+e*10+50,isCompatible:e=>e!=="minecraft:silk_touch"},"minecraft:power":{rarity:"common",category:"bow",maxLevel:5,minCost:e=>1+(e-1)*10,maxCost:e=>1+(e-1)*10+15},"minecraft:punch":{rarity:"rare",category:"bow",maxLevel:2,minCost:e=>12+(e-1)*20,maxCost:e=>12+(e-1)*20+25},"minecraft:flame":{rarity:"rare",category:"bow",minCost:()=>20,maxCost:()=>50},"minecraft:infinity":{rarity:"very_rare",category:"bow",minCost:()=>20,maxCost:()=>50,isCompatible:e=>e!=="minecraft:mending"},"minecraft:luck_of_the_sea":{rarity:"rare",category:"fishing_rod",maxLevel:3,minCost:e=>15+(e-1)*9,maxCost:e=>1+e*10+50,isCompatible:e=>e!=="minecraft:silk_touch"},"minecraft:lure":{rarity:"rare",category:"fishing_rod",maxLevel:3,minCost:e=>15+(e-1)*9,maxCost:e=>1+e*10+50},"minecraft:loyalty":{rarity:"uncommon",category:"trident",maxLevel:3,minCost:e=>5+e*7,maxCost:()=>50},"minecraft:impaling":{rarity:"rare",category:"trident",maxLevel:5,minCost:e=>1+(e-1)*8,maxCost:e=>1+(e-1)*8+20},"minecraft:riptide":{rarity:"rare",category:"trident",maxLevel:3,minCost:e=>5+e*7,maxCost:()=>50,isCompatible:e=>!["minecraft:riptide","minecraft:channeling"].includes(e)},"minecraft:channeling":{rarity:"very_rare",category:"trident",minCost:()=>25,maxCost:()=>50},"minecraft:multishot":{rarity:"rare",category:"crossbow",minCost:()=>20,maxCost:()=>50,isCompatible:e=>e!=="minecraft:piercing"},"minecraft:quick_charge":{rarity:"uncommon",category:"crossbow",maxLevel:3,minCost:e=>12+(e-1)*20,maxCost:()=>50},"minecraft:piercing":{rarity:"common",category:"crossbow",maxLevel:4,minCost:e=>1+(e-1)*10,maxCost:()=>50,isCompatible:e=>e!=="minecraft:multishot"},"minecraft:mending":{rarity:"rare",category:"breakable",treasure:!0,minCost:e=>e*25,maxCost:e=>e*25+50},"minecraft:vanishing_curse":{rarity:"very_rare",category:"vanishable",treasure:!0,curse:!0,minCost:()=>25,maxCost:()=>50}})),w7=new Map(Object.entries({common:10,uncommon:5,rare:2,very_rare:1})),fg=["minecraft:leather_boots","minecraft:chainmail_boots","minecraft:iron_boots","minecraft:diamond_boots","minecraft:golden_boots","minecraft:netherite_boots"],hg=["minecraft:leather_leggings","minecraft:chainmail_leggings","minecraft:iron_leggings","minecraft:diamond_leggings","minecraft:golden_leggings","minecraft:netherite_leggings"],pg=["minecraft:leather_chestplate","minecraft:chainmail_chestplate","minecraft:iron_chestplate","minecraft:diamond_chestplate","minecraft:golden_chestplate","minecraft:netherite_chestplate"],gg=["minecraft:leather_helmet","minecraft:chainmail_helmet","minecraft:iron_helmet","minecraft:diamond_helmet","minecraft:golden_helmet","minecraft:netherite_helmet","minecraft:turtle_helmet"],mg=[...fg,...hg,...pg,...gg],v7=["minecraft:wooden_sword","minecraft:stone_sword","minecraft:iron_sword","minecraft:diamond_sword","minecraft:gold_sword","minecraft:netherite_sword"],b7=["minecraft:wooden_shovel","minecraft:wooden_pickaxe","minecraft:wooden_axe","minecraft:wooden_hoe","minecraft:stone_shovel","minecraft:stone_pickaxe","minecraft:stone_axe","minecraft:stone_hoe","minecraft:iron_shovel","minecraft:iron_pickaxe","minecraft:iron_axe","minecraft:iron_hoe","minecraft:diamond_shovel","minecraft:diamond_pickaxe","minecraft:diamond_axe","minecraft:diamond_hoe","minecraft:gold_shovel","minecraft:gold_pickaxe","minecraft:gold_axe","minecraft:gold_hoe","minecraft:netherite_shovel","minecraft:netherite_pickaxe","minecraft:netherite_axe","minecraft:netherite_hoe"],Xu=[...vl.keys()],x7=[...mg,"minecraft:elytra","minecraft:carved_pumpkin","minecraft:creeper_head","minecraft:dragon_head","minecraft:player_head","minecraft:zombie_head"],_g=new Map(Object.entries({armor:mg,armor_feet:fg,armor_legs:hg,armor_chest:pg,armor_head:gg,weapon:v7,digger:b7,fishing_rod:["minecraft:fishing_rod"],trident:["minecraft:trident"],breakable:Xu,bow:["minecraft:bow"],wearable:x7,crossbow:["minecraft:crossbow"],vanishable:[...Xu,"minecraft:compass"]})),_i={};async function y7(e){return _i[e]||(_i[e]=(async()=>{try{const{models:t,uvMapping:n,atlas:r}=await wv(e);return _i[e]=new C7(t,n,r),_i[e]}catch(t){throw console.error("Error: ",t),new Error(`Cannot get resources for version ${e}: ${At(t)}`)}})()),_i[e]}const Ku=128,Ju=new Map;async function k7(e,t){const n=`${e} ${t}`,r=Ju.get(n);if(r!==void 0)return r;const i=(async()=>{const o=document.createElement("canvas");o.width=Ku,o.height=Ku;const a=await y7(e),s=o.getContext("webgl2",{preserveDrawingBuffer:!0});if(!s)throw new Error("Cannot get WebGL2 context");return new L4(s,ve.parse(t),a).drawItem(),o.toDataURL()})();return Ju.set(n,i),i}class C7{constructor(t,n,r){this.blockModels={},this.textureAtlas=zi.empty(),this.loadBlockModels(t),this.loadBlockAtlas(r,n)}getBlockModel(t){return this.blockModels[t.toString()]}getTextureUV(t){return this.textureAtlas.getTextureUV(t)}getTextureAtlas(){return this.textureAtlas.getTextureAtlas()}loadBlockModels(t){[...t.entries()].forEach(([n,r])=>{this.blockModels[ve.create(n).toString()]=us.fromJson(n,r)}),Object.values(this.blockModels).forEach(n=>n.flatten(this))}loadBlockAtlas(t,n){const r=document.createElement("canvas"),i=Fs(t.width),o=Fs(t.height);r.width=i,r.height=o;const a=r.getContext("2d");a.drawImage(t,0,0);const s=a.getImageData(0,0,i,o),l={};Object.keys(n).forEach(d=>{const[c,u,f,h]=n[d],w=f!==h&&d.startsWith("block/")?f:h;l[ve.create(d).toString()]=[c/i,u/o,(c+f)/i,(u+w)/o]}),this.textureAtlas=new zi(s,l)}}const wi={};async function E7(e){return wi[e]||(wi[e]=(async()=>{try{return wi[e]=await bv(e),wi[e]}catch(t){throw console.error("Error: ",t),new Error(`Cannot get language for version ${e}: ${At(t)}`)}})()),wi[e]}async function rd(e,t,n){const i=(await E7(e))[t];return i?A7(i,n):null}function A7(e,t){var o;let n="",r=0,i=0;for(;r<e.length;){const a=e[r++];if(a==="%"){if(r>=e.length){n+=a;break}let s=e[r++];if(s==="%")n+="%";else if(s==="s"||s==="d")n+=(o=t==null?void 0:t[i++])!=null?o:"";else if(s>="0"&&s<="9"){if(r>=e.length){n+=a+s;break}let l="";do l+=s,s=e[r++];while(r<e.length&&s>="0"&&s<="9");if(s==="$"){if(r>=e.length){n+=a+l+s;break}const d=e[r++];if(d==="s"||d==="d"){const c=parseInt(l)-1;!t||isNaN(c)||c<0||c>=t.length?n+="":n+=t[c]}else n+=a+l+s}else n+=a+l}else n+=a}else n+=a}return n}function Vn({component:e,base:t={color:"white"},shadow:n=!0}){const r=JSON.stringify(e),i=Ee(()=>{const o=[];return ps(e,a=>o.push(a)),o},[r]);return N("div",{class:"text-component",children:[n&&p("div",{style:Hs(t,!0),children:i.map(o=>p(ef,{part:o,shadow:!0}))}),p("div",{class:"text-foreground",style:Hs(t,!1),children:i.map(o=>p(ef,{part:o}))})]})}function ps(e,t){if(typeof e=="string"||typeof e=="number")t({text:e.toString()});else if(Array.isArray(e)){const n=e[0];ps(n,t);for(const r of e.slice(1))ps(r,i=>t(Qu(i,n)))}else if(typeof e=="object"&&e!==null&&("text"in e||"translate"in e?t(e):"score"in e?t(be(oe({},e),{text:"123"})):"selector"in e?t(be(oe({},e),{text:"Steve"})):"keybind"in e?t(be(oe({},e),{text:e.keybind})):"nbt"in e&&t(be(oe({},e),{text:e.nbt})),"extra"in e))for(const n of e.extra)ps(n,r=>t(Qu(r,e)))}function Qu(e,t){return oe({color:t.color,bold:t.bold,italic:t.italic,underlined:t.underlined,strikethrough:t.strikethrough},e)}const wg={black:["#000","#000"],dark_blue:["#00A","#00002A"],dark_green:["#0A0","#002A00"],dark_aqua:["#0AA","#002A2A"],dark_red:["#A00","#2A0000"],dark_purple:["#A0A","#2A002A"],gold:["#FA0","#2A2A00"],gray:["#AAA","#2A2A2A"],dark_gray:["#555","#151515"],blue:["#55F","#15153F"],green:["#5F5","#153F15"],aqua:["#5FF","#153F3F"],red:["#F55","#3F1515"],light_purple:["#F5F","#3F153F"],yellow:["#FF5","#3F3F15"],white:["#FFF","#3F3F3F"]},S7=Object.keys(wg);function ef({part:e,shadow:t}){var n;if(e.translate){const{version:r}=qt(),{value:i}=Wt(()=>rd(r,e.translate,e.with),[r,e.translate,...(n=e.with)!=null?n:[]]);return p("span",{style:Hs(e,t),children:i!=null?i:e.translate})}return p("span",{style:Hs(e,t),children:e.text})}function Hs(e,t){return{color:e.color&&(S7.includes(e.color)?wg[e.color][t?1:0]:t?"transparent":e.color),fontWeight:e.bold===!0?"bold":void 0,fontStyle:e.italic===!0?"italic":void 0,textDecoration:e.underlined===!0?e.strikethrough===!0?"underline line-through":"underline":e.strikethrough===!0?"line-through":void 0}}function I7({id:e,tag:t,advanced:n,offset:r=[0,0],swap:i}){var u,f,h,w,_,g;const{version:o}=qt(),{value:a}=Wt(()=>{var v;const m=e.split(":").join(".");return(v=rd(o,`item.${m}`))!=null?v:rd(o,`block.${m}`)},[o,e]),s=(u=t==null?void 0:t.display)==null?void 0:u.Name,l=s?JSON.parse(s):a!=null?a:M7(e),d=vl.get(e),c=(f=e==="minecraft:enchanted_book"?t==null?void 0:t.StoredEnchantments:t==null?void 0:t.Enchantments)!=null?f:[];return N("div",{class:"item-tooltip",style:r&&{left:i?void 0:`${r[0]}px`,right:i?`${r[0]}px`:void 0,top:`${r[1]}px`},children:[p(Vn,{component:l,base:{color:"white"}}),c.map(({id:m,lvl:v})=>{const x=Ki(m),b=[{translate:`enchantment.${m.replace(":",".")}`,color:x!=null&&x.curse?"red":"gray"}];return(v!==1||(x==null?void 0:x.maxLevel)!==1)&&b.push(" ",{translate:`enchantment.level.${v}`}),p(Vn,{component:b})}),(t==null?void 0:t.display)&&N(le,{children:[((h=t==null?void 0:t.display)==null?void 0:h.color)&&(n?p(Vn,{component:{translate:"item.color",with:[`#${t.display.color.toString(16).padStart(6,"0")}`],color:"gray"}}):p(Vn,{component:{translate:"item.dyed",color:"gray"}})),((_=(w=t==null?void 0:t.display)==null?void 0:w.Lore)!=null?_:[]).map(m=>p(Vn,{component:JSON.parse(m),base:{color:"dark_purple",italic:!0}}))]}),(t==null?void 0:t.Unbreakable)===!0&&p(Vn,{component:{translate:"item.unbreakable",color:"blue"}}),n&&((g=t==null?void 0:t.Damage)!=null?g:0)>0&&d&&p(Vn,{component:{translate:"item.durability",with:[`${d-t.Damage}`,`${d}`]}}),n&&N(le,{children:[p(Vn,{component:{text:e,color:"dark_gray"}}),t&&p(Vn,{component:{translate:"item.nbt_tags",with:[Object.keys(t).length],color:"dark_gray"}})]})]})}function M7(e){const t=e.indexOf(":");return e.slice(t+1).replace(/[_\/]/g," ").split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}const ue={alert:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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_left:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M9.78 12.78a.75.75 0 01-1.06 0L4.47 8.53a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L6.06 8l3.72 3.72a.75.75 0 010 1.06z"})}),chevron_right:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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"})}),codescan_checkmark:N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[p("path",{d:"M10.28 6.28a.75.75 0 10-1.06-1.06L6.25 8.19l-.97-.97a.75.75 0 00-1.06 1.06l1.5 1.5a.75.75 0 001.06 0l3.5-3.5z"}),p("path",{"fill-rule":"evenodd",d:"M7.5 15a7.469 7.469 0 004.746-1.693l2.474 2.473a.75.75 0 101.06-1.06l-2.473-2.474A7.5 7.5 0 107.5 15zm0-13.5a6 6 0 104.094 10.386.75.75 0 01.293-.292A6 6 0 007.5 1.5z"})]}),dash:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})}),download:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[p("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"}),p("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"}),p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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"})}),file_zip:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"})}),gear:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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"})}),git_commit:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"})}),globe:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"})}),heart:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"})}),history:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z"})}),package:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z"})}),pencil:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z"})}),play:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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"})}),rocket:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M14.064 0a8.75 8.75 0 00-6.187 2.563l-.459.458c-.314.314-.616.641-.904.979H3.31a1.75 1.75 0 00-1.49.833L.11 7.607a.75.75 0 00.418 1.11l3.102.954c.037.051.079.1.124.145l2.429 2.428c.046.046.094.088.145.125l.954 3.102a.75.75 0 001.11.418l2.774-1.707a1.75 1.75 0 00.833-1.49V9.485c.338-.288.665-.59.979-.904l.458-.459A8.75 8.75 0 0016 1.936V1.75A1.75 1.75 0 0014.25 0h-.186zM10.5 10.625c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 00.119-.213v-2.066zM3.678 8.116L5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 00-.213.119l-1.2 1.95 1.782.547zm5.26-4.493A7.25 7.25 0 0114.063 1.5h.186a.25.25 0 01.25.25v.186a7.25 7.25 0 01-2.123 5.127l-.459.458a15.21 15.21 0 01-2.499 2.02l-2.317 1.5-2.143-2.143 1.5-2.317a15.25 15.25 0 012.02-2.5l.458-.458h.002zM12 5a1 1 0 11-2 0 1 1 0 012 0zm-8.44 9.56a1.5 1.5 0 10-2.12-2.12c-.734.73-1.047 2.332-1.15 3.003a.23.23 0 00.265.265c.671-.103 2.273-.416 3.005-1.148z"})}),rows:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("path",{"fill-rule":"evenodd",d:"M16 2.75A1.75 1.75 0 0014.25 1H1.75A1.75 1.75 0 000 2.75v2.5A1.75 1.75 0 001.75 7h12.5A1.75 1.75 0 0016 5.25v-2.5zm-1.75-.25a.25.25 0 01.25.25v2.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-2.5a.25.25 0 01.25-.25h12.5zM16 10.75A1.75 1.75 0 0014.25 9H1.75A1.75 1.75 0 000 10.75v2.5A1.75 1.75 0 001.75 15h12.5A1.75 1.75 0 0016 13.25v-2.5zm-1.75-.25a.25.25 0 01.25.25v2.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-2.5a.25.25 0 01.25-.25h12.5z"})}),search:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[p("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"}),p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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:p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:p("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 vg({item:e,slotDecoration:t,advancedTooltip:n}){var d,c;const r=Me(null),[i,o]=Y([0,0]),[a,s]=Y(!1);me(()=>{var f;const u=h=>{requestAnimationFrame(()=>{const{right:w,width:_}=r.current.getBoundingClientRect(),g=w+200>document.body.clientWidth;s(g),o([(g?_-h.offsetX:h.offsetX)+20,h.offsetY-40])})};return(f=r.current)==null||f.addEventListener("mousemove",u),()=>{var h;return(h=r.current)==null?void 0:h.removeEventListener("mousemove",u)}},[]);const l=vl.get(e.id);return N("div",{class:"item-display",ref:r,children:[p(T7,{item:e}),e.count!==1&&p(le,{children:N("svg",{class:"item-count",width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"xMinYMid meet",children:[p("text",{x:"95",y:"93","font-size":"50",textAnchor:"end",fontFamily:"MinecraftSeven",fill:"#373737",children:e.count}),p("text",{x:"90",y:"88","font-size":"50",textAnchor:"end",fontFamily:"MinecraftSeven",fill:"#ffffff",children:e.count})]})}),t&&N(le,{children:[l&&((c=(d=e.tag)==null?void 0:d.Damage)!=null?c:0)>0&&N("svg",{class:"item-durability",width:"100%",height:"100%",viewBox:"0 0 18 18",children:[p("rect",{x:"3",y:"14",width:"13",height:"2",fill:"#000"}),p("rect",{x:"3",y:"14",width:`${(l-e.tag.Damage)/l*13}`,height:"1",fill:`hsl(${(l-e.tag.Damage)/l*120}deg, 100%, 50%)`})]}),p("div",{class:"item-slot-overlay"})]}),p(I7,be(oe({},e),{advanced:n,offset:i,swap:a}))]})}function T7({item:e}){var l,d,c,u,f,h;const{version:t}=qt(),[n,r]=Y(!1),i=((c=(d=(l=e.tag)==null?void 0:l.Enchantments)==null?void 0:d.length)!=null?c:0)>0||((h=(f=(u=e.tag)==null?void 0:u.StoredEnchantments)==null?void 0:f.length)!=null?h:0)>0;if(n||e.id.includes(":")&&!e.id.startsWith("minecraft:"))return ue.package;const{value:o}=Wt(()=>Jp(t),[]);if(o===void 0)return null;const a=`item/${e.id.replace(/^minecraft:/,"")}`;if(o.get("texture").includes("minecraft:"+a)){const w=_v(t,"textures",a);return N(le,{children:[p("img",{src:w,alt:"",onError:()=>r(!0),draggable:!1}),i&&p("div",{class:"item-glint",style:{"--mask-image":`url("${w}")`}})]})}const s=`item/${e.id.replace(/^minecraft:/,"")}`;return o.get("model").includes("minecraft:"+s)?p(L7,{item:e,isEnchanted:i}):ue.package}function L7({item:e,isEnchanted:t}){const{version:n}=qt(),{value:r}=Wt(()=>k7(n,e.id),[n,e]);return r?N(le,{children:[p("img",{src:r,alt:e.id,class:"model",draggable:!1}),t&&p("div",{class:"item-glint",style:{"--mask-image":`url("${r}")`}})]}):p("div",{class:"item-display",children:ue.package})}const O7=({data:e})=>{const{locale:t}=Ae(),{version:n}=qt(),[r,i]=Y(rn()),[o,a]=Y(0),[s,l]=Y(0),[d,c]=Y("clear"),[u,f]=Y(!0),[h,w]=Y(!0),_=Me(null),[g,m]=Y([]),v=P.DataModel.unwrapLists(e),x=JSON.stringify(v);return me(()=>{const b=n7(v,{version:n,seed:r,luck:o,daytime:s,weather:d,stackMixer:u?"container":"default"});console.log("Generated loot",b),m(b)},[n,r,o,s,d,u,x]),N(le,{children:[N("div",{ref:_,class:"preview-overlay",children:[p("img",{src:"/images/container.png",alt:"Container background",class:"pixelated",draggable:!1}),g.map(({slot:b,item:y})=>p("div",{style:N7(b),children:p(vg,{item:y,slotDecoration:!0,advancedTooltip:h})},b))]}),N("div",{class:"controls preview-controls",children:[N(Ot,{icon:"gear",tooltip:t("settings"),children:[N("div",{class:"btn btn-input",onClick:b=>b.stopPropagation(),children:[p("span",{children:t("preview.luck")}),p(Ts,{value:o,onChange:a})]}),N("div",{class:"btn btn-input",onClick:b=>b.stopPropagation(),children:[p("span",{children:t("preview.daytime")}),p(Ts,{value:s,onChange:l})]}),N("div",{class:"btn btn-input",onClick:b=>b.stopPropagation(),children:[p("span",{children:t("preview.weather")}),p("select",{value:d,onChange:b=>c(b.target.value),children:["clear","rain","thunder"].map(b=>p("option",{value:b,children:t(`preview.weather.${b}`)}))})]}),p(ae,{icon:u?"square_fill":"square",label:"Fill container randomly",onClick:b=>{f(!u),b.stopPropagation()}}),p(ae,{icon:h?"square_fill":"square",label:"Advanced tooltips",onClick:b=>{w(!h),b.stopPropagation()}})]}),p(ae,{icon:"sync",tooltip:t("generate_new_seed"),onClick:()=>i(rn())})]})]})},tf=176,nf=81,ja=18;function N7(e){e=ct(e,0,26);const t=e%9*ja+7,n=Math.floor(e/9)*ja+20;return{left:`${t*100/tf}%`,top:`${n*100/nf}%`,width:`${ja*100/tf}%`,height:`${ja*100/nf}%`}}const R7=["loot_table","dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function D7({model:e,version:t,id:n,shown:r}){var o;const[,i]=Y(0);if(sl(e,()=>{i(a=>a+1)}),!e)return p(le,{});if(n==="loot_table"){const a=e.get(new P.Path([]));if(a)return p(O7,{model:e,version:t,shown:r,data:a})}if(n==="dimension"&&((o=e.get(new P.Path(["generator","type"])))==null?void 0:o.endsWith("noise"))){const a=e.get(new P.Path(["generator","biome_source"]));if(a)return p(X4,{model:e,version:t,shown:r,data:a})}if(n==="worldgen/density_function"){const a=e.get(new P.Path([]));if(a)return p(J4,{model:e,version:t,shown:r,data:a})}if(n==="worldgen/noise"){const a=e.get(new P.Path([]));if(a)return p(Q4,{model:e,version:t,shown:r,data:a})}if(n==="worldgen/noise_settings"){const a=e.get(new P.Path([]));if(a)return p(e7,{model:e,version:t,shown:r,data:a})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&_t(t,"1.16","1.17")){const a=e.get(new P.Path([]));if(a)return p(K4,{model:e,version:t,shown:r,data:a})}return p(le,{})}function F7({onClose:e}){const{locale:t}=Ae(),{projects:n,createProject:r,changeProject:i,updateProject:o}=$n(),[a,s]=Y(""),[l,d]=Y(""),[c,u]=Y(Cv),[f,h]=Y(void 0),[w,_]=Y(!1),g=k=>{k.type.match(/^application\/(x-)?zip(-compressed)?$/)&&(a.length===0&&s(k.name.replace(/\.zip$/,"").replaceAll(/[ _-]+/g," ")),h(k))},m=Me(o);me(()=>{m.current=o},[o]);const v=()=>{_(!0),r(a,l||void 0,c),i(a),f?tv(f).then(async k=>{const C={files:[]};await Promise.all(k.map(async E=>{const M=a2(E[0]);if(M)try{const S=await n2(E[1],"json");C.files.push(be(oe({},M),{data:S}))}catch(S){console.error(`Failed parsing ${M.type} ${M.id}: ${At(S)}`)}})),m.current(C),e()}).catch(()=>{e()}):e()},x=Ee(()=>n.map(k=>k.name.trim().toLowerCase()).includes(a.trim().toLowerCase()),[n,a]),b=Ee(()=>!(l.length===0||l.match(/^(?:[a-z0-9._-]+:)?[a-z0-9/._-]+$/)),[l]),y=Pe.versions.map(k=>k.id).reverse();return N(ll,{class:"project-creation",onDismiss:e,children:[p("p",{children:t("project.create")}),N("div",{class:"input-group",children:[p(wn,{autofocus:!0,class:`btn btn-input${!w&&(x||a.length===0)?" invalid":""}`,placeholder:t("project.name"),value:a,onChange:s}),!w&&x&&p("div",{class:"status-icon danger tooltipped tip-e","aria-label":t("project.name.already_exists"),children:ue.issue_opened})]}),N("div",{class:"input-group",children:[p(wn,{class:`btn btn-input${!w&&b?" invalid":""}`,placeholder:t("project.namespace"),value:l,onChange:d}),!w&&b&&p("div",{class:"status-icon danger tooltipped tip-e","aria-label":t("project.namespace.invalid"),children:ue.issue_opened})]}),p(Ot,{icon:"tag",label:c,tooltip:t("switch_version"),"data-cy":"version-switcher",children:y.map(k=>p(ae,{label:k,active:k===c,onClick:()=>u(k)}))}),p(Yv,{value:f,onChange:g,label:t("choose_zip_file"),accept:".zip"}),p(ae,{icon:"rocket",label:"Create!",disabled:w||x||a.length===0||b,onClick:v})]})}function P7({onClose:e}){const{locale:t}=Ae(),{projects:n,project:r,deleteProject:i}=$n(),o=()=>{Ne.deleteProject(n.length,r.files.length,"menu"),i(r.name),e()};return N(ll,{class:"file-modal",onDismiss:e,children:[p("p",{children:t("project.delete_confirm.1",r.name)}),p("p",{children:p("b",{children:t("project.delete_confirm.2")})}),N("div",{class:"button-group",children:[p(ae,{icon:"trashcan",label:t("project.delete"),onClick:o,class:"danger"}),p(ae,{label:t("project.cancel"),onClick:e})]})]})}const Nr="/";function bg({entries:e,onSelect:t,selected:n,actions:r,errors:i,indent:o}){const a=Ee(()=>{var f;const u={};for(const h of e){const w=h.indexOf(Nr);if(w>=0){const _=h.slice(0,w);((f=u[_])!=null?f:u[_]=[]).push(h.slice(w+1))}}return Object.entries(u).map(([h,w])=>{const _=r==null?void 0:r.map(m=>be(oe({},m),{onAction:v=>m.onAction(h+Nr+v)})),g=i==null?void 0:i.flatMap(m=>m.path.startsWith(h+Nr)?[be(oe({},m),{path:m.path.slice(h.length+Nr.length)})]:[]);return[h,w,_,g]}).sort()},[e,r,i]),s=Ee(()=>e.filter(u=>!u.includes(Nr)),[e]),[l,d]=Y(new Set),c=u=>{l.has(u)?l.delete(u):l.add(u),d(new Set(l))};return N("div",{class:"tree-view",style:`--indent: ${o!=null?o:0};`,children:[a.map(([u,f,h,w])=>{var _;return N("div",{children:[p(rf,{icon:l.has(u)?"chevron_right":"chevron_down",label:u,onClick:()=>c(u),error:((_=w==null?void 0:w.length)!=null?_:0)>0},u),!l.has(u)&&p(bg,{entries:f,onSelect:g=>t(`${u}${Nr}${g}`),selected:n!=null&&n.startsWith(u+Nr)?n.substring(u.length+1):void 0,actions:h,errors:w,indent:(o!=null?o:0)+1})]})}),s.map(u=>{var f;return p(rf,{icon:"file",label:u,active:u===n,onClick:()=>t(u),actions:r==null?void 0:r.map(h=>be(oe({},h),{onAction:()=>h.onAction(u)})),error:(f=i==null?void 0:i.find(h=>h.path===u))==null?void 0:f.message},u)})]})}function rf({icon:e,label:t,active:n,onClick:r,actions:i,error:o}){const[a,s]=al();return N("div",{class:`entry${o?" has-error":""}${n?" active":""}${a?" focused":""}`,onClick:r,onContextMenu:d=>{d.preventDefault(),i!=null&&i.length&&s()},children:[ue[e],p("span",{children:t.replaceAll("\u2215","/")}),typeof o=="string"&&p("div",{class:"status-icon danger tooltipped tip-se","aria-label":o,children:ue.issue_opened}),a&&p("div",{class:"entry-menu",children:i==null?void 0:i.map(d=>N("div",{class:"action",onClick:c=>{d.onAction(""),c.stopPropagation(),s(!1)},children:[ue[d.icon],d.label]}))})]})}function $7({onRename:e,onCreate:t,onDeleteProject:n}){const{locale:r}=Ae(),{version:i}=qt(),{projects:o,project:a,changeProject:s,file:l,openFile:d,updateFile:c}=$n(),[u,f]=Y(He.getTreeViewMode()),h=Ve(y=>{He.setTreeViewMode(y),Ne.setTreeViewMode(y),f(y)},[]),w=Ve(y=>{if(u==="resources"&&y!=="pack.mcmeta"){const[k,C]=y.split("/");return{type:k.replaceAll("\u2215","/"),id:C.replaceAll("\u2215","/")}}return a2(y)},[u]),_=Ee(()=>a.files.flatMap(y=>{const k=Zl(y);return k?y.type==="pack_mcmeta"?"pack.mcmeta":u==="resources"?[`${y.type.replaceAll("/","\u2215")}/${y.id.replaceAll("/","\u2215")}`]:[k]:[]}),[u,...a.files]),g=Ee(()=>l&&Zl(l),[l]),m=Ve(y=>{const k=w(y);k&&d(k.type,k.id)},[w]),v=Me(null),x=async()=>{if(!v.current)return;let y=!1;const k=a.files.flatMap(E=>{const M=Zl(E);return M===void 0?[]:(M==="pack.mcmeta"&&(y=!0),[[M,Hc(E.data)]])});if(!y){const E=Pe.versions.find(M=>M.id===i).pack_format;k.push(["pack.mcmeta",Hc({pack:{pack_format:E,description:""}})])}const C=await nv(k);v.current.setAttribute("href",C),v.current.setAttribute("download",`${a.name.replaceAll(" ","_")}.zip`),v.current.click()},b=Ee(()=>[{icon:"pencil",label:r("project.rename_file"),onAction:y=>{const k=w(y);k&&e(k)}},{icon:"trashcan",label:r("project.delete_file"),onAction:y=>{const k=w(y);k&&(Ne.deleteProjectFile(k.type,o.length,a.files.length,"menu"),c(k.type,k.id,{}))}}],[w,c,e]);return N(le,{children:[N("div",{class:"project-controls",children:[p(Ot,{icon:"chevron_down",label:a.name,tooltip:r("switch_project"),tooltipLoc:"se",children:o.map(y=>p(ae,{label:y.name,active:y.name===a.name,onClick:()=>s(y.name)}))}),N(Ot,{icon:"kebab_horizontal",children:[p(ae,{icon:"file_zip",label:r("project.download"),onClick:x}),p(ae,{icon:"plus_circle",label:r("project.new"),onClick:t}),p(ae,{icon:u==="resources"?"three_bars":"rows",label:r(u==="resources"?"project.show_file_paths":"project.show_resources"),onClick:()=>h(u==="resources"?"files":"resources")}),a.name!==Er.name&&p(ae,{icon:"trashcan",label:r("project.delete"),onClick:n})]})]}),p("div",{class:"file-view",children:_.length===0?p("span",{children:r("project.no_files")}):p(bg,{entries:_,selected:g,onSelect:m,actions:b})}),p("a",{ref:v,style:"display: none;"})]})}function id(e,t){return e.schema.hook(B7,new P.ModelPath(e),e.data,{blockStates:t})}const B7={base({},e,t){return t},choice({switchNode:e},t,n,r){return e.hook(this,t,n,r)},list({children:e},t,n,r){if(!Array.isArray(n))return n;const i=n.map((o,a)=>e.hook(this,t.push(a),o.node,r));for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i},map({children:e,config:t},n,r,i){var s,l;if(r===void 0)return;const o=((s=t.validation)==null?void 0:s.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[P.relativePath(n,t.validation.params.id).get()]:null,a={};Object.keys(r).forEach(d=>{var c;o&&!Object.keys((c=o.properties)!=null?c:{}).includes(d)||(a[d]=e.hook(this,n.push(d),r[d],i))});for(const d of Object.getOwnPropertySymbols(r))a[d]=r[d];return a},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},o=e(t);Object.keys(o).filter(a=>o[a].enabled(t)).forEach(a=>{const s=o[a].hook(this,t.push(a),n[a],r);s!=null&&(i[a]=s)});for(const a of Object.getOwnPropertySymbols(n))i[a]=n[a];return i}};function z7({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:o,copySuccess:a,onError:s}){const{locale:l}=Ae(),[d,c]=Y(He.getIndent()),[u,f]=Y(He.getFormat()),[h,w]=Y(He.getHighlighting()),[_,g]=Y(!1),m=Me(null),v=Me(()=>{}),x=Me(async()=>{}),b=Me(null),y=Me(),k=Ve((S,T)=>{const z=id(S,T);return Hc(z,u,d)},[d,u]);me(()=>{v.current=()=>{if(!!y.current&&!(!t||!n))try{const S=k(t,n);y.current.setValue(S)}catch(S){S instanceof Error?(S.message=`Error getting JSON output: ${S.message}`,s(S)):s(`Error getting JSON output: ${At(S)}`),console.error(S),y.current.setValue("")}},x.current=async()=>{if(!y.current)return;const S=y.current.getValue();if(S.length!==0)try{const T=await n2(S,u);t==null||t.reset(P.DataModel.wrapLists(T),!1)}catch(T){T instanceof Error?(T.message=`Error importing: ${T.message}`,s(T)):s(`Error importing: ${At(T)}`),console.error(T)}}},[t,n,d,u,h]),me(()=>{h?(g(!1),y.current={getValue(){return""},setValue(){},configure(){},select(){}},Ce(()=>import("./index.8ac52a74.js").then(function(S){return S.i}),[]).then(async S=>{await Promise.all([Ce(()=>import("./json.c327d69b.js").then(function(z){return z.j}),[]),Ce(()=>import("./yaml.e8f3b9ab.js"),[])]);const T=S.edit("editor");T.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),T.$blockScrolling=1/0,T.on("blur",()=>x.current()),T.getSession().setMode("ace/mode/json"),y.current={getValue(){return T.getSession().getValue()},setValue(z){T.getSession().setValue(z)},configure(z,F){T.setOption("useSoftTabs",z!=="tabs"),T.setOption("tabSize",z==="tabs"?4:Lv(z)),T.getSession().setMode(`ace/mode/${F}`)},select(){T.selectAll()}},g(!0)})):y.current={getValue(){return b.current?b.current.value:""},setValue(S){!b.current||(b.current.value=S)},configure(){},select(){}}},[h]),sl(t,()=>{!v.current||v.current()}),me(()=>{!v.current||t&&v.current()},[t]),me(()=>{!y.current||!v.current||(!h||_)&&(y.current.configure(d,u),v.current())},[d,u,h,_]),me(()=>{r&&t&&n&&navigator.clipboard.writeText(k(t,n)).then(()=>{a()})},[r]),me(()=>{if(i&&t&&n&&m.current){const S=encodeURIComponent(k(t,n));m.current.setAttribute("href",`data:text/json;charset=utf-8,${S}`);const T=e==="pack_mcmeta"?"pack.mcmeta":`${e}.${u}`;m.current.setAttribute("download",T),m.current.click()}},[i]),me(()=>{o&&y.current&&(y.current.setValue(""),y.current.select())},[o]);const C=S=>{He.setIndent(S),c(S)},E=S=>{He.setFormat(S),f(S)},M=S=>{He.setHighlighting(S),w(S)};return N(le,{children:[p("div",{class:"controls source-controls",children:N(Ot,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls",children:[Ov().map(S=>p(ae,{label:l(`indentation.${S}`),active:d===S,onClick:()=>C(S)})),p("hr",{}),Nv().map(S=>p(ae,{label:l(`format.${S}`),active:u===S,onClick:()=>E(S)})),p("hr",{}),p(ae,{icon:h?"square_fill":"square",label:l("highlighting"),onClick:()=>M(!h)})]})}),h?p("pre",{id:"editor",class:"source"}):p("textarea",{ref:b,class:"source",spellcheck:!1,autocorrect:"off",onBlur:x.current}),p("a",{ref:m,style:"display: none;"})]})}function xg(e,t){for(var n in t)e[n]=t[n];return e}function od(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 ad(e){this.props=e}function yg(e,t){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:od(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Yt(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ad.prototype=new en).isPureReactComponent=!0,ad.prototype.shouldComponentUpdate=function(e,t){return od(this.props,e)||od(this.state,t)};var of=ce.__b;ce.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),of&&of(e)};var j7=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function V7(e){function t(n){var r=xg({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=j7,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var af=function(e,t){return e==null?null:tn(tn(e).map(t))},U7={map:af,forEach:af,count:function(e){return e?tn(e).length:0},only:function(e){var t=tn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:tn},H7=ce.__e;ce.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}H7(e,t,n,r)};var sf=ce.unmount;function gs(){this.__u=0,this.t=null,this.__b=null}function kg(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Z7(e){var t,n,r;function i(o){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return Yt(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Eo(){this.u=null,this.o=null}ce.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),sf&&sf(e)},(gs.prototype=new en).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=kg(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__e){var d=r.state.__e;r.__v.__k[0]=function u(f,h,w){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(_){return u(_,h,w)}),f.__c&&f.__c.__P===h&&(f.__e&&w.insertBefore(f.__e,f.__d),f.__c.__e=!0,f.__c.__P=w)),f}(d,d.__c.__P,d.__c.__O)}var c;for(r.setState({__e:r.__b=null});c=r.t.pop();)c.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(a,a)},gs.prototype.componentWillUnmount=function(){this.t=[]},gs.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function o(a,s,l){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(d){typeof d.__c=="function"&&d.__c()}),a.__c.__H=null),(a=xg({},a)).__c!=null&&(a.__c.__P===l&&(a.__c.__P=s),a.__c=null),a.__k=a.__k&&a.__k.map(function(d){return o(d,s,l)})),a}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&Yt(nr,null,e.fallback);return i&&(i.__h=null),[Yt(nr,null,t.__e?null:e.children),i]};var lf=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 G7(e){return this.getChildContext=function(){return e.context},e.children}function Y7(e){var t=this,n=e.i;t.componentWillUnmount=function(){Gr(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)}}),Gr(Yt(G7,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function W7(e,t){var n=Yt(Y7,{__v:e,i:t});return n.containerInfo=t,n}(Eo.prototype=new en).__e=function(e){var t=this,n=kg(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),lf(t,e,r)):i()};n?n(o):o()}},Eo.prototype.render=function(e){this.u=null,this.o=new Map;var t=tn(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},Eo.prototype.componentDidUpdate=Eo.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){lf(e,n,t)})};var Cg=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,q7=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|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]/,X7=typeof document!="undefined",K7=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function J7(e,t,n){return t.__k==null&&(t.textContent=""),Gr(e,t),typeof n=="function"&&n(),e?e.__c:null}function Q7(e,t,n){return ud(e,t),typeof n=="function"&&n(),e?e.__c:null}en.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(en.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var cf=ce.event;function e9(){}function t9(){return this.cancelBubble}function n9(){return this.defaultPrevented}ce.event=function(e){return cf&&(e=cf(e)),e.persist=e9,e.isPropagationStopped=t9,e.isDefaultPrevented=n9,e.nativeEvent=e};var Eg,df={configurable:!0,get:function(){return this.class}},uf=ce.vnode;ce.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var o in r={},n){var a=n[o];X7&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&a==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!K7(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&q7.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():a===null&&(a=void 0),/^oninput/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=tn(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=tn(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r,n.class!=n.className&&(df.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",df))}e.$$typeof=Cg,uf&&uf(e)};var ff=ce.__r;ce.__r=function(e){ff&&ff(e),Eg=e.__c};var r9={ReactCurrentDispatcher:{current:{readContext:function(e){return Eg.__n[e.__c].props.value}}}};function i9(e){return Yt.bind(null,e)}function Ag(e){return!!e&&e.$$typeof===Cg}function o9(e){return Ag(e)?fd.apply(null,arguments):e}function a9(e){return!!e.__k&&(Gr(null,e),!0)}function s9(e){return e&&(e.base||e.nodeType===1&&e)||null}var l9=function(e,t){return e(t)},c9=function(e,t){return e(t)},sd={useState:Y,useReducer:oh,useEffect:me,useLayoutEffect:ah,useRef:Me,useImperativeHandle:vm,useMemo:Ee,useCallback:Ve,useContext:ri,useDebugValue:bm,version:"17.0.2",Children:U7,render:J7,hydrate:Q7,unmountComponentAtNode:a9,createPortal:W7,createElement:Yt,createContext:Mr,createFactory:i9,cloneElement:o9,createRef:Hf,Fragment:nr,isValidElement:Ag,findDOMNode:s9,Component:en,PureComponent:ad,memo:yg,forwardRef:V7,flushSync:c9,unstable_batchedUpdates:l9,StrictMode:nr,Suspense:gs,SuspenseList:Eo,lazy:Z7,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:r9};class Sg extends P.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 d9=["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"],u9=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],f9=["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"],h9=["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","glyph_provider.type","immersive_weathering.area_condition.type","immersive_weathering.block_growth.growth_for_face.entry.direction","immersive_weathering.position_test.predicate_type"],p9=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],g9=["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"],hf=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],m9=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],_9=e=>Pe.generators.find(t=>t.id===e.replace(/^\$/,"")),w9=new P.DataModel(P.MapNode(P.StringNode(),P.StringNode()),{historyMax:0});function v9({model:e,lang:t,version:n,blockStates:r}){var l;const i=new P.ModelPath(e),[o,a,s]=e.schema.hook(Ig,i,ol(e.data),t,n,r,{});return(l=a==null?void 0:a.props)!=null&&l.children.some(d=>d)?N("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i),children:[N("div",{class:"node-header",children:[o,a]}),p("div",{class:"node-body",children:s})]}):s}const Ig={base(){return[null,null,null]},boolean(e,t,n,r,i,o,a){return[null,p(b9,be(oe({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:a})),null]},choice({choices:e,config:t,switchNode:n},r,i,o,a,s,l){const d=n.activeCase(r,!0),c=t!=null&&t.context?new P.ModelPath(r.getModel(),new P.Path(r.getArray(),[t.context])):r,[u,f,h]=d.node.hook(this,c,i,o,a,s,l);if(e.length===1)return[u,f,h];const w=t!=null&&t.choiceContext?new P.Path([],[t.choiceContext]):t!=null&&t.context?new P.Path([],[t.context]):r,_=m=>{var y;const v=(y=e.find(k=>k.type===m))!=null?y:d,x=v.node.default(),b=v.change?v.change(P.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(x==null?void 0:x.type)==="minecraft:decorated"?x.config.feature:x;r.model.set(r,P.DataModel.wrapLists(b))},g=p("select",{value:d.type,onChange:m=>_(m.target.value),children:e.map(m=>p("option",{value:m.type,children:Zs(o,w.contextPush(m.type))}))});return[u,N(le,{children:[g,f]}),h]},list({children:e,config:t},n,r,i,o,a,s){const{expand:l,collapse:d,isToggled:c}=pc(),[u,f]=Y(50),h=n.getContext().join(".");if(g9.includes(h)){const v=N(le,{children:[[...Array(t.maxLength)].map((b,y)=>p(Ao,{lang:i,path:n.modelPush(y)})),p("div",{class:"fixed-list"})]}),x=p(le,{children:[...Array(t.maxLength)].map((b,y)=>{var C;return e.hook(this,n.modelPush(y),(C=r==null?void 0:r[y])==null?void 0:C.node,i,o,a,s)[1]})});return[v,x,null]}const w=()=>{Array.isArray(r)||(r=[]);const v=P.DataModel.wrapLists(e.default());n.model.set(n,[{node:v,id:Ur()},...r])},_=()=>{Array.isArray(r)||(r=[]);const v=P.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:v,id:Ur()}])},g=p("button",{class:"add tooltipped tip-se","aria-label":Fe(i,"add_top"),onClick:w,children:ue.plus_circle}),m=N(le,{children:[r&&Array.isArray(r)&&r.map(({node:v,id:x},b)=>{if(b===u)return N("div",{class:"node node-header",children:[p("label",{children:Fe(i,"entries_hidden",`${r.length-u}`)}),p("button",{onClick:()=>f(Math.min(u+50,r.length)),children:Fe(i,"entries_hidden.more","50")}),p("button",{onClick:()=>f(r.length),children:Fe(i,"entries_hidden.all")})]});if(b>u)return null;const y=n.push(b).contextPush("entry"),k=e.type(y)==="object",C=c(x);let E;if(["loot_pool.entries.entry","loot_entry.alternatives.children.entry","loot_entry.group.children.entry","loot_entry.sequence.children.entry","function.set_contents.entries.entry"].includes(y.getContext().join("."))&&mn(v)&&typeof v.type=="string"&&v.type.replace(/^minecraft:/,"")==="item"&&typeof v.name=="string"&&(E=p(vg,{item:{id:v.name,count:1}})),k&&(C===!1||C===void 0&&r.length>20))return N("div",{class:"node node-header","data-category":e.category(y),children:[p(Ao,{lang:i,path:y,nested:!0}),p("button",{class:"toggle tooltipped tip-se","aria-label":`${Fe(i,"expand")}
${Fe(i,"expand_all","Ctrl")}`,onClick:l(x),children:ue.chevron_right}),p("label",{children:E!=null?E:Zs(i,y,`${b}`)}),p(pf,{path:y,value:v,schema:e},x)]});const M=()=>y.set(void 0),S=()=>{const F=[...n.get()];[F[b-1],F[b]]=[F[b],F[b-1]],n.model.set(n,F)},T=()=>{const F=[...n.get()];[F[b+1],F[b]]=[F[b],F[b+1]],n.model.set(n,F)};return N(gc,{label:E,path:y,schema:e,value:v,lang:i,version:o,states:a,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const F=[...n.get()];F.splice(b,0,{id:Ur(),node:ol(v)}),n.model.set(n,F)}}],ctx:be(oe({},s),{index:(b===0?1:0)+(b===r.length-1?2:0)}),children:[k&&p("button",{class:"toggle tooltipped tip-se","aria-label":`${Fe(i,"collapse")}
${Fe(i,"collapse_all","Ctrl")}`,onClick:d(x),children:ue.chevron_down}),p("button",{class:"remove tooltipped tip-se","aria-label":Fe(i,"remove"),onClick:M,children:ue.trashcan}),r.length>1&&N("div",{class:"node-move",children:[p("button",{class:"move tooltipped tip-se","aria-label":Fe(i,"move_up"),onClick:S,disabled:b===0,children:ue.chevron_up}),p("button",{class:"move tooltipped tip-se","aria-label":Fe(i,"move_down"),onClick:T,disabled:b===r.length-1,children:ue.chevron_down})]})]},x)}),r&&r.length>0&&r.length<=u&&p("div",{class:"node node-header",children:p("button",{class:"add tooltipped tip-se","aria-label":Fe(i,"add_bottom"),onClick:_,children:ue.plus_circle})})]});return[null,g,m]},map({children:e,keys:t,config:n},r,i,o,a,s,l){var v,x,b,y,k;const{expand:d,collapse:c,isToggled:u}=pc(),f=new P.ModelPath(w9,new P.Path([C9(r.toString())])),h=()=>{const C=f.get();r.model.set(r.push(C),P.DataModel.wrapLists(e.default()))},w=((v=n.validation)==null?void 0:v.validator)==="block_state_map"?s==null?void 0:s[P.relativePath(r,n.validation.params.id).get()]:null,_=w!=null&&w.properties?P.StringNode(null,{enum:Object.keys((x=w.properties)!=null?x:{})}):t;if(w&&r.last()==="Properties"){typeof i!="object"&&(i={});const C=Object.entries((b=w.properties)!=null?b:{}).map(([E,M])=>[E,P.StringNode(null,{enum:M})]);return Object.entries((y=w.properties)!=null?y:{}).forEach(([E,M])=>{typeof i[E]!="string"?r.model.errors.add(r.push(E),"error.expected_string"):M.includes(i[E])||r.model.errors.add(r.push(E),"error.invalid_enum_option",i[E])}),P.ObjectNode(Object.fromEntries(C)).hook(this,r,i,o,a,s,l)}const g=N(le,{children:[_.hook(this,f,(k=f.get())!=null?k:"",o,a,s,l)[1],p("button",{class:"add tooltipped tip-se","aria-label":Fe(o,"add"),onClick:h,children:ue.plus_circle})]}),m=p(le,{children:typeof i=="object"&&Object.entries(i).map(([C,E])=>{var R,V,L,j;const M=r.modelPush(C),S=e.type(M)==="object",T=u(C);if(S&&(T===!1||T===void 0&&i.length>20))return N("div",{class:"node node-header","data-category":e.category(M),children:[p(Ao,{lang:o,path:M,nested:!0}),p("button",{class:"toggle tooltipped tip-se","aria-label":`${Fe(o,"expand")}
${Fe(o,"expand_all","Ctrl")}`,onClick:d(C),children:ue.chevron_right}),p("label",{children:C}),p(pf,{path:M,value:E,schema:e},C)]});const z=w?P.StringNode(null,{enum:(V=(R=w.properties)==null?void 0:R[C])!=null?V:[]}):e;((L=w==null?void 0:w.properties)==null?void 0:L[C])&&typeof E=="string"&&!((j=w.properties)!=null&&j[C].includes(E))&&r.model.errors.add(M,"error.invalid_enum_option",E);const F=()=>M.set(void 0);return N(gc,{schema:z,path:M,value:E,lang:o,version:a,states:s,ctx:l,label:C,children:[S&&p("button",{class:"toggle tooltipped tip-se","aria-label":`${Fe(o,"collapse")}
${Fe(o,"collapse_all","Ctrl")}`,onClick:c(C),children:ue.chevron_down}),p("button",{class:"remove tooltipped tip-se","aria-label":Fe(o,"remove"),onClick:F,children:ue.trashcan})]},C)})});return[null,g,m]},number(e,t,n,r,i,o,a){return[null,p(x9,be(oe({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:a})),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,o,a,s,l,d){var v;const{expand:c,collapse:u,isToggled:f}=pc();if(i.getArray().length==0&&E9(t.context,o)){const{wrapper:x,fields:b}=A9(n(i),i,o);o=x.data,n=()=>b,r=(y,k)=>new P.ModelPath(x,new P.Path(y.getArray(),["feature"])).push(k)}let h=null,w=null;if(e.optional())if(o===void 0){const x=()=>i.set(P.DataModel.wrapLists(e.default()));w=p("button",{class:"collapse closed tooltipped tip-se","aria-label":Fe(a,"expand"),onClick:x,children:ue.plus_circle})}else{const x=()=>i.set(void 0);w=p("button",{class:"collapse open tooltipped tip-se","aria-label":Fe(a,"remove"),onClick:x,children:ue.trashcan})}const _=i.getContext().join(".");if(m9.includes(_)||hf.includes(_)){const x=f(""),b=hf.includes(_)?x:!x;if(h=p(le,{children:p("button",{class:"toggle tooltipped tip-se","aria-label":Fe(a,b?"collapse":"expand"),onClick:x?u(""):c(""),children:b?ue.chevron_down:ue.chevron_right})}),!b)return[h,w,null]}const g=typeof o=="object"&&o!==null&&((v=e.default())==null?void 0:v.pools)?be(oe({},d),{loot:o==null?void 0:o.type}):d,m=p(le,{children:typeof o=="object"&&o!==null&&!(e.optional()&&o===void 0)&&Object.entries(n(i)).filter(([x,b])=>b.enabled(i)).map(([x,b])=>{const y=r(i,x),k=y.getContext().join(".");if(u9.includes(k))return null;const[C,E,M]=b.hook(this,y,o[x],a,s,l,g),S=b.type(y)==="object"&&f9.includes(k),T=h9.includes(k);return S||T?(h=N(le,{children:[h,p(Ao,{lang:a,path:y}),p(Mg,{lang:a,path:y}),C]}),w=N(le,{children:[w,E]}),S?M:null):p(gc,{schema:b,path:y,value:o[x],lang:a,version:s,states:l,ctx:g},x)})});return[h,w,m]},string(e,t,n,r,i,o,a){return[null,p(y9,be(oe({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:a})),null]}};function pf({path:e,value:t}){var r,i,o,a,s;switch(e.getContext().join(".")){case"loot_table.pools.entry":return N("label",{children:[(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 p("label",{children:(s=(o=t==null?void 0:t.name)==null?void 0:o.replace(/^minecraft:/,""))!=null?s:(a=t==null?void 0:t.type)==null?void 0:a.replace(/^minecraft:/,"")})}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return p("label",{children:l.replace(/^minecraft:/,"")});return null}function pc(){const[e,t]=Y(new Map),[n,r]=Y(void 0);return{expand:s=>l=>{l.ctrlKey?(t(new Map),r(!0)):t(d=>new Map(d.set(s,!0)))},collapse:s=>l=>{l.ctrlKey?(t(new Map),r(!1)):t(d=>new Map(d.set(s,!1)))},isToggled:s=>{var l;return e instanceof Map?(l=e.get(s))!=null?l:n:!1}}}function b9({path:e,node:t,value:n,lang:r}){const i=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return N(le,{children:[p("button",{class:n===!1?"selected":"",onClick:()=>i(!1),children:Fe(r,"false")}),p("button",{class:n===!0?"selected":"",onClick:()=>i(!0),children:Fe(r,"true")})]})}function x9({path:e,config:t,integer:n,value:r,lang:i}){var s;const o=l=>{const d=l.target.value,c=n?parseInt(d):parseFloat(d);e.model.set(e,c)},a=l=>{const d=l.target.value,c=parseInt(d.slice(1),16);e.model.set(e,c)};return N(le,{children:[p("input",{type:"text",value:r!=null?r:"",onBlur:o,onKeyDown:l=>{l.key==="Enter"&&o(l)}}),(t==null?void 0:t.color)&&p("input",{type:"color",value:"#"+((s=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?s:"000000"),onChange:a}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&p("button",{onClick:()=>Gw(e.model),class:"tooltipped tip-se","aria-label":Fe(i,"generate_new_seed"),children:ue.sync})]})}function y9({path:e,getValues:t,config:n,node:r,value:i,lang:o,version:a,states:s}){var f,h,w;const l=_=>{_.stopPropagation();const g=_.target.value;g!==i&&e.model.set(e,g.length===0?void 0:g)},d=t(),c=e.getContext().join("."),u=!xo(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(p9.includes(c))return p("textarea",{value:i!=null?i:"",onBlur:l});if(xo(n)&&!n.additional||d9.includes(c)){let _=new P.Path([]);return xo(n)&&typeof n.enum=="string"?_=_.contextPush(n.enum):u?_=_.contextPush(u):xo(n)&&(_=e),N("select",{value:i!=null?i:"",onChange:l,children:[r.optional()&&p("option",{value:"",children:Fe(o,"unset")}),d.map(g=>p("option",{value:g,children:Zs(o,_.contextPush(g.replace(/^minecraft:/,"")))}))]})}else if(!xo(n)&&(n==null?void 0:n.validator)==="block_state_key"){const _=s==null?void 0:s[P.relativePath(e,n.params.id).get()],g=Object.keys((f=_==null?void 0:_.properties)!=null?f:{});return p("select",{value:i!=null?i:"",onChange:l,children:g.map(m=>p("option",{children:m}))})}else{const{biomeColors:_,setBiomeColor:g}=l2(),m=typeof i=="string"?i.includes(":")?i:"minecraft:"+i:"unknown",v=Ur(),x=u?_9(u):void 0;return N(le,{children:[p("input",{value:i!=null?i:"",onBlur:l,onKeyDown:b=>{b.key==="Enter"&&l(b)},list:d.length>0?v:""}),d.length>0&&p("datalist",{id:v,children:d.map(b=>p("option",{value:b}))}),["generator_biome.biome"].includes(c)&&p("input",{type:"color",value:Kw((w=(h=_[m])!=null?h:cg[m])!=null?w:Td(m)),onChange:b=>g(m,Jw(b.currentTarget.value))}),["attribute_modifier.id","text_component_object.hoverEvent.show_entity.contents.id"].includes(c)&&p("button",{onClick:()=>e.set(Zw()),class:"tooltipped tip-se","aria-label":Fe(o,"generate_new_uuid"),children:ue.sync}),x&&d.includes(i)&&i.startsWith("minecraft:")&&p("a",{href:`/${x.url}/?version=${a}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":Fe(o,"follow_reference"),children:ue.link_external})]})}}function k9({label:e,schema:t,path:n,value:r,lang:i,version:o,states:a,ctx:s,actions:l,children:d}){var b;const c=t.type(n),u=t.category(n),f=n.getContext().join("."),[h,w]=al(),_=y=>{y.preventDefault(),w()},g=be(oe({},s),{depth:((b=s.depth)!=null?b:0)+1});delete g.index;const[m,v,x]=t.hook(Ig,n,r,i,o,a,g);return N("div",{class:`node ${c}-node`,"data-category":u,children:[N("div",{class:"node-header",onContextMenu:_,children:[p(Ao,{lang:i,path:n}),p(Mg,{lang:i,path:n}),d,m,N("label",{children:[e!=null?e:Zs(i,n,`${n.last()}`),h&&N("div",{class:"node-menu",children:[l==null?void 0:l.map(y=>{var k;return N("div",{class:"menu-item",children:[p(ae,{icon:y.icon,tooltip:Fe(i,y.label),tooltipLoc:"se",onClick:()=>y.onSelect()}),p("span",{children:(k=y.description)!=null?k:Fe(i,y.label)})]},y.label)}),N("div",{class:"menu-item",children:[p(ae,{icon:"clippy",tooltip:Fe(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(f)}),p("span",{children:f})]})]})]}),v]}),x&&p("div",{class:"node-body",children:x})]})}const gc=yg(k9,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&Wi(e.ctx,t.ctx)&&Wi(e.value,t.value));function xo(e){return!!(e!=null&&e.enum)}function C9(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 Zs(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const o=r.slice(i).join("."),a=Fe(e,o,...n);if(o!==a)return a}return r[r.length-1]}function Ao({lang:e,path:t,nested:n}){var o;t.model instanceof Sg&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(a=>a.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=Fe(e,r[0].error,...(o=r[0].params)!=null?o:[]);return Tg("node-error","issue_opened",i)}function Mg({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=Fe(e,n);return r===n?null:Tg("node-help","info",r)}const Tg=(e,t,n)=>{const[r,i]=al();return N("div",{class:`node-icon ${e}${r?" show":""}`,onClick:()=>i(),children:[ue[t],p("span",{class:"icon-popup",children:n})]})};function E9(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&mn(t==null?void 0:t.config)}function A9(e,t,n){const r=[],i=So(n,r),o={type:e.type,config:P.ObjectNode({decorators:P.ListNode(Xp),feature:Kp},{context:"feature.decorated"})},a=P.ObjectNode(o,{context:"feature"}),s=new P.Path(["config","feature"]),l=new P.Path(["config","decorators"]),d=t.getModel(),c=new Sg(a,u=>{if(u.startsWith(s))return new P.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...u.modelArr]);if(u.startsWith(l)){if(u.modelArr.length===2)return new P.Path([]);const f=u.modelArr[2];if(typeof f=="number")return new P.Path([...[...Array(f)].flatMap(()=>["config","feature"]),"config","decorator",...u.modelArr.slice(3)])}return u},u=>{if(u.equals(l)){const f=[];return So(d.data,f),f}return d.get(c.map(u))},(u,f,h)=>{if(u.startsWith(s)){const w=[];So(d.data,w);const _=new P.Path([...[...Array(w.length-1)].flatMap(()=>["config","feature"]),...u.modelArr]);return d.set(_,f,h)}else if(u.startsWith(l)){const w=u.modelArr[2];if(u.modelArr.length===2){const _=c.get(s);return d.set(new P.Path,ld(_,f),h)}else if(typeof w=="number")if(u.modelArr.length===3&&f===void 0){const _=c.get(s),g=[];So(d.data,g),g.splice(w,1);const m=ld(_,g);return d.set(new P.Path,m,h)}else{const _=new P.Path([...[...Array(w)].flatMap(()=>["config","feature"]),"config","decorator",...u.modelArr.slice(3)]);return d.set(_,f,h)}}d.set(u,f,h)});return c.data={type:d.data.type,config:{decorators:r,feature:i}},c.errors=d.errors,{fields:o,wrapper:c}}function So(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!mn(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),So((r=e.config.feature)!=null?r:"",t))}function ld(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:ld(e,t)}}}function S9({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=Ae();if(!t||!n||i==="none")return p(le,{});const[o]=sh(s=>{r(`Error rendering the tree: ${s.message}`),console.error(s)});if(o)return p(le,{});const[,a]=Y(0);return sl(t,()=>{a(s=>s+1)}),p("div",{class:"tree","data-cy":"tree",children:p(v9,{model:t,lang:i,version:e,blockStates:n})})}var I9=Object.defineProperty,M9=Object.defineProperties,T9=Object.getOwnPropertyDescriptors,gf=Object.getOwnPropertySymbols,L9=Object.prototype.hasOwnProperty,O9=Object.prototype.propertyIsEnumerable,mf=(e,t,n)=>t in e?I9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lg=(e,t)=>{for(var n in t||(t={}))L9.call(t,n)&&mf(e,n,t[n]);if(gf)for(var n of gf(t))O9.call(t,n)&&mf(e,n,t[n]);return e};const _f="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function Va(e){return`[giscus] An error occurred. Error message: "${e}".`}function wf(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function N9(){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 R9(e){const[t,n]=Y(""),r=function({repo:a,repoId:s,category:l="",categoryId:d="",mapping:c,term:u="",theme:f="light",reactionsEnabled:h="1",emitMetadata:w="0",inputPosition:_="bottom",lang:g="en",session:m,origin:v}){const x=new URL(location.href);x.searchParams.delete("giscus");const b=x.toString(),y={origin:v=v||b,session:m,theme:f,reactionsEnabled:h,emitMetadata:w,inputPosition:_,repo:a,repoId:s,category:l,categoryId:d,description:wf("description")};switch(c){case"url":y.term=b;break;case"title":y.term=document.title;break;case"og:title":y.term=wf("title");break;case"specific":y.term=u;break;case"number":y.number=u;break;case"pathname":default:y.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${g}/widget?${new URLSearchParams(y)}`}((i=Lg({},e),M9(i,T9({session:t}))));var i;const o=Me(null);return me(()=>{const a=location.href,s=new URL(a),l=localStorage.getItem("giscus-session"),d=s.searchParams.get("giscus")||"";if(d)return localStorage.setItem("giscus-session",JSON.stringify(d)),n(d),s.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,s.toString());if(l)try{n(JSON.parse(l||"")||"")}catch(c){n(""),localStorage.removeItem("giscus-session"),console.warn(`${Va(c==null?void 0:c.message)} Session has been cleared.`)}},[]),me(N9,[]),me(()=>{const a=function(s,l=null){return function(d){if(d.origin!=="https://giscus.app")return;const{data:c}=d;if(typeof c!="object"||!c.giscus||(l&&c.giscus.resizeHeight&&(l.style.height=`${c.giscus.resizeHeight}px`),!c.giscus.error))return;const u=c.giscus.error;if(u.includes("Bad credentials")||u.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),s(),void console.warn(`${Va(u)} Session has been cleared.`);console.error(`${Va(u)} No session is stored initially. ${_f}`)}u.includes("Discussion not found")?console.warn(`[giscus] ${u}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${Va(u)} ${_f}`)}}(()=>n(""),o.current);return window.addEventListener("message",a),()=>window.removeEventListener("message",a)},[]),sd.createElement("div",{className:"giscus"},sd.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:o}))}function D9(e){const[t,n]=Y(!1);return me(()=>n(!0),[]),t?sd.createElement(R9,Lg({},e)):null}function Xd({term:e}){const{actualTheme:t}=d2(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return p("div",{class:"giscus-container",children:p(D9,{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 cd(){return[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]},{id:"density-functions",title:"Density function types and their configuration",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]},{id:"feature-order-cycle",title:"How to fix feature order cycles",versions:["1.18","1.18.2","1.19"],tags:["worldgen","biomes","features"]},{id:"heightmap-types",title:"The different heightmap types explained",versions:["1.16","1.17","1.18","1.18.2","1.19"],tags:["worldgen"]},{id:"noise-router",title:"How terrain is generated using the noise router",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]},{id:"placed-features",title:"Placed features and their configuration",versions:["1.18","1.18.2","1.19"],tags:["worldgen","features"]}]}function F9(e){const t=cd().find(n=>n.id===e);return t===void 0?{id:e,title:"Unknown Guide"}:t}function ta({id:e,minimal:t,activeTags:n,toggleTag:r}){const{title:i,versions:o,tags:a}=Ee(()=>F9(e),[e]),s=l=>d=>{r&&r(l),d.preventDefault(),d.stopImmediatePropagation()};return p(Ld,{title:i,overlay:!t&&(o==null?void 0:o.join(" \u2022 ")),link:`/guides/${e}/`,children:p("div",{class:"badges-list",children:a==null?void 0:a.sort().map(l=>p(ao,{label:l,onClick:s(l),active:n==null?void 0:n.includes(l)}))})})}const vf={system:"device_desktop",dark:"moon",light:"sun"};function P9(){const{lang:e,locale:t,changeLocale:n}=Ae(),{theme:r,changeTheme:i}=d2(),{version:o}=qt(),{projects:a,project:s,changeProject:l}=$n(),{title:d}=vn(),c=Ui(),u=Up(c);return N("header",{children:[N("div",{class:"title",children:[p(rh,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link",children:Ji.home}),p("h1",{children:d}),u&&p(Ot,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher",children:Pe.generators.filter(f=>{var h,w;return((h=f.tags)==null?void 0:h[0])===((w=u==null?void 0:u.tags)==null?void 0:w[0])&&_t(o,f.minVersion)}).map(f=>p(ae,{label:t(f.partner?`partner.${f.partner}.${f.id}`:f.id),active:f.id===u.id,onClick:()=>ti(Cr(f.url))}))}),!u&&c.match(/\/?project\/?$/)&&p(Ot,{icon:"chevron_down",tooltip:t("switch_project"),children:a.map(f=>p(ae,{label:f.name,active:f.name===s.name,onClick:()=>l(f.name)}))})]}),p("nav",{children:N("ul",{children:[p("li",{"data-cy":"language-switcher",children:p(Ot,{icon:"globe",tooltip:t("language"),children:Pe.languages.map(({code:f,name:h})=>p(ae,{label:h,active:f===e,onClick:()=>n(f)}))})}),p("li",{"data-cy":"theme-switcher",children:p(Ot,{icon:vf[r],tooltip:t("theme"),children:Object.entries(vf).map(([f,h])=>p(ae,{icon:h,label:t(`theme.${f}`),active:f===r,onClick:()=>i(f)}))})}),p("li",{class:"dimmed",children:p("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github"),children:ue.mark_github})})]})})]})}const vi=p("svg",{width:"29",height:"29",viewBox:"0 0 29 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8284 0.686291C17.298 0.686291 16.7893 0.897005 16.4142 1.27208L1.44365 16.2426C0.662602 17.0237 0.662602 18.29 1.44365 19.0711L9.92893 27.5563C10.71 28.3374 11.9763 28.3374 12.7574 27.5563L27.7279 12.5858C28.103 12.2107 28.3137 11.702 28.3137 11.1716V2.68629C28.3137 1.58172 27.4183 0.686291 26.3137 0.686291H17.8284ZM23.5 8C24.8807 8 26 6.88071 26 5.5C26 4.11929 24.8807 3 23.5 3C22.1193 3 21 4.11929 21 5.5C21 6.88071 22.1193 8 23.5 8Z"})}),bf=p("svg",{width:"28",height:"22",viewBox:"0 0 28 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M26.8426 9.83057L23.3294 9.83057V20.8306C23.3294 21.3829 22.8817 21.8306 22.3294 21.8306H5.3294C4.77712 21.8306 4.3294 21.3829 4.3294 20.8306V9.83057L1.00171 9.83057C-0.017101 9.83057 -0.383456 8.48519 0.494688 7.96864L13.8067 0.138065C14.1279 -0.0509101 14.5276 -0.045538 14.8437 0.152002L27.3726 7.98258C28.2246 8.51506 27.8473 9.83057 26.8426 9.83057ZM15.3294 11.8306C14.7771 11.8306 14.3294 12.2783 14.3294 12.8306V16.8306C14.3294 17.3829 14.7771 17.8306 15.3294 17.8306H18.3294C18.8817 17.8306 19.3294 17.3829 19.3294 16.8306V12.8306C19.3294 12.2783 18.8817 11.8306 18.3294 11.8306H15.3294Z"})}),Ji={home:N("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),p("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),p("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),p("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),p("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),p("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})]}),report:N("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg",children:[p("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"}),p("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"}),p("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"}),p("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"}),p("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"}),p("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:N("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[p("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),p("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"})]}),advancement:p("svg",{width:"27",height:"27",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{d:"M5.76943 2.86824L2.18356 0.819176C1.29934 0.313911 0.313911 1.29934 0.819176 2.18356L2.86824 5.76943C2.95458 5.92052 3 6.09154 3 6.26556V20.7344C3 20.9085 2.95459 21.0795 2.86824 21.2306L0.819176 24.8164C0.313911 25.7007 1.29934 26.6861 2.18356 26.1808L5.76943 24.1318C5.92052 24.0454 6.09154 24 6.26556 24H20.7344C20.9085 24 21.0795 24.0454 21.2306 24.1318L24.8164 26.1808C25.7007 26.6861 26.6861 25.7007 26.1808 24.8164L24.1318 21.2306C24.0454 21.0795 24 20.9085 24 20.7344V6.26556C24 6.09154 24.0454 5.92052 24.1318 5.76943L26.1808 2.18356C26.6861 1.29934 25.7007 0.313911 24.8164 0.819176L21.2306 2.86824C21.0795 2.95458 20.9085 3 20.7344 3H6.26556C6.09154 3 5.92052 2.95459 5.76943 2.86824Z"})}),block_definition:p("svg",{width:"28",height:"30",viewBox:"0 0 28 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.75 0.272806C13.5437 -0.0909347 14.4563 -0.0909357 15.25 0.272805L26.25 5.31447C27.3163 5.80322 28 6.86864 28 8.04167V21.3583C28 22.5313 27.3163 23.5967 26.25 24.0855L15.25 29.1272C14.4563 29.4909 13.5437 29.4909 12.75 29.1272L1.75004 24.0855C0.683681 23.5967 0 22.5313 0 21.3583V8.04167C0 6.86864 0.683678 5.80322 1.75004 5.31447L12.75 0.272806ZM14 4.10003L6.92266 7.34381L14 10.2391L21.0773 7.34381L14 4.10003ZM24 10.4699V20.7166L16 24.3833V13.7427L24 10.4699ZM12 13.7427L4 10.4699V20.7166L12 24.3833V13.7427Z"})}),chat_type:p("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 0C1.79086 0 0 1.79086 0 4V21C0 23.2091 1.79086 25 4 25H8V30.7732C8 31.636 9.01946 32.0938 9.66436 31.5206L17 25H28C30.2091 25 32 23.2091 32 21V4C32 1.79086 30.2091 0 28 0H4Z"})}),dimension:p("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.7659 0.445701C18.5582 0.154357 17.2971 0 16 0C12.7056 0 9.64369 0.995672 7.09887 2.70251C7.94418 3.62868 8.45554 4.49063 8.75229 5.30669C9.09264 6.24263 9.125 7.05145 9.125 7.6875C9.125 7.78933 9.12466 7.88242 9.12434 7.96797V7.96834V7.96869V7.96901V7.96902C9.12247 8.47232 9.12158 8.71409 9.19707 8.93677C9.24638 9.08226 9.36226 9.31309 9.94721 9.60557C10.5615 9.91273 10.7586 9.8353 10.7733 9.82952L10.7739 9.82929C10.8476 9.80165 10.9347 9.73088 11.2191 9.3753L11.256 9.32901C11.4803 9.04661 11.8843 8.53789 12.5239 8.29804C13.2651 8.02009 14.0719 8.16789 14.9472 8.60557C16.4469 9.35541 17.3707 9.72195 17.9896 9.84301C18.2833 9.90046 18.4612 9.89221 18.5724 9.86953C18.6731 9.84897 18.7646 9.80771 18.8753 9.71913C19.2786 9.39647 19.6673 8.76901 19.9604 7.83984C20.2468 6.93156 20.4085 5.83955 20.4378 4.72369C20.4672 3.60868 20.3634 2.50945 20.1445 1.59133C20.0358 1.13577 19.9057 0.75371 19.7659 0.445701ZM5.50368 3.92379C2.13164 6.85717 4.76837e-07 11.1797 4.76837e-07 16C4.76837e-07 16.1436 0.00189157 16.2867 0.00565022 16.4294C1.54401 16.9679 2.98111 16.6462 4.47925 16.2249C4.59499 16.1923 4.71296 16.1585 4.83279 16.1242L4.83282 16.1242C5.68141 15.881 6.62293 15.6113 7.5179 15.5713C8.62706 15.5218 9.72807 15.8138 10.7071 16.7929C11.7646 17.8503 12.0777 19.3283 11.8236 20.6012C11.5699 21.8719 10.7059 23.1043 9.24253 23.4702C8.94395 23.5448 8.87224 23.6435 8.85319 23.6716C8.82014 23.7204 8.77492 23.8288 8.77233 24.0677C8.7697 24.3108 8.81045 24.5892 8.869 24.9304L8.88606 25.0286L8.88606 25.0286C8.93527 25.3102 9 25.6807 9 26C9 27.4332 8.58821 28.8019 8.09018 29.9113C10.4231 31.2406 13.1229 32 16 32C19.5354 32 22.8029 30.8534 25.4511 28.9117C25.3471 28.7646 25.2399 28.6153 25.1301 28.465C24.5506 27.672 23.9089 26.8682 23.2732 26.2107C22.6167 25.5315 22.05 25.0971 21.6286 24.9285C20.8738 24.6266 20.1566 24.1617 19.9616 23.3144C19.8718 22.9244 19.9228 22.5591 20.0033 22.2613C20.0827 21.9675 20.2083 21.6782 20.3292 21.4199C20.3937 21.2823 20.4611 21.1436 20.5296 21.0026L20.5296 21.0024C20.9898 20.055 21.5 19.0047 21.5 17.5C21.5 16.2061 22.0035 15.2171 22.8218 14.4932C23.5953 13.8089 24.6068 13.3989 25.5877 13.1047C26.3248 12.8835 27.1287 12.7056 27.8822 12.5388L27.8824 12.5388L27.8824 12.5388L27.8824 12.5388C28.1297 12.484 28.3716 12.4305 28.6038 12.377C29.5877 12.1506 30.4202 11.9219 31.0528 11.6056C31.1525 11.5557 31.2566 11.5241 31.3612 11.5094C29.9973 6.83578 26.5583 3.04703 22.1087 1.2075C22.3608 2.30151 22.4695 3.54643 22.4372 4.7763C22.404 6.03545 22.2219 7.31843 21.8678 8.4414C21.5202 9.54349 20.9714 10.6035 20.1247 11.2809C19.7989 11.5415 19.4221 11.7373 18.9722 11.8291C18.5328 11.9188 18.0778 11.8982 17.6057 11.8058C16.6928 11.6273 15.5531 11.1446 14.0528 10.3944C13.4385 10.0873 13.2414 10.1647 13.2267 10.1705L13.2261 10.1707C13.1524 10.1983 13.0653 10.2691 12.7809 10.6247L12.744 10.671C12.5197 10.9534 12.1157 11.4621 11.4761 11.702C10.7349 11.9799 9.92815 11.8321 9.05279 11.3944C8.13774 10.9369 7.56612 10.3552 7.30294 9.57885C7.10968 9.00876 7.1174 8.37679 7.1232 7.90214V7.90213C7.12412 7.82627 7.125 7.75443 7.125 7.6875C7.125 7.13604 7.09486 6.60111 6.87271 5.99018C6.66804 5.42734 6.27867 4.74354 5.50368 3.92379ZM31.8004 13.4655C30.9636 13.8583 29.9823 14.1121 29.0524 14.3261C28.782 14.3883 28.5159 14.4472 28.2543 14.5052C27.5209 14.6676 26.8227 14.8222 26.1623 15.0203C25.2682 15.2886 24.5922 15.5973 24.147 15.9912C23.7465 16.3454 23.5 16.7939 23.5 17.5C23.5 19.496 22.7817 20.9579 22.3162 21.9053L22.3159 21.9058C22.2518 22.0363 22.1925 22.157 22.1405 22.268C22.0298 22.5045 21.9661 22.6645 21.934 22.7831C21.9282 22.8046 21.9241 22.8225 21.9212 22.837C21.9775 22.8824 22.105 22.965 22.3714 23.0715C23.2 23.403 24.0083 24.0935 24.7112 24.8206C25.4349 25.5693 26.1369 26.4531 26.7449 27.285C26.8288 27.3998 26.9111 27.5139 26.9917 27.6269C30.0758 24.7103 32 20.5798 32 16C32 15.1375 31.9318 14.291 31.8004 13.4655ZM6.39285 28.7958C6.7349 27.9612 7 26.9846 7 26C7 25.8639 6.96675 25.6702 6.9058 25.3152L6.8978 25.2686C6.84067 24.9356 6.76762 24.4924 6.77245 24.0461C6.77733 23.5956 6.86084 23.0468 7.19719 22.5502C7.54754 22.0328 8.08591 21.6977 8.75748 21.5299C9.2941 21.3957 9.72071 20.9187 9.86229 20.2096C10.0034 19.5028 9.81659 18.7308 9.2929 18.2071C8.77193 17.6861 8.24794 17.5407 7.6071 17.5693C6.96482 17.598 6.27253 17.7947 5.38824 18.0461L5.38718 18.0464L5.3833 18.0475C5.26594 18.0808 5.1452 18.1152 5.02075 18.1502C3.64971 18.5358 2.00798 18.9412 0.20345 18.5584C0.873856 22.73 3.15691 26.3624 6.39285 28.7958ZM21.8827 22.799C21.882 22.7982 21.8816 22.7979 21.8815 22.7979C21.881 22.798 21.883 22.8012 21.8886 22.8073C21.886 22.8031 21.884 22.8004 21.8827 22.799Z"})}),dimension_type:p("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.2929 22.7071C11.6834 23.0976 12.3166 23.0976 12.7071 22.7071L19.0711 16.3431C19.4616 15.9526 19.4616 15.3195 19.0711 14.9289C18.6805 14.5384 18.0474 14.5384 17.6569 14.9289L13 19.5858V14.1521C14.074 14.1106 15.2545 13.9152 16.5 13.5C17.4051 13.1983 18.0371 12.8511 18.602 12.5408C19.9096 11.8225 20.8576 11.3017 24 12V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V9.5C3 7.5 6 10.5 7.5 12.5C7.95659 13.1088 9.22475 13.7863 11 14.0485V19.5858L6.34315 14.9289C5.95262 14.5384 5.31946 14.5384 4.92893 14.9289C4.53841 15.3195 4.53841 15.9526 4.92893 16.3431L11.2929 22.7071ZM11 14.0485V3.41421L6.34315 8.07107C5.95262 8.46159 5.31946 8.46159 4.92893 8.07107C4.53841 7.68054 4.53841 7.04738 4.92893 6.65686L11.2929 0.292893C11.6834 -0.097631 12.3166 -0.097631 12.7071 0.292893L19.0711 6.65686C19.4616 7.04738 19.4616 7.68054 19.0711 8.07107C18.6805 8.46159 18.0474 8.46159 17.6569 8.07107L13 3.41421V14.1521C12.2816 14.1799 11.6108 14.1388 11 14.0485Z"})}),font:p("svg",{width:"26",height:"20",viewBox:"0 0 26 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 16V3H9V16H3ZM0 1C0 0.447715 0.447715 0 1 0H11C11.5523 0 12 0.447715 12 1V18C12 18.5523 11.5523 19 11 19H1C0.447715 19 0 18.5523 0 18V1ZM17.3224 18.8366C17.8622 19.0687 18.4801 19.1847 19.1761 19.1847C19.6828 19.1847 20.1373 19.1207 20.5398 18.9929C20.947 18.8651 21.2997 18.6733 21.598 18.4176C21.901 18.1619 22.1496 17.8494 22.3438 17.4801H22.429V19H25.696V11.5852C25.696 11.0076 25.5753 10.4938 25.3338 10.044C25.0971 9.59422 24.7609 9.21544 24.3253 8.90767C23.8897 8.59517 23.3783 8.35843 22.7912 8.19744C22.2041 8.03172 21.5625 7.94886 20.8665 7.94886C19.8911 7.94886 19.0554 8.10038 18.3594 8.40341C17.6681 8.7017 17.1236 9.11364 16.7259 9.6392C16.3329 10.16 16.089 10.7519 15.9943 11.4148L19.1974 11.5284C19.2732 11.178 19.4508 10.9034 19.7301 10.7045C20.0095 10.5057 20.3788 10.4062 20.8381 10.4062C21.2642 10.4062 21.6027 10.5057 21.8537 10.7045C22.1046 10.9034 22.2301 11.1851 22.2301 11.5497V11.5852C22.2301 11.8078 22.1425 11.9806 21.9673 12.1037C21.7969 12.2221 21.5223 12.3144 21.1435 12.3807C20.7647 12.4422 20.2652 12.5014 19.6449 12.5582C19.0909 12.6056 18.5701 12.6979 18.0824 12.8352C17.5947 12.9678 17.1638 13.1643 16.7898 13.4247C16.4157 13.6851 16.1222 14.0237 15.9091 14.4403C15.696 14.857 15.5895 15.3684 15.5895 15.9744C15.5895 16.6941 15.7434 17.2931 16.0511 17.7713C16.3636 18.2448 16.7874 18.5999 17.3224 18.8366ZM21.2571 16.6847C20.9588 16.8362 20.6226 16.9119 20.2486 16.9119C19.8509 16.9119 19.5218 16.8172 19.2614 16.6278C19.0057 16.4384 18.8778 16.1638 18.8778 15.804C18.8778 15.5672 18.937 15.3636 19.0554 15.1932C19.1785 15.018 19.3537 14.8759 19.581 14.767C19.813 14.6581 20.0923 14.5777 20.419 14.5256C20.58 14.5019 20.7481 14.4759 20.9233 14.4474C21.0985 14.419 21.2689 14.3859 21.4347 14.348C21.6004 14.3101 21.7519 14.2699 21.8892 14.2273C22.0312 14.1847 22.152 14.1373 22.2514 14.0852V15.1222C22.2514 15.4773 22.1615 15.7898 21.9815 16.0597C21.8016 16.3248 21.5601 16.5331 21.2571 16.6847Z"})}),item_modifier:N("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p("line",{x1:"8.05026",y1:"17.9498",x2:"17.9498",y2:"8.05026",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round"}),p("path",{d:"M10.1749 4.51138C10.1749 4.51138 16.4785 3.75061 19.364 6.63604C22.2494 9.52148 21.4886 15.8251 21.4886 15.8251",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round"})]}),loot_table:p("svg",{width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.159296 8.96068C-0.224317 6.7851 1.22836 4.71047 3.40393 4.32686L27.0393 0.159301C29.2149 -0.224312 31.2895 1.22836 31.6731 3.40394L35.8407 27.0393C36.2243 29.2149 34.7716 31.2895 32.5961 31.6731L8.96068 35.8407C6.7851 36.2243 4.71047 34.7716 4.32685 32.5961L0.159296 8.96068ZM11.5999 10.4974C11.9356 12.401 10.6645 14.2163 8.76089 14.552C6.85726 14.8876 5.04196 13.6165 4.7063 11.7129C4.37063 9.80928 5.64172 7.99398 7.54535 7.65832C9.44898 7.32266 11.2643 8.59375 11.5999 10.4974ZM25.5026 11.6C27.4063 11.2643 28.6773 9.44899 28.3417 7.54536C28.006 5.64173 26.1907 4.37064 24.2871 4.7063C22.3835 5.04196 21.1124 6.85727 21.448 8.7609C21.7837 10.6645 23.599 11.9356 25.5026 11.6ZM14.552 27.2391C14.8876 29.1427 13.6165 30.958 11.7129 31.2937C9.80928 31.6294 7.99398 30.3583 7.65831 28.4546C7.32265 26.551 8.59374 24.7357 10.4974 24.4001C12.401 24.0644 14.2163 25.3355 14.552 27.2391ZM28.4546 28.3417C30.3583 28.006 31.6294 26.1907 31.2937 24.2871C30.958 22.3835 29.1427 21.1124 27.2391 21.448C25.3355 21.7837 24.0644 23.599 24.4 25.5026C24.7357 27.4063 26.551 28.6773 28.4546 28.3417Z"})}),model:p("svg",{width:"28",height:"23",viewBox:"0 0 28 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.75 0.27279C13.5437 -0.09095 14.4563 -0.0909509 15.25 0.27279L26.25 5.31446C27.3163 5.8032 28 6.86863 28 8.04165V15.3333C28 16.5444 27.2718 17.6367 26.1538 18.1025L15.1538 22.6859C14.4154 22.9936 13.5846 22.9936 12.8462 22.6859L1.84615 18.1025C0.728214 17.6367 0 16.5444 0 15.3333V8.04165C0 6.86863 0.683678 5.8032 1.75004 5.31446L12.75 0.27279ZM14 4.10002L6.92266 7.3438L14 10.2391L21.0773 7.3438L14 4.10002ZM24 10.4699V14.6666L16 18V13.7427L24 10.4699ZM12 13.7427L4 10.4699V14.6666L12 18V13.7427Z"})}),pack_mcmeta:p("svg",{width:"28",height:"31",viewBox:"0 0 28 31",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.25 0.872837C14.4563 0.509096 13.5437 0.509097 12.75 0.872837L1.75004 5.9145C0.683678 6.40325 0 7.46867 0 8.6417V23.3333C0 24.5444 0.728212 25.6368 1.84615 26.1026L12.8462 30.6859C13.5846 30.9936 14.4154 30.9936 15.1538 30.6859L26.1538 26.1026C27.2718 25.6368 28 24.5444 28 23.3333V8.6417C28 7.46867 27.3163 6.40325 26.25 5.9145L15.25 0.872837ZM11.8374 5.69126L14 4.70006L21.0773 7.94384L18.8225 8.86629L11.8374 5.69126ZM9.4308 6.79428L6.92266 7.94384L14 10.8391L16.2787 9.90694L9.4308 6.79428ZM24 22.6667V11.07L16 14.3427V26L24 22.6667ZM4 11.07L12 14.3427V26L4 22.6667V11.07Z"})}),predicate:p("svg",{width:"24",height:"22",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{d:"M22 0H2C1.17595 0 0.705573 0.940764 1.2 1.6L8.8 11.7333C8.92982 11.9064 9 12.117 9 12.3333V20.382C9 21.1253 9.78231 21.6088 10.4472 21.2764L14.4472 19.2764C14.786 19.107 15 18.7607 15 18.382V12.3333C15 12.117 15.0702 11.9064 15.2 11.7333L22.8 1.6C23.2944 0.940764 22.824 0 22 0Z"})}),recipe:p("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 2H12V10L20 10V2ZM10 2V10H2V4C2 2.89543 2.89543 2 4 2H10ZM2 20L2 12H10V20H2ZM2 22L2 28C2 29.1046 2.89543 30 4 30H10V22H2ZM12 22V30H20V22L12 22ZM22 22V30H28C29.1046 30 30 29.1046 30 28V22H22ZM30 20V12H22V20H30ZM20 20L12 20V12L20 12V20ZM30 4V10H22V2H28C29.1046 2 30 2.89543 30 4ZM4 0C1.79086 0 0 1.79086 0 4V28C0 30.2091 1.79086 32 4 32H28C30.2091 32 32 30.2091 32 28V4C32 1.79086 30.2091 0 28 0H4Z"})}),"tag/block":vi,"tag/entity_type":vi,"tag/fluid":vi,"tag/game_event":vi,"tag/item":vi,"tag/worldgen/biome":vi,text_component:p("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V21C32 23.2091 30.2091 25 28 25H17L9.66436 31.5206C9.01946 32.0938 8 31.636 8 30.7732V25H4C1.79086 25 0 23.2091 0 21V4ZM2.46875 20H6.24716L7.20402 16.946H12.2272L13.1861 20H16.9645L12.0568 5.45455H7.37642L2.46875 20ZM11.3888 14.2756L9.76989 9.11932H9.65625L8.04072 14.2756H11.3888ZM19.7521 19.8366C20.2919 20.0687 20.9098 20.1847 21.6058 20.1847C22.1125 20.1847 22.567 20.1207 22.9695 19.9929C23.3767 19.8651 23.7294 19.6733 24.0277 19.4176C24.3307 19.1619 24.5793 18.8494 24.7734 18.4801H24.8587V20H28.1257V12.5852C28.1257 12.0076 28.005 11.4938 27.7635 11.044C27.5268 10.5942 27.1906 10.2154 26.755 9.90767C26.3194 9.59517 25.808 9.35843 25.2209 9.19744C24.6338 9.03172 23.9922 8.94886 23.2962 8.94886C22.3208 8.94886 21.4851 9.10038 20.7891 9.40341C20.0978 9.7017 19.5533 10.1136 19.1555 10.6392C18.7625 11.16 18.5187 11.7519 18.424 12.4148L21.6271 12.5284C21.7029 12.178 21.8804 11.9034 22.1598 11.7045C22.4392 11.5057 22.8085 11.4062 23.2678 11.4062C23.6939 11.4062 24.0324 11.5057 24.2834 11.7045C24.5343 11.9034 24.6598 12.1851 24.6598 12.5497V12.5852C24.6598 12.8078 24.5722 12.9806 24.397 13.1037C24.2266 13.2221 23.9519 13.3144 23.5732 13.3807C23.1944 13.4422 22.6948 13.5014 22.0746 13.5582C21.5206 13.6056 20.9998 13.6979 20.5121 13.8352C20.0244 13.9678 19.5935 14.1643 19.2195 14.4247C18.8454 14.6851 18.5518 15.0237 18.3388 15.4403C18.1257 15.857 18.0192 16.3684 18.0192 16.9744C18.0192 17.6941 18.1731 18.2931 18.4808 18.7713C18.7933 19.2448 19.2171 19.5999 19.7521 19.8366ZM23.6868 17.6847C23.3885 17.8362 23.0523 17.9119 22.6783 17.9119C22.2805 17.9119 21.9515 17.8172 21.6911 17.6278C21.4354 17.4384 21.3075 17.1638 21.3075 16.804C21.3075 16.5672 21.3667 16.3636 21.4851 16.1932C21.6082 16.018 21.7834 15.8759 22.0107 15.767C22.2427 15.6581 22.522 15.5777 22.8487 15.5256C23.0097 15.5019 23.1778 15.4759 23.353 15.4474C23.5282 15.419 23.6986 15.3859 23.8643 15.348C24.0301 15.3101 24.1816 15.2699 24.3189 15.2273C24.4609 15.1847 24.5817 15.1373 24.6811 15.0852V16.1222C24.6811 16.4773 24.5911 16.7898 24.4112 17.0597C24.2313 17.3248 23.9898 17.5331 23.6868 17.6847Z"})}),world:p("svg",{width:"28",height:"29",viewBox:"0 0 28 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 2C6 0.895431 6.89543 0 8 0H10C11.1046 0 12 0.895431 12 2V4C12 5.10457 11.1046 6 10 6V10.5688C10.2875 10.9298 10.5816 11.3478 10.8939 11.7915L10.8939 11.7916C11.5 12.6529 12.1742 13.6111 13 14.4368C13.8636 15.3004 15.3471 15.813 17 15.9652V12C15.8954 12 15 11.1046 15 10V8C15 6.89543 15.8954 6 17 6H19C20.1046 6 21 6.89543 21 8V10C21 11.1046 20.1046 12 19 12V15.8819C20.1705 15.6766 21.362 15.2558 22 14.9368C23 14.4368 26 14 28 14.4368V20C28 22.2091 26.2091 24 24 24H8C5.79086 24 4 22.2091 4 20V9C5.38919 8.65271 6.77837 8.54664 8 9.01691V6C6.89543 6 6 5.10457 6 4V2ZM22 26.2968H6C3.79086 26.2968 2 24.5059 2 22.2968V13C1.34604 13.0169 0.673018 13.1285 0 13.2968V24.2968C0 26.5059 1.79086 28.2968 4 28.2968H20C21.6222 28.2968 23.0189 27.3311 23.6465 25.9433C23.1444 26.1704 22.5869 26.2968 22 26.2968Z"})}),worldgen:p("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 0C2.89543 0 2 0.89543 2 2V4C2 5.10457 2.89543 6 4 6V9.01691C2.77837 8.54664 1.38919 8.65271 0 9V20C0 22.2091 1.79086 24 4 24H20C22.2091 24 24 22.2091 24 20V14.4368C22 14 19 14.4368 18 14.9368C17.362 15.2558 16.1705 15.6766 15 15.8819V12C16.1046 12 17 11.1046 17 10V8C17 6.89543 16.1046 6 15 6H13C11.8954 6 11 6.89543 11 8V10C11 11.1046 11.8954 12 13 12V15.9652C11.3471 15.813 9.86362 15.3004 9 14.4368C8.17424 13.6111 7.50001 12.6529 6.8939 11.7916L6.89388 11.7916L6.89388 11.7916L6.89385 11.7915C6.58163 11.3478 6.28748 10.9298 6 10.5688V6C7.10457 6 8 5.10457 8 4V2C8 0.895431 7.10457 0 6 0H4Z"})}),"worldgen/biome":p("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 1C7 0.447715 7.44772 0 8 0C8.55229 0 9 0.447715 9 1V3C9 3.55228 8.55229 4 8 4C7.44772 4 7 3.55228 7 3V1ZM20.5 21H22.5C23.2136 21 23.6975 20.2741 23.4231 19.6154L19.9231 11.2154C19.5812 10.3949 18.4188 10.3949 18.0769 11.2154L14.5769 19.6154C14.3025 20.2741 14.7864 21 15.5 21H17.5V24H20.5V21ZM16 8C16 7.44772 15.5523 7 15 7H13C12.4477 7 12 7.44772 12 8C12 8.55228 12.4477 9 13 9H15C15.5523 9 16 8.55229 16 8ZM14.4142 13C14.8047 13.3905 14.8047 14.0237 14.4142 14.4142C14.0237 14.8047 13.3905 14.8047 13 14.4142L11.5858 13C11.1953 12.6095 11.1953 11.9763 11.5858 11.5858C11.9763 11.1953 12.6095 11.1953 13 11.5858L14.4142 13ZM4 8C4 7.44772 3.55228 7 3 7H1C0.447715 7 0 7.44772 0 8C0 8.55228 0.447715 9 1 9H3C3.55228 9 4 8.55229 4 8ZM4.41422 3C4.80474 3.39053 4.80474 4.02369 4.41422 4.41421C4.02369 4.80474 3.39053 4.80474 3 4.41421L1.58579 3C1.19526 2.60948 1.19526 1.97631 1.58579 1.58579C1.97631 1.19526 2.60948 1.19526 3 1.58579L4.41422 3ZM8 16C8.55229 16 9 15.5523 9 15V13C9 12.4477 8.55229 12 8 12C7.44772 12 7 12.4477 7 13L7 15C7 15.5523 7.44772 16 8 16ZM3 14.4142C2.60947 14.8047 1.97631 14.8047 1.58579 14.4142C1.19526 14.0237 1.19526 13.3905 1.58579 13L3 11.5858C3.39052 11.1953 4.02369 11.1953 4.41421 11.5858C4.80474 11.9763 4.80474 12.6095 4.41421 13L3 14.4142ZM14.4142 1.58579C14.0237 1.19526 13.3905 1.19526 13 1.58579L11.5858 3C11.1953 3.39053 11.1953 4.02369 11.5858 4.41422C11.9763 4.80474 12.6095 4.80474 13 4.41422L14.4142 3C14.8047 2.60948 14.8047 1.97631 14.4142 1.58579ZM7 5C5.89543 5 5 5.89543 5 7V9C5 10.1046 5.89543 11 7 11H9C10.1046 11 11 10.1046 11 9V7C11 5.89543 10.1046 5 9 5H7Z"})}),"worldgen/configured_carver":N("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p("path",{d:"M20 24H4C1.79086 24 0 22.2091 2.47955e-06 20L3.09944e-06 19C1.5 20.5 4.5 22 7 21.5C9.5 21 10 19.7806 10 17.5C10 15 9.17881 12.9285 11.5 12C14 11 16 17 18.5 17.5C20.5 17.9 23 15.3333 24 14.5V20C24 22.2091 22.2091 24 20 24Z"}),p("path",{d:"M24 4V8C22.1667 9.66667 20.1125 11.8062 18.5 11C16.5 10 14 9 11.5 8.5C10.5194 8.30388 8.5 9 7.5 11C6.5 13 7.5 14.5 6.5 15.5C5.5 16.5 4.5 17 3.5 16C2.05778 14.5578 2 13 0 12.5L2.10762e-06 4C2.65539e-06 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4Z"})]}),"worldgen/configured_feature":p("svg",{width:"11",height:"18",viewBox:"0 0 11 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 2C0 0.89543 0.895431 0 2 0H7C8.10457 0 9 0.895431 9 2V4C10.1046 4 11 4.89543 11 6V8C11 9.10457 10.1046 10 9 10H7C6.63571 10 6.29417 9.90261 6 9.73244L6 18H3V15H1C0.447715 15 0 14.5523 0 14V12C0 11.4477 0.447715 11 1 11H3L3 9H2C0.89543 9 0 8.10457 0 7V2Z"})}),"worldgen/configured_structure_feature":bf,"worldgen/configured_surface_builder":p("svg",{width:"24",height:"20",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.21953 2.06398C0.59354 2.14445 0 1.68765 0 1.0565C0 0.611334 0.302132 0.217946 0.74016 0.138531C2.48644 -0.178075 4.18528 -0.0156892 5.5 1.29904C5.94949 1.74852 6.39898 2.38729 6.89388 3.09058L6.89388 3.09059C7.5 3.95195 8.17424 4.91009 9 5.73586C9.9499 6.68575 11.6497 7.21092 13.5 7.29903C15 7.37046 17.078 6.69683 18 6.23586C18.8772 5.79726 21.2934 5.40727 23.2235 5.61295C23.6802 5.66162 24 6.06324 24 6.52248C24 7.14603 23.4206 7.61579 22.7982 7.57749C20.9522 7.46389 18.8138 7.82895 18 8.23586C17.078 8.69683 15 9.37046 13.5 9.29904C11.6497 9.21092 9.9499 8.68575 9 7.73586C8.17424 6.91009 7.5 5.95195 6.89388 5.09059L6.89388 5.09059L6.89387 5.09058C6.39898 4.38729 5.94949 3.74852 5.5 3.29904C4.30594 2.10498 2.79505 1.86144 1.21953 2.06398ZM4 19.299H20C22.2091 19.299 24 17.5082 24 15.299V9.73586C22 9.29903 19 9.73586 18 10.2359C17.078 10.6968 15 11.3705 13.5 11.299C11.6497 11.2109 9.9499 10.6858 9 9.73586C8.17423 8.91009 7.5 7.95194 6.89388 7.09058C6.39898 6.38729 5.94949 5.74852 5.5 5.29903C4 3.79903 2 3.79904 0 4.29903V15.299C0 17.5082 1.79086 19.299 4 19.299Z"})}),"worldgen/density_function":p("svg",{width:"24",height:"19",viewBox:"0 0 24 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.99999 19C3.44771 19 2.99999 18.5523 2.99999 18V16H0.999994C0.447709 16 -6.40123e-06 15.5523 -6.40123e-06 15C-6.40123e-06 14.4477 0.447709 14 0.999994 14H2.99999V6.50898C2.73742 6.59875 2.44791 6.71456 2.12858 6.86194C1.3764 7.2091 0.485216 6.88077 0.138056 6.12859C-0.209103 5.37641 0.11923 4.48522 0.871408 4.13806C1.62438 3.79054 2.33177 3.5433 2.99999 3.39632V1C2.99999 0.447716 3.44771 0 3.99999 0C4.55228 0 4.99999 0.447716 4.99999 1V3.2668C5.19676 3.28855 5.38996 3.32136 5.57983 3.36522C6.95063 3.68192 7.87758 4.51535 8.55369 5.26846C8.81818 5.56308 9.07365 5.88025 9.29728 6.15788L9.29731 6.15792C9.35241 6.22632 9.40557 6.29232 9.45646 6.35499C9.73181 6.69411 9.96489 6.96732 10.2004 7.19234C10.6367 7.60933 11.0034 7.79103 11.5 7.79103C13.4431 7.79103 14.7031 7.02516 16.2234 6.10111L16.4096 5.988C18.0133 5.01523 19.9627 3.89955 22.8254 4.53572C23.6341 4.71543 24.144 5.51669 23.9643 6.32539C23.7846 7.13409 22.9833 7.64399 22.1746 7.46428C20.5373 7.10044 19.4867 7.63028 17.9654 8.55302C17.8762 8.60715 17.7854 8.66264 17.6929 8.71915C16.2113 9.62479 14.3033 10.791 11.5 10.791C9.99661 10.791 8.92576 10.1238 8.12775 9.36127C7.74604 8.99651 7.41271 8.59727 7.12751 8.24603C7.06056 8.16357 6.99674 8.0844 6.93508 8.00791L6.9348 8.00757C6.71743 7.73792 6.52696 7.50165 6.3213 7.27257C5.84352 6.74037 5.44831 6.44194 4.99999 6.31296V14H23C23.5523 14 24 14.4477 24 15C24 15.5523 23.5523 16 23 16H4.99999V18C4.99999 18.5523 4.55228 19 3.99999 19Z"})}),"worldgen/flat_level_generator_preset":p("svg",{width:"24",height:"22",viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 0C3.89543 0 3 0.895431 3 2V4C3 5.10457 3.89543 6 5 6V10H1C0.447715 10 0 10.4477 0 11C0 11.5523 0.447716 12 1 12H23C23.5523 12 24 11.5523 24 11C24 10.4477 23.5523 10 23 10H7V6C8.10457 6 9 5.10457 9 4V2C9 0.895431 8.10457 0 7 0H5ZM0 15C0 14.4477 0.447715 14 1 14H23C23.5523 14 24 14.4477 24 15V21C24 21.5523 23.5523 22 23 22H1C0.447716 22 0 21.5523 0 21V15Z"})}),"worldgen/noise":p("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 0H5C7 5 3 8 0 8V25.5C2.5 31 6.64628 28.2245 11 23C13.5 20 18 19 17.5 32H28C30.2091 32 32 30.2091 32 28V21.5C27.754 23.044 24.104 20.4161 21.05 18.2174C20.148 17.568 19.298 16.956 18.5 16.5C15 14.5 17.953 6.1094 23.5 5C25.2216 4.65569 25.5205 4.78558 27.6624 5.71624C28.6308 6.13704 29.9761 6.72157 32 7.5V4C32 1.79086 30.2091 0 28 0ZM8.5 11.5C7.5 11 6.5 10.5 5 12C2.87868 14.1213 3.5 19.5 6.5 19C9.5 18.5 10 16 10 14.5C10 13.3 9.13246 11.8162 8.5 11.5Z"})}),"worldgen/noise_settings":p("svg",{width:"24",height:"19",viewBox:"0 0 24 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{d:"M20 18.299H4C1.79086 18.299 0 16.5082 0 14.299V3.29904C1.5 1 3.5 -1.5 6 2C7 3.4 7.5 7.23586 9 8.73586C9.9499 9.68576 11.3494 10.3408 13 9.5C14.5 8.73586 15 7 16.5 6.5C18.091 5.96967 22 8.29904 24 8.73586V14.299C24 16.5082 22.2091 18.299 20 18.299Z"})}),"worldgen/placed_feature":p("svg",{width:"15",height:"20",viewBox:"0 0 15 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11 0C9.89543 0 9 0.89543 9 2V4C9 5.10457 9.89543 6 11 6V9H10C8.89543 9 8 9.89543 8 11V13C8 14.1046 8.89543 15 10 15V19.5H12V15C13.1046 15 14 14.1046 14 13V11C14 10.2597 13.5978 9.61337 13 9.26756V6C14.1046 6 15 5.10457 15 4V2C15 0.895431 14.1046 0 13 0H11ZM2 5C0.895431 5 0 5.89543 0 7V9C0 10.1046 0.89543 11 2 11L2 15.5H4V11C5.10457 11 6 10.1046 6 9V7C6 5.89543 5.10457 5 4 5H2Z"})}),"worldgen/processor_list":p("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.21973 0H4C1.79086 0 0 1.79086 0 4V5.82578L4.72912 3.27934L6.21973 0ZM0 8.0973V11H16.9613L17.9149 6.09189L11.6129 0H8.41664L6.48011 4.26037C6.34438 4.55898 6.11451 4.80487 5.82571 4.96037L5.43726 5.16954L7.99614 6.63176C8.47566 6.90577 8.64226 7.51662 8.36825 7.99614C8.09424 8.47566 7.48338 8.64225 7.00387 8.36824L3.50386 6.36824C3.45778 6.34191 3.41458 6.31246 3.37439 6.28032L0 8.0973ZM14.4905 0L17.5131 2.92179L19.4556 1.66116C19.9189 1.36051 20.5382 1.49235 20.8388 1.95563C21.1395 2.41891 21.0077 3.03819 20.5444 3.33884L18.9888 4.34834L19.5 4.84246C19.8649 5.19527 20.0267 5.70872 19.9299 6.20702L18.9987 11H24V4C24 1.79086 22.2091 0 20 0H14.4905ZM3.94591 14H0V20C0 22.2091 1.79086 24 4 24H11V19.1801L6.54232 18.1514L4.89443 21.4472C4.64744 21.9412 4.04677 22.1414 3.55279 21.8944C3.05881 21.6474 2.85859 21.0468 3.10558 20.5528L4.92033 16.9233L3.94591 14ZM11 17.1276V14H6.0541L6.77134 16.1517L11 17.1276ZM21.6247 17.7809C22.056 17.4359 22.1259 16.8066 21.7809 16.3753C21.4359 15.944 20.8066 15.8741 20.3753 16.2191L18.0071 18.1137C17.7506 18.3189 17.5686 18.6026 17.4889 18.9212L16.2192 24H14V14H24V20C24 22.2091 22.2091 24 20 24H18.2808L19.3883 19.57L21.6247 17.7809Z"})}),"worldgen/structure":bf,"worldgen/structure_set":p("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11 4L9.5376 4C9.05336 4 8.85189 3.38045 9.24351 3.09563L13.2059 0.21388C13.3812 0.0863707 13.6188 0.0863706 13.7941 0.21388L17.7565 3.09563C18.1481 3.38045 17.9467 4 17.4624 4L16 4V7C16 7.55228 15.5523 8 15 8H12C11.4477 8 11 7.55228 11 7V4ZM8.46241 7H0.537581C0.0533412 7 -0.148129 6.38045 0.243493 6.09563L4.2059 3.21388C4.38123 3.08637 4.61875 3.08637 4.79407 3.21388L8.75649 6.09563C9.14812 6.38045 8.94665 7 8.46241 7ZM6.99999 10V7H1.99999V10C1.99999 10.5523 2.4477 11 2.99999 11H5.99999C6.55227 11 6.99999 10.5523 6.99999 10ZM9.99999 17V14H8.5376C8.05336 14 7.85189 13.3804 8.24351 13.0956L12.2059 10.2139C12.3812 10.0864 12.6188 10.0864 12.7941 10.2139L16.7565 13.0956C17.1481 13.3804 16.9467 14 16.4624 14H15V17C15 17.5523 14.5523 18 14 18H11C10.4477 18 9.99999 17.5523 9.99999 17Z"})}),"worldgen/template_pool":p("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2361 5C10.7111 4.46924 11 3.76835 11 3C11 1.34315 9.65685 0 8 0C6.34315 0 5 1.34315 5 3C5 3.76835 5.28885 4.46924 5.76389 5H3C1.34315 5 0 6.34315 0 8V10.1707C0.312779 10.0602 0.649365 10 1 10C2.65685 10 4 11.3431 4 13C4 14.6569 2.65685 16 1 16C0.649365 16 0.312779 15.9398 0 15.8293V18C0 19.6569 1.34315 21 3 21H5.17071C5.06015 20.6872 5 20.3506 5 20C5 18.3431 6.34315 17 8 17C9.65685 17 11 18.3431 11 20C11 20.3506 10.9398 20.6872 10.8293 21H13C14.6569 21 16 19.6569 16 18V15.8293C16.3128 15.9398 16.6494 16 17 16C18.6569 16 20 14.6569 20 13C20 11.3431 18.6569 10 17 10C16.6494 10 16.3128 10.0602 16 10.1707V8C16 6.34315 14.6569 5 13 5H10.2361Z"})}),"worldgen/world_preset":p("svg",{width:"28",height:"23",viewBox:"0 0 28 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 2C15 0.89543 15.8954 0 17 0H19C20.1046 0 21 0.895431 21 2V4C21 5.10457 20.1046 6 19 6V9.88192C20.1705 9.67661 21.362 9.2558 22 8.93682C23 8.43682 26 8 28 8.43682V14C28 16.2091 26.2091 18 24 18H8C5.79086 18 4 16.2091 4 14V3C6 2.50001 8 2.5 9.5 4C9.94949 4.44949 10.399 5.08825 10.8939 5.79154L10.8939 5.79155C11.5 6.65291 12.1742 7.61106 13 8.43682C13.8636 9.30044 15.3471 9.81299 17 9.96519V6C15.8954 6 15 5.10457 15 4V2ZM22 20.2968H6C3.79086 20.2968 2 18.5059 2 16.2968V7C1.34604 7.01691 0.673018 7.12855 0 7.2968V18.2968C0 20.5059 1.79086 22.2968 4 22.2968H20C21.6222 22.2968 23.0189 21.3311 23.6465 19.9433C23.1444 20.1704 22.5869 20.2968 22 20.2968Z"})})};function $9({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:o,onEdit:a,onDelete:s,delayedPlay:l}){const{locale:d}=Ae(),{version:c}=qt(),[u,f]=Y(!0),[h,w]=Y(!1),[_,g]=Y(!1),m=Me([]),v=`playsound minecraft:${n} master @s ~ ~ ~ ${o} ${i}`;me(()=>{var S,T,z;const M=t[n];g(((T=(S=M==null?void 0:M.sounds)==null?void 0:S.length)!=null?T:0)===0),m.current.forEach(F=>F.stop()),m.current=((z=M==null?void 0:M.sounds)!=null?z:[]).map(F=>{const R=typeof F=="string"?F:F.name,V=mv(c,R),L=e({src:[V],format:["ogg"],volume:o,rate:i});L.on("end",()=>{w(!1)});const j=()=>{u&&m.current.every(Z=>Z.state()==="loaded")&&f(!1)};return L.state()==="loaded"?setTimeout(()=>j()):L.on("load",()=>{j()}),L}),f(!0)},[n,t]),me(()=>{m.current.forEach(M=>M.rate(i))},[i]),me(()=>{m.current.forEach(M=>M.volume(o))},[o]);const x=()=>{if(u||_)return;b();const M=Math.floor(Math.random()*m.current.length);m.current[M].play(),w(!0)},b=()=>{m.current.forEach(M=>M.stop())};me(()=>{l&&setTimeout(()=>x(),r*50)},[l]),me(()=>()=>b(),[]);const[y,k]=Y(!1),C=Me(void 0),E=()=>{navigator.clipboard.writeText(v),k(!0),C.current!==void 0&&clearTimeout(C.current),C.current=setTimeout(()=>{k(!1)},2e3)};return N("div",{class:`sound-config${u?" loading":h?" playing":""}${_?" invalid":""}`,children:[p(ae,{class:"play",icon:_?"alert":u?"sync":"play",label:d("sounds.play"),onClick:x,tooltip:d(_?"sounds.unknown_sound":u?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),p(wn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:M=>a({sound:M})}),N("label",{class:"delay-label",children:[d("sounds.delay"),": "]}),p(Ts,{class:"btn btn-input delay",min:0,value:r,onChange:M=>a({delay:M})}),N("label",{class:"pitch-label",children:[d("sounds.pitch"),": "]}),p(Z1,{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=>a({pitch:M})}),N("label",{class:"volume-label",children:[d("sounds.volume"),": "]}),p(Z1,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":o.toFixed(2),style:`--x: ${o*100}%`,value:o,onChange:M=>a({volume:M})}),p(ae,{class:`copy${y?" active":""}`,icon:y?"check":"terminal",label:d("copy"),tooltip:d(y?"copied":"sounds.copy_command"),onClick:E}),p(ae,{class:"remove",icon:"trashcan",tooltip:d("sounds.remove_sound"),onClick:()=>{s(),b()}})]})}function tr({title:e,desc:t,link:n,icon:r,titleIcon:i}){return r||t?N("a",{class:"tool-card",href:n,children:[r&&Ji[r],N("div",{children:[p(xf,{title:e,titleIcon:i}),p("p",{children:t})]})]}):p("a",{class:"tool-card",href:n,children:p(xf,{title:e,titleIcon:i})})}function xf({title:e,titleIcon:t}){return N("h3",{children:[e,t&&(t in ue?ue[t]:Ji[t])]})}function Ir({title:e,titleIcon:t,link:n,children:r}){return N("div",{class:"tool-group",children:[n===void 0?p("div",{class:"tool-card",children:p("h3",{children:e})}):p(tr,{title:e,titleIcon:t,link:n}),r&&p("div",{class:"tool-body",children:r})]})}function ao({label:e,active:t,onClick:n}){const r=e==="breaking"?5:Vp(e)%360;return N("div",{class:`badge${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n,children:[e==="breaking"&&ue.alert,e]})}function Og(){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 so=Og();function B9(e){so=e}const z9=/[&<>"']/,j9=/[&<>"']/g,V9=/[<>"']|&(?!#?\w+;)/,U9=/[<>"']|&(?!#?\w+;)/g,H9={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yf=e=>H9[e];function pt(e,t){if(t){if(z9.test(e))return e.replace(j9,yf)}else if(V9.test(e))return e.replace(U9,yf);return e}const Z9=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Ng(e){return e.replace(Z9,(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 G9=/(^|[^\[])\^/g;function qe(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(G9,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const Y9=/[^\w:]/g,W9=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function kf(e,t,n){if(e){let r;try{r=decodeURIComponent(Ng(n)).replace(Y9,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!W9.test(n)&&(n=J9(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Ua={},q9=/^[^:]+:\/*[^/]*$/,X9=/^([^:]+:)[\s\S]*$/,K9=/^([^:]+:\/*[^/]*)[\s\S]*$/;function J9(e,t){Ua[" "+e]||(q9.test(e)?Ua[" "+e]=e+"/":Ua[" "+e]=ms(e,"/",!0)),e=Ua[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(X9,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(K9,"$1")+t:e+t}const Gs={exec:function(){}};function bn(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 Cf(e,t){const n=e.replace(/\|/g,(o,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)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 ms(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.substr(0,r-i)}function Q9(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 Rg(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 Ef(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Af(e,t,n,r){const i=t.href,o=t.title?pt(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const s={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a,[])};return r.state.inLink=!1,s}else return{type:"image",raw:n,href:i,title:o,text:pt(a)}}function ey(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(`
`)}class Kd{constructor(t){this.options=t||so}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:ms(r,`
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=ey(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim():n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=ms(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,o,a,s,l,d,c,u,f,h,w,_=n[1].trim();const g=_.length>1,m={type:"list",raw:"",ordered:g,start:g?+_.slice(0,-1):"",loose:!1,items:[]};_=g?`\\d{1,9}\\${_.slice(-1)}`:`\\${_}`,this.options.pedantic&&(_=g?_:"[*+-]");const v=new RegExp(`^( {0,3}${_})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(w=!1,!(!(n=v.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
`,1)[0],u=t.split(`
`,1)[0],this.options.pedantic?(a=2,h=c.trimLeft()):(a=n[2].search(/[^ ]/),a=a>4?1:a,h=c.slice(a),a+=n[1].length),l=!1,!c&&/^ *$/.test(u)&&(r+=u+`
`,t=t.substring(u.length+1),w=!0),!w){const b=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(f=t.split(`
`,1)[0],c=f,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c));){if(c.search(/[^ ]/)>=a||!c.trim())h+=`
`+c.slice(a);else if(!l)h+=`
`+c;else break;!l&&!c.trim()&&(l=!0),r+=f+`
`,t=t.substring(f.length+1)}}m.loose||(d?m.loose=!0:/\n *\n *$/.test(r)&&(d=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(h),i&&(o=i[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),m.items.push({type:"list_item",raw:r,task:!!i,checked:o,loose:!1,text:h}),m.raw+=r}m.items[m.items.length-1].raw=r.trimRight(),m.items[m.items.length-1].text=h.trimRight(),m.raw=m.raw.trimRight();const x=m.items.length;for(s=0;s<x;s++){this.lexer.state.top=!1,m.items[s].tokens=this.lexer.blockTokens(m.items[s].text,[]);const b=m.items[s].tokens.filter(k=>k.type==="space"),y=b.every(k=>{const C=k.raw.split("");let E=0;for(const M of C)if(M===`
`&&(E+=1),E>1)return!0;return!1});!m.loose&&b.length&&y&&(m.loose=!0,m.items[s].loose=!0)}return m}}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]):pt(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:Cf(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,o,a,s,l;for(o=0;o<i;o++)/^ *-+: *$/.test(r.align[o])?r.align[o]="right":/^ *:-+: *$/.test(r.align[o])?r.align[o]="center":/^ *:-+ *$/.test(r.align[o])?r.align[o]="left":r.align[o]=null;for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=Cf(r.rows[o],r.header.length).map(d=>({text:d}));for(i=r.header.length,a=0;a<i;a++)r.header[a].tokens=[],this.lexer.inlineTokens(r.header[a].text,r.header[a].tokens);for(i=r.rows.length,a=0;a<i;a++)for(l=r.rows[a],s=0;s<l.length;s++)l[s].tokens=[],this.lexer.inlineTokens(l[s].text,l[s].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:pt(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]):pt(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 a=ms(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=Q9(n[2],"()");if(a>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],o=a[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),Af(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i||!i.href){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return Af(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(r===""||this.rules.inline.punctuation.exec(r))){const a=i[0].length-1;let s,l,d=a,c=0;const u=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,n=n.slice(-1*t.length+a);(i=u.exec(n))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(l=s.length,i[3]||i[4]){d+=l;continue}else if((i[5]||i[6])&&a%3&&!((a+l)%3)){c+=l;continue}if(d-=l,d>0)continue;if(l=Math.min(l,l+d+c),Math.min(a,l)%2){const h=t.slice(1,a+i.index+l);return{type:"em",raw:t.slice(0,a+i.index+l+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}const f=t.slice(2,a+i.index+l-1);return{type:"strong",raw:t.slice(0,a+i.index+l+1),text:f,tokens:this.lexer.inlineTokens(f,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=pt(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2],[])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=pt(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=pt(r[1]),o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=pt(this.options.mangle?n(r[0]):r[0]),o="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(a!==r[0]);i=pt(r[0]),r[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):pt(r[0]):r[0]:i=pt(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const fe={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:Gs,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};fe._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;fe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;fe.def=qe(fe.def).replace("label",fe._label).replace("title",fe._title).getRegex();fe.bullet=/(?:[*+-]|\d{1,9}[.)])/;fe.listItemStart=qe(/^( *)(bull) */).replace("bull",fe.bullet).getRegex();fe.list=qe(fe.list).replace(/bull/g,fe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+fe.def.source+")").getRegex();fe._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";fe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;fe.html=qe(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();fe.paragraph=qe(fe._paragraph).replace("hr",fe.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",fe._tag).getRegex();fe.blockquote=qe(fe.blockquote).replace("paragraph",fe.paragraph).getRegex();fe.normal=bn({},fe);fe.gfm=bn({},fe.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});fe.gfm.table=qe(fe.gfm.table).replace("hr",fe.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",fe._tag).getRegex();fe.gfm.paragraph=qe(fe._paragraph).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",fe.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",fe._tag).getRegex();fe.pedantic=bn({},fe.normal,{html:qe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fe._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:Gs,paragraph:qe(fe.normal._paragraph).replace("hr",fe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",fe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const re={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Gs,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:Gs,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};re._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";re.punctuation=qe(re.punctuation).replace(/punctuation/g,re._punctuation).getRegex();re.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;re.escapedEmSt=/\\\*|\\_/g;re._comment=qe(fe._comment).replace("(?:-->|$)","-->").getRegex();re.emStrong.lDelim=qe(re.emStrong.lDelim).replace(/punct/g,re._punctuation).getRegex();re.emStrong.rDelimAst=qe(re.emStrong.rDelimAst,"g").replace(/punct/g,re._punctuation).getRegex();re.emStrong.rDelimUnd=qe(re.emStrong.rDelimUnd,"g").replace(/punct/g,re._punctuation).getRegex();re._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;re._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;re._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])?)+(?![-_])/;re.autolink=qe(re.autolink).replace("scheme",re._scheme).replace("email",re._email).getRegex();re._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;re.tag=qe(re.tag).replace("comment",re._comment).replace("attribute",re._attribute).getRegex();re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;re._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;re.link=qe(re.link).replace("label",re._label).replace("href",re._href).replace("title",re._title).getRegex();re.reflink=qe(re.reflink).replace("label",re._label).replace("ref",fe._label).getRegex();re.nolink=qe(re.nolink).replace("ref",fe._label).getRegex();re.reflinkSearch=qe(re.reflinkSearch,"g").replace("reflink",re.reflink).replace("nolink",re.nolink).getRegex();re.normal=bn({},re);re.pedantic=bn({},re.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:qe(/^!?\[(label)\]\((.*?)\)/).replace("label",re._label).getRegex(),reflink:qe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",re._label).getRegex()});re.gfm=bn({},re.normal,{escape:qe(re.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.!#$%&'*+\/=?_`{\|}~-]+@)))/});re.gfm.url=qe(re.gfm.url,"i").replace("email",re.gfm._extended_email).getRegex();re.breaks=bn({},re.gfm,{br:qe(re.br).replace("{2,}","*").getRegex(),text:qe(re.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function ty(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 Sf(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 ir{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||so,this.options.tokenizer=this.options.tokenizer||new Kd,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:fe.normal,inline:re.normal};this.options.pedantic?(n.block=fe.pedantic,n.inline=re.pedantic):this.options.gfm&&(n.block=fe.gfm,this.options.breaks?n.inline=re.breaks:n.inline=re.gfm),this.tokenizer.rules=n}static get rules(){return{block:fe,inline:re}}static lex(t,n){return new ir(n).lex(t)}static lexInline(t,n){return new ir(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,i,o,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const l=t.slice(1);let d;this.options.extensions.startBlock.forEach(function(c){d=c.call({lexer:this},l),typeof d=="number"&&d>=0&&(s=Math.min(s,d))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],a&&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),a=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,i,o,a=t,s,l,d;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+Ef("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+Ef("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(l||(d=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,a,d)){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,Sf)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,Sf))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const u=t.slice(1);let f;this.options.extensions.startInline.forEach(function(h){f=h.call({lexer:this},u),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o,ty)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(d=r.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Jd{constructor(t){this.options=t||so}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(t,i);o!=null&&o!==t&&(r=!0,t=o)}return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="'+this.options.langPrefix+pt(i,!0)+'">'+(r?t:pt(t,!0))+`</code></pre>
`:"<pre><code>"+(r?t:pt(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
`+t+`</blockquote>
`}html(t){return t}heading(t,n,r,i){return this.options.headerIds?"<h"+n+' id="'+this.options.headerPrefix+i.slug(r)+'">'+t+"</h"+n+`>
`:"<h"+n+">"+t+"</h"+n+`>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(t,n,r){const i=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
`+t+"</"+i+`>
`}listitem(t){return"<li>"+t+`</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+`</p>
`}table(t,n){return n&&(n="<tbody>"+n+"</tbody>"),`<table>
<thead>
`+t+`</thead>
`+n+`</table>
`}tablerow(t){return`<tr>
`+t+`</tr>
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?"<"+r+' align="'+n.align+'">':"<"+r+">")+t+"</"+r+`>
`}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,n,r){if(t=kf(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+pt(t)+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=kf(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 Dg{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 Fg{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 or{constructor(t){this.options=t||so,this.options.renderer=this.options.renderer||new Jd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Dg,this.slugger=new Fg}static parse(t,n){return new or(n).parse(t)}static parseInline(t,n){return new or(n).parseInline(t)}parse(t,n=!0){let r="",i,o,a,s,l,d,c,u,f,h,w,_,g,m,v,x,b,y,k;const C=t.length;for(i=0;i<C;i++){if(h=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(k=this.options.extensions.renderers[h.type].call({parser:this},h),k!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type))){r+=k||"";continue}switch(h.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(h.tokens),h.depth,Ng(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(h.text,h.lang,h.escaped);continue}case"table":{for(u="",c="",s=h.header.length,o=0;o<s;o++)c+=this.renderer.tablecell(this.parseInline(h.header[o].tokens),{header:!0,align:h.align[o]});for(u+=this.renderer.tablerow(c),f="",s=h.rows.length,o=0;o<s;o++){for(d=h.rows[o],c="",l=d.length,a=0;a<l;a++)c+=this.renderer.tablecell(this.parseInline(d[a].tokens),{header:!1,align:h.align[a]});f+=this.renderer.tablerow(c)}r+=this.renderer.table(u,f);continue}case"blockquote":{f=this.parse(h.tokens),r+=this.renderer.blockquote(f);continue}case"list":{for(w=h.ordered,_=h.start,g=h.loose,s=h.items.length,f="",o=0;o<s;o++)v=h.items[o],x=v.checked,b=v.task,m="",v.task&&(y=this.renderer.checkbox(x),g?v.tokens.length>0&&v.tokens[0].type==="paragraph"?(v.tokens[0].text=y+" "+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=y+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:y}):m+=y),m+=this.parse(v.tokens,g),f+=this.renderer.listitem(m,b,x);r+=this.renderer.list(f,w,_);continue}case"html":{r+=this.renderer.html(h.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(h.tokens));continue}case"text":{for(f=h.tokens?this.parseInline(h.tokens):h.text;i+1<C&&t[i+1].type==="text";)h=t[++i],f+=`
`+(h.tokens?this.parseInline(h.tokens):h.text);r+=n?this.renderer.paragraph(f):f;continue}default:{const E='Token with "'+h.type+'" type was not found.';if(this.options.silent){console.error(E);return}else throw new Error(E)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,o,a;const s=t.length;for(i=0;i<s;i++){if(o=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(a=this.options.extensions.renderers[o.type].call({parser:this},o),a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){r+=a||"";continue}switch(o.type){case"escape":{r+=n.text(o.text);break}case"html":{r+=n.html(o.text);break}case"link":{r+=n.link(o.href,o.title,this.parseInline(o.tokens,n));break}case"image":{r+=n.image(o.href,o.title,o.text);break}case"strong":{r+=n.strong(this.parseInline(o.tokens,n));break}case"em":{r+=n.em(this.parseInline(o.tokens,n));break}case"codespan":{r+=n.codespan(o.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(o.tokens,n));break}case"text":{r+=n.text(o.text);break}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}function xe(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=bn({},xe.defaults,t||{}),Rg(t),n){const r=t.highlight;let i;try{i=ir.lex(e,t)}catch(s){return n(s)}const o=function(s){let l;if(!s)try{t.walkTokens&&xe.walkTokens(i,t.walkTokens),l=or.parse(i,t)}catch(d){s=d}return t.highlight=r,s?n(s):n(null,l)};if(!r||r.length<3||(delete t.highlight,!i.length))return o();let a=0;xe.walkTokens(i,function(s){s.type==="code"&&(a++,setTimeout(()=>{r(s.text,s.lang,function(l,d){if(l)return o(l);d!=null&&d!==s.text&&(s.text=d,s.escaped=!0),a--,a===0&&o()})},0))}),a===0&&o();return}try{const r=ir.lex(e,t);return t.walkTokens&&xe.walkTokens(r,t.walkTokens),or.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>"+pt(r.message+"",!0)+"</pre>";throw r}}xe.options=xe.setOptions=function(e){return bn(xe.defaults,e),B9(xe.defaults),xe};xe.getDefaults=Og;xe.defaults=so;xe.use=function(...e){const t=bn({},...e),n=xe.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const a=n.renderers?n.renderers[o.name]:null;a?n.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:n.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[o.level]?n[o.level].unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}o.childTokens&&(n.childTokens[o.name]=o.childTokens)})),i.renderer){const o=xe.defaults.renderer||new Jd;for(const a in i.renderer){const s=o[a];o[a]=(...l)=>{let d=i.renderer[a].apply(o,l);return d===!1&&(d=s.apply(o,l)),d}}t.renderer=o}if(i.tokenizer){const o=xe.defaults.tokenizer||new Kd;for(const a in i.tokenizer){const s=o[a];o[a]=(...l)=>{let d=i.tokenizer[a].apply(o,l);return d===!1&&(d=s.apply(o,l)),d}}t.tokenizer=o}if(i.walkTokens){const o=xe.defaults.walkTokens;t.walkTokens=function(a){i.walkTokens.call(this,a),o&&o.call(this,a)}}r&&(t.extensions=n),xe.setOptions(t)})};xe.walkTokens=function(e,t){for(const n of e)switch(t.call(xe,n),n.type){case"table":{for(const r of n.header)xe.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)xe.walkTokens(i.tokens,t);break}case"list":{xe.walkTokens(n.items,t);break}default:xe.defaults.extensions&&xe.defaults.extensions.childTokens&&xe.defaults.extensions.childTokens[n.type]?xe.defaults.extensions.childTokens[n.type].forEach(function(r){xe.walkTokens(n[r],t)}):n.tokens&&xe.walkTokens(n.tokens,t)}};xe.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=bn({},xe.defaults,t||{}),Rg(t);try{const n=ir.lexInline(e,t);return t.walkTokens&&xe.walkTokens(n,t.walkTokens),or.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>"+pt(n.message+"",!0)+"</pre>";throw n}};xe.Parser=or;xe.parser=or.parse;xe.Renderer=Jd;xe.TextRenderer=Dg;xe.Lexer=ir;xe.lexer=ir.lex;xe.Tokenizer=Kd;xe.Slugger=Fg;xe.parse=xe;or.parse;ir.lex;function Pg({change:e,minimal:t,short:n,activeTags:r,toggleTag:i}){return N(Ld,{overlay:!t&&N(le,{children:[p("a",{class:"changelog-version",href:`/versions/?id=${e.version}`,children:e.version}),p("a",{class:"changelog-version",href:`/versions/?id=${e.group}`,children:e.group})]}),children:[p("div",{class:"badges-list",children:e.tags.map(o=>p(ao,{label:o,onClick:i?()=>i(o):void 0,active:r==null?void 0:r.includes(o)}))}),p("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:xe(n?e.content.split(`
`)[0]:e.content)}})]})}const ny="search";function $g({changes:e,defaultOrder:t,limit:n,navigation:r}){var m,v;const{locale:i}=Ae(),[o,a]=Wr(ny),[s,l]=Gp(),d=Ee(()=>{const x=(o!=null?o:"").split(" ").map(b=>b.trim().toLowerCase()).filter(b=>b.length>0);return x.length===0&&s.length===0?e:e==null?void 0:e.filter(b=>{if(!s.every(k=>b.tags.includes(k)))return!1;const y=`${b.group} ${b.version} ${b.tags.join(" ")} ${b.content.toLowerCase()}`;return x.every(k=>k.startsWith("!")?k.length===1||!y.includes(k.slice(1)):y.includes(k))})},[e,o,s]),[c,u]=Y(t==="desc"),f=Ee(()=>d==null?void 0:d.sort((x,b)=>c?b.order-x.order:x.order-b.order),[d,c]),[h,w]=Y(!0),_=Ee(()=>!h||(n!=null?n:-1)<0?f:f==null?void 0:f.slice(0,n),[f,h,n,c]),g=((m=f==null?void 0:f.length)!=null?m:0)-((v=_==null?void 0:_.length)!=null?v:0);return N(le,{children:[N("div",{class:"navigation",children:[r,p(wn,{class:"btn btn-input query-search",list:"sound-list",placeholder:i("changelog.search"),value:o,onChange:x=>a(x,!0)}),p(ae,{icon:c?"sort_desc":"sort_asc",label:c?"Newest first":"Oldest first",onClick:()=>u(!c)})]}),s.length>0&&p("div",{class:"badges-list",children:s.map(x=>p(ao,{label:x,onClick:()=>l(x)}))}),N("div",{class:"card-column",children:[_===void 0?p(le,{children:p("span",{class:"note",children:i("loading")})}):_.length===0?p(le,{children:p("span",{class:"note",children:i("changelog.no_results")})}):p(le,{children:_.map(x=>p(Pg,{change:x,activeTags:s,toggleTag:l}))}),g>0&&p(ae,{label:i("changelog.show_more",`${g}`),onClick:()=>w(!1)})]})]})}function ry({id:e,version:t}){var l,d;const{locale:n}=Ae(),[r,i]=Y("changelog"),{value:o}=Wt(Nd,[]),a=Ee(()=>o==null?void 0:o.filter(c=>c.version===e||c.group===e),[e,o]),s=t&&dv(t.id);return p(le,{children:N("div",{class:"version-detail",children:[p("h2",{children:(l=t==null?void 0:t.name)!=null?l:e}),p("div",{class:"version-info",children:t?N(le,{children:[p(qn,{label:n("versions.released"),value:Bg(t)}),t.release_target!==null&&p(qn,{label:n("versions.release_target"),value:t.release_target,link:t.id!==t.release_target?`/versions/?id=${t.release_target}`:void 0}),p(qn,{label:n("versions.data_version"),value:t.data_version}),p(qn,{label:n("versions.protocol_version"),value:t.protocol_version}),p(qn,{label:n("versions.data_pack_format"),value:t.data_pack_version}),p(qn,{label:n("versions.resource_pack_format"),value:t.resource_pack_version})]}):((d=a==null?void 0:a.length)!=null?d:0>1)?p("p",{children:"This version is not released yet."}):p("p",{children:"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent."})}),N("div",{class:"version-tabs",children:[p("span",{class:r==="changelog"?"selected":"",onClick:()=>i("changelog"),children:n("versions.technical_changes")}),p("span",{class:r==="discussion"?"selected":"",onClick:()=>i("discussion"),children:n("versions.discussion")}),s&&N("a",{href:s,target:"_blank",children:[n("versions.article"),ue.link_external]})]}),N("div",{class:"version-tab",children:[r==="changelog"&&p($g,{changes:a,defaultOrder:"asc"}),r==="discussion"&&p(Xd,{term:`version/${e}/`})]})]})})}function Bg(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function iy({version:e,link:t}){const{locale:n}=Ae();return N("a",{class:"version-entry",href:t,children:[p("span",{class:"version-id",children:e.id}),p(qn,{label:n("versions.released"),value:Bg(e),compact:!0}),p(qn,{label:n("versions.data_version"),value:e.data_version,optional:!0}),p(qn,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0})]})}const oy="misode_include_snapshots",ay="search";function sy({versions:e,link:t,navigation:n}){const{locale:r}=Ae(),[i,o]=Zp(oy,!0,d=>d==="true",d=>`${d}`),[a,s]=Wr(ay),l=Ee(()=>e==null?void 0:e.filter(d=>d.type==="snapshot"&&!i?!1:d.id.includes(a!=null?a:"")),[e,i,a]);return N(le,{children:[N("div",{class:"navigation",children:[n,p(wn,{class:"btn btn-input query-search",placeholder:r("versions.search"),value:a,onChange:s}),p(Wv,{label:"Include snapshots",value:i,onChange:o})]}),p("div",{class:"version-list",children:l===void 0?p("span",{class:"note",children:r("loading")}):l.length===0?p("span",{class:"note",children:r("versions.no_results")}):l.map(d=>p(iy,{version:d,link:t==null?void 0:t(d.id)}))})]})}function qn({label:e,value:t,link:n,compact:r,optional:i}){return N("div",{class:`version-metadata${i?" version-metadata-hide":""}`,children:[N("span",{class:r?"version-metadata-hide":void 0,children:[e,": "]}),p("span",{class:"version-metadata-value",children:t}),n&&p("a",{href:n,class:"version-metadata-link",children:ue.link_external})]})}function va({value:e,allowed:t,hasAny:n,onChange:r,onAny:i}){const{locale:o}=Ae(),a=Ee(()=>t||Pe.versions.map(s=>s.id).reverse(),[t]);return N(Ot,{class:`version-switcher${He.getVersion()===null?" attention":""}`,icon:"tag",label:e!=null?e:o("any_version"),tooltip:o("switch_version"),children:[n&&p(ae,{label:o("any_version"),onClick:i,active:!e}),a.map(s=>p(ae,{label:s,active:s===e,onClick:()=>r(s)}))]})}function ly({}){const{locale:e}=Ae();vn(e("title.changelog"));const{value:t,error:n}=Wt(Nd,[]);return N("main",{children:[n&&p(Di,{error:n}),p("div",{class:"container changelog",children:p($g,{changes:t,defaultOrder:"desc",limit:100,navigation:p(yo,{link:"/versions/",icon:"three_bars",label:e("versions.all")})})}),p(Bn,{})]})}const mc="share";function cy({}){var W,te,pe;const{locale:e}=Ae(),{version:t,changeVersion:n,changeTargetVersion:r}=qt(),{projects:i,project:o,file:a,updateProject:s,updateFile:l}=$n(),[d,c]=Y(null),[u,f]=sh();if(u)return u.message=`Something went wrong rendering the generator: ${u.message}`,p("main",{children:p(Di,{error:u,onDismiss:f})});const h=Up(Ui());if(!h)return p("main",{children:p(Di,{error:`Cannot find generator "${Ui()}"`})});const w=Ee(()=>Pe.versions.filter(J=>_t(J.id,h.minVersion,h.maxVersion)).map(J=>J.id).reverse(),[h.minVersion,h.maxVersion]);vn(e("title.generator",e(h.partner?`partner.${h.partner}.${h.id}`:h.id)),w),_t(t,h.minVersion)||c(`The minimum version for this generator is ${h.minVersion}`),_t(t,void 0,h.maxVersion)||c(`This generator is not available in versions above ${h.maxVersion}`),me(()=>He.visitGenerator(h.id),[h.id]);const[_,g]=Wr("preset"),[m,v]=Wr(mc),x=Me(!1),b=Ee(()=>He.getBackup(h.id),[h.id]),y=()=>{b!==void 0&&(C==null||C.reset(P.DataModel.wrapLists(b),!1))},{value:k}=Wt(async()=>{let J;if(_&&m)return v(void 0),rs;if(_)J=await j(_);else if(m){const ut=await Tv(m);let bt=!1;if(ut.version&&ut.version!==t&&(n(ut.version,!1),bt=!0),ut.type&&ut.type!==h.id){const sn=Pe.generators.find(Xg=>Xg.id===ut.type);sn&&(ti(`${Cr(sn.url)}?${mc}=${ut.id}`),bt=!0)}if(bt)return rs;ut.show_preview&&!Qe&&(vt(!0),de(!1)),Ne.openSnippet(h.id,m,t),J=ut.data}else if(a){if(o.version&&o.version!==t)return n(o.version,!1),rs;J=a.data}const[ke,ot]=await Promise.all([Av(t,h.id),Sv(t)]);return J&&(x.current=!0,ke.reset(P.DataModel.wrapLists(J),!1)),Ne.setGenerator(h.id),{model:ke,blockStates:ot}},[h.id,t,m,_,o.name,a==null?void 0:a.id]),C=k==null?void 0:k.model,E=k==null?void 0:k.blockStates;sl(C,J=>{if(x.current||(g(void 0,!0),v(void 0,!0)),a&&J&&E){const ke=id(J,E);l(h.id,a.id,{id:a.id,data:ke})}x.current=!1,He.setBackup(h.id,P.DataModel.unwrapLists(J.data)),c(null)},[h.id,g,v,E,a==null?void 0:a.id]);const M=()=>{var J;Ne.resetGenerator(h.id,(J=C==null?void 0:C.historyIndex)!=null?J:1,"menu"),C==null||C.reset(P.DataModel.wrapLists(C.schema.default()),!0)},S=J=>{var ke;J.stopPropagation(),Ne.undoGenerator(h.id,(ke=C==null?void 0:C.historyIndex)!=null?ke:1,"menu"),C==null||C.undo()},T=J=>{var ke;J.stopPropagation(),Ne.redoGenerator(h.id,(ke=C==null?void 0:C.historyIndex)!=null?ke:1,"menu"),C==null||C.redo()},z=J=>{var ke,ot;J.ctrlKey&&J.key==="z"?(Ne.undoGenerator(h.id,(ke=C==null?void 0:C.historyIndex)!=null?ke:1,"hotkey"),C==null||C.undo()):J.ctrlKey&&J.key==="y"&&(Ne.redoGenerator(h.id,(ot=C==null?void 0:C.historyIndex)!=null?ot:1,"hotkey"),C==null||C.redo())},F=J=>{J.ctrlKey&&J.key==="s"&&(U("hotkey"),J.preventDefault(),J.stopPropagation())};me(()=>(document.addEventListener("keyup",z),document.addEventListener("keydown",F),()=>{document.removeEventListener("keyup",z),document.removeEventListener("keydown",F)}),[C,E,a]);const[R,V]=Y([]);me(()=>{Jp(t).then(J=>{V(J.get(h.id).map(ke=>ke.startsWith("minecraft:")?ke.slice(10):ke))}).catch(J=>{console.error(J),c(J)})},[t,h.id]);const L=J=>{Ne.loadPreset(h.id,J),v(void 0,!0),r(t,!0),g(J)},j=async J=>{var ke,ot,ut;try{const bt=await Wp(t,(ke=h.path)!=null?ke:h.id,J),sn=C==null?void 0:C.get(new P.Path(["generator","seed"]));return((ot=bt==null?void 0:bt.generator)==null?void 0:ot.seed)!==void 0&&sn!==void 0&&(bt.generator.seed=sn,((ut=bt.generator.biome_source)==null?void 0:ut.seed)!==void 0&&(bt.generator.biome_source.seed=sn)),bt}catch{c(`Cannot load preset ${J} in ${t}`),g(void 0,!0)}},Z=J=>{v(void 0,!0),n(J),o.name!==Er.name&&o.version!==J&&s({version:J})},[Q,D]=Y(void 0),[A,O]=Y(!1),[$,X]=zc({cooldown:3e3}),ie=()=>{if(A){O(!1);return}if(_)D(`${location.origin}/${h.url}/?version=${t}&preset=${_}`),O(!0),B();else if(C&&E){const J=id(C,E);Wi(J,C.schema.default())?(D(`${location.origin}/${h.url}/?version=${t}`),O(!0)):Mv(h.id,t,J,Qe).then(({id:ke,length:ot,compressed:ut,rate:bt})=>{Ne.createSnippet(h.id,ke,t,ot,ut,bt);const sn=`${location.origin}/${h.url}/?${mc}=${ke}`;D(sn),O(!0)}).catch(ke=>{ke instanceof Error&&c(ke)})}},B=()=>{navigator.clipboard.writeText(Q!=null?Q:""),X()};me(()=>{$||(D(void 0),O(!1))},[$]);const[K,de]=Y(window.innerWidth>820),[he,De]=Y(0),[Ie,Ze]=Y(0),[nt,Se]=Y(0),Te=()=>{Ne.copyOutput(h.id,"menu"),De(he+1)},Le=()=>{Ne.downloadOutput(h.id,"menu"),Ze(Ie+1)},se=()=>{Ne.generatorEvent("import"),de(!0),Se(nt+1)},xn=()=>{K?Ne.hideOutput(h.id,"menu"):Ne.showOutput(h.id,"menu"),de(!K),De(0),Ze(0),Se(0)},[Ge,Be]=zc(),[Qe,vt]=Y((W=He.getPreviewPanelOpen())!=null?W:window.innerWidth>800),yn=R7.includes(h.id)&&!(h.id==="worldgen/configured_feature"&&_t(t,"1.18"));Qe&&!yn&&vt(!1);let zn=2;yn&&(zn+=1),K&&(zn+=2);const ee=()=>{K?Ne.hidePreview(h.id,"menu"):Ne.showPreview(h.id,"menu"),vt(!Qe),!Qe&&K&&de(!1)},[ne,_e]=Y((te=He.getProjectPanelOpen())!=null?te:window.innerWidth>1e3),Oe=Ve(()=>{ne?Ne.hideProject(h.id,i.length,o.files.length,"menu"):Ne.showProject(h.id,i.length,o.files.length,"menu"),He.setProjectPanelOpen(!ne),_e(!ne)},[ne]),[at,Mt]=Y(!1),[lo,li]=Y(!1),[ba,U]=Y(void 0),[G,H]=Y(void 0);return N(le,{children:[N("main",{class:`generator${Qe?" has-preview":""}${ne?" has-project":""}`,children:[!h.partner&&p(hh,{id:"data-pack-generator",type:"text"}),N("div",{class:"controls generator-controls",children:[p(ae,{icon:"upload",label:e("import"),onClick:se}),p(Ot,{icon:"archive",label:e("presets"),relative:!1,children:p(qv,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:R,onSelect:L})}),p(va,{value:t,onChange:Z,allowed:w}),N(Ot,{icon:"kebab_horizontal",tooltip:e("more"),children:[p(ae,{icon:"history",label:e("reset_default"),onClick:M}),b!==void 0&&p(ae,{icon:"history",label:e("restore_backup"),onClick:y}),p(ae,{icon:"arrow_left",label:e("undo"),onClick:S}),p(ae,{icon:"arrow_right",label:e("redo"),onClick:T}),p(ae,{icon:"file",label:e("project.save"),onClick:()=>U("menu")})]})]}),d&&p(Di,{error:d,onDismiss:()=>c(null)}),p(S9,{model:C,version:t,blockStates:E,onError:c}),p(Bn,{donate:!h.partner})]}),N("div",{class:"popup-actions right-actions",style:`--offset: -${8+zn*50}px;`,children:[p("div",{class:`popup-action action-preview${yn?" shown":""} tooltipped tip-nw`,"aria-label":e(Qe?"hide_preview":"show_preview"),onClick:ee,children:Qe?ue.x_circle:ue.play}),p("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:ie,children:ue.link}),p("div",{class:`popup-action action-download${K?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:Le,children:ue.download}),p("div",{class:`popup-action action-copy${K?" shown":""}${Ge?" active":""} tooltipped tip-nw`,"aria-label":e(Ge?"copied":"copy"),onClick:Te,children:Ge?ue.check:ue.clippy}),p("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(K?"hide_output":"show_output"),onClick:xn,children:K?ue.chevron_right:ue.code})]}),p("div",{class:`popup-preview${Qe?" shown":""}`,children:p(D7,{model:C,version:t,id:h.id,shown:Qe,onError:c})}),p("div",{class:`popup-source${K?" shown":""}`,children:p(z7,{model:C,blockStates:E,doCopy:he,doDownload:Ie,doImport:nt,name:(pe=h.schema)!=null?pe:"data",copySuccess:Be,onError:c})}),N("div",{class:`popup-share${A?" shown":""}`,children:[p(wn,{value:Q,readonly:!0}),p(ae,{icon:$?"check":"clippy",onClick:B,tooltip:e($?"copied":"copy_share"),tooltipLoc:"nw",active:$})]}),p("div",{class:"popup-actions left-actions",style:"--offset: 50px;",children:p("div",{class:"popup-action action-project shown tooltipped tip-ne","aria-label":e(ne?"hide_project":"show_project"),onClick:Oe,children:ne?ue.chevron_left:ue.repo})}),p("div",{class:`popup-project${ne?" shown":""}`,children:p($7,{model:C,version:t,id:h.id,onError:c,onDeleteProject:()=>li(!0),onRename:H,onCreate:()=>Mt(!0)})}),at&&p(F7,{onClose:()=>Mt(!1)}),lo&&p(P7,{onClose:()=>li(!1)}),C&&ba&&p(Xv,{id:h.id,model:C,method:ba,onClose:()=>U(void 0)}),G&&p(Kv,{id:G.type,name:G.id,onClose:()=>H(void 0)})]})}function dy({}){const{locale:e}=Ae();return vn(e("title.generators")),N("main",{children:[p("div",{class:"container",children:p($d,{predicate:t=>!t.partner})}),p(Bn,{})]})}var Qd={exports:{}};function e0(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)&&e0(n)}),e}Qd.exports=e0;Qd.exports.default=e0;var uy=Qd.exports;class If{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function zg(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function wr(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 fy="</span>",Mf=e=>!!e.kind,hy=(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 py{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=zg(t)}openNode(t){if(!Mf(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=hy(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Mf(t)||(this.buffer+=fy)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class t0{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=>{t0._collapse(n)})))}}class gy extends t0{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 py(this,this.options).value()}finalize(){return!0}}function na(e){return e?typeof e=="string"?e:e.source:null}function jg(e){return si("(?=",e,")")}function my(e){return si("(?:",e,")*")}function _y(e){return si("(?:",e,")?")}function si(...e){return e.map(n=>na(n)).join("")}function wy(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function n0(...e){const t=wy(e);return"("+(t.capture?"":"?:")+e.map(r=>na(r)).join("|")+")"}function Vg(e){return new RegExp(e.toString()+"|").exec("").length-1}function vy(e,t){const n=e&&e.exec(t);return n&&n.index===0}const by=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function r0(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=na(r),a="";for(;o.length>0;){const s=by.exec(o);if(!s){a+=o;break}a+=o.substring(0,s.index),o=o.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?a+="\\"+String(Number(s[1])+i):(a+=s[0],s[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const xy=/\b\B/,Ug="[a-zA-Z]\\w*",i0="[a-zA-Z_]\\w*",Hg="\\b\\d+(\\.\\d+)?",Zg="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Gg="\\b(0b[01]+)",yy="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ky=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=si(t,/.*\b/,e.binary,/\b.*/)),wr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ra={begin:"\\\\[\\s\\S]",relevance:0},Cy={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ra]},Ey={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ra]},Ay={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/},bl=function(e,t,n={}){const r=wr({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=n0("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:si(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Sy=bl("//","$"),Iy=bl("/\\*","\\*/"),My=bl("#","$"),Ty={scope:"number",begin:Hg,relevance:0},Ly={scope:"number",begin:Zg,relevance:0},Oy={scope:"number",begin:Gg,relevance:0},Ny={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[ra,{begin:/\[/,end:/\]/,relevance:0,contains:[ra]}]}]},Ry={scope:"title",begin:Ug,relevance:0},Dy={scope:"title",begin:i0,relevance:0},Fy={begin:"\\.\\s*"+i0,relevance:0},Py=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 Ha=Object.freeze({__proto__:null,MATCH_NOTHING_RE:xy,IDENT_RE:Ug,UNDERSCORE_IDENT_RE:i0,NUMBER_RE:Hg,C_NUMBER_RE:Zg,BINARY_NUMBER_RE:Gg,RE_STARTERS_RE:yy,SHEBANG:ky,BACKSLASH_ESCAPE:ra,APOS_STRING_MODE:Cy,QUOTE_STRING_MODE:Ey,PHRASAL_WORDS_MODE:Ay,COMMENT:bl,C_LINE_COMMENT_MODE:Sy,C_BLOCK_COMMENT_MODE:Iy,HASH_COMMENT_MODE:My,NUMBER_MODE:Ty,C_NUMBER_MODE:Ly,BINARY_NUMBER_MODE:Oy,REGEXP_MODE:Ny,TITLE_MODE:Ry,UNDERSCORE_TITLE_MODE:Dy,METHOD_GUARD:Fy,END_SAME_AS_BEGIN:Py});function $y(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function By(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function zy(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=$y,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function jy(e,t){!Array.isArray(e.illegal)||(e.illegal=n0(...e.illegal))}function Vy(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 Uy(e,t){e.relevance===void 0&&(e.relevance=1)}const Hy=(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=si(n.beforeMatch,jg(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Zy=["of","and","for","in","not","or","if","then","parent","list","value"],Gy="keyword";function Yg(e,t,n=Gy){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(o){Object.assign(r,Yg(e[o],t,o))}),r;function i(o,a){t&&(a=a.map(s=>s.toLowerCase())),a.forEach(function(s){const l=s.split("|");r[l[0]]=[o,Yy(l[0],l[1])]})}}function Yy(e,t){return t?Number(t):Wy(e)?0:1}function Wy(e){return Zy.includes(e.toLowerCase())}const Tf={},Zr=e=>{console.error(e)},Lf=(e,...t)=>{console.log(`WARN: ${e}`,...t)},bi=(e,t)=>{Tf[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Tf[`${e}/${t}`]=!0)},Ys=new Error;function Wg(e,t,{key:n}){let r=0;const i=e[n],o={},a={};for(let s=1;s<=t.length;s++)a[s+r]=i[s],o[s+r]=!0,r+=Vg(t[s-1]);e[n]=a,e[n]._emit=o,e[n]._multi=!0}function qy(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Zr("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ys;if(typeof e.beginScope!="object"||e.beginScope===null)throw Zr("beginScope must be object"),Ys;Wg(e,e.begin,{key:"beginScope"}),e.begin=r0(e.begin,{joinWith:""})}}function Xy(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Zr("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ys;if(typeof e.endScope!="object"||e.endScope===null)throw Zr("endScope must be object"),Ys;Wg(e,e.end,{key:"endScope"}),e.end=r0(e.end,{joinWith:""})}}function Ky(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Jy(e){Ky(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),qy(e),Xy(e)}function Qy(e){function t(a,s){return new RegExp(na(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(s?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=Vg(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const s=this.regexes.map(l=>l[1]);this.matcherRe=t(r0(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(s);if(!l)return null;const d=l.findIndex((u,f)=>f>0&&u!==void 0),c=this.matchIndexes[d];return l.splice(0,d),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const l=new n;return this.rules.slice(s).forEach(([d,c])=>l.addRule(d,c)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let d=l.exec(s);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,d=c.exec(s)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function i(a){const s=new r;return a.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd&&s.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&s.addRule(a.illegal,{type:"illegal"}),s}function o(a,s){const l=a;if(a.isCompiled)return l;[By,Vy,Jy,Hy].forEach(c=>c(a,s)),e.compilerExtensions.forEach(c=>c(a,s)),a.__beforeBegin=null,[zy,jy,Uy].forEach(c=>c(a,s)),a.isCompiled=!0;let d=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),d=a.keywords.$pattern,delete a.keywords.$pattern),d=d||/\w+/,a.keywords&&(a.keywords=Yg(a.keywords,e.case_insensitive)),l.keywordPatternRe=t(d,!0),s&&(a.begin||(a.begin=/\B|\b/),l.beginRe=t(l.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(l.endRe=t(l.end)),l.terminatorEnd=na(l.end)||"",a.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(a.end?"|":"")+s.terminatorEnd)),a.illegal&&(l.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(c){return ek(c==="self"?a:c)})),a.contains.forEach(function(c){o(c,l)}),a.starts&&o(a.starts,s),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=wr(e.classNameAliases||{}),o(e)}function qg(e){return e?e.endsWithParent||qg(e.starts):!1}function ek(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return wr(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:qg(e)?wr(e,{starts:e.starts?wr(e.starts):null}):Object.isFrozen(e)?wr(e):e}var tk="11.5.1";class nk extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const _c=zg,Of=wr,Nf=Symbol("nomatch"),rk=7,ik=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:gy};function l(L){return s.noHighlightRe.test(L)}function d(L){let j=L.className+" ";j+=L.parentNode?L.parentNode.className:"";const Z=s.languageDetectRe.exec(j);if(Z){const Q=M(Z[1]);return Q||(Lf(o.replace("{}",Z[1])),Lf("Falling back to no-highlight mode for this block.",L)),Q?Z[1]:"no-highlight"}return j.split(/\s+/).find(Q=>l(Q)||M(Q))}function c(L,j,Z){let Q="",D="";typeof j=="object"?(Q=L,Z=j.ignoreIllegals,D=j.language):(bi("10.7.0","highlight(lang, code, ...args) has been deprecated."),bi("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),D=L,Q=j),Z===void 0&&(Z=!0);const A={code:Q,language:D};R("before:highlight",A);const O=A.result?A.result:u(A.language,A.code,Z);return O.code=A.code,R("after:highlight",O),O}function u(L,j,Z,Q){const D=Object.create(null);function A(ee,ne){return ee.keywords[ne]}function O(){if(!se.keywords){Ge.addText(Be);return}let ee=0;se.keywordPatternRe.lastIndex=0;let ne=se.keywordPatternRe.exec(Be),_e="";for(;ne;){_e+=Be.substring(ee,ne.index);const Oe=Se.case_insensitive?ne[0].toLowerCase():ne[0],at=A(se,Oe);if(at){const[Mt,lo]=at;if(Ge.addText(_e),_e="",D[Oe]=(D[Oe]||0)+1,D[Oe]<=rk&&(Qe+=lo),Mt.startsWith("_"))_e+=ne[0];else{const li=Se.classNameAliases[Mt]||Mt;Ge.addKeyword(ne[0],li)}}else _e+=ne[0];ee=se.keywordPatternRe.lastIndex,ne=se.keywordPatternRe.exec(Be)}_e+=Be.substr(ee),Ge.addText(_e)}function $(){if(Be==="")return;let ee=null;if(typeof se.subLanguage=="string"){if(!t[se.subLanguage]){Ge.addText(Be);return}ee=u(se.subLanguage,Be,!0,xn[se.subLanguage]),xn[se.subLanguage]=ee._top}else ee=h(Be,se.subLanguage.length?se.subLanguage:null);se.relevance>0&&(Qe+=ee.relevance),Ge.addSublanguage(ee._emitter,ee.language)}function X(){se.subLanguage!=null?$():O(),Be=""}function ie(ee,ne){let _e=1;const Oe=ne.length-1;for(;_e<=Oe;){if(!ee._emit[_e]){_e++;continue}const at=Se.classNameAliases[ee[_e]]||ee[_e],Mt=ne[_e];at?Ge.addKeyword(Mt,at):(Be=Mt,O(),Be=""),_e++}}function B(ee,ne){return ee.scope&&typeof ee.scope=="string"&&Ge.openNode(Se.classNameAliases[ee.scope]||ee.scope),ee.beginScope&&(ee.beginScope._wrap?(Ge.addKeyword(Be,Se.classNameAliases[ee.beginScope._wrap]||ee.beginScope._wrap),Be=""):ee.beginScope._multi&&(ie(ee.beginScope,ne),Be="")),se=Object.create(ee,{parent:{value:se}}),se}function K(ee,ne,_e){let Oe=vy(ee.endRe,_e);if(Oe){if(ee["on:end"]){const at=new If(ee);ee["on:end"](ne,at),at.isMatchIgnored&&(Oe=!1)}if(Oe){for(;ee.endsParent&&ee.parent;)ee=ee.parent;return ee}}if(ee.endsWithParent)return K(ee.parent,ne,_e)}function de(ee){return se.matcher.regexIndex===0?(Be+=ee[0],1):(zn=!0,0)}function he(ee){const ne=ee[0],_e=ee.rule,Oe=new If(_e),at=[_e.__beforeBegin,_e["on:begin"]];for(const Mt of at)if(!!Mt&&(Mt(ee,Oe),Oe.isMatchIgnored))return de(ne);return _e.skip?Be+=ne:(_e.excludeBegin&&(Be+=ne),X(),!_e.returnBegin&&!_e.excludeBegin&&(Be=ne)),B(_e,ee),_e.returnBegin?0:ne.length}function De(ee){const ne=ee[0],_e=j.substr(ee.index),Oe=K(se,ee,_e);if(!Oe)return Nf;const at=se;se.endScope&&se.endScope._wrap?(X(),Ge.addKeyword(ne,se.endScope._wrap)):se.endScope&&se.endScope._multi?(X(),ie(se.endScope,ee)):at.skip?Be+=ne:(at.returnEnd||at.excludeEnd||(Be+=ne),X(),at.excludeEnd&&(Be=ne));do se.scope&&Ge.closeNode(),!se.skip&&!se.subLanguage&&(Qe+=se.relevance),se=se.parent;while(se!==Oe.parent);return Oe.starts&&B(Oe.starts,ee),at.returnEnd?0:ne.length}function Ie(){const ee=[];for(let ne=se;ne!==Se;ne=ne.parent)ne.scope&&ee.unshift(ne.scope);ee.forEach(ne=>Ge.openNode(ne))}let Ze={};function nt(ee,ne){const _e=ne&&ne[0];if(Be+=ee,_e==null)return X(),0;if(Ze.type==="begin"&&ne.type==="end"&&Ze.index===ne.index&&_e===""){if(Be+=j.slice(ne.index,ne.index+1),!i){const Oe=new Error(`0 width match regex (${L})`);throw Oe.languageName=L,Oe.badRule=Ze.rule,Oe}return 1}if(Ze=ne,ne.type==="begin")return he(ne);if(ne.type==="illegal"&&!Z){const Oe=new Error('Illegal lexeme "'+_e+'" for mode "'+(se.scope||"<unnamed>")+'"');throw Oe.mode=se,Oe}else if(ne.type==="end"){const Oe=De(ne);if(Oe!==Nf)return Oe}if(ne.type==="illegal"&&_e==="")return 1;if(yn>1e5&&yn>ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Be+=_e,_e.length}const Se=M(L);if(!Se)throw Zr(o.replace("{}",L)),new Error('Unknown language: "'+L+'"');const Te=Qy(Se);let Le="",se=Q||Te;const xn={},Ge=new s.__emitter(s);Ie();let Be="",Qe=0,vt=0,yn=0,zn=!1;try{for(se.matcher.considerAll();;){yn++,zn?zn=!1:se.matcher.considerAll(),se.matcher.lastIndex=vt;const ee=se.matcher.exec(j);if(!ee)break;const ne=j.substring(vt,ee.index),_e=nt(ne,ee);vt=ee.index+_e}return nt(j.substr(vt)),Ge.closeAllNodes(),Ge.finalize(),Le=Ge.toHTML(),{language:L,value:Le,relevance:Qe,illegal:!1,_emitter:Ge,_top:se}}catch(ee){if(ee.message&&ee.message.includes("Illegal"))return{language:L,value:_c(j),illegal:!0,relevance:0,_illegalBy:{message:ee.message,index:vt,context:j.slice(vt-100,vt+100),mode:ee.mode,resultSoFar:Le},_emitter:Ge};if(i)return{language:L,value:_c(j),illegal:!1,relevance:0,errorRaised:ee,_emitter:Ge,_top:se};throw ee}}function f(L){const j={value:_c(L),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return j._emitter.addText(L),j}function h(L,j){j=j||s.languages||Object.keys(t);const Z=f(L),Q=j.filter(M).filter(T).map(X=>u(X,L,!1));Q.unshift(Z);const D=Q.sort((X,ie)=>{if(X.relevance!==ie.relevance)return ie.relevance-X.relevance;if(X.language&&ie.language){if(M(X.language).supersetOf===ie.language)return 1;if(M(ie.language).supersetOf===X.language)return-1}return 0}),[A,O]=D,$=A;return $.secondBest=O,$}function w(L,j,Z){const Q=j&&n[j]||Z;L.classList.add("hljs"),L.classList.add(`language-${Q}`)}function _(L){let j=null;const Z=d(L);if(l(Z))return;if(R("before:highlightElement",{el:L,language:Z}),L.children.length>0&&(s.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(L)),s.throwUnescapedHTML))throw new nk("One of your code blocks includes unescaped HTML.",L.innerHTML);j=L;const Q=j.textContent,D=Z?c(Q,{language:Z,ignoreIllegals:!0}):h(Q);L.innerHTML=D.value,w(L,Z,D.language),L.result={language:D.language,re:D.relevance,relevance:D.relevance},D.secondBest&&(L.secondBest={language:D.secondBest.language,relevance:D.secondBest.relevance}),R("after:highlightElement",{el:L,result:D,text:Q})}function g(L){s=Of(s,L)}const m=()=>{b(),bi("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){b(),bi("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function b(){if(document.readyState==="loading"){x=!0;return}document.querySelectorAll(s.cssSelector).forEach(_)}function y(){x&&b()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",y,!1);function k(L,j){let Z=null;try{Z=j(e)}catch(Q){if(Zr("Language definition for '{}' could not be registered.".replace("{}",L)),i)Zr(Q);else throw Q;Z=a}Z.name||(Z.name=L),t[L]=Z,Z.rawDefinition=j.bind(null,e),Z.aliases&&S(Z.aliases,{languageName:L})}function C(L){delete t[L];for(const j of Object.keys(n))n[j]===L&&delete n[j]}function E(){return Object.keys(t)}function M(L){return L=(L||"").toLowerCase(),t[L]||t[n[L]]}function S(L,{languageName:j}){typeof L=="string"&&(L=[L]),L.forEach(Z=>{n[Z.toLowerCase()]=j})}function T(L){const j=M(L);return j&&!j.disableAutodetect}function z(L){L["before:highlightBlock"]&&!L["before:highlightElement"]&&(L["before:highlightElement"]=j=>{L["before:highlightBlock"](Object.assign({block:j.el},j))}),L["after:highlightBlock"]&&!L["after:highlightElement"]&&(L["after:highlightElement"]=j=>{L["after:highlightBlock"](Object.assign({block:j.el},j))})}function F(L){z(L),r.push(L)}function R(L,j){const Z=L;r.forEach(function(Q){Q[Z]&&Q[Z](j)})}function V(L){return bi("10.7.0","highlightBlock will be removed entirely in v12.0"),bi("10.7.0","Please use highlightElement now."),_(L)}Object.assign(e,{highlight:c,highlightAuto:h,highlightAll:b,highlightElement:_,highlightBlock:V,configure:g,initHighlighting:m,initHighlightingOnLoad:v,registerLanguage:k,unregisterLanguage:C,listLanguages:E,getLanguage:M,registerAliases:S,autoDetection:T,inherit:Of,addPlugin:F}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=tk,e.regex={concat:si,lookahead:jg,either:n0,optional:_y,anyNumberOfTimes:my};for(const L in Ha)typeof Ha[L]=="object"&&uy(Ha[L]);return Object.assign(e,Ha),e};var ia=ik({}),ok=ia;ia.HighlightJS=ia;ia.default=ia;var o0=ok;function ak(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 sk='<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>';o0.registerLanguage("json",ak);xe.use({highlight:(e,t)=>{if(t!=="")return o0.highlight(e,{language:t}).value}});function lk({id:e}){const{locale:t}=Ae(),{version:n,changeVersion:r}=qt(),{changeTitle:i}=vn(),{value:o,refresh:a}=Wt(async()=>await(await fetch(`../../guides/${e}.md`)).text(),[e]),s=Ee(()=>{if(!o)return;const b=Ww(o);return i(b==null?void 0:b.title,b==null?void 0:b.versions),b},[o]),l=Ee(()=>{var y;const b=Pe.versions.map(k=>k.id);return(y=s==null?void 0:s.versions)==null?void 0:y.sort((k,C)=>b.indexOf(C)-b.indexOf(k))},[s==null?void 0:s.versions]),d=Ee(()=>!l||l.includes(n)?n:l[0],[n,s==null?void 0:s.versions]),c=Ee(()=>{if(!o)return;const b=[];let y=!1;xe.use({extensions:[{name:"styledCode",level:"inline",start(E){var M,S;return(S=(M=E.match(/\b[fsnj]`/))==null?void 0:M.index)!=null?S:-1},tokenizer(E){const M=E.match(/^([fsnj])`([^`]+)`/);if(M)return{type:"styledCode",raw:M[0],prefix:M[1],text:M[2]}},renderer(E){let M=E.text,S={f:"hljs-attr",s:"hljs-string",n:"hljs-number"}[E.prefix];return E.prefix==="j"&&(M=o0.highlight("json",E.text).value,S="language-json"),`<code${S?` class="${S}"`:""}>${M}</code>`}}],walkTokens(E){E.type==="heading"&&b.push(E)},renderer:{link(E,M,S){if(E===null)return S;const T=M?` title="${M}"`:"",z=E!=null&&E.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${E}"${T}${z}>${S}</a>`},heading(E,M,S,T){let z="";y||(z=`<ol class="guide-toc">${b.filter(V=>V.depth===2).map(V=>{var Z,Q;const L=T.slug((Q=(Z=V.raw.match(/^#+ (.*)/))==null?void 0:Z[1])!=null?Q:"",{dryrun:!0}),j=V.text.replaceAll("`","");return`<li><a href="#${L}">${j}</a></li>`}).join("")}</ol>`,y=!0);const F=T.slug(S),R=`<span id="guide-${F}" href="?version=${n}#${F}">${sk}</span>`;return`${z}<h${M}>${R}${E}</h${M}>`}}});const k=o.substring(o.indexOf("---",3)+3),C=qw(k,d);return xe(C,{version:"1.19"})},[d,o]),[u,f]=ov(),h=Ve(()=>{if(!c)return;const b=document.querySelector(`[id=guide-${u.slice(1)}]`);if(b){const y=b.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:y-68,behavior:"smooth"})}},[c,u]);me(()=>{h()},[c===void 0,u]);const w=Ve(b=>{if(!(b.target instanceof HTMLSpanElement))return;const y="#"+b.target.id.replace(/^guide-/,"");r(n,!1,!0),f(y),y===u&&h()},[h,u,n]),[_,g]=zc(),m=Ve(()=>{const b=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(b),g()},[e,n]),v=Ve(b=>{ti(`/guides/?tags=${b}`)},[]),[x]=Y(window.innerWidth>600);return N("main",{children:[N("div",{class:"container guide",children:[N("div",{class:"navigation",children:[N("a",{class:"btn btn-link",href:"/guides/",children:[ue.arrow_left,p("span",{children:t("guides.all")})]}),N("a",{class:"btn btn-link",href:"/worldgen/",children:[Ji.worldgen,p("span",{children:t("worldgen")})]}),p("div",{class:"navigation-divider"}),p(ae,{icon:_?"check":"link",label:t("share"),onClick:m,active:_,tooltip:t(_?"copied":"copy_share"),class:"guide-share"}),l&&p(va,{value:d,allowed:l,onChange:r})]}),(s==null?void 0:s.tags)&&s.tags.length>0&&p("div",{class:"badges-list",children:s.tags.map(b=>p(ao,{label:b,active:!0,onClick:()=>v(b)}))}),c&&N(le,{children:[p(hh,{id:"guide",type:x?"image":"text"}),p("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:c},onClick:w}),p(Xd,{})]})]}),p(Bn,{})]})}function ck({}){const{locale:e}=Ae(),{version:t,changeVersion:n}=qt();vn(e("title.guides"));const[r,i]=Y(""),[o,a]=Gp(),[s,l]=Y(!1),d=Ee(()=>s===!1?cd():cd().filter(u=>{var f;return(f=u.versions)==null?void 0:f.includes(t)}),[t,s]),c=Ee(()=>{const u=r.split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return d.filter(f=>{var w;if(!o.every(_=>{var g;return(g=f.tags)==null?void 0:g.includes(_)}))return!1;const h=((w=f.tags)==null?void 0:w.join(" "))+" "+f.title.toLowerCase();return u.every(_=>_.startsWith("!")?_.length===1||!h.includes(_.slice(1)):h.includes(_))})},[d,r,o]);return N("main",{children:[N("div",{class:"container guides",children:[N("div",{class:"navigation",children:[p(wn,{class:"btn btn-input query-search",placeholder:e("guides.search"),value:r,onChange:i}),p(va,{value:s?t:void 0,onChange:u=>{n(u),l(!0)},hasAny:!0,onAny:()=>l(!1)})]}),o.length>0&&p("div",{class:"badges-list",children:o.map(u=>p(ao,{label:u,onClick:()=>a(u)}))}),p("div",{class:"card-column",children:d.length===0?p(le,{children:p("span",{class:"note",children:e("guides.no_results.version")})}):c.length===0?p(le,{children:p("span",{class:"note",children:e("guides.no_results.query")})}):c.map(u=>p(ta,{id:u.id,activeTags:o,toggleTag:a}))})]}),p(Bn,{})]})}const dk=2,uk=5;function fk({}){const{locale:e}=Ae();vn(e("title.home"));const t=Ms("(max-width: 580px)");return p("main",{children:N("div",{class:"container",children:[N("div",{class:"card-group",children:[N("div",{class:"card-column",children:[p(hk,{}),t&&p(Rf,{}),p(gk,{}),t&&p(Df,{}),p(pk,{}),t&&p(Ff,{})]}),!t&&N("div",{class:"card-column",children:[p(Rf,{}),p(Df,{}),p(Ff,{})]})]}),p(mk,{}),p(Xd,{}),p(Bn,{})]})})}function hk(){const{locale:e}=Ae();return N(Ir,{title:e("generators.popular"),link:"/generators/",children:[p(Sn,{minimal:!0,id:"loot_table"}),p(Sn,{minimal:!0,id:"advancement"}),p(Sn,{minimal:!0,id:"predicate"}),p(tr,{title:e("worldgen"),link:"/worldgen/",titleIcon:"worldgen"}),p(tr,{title:e("generators.all"),link:"/generators/",titleIcon:"arrow_right"})]})}function Rf(){const{locale:e}=Ae(),t=Ee(()=>{const n=[];for(const r of He.getGeneratorHistory().reverse())n.includes(r)||n.push(r);return n.slice(0,uk)},[]);return t.length<dk?p(le,{}):p(Ir,{title:e("generators.recent"),children:t.map(n=>p(Sn,{minimal:!0,id:n}))})}function Df(){const{locale:e}=Ae();return N(Ir,{title:e("guides"),link:"/guides/",titleIcon:"arrow_right",children:[p(ta,{minimal:!0,id:"adding-custom-structures"}),p(ta,{minimal:!0,id:"noise-router"})]})}function Ff(){const{locale:e}=Ae();return N(Ir,{title:e("tools"),children:[p(tr,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),p(tr,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),p(tr,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.19"})]})}function pk(){const{locale:e}=Ae(),{value:t}=Wt(Od,[]),n=Ee(()=>t==null?void 0:t.find(r=>r.type==="release"),[t]);return p(Ir,{title:e("versions.minecraft_versions"),link:"/versions/",titleIcon:"arrow_right",children:(t==null?void 0:t[0])&&n&&N(le,{children:[t[0].id!==n.id&&p(tr,{title:t[0].name,link:`/versions/?id=${t[0].id}`,desc:e("versions.latest_snapshot")}),p(tr,{title:n.name,link:`/versions/?id=${n.id}`,desc:e("versions.latest_release")})]})})}function gk(){const{locale:e}=Ae(),t=Ms("(min-width: 960px)"),{value:n}=Wt(Nd,[]),r=Ee(()=>n==null?void 0:n.sort((i,o)=>o.order-i.order).slice(0,2),[n]);return p(Ir,{title:e("changelog"),link:"/changelog/",titleIcon:"git_commit",children:r==null?void 0:r.map(i=>p(Pg,{minimal:!t,short:!0,change:i}))})}function mk(){var t;const{value:e}=Wt(()=>fetch("https://ghs.vercel.app/sponsors/misode").then(n=>n.json()),[]);return N("div",{class:"sponsors",children:[p("h3",{children:"Sponsored by"}),p("div",{class:"sponsors-list",children:(t=e==null?void 0:e.sponsors)==null?void 0:t.map(n=>p("a",{class:"tooltipped tip-se",href:n.profile,target:"_blank","aria-label":`@${n.handle}`,children:p("img",{width:48,height:48,src:n.avatar,alt:`@${n.handle}`})}))})]})}function _k({}){const{locale:e}=Ae();return vn(e("title.partners")),N("main",{children:[p("div",{class:"container",children:p($d,{predicate:t=>t.partner!==void 0})}),p(Bn,{donate:!1})]})}function wk({}){const{locale:e}=Ae(),{version:t,changeVersion:n}=qt();vn(e("title.sounds"));const[r,i]=Y(void 0);me(()=>{(async()=>{const b=await Ce(()=>import("./howler.e4c7f825.js").then(function(y){return y.h}),[]);i(()=>y=>new b.Howl(y))})()},[]);const{value:o,error:a}=Wt(async()=>await gv(t),[t]),s=Ee(()=>Object.keys(o!=null?o:{}),[o]),[l,d]=Y(""),[c,u]=Y([]),f=()=>{u([{id:Ur(),sound:l,delay:0,pitch:1,volume:1},...c])},h=b=>y=>{u(c.map(k=>k.id===b?oe(oe({},k),y):k))},w=b=>()=>{u(c.filter(y=>y.id!==b))},[_,g]=Y(0),m=()=>{g(_+1)},v=Me(null),x=()=>{if(!v.current)return;const b=c.some(k=>k.delay>0),y=c.sort((k,C)=>k.delay-C.delay).map(k=>`${b?`execute if score @s delay matches ${k.delay} run `:""}playsound minecraft:${k.sound} master @s ~ ~ ~ ${k.volume} ${k.pitch}`).join(`
`);v.current.setAttribute("href","data:text/plain;charset=utf-8,"+y+"%0A"),v.current.setAttribute("download","sounds.mcfunction"),v.current.click()};return N("main",{children:[a&&p(Di,{error:a}),s.length>0&&N(le,{children:[N("div",{class:"sounds-controls",children:[N("div",{class:"sound-search-group",children:[p(wn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:l,onChange:d,onEnter:f}),p(ae,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:f})]}),c.length>1&&p(ae,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:m}),p("div",{class:"spacer"}),p(ae,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),tooltipLoc:"se",class:"download-sounds",onClick:x}),p(va,{value:t,onChange:n})]}),p("div",{class:"sounds",children:o&&r&&c.map(b=>p($9,be(oe({},b),{howler:r,sounds:o,delayedPlay:_,onEdit:h(b.id),onDelete:w(b.id)}),b.id))}),p("a",{ref:v,style:"display: none;"}),p("datalist",{id:"sound-list",children:s.map(b=>p("option",{value:b},b))})]}),p(Bn,{donate:!1})]})}function vk({}){const{locale:e}=Ae(),{value:t,error:n}=Wt(Od,[]),[r]=Wr("id"),i=(t!=null?t:[]).find(s=>s.id===r);vn(i?`Minecraft ${i.name}`:"Versions Explorer",i?[]:void 0,i?"Changes and metadata":void 0);const o=i&&Pf(t!=null?t:[],i,-1),a=i&&Pf(t!=null?t:[],i,1);return N("main",{children:[n&&p(Di,{error:n}),p("div",{class:"container",children:r?N(le,{children:[N("div",{class:"navigation",children:[p(yo,{link:"/versions/",icon:"three_bars",label:e("versions.all")}),p(yo,{link:a?`/versions/?id=${a.id}`:void 0,icon:"arrow_left",label:e("versions.previous")}),p(yo,{link:o?`/versions/?id=${o.id}`:void 0,icon:"arrow_right",label:e("versions.next"),swapped:!0})]}),p(ry,{id:r,version:i})]}):p(le,{children:p(sy,{versions:t,link:s=>`/versions/?id=${s}`,navigation:p(yo,{link:"/changelog",icon:"git_commit",label:e("versions.technical_changes")})})})}),p(Bn,{donate:!1})]})}function Pf(e,t,n){const i=e.findIndex(o=>o.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function bk({}){const{locale:e}=Ae();return vn(e("title.worldgen")),N("main",{children:[N("div",{class:"container worldgen",children:[N("div",{class:"card-group",children:[N(Ir,{title:e("generators.popular"),children:[p(Sn,{minimal:!0,id:"dimension"}),p(Sn,{minimal:!0,id:"worldgen/biome"}),p(Sn,{minimal:!0,id:"worldgen/noise_settings"}),p(Sn,{minimal:!0,id:"worldgen/configured_feature"}),p(Sn,{minimal:!0,id:"worldgen/placed_feature"})]}),N(Ir,{title:e("guides"),link:"/guides/?tags=worldgen",titleIcon:"arrow_right",children:[p(ta,{id:"adding-custom-structures"}),p(ta,{id:"placed-features"})]})]}),p($d,{predicate:t=>{var n;return(n=t.tags)==null?void 0:n.includes("worldgen")}})]}),p(Bn,{})]})}function xk(){const e=t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>Ne.pageview(Cr(t.url)))};return N(le,{children:[p(P9,{}),N(rr,{onChange:e,children:[p(fk,{path:"/"}),p(dy,{path:"/generators"}),p(bk,{path:"/worldgen"}),p(_k,{path:"/partners"}),p(wk,{path:"/sounds"}),p(ly,{path:"/changelog"}),p(vk,{path:"/versions"}),p(ck,{path:"/guides"}),p(lk,{path:"/guides/:id"}),p(cy,{default:!0})]})]})}function yk(){return p(jv,{children:p($v,{children:p(Vv,{children:p(Gv,{children:p(Hv,{children:p(zv,{children:p(xk,{})})})})})})})}Gr(p(yk,{}),document.body);export{d4 as a,f4 as b,ea as c,u4 as d,tg as e,Ba as f,m4 as g,Sk as h,Fu as i,Ak as j,lg as k,y4 as l,$u as m,v4 as n,x4 as o,Ek as p,b4 as q,h4 as r,Pu as s,yi as t,ya as u,P as v};
//# sourceMappingURL=index.f7262d42.js.map