mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
108 lines
626 KiB
JavaScript
108 lines
626 KiB
JavaScript
var Np=Object.defineProperty,Rp=Object.defineProperties;var Dp=Object.getOwnPropertyDescriptors;var os=Object.getOwnPropertySymbols;var x0=Object.prototype.hasOwnProperty,b0=Object.prototype.propertyIsEnumerable;var Ga=(e,t,n)=>t in e?Np(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,he=(e,t)=>{for(var n in t||(t={}))x0.call(t,n)&&Ga(e,n,t[n]);if(os)for(var n of os(t))b0.call(t,n)&&Ga(e,n,t[n]);return e},Ne=(e,t)=>Rp(e,Dp(t));var Ya=e=>typeof e=="symbol"?e:e+"",y0=(e,t)=>{var n={};for(var r in e)x0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&os)for(var r of os(e))t.indexOf(r)<0&&b0.call(e,r)&&(n[r]=e[r]);return n};var I=(e,t,n)=>(Ga(e,typeof t!="symbol"?t+"":t,n),n);const eb={},Fp=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};Fp();var Ho,le,Nd,Rd,ho,Dd,k0,Fd,Gs={},Pd=[],Pp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Hn(e,t){for(var n in t)e[n]=t[n];return e}function $d(e){var t=e.parentNode;t&&t.removeChild(e)}function Zt(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Ho.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return po(e,s,r,i,null)}function po(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?++Nd:i};return i==null&&le.vnode!=null&&le.vnode(o),o}function Bd(){return{current:null}}function Wn(e){return e.children}function Kt(e,t){this.props=e,this.context=t}function Li(e,t){if(t==null)return e.__?Li(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"?Li(e):null}function Vd(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 Vd(e)}}function Pl(e){(!e.__d&&(e.__d=!0)&&ho.push(e)&&!Ys.__r++||k0!==le.debounceRendering)&&((k0=le.debounceRendering)||Dd)(Ys)}function Ys(){for(var e;Ys.__r=ho.length;)e=ho.sort(function(t,n){return t.__v.__b-n.__v.__b}),ho=[],e.some(function(t){var n,r,i,o,s,a;t.__d&&(s=(o=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=Hn({},o)).__v=o.__v+1,Ec(a,o,i,n.__n,a.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s==null?Li(o):s,o.__h),Ud(r,o),o.__e!=s&&Vd(o)))})}function jd(e,t,n,r,i,o,s,a,c,u){var l,d,f,h,w,_,m,g=r&&r.__k||Pd,v=g.length;for(n.__k=[],l=0;l<t.length;l++)if((h=n.__k[l]=(h=t[l])==null||typeof h=="boolean"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"?po(null,h,null,null,h):Array.isArray(h)?po(Wn,{children:h},null,null,null):h.__b>0?po(h.type,h.props,h.key,null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(f=g[l])===null||f&&h.key==f.key&&h.type===f.type)g[l]=void 0;else for(d=0;d<v;d++){if((f=g[d])&&h.key==f.key&&h.type===f.type){g[d]=void 0;break}f=null}Ec(e,h,f=f||Gs,i,o,s,a,c,u),w=h.__e,(d=h.ref)&&f.ref!=d&&(m||(m=[]),f.ref&&m.push(f.ref,null,h),m.push(d,h.__c||w,h)),w!=null?(_==null&&(_=w),typeof h.type=="function"&&h.__k===f.__k?h.__d=c=zd(h,c,e):c=Hd(e,h,f,g,w,c),typeof n.type=="function"&&(n.__d=c)):c&&f.__e==c&&c.parentNode!=e&&(c=Li(f))}for(n.__e=_,l=v;l--;)g[l]!=null&&(typeof n.type=="function"&&g[l].__e!=null&&g[l].__e==n.__d&&(n.__d=Li(r,l+1)),Gd(g[l],g[l]));if(m)for(l=0;l<m.length;l++)Zd(m[l],m[++l],m[++l])}function zd(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"?zd(r,t,n):Hd(n,r,r,i,r.__e,t));return t}function Jt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){Jt(n,t)}):t.push(e)),t}function Hd(e,t,n,r,i,o){var s,a,c;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,c=0;(a=a.nextSibling)&&c<r.length;c+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return s!==void 0?s:i.nextSibling}function $p(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||Ws(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]||Ws(e,o,t[o],n[o],r)}function C0(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||Pp.test(t)?n:n+"px"}function Ws(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||C0(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||C0(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?A0:E0,o):e.removeEventListener(t,o?A0:E0,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 E0(e){this.l[e.type+!1](le.event?le.event(e):e)}function A0(e){this.l[e.type+!0](le.event?le.event(e):e)}function Ec(e,t,n,r,i,o,s,a,c){var u,l,d,f,h,w,_,m,g,v,b,x,y,k=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(u=le.__b)&&u(t);try{e:if(typeof k=="function"){if(m=t.props,g=(u=k.contextType)&&r[u.__c],v=u?g?g.props.value:u.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in k&&k.prototype.render?t.__c=l=new k(m,v):(t.__c=l=new Kt(m,v),l.constructor=k,l.render=Vp),g&&g.sub(l),l.props=m,l.state||(l.state={}),l.context=v,l.__n=r,d=l.__d=!0,l.__h=[]),l.__s==null&&(l.__s=l.state),k.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Hn({},l.__s)),Hn(l.__s,k.getDerivedStateFromProps(m,l.__s))),f=l.props,h=l.state,d)k.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(k.getDerivedStateFromProps==null&&m!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(m,v),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(m,l.__s,v)===!1||t.__v===n.__v){l.props=m,l.state=l.__s,t.__v!==n.__v&&(l.__d=!1),l.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(C){C&&(C.__=t)}),l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(m,l.__s,v),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,h,w)})}if(l.context=v,l.props=m,l.__v=t,l.__P=e,b=le.__r,x=0,"prototype"in k&&k.prototype.render)l.state=l.__s,l.__d=!1,b&&b(t),u=l.render(l.props,l.state,l.context);else do l.__d=!1,b&&b(t),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++x<25);l.state=l.__s,l.getChildContext!=null&&(r=Hn(Hn({},r),l.getChildContext())),d||l.getSnapshotBeforeUpdate==null||(w=l.getSnapshotBeforeUpdate(f,h)),y=u!=null&&u.type===Wn&&u.key==null?u.props.children:u,jd(e,Array.isArray(y)?y:[y],t,n,r,i,o,s,a,c),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),_&&(l.__E=l.__=null),l.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Bp(n.__e,t,n,r,i,o,s,c);(u=le.diffed)&&u(t)}catch(C){t.__v=null,(c||o!=null)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),le.__e(C,t,n)}}function Ud(e,t){le.__c&&le.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){le.__e(r,n.__v)}})}function Bp(e,t,n,r,i,o,s,a){var c,u,l,d=n.props,f=t.props,h=t.type,w=0;if(h==="svg"&&(i=!0),o!=null){for(;w<o.length;w++)if((c=o[w])&&"setAttribute"in c==!!h&&(h?c.localName===h:c.nodeType===3)){e=c,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,a=!1}if(h===null)d===f||a&&e.data===f||(e.data=f);else{if(o=o&&Ho.call(e.childNodes),u=(d=n.props||Gs).dangerouslySetInnerHTML,l=f.dangerouslySetInnerHTML,!a){if(o!=null)for(d={},w=0;w<e.attributes.length;w++)d[e.attributes[w].name]=e.attributes[w].value;(l||u)&&(l&&(u&&l.__html==u.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if($p(e,f,d,i,a),l)t.__k=[];else if(w=t.props.children,jd(e,Array.isArray(w)?w:[w],t,n,r,i&&h!=="foreignObject",o,s,o?o[0]:n.__k&&Li(n,0),a),o!=null)for(w=o.length;w--;)o[w]!=null&&$d(o[w]);a||("value"in f&&(w=f.value)!==void 0&&(w!==e.value||h==="progress"&&!w||h==="option"&&w!==d.value)&&Ws(e,"value",w,d.value,!1),"checked"in f&&(w=f.checked)!==void 0&&w!==e.checked&&Ws(e,"checked",w,d.checked,!1))}return e}function Zd(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){le.__e(r,n)}}function Gd(e,t,n){var r,i;if(le.unmount&&le.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Zd(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){le.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Gd(r[i],t,typeof e.type!="function");n||e.__e==null||$d(e.__e),e.__e=e.__d=void 0}function Vp(e,t,n){return this.constructor(e,n)}function Vr(e,t,n){var r,i,o;le.__&&le.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],Ec(t,e=(!r&&n||t).__k=Zt(Wn,null,[e]),i||Gs,Gs,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?Ho.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Ud(o,e)}function Ac(e,t){Vr(e,t,Ac)}function Sc(e,t,n){var r,i,o,s=Hn({},e.props);for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];return arguments.length>2&&(s.children=arguments.length>3?Ho.call(arguments,2):n),po(e.type,s,r||e.key,i||e.ref,null)}function kr(e,t){var n={__c:t="__cC"+Fd++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(Pl)},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Ho=Pd.slice,le={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Nd=0,Rd=function(e){return e!=null&&e.constructor===void 0},Kt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Hn({},this.state),typeof e=="function"&&(e=e(Hn({},n),this.props)),e&&Hn(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),Pl(this))},Kt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Pl(this))},Kt.prototype.render=Wn,ho=[],Dd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ys.__r=0,Fd=0;var jp=Object.freeze(Object.defineProperty({__proto__:null,render:Vr,hydrate:Ac,createElement:Zt,h:Zt,Fragment:Wn,createRef:Bd,get isValidElement(){return Rd},Component:Kt,cloneElement:Sc,createContext:kr,toChildArray:Jt,get options(){return le}},Symbol.toStringTag,{value:"Module"}));var zp={};function Yd(e,t){for(var n in t)e[n]=t[n];return e}function Wd(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),o={},s;if(i&&i[1])for(var a=i[1].split("&"),c=0;c<a.length;c++){var u=a[c].split("=");o[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}e=$l(e.replace(r,"")),t=$l(t||"");for(var l=Math.max(e.length,t.length),d=0;d<l;d++)if(t[d]&&t[d].charAt(0)===":"){var f=t[d].replace(/(^:|[+*?]+$)/g,""),h=(t[d].match(/[+*?]+$/)||zp)[0]||"",w=~h.indexOf("+"),_=~h.indexOf("*"),m=e[d]||"";if(!m&&!_&&(h.indexOf("?")<0||w)){s=!1;break}if(o[f]=decodeURIComponent(m),w||_){o[f]=e.slice(d).map(decodeURIComponent).join("/");break}}else if(t[d]!==e[d]){s=!1;break}return n.default!==!0&&s===!1?!1:o}function Hp(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function Up(e,t){return e.index=t,e.rank=Yp(e),e.props}function $l(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function Zp(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function Gp(e){return $l(e).map(Zp).join("")}function Yp(e){return e.props.default?0:Gp(e.props.path)}var Bt=null,Dr=[],Bl=[],Wp={};function qp(e,t){t===void 0&&(t="push"),Bt&&Bt[t]?Bt[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function Oi(){var e;return Bt&&Bt.location?e=Bt.location:Bt&&Bt.getCurrentLocation?e=Bt.getCurrentLocation():e=typeof location!="undefined"?location:Wp,""+(e.pathname||"")+(e.search||"")}function Xr(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),Xp(e)&&qp(e,t?"replace":"push"),qd(e)}function Xp(e){for(var t=Dr.length;t--;)if(Dr[t].canRoute(e))return!0;return!1}function qd(e){for(var t=!1,n=0;n<Dr.length;n++)Dr[n].routeTo(e)===!0&&(t=!0);for(var r=Bl.length;r--;)Bl[r](e);return t}function Xd(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 Xr(t)}}function Kp(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return Xd(e.currentTarget||e.target||this),Kd(e)}function Kd(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function Jp(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(Xd(t))return Kd(e)}while(t=t.parentNode)}}var S0=!1;function Qp(){S0||(typeof addEventListener=="function"&&(Bt||addEventListener("popstate",function(){qd(Oi())}),addEventListener("click",Jp)),S0=!0)}var qn=function(e){function t(n){e.call(this,n),n.history&&(Bt=n.history),this.state={url:n.url||Oi()},Qp()}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=Jt(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(){Dr.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;Bt&&(this.unlisten=Bt.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),Dr.splice(Dr.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(Up).sort(Hp).map(function(s){var a=Wd(i,s.props.path,s.props);if(a){if(o!==!1){var c={url:i,matches:a};return Yd(c,a),delete c.ref,delete c.key,Sc(s,c)}return s}}).filter(Boolean)},t.prototype.render=function(r,i){var o=r.children,s=r.onChange,a=i.url,c=this.getMatchingChildren(Jt(o),a,!0),u=c[0]||null,l=this.previousUrl;return a!==l&&(this.previousUrl=a,typeof s=="function"&&s({router:this,url:a,previous:l,active:c,current:u})),u},t}(Kt),Jd=function(e){return Zt("a",Yd({onClick:Kp},e))},em=function(e){return Zt(e.component,e)};qn.subscribers=Bl;qn.getCurrentUrl=Oi;qn.route=Xr;qn.Router=qn;qn.Route=em;qn.Link=Jd;qn.exec=Wd;var Se;(e=>{const t="Site",n="Generator";function c(B,J,de){ga("send","event",B,J,de)}function u(B,J){ga("set",`dimension${B}`,J)}function l(B){ga("set","page",B),ga("send","pageview")}e.pageview=l;function d(B,J){c(n,B,J)}e.generatorEvent=d;function f(B){return B==="menu"?"Menu":"Hotkey"}function h(B){u(4,B),gtag("set",{locale:B})}e.setLocale=h;function w(B,J){h(J),c(t,"set-language",J),gtag("event","change_locale",{prev_locale:B})}e.changeLocale=w;function _(B){u(1,B),gtag("set",{theme:B})}e.setTheme=_;function m(B,J){_(J),c(t,"set-theme",J),gtag("event","change_theme",{prev_theme:B})}e.changeTheme=m;function g(B){u(3,B),gtag("set",{version:B})}e.setVersion=g;function v(B){gtag("set",{selected_version:B})}e.setSelectedVersion=v;function b(B,J){g(J),c(n,"set-version",J),gtag("event","change_version",{prev_version:B})}e.changeVersion=b;function x(B){u(6,B),gtag("event","use_generator",{file_type:B})}e.setGenerator=x;function y(B){u(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,J,de){c(n,"reset"),gtag("event","reset_generator",{file_type:B,history:J,method:de})}e.resetGenerator=C;function E(B,J,de){c(n,"undo",f(de)),gtag("event","undo_generator",{file_type:B,history:J,method:de})}e.undoGenerator=E;function M(B,J,de){c(n,"undo",f(de)),gtag("event","redo_generator",{file_type:B,history:J,method:de})}e.redoGenerator=M;function S(B,J){c(n,"load-preset",J),gtag("event","load_generator_preset",{file_type:B,file_name:J})}e.loadPreset=S;function T(B,J){gtag("event","open_generator_preset",{file_type:B,file_name:J})}e.openPreset=T;function L(B,J,de,_e,je,Oe){gtag("event","create_generator_snippet",{file_type:B,snippet_id:J,version:de,data_size:_e,compressed_size:je,compression_rate:Oe})}e.createSnippet=L;function F(B,J,de){gtag("event","open_generator_snippet",{file_type:B,snippet_id:J,version:de})}e.openSnippet=F;function K(B,J){c(n,"copy"),gtag("event","copy_generator_output",{file_type:B,method:J})}e.copyOutput=K;function H(B,J){c(n,"download"),gtag("event","download_generator_output",{file_type:B,method:J})}e.downloadOutput=H;function N(B,J){c(n,"toggle-output","visible"),gtag("event","show_generator_output",{file_type:B,method:J})}e.showOutput=N;function j(B,J){c(n,"toggle-output","hidden"),gtag("event","hide_generator_output",{file_type:B,method:J})}e.hideOutput=j;function Z(B,J){c(n,"toggle-preview","visible"),gtag("event","show_generator_preview",{file_type:B,method:J})}e.showPreview=Z;function ee(B,J){c(n,"toggle-preview","hidden"),gtag("event","hide_generator_preview",{file_type:B,method:J})}e.hidePreview=ee;function R(B,J,de,_e){c(n,"show-project",f(_e)),gtag("event","show_project",{file_type:B,projects_count:J,project_size:de,method:_e})}e.showProject=R;function A(B,J,de,_e){c(n,"hide-project",f(_e)),gtag("event","hide_project",{file_type:B,projects_count:J,project_size:de,method:_e})}e.hideProject=A;function O(B,J,de,_e){c(n,"save-project-file",f(_e)),gtag("event","save_project_file",{file_type:B,projects_count:J,project_size:de,method:_e})}e.saveProjectFile=O;function $(B,J,de,_e){c(n,"delete-project-file",f(_e)),gtag("event","delete_project_file",{file_type:B,projects_count:J,project_size:de,method:_e})}e.deleteProjectFile=$;function q(B,J,de,_e){c(n,"rename-project-file",f(_e)),gtag("event","rename_project_file",{file_type:B,projects_count:J,project_size:de,method:_e})}e.renameProjectFile=q;function ie(B,J,de){c(n,"delete-project",f(de)),gtag("event","delete_project",{projects_count:B,project_size:J,method:de})}e.deleteProject=ie})(Se||(Se={}));var Kr,at,Wa,I0,Ni=0,Qd=[],M0=le.__b,T0=le.__r,L0=le.diffed,O0=le.__c,N0=le.unmount;function ji(e,t){le.__h&&le.__h(at,e,Ni||t),Ni=0;var n=at.__H||(at.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function X(e){return Ni=1,ef(rf,e)}function ef(e,t,n){var r=ji(Kr++,2);return r.t=e,r.__c||(r.__=[n?n(t):rf(void 0,t),function(i){var o=r.t(r.__[0],i);r.__[0]!==o&&(r.__=[o,r.__[1]],r.__c.setState({}))}],r.__c=at),r.__}function ge(e,t){var n=ji(Kr++,3);!le.__s&&Ic(n.__H,t)&&(n.__=e,n.__H=t,at.__H.__h.push(n))}function tf(e,t){var n=ji(Kr++,4);!le.__s&&Ic(n.__H,t)&&(n.__=e,n.__H=t,at.__h.push(n))}function Te(e){return Ni=5,ye(function(){return{current:e}},[])}function tm(e,t,n){Ni=6,tf(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 ye(e,t){var n=ji(Kr++,7);return Ic(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ve(e,t){return Ni=8,ye(function(){return e},t)}function Jr(e){var t=at.context[e.__c],n=ji(Kr++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(at)),t.props.value):e.__}function nm(e,t){le.useDebugValue&&le.useDebugValue(t?t(e):e)}function nf(e){var t=ji(Kr++,10),n=X();return t.__=e,at.componentDidCatch||(at.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function rm(){for(var e;e=Qd.shift();)if(e.__P)try{e.__H.__h.forEach(As),e.__H.__h.forEach(Vl),e.__H.__h=[]}catch(t){e.__H.__h=[],le.__e(t,e.__v)}}le.__b=function(e){at=null,M0&&M0(e)},le.__r=function(e){T0&&T0(e),Kr=0;var t=(at=e.__c).__H;t&&(Wa===at?(t.__h=[],at.__h=[],t.__.forEach(function(n){n.__H&&(n.__H=void 0)})):(t.__h.forEach(As),t.__h.forEach(Vl),t.__h=[])),Wa=at},le.diffed=function(e){L0&&L0(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(Qd.push(t)!==1&&I0===le.requestAnimationFrame||((I0=le.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(o),R0&&cancelAnimationFrame(r),setTimeout(n)},o=setTimeout(i,100);R0&&(r=requestAnimationFrame(i))})(rm)),at=null,Wa=null},le.__c=function(e,t){t.some(function(n){try{n.__h.forEach(As),n.__h=n.__h.filter(function(r){return!r.__||Vl(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],le.__e(r,n.__v)}}),O0&&O0(e,t)},le.unmount=function(e){N0&&N0(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{As(r)}catch(i){t=i}}),t&&le.__e(t,n.__v))};var R0=typeof requestAnimationFrame=="function";function As(e){var t=at,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),at=t}function Vl(e){var t=at;e.__c=e.__(),at=t}function Ic(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function rf(e,t){return typeof t=="function"?t(e):t}var ss=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function im(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 of(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 om=im(jp),sf,af,lf,jl=om,sm=0;function D0(e,t,n,r,i){var o,s,a={};for(s in t)s=="ref"?o=t[s]:a[s]=t[s];var c={type:e,props:a,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sm,__source:i,__self:r};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)a[s]===void 0&&(a[s]=o[s]);return jl.options.vnode&&jl.options.vnode(c),c}lf=jl.Fragment,af=D0,sf=D0;const p=af,D=sf,me=lf;function cf({type:e,id:t}){return ge(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&ðicalads.load()},[]),p("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function se({icon:e,label:t,active:n,class:r,tooltip:i,tooltipLoc:o,onClick:s,disabled:a}){return D("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${o!=null?o:"sw"}`:""}${a?" disabled":""}${n?" tip-shown":""}`,onClick:a?void 0:s,"aria-label":i,children:[e&&pe[e],t&&p("span",{children:t})]})}var P={},Ln={},En={};Object.defineProperty(En,"__esModule",{value:!0});En.ModelPath=En.Path=En.relativePath=void 0;function am(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}En.relativePath=am;class Pn{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 Pn(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Pn(this.modelArr.slice(1),this.contextArr)}pop(){return new Pn(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Pn([...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 Pn([...this.modelArr],[...this.contextArr,n])}copy(){return new Pn([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new $n(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)}}En.Path=Pn;class $n extends Pn{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 $n(this.model,super.slice(t,n))}shift(){return new $n(this.model,super.shift())}pop(){return new $n(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new $n(this.model,super.modelPush(t))}contextPush(t){return new $n(this.model,super.contextPush(t))}copy(){return new $n(this.model,super.copy())}}En.ModelPath=$n;var zi={};Object.defineProperty(zi,"__esModule",{value:!0});zi.Errors=void 0;class lm{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}}zi.Errors=lm;var An={};Object.defineProperty(An,"__esModule",{value:!0});An.hexId=An.quoteString=An.escapeString=void 0;function uf(e){return e.replace(/(\\|")/g,"\\$1")}An.escapeString=uf;function cm(e){return`"${uf(e)}"`}An.quoteString=cm;const um=e=>("0"+e.toString(16)).substr(-2);function dm(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,um).join("")}An.hexId=dm;Object.defineProperty(Ln,"__esModule",{value:!0});Ln.DataModel=void 0;const fm=En,F0=zi,qa=An;class Mc{constructor(t,n){var r,i,o,s;this.historyMax=(r=n==null?void 0:n.historyMax)!==null&&r!==void 0?r:50,this.verbose=(i=n==null?void 0:n.verbose)!==null&&i!==void 0?i:!1,this.wrapLists=(o=n==null?void 0:n.wrapLists)!==null&&o!==void 0?o:!1,this.schema=t;const a=(s=n==null?void 0:n.initialData)!==null&&s!==void 0?s:t.default();this.data=this.wrapLists?Mc.wrapLists(a):a,this.listeners=[],this.errors=new F0.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,qa.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,qa.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 fm.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 F0.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,qa.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}}Ln.DataModel=Mc;var er={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:o=>o,suggest:()=>[],validate:(o,s)=>s,validationOption:()=>{},hook(o,s,...a){return o.base({node:this},s,...a)},canUpdate:()=>!1,update:()=>[]};const t=(o,s)=>he(he({},o),typeof s=="function"?s(o):s);e.Mod=t;const n=(o,s)=>(0,e.Mod)(s,{enabled:a=>a.push(o).get()!==void 0});e.Has=n;function r(o){return Ne(he({},o),{optional:()=>!0})}e.Opt=r;function i(o){return Ne(he({},o),{keep:()=>!0})}e.Keep=i})(er);var ya={};Object.defineProperty(ya,"__esModule",{value:!0});ya.BooleanNode=void 0;const hm=Ln,pm=er,mm=()=>Ne(he({},pm.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?hm.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)}});ya.BooleanNode=mm;var df={},Uo={};Object.defineProperty(Uo,"__esModule",{value:!0});Uo.ListNode=void 0;const gm=Ln,_m=er,wm=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,o=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,s=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return Ne(he({},_m.Base),{type:()=>"list",default:()=>t!=null&&t.minLength?[...Array(i)].map(a=>e.default()):[],navigate(a,c){const u=c+1;return a.getArray().length<=u?this:e.navigate(a,u)},pathPush(a,c){return a.push(parseInt(c.toString())).contextPush("entry")},validate(a,c,u,l){if(l.loose&&!Array.isArray(c)&&(c=l.wrapLists?gm.DataModel.wrapLists(this.default()):this.default()),Array.isArray(c))s&&(c.length<i||c.length>o)?i===o?u.add(a,"error.invalid_list_range.exact",c.length,i):u.add(a,"error.invalid_list_range.between",c.length,i,o):c.length<i?u.add(a,"error.invalid_list_range.smaller",c.length,i):c.length>o&&u.add(a,"error.invalid_list_range.larger",c.length,o);else return u.add(a,"error.expected_list"),c;const d=c.map((f,h)=>{const w=e.validate(a.push(h),l.wrapLists?f.node:f,u,l);return l.wrapLists?{node:w,id:f.id}:w});for(const f of Object.getOwnPropertySymbols(c))d[f]=c[f];return d},hook(a,c,...u){var l;return((l=a.list)!==null&&l!==void 0?l:a.base).call(a,{node:this,children:e,config:t!=null?t:{}},c,...u)}})};Uo.ListNode=wm;var Zo={};Object.defineProperty(Zo,"__esModule",{value:!0});Zo.SwitchNode=void 0;const vm=er,xm=e=>Ne(he({},vm.Base),{type(t){return this.activeCase(t,!0).node.type(t)},category(t){return this.activeCase(t,!0).node.category(t)},default:()=>e[0].node.default(),navigate(t,n){var r;const i=n+1;return(r=this.activeCase(t.slice(0,i)))===null||r===void 0?void 0:r.node.navigate(t,n)},pathPush(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.pathPush(t,n))!==null&&i!==void 0?i:t},suggest(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.suggest(t,n))!==null&&i!==void 0?i:e.filter(o=>o.match(t)).map(o=>o.node.suggest(t,n)).reduce((o,s)=>o.concat(s))},validate(t,n,r,i){let o=this.activeCase(t);return o===void 0?n:o.node.validate(t,n,r,i)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const r=(o,s)=>{var a,c;return((a=s.priority)!==null&&a!==void 0?a:0)-((c=o.priority)!==null&&c!==void 0?c: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)}});Zo.SwitchNode=xm;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=Uo,n=Zo,r=(s,a)=>{const c=(l,d)=>{if(l.match)return l.match(d);switch(l.type){case"list":return Array.isArray(d);case"object":return typeof d=="object"&&!Array.isArray(d);default:return typeof d===l.type}},u=(0,n.SwitchNode)(s.map(l=>({type:l.type,priority:l.priority,match:d=>c(l,d.get()),node:l.node})));return Ne(he({},u),{validate(l,d,f,h){let w=u.activeCase(l,!0);return w.node.optional()?d:w.node.validate(l,d,f,h)},hook(l,d,...f){var h;return((h=l.choice)!==null&&h!==void 0?h:l.base).call(l,{node:this,choices:s,config:a!=null?a:{},switchNode:u},d,...f)}})};e.ChoiceNode=r;const i=s=>(a,c)=>(0,e.ChoiceNode)([{type:s,node:a,change:u=>{var l;return(l=u[0])!==null&&l!==void 0?l:a.default()}},{type:"list",node:(0,t.ListNode)(a),change:u=>u?[u]:[]}],c);e.ObjectOrList=i("object"),e.StringOrList=i("string");const o=(s,a,c)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:s,change:u=>Object.keys(c)[0]},{type:"object",node:a,change:u=>{var l;return(l=c[u])!==null&&l!==void 0?l:c[Object.keys(c)[0]]}}]);e.ObjectOrPreset=o})(df);var ka={};Object.defineProperty(ka,"__esModule",{value:!0});ka.MapNode=void 0;const bm=er,ym=Ln,km=(e,t,n)=>Ne(he({},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,s){if(s.loose&&typeof i!="object"&&(i=s.wrapLists?ym.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return o.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(c=>{e.validate(r,c,o,s),a[c]=t.validate(r.push(c),i[c],o,s)});for(const c of Object.getOwnPropertySymbols(i))a[c]=i[c];return a},validationOption(r){var i;return(i=n==null?void 0:n.validation)!==null&&i!==void 0?i:e.validationOption(r.push(""))},hook(r,i,...o){var s;return((s=r.map)!==null&&s!==void 0?s:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...o)}});ka.MapNode=km;var ff={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=P,n=Ln,r=er,i=s=>{var a,c,u;const l=s!=null&&s.color?!0:(a=s==null?void 0:s.integer)!==null&&a!==void 0?a:!1,d=s!=null&&s.color?0:(c=s==null?void 0:s.min)!==null&&c!==void 0?c:-1/0,f=s!=null&&s.color?16777215:(u=s==null?void 0:s.max)!==null&&u!==void 0?u:1/0,h=(s==null?void 0:s.min)!==void 0&&(s==null?void 0:s.max)!==void 0;return Ne(he({},r.Base),{type:()=>"number",default:()=>d>0?d:0,validate(w,_,m,g){return g.loose&&typeof _!="number"&&(_=g.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof _!="number"?m.add(w,"error.expected_number"):l&&!Number.isInteger(_)?m.add(w,"error.expected_integer"):h&&(_<d||_>f)?m.add(w,"error.invalid_number_range.between",_,d,f):_<d?m.add(w,"error.invalid_number_range.smaller",_,d):_>f&&m.add(w,"error.invalid_number_range.larger",_,f),_},hook(w,_,...m){var g;return((g=w.number)!==null&&g!==void 0?g:w.base).call(w,{node:this,integer:l,min:d,max:f,between:h,config:s!=null?s:{}},_,...m)}})};e.NumberNode=i;const o=({integer:s,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:s}),c=>({validate:(u,l,d,f)=>(l=c.validate(u,l,d,f),a.includes(l)||d.add(u,"error.invalid_number_enum",a.join(", ")),l)}));e.NumberEnum=o})(ff);var hf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=er,n=En,r=zi,i=An,o=Ln;e.Switch=Symbol("switch"),e.Case=Symbol("case");const s=(a,c)=>{var w,_;const m=a,{[w=e.Switch]:u,[_=e.Case]:l}=m,d=y0(m,[Ya(w),Ya(_)]),f=g=>{if(u===void 0)return d;const v=(0,n.relativePath)(g,u).get(),b=l[v];return he(he({},d),b)},h=(g,v)=>{var b;const x=u?(0,n.relativePath)(g,u).get():void 0,y=u?(b=l[x])!==null&&b!==void 0?b:{}:{},k=Object.keys(y),C=c!=null&&c.context?new n.ModelPath(g.getModel(),new n.Path(g.getArray(),[c.context])):g;return(!(c!=null&&c.disableSwitchContext)&&x&&k.includes(v)?C.contextPush(x):C).push(v)};return Ne(he({},t.Base),{type:()=>"object",category:()=>c==null?void 0:c.category,default:()=>({}),keep(){return this.optional()},navigate(g,v){const b=v+1,x=g.getArray();if(x.length<=b)return this;const k=f(g.slice(0,b))[x[b]];return k==null?void 0:k.navigate(g,b)},pathPush(g,v){return h(g,v.toString())},suggest(g,v){const b=f(g),x=Object.keys(typeof v=="object"?v:{});return Object.keys(b).filter(y=>b[y].enabled(g)).filter(y=>!x.includes(y)).map(i.quoteString)},validate(g,v,b,x){if(x.loose&&typeof v!="object"&&(v=x.wrapLists?o.DataModel.wrapLists(this.default()):this.default()),typeof v!="object"||v===null)return b.add(g,"error.expected_object"),v;let y=d;if(u){const S=(0,n.relativePath)(g,u);let T=S.get();if(g.equals(S.pop())){const L=S.last();T=d[L].validate(g.push(L),v[L],new r.Errors,x)}y=he(he({},y),l[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(g))return;const T=y[S].validate(g.push(S),v[S],b,x);!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,g.getModel().set(g.push(S),T,!0))}else M[S]=v[S]});for(const S of Object.getOwnPropertySymbols(v))M[S]=v[S];return M},hook(g,v,...b){var x;return((x=g.object)!==null&&x!==void 0?x:g.base).call(g,{node:this,fields:d,config:c!=null?c:{},filter:u,cases:l,getActiveFields:f,getChildModelPath:h},v,...b)}})};e.ObjectNode=s})(hf);var Ca={};Object.defineProperty(Ca,"__esModule",{value:!0});Ca.Reference=void 0;const Cm=(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)}});Ca.Reference=Cm;var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.StringNode=void 0;const Em=er,Am=An,Sm=Ln,P0=e=>!!(e!=null&&e.enum),$0=e=>!!(e!=null&&e.validator),Im=(e,t)=>{const n=()=>{var r,i,o,s;if(P0(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(c=>`#${c}`))!==null&&i!==void 0?i:[];const a=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag?(o=e==null?void 0:e.get(`tag/${a}`).map(c=>`#${c}`))!==null&&o!==void 0?o:[]:[],...(s=e==null?void 0:e.get(a))!==null&&s!==void 0?s:[]]}return t.params.pool}return[]};return Ne(he({},Em.Base),{type:()=>"string",default:()=>"",validate(r,i,o,s){if(s.loose&&typeof i!="string"&&(i=(s.wrapLists?Sm.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return o.add(r,"error.expected_string"),i;if($0(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 c=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;c=c.slice(1)}else if(t.params.requireTag)return o.add(r,"error.expected_tag"),i;if(!c.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return o.add(r,"error.invalid_resource_location"),i}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&i.startsWith("#")||typeof i=="string"&&i.includes(":")&&!i.startsWith("minecraft:")||t.params.isDefinition||t.params.allowUnknown))return i}if(P0(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&o.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(Am.quoteString),validationOption(){return $0(t)?t:void 0},hook(r,i,...o){var s;return((s=r.string)!==null&&s!==void 0?s:r.base).call(r,{node:this,getValues:n,config:t},i,...o)}})};Ea.StringNode=Im;var pf={};Object.defineProperty(pf,"__esModule",{value:!0});var Ri={};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.CollectionRegistry=Ri.SchemaRegistry=void 0;class Mm{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}}Ri.SchemaRegistry=Mm;class Tm{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:[]}}Ri.CollectionRegistry=Tm;var mf={};Object.defineProperty(mf,"__esModule",{value:!0});(function(e){var t=ss&&ss.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=ss&&ss.__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(Ln,e),n(En,e),n(zi,e),n(er,e),n(ya,e),n(df,e),n(Uo,e),n(ka,e),n(ff,e),n(hf,e),n(Ca,e),n(Ea,e),n(Zo,e),n(pf,e),n(Ri,e),n(mf,e)})(P);const ko=15,zl=30,Hl=19,Lm=29,qs=256,Tc=qs+1+Lm,B0=2*Tc+1,qi=256,Om=7,V0=16,j0=17,z0=18,Xa=8*2,Xs=-1,Nm=1,as=2,Rm=0,fi=0,H0=1,Dm=3,Mt=4,on=0,gf=1,ls=2,cn=-2,Fm=-3,ri=-5;function Aa(e){return Sa(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Sa(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Sa(n):n),[])}const U0=[0,1,2,3].concat(...Aa([[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 Je(){const e=this;function t(i){const o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,u=e.stat_desc.max_length;let l,d,f,h,w,_,m=0;for(h=0;h<=ko;h++)i.bl_count[h]=0;for(o[i.heap[i.heap_max]*2+1]=0,l=i.heap_max+1;l<B0;l++)d=i.heap[l],h=o[o[d*2+1]*2+1]+1,h>u&&(h=u,m++),o[d*2+1]=h,!(d>e.max_code)&&(i.bl_count[h]++,w=0,d>=c&&(w=a[d-c]),_=o[d*2],i.opt_len+=_*(h+w),s&&(i.static_len+=_*(s[d*2+1]+w)));if(m!==0){do{for(h=u-1;i.bl_count[h]===0;)h--;i.bl_count[h]--,i.bl_count[h+1]+=2,i.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(d=i.bl_count[h];d!==0;)f=i.heap[--l],!(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),d--)}}function n(i,o){let s=0;do s|=i&1,i>>>=1,s<<=1;while(--o>0);return s>>>1}function r(i,o,s){const a=[];let c=0,u,l,d;for(u=1;u<=ko;u++)a[u]=c=c+s[u-1]<<1;for(l=0;l<=o;l++)d=i[l*2+1],d!==0&&(i[l*2]=n(a[d]++,d))}e.build_tree=function(i){const o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let c,u,l=-1,d;for(i.heap_len=0,i.heap_max=B0,c=0;c<a;c++)o[c*2]!==0?(i.heap[++i.heap_len]=l=c,i.depth[c]=0):o[c*2+1]=0;for(;i.heap_len<2;)d=i.heap[++i.heap_len]=l<2?++l:0,o[d*2]=1,i.depth[d]=0,i.opt_len--,s&&(i.static_len-=s[d*2+1]);for(e.max_code=l,c=Math.floor(i.heap_len/2);c>=1;c--)i.pqdownheap(o,c);d=a;do c=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(o,1),u=i.heap[1],i.heap[--i.heap_max]=c,i.heap[--i.heap_max]=u,o[d*2]=o[c*2]+o[u*2],i.depth[d]=Math.max(i.depth[c],i.depth[u])+1,o[c*2+1]=o[u*2+1]=d,i.heap[1]=d++,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)}}Je._length_code=[0,1,2,3,4,5,6,7].concat(...Aa([[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]]));Je.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];Je.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];Je.d_code=function(e){return e<256?U0[e]:U0[256+(e>>>7)]};Je.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];Je.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];Je.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];Je.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function bt(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 Pm=[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],$m=Aa([[144,8],[112,9],[24,7],[8,8]]);bt.static_ltree=Sa(Pm.map((e,t)=>[e,$m[t]]));const Bm=[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],Vm=Aa([[30,5]]);bt.static_dtree=Sa(Bm.map((e,t)=>[e,Vm[t]]));bt.static_l_desc=new bt(bt.static_ltree,Je.extra_lbits,qs+1,Tc,ko);bt.static_d_desc=new bt(bt.static_dtree,Je.extra_dbits,0,zl,ko);bt.static_bl_desc=new bt(null,Je.extra_blbits,0,Hl,Om);const jm=9,zm=8;function _n(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 _f=0,Ss=1,Mr=2,rn=[new _n(0,0,0,0,_f),new _n(4,4,8,4,Ss),new _n(4,5,16,8,Ss),new _n(4,6,32,32,Ss),new _n(4,4,16,16,Mr),new _n(8,16,32,32,Mr),new _n(8,16,128,128,Mr),new _n(8,32,128,256,Mr),new _n(32,128,258,1024,Mr),new _n(32,258,258,4096,Mr)],cs=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Yt=0,us=1,Xi=2,ds=3,Hm=32,Ka=42,fs=113,Ki=666,Ja=8,Um=0,Qa=1,Zm=2,nt=3,Is=258,Pt=Is+nt+1;function Z0(e,t,n,r){const i=e[t*2],o=e[n*2];return i<o||i==o&&r[t]<=r[n]}function Gm(){const e=this;let t,n,r,i,o,s,a,c,u,l,d,f,h,w,_,m,g,v,b,x,y,k,C,E,M,S,T,L,F,K,H,N,j;const Z=new Je,ee=new Je,R=new Je;e.depth=[];let A,O,$,q,ie,B;e.bl_count=[],e.heap=[],H=[],N=[],j=[];function J(){u=2*o,d[h-1]=0;for(let V=0;V<h-1;V++)d[V]=0;S=rn[T].max_lazy,F=rn[T].good_length,K=rn[T].nice_length,M=rn[T].max_chain,y=0,g=0,C=0,v=E=nt-1,x=0,f=0}function de(){let V;for(V=0;V<Tc;V++)H[V*2]=0;for(V=0;V<zl;V++)N[V*2]=0;for(V=0;V<Hl;V++)j[V*2]=0;H[qi*2]=1,e.opt_len=e.static_len=0,O=$=0}function _e(){Z.dyn_tree=H,Z.stat_desc=bt.static_l_desc,ee.dyn_tree=N,ee.stat_desc=bt.static_d_desc,R.dyn_tree=j,R.stat_desc=bt.static_bl_desc,ie=0,B=0,q=8,de()}e.pqdownheap=function(V,G){const z=e.heap,Y=z[G];let te=G<<1;for(;te<=e.heap_len&&(te<e.heap_len&&Z0(V,z[te+1],z[te],e.depth)&&te++,!Z0(V,Y,z[te],e.depth));)z[G]=z[te],G=te,te<<=1;z[G]=Y};function je(V,G){let z=-1,Y,te=V[0*2+1],U=0,oe=7,Ke=4;te===0&&(oe=138,Ke=3),V[(G+1)*2+1]=65535;for(let qe=0;qe<=G;qe++)Y=te,te=V[(qe+1)*2+1],!(++U<oe&&Y==te)&&(U<Ke?j[Y*2]+=U:Y!==0?(Y!=z&&j[Y*2]++,j[V0*2]++):U<=10?j[j0*2]++:j[z0*2]++,U=0,z=Y,te===0?(oe=138,Ke=3):Y==te?(oe=6,Ke=3):(oe=7,Ke=4))}function Oe(){let V;for(je(H,Z.max_code),je(N,ee.max_code),R.build_tree(e),V=Hl-1;V>=3&&j[Je.bl_order[V]*2+1]===0;V--);return e.opt_len+=3*(V+1)+5+5+4,V}function Ge(V){e.pending_buf[e.pending++]=V}function ot(V){Ge(V&255),Ge(V>>>8&255)}function Ee(V){Ge(V>>8&255),Ge(V&255&255)}function De(V,G){let z;const Y=G;B>Xa-Y?(z=V,ie|=z<<B&65535,ot(ie),ie=z>>>Xa-B,B+=Y-Xa):(ie|=V<<B&65535,B+=Y)}function Fe(V,G){const z=V*2;De(G[z]&65535,G[z+1]&65535)}function ae(V,G){let z,Y=-1,te,U=V[0*2+1],oe=0,Ke=7,qe=4;for(U===0&&(Ke=138,qe=3),z=0;z<=G;z++)if(te=U,U=V[(z+1)*2+1],!(++oe<Ke&&te==U)){if(oe<qe)do Fe(te,j);while(--oe!==0);else te!==0?(te!=Y&&(Fe(te,j),oe--),Fe(V0,j),De(oe-3,2)):oe<=10?(Fe(j0,j),De(oe-3,3)):(Fe(z0,j),De(oe-11,7));oe=0,Y=te,U===0?(Ke=138,qe=3):te==U?(Ke=6,qe=3):(Ke=7,qe=4)}}function mn(V,G,z){let Y;for(De(V-257,5),De(G-1,5),De(z-4,4),Y=0;Y<z;Y++)De(j[Je.bl_order[Y]*2+1],3);ae(H,V-1),ae(N,G-1)}function Ue(){B==16?(ot(ie),ie=0,B=0):B>=8&&(Ge(ie&255),ie>>>=8,B-=8)}function Pe(){De(Qa<<1,3),Fe(qi,bt.static_ltree),Ue(),1+q+10-B<9&&(De(Qa<<1,3),Fe(qi,bt.static_ltree),Ue()),q=7}function et(V,G){let z,Y,te;if(e.dist_buf[O]=V,e.lc_buf[O]=G&255,O++,V===0?H[G*2]++:($++,V--,H[(Je._length_code[G]+qs+1)*2]++,N[Je.d_code(V)*2]++),(O&8191)===0&&T>2){for(z=O*8,Y=y-g,te=0;te<zl;te++)z+=N[te*2]*(5+Je.extra_dbits[te]);if(z>>>=3,$<Math.floor(O/2)&&z<Math.floor(Y/2))return!0}return O==A-1}function _t(V,G){let z,Y,te=0,U,oe;if(O!==0)do z=e.dist_buf[te],Y=e.lc_buf[te],te++,z===0?Fe(Y,V):(U=Je._length_code[Y],Fe(U+qs+1,V),oe=Je.extra_lbits[U],oe!==0&&(Y-=Je.base_length[U],De(Y,oe)),z--,U=Je.d_code(z),Fe(U,G),oe=Je.extra_dbits[U],oe!==0&&(z-=Je.base_dist[U],De(z,oe)));while(te<O);Fe(qi,V),q=V[qi*2+1]}function gn(){B>8?ot(ie):B>0&&Ge(ie&255),ie=0,B=0}function Rn(V,G,z){gn(),q=8,z&&(ot(G),ot(~G)),e.pending_buf.set(c.subarray(V,V+G),e.pending),e.pending+=G}function Q(V,G,z){De((Um<<1)+(z?1:0),3),Rn(V,G,!0)}function ne(V,G,z){let Y,te,U=0;T>0?(Z.build_tree(e),ee.build_tree(e),U=Oe(),Y=e.opt_len+3+7>>>3,te=e.static_len+3+7>>>3,te<=Y&&(Y=te)):Y=te=G+5,G+4<=Y&&V!=-1?Q(V,G,z):te==Y?(De((Qa<<1)+(z?1:0),3),_t(bt.static_ltree,bt.static_dtree)):(De((Zm<<1)+(z?1:0),3),mn(Z.max_code+1,ee.max_code+1,U+1),_t(H,N)),de(),z&&gn()}function fe(V){ne(g>=0?g:-1,y-g,V),g=y,t.flush_pending()}function Ae(){let V,G,z,Y;do{if(Y=u-C-y,Y===0&&y===0&&C===0)Y=o;else if(Y==-1)Y--;else if(y>=o+o-Pt){c.set(c.subarray(o,o+o),0),k-=o,y-=o,g-=o,V=h,z=V;do G=d[--z]&65535,d[z]=G>=o?G-o:0;while(--V!==0);V=o,z=V;do G=l[--z]&65535,l[z]=G>=o?G-o:0;while(--V!==0);Y+=o}if(t.avail_in===0)return;V=t.read_buf(c,y+C,Y),C+=V,C>=nt&&(f=c[y]&255,f=(f<<m^c[y+1]&255)&_)}while(C<Pt&&t.avail_in!==0)}function st(V){let G=65535,z;for(G>r-5&&(G=r-5);;){if(C<=1){if(Ae(),C===0&&V==fi)return Yt;if(C===0)break}if(y+=C,C=0,z=g+G,(y===0||y>=z)&&(C=y-z,y=z,fe(!1),t.avail_out===0)||y-g>=o-Pt&&(fe(!1),t.avail_out===0))return Yt}return fe(V==Mt),t.avail_out===0?V==Mt?Xi:Yt:V==Mt?ds:us}function At(V){let G=M,z=y,Y,te,U=E;const oe=y>o-Pt?y-(o-Pt):0;let Ke=K;const qe=a,ut=y+Is;let nn=c[z+U-1],is=c[z+U];E>=F&&(G>>=2),Ke>C&&(Ke=C);do if(Y=V,!(c[Y+U]!=is||c[Y+U-1]!=nn||c[Y]!=c[z]||c[++Y]!=c[z+1])){z+=2,Y++;do;while(c[++z]==c[++Y]&&c[++z]==c[++Y]&&c[++z]==c[++Y]&&c[++z]==c[++Y]&&c[++z]==c[++Y]&&c[++z]==c[++Y]&&c[++z]==c[++Y]&&c[++z]==c[++Y]&&z<ut);if(te=Is-(ut-z),z=ut-Is,te>U){if(k=V,U=te,te>=Ke)break;nn=c[z+U-1],is=c[z+U]}}while((V=l[V&qe]&65535)>oe&&--G!==0);return U<=C?U:C}function Wi(V){let G=0,z;for(;;){if(C<Pt){if(Ae(),C<Pt&&V==fi)return Yt;if(C===0)break}if(C>=nt&&(f=(f<<m^c[y+(nt-1)]&255)&_,G=d[f]&65535,l[y&a]=d[f],d[f]=y),G!==0&&(y-G&65535)<=o-Pt&&L!=as&&(v=At(G)),v>=nt)if(z=et(y-k,v-nt),C-=v,v<=S&&C>=nt){v--;do y++,f=(f<<m^c[y+(nt-1)]&255)&_,G=d[f]&65535,l[y&a]=d[f],d[f]=y;while(--v!==0);y++}else y+=v,v=0,f=c[y]&255,f=(f<<m^c[y+1]&255)&_;else z=et(0,c[y]&255),C--,y++;if(z&&(fe(!1),t.avail_out===0))return Yt}return fe(V==Mt),t.avail_out===0?V==Mt?Xi:Yt:V==Mt?ds:us}function ni(V){let G=0,z,Y;for(;;){if(C<Pt){if(Ae(),C<Pt&&V==fi)return Yt;if(C===0)break}if(C>=nt&&(f=(f<<m^c[y+(nt-1)]&255)&_,G=d[f]&65535,l[y&a]=d[f],d[f]=y),E=v,b=k,v=nt-1,G!==0&&E<S&&(y-G&65535)<=o-Pt&&(L!=as&&(v=At(G)),v<=5&&(L==Nm||v==nt&&y-k>4096)&&(v=nt-1)),E>=nt&&v<=E){Y=y+C-nt,z=et(y-1-b,E-nt),C-=E-1,E-=2;do++y<=Y&&(f=(f<<m^c[y+(nt-1)]&255)&_,G=d[f]&65535,l[y&a]=d[f],d[f]=y);while(--E!==0);if(x=0,v=nt-1,y++,z&&(fe(!1),t.avail_out===0))return Yt}else if(x!==0){if(z=et(0,c[y-1]&255),z&&fe(!1),y++,C--,t.avail_out===0)return Yt}else x=1,y++,C--}return x!==0&&(z=et(0,c[y-1]&255),x=0),fe(V==Mt),t.avail_out===0?V==Mt?Xi:Yt:V==Mt?ds:us}function rs(V){return V.total_in=V.total_out=0,V.msg=null,e.pending=0,e.pending_out=0,n=fs,i=fi,_e(),J(),on}e.deflateInit=function(V,G,z,Y,te,U){return Y||(Y=Ja),te||(te=zm),U||(U=Rm),V.msg=null,G==Xs&&(G=6),te<1||te>jm||Y!=Ja||z<9||z>15||G<0||G>9||U<0||U>as?cn:(V.dstate=e,s=z,o=1<<s,a=o-1,w=te+7,h=1<<w,_=h-1,m=Math.floor((w+nt-1)/nt),c=new Uint8Array(o*2),l=[],d=[],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,L=U,rs(V))},e.deflateEnd=function(){return n!=Ka&&n!=fs&&n!=Ki?cn:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,d=null,l=null,c=null,e.dstate=null,n==fs?Fm:on)},e.deflateParams=function(V,G,z){let Y=on;return G==Xs&&(G=6),G<0||G>9||z<0||z>as?cn:(rn[T].func!=rn[G].func&&V.total_in!==0&&(Y=V.deflate(H0)),T!=G&&(T=G,S=rn[T].max_lazy,F=rn[T].good_length,K=rn[T].nice_length,M=rn[T].max_chain),L=z,Y)},e.deflateSetDictionary=function(V,G,z){let Y=z,te,U=0;if(!G||n!=Ka)return cn;if(Y<nt)return on;for(Y>o-Pt&&(Y=o-Pt,U=z-Y),c.set(G.subarray(U,U+Y),0),y=Y,g=Y,f=c[0]&255,f=(f<<m^c[1]&255)&_,te=0;te<=Y-nt;te++)f=(f<<m^c[te+(nt-1)]&255)&_,l[te&a]=d[f],d[f]=te;return on},e.deflate=function(V,G){let z,Y,te,U,oe;if(G>Mt||G<0)return cn;if(!V.next_out||!V.next_in&&V.avail_in!==0||n==Ki&&G!=Mt)return V.msg=cs[ls-cn],cn;if(V.avail_out===0)return V.msg=cs[ls-ri],ri;if(t=V,U=i,i=G,n==Ka&&(Y=Ja+(s-8<<4)<<8,te=(T-1&255)>>1,te>3&&(te=3),Y|=te<<6,y!==0&&(Y|=Hm),Y+=31-Y%31,n=fs,Ee(Y)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,on}else if(t.avail_in===0&&G<=U&&G!=Mt)return t.msg=cs[ls-ri],ri;if(n==Ki&&t.avail_in!==0)return V.msg=cs[ls-ri],ri;if(t.avail_in!==0||C!==0||G!=fi&&n!=Ki){switch(oe=-1,rn[T].func){case _f:oe=st(G);break;case Ss:oe=Wi(G);break;case Mr:oe=ni(G);break}if((oe==Xi||oe==ds)&&(n=Ki),oe==Yt||oe==Xi)return t.avail_out===0&&(i=-1),on;if(oe==us){if(G==H0)Pe();else if(Q(0,0,!1),G==Dm)for(z=0;z<h;z++)d[z]=0;if(t.flush_pending(),t.avail_out===0)return i=-1,on}}return G!=Mt?on:gf}}function wf(){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}wf.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new Gm,t||(t=ko),n.dstate.deflateInit(n,e,t)},deflate:function(e){const t=this;return t.dstate?t.dstate.deflate(t,e):cn},deflateEnd:function(){const e=this;if(!e.dstate)return cn;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):cn},deflateSetDictionary:function(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):cn},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 Ym(e){const t=this,n=new wf,r=Wm(e&&e.chunkSize?e.chunkSize:64*1024),i=fi,o=new Uint8Array(r);let s=e?e.level:Xs;typeof s=="undefined"&&(s=Xs),n.deflateInit(s),n.next_out=o,t.append=function(a,c){let u,l,d=0,f=0,h=0;const w=[];if(!!a.length){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=r,u=n.deflate(i),u!=on)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,c&&n.next_in_index>0&&n.next_in_index!=d&&(c(n.next_in_index),d=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return w.length>1?(l=new Uint8Array(h),w.forEach(function(_){l.set(_,f),f+=_.length})):l=w[0]||new Uint8Array(0),l}},t.flush=function(){let a,c,u=0,l=0;const d=[];do{if(n.next_out_index=0,n.avail_out=r,a=n.deflate(Mt),a!=gf&&a!=on)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&d.push(o.slice(0,n.next_out_index)),l+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),c=new Uint8Array(l),d.forEach(function(f){c.set(f,u),u+=f.length}),c}}function Wm(e){return e+5*(Math.floor(e/16383)+1)}const qm=15,Re=0,Un=1,Xm=2,Lt=-2,Qe=-3,G0=-4,Zn=-5,$t=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],vf=1440,Km=0,Jm=4,Qm=9,e5=5,t5=[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],n5=[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],r5=[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],i5=[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],o5=[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],s5=[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],tr=15;function Ul(){const e=this;let t,n,r,i,o,s;function a(u,l,d,f,h,w,_,m,g,v,b){let x,y,k,C,E,M,S,T,L,F,K,H,N,j,Z;F=0,E=d;do r[u[l+F]]++,F++,E--;while(E!==0);if(r[0]==d)return _[0]=-1,m[0]=0,Re;for(T=m[0],M=1;M<=tr&&r[M]===0;M++);for(S=M,T<M&&(T=M),E=tr;E!==0&&r[E]===0;E--);for(k=E,T>E&&(T=E),m[0]=T,j=1<<M;M<E;M++,j<<=1)if((j-=r[M])<0)return Qe;if((j-=r[E])<0)return Qe;for(r[E]+=j,s[1]=M=0,F=1,N=2;--E!==0;)s[N]=M+=r[F],N++,F++;E=0,F=0;do(M=u[l+F])!==0&&(b[s[M]++]=E),F++;while(++E<d);for(d=s[k],s[0]=E=0,F=0,C=-1,H=-T,o[0]=0,K=0,Z=0;S<=k;S++)for(x=r[S];x--!==0;){for(;S>H+T;){if(C++,H+=T,Z=k-H,Z=Z>T?T:Z,(y=1<<(M=S-H))>x+1&&(y-=x+1,N=S,M<Z))for(;++M<Z&&!((y<<=1)<=r[++N]);)y-=r[N];if(Z=1<<M,v[0]+Z>vf)return Qe;o[C]=K=v[0],v[0]+=Z,C!==0?(s[C]=E,i[0]=M,i[1]=T,M=E>>>H-T,i[2]=K-o[C-1]-M,g.set(i,(o[C-1]+M)*3)):_[0]=K}for(i[1]=S-H,F>=d?i[0]=128+64:b[F]<f?(i[0]=b[F]<256?0:32+64,i[2]=b[F++]):(i[0]=w[b[F]-f]+16+64,i[2]=h[b[F++]-f]),y=1<<S-H,M=E>>>H;M<Z;M+=y)g.set(i,(K+M)*3);for(M=1<<S-1;(E&M)!==0;M>>>=1)E^=M;for(E^=M,L=(1<<H)-1;(E&L)!=s[C];)C--,H-=T,L=(1<<H)-1}return j!==0&&k!=1?Zn:Re}function c(u){let l;for(t||(t=[],n=[],r=new Int32Array(tr+1),i=[],o=new Int32Array(tr),s=new Int32Array(tr+1)),n.length<u&&(n=[]),l=0;l<u;l++)n[l]=0;for(l=0;l<tr+1;l++)r[l]=0;for(l=0;l<3;l++)i[l]=0;o.set(r.subarray(0,tr),0),s.set(r.subarray(0,tr+1),0)}e.inflate_trees_bits=function(u,l,d,f,h){let w;return c(19),t[0]=0,w=a(u,0,19,19,null,null,d,l,f,t,n),w==Qe?h.msg="oversubscribed dynamic bit lengths tree":(w==Zn||l[0]===0)&&(h.msg="incomplete dynamic bit lengths tree",w=Qe),w},e.inflate_trees_dynamic=function(u,l,d,f,h,w,_,m,g){let v;return c(288),t[0]=0,v=a(d,0,u,257,r5,i5,w,f,m,t,n),v!=Re||f[0]===0?(v==Qe?g.msg="oversubscribed literal/length tree":v!=G0&&(g.msg="incomplete literal/length tree",v=Qe),v):(c(288),v=a(d,u,l,0,o5,s5,_,h,m,t,n),v!=Re||h[0]===0&&u>257?(v==Qe?g.msg="oversubscribed distance tree":v==Zn?(g.msg="incomplete distance tree",v=Qe):v!=G0&&(g.msg="empty distance tree with lengths",v=Qe),v):Re)}}Ul.inflate_trees_fixed=function(e,t,n,r){return e[0]=Qm,t[0]=e5,n[0]=t5,r[0]=n5,Re};const hs=0,Y0=1,W0=2,q0=3,X0=4,K0=5,J0=6,el=7,Q0=8,ps=9;function a5(){const e=this;let t,n=0,r,i=0,o=0,s=0,a=0,c=0,u=0,l=0,d,f=0,h,w=0;function _(m,g,v,b,x,y,k,C){let E,M,S,T,L,F,K,H,N,j,Z,ee,R,A,O,$;K=C.next_in_index,H=C.avail_in,L=k.bitb,F=k.bitk,N=k.write,j=N<k.read?k.read-N-1:k.end-N,Z=$t[m],ee=$t[g];do{for(;F<20;)H--,L|=(C.read_byte(K++)&255)<<F,F+=8;if(E=L&Z,M=v,S=b,$=(S+E)*3,(T=M[$])===0){L>>=M[$+1],F-=M[$+1],k.win[N++]=M[$+2],j--;continue}do{if(L>>=M[$+1],F-=M[$+1],(T&16)!==0){for(T&=15,R=M[$+2]+(L&$t[T]),L>>=T,F-=T;F<15;)H--,L|=(C.read_byte(K++)&255)<<F,F+=8;E=L&ee,M=x,S=y,$=(S+E)*3,T=M[$];do if(L>>=M[$+1],F-=M[$+1],(T&16)!==0){for(T&=15;F<T;)H--,L|=(C.read_byte(K++)&255)<<F,F+=8;if(A=M[$+2]+(L&$t[T]),L>>=T,F-=T,j-=R,N>=A)O=N-A,N-O>0&&2>N-O?(k.win[N++]=k.win[O++],k.win[N++]=k.win[O++],R-=2):(k.win.set(k.win.subarray(O,O+2),N),N+=2,O+=2,R-=2);else{O=N-A;do O+=k.end;while(O<0);if(T=k.end-O,R>T){if(R-=T,N-O>0&&T>N-O)do k.win[N++]=k.win[O++];while(--T!==0);else k.win.set(k.win.subarray(O,O+T),N),N+=T,O+=T,T=0;O=0}}if(N-O>0&&R>N-O)do k.win[N++]=k.win[O++];while(--R!==0);else k.win.set(k.win.subarray(O,O+R),N),N+=R,O+=R,R=0;break}else if((T&64)===0)E+=M[$+2],E+=L&$t[T],$=(S+E)*3,T=M[$];else return C.msg="invalid distance code",R=C.avail_in-H,R=F>>3<R?F>>3:R,H+=R,K-=R,F-=R<<3,k.bitb=L,k.bitk=F,C.avail_in=H,C.total_in+=K-C.next_in_index,C.next_in_index=K,k.write=N,Qe;while(!0);break}if((T&64)===0){if(E+=M[$+2],E+=L&$t[T],$=(S+E)*3,(T=M[$])===0){L>>=M[$+1],F-=M[$+1],k.win[N++]=M[$+2],j--;break}}else return(T&32)!==0?(R=C.avail_in-H,R=F>>3<R?F>>3:R,H+=R,K-=R,F-=R<<3,k.bitb=L,k.bitk=F,C.avail_in=H,C.total_in+=K-C.next_in_index,C.next_in_index=K,k.write=N,Un):(C.msg="invalid literal/length code",R=C.avail_in-H,R=F>>3<R?F>>3:R,H+=R,K-=R,F-=R<<3,k.bitb=L,k.bitk=F,C.avail_in=H,C.total_in+=K-C.next_in_index,C.next_in_index=K,k.write=N,Qe)}while(!0)}while(j>=258&&H>=10);return R=C.avail_in-H,R=F>>3<R?F>>3:R,H+=R,K-=R,F-=R<<3,k.bitb=L,k.bitk=F,C.avail_in=H,C.total_in+=K-C.next_in_index,C.next_in_index=K,k.write=N,Re}e.init=function(m,g,v,b,x,y){t=hs,u=m,l=g,d=v,f=b,h=x,w=y,r=null},e.proc=function(m,g,v){let b,x,y,k=0,C=0,E=0,M,S,T,L;for(E=g.next_in_index,M=g.avail_in,k=m.bitb,C=m.bitk,S=m.write,T=S<m.read?m.read-S-1:m.end-S;;)switch(t){case hs:if(T>=258&&M>=10&&(m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,v=_(u,l,d,f,h,w,m,g),E=g.next_in_index,M=g.avail_in,k=m.bitb,C=m.bitk,S=m.write,T=S<m.read?m.read-S-1:m.end-S,v!=Re)){t=v==Un?el:ps;break}o=u,r=d,i=f,t=Y0;case Y0:for(b=o;C<b;){if(M!==0)v=Re;else return m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);M--,k|=(g.read_byte(E++)&255)<<C,C+=8}if(x=(i+(k&$t[b]))*3,k>>>=r[x+1],C-=r[x+1],y=r[x],y===0){s=r[x+2],t=J0;break}if((y&16)!==0){a=y&15,n=r[x+2],t=W0;break}if((y&64)===0){o=y,i=x/3+r[x+2];break}if((y&32)!==0){t=el;break}return t=ps,g.msg="invalid literal/length code",v=Qe,m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);case W0:for(b=a;C<b;){if(M!==0)v=Re;else return m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);M--,k|=(g.read_byte(E++)&255)<<C,C+=8}n+=k&$t[b],k>>=b,C-=b,o=l,r=h,i=w,t=q0;case q0:for(b=o;C<b;){if(M!==0)v=Re;else return m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);M--,k|=(g.read_byte(E++)&255)<<C,C+=8}if(x=(i+(k&$t[b]))*3,k>>=r[x+1],C-=r[x+1],y=r[x],(y&16)!==0){a=y&15,c=r[x+2],t=X0;break}if((y&64)===0){o=y,i=x/3+r[x+2];break}return t=ps,g.msg="invalid distance code",v=Qe,m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);case X0:for(b=a;C<b;){if(M!==0)v=Re;else return m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);M--,k|=(g.read_byte(E++)&255)<<C,C+=8}c+=k&$t[b],k>>=b,C-=b,t=K0;case K0:for(L=S-c;L<0;)L+=m.end;for(;n!==0;){if(T===0&&(S==m.end&&m.read!==0&&(S=0,T=S<m.read?m.read-S-1:m.end-S),T===0&&(m.write=S,v=m.inflate_flush(g,v),S=m.write,T=S<m.read?m.read-S-1:m.end-S,S==m.end&&m.read!==0&&(S=0,T=S<m.read?m.read-S-1:m.end-S),T===0)))return m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);m.win[S++]=m.win[L++],T--,L==m.end&&(L=0),n--}t=hs;break;case J0:if(T===0&&(S==m.end&&m.read!==0&&(S=0,T=S<m.read?m.read-S-1:m.end-S),T===0&&(m.write=S,v=m.inflate_flush(g,v),S=m.write,T=S<m.read?m.read-S-1:m.end-S,S==m.end&&m.read!==0&&(S=0,T=S<m.read?m.read-S-1:m.end-S),T===0)))return m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);v=Re,m.win[S++]=s,T--,t=hs;break;case el:if(C>7&&(C-=8,M++,E--),m.write=S,v=m.inflate_flush(g,v),S=m.write,T=S<m.read?m.read-S-1:m.end-S,m.read!=m.write)return m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);t=Q0;case Q0:return v=Un,m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);case ps:return v=Qe,m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v);default:return v=Lt,m.bitb=k,m.bitk=C,g.avail_in=M,g.total_in+=E-g.next_in_index,g.next_in_index=E,m.write=S,m.inflate_flush(g,v)}},e.free=function(){}}const e1=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ii=0,tl=1,t1=2,n1=3,r1=4,i1=5,ms=6,gs=7,o1=8,Ar=9;function l5(e,t){const n=this;let r=ii,i=0,o=0,s=0,a;const c=[0],u=[0],l=new a5;let d=0,f=new Int32Array(vf*3);const h=0,w=new Ul;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(_,m){m&&(m[0]=h),r==ms&&l.free(_),r=ii,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(_,m){let g,v,b;return v=_.next_out_index,b=n.read,g=(b<=n.write?n.write:n.end)-b,g>_.avail_out&&(g=_.avail_out),g!==0&&m==Zn&&(m=Re),_.avail_out-=g,_.total_out+=g,_.next_out.set(n.win.subarray(b,b+g),v),v+=g,b+=g,b==n.end&&(b=0,n.write==n.end&&(n.write=0),g=n.write-b,g>_.avail_out&&(g=_.avail_out),g!==0&&m==Zn&&(m=Re),_.avail_out-=g,_.total_out+=g,_.next_out.set(n.win.subarray(b,b+g),v),v+=g,b+=g),_.next_out_index=v,n.read=b,m},n.proc=function(_,m){let g,v,b,x,y,k,C,E;for(x=_.next_in_index,y=_.avail_in,v=n.bitb,b=n.bitk,k=n.write,C=k<n.read?n.read-k-1:n.end-k;;){let M,S,T,L,F,K,H,N;switch(r){case ii:for(;b<3;){if(y!==0)m=Re;else return n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);y--,v|=(_.read_byte(x++)&255)<<b,b+=8}switch(g=v&7,d=g&1,g>>>1){case 0:v>>>=3,b-=3,g=b&7,v>>>=g,b-=g,r=tl;break;case 1:M=[],S=[],T=[[]],L=[[]],Ul.inflate_trees_fixed(M,S,T,L),l.init(M[0],S[0],T[0],0,L[0],0),v>>>=3,b-=3,r=ms;break;case 2:v>>>=3,b-=3,r=n1;break;case 3:return v>>>=3,b-=3,r=Ar,_.msg="invalid block type",m=Qe,n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m)}break;case tl:for(;b<32;){if(y!==0)m=Re;else return n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);y--,v|=(_.read_byte(x++)&255)<<b,b+=8}if((~v>>>16&65535)!=(v&65535))return r=Ar,_.msg="invalid stored block lengths",m=Qe,n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);i=v&65535,v=b=0,r=i!==0?t1:d!==0?gs:ii;break;case t1: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,m=n.inflate_flush(_,m),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=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);if(m=Re,g=i,g>y&&(g=y),g>C&&(g=C),n.win.set(_.read_buf(x,g),k),x+=g,y-=g,k+=g,C-=g,(i-=g)!==0)break;r=d!==0?gs:ii;break;case n1:for(;b<14;){if(y!==0)m=Re;else return n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);y--,v|=(_.read_byte(x++)&255)<<b,b+=8}if(o=g=v&16383,(g&31)>29||(g>>5&31)>29)return r=Ar,_.msg="too many length or distance symbols",m=Qe,n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);if(g=258+(g&31)+(g>>5&31),!a||a.length<g)a=[];else for(E=0;E<g;E++)a[E]=0;v>>>=14,b-=14,s=0,r=r1;case r1:for(;s<4+(o>>>10);){for(;b<3;){if(y!==0)m=Re;else return n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);y--,v|=(_.read_byte(x++)&255)<<b,b+=8}a[e1[s++]]=v&7,v>>>=3,b-=3}for(;s<19;)a[e1[s++]]=0;if(c[0]=7,g=w.inflate_trees_bits(a,c,u,f,_),g!=Re)return m=g,m==Qe&&(a=null,r=Ar),n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);s=0,r=i1;case i1:for(;g=o,!(s>=258+(g&31)+(g>>5&31));){let j,Z;for(g=c[0];b<g;){if(y!==0)m=Re;else return n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);y--,v|=(_.read_byte(x++)&255)<<b,b+=8}if(g=f[(u[0]+(v&$t[g]))*3+1],Z=f[(u[0]+(v&$t[g]))*3+2],Z<16)v>>>=g,b-=g,a[s++]=Z;else{for(E=Z==18?7:Z-14,j=Z==18?11:3;b<g+E;){if(y!==0)m=Re;else return n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);y--,v|=(_.read_byte(x++)&255)<<b,b+=8}if(v>>>=g,b-=g,j+=v&$t[E],v>>>=E,b-=E,E=s,g=o,E+j>258+(g&31)+(g>>5&31)||Z==16&&E<1)return a=null,r=Ar,_.msg="invalid bit length repeat",m=Qe,n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);Z=Z==16?a[E-1]:0;do a[E++]=Z;while(--j!==0);s=E}}if(u[0]=-1,F=[],K=[],H=[],N=[],F[0]=9,K[0]=6,g=o,g=w.inflate_trees_dynamic(257+(g&31),1+(g>>5&31),a,F,K,H,N,f,_),g!=Re)return g==Qe&&(a=null,r=Ar),m=g,n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);l.init(F[0],K[0],f,H[0],f,N[0]),r=ms;case ms:if(n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,(m=l.proc(n,_,m))!=Un)return n.inflate_flush(_,m);if(m=Re,l.free(_),x=_.next_in_index,y=_.avail_in,v=n.bitb,b=n.bitk,k=n.write,C=k<n.read?n.read-k-1:n.end-k,d===0){r=ii;break}r=gs;case gs:if(n.write=k,m=n.inflate_flush(_,m),k=n.write,C=k<n.read?n.read-k-1:n.end-k,n.read!=n.write)return n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);r=o1;case o1:return m=Un,n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);case Ar:return m=Qe,n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m);default:return m=Lt,n.bitb=v,n.bitk=b,_.avail_in=y,_.total_in+=x-_.next_in_index,_.next_in_index=x,n.write=k,n.inflate_flush(_,m)}}},n.free=function(_){n.reset(_,null),n.win=null,f=null},n.set_dictionary=function(_,m,g){n.win.set(_.subarray(m,m+g),0),n.read=n.write=g},n.sync_point=function(){return r==tl?1:0}}const c5=32,u5=8,d5=0,s1=1,a1=2,l1=3,c1=4,u1=5,nl=6,Ji=7,d1=12,nr=13,f5=[0,0,255,255];function h5(){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?Lt:(n.total_in=n.total_out=0,n.msg=null,n.istate.mode=Ji,n.istate.blocks.reset(n,null),Re)}e.inflateEnd=function(n){return e.blocks&&e.blocks.free(n),e.blocks=null,Re},e.inflateInit=function(n,r){return n.msg=null,e.blocks=null,r<8||r>15?(e.inflateEnd(n),Lt):(e.wbits=r,n.istate.blocks=new l5(n,1<<r),t(n),Re)},e.inflate=function(n,r){let i,o;if(!n||!n.istate||!n.next_in)return Lt;const s=n.istate;for(r=r==Jm?Zn:Re,i=Zn;;)switch(s.mode){case d5:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,((s.method=n.read_byte(n.next_in_index++))&15)!=u5){s.mode=nr,n.msg="unknown compression method",s.marker=5;break}if((s.method>>4)+8>s.wbits){s.mode=nr,n.msg="invalid win size",s.marker=5;break}s.mode=s1;case s1: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,((s.method<<8)+o)%31!==0){s.mode=nr,n.msg="incorrect header check",s.marker=5;break}if((o&c5)===0){s.mode=Ji;break}s.mode=a1;case a1:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,s.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,s.mode=l1;case l1:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,s.mode=c1;case c1:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,s.mode=u1;case u1:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,s.need+=n.read_byte(n.next_in_index++)&255,s.mode=nl,Xm);case nl:return s.mode=nr,n.msg="need dictionary",s.marker=0,Lt;case Ji:if(i=s.blocks.proc(n,i),i==Qe){s.mode=nr,s.marker=0;break}if(i==Re&&(i=r),i!=Un)return i;i=r,s.blocks.reset(n,s.was),s.mode=d1;case d1:return Un;case nr:return Qe;default:return Lt}},e.inflateSetDictionary=function(n,r,i){let o=0,s=i;if(!n||!n.istate||n.istate.mode!=nl)return Lt;const a=n.istate;return s>=1<<a.wbits&&(s=(1<<a.wbits)-1,o=i-s),a.blocks.set_dictionary(r,o,s),a.mode=Ji,Re},e.inflateSync=function(n){let r,i,o,s,a;if(!n||!n.istate)return Lt;const c=n.istate;if(c.mode!=nr&&(c.mode=nr,c.marker=0),(r=n.avail_in)===0)return Zn;for(i=n.next_in_index,o=c.marker;r!==0&&o<4;)n.read_byte(i)==f5[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,c.marker=o,o!=4?Qe:(s=n.total_in,a=n.total_out,t(n),n.total_in=s,n.total_out=a,c.mode=Ji,Re)},e.inflateSyncPoint=function(n){return!n||!n.istate||!n.istate.blocks?Lt:n.istate.blocks.sync_point()}}function xf(){}xf.prototype={inflateInit:function(e){const t=this;return t.istate=new h5,e||(e=qm),t.istate.inflateInit(t,e)},inflate:function(e){const t=this;return t.istate?t.istate.inflate(t,e):Lt},inflateEnd:function(){const e=this;if(!e.istate)return Lt;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync:function(){const e=this;return e.istate?e.istate.inflateSync(e):Lt},inflateSetDictionary:function(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):Lt},read_byte:function(e){return this.next_in[e]},read_buf:function(e,t){return this.next_in.subarray(e,e+t)}};function p5(e){const t=this,n=new xf,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,i=Km,o=new Uint8Array(r);let s=!1;n.inflateInit(),n.next_out=o,t.append=function(a,c){const u=[];let l,d,f=0,h=0,w=0;if(a.length!==0){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=r,n.avail_in===0&&!s&&(n.next_in_index=0,s=!0),l=n.inflate(i),s&&l===Zn){if(n.avail_in!==0)throw new Error("inflating: bad input")}else if(l!==Re&&l!==Un)throw new Error("inflating: "+n.msg);if((s||l===Un)&&n.avail_in===a.length)throw new Error("inflating: bad input");n.next_out_index&&(n.next_out_index===r?u.push(new Uint8Array(o)):u.push(o.slice(0,n.next_out_index))),w+=n.next_out_index,c&&n.next_in_index>0&&n.next_in_index!=f&&(c(n.next_in_index),f=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return u.length>1?(d=new Uint8Array(w),u.forEach(function(_){d.set(_,h),h+=_.length})):d=u[0]||new Uint8Array(0),d}},t.flush=function(){n.inflateEnd()}}const m5={chunkSize:512*1024,maxWorkers:typeof navigator!="undefined"&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},Tt=Object.assign({},m5);function bf(){return Tt}function Lc(e){if(e.baseURL!==void 0&&(Tt.baseURL=e.baseURL),e.chunkSize!==void 0&&(Tt.chunkSize=e.chunkSize),e.maxWorkers!==void 0&&(Tt.maxWorkers=e.maxWorkers),e.terminateWorkerTimeout!==void 0&&(Tt.terminateWorkerTimeout=e.terminateWorkerTimeout),e.useWebWorkers!==void 0&&(Tt.useWebWorkers=e.useWebWorkers),e.Deflate!==void 0&&(Tt.Deflate=e.Deflate),e.Inflate!==void 0&&(Tt.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");Tt.workerScripts||(Tt.workerScripts={}),Tt.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");Tt.workerScripts||(Tt.workerScripts={}),Tt.workerScripts.inflate=e.workerScripts.inflate}}}const Qi={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 Qi)if(Qi.hasOwnProperty(t)){for(let n in Qi[t])if(Qi[t].hasOwnProperty(n)){const r=Qi[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 yf=[];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;yf[e]=t}class Co{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^yf[(n^t[r])&255];this.crc=n}get(){return~this.crc}}function Zl(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 Rt={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);const n=e[e.length-1],r=Rt.getPartial(n);return r===32?e.concat(t):Rt._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+Rt.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]=Rt.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 s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const i=e.length?e[e.length-1]:0,o=Rt.getPartial(i);return r.push(Rt.partial(t+o&31,t+o>32?n:r.pop(),1)),r}},kf={bytes:{fromBits(e){const n=Rt.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(Rt.partial(8*(n&3),r)),t}}},Oc={};Oc.sha1=function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()};Oc.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=kf.utf8String.toBits(e));const n=t._buffer=Rt.concat(t._buffer,e),r=t._length,i=t._length=r+Rt.bitLength(e);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const o=new Uint32Array(n);let s=0;for(let a=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a<=i;a+=t.blockSize)t._block(o.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t},finalize:function(){const e=this;let t=e._buffer;const n=e._h;t=Rt.concat(t,[Rt.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 u=0;u<16;u++)r[u]=e[u];let i=n[0],o=n[1],s=n[2],a=n[3],c=n[4];for(let u=0;u<=79;u++){u>=16&&(r[u]=t._S(1,r[u-3]^r[u-8]^r[u-14]^r[u-16]));const l=t._S(5,i)+t._f(u,o,s,a)+c+r[u]+t._key[Math.floor(u/20)]|0;c=a,a=s,s=t._S(30,o),o=i,i=l}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0}};const Cf={};Cf.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,s,a,c=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],o=i;o<4*i+28;o++){let u=s[o-1];(o%i===0||i===8&&o%i===4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[u&255],o%i===0&&(u=u<<8^u>>>24^c<<24,c=c<<1^(c>>7)*283)),s[o]=s[o-i]^u}for(let u=0;o;u++,o--){const l=s[u&3?o:o-4];o<=4||u<4?a[u]=l:a[u]=r[0][n[l>>>24]]^r[1][n[l>>16&255]]^r[2][n[l>>8&255]]^r[3][n[l&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 s,a,c,u;for(let l=0;l<256;l++)o[(i[l]=l<<1^(l>>7)*283)^l]=l;for(let l=s=0;!n[l];l^=a||1,s=o[s]||1){let d=s^s<<1^s<<2^s<<3^s<<4;d=d>>8^d&255^99,n[l]=d,r[d]=l,u=i[c=i[a=i[l]]];let f=u*16843009^c*65537^a*257^l*16843008,h=i[d]*257^d*16843008;for(let w=0;w<4;w++)e[w][l]=h=h<<24^h>>>8,t[w][d]=f=f<<24^f>>>8}for(let l=0;l<5;l++)e[l]=e[l].slice(0),t[l]=t[l].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],s=o[0],a=o[1],c=o[2],u=o[3],l=o[4];let d=e[0]^n[0],f=e[t?3:1]^n[1],h=e[2]^n[2],w=e[t?1:3]^n[3],_=4,m,g,v;for(let b=0;b<r;b++)m=s[d>>>24]^a[f>>16&255]^c[h>>8&255]^u[w&255]^n[_],g=s[f>>>24]^a[h>>16&255]^c[w>>8&255]^u[d&255]^n[_+1],v=s[h>>>24]^a[w>>16&255]^c[d>>8&255]^u[f&255]^n[_+2],w=s[w>>>24]^a[d>>16&255]^c[f>>8&255]^u[h&255]^n[_+3],_+=4,d=m,f=g,h=v;for(let b=0;b<4;b++)i[t?3&-b:b]=l[d>>>24]<<24^l[f>>16&255]<<16^l[h>>8&255]<<8^l[w&255]^n[_++],m=d,d=f,f=h,h=w,w=m;return i}};const Ef={};Ef.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=Rt.bitLength(t);for(let o=0;o<r;o+=4){this.incCounter(n);const s=e.encrypt(n);t[o]^=s[0],t[o+1]^=s[1],t[o+2]^=s[2],t[o+3]^=s[3]}return Rt.clamp(t,i)}};const Af={};Af.hmacSha1=class{constructor(e){const t=this,n=t._hash=Oc.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 Sf="Invalid pasword",pi=16,g5="raw",If={name:"PBKDF2"},_5={name:"HMAC"},w5="SHA-1",v5=Object.assign({hash:_5},If),x5=Object.assign({iterations:1e3,hash:{name:w5}},If),b5=["deriveBits"],Eo=[8,12,16],eo=[16,24,32],rr=10,Mf=[0,0,0,0],Sn=kf.bytes,Tf=Cf.aes,Lf=Ef.ctrGladman,Of=Af.hmacSha1;class y5{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=jt(t,0,Eo[n.strength]+2);await C5(n,i,n.password),n.password=null,n.aesCtrGladman=new Lf(new Tf(n.keys.key),Array.from(Mf)),n.hmac=new Of(n.keys.authentication),t=jt(t,Eo[n.strength]+2)}const r=new Uint8Array(t.length-rr-(t.length-rr)%pi);return Nf(n,t,r,0,rr,!0)}flush(){const t=this,n=t.pendingInput,r=jt(n,0,n.length-rr),i=jt(n,n.length-rr);let o=new Uint8Array(0);if(r.length){const a=Sn.toBits(r);t.hmac.update(a);const c=t.aesCtrGladman.update(a);o=Sn.fromBits(c)}let s=!0;if(t.signed){const a=jt(Sn.fromBits(t.hmac.digest()),0,rr);for(let c=0;c<rr;c++)a[c]!=i[c]&&(s=!1)}return{valid:s,data:o}}}class k5{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 E5(n,n.password),n.password=null,n.aesCtrGladman=new Lf(new Tf(n.keys.key),Array.from(Mf)),n.hmac=new Of(n.keys.authentication));const i=new Uint8Array(r.length+t.length-t.length%pi);return i.set(r,0),Nf(n,t,i,r.length,0)}flush(){const t=this;let n=new Uint8Array(0);if(t.pendingInput.length){const i=t.aesCtrGladman.update(Sn.toBits(t.pendingInput));t.hmac.update(i),n=Sn.fromBits(i)}const r=jt(Sn.fromBits(t.hmac.digest()),0,rr);return{data:Nc(n,r),signature:r}}}function Nf(e,t,n,r,i,o){const s=t.length-i;e.pendingInput.length&&(t=Nc(e.pendingInput,t),n=A5(n,s-s%pi));let a;for(a=0;a<=s-pi;a+=pi){const c=Sn.toBits(jt(t,a,a+pi));o&&e.hmac.update(c);const u=e.aesCtrGladman.update(c);o||e.hmac.update(u),n.set(Sn.fromBits(u),a+r)}return e.pendingInput=jt(t,a),n}async function C5(e,t,n){await Rf(e,n,jt(t,0,Eo[e.strength]));const r=jt(t,Eo[e.strength]),i=e.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(Sf)}async function E5(e,t){const n=crypto.getRandomValues(new Uint8Array(Eo[e.strength]));return await Rf(e,t,n),Nc(n,e.keys.passwordVerification)}async function Rf(e,t,n){const r=Zl(t),i=await crypto.subtle.importKey(g5,r,v5,!1,b5),o=await crypto.subtle.deriveBits(Object.assign({salt:n},x5),i,8*(eo[e.strength]*2+2)),s=new Uint8Array(o);e.keys={key:Sn.toBits(jt(s,0,eo[e.strength])),authentication:Sn.toBits(jt(s,eo[e.strength],eo[e.strength]*2)),passwordVerification:jt(s,eo[e.strength]*2)}}function Nc(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 A5(e,t){if(t&&t>e.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function jt(e,t,n){return e.subarray(t,n)}const ki=12;class S5{constructor(t,n){const r=this;Object.assign(r,{password:t,passwordVerification:n}),Df(r,t)}append(t){const n=this;if(n.password){const r=f1(n,t.subarray(0,ki));if(n.password=null,r[ki-1]!=n.passwordVerification)throw new Error(Sf);t=t.subarray(ki)}return f1(n,t)}flush(){return{valid:!0,data:new Uint8Array(0)}}}class I5{constructor(t,n){const r=this;Object.assign(r,{password:t,passwordVerification:n}),Df(r,t)}append(t){const n=this;let r,i;if(n.password){n.password=null;const o=crypto.getRandomValues(new Uint8Array(ki));o[ki-1]=n.passwordVerification,r=new Uint8Array(t.length+o.length),r.set(h1(n,o),0),i=ki}else r=new Uint8Array(t.length),i=0;return r.set(h1(n,t),i),r}flush(){return{data:new Uint8Array(0)}}}function f1(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Ff(e)^t[r],Rc(e,n[r]);return n}function h1(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Ff(e)^t[r],Rc(e,t[r]);return n}function Df(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new Co(e.keys[0]),e.crcKey2=new Co(e.keys[2]);for(let n=0;n<t.length;n++)Rc(e,t.charCodeAt(n))}function Rc(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=p1(e.keys[1]+Pf(e.keys[0])),e.keys[1]=p1(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function Ff(e){const t=e.keys[2]|2;return Pf(Math.imul(t,t^1)>>>8)}function Pf(e){return e&255}function p1(e){return e&4294967295}const $f="deflate",Bf="inflate",m1="Invalid signature";class M5{constructor(t,{signature:n,password:r,signed:i,compressed:o,zipCrypto:s,passwordVerification:a,encryptionStrength:c},{chunkSize:u}){const l=Boolean(r);Object.assign(this,{signature:n,encrypted:l,signed:i,compressed:o,inflate:o&&new t({chunkSize:u}),crc32:i&&new Co,zipCrypto:s,decrypt:l&&s?new S5(r,a):new y5(r,i,c)})}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(m1);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(m1)}return t.compressed&&(r=await t.inflate.append(r)||new Uint8Array(0),await t.inflate.flush()),{data:r,signature:n}}}class T5{constructor(t,{encrypted:n,signed:r,compressed:i,level:o,zipCrypto:s,password:a,passwordVerification:c,encryptionStrength:u},{chunkSize:l}){Object.assign(this,{encrypted:n,signed:r,compressed:i,deflate:i&&new t({level:o||5,chunkSize:l}),crc32:r&&new Co,zipCrypto:s,encrypt:n&&s?new I5(a,c):new k5(a,u)})}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 L5(e,t,n){if(t.codecType.startsWith($f))return new T5(e,t,n);if(t.codecType.startsWith(Bf))return new M5(e,t,n)}const g1="init",_1="append",rl="flush",O5="message";let w1=!0;var il=(e,t,n,r,i,o,s)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:s,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,i(e)}}),o?R5(e,r):N5(e,r));function N5(e,t){const n=L5(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 R5(e,t){let n;const r={type:"module"};if(!e.interface){if(!w1)e.worker=i(r,t.baseURL);else try{e.worker=i({},t.baseURL)}catch{w1=!1,e.worker=i(r,t.baseURL)}e.worker.addEventListener(O5,a,!1),e.interface={append(c){return o({type:_1,data:c})},flush(){return o({type:rl})},abort(){e.onTaskFinished()}}}return e.interface;function i(c,u){let l,d;l=e.scripts[0],typeof l=="function"&&(l=l());try{d=new URL(l,u)}catch{d=l}return new Worker(d,c)}async function o(c){if(!n){const u=e.options,l=e.scripts.slice(1);await s({scripts:l,type:g1,options:u,config:{chunkSize:t.chunkSize}})}return s(c)}function s(c){const u=e.worker,l=new Promise((d,f)=>n={resolve:d,reject:f});try{if(c.data)try{c.data=c.data.buffer,u.postMessage(c,[c.data])}catch{u.postMessage(c)}else u.postMessage(c)}catch(d){n.reject(d),n=null,e.onTaskFinished()}return l}function a(c){const u=c.data;if(n){const l=u.error,d=u.type;if(l){const f=new Error(l.message);f.stack=l.stack,n.reject(f),n=null,e.onTaskFinished()}else if(d==g1||d==rl||d==_1){const f=u.data;d==rl?(n.resolve({data:new Uint8Array(f),signature:u.signature}),n=null,e.onTaskFinished()):n.resolve(f&&new Uint8Array(f))}}}}let Sr=[],ol=[];function Vf(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(Sr.length<n.maxWorkers){const a={};return Sr.push(a),il(a,e,t,n,s,i,o)}else{const a=Sr.find(c=>!c.busy);return a?(v1(a),il(a,e,t,n,s,i,o)):new Promise(c=>ol.push({resolve:c,codecConstructor:e,options:t,webWorker:i,scripts:o}))}function s(a){if(ol.length){const[{resolve:c,codecConstructor:u,options:l,webWorker:d,scripts:f}]=ol.splice(0,1);c(il(a,u,l,n,s,d,f))}else a.worker?(v1(a),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(a.terminateTimeout=setTimeout(()=>{Sr=Sr.filter(c=>c!=a),a.terminate()},n.terminateWorkerTimeout))):Sr=Sr.filter(c=>c!=a)}}function v1(e){e.terminateTimeout&&(clearTimeout(e.terminateTimeout),e.terminateTimeout=null)}var D5=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&<(!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 Gl="text/plain";class jf{constructor(){this.size=0}init(){this.initialized=!0}}class zf extends jf{}class Dc extends jf{writeUint8Array(t){this.size+=t.length}}class F5 extends zf{constructor(t){super(),this.blobReader=new Hf(new Blob([t],{type:Gl}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,n){return this.blobReader.readUint8Array(t,n)}}class P5 extends Dc{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Gl})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Gl})}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 $5 extends Dc{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 Hf extends zf{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=s=>i(new Uint8Array(s.target.result)),r.onerror=()=>o(r.error),r.readAsArrayBuffer(this.blob.slice(t,t+n))})}}}class B5 extends Dc{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 yt=4294967295,un=65535,Yl=8,Uf=0,Zf=99,Gf=67324752,V5=134695760,Wl=33639248,Yf=101010256,ql=101075792,Wf=117853008,Ks=22,Ms=20,Ts=56,j5=Ks+Ms+Ts,z5=1,qf=1,Xf=39169,Kf=10,Jf=1,Fc=21589,H5=28789,U5=25461,Xl=1,Z5=6,Kl=8,Jl=2048,Ql=16,G5=20,x1=45,b1=51,Ls="/",y1=new Date(2107,11,31),k1=new Date(1980,0,1),Y5="\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 W5=e=>{let t="";for(let n=0;n<e.length;n++)t+=Y5[e[n]];return t};async function ec(e,t){if(t&&t.trim().toLowerCase()=="cp437")return W5(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 q5=64,X5="Abort error";async function Qf(e,t,n,r,i,o,s){const a=Math.max(o.chunkSize,q5);return c();async function c(u=0,l=0){const d=s.signal;if(u<i){sl(d,e);const f=await t.readUint8Array(u+r,Math.min(a,i-u)),h=f.length;sl(d,e);const w=await e.append(f);if(sl(d,e),l+=await C1(n,w),s.onprogress)try{s.onprogress(u+h,i)}catch{}return c(u+a,l)}else{const f=await e.flush();return l+=await C1(n,f.data),{signature:f.signature,length:l}}}}function sl(e,t){if(e&&e.aborted)throw t.abort(),new Error(X5)}async function C1(e,t){return t.length&&await e.writeUint8Array(t),t.length}const K5=["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 Js{constructor(t){K5.forEach(n=>this[n]=t[n])}}const al="File format is not recognized",J5="End of central directory not found",Q5="End of Zip64 central directory not found",eg="End of Zip64 central directory locator not found",tg="Central directory header not found",ng="Local file header not found",rg="Zip64 extra field not found",ig="File contains encrypted entry",og="Encryption method not supported",E1="Compression method not supported",A1="utf-8",S1="cp437",I1=["uncompressedSize","compressedSize","offset"];class sg{constructor(t,n={}){Object.assign(this,{reader:t,options:n,config:bf()})}async getEntries(t={}){const n=this,r=n.reader;if(r.initialized||await r.init(),r.size<Ks)throw new Error(al);const i=await fg(r,Yf,r.size,Ks,un*16);if(!i)throw new Error(J5);const o=Ct(i);let s=dt(o,12),a=dt(o,16),c=zt(o,8),u=0;if(a==yt||s==yt||c==un){const w=await lr(r,i.offset-Ms,Ms),_=Ct(w);if(dt(_,0)!=Wf)throw new Error(Q5);a=Os(_,8);let m=await lr(r,a,Ts),g=Ct(m);const v=i.offset-Ms-Ts;if(dt(g,0)!=ql&&a!=v){const b=a;a=v,u=a-b,m=await lr(r,a,Ts),g=Ct(m)}if(dt(g,0)!=ql)throw new Error(eg);c=Os(g,32),s=Os(g,40),a-=s}if(a<0||a>=r.size)throw new Error(al);let l=0,d=await lr(r,a,s),f=Ct(d);if(s){const w=i.offset-s;if(dt(f,l)!=Wl&&a!=w){const _=a;a=w,u=a-_,d=await lr(r,a,s),f=Ct(d)}}if(a<0||a>=r.size)throw new Error(al);const h=[];for(let w=0;w<c;w++){const _=new ag(r,n.config,n.options);if(dt(f,l)!=Wl)throw new Error(tg);eh(_,f,l+6);const m=Boolean(_.bitFlag.languageEncodingFlag),g=l+46,v=g+_.filenameLength,b=v+_.extraFieldLength,x=zt(f,l+4),y=(x&0)==0;Object.assign(_,{versionMadeBy:x,msDosCompatible:y,compressedSize:0,uncompressedSize:0,commentLength:zt(f,l+32),directory:y&&(Ci(f,l+38)&Ql)==Ql,offset:dt(f,l+42)+u,internalFileAttribute:dt(f,l+34),externalFileAttribute:dt(f,l+38),rawFilename:d.subarray(g,v),filenameUTF8:m,commentUTF8:m,rawExtraField:d.subarray(v,b)});const k=b+_.commentLength;_.rawComment=d.subarray(b,k);const C=mi(n,t,"filenameEncoding"),E=mi(n,t,"commentEncoding"),[M,S]=await Promise.all([ec(_.rawFilename,_.filenameUTF8?A1:C||S1),ec(_.rawComment,_.commentUTF8?A1:E||S1)]);_.filename=M,_.comment=S,!_.directory&&_.filename.endsWith(Ls)&&(_.directory=!0),await th(_,_,f,l+6);const T=new Js(_);if(T.getData=(L,F)=>_.getData(L,T,F),h.push(T),l=k,t.onprogress)try{t.onprogress(w+1,c,new Js(_))}catch{}}return h}async close(){}}class ag{constructor(t,n,r){Object.assign(this,{reader:t,config:n,options:r})}async getData(t,n,r={}){const i=this,{reader:o,offset:s,extraFieldAES:a,compressionMethod:c,config:u,bitFlag:l,signature:d,rawLastModDate:f,compressedSize:h}=i,w=i.localDirectory={};o.initialized||await o.init();let _=await lr(o,s,30);const m=Ct(_);let g=mi(i,r,"password");if(g=g&&g.length&&g,a&&a.originalCompressionMethod!=Zf)throw new Error(E1);if(c!=Uf&&c!=Yl)throw new Error(E1);if(dt(m,0)!=Gf)throw new Error(ng);eh(w,m,4),_=await lr(o,s,30+w.filenameLength+w.extraFieldLength),w.rawExtraField=_.subarray(30+w.filenameLength),await th(i,w,m,4),n.lastAccessDate=w.lastAccessDate,n.creationDate=w.creationDate;const v=i.encrypted&&w.encrypted,b=v&&!a;if(v){if(!b&&a.strength===void 0)throw new Error(og);if(!g)throw new Error(ig)}const x=await Vf(u.Inflate,{codecType:Bf,password:g,zipCrypto:b,encryptionStrength:a&&a.strength,signed:mi(i,r,"checkSignature"),passwordVerification:b&&(l.dataDescriptor?f>>>8&255:d>>>24&255),signature:d,compressed:c!=0,encrypted:v,useWebWorkers:mi(i,r,"useWebWorkers")},u);t.initialized||await t.init();const y=mi(i,r,"signal"),k=s+30+w.filenameLength+w.extraFieldLength;return await Qf(x,o,t,k,h,u,{onprogress:r.onprogress,signal:y}),t.getData()}}function eh(e,t,n){const r=e.rawBitFlag=zt(t,n+2),i=(r&Xl)==Xl,o=dt(t,n+6);Object.assign(e,{encrypted:i,version:zt(t,n),bitFlag:{level:(r&Z5)>>1,dataDescriptor:(r&Kl)==Kl,languageEncodingFlag:(r&Jl)==Jl},rawLastModDate:o,lastModDate:hg(o),filenameLength:zt(t,n+22),extraFieldLength:zt(t,n+24)})}async function th(e,t,n,r){const i=t.rawExtraField,o=t.extraField=new Map,s=Ct(new Uint8Array(i));let a=0;try{for(;a<i.length;){const _=zt(s,a),m=zt(s,a+2);o.set(_,{type:_,data:i.slice(a+4,a+4+m)}),a+=4+m}}catch{}const c=zt(n,r+4);t.signature=dt(n,r+10),t.uncompressedSize=dt(n,r+18),t.compressedSize=dt(n,r+14);const u=o.get(qf);u&&(lg(u,t),t.extraFieldZip64=u);const l=o.get(H5);l&&(await M1(l,"filename","rawFilename",t,e),t.extraFieldUnicodePath=l);const d=o.get(U5);d&&(await M1(d,"comment","rawComment",t,e),t.extraFieldUnicodeComment=d);const f=o.get(Xf);f?(cg(f,t,c),t.extraFieldAES=f):t.compressionMethod=c;const h=o.get(Kf);h&&(ug(h,t),t.extraFieldNTFS=h);const w=o.get(Fc);w&&(dg(w,t),t.extraFieldExtendedTimestamp=w)}function lg(e,t){t.zip64=!0;const n=Ct(e.data);e.values=[];for(let i=0;i<Math.floor(e.data.length/8);i++)e.values.push(Os(n,0+i*8));const r=I1.filter(i=>t[i]==yt);for(let i=0;i<r.length;i++)e[r[i]]=e.values[i];I1.forEach(i=>{if(t[i]==yt)if(e[i]!==void 0)t[i]=e[i];else throw new Error(rg)})}async function M1(e,t,n,r,i){const o=Ct(e.data);e.version=Ci(o,0),e.signature=dt(o,1);const s=new Co;s.append(i[n]);const a=Ct(new Uint8Array(4));a.setUint32(0,s.get(),!0),e[t]=await ec(e.data.subarray(5)),e.valid=!i.bitFlag.languageEncodingFlag&&e.signature==dt(a,0),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function cg(e,t,n){const r=Ct(e.data);e.vendorVersion=Ci(r,0),e.vendorId=Ci(r,2);const i=Ci(r,4);e.strength=i,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=zt(r,5)}function ug(e,t){const n=Ct(e.data);let r=4,i;try{for(;r<e.data.length&&!i;){const o=zt(n,r),s=zt(n,r+2);o==Jf&&(i=e.data.slice(r+4,r+4+s)),r+=4+s}}catch{}try{if(i&&i.length==24){const o=Ct(i),s=o.getBigUint64(0,!0),a=o.getBigUint64(8,!0),c=o.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:c});const u=ll(s),l=ll(a),d=ll(c),f={lastModDate:u,lastAccessDate:l,creationDate:d};Object.assign(e,f),Object.assign(t,f)}}catch{}}function dg(e,t){const n=Ct(e.data),r=Ci(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 s=1;i.forEach((a,c)=>{if(e.data.length>=s+4){const u=dt(n,s);t[a]=e[a]=new Date(u*1e3);const l=o[c];e[l]=u}s+=4})}async function fg(e,t,n,r,i){const o=new Uint8Array(4),s=Ct(o);pg(s,0,t);const a=r+i;return await c(r)||await c(Math.min(a,n));async function c(u){const l=n-u,d=await lr(e,l,u);for(let f=d.length-r;f>=0;f--)if(d[f]==o[0]&&d[f+1]==o[1]&&d[f+2]==o[2]&&d[f+3]==o[3])return{offset:l+f,buffer:d.slice(f,f+r).buffer}}}function mi(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function hg(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 ll(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function Ci(e,t){return e.getUint8(t)}function zt(e,t){return e.getUint16(t,!0)}function dt(e,t){return e.getUint32(t,!0)}function Os(e,t){return Number(e.getBigUint64(t,!0))}function pg(e,t,n){e.setUint32(t,n,!0)}function Ct(e){return new DataView(e.buffer)}function lr(e,t,n){return e.readUint8Array(t,n)}const mg="File already exists",gg="Zip file comment exceeds 64KB",_g="File entry comment exceeds 64KB",wg="File entry name exceeds 64KB",T1="Version exceeds 65535",vg="The strength must equal 1, 2, or 3",xg="Extra field type exceeds 65535",bg="Extra field data exceeds 64KB",Pc="Zip64 is not supported",L1=new Uint8Array([7,0,2,0,65,69,3,0,0]),O1=24;let cl=0;class yg{constructor(t,n={}){Object.assign(this,{writer:t,options:n,config:bf(),files:new Map,offset:t.size,pendingCompressedSize:0,pendingEntries:[]})}async add(t="",n,r={}){const i=this;if(cl<i.config.maxWorkers){cl++;try{return await kg(i,t,n,r)}finally{cl--;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,s)=>i.pendingEntries.push({name:t,reader:n,options:r,resolve:o,reject:s}))}async close(t=new Uint8Array(0),n={}){return await Ag(this,t,n),this.writer.getData()}}async function kg(e,t,n,r){if(t=t.trim(),r.directory&&!t.endsWith(Ls)?t+=Ls:r.directory=t.endsWith(Ls),e.files.has(t))throw new Error(mg);const i=Zl(t);if(i.length>un)throw new Error(wg);const o=r.comment||"",s=Zl(o);if(s.length>un)throw new Error(_g);const a=e.options.version||r.version||0;if(a>un)throw new Error(T1);const c=e.options.versionMadeBy||r.versionMadeBy||20;if(c>un)throw new Error(T1);const u=wt(e,r,"lastModDate")||new Date,l=wt(e,r,"lastAccessDate"),d=wt(e,r,"creationDate"),f=wt(e,r,"password"),h=wt(e,r,"encryptionStrength")||3,w=wt(e,r,"zipCrypto");if(f!==void 0&&h!==void 0&&(h<1||h>3))throw new Error(vg);let _=new Uint8Array(0);const m=r.extraField;if(m){let N=0,j=0;m.forEach(Z=>N+=4+Z.length),_=new Uint8Array(N),m.forEach((Z,ee)=>{if(ee>un)throw new Error(xg);if(Z.length>un)throw new Error(bg);pt(_,new Uint16Array([ee]),j),pt(_,new Uint16Array([Z.length]),j+2),pt(_,Z,j+4),j+=4+Z.length})}let g=wt(e,r,"extendedTimestamp");g===void 0&&(g=!0);let v=0,b=wt(e,r,"keepOrder");b===void 0&&(b=!0);let x=0,y=wt(e,r,"msDosCompatible");y===void 0&&(y=!0);const k=wt(e,r,"internalFileAttribute")||0,C=wt(e,r,"externalFileAttribute")||0;n&&(n.initialized||await n.init(),x=n.size,v=Ig(x));let E=r.zip64||e.options.zip64||!1;if(e.offset+e.pendingCompressedSize>=yt||x>=yt||v>=yt){if(r.zip64===!1||e.options.zip64===!1||!b)throw new Error(Pc);E=!0}e.pendingCompressedSize+=v,await Promise.resolve();const M=wt(e,r,"level"),S=wt(e,r,"useWebWorkers"),T=wt(e,r,"bufferedWrite");let L=wt(e,r,"dataDescriptor"),F=wt(e,r,"dataDescriptorSignature");const K=wt(e,r,"signal");L===void 0&&(L=!0),L&&F===void 0&&(F=!0);const H=await Cg(e,t,n,Object.assign({},r,{rawFilename:i,rawComment:s,version:a,versionMadeBy:c,lastModDate:u,lastAccessDate:l,creationDate:d,rawExtraField:_,zip64:E,password:f,level:M,useWebWorkers:S,encryptionStrength:h,extendedTimestamp:g,zipCrypto:w,bufferedWrite:T,keepOrder:b,dataDescriptor:L,dataDescriptorSignature:F,signal:K,msDosCompatible:y,internalFileAttribute:k,externalFileAttribute:C}));return v&&(e.pendingCompressedSize-=v),Object.assign(H,{name:t,comment:o,extraField:m}),new Js(H)}async function Cg(e,t,n,r){const i=e.files,o=e.writer,s=Array.from(i.values()).pop();let a={},c,u,l;i.set(t,a);try{let d,f,h;if(r.keepOrder&&(d=s&&s.lock),a.lock=h=new Promise(w=>l=w),r.bufferedWrite||e.lockWrite||!r.dataDescriptor?(f=new B5,f.init(),c=!0):(e.lockWrite=new Promise(w=>u=w),o.initialized||await o.init(),f=o),a=await Eg(n,f,e.config,r),a.lock=h,i.set(t,a),a.filename=t,c){let w=0;const _=f.getData();await Promise.all([e.lockWrite,d]);let m;do m=Array.from(i.values()).find(g=>g.writingBufferedData),m&&await m.lock;while(m&&m.lock);if(a.writingBufferedData=!0,!r.dataDescriptor){const v=await nh(_,0,26),b=new DataView(v);(!a.encrypted||r.zipCrypto)&&ze(b,14,a.signature),a.zip64?(ze(b,18,yt),ze(b,22,yt)):(ze(b,18,a.compressedSize),ze(b,22,a.uncompressedSize)),await o.writeUint8Array(new Uint8Array(v)),w=26}await Sg(o,_,w),delete a.writingBufferedData}if(a.offset=e.offset,a.zip64){const w=ln(a.rawExtraFieldZip64);Nt(w,20,BigInt(a.offset))}else if(a.offset>=yt)throw new Error(Pc);return e.offset+=a.length,a}catch(d){throw(c&&a.writingBufferedData||!c&&a.dataWritten)&&(d.corruptedEntry=e.hasCorruptedEntries=!0,a.uncompressedSize&&(e.offset+=a.uncompressedSize)),i.delete(t),d}finally{l(),u&&u()}}async function Eg(e,t,n,r){const{rawFilename:i,lastAccessDate:o,creationDate:s,password:a,level:c,zip64:u,zipCrypto:l,dataDescriptor:d,dataDescriptorSignature:f,directory:h,version:w,versionMadeBy:_,rawComment:m,rawExtraField:g,useWebWorkers:v,onprogress:b,signal:x,encryptionStrength:y,extendedTimestamp:k,msDosCompatible:C,internalFileAttribute:E,externalFileAttribute:M}=r,S=Boolean(a&&a.length),T=c!==0&&!h;let L;if(S&&!l){L=new Uint8Array(L1.length+2);const Ee=ln(L);Xe(Ee,0,Xf),pt(L,L1,2),Qs(Ee,8,y)}else L=new Uint8Array(0);let F,K;if(k){K=new Uint8Array(9+(o?4:0)+(s?4:0));const Ee=ln(K);Xe(Ee,0,Fc),Xe(Ee,2,K.length-4);const De=1+(o?2:0)+(s?4:0);Qs(Ee,4,De),ze(Ee,5,Math.floor(r.lastModDate.getTime()/1e3)),o&&ze(Ee,9,Math.floor(o.getTime()/1e3)),s&&ze(Ee,13,Math.floor(s.getTime()/1e3));try{F=new Uint8Array(36);const Fe=ln(F),ae=ul(r.lastModDate);Xe(Fe,0,Kf),Xe(Fe,2,32),Xe(Fe,8,Jf),Xe(Fe,10,24),Nt(Fe,12,ae),Nt(Fe,20,ul(o)||ae),Nt(Fe,28,ul(s)||ae)}catch{F=new Uint8Array(0)}}else F=K=new Uint8Array(0);const H={version:w||G5,versionMadeBy:_,zip64:u,directory:Boolean(h),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:m,rawExtraFieldZip64:u?new Uint8Array(O1+4):new Uint8Array(0),rawExtraFieldExtendedTimestamp:K,rawExtraFieldNTFS:F,rawExtraFieldAES:L,rawExtraField:g,extendedTimestamp:k,msDosCompatible:C,internalFileAttribute:E,externalFileAttribute:M};let N=H.uncompressedSize=0,j=Jl;d&&(j=j|Kl);let Z=Uf;T&&(Z=Yl),u&&(H.version=H.version>x1?H.version:x1),S&&(j=j|Xl,l||(H.version=H.version>b1?H.version:b1,Z=Zf,T&&(H.rawExtraFieldAES[9]=Yl))),H.compressionMethod=Z;const ee=H.headerArray=new Uint8Array(26),R=ln(ee);Xe(R,0,H.version),Xe(R,2,j),Xe(R,4,Z);const A=new Uint32Array(1),O=ln(A);let $;r.lastModDate<k1?$=k1:r.lastModDate>y1?$=y1:$=r.lastModDate,Xe(O,0,($.getHours()<<6|$.getMinutes())<<5|$.getSeconds()/2),Xe(O,2,($.getFullYear()-1980<<4|$.getMonth()+1)<<5|$.getDate());const q=A[0];ze(R,6,q),Xe(R,22,i.length);const ie=L.length+K.length+F.length+H.rawExtraField.length;Xe(R,24,ie);const B=new Uint8Array(30+i.length+ie),J=ln(B);ze(J,0,Gf),pt(B,ee,4),pt(B,i,30),pt(B,L,30+i.length),pt(B,K,30+i.length+L.length),pt(B,F,30+i.length+L.length+K.length),pt(B,H.rawExtraField,30+i.length+L.length+K.length+F.length);let de,_e=0;if(e){N=H.uncompressedSize=e.size;const Ee=await Vf(n.Deflate,{codecType:$f,level:c,password:a,encryptionStrength:y,zipCrypto:S&&l,passwordVerification:S&&l&&q>>8&255,signed:!0,compressed:T,encrypted:S,useWebWorkers:v},n);await t.writeUint8Array(B),H.dataWritten=!0,de=await Qf(Ee,e,t,0,N,n,{onprogress:b,signal:x}),_e=de.length}else await t.writeUint8Array(B),H.dataWritten=!0;let je=new Uint8Array(0),Oe,Ge=0;if(d&&(je=new Uint8Array(u?f?24:20:f?16:12),Oe=ln(je),f&&(Ge=4,ze(Oe,0,V5))),e){const Ee=de.signature;if((!S||l)&&Ee!==void 0&&(ze(R,10,Ee),H.signature=Ee,d&&ze(Oe,Ge,Ee)),u){const De=ln(H.rawExtraFieldZip64);Xe(De,0,qf),Xe(De,2,O1),ze(R,14,yt),Nt(De,12,BigInt(_e)),ze(R,18,yt),Nt(De,4,BigInt(N)),d&&(Nt(Oe,Ge+4,BigInt(_e)),Nt(Oe,Ge+12,BigInt(N)))}else ze(R,14,_e),ze(R,18,N),d&&(ze(Oe,Ge+4,_e),ze(Oe,Ge+8,N))}d&&await t.writeUint8Array(je);const ot=B.length+_e+je.length;return Object.assign(H,{compressedSize:_e,lastModDate:$,rawLastModDate:q,creationDate:s,lastAccessDate:o,encrypted:S,length:ot}),H}async function Ag(e,t,n){const r=e.writer,i=e.files;let o=0,s=0,a=e.offset,c=i.size;for(const[,f]of i)s+=46+f.rawFilename.length+f.rawComment.length+f.rawExtraFieldZip64.length+f.rawExtraFieldAES.length+f.rawExtraFieldExtendedTimestamp.length+f.rawExtraFieldNTFS.length+f.rawExtraField.length;let u=n.zip64||e.options.zip64||!1;if(a>=yt||s>=yt||c>=un){if(n.zip64===!1||e.options.zip64===!1)throw new Error(Pc);u=!0}const l=new Uint8Array(s+(u?j5:Ks)),d=ln(l);if(t&&t.length)if(t.length<=un)Xe(d,o+20,t.length);else throw new Error(gg);for(const[f,h]of Array.from(i.values()).entries()){const{rawFilename:w,rawExtraFieldZip64:_,rawExtraFieldAES:m,rawExtraField:g,rawComment:v,versionMadeBy:b,headerArray:x,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=ln(S);Xe(F,0,Fc),Xe(F,2,S.length-4),Qs(F,4,1),ze(F,5,Math.floor(h.lastModDate.getTime()/1e3))}else T=S=new Uint8Array(0);const L=_.length+m.length+S.length+T.length+g.length;if(ze(d,o,Wl),Xe(d,o+4,b),pt(l,x,o+6),Xe(d,o+30,L),Xe(d,o+32,v.length),ze(d,o+34,E),M?ze(d,o+38,M):y&&C&&Qs(d,o+38,Ql),k?ze(d,o+42,yt):ze(d,o+42,h.offset),pt(l,w,o+46),pt(l,_,o+46+w.length),pt(l,m,o+46+w.length+_.length),pt(l,S,o+46+w.length+_.length+m.length),pt(l,T,o+46+w.length+_.length+m.length+S.length),pt(l,g,o+46+w.length+_.length+m.length+S.length+T.length),pt(l,v,o+46+w.length+L),o+=46+w.length+L+v.length,n.onprogress)try{n.onprogress(f+1,i.size,new Js(h))}catch{}}u&&(ze(d,o,ql),Nt(d,o+4,BigInt(44)),Xe(d,o+12,45),Xe(d,o+14,45),Nt(d,o+24,BigInt(c)),Nt(d,o+32,BigInt(c)),Nt(d,o+40,BigInt(s)),Nt(d,o+48,BigInt(a)),ze(d,o+56,Wf),Nt(d,o+64,BigInt(a)+BigInt(s)),ze(d,o+72,z5),c=un,a=yt,s=yt,o+=76),ze(d,o,Yf),Xe(d,o+8,c),Xe(d,o+10,c),ze(d,o+12,s),ze(d,o+16,a),await r.writeUint8Array(l),t&&t.length&&await r.writeUint8Array(t)}function nh(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=s=>i(s.target.result),r.onerror=()=>o(r.error),r.readAsArrayBuffer(t||n?e.slice(t,n):e)})}}async function Sg(e,t,n=0){await i();async function i(){if(n<t.size){const o=await nh(t,n,n+536870912);await e.writeUint8Array(new Uint8Array(o)),n+=536870912,await i()}}}function ul(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function wt(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function Ig(e){return e+5*(Math.floor(e/16383)+1)}function Qs(e,t,n){e.setUint8(t,n)}function Xe(e,t,n){e.setUint16(t,n,!0)}function ze(e,t,n){e.setUint32(t,n,!0)}function Nt(e,t,n){e.setBigUint64(t,n,!0)}function pt(e,t,n){e.set(t,n)}function ln(e){return new DataView(e.buffer)}let rh;try{rh=eb.url}catch{}Lc({baseURL:rh});D5(Lc);Lc({Deflate:Ym,Inflate:p5});var it={},Go={},tn={};function ih(e){return typeof e=="undefined"||e===null}function Mg(e){return typeof e=="object"&&e!==null}function Tg(e){return Array.isArray(e)?e:ih(e)?[]:[e]}function Lg(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 Og(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function Ng(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}tn.isNothing=ih;tn.isObject=Mg;tn.toArray=Tg;tn.repeat=Og;tn.isNegativeZero=Ng;tn.extend=Lg;function Ao(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||""}Ao.prototype=Object.create(Error.prototype);Ao.prototype.constructor=Ao;Ao.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var Yo=Ao,N1=tn;function $c(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}$c.prototype.getSnippet=function(t,n){var r,i,o,s,a;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),N1.repeat(" ",t)+r+a+o+`
|
|
`+N1.repeat(" ",t+this.position-i+r.length)+"^"};$c.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 Rg=$c,R1=Yo,Dg=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Fg=["scalar","sequence","mapping"];function Pg(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function $g(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(Dg.indexOf(n)===-1)throw new R1('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=Pg(t.styleAliases||null),Fg.indexOf(this.kind)===-1)throw new R1('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var gt=$g,D1=tn,Ns=Yo,Bg=gt;function tc(e,t,n){var r=[];return e.include.forEach(function(i){n=tc(i,t,n)}),e[t].forEach(function(i){n.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&r.push(s)}),n.push(i)}),n.filter(function(i,o){return r.indexOf(o)===-1})}function Vg(){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 gi(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 Ns("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=tc(this,"implicit",[]),this.compiledExplicit=tc(this,"explicit",[]),this.compiledTypeMap=Vg(this.compiledImplicit,this.compiledExplicit)}gi.DEFAULT=null;gi.create=function(){var t,n;switch(arguments.length){case 1:t=gi.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Ns("Wrong number of arguments for Schema.create function")}if(t=D1.toArray(t),n=D1.toArray(n),!t.every(function(r){return r instanceof gi}))throw new Ns("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof Bg}))throw new Ns("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new gi({include:t,explicit:n})};var Hi=gi,jg=gt,zg=new jg("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Hg=gt,Ug=new Hg("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Zg=gt,Gg=new Zg("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Yg=Hi,Bc=new Yg({explicit:[zg,Ug,Gg]}),Wg=gt;function qg(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Xg(){return null}function Kg(e){return e===null}var Jg=new Wg("tag:yaml.org,2002:null",{kind:"scalar",resolve:qg,construct:Xg,predicate:Kg,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),Qg=gt;function e_(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 t_(e){return e==="true"||e==="True"||e==="TRUE"}function n_(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var r_=new Qg("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e_,construct:t_,predicate:n_,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),i_=tn,o_=gt;function s_(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function a_(e){return 48<=e&&e<=55}function l_(e){return 48<=e&&e<=57}function c_(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(!s_(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!a_(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(!l_(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function u_(e){var t=e,n=1,r,i,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,i=1,o.forEach(function(s){t+=s*i,i*=60}),n*t):n*parseInt(t,10)}function d_(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!i_.isNegativeZero(e)}var f_=new o_("tag:yaml.org,2002:int",{kind:"scalar",resolve:c_,construct:u_,predicate:d_,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"]}}),oh=tn,h_=gt,p_=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 m_(e){return!(e===null||!p_.test(e)||e[e.length-1]==="_")}function g_(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 __=/^[-+]?[0-9]+e/;function w_(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(oh.isNegativeZero(e))return"-0.0";return n=e.toString(10),__.test(n)?n.replace("e",".e"):n}function v_(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||oh.isNegativeZero(e))}var x_=new h_("tag:yaml.org,2002:float",{kind:"scalar",resolve:m_,construct:g_,predicate:v_,represent:w_,defaultStyle:"lowercase"}),b_=Hi,sh=new b_({include:[Bc],implicit:[Jg,r_,f_,x_]}),y_=Hi,ah=new y_({include:[sh]}),k_=gt,lh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ch=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 C_(e){return e===null?!1:lh.exec(e)!==null||ch.exec(e)!==null}function E_(e){var t,n,r,i,o,s,a,c=0,u=null,l,d,f;if(t=lh.exec(e),t===null&&(t=ch.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(l=+t[10],d=+(t[11]||0),u=(l*60+d)*6e4,t[9]==="-"&&(u=-u)),f=new Date(Date.UTC(n,r,i,o,s,a,c)),u&&f.setTime(f.getTime()-u),f}function A_(e){return e.toISOString()}var S_=new k_("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:C_,construct:E_,instanceOf:Date,represent:A_}),I_=gt;function M_(e){return e==="<<"||e===null}var T_=new I_("tag:yaml.org,2002:merge",{kind:"scalar",resolve:M_}),Or;try{var L_=of;Or=L_("buffer").Buffer}catch{}var O_=gt,Vc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
\r`;function N_(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Vc;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 R_(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Vc,s=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),Or?Or.from?Or.from(a):new Or(a):a}function D_(e){var t="",n=0,r,i,o=e.length,s=Vc;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function F_(e){return Or&&Or.isBuffer(e)}var P_=new O_("tag:yaml.org,2002:binary",{kind:"scalar",resolve:N_,construct:R_,predicate:F_,represent:D_}),$_=gt,B_=Object.prototype.hasOwnProperty,V_=Object.prototype.toString;function j_(e){if(e===null)return!0;var t=[],n,r,i,o,s,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,V_.call(i)!=="[object Object]")return!1;for(o in i)if(B_.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function z_(e){return e!==null?e:[]}var H_=new $_("tag:yaml.org,2002:omap",{kind:"sequence",resolve:j_,construct:z_}),U_=gt,Z_=Object.prototype.toString;function G_(e){if(e===null)return!0;var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],Z_.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function Y_(e){if(e===null)return[];var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1)r=s[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var W_=new U_("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:G_,construct:Y_}),q_=gt,X_=Object.prototype.hasOwnProperty;function K_(e){if(e===null)return!0;var t,n=e;for(t in n)if(X_.call(n,t)&&n[t]!==null)return!1;return!0}function J_(e){return e!==null?e:{}}var Q_=new q_("tag:yaml.org,2002:set",{kind:"mapping",resolve:K_,construct:J_}),e8=Hi,Wo=new e8({include:[ah],implicit:[S_,T_],explicit:[P_,H_,W_,Q_]}),t8=gt;function n8(){return!0}function r8(){}function i8(){return""}function o8(e){return typeof e=="undefined"}var s8=new t8("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:n8,construct:r8,predicate:o8,represent:i8}),a8=gt;function l8(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 c8(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 u8(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function d8(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var f8=new a8("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:l8,construct:c8,predicate:d8,represent:u8}),ea;try{var h8=of;ea=h8("esprima")}catch{typeof window!="undefined"&&(ea=window.esprima)}var p8=gt;function m8(e){if(e===null)return!1;try{var t="("+e+")",n=ea.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 g8(e){var t="("+e+")",n=ea.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 _8(e){return e.toString()}function w8(e){return Object.prototype.toString.call(e)==="[object Function]"}var v8=new p8("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:m8,construct:g8,predicate:w8,represent:_8}),F1=Hi,Ia=F1.DEFAULT=new F1({include:[Wo],explicit:[s8,f8,v8]}),zn=tn,uh=Yo,x8=Rg,dh=Wo,b8=Ia,_r=Object.prototype.hasOwnProperty,ta=1,fh=2,hh=3,na=4,dl=1,y8=2,P1=3,k8=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C8=/[\x85\u2028\u2029]/,E8=/[,\[\]\{\}]/,ph=/^(?:!|!!|![a-z\-]+!)$/i,mh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function $1(e){return Object.prototype.toString.call(e)}function In(e){return e===10||e===13}function Fr(e){return e===9||e===32}function Dt(e){return e===9||e===32||e===10||e===13}function _i(e){return e===44||e===91||e===93||e===123||e===125}function A8(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function S8(e){return e===120?2:e===117?4:e===85?8:0}function I8(e){return 48<=e&&e<=57?e-48:-1}function B1(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 M8(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var gh=new Array(256),_h=new Array(256);for(var oi=0;oi<256;oi++)gh[oi]=B1(oi)?1:0,_h[oi]=B1(oi);function T8(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||b8,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 wh(e,t){return new uh(t,new x8(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function ue(e,t){throw wh(e,t)}function ra(e,t){e.onWarning&&e.onWarning.call(null,wh(e,t))}var V1={YAML:function(t,n,r){var i,o,s;t.version!==null&&ue(t,"duplication of %YAML directive"),r.length!==1&&ue(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&ue(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&ue(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&ra(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&ue(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],ph.test(i)||ue(t,"ill-formed tag handle (first argument) of the TAG directive"),_r.call(t.tagMap,i)&&ue(t,'there is a previously declared suffix for "'+i+'" tag handle'),mh.test(o)||ue(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function hr(e,t,n,r){var i,o,s,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||ue(e,"expected valid JSON character");else k8.test(a)&&ue(e,"the stream contains non-printable characters");e.result+=a}}function j1(e,t,n,r){var i,o,s,a;for(zn.isObject(n)||ue(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],_r.call(t,o)||(t[o]=n[o],r[o]=!0)}function wi(e,t,n,r,i,o,s,a){var c,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),c=0,u=i.length;c<u;c+=1)Array.isArray(i[c])&&ue(e,"nested arrays are not supported inside keys"),typeof i=="object"&&$1(i[c])==="[object Object]"&&(i[c]="[object Object]");if(typeof i=="object"&&$1(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)j1(e,t,o[c],n);else j1(e,t,o,n);else!e.json&&!_r.call(n,i)&&_r.call(t,i)&&(e.line=s||e.line,e.position=a||e.position,ue(e,"duplicated mapping key")),t[i]=o,delete n[i];return t}function jc(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++):ue(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(;Fr(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(In(i))for(jc(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&&ra(e,"deficient indentation"),r}function Ma(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Dt(n)))}function zc(e,t){t===1?e.result+=" ":t>1&&(e.result+=zn.repeat(`
|
|
`,t-1))}function L8(e,t,n){var r,i,o,s,a,c,u,l,d=e.kind,f=e.result,h;if(h=e.input.charCodeAt(e.position),Dt(h)||_i(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),Dt(i)||n&&_i(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,a=!1;h!==0;){if(h===58){if(i=e.input.charCodeAt(e.position+1),Dt(i)||n&&_i(i))break}else if(h===35){if(r=e.input.charCodeAt(e.position-1),Dt(r))break}else{if(e.position===e.lineStart&&Ma(e)||n&&_i(h))break;if(In(h))if(c=e.line,u=e.lineStart,l=e.lineIndent,lt(e,!1,-1),e.lineIndent>=t){a=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=u,e.lineIndent=l;break}}a&&(hr(e,o,s,!1),zc(e,e.line-c),o=s=e.position,a=!1),Fr(h)||(s=e.position+1),h=e.input.charCodeAt(++e.position)}return hr(e,o,s,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function O8(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(hr(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 In(n)?(hr(e,r,i,!0),zc(e,lt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ma(e)?ue(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);ue(e,"unexpected end of the stream within a single quoted scalar")}function N8(e,t){var n,r,i,o,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return hr(e,n,e.position,!0),e.position++,!0;if(a===92){if(hr(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),In(a))lt(e,!1,t);else if(a<256&&gh[a])e.result+=_h[a],e.position++;else if((s=S8(a))>0){for(i=s,o=0;i>0;i--)a=e.input.charCodeAt(++e.position),(s=A8(a))>=0?o=(o<<4)+s:ue(e,"expected hexadecimal character");e.result+=M8(o),e.position++}else ue(e,"unknown escape sequence");n=r=e.position}else In(a)?(hr(e,n,r,!0),zc(e,lt(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ma(e)?ue(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}ue(e,"unexpected end of the stream within a double quoted scalar")}function R8(e,t){var n=!0,r,i=e.tag,o,s=e.anchor,a,c,u,l,d,f={},h,w,_,m;if(m=e.input.charCodeAt(e.position),m===91)c=93,d=!1,o=[];else if(m===123)c=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),m=e.input.charCodeAt(++e.position);m!==0;){if(lt(e,!0,t),m=e.input.charCodeAt(e.position),m===c)return e.position++,e.tag=i,e.anchor=s,e.kind=d?"mapping":"sequence",e.result=o,!0;n||ue(e,"missed comma between flow collection entries"),w=h=_=null,u=l=!1,m===63&&(a=e.input.charCodeAt(e.position+1),Dt(a)&&(u=l=!0,e.position++,lt(e,!0,t))),r=e.line,Di(e,t,ta,!1,!0),w=e.tag,h=e.result,lt(e,!0,t),m=e.input.charCodeAt(e.position),(l||e.line===r)&&m===58&&(u=!0,m=e.input.charCodeAt(++e.position),lt(e,!0,t),Di(e,t,ta,!1,!0),_=e.result),d?wi(e,o,f,w,h,_):u?o.push(wi(e,null,f,w,h,_)):o.push(h),lt(e,!0,t),m=e.input.charCodeAt(e.position),m===44?(n=!0,m=e.input.charCodeAt(++e.position)):n=!1}ue(e,"unexpected end of the stream within a flow collection")}function D8(e,t){var n,r,i=dl,o=!1,s=!1,a=t,c=0,u=!1,l,d;if(d=e.input.charCodeAt(e.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)dl===i?i=d===43?P1:y8:ue(e,"repeat of a chomping mode identifier");else if((l=I8(d))>=0)l===0?ue(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?ue(e,"repeat of an indentation width identifier"):(a=t+l-1,s=!0);else break;if(Fr(d)){do d=e.input.charCodeAt(++e.position);while(Fr(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!In(d)&&d!==0)}for(;d!==0;){for(jc(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),In(d)){c++;continue}if(e.lineIndent<a){i===P1?e.result+=zn.repeat(`
|
|
`,o?1+c:c):i===dl&&o&&(e.result+=`
|
|
`);break}for(r?Fr(d)?(u=!0,e.result+=zn.repeat(`
|
|
`,o?1+c:c)):u?(u=!1,e.result+=zn.repeat(`
|
|
`,c+1)):c===0?o&&(e.result+=" "):e.result+=zn.repeat(`
|
|
`,c):e.result+=zn.repeat(`
|
|
`,o?1+c:c),o=!0,s=!0,c=0,n=e.position;!In(d)&&d!==0;)d=e.input.charCodeAt(++e.position);hr(e,n,e.position,!1)}return!0}function z1(e,t){var n,r=e.tag,i=e.anchor,o=[],s,a=!1,c;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&!(c!==45||(s=e.input.charCodeAt(e.position+1),!Dt(s)));){if(a=!0,e.position++,lt(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,Di(e,t,hh,!1,!0),o.push(e.result),lt(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)ue(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function F8(e,t,n){var r,i,o,s,a=e.tag,c=e.anchor,u={},l={},d=null,f=null,h=null,w=!1,_=!1,m;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),m=e.input.charCodeAt(e.position);m!==0;){if(r=e.input.charCodeAt(e.position+1),o=e.line,s=e.position,(m===63||m===58)&&Dt(r))m===63?(w&&(wi(e,u,l,d,f,null),d=f=h=null),_=!0,w=!0,i=!0):w?(w=!1,i=!0):ue(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=r;else if(Di(e,n,fh,!1,!0))if(e.line===o){for(m=e.input.charCodeAt(e.position);Fr(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),Dt(m)||ue(e,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(wi(e,u,l,d,f,null),d=f=h=null),_=!0,w=!1,i=!1,d=e.tag,f=e.result;else if(_)ue(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=c,!0}else if(_)ue(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=a,e.anchor=c,!0;else break;if((e.line===o||e.lineIndent>t)&&(Di(e,t,na,!0,i)&&(w?f=e.result:h=e.result),w||(wi(e,u,l,d,f,h,o,s),d=f=h=null),lt(e,!0,-1),m=e.input.charCodeAt(e.position)),e.lineIndent>t&&m!==0)ue(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return w&&wi(e,u,l,d,f,null),_&&(e.tag=a,e.anchor=c,e.kind="mapping",e.result=u),_}function P8(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&ue(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):ue(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Dt(s);)s===33&&(r?ue(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),ph.test(i)||ue(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),E8.test(o)&&ue(e,"tag suffix cannot contain flow indicator characters")}return o&&!mh.test(o)&&ue(e,"tag name cannot contain such characters: "+o),n?e.tag=o:_r.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:ue(e,'undeclared tag handle "'+i+'"'),!0}function $8(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&ue(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Dt(n)&&!_i(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ue(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function B8(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Dt(r)&&!_i(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ue(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),_r.call(e.anchorMap,n)||ue(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],lt(e,!0,-1),!0}function Di(e,t,n,r,i){var o,s,a,c=1,u=!1,l=!1,d,f,h,w,_;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=a=na===n||hh===n,r&<(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;P8(e)||$8(e);)lt(e,!0,-1)?(u=!0,a=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):a=!1;if(a&&(a=u||i),(c===1||na===n)&&(ta===n||fh===n?w=t:w=t+1,_=e.position-e.lineStart,c===1?a&&(z1(e,_)||F8(e,_,w))||R8(e,w)?l=!0:(s&&D8(e,w)||O8(e,w)||N8(e,w)?l=!0:B8(e)?(l=!0,(e.tag!==null||e.anchor!==null)&&ue(e,"alias node should not have any properties")):L8(e,w,ta===n)&&(l=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(l=a&&z1(e,_))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ue(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(h=e.implicitTypes[d],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 _r.call(e.typeMap[e.kind||"fallback"],e.tag)?(h=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&h.kind!==e.kind&&ue(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)):ue(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):ue(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||l}function V8(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(lt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Dt(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&ue(e,"directive name must not be less than one character in length");s!==0;){for(;Fr(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!In(s));break}if(In(s))break;for(n=e.position;s!==0&&!Dt(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&jc(e),_r.call(V1,r)?V1[r](e,r,i):ra(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&&ue(e,"directives end mark is expected"),Di(e,e.lineIndent-1,na,!1,!0),lt(e,!0,-1),e.checkLineBreaks&&C8.test(e.input.slice(t,e.position))&&ra(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ma(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,lt(e,!0,-1));return}if(e.position<e.length-1)ue(e,"end of the stream or a document separator is expected");else return}function vh(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 T8(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,ue(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;)V8(n);return n.documents}function xh(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=vh(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function bh(e,t){var n=vh(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new uh("expected a single document in the stream, but found more")}}function j8(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),xh(e,t,zn.extend({schema:dh},n))}function z8(e,t){return bh(e,zn.extend({schema:dh},t))}Go.loadAll=xh;Go.load=bh;Go.safeLoadAll=j8;Go.safeLoad=z8;var Hc={},qo=tn,Xo=Yo,H8=Ia,U8=Wo,yh=Object.prototype.toString,kh=Object.prototype.hasOwnProperty,Z8=9,So=10,G8=13,Y8=32,W8=33,q8=34,Ch=35,X8=37,K8=38,J8=39,Q8=42,Eh=44,e3=45,Ah=58,t3=61,n3=62,r3=63,i3=64,Sh=91,Ih=93,o3=96,Mh=123,s3=124,Th=125,Et={};Et[0]="\\0";Et[7]="\\a";Et[8]="\\b";Et[9]="\\t";Et[10]="\\n";Et[11]="\\v";Et[12]="\\f";Et[13]="\\r";Et[27]="\\e";Et[34]='\\"';Et[92]="\\\\";Et[133]="\\N";Et[160]="\\_";Et[8232]="\\L";Et[8233]="\\P";var a3=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function l3(e,t){var n,r,i,o,s,a,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&kh.call(c.styleAliases,a)&&(a=c.styleAliases[a]),n[s]=a;return n}function H1(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 Xo("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+qo.repeat("0",r-t.length)+t}function c3(e){this.schema=e.schema||H8,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=qo.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=l3(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 U1(e,t){for(var n=qo.repeat(" ",t),r=0,i=-1,o="",s,a=e.length;r<a;)i=e.indexOf(`
|
|
`,r),i===-1?(s=e.slice(r),r=a):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
|
|
`&&(o+=n),o+=s;return o}function nc(e,t){return`
|
|
`+qo.repeat(" ",e.indent*t)}function u3(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 Uc(e){return e===Y8||e===Z8}function Fi(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 d3(e){return Fi(e)&&!Uc(e)&&e!==65279&&e!==G8&&e!==So}function Z1(e,t){return Fi(e)&&e!==65279&&e!==Eh&&e!==Sh&&e!==Ih&&e!==Mh&&e!==Th&&e!==Ah&&(e!==Ch||t&&d3(t))}function f3(e){return Fi(e)&&e!==65279&&!Uc(e)&&e!==e3&&e!==r3&&e!==Ah&&e!==Eh&&e!==Sh&&e!==Ih&&e!==Mh&&e!==Th&&e!==Ch&&e!==K8&&e!==Q8&&e!==W8&&e!==s3&&e!==t3&&e!==n3&&e!==J8&&e!==q8&&e!==X8&&e!==i3&&e!==o3}function Lh(e){var t=/^\n* /;return t.test(e)}var Oh=1,Nh=2,Rh=3,Dh=4,Rs=5;function h3(e,t,n,r,i){var o,s,a,c=!1,u=!1,l=r!==-1,d=-1,f=f3(e.charCodeAt(0))&&!Uc(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!Fi(s))return Rs;a=o>0?e.charCodeAt(o-1):null,f=f&&Z1(s,a)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===So)c=!0,l&&(u=u||o-d-1>r&&e[d+1]!==" ",d=o);else if(!Fi(s))return Rs;a=o>0?e.charCodeAt(o-1):null,f=f&&Z1(s,a)}u=u||l&&o-d-1>r&&e[d+1]!==" "}return!c&&!u?f&&!i(e)?Oh:Nh:n>9&&Lh(e)?Rs:u?Dh:Rh}function p3(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&a3.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=r||e.flowLevel>-1&&n>=e.flowLevel;function a(c){return u3(e,c)}switch(h3(t,s,e.indent,o,a)){case Oh:return t;case Nh:return"'"+t.replace(/'/g,"''")+"'";case Rh:return"|"+G1(t,e.indent)+Y1(U1(t,i));case Dh:return">"+G1(t,e.indent)+Y1(U1(m3(t,o),i));case Rs:return'"'+g3(t)+'"';default:throw new Xo("impossible error: invalid scalar style")}}()}function G1(e,t){var n=Lh(e)?String(t):"",r=e[e.length-1]===`
|
|
`,i=r&&(e[e.length-2]===`
|
|
`||e===`
|
|
`),o=i?"+":r?"":"-";return n+o+`
|
|
`}function Y1(e){return e[e.length-1]===`
|
|
`?e.slice(0,-1):e}function m3(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
|
|
`);return u=u!==-1?u:e.length,n.lastIndex=u,W1(e.slice(0,u),t)}(),i=e[0]===`
|
|
`||e[0]===" ",o,s;s=n.exec(e);){var a=s[1],c=s[2];o=c[0]===" ",r+=a+(!i&&!o&&c!==""?`
|
|
`:"")+W1(c,t),i=o}return r}function W1(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,a=0,c="";r=n.exec(e);)a=r.index,a-i>t&&(o=s>i?s:a,c+=`
|
|
`+e.slice(i,o),i=o+1),s=a;return c+=`
|
|
`,e.length-i>t&&s>i?c+=e.slice(i,s)+`
|
|
`+e.slice(s+1):c+=e.slice(i),c.slice(1)}function g3(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+=H1((n-55296)*1024+r-56320+65536),o++;continue}i=Et[n],t+=!i&&Fi(n)?e[o]:i||H1(n)}return t}function _3(e,t,n){var r="",i=e.tag,o,s;for(o=0,s=n.length;o<s;o+=1)jr(e,t,n[o],!1,!1)&&(o!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function w3(e,t,n,r){var i="",o=e.tag,s,a;for(s=0,a=n.length;s<a;s+=1)jr(e,t+1,n[s],!0,!0)&&((!r||s!==0)&&(i+=nc(e,t)),e.dump&&So===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function v3(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,a,c,u,l;for(s=0,a=o.length;s<a;s+=1)l="",s!==0&&(l+=", "),e.condenseFlow&&(l+='"'),c=o[s],u=n[c],jr(e,t,c,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),jr(e,t,u,!1,!1)&&(l+=e.dump,r+=l));e.tag=i,e.dump="{"+r+"}"}function x3(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),a,c,u,l,d,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Xo("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)f="",(!r||a!==0)&&(f+=nc(e,t)),u=s[a],l=n[u],jr(e,t+1,u,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&So===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=nc(e,t)),jr(e,t+1,l,!0,d)&&(e.dump&&So===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=o,e.dump=i||"{}"}function q1(e,t,n){var r,i,o,s,a,c;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(e.tag=n?a.tag:"?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,yh.call(a.represent)==="[object Function]")r=a.represent(t,c);else if(kh.call(a.represent,c))r=a.represent[c](t,c);else throw new Xo("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function jr(e,t,n,r,i,o){e.tag=null,e.dump=n,q1(e,n,!1)||q1(e,n,!0);var s=yh.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=s==="[object Object]"||s==="[object Array]",c,u;if(a&&(c=e.duplicates.indexOf(n),u=c!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&t>0)&&(i=!1),u&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(a&&u&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),s==="[object Object]")r&&Object.keys(e.dump).length!==0?(x3(e,t,e.dump,i),u&&(e.dump="&ref_"+c+e.dump)):(v3(e,t,e.dump),u&&(e.dump="&ref_"+c+" "+e.dump));else if(s==="[object Array]"){var l=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(w3(e,l,e.dump,i),u&&(e.dump="&ref_"+c+e.dump)):(_3(e,l,e.dump),u&&(e.dump="&ref_"+c+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&p3(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Xo("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function b3(e,t){var n=[],r=[],i,o;for(rc(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function rc(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)rc(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)rc(e[r[i]],t,n)}function Fh(e,t){t=t||{};var n=new c3(t);return n.noRefs||b3(e,n),jr(n,0,e,!0,!0)?n.dump+`
|
|
`:""}function y3(e,t){return Fh(e,qo.extend({schema:U8},t))}Hc.dump=Fh;Hc.safeDump=y3;var Ta=Go,Ph=Hc;function La(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}it.Type=gt;it.Schema=Hi;it.FAILSAFE_SCHEMA=Bc;it.JSON_SCHEMA=sh;it.CORE_SCHEMA=ah;it.DEFAULT_SAFE_SCHEMA=Wo;it.DEFAULT_FULL_SCHEMA=Ia;it.load=Ta.load;it.loadAll=Ta.loadAll;it.safeLoad=Ta.safeLoad;it.safeLoadAll=Ta.safeLoadAll;it.dump=Ph.dump;it.safeDump=Ph.safeDump;it.YAMLException=Yo;it.MINIMAL_SCHEMA=Bc;it.SAFE_SCHEMA=Wo;it.DEFAULT_SCHEMA=Ia;it.scan=La("scan");it.parse=La("parse");it.compose=La("compose");it.addConstructor=La("addConstructor");var k3=it,ic=k3,C3=E3;function Ei(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function E3(e){if(e=e||{},e.circles)return A3(e);return e.proto?r:n;function t(i,o){for(var s=Object.keys(i),a=new Array(s.length),c=0;c<s.length;c++){var u=s[c],l=i[u];typeof l!="object"||l===null?a[u]=l:l instanceof Date?a[u]=new Date(l):ArrayBuffer.isView(l)?a[u]=Ei(l):a[u]=o(l)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var o={};for(var s in i)if(Object.hasOwnProperty.call(i,s)!==!1){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),n)):a instanceof Set?o[s]=new Set(t(Array.from(a),n)):ArrayBuffer.isView(a)?o[s]=Ei(a):o[s]=n(a)}return o}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var o={};for(var s in i){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),r)):a instanceof Set?o[s]=new Set(t(Array.from(a),r)):ArrayBuffer.isView(a)?o[s]=Ei(a):o[s]=r(a)}return o}}function A3(e){var t=[],n=[];return e.proto?o:i;function r(s,a){for(var c=Object.keys(s),u=new Array(c.length),l=0;l<c.length;l++){var d=c[l],f=s[d];if(typeof f!="object"||f===null)u[d]=f;else if(f instanceof Date)u[d]=new Date(f);else if(ArrayBuffer.isView(f))u[d]=Ei(f);else{var h=t.indexOf(f);h!==-1?u[d]=n[h]:u[d]=a(f)}}return u}function i(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,i);if(s instanceof Map)return new Map(r(Array.from(s),i));if(s instanceof Set)return new Set(r(Array.from(s),i));var a={};t.push(s),n.push(a);for(var c in s)if(Object.hasOwnProperty.call(s,c)!==!1){var u=s[c];if(typeof u!="object"||u===null)a[c]=u;else if(u instanceof Date)a[c]=new Date(u);else if(u instanceof Map)a[c]=new Map(r(Array.from(u),i));else if(u instanceof Set)a[c]=new Set(r(Array.from(u),i));else if(ArrayBuffer.isView(u))a[c]=Ei(u);else{var l=t.indexOf(u);l!==-1?a[c]=n[l]:a[c]=i(u)}}return t.pop(),n.pop(),a}function o(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,o);if(s instanceof Map)return new Map(r(Array.from(s),o));if(s instanceof Set)return new Set(r(Array.from(s),o));var a={};t.push(s),n.push(a);for(var c in s){var u=s[c];if(typeof u!="object"||u===null)a[c]=u;else if(u instanceof Date)a[c]=new Date(u);else if(u instanceof Map)a[c]=new Map(r(Array.from(u),o));else if(u instanceof Set)a[c]=new Set(r(Array.from(u),o));else if(ArrayBuffer.isView(u))a[c]=Ei(u);else{var l=t.indexOf(u);l!==-1?a[c]=n[l]:a[c]=o(u)}}return t.pop(),n.pop(),a}}var Le=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 Xn(e){return typeof e=="object"&&e!==null}function Ds(e){return e.toString(16).padStart(2,"0")}function Pr(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Ds).join("")}function Tn(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function S3(){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 I3(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new P.Path(["dimensions"]));e.set(new P.Path(["seed"]),t,!0),Xn(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 $h(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function wr(e){return`/${e}/`.replaceAll("//","/")}function M3(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),wr(e)}function Bh(e){const t=M3(e).replace(/^\//,"").replace(/\/$/,"");return Le.generators.find(n=>n.url===t)}function Vh({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?wr(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);Xr(i,r)}function T3(e){const t=ic.load(e.substring(3,e.indexOf("---",3)));return Xn(t)?t:{}}function L3(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const o=O3(e,i+2),s=e.indexOf("#[",i+1);let a="";if(s>=0&&s<o){const c=e.indexOf("]",s+2);e.substring(s+2,c)===t&&(a=e.substring(c+1,o).trim())}else{const c=e.substring(i+2,o),u=Le.versions.find(l=>l.id===t);a=(r={version:u==null?void 0:u.id,pack_format:u==null?void 0:u.pack_format.toString()}[c])!=null?r:""}e=e.substring(0,i)+a+e.substring(o+2),n=i}return e}function O3(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 Zc(e){const t=Math.abs($h(e));return[t%256,(t>>8)%256,(t>>16)%256]}function N3(e){if(!Array.isArray(e)||e.length!==3)return"#000000";const[t,n,r]=e;return"#"+Ds(t)+Ds(n)+Ds(r)}function R3(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 to(e){return e*e}function Vt(e,t,n){return Math.max(e,Math.min(t,n))}function fl(e,t,n){return n<0?e:n>1?t:Fs(n,e,t)}function Fs(e,t,n){return t+e*(n-t)}function D3(e,t,n,r,i,o){return Fs(t,Fs(e,n,r),Fs(e,i,o))}function Gt(e){return e instanceof Error?e.message:`${e}`}const Gc=C3();function Pi(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(!Pi(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(!Pi(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}class F3{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 P3(e){const t=await e.arrayBuffer(),r=await new sg(new Hf(new Blob([t]))).getEntries();return await Promise.all(r.filter(i=>!i.directory).map(async i=>{var s;const o=new P5("utf-8");return[i.filename,await((s=i.getData)==null?void 0:s.call(i,o))]}))}async function $3(e){const t=new yg(new $5("application/zip"));return await Promise.all(e.map(async([n,r])=>{await t.add(n,new F5(r))})),await t.close()}async function B3(e,t,n){const r=e.get(t);if(r)return r;const i=await n(t);return e.set(t,i),i}function Ps({icon:e,label:t,large:n,larger:r,doSelect:i,value:o,placeholder:s,dataList:a,onChange:c}){const u=c===void 0?()=>{}:f=>{const h=f.target.value;c==null||c(h)},l=Te(null);ge(()=>{i&&l.current&&l.current.select()},[i]);const d=a&&Pr();return D("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:f=>f.stopPropagation(),children:[e&&pe[e],t&&p("span",{children:t}),p("input",{ref:l,type:"text",value:o,onChange:u,placeholder:s,list:d}),a&&p("datalist",{id:d,children:a.map(f=>p("option",{value:f}))})]})}function so({link:e,icon:t,label:n,tooltip:r,tooltipLoc:i,swapped:o}){return p("a",Ne(he({},e?{href:e}:{disabled:!0}),{class:`btn btn-link${r?` tooltipped tip-${i!=null?i:"sw"}`:""}`,"aria-label":r,children:o?D(me,{children:[n&&p("span",{children:n}),t&&pe[t]]}):D(me,{children:[t&&pe[t],n&&p("span",{children:n})]})}))}function oc({cooldown:e,invert:t,initial:n}={}){const[r,i]=X(n),o=Te(void 0);return[r,()=>{i(!t),o.current!==void 0&&clearTimeout(o.current),o.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}function Cr(e,t=[],n={loading:!0}){const[r,i]=V3(e,t,n);return ge(()=>{i()},[i]),Ne(he({},r),{refresh:i})}const $s=Symbol("async-cancel");function V3(e,t=[],n={loading:!1}){const[r,i]=X(n),o=Te(!1),s=Te(0);ge(()=>(o.current=!0,()=>o.current=!1),[]);const a=Ve((...c)=>{const u=++s.current;return r.loading||i(l=>Ne(he({},l),{loading:!0})),e(...c).then(l=>(o.current&&u===s.current&&l!==$s&&i({value:l,loading:!1}),l),l=>{o.current&&u===s.current&&i({error:l,loading:!1})})},t);return[r,a]}function Ko({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},o){const s=Te(null),a=Te(),c=Te(),u=Te([0,0]),l=Te(!1);ge(()=>{if(!s.current)return;const h=g=>{a.current=[g.offsetX,g.offsetY]},w=g=>{if(a.current===void 0){if(!s.current)return;const x=g.offsetX/s.current.clientWidth,y=g.offsetY/s.current.clientHeight;r==null||r(x,y);return}if(!n)return;const v=g.offsetX-a.current[0],b=g.offsetY-a.current[1];v===0&&b===0||(u.current=[u.current[0]+v,u.current[1]+b],l.current||(c.current&&cancelAnimationFrame(c.current),c.current=requestAnimationFrame(async()=>{if(!s.current)return;l.current=!0;const x=u.current[0]/s.current.clientWidth,y=u.current[1]/s.current.clientHeight;u.current=[0,0],await(n==null?void 0:n(x,y)),l.current=!1}))),a.current=[g.offsetX,g.offsetY]},_=()=>{a.current=void 0},m=()=>{i==null||i()};return s.current.addEventListener("mousedown",h),s.current.addEventListener("mousemove",w),s.current.addEventListener("mouseleave",m),document.body.addEventListener("mouseup",_),()=>{var g,v,b;(g=s.current)==null||g.removeEventListener("mousedown",h),(v=s.current)==null||v.removeEventListener("mousemove",w),(b=s.current)==null||b.removeEventListener("mouseleave",m),document.body.removeEventListener("mouseup",_)}},[...o!=null?o:[],s.current]);const d=Te(),f=Te(0);return d.current=async()=>{if(!s.current)return;const h=s.current.getContext("2d"),w=e();s.current.width=w[0],s.current.height=w[1];const _=h.getImageData(0,0,w[0],w[1]),m=f.current+=1;try{await t(_)}catch(g){throw g}m===f.current&&h.putImageData(_,0,0)},{canvas:s,redraw:d.current}}const sc="misode-lose-focus";function Oa(){const[e,t]=X(!1),n=()=>{t(!1)};return ge(()=>(e&&(document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n),document.body.addEventListener(sc,n)),()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n),document.body.removeEventListener(sc,n)}),[e]),[e,(r=!0)=>t(r)]}function j3(){const[e,t]=X(window.location.hash),n=Ve(()=>{t(window.location.hash)},[]);ge(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Ve(i=>{i!==e&&Vh({hash:i})},[e]);return[e,r]}function jh(e,t,n,r){const i=Ve(()=>{const c=localStorage.getItem(e);return c===null?t:n===void 0?c:n(c)},[]),[o,s]=X(i()),a=Ve(c=>{c==null?(localStorage.removeItem(e),s(t)):r!==void 0?(localStorage.setItem(e,r(c)),s(c)):(localStorage.setItem(e,c),s(c))},[]);return[o,a]}function ia(e){const[t,n]=X(matchMedia(e).matches),r=i=>{n(i.matches)};return ge(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function Na(e,t,n){const r={invalidated(){e&&t(e)}};ge(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const X1=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function zr(e){const t=window.location,[n,r]=X(X1(t.search,e));ge(()=>{const o=()=>{r(X1(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,s)=>{if(o!==n){r(o);const a=new URLSearchParams(t.search);o===void 0||o.length===0?a.delete(e):a.set(e,o),Vh({search:a.toString().replaceAll("%7C","|"),replace:s})}},[n]);return[n,i]}const z3="tags",hl="|";function zh(){const[e,t]=zr(z3),n=ye(()=>{var i;return(i=e==null?void 0:e.split(hl))!=null?i:[]},[e]);return[n,(i,o)=>{o===!1||n.includes(i)&&o!==!0?t(n.filter(s=>s!==i).join(hl),!0):t([...n,i].sort().join(hl),!0)}]}function Ht(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:o,children:s}=e,[a,c]=Oa();return D("div",Ne(he({},e),{class:`btn-menu${r===!1?" no-relative":""} ${e.class}`,children:[p(se,{icon:t,label:n,tooltip:i,tooltipLoc:o,onClick:()=>c()}),a&&p("div",{class:"btn-group",children:s})]}))}function Yc({title:e,overlay:t,link:n,children:r}){const i=D(me,{children:[t&&p("span",{class:"card-overlay",children:t}),D("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 H3="modulepreload",K1={},U3="/",be=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${U3}${r}`,r in K1)return;K1[r]=!0;const i=r.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${o}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":H3,i||(s.as="script",s.crossOrigin=""),s.href=r,document.head.appendChild(s),i)return new Promise((a,c)=>{s.addEventListener("load",a),s.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};function Ai({error:e,onDismiss:t}){const[n,r]=X(!1),[i,o]=X(void 0);ge(()=>{if(e instanceof Error){const a=e.stack.split(`
|
|
`).map(c=>c.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));o(a.join(`
|
|
`)),be(()=>import("./sourcemapped-stacktrace.583c2cdf.js").then(function(c){return c.s}),[]).then(({mapStackTrace:c})=>{c(a.join(`
|
|
`),u=>{const l=u.map(d=>d.replace(/..\/..\/src\//,"src/")).join(`
|
|
`);o(l)})})}},[e]);const s=ye(()=>{let a="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(a+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,i&&(a+=`&body=${encodeURIComponent(`\`\`\`
|
|
${e.name}: ${e.message}
|
|
${i}
|
|
\`\`\`
|
|
`)}`)):a+=`?title=${encodeURIComponent(e.toString())}`,a},[e,i]);return D("div",{class:"error",children:[t&&p("div",{class:"error-dismiss",onClick:t,children:pe.x}),D("h3",{children:[e instanceof Error?e.message:e,i&&p("span",{onClick:()=>r(!n),children:pe.info})]}),i&&n&&p("pre",{children:i}),D("p",{children:["If you think this is a bug, you can report it ",p("a",{href:s,target:"_blank",children:"on GitHub"})]})]})}const no="https://www.minecraft.net/article/",Z3=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 G3(e){const t=Z3.get(e);if(t)return no+t;let n;if((n=e.match(/^(\d\dw\d\d)[a-z]$/))&&n[1])return no+"minecraft-snapshot-"+n[1]+"a";if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-pre([0-9]+)$/))&&n[1]&&n[2])return no+"minecraft-"+n[1].replaceAll(".","-")+"-pre-release-"+n[2];if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-rc[0-9]+$/))&&n[1])return no+"minecraft-"+n[1].replaceAll(".","-")+"-release-candidate-1";if(e.match(/^\d+\.\d+\.\d+$/))return no+"minecraft-java-edition-"+e.replaceAll(".","-")}const Si="misode-v2",J1="cached_latest_version",Q1="misode_cache_patch",pl="1.19.1-pre4",vi="https://raw.githubusercontent.com/misode/mcmeta",Y3="https://raw.githubusercontent.com/misode/technical-changes";function Kn(e,t){return`${vi}/${e.dynamic?t:`${e.ref}-${t}`}`}async function Ra(e){await ew(),e.dynamic&&(localStorage.getItem(J1)!==pl&&(await Uh(t=>t.startsWith(`${vi}/summary/`)||t.startsWith(`${vi}/data/`)||t.startsWith(`${vi}/assets/`)||t.startsWith(`${vi}/registries/`)),localStorage.setItem(J1,pl)),e.ref=pl)}async function W3(e,t,n){const r=Le.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(Le.versions)}`);return}await Ra(r),await Promise.all([q3(r,t),X3(r,n)])}async function q3(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await Hr(`${Kn(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:",Gt(n))}}async function X3(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await Hr(`${Kn(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:",Gt(n))}}async function Hh(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=Le.versions.find(i=>i.id===e);try{let i;if(n.startsWith("immersive_weathering:"))i=`https://raw.githubusercontent.com/AstralOrdana/Immersive-Weathering/main/src/main/resources/data/immersive_weathering/block_growths/${n.slice(21)}.json`;else{const s=["blockstates","models","font"].includes(t)?"assets":"data";i=`${Kn(r,s)}/${s}/minecraft/${t}/${n}.json`}return await(await fetch(i)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${Gt(i)}`)}}async function eu(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=Le.versions.find(r=>r.id===e);await Ra(n);try{const r=await Hr(`${Kn(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await Hr(`${Kn(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${Gt(r)}`)}}async function K3(e){const t=Le.versions.find(n=>n.id===e);await Ra(t);try{const n=`${Kn(t,"summary")}/sounds/data.min.json`;return await Hr(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${Gt(n)}`)}}function J3(e,t){const n=Le.versions.find(r=>r.id===e);return`${Kn(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function Wc(){const e=Le.versions[Le.versions.length-1];await Ra(e);try{return Hr(`${Kn(e,"summary")}/versions/data.min.json`,{refresh:!0})}catch(t){throw new Error(`Error occured while fetching versions: ${Gt(t)}`)}}function Q3(e,t){const n=Le.versions.find(r=>r.id===e);return`${Kn(n,"assets")}/assets/minecraft/textures/${t}.png`}async function qc(){try{const[e,t]=await Promise.all([Hr(`${Y3}/generated/changes.json`,{refresh:!0}),Wc()]),n=new Map(t.map((r,i)=>[r.id,t.length-i]));return e.map(r=>{var i;return Ne(he({},r),{order:(i=n.get(r.version))!=null?i:0})})}catch(e){throw new Error(`Error occured while fetching technical changes: ${Gt(e)}`)}}const tu=new Set;async function Hr(e,{decode:t=r=>r.json(),refresh:n}={}){try{const r=await caches.open(Si);console.debug(`[cachedFetch] Opened cache ${Si} ${e}`);const i=await r.match(e);if(n&&(tu.has(e)?n=!1:tu.add(e)),n)try{return await nu(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 nu(r,e,t)}catch(r){console.warn(`[cachedFetch] Failed to open cache ${Si}: ${r.message}`),console.debug(`[cachedFetch] Fetching data ${e}`);const i=await fetch(e);return await t(i)}}async function nu(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 Uh(e){try{const t=await caches.open(Si);console.debug(`[deleteMatching] Opened cache ${Si}`);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 ${Si}: ${Gt(t)}`)}}const ru=[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 Uh(e=>e.startsWith(`${vi}/1.18.2-summary/`))}];async function ew(){var t;const e=parseInt((t=localStorage.getItem(Q1))!=null?t:"0");for(let n=e+1;n<=ru.length;n+=1){const r=ru[n-1];r&&await r(),localStorage.setItem(Q1,n.toFixed())}}const rt="immersive_weathering";function tw(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:s=>{if(Array.isArray(s)&&typeof s[0]=="string"&&!s[0].startsWith("#"))return s[0]}},{type:"list",node:P.ListNode(r({validator:"resource",params:{pool:o}})),change:s=>typeof s=="string"&&!s.startsWith("#")?[s]:[]}],{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 nw(e,t){tw(e,t)}const ac=["1.15","1.16","1.17","1.18","1.18.2","1.19"],rw="1.19",si={},ai={},iw={1.15:()=>be(()=>import("./index.4d1c968d.js").then(function(e){return e.i}),[]),1.16:()=>be(()=>import("./index.031866f2.js").then(function(e){return e.i}),[]),1.17:()=>be(()=>import("./index.a1704e17.js").then(function(e){return e.i}),[]),1.18:()=>be(()=>import("./index.b982bb0a.js").then(function(e){return e.i}),[]),"1.18.2":()=>be(()=>import("./index.6787d08d.js").then(function(e){return e.i}),[]),1.19:()=>be(()=>import("./index.eeacbf01.js").then(function(e){return e.i}),[])};let Zh,Gh,mo;async function Xc(e){return si[e]||(si[e]=(async()=>{try{const t=await iw[e](),n=t.getCollections(),r={};await W3(e,n,r);const i=t.getSchemas(n);return nw(i,n),si[e]={collections:n,schemas:i,blockStates:r},si[e]}catch(t){throw new Error(`Cannot get version "${e}": ${Gt(t)}`)}})()),si[e]}async function ow(e,t){var n;if(!ai[t]||ai[t].version!==e){const r=await Xc(e);Zh=P.Reference(r.schemas,"configured_decorator"),Gh=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=Le.generators.find(o=>o.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const o=r.schemas.get(i),s=new P.DataModel(o,{wrapLists:!0});ai[t]?s.reset(ai[t].model.data,!1):(s.validate(!0),s.history=[JSON.stringify(s.data)]),ai[t]={model:s,version:e}}catch(o){const s=new Error(`Cannot get generator "${t}" for version "${e}": ${Gt(o)}`);throw o instanceof Error&&(s.stack=o.stack),s}}return ai[t].model}async function sw(e){const t=await Xc(e);return mo=t.collections,t.collections}async function aw(e){return(await Xc(e)).blockStates}function mt(e,t,n){const r=Le.versions.findIndex(s=>s.id===e),i=t?Le.versions.findIndex(s=>s.id===t):0,o=n?Le.versions.findIndex(s=>s.id===n):Le.versions.length-1;return i<=r&&r<=o}var Yh={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function s(c,u){if(!o[c]){o[c]={};for(var l=0;l<c.length;l++)o[c][c.charAt(l)]=l}return o[c][u]}var a={compressToBase64:function(c){if(c==null)return"";var u=a._compress(c,6,function(l){return r.charAt(l)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(c){return c==null?"":c==""?null:a._decompress(c.length,32,function(u){return s(r,c.charAt(u))})},compressToUTF16:function(c){return c==null?"":a._compress(c,15,function(u){return n(u+32)})+" "},decompressFromUTF16:function(c){return c==null?"":c==""?null:a._decompress(c.length,16384,function(u){return c.charCodeAt(u)-32})},compressToUint8Array:function(c){for(var u=a.compress(c),l=new Uint8Array(u.length*2),d=0,f=u.length;d<f;d++){var h=u.charCodeAt(d);l[d*2]=h>>>8,l[d*2+1]=h%256}return l},decompressFromUint8Array:function(c){if(c==null)return a.decompress(c);for(var u=new Array(c.length/2),l=0,d=u.length;l<d;l++)u[l]=c[l*2]*256+c[l*2+1];var f=[];return u.forEach(function(h){f.push(n(h))}),a.decompress(f.join(""))},compressToEncodedURIComponent:function(c){return c==null?"":a._compress(c,6,function(u){return i.charAt(u)})},decompressFromEncodedURIComponent:function(c){return c==null?"":c==""?null:(c=c.replace(/ /g,"+"),a._decompress(c.length,32,function(u){return s(i,c.charAt(u))}))},compress:function(c){return a._compress(c,16,function(u){return n(u)})},_compress:function(c,u,l){if(c==null)return"";var d,f,h={},w={},_="",m="",g="",v=2,b=3,x=2,y=[],k=0,C=0,E;for(E=0;E<c.length;E+=1)if(_=c.charAt(E),Object.prototype.hasOwnProperty.call(h,_)||(h[_]=b++,w[_]=!0),m=g+_,Object.prototype.hasOwnProperty.call(h,m))g=m;else{if(Object.prototype.hasOwnProperty.call(w,g)){if(g.charCodeAt(0)<256){for(d=0;d<x;d++)k=k<<1,C==u-1?(C=0,y.push(l(k)),k=0):C++;for(f=g.charCodeAt(0),d=0;d<8;d++)k=k<<1|f&1,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=f>>1}else{for(f=1,d=0;d<x;d++)k=k<<1|f,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=0;for(f=g.charCodeAt(0),d=0;d<16;d++)k=k<<1|f&1,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=f>>1}v--,v==0&&(v=Math.pow(2,x),x++),delete w[g]}else for(f=h[g],d=0;d<x;d++)k=k<<1|f&1,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=f>>1;v--,v==0&&(v=Math.pow(2,x),x++),h[m]=b++,g=String(_)}if(g!==""){if(Object.prototype.hasOwnProperty.call(w,g)){if(g.charCodeAt(0)<256){for(d=0;d<x;d++)k=k<<1,C==u-1?(C=0,y.push(l(k)),k=0):C++;for(f=g.charCodeAt(0),d=0;d<8;d++)k=k<<1|f&1,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=f>>1}else{for(f=1,d=0;d<x;d++)k=k<<1|f,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=0;for(f=g.charCodeAt(0),d=0;d<16;d++)k=k<<1|f&1,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=f>>1}v--,v==0&&(v=Math.pow(2,x),x++),delete w[g]}else for(f=h[g],d=0;d<x;d++)k=k<<1|f&1,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=f>>1;v--,v==0&&(v=Math.pow(2,x),x++)}for(f=2,d=0;d<x;d++)k=k<<1|f&1,C==u-1?(C=0,y.push(l(k)),k=0):C++,f=f>>1;for(;;)if(k=k<<1,C==u-1){y.push(l(k));break}else C++;return y.join("")},decompress:function(c){return c==null?"":c==""?null:a._decompress(c.length,32768,function(u){return c.charCodeAt(u)})},_decompress:function(c,u,l){var d=[],f=4,h=4,w=3,_="",m=[],g,v,b,x,y,k,C,E={val:l(0),position:u,index:1};for(g=0;g<3;g+=1)d[g]=g;for(b=0,y=Math.pow(2,2),k=1;k!=y;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=u,E.val=l(E.index++)),b|=(x>0?1:0)*k,k<<=1;switch(b){case 0:for(b=0,y=Math.pow(2,8),k=1;k!=y;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=u,E.val=l(E.index++)),b|=(x>0?1:0)*k,k<<=1;C=n(b);break;case 1:for(b=0,y=Math.pow(2,16),k=1;k!=y;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=u,E.val=l(E.index++)),b|=(x>0?1:0)*k,k<<=1;C=n(b);break;case 2:return""}for(d[3]=C,v=C,m.push(C);;){if(E.index>c)return"";for(b=0,y=Math.pow(2,w),k=1;k!=y;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=u,E.val=l(E.index++)),b|=(x>0?1:0)*k,k<<=1;switch(C=b){case 0:for(b=0,y=Math.pow(2,8),k=1;k!=y;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=u,E.val=l(E.index++)),b|=(x>0?1:0)*k,k<<=1;d[h++]=n(b),C=h-1,f--;break;case 1:for(b=0,y=Math.pow(2,16),k=1;k!=y;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=u,E.val=l(E.index++)),b|=(x>0?1:0)*k,k<<=1;d[h++]=n(b),C=h-1,f--;break;case 2:return m.join("")}if(f==0&&(f=Math.pow(2,w),w++),d[C])_=d[C];else if(C===h)_=v+v.charAt(0);else return null;m.push(_),d[h++]=v+_.charAt(0),f--,v=_,f==0&&(f=Math.pow(2,w),w++)}}};return a}();e!=null&&(e.exports=t)})(Yh);var Wh=Yh.exports;const lw="https://z15g7can.directus.app/items",iu=new Map;async function cw(e,t,n,r){try{const i=JSON.stringify(n),o=Wh.compressToBase64(i);console.debug("Compression rate",i.length/i.length);const s=JSON.stringify({data:o,type:e,version:t,show_preview:r});let a=iu.get(s);if(!a){const c=await qh("/snippets",s);iu.set(s,c.id),a=c.id}return{id:a,length:i.length,compressed:o.length,rate:i.length/o.length}}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function uw(e){var t;try{const n=await qh(`/snippets/${e}`);return Ne(he({},n),{data:JSON.parse((t=Wh.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function qh(e,t){var i,o,s;const r=await(await fetch(lw+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((s=(o=(i=r.errors)==null?void 0:i[0])==null?void 0:o.message)!=null?s:"Unknown error")}const Kc={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let ro=null;const Jc={json:{parse:async e=>{try{return JSON.parse(e)}catch{return ro=await be(()=>import("./index.556ed3fe.js").then(function(n){return n.i}),[]),ro.parse(e)}},stringify:(e,t)=>(ro!=null?ro:JSON).stringify(e,null,t)+`
|
|
`},yaml:{parse:async e=>ic.load(e),stringify:(e,t)=>ic.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function lc(e,t,n){return Jc[t!=null?t:He.getFormat()].stringify(e,Kc[n!=null?n:He.getIndent()])}async function Xh(e,t){return await Jc[t].parse(e)}function dw(e){return Kc[e]}function fw(){return Object.keys(Kc)}function hw(){return Object.keys(Jc)}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_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 L;return(L=localStorage.getItem(e.ID_LANGUAGE))!=null?L:"en"}e.getLanguage=t;function n(){var L;return(L=localStorage.getItem(e.ID_THEME))!=null?L:"dark"}e.getTheme=n;function r(){const L=localStorage.getItem(e.ID_VERSION);return L&&ac.includes(L)?L:"1.19"}e.getVersionOrDefault=r;function i(){const L=localStorage.getItem(e.ID_VERSION);return L&&ac.includes(L)?L:null}e.getVersion=i;function o(){var L;return(L=localStorage.getItem(e.ID_INDENT))!=null?L:"2_spaces"}e.getIndent=o;function s(){var L;return(L=localStorage.getItem(e.ID_FORMAT))!=null?L:"json"}e.getFormat=s;function a(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=a;function c(){var L;return(L=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?L:"latest"}e.getSoundsVersion=c;function u(){const L=localStorage.getItem(e.ID_PROJECTS);return L?JSON.parse(L):[vr]}e.getProjects=u;function l(L){var K;return JSON.parse((K=localStorage.getItem(e.ID_BACKUPS))!=null?K:"{}")[L]}e.getBackup=l;function d(){const L=localStorage.getItem(e.ID_PROJECT_PANEL_OPEN);if(L!==null)return JSON.parse(L)}e.getProjectPanelOpen=d;function f(){var L;return(L=localStorage.getItem(e.ID_OPEN_PROJECT))!=null?L:vr.name}e.getOpenProject=f;function h(){var L;return(L=localStorage.getItem(e.ID_TREE_VIEW_MODE))!=null?L:"resources"}e.getTreeViewMode=h;function w(){var L;return JSON.parse((L=localStorage.getItem(e.ID_GENERATOR_HISTORY))!=null?L:"[]")}e.getGeneratorHistory=w;function _(L){L&&localStorage.setItem(e.ID_LANGUAGE,L)}e.setLanguage=_;function m(L){L&&localStorage.setItem(e.ID_THEME,L)}e.setTheme=m;function g(L){L&&localStorage.setItem(e.ID_VERSION,L)}e.setVersion=g;function v(L){L&&localStorage.setItem(e.ID_INDENT,L)}e.setIndent=v;function b(L){L&&localStorage.setItem(e.ID_FORMAT,L)}e.setFormat=b;function x(L){L!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,L.toString())}e.setHighlighting=x;function y(L){L&&localStorage.setItem(e.ID_SOUNDS_VERSION,L)}e.setSoundsVersion=y;function k(L){L&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(L))}e.setProjects=k;function C(L,F){var H;const K=JSON.parse((H=localStorage.getItem(e.ID_BACKUPS))!=null?H:"{}");F===void 0?delete K[L]:K[L]=F,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(K))}e.setBackup=C;function E(L){L===void 0?localStorage.removeItem(e.ID_PROJECT_PANEL_OPEN):localStorage.setItem(e.ID_PROJECT_PANEL_OPEN,JSON.stringify(L))}e.setProjectPanelOpen=E;function M(L){L===void 0?localStorage.removeItem(e.ID_OPEN_PROJECT):localStorage.setItem(e.ID_OPEN_PROJECT,L)}e.setOpenProject=M;function S(L){L&&localStorage.setItem(e.ID_TREE_VIEW_MODE,L)}e.setTreeViewMode=S;function T(L){const F=w();F.push(L),localStorage.setItem(e.ID_GENERATOR_HISTORY,JSON.stringify(F.slice(-50)))}e.visitGenerator=T})(He||(He={}));var Kh=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.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","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","zoom_in":"Zoom in","zoom_in_limit":"Cannot zoom in further\\n1 pixel = 4 blocks","zoom_out":"Zoom out"}'),pw=Object.freeze(Object.defineProperty({__proto__:null,default:Kh},Symbol.toStringTag,{value:"Module"}));function mw(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return be(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return be(()=>import("./de.489974c1.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return be(()=>import("./en.1eb283a8.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return be(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return be(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return be(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return be(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/ko.json":return be(()=>import("./ko.430d6f93.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return be(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return be(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return be(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return be(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return be(()=>import("./zh-cn.8787f20e.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return be(()=>import("./zh-tw.bdc36a24.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}function gw(e){switch(e){case"../../locales/de.json":return be(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return be(()=>Promise.resolve().then(function(){return pw}),void 0);case"../../locales/es.json":return be(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return be(()=>import("./fr.0918dd41.js"),[]);case"../../locales/it.json":return be(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return be(()=>import("./ja.167de97b.js"),[]);case"../../locales/ko.json":return be(()=>import("./ko.b4055eb4.js"),[]);case"../../locales/pl.json":return be(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return be(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return be(()=>import("./ru.c5e64dad.js"),[]);case"../../locales/sk.json":return be(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return be(()=>import("./zh-cn.aa5468cf.js"),[]);case"../../locales/zh-tw.json":return be(()=>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 Jh=kr({lang:"none",locale:e=>e,changeLocale:()=>{}}),go={fallback:Kh};function Me(e,t,...n){var i,o,s,a,c;const r=(c=(a=(s=(i=go[e])==null?void 0:i[t])!=null?s:(o=go.en)==null?void 0:o[t])!=null?a:go.fallback[t])!=null?c:t;return _w(r,n)}function _w(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 ml(e){if(go[e])return;const t=Le.languages.find(o=>o.code===e);if(!t)return;const n=await gw(`../../locales/${e}.json`),r=t.schemas!==!1&&await mw(`../../../node_modules/@mcschema/locales/src/${e}.json`);let i={default:{}};e==="en"&&(i=await be(()=>import("./en.321d8b56.js"),[])),go[e]=he(he(he({},n.default),r.default),i.default)}function ke(){return Jr(Jh)}function ww({children:e}){const[t,n]=X("none"),r=Ve((s,...a)=>Me(t,s,...a),[t]),i=Ve(async s=>{await ml(s),Se.changeLocale(t,s),He.setLanguage(s),n(s)},[t]);ge(()=>{(async()=>{const s=He.getLanguage();Se.setLocale(s),await Promise.all([ml("en"),...s!=="en"?[ml(s)]:[]]),n(s)})()},[]);const o={lang:t,locale:r,changeLocale:i};return p(Jh.Provider,{value:o,children:e})}const vr={name:"Drafts",namespace:"draft",files:[]},vw=["worldgen/[a-z_]+","tags/worldgen/[a-z_]+","tags/[a-z_]+","[a-z_]+"].map(e=>RegExp(`^data/([a-z0-9._-]+)/(${e})/([a-z0-9/._-]+)$`)),Qh=kr({projects:[vr],project:vr,createProject:()=>{},deleteProject:()=>{},changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function On(){return Jr(Qh)}function xw({children:e}){const[t,n]=X(He.getProjects()),[r,i]=X(He.getOpenProject()),o=ye(()=>{var v;return(v=t.find(b=>b.name===r))!=null?v:vr},[t,r]),[s,a]=X(void 0),c=ye(()=>{if(!!s)return o.files.find(v=>v.type===s[0]&&v.id===s[1])},[o,s]),u=Ve(v=>{He.setProjects(v),n(v)},[]),l=Ve((v,b,x)=>{u([...t,{name:v,namespace:b,version:x,files:[]}])},[t]),d=Ve(v=>{v!==vr.name&&u(t.filter(b=>b.name!==v))},[t]),f=Ve(v=>{He.setOpenProject(v),i(v)},[]),h=Ve(v=>{u(t.map(b=>b.name===r?he(he({},b),v):b))},[t,r]),w=Ve((v,b,x)=>{var y,k;if(!x.id)h({files:o.files.filter(C=>C.type!==v||C.id!==b)});else{const C=v==="pack_mcmeta"?"pack":x.id.includes(":")?x.id:`${(y=o.namespace)!=null?y:"minecraft"}:${x.id}`,E=o.files.some(M=>M.type===v&&M.id===C);if(b){if((c==null?void 0:c.id)===b&&b!==C&&E)return!1;h({files:o.files.map(M=>M.type===v&&M.id===b?Ne(he(he({},M),x),{id:C}):M)}),(c==null?void 0:c.id)===b&&a([v,C])}else{if(E)return!1;h({files:[...o.files,{type:v,id:C,data:(k=x.data)!=null?k:{}}]}),a([v,C])}}return!0},[h,o,c]),_=Ve((v,b)=>{const x=Le.generators.find(y=>y.id===v||y.path===v);if(!x)throw new Error(`Cannot find generator of type ${v}`);a([x.id,b]),Xr(wr(x.url))},[]),m=Ve(()=>{a(void 0)},[]),g={projects:t,project:o,file:c,createProject:l,changeProject:f,deleteProject:d,updateProject:h,updateFile:w,openFile:_,closeFile:m};return p(Qh.Provider,{value:g,children:e})}function gl(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=Le.generators.find(o=>o.id===e.type);if(!!r)return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}.json`}function e2(e){if(e==="pack.mcmeta")return{type:"pack_mcmeta",id:"pack"};for(const t of vw){const n=e.match(t);if(!n)continue;const r=Le.generators.find(s=>{var a;return((a=s.path)!=null?a:s.id)===n[2]});if(!r)continue;const i=n[1],o=n[3].replace(/\.[a-z]+$/,"");return{type:r.id,id:`${i}:${o}`}}}const t2=kr({biomeColors:{},setBiomeColor:()=>{}});function n2(){return Jr(t2)}function bw({children:e}){const[t,n]=jh("misode_biome_colors",{},JSON.parse,JSON.stringify),r=Ve((o,s)=>{n(Ne(he({},t),{[o]:s}))},[t]),i={biomeColors:t,setBiomeColor:r};return p(t2.Provider,{value:i,children:e})}const r2=kr({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function i2(){return Jr(r2)}function yw({children:e}){const[t,n]=X(He.getTheme()),r=ia("(prefers-color-scheme: light)"),i=ia("(prefers-color-scheme: dark)");ge(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const o=Ve(a=>{Se.changeTheme(t,a),He.setTheme(a),n(a)},[t]);ge(()=>{Se.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]),ge(()=>{Se.setTheme(t)},[]);const s={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:o};return p(r2.Provider,{value:s,children:e})}const kw=3,o2=kr({title:"",changeTitle:()=>{}});function hn(e,t,n){const r=Jr(o2);return ge(()=>{e&&r.changeTitle(e,t,n)},[e,t,n]),r}function Cw({children:e}){const{locale:t}=ke(),[n,r]=X(t("title.home")),i=Ve((s,a,c)=>{let u=Le.versions;a!==void 0&&(u=Le.versions.filter(d=>a==null?void 0:a.includes(d.id)));let l="";c&&(l=` - ${c}`),(a==null?void 0:a.length)!==0&&(l=` - Minecraft ${u.map(f=>f.id).slice(-kw).join(", ")}`),document.title=s+l,r(s)},[]),o={title:n,changeTitle:i};return p(o2.Provider,{value:o,children:e})}const Ew="version",s2=kr({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function Er(){return Jr(s2)}function Aw({children:e}){const[t,n]=X(He.getVersionOrDefault()),[r,i]=zr(Ew);ge(()=>{ac.includes(r)&&t!==r&&(Se.setVersion(r),n(r))},[t,r]);const o=Ve((a,c=!0,u=!1)=>{(u||r)&&i(a,!0),c&&(Se.changeVersion(t,a),He.setVersion(a)),n(a)},[t,r]);ge(()=>{var a;Se.setVersion(t),Se.setSelectedVersion((a=He.getVersion())!=null?a:"default")},[]);const s={version:t,changeVersion:o,changeTargetVersion:i};return p(s2.Provider,{value:s,children:e})}function Sw({value:e,onChange:t,label:n,accept:r}){const{locale:i}=ke(),o=Te(null),s=()=>{var c,u;if(o.current!==null)for(let l=0;l<((u=(c=o.current.files)==null?void 0:c.length)!=null?u:0);l++){const d=o.current.files[l];t(d)}},a=Ve(c=>{if(c.preventDefault(),!!c.dataTransfer)for(let u=0;u<c.dataTransfer.files.length;u++){const l=c.dataTransfer.files[u];t(l)}},[t]);return D("label",{class:"file-upload",onDrop:a,onDragOver:c=>c.preventDefault(),children:[p("input",{ref:o,type:"file",onChange:s,accept:r}),p(se,{label:n!=null?n:i("choose_file")}),p("span",{children:e?e.name:i("no_file_chosen")})]})}function Nn({donate:e}){const{locale:t}=ke();return D("footer",{children:[p("p",{children:D("span",{children:[t("developed_by")," ",p("a",{href:"https://github.com/misode",target:"_blank",rel:"noreferrer",children:"Misode"})]})}),e!==!1&&D("p",{class:"donate",children:[pe.heart,p("a",{href:"https://ko-fi.com/misode",target:"_blank",rel:"noreferrer",children:t("donate")})]}),D("p",{children:[pe.mark_github,D("span",{children:[t("source_code_on")," ",p("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",children:t("github")})]})]})]})}function Iw({label:e,value:t,onChange:n}){const r=Pr();return D("label",{class:"checkbox",children:[p("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e]})}function Qc(e,t,n){const r=i=>{const o=i.onChange&&(c=>{var l;const u=c.target.value;(l=i.onChange)==null||l.call(i,n(u))}),s=i.onEnter&&(c=>{var u,l;if(c.key==="Enter"){const d=c.target.value;(u=i.onEnter)==null||u.call(i,n(d))}else c.key==="Escape"&&((l=i.onCancel)==null||l.call(i))}),a=Te(null);return ge(()=>{var c;i.autofocus&&((c=a.current)==null||c.select())},[i.autofocus]),p("input",Ne(he({ref:a},i),{type:t,onChange:o,onKeyDown:s}))};return r.displayName=e,r}const fn=Qc("TextInput","text",e=>e),Mw=Qc("NumberInput","number",e=>Number(e)),ou=Qc("RangeInput","range",e=>Number(e));function Tw({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,o]=X(""),s=ye(()=>{var c;const a=i.trim().split(" ");return(c=e==null?void 0:e.filter(u=>a.every(l=>u.includes(l))))!=null?c:[]},[e,i]);return D(me,{children:[p(Ps,{icon:"search",large:!0,value:i,onChange:o,doSelect:1,placeholder:n!=null?n:"Search"}),D("div",{class:"result-list",children:[s.map(a=>p(se,{label:a,onClick:()=>t==null?void 0:t(a)},a)),s.length===0&&p(se,{label:r!=null?r:"No results"})]})]})}const _l="data-modals";function Da(e){var n;ge(()=>(su(1),window.addEventListener("click",e.onDismiss),()=>{su(-1),window.removeEventListener("click",e.onDismiss)}));const t=Ve(r=>{var i;r.stopPropagation(),(i=r.target)==null||i.dispatchEvent(new Event(sc,{bubbles:!0}))},[]);return p("div",Ne(he({},e),{class:`modal ${(n=e.class)!=null?n:""}`,onClick:t,children:e.children}))}function su(e){var r;const n=parseInt((r=document.body.getAttribute(_l))!=null?r:"0")+e;n<=0?document.body.removeAttribute(_l):document.body.setAttribute(_l,n.toFixed())}function Lw({model:e,id:t,method:n,onClose:r}){const{locale:i}=ke(),{projects:o,project:s,updateFile:a}=On(),[c,u]=X(t==="pack_mcmeta"?"pack":""),l=()=>{Se.saveProjectFile(t,o.length,s.files.length,n),a(t,void 0,{type:t,id:c,data:P.DataModel.unwrapLists(e.data)}),r()};return D(Da,{class:"file-modal",onDismiss:r,children:[p("p",{children:i("project.save_current_file")}),p(fn,{autofocus:t!=="pack_mcmeta",class:"btn btn-input",value:c,onChange:u,onEnter:l,onCancel:r,placeholder:i("resource_location"),spellcheck:!1,readOnly:t==="pack_mcmeta"}),p(se,{icon:"file",label:i("project.save"),onClick:l})]})}function Ow({id:e,name:t,onClose:n}){const{locale:r}=ke(),{projects:i,project:o,updateFile:s}=On(),[a,c]=X(t),u=()=>{Se.renameProjectFile(e,i.length,o.files.length,"menu"),s(e,t,{type:e,id:a}),n()};return D(Da,{class:"file-modal",onDismiss:n,children:[p("p",{children:r("project.rename_file")}),p(fn,{autofocus:!0,class:"btn btn-input",value:a,onChange:c,onEnter:u,placeholder:r("resource_location"),spellcheck:!1}),p(se,{icon:"pencil",label:r("project.rename"),onClick:u})]})}function bn({id:e,minimal:t}){var c;const{locale:n}=ke(),r=ye(()=>{const u=Le.generators.find(l=>l.id===e);return u===void 0?{id:e,schema:e,url:e}:u},[e]),i=n(r.partner?`partner.${r.partner}.${r.id}`:r.id),o=Object.keys(Vi).includes(e)?e:void 0;if(t)return p(Yn,{title:i,link:wr(r.url),titleIcon:o});const s=ye(()=>r?Le.versions.filter(u=>mt(u.id,r.minVersion,r.maxVersion)).map(u=>u.id):[],[r]),a=ye(()=>{var u;return(u=r.tags)!=null&&u.includes("assets")?["resource-pack"]:[]},[r]);return D(Yc,{title:D(me,{children:[i,o&&Vi[o]]}),overlay:r.partner?n(`partner.${r.partner}`):s.join(" \u2022 "),link:wr(r.url),children:[!r.noPath&&D("p",{class:"card-subtitle",children:["/",(c=r.path)!=null?c:r.id]}),a.length>0&&p("div",{class:"badges-list",children:a.sort().map(u=>p(Gi,{label:u}))})]})}function e0({predicate:e}){const{locale:t}=ke(),{version:n,changeVersion:r}=Er(),[i,o]=X(""),[s,a]=X(!0),c=ye(()=>Le.generators.filter(l=>e===void 0||!e(l)?!1:s===!1?!0:mt(n,l.minVersion,l.maxVersion)),[n,s]),u=ye(()=>{const l=i.split(" ").map(d=>d.trim().toLowerCase()).filter(d=>d.length>0);return c.filter(d=>{var h,w,_,m;const f=`${d.id} ${(w=(h=d.tags)==null?void 0:h.join(" "))!=null?w:""} ${(_=d.path)!=null?_:""} ${(m=d.partner)!=null?m:""} ${t(d.id).toLowerCase()}`;return l.every(g=>g.startsWith("!")?g.length===1||!f.includes(g.slice(1)):f.includes(g))})},[c,i,t]);return D("div",{class:"generator-list",children:[D("div",{class:"navigation",children:[p(fn,{class:"btn btn-input query-search",placeholder:t("generators.search"),value:i,onChange:o}),p(ns,{value:s?n:void 0,onChange:l=>{r(l),a(!0)},hasAny:!0,onAny:()=>a(!1)})]}),u.length===0?p(me,{children:p("span",{class:"note",children:t("generators.no_results")})}):p("div",{class:"card-column",children:u.map(l=>p(bn,{id:l.id}))})]})}var Xt;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(Xt||(Xt={}));const Nw={[Xt.UP]:[0,1,0],[Xt.DOWN]:[0,-1,0],[Xt.NORTH]:[0,0,-1],[Xt.EAST]:[1,0,0],[Xt.SOUTH]:[0,0,1],[Xt.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return Nw[n]}e.normal=t})(Xt||(Xt={}));var Ot;(function(e){function t(s,a,c){return[s,a,c]}e.create=t,e.ZERO=e.create(0,0,0);function n(s,a,c,u){return[s[0]+a,s[1]+c,s[2]+u]}e.offset=n;function r(s,a){return e.offset(s,...Xt.normal(a))}e.towards=r;function i(s,a){return s===a?!0:s[0]===a[0]&&s[1]===a[1]&&s[2]===a[2]}e.equals=i;function o(s){return s[0]*s[0]+s[1]*s[1]+s[2]*s[2]}e.magnitude=o})(Ot||(Ot={}));/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Rw=4,au=0,lu=1,Dw=2;function Ui(e){let t=e.length;for(;--t>=0;)e[t]=0}const Fw=0,a2=1,Pw=2,$w=3,Bw=258,t0=29,Jo=256,Io=Jo+1+t0,Ii=30,n0=19,l2=2*Io+1,Nr=15,wl=16,Vw=7,r0=256,c2=16,u2=17,d2=18,cc=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]),Bs=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]),jw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),f2=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),zw=512,Bn=new Array((Io+2)*2);Ui(Bn);const _o=new Array(Ii*2);Ui(_o);const Mo=new Array(zw);Ui(Mo);const To=new Array(Bw-$w+1);Ui(To);const i0=new Array(t0);Ui(i0);const oa=new Array(Ii);Ui(oa);function vl(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 h2,p2,m2;function xl(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const g2=e=>e<256?Mo[e]:Mo[256+(e>>>7)],Lo=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Ft=(e,t,n)=>{e.bi_valid>wl-n?(e.bi_buf|=t<<e.bi_valid&65535,Lo(e,e.bi_buf),e.bi_buf=t>>wl-e.bi_valid,e.bi_valid+=n-wl):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},yn=(e,t,n)=>{Ft(e,n[t*2],n[t*2+1])},_2=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},Hw=e=>{e.bi_valid===16?(Lo(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)},Uw=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,l,d,f,h,w,_=0;for(f=0;f<=Nr;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<l2;u++)l=e.heap[u],f=n[n[l*2+1]*2+1]+1,f>c&&(f=c,_++),n[l*2+1]=f,!(l>r)&&(e.bl_count[f]++,h=0,l>=a&&(h=s[l-a]),w=n[l*2],e.opt_len+=w*(f+h),o&&(e.static_len+=w*(i[l*2+1]+h)));if(_!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,_-=2}while(_>0);for(f=c;f!==0;f--)for(l=e.bl_count[f];l!==0;)d=e.heap[--u],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),l--)}},w2=(e,t,n)=>{const r=new Array(Nr+1);let i=0,o,s;for(o=1;o<=Nr;o++)r[o]=i=i+n[o-1]<<1;for(s=0;s<=t;s++){let a=e[s*2+1];a!==0&&(e[s*2]=_2(r[a]++,a))}},Zw=()=>{let e,t,n,r,i;const o=new Array(Nr+1);for(n=0,r=0;r<t0-1;r++)for(i0[r]=n,e=0;e<1<<cc[r];e++)To[n++]=r;for(To[n-1]=r,i=0,r=0;r<16;r++)for(oa[r]=i,e=0;e<1<<Bs[r];e++)Mo[i++]=r;for(i>>=7;r<Ii;r++)for(oa[r]=i<<7,e=0;e<1<<Bs[r]-7;e++)Mo[256+i++]=r;for(t=0;t<=Nr;t++)o[t]=0;for(e=0;e<=143;)Bn[e*2+1]=8,e++,o[8]++;for(;e<=255;)Bn[e*2+1]=9,e++,o[9]++;for(;e<=279;)Bn[e*2+1]=7,e++,o[7]++;for(;e<=287;)Bn[e*2+1]=8,e++,o[8]++;for(w2(Bn,Io+1,o),e=0;e<Ii;e++)_o[e*2+1]=5,_o[e*2]=_2(e,5);h2=new vl(Bn,cc,Jo+1,Io,Nr),p2=new vl(_o,Bs,0,Ii,Nr),m2=new vl(new Array(0),jw,0,n0,Vw)},v2=e=>{let t;for(t=0;t<Io;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ii;t++)e.dyn_dtree[t*2]=0;for(t=0;t<n0;t++)e.bl_tree[t*2]=0;e.dyn_ltree[r0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},x2=e=>{e.bi_valid>8?Lo(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Gw=(e,t,n,r)=>{x2(e),r&&(Lo(e,n),Lo(e,~n)),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},cu=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},bl=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&cu(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!cu(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},uu=(e,t,n)=>{let r,i,o=0,s,a;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?yn(e,i,t):(s=To[i],yn(e,s+Jo+1,t),a=cc[s],a!==0&&(i-=i0[s],Ft(e,i,a)),r--,s=g2(r),yn(e,s,n),a=Bs[s],a!==0&&(r-=oa[s],Ft(e,r,a)));while(o<e.last_lit);yn(e,r0,t)},uc=(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 s,a,c=-1,u;for(e.heap_len=0,e.heap_max=l2,s=0;s<o;s++)n[s*2]!==0?(e.heap[++e.heap_len]=c=s,e.depth[s]=0):n[s*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=c<2?++c:0,n[u*2]=1,e.depth[u]=0,e.opt_len--,i&&(e.static_len-=r[u*2+1]);for(t.max_code=c,s=e.heap_len>>1;s>=1;s--)bl(e,n,s);u=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],bl(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=a,n[u*2]=n[s*2]+n[a*2],e.depth[u]=(e.depth[s]>=e.depth[a]?e.depth[s]:e.depth[a])+1,n[s*2+1]=n[a*2+1]=u,e.heap[1]=u++,bl(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Uw(e,t),w2(n,c,e.bl_count)},du=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],a=0,c=7,u=4;for(s===0&&(c=138,u=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++a<c&&o===s)&&(a<u?e.bl_tree[o*2]+=a:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[c2*2]++):a<=10?e.bl_tree[u2*2]++:e.bl_tree[d2*2]++,a=0,i=o,s===0?(c=138,u=3):o===s?(c=6,u=3):(c=7,u=4))},fu=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],a=0,c=7,u=4;for(s===0&&(c=138,u=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++a<c&&o===s)){if(a<u)do yn(e,o,e.bl_tree);while(--a!==0);else o!==0?(o!==i&&(yn(e,o,e.bl_tree),a--),yn(e,c2,e.bl_tree),Ft(e,a-3,2)):a<=10?(yn(e,u2,e.bl_tree),Ft(e,a-3,3)):(yn(e,d2,e.bl_tree),Ft(e,a-11,7));a=0,i=o,s===0?(c=138,u=3):o===s?(c=6,u=3):(c=7,u=4)}},Yw=e=>{let t;for(du(e,e.dyn_ltree,e.l_desc.max_code),du(e,e.dyn_dtree,e.d_desc.max_code),uc(e,e.bl_desc),t=n0-1;t>=3&&e.bl_tree[f2[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},Ww=(e,t,n,r)=>{let i;for(Ft(e,t-257,5),Ft(e,n-1,5),Ft(e,r-4,4),i=0;i<r;i++)Ft(e,e.bl_tree[f2[i]*2+1],3);fu(e,e.dyn_ltree,t-1),fu(e,e.dyn_dtree,n-1)},qw=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return au;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return lu;for(n=32;n<Jo;n++)if(e.dyn_ltree[n*2]!==0)return lu;return au};let hu=!1;const Xw=e=>{hu||(Zw(),hu=!0),e.l_desc=new xl(e.dyn_ltree,h2),e.d_desc=new xl(e.dyn_dtree,p2),e.bl_desc=new xl(e.bl_tree,m2),e.bi_buf=0,e.bi_valid=0,v2(e)},b2=(e,t,n,r)=>{Ft(e,(Fw<<1)+(r?1:0),3),Gw(e,t,n,!0)},Kw=e=>{Ft(e,a2<<1,3),yn(e,r0,Bn),Hw(e)},Jw=(e,t,n,r)=>{let i,o,s=0;e.level>0?(e.strm.data_type===Dw&&(e.strm.data_type=qw(e)),uc(e,e.l_desc),uc(e,e.d_desc),s=Yw(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?b2(e,t,n,r):e.strategy===Rw||o===i?(Ft(e,(a2<<1)+(r?1:0),3),uu(e,Bn,_o)):(Ft(e,(Pw<<1)+(r?1:0),3),Ww(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),uu(e,e.dyn_ltree,e.dyn_dtree)),v2(e),r&&x2(e)},Qw=(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[(To[n]+Jo+1)*2]++,e.dyn_dtree[g2(t)*2]++),e.last_lit===e.lit_bufsize-1);var e6=Xw,t6=b2,n6=Jw,r6=Qw,i6=Kw,o6={_tr_init:e6,_tr_stored_block:t6,_tr_flush_block:n6,_tr_tally:r6,_tr_align:i6};const s6=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0};var Oo=s6;const a6=()=>{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},l6=new Uint32Array(a6()),c6=(e,t,n,r)=>{const i=l6,o=r+n;e^=-1;for(let s=r;s<o;s++)e=e>>>8^i[(e^t[s])&255];return e^-1};var ft=c6,Ur={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"},Qr={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:u6,_tr_stored_block:d6,_tr_flush_block:f6,_tr_tally:pr,_tr_align:h6}=o6,{Z_NO_FLUSH:ei,Z_PARTIAL_FLUSH:p6,Z_FULL_FLUSH:m6,Z_FINISH:mr,Z_BLOCK:pu,Z_OK:kn,Z_STREAM_END:mu,Z_STREAM_ERROR:Qt,Z_DATA_ERROR:g6,Z_BUF_ERROR:yl,Z_DEFAULT_COMPRESSION:_6,Z_FILTERED:w6,Z_HUFFMAN_ONLY:_s,Z_RLE:v6,Z_FIXED:x6,Z_DEFAULT_STRATEGY:b6,Z_UNKNOWN:y6,Z_DEFLATED:Fa}=Qr,k6=9,C6=15,E6=8,A6=29,S6=256,dc=S6+1+A6,I6=30,M6=19,T6=2*dc+1,L6=15,Ie=3,ur=258,dn=ur+Ie+1,O6=32,Pa=42,fc=69,Vs=73,js=91,zs=103,Rr=113,ao=666,ct=1,Qo=2,Zr=3,Zi=4,N6=3,dr=(e,t)=>(e.msg=Ur[t],t),gu=e=>(e<<1)-(e>4?9:0),cr=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let R6=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,gr=R6;const ir=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))},kt=(e,t)=>{f6(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ir(e.strm)},$e=(e,t)=>{e.pending_buf[e.pending++]=t},io=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},D6=(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=Oo(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ft(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},y2=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,a=e.nice_match;const c=e.strstart>e.w_size-dn?e.strstart-(e.w_size-dn):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+ur;let h=u[r+s-1],w=u[r+s];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do if(i=t,!(u[i+s]!==w||u[i+s-1]!==h||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&r<f);if(o=ur-(f-r),r=f-ur,o>s){if(e.match_start=t,s=o,o>=a)break;h=u[r+s-1],w=u[r+s]}}while((t=d[t&l])>c&&--n!==0);return s<=e.lookahead?s:e.lookahead},Gr=e=>{const t=e.w_size;let n,r,i,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-dn)){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=D6(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=Ie)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=gr(e,e.ins_h,e.window[s+1]);e.insert&&(e.ins_h=gr(e,e.ins_h,e.window[s+Ie-1]),e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<Ie)););}while(e.lookahead<dn&&e.strm.avail_in!==0)},F6=(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Gr(e),e.lookahead===0&&t===ei)return ct;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,kt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-dn&&(kt(e,!1),e.strm.avail_out===0))return ct}return e.insert=0,t===mr?(kt(e,!0),e.strm.avail_out===0?Zr:Zi):(e.strstart>e.block_start&&(kt(e,!1),e.strm.avail_out===0),ct)},kl=(e,t)=>{let n,r;for(;;){if(e.lookahead<dn){if(Gr(e),e.lookahead<dn&&t===ei)return ct;if(e.lookahead===0)break}if(n=0,e.lookahead>=Ie&&(e.ins_h=gr(e,e.ins_h,e.window[e.strstart+Ie-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-dn&&(e.match_length=y2(e,n)),e.match_length>=Ie)if(r=pr(e,e.strstart-e.match_start,e.match_length-Ie),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ie){e.match_length--;do e.strstart++,e.ins_h=gr(e,e.ins_h,e.window[e.strstart+Ie-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=gr(e,e.ins_h,e.window[e.strstart+1]);else r=pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(kt(e,!1),e.strm.avail_out===0))return ct}return e.insert=e.strstart<Ie-1?e.strstart:Ie-1,t===mr?(kt(e,!0),e.strm.avail_out===0?Zr:Zi):e.last_lit&&(kt(e,!1),e.strm.avail_out===0)?ct:Qo},li=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<dn){if(Gr(e),e.lookahead<dn&&t===ei)return ct;if(e.lookahead===0)break}if(n=0,e.lookahead>=Ie&&(e.ins_h=gr(e,e.ins_h,e.window[e.strstart+Ie-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=Ie-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-dn&&(e.match_length=y2(e,n),e.match_length<=5&&(e.strategy===w6||e.match_length===Ie&&e.strstart-e.match_start>4096)&&(e.match_length=Ie-1)),e.prev_length>=Ie&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Ie,r=pr(e,e.strstart-1-e.prev_match,e.prev_length-Ie),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=gr(e,e.ins_h,e.window[e.strstart+Ie-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=Ie-1,e.strstart++,r&&(kt(e,!1),e.strm.avail_out===0))return ct}else if(e.match_available){if(r=pr(e,0,e.window[e.strstart-1]),r&&kt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return ct}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=pr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ie-1?e.strstart:Ie-1,t===mr?(kt(e,!0),e.strm.avail_out===0?Zr:Zi):e.last_lit&&(kt(e,!1),e.strm.avail_out===0)?ct:Qo},P6=(e,t)=>{let n,r,i,o;const s=e.window;for(;;){if(e.lookahead<=ur){if(Gr(e),e.lookahead<=ur&&t===ei)return ct;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ie&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+ur;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=ur-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ie?(n=pr(e,1,e.match_length-Ie),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(kt(e,!1),e.strm.avail_out===0))return ct}return e.insert=0,t===mr?(kt(e,!0),e.strm.avail_out===0?Zr:Zi):e.last_lit&&(kt(e,!1),e.strm.avail_out===0)?ct:Qo},$6=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Gr(e),e.lookahead===0)){if(t===ei)return ct;break}if(e.match_length=0,n=pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(kt(e,!1),e.strm.avail_out===0))return ct}return e.insert=0,t===mr?(kt(e,!0),e.strm.avail_out===0?Zr:Zi):e.last_lit&&(kt(e,!1),e.strm.avail_out===0)?ct:Qo};function wn(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 lo=[new wn(0,0,0,0,F6),new wn(4,4,8,4,kl),new wn(4,5,16,8,kl),new wn(4,6,32,32,kl),new wn(4,4,16,16,li),new wn(8,16,32,32,li),new wn(8,16,128,128,li),new wn(8,32,128,256,li),new wn(32,128,258,1024,li),new wn(32,258,258,4096,li)],B6=e=>{e.window_size=2*e.w_size,cr(e.head),e.max_lazy_match=lo[e.level].max_lazy,e.good_match=lo[e.level].good_length,e.nice_match=lo[e.level].nice_length,e.max_chain_length=lo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Ie-1,e.match_available=0,e.ins_h=0};function V6(){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=Fa,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(T6*2),this.dyn_dtree=new Uint16Array((2*I6+1)*2),this.bl_tree=new Uint16Array((2*M6+1)*2),cr(this.dyn_ltree),cr(this.dyn_dtree),cr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(L6+1),this.heap=new Uint16Array(2*dc+1),cr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*dc+1),cr(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 k2=e=>{if(!e||!e.state)return dr(e,Qt);e.total_in=e.total_out=0,e.data_type=y6;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Pa:Rr,e.adler=t.wrap===2?0:1,t.last_flush=ei,u6(t),kn},C2=e=>{const t=k2(e);return t===kn&&B6(e.state),t},j6=(e,t)=>!e||!e.state||e.state.wrap!==2?Qt:(e.state.gzhead=t,kn),E2=(e,t,n,r,i,o)=>{if(!e)return Qt;let s=1;if(t===_6&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>k6||n!==Fa||r<8||r>15||t<0||t>9||o<0||o>x6)return dr(e,Qt);r===8&&(r=9);const a=new V6;return e.state=a,a.strm=e,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+Ie-1)/Ie),a.window=new Uint8Array(a.w_size*2),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new Uint8Array(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=(1+2)*a.lit_bufsize,a.level=t,a.strategy=o,a.method=n,C2(e)},z6=(e,t)=>E2(e,t,Fa,C6,E6,b6),H6=(e,t)=>{let n,r;if(!e||!e.state||t>pu||t<0)return e?dr(e,Qt):Qt;const i=e.state;if(!e.output||!e.input&&e.avail_in!==0||i.status===ao&&t!==mr)return dr(e,e.avail_out===0?yl:Qt);i.strm=e;const o=i.last_flush;if(i.last_flush=t,i.status===Pa)if(i.wrap===2)e.adler=0,$e(i,31),$e(i,139),$e(i,8),i.gzhead?($e(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)),$e(i,i.gzhead.time&255),$e(i,i.gzhead.time>>8&255),$e(i,i.gzhead.time>>16&255),$e(i,i.gzhead.time>>24&255),$e(i,i.level===9?2:i.strategy>=_s||i.level<2?4:0),$e(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&($e(i,i.gzhead.extra.length&255),$e(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=ft(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=fc):($e(i,0),$e(i,0),$e(i,0),$e(i,0),$e(i,0),$e(i,i.level===9?2:i.strategy>=_s||i.level<2?4:0),$e(i,N6),i.status=Rr);else{let s=Fa+(i.w_bits-8<<4)<<8,a=-1;i.strategy>=_s||i.level<2?a=0:i.level<6?a=1:i.level===6?a=2:a=3,s|=a<<6,i.strstart!==0&&(s|=O6),s+=31-s%31,i.status=Rr,io(i,s),i.strstart!==0&&(io(i,e.adler>>>16),io(i,e.adler&65535)),e.adler=1}if(i.status===fc)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=ft(e.adler,i.pending_buf,i.pending-n,n)),ir(e),n=i.pending,i.pending===i.pending_buf_size));)$e(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=ft(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Vs)}else i.status=Vs;if(i.status===Vs)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=ft(e.adler,i.pending_buf,i.pending-n,n)),ir(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,$e(i,r)}while(r!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=ft(e.adler,i.pending_buf,i.pending-n,n)),r===0&&(i.gzindex=0,i.status=js)}else i.status=js;if(i.status===js)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=ft(e.adler,i.pending_buf,i.pending-n,n)),ir(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,$e(i,r)}while(r!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=ft(e.adler,i.pending_buf,i.pending-n,n)),r===0&&(i.status=zs)}else i.status=zs;if(i.status===zs&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ir(e),i.pending+2<=i.pending_buf_size&&($e(i,e.adler&255),$e(i,e.adler>>8&255),e.adler=0,i.status=Rr)):i.status=Rr),i.pending!==0){if(ir(e),e.avail_out===0)return i.last_flush=-1,kn}else if(e.avail_in===0&&gu(t)<=gu(o)&&t!==mr)return dr(e,yl);if(i.status===ao&&e.avail_in!==0)return dr(e,yl);if(e.avail_in!==0||i.lookahead!==0||t!==ei&&i.status!==ao){let s=i.strategy===_s?$6(i,t):i.strategy===v6?P6(i,t):lo[i.level].func(i,t);if((s===Zr||s===Zi)&&(i.status=ao),s===ct||s===Zr)return e.avail_out===0&&(i.last_flush=-1),kn;if(s===Qo&&(t===p6?h6(i):t!==pu&&(d6(i,0,0,!1),t===m6&&(cr(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),ir(e),e.avail_out===0))return i.last_flush=-1,kn}return t!==mr?kn:i.wrap<=0?mu:(i.wrap===2?($e(i,e.adler&255),$e(i,e.adler>>8&255),$e(i,e.adler>>16&255),$e(i,e.adler>>24&255),$e(i,e.total_in&255),$e(i,e.total_in>>8&255),$e(i,e.total_in>>16&255),$e(i,e.total_in>>24&255)):(io(i,e.adler>>>16),io(i,e.adler&65535)),ir(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?kn:mu)},U6=e=>{if(!e||!e.state)return Qt;const t=e.state.status;return t!==Pa&&t!==fc&&t!==Vs&&t!==js&&t!==zs&&t!==Rr&&t!==ao?dr(e,Qt):(e.state=null,t===Rr?dr(e,g6):kn)},Z6=(e,t)=>{let n=t.length;if(!e||!e.state)return Qt;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==Pa||r.lookahead)return Qt;if(i===1&&(e.adler=Oo(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(cr(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}const o=e.avail_in,s=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Gr(r);r.lookahead>=Ie;){let c=r.strstart,u=r.lookahead-(Ie-1);do r.ins_h=gr(r,r.ins_h,r.window[c+Ie-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--u);r.strstart=c,r.lookahead=Ie-1,Gr(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=Ie-1,r.match_available=0,e.next_in=s,e.input=a,e.avail_in=o,r.wrap=i,kn};var G6=z6,Y6=E2,W6=C2,q6=k2,X6=j6,K6=H6,J6=U6,Q6=Z6,e7="pako deflate (from Nodeca project)",wo={deflateInit:G6,deflateInit2:Y6,deflateReset:W6,deflateResetKeep:q6,deflateSetHeader:X6,deflate:K6,deflateEnd:J6,deflateSetDictionary:Q6,deflateInfo:e7};const t7=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n7=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)t7(n,r)&&(e[r]=n[r])}}return e},r7=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 s=e[r];n.set(s,i),i+=s.length}return n},$a={assign:n7,flattenChunks:r7};let A2=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{A2=!1}const No=new Uint8Array(256);for(let e=0;e<256;e++)No[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;No[254]=No[254]=1;var i7=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,s=e.length,a=0;for(i=0;i<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),o=0,i=0;o<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(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 o7=(e,t)=>{if(t<65534&&e.subarray&&A2)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 s7=(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 s=e[r++];if(s<128){o[i++]=s;continue}let a=No[s];if(a>4){o[i++]=65533,r+=a-1;continue}for(s&=a===2?31:a===3?15:7;a>1&&r<n;)s=s<<6|e[r++]&63,a--;if(a>1){o[i++]=65533;continue}s<65536?o[i++]=s:(s-=65536,o[i++]=55296|s>>10&1023,o[i++]=56320|s&1023)}return o7(o,i)},a7=(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+No[e[n]]>t?n:t},Ro={string2buf:i7,buf2string:s7,utf8border:a7};function l7(){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 S2=l7;const I2=Object.prototype.toString,{Z_NO_FLUSH:c7,Z_SYNC_FLUSH:u7,Z_FULL_FLUSH:d7,Z_FINISH:f7,Z_OK:sa,Z_STREAM_END:h7,Z_DEFAULT_COMPRESSION:p7,Z_DEFAULT_STRATEGY:m7,Z_DEFLATED:g7}=Qr;function es(e){this.options=$a.assign({level:p7,method:g7,chunkSize:16384,windowBits:15,memLevel:8,strategy:m7},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 S2,this.strm.avail_out=0;let n=wo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==sa)throw new Error(Ur[n]);if(t.header&&wo.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Ro.string2buf(t.dictionary):I2.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=wo.deflateSetDictionary(this.strm,r),n!==sa)throw new Error(Ur[n]);this._dict_set=!0}}es.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?f7:c7,typeof e=="string"?n.input=Ro.string2buf(e):I2.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===u7||o===d7)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=wo.deflate(n,o),i===h7)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=wo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===sa;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};es.prototype.onData=function(e){this.chunks.push(e)};es.prototype.onEnd=function(e){e===sa&&(this.result=$a.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function o0(e,t){const n=new es(t);if(n.push(e,!0),n.err)throw n.msg||Ur[n.err];return n.result}function _7(e,t){return t=t||{},t.raw=!0,o0(e,t)}function w7(e,t){return t=t||{},t.gzip=!0,o0(e,t)}var v7=es,x7=o0,b7=_7,y7=w7,k7=Qr,C7={Deflate:v7,deflate:x7,deflateRaw:b7,gzip:y7,constants:k7};const ws=30,E7=12;var A7=function(t,n){let r,i,o,s,a,c,u,l,d,f,h,w,_,m,g,v,b,x,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,s=o-(n-t.avail_out),a=o+(t.avail_out-257),c=T.dmax,u=T.wsize,l=T.whave,d=T.wnext,f=T.window,h=T.hold,w=T.bits,_=T.lencode,m=T.distcode,g=(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),b=_[h&g];t:for(;;){if(x=b>>>24,h>>>=x,w-=x,x=b>>>16&255,x===0)S[o++]=b&65535;else if(x&16){y=b&65535,x&=15,x&&(w<x&&(h+=M[r++]<<w,w+=8),y+=h&(1<<x)-1,h>>>=x,w-=x),w<15&&(h+=M[r++]<<w,w+=8,h+=M[r++]<<w,w+=8),b=m[h&v];n:for(;;){if(x=b>>>24,h>>>=x,w-=x,x=b>>>16&255,x&16){if(k=b&65535,x&=15,w<x&&(h+=M[r++]<<w,w+=8,w<x&&(h+=M[r++]<<w,w+=8)),k+=h&(1<<x)-1,k>c){t.msg="invalid distance too far back",T.mode=ws;break e}if(h>>>=x,w-=x,x=o-s,k>x){if(x=k-x,x>l&&T.sane){t.msg="invalid distance too far back",T.mode=ws;break e}if(C=0,E=f,d===0){if(C+=u-x,x<y){y-=x;do S[o++]=f[C++];while(--x);C=o-k,E=S}}else if(d<x){if(C+=u+d-x,x-=d,x<y){y-=x;do S[o++]=f[C++];while(--x);if(C=0,d<y){x=d,y-=x;do S[o++]=f[C++];while(--x);C=o-k,E=S}}}else if(C+=d-x,x<y){y-=x;do S[o++]=f[C++];while(--x);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((x&64)===0){b=m[(b&65535)+(h&(1<<x)-1)];continue n}else{t.msg="invalid distance code",T.mode=ws;break e}break}}else if((x&64)===0){b=_[(b&65535)+(h&(1<<x)-1)];continue t}else if(x&32){T.mode=E7;break e}else{t.msg="invalid literal/length code",T.mode=ws;break e}break}}while(r<i&&o<a);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<a?257+(a-o):257-(o-a),T.hold=h,T.bits=w};const ci=15,_u=852,wu=592,vu=0,Cl=1,xu=2,S7=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]),I7=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]),M7=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]),T7=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]),L7=(e,t,n,r,i,o,s,a)=>{const c=a.bits;let u=0,l=0,d=0,f=0,h=0,w=0,_=0,m=0,g=0,v=0,b,x,y,k,C,E=null,M=0,S;const T=new Uint16Array(ci+1),L=new Uint16Array(ci+1);let F=null,K=0,H,N,j;for(u=0;u<=ci;u++)T[u]=0;for(l=0;l<r;l++)T[t[n+l]]++;for(h=c,f=ci;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,a.bits=1,0;for(d=1;d<f&&T[d]===0;d++);for(h<d&&(h=d),m=1,u=1;u<=ci;u++)if(m<<=1,m-=T[u],m<0)return-1;if(m>0&&(e===vu||f!==1))return-1;for(L[1]=0,u=1;u<ci;u++)L[u+1]=L[u]+T[u];for(l=0;l<r;l++)t[n+l]!==0&&(s[L[t[n+l]]++]=l);if(e===vu?(E=F=s,S=19):e===Cl?(E=S7,M-=257,F=I7,K-=257,S=256):(E=M7,F=T7,S=-1),v=0,l=0,u=d,C=o,w=h,_=0,y=-1,g=1<<h,k=g-1,e===Cl&&g>_u||e===xu&&g>wu)return 1;for(;;){H=u-_,s[l]<S?(N=0,j=s[l]):s[l]>S?(N=F[K+s[l]],j=E[M+s[l]]):(N=32+64,j=0),b=1<<u-_,x=1<<w,d=x;do x-=b,i[C+(v>>_)+x]=H<<24|N<<16|j|0;while(x!==0);for(b=1<<u-1;v&b;)b>>=1;if(b!==0?(v&=b-1,v+=b):v=0,l++,--T[u]===0){if(u===f)break;u=t[n+s[l]]}if(u>h&&(v&k)!==y){for(_===0&&(_=h),C+=d,w=u-_,m=1<<w;w+_<f&&(m-=T[w+_],!(m<=0));)w++,m<<=1;if(g+=1<<w,e===Cl&&g>_u||e===xu&&g>wu)return 1;y=v&k,i[y]=h<<24|w<<16|C-o|0}}return v!==0&&(i[C+v]=u-_<<24|64<<16|0),a.bits=h,0};var vo=L7;const O7=0,M2=1,T2=2,{Z_FINISH:bu,Z_BLOCK:N7,Z_TREES:vs,Z_OK:Yr,Z_STREAM_END:R7,Z_NEED_DICT:D7,Z_STREAM_ERROR:en,Z_DATA_ERROR:L2,Z_MEM_ERROR:O2,Z_BUF_ERROR:F7,Z_DEFLATED:yu}=Qr,N2=1,ku=2,Cu=3,Eu=4,Au=5,Su=6,Iu=7,Mu=8,Tu=9,Lu=10,aa=11,Dn=12,El=13,Ou=14,Al=15,Nu=16,Ru=17,Du=18,Fu=19,xs=20,bs=21,Pu=22,$u=23,Bu=24,Vu=25,ju=26,Sl=27,zu=28,Hu=29,tt=30,R2=31,P7=32,$7=852,B7=592,V7=15,j7=V7,Uu=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function z7(){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 D2=e=>{if(!e||!e.state)return en;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=N2,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array($7),t.distcode=t.distdyn=new Int32Array(B7),t.sane=1,t.back=-1,Yr},F2=e=>{if(!e||!e.state)return en;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,D2(e)},P2=(e,t)=>{let n;if(!e||!e.state)return en;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?en:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,F2(e))},$2=(e,t)=>{if(!e)return en;const n=new z7;e.state=n,n.window=null;const r=P2(e,t);return r!==Yr&&(e.state=null),r},H7=e=>$2(e,j7);let Zu=!0,Il,Ml;const U7=e=>{if(Zu){Il=new Int32Array(512),Ml=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(vo(M2,e.lens,0,288,Il,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;vo(T2,e.lens,0,32,Ml,0,e.work,{bits:5}),Zu=!1}e.lencode=Il,e.lenbits=9,e.distcode=Ml,e.distbits=5},B2=(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},Z7=(e,t)=>{let n,r,i,o,s,a,c,u,l,d,f,h,w,_,m=0,g,v,b,x,y,k,C,E;const M=new Uint8Array(4);let S,T;const L=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 en;n=e.state,n.mode===Dn&&(n.mode=El),s=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,u=n.hold,l=n.bits,d=a,f=c,E=Yr;e:for(;;)switch(n.mode){case N2:if(n.wrap===0){n.mode=El;break}for(;l<16;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if(n.wrap&2&&u===35615){n.check=0,M[0]=u&255,M[1]=u>>>8&255,n.check=ft(n.check,M,2,0),u=0,l=0,n.mode=ku;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=tt;break}if((u&15)!==yu){e.msg="unknown compression method",n.mode=tt;break}if(u>>>=4,l-=4,C=(u&15)+8,n.wbits===0)n.wbits=C;else if(C>n.wbits){e.msg="invalid window size",n.mode=tt;break}n.dmax=1<<n.wbits,e.adler=n.check=1,n.mode=u&512?Lu:Dn,u=0,l=0;break;case ku:for(;l<16;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if(n.flags=u,(n.flags&255)!==yu){e.msg="unknown compression method",n.mode=tt;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=tt;break}n.head&&(n.head.text=u>>8&1),n.flags&512&&(M[0]=u&255,M[1]=u>>>8&255,n.check=ft(n.check,M,2,0)),u=0,l=0,n.mode=Cu;case Cu:for(;l<32;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}n.head&&(n.head.time=u),n.flags&512&&(M[0]=u&255,M[1]=u>>>8&255,M[2]=u>>>16&255,M[3]=u>>>24&255,n.check=ft(n.check,M,4,0)),u=0,l=0,n.mode=Eu;case Eu:for(;l<16;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}n.head&&(n.head.xflags=u&255,n.head.os=u>>8),n.flags&512&&(M[0]=u&255,M[1]=u>>>8&255,n.check=ft(n.check,M,2,0)),u=0,l=0,n.mode=Au;case Au:if(n.flags&1024){for(;l<16;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}n.length=u,n.head&&(n.head.extra_len=u),n.flags&512&&(M[0]=u&255,M[1]=u>>>8&255,n.check=ft(n.check,M,2,0)),u=0,l=0}else n.head&&(n.head.extra=null);n.mode=Su;case Su:if(n.flags&1024&&(h=n.length,h>a&&(h=a),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=ft(n.check,r,h,o)),a-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=Iu;case Iu:if(n.flags&2048){if(a===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<a);if(n.flags&512&&(n.check=ft(n.check,r,h,o)),a-=h,o+=h,C)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Mu;case Mu:if(n.flags&4096){if(a===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<a);if(n.flags&512&&(n.check=ft(n.check,r,h,o)),a-=h,o+=h,C)break e}else n.head&&(n.head.comment=null);n.mode=Tu;case Tu:if(n.flags&512){for(;l<16;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if(u!==(n.check&65535)){e.msg="header crc mismatch",n.mode=tt;break}u=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Dn;break;case Lu:for(;l<32;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}e.adler=n.check=Uu(u),u=0,l=0,n.mode=aa;case aa:if(n.havedict===0)return e.next_out=s,e.avail_out=c,e.next_in=o,e.avail_in=a,n.hold=u,n.bits=l,D7;e.adler=n.check=1,n.mode=Dn;case Dn:if(t===N7||t===vs)break e;case El:if(n.last){u>>>=l&7,l-=l&7,n.mode=Sl;break}for(;l<3;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}switch(n.last=u&1,u>>>=1,l-=1,u&3){case 0:n.mode=Ou;break;case 1:if(U7(n),n.mode=xs,t===vs){u>>>=2,l-=2;break e}break;case 2:n.mode=Ru;break;case 3:e.msg="invalid block type",n.mode=tt}u>>>=2,l-=2;break;case Ou:for(u>>>=l&7,l-=l&7;l<32;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=tt;break}if(n.length=u&65535,u=0,l=0,n.mode=Al,t===vs)break e;case Al:n.mode=Nu;case Nu:if(h=n.length,h){if(h>a&&(h=a),h>c&&(h=c),h===0)break e;i.set(r.subarray(o,o+h),s),a-=h,o+=h,c-=h,s+=h,n.length-=h;break}n.mode=Dn;break;case Ru:for(;l<14;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if(n.nlen=(u&31)+257,u>>>=5,l-=5,n.ndist=(u&31)+1,u>>>=5,l-=5,n.ncode=(u&15)+4,u>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=tt;break}n.have=0,n.mode=Du;case Du:for(;n.have<n.ncode;){for(;l<3;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}n.lens[L[n.have++]]=u&7,u>>>=3,l-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},E=vo(O7,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,E){e.msg="invalid code lengths set",n.mode=tt;break}n.have=0,n.mode=Fu;case Fu:for(;n.have<n.nlen+n.ndist;){for(;m=n.lencode[u&(1<<n.lenbits)-1],g=m>>>24,v=m>>>16&255,b=m&65535,!(g<=l);){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if(b<16)u>>>=g,l-=g,n.lens[n.have++]=b;else{if(b===16){for(T=g+2;l<T;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if(u>>>=g,l-=g,n.have===0){e.msg="invalid bit length repeat",n.mode=tt;break}C=n.lens[n.have-1],h=3+(u&3),u>>>=2,l-=2}else if(b===17){for(T=g+3;l<T;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}u>>>=g,l-=g,C=0,h=3+(u&7),u>>>=3,l-=3}else{for(T=g+7;l<T;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}u>>>=g,l-=g,C=0,h=11+(u&127),u>>>=7,l-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=tt;break}for(;h--;)n.lens[n.have++]=C}}if(n.mode===tt)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=tt;break}if(n.lenbits=9,S={bits:n.lenbits},E=vo(M2,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,E){e.msg="invalid literal/lengths set",n.mode=tt;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},E=vo(T2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,E){e.msg="invalid distances set",n.mode=tt;break}if(n.mode=xs,t===vs)break e;case xs:n.mode=bs;case bs:if(a>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=o,e.avail_in=a,n.hold=u,n.bits=l,A7(e,f),s=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,u=n.hold,l=n.bits,n.mode===Dn&&(n.back=-1);break}for(n.back=0;m=n.lencode[u&(1<<n.lenbits)-1],g=m>>>24,v=m>>>16&255,b=m&65535,!(g<=l);){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if(v&&(v&240)===0){for(x=g,y=v,k=b;m=n.lencode[k+((u&(1<<x+y)-1)>>x)],g=m>>>24,v=m>>>16&255,b=m&65535,!(x+g<=l);){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}u>>>=x,l-=x,n.back+=x}if(u>>>=g,l-=g,n.back+=g,n.length=b,v===0){n.mode=ju;break}if(v&32){n.back=-1,n.mode=Dn;break}if(v&64){e.msg="invalid literal/length code",n.mode=tt;break}n.extra=v&15,n.mode=Pu;case Pu:if(n.extra){for(T=n.extra;l<T;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=$u;case $u:for(;m=n.distcode[u&(1<<n.distbits)-1],g=m>>>24,v=m>>>16&255,b=m&65535,!(g<=l);){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if((v&240)===0){for(x=g,y=v,k=b;m=n.distcode[k+((u&(1<<x+y)-1)>>x)],g=m>>>24,v=m>>>16&255,b=m&65535,!(x+g<=l);){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}u>>>=x,l-=x,n.back+=x}if(u>>>=g,l-=g,n.back+=g,v&64){e.msg="invalid distance code",n.mode=tt;break}n.offset=b,n.extra=v&15,n.mode=Bu;case Bu:if(n.extra){for(T=n.extra;l<T;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=tt;break}n.mode=Vu;case Vu:if(c===0)break e;if(h=f-c,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=tt;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=s-n.offset,h=n.length;h>c&&(h=c),c-=h,n.length-=h;do i[s++]=_[w++];while(--h);n.length===0&&(n.mode=bs);break;case ju:if(c===0)break e;i[s++]=n.length,c--,n.mode=bs;break;case Sl:if(n.wrap){for(;l<32;){if(a===0)break e;a--,u|=r[o++]<<l,l+=8}if(f-=c,e.total_out+=f,n.total+=f,f&&(e.adler=n.check=n.flags?ft(n.check,i,f,s-f):Oo(n.check,i,f,s-f)),f=c,(n.flags?u:Uu(u))!==n.check){e.msg="incorrect data check",n.mode=tt;break}u=0,l=0}n.mode=zu;case zu:if(n.wrap&&n.flags){for(;l<32;){if(a===0)break e;a--,u+=r[o++]<<l,l+=8}if(u!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=tt;break}u=0,l=0}n.mode=Hu;case Hu:E=R7;break e;case tt:E=L2;break e;case R2:return O2;case P7:default:return en}return e.next_out=s,e.avail_out=c,e.next_in=o,e.avail_in=a,n.hold=u,n.bits=l,(n.wsize||f!==e.avail_out&&n.mode<tt&&(n.mode<Sl||t!==bu))&&B2(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&&f&&(e.adler=n.check=n.flags?ft(n.check,i,f,e.next_out-f):Oo(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Dn?128:0)+(n.mode===xs||n.mode===Al?256:0),(d===0&&f===0||t===bu)&&E===Yr&&(E=F7),E},G7=e=>{if(!e||!e.state)return en;let t=e.state;return t.window&&(t.window=null),e.state=null,Yr},Y7=(e,t)=>{if(!e||!e.state)return en;const n=e.state;return(n.wrap&2)===0?en:(n.head=t,t.done=!1,Yr)},W7=(e,t)=>{const n=t.length;let r,i,o;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==aa)?en:r.mode===aa&&(i=1,i=Oo(i,t,n,0),i!==r.check)?L2:(o=B2(e,t,n,n),o?(r.mode=R2,O2):(r.havedict=1,Yr))};var q7=F2,X7=P2,K7=D2,J7=H7,Q7=$2,e4=Z7,t4=G7,n4=Y7,r4=W7,i4="pako inflate (from Nodeca project)",Vn={inflateReset:q7,inflateReset2:X7,inflateResetKeep:K7,inflateInit:J7,inflateInit2:Q7,inflate:e4,inflateEnd:t4,inflateGetHeader:n4,inflateSetDictionary:r4,inflateInfo:i4};function o4(){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 s4=o4;const V2=Object.prototype.toString,{Z_NO_FLUSH:a4,Z_FINISH:l4,Z_OK:Do,Z_STREAM_END:Tl,Z_NEED_DICT:Ll,Z_STREAM_ERROR:c4,Z_DATA_ERROR:Gu,Z_MEM_ERROR:u4}=Qr;function ts(e){this.options=$a.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 S2,this.strm.avail_out=0;let n=Vn.inflateInit2(this.strm,t.windowBits);if(n!==Do)throw new Error(Ur[n]);if(this.header=new s4,Vn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Ro.string2buf(t.dictionary):V2.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Vn.inflateSetDictionary(this.strm,t.dictionary),n!==Do)))throw new Error(Ur[n])}ts.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,s,a;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?l4:a4,V2.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=Vn.inflate(n,s),o===Ll&&i&&(o=Vn.inflateSetDictionary(n,i),o===Do?o=Vn.inflate(n,s):o===Gu&&(o=Ll));n.avail_in>0&&o===Tl&&n.state.wrap>0&&e[n.next_in]!==0;)Vn.inflateReset(n),o=Vn.inflate(n,s);switch(o){case c4:case Gu:case Ll:case u4:return this.onEnd(o),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||o===Tl))if(this.options.to==="string"){let c=Ro.utf8border(n.output,n.next_out),u=n.next_out-c,l=Ro.buf2string(n.output,c);n.next_out=u,n.avail_out=r-u,u&&n.output.set(n.output.subarray(c,c+u),0),this.onData(l)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===Do&&a===0)){if(o===Tl)return o=Vn.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};ts.prototype.onData=function(e){this.chunks.push(e)};ts.prototype.onEnd=function(e){e===Do&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=$a.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function s0(e,t){const n=new ts(t);if(n.push(e),n.err)throw n.msg||Ur[n.err];return n.result}function d4(e,t){return t=t||{},t.raw=!0,s0(e,t)}var f4=ts,h4=s0,p4=d4,m4=s0,g4=Qr,_4={Inflate:f4,inflate:h4,inflateRaw:p4,ungzip:m4,constants:g4};const{Deflate:w4,deflate:v4,deflateRaw:x4,gzip:b4}=C7,{Inflate:y4,inflate:k4,inflateRaw:C4,ungzip:E4}=_4;var A4=w4,S4=v4,I4=x4,M4=b4,T4=y4,L4=k4,O4=C4,N4=E4,R4=Qr,nb={Deflate:A4,deflate:S4,deflateRaw:I4,gzip:M4,Inflate:T4,inflate:L4,inflateRaw:O4,ungzip:N4,constants:R4};function Mi(e,t,n){if(!e[t])throw new Error(`Missing ${t} tag`);if(e[t].type!==n)throw new Error(`Expected ${t} to be of type ${n}, but found ${e[t].type}`);return e[t].value}function ys(e,t,n,r){const i=Mi(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 j2(e,t){try{return e()}catch{return t}}var W;(function(e){function t(l){return typeof l=="number"?l:void 0}e.readNumber=t;function n(l){return typeof l=="number"?Math.floor(l):void 0}e.readInt=n;function r(l){return typeof l=="string"?l:void 0}e.readString=r;function i(l){return typeof l=="boolean"?l:void 0}e.readBoolean=i;function o(l){return typeof l=="object"&&l!==null?l:void 0}e.readObject=o;function s(l,d){if(!!Array.isArray(l))return l.map(f=>d(f))}e.readArray=s;function a(l,d){var h;const f=(h=o(l))!=null?h:{};return Object.fromEntries(Object.entries(f).map(([w,_])=>[w,d(_)]))}e.readMap=a;function c(l,d,f){const h=d(l);return h?f(h):void 0}e.compose=c;function u(l,d){return typeof l!="string"?d[0]:d.includes(l)?l:d[0]}e.readEnum=u})(W||(W={}));function xo(e){let t=null;return()=>(t==null&&(t=e()),t)}function Wr(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}const sr=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}${sr.SEPARATOR}${n}`);if(!n.match(/^[a-z0-9/._-]*$/))throw new Error(`Non [a-z0-9/._-] character in path of ${t}${sr.SEPARATOR}${n}`)}equals(t){return this===t?!0:this.namespace===t.namespace&&this.path===t.path}toString(){return this.namespace+sr.SEPARATOR+this.path}static create(t){return new sr(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 sr(r,i)}return new sr(this.DEFAULT_NAMESPACE,t)}};let Ce=sr;I(Ce,"DEFAULT_NAMESPACE","minecraft"),I(Ce,"SEPARATOR",":");const sn=class{constructor(t,n={}){I(this,"properties");I(this,"name");this.properties=n,this.name=typeof t=="string"?Ce.parse(t):t}getName(){return this.name}getProperties(){return this.properties}getProperty(t){return this.properties[t]}isFluid(){return this.is(sn.WATER)||this.is(sn.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=Ce.parse(Mi(t.value,"Name","string")),r=j2(()=>Mi(t.value,"Properties","compound"),{}),i=Object.keys(r).reduce((o,s)=>Ne(he({},o),{[s]:Mi(r,s,"string")}),{});return new sn(n,i)}static fromJson(t){var o,s;const n=(o=W.readObject(t))!=null?o:{},r=Ce.parse((s=W.readString(n.Name))!=null?s:sn.STONE.name.toString()),i=W.readMap(n.Properties,a=>{var c;return(c=W.readString(a))!=null?c:""});return new sn(r,i)}};let Be=sn;I(Be,"AIR",new sn(Ce.create("air"))),I(Be,"STONE",new sn(Ce.create("stone"))),I(Be,"WATER",new sn(Ce.create("water"),{level:"0"})),I(Be,"LAVA",new sn(Ce.create("lava"),{level:"0"}));class z2{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(s=>s.equals(i));o===-1&&(o=this.palette.length,this.palette.push(i)),this.storage[this.index(t,n,r)]=o}}const yi=class{constructor(t){I(this,"minY");I(this,"states");this.minY=t,this.states=new z2(yi.SIZE,Be.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 xi=yi;I(xi,"WIDTH",16),I(xi,"SIZE",yi.WIDTH*yi.WIDTH*yi.WIDTH);class D4{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 s;const[n,r,i]=t,o=this.sections[this.getSectionIndex(r)];return(s=o==null?void 0:o.getBlockState(n&15,r&15,i&15))!=null?s:Be.AIR}setBlockState(t,n){const[r,i,o]=t,s=this.getSectionIndex(i);let a=this.sections[s];if(a===null){if(n.equals(Be.AIR))return;a=this.getOrCreateSection(s)}a.setBlockState(r&15,i&15,o&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new xi(this.minSection+t)),this.sections[t]}}var St;(function(e){function t(l,d){return[l,d]}e.create=t;function n(l){return[l[0]>>4,l[2]>>4]}e.fromBlockPos=n;function r(l){return[Number(l)&4294967295,Number(l>>BigInt(32))]}e.fromLong=r;function i(l){return o(l[0],l[1])}e.toLong=i;function o(l,d){return BigInt(l&4294967295)|BigInt(d&4294967295)<<BigInt(32)}e.asLong=o;function s(l){return l[0]<<4}e.minBlockX=s;function a(l){return l[1]<<4}e.minBlockZ=a;function c(l){return(l[0]<<4)+15}e.maxBlockX=c;function u(l){return(l[1]<<4)+15}e.maxBlockZ=u})(St||(St={}));var qr;(function(e){function t(i,o){return s=>typeof s=="string"?r(i,Ce.parse(s)):n(o(s))}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})(qr||(qr={}));const ba=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),qr.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=>Ce.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 ba(this.key,this.parser)}forEach(t){for(const[n,r]of this.storage.entries())t(Ce.parse(n),r,this)}map(t){return[...this.storage.entries()].map(([n,r])=>t(Ce.parse(n),r,this))}};let $r=ba;I($r,"REGISTRY",new ba(Ce.create("root")));class a0{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 Be(n,r);let s=this.palette.findIndex(a=>a.equals(o));return s===-1&&(s=this.palette.length,this.palette.push(o)),this.blocks.push({pos:t,state:s,nbt:i}),this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]]={pos:t,state:s,nbt:i},this}getBlocks(){return this.blocks.map(t=>({pos:t.pos,state:this.palette[t.state],nbt:t.nbt}))}getBlock(t){if(!this.isInside(t))return null;const n=this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]];return n?{pos:n.pos,state:this.palette[n.state],nbt:n.nbt}:null}isInside(t){return t[0]>=0&&t[0]<this.size[0]&&t[1]>=0&&t[1]<this.size[1]&&t[2]>=0&&t[2]<this.size[2]}static fromNbt(t){const n=ys(t.value,"size","int",3),r=ys(t.value,"palette","compound").map(o=>Be.fromNbt({name:"",value:o})),i=ys(t.value,"blocks","compound").map(o=>{const s=ys(o,"pos","int",3),a=Mi(o,"state","int"),c=j2(()=>Mi(o,"nbt","compound"),void 0);return{pos:s,state:a,nbt:c}});return new a0(n,r,i)}}function Fn(e){return e*e}function bi(e,t,n){return Math.max(t,Math.min(n,e))}function Gn(e,t,n){return t+e*(n-t)}function la(e,t,n,r,i,o){return Gn(t,Gn(e,n,r),Gn(e,i,o))}function H2(e,t,n,r,i,o,s,a,c,u,l){return Gn(n,la(e,t,r,i,o,s),la(e,t,a,c,u,l))}function bo(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function hc(e,t,n,r,i,o){return bo(t,()=>bo(e,n,r),()=>bo(e,i,o))}function U2(e,t,n,r,i,o,s,a,c,u,l){return bo(n,()=>hc(e,t,r,i,o,s),()=>hc(e,t,a,c,u,l))}function Ba(e,t,n){return n<0?e:n>1?t:Gn(n,e,t)}function l0(e,t,n){return(e-t)/(n-t)}function Hs(e){return e*e*e*(e*(e*6-15)+10)}function Fo(e,t,n,r,i){return Gn(l0(e,t,n),r,i)}function Va(e,t,n,r,i){return Ba(r,i,l0(e,t,n))}function Z2(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 c0(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 ca(e,t,n,r,i,o,s,a){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(o)<<BigInt(16)|BigInt(s)<<BigInt(8)|BigInt(a)}function F4(e){return(e&e-1)===0}function P4(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 ua;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(ua||(ua={}));var da;(function(e){function t(i,o){var u,l,d,f;if(typeof i=="number")return new n(i);const s=(u=W.readObject(i))!=null?u:{},a=new r(o(s.coordinate)),c=(l=W.readArray(s.points,h=>{var w;return(w=W.readObject(h))!=null?w:{}}))!=null?l:[];if(c.length===0)return new n(0);for(const h of c){const w=(d=W.readNumber(h.location))!=null?d:0,_=t(h.value,o),m=(f=W.readNumber(h.derivative))!=null?f:0;a.addPoint(w,_,m)}return a}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,s=[],a=[],c=[]){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=s,this.values=a,this.derivatives=c}compute(o){const s=this.coordinate.compute(o),a=Z2(0,this.locations.length,b=>s<this.locations[b])-1,c=this.locations.length-1;if(a<0)return this.values[0].compute(o)+this.derivatives[0]*(s-this.locations[0]);if(a===c)return this.values[c].compute(o)+this.derivatives[c]*(s-this.locations[c]);const u=this.locations[a],l=this.locations[a+1],d=this.derivatives[a],f=this.derivatives[a+1],h=(s-u)/(l-u),w=this.values[a].compute(o),_=this.values[a+1].compute(o),m=d*(l-u)-(_-w),g=-f*(l-u)+(_-w);return Gn(h,w,_)+h*(1-h)*Gn(h,m,g)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(o){return new r(o(this.coordinate),this.locations,this.values.map(s=>s.mapAll(o)),this.derivatives)}addPoint(o,s,a=0){return this.locations.push(o),this.values.push(typeof s=="number"?new e.Constant(s):s),this.derivatives.push(a),this}calculateMinMax(){if(!ua.is(this.coordinate))return;const o=this.locations.length-1;var s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const c=this.coordinate.minValue(),u=this.coordinate.maxValue();for(const d of this.values)d.calculateMinMax();if(c<this.locations[0]){const d=r.linearExtend(c,this.locations,this.values[0].min(),this.derivatives,0),f=r.linearExtend(c,this.locations,this.values[0].max(),this.derivatives,0);s=Math.min(s,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}if(u>this.locations[o]){const d=r.linearExtend(u,this.locations,this.values[o].min(),this.derivatives,o),f=r.linearExtend(u,this.locations,this.values[o].max(),this.derivatives,o);s=Math.min(s,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}for(const d of this.values)s=Math.min(s,d.min()),a=Math.max(a,d.max());for(var l=0;l<o;++l){const d=this.locations[l],h=this.locations[l+1]-d,w=this.values[l],_=this.values[l+1],m=w.min(),g=w.max(),v=_.min(),b=_.max(),x=this.derivatives[l],y=this.derivatives[l+1];if(x!==0||y!==0){const k=x*h,C=y*h,E=Math.min(m,v),M=Math.max(g,b),S=k-b+m,T=k-v+g,L=-C+v-g,F=-C+b-m,K=Math.min(S,L),H=Math.max(T,F);s=Math.min(s,E+.25*K),a=Math.max(a,M+.25*H)}}this.calculatedMin=s,this.calculatedMax=a}static linearExtend(o,s,a,c,u){const l=c[u];return l==0?a:a+l*(o-s[u])}}e.MultiPoint=r})(da||(da={}));var G2={exports:{}},Y2={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,o=0;i<n.length;i++,o+=8)r[o>>>5]|=n[i]<<24-o%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i<n.length*32;i+=8)r.push(n[i>>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i<n.length;i++)r.push((n[i]>>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substr(i,2),16));return r},bytesToBase64:function(n){for(var r=[],i=0;i<n.length;i+=3)for(var o=n[i]<<16|n[i+1]<<8|n[i+2],s=0;s<4;s++)i*8+s*6<=n.length*8?r.push(e.charAt(o>>>6*(3-s)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,o=0;i<n.length;o=++i%4)o!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*o+8)-1)<<o*2|e.indexOf(n.charAt(i))>>>6-o*2);return r}};Y2.exports=t})();var pc={utf8:{stringToBytes:function(e){return pc.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(pc.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("")}}},Yu=pc;/*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/var $4=function(e){return e!=null&&(W2(e)||B4(e)||!!e._isBuffer)};function W2(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function B4(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&W2(e.slice(0,0))}(function(){var e=Y2.exports,t=Yu.utf8,n=$4,r=Yu.bin,i=function(o,s){o.constructor==String?s&&s.encoding==="binary"?o=r.stringToBytes(o):o=t.stringToBytes(o):n(o)?o=Array.prototype.slice.call(o,0):!Array.isArray(o)&&o.constructor!==Uint8Array&&(o=o.toString());for(var a=e.bytesToWords(o),c=o.length*8,u=1732584193,l=-271733879,d=-1732584194,f=271733878,h=0;h<a.length;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[c>>>5]|=128<<c%32,a[(c+64>>>9<<4)+14]=c;for(var w=i._ff,_=i._gg,m=i._hh,g=i._ii,h=0;h<a.length;h+=16){var v=u,b=l,x=d,y=f;u=w(u,l,d,f,a[h+0],7,-680876936),f=w(f,u,l,d,a[h+1],12,-389564586),d=w(d,f,u,l,a[h+2],17,606105819),l=w(l,d,f,u,a[h+3],22,-1044525330),u=w(u,l,d,f,a[h+4],7,-176418897),f=w(f,u,l,d,a[h+5],12,1200080426),d=w(d,f,u,l,a[h+6],17,-1473231341),l=w(l,d,f,u,a[h+7],22,-45705983),u=w(u,l,d,f,a[h+8],7,1770035416),f=w(f,u,l,d,a[h+9],12,-1958414417),d=w(d,f,u,l,a[h+10],17,-42063),l=w(l,d,f,u,a[h+11],22,-1990404162),u=w(u,l,d,f,a[h+12],7,1804603682),f=w(f,u,l,d,a[h+13],12,-40341101),d=w(d,f,u,l,a[h+14],17,-1502002290),l=w(l,d,f,u,a[h+15],22,1236535329),u=_(u,l,d,f,a[h+1],5,-165796510),f=_(f,u,l,d,a[h+6],9,-1069501632),d=_(d,f,u,l,a[h+11],14,643717713),l=_(l,d,f,u,a[h+0],20,-373897302),u=_(u,l,d,f,a[h+5],5,-701558691),f=_(f,u,l,d,a[h+10],9,38016083),d=_(d,f,u,l,a[h+15],14,-660478335),l=_(l,d,f,u,a[h+4],20,-405537848),u=_(u,l,d,f,a[h+9],5,568446438),f=_(f,u,l,d,a[h+14],9,-1019803690),d=_(d,f,u,l,a[h+3],14,-187363961),l=_(l,d,f,u,a[h+8],20,1163531501),u=_(u,l,d,f,a[h+13],5,-1444681467),f=_(f,u,l,d,a[h+2],9,-51403784),d=_(d,f,u,l,a[h+7],14,1735328473),l=_(l,d,f,u,a[h+12],20,-1926607734),u=m(u,l,d,f,a[h+5],4,-378558),f=m(f,u,l,d,a[h+8],11,-2022574463),d=m(d,f,u,l,a[h+11],16,1839030562),l=m(l,d,f,u,a[h+14],23,-35309556),u=m(u,l,d,f,a[h+1],4,-1530992060),f=m(f,u,l,d,a[h+4],11,1272893353),d=m(d,f,u,l,a[h+7],16,-155497632),l=m(l,d,f,u,a[h+10],23,-1094730640),u=m(u,l,d,f,a[h+13],4,681279174),f=m(f,u,l,d,a[h+0],11,-358537222),d=m(d,f,u,l,a[h+3],16,-722521979),l=m(l,d,f,u,a[h+6],23,76029189),u=m(u,l,d,f,a[h+9],4,-640364487),f=m(f,u,l,d,a[h+12],11,-421815835),d=m(d,f,u,l,a[h+15],16,530742520),l=m(l,d,f,u,a[h+2],23,-995338651),u=g(u,l,d,f,a[h+0],6,-198630844),f=g(f,u,l,d,a[h+7],10,1126891415),d=g(d,f,u,l,a[h+14],15,-1416354905),l=g(l,d,f,u,a[h+5],21,-57434055),u=g(u,l,d,f,a[h+12],6,1700485571),f=g(f,u,l,d,a[h+3],10,-1894986606),d=g(d,f,u,l,a[h+10],15,-1051523),l=g(l,d,f,u,a[h+1],21,-2054922799),u=g(u,l,d,f,a[h+8],6,1873313359),f=g(f,u,l,d,a[h+15],10,-30611744),d=g(d,f,u,l,a[h+6],15,-1560198380),l=g(l,d,f,u,a[h+13],21,1309151649),u=g(u,l,d,f,a[h+4],6,-145523070),f=g(f,u,l,d,a[h+11],10,-1120210379),d=g(d,f,u,l,a[h+2],15,718787259),l=g(l,d,f,u,a[h+9],21,-343485551),u=u+v>>>0,l=l+b>>>0,d=d+x>>>0,f=f+y>>>0}return e.endian([u,l,d,f])};i._ff=function(o,s,a,c,u,l,d){var f=o+(s&a|~s&c)+(u>>>0)+d;return(f<<l|f>>>32-l)+s},i._gg=function(o,s,a,c,u,l,d){var f=o+(s&c|a&~c)+(u>>>0)+d;return(f<<l|f>>>32-l)+s},i._hh=function(o,s,a,c,u,l,d){var f=o+(s^a^c)+(u>>>0)+d;return(f<<l|f>>>32-l)+s},i._ii=function(o,s,a,c,u,l,d){var f=o+(a^(s|~c))+(u>>>0)+d;return(f<<l|f>>>32-l)+s},i._blocksize=16,i._digestsize=16,G2.exports=function(o,s){if(o==null)throw new Error("Illegal argument "+o);var a=e.wordsToBytes(i(o,s));return s&&s.asBytes?a:s&&s.asString?r.bytesToString(a):e.bytesToHex(a)}})();var q2=G2.exports;const an=class{constructor(t){I(this,"seed",BigInt(0));this.setSeed(t)}fork(){return new an(this.nextLong())}forkPositional(){return new X2(this.nextLong())}setSeed(t){this.seed=t^an.MULTIPLIER&an.MODULUS_MASK}advance(){this.seed=this.seed*an.MULTIPLIER+an.INCREMENT&an.MODULUS_MASK}consume(t){for(let n=0;n<t;n+=1)this.advance()}next(t){this.advance();const n=Number(this.seed>>BigInt(an.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)*an.FLOAT_MULTIPLIER}nextDouble(){const t=this.next(30);return this.advance(),t*an.DOUBLE_MULTIPLIER}};let vt=an;I(vt,"MODULUS_BITS",48),I(vt,"MODULUS_MASK",BigInt("281474976710655")),I(vt,"MULTIPLIER",BigInt("25214903917")),I(vt,"INCREMENT",BigInt("11")),I(vt,"FLOAT_MULTIPLIER",1/Math.pow(2,24)),I(vt,"DOUBLE_MULTIPLIER",1/Math.pow(2,30));class X2{constructor(t){I(this,"seed");this.seed=t}at(t,n,r){const i=c0(t,n,r);return new vt(i^this.seed)}fromHashOf(t){const n=q2(t,{asBytes:!0}),r=ca(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new vt(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 K2(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 a=((~r&we.MAX_UINT)+we.BIGINT_1)%r;for(;o<a;)n=this.next()&we.MAX_UINT,i=n*r,o=i&we.MAX_UINT}const s=i>>we.BIGINT_32;return Number(s)}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 Ze=we;I(Ze,"SILVER_RATIO_64",BigInt("7640891576956012809")),I(Ze,"GOLDEN_RATIO_64",BigInt("-7046029254386353131")),I(Ze,"FLOAT_MULTIPLIER",1/Math.pow(2,24)),I(Ze,"DOUBLE_MULTIPLIER",11102230246251565e-32),I(Ze,"BIGINT_1",BigInt(1)),I(Ze,"BIGINT_17",BigInt(17)),I(Ze,"BIGINT_21",BigInt(21)),I(Ze,"BIGINT_27",BigInt(27)),I(Ze,"BIGINT_28",BigInt(28)),I(Ze,"BIGINT_30",BigInt(30)),I(Ze,"BIGINT_31",BigInt(31)),I(Ze,"BIGINT_32",BigInt(32)),I(Ze,"BIGINT_49",BigInt(49)),I(Ze,"BIGINT_64",BigInt(64)),I(Ze,"STAFFORD_1",BigInt("-4658895280553007687")),I(Ze,"STAFFORD_2",BigInt("-7723592293110705685")),I(Ze,"MAX_ULONG",BigInt("0xFFFFFFFFFFFFFFFF")),I(Ze,"POW2_60",BigInt("0x10000000000000000")),I(Ze,"POW2_63",BigInt("0x8000000000000000")),I(Ze,"MAX_UINT",BigInt(4294967295));class K2{constructor(t,n){I(this,"seedLo");I(this,"seedHi");this.seedLo=t,this.seedHi=n}at(t,n,r){const o=c0(t,n,r)^this.seedLo;return new Ze([o,this.seedHi])}fromHashOf(t){const n=q2(t,{asBytes:!0}),r=ca(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=ca(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new Ze([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const xn=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 s=(t+n)*xn.F2,a=Math.floor(t+s),c=a-(r=(a+(i=Math.floor(n+s)))*xn.G2),u=t-c;let l,d;u>(o=n-(i-r))?(l=1,d=0):(l=0,d=1);const f=u-l+xn.G2,h=o-d+xn.G2,w=u-1+2*xn.G2,_=o-1+2*xn.G2,m=a&255,g=i&255,v=this.P(m+this.P(g))%12,b=this.P(m+l+this.P(g+d))%12,x=this.P(m+1+this.P(g+1))%12,y=this.getCornerNoise3D(v,u,o,0,.5),k=this.getCornerNoise3D(b,f,h,0,.5),C=this.getCornerNoise3D(x,w,_,0,.5);return 70*(y+k+C)}sample(t,n,r){const i=(t+n+r)*.3333333333333333,o=Math.floor(t+i),s=Math.floor(n+i),a=Math.floor(r+i),c=(o+s+a)*.16666666666666666,u=t-(o-c),l=n-(s-c),d=r-(a-c);let f,h,w,_,m,g;u>=l?l>=d?(f=1,h=0,w=0,_=1,m=1,g=0):u>=d?(f=1,h=0,w=0,_=1,m=0,g=1):(f=0,h=0,w=1,_=1,m=0,g=1):l<d?(f=0,h=0,w=1,_=0,m=1,g=1):u<d?(f=0,h=1,w=0,_=0,m=1,g=1):(f=0,h=1,w=0,_=1,m=1,g=0);const v=u-f+.16666666666666666,b=l-h+.16666666666666666,x=d-w+.16666666666666666,y=u-_+.3333333333333333,k=l-m+.3333333333333333,C=d-g+.3333333333333333,E=u-.5,M=l-.5,S=d-.5,T=o&255,L=s&255,F=a&255,K=this.P(T+this.P(L+this.P(F)))%12,H=this.P(T+f+this.P(L+h+this.P(F+w)))%12,N=this.P(T+_+this.P(L+m+this.P(F+g)))%12,j=this.P(T+1+this.P(L+1+this.P(F+1)))%12,Z=this.getCornerNoise3D(K,u,l,d,.6),ee=this.getCornerNoise3D(H,v,b,x,.6),R=this.getCornerNoise3D(N,y,k,C,.6),A=this.getCornerNoise3D(j,E,M,S,.6);return 32*(Z+ee+R+A)}P(t){return this.p[t&255]}getCornerNoise3D(t,n,r,i,o){let s,a=o-n*n-r*r-i*i;return a<0?s=0:(a*=a,s=a*a*xn.gradDot(t,n,r,i)),s}static gradDot(t,n,r,i){const o=xn.GRADIENT[t&15];return o[0]*n+o[1]*r+o[2]*i}};let xt=xn;I(xt,"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(xt,"F2",.5*(Math.sqrt(3)-1)),I(xt,"G2",(3-Math.sqrt(3))/6);class mc{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 s=t+this.xo,a=n+this.yo,c=r+this.zo,u=Math.floor(s),l=Math.floor(a),d=Math.floor(c),f=s-u,h=a-l,w=c-d;let _=0;if(i!==0){const m=o>=0&&o<h?o:h;_=Math.floor(m/i+1e-7)*i}return this.sampleAndLerp(u,l,d,f,h-_,w,h)}sampleAndLerp(t,n,r,i,o,s,a){const c=this.P(t),u=this.P(t+1),l=this.P(c+n),d=this.P(c+n+1),f=this.P(u+n),h=this.P(u+n+1),w=xt.gradDot(this.P(l+r),i,o,s),_=xt.gradDot(this.P(f+r),i-1,o,s),m=xt.gradDot(this.P(d+r),i,o-1,s),g=xt.gradDot(this.P(h+r),i-1,o-1,s),v=xt.gradDot(this.P(l+r+1),i,o,s-1),b=xt.gradDot(this.P(f+r+1),i-1,o,s-1),x=xt.gradDot(this.P(d+r+1),i,o-1,s-1),y=xt.gradDot(this.P(h+r+1),i-1,o-1,s-1),k=Hs(i),C=Hs(a),E=Hs(s);return H2(k,C,E,w,_,m,g,v,b,x,y)}P(t){return this.p[t&255]&255}}class Ye{constructor(t,n,r){I(this,"noiseLevels");I(this,"amplitudes");I(this,"lowestFreqInputFactor");I(this,"lowestFreqValueFactor");I(this,"maxValue");if(t instanceof Ze){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let o=0;o<r.length;o++)if(r[o]!==0){const s=n+o;this.noiseLevels[o]=new mc(i.fromHashOf("octave_"+s))}}else{if(1-n<r.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(r.length);for(let i=-n;i>=0;i-=1)i<r.length&&r[i]!==0?this.noiseLevels[i]=new mc(t):t.consume(262)}this.amplitudes=r,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,r.length-1)/(Math.pow(2,r.length)-1),this.maxValue=this.edgeValue(2)}sample(t,n,r,i=0,o=0,s=!1){let a=0,c=this.lowestFreqInputFactor,u=this.lowestFreqValueFactor;for(let l=0;l<this.noiseLevels.length;l+=1){const d=this.noiseLevels[l];d&&(a+=this.amplitudes[l]*u*d.sample(Ye.wrap(t*c),s?-d.yo:Ye.wrap(n*c),Ye.wrap(r*c),i*c,o*c)),c*=2,u/=2}return a}getOctaveNoise(t){return this.noiseLevels[this.noiseLevels.length-1-t]}edgeValue(t){let n=0,r=this.lowestFreqValueFactor;for(let i=0;i<this.noiseLevels.length;i+=1)this.noiseLevels[i]&&(n+=this.amplitudes[i]*t*r),r/=2;return n}static wrap(t){return t-Math.floor(t/33554432+.5)*33554432}}class J2{constructor(t,n,r,i,o,s){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=s,this.minLimitNoise=new Ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new Ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new Ye(t,-7,[1,1,1,1,1,0,0,0]),this.xzMultiplier=684.412*n,this.yMultiplier=684.412*r,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(t,n,r){const i=t*this.xzMultiplier,o=n*this.yMultiplier,s=r*this.xzMultiplier,a=i/this.xzFactor,c=o/this.yFactor,u=s/this.xzFactor,l=this.yMultiplier*this.smearScaleMultiplier,d=l/this.yFactor;let f,h=0,w=1;for(let g=0;g<8;g+=1){if(f=this.mainNoise.getOctaveNoise(g),f){const v=Ye.wrap(a*w),b=Ye.wrap(c*w),x=Ye.wrap(u*w);h+=f.sample(v,b,x,d*w,c*w)/w}w/=2}h=(h/10+1)/2,w=1;let _=0,m=0;for(let g=0;g<16;g+=1){const v=Ye.wrap(i*w),b=Ye.wrap(o*w),x=Ye.wrap(s*w),y=l*w;h<1&&(f=this.minLimitNoise.getOctaveNoise(g))&&(_+=f.sample(v,b,x,y,o*w)/w),h>0&&(f=this.maxLimitNoise.getOctaveNoise(g))&&(m+=f.sample(v,b,x,y,o*w)/w),w/=2}return Ba(_/512,m/512,h)/128}}const yo=class{constructor(t,{firstOctave:n,amplitudes:r}){I(this,"valueFactor");I(this,"first");I(this,"second");I(this,"maxValue");this.first=new Ye(t,n,r),this.second=new Ye(t,n,r);let i=1/0,o=-1/0;for(let a=0;a<r.length;a+=1)r[a]!==0&&(i=Math.min(i,a),o=Math.max(o,a));const s=.1*(1+1/(o-i+1));this.valueFactor=1/6/s,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(t,n,r){const i=t*yo.INPUT_FACTOR,o=n*yo.INPUT_FACTOR,s=r*yo.INPUT_FACTOR;return(this.first.sample(t,n,r)+this.second.sample(i,o,s))*this.valueFactor}};let Cn=yo;I(Cn,"INPUT_FACTOR",1.0181268882175227);var Mn;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var o,s,a;const i=(o=W.readObject(r))!=null?o:{};return{firstOctave:(s=W.readInt(i.firstOctave))!=null?s:0,amplitudes:(a=W.readArray(i.amplitudes,c=>{var u;return(u=W.readNumber(c))!=null?u:0}))!=null?a:[]}}e.fromJson=n})(Mn||(Mn={}));class V4{constructor(t,n){I(this,"noiseLevels");I(this,"highestFreqInputFactor");I(this,"highestFreqValueFactor");const r=n[n.length-1],o=-n[0]+r+1,s=new Set(n),a=new xt(t);this.noiseLevels=Array(o),r>=0&&r<o&&s.has(0)&&(this.noiseLevels[r]=a);for(let c=r+1;c<o;c+=1)c>=0&&s.has(r-c)?this.noiseLevels[c]=new xt(t):t.consume(262);if(r>0)throw new Error("Positive octaves are not allowed");this.highestFreqInputFactor=Math.pow(2,r),this.highestFreqValueFactor=1/(Math.pow(2,o)-1)}sample(t,n,r){let i=0,o=this.highestFreqInputFactor,s=this.highestFreqValueFactor;for(let a=0;a<this.noiseLevels.length;a+=1){const c=this.noiseLevels[a];c&&(i+=s*c.sample2D(t*o+(r?c.xo:0),n*o+(r?c.yo:0))),o/=2,s*=2}return i}}var xr;(function(e){const t=a=>new xe.HolderHolder(qr.parser(br.DENSITY_FUNCTION,xe.fromJson)(a));function n(a){var u;const c=(u=W.readObject(a))!=null?u:{};return{barrier:t(c.barrier),fluidLevelFloodedness:t(c.fluid_level_floodedness),fluidLevelSpread:t(c.fluid_level_spread),lava:t(c.lava),temperature:t(c.temperature),vegetation:t(c.vegetation),continents:t(c.continents),erosion:t(c.erosion),depth:t(c.depth),ridges:t(c.ridges),initialDensityWithoutJaggedness:t(c.initial_density_without_jaggedness),finalDensity:t(c.final_density),veinToggle:t(c.vein_toggle),veinRidged:t(c.vein_ridged),veinGap:t(c.vein_gap)}}e.fromJson=n;function r(a){return he({barrier:xe.Constant.ZERO,fluidLevelFloodedness:xe.Constant.ZERO,fluidLevelSpread:xe.Constant.ZERO,lava:xe.Constant.ZERO,temperature:xe.Constant.ZERO,vegetation:xe.Constant.ZERO,continents:xe.Constant.ZERO,erosion:xe.Constant.ZERO,depth:xe.Constant.ZERO,ridges:xe.Constant.ZERO,initialDensityWithoutJaggedness:xe.Constant.ZERO,finalDensity:xe.Constant.ZERO,veinToggle:xe.Constant.ZERO,veinRidged:xe.Constant.ZERO,veinGap:xe.Constant.ZERO},a)}e.create=r;function i(a,c){return{barrier:a.barrier.mapAll(c),fluidLevelFloodedness:a.fluidLevelFloodedness.mapAll(c),fluidLevelSpread:a.fluidLevelSpread.mapAll(c),lava:a.lava.mapAll(c),temperature:a.temperature.mapAll(c),vegetation:a.vegetation.mapAll(c),continents:a.continents.mapAll(c),erosion:a.erosion.mapAll(c),depth:a.depth.mapAll(c),ridges:a.ridges.mapAll(c),initialDensityWithoutJaggedness:a.initialDensityWithoutJaggedness.mapAll(c),finalDensity:a.finalDensity.mapAll(c),veinToggle:a.veinToggle.mapAll(c),veinRidged:a.veinRidged.mapAll(c),veinGap:a.veinGap.mapAll(c)}}e.mapAll=i;const o=new Map;function s(a,c){var h;const u=(h=c.key())==null?void 0:h.toString();if(!u)throw new Error("Cannot instantiate noise from direct holder");const l=a.seedKey(),d=o.get(u);if(d&&d[0]===l[0]&&d[1]===l[1])return d[2];const f=new Cn(a.fromHashOf(u),c.value());return o.set(u,[l[0],l[1],f]),f}e.instantiate=s})(xr||(xr={}));var Ut;(function(e){function t(a){var u,l,d,f,h;const c=(u=W.readObject(a))!=null?u:{};return{minY:(l=W.readInt(c.min_y))!=null?l:0,height:(d=W.readInt(c.height))!=null?d:256,xzSize:(f=W.readInt(c.size_horizontal))!=null?f:1,ySize:(h=W.readInt(c.size_vertical))!=null?h:1}}e.fromJson=t;function n(a){return he({minY:0,height:256,xzSize:1,ySize:1},a)}e.create=n;function r(a){return a.ySize<<2}e.cellHeight=r;function i(a){return a.xzSize<<2}e.cellWidth=i;function o(a){return a.height/r(a)}e.cellCountY=o;function s(a){return Math.floor(a.minY/r(a))}e.minCellY=s})(Ut||(Ut={}));var gc;(function(e){function t(r){var o,s,a,c;const i=(o=W.readObject(r))!=null?o:{};return{target:(s=W.readNumber(i.target))!=null?s:0,size:(a=W.readInt(i.size))!=null?a:0,offset:(c=W.readInt(i.offset))!=null?c:0}}e.fromJson=t;function n(r,i,o){if(r.size<=0)return i;const s=(o-r.offset)/r.size;return Ba(r.target,i,s)}e.apply=n})(gc||(gc={}));var Ti;(function(e){function t(o){var a,c,u,l;const s=(a=W.readObject(o))!=null?a:{};return s.absolute!==void 0?n((c=W.readNumber(s.absolute))!=null?c:0):s.above_bottom!==void 0?r((u=W.readNumber(s.above_bottom))!=null?u:0):s.below_top!==void 0?i((l=W.readNumber(s.below_top))!=null?l:0):()=>0}e.fromJson=t;function n(o){return()=>o}function r(o){return s=>s.minY+o}function i(o){return s=>s.maxY-o}})(Ti||(Ti={}));var fa;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(fa||(fa={}));class Q2{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=Ze.create(r).forkPositional(),this.surfaceNoise=xr.instantiate(this.random,br.SURFACE_NOISE),this.surfaceSecondaryNoise=xr.instantiate(this.random,br.SURFACE_SECONDARY_NOISE),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const o=St.minBlockX(t.pos),s=St.minBlockZ(t.pos),a=new ep(this,t,n,r,i),c=this.rule(a);for(let u=0;u<16;u+=1){const l=o+u;for(let d=0;d<1;d+=1){const f=s+d;a.updateXZ(l,f);let h=0,w=Number.MIN_SAFE_INTEGER,_=Number.MAX_SAFE_INTEGER;for(let m=t.maxY;m>=t.minY;m-=1){const g=Ot.create(l,m,f),v=t.getBlockState(g);if(v.equals(Be.AIR)){h=0,w=Number.MIN_SAFE_INTEGER;continue}if(v.isFluid()){w===Number.MIN_SAFE_INTEGER&&(w=m+1);continue}if(_>=m){_=Number.MIN_SAFE_INTEGER;for(let y=m-1;y>=t.minY;y-=1){const k=t.getBlockState(Ot.create(l,y,f));if(k.equals(Be.AIR)||k.isFluid()){_=y+1;break}}}h+=1;const b=m-_+1;if(!v.equals(this.defaultBlock))continue;a.updateY(h,b,w,m);const x=c(l,m,f);x&&t.setBlockState(g,x)}}}}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 Wr(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class ep{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=xo(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=xo(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=xo(()=>this.getBiome(Ot.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,o=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),s=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i+1<<4),c=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i+1<<4);return Math.floor(la((t&15)/16,(n&15)/16,o,s,a,c))+this.surfaceDepth-8}}var Po;(function(e){e.NOOP=()=>()=>{};function t(o){var c,u,l;const s=(c=W.readObject(o))!=null?c:{};switch((u=W.readString(s.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return n(Be.fromJson(s.result_state));case"sequence":return r((l=W.readArray(s.sequence,e.fromJson))!=null?l:[]);case"condition":return i(ha.fromJson(s.if_true),e.fromJson(s.then_run))}return e.NOOP}e.fromJson=t;function n(o){return()=>()=>o}e.block=n;function r(o){return s=>{const a=o.map(c=>c(s));return(c,u,l)=>{for(const d of a){const f=d(c,u,l);if(f)return f}}}}e.sequence=r;function i(o,s){return a=>(c,u,l)=>{if(o(a))return s(a)(c,u,l)}}e.condition=i})(Po||(Po={}));var ha;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(u){var f,h,w,_,m,g,v,b,x,y,k,C;const l=(f=W.readObject(u))!=null?f:{};switch((h=W.readString(l.type))==null?void 0:h.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((w=W.readArray(l.biome_is,E=>{var M;return(M=W.readString(E))!=null?M:""}))!=null?w:[]);case"not":return i(e.fromJson(l.invert));case"stone_depth":return o((_=W.readInt(l.offset))!=null?_:0,(m=W.readBoolean(l.add_surface_depth))!=null?m:!1,(g=W.readInt(l.secondary_depth_range))!=null?g:0,W.readString(l.surface_type)==="ceiling");case"vertical_gradient":return s((v=W.readString(l.random_name))!=null?v:"",Ti.fromJson(l.true_at_and_below),Ti.fromJson(l.false_at_and_above));case"water":return a((b=W.readInt(l.offset))!=null?b:0,(x=W.readInt(l.surface_depth_multiplier))!=null?x:0,(y=W.readBoolean(l.add_surface_depth))!=null?y:!1);case"y_above":return c(Ti.fromJson(l.anchor),(k=W.readInt(l.surface_depth_multiplier))!=null?k:0,(C=W.readBoolean(l.add_surface_depth))!=null?C:!1)}return e.FALSE}e.fromJson=t;function n(){return u=>u.blockY>=u.minSurfaceLevel()}e.abovePreliminarySurface=n;function r(u){const l=new Set(u);return d=>l.has(d.biome())}e.biome=r;function i(u){return l=>!u(l)}e.not=i;function o(u,l,d,f){return h=>{const w=f?h.stoneDepthBelow:h.stoneDepthAbove,_=l?h.surfaceDepth:0,m=d===0?0:Fo(h.surfaceSecondary(),-1,1,0,d);return w<=1+u+_+m}}e.stoneDepth=o;function s(u,l,d){return f=>{const h=l(f.context),w=d(f.context);if(f.blockY<=h)return!0;if(f.blockY>=w)return!1;const _=f.system.getRandom(u),m=Fo(f.blockY,h,w,1,0);return _.nextFloat()<m}}e.verticalGradient=s;function a(u,l,d){return f=>{if(f.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const h=d?f.stoneDepthAbove:0;return f.blockY+h>=f.waterHeight+u+f.surfaceDepth*l}}e.water=a;function c(u,l,d){return f=>{const h=d?f.stoneDepthAbove:0;return f.blockY+h>=u(f.context)+f.surfaceDepth*l}}e.yAbove=c})(ha||(ha={}));var pa;(function(e){function t(r){var o,s,a,c,u,l;const i=(o=W.readObject(r))!=null?o:{};return{surfaceRule:Po.fromJson(i.surface_rule),noise:Ut.fromJson(i.noise),defaultBlock:Be.fromJson(i.default_block),defaultFluid:Be.fromJson(i.default_fluid),noiseRouter:xr.fromJson(i.noise_router),seaLevel:(s=W.readInt(i.sea_level))!=null?s:0,disableMobGeneration:(a=W.readBoolean(i.disable_mob_generation))!=null?a:!1,aquifersEnabled:(c=W.readBoolean(i.aquifers_enabled))!=null?c:!1,oreVeinsEnabled:(u=W.readBoolean(i.ore_veins_enabled))!=null?u:!1,legacyRandomSource:(l=W.readBoolean(i.legacy_random_source))!=null?l:!1}}e.fromJson=t;function n(r){return he({surfaceRule:Po.NOOP,noise:Ut.create({}),defaultBlock:Be.STONE,defaultFluid:Be.WATER,noiseRouter:xr.create({}),seaLevel:0,disableMobGeneration:!1,aquifersEnabled:!1,oreVeinsEnabled:!1,legacyRandomSource:!1},r)}e.create=n})(pa||(pa={}));var br;(function(e){e.NOISE=t("worldgen/noise",Mn.fromJson),e.DENSITY_FUNCTION=t("worldgen/density_function",r=>xe.fromJson(r)),e.NOISE_SETTINGS=t("worldgen/noise_settings",pa.fromJson);function t(r,i){const o=new $r(Ce.create(r),i);return $r.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(Ce.create(r),Mn.create(i,o),!0)}})(br||(br={}));class xe{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(ee,R,A){return{x:ee,y:R,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=qr.parser(br.NOISE,Mn.fromJson);function i(ee,R=i){var $,q,ie,B,J,de,_e,je,Oe,Ge,ot,Ee,De,Fe,ae,mn,Ue,Pe,et,_t;if(typeof ee=="string")return new s(qr.reference(br.DENSITY_FUNCTION,Ce.parse(ee)));if(typeof ee=="number")return new o(ee);const A=($=W.readObject(ee))!=null?$:{},O=(q=W.readString(A.type))==null?void 0:q.replace(/^minecraft:/,"");switch(O){case"blend_alpha":return new a(1,0,1);case"blend_offset":return new a(0,-1/0,1/0);case"beardifier":return new a(0,-1/0,1/0);case"old_blended_noise":return new c((ie=W.readNumber(A.xz_scale))!=null?ie:1,(B=W.readNumber(A.y_scale))!=null?B:1,(J=W.readNumber(A.xz_factor))!=null?J:80,(de=W.readNumber(A.y_factor))!=null?de:160,(_e=W.readNumber(A.smear_scale_multiplier))!=null?_e:8);case"flat_cache":return new l(R(A.argument));case"interpolated":return new w(R(A.argument));case"cache_2d":return new f(R(A.argument));case"cache_once":return new h(R(A.argument));case"cache_all_in_cell":return new d(R(A.argument));case"noise":return new _((je=W.readNumber(A.xz_scale))!=null?je:1,(Oe=W.readNumber(A.y_scale))!=null?Oe:1,r(A.noise));case"end_islands":return new m;case"weird_scaled_sampler":return new v(R(A.input),W.readEnum(A.rarity_value_mapper,g),r(A.noise));case"shifted_noise":return new b(R(A.shift_x),R(A.shift_y),R(A.shift_z),(Ge=W.readNumber(A.xz_scale))!=null?Ge:1,(ot=W.readNumber(A.y_scale))!=null?ot:1,r(A.noise));case"range_choice":return new x(R(A.input),(Ee=W.readNumber(A.min_inclusive))!=null?Ee:0,(De=W.readNumber(A.max_exclusive))!=null?De:1,R(A.when_in_range),R(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(R(A.argument));case"clamp":return new S(R(A.input),(Fe=W.readNumber(A.min))!=null?Fe:0,(ae=W.readNumber(A.max))!=null?ae:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new T(O,R(A.argument));case"add":case"mul":case"min":case"max":return new F(W.readEnum(O,L),R(A.argument1),R(A.argument2));case"spline":return new K(da.fromJson(A.spline,R));case"constant":return new o((mn=W.readNumber(A.argument))!=null?mn:0);case"y_clamped_gradient":return new H((Ue=W.readInt(A.from_y))!=null?Ue:-4064,(Pe=W.readInt(A.to_y))!=null?Pe:4062,(et=W.readNumber(A.from_value))!=null?et:-4064,(_t=W.readNumber(A.to_value))!=null?_t:4062)}return o.ZERO}e.fromJson=i;const N=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=N;I(o,"ZERO",new N(0)),I(o,"ONE",new N(1)),e.Constant=o;class s 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=s;class a 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=a;class c extends e{constructor(A,O,$,q,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=q,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=c;class u extends e{constructor(A){super();I(this,"wrapped");this.wrapped=A}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class l extends u{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 l(this.wrapped.mapAll(A)))}}e.FlatCache=l;class d extends u{constructor(R){super(R)}compute(R){return this.wrapped.compute(R)}mapAll(R){return R.map(new d(this.wrapped.mapAll(R)))}}e.CacheAllInCell=d;class f extends u{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 u{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,q=A.z;return(this.lastBlockX!==O||this.lastBlockY!==$||this.lastBlockZ!==q)&&(this.lastValue=this.wrapped.compute(A),this.lastBlockX=O,this.lastBlockY=$,this.lastBlockZ=q),this.lastValue}mapAll(A){return A.map(new h(this.wrapped.mapAll(A)))}}e.CacheOnce=h;class w extends u{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 q=this.cellWidth,ie=this.cellHeight,B=(A%q+q)%q/q,J=(O%ie+ie)%ie/ie,de=($%q+q)%q/q,_e=Math.floor(A/q)*q,je=Math.floor(O/ie)*ie,Oe=Math.floor($/q)*q;return U2(B,J,de,()=>this.computeCorner(_e,je,Oe),()=>this.computeCorner(_e+q,je,Oe),()=>this.computeCorner(_e,je+ie,Oe),()=>this.computeCorner(_e+q,je+ie,Oe),()=>this.computeCorner(_e,je,Oe+q),()=>this.computeCorner(_e+q,je,Oe+q),()=>this.computeCorner(_e,je+ie,Oe+q),()=>this.computeCorner(_e+q,je+ie,Oe+q))}computeCorner(A,O,$){return Wr(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,$,q){super();I(this,"xzScale");I(this,"yScale");I(this,"noiseData");I(this,"noise");this.xzScale=A,this.yScale=O,this.noiseData=$,this.noise=q}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 m extends e{constructor(A){super();I(this,"islandNoise");const O=new vt(A!=null?A:BigInt(0));O.consume(17292),this.islandNoise=new xt(O)}getHeightValue(A,O){const $=Math.floor(A/2),q=Math.floor(O/2),ie=A%2,B=O%2;let J=bi(100-Math.sqrt(A*A+O*O),-100,80);for(let de=-12;de<=12;de+=1)for(let _e=-12;_e<=12;_e+=1){const je=$+de,Oe=q+_e;if(je*je+Oe*Oe<=4096||this.islandNoise.sample2D(je,Oe)>=-.9)continue;const Ge=(Math.abs(je)*3439+Math.abs(Oe)*147)%13+9,ot=ie+de*2,Ee=B+_e*2,De=100-Math.sqrt(ot*ot+Ee*Ee)*Ge,Fe=bi(De,-100,80);J=Math.max(J,Fe)}return J}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=m;const g=["type_1","type_2"],j=class extends n{constructor(A,O,$,q){super(A);I(this,"rarityValueMapper");I(this,"noiseData");I(this,"noise");I(this,"mapper");this.rarityValueMapper=O,this.noiseData=$,this.noise=q,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 b extends _{constructor(A,O,$,q,ie,B,J){super(q,ie,B,J);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),q=A.z*this.xzScale+this.shiftZ.compute(A);return(B=(ie=this.noise)==null?void 0:ie.sample(O,$,q))!=null?B:0}mapAll(A){return A.map(new b(this.shiftX.mapAll(A),this.shiftY.mapAll(A),this.shiftZ.mapAll(A),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=b;class x extends e{constructor(A,O,$,q,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=q,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 x(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=x;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(R,A){super(R,A)}compute(R){return super.compute(e.context(R.x,0,R.z))}withNewNoise(R){return new k(this.noiseData,R)}}e.ShiftA=k;class C extends y{constructor(R,A){super(R,A)}compute(R){return super.compute(e.context(R.z,R.x,0))}withNewNoise(R){return new C(this.noiseData,R)}}e.ShiftB=C;class E extends y{constructor(R,A){super(R,A)}withNewNoise(R){return new E(this.noiseData,R)}}e.Shift=E;class M extends n{constructor(R){super(R)}transform(R,A){return A}mapAll(R){return R.map(new M(this.input.mapAll(R)))}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 bi(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,$,q){super(O);I(this,"type");I(this,"min");I(this,"max");I(this,"transformer");this.type=A,this.min=$,this.max=q,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=bi(A,-1,1);return O/2-O*O*O/24}}),e.Mapped=T;const L=["add","mul","min","max"];class F extends e{constructor(A,O,$,q,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=q,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(),q=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(A>=q||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=$+q;break;case"mul":ie=A>0&&O>0?A*O||0:$<0&&q<0?$*q||0:Math.min(A*q||0,O*$||0),B=A>0&&O>0?$*q||0:$<0&&q<0?A*O||0:Math.max(A*O||0,$*q||0);break;case"min":ie=Math.min(A,O),B=Math.min($,q);break;case"max":ie=Math.max(A,O),B=Math.max($,q);break}return new F(this.type,this.argument1,this.argument2,ie,B)}}e.Ap2=F;class K 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 K(O))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=K;class H extends e{constructor(A,O,$,q){super();I(this,"fromY");I(this,"toY");I(this,"fromValue");I(this,"toValue");this.fromY=A,this.toY=O,this.fromValue=$,this.toValue=q}compute(A){return Va(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=H})(xe||(xe={}));class $o{constructor(t,n){I(this,"level");I(this,"type");this.level=t,this.type=n}at(t){return t<this.level?this.type:Be.AIR}}var ma;(function(e){function t(n){return{compute({x:r,y:i,z:o},s){if(!(s>0))return n(r,i,o).at(i)}}}e.createDisabled=t})(ma||(ma={}));const qt=class{constructor(t,n,r,i,o,s,a){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=a,this.minGridX=this.gridX(St.minBlockX(n))-1,this.gridSizeX=this.gridX(St.maxBlockX(n))+1-this.minGridX+1,this.minGridY=this.gridY(o)-1,this.minGridZ=this.gridZ(St.minBlockZ(n))-1,this.gridSizeZ=this.gridZ(St.maxBlockZ(n))+1-this.minGridZ+1;const c=this.gridY(o+s)+1-this.minGridY+1;this.gridSize=this.gridSizeX*c*this.gridSizeZ,this.aquiferCache=Array(this.gridSize).fill(void 0),this.aquiferLocationCache=Array(this.gridSize).fill(Ot.ZERO)}compute({x:t,y:n,z:r},i){if(i<=0){if(this.globalFluidPicker(t,n,r).at(n).is(Be.LAVA))return Be.LAVA;{const o=this.gridX(t-5),s=this.gridY(n+1),a=this.gridZ(r-5);let c=Number.MAX_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,d=Ot.ZERO,f=Ot.ZERO,h=Ot.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,s+k,a+C),M=Ot.magnitude(E);c>=M?(h=f,f=d,d=E,l=u,u=c,c=M):u>=M?(h=f,f=E,l=u,u=M):l>=M&&(h=E,l=M)}const w=this.getStatus(d),_=this.getStatus(f),m=this.getStatus(h),g=qt.similarity(c,u),v=qt.similarity(c,l),b=qt.similarity(u,l);let x;if(w.at(n).is(Be.WATER)&&this.globalFluidPicker(t,n-1,r).at(n-1).is(Be.LAVA))x=1;else if(g>-1){const y=xo(()=>this.router.barrier.compute(xe.context(t,n*.5,r))),k=this.calculatePressure(n,w,_,y),C=this.calculatePressure(n,w,m,y),E=this.calculatePressure(n,_,m,y),M=Math.max(k,C*Math.max(0,v),E*Math.max(b));x=Math.max(0,2*Math.max(0,g)*M)}else x=0;if(i+x<=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),s=r.at(t);if(o.is(Be.LAVA)&&s.is(Be.WATER)||o.is(Be.WATER)&&s.is(Be.LAVA))return 1;const a=Math.abs(n.level-r.level);if(a===0)return 0;const c=(n.level+r.level)/2,u=t+.5-c,l=a/2-Math.abs(u),d=u>0?l>0?l/1.5:l/2.5:l>-3?(l+3)/3:(l+3)/10;return d<-2||d>2?d:d+i()}getStatus(t){const[n,r,i]=t,o=this.getIndex(this.gridX(n),this.gridY(r),this.gridZ(i)),s=this.aquiferCache[o];if(s!==void 0)return s;const a=this.computeStatus(n,r,i);return this.aquiferCache[o]=a,a}computeStatus(t,n,r){const i=this.globalFluidPicker(t,n,r);let o=Number.MAX_SAFE_INTEGER,s=!1;for(const[w,_]of qt.SURFACE_SAMPLING){const m=t+(_<<4),g=r+(_<<4),v=this.noiseChunk.getPreliminarySurfaceLevel(m,g);o=Math.min(o,v);const b=w===0&&_===0;if(b&&n-12>v+8)return i;if(b||n+12>v+8){const x=this.globalFluidPicker(m,v+8,g);if(!x.at(v+8).is(Be.AIR)){if(b)return x;s=!0}}}const a=s?Va(o+8-n,0,64,1,0):0,c=bi(this.router.fluidLevelFloodedness.compute(xe.context(t,n*.67,r)),-1,1);if(c>Fo(a,1,0,-.3,.8))return i;if(c<=Fo(a,1,0,-.8,.4))return new $o(Number.MIN_SAFE_INTEGER,i.type);const u=Math.floor(n/40),l=this.router.fluidLevelSpread.compute(xe.context(Math.floor(t/16),u,Math.floor(r/16))),d=u*40+20+Math.floor(l/3)*3,f=Math.min(o,d),h=this.getFluidType(t,n,r,i.type,d);return new $o(f,h)}getFluidType(t,n,r,i,o){if(o<=-10){const s=this.router.lava.compute(xe.context(Math.floor(t/64),Math.floor(n/40),Math.floor(r/64)));if(Math.abs(s)>.3)return Be.LAVA}return i}getLocation(t,n,r){const i=this.getIndex(t,n,r),o=this.aquiferLocationCache[i];if(Ot.equals(o,Ot.ZERO))return o;const s=this.random.at(t,n,r),a=Ot.create(t*qt.X_SPACING+s.nextInt(10),n*qt.Y_SPACING+s.nextInt(9),r*qt.Z_SPACING+s.nextInt(10));return this.aquiferLocationCache[i]=a,a}getIndex(t,n,r){const i=t-this.minGridX,o=n-this.minGridY,s=r-this.minGridZ,a=(o*this.gridSizeZ+s)*this.gridSizeX+i;if(a<0||a>=this.gridSize)throw new Error(`Invalid aquifer index at ${t} ${n} ${r}: 0 <= ${a} < ${this.gridSize}`);return a}gridX(t){return Math.floor(t/qt.X_SPACING)}gridY(t){return Math.floor(t/qt.Y_SPACING)}gridZ(t){return Math.floor(t/qt.Z_SPACING)}};let Tr=qt;I(Tr,"X_SPACING",16),I(Tr,"Y_SPACING",12),I(Tr,"Z_SPACING",16),I(Tr,"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 ja{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 Ce.parse(this.biomes[i].toString())}static fromJson(t){var o,s,a;const n=(o=W.readObject(t))!=null?o:{},r=(s=W.readInt(n.scale))!=null?s:2;let i;return typeof n.biomes=="string"?i=[Ce.parse(n.biomes)]:i=(a=W.readArray(n.biomes,c=>{var u;return Ce.parse((u=W.readString(c))!=null?u:"")}))!=null?a:[],new ja(r+2,i)}}class za{constructor(t){I(this,"biome");this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,o;const n=(i=W.readObject(t))!=null?i:{},r=Ce.parse((o=W.readString(n.biome))!=null?o:"plains");return new za(r)}}var $i;(function(e){function n(_,m,g,v,b,x){return new a(_,m,g,v,b,x)}e.target=n;function r(_,m,g,v,b,x,y){return new s(i(_),i(m),i(g),i(v),i(b),i(x),y)}e.parameters=r;function i(_,m){return typeof _=="number"?new o(_,m!=null?m:_):_}e.param=i;class o{constructor(m,g){I(this,"min");I(this,"max");this.min=m,this.max=g}distance(m){const g=(typeof m=="number"?m:m.min)-this.max,v=this.min-(typeof m=="number"?m:m.max);return g>0?g:Math.max(v,0)}union(m){return new o(Math.min(this.min,m.min),Math.max(this.max,m.max))}static fromJson(m){var b;if(typeof m=="number")return new o(m,m);const[g,v]=(b=W.readArray(m,x=>W.readNumber(x)))!=null?b:[];return new o(g!=null?g:0,v!=null?v:0)}}e.Param=o;class s{constructor(m,g,v,b,x,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=m,this.humidity=g,this.continentalness=v,this.erosion=b,this.depth=x,this.weirdness=y,this.offset=k}fittness(m){return Fn(this.temperature.distance(m.temperature))+Fn(this.humidity.distance(m.humidity))+Fn(this.continentalness.distance(m.continentalness))+Fn(this.erosion.distance(m.erosion))+Fn(this.depth.distance(m.depth))+Fn(this.weirdness.distance(m.weirdness))+Fn(this.offset-m.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new o(this.offset,this.offset)]}static fromJson(m){var v,b;const g=(v=W.readObject(m))!=null?v:{};return new s(o.fromJson(g.temperature),o.fromJson(g.humidity),o.fromJson(g.continentalness),o.fromJson(g.erosion),o.fromJson(g.depth),o.fromJson(g.weirdness),(b=W.readInt(g.offset))!=null?b:0)}}e.ParamPoint=s;class a{constructor(m,g,v,b,x,y){I(this,"temperature");I(this,"humidity");I(this,"continentalness");I(this,"erosion");I(this,"depth");I(this,"weirdness");this.temperature=m,this.humidity=g,this.continentalness=v,this.erosion=b,this.depth=x,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=a;class c{constructor(m){I(this,"things");I(this,"index");this.things=m,this.index=new l(m)}find(m){return this.index.search(m,(g,v)=>g.distance(v))}}e.Parameters=c;class u{constructor(m,g,v,b,x,y){I(this,"temperature");I(this,"humidity");I(this,"continentalness");I(this,"erosion");I(this,"depth");I(this,"weirdness");this.temperature=m,this.humidity=g,this.continentalness=v,this.erosion=b,this.depth=x,this.weirdness=y}static fromRouter(m){return new e.Sampler(m.temperature,m.vegetation,m.continents,m.erosion,m.depth,m.ridges)}sample(m,g,v){const b=xe.context(m<<2,g<<2,v<<2);return e.target(this.temperature.compute(b),this.humidity.compute(b),this.continentalness.compute(b),this.erosion.compute(b),this.depth.compute(b),this.weirdness.compute(b))}}e.Sampler=u;const w=class{constructor(m){I(this,"root");if(m.length===0)throw new Error("At least one point is required to build search tree");this.root=w.build(m.map(([g,v])=>new h(g,v)))}static build(m){if(m.length===1)return m[0];if(m.length<=w.CHILDREN_PER_NODE){const x=m.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(x)}let g=1/0,v=-1,b=[];for(let x=0;x<7;++x){m=w.sort(m,x,!1),b=w.bucketize(m);let y=0;for(const k of b)y+=w.area(k.space);g>y&&(g=y,v=x)}return m=w.sort(m,v,!1),b=w.bucketize(m),b=w.sort(b,v,!0),new f(b.map(x=>w.build(x.children)))}static sort(m,g,v){return m.map(b=>{const x=b.space[g],y=(x.min+x.max)/2;return{key:v?Math.abs(y):y,node:b}}).sort((b,x)=>b.key-x.key).map(({node:b})=>b)}static bucketize(m){const g=[];let v=[];const b=Math.pow(10,Math.floor(Math.log(m.length-.01)/Math.log(10)));for(const x of m)v.push(x),!(v.length<b)&&(g.push(new f(v)),v=[]);return v.length!==0&&g.push(new f(v)),g}static area(m){let g=0;for(const v of m)g+=Math.abs(v.max-v.min);return g}search(m,g){return this.root.search(m.toArray(),g).thing()}};let l=w;I(l,"CHILDREN_PER_NODE",10),e.RTree=l;class d{constructor(m){I(this,"space");this.space=m}distance(m){let g=0;for(let v=0;v<7;v+=1)g+=Fn(this.space[v].distance(m[v]));return g}}e.RNode=d;class f extends d{constructor(g){super(f.buildSpace(g));I(this,"children");this.children=g}static buildSpace(g){let v=[...Array(7)].map(()=>new o(1/0,-1/0));for(const b of g)v=[...Array(7)].map((x,y)=>v[y].union(b.space[y]));return v}search(g,v){let b=1/0,x=null;for(const y of this.children){const k=v(y,g);if(b<=k)continue;const C=y.search(g,v),E=y==C?k:v(C,g);b<=E||(b=E,x=C)}return x}}e.RSubTree=f;class h extends d{constructor(g,v){super(g.space());I(this,"thing");this.thing=v}search(){return this}}e.RLeaf=h})($i||($i={}));class Ha{constructor(t){I(this,"parameters");this.parameters=new $i.Parameters(t)}getBiome(t,n,r,i){const o=i.sample(t,n,r);return this.parameters.find(o)}static fromJson(t){var o,s;const n=(o=W.readObject(t))!=null?o:{},i=((s=W.readArray(n.biomes,a=>{var c;return(u=>{var l;return{biome:Ce.parse((l=W.readString(u.biome))!=null?l:"plains"),parameters:$i.ParamPoint.fromJson(u.parameters)}})((c=W.readObject(a))!=null?c:{})}))!=null?s:[]).map(a=>[a.parameters,()=>a.biome]);return new Ha(i)}}const ar=class{getBiome(t,n,r,i){const o=t<<2,s=n<<2,a=r<<2,c=o>>4,u=a>>4;if(c*c+u*u<=4096)return ar.END;const l=xe.context((c*2+1)*8,s,(u*2+1)*8),d=i.erosion.compute(l);return d>.25?ar.HIGHLANDS:d>=-.0625?ar.MIDLANDS:d>=-.21875?ar.BARRENS:ar.ISLANDS}static fromJson(t){return new ar}};let or=ar;I(or,"END",Ce.create("the_end")),I(or,"HIGHLANDS",Ce.create("end_highlands")),I(or,"MIDLANDS",Ce.create("end_midlands")),I(or,"ISLANDS",Ce.create("small_end_islands")),I(or,"BARRENS",Ce.create("end_barrens"));var _c;(function(e){function t(n){var o,s;const r=(o=W.readObject(n))!=null?o:{};switch((s=W.readString(r.type))==null?void 0:s.replace(/^minecraft:/,"")){case"fixed":return za.fromJson(n);case"checkerboard":return ja.fromJson(n);case"multi_noise":return Ha.fromJson(n);case"the_end":return or.fromJson(n);default:return{getBiome:()=>Ce.create("plains")}}}e.fromJson=t})(_c||(_c={}));class tp{constructor(t,n,r,i,o,s,a,c,u){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=s,this.settings=a,this.cellWidth=Ut.cellWidth(a),this.cellHeight=Ut.cellHeight(a),this.firstCellX=Math.floor(o/this.cellWidth),this.firstCellZ=Math.floor(s/this.cellWidth),this.firstNoiseX=o>>2,this.firstNoiseZ=s>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=ma.createDisabled(u);const l=i.router.finalDensity;this.materialRule=_a.fromList([d=>this.aquifer.compute(d,l.compute(d))]),this.initialDensity=i.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Wr(this.preliminarySurfaceLevel,St.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(xe.context(r,o,i))>.390625)return o;return Number.MAX_SAFE_INTEGER})}}var _a;(function(e){function t(n){return r=>{for(const i of n){const o=i(r);if(o)return o}}}e.fromList=t})(_a||(_a={}));class j4{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 $o(-54,Be.LAVA),i=new $o(n.seaLevel,n.defaultFluid);this.globalFluidPicker=(o,s,a)=>s<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),s=Ut.cellWidth(this.settings.noise),a=Ut.cellHeight(this.settings.noise),c=Math.floor(16/s),u=Math.floor(i/a),l=Math.floor((o-i)/a),d=St.minBlockX(n.pos),f=St.minBlockZ(n.pos),h=this.getOrCreateNoiseChunk(t,n);for(let _=0;_<c;_+=1)for(let m=0;m<(r?1:c);m+=1){let g=n.getOrCreateSection(n.sectionsCount-1);for(let v=l-1;v>=0;v-=1)for(let b=a-1;b>=0;b-=1){const x=(u+v)*a+b,y=x&15,k=n.getSectionIndex(x);n.getSectionIndex(g.minBlockY)!==k&&(g=n.getOrCreateSection(k));for(let C=0;C<s;C+=1){const E=d+_*s+C,M=E&15;for(let S=0;S<(r?1:s);S+=1){const T=f+m*s+S,L=T&15,F=(w=h.getFinalState(E,x,T))!=null?w:this.settings.defaultBlock;g.setBlockState(M,y,L,F)}}}}}buildSurface(t,n,r="minecraft:plains"){const i=this.getOrCreateNoiseChunk(t,n),o=fa.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 Wr(this.noiseChunkCache,St.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=Ut.cellWidth(this.settings.noise),s=Ut.cellHeight(this.settings.noise),a=Math.floor(16/o),c=Math.floor(r/s),u=Math.floor((i-r)/s),l=St.minBlockX(n.pos),d=St.minBlockZ(n.pos);return new tp(a,u,c,t,l,d,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var Wu;(function(e){function t(n,r,i){let{up:o,down:s,north:a,east:c,south:u,west:l}=n;switch(i){case 90:[a,c,u,l]=[c,u,l,a];break;case 180:[a,c,u,l]=[u,l,a,c];break;case 270:[a,c,u,l]=[l,a,c,u]}switch(r){case 90:[o,a,s,u]=[a,s,u,o];break;case 180:[o,a,s,u]=[s,u,o,a];break;case 270:[o,a,s,u]=[u,o,a,s]}return{up:o,down:s,north:a,east:c,south:u,west:l}}e.rotate=t})(Wu||(Wu={}));class z4{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 vt(n):Ze.create(n)).forkPositional(),this.aquiferRandom=this.random.fromHashOf(Ce.create("aquifer").toString()).forkPositional(),this.oreRandom=this.random.fromHashOf(Ce.create("ore").toString()).forkPositional(),this.surfaceSystem=new Q2(t.surfaceRule,t.defaultBlock,n),this.router=xr.mapAll(t.noiseRouter,this.createVisitor(t.noise,t.legacyRandomSource)),this.sampler=$i.Sampler.fromRouter(this.router)}createVisitor(t,n){const r=new Map,i=s=>{const a=s.key();if(a===void 0)throw new Error("Cannot create noise without key");if(n){if(a.equals(Ce.create("temperature")))return new Cn(new vt(this.seed+BigInt(0)),Mn.create(-7,[1,1]));if(a.equals(Ce.create("vegetation")))return new Cn(new vt(this.seed+BigInt(1)),Mn.create(-7,[1,1]));if(a.equals(Ce.create("offset")))return new Cn(this.random.fromHashOf("offset"),Mn.create(0,[0]))}return this.getOrCreateNoise(a)},o={map:s=>{if(s instanceof xe.HolderHolder){const a=s.holder.key();if(a!==void 0&&r.has(a.toString()))return r.get(a.toString());{const c=s.holder.value().mapAll(o);return a!==void 0&&r.set(a.toString(),c),c}}return s instanceof xe.Interpolated?s.withCellSize(Ut.cellWidth(t),Ut.cellHeight(t)):s instanceof xe.ShiftedNoise?new xe.ShiftedNoise(s.shiftX,s.shiftY,s.shiftZ,s.xzScale,s.yScale,s.noiseData,i(s.noiseData)):s instanceof xe.Noise?new xe.Noise(s.xzScale,s.yScale,s.noiseData,i(s.noiseData)):s instanceof xe.ShiftNoise?s.withNewNoise(i(s.noiseData)):s instanceof xe.WeirdScaledSampler?new xe.WeirdScaledSampler(s.input,s.rarityValueMapper,s.noiseData,i(s.noiseData)):s instanceof xe.OldBlendedNoise?new xe.OldBlendedNoise(s.xzScale,s.yScale,s.xzFactor,s.yFactor,s.smearScaleMultiplier,new J2(this.random.fromHashOf(Ce.create("terrain").toString()),s.xzScale,s.yScale,s.xzFactor,s.yFactor,s.smearScaleMultiplier)):s instanceof xe.EndIslands?new xe.EndIslands(this.seed):s instanceof xe.Mapped||s instanceof xe.Ap2?s.withMinMax():s}};return o}getOrCreateNoise(t){const n=$r.REGISTRY.getOrThrow(Ce.create("worldgen/noise"));return Wr(this.noiseCache,t.toString(),r=>new Cn(this.random.fromHashOf(r),n.getOrThrow(t)))}getOrCreateRandom(t){return Wr(this.randomCache,t.toString(),n=>this.random.fromHashOf(n).forkPositional())}}var qu=Object.freeze(Object.defineProperty({__proto__:null,get BlockPos(){return Ot},BlockState:Be,Chunk:D4,get ChunkPos(){return St},ChunkSection:xi,get Direction(){return Xt},get Holder(){return qr},Identifier:Ce,PalettedContainer:z2,Registry:$r,Structure:a0,get MinMaxNumberFunction(){return ua},get CubicSpline(){return da},BlendedNoise:J2,ImprovedNoise:mc,NormalNoise:Cn,get NoiseParameters(){return Mn},PerlinNoise:Ye,PerlinSimplexNoise:V4,SimplexNoise:xt,LegacyRandom:vt,LegacyPositionalRandom:X2,XoroshiroRandom:Ze,XoroshiroPositionalRandom:K2,square:Fn,clamp:bi,lerp:Gn,lerp2:la,lerp3:H2,lazyLerp:bo,lazyLerp2:hc,lazyLerp3:U2,clampedLerp:Ba,inverseLerp:l0,smoothstep:Hs,map:Fo,clampedMap:Va,binarySearch:Z2,getSeed:c0,longfromBytes:ca,isPowerOfTwo:F4,upperPowerOfTwo:P4,get Json(){return W},lazy:xo,computeIfAbsent:Wr,FluidStatus:$o,get Aquifer(){return ma},NoiseAquifer:Tr,get BiomeSource(){return _c},CheckerboardBiomeSource:ja,get Climate(){return $i},FixedBiomeSource:za,MultiNoiseBiomeSource:Ha,get DensityFunction(){return xe},NoiseChunk:tp,get MaterialRule(){return _a},NoiseChunkGenerator:j4,get NoiseGeneratorSettings(){return pa},get NoiseRouter(){return xr},get NoiseSettings(){return Ut},get NoiseSlideSettings(){return gc},RandomState:z4,SurfaceSystem:Q2,SurfaceContext:ep,get SurfaceRule(){return Po},get SurfaceCondition(){return ha},get VerticalAnchor(){return Ti},get WorldgenContext(){return fa},get WorldgenRegistries(){return br}},Symbol.toStringTag,{value:"Module"}));const Ol=new Set(["minecraft:worldgen/noise","minecraft:worldgen/density_function","minecraft:worldgen/noise_settings"]);class H4{constructor(){this.d=qu,this.deepslateCache=new Map,this.Y=64,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:(mt(t,"1.19")?this.d=qu:mt(t,"1.18.2")?this.d=await be(()=>import("./deepslate.esm.43e304cb.js"),["assets/deepslate.esm.43e304cb.js","assets/vec3.6bb9fc18.js"]):this.d=await be(()=>import("./deepslate.esm.89e7aac6.js"),["assets/deepslate.esm.89e7aac6.js","assets/vec3.6bb9fc18.js"]),mt(t,"1.19")?await Promise.all(this.d.Registry.REGISTRY.map(async(i,o)=>{if(Ol.has(i.toString())){const s=await eu(t,i.path);for(const[a,c]of s.entries())o.register(this.d.Identifier.parse(a),o.parse(c),!0)}})):mt(t,"1.18.2")&&await Promise.all([...Ol].map(async i=>{const o=await eu(t,i.replace(/^minecraft:/,""));for(const[s,a]of o.entries())i==="minecraft:worldgen/noise"?this.d.WorldgenRegistries.NOISE.register(this.d.Identifier.parse(s),this.d.NoiseParameters.fromJson(a),!0):i==="minecraft:worldgen/density_function"&&this.d.WorldgenRegistries.DENSITY_FUNCTION.register(this.d.Identifier.parse(s),this.d.DensityFunction.fromJson(a),!0)})),this.deepslateCache.set(t,this.d)),this.applyProjectData(t,n),this.loadedVersion=t,this.loadingVersion=void 0}applyProjectData(t,n){mt(t,"1.19")&&this.d.Registry.REGISTRY.forEach((r,i)=>{var o;if(Ol.has(r.toString())){i.clear();for(const[s,a]of Object.entries((o=n==null?void 0:n[r.path])!=null?o:{}))i.register(this.d.Identifier.parse(s),i.parse(a))}})}async loadChunkGenerator(t,n,r){const i=[t,`${r}`,n];if(!Pi(this.cacheState,i)){const o=this.createNoiseSettings(t),s=await this.createBiomeSource(o,n,r),a=this.isVersion("1.19")?new this.d.NoiseChunkGenerator(s,o):new this.d.NoiseChunkGenerator(r,s,o);this.settingsCache=o.noise,this.generatorCache=a,this.isVersion("1.19")?this.randomStateCache=new this.d.RandomState(o,r):this.randomStateCache=void 0,this.biomeSourceCache={getBiome:(c,u,l)=>s.getBiome(c,u,l,void 0)},this.chunksCache=[],this.biomeCache=new Map,this.cacheState=Gc(i)}}async createBiomeSource(t,n,r){var i,o,s;if(this.loadedVersion&&Xn(n)&&typeof n.preset=="string"){const a=this.loadedVersion,c=n.preset.replace(/^minecraft:/,""),u=await B3(this.presetCache,`${a}-${c}`,async()=>(await Hh(a,"dimension",c==="overworld"?"overworld":"the_nether")).generator.biome_source.biomes);n={type:n.type,biomes:u}}if(this.isVersion("1.19"))return this.d.BiomeSource.fromJson(n);{const a=Xn(n)?n:{},c=typeof a.type=="string"?a.type.replace(/^minecraft:/,""):void 0;switch(c){case"fixed":return new this.d.FixedBiome(this.isVersion("1.18.2")?this.d.Identifier.parse(a.biome):a.biome);case"checkerboard":const u=((i=a.scale)!=null?i:2)+2,l=(s=(o=a.biomes)==null?void 0:o.length)!=null?s:0;return{getBiome:(d,f,h)=>{var m;const w=(((d>>u)+(h>>u))%l+l)%l,_=(m=a.biomes)==null?void 0:m[w];return this.isVersion("1.18.2")?this.d.Identifier.parse(_):_}};case"multi_noise":if(this.isVersion("1.18")){const d=new this.d.Climate.Parameters(a.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(d);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=(_,m,g)=>w.sample(_,m,g)}return{getBiome:(w,_,m)=>f.getBiome(w,_,m,h)}}else{const d=["altitude","temperature","humidity","weirdness"].map((f,h)=>{var _;const w=a[`${f}_noise`];return w.firstOctave=Vt((_=w.firstOctave)!=null?_:-7,-100,-1),new this.d.NormalNoise(new this.d.LegacyRandom(r+BigInt(h)),w)});return!Array.isArray(a.biomes)||a.biomes.length===0?{getBiome:()=>this.d.Identifier.create("unknown")}:{getBiome:(f,h,w)=>{const _=d.map(v=>v.sample(f,w,0));let m=1/0,g="unknown";for(const{biome:v,parameters:b}of a.biomes){const x=to(b.altitude-_[0])+to(b.temperature-_[1])+to(b.humidity-_[2])+to(b.weirdness-_[3])+to(b.offset);x<m&&(m=x,g=v)}return g}}}default:throw new Error(`Unsupported biome source ${c}`)}}}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((s,a)=>{const c=(t>>4)+a,u=this.chunksCache.find(d=>d.pos[0]===c);if(u)return u;const l=new this.d.Chunk(i,o,this.d.ChunkPos.create(c,this.Z>>4));if(!this.generatorCache)throw new Error("Tried to generate chunks before generator is loaded");if(mt(this.loadedVersion,"1.19")){if(!this.randomStateCache)throw new Error("Tried to generate chunks before random state is loaded");this.generatorCache.fill(this.randomStateCache,l,!0),this.generatorCache.buildSurface(this.randomStateCache,l,r)}else this.generatorCache.fill(l,!0),this.generatorCache.buildSurface(l,r);return this.chunksCache.push(l),l})}fillBiomes(t,n,r,i,o=1){if(!this.generatorCache||!this.settingsCache)throw new Error("Tried to fill biomes before generator is loaded");const s=this.Y-this.settingsCache.minY>>2,a=t>>2,c=n>>2,u=r>>2,l=i>>2,d=Math.floor((c-a)/o),f=Math.floor((l-u)/o),h=new F3,w=new Int8Array(d*f);let _=0,m=0;for(let g=a;g<c;g+=o)for(let v=u;v<l;v+=o){const b=`${g}:${v}`;let x=this.biomeCache.get(b);if(!x){if(this.DEBUG)x=this.computeDebugBiome(g,v);else if(this.isVersion("1.19")){if(!this.randomStateCache)throw new Error("Tried to compute biomes before random state is loaded");x=this.generatorCache.computeBiome(this.randomStateCache,g,s,v).toString()}else{if(!this.biomeSourceCache)throw new Error("Tried to compute biomes before biome source is loaded");x=this.biomeSourceCache.getBiome(g,s,v).toString()}this.biomeCache.set(b,x)}w[m++]=h.computeIfAbsent(x,()=>_++)}return{palette:h.backward,data:w,width:d,height:f}}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 mt(this.loadedVersion,t,n)}}const It=new H4;class U4{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 vt(t);this.minLimitPerlinNoise=new Ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new Ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new Ye(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new Ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,o){this.settings=t,this.chunkWidth=t.size_horizontal*4,this.chunkHeight=t.size_vertical*4,this.chunkCountY=Math.floor(t.height/this.chunkHeight),t.amplified&&n>0&&(n=1+n*2,r=1+r*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(r*.9+.1),this.noiseColumnCache=Array(o).fill(null),this.xOffset=i}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),r=Math.floor(t/this.chunkWidth),i=Math.floor(t%this.chunkWidth)/this.chunkWidth,o=this.fillNoiseColumn(r),s=this.fillNoiseColumn(r+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let c=this.chunkHeight;c>=0;c-=1){const u=c/this.chunkHeight,l=a*this.chunkHeight+c;n[l]=D3(u,i,o[a],o[a+1],s[a],s[a+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const r=Array(this.chunkCountY+1),i=684.412*this.settings.sampling.xz_scale,o=684.412*this.settings.sampling.y_scale,s=i/this.settings.sampling.xz_factor,a=o/this.settings.sampling.y_factor,c=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let u=0;u<=this.chunkCountY;u+=1){let l=this.sampleAndClampNoise(t,u,this.mainPerlinNoise.getOctaveNoise(0).zo,i,o,s,a);const h=((1-u*2/this.chunkCountY+c)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;l+=h*(h>0?4:1),this.settings.top_slide.size>0&&(l=fl(this.settings.top_slide.target,l,(this.chunkCountY-u-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(l=fl(this.settings.bottom_slide.target,l,(u-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),r[u]=l}return this.noiseColumnCache[t-this.xOffset]=r,r}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),i=(n<0?-n*.3:n)*24.575625-2;return i<0?i*.009486607142857142:Math.min(i,1)*.006640625}sampleAndClampNoise(t,n,r,i,o,s,a){let c=0,u=0,l=0,d=1;for(let f=0;f<16;f+=1){const h=Ye.wrap(t*i*d),w=Ye.wrap(n*o*d),_=Ye.wrap(r*i*d),m=o*d,g=this.minLimitPerlinNoise.getOctaveNoise(f);g&&(c+=g.sample(h,w,_,m,n*m)/d);const v=this.maxLimitPerlinNoise.getOctaveNoise(f);if(v&&(u+=v.sample(h,w,_,m,n*m)/d),f<8){const b=this.mainPerlinNoise.getOctaveNoise(f);b&&(l+=b.sample(Ye.wrap(t*s*d),Ye.wrap(n*a*d),Ye.wrap(r*s*d),a*d,n*a*d)/d)}d/=2}return fl(c/512,u/512,(l/10+1)/2)}}const Z4={"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 G4(e,t,n){var s,a,c,u;if(mt(n.version,"1.18")){await It.loadVersion(n.version,Ua(n.project));const l={type:"fixed",biome:n.biome};await It.loadChunkGenerator(P.DataModel.unwrapLists(e),l,n.seed),It.generateChunks(-n.offset,n.width);const d=It.getNoiseSettings(),f=t.data;for(let h=0;h<n.width;h+=1)for(let w=0;w<d.height;w+=1){const _=h*4+(d.height-w-1)*4*t.width,m=(s=It.getBlockState(h-n.offset,w+d.minY))!=null?s:Be.AIR,g=(a=Z4[m.getName().toString()])!=null?a:[0,0,0];f[_]=g[0],f[_+1]=g[1],f[_+2]=g[2],f[_+3]=255}return}const r=new U4(n.seed);r.reset(e.noise,(c=n.biomeDepth)!=null?c:0,(u=n.biomeScale)!=null?u:0,n.offset,n.width);const i=t.data,o=t.width*4;for(let l=0;l<n.width;l+=1){const d=r.iterateNoiseColumn(l-n.offset).reverse();for(let f=0;f<e.noise.height;f+=1){const h=f*o+l*4,w=q4(d,f);i[h]=w,i[h+1]=w,i[h+2]=w,i[h+3]=255}}}function Y4(e,t){return It.getBlockState(e,t)}async function W4(e,t,n){await It.loadVersion(n.version,Ua(n.project));const r=It.loadDensityFunction(P.DataModel.unwrapLists(e),n.seed),i=It.getNoiseSettings(),o=Array(n.width*i.height);let s=1/0,a=-1/0;for(let u=0;u<n.width;u+=1)for(let l=0;l<i.height;l+=1){const d=u+(i.height-l-1)*n.width,f=r.compute(xe.context(u-n.offset,l,0));s=Math.min(s,f),a=Math.max(a,f),o[d]=f}const c=t.data;for(let u=0;u<n.width*i.height;u+=1){const l=Math.floor(Va(o[u],s,a,0,256));c[4*u]=l,c[4*u+1]=l,c[4*u+2]=l,c[4*u+3]=255}}function Ua(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 q4(e,t){return e[t]>0?0:e[t+1]>0?150:255}async function X4(e,t,n){await It.loadVersion(n.version,Ua(n.project)),await It.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),s=Math.round(-n.offset[1]*n.scale),a=Math.floor(o-i/2),c=Math.floor(s-i/2),u=a+i,l=c+i,{palette:d,data:f,width:h,height:w}=It.fillBiomes(a*4,u*4,c*4,l*4,r*n.res);let _=0,m=0;for(let g=0;g<f.length;g+=1){const v=d.get(f[g]),b=J4(v!=null?v:"",n.biomeColors),x=m*h+_;t.data[x*4]=b[0],t.data[x*4+1]=b[1],t.data[x*4+2]=b[2],t.data[x*4+3]=255,m+=1,m>=w&&(m=0,_+=1)}}async function K4(e,t,n,r){await It.loadVersion(r.version,Ua(r.project)),await It.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),s=Math.round(-r.offset[1]*r.scale),a=Math.floor(o+(t-100)*i),c=Math.floor(s+(n-100)*i),{palette:u,data:l}=It.fillBiomes(a*4,a*4+4,c*4,c*4+4);return{biome:u.get(l[0])}}function J4(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:np[e];return n===void 0?Zc(e):n}const np={"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]},Lr=[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],Xu=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function Q4(e,t,n){const r=new vt(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new Ye(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:s=>r.nextInt(s),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(s){return ev(s,this)}};for(let s=0;s<n.size[0]/16;s+=1)for(let a=0;a<n.size[2]/16;a+=1)mt(n.version,void 0,"1.17")?hi([s*16,0,a*16],P.DataModel.unwrapLists(e),i):iv([s*16,0,a*16],P.DataModel.unwrapLists(e.placement),i);const o=t.data;t.data.fill(255);for(const[s,a]of i.placements){if(s[0]<0||s[1]<0||s[2]<0||s[0]>=n.size[0]||s[1]>=n.size[1]||s[2]>=n.size[2])continue;const c=s[2]*(t.width*4)+s[0]*4,u=a<Xu.length?Xu[a]:Zc(i.features[a]);o[c]=Vt(50,205,u[0]),o[c+1]=Vt(50,205,u[1]),o[c+2]=Vt(50,205,u[2]),o[c+3]=255}for(let s=0;s<n.size[0];s+=1)for(let a=0;a<n.size[2];a+=1){if((Math.floor(s/16)+Math.floor(a/16))%2===0)continue;const c=a*(t.width*4)+s*4;for(let u=0;u<3;u+=1)o[c+u]=.85*o[c+u]}}function Bi(e){return e.startsWith("minecraft:")?e.slice(10):e}function Wt(e,t){return[[e[0],t,e[2]]]}function ev(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(Bi(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 Vt(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(Vt(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const o=e.distribution.reduce((a,c)=>a+c.weight,0);let s=t.nextInt(o);for(const a of e.distribution)if(s-=a.weight,s<0)return t.sampleInt(a.data);return 0}return 1}function vn(e,t){if(!Xn(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 tv(e,t){var n,r,i,o;if(!Xn(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return vn(e);switch(Bi(e.type)){case"constant":return vn(e.value);case"uniform":{const s=vn(e.min_inclusive),a=vn(e.max_inclusive);return s+t.nextInt(a-s+1)}case"biased_to_bottom":{const s=vn(e.min_inclusive),a=vn(e.max_inclusive),c=t.nextInt(a-s-((n=e.inner)!=null?n:1)+1);return s+t.nextInt(c+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const s=vn(e.min_inclusive),a=vn(e.max_inclusive),c=(i=e.inner)!=null?i:1,u=s+c+t.nextInt(a-s-c+1),l=s+t.nextInt(u-s);return s+t.nextInt(l-s+c)}case"trapezoid":{const s=vn(e.min_inclusive),a=vn(e.max_inclusive),c=(o=e.plateau)!=null?o:0;if(c>=a-s)return s+t.nextInt(a-s+1);const u=(a-s-c)/2,l=a-s-u;return s+t.nextInt(l+1)+t.nextInt(u+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function Ku(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function hi(e,t,n){var o;if(typeof t=="string"){n.placements.push([e,Ku(t,n)]);return}const r=Bi((o=t==null?void 0:t.type)!=null?o:"no_op"),i=nv[r];i?i(t.config,e,n):n.placements.push([e,Ku(JSON.stringify(t),n)])}function wc(e,t,n){var o;const r=Bi((o=t==null?void 0:t.type)!=null?o:"nope"),i=rv[r];return i?i(t==null?void 0:t.config,e,n):[e]}const nv={decorated:(e,t,n)=>{wc(t,e==null?void 0:e.decorator,n).forEach(i=>hi(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;hi(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)){hi(t,o.feature,n);return}hi(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,o,s;const r=(s=e==null?void 0:e.features)==null?void 0:s[n.nextInt((o=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?o:0)];hi(t,r,n)}},rv={chance:(e,t,n)=>{var r;return n.nextFloat()<1/((r=e==null?void 0:e.chance)!=null?r:1)?[t]:[]},count:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t)},count_extra:(e,t,n)=>{var i,o;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(o=e.extra_count)!=null?o:0),new Array(r).fill(t)},count_multilayer:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t).map(i=>[i[0]+n.nextInt(16),i[1],i[2]+n.nextInt(16)])},count_noise:(e,t,n)=>{const i=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(i).fill(t)},count_noise_biased:(e,t,n)=>{var s;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),o=Math.max(0,Math.ceil((i+((s=e.noise_offset)!=null?s:0))*e.noise_to_count_ratio));return new Array(o).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const o=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],s=Math.max(n.seaLevel,Lr[Vt(0,63,o)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[o,s,a]}),decorated:(e,t,n)=>wc(t,e==null?void 0:e.outer,n).flatMap(r=>wc(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,o,s,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((o=e==null?void 0:e.spread)!=null?o:0)-((s=e.spread)!=null?s:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return Wt(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,Lr[Vt(0,63,t[0])]);return Wt(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,Lr[Vt(0,63,t[0])]);return Wt(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,Lr[Vt(0,63,t[0])]);return Wt(t,r)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var r,i;if(n.nextInt(((r=e.chance)!=null?r:1)/10)===0){const o=n.nextInt(n.nextInt(248)+8);if(o<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const s=n.nextInt(16)+t[0],a=n.nextInt(16)+t[2];return[[s,o,a]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,o,s;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0);return Wt(t,r)},range_biased:(e,t,n)=>{var i,o,s;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0));return Wt(t,r)},range_very_biased:(e,t,n)=>{var i,o,s,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return Wt(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return Wt(t,r)},top_solid_heightmap:(e,t)=>{const n=Lr[Vt(0,63,t[0])];return Wt(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return Wt(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var o,s;const n=Lr[Vt(0,63,t[0])],r=n+((o=e==null?void 0:e.min_inclusive)!=null?o:-1/0),i=n+((s=e==null?void 0:e.max_inclusive)!=null?s:1/0);return t[1]<r||t[1]>i?[t]:[]},water_lake:(e,t,n)=>{var r;return n.nextInt((r=e.chance)!=null?r:1)===0?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function iv(e,t,n){var i;let r=[e];for(const o of t)!Ju[Bi((i=o==null?void 0:o.type)!=null?i:"nope")]||(r=r.flatMap(a=>Ju[Bi(o.type)](o,a,n)));for(const o of r)n.placements.push([o,0])}const Ju={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)=>Wt(t,tv(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,Lr[Vt(0,63,e[0])]);return Wt(e,n)},in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},r,i)=>{const o=Math.max(1,t),s=i.biomeInfoNoise.sample(r[0]/o,0,r[2]/o),a=Math.max(0,Math.ceil((s+(n!=null?n:0))*e));return new Array(a).fill(r)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},r,i)=>{const s=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(s).fill(r)},random_offset:({xz_spread:e,y_spread:t},n,r)=>[[n[0]+r.sampleInt(e),n[1]+r.sampleInt(t),n[2]+r.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(e!=null?e:1)?[t]:[]};function ov(e,t,n){const r=Ze.create(n.seed),i=Mn.fromJson(P.DataModel.unwrapLists(e)),o=new Cn(r,i),s=-n.offset[0]-100,a=-n.offset[1]-100,c=t.data;for(let u=0;u<256;u+=1)for(let l=0;l<256;l+=1){const d=u*4+l*4*256,f=(u+s)*n.scale,h=(l+a)*n.scale,w=(o.sample(f,h,0)+1)*128;c[d]=w,c[d+1]=w,c[d+2]=w,c[d+3]=255}}const sv=({model:e,data:t,shown:n,version:r})=>{var k;const{locale:i}=ke(),{project:o}=On(),[s,a]=X(Tn()),[c,u]=X(2),[l,d]=X(void 0),{biomeColors:f}=n2(),h=Te([0,0]),w=Te(1),_=Te(),m=P.DataModel.unwrapLists(e.get(new P.Path(["generator","settings"]))),g=JSON.stringify([t,m]),v=(k=t.type)==null?void 0:k.replace(/^minecraft:/,""),{canvas:b,redraw:x}=Ko({size(){return[200/w.current,200/w.current]},async draw(C){const E={settings:m,biomeColors:f,offset:h.current,scale:c,seed:s,res:w.current,version:r,project:o};await X4(t,C,E),w.current===4&&(clearTimeout(_.current),_.current=setTimeout(()=>{w.current=1,x()},150))},async onDrag(C,E){h.current[0]=h.current[0]+C*200,h.current[1]=h.current[1]+E*200,clearTimeout(_.current),w.current=v==="multi_noise"?4:1,x()},async onHover(C,E){const M={settings:m,biomeColors:f,offset:h.current,scale:c,seed:s,res:1,version:r,project:o},S=await K4(t,Math.floor(C*200),Math.floor(E*200),M);d(S)},onLeave(){d(void 0)}},[r,g,c,s,f,o]);ge(()=>{n&&(w.current=v==="multi_noise"?4:1,x())},[r,g,c,s,n,f,o]);const y=C=>{C=Math.max(1,Math.round(C)),h.current[0]=h.current[0]*c/C,h.current[1]=h.current[1]*c/C,u(C)};return D(me,{children:[D("div",{class:"controls preview-controls",children:[l&&p(se,{label:l.biome,class:"no-pointer"}),p(se,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>y(c*2)}),p(se,{icon:"plus",tooltip:i(Math.round(c)<=1?"zoom_in_limit":"zoom_in"),disabled:Math.round(c)<=1,onClick:()=>y(c/2)}),(v==="multi_noise"||v==="the_end")&&p(se,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>a(Tn())})]}),(l==null?void 0:l.temperature)!==void 0&&p("div",{class:"controls secondary-controls",children:p(se,{class:"no-pointer",label:Object.entries(l).filter(([C])=>C!=="biome").map(([C,E])=>`${C[0].toUpperCase()}: ${E.toFixed(2)}`).join(" ")})}),p("canvas",{ref:b,width:"200",height:"200"})]})},av=({data:e,version:t,shown:n})=>{const{locale:r}=ke(),[i,o]=X(4),[s,a]=X(Tn()),c=JSON.stringify(e),{canvas:u,redraw:l}=Ko({size(){return[i*16,i*16]},async draw(d){Q4(e,d,{seed:s,version:t,size:[i*16,128,i*16]})}},[t,c,s]);return ge(()=>{n&&l()},[t,c,i,s,n]),D(me,{children:[D("div",{class:"controls preview-controls",children:[p(se,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>o(Math.min(16,i+1))}),p(se,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>o(Math.max(1,i-1))}),p(se,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(Tn())})]}),p("canvas",{ref:u,width:"64",height:"64"})]})},lv=({data:e,shown:t,version:n})=>{var g,v;const{locale:r}=ke(),{project:i}=On(),[o,s]=X(Tn()),[a,c]=X(!1),[u,l]=X(void 0),d=Te(0),f=Te(void 0),h=JSON.stringify([e]),w=(v=(g=e==null?void 0:e.noise)==null?void 0:g.height)!=null?v:256,{canvas:_,redraw:m}=Ko({size(){return[w,w]},async draw(b){const x={offset:d.current,width:b.width,seed:o,version:n,project:i};await W4(e,b,x)},async onDrag(b){d.current+=b*w,m()},async onHover(b,x){var C,E;const y=Math.floor(b*w-d.current),k=w-Math.max(1,Math.ceil(x*w))+((E=(C=e==null?void 0:e.noise)==null?void 0:C.min_y)!=null?E:0);l(`X=${y} Y=${k}`)},onLeave(){l(void 0)}},[n,h,o,i]);return ge(()=>{f.current&&clearInterval(f.current),t&&(m(),a&&(f.current=setInterval(()=>{d.current-=8,m()},100)))},[n,h,o,i,t,a]),D(me,{children:[D("div",{class:"controls preview-controls",children:[u&&p(se,{label:u,class:"no-pointer"}),p(Ht,{icon:"gear",tooltip:r("terrain_settings"),children:p(se,{icon:a?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>c(!a)})}),p(se,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(Tn())})]}),p("canvas",{ref:_,width:w,height:w})]})},cv=({data:e,shown:t,version:n})=>{const{locale:r}=ke(),[i,o]=X(Tn()),[s,a]=X(2),c=Te([0,0]),u=JSON.stringify([e]),{canvas:l,redraw:d}=Ko({size(){return[256,256]},async draw(h){const w={offset:c.current,scale:s,seed:i,version:n};ov(e,h,w)},async onDrag(h,w){c.current[0]=c.current[0]+h*256,c.current[1]=c.current[1]+w*256,d()}},[n,u,s,i]);ge(()=>{t&&d()},[n,u,s,i,t]);const f=h=>{c.current[0]=c.current[0]*s/h,c.current[1]=c.current[1]*s/h,a(h)};return D(me,{children:[D("div",{class:"controls preview-controls",children:[p(se,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>f(s*1.5)}),p(se,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>f(s/1.5)}),p(se,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Tn())})]}),p("canvas",{ref:l,width:"256",height:"256"})]})},uv=({data:e,shown:t,version:n})=>{var E,M;const{locale:r}=ke(),{project:i}=On(),[o,s]=X(Tn()),[a,c]=X("minecraft:plains"),[u,l]=X(.2),[d,f]=X(.1),[h,w]=X(!1),[_,m]=X(void 0),g=Te(0),v=Te(void 0),b=JSON.stringify([e,u,d]),x=(M=(E=e==null?void 0:e.noise)==null?void 0:E.height)!=null?M:256,{canvas:y,redraw:k}=Ko({size(){return[x,x]},async draw(S){const T={biome:a,biomeDepth:d,biomeScale:u,offset:g.current,width:S.width,seed:o,version:n,project:i};await G4(e,S,T)},async onDrag(S){g.current+=S*x,k()},async onHover(S,T){var H,N;const L=Math.floor(S*x-g.current),F=x-Math.max(1,Math.ceil(T*x))+((N=(H=e==null?void 0:e.noise)==null?void 0:H.min_y)!=null?N:0),K=Y4(L,F);m(K?`Y=${F} (${K.getName().path})`:`Y=${F}`)},onLeave(){m(void 0)}},[b,o,i]);ge(()=>{v.current&&clearInterval(v.current),t&&(async()=>{try{await k(),h&&(v.current=setInterval(()=>{g.current-=8,k()},100))}catch(S){throw S}})()},[n,b,o,i,t,a,u,d,h]);const C=ye(()=>{var S;return(S=mo==null?void 0:mo.get("worldgen/biome"))!=null?S:[]},[n]);return D(me,{children:[D("div",{class:"controls preview-controls",children:[_&&p(se,{label:_,class:"no-pointer"}),D(Ht,{icon:"gear",tooltip:r("terrain_settings"),children:[mt(n,void 0,"1.17")?D(me,{children:[p(Ps,{label:r("preview.scale"),value:`${u}`,onChange:S=>l(Number(S))}),p(Ps,{label:r("preview.depth"),value:`${d}`,onChange:S=>f(Number(S))})]}):p(Ps,{label:r("preview.biome"),value:a,onChange:c,dataList:C,larger:!0}),p(se,{icon:h?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>w(!h)})]}),p(se,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(Tn())})]}),p("canvas",{ref:y,width:x,height:x})]})},dv=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function fv({model:e,version:t,id:n,shown:r}){var o;const[,i]=X(0);if(Na(e,()=>{i(s=>s+1)}),!e)return p(me,{});if(n==="dimension"&&((o=e.get(new P.Path(["generator","type"])))==null?void 0:o.endsWith("noise"))){const s=e.get(new P.Path(["generator","biome_source"]));if(s)return p(sv,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/density_function"){const s=e.get(new P.Path([]));if(s)return p(lv,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise"){const s=e.get(new P.Path([]));if(s)return p(cv,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise_settings"){const s=e.get(new P.Path([]));if(s)return p(uv,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&mt(t,"1.16","1.17")){const s=e.get(new P.Path([]));if(s)return p(av,{model:e,version:t,shown:r,data:s})}return p(me,{})}function hv({onClose:e}){const{locale:t}=ke(),{projects:n,createProject:r,changeProject:i,updateProject:o}=On(),[s,a]=X(""),[c,u]=X(""),[l,d]=X(rw),[f,h]=X(void 0),[w,_]=X(!1),m=k=>{k.type.match(/^application\/(x-)?zip(-compressed)?$/)&&(s.length===0&&a(k.name.replace(/\.zip$/,"").replaceAll(/[ _-]+/g," ")),h(k))},g=Te(o);ge(()=>{g.current=o},[o]);const v=()=>{_(!0),r(s,c||void 0,l),i(s),f?P3(f).then(async k=>{const C={files:[]};await Promise.all(k.map(async E=>{const M=e2(E[0]);if(M)try{const S=await Xh(E[1],"json");C.files.push(Ne(he({},M),{data:S}))}catch(S){console.error(`Failed parsing ${M.type} ${M.id}: ${Gt(S)}`)}})),g.current(C),e()}).catch(()=>{e()}):e()},b=ye(()=>n.map(k=>k.name.trim().toLowerCase()).includes(s.trim().toLowerCase()),[n,s]),x=ye(()=>!(c.length===0||c.match(/^(?:[a-z0-9._-]+:)?[a-z0-9/._-]+$/)),[c]),y=Le.versions.map(k=>k.id).reverse();return D(Da,{class:"project-creation",onDismiss:e,children:[p("p",{children:t("project.create")}),D("div",{class:"input-group",children:[p(fn,{autofocus:!0,class:`btn btn-input${!w&&(b||s.length===0)?" invalid":""}`,placeholder:t("project.name"),value:s,onChange:a}),!w&&b&&p("div",{class:"status-icon danger tooltipped tip-e","aria-label":t("project.name.already_exists"),children:pe.issue_opened})]}),D("div",{class:"input-group",children:[p(fn,{class:`btn btn-input${!w&&x?" invalid":""}`,placeholder:t("project.namespace"),value:c,onChange:u}),!w&&x&&p("div",{class:"status-icon danger tooltipped tip-e","aria-label":t("project.namespace.invalid"),children:pe.issue_opened})]}),p(Ht,{icon:"tag",label:l,tooltip:t("switch_version"),"data-cy":"version-switcher",children:y.map(k=>p(se,{label:k,active:k===l,onClick:()=>d(k)}))}),p(Sw,{value:f,onChange:m,label:t("choose_zip_file"),accept:".zip"}),p(se,{icon:"rocket",label:"Create!",disabled:w||b||s.length===0||x,onClick:v})]})}function pv({onClose:e}){const{locale:t}=ke(),{projects:n,project:r,deleteProject:i}=On(),o=()=>{Se.deleteProject(n.length,r.files.length,"menu"),i(r.name),e()};return D(Da,{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")})}),D("div",{class:"button-group",children:[p(se,{icon:"trashcan",label:t("project.delete"),onClick:o,class:"danger"}),p(se,{label:t("project.cancel"),onClick:e})]})]})}const Ir="/";function rp({entries:e,onSelect:t,selected:n,actions:r,errors:i,indent:o}){const s=ye(()=>{var f;const d={};for(const h of e){const w=h.indexOf(Ir);if(w>=0){const _=h.slice(0,w);((f=d[_])!=null?f:d[_]=[]).push(h.slice(w+1))}}return Object.entries(d).map(([h,w])=>{const _=r==null?void 0:r.map(g=>Ne(he({},g),{onAction:v=>g.onAction(h+Ir+v)})),m=i==null?void 0:i.flatMap(g=>g.path.startsWith(h+Ir)?[Ne(he({},g),{path:g.path.slice(h.length+Ir.length)})]:[]);return[h,w,_,m]}).sort()},[e,r,i]),a=ye(()=>e.filter(d=>!d.includes(Ir)),[e]),[c,u]=X(new Set),l=d=>{c.has(d)?c.delete(d):c.add(d),u(new Set(c))};return D("div",{class:"tree-view",style:`--indent: ${o!=null?o:0};`,children:[s.map(([d,f,h,w])=>{var _;return D("div",{children:[p(Qu,{icon:c.has(d)?"chevron_right":"chevron_down",label:d,onClick:()=>l(d),error:((_=w==null?void 0:w.length)!=null?_:0)>0},d),!c.has(d)&&p(rp,{entries:f,onSelect:m=>t(`${d}${Ir}${m}`),selected:n!=null&&n.startsWith(d+Ir)?n.substring(d.length+1):void 0,actions:h,errors:w,indent:(o!=null?o:0)+1})]})}),a.map(d=>{var f;return p(Qu,{icon:"file",label:d,active:d===n,onClick:()=>t(d),actions:r==null?void 0:r.map(h=>Ne(he({},h),{onAction:()=>h.onAction(d)})),error:(f=i==null?void 0:i.find(h=>h.path===d))==null?void 0:f.message},d)})]})}function Qu({icon:e,label:t,active:n,onClick:r,actions:i,error:o}){const[s,a]=Oa();return D("div",{class:`entry${o?" has-error":""}${n?" active":""}${s?" focused":""}`,onClick:r,onContextMenu:u=>{u.preventDefault(),i!=null&&i.length&&a()},children:[pe[e],p("span",{children:t.replaceAll("\u2215","/")}),typeof o=="string"&&p("div",{class:"status-icon danger tooltipped tip-se","aria-label":o,children:pe.issue_opened}),s&&p("div",{class:"entry-menu",children:i==null?void 0:i.map(u=>D("div",{class:"action",onClick:l=>{u.onAction(""),l.stopPropagation(),a(!1)},children:[pe[u.icon],u.label]}))})]})}function mv({onRename:e,onCreate:t,onDeleteProject:n}){const{locale:r}=ke(),{version:i}=Er(),{projects:o,project:s,changeProject:a,file:c,openFile:u,updateFile:l}=On(),[d,f]=X(He.getTreeViewMode()),h=Ve(y=>{He.setTreeViewMode(y),Se.setTreeViewMode(y),f(y)},[]),w=Ve(y=>{if(d==="resources"&&y!=="pack.mcmeta"){const[k,C]=y.split("/");return{type:k.replaceAll("\u2215","/"),id:C.replaceAll("\u2215","/")}}return e2(y)},[d]),_=ye(()=>s.files.flatMap(y=>{const k=gl(y);return k?y.type==="pack_mcmeta"?"pack.mcmeta":d==="resources"?[`${y.type.replaceAll("/","\u2215")}/${y.id.replaceAll("/","\u2215")}`]:[k]:[]}),[d,...s.files]),m=ye(()=>c&&gl(c),[c]),g=Ve(y=>{const k=w(y);k&&u(k.type,k.id)},[w]),v=Te(null),b=async()=>{if(!v.current)return;let y=!1;const k=s.files.flatMap(E=>{const M=gl(E);return M===void 0?[]:(M==="pack.mcmeta"&&(y=!0),[[M,lc(E.data)]])});if(!y){const E=Le.versions.find(M=>M.id===i).pack_format;k.push(["pack.mcmeta",lc({pack:{pack_format:E,description:""}})])}const C=await $3(k);v.current.setAttribute("href",C),v.current.setAttribute("download",`${s.name.replaceAll(" ","_")}.zip`),v.current.click()},x=ye(()=>[{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&&(Se.deleteProjectFile(k.type,o.length,s.files.length,"menu"),l(k.type,k.id,{}))}}],[w,l,e]);return D(me,{children:[D("div",{class:"project-controls",children:[p(Ht,{icon:"chevron_down",label:s.name,tooltip:r("switch_project"),tooltipLoc:"se",children:o.map(y=>p(se,{label:y.name,active:y.name===s.name,onClick:()=>a(y.name)}))}),D(Ht,{icon:"kebab_horizontal",children:[p(se,{icon:"file_zip",label:r("project.download"),onClick:b}),p(se,{icon:"plus_circle",label:r("project.new"),onClick:t}),p(se,{icon:d==="resources"?"three_bars":"rows",label:r(d==="resources"?"project.show_file_paths":"project.show_resources"),onClick:()=>h(d==="resources"?"files":"resources")}),s.name!==vr.name&&p(se,{icon:"trashcan",label:r("project.delete"),onClick:n})]})]}),p("div",{class:"file-view",children:_.length===0?p("span",{children:r("project.no_files")}):p(rp,{entries:_,selected:m,onSelect:g,actions:x})}),p("a",{ref:v,style:"display: none;"})]})}function vc(e,t){return e.schema.hook(gv,new P.ModelPath(e),e.data,{blockStates:t})}const gv={base({},e,t){return t},choice({switchNode:e},t,n,r){return e.hook(this,t,n,r)},list({children:e},t,n,r){if(!Array.isArray(n))return n;const i=n.map((o,s)=>e.hook(this,t.push(s),o.node,r));for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i},map({children:e,config:t},n,r,i){var a,c;if(r===void 0)return;const o=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(c=i.blockStates)==null?void 0:c[P.relativePath(n,t.validation.params.id).get()]:null,s={};Object.keys(r).forEach(u=>{var l;o&&!Object.keys((l=o.properties)!=null?l:{}).includes(u)||(s[u]=e.hook(this,n.push(u),r[u],i))});for(const u of Object.getOwnPropertySymbols(r))s[u]=r[u];return s},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},o=e(t);Object.keys(o).filter(s=>o[s].enabled(t)).forEach(s=>{const a=o[s].hook(this,t.push(s),n[s],r);a!=null&&(i[s]=a)});for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i}};function _v({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:o,copySuccess:s,onError:a}){const{locale:c}=ke(),[u,l]=X(He.getIndent()),[d,f]=X(He.getFormat()),[h,w]=X(He.getHighlighting()),[_,m]=X(!1),g=Te(null),v=Te(()=>{}),b=Te(async()=>{}),x=Te(null),y=Te(),k=Ve((S,T)=>{const L=vc(S,T);return lc(L,d,u)},[u,d]);ge(()=>{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}`,a(S)):a(`Error getting JSON output: ${Gt(S)}`),console.error(S),y.current.setValue("")}},b.current=async()=>{if(!y.current)return;const S=y.current.getValue();if(S.length!==0)try{const T=await Xh(S,d);t==null||t.reset(P.DataModel.wrapLists(T),!1)}catch(T){T instanceof Error?(T.message=`Error importing: ${T.message}`,a(T)):a(`Error importing: ${Gt(T)}`),console.error(T)}}},[t,n,u,d,h]),ge(()=>{h?(m(!1),y.current={getValue(){return""},setValue(){},configure(){},select(){}},be(()=>import("./index.8ac52a74.js").then(function(S){return S.i}),[]).then(async S=>{await Promise.all([be(()=>import("./json.c327d69b.js").then(function(L){return L.j}),[]),be(()=>import("./yaml.e8f3b9ab.js"),[])]);const T=S.edit("editor");T.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),T.$blockScrolling=1/0,T.on("blur",()=>b.current()),T.getSession().setMode("ace/mode/json"),y.current={getValue(){return T.getSession().getValue()},setValue(L){T.getSession().setValue(L)},configure(L,F){T.setOption("useSoftTabs",L!=="tabs"),T.setOption("tabSize",L==="tabs"?4:dw(L)),T.getSession().setMode(`ace/mode/${F}`)},select(){T.selectAll()}},m(!0)})):y.current={getValue(){return x.current?x.current.value:""},setValue(S){!x.current||(x.current.value=S)},configure(){},select(){}}},[h]),Na(t,()=>{!v.current||v.current()}),ge(()=>{!v.current||t&&v.current()},[t]),ge(()=>{!y.current||!v.current||(!h||_)&&(y.current.configure(u,d),v.current())},[u,d,h,_]),ge(()=>{r&&t&&n&&navigator.clipboard.writeText(k(t,n)).then(()=>{s()})},[r]),ge(()=>{if(i&&t&&n&&g.current){const S=encodeURIComponent(k(t,n));g.current.setAttribute("href",`data:text/json;charset=utf-8,${S}`);const T=e==="pack_mcmeta"?"pack.mcmeta":`${e}.${d}`;g.current.setAttribute("download",T),g.current.click()}},[i]),ge(()=>{o&&y.current&&(y.current.setValue(""),y.current.select())},[o]);const C=S=>{He.setIndent(S),l(S)},E=S=>{He.setFormat(S),f(S)},M=S=>{He.setHighlighting(S),w(S)};return D(me,{children:[p("div",{class:"controls source-controls",children:D(Ht,{icon:"gear",tooltip:c("output_settings"),"data-cy":"source-controls",children:[fw().map(S=>p(se,{label:c(`indentation.${S}`),active:u===S,onClick:()=>C(S)})),p("hr",{}),hw().map(S=>p(se,{label:c(`format.${S}`),active:d===S,onClick:()=>E(S)})),p("hr",{}),p(se,{icon:h?"square_fill":"square",label:c("highlighting"),onClick:()=>M(!h)})]})}),h?p("pre",{id:"editor",class:"source"}):p("textarea",{ref:x,class:"source",spellcheck:!1,autocorrect:"off",onBlur:b.current}),p("a",{ref:g,style:"display: none;"})]})}function ip(e,t){for(var n in t)e[n]=t[n];return e}function xc(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 bc(e){this.props=e}function op(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:xc(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Zt(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(bc.prototype=new Kt).isPureReactComponent=!0,bc.prototype.shouldComponentUpdate=function(e,t){return xc(this.props,e)||xc(this.state,t)};var ed=le.__b;le.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ed&&ed(e)};var wv=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function vv(e){function t(n){var r=ip({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=wv,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var td=function(e,t){return e==null?null:Jt(Jt(e).map(t))},xv={map:td,forEach:td,count:function(e){return e?Jt(e).length:0},only:function(e){var t=Jt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Jt},bv=le.__e;le.__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)}bv(e,t,n,r)};var nd=le.unmount;function Us(){this.__u=0,this.t=null,this.__b=null}function sp(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function yv(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return Zt(n,o)}return i.displayName="Lazy",i.__f=!0,i}function co(){this.u=null,this.o=null}le.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),nd&&nd(e)},(Us.prototype=new Kt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=sp(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function d(f,h,w){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(_){return d(_,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}(u,u.__c.__P,u.__c.__O)}var l;for(r.setState({__e:r.__b=null});l=r.t.pop();)l.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},Us.prototype.componentWillUnmount=function(){this.t=[]},Us.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function o(s,a,c){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),s.__c.__H=null),(s=ip({},s)).__c!=null&&(s.__c.__P===c&&(s.__c.__P=a),s.__c=null),s.__k=s.__k&&s.__k.map(function(u){return o(u,a,c)})),s}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&Zt(Wn,null,e.fallback);return i&&(i.__h=null),[Zt(Wn,null,t.__e?null:e.children),i]};var rd=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 kv(e){return this.getChildContext=function(){return e.context},e.children}function Cv(e){var t=this,n=e.i;t.componentWillUnmount=function(){Vr(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)}}),Vr(Zt(kv,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ev(e,t){var n=Zt(Cv,{__v:e,i:t});return n.containerInfo=t,n}(co.prototype=new Kt).__e=function(e){var t=this,n=sp(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),rd(t,e,r)):i()};n?n(o):o()}},co.prototype.render=function(e){this.u=null,this.o=new Map;var t=Jt(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},co.prototype.componentDidUpdate=co.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){rd(e,n,t)})};var ap=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Av=/^(?: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]/,Sv=typeof document!="undefined",Iv=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Mv(e,t,n){return t.__k==null&&(t.textContent=""),Vr(e,t),typeof n=="function"&&n(),e?e.__c:null}function Tv(e,t,n){return Ac(e,t),typeof n=="function"&&n(),e?e.__c:null}Kt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Kt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var id=le.event;function Lv(){}function Ov(){return this.cancelBubble}function Nv(){return this.defaultPrevented}le.event=function(e){return id&&(e=id(e)),e.persist=Lv,e.isPropagationStopped=Ov,e.isDefaultPrevented=Nv,e.nativeEvent=e};var lp,od={configurable:!0,get:function(){return this.class}},sd=le.vnode;le.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 s=n[o];Sv&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&s==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===!0?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!Iv(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&&Av.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():s===null&&(s=void 0),/^oninput/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=s)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Jt(n.children).forEach(function(a){a.props.selected=r.value.indexOf(a.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=Jt(n.children).forEach(function(a){a.props.selected=r.multiple?r.defaultValue.indexOf(a.props.value)!=-1:r.defaultValue==a.props.value})),e.props=r,n.class!=n.className&&(od.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",od))}e.$$typeof=ap,sd&&sd(e)};var ad=le.__r;le.__r=function(e){ad&&ad(e),lp=e.__c};var Rv={ReactCurrentDispatcher:{current:{readContext:function(e){return lp.__n[e.__c].props.value}}}};function Dv(e){return Zt.bind(null,e)}function cp(e){return!!e&&e.$$typeof===ap}function Fv(e){return cp(e)?Sc.apply(null,arguments):e}function Pv(e){return!!e.__k&&(Vr(null,e),!0)}function $v(e){return e&&(e.base||e.nodeType===1&&e)||null}var Bv=function(e,t){return e(t)},Vv=function(e,t){return e(t)},yc={useState:X,useReducer:ef,useEffect:ge,useLayoutEffect:tf,useRef:Te,useImperativeHandle:tm,useMemo:ye,useCallback:Ve,useContext:Jr,useDebugValue:nm,version:"17.0.2",Children:xv,render:Mv,hydrate:Tv,unmountComponentAtNode:Pv,createPortal:Ev,createElement:Zt,createContext:kr,createFactory:Dv,cloneElement:Fv,createRef:Bd,Fragment:Wn,isValidElement:cp,findDOMNode:$v,Component:Kt,PureComponent:bc,memo:op,forwardRef:vv,flushSync:Vv,unstable_batchedUpdates:Bv,StrictMode:Wn,Suspense:Us,SuspenseList:co,lazy:yv,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Rv};class up 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 jv=["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"],zv=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],Hv=["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"],Uv=["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"],Zv=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],Gv=["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"],ld=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],Yv=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],Wv='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z"></path></svg>',qv=e=>Le.generators.find(t=>t.id===e.replace(/^\$/,"")),Xv=new P.DataModel(P.MapNode(P.StringNode(),P.StringNode()),{historyMax:0});function Kv({model:e,lang:t,version:n,blockStates:r}){var c;const i=new P.ModelPath(e),[o,s,a]=e.schema.hook(dp,i,Gc(e.data),t,n,r,{});return(c=s==null?void 0:s.props)!=null&&c.children.some(u=>u)?D("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i),children:[D("div",{class:"node-header",children:[o,s]}),p("div",{class:"node-body",children:a})]}):a}const dp={base(){return[null,null,null]},boolean(e,t,n,r,i,o,s){return[null,p(Jv,Ne(he({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s})),null]},choice({choices:e,config:t,switchNode:n},r,i,o,s,a,c){const u=n.activeCase(r,!0),l=t!=null&&t.context?new P.ModelPath(r.getModel(),new P.Path(r.getArray(),[t.context])):r,[d,f,h]=u.node.hook(this,l,i,o,s,a,c);if(e.length===1)return[d,f,h];const w=t!=null&&t.choiceContext?new P.Path([],[t.choiceContext]):t!=null&&t.context?new P.Path([],[t.context]):r,_=g=>{var y;const v=(y=e.find(k=>k.type===g))!=null?y:u,b=v.node.default(),x=v.change?v.change(P.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(b==null?void 0:b.type)==="minecraft:decorated"?b.config.feature:b;r.model.set(r,P.DataModel.wrapLists(x))},m=p("select",{value:u.type,onChange:g=>_(g.target.value),children:e.map(g=>p("option",{value:g.type,children:wa(o,w.contextPush(g.type))}))});return[d,D(me,{children:[m,f]}),h]},list({children:e,config:t},n,r,i,o,s,a){const{expand:c,collapse:u,isToggled:l}=Nl(),[d,f]=X(50),h=n.getContext().join(".");if(Gv.includes(h)){const v=D(me,{children:[[...Array(t.maxLength)].map((x,y)=>p(uo,{lang:i,path:n.modelPush(y)})),p("div",{class:"fixed-list"})]}),b=p(me,{children:[...Array(t.maxLength)].map((x,y)=>{var C;return e.hook(this,n.modelPush(y),(C=r==null?void 0:r[y])==null?void 0:C.node,i,o,s,a)[1]})});return[v,b,null]}const w=()=>{Array.isArray(r)||(r=[]);const v=P.DataModel.wrapLists(e.default());n.model.set(n,[{node:v,id:Pr()},...r])},_=()=>{Array.isArray(r)||(r=[]);const v=P.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:v,id:Pr()}])},m=p("button",{class:"add tooltipped tip-se","aria-label":Me(i,"add_top"),onClick:w,children:pe.plus_circle}),g=D(me,{children:[r&&Array.isArray(r)&&r.map(({node:v,id:b},x)=>{if(x===d)return D("div",{class:"node node-header",children:[p("label",{children:Me(i,"entries_hidden",`${r.length-d}`)}),p("button",{onClick:()=>f(Math.min(d+50,r.length)),children:Me(i,"entries_hidden.more","50")}),p("button",{onClick:()=>f(r.length),children:Me(i,"entries_hidden.all")})]});if(x>d)return null;const y=n.push(x).contextPush("entry"),k=e.type(y)==="object",C=l(b);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("."))&&Xn(v)&&typeof v.type=="string"&&v.type.replace(/^minecraft:/,"")==="item"&&typeof v.name=="string"){const F=`item/${v.name.replace(/^minecraft:/,"")}`;mo.get("texture").includes("minecraft:"+F)?E=p("img",{src:Q3(o,F),alt:"",onError:K=>K.currentTarget.outerHTML=Wv}):E=pe.package}if(k&&(C===!1||C===void 0&&r.length>20))return D("div",{class:"node node-header","data-category":e.category(y),children:[p(uo,{lang:i,path:y,nested:!0}),p("button",{class:"toggle tooltipped tip-se","aria-label":`${Me(i,"expand")}
|
|
${Me(i,"expand_all","Ctrl")}`,onClick:c(b),children:pe.chevron_right}),p("label",{children:E!=null?E:wa(i,y,`${x}`)}),p(cd,{path:y,value:v,schema:e},b)]});const M=()=>y.set(void 0),S=()=>{const F=[...n.get()];[F[x-1],F[x]]=[F[x],F[x-1]],n.model.set(n,F)},T=()=>{const F=[...n.get()];[F[x+1],F[x]]=[F[x],F[x+1]],n.model.set(n,F)};return D(Rl,{label:E,path:y,schema:e,value:v,lang:i,version:o,states:s,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const F=[...n.get()];F.splice(x,0,{id:Pr(),node:Gc(v)}),n.model.set(n,F)}}],ctx:Ne(he({},a),{index:(x===0?1:0)+(x===r.length-1?2:0)}),children:[k&&p("button",{class:"toggle tooltipped tip-se","aria-label":`${Me(i,"collapse")}
|
|
${Me(i,"collapse_all","Ctrl")}`,onClick:u(b),children:pe.chevron_down}),p("button",{class:"remove tooltipped tip-se","aria-label":Me(i,"remove"),onClick:M,children:pe.trashcan}),r.length>1&&D("div",{class:"node-move",children:[p("button",{class:"move tooltipped tip-se","aria-label":Me(i,"move_up"),onClick:S,disabled:x===0,children:pe.chevron_up}),p("button",{class:"move tooltipped tip-se","aria-label":Me(i,"move_down"),onClick:T,disabled:x===r.length-1,children:pe.chevron_down})]})]},b)}),r&&r.length>0&&r.length<=d&&p("div",{class:"node node-header",children:p("button",{class:"add tooltipped tip-se","aria-label":Me(i,"add_bottom"),onClick:_,children:pe.plus_circle})})]});return[null,m,g]},map({children:e,keys:t,config:n},r,i,o,s,a,c){var v,b,x,y,k;const{expand:u,collapse:l,isToggled:d}=Nl(),f=new P.ModelPath(Xv,new P.Path([n9(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"?a==null?void 0:a[P.relativePath(r,n.validation.params.id).get()]:null,_=w!=null&&w.properties?P.StringNode(null,{enum:Object.keys((b=w.properties)!=null?b:{})}):t;if(w&&r.last()==="Properties"){typeof i!="object"&&(i={});const C=Object.entries((x=w.properties)!=null?x:{}).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,s,a,c)}const m=D(me,{children:[_.hook(this,f,(k=f.get())!=null?k:"",o,s,a,c)[1],p("button",{class:"add tooltipped tip-se","aria-label":Me(o,"add"),onClick:h,children:pe.plus_circle})]}),g=p(me,{children:typeof i=="object"&&Object.entries(i).map(([C,E])=>{var K,H,N,j;const M=r.modelPush(C),S=e.type(M)==="object",T=d(C);if(S&&(T===!1||T===void 0&&i.length>20))return D("div",{class:"node node-header","data-category":e.category(M),children:[p(uo,{lang:o,path:M,nested:!0}),p("button",{class:"toggle tooltipped tip-se","aria-label":`${Me(o,"expand")}
|
|
${Me(o,"expand_all","Ctrl")}`,onClick:u(C),children:pe.chevron_right}),p("label",{children:C}),p(cd,{path:M,value:E,schema:e},C)]});const L=w?P.StringNode(null,{enum:(H=(K=w.properties)==null?void 0:K[C])!=null?H:[]}):e;((N=w==null?void 0:w.properties)==null?void 0:N[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 D(Rl,{schema:L,path:M,value:E,lang:o,version:s,states:a,ctx:c,label:C,children:[S&&p("button",{class:"toggle tooltipped tip-se","aria-label":`${Me(o,"collapse")}
|
|
${Me(o,"collapse_all","Ctrl")}`,onClick:l(C),children:pe.chevron_down}),p("button",{class:"remove tooltipped tip-se","aria-label":Me(o,"remove"),onClick:F,children:pe.trashcan})]},C)})});return[null,m,g]},number(e,t,n,r,i,o,s){return[null,p(Qv,Ne(he({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s})),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,o,s,a,c,u){var v;const{expand:l,collapse:d,isToggled:f}=Nl();if(i.getArray().length==0&&r9(t.context,o)){const{wrapper:b,fields:x}=i9(n(i),i,o);o=b.data,n=()=>x,r=(y,k)=>new P.ModelPath(b,new P.Path(y.getArray(),["feature"])).push(k)}let h=null,w=null;if(e.optional())if(o===void 0){const b=()=>i.set(P.DataModel.wrapLists(e.default()));w=p("button",{class:"collapse closed tooltipped tip-se","aria-label":Me(s,"expand"),onClick:b,children:pe.plus_circle})}else{const b=()=>i.set(void 0);w=p("button",{class:"collapse open tooltipped tip-se","aria-label":Me(s,"remove"),onClick:b,children:pe.trashcan})}const _=i.getContext().join(".");if(Yv.includes(_)||ld.includes(_)){const b=f(""),x=ld.includes(_)?b:!b;if(h=p(me,{children:p("button",{class:"toggle tooltipped tip-se","aria-label":Me(s,x?"collapse":"expand"),onClick:b?d(""):l(""),children:x?pe.chevron_down:pe.chevron_right})}),!x)return[h,w,null]}const m=typeof o=="object"&&o!==null&&((v=e.default())==null?void 0:v.pools)?Ne(he({},u),{loot:o==null?void 0:o.type}):u,g=p(me,{children:typeof o=="object"&&o!==null&&!(e.optional()&&o===void 0)&&Object.entries(n(i)).filter(([b,x])=>x.enabled(i)).map(([b,x])=>{const y=r(i,b),k=y.getContext().join(".");if(zv.includes(k))return null;const[C,E,M]=x.hook(this,y,o[b],s,a,c,m),S=x.type(y)==="object"&&Hv.includes(k),T=Uv.includes(k);return S||T?(h=D(me,{children:[h,p(uo,{lang:s,path:y}),p(fp,{lang:s,path:y}),C]}),w=D(me,{children:[w,E]}),S?M:null):p(Rl,{schema:x,path:y,value:o[b],lang:s,version:a,states:c,ctx:m},b)})});return[h,w,g]},string(e,t,n,r,i,o,s){return[null,p(e9,Ne(he({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s})),null]}};function cd({path:e,value:t}){var r,i,o,s,a;switch(e.getContext().join(".")){case"loot_table.pools.entry":return D("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:(a=(o=t==null?void 0:t.name)==null?void 0:o.replace(/^minecraft:/,""))!=null?a:(s=t==null?void 0:t.type)==null?void 0:s.replace(/^minecraft:/,"")})}for(const c of Object.values(t!=null?t:{}))if(typeof c=="string")return p("label",{children:c.replace(/^minecraft:/,"")});return null}function Nl(){const[e,t]=X(new Map),[n,r]=X(void 0);return{expand:a=>c=>{c.ctrlKey?(t(new Map),r(!0)):t(u=>new Map(u.set(a,!0)))},collapse:a=>c=>{c.ctrlKey?(t(new Map),r(!1)):t(u=>new Map(u.set(a,!1)))},isToggled:a=>{var c;return e instanceof Map?(c=e.get(a))!=null?c:n:!1}}}function Jv({path:e,node:t,value:n,lang:r}){const i=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return D(me,{children:[p("button",{class:n===!1?"selected":"",onClick:()=>i(!1),children:Me(r,"false")}),p("button",{class:n===!0?"selected":"",onClick:()=>i(!0),children:Me(r,"true")})]})}function Qv({path:e,config:t,integer:n,value:r,lang:i}){var a;const o=c=>{const u=c.target.value,l=n?parseInt(u):parseFloat(u);e.model.set(e,l)},s=c=>{const u=c.target.value,l=parseInt(u.slice(1),16);e.model.set(e,l)};return D(me,{children:[p("input",{type:"text",value:r!=null?r:"",onBlur:o,onKeyDown:c=>{c.key==="Enter"&&o(c)}}),(t==null?void 0:t.color)&&p("input",{type:"color",value:"#"+((a=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?a:"000000"),onChange:s}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&p("button",{onClick:()=>I3(e.model),class:"tooltipped tip-se","aria-label":Me(i,"generate_new_seed"),children:pe.sync})]})}function e9({path:e,getValues:t,config:n,node:r,value:i,lang:o,version:s,states:a}){var f,h,w;const c=_=>{_.stopPropagation();const m=_.target.value;m!==i&&e.model.set(e,m.length===0?void 0:m)},u=t(),l=e.getContext().join("."),d=!oo(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(Zv.includes(l))return p("textarea",{value:i!=null?i:"",onBlur:c});if(oo(n)&&!n.additional||jv.includes(l)){let _=new P.Path([]);return oo(n)&&typeof n.enum=="string"?_=_.contextPush(n.enum):d?_=_.contextPush(d):oo(n)&&(_=e),D("select",{value:i!=null?i:"",onChange:c,children:[r.optional()&&p("option",{value:"",children:Me(o,"unset")}),u.map(m=>p("option",{value:m,children:wa(o,_.contextPush(m.replace(/^minecraft:/,"")))}))]})}else if(!oo(n)&&(n==null?void 0:n.validator)==="block_state_key"){const _=a==null?void 0:a[P.relativePath(e,n.params.id).get()],m=Object.keys((f=_==null?void 0:_.properties)!=null?f:{});return p("select",{value:i!=null?i:"",onChange:c,children:m.map(g=>p("option",{children:g}))})}else{const{biomeColors:_,setBiomeColor:m}=n2(),g=typeof i=="string"?i.includes(":")?i:"minecraft:"+i:"unknown",v=Pr(),b=d?qv(d):void 0;return D(me,{children:[p("input",{value:i!=null?i:"",onBlur:c,onKeyDown:x=>{x.key==="Enter"&&c(x)},list:u.length>0?v:""}),u.length>0&&p("datalist",{id:v,children:u.map(x=>p("option",{value:x}))}),["generator_biome.biome"].includes(l)&&p("input",{type:"color",value:N3((w=(h=_[g])!=null?h:np[g])!=null?w:Zc(g)),onChange:x=>m(g,R3(x.currentTarget.value))}),["attribute_modifier.id","text_component_object.hoverEvent.show_entity.contents.id"].includes(l)&&p("button",{onClick:()=>e.set(S3()),class:"tooltipped tip-se","aria-label":Me(o,"generate_new_uuid"),children:pe.sync}),b&&u.includes(i)&&i.startsWith("minecraft:")&&p("a",{href:`/${b.url}/?version=${s}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":Me(o,"follow_reference"),children:pe.link_external})]})}}function t9({label:e,schema:t,path:n,value:r,lang:i,version:o,states:s,ctx:a,actions:c,children:u}){var x;const l=t.type(n),d=t.category(n),f=n.getContext().join("."),[h,w]=Oa(),_=y=>{y.preventDefault(),w()},m=Ne(he({},a),{depth:((x=a.depth)!=null?x:0)+1});delete m.index;const[g,v,b]=t.hook(dp,n,r,i,o,s,m);return D("div",{class:`node ${l}-node`,"data-category":d,children:[D("div",{class:"node-header",onContextMenu:_,children:[p(uo,{lang:i,path:n}),p(fp,{lang:i,path:n}),u,g,D("label",{children:[e!=null?e:wa(i,n,`${n.last()}`),h&&D("div",{class:"node-menu",children:[c==null?void 0:c.map(y=>{var k;return D("div",{class:"menu-item",children:[p(se,{icon:y.icon,tooltip:Me(i,y.label),tooltipLoc:"se",onClick:()=>y.onSelect()}),p("span",{children:(k=y.description)!=null?k:Me(i,y.label)})]},y.label)}),D("div",{class:"menu-item",children:[p(se,{icon:"clippy",tooltip:Me(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(f)}),p("span",{children:f})]})]})]}),v]}),b&&p("div",{class:"node-body",children:b})]})}const Rl=op(t9,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&Pi(e.ctx,t.ctx)&&Pi(e.value,t.value));function oo(e){return!!(e!=null&&e.enum)}function n9(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 wa(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const o=r.slice(i).join("."),s=Me(e,o,...n);if(o!==s)return s}return r[r.length-1]}function uo({lang:e,path:t,nested:n}){var o;t.model instanceof up&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(s=>s.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=Me(e,r[0].error,...(o=r[0].params)!=null?o:[]);return hp("node-error","issue_opened",i)}function fp({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=Me(e,n);return r===n?null:hp("node-help","info",r)}const hp=(e,t,n)=>{const[r,i]=Oa();return D("div",{class:`node-icon ${e}${r?" show":""}`,onClick:()=>i(),children:[pe[t],p("span",{class:"icon-popup",children:n})]})};function r9(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&Xn(t==null?void 0:t.config)}function i9(e,t,n){const r=[],i=fo(n,r),o={type:e.type,config:P.ObjectNode({decorators:P.ListNode(Zh),feature:Gh},{context:"feature.decorated"})},s=P.ObjectNode(o,{context:"feature"}),a=new P.Path(["config","feature"]),c=new P.Path(["config","decorators"]),u=t.getModel(),l=new up(s,d=>{if(d.startsWith(a))return new P.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);if(d.startsWith(c)){if(d.modelArr.length===2)return new P.Path([]);const f=d.modelArr[2];if(typeof f=="number")return new P.Path([...[...Array(f)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)])}return d},d=>{if(d.equals(c)){const f=[];return fo(u.data,f),f}return u.get(l.map(d))},(d,f,h)=>{if(d.startsWith(a)){const w=[];fo(u.data,w);const _=new P.Path([...[...Array(w.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);return u.set(_,f,h)}else if(d.startsWith(c)){const w=d.modelArr[2];if(d.modelArr.length===2){const _=l.get(a);return u.set(new P.Path,kc(_,f),h)}else if(typeof w=="number")if(d.modelArr.length===3&&f===void 0){const _=l.get(a),m=[];fo(u.data,m),m.splice(w,1);const g=kc(_,m);return u.set(new P.Path,g,h)}else{const _=new P.Path([...[...Array(w)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)]);return u.set(_,f,h)}}u.set(d,f,h)});return l.data={type:u.data.type,config:{decorators:r,feature:i}},l.errors=u.errors,{fields:o,wrapper:l}}function fo(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!Xn(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),fo((r=e.config.feature)!=null?r:"",t))}function kc(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:kc(e,t)}}}function o9({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=ke();if(!t||!n||i==="none")return p(me,{});const[o]=nf(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(o)return p(me,{});const[,s]=X(0);return Na(t,()=>{s(a=>a+1)}),p("div",{class:"tree","data-cy":"tree",children:p(Kv,{model:t,lang:i,version:e,blockStates:n})})}var s9=Object.defineProperty,a9=Object.defineProperties,l9=Object.getOwnPropertyDescriptors,ud=Object.getOwnPropertySymbols,c9=Object.prototype.hasOwnProperty,u9=Object.prototype.propertyIsEnumerable,dd=(e,t,n)=>t in e?s9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pp=(e,t)=>{for(var n in t||(t={}))c9.call(t,n)&&dd(e,n,t[n]);if(ud)for(var n of ud(t))u9.call(t,n)&&dd(e,n,t[n]);return e};const fd="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function ks(e){return`[giscus] An error occurred. Error message: "${e}".`}function hd(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function d9(){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 f9(e){const[t,n]=X(""),r=function({repo:s,repoId:a,category:c="",categoryId:u="",mapping:l,term:d="",theme:f="light",reactionsEnabled:h="1",emitMetadata:w="0",inputPosition:_="bottom",lang:m="en",session:g,origin:v}){const b=new URL(location.href);b.searchParams.delete("giscus");const x=b.toString(),y={origin:v=v||x,session:g,theme:f,reactionsEnabled:h,emitMetadata:w,inputPosition:_,repo:s,repoId:a,category:c,categoryId:u,description:hd("description")};switch(l){case"url":y.term=x;break;case"title":y.term=document.title;break;case"og:title":y.term=hd("title");break;case"specific":y.term=d;break;case"number":y.number=d;break;case"pathname":default:y.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${m}/widget?${new URLSearchParams(y)}`}((i=pp({},e),a9(i,l9({session:t}))));var i;const o=Te(null);return ge(()=>{const s=location.href,a=new URL(s),c=localStorage.getItem("giscus-session"),u=a.searchParams.get("giscus")||"";if(u)return localStorage.setItem("giscus-session",JSON.stringify(u)),n(u),a.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,a.toString());if(c)try{n(JSON.parse(c||"")||"")}catch(l){n(""),localStorage.removeItem("giscus-session"),console.warn(`${ks(l==null?void 0:l.message)} Session has been cleared.`)}},[]),ge(d9,[]),ge(()=>{const s=function(a,c=null){return function(u){if(u.origin!=="https://giscus.app")return;const{data:l}=u;if(typeof l!="object"||!l.giscus||(c&&l.giscus.resizeHeight&&(c.style.height=`${l.giscus.resizeHeight}px`),!l.giscus.error))return;const d=l.giscus.error;if(d.includes("Bad credentials")||d.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),a(),void console.warn(`${ks(d)} Session has been cleared.`);console.error(`${ks(d)} No session is stored initially. ${fd}`)}d.includes("Discussion not found")?console.warn(`[giscus] ${d}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${ks(d)} ${fd}`)}}(()=>n(""),o.current);return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[]),yc.createElement("div",{className:"giscus"},yc.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:o}))}function h9(e){const[t,n]=X(!1);return ge(()=>n(!0),[]),t?yc.createElement(f9,pp({},e)):null}function u0({term:e}){const{actualTheme:t}=i2(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return p("div",{class:"giscus-container",children:p(h9,{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 Cc(){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 p9(e){const t=Cc().find(n=>n.id===e);return t===void 0?{id:e,title:"Unknown Guide"}:t}function Bo({id:e,minimal:t,activeTags:n,toggleTag:r}){const{title:i,versions:o,tags:s}=ye(()=>p9(e),[e]),a=c=>u=>{r&&r(c),u.preventDefault(),u.stopImmediatePropagation()};return p(Yc,{title:i,overlay:!t&&(o==null?void 0:o.join(" \u2022 ")),link:`/guides/${e}/`,children:p("div",{class:"badges-list",children:s==null?void 0:s.sort().map(c=>p(Gi,{label:c,onClick:a(c),active:n==null?void 0:n.includes(c)}))})})}const pd={system:"device_desktop",dark:"moon",light:"sun"};function m9(){const{lang:e,locale:t,changeLocale:n}=ke(),{theme:r,changeTheme:i}=i2(),{version:o}=Er(),{projects:s,project:a,changeProject:c}=On(),{title:u}=hn(),l=Oi(),d=Bh(l);return D("header",{children:[D("div",{class:"title",children:[p(Jd,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link",children:Vi.home}),p("h1",{children:u}),d&&p(Ht,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher",children:Le.generators.filter(f=>{var h,w;return((h=f.tags)==null?void 0:h[0])===((w=d==null?void 0:d.tags)==null?void 0:w[0])&&mt(o,f.minVersion)}).map(f=>p(se,{label:t(f.partner?`partner.${f.partner}.${f.id}`:f.id),active:f.id===d.id,onClick:()=>Xr(wr(f.url))}))}),!d&&l.match(/\/?project\/?$/)&&p(Ht,{icon:"chevron_down",tooltip:t("switch_project"),children:s.map(f=>p(se,{label:f.name,active:f.name===a.name,onClick:()=>c(f.name)}))})]}),p("nav",{children:D("ul",{children:[p("li",{"data-cy":"language-switcher",children:p(Ht,{icon:"globe",tooltip:t("language"),children:Le.languages.map(({code:f,name:h})=>p(se,{label:h,active:f===e,onClick:()=>n(f)}))})}),p("li",{"data-cy":"theme-switcher",children:p(Ht,{icon:pd[r],tooltip:t("theme"),children:Object.entries(pd).map(([f,h])=>p(se,{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:pe.mark_github})})]})})]})}const ui=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"})}),md=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"})}),Vi={home:D("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:D("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:D("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:D("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":ui,"tag/entity_type":ui,"tag/fluid":ui,"tag/game_event":ui,"tag/item":ui,"tag/worldgen/biome":ui,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":D("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":md,"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":md,"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"})})},pe={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:D("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:D("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:D("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 g9({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:o,onEdit:s,onDelete:a,delayedPlay:c}){const{locale:u}=ke(),{version:l}=Er(),[d,f]=X(!0),[h,w]=X(!1),[_,m]=X(!1),g=Te([]),v=`playsound minecraft:${n} master @s ~ ~ ~ ${o} ${i}`;ge(()=>{var S,T,L;const M=t[n];m(((T=(S=M==null?void 0:M.sounds)==null?void 0:S.length)!=null?T:0)===0),g.current.forEach(F=>F.stop()),g.current=((L=M==null?void 0:M.sounds)!=null?L:[]).map(F=>{const K=typeof F=="string"?F:F.name,H=J3(l,K),N=e({src:[H],format:["ogg"],volume:o,rate:i});N.on("end",()=>{w(!1)});const j=()=>{d&&g.current.every(Z=>Z.state()==="loaded")&&f(!1)};return N.state()==="loaded"?setTimeout(()=>j()):N.on("load",()=>{j()}),N}),f(!0)},[n,t]),ge(()=>{g.current.forEach(M=>M.rate(i))},[i]),ge(()=>{g.current.forEach(M=>M.volume(o))},[o]);const b=()=>{if(d||_)return;x();const M=Math.floor(Math.random()*g.current.length);g.current[M].play(),w(!0)},x=()=>{g.current.forEach(M=>M.stop())};ge(()=>{c&&setTimeout(()=>b(),r*50)},[c]),ge(()=>()=>x(),[]);const[y,k]=X(!1),C=Te(void 0),E=()=>{navigator.clipboard.writeText(v),k(!0),C.current!==void 0&&clearTimeout(C.current),C.current=setTimeout(()=>{k(!1)},2e3)};return D("div",{class:`sound-config${d?" loading":h?" playing":""}${_?" invalid":""}`,children:[p(se,{class:"play",icon:_?"alert":d?"sync":"play",label:u("sounds.play"),onClick:b,tooltip:u(_?"sounds.unknown_sound":d?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),p(fn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:M=>s({sound:M})}),D("label",{class:"delay-label",children:[u("sounds.delay"),": "]}),p(Mw,{class:"btn btn-input delay",min:0,value:r,onChange:M=>s({delay:M})}),D("label",{class:"pitch-label",children:[u("sounds.pitch"),": "]}),p(ou,{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=>s({pitch:M})}),D("label",{class:"volume-label",children:[u("sounds.volume"),": "]}),p(ou,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":o.toFixed(2),style:`--x: ${o*100}%`,value:o,onChange:M=>s({volume:M})}),p(se,{class:`copy${y?" active":""}`,icon:y?"check":"terminal",label:u("copy"),tooltip:u(y?"copied":"sounds.copy_command"),onClick:E}),p(se,{class:"remove",icon:"trashcan",tooltip:u("sounds.remove_sound"),onClick:()=>{a(),x()}})]})}function Yn({title:e,desc:t,link:n,icon:r,titleIcon:i}){return r||t?D("a",{class:"tool-card",href:n,children:[r&&Vi[r],D("div",{children:[p(gd,{title:e,titleIcon:i}),p("p",{children:t})]})]}):p("a",{class:"tool-card",href:n,children:p(gd,{title:e,titleIcon:i})})}function gd({title:e,titleIcon:t}){return D("h3",{children:[e,t&&(t in pe?pe[t]:Vi[t])]})}function yr({title:e,titleIcon:t,link:n,children:r}){return D("div",{class:"tool-group",children:[n===void 0?p("div",{class:"tool-card",children:p("h3",{children:e})}):p(Yn,{title:e,titleIcon:t,link:n}),r&&p("div",{class:"tool-body",children:r})]})}function Gi({label:e,active:t,onClick:n}){const r=e==="breaking"?5:$h(e)%360;return D("div",{class:`badge${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n,children:[e==="breaking"&&pe.alert,e]})}function mp(){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 Yi=mp();function _9(e){Yi=e}const w9=/[&<>"']/,v9=/[&<>"']/g,x9=/[<>"']|&(?!#?\w+;)/,b9=/[<>"']|&(?!#?\w+;)/g,y9={"&":"&","<":"<",">":">",'"':""","'":"'"},_d=e=>y9[e];function ht(e,t){if(t){if(w9.test(e))return e.replace(v9,_d)}else if(x9.test(e))return e.replace(b9,_d);return e}const k9=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function gp(e){return e.replace(k9,(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 C9=/(^|[^\[])\^/g;function We(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(C9,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const E9=/[^\w:]/g,A9=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function wd(e,t,n){if(e){let r;try{r=decodeURIComponent(gp(n)).replace(E9,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!A9.test(n)&&(n=T9(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Cs={},S9=/^[^:]+:\/*[^/]*$/,I9=/^([^:]+:)[\s\S]*$/,M9=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T9(e,t){Cs[" "+e]||(S9.test(e)?Cs[" "+e]=e+"/":Cs[" "+e]=Zs(e,"/",!0)),e=Cs[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(I9,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(M9,"$1")+t:e+t}const va={exec:function(){}};function pn(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 vd(e,t){const n=e.replace(/\|/g,(o,s,a)=>{let c=!1,u=s;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),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 Zs(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 L9(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 _p(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 xd(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function bd(e,t,n,r){const i=t.href,o=t.title?ht(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:o,text:ht(s)}}function O9(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(`
|
|
`)}class d0{constructor(t){this.options=t||Yi}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:Zs(r,`
|
|
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=O9(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=Zs(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,o,s,a,c,u,l,d,f,h,w,_=n[1].trim();const m=_.length>1,g={type:"list",raw:"",ordered:m,start:m?+_.slice(0,-1):"",loose:!1,items:[]};_=m?`\\d{1,9}\\${_.slice(-1)}`:`\\${_}`,this.options.pedantic&&(_=m?_:"[*+-]");const 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),l=n[2].split(`
|
|
`,1)[0],d=t.split(`
|
|
`,1)[0],this.options.pedantic?(s=2,h=l.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,h=l.slice(s),s+=n[1].length),c=!1,!l&&/^ *$/.test(d)&&(r+=d+`
|
|
`,t=t.substring(d.length+1),w=!0),!w){const x=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(f=t.split(`
|
|
`,1)[0],l=f,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!x.test(l));){if(l.search(/[^ ]/)>=s||!l.trim())h+=`
|
|
`+l.slice(s);else if(!c)h+=`
|
|
`+l;else break;!c&&!l.trim()&&(c=!0),r+=f+`
|
|
`,t=t.substring(f.length+1)}}g.loose||(u?g.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(h),i&&(o=i[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!i,checked:o,loose:!1,text:h}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=h.trimRight(),g.raw=g.raw.trimRight();const b=g.items.length;for(a=0;a<b;a++){this.lexer.state.top=!1,g.items[a].tokens=this.lexer.blockTokens(g.items[a].text,[]);const x=g.items[a].tokens.filter(k=>k.type==="space"),y=x.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});!g.loose&&x.length&&y&&(g.loose=!0,g.items[a].loose=!0)}return g}}html(t){const n=this.rules.block.html.exec(t);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(n[0]):ht(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:vd(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,o,s,a,c;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]=vd(r.rows[o],r.header.length).map(u=>({text:u}));for(i=r.header.length,s=0;s<i;s++)r.header[s].tokens=[],this.lexer.inlineTokens(r.header[s].text,r.header[s].tokens);for(i=r.rows.length,s=0;s<i;s++)for(c=r.rows[s],a=0;a<c.length;a++)c[a].tokens=[],this.lexer.inlineTokens(c[a].text,c[a].tokens);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n){const r={type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r={type:"paragraph",raw:n[0],text:n[1].charAt(n[1].length-1)===`
|
|
`?n[1].slice(0,-1):n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}text(t){const n=this.rules.block.text.exec(t);if(n){const r={type:"text",raw:n[0],text:n[0],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:ht(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]):ht(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const s=Zs(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=L9(n[2],"()");if(s>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],o=s[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),bd(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 bd(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(r===""||this.rules.inline.punctuation.exec(r))){const s=i[0].length-1;let a,c,u=s,l=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(i=d.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(c=a.length,i[3]||i[4]){u+=c;continue}else if((i[5]||i[6])&&s%3&&!((s+c)%3)){l+=c;continue}if(u-=c,u>0)continue;if(c=Math.min(c,c+u+l),Math.min(s,c)%2){const h=t.slice(1,s+i.index+c);return{type:"em",raw:t.slice(0,s+i.index+c+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}const f=t.slice(2,s+i.index+c-1);return{type:"strong",raw:t.slice(0,s+i.index+c+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=ht(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=ht(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=ht(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=ht(this.options.mangle?n(r[0]):r[0]),o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);i=ht(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]):ht(r[0]):r[0]:i=ht(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const ce={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:va,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;ce.def=We(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex();ce.bullet=/(?:[*+-]|\d{1,9}[.)])/;ce.listItemStart=We(/^( *)(bull) */).replace("bull",ce.bullet).getRegex();ce.list=We(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex();ce._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";ce._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;ce.html=We(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();ce.paragraph=We(ce._paragraph).replace("hr",ce.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",ce._tag).getRegex();ce.blockquote=We(ce.blockquote).replace("paragraph",ce.paragraph).getRegex();ce.normal=pn({},ce);ce.gfm=pn({},ce.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});ce.gfm.table=We(ce.gfm.table).replace("hr",ce.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",ce._tag).getRegex();ce.gfm.paragraph=We(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ce.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",ce._tag).getRegex();ce.pedantic=pn({},ce.normal,{html:We(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._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:va,paragraph:We(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const re={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:va,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:va,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};re._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";re.punctuation=We(re.punctuation).replace(/punctuation/g,re._punctuation).getRegex();re.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;re.escapedEmSt=/\\\*|\\_/g;re._comment=We(ce._comment).replace("(?:-->|$)","-->").getRegex();re.emStrong.lDelim=We(re.emStrong.lDelim).replace(/punct/g,re._punctuation).getRegex();re.emStrong.rDelimAst=We(re.emStrong.rDelimAst,"g").replace(/punct/g,re._punctuation).getRegex();re.emStrong.rDelimUnd=We(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=We(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=We(re.tag).replace("comment",re._comment).replace("attribute",re._attribute).getRegex();re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;re._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;re.link=We(re.link).replace("label",re._label).replace("href",re._href).replace("title",re._title).getRegex();re.reflink=We(re.reflink).replace("label",re._label).replace("ref",ce._label).getRegex();re.nolink=We(re.nolink).replace("ref",ce._label).getRegex();re.reflinkSearch=We(re.reflinkSearch,"g").replace("reflink",re.reflink).replace("nolink",re.nolink).getRegex();re.normal=pn({},re);re.pedantic=pn({},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:We(/^!?\[(label)\]\((.*?)\)/).replace("label",re._label).getRegex(),reflink:We(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",re._label).getRegex()});re.gfm=pn({},re.normal,{escape:We(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=We(re.gfm.url,"i").replace("email",re.gfm._extended_email).getRegex();re.breaks=pn({},re.gfm,{br:We(re.br).replace("{2,}","*").getRegex(),text:We(re.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function N9(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 yd(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 Jn{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Yi,this.options.tokenizer=this.options.tokenizer||new d0,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:ce.normal,inline:re.normal};this.options.pedantic?(n.block=ce.pedantic,n.inline=re.pedantic):this.options.gfm&&(n.block=ce.gfm,this.options.breaks?n.inline=re.breaks:n.inline=re.gfm),this.tokenizer.rules=n}static get rules(){return{block:ce,inline:re}}static lex(t,n){return new Jn(n).lex(t)}static lexInline(t,n){return new Jn(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,i,o,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
`+r.raw,i.text+=`
|
|
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
`+r.raw,i.text+=`
|
|
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const c=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(l){u=l.call({lexer:this},c),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],s&&i.type==="paragraph"?(i.raw+=`
|
|
`+r.raw,i.text+=`
|
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),s=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
|
`+r.raw,i.text+=`
|
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,i,o,s=t,a,c,u;if(this.tokens.links){const l=Object.keys(this.tokens.links);if(l.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+xd("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+xd("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(c||(u=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(l=>(r=l.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,s,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,yd)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,yd))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let l=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(function(h){f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(l=Math.min(l,f))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(r=this.tokenizer.inlineText(o,N9)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),c=!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 l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}}class f0{constructor(t){this.options=t||Yi}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+ht(i,!0)+'">'+(r?t:ht(t,!0))+`</code></pre>
|
|
`:"<pre><code>"+(r?t:ht(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=wd(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+ht(t)+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=wd(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 wp{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 vp{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 Qn{constructor(t){this.options=t||Yi,this.options.renderer=this.options.renderer||new f0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new wp,this.slugger=new vp}static parse(t,n){return new Qn(n).parse(t)}static parseInline(t,n){return new Qn(n).parseInline(t)}parse(t,n=!0){let r="",i,o,s,a,c,u,l,d,f,h,w,_,m,g,v,b,x,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,gp(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(d="",l="",a=h.header.length,o=0;o<a;o++)l+=this.renderer.tablecell(this.parseInline(h.header[o].tokens),{header:!0,align:h.align[o]});for(d+=this.renderer.tablerow(l),f="",a=h.rows.length,o=0;o<a;o++){for(u=h.rows[o],l="",c=u.length,s=0;s<c;s++)l+=this.renderer.tablecell(this.parseInline(u[s].tokens),{header:!1,align:h.align[s]});f+=this.renderer.tablerow(l)}r+=this.renderer.table(d,f);continue}case"blockquote":{f=this.parse(h.tokens),r+=this.renderer.blockquote(f);continue}case"list":{for(w=h.ordered,_=h.start,m=h.loose,a=h.items.length,f="",o=0;o<a;o++)v=h.items[o],b=v.checked,x=v.task,g="",v.task&&(y=this.renderer.checkbox(b),m?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}):g+=y),g+=this.parse(v.tokens,m),f+=this.renderer.listitem(g,x,b);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,s;const a=t.length;for(i=0;i<a;i++){if(o=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(s=this.options.extensions.renderers[o.type].call({parser:this},o),s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){r+=s||"";continue}switch(o.type){case"escape":{r+=n.text(o.text);break}case"html":{r+=n.html(o.text);break}case"link":{r+=n.link(o.href,o.title,this.parseInline(o.tokens,n));break}case"image":{r+=n.image(o.href,o.title,o.text);break}case"strong":{r+=n.strong(this.parseInline(o.tokens,n));break}case"em":{r+=n.em(this.parseInline(o.tokens,n));break}case"codespan":{r+=n.codespan(o.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(o.tokens,n));break}case"text":{r+=n.text(o.text);break}default:{const c='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(c);return}else throw new Error(c)}}}return r}}function ve(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=pn({},ve.defaults,t||{}),_p(t),n){const r=t.highlight;let i;try{i=Jn.lex(e,t)}catch(a){return n(a)}const o=function(a){let c;if(!a)try{t.walkTokens&&ve.walkTokens(i,t.walkTokens),c=Qn.parse(i,t)}catch(u){a=u}return t.highlight=r,a?n(a):n(null,c)};if(!r||r.length<3||(delete t.highlight,!i.length))return o();let s=0;ve.walkTokens(i,function(a){a.type==="code"&&(s++,setTimeout(()=>{r(a.text,a.lang,function(c,u){if(c)return o(c);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),s--,s===0&&o()})},0))}),s===0&&o();return}try{const r=Jn.lex(e,t);return t.walkTokens&&ve.walkTokens(r,t.walkTokens),Qn.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>"+ht(r.message+"",!0)+"</pre>";throw r}}ve.options=ve.setOptions=function(e){return pn(ve.defaults,e),_9(ve.defaults),ve};ve.getDefaults=mp;ve.defaults=Yi;ve.use=function(...e){const t=pn({},...e),n=ve.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const s=n.renderers?n.renderers[o.name]:null;s?n.renderers[o.name]=function(...a){let c=o.renderer.apply(this,a);return c===!1&&(c=s.apply(this,a)),c}: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=ve.defaults.renderer||new f0;for(const s in i.renderer){const a=o[s];o[s]=(...c)=>{let u=i.renderer[s].apply(o,c);return u===!1&&(u=a.apply(o,c)),u}}t.renderer=o}if(i.tokenizer){const o=ve.defaults.tokenizer||new d0;for(const s in i.tokenizer){const a=o[s];o[s]=(...c)=>{let u=i.tokenizer[s].apply(o,c);return u===!1&&(u=a.apply(o,c)),u}}t.tokenizer=o}if(i.walkTokens){const o=ve.defaults.walkTokens;t.walkTokens=function(s){i.walkTokens.call(this,s),o&&o.call(this,s)}}r&&(t.extensions=n),ve.setOptions(t)})};ve.walkTokens=function(e,t){for(const n of e)switch(t.call(ve,n),n.type){case"table":{for(const r of n.header)ve.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)ve.walkTokens(i.tokens,t);break}case"list":{ve.walkTokens(n.items,t);break}default:ve.defaults.extensions&&ve.defaults.extensions.childTokens&&ve.defaults.extensions.childTokens[n.type]?ve.defaults.extensions.childTokens[n.type].forEach(function(r){ve.walkTokens(n[r],t)}):n.tokens&&ve.walkTokens(n.tokens,t)}};ve.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=pn({},ve.defaults,t||{}),_p(t);try{const n=Jn.lexInline(e,t);return t.walkTokens&&ve.walkTokens(n,t.walkTokens),Qn.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>"+ht(n.message+"",!0)+"</pre>";throw n}};ve.Parser=Qn;ve.parser=Qn.parse;ve.Renderer=f0;ve.TextRenderer=wp;ve.Lexer=Jn;ve.lexer=Jn.lex;ve.Tokenizer=d0;ve.Slugger=vp;ve.parse=ve;Qn.parse;Jn.lex;function xp({change:e,minimal:t,activeTags:n,toggleTag:r}){return D(Yc,{overlay:!t&&D(me,{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(i=>p(Gi,{label:i,onClick:r?()=>r(i):void 0,active:n==null?void 0:n.includes(i)}))}),p("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:ve(e.content)}})]})}const R9="search";function bp({changes:e,defaultOrder:t,limit:n,navigation:r}){var g,v;const{locale:i}=ke(),[o,s]=zr(R9),[a,c]=zh(),u=ye(()=>{const b=(o!=null?o:"").split(" ").map(x=>x.trim().toLowerCase()).filter(x=>x.length>0);return b.length===0&&a.length===0?e:e==null?void 0:e.filter(x=>{if(!a.every(k=>x.tags.includes(k)))return!1;const y=`${x.group} ${x.version} ${x.tags.join(" ")} ${x.content.toLowerCase()}`;return b.every(k=>k.startsWith("!")?k.length===1||!y.includes(k.slice(1)):y.includes(k))})},[e,o,a]),[l,d]=X(t==="desc"),f=ye(()=>u==null?void 0:u.sort((b,x)=>l?x.order-b.order:b.order-x.order),[u,l]),[h,w]=X(!0),_=ye(()=>!h||(n!=null?n:-1)<0?f:f==null?void 0:f.slice(0,n),[f,h,n,l]),m=((g=f==null?void 0:f.length)!=null?g:0)-((v=_==null?void 0:_.length)!=null?v:0);return D(me,{children:[D("div",{class:"navigation",children:[r,p(fn,{class:"btn btn-input query-search",list:"sound-list",placeholder:i("changelog.search"),value:o,onChange:b=>s(b,!0)}),p(se,{icon:l?"sort_desc":"sort_asc",label:l?"Newest first":"Oldest first",onClick:()=>d(!l)})]}),a.length>0&&p("div",{class:"badges-list",children:a.map(b=>p(Gi,{label:b,onClick:()=>c(b)}))}),D("div",{class:"card-column",children:[_===void 0?p(me,{children:p("span",{class:"note",children:i("loading")})}):_.length===0?p(me,{children:p("span",{class:"note",children:i("changelog.no_results")})}):p(me,{children:_.map(b=>p(xp,{change:b,activeTags:a,toggleTag:c}))}),m>0&&p(se,{label:i("changelog.show_more",`${m}`),onClick:()=>w(!1)})]})]})}function D9({id:e,version:t}){var c,u;const{locale:n}=ke(),[r,i]=X("changelog"),{value:o}=Cr(qc,[]),s=ye(()=>o==null?void 0:o.filter(l=>l.version===e||l.group===e),[e,o]),a=t&&G3(t.id);return p(me,{children:D("div",{class:"version-detail",children:[p("h2",{children:(c=t==null?void 0:t.name)!=null?c:e}),p("div",{class:"version-info",children:t?D(me,{children:[p(jn,{label:n("versions.released"),value:yp(t)}),p(jn,{label:n("versions.release_target"),value:t.release_target,link:t.id!==t.release_target?`/versions/?id=${t.release_target}`:void 0}),p(jn,{label:n("versions.data_version"),value:t.data_version}),p(jn,{label:n("versions.protocol_version"),value:t.protocol_version}),p(jn,{label:n("versions.data_pack_format"),value:t.data_pack_version}),p(jn,{label:n("versions.resource_pack_format"),value:t.resource_pack_version})]}):((u=s==null?void 0:s.length)!=null?u: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."})}),D("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")}),a&&D("a",{href:a,target:"_blank",children:[n("versions.article"),pe.link_external]})]}),D("div",{class:"version-tab",children:[r==="changelog"&&p(bp,{changes:s,defaultOrder:"asc"}),r==="discussion"&&p(u0,{term:`version/${e}/`})]})]})})}function yp(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function F9({version:e,link:t}){const{locale:n}=ke();return D("a",{class:"version-entry",href:t,children:[p("span",{class:"version-id",children:e.id}),p(jn,{label:n("versions.released"),value:yp(e),compact:!0}),p(jn,{label:n("versions.data_version"),value:e.data_version,optional:!0}),p(jn,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0})]})}const P9="misode_include_snapshots",$9="search";function B9({versions:e,link:t,navigation:n}){const{locale:r}=ke(),[i,o]=jh(P9,!0,u=>u==="true",u=>`${u}`),[s,a]=zr($9),c=ye(()=>e==null?void 0:e.filter(u=>u.type==="snapshot"&&!i?!1:u.id.includes(s!=null?s:"")),[e,i,s]);return D(me,{children:[D("div",{class:"navigation",children:[n,p(fn,{class:"btn btn-input query-search",placeholder:r("versions.search"),value:s,onChange:a}),p(Iw,{label:"Include snapshots",value:i,onChange:o})]}),p("div",{class:"version-list",children:c===void 0?p("span",{class:"note",children:r("loading")}):c.length===0?p("span",{class:"note",children:r("versions.no_results")}):c.map(u=>p(F9,{version:u,link:t==null?void 0:t(u.id)}))})]})}function jn({label:e,value:t,link:n,compact:r,optional:i}){return D("div",{class:`version-metadata${i?" version-metadata-hide":""}`,children:[D("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:pe.link_external})]})}function ns({value:e,allowed:t,hasAny:n,onChange:r,onAny:i}){const{locale:o}=ke(),s=ye(()=>t||Le.versions.map(a=>a.id).reverse(),[t]);return D(Ht,{class:`version-switcher${He.getVersion()===null?" attention":""}`,icon:"tag",label:e!=null?e:o("any_version"),tooltip:o("switch_version"),children:[n&&p(se,{label:o("any_version"),onClick:i,active:!e}),s.map(a=>p(se,{label:a,active:a===e,onClick:()=>r(a)}))]})}function V9({}){const{locale:e}=ke();hn(e("title.changelog"));const{value:t,error:n}=Cr(qc,[]);return D("main",{children:[n&&p(Ai,{error:n}),p("div",{class:"container changelog",children:p(bp,{changes:t,defaultOrder:"desc",limit:100,navigation:p(so,{link:"/versions/",icon:"three_bars",label:e("versions.all")})})}),p(Nn,{})]})}const Dl="share";function j9({}){var Y,te;const{locale:e}=ke(),{version:t,changeVersion:n,changeTargetVersion:r}=Er(),{projects:i,project:o,file:s,updateProject:a,updateFile:c}=On(),[u,l]=X(null),[d,f]=nf();if(d)return d.message=`Something went wrong rendering the generator: ${d.message}`,p("main",{children:p(Ai,{error:d,onDismiss:f})});const h=Bh(Oi());if(!h)return p("main",{children:p(Ai,{error:`Cannot find generator "${Oi()}"`})});const w=ye(()=>Le.versions.filter(U=>mt(U.id,h.minVersion,h.maxVersion)).map(U=>U.id).reverse(),[h.minVersion,h.maxVersion]);hn(e("title.generator",e(h.partner?`partner.${h.partner}.${h.id}`:h.id)),w),mt(t,h.minVersion)||l(`The minimum version for this generator is ${h.minVersion}`),mt(t,void 0,h.maxVersion)||l(`This generator is not available in versions above ${h.maxVersion}`),ge(()=>He.visitGenerator(h.id),[h.id]);const[_,m]=zr("preset"),[g,v]=zr(Dl),b=Te(!1),x=ye(()=>He.getBackup(h.id),[h.id]),y=()=>{x!==void 0&&(C==null||C.reset(P.DataModel.wrapLists(x),!1))},{value:k}=Cr(async()=>{let U;if(_&&g)return v(void 0),$s;if(_)U=await j(_);else if(g){const qe=await uw(g);let ut=!1;if(qe.version&&qe.version!==t&&(n(qe.version,!1),ut=!0),qe.type&&qe.type!==h.id){const nn=Le.generators.find(is=>is.id===qe.type);nn&&(Xr(`${wr(nn.url)}?${Dl}=${qe.id}`),ut=!0)}if(ut)return $s;qe.show_preview&&!et&&(_t(!0),de(!1)),Se.openSnippet(h.id,g,t),U=qe.data}else if(s){if(o.version&&o.version!==t)return n(o.version,!1),$s;U=s.data}const[oe,Ke]=await Promise.all([ow(t,h.id),aw(t)]);return U&&(b.current=!0,oe.reset(P.DataModel.wrapLists(U),!1)),Se.setGenerator(h.id),{model:oe,blockStates:Ke}},[h.id,t,g,_,o.name,s==null?void 0:s.id]),C=k==null?void 0:k.model,E=k==null?void 0:k.blockStates;Na(C,U=>{if(b.current||(m(void 0,!0),v(void 0,!0)),s&&U&&E){const oe=vc(U,E);c(h.id,s.id,{id:s.id,data:oe})}b.current=!1,He.setBackup(h.id,P.DataModel.unwrapLists(U.data)),l(null)},[h.id,m,v,E,s==null?void 0:s.id]);const M=()=>{var U;Se.resetGenerator(h.id,(U=C==null?void 0:C.historyIndex)!=null?U:1,"menu"),C==null||C.reset(P.DataModel.wrapLists(C.schema.default()),!0)},S=U=>{var oe;U.stopPropagation(),Se.undoGenerator(h.id,(oe=C==null?void 0:C.historyIndex)!=null?oe:1,"menu"),C==null||C.undo()},T=U=>{var oe;U.stopPropagation(),Se.redoGenerator(h.id,(oe=C==null?void 0:C.historyIndex)!=null?oe:1,"menu"),C==null||C.redo()},L=U=>{var oe,Ke;U.ctrlKey&&U.key==="z"?(Se.undoGenerator(h.id,(oe=C==null?void 0:C.historyIndex)!=null?oe:1,"hotkey"),C==null||C.undo()):U.ctrlKey&&U.key==="y"&&(Se.redoGenerator(h.id,(Ke=C==null?void 0:C.historyIndex)!=null?Ke:1,"hotkey"),C==null||C.redo())},F=U=>{U.ctrlKey&&U.key==="s"&&(V("hotkey"),U.preventDefault(),U.stopPropagation())};ge(()=>(document.addEventListener("keyup",L),document.addEventListener("keydown",F),()=>{document.removeEventListener("keyup",L),document.removeEventListener("keydown",F)}),[C,E,s]);const[K,H]=X([]);ge(()=>{sw(t).then(U=>{H(U.get(h.id).map(oe=>oe.startsWith("minecraft:")?oe.slice(10):oe))}).catch(U=>{console.error(U),l(U)})},[t,h.id]);const N=U=>{Se.loadPreset(h.id,U),v(void 0,!0),r(t,!0),m(U)},j=async U=>{var oe,Ke,qe;try{const ut=await Hh(t,(oe=h.path)!=null?oe:h.id,U),nn=C==null?void 0:C.get(new P.Path(["generator","seed"]));return((Ke=ut==null?void 0:ut.generator)==null?void 0:Ke.seed)!==void 0&&nn!==void 0&&(ut.generator.seed=nn,((qe=ut.generator.biome_source)==null?void 0:qe.seed)!==void 0&&(ut.generator.biome_source.seed=nn)),ut}catch{l(`Cannot load preset ${U} in ${t}`),m(void 0,!0)}},Z=U=>{v(void 0,!0),n(U),o.name!==vr.name&&o.version!==U&&a({version:U})},[ee,R]=X(void 0),[A,O]=X(!1),[$,q]=oc({cooldown:3e3}),ie=()=>{if(A){O(!1);return}if(_)R(`${location.origin}/${h.url}/?version=${t}&preset=${_}`),O(!0),B();else if(C&&E){const U=vc(C,E);Pi(U,C.schema.default())?(R(`${location.origin}/${h.url}/?version=${t}`),O(!0)):cw(h.id,t,U,et).then(({id:oe,length:Ke,compressed:qe,rate:ut})=>{Se.createSnippet(h.id,oe,t,Ke,qe,ut);const nn=`${location.origin}/${h.url}/?${Dl}=${oe}`;R(nn),O(!0)}).catch(oe=>{oe instanceof Error&&l(oe)})}},B=()=>{navigator.clipboard.writeText(ee!=null?ee:""),q()};ge(()=>{$||(R(void 0),O(!1))},[$]);const[J,de]=X(window.innerWidth>820),[_e,je]=X(0),[Oe,Ge]=X(0),[ot,Ee]=X(0),De=()=>{Se.copyOutput(h.id,"menu"),je(_e+1)},Fe=()=>{Se.downloadOutput(h.id,"menu"),Ge(Oe+1)},ae=()=>{Se.generatorEvent("import"),de(!0),Ee(ot+1)},mn=()=>{J?Se.hideOutput(h.id,"menu"):Se.showOutput(h.id,"menu"),de(!J),je(0),Ge(0),Ee(0)},[Ue,Pe]=oc(),[et,_t]=X(!1),gn=dv.includes(h.id)&&!(h.id==="worldgen/configured_feature"&&mt(t,"1.18"));et&&!gn&&_t(!1);let Rn=2;gn&&(Rn+=1),J&&(Rn+=2);const Q=()=>{J?Se.hidePreview(h.id,"menu"):Se.showPreview(h.id,"menu"),_t(!et),!et&&J&&de(!1)},[ne,fe]=X((Y=He.getProjectPanelOpen())!=null?Y:window.innerWidth>600),Ae=Ve(()=>{ne?Se.hideProject(h.id,i.length,o.files.length,"menu"):Se.showProject(h.id,i.length,o.files.length,"menu"),He.setProjectPanelOpen(!ne),fe(!ne)},[ne]),[st,At]=X(!1),[Wi,ni]=X(!1),[rs,V]=X(void 0),[G,z]=X(void 0);return D(me,{children:[D("main",{class:`generator${et?" has-preview":""}${ne?" has-project":""}`,children:[!h.partner&&p(cf,{id:"data-pack-generator",type:"text"}),D("div",{class:"controls generator-controls",children:[p(se,{icon:"upload",label:e("import"),onClick:ae}),p(Ht,{icon:"archive",label:e("presets"),relative:!1,children:p(Tw,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:K,onSelect:N})}),p(ns,{value:t,onChange:Z,allowed:w}),D(Ht,{icon:"kebab_horizontal",tooltip:e("more"),children:[p(se,{icon:"history",label:e("reset_default"),onClick:M}),x!==void 0&&p(se,{icon:"history",label:e("restore_backup"),onClick:y}),p(se,{icon:"arrow_left",label:e("undo"),onClick:S}),p(se,{icon:"arrow_right",label:e("redo"),onClick:T}),p(se,{icon:"file",label:e("project.save"),onClick:()=>V("menu")})]})]}),u&&p(Ai,{error:u,onDismiss:()=>l(null)}),p(o9,{model:C,version:t,blockStates:E,onError:l}),p(Nn,{donate:!h.partner})]}),D("div",{class:"popup-actions right-actions",style:`--offset: -${8+Rn*50}px;`,children:[p("div",{class:`popup-action action-preview${gn?" shown":""} tooltipped tip-nw`,"aria-label":e(et?"hide_preview":"show_preview"),onClick:Q,children:et?pe.x_circle:pe.play}),p("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:ie,children:pe.link}),p("div",{class:`popup-action action-download${J?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:Fe,children:pe.download}),p("div",{class:`popup-action action-copy${J?" shown":""}${Ue?" active":""} tooltipped tip-nw`,"aria-label":e(Ue?"copied":"copy"),onClick:De,children:Ue?pe.check:pe.clippy}),p("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(J?"hide_output":"show_output"),onClick:mn,children:J?pe.chevron_right:pe.code})]}),p("div",{class:`popup-preview${et?" shown":""}`,children:p(fv,{model:C,version:t,id:h.id,shown:et,onError:l})}),p("div",{class:`popup-source${J?" shown":""}`,children:p(_v,{model:C,blockStates:E,doCopy:_e,doDownload:Oe,doImport:ot,name:(te=h.schema)!=null?te:"data",copySuccess:Pe,onError:l})}),D("div",{class:`popup-share${A?" shown":""}`,children:[p(fn,{value:ee,readonly:!0}),p(se,{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:Ae,children:ne?pe.chevron_left:pe.repo})}),p("div",{class:`popup-project${ne?" shown":""}`,children:p(mv,{model:C,version:t,id:h.id,onError:l,onDeleteProject:()=>ni(!0),onRename:z,onCreate:()=>At(!0)})}),st&&p(hv,{onClose:()=>At(!1)}),Wi&&p(pv,{onClose:()=>ni(!1)}),C&&rs&&p(Lw,{id:h.id,model:C,method:rs,onClose:()=>V(void 0)}),G&&p(Ow,{id:G.type,name:G.id,onClose:()=>z(void 0)})]})}function z9({}){const{locale:e}=ke();return hn(e("title.generators")),D("main",{children:[p("div",{class:"container",children:p(e0,{predicate:t=>!t.partner})}),p(Nn,{})]})}var h0={exports:{}};function p0(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)&&p0(n)}),e}h0.exports=p0;h0.exports.default=p0;var H9=h0.exports;class kd{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function kp(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function fr(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 U9="</span>",Cd=e=>!!e.kind,Z9=(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 G9{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=kp(t)}openNode(t){if(!Cd(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=Z9(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Cd(t)||(this.buffer+=U9)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class m0{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=>{m0._collapse(n)})))}}class Y9 extends m0{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 G9(this,this.options).value()}finalize(){return!0}}function Vo(e){return e?typeof e=="string"?e:e.source:null}function Cp(e){return ti("(?=",e,")")}function W9(e){return ti("(?:",e,")*")}function q9(e){return ti("(?:",e,")?")}function ti(...e){return e.map(n=>Vo(n)).join("")}function X9(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function g0(...e){const t=X9(e);return"("+(t.capture?"":"?:")+e.map(r=>Vo(r)).join("|")+")"}function Ep(e){return new RegExp(e.toString()+"|").exec("").length-1}function K9(e,t){const n=e&&e.exec(t);return n&&n.index===0}const J9=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _0(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=Vo(r),s="";for(;o.length>0;){const a=J9.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+i):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const Q9=/\b\B/,Ap="[a-zA-Z]\\w*",w0="[a-zA-Z_]\\w*",Sp="\\b\\d+(\\.\\d+)?",Ip="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Mp="\\b(0b[01]+)",ex="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",tx=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ti(t,/.*\b/,e.binary,/\b.*/)),fr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},jo={begin:"\\\\[\\s\\S]",relevance:0},nx={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[jo]},rx={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[jo]},ix={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/},Za=function(e,t,n={}){const r=fr({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=g0("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:ti(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},ox=Za("//","$"),sx=Za("/\\*","\\*/"),ax=Za("#","$"),lx={scope:"number",begin:Sp,relevance:0},cx={scope:"number",begin:Ip,relevance:0},ux={scope:"number",begin:Mp,relevance:0},dx={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[jo,{begin:/\[/,end:/\]/,relevance:0,contains:[jo]}]}]},fx={scope:"title",begin:Ap,relevance:0},hx={scope:"title",begin:w0,relevance:0},px={begin:"\\.\\s*"+w0,relevance:0},mx=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 Es=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Q9,IDENT_RE:Ap,UNDERSCORE_IDENT_RE:w0,NUMBER_RE:Sp,C_NUMBER_RE:Ip,BINARY_NUMBER_RE:Mp,RE_STARTERS_RE:ex,SHEBANG:tx,BACKSLASH_ESCAPE:jo,APOS_STRING_MODE:nx,QUOTE_STRING_MODE:rx,PHRASAL_WORDS_MODE:ix,COMMENT:Za,C_LINE_COMMENT_MODE:ox,C_BLOCK_COMMENT_MODE:sx,HASH_COMMENT_MODE:ax,NUMBER_MODE:lx,C_NUMBER_MODE:cx,BINARY_NUMBER_MODE:ux,REGEXP_MODE:dx,TITLE_MODE:fx,UNDERSCORE_TITLE_MODE:hx,METHOD_GUARD:px,END_SAME_AS_BEGIN:mx});function gx(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function _x(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function wx(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=gx,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function vx(e,t){!Array.isArray(e.illegal)||(e.illegal=g0(...e.illegal))}function xx(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 bx(e,t){e.relevance===void 0&&(e.relevance=1)}const yx=(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=ti(n.beforeMatch,Cp(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},kx=["of","and","for","in","not","or","if","then","parent","list","value"],Cx="keyword";function Tp(e,t,n=Cx){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,Tp(e[o],t,o))}),r;function i(o,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){const c=a.split("|");r[c[0]]=[o,Ex(c[0],c[1])]})}}function Ex(e,t){return t?Number(t):Ax(e)?0:1}function Ax(e){return kx.includes(e.toLowerCase())}const Ed={},Br=e=>{console.error(e)},Ad=(e,...t)=>{console.log(`WARN: ${e}`,...t)},di=(e,t)=>{Ed[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ed[`${e}/${t}`]=!0)},xa=new Error;function Lp(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let a=1;a<=t.length;a++)s[a+r]=i[a],o[a+r]=!0,r+=Ep(t[a-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function Sx(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Br("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),xa;if(typeof e.beginScope!="object"||e.beginScope===null)throw Br("beginScope must be object"),xa;Lp(e,e.begin,{key:"beginScope"}),e.begin=_0(e.begin,{joinWith:""})}}function Ix(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Br("skip, excludeEnd, returnEnd not compatible with endScope: {}"),xa;if(typeof e.endScope!="object"||e.endScope===null)throw Br("endScope must be object"),xa;Lp(e,e.end,{key:"endScope"}),e.end=_0(e.end,{joinWith:""})}}function Mx(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Tx(e){Mx(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Sx(e),Ix(e)}function Lx(e){function t(s,a){return new RegExp(Vo(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,a]),this.matchAt+=Ep(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(c=>c[1]);this.matcherRe=t(_0(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(a);if(!c)return null;const u=c.findIndex((d,f)=>f>0&&d!==void 0),l=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,l)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const c=new n;return this.rules.slice(a).forEach(([u,l])=>c.addRule(u,l)),c.compile(),this.multiRegexes[a]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,c){this.rules.push([a,c]),c.type==="begin"&&this.count++}exec(a){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const l=this.getMatcher(0);l.lastIndex=this.lastIndex+1,u=l.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(s){const a=new r;return s.contains.forEach(c=>a.addRule(c.begin,{rule:c,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function o(s,a){const c=s;if(s.isCompiled)return c;[_x,xx,Tx,yx].forEach(l=>l(s,a)),e.compilerExtensions.forEach(l=>l(s,a)),s.__beforeBegin=null,[wx,vx,bx].forEach(l=>l(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=Tp(s.keywords,e.case_insensitive)),c.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),c.beginRe=t(c.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(c.endRe=t(c.end)),c.terminatorEnd=Vo(c.end)||"",s.endsWithParent&&a.terminatorEnd&&(c.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(c.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(l){return Ox(l==="self"?s:l)})),s.contains.forEach(function(l){o(l,c)}),s.starts&&o(s.starts,a),c.matcher=i(c),c}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=fr(e.classNameAliases||{}),o(e)}function Op(e){return e?e.endsWithParent||Op(e.starts):!1}function Ox(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return fr(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Op(e)?fr(e,{starts:e.starts?fr(e.starts):null}):Object.isFrozen(e)?fr(e):e}var Nx="11.5.1";class Rx extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Fl=kp,Sd=fr,Id=Symbol("nomatch"),Dx=7,Fx=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Y9};function c(N){return a.noHighlightRe.test(N)}function u(N){let j=N.className+" ";j+=N.parentNode?N.parentNode.className:"";const Z=a.languageDetectRe.exec(j);if(Z){const ee=M(Z[1]);return ee||(Ad(o.replace("{}",Z[1])),Ad("Falling back to no-highlight mode for this block.",N)),ee?Z[1]:"no-highlight"}return j.split(/\s+/).find(ee=>c(ee)||M(ee))}function l(N,j,Z){let ee="",R="";typeof j=="object"?(ee=N,Z=j.ignoreIllegals,R=j.language):(di("10.7.0","highlight(lang, code, ...args) has been deprecated."),di("10.7.0",`Please use highlight(code, options) instead.
|
|
https://github.com/highlightjs/highlight.js/issues/2277`),R=N,ee=j),Z===void 0&&(Z=!0);const A={code:ee,language:R};K("before:highlight",A);const O=A.result?A.result:d(A.language,A.code,Z);return O.code=A.code,K("after:highlight",O),O}function d(N,j,Z,ee){const R=Object.create(null);function A(Q,ne){return Q.keywords[ne]}function O(){if(!ae.keywords){Ue.addText(Pe);return}let Q=0;ae.keywordPatternRe.lastIndex=0;let ne=ae.keywordPatternRe.exec(Pe),fe="";for(;ne;){fe+=Pe.substring(Q,ne.index);const Ae=Ee.case_insensitive?ne[0].toLowerCase():ne[0],st=A(ae,Ae);if(st){const[At,Wi]=st;if(Ue.addText(fe),fe="",R[Ae]=(R[Ae]||0)+1,R[Ae]<=Dx&&(et+=Wi),At.startsWith("_"))fe+=ne[0];else{const ni=Ee.classNameAliases[At]||At;Ue.addKeyword(ne[0],ni)}}else fe+=ne[0];Q=ae.keywordPatternRe.lastIndex,ne=ae.keywordPatternRe.exec(Pe)}fe+=Pe.substr(Q),Ue.addText(fe)}function $(){if(Pe==="")return;let Q=null;if(typeof ae.subLanguage=="string"){if(!t[ae.subLanguage]){Ue.addText(Pe);return}Q=d(ae.subLanguage,Pe,!0,mn[ae.subLanguage]),mn[ae.subLanguage]=Q._top}else Q=h(Pe,ae.subLanguage.length?ae.subLanguage:null);ae.relevance>0&&(et+=Q.relevance),Ue.addSublanguage(Q._emitter,Q.language)}function q(){ae.subLanguage!=null?$():O(),Pe=""}function ie(Q,ne){let fe=1;const Ae=ne.length-1;for(;fe<=Ae;){if(!Q._emit[fe]){fe++;continue}const st=Ee.classNameAliases[Q[fe]]||Q[fe],At=ne[fe];st?Ue.addKeyword(At,st):(Pe=At,O(),Pe=""),fe++}}function B(Q,ne){return Q.scope&&typeof Q.scope=="string"&&Ue.openNode(Ee.classNameAliases[Q.scope]||Q.scope),Q.beginScope&&(Q.beginScope._wrap?(Ue.addKeyword(Pe,Ee.classNameAliases[Q.beginScope._wrap]||Q.beginScope._wrap),Pe=""):Q.beginScope._multi&&(ie(Q.beginScope,ne),Pe="")),ae=Object.create(Q,{parent:{value:ae}}),ae}function J(Q,ne,fe){let Ae=K9(Q.endRe,fe);if(Ae){if(Q["on:end"]){const st=new kd(Q);Q["on:end"](ne,st),st.isMatchIgnored&&(Ae=!1)}if(Ae){for(;Q.endsParent&&Q.parent;)Q=Q.parent;return Q}}if(Q.endsWithParent)return J(Q.parent,ne,fe)}function de(Q){return ae.matcher.regexIndex===0?(Pe+=Q[0],1):(Rn=!0,0)}function _e(Q){const ne=Q[0],fe=Q.rule,Ae=new kd(fe),st=[fe.__beforeBegin,fe["on:begin"]];for(const At of st)if(!!At&&(At(Q,Ae),Ae.isMatchIgnored))return de(ne);return fe.skip?Pe+=ne:(fe.excludeBegin&&(Pe+=ne),q(),!fe.returnBegin&&!fe.excludeBegin&&(Pe=ne)),B(fe,Q),fe.returnBegin?0:ne.length}function je(Q){const ne=Q[0],fe=j.substr(Q.index),Ae=J(ae,Q,fe);if(!Ae)return Id;const st=ae;ae.endScope&&ae.endScope._wrap?(q(),Ue.addKeyword(ne,ae.endScope._wrap)):ae.endScope&&ae.endScope._multi?(q(),ie(ae.endScope,Q)):st.skip?Pe+=ne:(st.returnEnd||st.excludeEnd||(Pe+=ne),q(),st.excludeEnd&&(Pe=ne));do ae.scope&&Ue.closeNode(),!ae.skip&&!ae.subLanguage&&(et+=ae.relevance),ae=ae.parent;while(ae!==Ae.parent);return Ae.starts&&B(Ae.starts,Q),st.returnEnd?0:ne.length}function Oe(){const Q=[];for(let ne=ae;ne!==Ee;ne=ne.parent)ne.scope&&Q.unshift(ne.scope);Q.forEach(ne=>Ue.openNode(ne))}let Ge={};function ot(Q,ne){const fe=ne&&ne[0];if(Pe+=Q,fe==null)return q(),0;if(Ge.type==="begin"&&ne.type==="end"&&Ge.index===ne.index&&fe===""){if(Pe+=j.slice(ne.index,ne.index+1),!i){const Ae=new Error(`0 width match regex (${N})`);throw Ae.languageName=N,Ae.badRule=Ge.rule,Ae}return 1}if(Ge=ne,ne.type==="begin")return _e(ne);if(ne.type==="illegal"&&!Z){const Ae=new Error('Illegal lexeme "'+fe+'" for mode "'+(ae.scope||"<unnamed>")+'"');throw Ae.mode=ae,Ae}else if(ne.type==="end"){const Ae=je(ne);if(Ae!==Id)return Ae}if(ne.type==="illegal"&&fe==="")return 1;if(gn>1e5&&gn>ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Pe+=fe,fe.length}const Ee=M(N);if(!Ee)throw Br(o.replace("{}",N)),new Error('Unknown language: "'+N+'"');const De=Lx(Ee);let Fe="",ae=ee||De;const mn={},Ue=new a.__emitter(a);Oe();let Pe="",et=0,_t=0,gn=0,Rn=!1;try{for(ae.matcher.considerAll();;){gn++,Rn?Rn=!1:ae.matcher.considerAll(),ae.matcher.lastIndex=_t;const Q=ae.matcher.exec(j);if(!Q)break;const ne=j.substring(_t,Q.index),fe=ot(ne,Q);_t=Q.index+fe}return ot(j.substr(_t)),Ue.closeAllNodes(),Ue.finalize(),Fe=Ue.toHTML(),{language:N,value:Fe,relevance:et,illegal:!1,_emitter:Ue,_top:ae}}catch(Q){if(Q.message&&Q.message.includes("Illegal"))return{language:N,value:Fl(j),illegal:!0,relevance:0,_illegalBy:{message:Q.message,index:_t,context:j.slice(_t-100,_t+100),mode:Q.mode,resultSoFar:Fe},_emitter:Ue};if(i)return{language:N,value:Fl(j),illegal:!1,relevance:0,errorRaised:Q,_emitter:Ue,_top:ae};throw Q}}function f(N){const j={value:Fl(N),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return j._emitter.addText(N),j}function h(N,j){j=j||a.languages||Object.keys(t);const Z=f(N),ee=j.filter(M).filter(T).map(q=>d(q,N,!1));ee.unshift(Z);const R=ee.sort((q,ie)=>{if(q.relevance!==ie.relevance)return ie.relevance-q.relevance;if(q.language&&ie.language){if(M(q.language).supersetOf===ie.language)return 1;if(M(ie.language).supersetOf===q.language)return-1}return 0}),[A,O]=R,$=A;return $.secondBest=O,$}function w(N,j,Z){const ee=j&&n[j]||Z;N.classList.add("hljs"),N.classList.add(`language-${ee}`)}function _(N){let j=null;const Z=u(N);if(c(Z))return;if(K("before:highlightElement",{el:N,language:Z}),N.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(N)),a.throwUnescapedHTML))throw new Rx("One of your code blocks includes unescaped HTML.",N.innerHTML);j=N;const ee=j.textContent,R=Z?l(ee,{language:Z,ignoreIllegals:!0}):h(ee);N.innerHTML=R.value,w(N,Z,R.language),N.result={language:R.language,re:R.relevance,relevance:R.relevance},R.secondBest&&(N.secondBest={language:R.secondBest.language,relevance:R.secondBest.relevance}),K("after:highlightElement",{el:N,result:R,text:ee})}function m(N){a=Sd(a,N)}const g=()=>{x(),di("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){x(),di("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let b=!1;function x(){if(document.readyState==="loading"){b=!0;return}document.querySelectorAll(a.cssSelector).forEach(_)}function y(){b&&x()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",y,!1);function k(N,j){let Z=null;try{Z=j(e)}catch(ee){if(Br("Language definition for '{}' could not be registered.".replace("{}",N)),i)Br(ee);else throw ee;Z=s}Z.name||(Z.name=N),t[N]=Z,Z.rawDefinition=j.bind(null,e),Z.aliases&&S(Z.aliases,{languageName:N})}function C(N){delete t[N];for(const j of Object.keys(n))n[j]===N&&delete n[j]}function E(){return Object.keys(t)}function M(N){return N=(N||"").toLowerCase(),t[N]||t[n[N]]}function S(N,{languageName:j}){typeof N=="string"&&(N=[N]),N.forEach(Z=>{n[Z.toLowerCase()]=j})}function T(N){const j=M(N);return j&&!j.disableAutodetect}function L(N){N["before:highlightBlock"]&&!N["before:highlightElement"]&&(N["before:highlightElement"]=j=>{N["before:highlightBlock"](Object.assign({block:j.el},j))}),N["after:highlightBlock"]&&!N["after:highlightElement"]&&(N["after:highlightElement"]=j=>{N["after:highlightBlock"](Object.assign({block:j.el},j))})}function F(N){L(N),r.push(N)}function K(N,j){const Z=N;r.forEach(function(ee){ee[Z]&&ee[Z](j)})}function H(N){return di("10.7.0","highlightBlock will be removed entirely in v12.0"),di("10.7.0","Please use highlightElement now."),_(N)}Object.assign(e,{highlight:l,highlightAuto:h,highlightAll:x,highlightElement:_,highlightBlock:H,configure:m,initHighlighting:g,initHighlightingOnLoad:v,registerLanguage:k,unregisterLanguage:C,listLanguages:E,getLanguage:M,registerAliases:S,autoDetection:T,inherit:Sd,addPlugin:F}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Nx,e.regex={concat:ti,lookahead:Cp,either:g0,optional:q9,anyNumberOfTimes:W9};for(const N in Es)typeof Es[N]=="object"&&H9(Es[N]);return Object.assign(e,Es),e};var zo=Fx({}),Px=zo;zo.HighlightJS=zo;zo.default=zo;var v0=Px;function $x(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 Bx='<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>';v0.registerLanguage("json",$x);ve.use({highlight:(e,t)=>{if(t!=="")return v0.highlight(e,{language:t}).value}});function Vx({id:e}){const{locale:t}=ke(),{version:n,changeVersion:r}=Er(),{changeTitle:i}=hn(),{value:o,refresh:s}=Cr(async()=>await(await fetch(`../../guides/${e}.md`)).text(),[e]),a=ye(()=>{if(!o)return;const x=T3(o);return i(x==null?void 0:x.title,x==null?void 0:x.versions),x},[o]),c=ye(()=>{var y;const x=Le.versions.map(k=>k.id);return(y=a==null?void 0:a.versions)==null?void 0:y.sort((k,C)=>x.indexOf(C)-x.indexOf(k))},[a==null?void 0:a.versions]),u=ye(()=>!c||c.includes(n)?n:c[0],[n,a==null?void 0:a.versions]),l=ye(()=>{if(!o)return;const x=[];let y=!1;ve.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=v0.highlight("json",E.text).value,S="language-json"),`<code${S?` class="${S}"`:""}>${M}</code>`}}],walkTokens(E){E.type==="heading"&&x.push(E)},renderer:{link(E,M,S){if(E===null)return S;const T=M?` title="${M}"`:"",L=E!=null&&E.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${E}"${T}${L}>${S}</a>`},heading(E,M,S,T){let L="";y||(L=`<ol class="guide-toc">${x.filter(H=>H.depth===2).map(H=>{var Z,ee;const N=T.slug((ee=(Z=H.raw.match(/^#+ (.*)/))==null?void 0:Z[1])!=null?ee:"",{dryrun:!0}),j=H.text.replaceAll("`","");return`<li><a href="#${N}">${j}</a></li>`}).join("")}</ol>`,y=!0);const F=T.slug(S),K=`<span id="guide-${F}" href="?version=${n}#${F}">${Bx}</span>`;return`${L}<h${M}>${K}${E}</h${M}>`}}});const k=o.substring(o.indexOf("---",3)+3),C=L3(k,u);return ve(C,{version:"1.19"})},[u,o]),[d,f]=j3(),h=Ve(()=>{if(!l)return;const x=document.querySelector(`[id=guide-${d.slice(1)}]`);if(x){const y=x.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:y-68,behavior:"smooth"})}},[l,d]);ge(()=>{h()},[l===void 0,d]);const w=Ve(x=>{if(!(x.target instanceof HTMLSpanElement))return;const y="#"+x.target.id.replace(/^guide-/,"");r(n,!1,!0),f(y),y===d&&h()},[h,d,n]),[_,m]=oc(),g=Ve(()=>{const x=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(x),m()},[e,n]),v=Ve(x=>{Xr(`/guides/?tags=${x}`)},[]),[b]=X(window.innerWidth>600);return D("main",{children:[D("div",{class:"container guide",children:[D("div",{class:"navigation",children:[D("a",{class:"btn btn-link",href:"/guides/",children:[pe.arrow_left,p("span",{children:t("guides.all")})]}),D("a",{class:"btn btn-link",href:"/worldgen/",children:[Vi.worldgen,p("span",{children:t("worldgen")})]}),p("div",{class:"navigation-divider"}),p(se,{icon:_?"check":"link",label:t("share"),onClick:g,active:_,tooltip:t(_?"copied":"copy_share"),class:"guide-share"}),c&&p(ns,{value:u,allowed:c,onChange:r})]}),(a==null?void 0:a.tags)&&a.tags.length>0&&p("div",{class:"badges-list",children:a.tags.map(x=>p(Gi,{label:x,active:!0,onClick:()=>v(x)}))}),l&&D(me,{children:[p(cf,{id:"guide",type:b?"image":"text"}),p("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:l},onClick:w}),p(u0,{})]})]}),p(Nn,{})]})}function jx({}){const{locale:e}=ke(),{version:t,changeVersion:n}=Er();hn(e("title.guides"));const[r,i]=X(""),[o,s]=zh(),[a,c]=X(!1),u=ye(()=>a===!1?Cc():Cc().filter(d=>{var f;return(f=d.versions)==null?void 0:f.includes(t)}),[t,a]),l=ye(()=>{const d=r.split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return u.filter(f=>{var w;if(!o.every(_=>{var m;return(m=f.tags)==null?void 0:m.includes(_)}))return!1;const h=((w=f.tags)==null?void 0:w.join(" "))+" "+f.title.toLowerCase();return d.every(_=>_.startsWith("!")?_.length===1||!h.includes(_.slice(1)):h.includes(_))})},[u,r,o]);return D("main",{children:[D("div",{class:"container guides",children:[D("div",{class:"navigation",children:[p(fn,{class:"btn btn-input query-search",placeholder:e("guides.search"),value:r,onChange:i}),p(ns,{value:a?t:void 0,onChange:d=>{n(d),c(!0)},hasAny:!0,onAny:()=>c(!1)})]}),o.length>0&&p("div",{class:"badges-list",children:o.map(d=>p(Gi,{label:d,onClick:()=>s(d)}))}),p("div",{class:"card-column",children:u.length===0?p(me,{children:p("span",{class:"note",children:e("guides.no_results.version")})}):l.length===0?p(me,{children:p("span",{class:"note",children:e("guides.no_results.query")})}):l.map(d=>p(Bo,{id:d.id,activeTags:o,toggleTag:s}))})]}),p(Nn,{})]})}const zx=2,Hx=5;function Ux({}){const{locale:e}=ke();hn(e("title.home"));const t=ia("(max-width: 580px)");return p("main",{children:D("div",{class:"container",children:[D("div",{class:"card-group",children:[D("div",{class:"card-column",children:[p(Zx,{}),t&&p(Md,{}),p(Yx,{}),t&&p(Td,{}),p(Gx,{}),t&&p(Ld,{})]}),!t&&D("div",{class:"card-column",children:[p(Md,{}),p(Td,{}),p(Ld,{})]})]}),p(u0,{}),p(Nn,{})]})})}function Zx(){const{locale:e}=ke();return D(yr,{title:e("generators.popular"),link:"/generators/",children:[p(bn,{minimal:!0,id:"loot_table"}),p(bn,{minimal:!0,id:"advancement"}),p(bn,{minimal:!0,id:"predicate"}),p(Yn,{title:e("worldgen"),link:"/worldgen/",titleIcon:"worldgen"}),p(Yn,{title:e("generators.all"),link:"/generators/",titleIcon:"arrow_right"})]})}function Md(){const{locale:e}=ke(),t=ye(()=>{const n=[];for(const r of He.getGeneratorHistory().reverse())n.includes(r)||n.push(r);return n.slice(0,Hx)},[]);return t.length<zx?p(me,{}):p(yr,{title:e("generators.recent"),children:t.map(n=>p(bn,{minimal:!0,id:n}))})}function Td(){const{locale:e}=ke();return D(yr,{title:e("guides"),link:"/guides/",titleIcon:"arrow_right",children:[p(Bo,{minimal:!0,id:"adding-custom-structures"}),p(Bo,{minimal:!0,id:"noise-router"})]})}function Ld(){const{locale:e}=ke();return D(yr,{title:e("tools"),children:[p(Yn,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),p(Yn,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),p(Yn,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.19"})]})}function Gx(){const{locale:e}=ke(),{value:t}=Cr(Wc,[]),n=ye(()=>t==null?void 0:t.find(r=>r.type==="release"),[t]);return p(yr,{title:e("versions.minecraft_versions"),link:"/versions/",titleIcon:"arrow_right",children:(t==null?void 0:t[0])&&n&&D(me,{children:[t[0].id!==n.id&&p(Yn,{title:t[0].name,link:`/versions/?id=${t[0].id}`,desc:e("versions.latest_snapshot")}),p(Yn,{title:n.name,link:`/versions/?id=${n.id}`,desc:e("versions.latest_release")})]})})}function Yx(){const{locale:e}=ke(),t=ia("(min-width: 960px)"),{value:n}=Cr(qc,[]),r=ye(()=>n==null?void 0:n.sort((i,o)=>o.order-i.order).slice(0,2),[n]);return p(yr,{title:e("changelog"),link:"/changelog/",titleIcon:"git_commit",children:r==null?void 0:r.map(i=>p(xp,{minimal:!t,change:i}))})}function Wx({}){const{locale:e}=ke();return hn(e("title.partners")),D("main",{children:[p("div",{class:"container",children:p(e0,{predicate:t=>t.partner!==void 0})}),p(Nn,{donate:!1})]})}function qx({}){const{locale:e}=ke(),{version:t,changeVersion:n}=Er();hn(e("title.sounds"));const[r,i]=X(void 0);ge(()=>{(async()=>{const x=await be(()=>import("./howler.fbed489c.js").then(function(y){return y.h}),[]);i(()=>y=>new x.Howl(y))})()},[]);const{value:o,error:s}=Cr(async()=>await K3(t),[t]),a=ye(()=>Object.keys(o!=null?o:{}),[o]),[c,u]=X(""),[l,d]=X([]),f=()=>{d([{id:Pr(),sound:c,delay:0,pitch:1,volume:1},...l])},h=x=>y=>{d(l.map(k=>k.id===x?he(he({},k),y):k))},w=x=>()=>{d(l.filter(y=>y.id!==x))},[_,m]=X(0),g=()=>{m(_+1)},v=Te(null),b=()=>{if(!v.current)return;const x=l.some(k=>k.delay>0),y=l.sort((k,C)=>k.delay-C.delay).map(k=>`${x?`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 D("main",{children:[s&&p(Ai,{error:s}),a.length>0&&D(me,{children:[D("div",{class:"sounds-controls",children:[D("div",{class:"sound-search-group",children:[p(fn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:c,onChange:u,onEnter:f}),p(se,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:f})]}),l.length>1&&p(se,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:g}),p("div",{class:"spacer"}),p(se,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),tooltipLoc:"se",class:"download-sounds",onClick:b}),p(ns,{value:t,onChange:n})]}),p("div",{class:"sounds",children:o&&r&&l.map(x=>p(g9,Ne(he({},x),{howler:r,sounds:o,delayedPlay:_,onEdit:h(x.id),onDelete:w(x.id)}),x.id))}),p("a",{ref:v,style:"display: none;"}),p("datalist",{id:"sound-list",children:a.map(x=>p("option",{value:x},x))})]}),p(Nn,{donate:!1})]})}function Xx({}){const{locale:e}=ke(),{value:t,error:n}=Cr(Wc,[]),[r]=zr("id"),i=(t!=null?t:[]).find(a=>a.id===r);hn(i?`Minecraft ${i.name}`:"Versions Explorer",i?[]:void 0,i?"Changes and metadata":void 0);const o=i&&Od(t!=null?t:[],i,-1),s=i&&Od(t!=null?t:[],i,1);return D("main",{children:[n&&p(Ai,{error:n}),p("div",{class:"container",children:r?D(me,{children:[D("div",{class:"navigation",children:[p(so,{link:"/versions/",icon:"three_bars",label:e("versions.all")}),p(so,{link:s?`/versions/?id=${s.id}`:void 0,icon:"arrow_left",label:e("versions.previous")}),p(so,{link:o?`/versions/?id=${o.id}`:void 0,icon:"arrow_right",label:e("versions.next"),swapped:!0})]}),p(D9,{id:r,version:i})]}):p(me,{children:p(B9,{versions:t,link:a=>`/versions/?id=${a}`,navigation:p(so,{link:"/changelog",icon:"git_commit",label:e("versions.technical_changes")})})})}),p(Nn,{donate:!1})]})}function Od(e,t,n){const i=e.findIndex(o=>o.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function Kx({}){const{locale:e}=ke();return hn(e("title.worldgen")),D("main",{children:[D("div",{class:"container worldgen",children:[D("div",{class:"card-group",children:[D(yr,{title:e("generators.popular"),children:[p(bn,{minimal:!0,id:"dimension"}),p(bn,{minimal:!0,id:"worldgen/biome"}),p(bn,{minimal:!0,id:"worldgen/noise_settings"}),p(bn,{minimal:!0,id:"worldgen/configured_feature"}),p(bn,{minimal:!0,id:"worldgen/placed_feature"})]}),D(yr,{title:e("guides"),link:"/guides/?tags=worldgen",titleIcon:"arrow_right",children:[p(Bo,{id:"adding-custom-structures"}),p(Bo,{id:"placed-features"})]})]}),p(e0,{predicate:t=>{var n;return(n=t.tags)==null?void 0:n.includes("worldgen")}})]}),p(Nn,{})]})}function Jx(){const e=t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>Se.pageview(wr(t.url)))};return D(me,{children:[p(m9,{}),D(qn,{onChange:e,children:[p(Ux,{path:"/"}),p(z9,{path:"/generators"}),p(Kx,{path:"/worldgen"}),p(Wx,{path:"/partners"}),p(qx,{path:"/sounds"}),p(V9,{path:"/changelog"}),p(Xx,{path:"/versions"}),p(jx,{path:"/guides"}),p(Vx,{path:"/guides/:id"}),p(j9,{default:!0})]})]})}function Qx(){return p(bw,{children:p(ww,{children:p(yw,{children:p(Aw,{children:p(Cw,{children:p(xw,{children:p(Jx,{})})})})})})})}Vr(p(Qx,{}),document.body);export{ss as c,q2 as e,P as l,nb as p};
|
|
//# sourceMappingURL=index.9e0ff677.js.map
|